@jonit-dev/night-watch-cli 1.7.84 → 1.7.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +3 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +6 -0
- package/dist/commands/install.js.map +1 -1
- package/dist/scripts/night-watch-pr-reviewer-cron.sh +19 -18
- package/dist/web/assets/index-CJLObgsn.js +386 -0
- package/dist/web/assets/index-DCG0n8Kg.js +386 -0
- package/dist/web/assets/index-DEEI8cyF.css +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
var Dy=Object.defineProperty;var Z0=s=>{throw TypeError(s)};var Ry=(s,u,d)=>u in s?Dy(s,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):s[u]=d;var Q0=(s,u,d)=>Ry(s,typeof u!="symbol"?u+"":u,d),uf=(s,u,d)=>u.has(s)||Z0("Cannot "+d);var I=(s,u,d)=>(uf(s,u,"read from private field"),d?d.call(s):u.get(s)),st=(s,u,d)=>u.has(s)?Z0("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(s):u.set(s,d),Oe=(s,u,d,o)=>(uf(s,u,"write to private field"),o?o.call(s,d):u.set(s,d),d),Te=(s,u,d)=>(uf(s,u,"access private method"),d);(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))o(m);new MutationObserver(m=>{for(const x of m)if(x.type==="childList")for(const g of x.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).observe(document,{childList:!0,subtree:!0});function d(m){const x={};return m.integrity&&(x.integrity=m.integrity),m.referrerPolicy&&(x.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?x.credentials="include":m.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function o(m){if(m.ep)return;m.ep=!0;const x=d(m);fetch(m.href,x)}})();function kf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Ay(s){if(Object.prototype.hasOwnProperty.call(s,"__esModule"))return s;var u=s.default;if(typeof u=="function"){var d=function o(){return this instanceof o?Reflect.construct(u,arguments,this.constructor):u.apply(this,arguments)};d.prototype=u.prototype}else d={};return Object.defineProperty(d,"__esModule",{value:!0}),Object.keys(s).forEach(function(o){var m=Object.getOwnPropertyDescriptor(s,o);Object.defineProperty(d,o,m.get?m:{enumerable:!0,get:function(){return s[o]}})}),d}var cf={exports:{}},Vi={};/**
|
|
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 W0;function _y(){if(W0)return Vi;W0=1;var s=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function d(o,m,x){var g=null;if(x!==void 0&&(g=""+x),m.key!==void 0&&(g=""+m.key),"key"in m){x={};for(var j in m)j!=="key"&&(x[j]=m[j])}else x=m;return m=x.ref,{$$typeof:s,type:o,key:g,ref:m!==void 0?m:null,props:x}}return Vi.Fragment=u,Vi.jsx=d,Vi.jsxs=d,Vi}var X0;function ky(){return X0||(X0=1,cf.exports=_y()),cf.exports}var l=ky(),of={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 P0;function zy(){if(P0)return He;P0=1;var s=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),g=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),D=Symbol.iterator;function R(A){return A===null||typeof A!="object"?null:(A=D&&A[D]||A["@@iterator"],typeof A=="function"?A:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,H={};function P(A,ne,he){this.props=A,this.context=ne,this.refs=H,this.updater=he||M}P.prototype.isReactComponent={},P.prototype.setState=function(A,ne){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,ne,"setState")},P.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Q(){}Q.prototype=P.prototype;function te(A,ne,he){this.props=A,this.context=ne,this.refs=H,this.updater=he||M}var ee=te.prototype=new Q;ee.constructor=te,T(ee,P.prototype),ee.isPureReactComponent=!0;var Y=Array.isArray;function re(){}var Z={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function F(A,ne,he){var ye=he.ref;return{$$typeof:s,type:A,key:ne,ref:ye!==void 0?ye:null,props:he}}function z(A,ne){return F(A.type,ne,A.props)}function ae(A){return typeof A=="object"&&A!==null&&A.$$typeof===s}function le(A){var ne={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(he){return ne[he]})}var de=/\/+/g;function Se(A,ne){return typeof A=="object"&&A!==null&&A.key!=null?le(""+A.key):ne.toString(36)}function pe(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(re,re):(A.status="pending",A.then(function(ne){A.status==="pending"&&(A.status="fulfilled",A.value=ne)},function(ne){A.status==="pending"&&(A.status="rejected",A.reason=ne)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function G(A,ne,he,ye,me){var xe=typeof A;(xe==="undefined"||xe==="boolean")&&(A=null);var Me=!1;if(A===null)Me=!0;else switch(xe){case"bigint":case"string":case"number":Me=!0;break;case"object":switch(A.$$typeof){case s:case u:Me=!0;break;case w:return Me=A._init,G(Me(A._payload),ne,he,ye,me)}}if(Me)return me=me(A),Me=ye===""?"."+Se(A,0):ye,Y(me)?(he="",Me!=null&&(he=Me.replace(de,"$&/")+"/"),G(me,ne,he,"",function(ta){return ta})):me!=null&&(ae(me)&&(me=z(me,he+(me.key==null||A&&A.key===me.key?"":(""+me.key).replace(de,"$&/")+"/")+Me)),ne.push(me)),1;Me=0;var Ge=ye===""?".":ye+":";if(Y(A))for(var Le=0;Le<A.length;Le++)ye=A[Le],xe=Ge+Se(ye,Le),Me+=G(ye,ne,he,xe,me);else if(Le=R(A),typeof Le=="function")for(A=Le.call(A),Le=0;!(ye=A.next()).done;)ye=ye.value,xe=Ge+Se(ye,Le++),Me+=G(ye,ne,he,xe,me);else if(xe==="object"){if(typeof A.then=="function")return G(pe(A),ne,he,ye,me);throw ne=String(A),Error("Objects are not valid as a React child (found: "+(ne==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":ne)+"). If you meant to render a collection of children, use an array instead.")}return Me}function ie(A,ne,he){if(A==null)return A;var ye=[],me=0;return G(A,ye,"","",function(xe){return ne.call(he,xe,me++)}),ye}function ve(A){if(A._status===-1){var ne=A._result;ne=ne(),ne.then(function(he){(A._status===0||A._status===-1)&&(A._status=1,A._result=he)},function(he){(A._status===0||A._status===-1)&&(A._status=2,A._result=he)}),A._status===-1&&(A._status=0,A._result=ne)}if(A._status===1)return A._result.default;throw A._result}var we=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ne=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(ne))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},oe={map:ie,forEach:function(A,ne,he){ie(A,function(){ne.apply(this,arguments)},he)},count:function(A){var ne=0;return ie(A,function(){ne++}),ne},toArray:function(A){return ie(A,function(ne){return ne})||[]},only:function(A){if(!ae(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return He.Activity=E,He.Children=oe,He.Component=P,He.Fragment=d,He.Profiler=m,He.PureComponent=te,He.StrictMode=o,He.Suspense=b,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,He.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Z.H.useMemoCache(A)}},He.cache=function(A){return function(){return A.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(A,ne,he){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ye=T({},A.props),me=A.key;if(ne!=null)for(xe in ne.key!==void 0&&(me=""+ne.key),ne)!B.call(ne,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&ne.ref===void 0||(ye[xe]=ne[xe]);var xe=arguments.length-2;if(xe===1)ye.children=he;else if(1<xe){for(var Me=Array(xe),Ge=0;Ge<xe;Ge++)Me[Ge]=arguments[Ge+2];ye.children=Me}return F(A.type,me,ye)},He.createContext=function(A){return A={$$typeof:g,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:x,_context:A},A},He.createElement=function(A,ne,he){var ye,me={},xe=null;if(ne!=null)for(ye in ne.key!==void 0&&(xe=""+ne.key),ne)B.call(ne,ye)&&ye!=="key"&&ye!=="__self"&&ye!=="__source"&&(me[ye]=ne[ye]);var Me=arguments.length-2;if(Me===1)me.children=he;else if(1<Me){for(var Ge=Array(Me),Le=0;Le<Me;Le++)Ge[Le]=arguments[Le+2];me.children=Ge}if(A&&A.defaultProps)for(ye in Me=A.defaultProps,Me)me[ye]===void 0&&(me[ye]=Me[ye]);return F(A,xe,me)},He.createRef=function(){return{current:null}},He.forwardRef=function(A){return{$$typeof:j,render:A}},He.isValidElement=ae,He.lazy=function(A){return{$$typeof:w,_payload:{_status:-1,_result:A},_init:ve}},He.memo=function(A,ne){return{$$typeof:p,type:A,compare:ne===void 0?null:ne}},He.startTransition=function(A){var ne=Z.T,he={};Z.T=he;try{var ye=A(),me=Z.S;me!==null&&me(he,ye),typeof ye=="object"&&ye!==null&&typeof ye.then=="function"&&ye.then(re,we)}catch(xe){we(xe)}finally{ne!==null&&he.types!==null&&(ne.types=he.types),Z.T=ne}},He.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},He.use=function(A){return Z.H.use(A)},He.useActionState=function(A,ne,he){return Z.H.useActionState(A,ne,he)},He.useCallback=function(A,ne){return Z.H.useCallback(A,ne)},He.useContext=function(A){return Z.H.useContext(A)},He.useDebugValue=function(){},He.useDeferredValue=function(A,ne){return Z.H.useDeferredValue(A,ne)},He.useEffect=function(A,ne){return Z.H.useEffect(A,ne)},He.useEffectEvent=function(A){return Z.H.useEffectEvent(A)},He.useId=function(){return Z.H.useId()},He.useImperativeHandle=function(A,ne,he){return Z.H.useImperativeHandle(A,ne,he)},He.useInsertionEffect=function(A,ne){return Z.H.useInsertionEffect(A,ne)},He.useLayoutEffect=function(A,ne){return Z.H.useLayoutEffect(A,ne)},He.useMemo=function(A,ne){return Z.H.useMemo(A,ne)},He.useOptimistic=function(A,ne){return Z.H.useOptimistic(A,ne)},He.useReducer=function(A,ne,he){return Z.H.useReducer(A,ne,he)},He.useRef=function(A){return Z.H.useRef(A)},He.useState=function(A){return Z.H.useState(A)},He.useSyncExternalStore=function(A,ne,he){return Z.H.useSyncExternalStore(A,ne,he)},He.useTransition=function(){return Z.H.useTransition()},He.version="19.2.4",He}var J0;function zf(){return J0||(J0=1,of.exports=zy()),of.exports}var V=zf();const Be=kf(V);var df={exports:{}},Bi={},ff={exports:{}},hf={};/**
|
|
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 I0;function Uy(){return I0||(I0=1,(function(s){function u(G,ie){var ve=G.length;G.push(ie);e:for(;0<ve;){var we=ve-1>>>1,oe=G[we];if(0<m(oe,ie))G[we]=ie,G[ve]=oe,ve=we;else break e}}function d(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var ie=G[0],ve=G.pop();if(ve!==ie){G[0]=ve;e:for(var we=0,oe=G.length,A=oe>>>1;we<A;){var ne=2*(we+1)-1,he=G[ne],ye=ne+1,me=G[ye];if(0>m(he,ve))ye<oe&&0>m(me,he)?(G[we]=me,G[ye]=ve,we=ye):(G[we]=he,G[ne]=ve,we=ne);else if(ye<oe&&0>m(me,ve))G[we]=me,G[ye]=ve,we=ye;else break e}}return ie}function m(G,ie){var ve=G.sortIndex-ie.sortIndex;return ve!==0?ve:G.id-ie.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;s.unstable_now=function(){return x.now()}}else{var g=Date,j=g.now();s.unstable_now=function(){return g.now()-j}}var b=[],p=[],w=1,E=null,D=3,R=!1,M=!1,T=!1,H=!1,P=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,te=typeof setImmediate<"u"?setImmediate:null;function ee(G){for(var ie=d(p);ie!==null;){if(ie.callback===null)o(p);else if(ie.startTime<=G)o(p),ie.sortIndex=ie.expirationTime,u(b,ie);else break;ie=d(p)}}function Y(G){if(T=!1,ee(G),!M)if(d(b)!==null)M=!0,re||(re=!0,le());else{var ie=d(p);ie!==null&&pe(Y,ie.startTime-G)}}var re=!1,Z=-1,B=5,F=-1;function z(){return H?!0:!(s.unstable_now()-F<B)}function ae(){if(H=!1,re){var G=s.unstable_now();F=G;var ie=!0;try{e:{M=!1,T&&(T=!1,Q(Z),Z=-1),R=!0;var ve=D;try{t:{for(ee(G),E=d(b);E!==null&&!(E.expirationTime>G&&z());){var we=E.callback;if(typeof we=="function"){E.callback=null,D=E.priorityLevel;var oe=we(E.expirationTime<=G);if(G=s.unstable_now(),typeof oe=="function"){E.callback=oe,ee(G),ie=!0;break t}E===d(b)&&o(b),ee(G)}else o(b);E=d(b)}if(E!==null)ie=!0;else{var A=d(p);A!==null&&pe(Y,A.startTime-G),ie=!1}}break e}finally{E=null,D=ve,R=!1}ie=void 0}}finally{ie?le():re=!1}}}var le;if(typeof te=="function")le=function(){te(ae)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,Se=de.port2;de.port1.onmessage=ae,le=function(){Se.postMessage(null)}}else le=function(){P(ae,0)};function pe(G,ie){Z=P(function(){G(s.unstable_now())},ie)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(G){G.callback=null},s.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<G?Math.floor(1e3/G):5},s.unstable_getCurrentPriorityLevel=function(){return D},s.unstable_next=function(G){switch(D){case 1:case 2:case 3:var ie=3;break;default:ie=D}var ve=D;D=ie;try{return G()}finally{D=ve}},s.unstable_requestPaint=function(){H=!0},s.unstable_runWithPriority=function(G,ie){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var ve=D;D=G;try{return ie()}finally{D=ve}},s.unstable_scheduleCallback=function(G,ie,ve){var we=s.unstable_now();switch(typeof ve=="object"&&ve!==null?(ve=ve.delay,ve=typeof ve=="number"&&0<ve?we+ve:we):ve=we,G){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=ve+oe,G={id:w++,callback:ie,priorityLevel:G,startTime:ve,expirationTime:oe,sortIndex:-1},ve>we?(G.sortIndex=ve,u(p,G),d(b)===null&&G===d(p)&&(T?(Q(Z),Z=-1):T=!0,pe(Y,ve-we))):(G.sortIndex=oe,u(b,G),M||R||(M=!0,re||(re=!0,le()))),G},s.unstable_shouldYield=z,s.unstable_wrapCallback=function(G){var ie=D;return function(){var ve=D;D=ie;try{return G.apply(this,arguments)}finally{D=ve}}}})(hf)),hf}var K0;function Hy(){return K0||(K0=1,ff.exports=Uy()),ff.exports}var mf={exports:{}},ua={};/**
|
|
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 ex;function Ly(){if(ex)return ua;ex=1;var s=zf();function u(b){var p="https://react.dev/errors/"+b;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)p+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+b+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var o={d:{f:d,r:function(){throw Error(u(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},m=Symbol.for("react.portal");function x(b,p,w){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:E==null?null:""+E,children:b,containerInfo:p,implementation:w}}var g=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(b,p){if(b==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return ua.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ua.createPortal=function(b,p){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(u(299));return x(b,p,null,w)},ua.flushSync=function(b){var p=g.T,w=o.p;try{if(g.T=null,o.p=2,b)return b()}finally{g.T=p,o.p=w,o.d.f()}},ua.preconnect=function(b,p){typeof b=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(b,p))},ua.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},ua.preinit=function(b,p){if(typeof b=="string"&&p&&typeof p.as=="string"){var w=p.as,E=j(w,p.crossOrigin),D=typeof p.integrity=="string"?p.integrity:void 0,R=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;w==="style"?o.d.S(b,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:E,integrity:D,fetchPriority:R}):w==="script"&&o.d.X(b,{crossOrigin:E,integrity:D,fetchPriority:R,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},ua.preinitModule=function(b,p){if(typeof b=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var w=j(p.as,p.crossOrigin);o.d.M(b,{crossOrigin:w,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(b)},ua.preload=function(b,p){if(typeof b=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var w=p.as,E=j(w,p.crossOrigin);o.d.L(b,w,{crossOrigin:E,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},ua.preloadModule=function(b,p){if(typeof b=="string")if(p){var w=j(p.as,p.crossOrigin);o.d.m(b,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:w,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(b)},ua.requestFormReset=function(b){o.d.r(b)},ua.unstable_batchedUpdates=function(b,p){return b(p)},ua.useFormState=function(b,p,w){return g.H.useFormState(b,p,w)},ua.useFormStatus=function(){return g.H.useHostTransitionStatus()},ua.version="19.2.4",ua}var tx;function Wx(){if(tx)return mf.exports;tx=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(u){console.error(u)}}return s(),mf.exports=Ly(),mf.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 ax;function qy(){if(ax)return Bi;ax=1;var s=Hy(),u=zf(),d=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 m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function x(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 g(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 j(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(x(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,n=t;;){var i=a.return;if(i===null)break;var c=i.alternate;if(c===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===a)return b(i),e;if(c===n)return b(i),t;c=c.sibling}throw Error(o(188))}if(a.return!==n.return)a=i,n=c;else{for(var v=!1,N=i.child;N;){if(N===a){v=!0,a=i,n=c;break}if(N===n){v=!0,n=i,a=c;break}N=N.sibling}if(!v){for(N=c.child;N;){if(N===a){v=!0,a=c,n=i;break}if(N===n){v=!0,n=c,a=i;break}N=N.sibling}if(!v)throw Error(o(189))}}if(a.alternate!==n)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var E=Object.assign,D=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),te=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function le(e){return e===null||typeof e!="object"?null:(e=ae&&e[ae]||e["@@iterator"],typeof e=="function"?e:null)}var de=Symbol.for("react.client.reference");function Se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case P:return"Profiler";case H:return"StrictMode";case Y:return"Suspense";case re:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case M:return"Portal";case te:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:Se(e.type)||"Memo";case B:t=e._payload,e=e._init;try{return Se(e(t))}catch{}}return null}var pe=Array.isArray,G=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve={pending:!1,data:null,method:null,action:null},we=[],oe=-1;function A(e){return{current:e}}function ne(e){0>oe||(e.current=we[oe],we[oe]=null,oe--)}function he(e,t){oe++,we[oe]=e.current,e.current=t}var ye=A(null),me=A(null),xe=A(null),Me=A(null);function Ge(e,t){switch(he(xe,t),he(me,e),he(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?x0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=x0(t),e=g0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ne(ye),he(ye,e)}function Le(){ne(ye),ne(me),ne(xe)}function ta(e){e.memoizedState!==null&&he(Me,e);var t=ye.current,a=g0(t,e.type);t!==a&&(he(me,e),he(ye,a))}function aa(e){me.current===e&&(ne(ye),ne(me)),Me.current===e&&(ne(Me),Ui._currentValue=ve)}var Tn,hn;function Ta(e){if(Tn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Tn=t&&t[1]||"",hn=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Tn+e+hn}var Ca=!1;function mn(e,t){if(!e||Ca)return"";Ca=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(K){var J=K}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(K){J=K}e.call(ce.prototype)}}else{try{throw Error()}catch(K){J=K}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(K){if(K&&J&&typeof K.stack=="string")return[K.stack,J.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),v=c[0],N=c[1];if(v&&N){var O=v.split(`
|
|
44
|
+
`),X=N.split(`
|
|
45
|
+
`);for(i=n=0;n<O.length&&!O[n].includes("DetermineComponentFrameRoot");)n++;for(;i<X.length&&!X[i].includes("DetermineComponentFrameRoot");)i++;if(n===O.length||i===X.length)for(n=O.length-1,i=X.length-1;1<=n&&0<=i&&O[n]!==X[i];)i--;for(;1<=n&&0<=i;n--,i--)if(O[n]!==X[i]){if(n!==1||i!==1)do if(n--,i--,0>i||O[n]!==X[i]){var se=`
|
|
46
|
+
`+O[n].replace(" at new "," at ");return e.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",e.displayName)),se}while(1<=n&&0<=i);break}}}finally{Ca=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ta(a):""}function _(e,t){switch(e.tag){case 26:case 27:case 5:return Ta(e.type);case 16:return Ta("Lazy");case 13:return e.child!==t&&t!==null?Ta("Suspense Fallback"):Ta("Suspense");case 19:return Ta("SuspenseList");case 0:case 15:return mn(e.type,!1);case 11:return mn(e.type.render,!1);case 1:return mn(e.type,!0);case 31:return Ta("Activity");default:return""}}function be(e){try{var t="",a=null;do t+=_(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var De=Object.prototype.hasOwnProperty,Ze=s.unstable_scheduleCallback,Ht=s.unstable_cancelCallback,ca=s.unstable_shouldYield,ma=s.unstable_requestPaint,Nt=s.unstable_now,ge=s.unstable_getCurrentPriorityLevel,$e=s.unstable_ImmediatePriority,Bt=s.unstable_UserBlockingPriority,xn=s.unstable_NormalPriority,Us=s.unstable_LowPriority,Fl=s.unstable_IdlePriority,Qe=s.log,Lr=s.unstable_setDisableYieldValue,jt=null,na=null;function Gt(e){if(typeof Qe=="function"&&Lr(e),na&&typeof na.setStrictMode=="function")try{na.setStrictMode(jt,e)}catch{}}var Zt=Math.clz32?Math.clz32:no,ou=Math.log,ao=Math.LN2;function no(e){return e>>>=0,e===0?32:31-(ou(e)/ao|0)|0}var ll=256,Hs=262144,la=4194304;function gn(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 Gl(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,c=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var N=n&134217727;return N!==0?(n=N&~c,n!==0?i=gn(n):(v&=N,v!==0?i=gn(v):a||(a=N&~e,a!==0&&(i=gn(a))))):(N=n&~c,N!==0?i=gn(N):v!==0?i=gn(v):a||(a=n&~e,a!==0&&(i=gn(a)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:i}function sl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function du(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 qr(){var e=la;return la<<=1,(la&62914560)===0&&(la=4194304),e}function Ls(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function rl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fu(e,t,a,n,i,c){var v=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 N=e.entanglements,O=e.expirationTimes,X=e.hiddenUpdates;for(a=v&~a;0<a;){var se=31-Zt(a),ce=1<<se;N[se]=0,O[se]=-1;var J=X[se];if(J!==null)for(X[se]=null,se=0;se<J.length;se++){var K=J[se];K!==null&&(K.lane&=-536870913)}a&=~ce}n!==0&&xt(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(v&~t))}function xt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Zt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function xa(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Zt(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function Vr(e,t){var a=t&-t;return a=(a&42)!==0?1:qs(a),(a&(e.suspendedLanes|t))!==0?0:a}function qs(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 sa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vs(){var e=ie.p;return e!==0?e:(e=window.event,e===void 0?32:q0(e.type))}function Br(e,t){var a=ie.p;try{return ie.p=e,t()}finally{ie.p=a}}var Ka=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Ka,Lt="__reactProps$"+Ka,Cn="__reactContainer$"+Ka,Zl="__reactEvents$"+Ka,hu="__reactListeners$"+Ka,mu="__reactHandles$"+Ka,xu="__reactResources$"+Ka,Ql="__reactMarker$"+Ka;function Bs(e){delete e[Mt],delete e[Lt],delete e[Zl],delete e[hu],delete e[mu]}function On(e){var t=e[Mt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Cn]||a[Mt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=j0(e);e!==null;){if(a=e[Mt])return a;e=j0(e)}return t}e=a,a=e.parentNode}return null}function Ae(e){if(e=e[Mt]||e[Cn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ga(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function en(e){var t=e[xu];return t||(t=e[xu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function At(e){e[Ql]=!0}var gu=new Set,Yr={};function vn(e,t){il(e,t),il(e+"Capture",t)}function il(e,t){for(Yr[e]=t,e=0;e<t.length;e++)gu.add(t[e])}var vu=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]*$"),yu={},Dn={};function $r(e){return De.call(Dn,e)?!0:De.call(yu,e)?!1:vu.test(e)?Dn[e]=!0:(yu[e]=!0,!1)}function Qt(e,t,a){if($r(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ys(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 rt(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Tt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fr(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(v){a=""+v,c.call(this,v)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wl(e){if(!e._valueTracker){var t=yn(e)?"checked":"value";e._valueTracker=Fr(e,t,""+e[t])}}function ul(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=yn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function tn(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 $s=/[\n"\\]/g;function Wt(e){return e.replace($s,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Fs(e,t,a,n,i,c,v,N){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tt(t)):e.value!==""+Tt(t)&&(e.value=""+Tt(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?Xl(e,v,Tt(t)):a!=null?Xl(e,v,Tt(a)):n!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.name=""+Tt(N):e.removeAttribute("name")}function cl(e,t,a,n,i,c,v,N){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Wl(e);return}a=a!=null?""+Tt(a):"",t=t!=null?""+Tt(t):a,N||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=N?e.checked:!!n,e.defaultChecked=!!n,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Wl(e)}function Xl(e,t,a){t==="number"&&tn(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Rn(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Tt(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Pl(e,t,a){if(t!=null&&(t=""+Tt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Tt(a):""}function Gr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(pe(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Tt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Wl(e)}function an(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Jl=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 Il(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||Jl.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function pu(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var i in t)n=t[i],t.hasOwnProperty(i)&&a[i]!==n&&Il(e,i,n)}else for(var c in t)t.hasOwnProperty(c)&&Il(e,c,t[c])}function Gs(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 lo=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"]]),bu=/^[\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 Kl(e){return bu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function qa(){}var Zr=null;function Zs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var An=null,ol=null;function Su(e){var t=Ae(e);if(t&&(e=t.stateNode)){var a=e[Lt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Fs(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="'+Wt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[Lt]||null;if(!i)throw Error(o(90));Fs(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&ul(n)}break e;case"textarea":Pl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Rn(e,!!a.multiple,t,!1)}}}var Qr=!1;function Wr(e,t,a){if(Qr)return e(t,a);Qr=!0;try{var n=e(t);return n}finally{if(Qr=!1,(An!==null||ol!==null)&&(xc(),An&&(t=An,e=ol,ol=An=null,Su(t),e)))for(t=0;t<e.length;t++)Su(e[t])}}function es(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Lt]||null;if(n===null)return null;a=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var nn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xr=!1;if(nn)try{var ts={};Object.defineProperty(ts,"passive",{get:function(){Xr=!0}}),window.addEventListener("test",ts,ts),window.removeEventListener("test",ts,ts)}catch{Xr=!1}var pn=null,Qs=null,Ws=null;function qt(){if(Ws)return Ws;var e,t=Qs,a=t.length,n,i="value"in pn?pn.value:pn.textContent,c=i.length;for(e=0;e<a&&t[e]===i[e];e++);var v=a-e;for(n=1;n<=v&&t[a-n]===i[c-n];n++);return Ws=i.slice(e,1<n?1-n:void 0)}function as(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ln(){return!0}function _n(){return!1}function Ct(e){function t(a,n,i,c,v){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=c,this.target=v,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(a=e[N],this[N]=a?a(c):c[N]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ln:_n,this.isPropagationStopped=_n,this}return E(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=ln)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ln)},persist:function(){},isPersistent:ln}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ns=Ct(bn),ls=E({},bn,{view:0,detail:0}),Pr=Ct(ls),Xs,ss,rs,Ps=E({},ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:us,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!==rs&&(rs&&e.type==="mousemove"?(Xs=e.screenX-rs.screenX,ss=e.screenY-rs.screenY):ss=Xs=0,rs=e),Xs)},movementY:function(e){return"movementY"in e?e.movementY:ss}}),Nu=Ct(Ps),so=E({},Ps,{dataTransfer:0}),ro=Ct(so),io=E({},ls,{relatedTarget:0}),Js=Ct(io),uo=E({},bn,{animationName:0,elapsedTime:0,pseudoElement:0}),dl=Ct(uo),co=E({},bn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fl=Ct(co),is=E({},bn,{data:0}),hl=Ct(is),oo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fo={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"},ho={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ho[e])?!!t[e]:!1}function us(){return mo}var xo=E({},ls,{key:function(e){if(e.key){var t=oo[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=as(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:us,charCode:function(e){return e.type==="keypress"?as(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?as(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),go=Ct(xo),vo=E({},Ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ju=Ct(vo),yo=E({},ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:us}),po=Ct(yo),wu=E({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0}),bo=Ct(wu),So=E({},Ps,{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}),No=Ct(So),jo=E({},bn,{newState:0,oldState:0}),wo=Ct(jo),Eu=[9,13,27,32],Jr=nn&&"CompositionEvent"in window,cs=null;nn&&"documentMode"in document&&(cs=document.documentMode);var Eo=nn&&"TextEvent"in window&&!cs,Mu=nn&&(!Jr||cs&&8<cs&&11>=cs),Tu=" ",Cu=!1;function Ou(e,t){switch(e){case"keyup":return Eu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Du(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ml=!1;function Mo(e,t){switch(e){case"compositionend":return Du(t);case"keypress":return t.which!==32?null:(Cu=!0,Tu);case"textInput":return e=t.data,e===Tu&&Cu?null:e;default:return null}}function To(e,t){if(ml)return e==="compositionend"||!Jr&&Ou(e,t)?(e=qt(),Ws=Qs=pn=null,ml=!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 Mu&&t.locale!=="ko"?null:t.data;default:return null}}var Co={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 Ru(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Co[e.type]:t==="textarea"}function Ir(e,t,a,n){An?ol?ol.push(n):ol=[n]:An=n,t=Nc(t,"onChange"),0<t.length&&(a=new ns("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var xl=null,os=null;function va(e){c0(e,0)}function sn(e){var t=ga(e);if(ul(t))return e}function Au(e,t){if(e==="change")return t}var Sn=!1;if(nn){var Kr;if(nn){var Oa="oninput"in document;if(!Oa){var ei=document.createElement("div");ei.setAttribute("oninput","return;"),Oa=typeof ei.oninput=="function"}Kr=Oa}else Kr=!1;Sn=Kr&&(!document.documentMode||9<document.documentMode)}function ti(){xl&&(xl.detachEvent("onpropertychange",ai),os=xl=null)}function ai(e){if(e.propertyName==="value"&&sn(os)){var t=[];Ir(t,os,e,Zs(e)),Wr(va,t)}}function Pe(e,t,a){e==="focusin"?(ti(),xl=t,os=a,xl.attachEvent("onpropertychange",ai)):e==="focusout"&&ti()}function gl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sn(os)}function Oo(e,t){if(e==="click")return sn(t)}function gt(e,t){if(e==="input"||e==="change")return sn(t)}function ds(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ra=typeof Object.is=="function"?Object.is:ds;function fs(e,t){if(ra(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var i=a[n];if(!De.call(t,i)||!ra(e[i],t[i]))return!1}return!0}function _u(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ku(e,t){var a=_u(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=_u(a)}}function et(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?et(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Do(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=tn(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=tn(e.document)}return t}function Is(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 zu=nn&&"documentMode"in document&&11>=document.documentMode,vl=null,Ks=null,Xt=null,er=!1;function hs(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;er||vl==null||vl!==tn(n)||(n=vl,"selectionStart"in n&&Is(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Xt&&fs(Xt,n)||(Xt=n,n=Nc(Ks,"onSelect"),0<n.length&&(t=new ns("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=vl)))}function kn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var yl={animationend:kn("Animation","AnimationEnd"),animationiteration:kn("Animation","AnimationIteration"),animationstart:kn("Animation","AnimationStart"),transitionrun:kn("Transition","TransitionRun"),transitionstart:kn("Transition","TransitionStart"),transitioncancel:kn("Transition","TransitionCancel"),transitionend:kn("Transition","TransitionEnd")},ni={},Uu={};nn&&(Uu=document.createElement("div").style,"AnimationEvent"in window||(delete yl.animationend.animation,delete yl.animationiteration.animation,delete yl.animationstart.animation),"TransitionEvent"in window||delete yl.transitionend.transition);function zn(e){if(ni[e])return ni[e];if(!yl[e])return e;var t=yl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Uu)return ni[e]=t[a];return e}var Hu=zn("animationend"),Lu=zn("animationiteration"),tr=zn("animationstart"),Ro=zn("transitionrun"),Ao=zn("transitionstart"),qu=zn("transitioncancel"),li=zn("transitionend"),si=new Map,ri="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(" ");ri.push("scrollEnd");function ya(e,t){si.set(e,t),vn(t,[e])}var pl=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)},oa=[],Va=0,ms=0;function bl(){for(var e=Va,t=ms=Va=0;t<e;){var a=oa[t];oa[t++]=null;var n=oa[t];oa[t++]=null;var i=oa[t];oa[t++]=null;var c=oa[t];if(oa[t++]=null,n!==null&&i!==null){var v=n.pending;v===null?i.next=i:(i.next=v.next,v.next=i),n.pending=i}c!==0&&xs(a,i,c)}}function Ba(e,t,a,n){oa[Va++]=e,oa[Va++]=t,oa[Va++]=a,oa[Va++]=n,ms|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ar(e,t,a,n){return Ba(e,t,a,n),gs(e)}function Ya(e,t){return Ba(e,null,null,t),gs(e)}function xs(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!1,c=e.return;c!==null;)c.childLanes|=a,n=c.alternate,n!==null&&(n.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-Zt(a),e=c.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),c):null}function gs(e){if(50<Oi)throw Oi=0,Rd=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 nr(e,t,a,n){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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(e,t,a,n){return new nr(e,t,a,n)}function lr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $a(e,t){var a=e.alternate;return a===null?(a=Pt(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 Vu(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 sr(e,t,a,n,i,c){var v=0;if(n=e,typeof e=="function")lr(e)&&(v=1);else if(typeof e=="string")v=yy(e,a,ye.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=Pt(31,a,t,i),e.elementType=F,e.lanes=c,e;case T:return Fa(a.children,i,c,t);case H:v=8,i|=24;break;case P:return e=Pt(12,a,t,i|2),e.elementType=P,e.lanes=c,e;case Y:return e=Pt(13,a,t,i),e.elementType=Y,e.lanes=c,e;case re:return e=Pt(19,a,t,i),e.elementType=re,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case te:v=10;break e;case Q:v=9;break e;case ee:v=11;break e;case Z:v=14;break e;case B:v=16,n=null;break e}v=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=Pt(v,a,t,i),t.elementType=e,t.type=n,t.lanes=c,t}function Fa(e,t,a,n){return e=Pt(7,e,n,t),e.lanes=a,e}function ii(e,t,a){return e=Pt(6,e,null,t),e.lanes=a,e}function Bu(e){var t=Pt(18,null,null,0);return t.stateNode=e,t}function Sl(e,t,a){return t=Pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ui=new WeakMap;function pa(e,t){if(typeof e=="object"&&e!==null){var a=ui.get(e);return a!==void 0?a:(t={value:e,source:t,stack:be(t)},ui.set(e,t),t)}return{value:e,source:t,stack:be(t)}}var Un=[],Hn=0,vs=null,rn=0,ia=[],Ce=0,ba=null,Ga=1,h="";function r(e,t){Un[Hn++]=rn,Un[Hn++]=vs,vs=e,rn=t}function f(e,t,a){ia[Ce++]=Ga,ia[Ce++]=h,ia[Ce++]=ba,ba=e;var n=Ga;e=h;var i=32-Zt(n)-1;n&=~(1<<i),a+=1;var c=32-Zt(t)+i;if(30<c){var v=i-i%5;c=(n&(1<<v)-1).toString(32),n>>=v,i-=v,Ga=1<<32-Zt(t)+i|a<<i|n,h=c+e}else Ga=1<<c|a<<i|n,h=e}function y(e){e.return!==null&&(r(e,1),f(e,1,0))}function S(e){for(;e===vs;)vs=Un[--Hn],Un[Hn]=null,rn=Un[--Hn],Un[Hn]=null;for(;e===ba;)ba=ia[--Ce],ia[Ce]=null,h=ia[--Ce],ia[Ce]=null,Ga=ia[--Ce],ia[Ce]=null}function C(e,t){ia[Ce++]=Ga,ia[Ce++]=h,ia[Ce++]=ba,Ga=t.id,h=t.overflow,ba=e}var k=null,U=null,q=!1,fe=null,Ne=!1,Ue=Error(o(519));function Je(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw un(pa(t,e)),Ue}function _e(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Mt]=e,t[Lt]=n,a){case"dialog":Xe("cancel",t),Xe("close",t);break;case"iframe":case"object":case"embed":Xe("load",t);break;case"video":case"audio":for(a=0;a<Ri.length;a++)Xe(Ri[a],t);break;case"source":Xe("error",t);break;case"img":case"image":case"link":Xe("error",t),Xe("load",t);break;case"details":Xe("toggle",t);break;case"input":Xe("invalid",t),cl(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Xe("invalid",t);break;case"textarea":Xe("invalid",t),Gr(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||h0(t.textContent,a)?(n.popover!=null&&(Xe("beforetoggle",t),Xe("toggle",t)),n.onScroll!=null&&Xe("scroll",t),n.onScrollEnd!=null&&Xe("scrollend",t),n.onClick!=null&&(t.onclick=qa),t=!0):t=!1,t||Je(e,!0)}function St(e){for(k=e.return;k;)switch(k.tag){case 5:case 31:case 13:Ne=!1;return;case 27:case 3:Ne=!0;return;default:k=k.return}}function Yt(e){if(e!==k)return!1;if(!q)return St(e),q=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Zd(e.type,e.memoizedProps)),a=!a),a&&U&&Je(e),St(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));U=N0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));U=N0(e)}else t===27?(t=U,kl(e.type)?(e=Jd,Jd=null,U=e):U=t):U=k?Xa(e.stateNode.nextSibling):null;return!0}function $t(){U=k=null,q=!1}function Nn(){var e=fe;return e!==null&&(wa===null?wa=e:wa.push.apply(wa,e),fe=null),e}function un(e){fe===null?fe=[e]:fe.push(e)}var rr=A(null),Ln=null,Za=null;function jn(e,t,a){he(rr,t._currentValue),t._currentValue=a}function cn(e){e._currentValue=rr.current,ne(rr)}function ci(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function qn(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var v=i.child;c=c.firstContext;e:for(;c!==null;){var N=c;c=i;for(var O=0;O<t.length;O++)if(N.context===t[O]){c.lanes|=a,N=c.alternate,N!==null&&(N.lanes|=a),ci(c.return,a,e),n||(v=null);break e}c=N.next}}else if(i.tag===18){if(v=i.return,v===null)throw Error(o(341));v.lanes|=a,c=v.alternate,c!==null&&(c.lanes|=a),ci(v,a,e),v=null}else v=i.child;if(v!==null)v.return=i;else for(v=i;v!==null;){if(v===e){v=null;break}if(i=v.sibling,i!==null){i.return=v.return,v=i;break}v=v.return}i=v}}function Qa(e,t,a,n){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var v=i.alternate;if(v===null)throw Error(o(387));if(v=v.memoizedProps,v!==null){var N=i.type;ra(i.pendingProps.value,v.value)||(e!==null?e.push(N):e=[N])}}else if(i===Me.current){if(v=i.alternate,v===null)throw Error(o(387));v.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Ui):e=[Ui])}i=i.return}e!==null&&qn(t,e,a,n),t.flags|=262144}function ir(e){for(e=e.firstContext;e!==null;){if(!ra(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ys(e){Ln=e,Za=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Jt(e){return If(Ln,e)}function Yu(e,t){return Ln===null&&ys(e),If(e,t)}function If(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Za===null){if(e===null)throw Error(o(308));Za=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Za=Za.next=t;return a}var mv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},xv=s.unstable_scheduleCallback,gv=s.unstable_NormalPriority,_t={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _o(){return{controller:new mv,data:new Map,refCount:0}}function oi(e){e.refCount--,e.refCount===0&&xv(gv,function(){e.controller.abort()})}var di=null,ko=0,ur=0,cr=null;function vv(e,t){if(di===null){var a=di=[];ko=0,ur=Hd(),cr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return ko++,t.then(Kf,Kf),t}function Kf(){if(--ko===0&&di!==null){cr!==null&&(cr.status="fulfilled");var e=di;di=null,ur=0,cr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function yv(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),n}var eh=G.S;G.S=function(e,t){Hm=Nt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&vv(e,t),eh!==null&&eh(e,t)};var ps=A(null);function zo(){var e=ps.current;return e!==null?e:mt.pooledCache}function $u(e,t){t===null?he(ps,ps.current):he(ps,t.pool)}function th(){var e=zo();return e===null?null:{parent:_t._currentValue,pool:e}}var or=Error(o(460)),Uo=Error(o(474)),Fu=Error(o(542)),Gu={then:function(){}};function ah(e){return e=e.status,e==="fulfilled"||e==="rejected"}function nh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(qa,qa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sh(e),e;default:if(typeof t.status=="string")t.then(qa,qa);else{if(e=mt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sh(e),e}throw Ss=t,or}}function bs(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ss=a,or):a}}var Ss=null;function lh(){if(Ss===null)throw Error(o(459));var e=Ss;return Ss=null,e}function sh(e){if(e===or||e===Fu)throw Error(o(483))}var dr=null,fi=0;function Zu(e){var t=fi;return fi+=1,dr===null&&(dr=[]),nh(dr,e,t)}function hi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Qu(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 rh(e){function t($,L){if(e){var W=$.deletions;W===null?($.deletions=[L],$.flags|=16):W.push(L)}}function a($,L){if(!e)return null;for(;L!==null;)t($,L),L=L.sibling;return null}function n($){for(var L=new Map;$!==null;)$.key!==null?L.set($.key,$):L.set($.index,$),$=$.sibling;return L}function i($,L){return $=$a($,L),$.index=0,$.sibling=null,$}function c($,L,W){return $.index=W,e?(W=$.alternate,W!==null?(W=W.index,W<L?($.flags|=67108866,L):W):($.flags|=67108866,L)):($.flags|=1048576,L)}function v($){return e&&$.alternate===null&&($.flags|=67108866),$}function N($,L,W,ue){return L===null||L.tag!==6?(L=ii(W,$.mode,ue),L.return=$,L):(L=i(L,W),L.return=$,L)}function O($,L,W,ue){var Re=W.type;return Re===T?se($,L,W.props.children,ue,W.key):L!==null&&(L.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===B&&bs(Re)===L.type)?(L=i(L,W.props),hi(L,W),L.return=$,L):(L=sr(W.type,W.key,W.props,null,$.mode,ue),hi(L,W),L.return=$,L)}function X($,L,W,ue){return L===null||L.tag!==4||L.stateNode.containerInfo!==W.containerInfo||L.stateNode.implementation!==W.implementation?(L=Sl(W,$.mode,ue),L.return=$,L):(L=i(L,W.children||[]),L.return=$,L)}function se($,L,W,ue,Re){return L===null||L.tag!==7?(L=Fa(W,$.mode,ue,Re),L.return=$,L):(L=i(L,W),L.return=$,L)}function ce($,L,W){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=ii(""+L,$.mode,W),L.return=$,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case R:return W=sr(L.type,L.key,L.props,null,$.mode,W),hi(W,L),W.return=$,W;case M:return L=Sl(L,$.mode,W),L.return=$,L;case B:return L=bs(L),ce($,L,W)}if(pe(L)||le(L))return L=Fa(L,$.mode,W,null),L.return=$,L;if(typeof L.then=="function")return ce($,Zu(L),W);if(L.$$typeof===te)return ce($,Yu($,L),W);Qu($,L)}return null}function J($,L,W,ue){var Re=L!==null?L.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Re!==null?null:N($,L,""+W,ue);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case R:return W.key===Re?O($,L,W,ue):null;case M:return W.key===Re?X($,L,W,ue):null;case B:return W=bs(W),J($,L,W,ue)}if(pe(W)||le(W))return Re!==null?null:se($,L,W,ue,null);if(typeof W.then=="function")return J($,L,Zu(W),ue);if(W.$$typeof===te)return J($,L,Yu($,W),ue);Qu($,W)}return null}function K($,L,W,ue,Re){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return $=$.get(W)||null,N(L,$,""+ue,Re);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case R:return $=$.get(ue.key===null?W:ue.key)||null,O(L,$,ue,Re);case M:return $=$.get(ue.key===null?W:ue.key)||null,X(L,$,ue,Re);case B:return ue=bs(ue),K($,L,W,ue,Re)}if(pe(ue)||le(ue))return $=$.get(W)||null,se(L,$,ue,Re,null);if(typeof ue.then=="function")return K($,L,W,Zu(ue),Re);if(ue.$$typeof===te)return K($,L,W,Yu(L,ue),Re);Qu(L,ue)}return null}function je($,L,W,ue){for(var Re=null,at=null,Ee=L,Fe=L=0,Ke=null;Ee!==null&&Fe<W.length;Fe++){Ee.index>Fe?(Ke=Ee,Ee=null):Ke=Ee.sibling;var nt=J($,Ee,W[Fe],ue);if(nt===null){Ee===null&&(Ee=Ke);break}e&&Ee&&nt.alternate===null&&t($,Ee),L=c(nt,L,Fe),at===null?Re=nt:at.sibling=nt,at=nt,Ee=Ke}if(Fe===W.length)return a($,Ee),q&&r($,Fe),Re;if(Ee===null){for(;Fe<W.length;Fe++)Ee=ce($,W[Fe],ue),Ee!==null&&(L=c(Ee,L,Fe),at===null?Re=Ee:at.sibling=Ee,at=Ee);return q&&r($,Fe),Re}for(Ee=n(Ee);Fe<W.length;Fe++)Ke=K(Ee,$,Fe,W[Fe],ue),Ke!==null&&(e&&Ke.alternate!==null&&Ee.delete(Ke.key===null?Fe:Ke.key),L=c(Ke,L,Fe),at===null?Re=Ke:at.sibling=Ke,at=Ke);return e&&Ee.forEach(function(ql){return t($,ql)}),q&&r($,Fe),Re}function ke($,L,W,ue){if(W==null)throw Error(o(151));for(var Re=null,at=null,Ee=L,Fe=L=0,Ke=null,nt=W.next();Ee!==null&&!nt.done;Fe++,nt=W.next()){Ee.index>Fe?(Ke=Ee,Ee=null):Ke=Ee.sibling;var ql=J($,Ee,nt.value,ue);if(ql===null){Ee===null&&(Ee=Ke);break}e&&Ee&&ql.alternate===null&&t($,Ee),L=c(ql,L,Fe),at===null?Re=ql:at.sibling=ql,at=ql,Ee=Ke}if(nt.done)return a($,Ee),q&&r($,Fe),Re;if(Ee===null){for(;!nt.done;Fe++,nt=W.next())nt=ce($,nt.value,ue),nt!==null&&(L=c(nt,L,Fe),at===null?Re=nt:at.sibling=nt,at=nt);return q&&r($,Fe),Re}for(Ee=n(Ee);!nt.done;Fe++,nt=W.next())nt=K(Ee,$,Fe,nt.value,ue),nt!==null&&(e&&nt.alternate!==null&&Ee.delete(nt.key===null?Fe:nt.key),L=c(nt,L,Fe),at===null?Re=nt:at.sibling=nt,at=nt);return e&&Ee.forEach(function(Oy){return t($,Oy)}),q&&r($,Fe),Re}function ft($,L,W,ue){if(typeof W=="object"&&W!==null&&W.type===T&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case R:e:{for(var Re=W.key;L!==null;){if(L.key===Re){if(Re=W.type,Re===T){if(L.tag===7){a($,L.sibling),ue=i(L,W.props.children),ue.return=$,$=ue;break e}}else if(L.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===B&&bs(Re)===L.type){a($,L.sibling),ue=i(L,W.props),hi(ue,W),ue.return=$,$=ue;break e}a($,L);break}else t($,L);L=L.sibling}W.type===T?(ue=Fa(W.props.children,$.mode,ue,W.key),ue.return=$,$=ue):(ue=sr(W.type,W.key,W.props,null,$.mode,ue),hi(ue,W),ue.return=$,$=ue)}return v($);case M:e:{for(Re=W.key;L!==null;){if(L.key===Re)if(L.tag===4&&L.stateNode.containerInfo===W.containerInfo&&L.stateNode.implementation===W.implementation){a($,L.sibling),ue=i(L,W.children||[]),ue.return=$,$=ue;break e}else{a($,L);break}else t($,L);L=L.sibling}ue=Sl(W,$.mode,ue),ue.return=$,$=ue}return v($);case B:return W=bs(W),ft($,L,W,ue)}if(pe(W))return je($,L,W,ue);if(le(W)){if(Re=le(W),typeof Re!="function")throw Error(o(150));return W=Re.call(W),ke($,L,W,ue)}if(typeof W.then=="function")return ft($,L,Zu(W),ue);if(W.$$typeof===te)return ft($,L,Yu($,W),ue);Qu($,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,L!==null&&L.tag===6?(a($,L.sibling),ue=i(L,W),ue.return=$,$=ue):(a($,L),ue=ii(W,$.mode,ue),ue.return=$,$=ue),v($)):a($,L)}return function($,L,W,ue){try{fi=0;var Re=ft($,L,W,ue);return dr=null,Re}catch(Ee){if(Ee===or||Ee===Fu)throw Ee;var at=Pt(29,Ee,null,$.mode);return at.lanes=ue,at.return=$,at}finally{}}}var Ns=rh(!0),ih=rh(!1),Nl=!1;function Ho(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lo(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 jl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wl(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(lt&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=gs(e),xs(e,null,a),t}return Ba(e,n,t,a),gs(e)}function mi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,xa(e,a)}}function qo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?i=c=v:c=c.next=v,a=a.next}while(a!==null);c===null?i=c=t:c=c.next=t}else i=c=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Vo=!1;function xi(){if(Vo){var e=cr;if(e!==null)throw e}}function gi(e,t,a,n){Vo=!1;var i=e.updateQueue;Nl=!1;var c=i.firstBaseUpdate,v=i.lastBaseUpdate,N=i.shared.pending;if(N!==null){i.shared.pending=null;var O=N,X=O.next;O.next=null,v===null?c=X:v.next=X,v=O;var se=e.alternate;se!==null&&(se=se.updateQueue,N=se.lastBaseUpdate,N!==v&&(N===null?se.firstBaseUpdate=X:N.next=X,se.lastBaseUpdate=O))}if(c!==null){var ce=i.baseState;v=0,se=X=O=null,N=c;do{var J=N.lane&-536870913,K=J!==N.lane;if(K?(Ie&J)===J:(n&J)===J){J!==0&&J===ur&&(Vo=!0),se!==null&&(se=se.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var je=e,ke=N;J=t;var ft=a;switch(ke.tag){case 1:if(je=ke.payload,typeof je=="function"){ce=je.call(ft,ce,J);break e}ce=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=ke.payload,J=typeof je=="function"?je.call(ft,ce,J):je,J==null)break e;ce=E({},ce,J);break e;case 2:Nl=!0}}J=N.callback,J!==null&&(e.flags|=64,K&&(e.flags|=8192),K=i.callbacks,K===null?i.callbacks=[J]:K.push(J))}else K={lane:J,tag:N.tag,payload:N.payload,callback:N.callback,next:null},se===null?(X=se=K,O=ce):se=se.next=K,v|=J;if(N=N.next,N===null){if(N=i.shared.pending,N===null)break;K=N,N=K.next,K.next=null,i.lastBaseUpdate=K,i.shared.pending=null}}while(!0);se===null&&(O=ce),i.baseState=O,i.firstBaseUpdate=X,i.lastBaseUpdate=se,c===null&&(i.shared.lanes=0),Ol|=v,e.lanes=v,e.memoizedState=ce}}function uh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function ch(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)uh(a[e],t)}var fr=A(null),Wu=A(0);function oh(e,t){e=Wn,he(Wu,e),he(fr,t),Wn=e|t.baseLanes}function Bo(){he(Wu,Wn),he(fr,fr.current)}function Yo(){Wn=Wu.current,ne(fr),ne(Wu)}var Ra=A(null),Wa=null;function El(e){var t=e.alternate;he(Ot,Ot.current&1),he(Ra,e),Wa===null&&(t===null||fr.current!==null||t.memoizedState!==null)&&(Wa=e)}function $o(e){he(Ot,Ot.current),he(Ra,e),Wa===null&&(Wa=e)}function dh(e){e.tag===22?(he(Ot,Ot.current),he(Ra,e),Wa===null&&(Wa=e)):Ml()}function Ml(){he(Ot,Ot.current),he(Ra,Ra.current)}function Aa(e){ne(Ra),Wa===e&&(Wa=null),ne(Ot)}var Ot=A(0);function Xu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Xd(a)||Pd(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 Vn=0,Ve=null,ot=null,kt=null,Pu=!1,hr=!1,js=!1,Ju=0,vi=0,mr=null,pv=0;function wt(){throw Error(o(321))}function Fo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ra(e[a],t[a]))return!1;return!0}function Go(e,t,a,n,i,c){return Vn=c,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Wh:rd,js=!1,c=a(n,i),js=!1,hr&&(c=hh(t,a,n,i)),fh(e),c}function fh(e){G.H=bi;var t=ot!==null&&ot.next!==null;if(Vn=0,kt=ot=Ve=null,Pu=!1,vi=0,mr=null,t)throw Error(o(300));e===null||zt||(e=e.dependencies,e!==null&&ir(e)&&(zt=!0))}function hh(e,t,a,n){Ve=e;var i=0;do{if(hr&&(mr=null),vi=0,hr=!1,25<=i)throw Error(o(301));if(i+=1,kt=ot=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}G.H=Xh,c=t(a,n)}while(hr);return c}function bv(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?yi(t):t,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(Ve.flags|=1024),t}function Zo(){var e=Ju!==0;return Ju=0,e}function Qo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Wo(e){if(Pu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pu=!1}Vn=0,kt=ot=Ve=null,hr=!1,vi=Ju=0,mr=null}function da(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?Ve.memoizedState=kt=e:kt=kt.next=e,kt}function Dt(){if(ot===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=kt===null?Ve.memoizedState:kt.next;if(t!==null)kt=t,ot=e;else{if(e===null)throw Ve.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},kt===null?Ve.memoizedState=kt=e:kt=kt.next=e}return kt}function Iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yi(e){var t=vi;return vi+=1,mr===null&&(mr=[]),e=nh(mr,e,t),t=Ve,(kt===null?t.memoizedState:kt.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Wh:rd),e}function Ku(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yi(e);if(e.$$typeof===te)return Jt(e)}throw Error(o(438,String(e)))}function Xo(e){var t=null,a=Ve.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ve.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Iu(),Ve.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=z;return t.index++,a}function Bn(e,t){return typeof t=="function"?t(e):t}function ec(e){var t=Dt();return Po(t,ot,e)}function Po(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var i=e.baseQueue,c=n.pending;if(c!==null){if(i!==null){var v=i.next;i.next=c.next,c.next=v}t.baseQueue=i=c,n.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var N=v=null,O=null,X=t,se=!1;do{var ce=X.lane&-536870913;if(ce!==X.lane?(Ie&ce)===ce:(Vn&ce)===ce){var J=X.revertLane;if(J===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ce===ur&&(se=!0);else if((Vn&J)===J){X=X.next,J===ur&&(se=!0);continue}else ce={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},O===null?(N=O=ce,v=c):O=O.next=ce,Ve.lanes|=J,Ol|=J;ce=X.action,js&&a(c,ce),c=X.hasEagerState?X.eagerState:a(c,ce)}else J={lane:ce,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},O===null?(N=O=J,v=c):O=O.next=J,Ve.lanes|=ce,Ol|=ce;X=X.next}while(X!==null&&X!==t);if(O===null?v=c:O.next=N,!ra(c,e.memoizedState)&&(zt=!0,se&&(a=cr,a!==null)))throw a;e.memoizedState=c,e.baseState=v,e.baseQueue=O,n.lastRenderedState=c}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Jo(e){var t=Dt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,c=t.memoizedState;if(i!==null){a.pending=null;var v=i=i.next;do c=e(c,v.action),v=v.next;while(v!==i);ra(c,t.memoizedState)||(zt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function mh(e,t,a){var n=Ve,i=Dt(),c=q;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var v=!ra((ot||i).memoizedState,a);if(v&&(i.memoizedState=a,zt=!0),i=i.queue,ed(vh.bind(null,n,i,e),[e]),i.getSnapshot!==t||v||kt!==null&&kt.memoizedState.tag&1){if(n.flags|=2048,xr(9,{destroy:void 0},gh.bind(null,n,i,a,t),null),mt===null)throw Error(o(349));c||(Vn&127)!==0||xh(n,t,a)}return a}function xh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ve.updateQueue,t===null?(t=Iu(),Ve.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function gh(e,t,a,n){t.value=a,t.getSnapshot=n,yh(t)&&ph(e)}function vh(e,t,a){return a(function(){yh(t)&&ph(e)})}function yh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ra(e,a)}catch{return!0}}function ph(e){var t=Ya(e,2);t!==null&&Ea(t,e,2)}function Io(e){var t=da();if(typeof e=="function"){var a=e;if(e=a(),js){Gt(!0);try{a()}finally{Gt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:e},t}function bh(e,t,a,n){return e.baseState=a,Po(e,ot,typeof n=="function"?n:Bn)}function Sv(e,t,a,n,i){if(nc(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){c.listeners.push(v)}};G.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,Sh(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Sh(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=G.T,v={};G.T=v;try{var N=a(i,n),O=G.S;O!==null&&O(v,N),Nh(e,t,N)}catch(X){Ko(e,t,X)}finally{c!==null&&v.types!==null&&(c.types=v.types),G.T=c}}else try{c=a(i,n),Nh(e,t,c)}catch(X){Ko(e,t,X)}}function Nh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){jh(e,t,n)},function(n){return Ko(e,t,n)}):jh(e,t,a)}function jh(e,t,a){t.status="fulfilled",t.value=a,wh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Sh(e,a)))}function Ko(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,wh(t),t=t.next;while(t!==n)}e.action=null}function wh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Eh(e,t){return t}function Mh(e,t){if(q){var a=mt.formState;if(a!==null){e:{var n=Ve;if(q){if(U){t:{for(var i=U,c=Ne;i.nodeType!==8;){if(!c){i=null;break t}if(i=Xa(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){U=Xa(i.nextSibling),n=i.data==="F!";break e}}Je(n)}n=!1}n&&(t=a[0])}}return a=da(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eh,lastRenderedState:t},a.queue=n,a=Gh.bind(null,Ve,n),n.dispatch=a,n=Io(!1),c=sd.bind(null,Ve,!1,n.queue),n=da(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=Sv.bind(null,Ve,i,c,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function Th(e){var t=Dt();return Ch(t,ot,e)}function Ch(e,t,a){if(t=Po(e,t,Eh)[0],e=ec(Bn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=yi(t)}catch(v){throw v===or?Fu:v}else n=t;t=Dt();var i=t.queue,c=i.dispatch;return a!==t.memoizedState&&(Ve.flags|=2048,xr(9,{destroy:void 0},Nv.bind(null,i,a),null)),[n,c,e]}function Nv(e,t){e.action=t}function Oh(e){var t=Dt(),a=ot;if(a!==null)return Ch(t,a,e);Dt(),t=t.memoizedState,a=Dt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function xr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Ve.updateQueue,t===null&&(t=Iu(),Ve.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function Dh(){return Dt().memoizedState}function tc(e,t,a,n){var i=da();Ve.flags|=e,i.memoizedState=xr(1|t,{destroy:void 0},a,n===void 0?null:n)}function ac(e,t,a,n){var i=Dt();n=n===void 0?null:n;var c=i.memoizedState.inst;ot!==null&&n!==null&&Fo(n,ot.memoizedState.deps)?i.memoizedState=xr(t,c,a,n):(Ve.flags|=e,i.memoizedState=xr(1|t,c,a,n))}function Rh(e,t){tc(8390656,8,e,t)}function ed(e,t){ac(2048,8,e,t)}function jv(e){Ve.flags|=4;var t=Ve.updateQueue;if(t===null)t=Iu(),Ve.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Ah(e){var t=Dt().memoizedState;return jv({ref:t,nextImpl:e}),function(){if((lt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function _h(e,t){return ac(4,2,e,t)}function kh(e,t){return ac(4,4,e,t)}function zh(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 Uh(e,t,a){a=a!=null?a.concat([e]):null,ac(4,4,zh.bind(null,t,e),a)}function td(){}function Hh(e,t){var a=Dt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Fo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Lh(e,t){var a=Dt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Fo(t,n[1]))return n[0];if(n=e(),js){Gt(!0);try{e()}finally{Gt(!1)}}return a.memoizedState=[n,t],n}function ad(e,t,a){return a===void 0||(Vn&1073741824)!==0&&(Ie&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=qm(),Ve.lanes|=e,Ol|=e,a)}function qh(e,t,a,n){return ra(a,t)?a:fr.current!==null?(e=ad(e,a,n),ra(e,t)||(zt=!0),e):(Vn&42)===0||(Vn&1073741824)!==0&&(Ie&261930)===0?(zt=!0,e.memoizedState=a):(e=qm(),Ve.lanes|=e,Ol|=e,t)}function Vh(e,t,a,n,i){var c=ie.p;ie.p=c!==0&&8>c?c:8;var v=G.T,N={};G.T=N,sd(e,!1,t,a);try{var O=i(),X=G.S;if(X!==null&&X(N,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var se=yv(O,n);pi(e,t,se,za(e))}else pi(e,t,n,za(e))}catch(ce){pi(e,t,{then:function(){},status:"rejected",reason:ce},za())}finally{ie.p=c,v!==null&&N.types!==null&&(v.types=N.types),G.T=v}}function wv(){}function nd(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=Bh(e).queue;Vh(e,i,t,ve,a===null?wv:function(){return Yh(e),a(n)})}function Bh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ve,baseState:ve,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:ve},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yh(e){var t=Bh(e);t.next===null&&(t=e.alternate.memoizedState),pi(e,t.next.queue,{},za())}function ld(){return Jt(Ui)}function $h(){return Dt().memoizedState}function Fh(){return Dt().memoizedState}function Ev(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=za();e=jl(a);var n=wl(t,e,a);n!==null&&(Ea(n,t,a),mi(n,t,a)),t={cache:_o()},e.payload=t;return}t=t.return}}function Mv(e,t,a){var n=za();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},nc(e)?Zh(t,a):(a=ar(e,t,a,n),a!==null&&(Ea(a,e,n),Qh(a,t,n)))}function Gh(e,t,a){var n=za();pi(e,t,a,n)}function pi(e,t,a,n){var i={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(nc(e))Zh(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var v=t.lastRenderedState,N=c(v,a);if(i.hasEagerState=!0,i.eagerState=N,ra(N,v))return Ba(e,t,i,0),mt===null&&bl(),!1}catch{}finally{}if(a=ar(e,t,i,n),a!==null)return Ea(a,e,n),Qh(a,t,n),!0}return!1}function sd(e,t,a,n){if(n={lane:2,revertLane:Hd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},nc(e)){if(t)throw Error(o(479))}else t=ar(e,a,n,2),t!==null&&Ea(t,e,2)}function nc(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Zh(e,t){hr=Pu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Qh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,xa(e,a)}}var bi={readContext:Jt,use:Ku,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};bi.useEffectEvent=wt;var Wh={readContext:Jt,use:Ku,useCallback:function(e,t){return da().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:Rh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,tc(4194308,4,zh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return tc(4194308,4,e,t)},useInsertionEffect:function(e,t){tc(4,2,e,t)},useMemo:function(e,t){var a=da();t=t===void 0?null:t;var n=e();if(js){Gt(!0);try{e()}finally{Gt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=da();if(a!==void 0){var i=a(t);if(js){Gt(!0);try{a(t)}finally{Gt(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=Mv.bind(null,Ve,e),[n.memoizedState,e]},useRef:function(e){var t=da();return e={current:e},t.memoizedState=e},useState:function(e){e=Io(e);var t=e.queue,a=Gh.bind(null,Ve,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:td,useDeferredValue:function(e,t){var a=da();return ad(a,e,t)},useTransition:function(){var e=Io(!1);return e=Vh.bind(null,Ve,e.queue,!0,!1),da().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ve,i=da();if(q){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),mt===null)throw Error(o(349));(Ie&127)!==0||xh(n,t,a)}i.memoizedState=a;var c={value:a,getSnapshot:t};return i.queue=c,Rh(vh.bind(null,n,c,e),[e]),n.flags|=2048,xr(9,{destroy:void 0},gh.bind(null,n,c,a,t),null),a},useId:function(){var e=da(),t=mt.identifierPrefix;if(q){var a=h,n=Ga;a=(n&~(1<<32-Zt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ju++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=pv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ld,useFormState:Mh,useActionState:Mh,useOptimistic:function(e){var t=da();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=sd.bind(null,Ve,!0,a),a.dispatch=t,[e,t]},useMemoCache:Xo,useCacheRefresh:function(){return da().memoizedState=Ev.bind(null,Ve)},useEffectEvent:function(e){var t=da(),a={impl:e};return t.memoizedState=a,function(){if((lt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},rd={readContext:Jt,use:Ku,useCallback:Hh,useContext:Jt,useEffect:ed,useImperativeHandle:Uh,useInsertionEffect:_h,useLayoutEffect:kh,useMemo:Lh,useReducer:ec,useRef:Dh,useState:function(){return ec(Bn)},useDebugValue:td,useDeferredValue:function(e,t){var a=Dt();return qh(a,ot.memoizedState,e,t)},useTransition:function(){var e=ec(Bn)[0],t=Dt().memoizedState;return[typeof e=="boolean"?e:yi(e),t]},useSyncExternalStore:mh,useId:$h,useHostTransitionStatus:ld,useFormState:Th,useActionState:Th,useOptimistic:function(e,t){var a=Dt();return bh(a,ot,e,t)},useMemoCache:Xo,useCacheRefresh:Fh};rd.useEffectEvent=Ah;var Xh={readContext:Jt,use:Ku,useCallback:Hh,useContext:Jt,useEffect:ed,useImperativeHandle:Uh,useInsertionEffect:_h,useLayoutEffect:kh,useMemo:Lh,useReducer:Jo,useRef:Dh,useState:function(){return Jo(Bn)},useDebugValue:td,useDeferredValue:function(e,t){var a=Dt();return ot===null?ad(a,e,t):qh(a,ot.memoizedState,e,t)},useTransition:function(){var e=Jo(Bn)[0],t=Dt().memoizedState;return[typeof e=="boolean"?e:yi(e),t]},useSyncExternalStore:mh,useId:$h,useHostTransitionStatus:ld,useFormState:Oh,useActionState:Oh,useOptimistic:function(e,t){var a=Dt();return ot!==null?bh(a,ot,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Xo,useCacheRefresh:Fh};Xh.useEffectEvent=Ah;function id(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:E({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ud={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=za(),i=jl(n);i.payload=t,a!=null&&(i.callback=a),t=wl(e,i,n),t!==null&&(Ea(t,e,n),mi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=za(),i=jl(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=wl(e,i,n),t!==null&&(Ea(t,e,n),mi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=za(),n=jl(a);n.tag=2,t!=null&&(n.callback=t),t=wl(e,n,a),t!==null&&(Ea(t,e,a),mi(t,e,a))}};function Ph(e,t,a,n,i,c,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,v):t.prototype&&t.prototype.isPureReactComponent?!fs(a,n)||!fs(i,c):!0}function Jh(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&ud.enqueueReplaceState(t,t.state,null)}function ws(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=E({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Ih(e){pl(e)}function Kh(e){console.error(e)}function em(e){pl(e)}function lc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function tm(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function cd(e,t,a){return a=jl(a),a.tag=3,a.payload={element:null},a.callback=function(){lc(e,t)},a}function am(e){return e=jl(e),e.tag=3,e}function nm(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var c=n.value;e.payload=function(){return i(c)},e.callback=function(){tm(t,a,n)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){tm(t,a,n),typeof i!="function"&&(Dl===null?Dl=new Set([this]):Dl.add(this));var N=n.stack;this.componentDidCatch(n.value,{componentStack:N!==null?N:""})})}function Tv(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Qa(t,a,i,!0),a=Ra.current,a!==null){switch(a.tag){case 31:case 13:return Wa===null?gc():a.alternate===null&&Et===0&&(Et=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===Gu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),kd(e,n,i)),!1;case 22:return a.flags|=65536,n===Gu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),kd(e,n,i)),!1}throw Error(o(435,a.tag))}return kd(e,n,i),gc(),!1}if(q)return t=Ra.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Ue&&(e=Error(o(422),{cause:n}),un(pa(e,a)))):(n!==Ue&&(t=Error(o(423),{cause:n}),un(pa(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=pa(n,a),i=cd(e.stateNode,n,i),qo(e,i),Et!==4&&(Et=2)),!1;var c=Error(o(520),{cause:n});if(c=pa(c,a),Ci===null?Ci=[c]:Ci.push(c),Et!==4&&(Et=2),t===null)return!0;n=pa(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=cd(a.stateNode,n,e),qo(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Dl===null||!Dl.has(c))))return a.flags|=65536,i&=-i,a.lanes|=i,i=am(i),nm(i,e,a,n),qo(a,i),!1}a=a.return}while(a!==null);return!1}var od=Error(o(461)),zt=!1;function It(e,t,a,n){t.child=e===null?ih(t,null,a,n):Ns(t,e.child,a,n)}function lm(e,t,a,n,i){a=a.render;var c=t.ref;if("ref"in n){var v={};for(var N in n)N!=="ref"&&(v[N]=n[N])}else v=n;return ys(t),n=Go(e,t,a,v,c,i),N=Zo(),e!==null&&!zt?(Qo(e,t,i),Yn(e,t,i)):(q&&N&&y(t),t.flags|=1,It(e,t,n,i),t.child)}function sm(e,t,a,n,i){if(e===null){var c=a.type;return typeof c=="function"&&!lr(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,rm(e,t,c,n,i)):(e=sr(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!yd(e,i)){var v=c.memoizedProps;if(a=a.compare,a=a!==null?a:fs,a(v,n)&&e.ref===t.ref)return Yn(e,t,i)}return t.flags|=1,e=$a(c,n),e.ref=t.ref,e.return=t,t.child=e}function rm(e,t,a,n,i){if(e!==null){var c=e.memoizedProps;if(fs(c,n)&&e.ref===t.ref)if(zt=!1,t.pendingProps=n=c,yd(e,i))(e.flags&131072)!==0&&(zt=!0);else return t.lanes=e.lanes,Yn(e,t,i)}return dd(e,t,a,n,i)}function im(e,t,a,n){var i=n.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(n=t.child=e.child,i=0;n!==null;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~c}else n=0,t.child=null;return um(e,t,c,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&$u(t,c!==null?c.cachePool:null),c!==null?oh(t,c):Bo(),dh(t);else return n=t.lanes=536870912,um(e,t,c!==null?c.baseLanes|a:a,a,n)}else c!==null?($u(t,c.cachePool),oh(t,c),Ml(),t.memoizedState=null):(e!==null&&$u(t,null),Bo(),Ml());return It(e,t,i,a),t.child}function Si(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function um(e,t,a,n,i){var c=zo();return c=c===null?null:{parent:_t._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&$u(t,null),Bo(),dh(t),e!==null&&Qa(e,t,n,!0),t.childLanes=i,null}function sc(e,t){return t=ic({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cm(e,t,a){return Ns(t,e.child,null,a),e=sc(t,t.pendingProps),e.flags|=2,Aa(t),t.memoizedState=null,e}function Cv(e,t,a){var n=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(q){if(n.mode==="hidden")return e=sc(t,n),t.lanes=536870912,Si(null,e);if($o(t),(e=U)?(e=S0(e,Ne),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Ga,overflow:h}:null,retryLane:536870912,hydrationErrors:null},a=Bu(e),a.return=t,t.child=a,k=t,U=null)):e=null,e===null)throw Je(t);return t.lanes=536870912,null}return sc(t,n)}var c=e.memoizedState;if(c!==null){var v=c.dehydrated;if($o(t),i)if(t.flags&256)t.flags&=-257,t=cm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(zt||Qa(e,t,a,!1),i=(a&e.childLanes)!==0,zt||i){if(n=mt,n!==null&&(v=Vr(n,a),v!==0&&v!==c.retryLane))throw c.retryLane=v,Ya(e,v),Ea(n,e,v),od;gc(),t=cm(e,t,a)}else e=c.treeContext,U=Xa(v.nextSibling),k=t,q=!0,fe=null,Ne=!1,e!==null&&C(t,e),t=sc(t,n),t.flags|=4096;return t}return e=$a(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function rc(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 dd(e,t,a,n,i){return ys(t),a=Go(e,t,a,n,void 0,i),n=Zo(),e!==null&&!zt?(Qo(e,t,i),Yn(e,t,i)):(q&&n&&y(t),t.flags|=1,It(e,t,a,i),t.child)}function om(e,t,a,n,i,c){return ys(t),t.updateQueue=null,a=hh(t,n,a,i),fh(e),n=Zo(),e!==null&&!zt?(Qo(e,t,c),Yn(e,t,c)):(q&&n&&y(t),t.flags|=1,It(e,t,a,c),t.child)}function dm(e,t,a,n,i){if(ys(t),t.stateNode===null){var c=Da,v=a.contextType;typeof v=="object"&&v!==null&&(c=Jt(v)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=ud,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},Ho(t),v=a.contextType,c.context=typeof v=="object"&&v!==null?Jt(v):Da,c.state=t.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(id(t,a,v,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(v=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),v!==c.state&&ud.enqueueReplaceState(c,c.state,null),gi(t,n,c,i),xi(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var N=t.memoizedProps,O=ws(a,N);c.props=O;var X=c.context,se=a.contextType;v=Da,typeof se=="object"&&se!==null&&(v=Jt(se));var ce=a.getDerivedStateFromProps;se=typeof ce=="function"||typeof c.getSnapshotBeforeUpdate=="function",N=t.pendingProps!==N,se||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(N||X!==v)&&Jh(t,c,n,v),Nl=!1;var J=t.memoizedState;c.state=J,gi(t,n,c,i),xi(),X=t.memoizedState,N||J!==X||Nl?(typeof ce=="function"&&(id(t,a,ce,n),X=t.memoizedState),(O=Nl||Ph(t,a,O,n,J,X,v))?(se||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=X),c.props=n,c.state=X,c.context=v,n=O):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,Lo(e,t),v=t.memoizedProps,se=ws(a,v),c.props=se,ce=t.pendingProps,J=c.context,X=a.contextType,O=Da,typeof X=="object"&&X!==null&&(O=Jt(X)),N=a.getDerivedStateFromProps,(X=typeof N=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v!==ce||J!==O)&&Jh(t,c,n,O),Nl=!1,J=t.memoizedState,c.state=J,gi(t,n,c,i),xi();var K=t.memoizedState;v!==ce||J!==K||Nl||e!==null&&e.dependencies!==null&&ir(e.dependencies)?(typeof N=="function"&&(id(t,a,N,n),K=t.memoizedState),(se=Nl||Ph(t,a,se,n,J,K,O)||e!==null&&e.dependencies!==null&&ir(e.dependencies))?(X||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,K,O),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,K,O)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&J===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=K),c.props=n,c.state=K,c.context=O,n=se):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&J===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,rc(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=Ns(t,e.child,null,i),t.child=Ns(t,null,a,i)):It(e,t,a,i),t.memoizedState=c.state,e=t.child):e=Yn(e,t,i),e}function fm(e,t,a,n){return $t(),t.flags|=256,It(e,t,a,n),t.child}var fd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hd(e){return{baseLanes:e,cachePool:th()}}function md(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ka),e}function hm(e,t,a){var n=t.pendingProps,i=!1,c=(t.flags&128)!==0,v;if((v=c)||(v=e!==null&&e.memoizedState===null?!1:(Ot.current&2)!==0),v&&(i=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(q){if(i?El(t):Ml(),(e=U)?(e=S0(e,Ne),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Ga,overflow:h}:null,retryLane:536870912,hydrationErrors:null},a=Bu(e),a.return=t,t.child=a,k=t,U=null)):e=null,e===null)throw Je(t);return Pd(e)?t.lanes=32:t.lanes=536870912,null}var N=n.children;return n=n.fallback,i?(Ml(),i=t.mode,N=ic({mode:"hidden",children:N},i),n=Fa(n,i,a,null),N.return=t,n.return=t,N.sibling=n,t.child=N,n=t.child,n.memoizedState=hd(a),n.childLanes=md(e,v,a),t.memoizedState=fd,Si(null,n)):(El(t),xd(t,N))}var O=e.memoizedState;if(O!==null&&(N=O.dehydrated,N!==null)){if(c)t.flags&256?(El(t),t.flags&=-257,t=gd(e,t,a)):t.memoizedState!==null?(Ml(),t.child=e.child,t.flags|=128,t=null):(Ml(),N=n.fallback,i=t.mode,n=ic({mode:"visible",children:n.children},i),N=Fa(N,i,a,null),N.flags|=2,n.return=t,N.return=t,n.sibling=N,t.child=n,Ns(t,e.child,null,a),n=t.child,n.memoizedState=hd(a),n.childLanes=md(e,v,a),t.memoizedState=fd,t=Si(null,n));else if(El(t),Pd(N)){if(v=N.nextSibling&&N.nextSibling.dataset,v)var X=v.dgst;v=X,n=Error(o(419)),n.stack="",n.digest=v,un({value:n,source:null,stack:null}),t=gd(e,t,a)}else if(zt||Qa(e,t,a,!1),v=(a&e.childLanes)!==0,zt||v){if(v=mt,v!==null&&(n=Vr(v,a),n!==0&&n!==O.retryLane))throw O.retryLane=n,Ya(e,n),Ea(v,e,n),od;Xd(N)||gc(),t=gd(e,t,a)}else Xd(N)?(t.flags|=192,t.child=e.child,t=null):(e=O.treeContext,U=Xa(N.nextSibling),k=t,q=!0,fe=null,Ne=!1,e!==null&&C(t,e),t=xd(t,n.children),t.flags|=4096);return t}return i?(Ml(),N=n.fallback,i=t.mode,O=e.child,X=O.sibling,n=$a(O,{mode:"hidden",children:n.children}),n.subtreeFlags=O.subtreeFlags&65011712,X!==null?N=$a(X,N):(N=Fa(N,i,a,null),N.flags|=2),N.return=t,n.return=t,n.sibling=N,t.child=n,Si(null,n),n=t.child,N=e.child.memoizedState,N===null?N=hd(a):(i=N.cachePool,i!==null?(O=_t._currentValue,i=i.parent!==O?{parent:O,pool:O}:i):i=th(),N={baseLanes:N.baseLanes|a,cachePool:i}),n.memoizedState=N,n.childLanes=md(e,v,a),t.memoizedState=fd,Si(e.child,n)):(El(t),a=e.child,e=a.sibling,a=$a(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=a,t.memoizedState=null,a)}function xd(e,t){return t=ic({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ic(e,t){return e=Pt(22,e,null,t),e.lanes=0,e}function gd(e,t,a){return Ns(t,e.child,null,a),e=xd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ci(e.return,t,a)}function vd(e,t,a,n,i,c){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,treeForkCount:c}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=n,v.tail=a,v.tailMode=i,v.treeForkCount=c)}function xm(e,t,a){var n=t.pendingProps,i=n.revealOrder,c=n.tail;n=n.children;var v=Ot.current,N=(v&2)!==0;if(N?(v=v&1|2,t.flags|=128):v&=1,he(Ot,v),It(e,t,n,a),n=q?rn:0,!N&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mm(e,a,t);else if(e.tag===19)mm(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(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&Xu(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),vd(t,!1,i,a,c,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Xu(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}vd(t,!0,a,null,c,n);break;case"together":vd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Yn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ol|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Qa(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=$a(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=$a(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function yd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ir(e)))}function Ov(e,t,a){switch(t.tag){case 3:Ge(t,t.stateNode.containerInfo),jn(t,_t,e.memoizedState.cache),$t();break;case 27:case 5:ta(t);break;case 4:Ge(t,t.stateNode.containerInfo);break;case 10:jn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,$o(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(El(t),t.flags|=128,null):(a&t.child.childLanes)!==0?hm(e,t,a):(El(t),e=Yn(e,t,a),e!==null?e.sibling:null);El(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Qa(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return xm(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),he(Ot,Ot.current),n)break;return null;case 22:return t.lanes=0,im(e,t,a,t.pendingProps);case 24:jn(t,_t,e.memoizedState.cache)}return Yn(e,t,a)}function gm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)zt=!0;else{if(!yd(e,a)&&(t.flags&128)===0)return zt=!1,Ov(e,t,a);zt=(e.flags&131072)!==0}else zt=!1,q&&(t.flags&1048576)!==0&&f(t,rn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=bs(t.elementType),t.type=e,typeof e=="function")lr(e)?(n=ws(e,n),t.tag=1,t=dm(null,t,e,n,a)):(t.tag=0,t=dd(null,t,e,n,a));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=lm(null,t,e,n,a);break e}else if(i===Z){t.tag=14,t=sm(null,t,e,n,a);break e}}throw t=Se(e)||e,Error(o(306,t,""))}}return t;case 0:return dd(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=ws(n,t.pendingProps),dm(e,t,n,i,a);case 3:e:{if(Ge(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var c=t.memoizedState;i=c.element,Lo(e,t),gi(t,n,null,a);var v=t.memoizedState;if(n=v.cache,jn(t,_t,n),n!==c.cache&&qn(t,[_t],a,!0),xi(),n=v.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=fm(e,t,n,a);break e}else if(n!==i){i=pa(Error(o(424)),t),un(i),t=fm(e,t,n,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(U=Xa(e.firstChild),k=t,q=!0,fe=null,Ne=!0,a=ih(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if($t(),n===i){t=Yn(e,t,a);break e}It(e,t,n,a)}t=t.child}return t;case 26:return rc(e,t),e===null?(a=T0(t.type,null,t.pendingProps,null))?t.memoizedState=a:q||(a=t.type,e=t.pendingProps,n=jc(xe.current).createElement(a),n[Mt]=t,n[Lt]=e,Kt(n,a,e),At(n),t.stateNode=n):t.memoizedState=T0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ta(t),e===null&&q&&(n=t.stateNode=w0(t.type,t.pendingProps,xe.current),k=t,Ne=!0,i=U,kl(t.type)?(Jd=i,U=Xa(n.firstChild)):U=i),It(e,t,t.pendingProps.children,a),rc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&q&&((i=n=U)&&(n=sy(n,t.type,t.pendingProps,Ne),n!==null?(t.stateNode=n,k=t,U=Xa(n.firstChild),Ne=!1,i=!0):i=!1),i||Je(t)),ta(t),i=t.type,c=t.pendingProps,v=e!==null?e.memoizedProps:null,n=c.children,Zd(i,c)?n=null:v!==null&&Zd(i,v)&&(t.flags|=32),t.memoizedState!==null&&(i=Go(e,t,bv,null,null,a),Ui._currentValue=i),rc(e,t),It(e,t,n,a),t.child;case 6:return e===null&&q&&((e=a=U)&&(a=ry(a,t.pendingProps,Ne),a!==null?(t.stateNode=a,k=t,U=null,e=!0):e=!1),e||Je(t)),null;case 13:return hm(e,t,a);case 4:return Ge(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ns(t,null,n,a):It(e,t,n,a),t.child;case 11:return lm(e,t,t.type,t.pendingProps,a);case 7:return It(e,t,t.pendingProps,a),t.child;case 8:return It(e,t,t.pendingProps.children,a),t.child;case 12:return It(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,jn(t,t.type,n.value),It(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,ys(t),i=Jt(i),n=n(i),t.flags|=1,It(e,t,n,a),t.child;case 14:return sm(e,t,t.type,t.pendingProps,a);case 15:return rm(e,t,t.type,t.pendingProps,a);case 19:return xm(e,t,a);case 31:return Cv(e,t,a);case 22:return im(e,t,a,t.pendingProps);case 24:return ys(t),n=Jt(_t),e===null?(i=zo(),i===null&&(i=mt,c=_o(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=a),i=c),t.memoizedState={parent:n,cache:i},Ho(t),jn(t,_t,i)):((e.lanes&a)!==0&&(Lo(e,t),gi(t,null,null,a),xi()),i=e.memoizedState,c=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),jn(t,_t,n)):(n=c.cache,jn(t,_t,n),n!==i.cache&&qn(t,[_t],a,!0))),It(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function $n(e){e.flags|=4}function pd(e,t,a,n,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if($m())e.flags|=8192;else throw Ss=Gu,Uo}else e.flags&=-16777217}function vm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!A0(t))if($m())e.flags|=8192;else throw Ss=Gu,Uo}function uc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?qr():536870912,e.lanes|=t,pr|=t)}function Ni(e,t){if(!q)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 n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Dv(e,t,a){var n=t.pendingProps;switch(S(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return vt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),cn(_t),Le(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Yt(t)?$n(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nn())),vt(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?($n(t),c!==null?(vt(t),vm(t,c)):(vt(t),pd(t,i,null,n,a))):c?c!==e.memoizedState?($n(t),vt(t),vm(t,c)):(vt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&$n(t),vt(t),pd(t,i,e,n,a)),null;case 27:if(aa(t),a=xe.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&$n(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return vt(t),null}e=ye.current,Yt(t)?_e(t):(e=w0(i,n,a),t.stateNode=e,$n(t))}return vt(t),null;case 5:if(aa(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&$n(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return vt(t),null}if(c=ye.current,Yt(t))_e(t);else{var v=jc(xe.current);switch(c){case 1:c=v.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=v.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=v.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=v.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=v.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof n.is=="string"?v.createElement("select",{is:n.is}):v.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?v.createElement(i,{is:n.is}):v.createElement(i)}}c[Mt]=t,c[Lt]=n;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)c.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=c;e:switch(Kt(c,i,n),i){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&$n(t)}}return vt(t),pd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&$n(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=xe.current,Yt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=k,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[Mt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||h0(e.nodeValue,a)),e||Je(t,!0)}else e=jc(e).createTextNode(n),e[Mt]=t,t.stateNode=e}return vt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Yt(t),a!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Mt]=t}else $t(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),e=!1}else a=Nn(),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 vt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Yt(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[Mt]=t}else $t(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),i=!1}else i=Nn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Aa(t),t):(Aa(t),null)}return Aa(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==i&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),uc(t,t.updateQueue),vt(t),null);case 4:return Le(),e===null&&Bd(t.stateNode.containerInfo),vt(t),null;case 10:return cn(t.type),vt(t),null;case 19:if(ne(Ot),n=t.memoizedState,n===null)return vt(t),null;if(i=(t.flags&128)!==0,c=n.rendering,c===null)if(i)Ni(n,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Xu(e),c!==null){for(t.flags|=128,Ni(n,!1),e=c.updateQueue,t.updateQueue=e,uc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Vu(a,e),a=a.sibling;return he(Ot,Ot.current&1|2),q&&r(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Nt()>hc&&(t.flags|=128,i=!0,Ni(n,!1),t.lanes=4194304)}else{if(!i)if(e=Xu(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,uc(t,e),Ni(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!q)return vt(t),null}else 2*Nt()-n.renderingStartTime>hc&&a!==536870912&&(t.flags|=128,i=!0,Ni(n,!1),t.lanes=4194304);n.isBackwards?(c.sibling=t.child,t.child=c):(e=n.last,e!==null?e.sibling=c:t.child=c,n.last=c)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Nt(),e.sibling=null,a=Ot.current,he(Ot,i?a&1|2:a&1),q&&r(t,n.treeForkCount),e):(vt(t),null);case 22:case 23:return Aa(t),Yo(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),a=t.updateQueue,a!==null&&uc(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&ne(ps),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),cn(_t),vt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Rv(e,t){switch(S(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return cn(_t),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return aa(t),null;case 31:if(t.memoizedState!==null){if(Aa(t),t.alternate===null)throw Error(o(340));$t()}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));$t()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(Ot),null;case 4:return Le(),null;case 10:return cn(t.type),null;case 22:case 23:return Aa(t),Yo(),e!==null&&ne(ps),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return cn(_t),null;case 25:return null;default:return null}}function ym(e,t){switch(S(t),t.tag){case 3:cn(_t),Le();break;case 26:case 27:case 5:aa(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&Aa(t);break;case 13:Aa(t);break;case 19:ne(Ot);break;case 10:cn(t.type);break;case 22:case 23:Aa(t),Yo(),e!==null&&ne(ps);break;case 24:cn(_t)}}function ji(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){n=void 0;var c=a.create,v=a.inst;n=c(),v.destroy=n}a=a.next}while(a!==i)}}catch(N){ut(t,t.return,N)}}function Tl(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var c=i.next;n=c;do{if((n.tag&e)===e){var v=n.inst,N=v.destroy;if(N!==void 0){v.destroy=void 0,i=t;var O=a,X=N;try{X()}catch(se){ut(i,O,se)}}}n=n.next}while(n!==c)}}catch(se){ut(t,t.return,se)}}function pm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ch(t,a)}catch(n){ut(e,e.return,n)}}}function bm(e,t,a){a.props=ws(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){ut(e,t,n)}}function wi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(i){ut(e,t,i)}}function wn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){ut(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){ut(e,t,i)}else a.current=null}function Sm(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(i){ut(e,e.return,i)}}function bd(e,t,a){try{var n=e.stateNode;Kv(n,e.type,a,t),n[Lt]=t}catch(i){ut(e,e.return,i)}}function Nm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&kl(e.type)||e.tag===4}function Sd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nm(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&&kl(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 Nd(e,t,a){var n=e.tag;if(n===5||n===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=qa));else if(n!==4&&(n===27&&kl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Nd(e,t,a),e=e.sibling;e!==null;)Nd(e,t,a),e=e.sibling}function cc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&kl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(cc(e,t,a),e=e.sibling;e!==null;)cc(e,t,a),e=e.sibling}function jm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kt(t,n,a),t[Mt]=e,t[Lt]=a}catch(c){ut(e,e.return,c)}}var Fn=!1,Ut=!1,jd=!1,wm=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function Av(e,t){if(e=e.containerInfo,Fd=Dc,e=Do(e),Is(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var i=n.anchorOffset,c=n.focusNode;n=n.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var v=0,N=-1,O=-1,X=0,se=0,ce=e,J=null;t:for(;;){for(var K;ce!==a||i!==0&&ce.nodeType!==3||(N=v+i),ce!==c||n!==0&&ce.nodeType!==3||(O=v+n),ce.nodeType===3&&(v+=ce.nodeValue.length),(K=ce.firstChild)!==null;)J=ce,ce=K;for(;;){if(ce===e)break t;if(J===a&&++X===i&&(N=v),J===c&&++se===n&&(O=v),(K=ce.nextSibling)!==null)break;ce=J,J=ce.parentNode}ce=K}a=N===-1||O===-1?null:{start:N,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(Gd={focusedElem:e,selectionRange:a},Dc=!1,Ft=t;Ft!==null;)if(t=Ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ft=e;else for(;Ft!==null;){switch(t=Ft,c=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++)i=e[a],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,i=c.memoizedProps,c=c.memoizedState,n=a.stateNode;try{var je=ws(a.type,i);e=n.getSnapshotBeforeUpdate(je,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(ke){ut(a,a.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Wd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Wd(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,Ft=e;break}Ft=t.return}}function Em(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Zn(e,a),n&4&&ji(5,a);break;case 1:if(Zn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(v){ut(a,a.return,v)}else{var i=ws(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){ut(a,a.return,v)}}n&64&&pm(a),n&512&&wi(a,a.return);break;case 3:if(Zn(e,a),n&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{ch(e,t)}catch(v){ut(a,a.return,v)}}break;case 27:t===null&&n&4&&jm(a);case 26:case 5:Zn(e,a),t===null&&n&4&&Sm(a),n&512&&wi(a,a.return);break;case 12:Zn(e,a);break;case 31:Zn(e,a),n&4&&Cm(e,a);break;case 13:Zn(e,a),n&4&&Om(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Bv.bind(null,a),iy(e,a))));break;case 22:if(n=a.memoizedState!==null||Fn,!n){t=t!==null&&t.memoizedState!==null||Ut,i=Fn;var c=Ut;Fn=n,(Ut=t)&&!c?Qn(e,a,(a.subtreeFlags&8772)!==0):Zn(e,a),Fn=i,Ut=c}break;case 30:break;default:Zn(e,a)}}function Mm(e){var t=e.alternate;t!==null&&(e.alternate=null,Mm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Bs(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,Sa=!1;function Gn(e,t,a){for(a=a.child;a!==null;)Tm(e,t,a),a=a.sibling}function Tm(e,t,a){if(na&&typeof na.onCommitFiberUnmount=="function")try{na.onCommitFiberUnmount(jt,a)}catch{}switch(a.tag){case 26:Ut||wn(a,t),Gn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ut||wn(a,t);var n=yt,i=Sa;kl(a.type)&&(yt=a.stateNode,Sa=!1),Gn(e,t,a),_i(a.stateNode),yt=n,Sa=i;break;case 5:Ut||wn(a,t);case 6:if(n=yt,i=Sa,yt=null,Gn(e,t,a),yt=n,Sa=i,yt!==null)if(Sa)try{(yt.nodeType===9?yt.body:yt.nodeName==="HTML"?yt.ownerDocument.body:yt).removeChild(a.stateNode)}catch(c){ut(a,t,c)}else try{yt.removeChild(a.stateNode)}catch(c){ut(a,t,c)}break;case 18:yt!==null&&(Sa?(e=yt,p0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Tr(e)):p0(yt,a.stateNode));break;case 4:n=yt,i=Sa,yt=a.stateNode.containerInfo,Sa=!0,Gn(e,t,a),yt=n,Sa=i;break;case 0:case 11:case 14:case 15:Tl(2,a,t),Ut||Tl(4,a,t),Gn(e,t,a);break;case 1:Ut||(wn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&bm(a,t,n)),Gn(e,t,a);break;case 21:Gn(e,t,a);break;case 22:Ut=(n=Ut)||a.memoizedState!==null,Gn(e,t,a),Ut=n;break;default:Gn(e,t,a)}}function Cm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Tr(e)}catch(a){ut(t,t.return,a)}}}function Om(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Tr(e)}catch(a){ut(t,t.return,a)}}function _v(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new wm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new wm),t;default:throw Error(o(435,e.tag))}}function oc(e,t){var a=_v(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var i=Yv.bind(null,e,n);n.then(i,i)}})}function Na(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],c=e,v=t,N=v;e:for(;N!==null;){switch(N.tag){case 27:if(kl(N.type)){yt=N.stateNode,Sa=!1;break e}break;case 5:yt=N.stateNode,Sa=!1;break e;case 3:case 4:yt=N.stateNode.containerInfo,Sa=!0;break e}N=N.return}if(yt===null)throw Error(o(160));Tm(c,v,i),yt=null,Sa=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Dm(t,e),t=t.sibling}var on=null;function Dm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Na(t,e),ja(e),n&4&&(Tl(3,e,e.return),ji(3,e),Tl(5,e,e.return));break;case 1:Na(t,e),ja(e),n&512&&(Ut||a===null||wn(a,a.return)),n&64&&Fn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var i=on;if(Na(t,e),ja(e),n&512&&(Ut||a===null||wn(a,a.return)),n&4){var c=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,i=i.ownerDocument||i;t:switch(n){case"title":c=i.getElementsByTagName("title")[0],(!c||c[Ql]||c[Mt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(n),i.head.insertBefore(c,i.querySelector("head > title"))),Kt(c,n,a),c[Mt]=e,At(c),n=c;break e;case"link":var v=D0("link","href",i).get(n+(a.href||""));if(v){for(var N=0;N<v.length;N++)if(c=v[N],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(N,1);break t}}c=i.createElement(n),Kt(c,n,a),i.head.appendChild(c);break;case"meta":if(v=D0("meta","content",i).get(n+(a.content||""))){for(N=0;N<v.length;N++)if(c=v[N],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(N,1);break t}}c=i.createElement(n),Kt(c,n,a),i.head.appendChild(c);break;default:throw Error(o(468,n))}c[Mt]=e,At(c),n=c}e.stateNode=n}else R0(i,e.type,e.stateNode);else e.stateNode=O0(i,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?R0(i,e.type,e.stateNode):O0(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&bd(e,e.memoizedProps,a.memoizedProps)}break;case 27:Na(t,e),ja(e),n&512&&(Ut||a===null||wn(a,a.return)),a!==null&&n&4&&bd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Na(t,e),ja(e),n&512&&(Ut||a===null||wn(a,a.return)),e.flags&32){i=e.stateNode;try{an(i,"")}catch(je){ut(e,e.return,je)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,bd(e,i,a!==null?a.memoizedProps:i)),n&1024&&(jd=!0);break;case 6:if(Na(t,e),ja(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(je){ut(e,e.return,je)}}break;case 3:if(Mc=null,i=on,on=wc(t.containerInfo),Na(t,e),on=i,ja(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Tr(t.containerInfo)}catch(je){ut(e,e.return,je)}jd&&(jd=!1,Rm(e));break;case 4:n=on,on=wc(e.stateNode.containerInfo),Na(t,e),ja(e),on=n;break;case 12:Na(t,e),ja(e);break;case 31:Na(t,e),ja(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 13:Na(t,e),ja(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(fc=Nt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 22:i=e.memoizedState!==null;var O=a!==null&&a.memoizedState!==null,X=Fn,se=Ut;if(Fn=X||i,Ut=se||O,Na(t,e),Ut=se,Fn=X,ja(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||O||Fn||Ut||Es(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){O=a=t;try{if(c=O.stateNode,i)v=c.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{N=O.stateNode;var ce=O.memoizedProps.style,J=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;N.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(je){ut(O,O.return,je)}}}else if(t.tag===6){if(a===null){O=t;try{O.stateNode.nodeValue=i?"":O.memoizedProps}catch(je){ut(O,O.return,je)}}}else if(t.tag===18){if(a===null){O=t;try{var K=O.stateNode;i?b0(K,!0):b0(O.stateNode,!1)}catch(je){ut(O,O.return,je)}}}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}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,oc(e,a))));break;case 19:Na(t,e),ja(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 30:break;case 21:break;default:Na(t,e),ja(e)}}function ja(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Nm(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,c=Sd(e);cc(e,c,i);break;case 5:var v=a.stateNode;a.flags&32&&(an(v,""),a.flags&=-33);var N=Sd(e);cc(e,N,v);break;case 3:case 4:var O=a.stateNode.containerInfo,X=Sd(e);Nd(e,X,O);break;default:throw Error(o(161))}}catch(se){ut(e,e.return,se)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Rm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Zn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Em(e,t.alternate,t),t=t.sibling}function Es(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tl(4,t,t.return),Es(t);break;case 1:wn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&bm(t,t.return,a),Es(t);break;case 27:_i(t.stateNode);case 26:case 5:wn(t,t.return),Es(t);break;case 22:t.memoizedState===null&&Es(t);break;case 30:Es(t);break;default:Es(t)}e=e.sibling}}function Qn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,c=t,v=c.flags;switch(c.tag){case 0:case 11:case 15:Qn(i,c,a),ji(4,c);break;case 1:if(Qn(i,c,a),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(X){ut(n,n.return,X)}if(n=c,i=n.updateQueue,i!==null){var N=n.stateNode;try{var O=i.shared.hiddenCallbacks;if(O!==null)for(i.shared.hiddenCallbacks=null,i=0;i<O.length;i++)uh(O[i],N)}catch(X){ut(n,n.return,X)}}a&&v&64&&pm(c),wi(c,c.return);break;case 27:jm(c);case 26:case 5:Qn(i,c,a),a&&n===null&&v&4&&Sm(c),wi(c,c.return);break;case 12:Qn(i,c,a);break;case 31:Qn(i,c,a),a&&v&4&&Cm(i,c);break;case 13:Qn(i,c,a),a&&v&4&&Om(i,c);break;case 22:c.memoizedState===null&&Qn(i,c,a),wi(c,c.return);break;case 30:break;default:Qn(i,c,a)}t=t.sibling}}function wd(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&&oi(a))}function Ed(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oi(e))}function dn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Am(e,t,a,n),t=t.sibling}function Am(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:dn(e,t,a,n),i&2048&&ji(9,t);break;case 1:dn(e,t,a,n);break;case 3:dn(e,t,a,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oi(e)));break;case 12:if(i&2048){dn(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,v=c.id,N=c.onPostCommit;typeof N=="function"&&N(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){ut(t,t.return,O)}}else dn(e,t,a,n);break;case 31:dn(e,t,a,n);break;case 13:dn(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,v=t.alternate,t.memoizedState!==null?c._visibility&2?dn(e,t,a,n):Ei(e,t):c._visibility&2?dn(e,t,a,n):(c._visibility|=2,gr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&wd(v,t);break;case 24:dn(e,t,a,n),i&2048&&Ed(t.alternate,t);break;default:dn(e,t,a,n)}}function gr(e,t,a,n,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,v=t,N=a,O=n,X=v.flags;switch(v.tag){case 0:case 11:case 15:gr(c,v,N,O,i),ji(8,v);break;case 23:break;case 22:var se=v.stateNode;v.memoizedState!==null?se._visibility&2?gr(c,v,N,O,i):Ei(c,v):(se._visibility|=2,gr(c,v,N,O,i)),i&&X&2048&&wd(v.alternate,v);break;case 24:gr(c,v,N,O,i),i&&X&2048&&Ed(v.alternate,v);break;default:gr(c,v,N,O,i)}t=t.sibling}}function Ei(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,i=n.flags;switch(n.tag){case 22:Ei(a,n),i&2048&&wd(n.alternate,n);break;case 24:Ei(a,n),i&2048&&Ed(n.alternate,n);break;default:Ei(a,n)}t=t.sibling}}var Mi=8192;function vr(e,t,a){if(e.subtreeFlags&Mi)for(e=e.child;e!==null;)_m(e,t,a),e=e.sibling}function _m(e,t,a){switch(e.tag){case 26:vr(e,t,a),e.flags&Mi&&e.memoizedState!==null&&py(a,on,e.memoizedState,e.memoizedProps);break;case 5:vr(e,t,a);break;case 3:case 4:var n=on;on=wc(e.stateNode.containerInfo),vr(e,t,a),on=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Mi,Mi=16777216,vr(e,t,a),Mi=n):vr(e,t,a));break;default:vr(e,t,a)}}function km(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 Ti(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Ft=n,Um(n,e)}km(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zm(e),e=e.sibling}function zm(e){switch(e.tag){case 0:case 11:case 15:Ti(e),e.flags&2048&&Tl(9,e,e.return);break;case 3:Ti(e);break;case 12:Ti(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,dc(e)):Ti(e);break;default:Ti(e)}}function dc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Ft=n,Um(n,e)}km(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tl(8,t,t.return),dc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,dc(t));break;default:dc(t)}e=e.sibling}}function Um(e,t){for(;Ft!==null;){var a=Ft;switch(a.tag){case 0:case 11:case 15:Tl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:oi(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Ft=n;else e:for(a=e;Ft!==null;){n=Ft;var i=n.sibling,c=n.return;if(Mm(n),n===a){Ft=null;break e}if(i!==null){i.return=c,Ft=i;break e}Ft=c}}}var kv={getCacheForType:function(e){var t=Jt(_t),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Jt(_t).controller.signal}},zv=typeof WeakMap=="function"?WeakMap:Map,lt=0,mt=null,We=null,Ie=0,it=0,_a=null,Cl=!1,yr=!1,Md=!1,Wn=0,Et=0,Ol=0,Ms=0,Td=0,ka=0,pr=0,Ci=null,wa=null,Cd=!1,fc=0,Hm=0,hc=1/0,mc=null,Dl=null,Vt=0,Rl=null,br=null,Xn=0,Od=0,Dd=null,Lm=null,Oi=0,Rd=null;function za(){return(lt&2)!==0&&Ie!==0?Ie&-Ie:G.T!==null?Hd():Vs()}function qm(){if(ka===0)if((Ie&536870912)===0||q){var e=Hs;Hs<<=1,(Hs&3932160)===0&&(Hs=262144),ka=e}else ka=536870912;return e=Ra.current,e!==null&&(e.flags|=32),ka}function Ea(e,t,a){(e===mt&&(it===2||it===9)||e.cancelPendingCommit!==null)&&(Sr(e,0),Al(e,Ie,ka,!1)),rl(e,a),((lt&2)===0||e!==mt)&&(e===mt&&((lt&2)===0&&(Ms|=a),Et===4&&Al(e,Ie,ka,!1)),En(e))}function Vm(e,t,a){if((lt&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||sl(e,t),i=n?Lv(e,t):_d(e,t,!0),c=n;do{if(i===0){yr&&!n&&Al(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!Uv(a)){i=_d(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var N=e;i=Ci;var O=N.current.memoizedState.isDehydrated;if(O&&(Sr(N,v).flags|=256),v=_d(N,v,!1),v!==2){if(Md&&!O){N.errorRecoveryDisabledLanes|=c,Ms|=c,i=4;break e}c=wa,wa=i,c!==null&&(wa===null?wa=c:wa.push.apply(wa,c))}i=v}if(c=!1,i!==2)continue}}if(i===1){Sr(e,0),Al(e,t,0,!0);break}e:{switch(n=e,c=i,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Al(n,t,ka,!Cl);break e;case 2:wa=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=fc+300-Nt(),10<i)){if(Al(n,t,ka,!Cl),Gl(n,0,!0)!==0)break e;Xn=t,n.timeoutHandle=v0(Bm.bind(null,n,a,wa,mc,Cd,t,ka,Ms,pr,Cl,c,"Throttled",-0,0),i);break e}Bm(n,a,wa,mc,Cd,t,ka,Ms,pr,Cl,c,null,-0,0)}}break}while(!0);En(e)}function Bm(e,t,a,n,i,c,v,N,O,X,se,ce,J,K){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qa},_m(t,c,ce);var je=(c&62914560)===c?fc-Nt():(c&4194048)===c?Hm-Nt():0;if(je=by(ce,je),je!==null){Xn=c,e.cancelPendingCommit=je(Xm.bind(null,e,t,c,a,n,i,v,N,O,se,ce,null,J,K)),Al(e,c,v,!X);return}}Xm(e,t,c,a,n,i,v,N,O)}function Uv(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 n=0;n<a.length;n++){var i=a[n],c=i.getSnapshot;i=i.value;try{if(!ra(c(),i))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 Al(e,t,a,n){t&=~Td,t&=~Ms,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var c=31-Zt(i),v=1<<c;n[c]=-1,i&=~v}a!==0&&xt(e,a,t)}function xc(){return(lt&6)===0?(Di(0),!1):!0}function Ad(){if(We!==null){if(it===0)var e=We.return;else e=We,Za=Ln=null,Wo(e),dr=null,fi=0,e=We;for(;e!==null;)ym(e.alternate,e),e=e.return;We=null}}function Sr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,ay(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Xn=0,Ad(),mt=e,We=a=$a(e.current,null),Ie=t,it=0,_a=null,Cl=!1,yr=sl(e,t),Md=!1,pr=ka=Td=Ms=Ol=Et=0,wa=Ci=null,Cd=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-Zt(n),c=1<<i;t|=e[i],n&=~c}return Wn=t,bl(),a}function Ym(e,t){Ve=null,G.H=bi,t===or||t===Fu?(t=lh(),it=3):t===Uo?(t=lh(),it=4):it=t===od?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,_a=t,We===null&&(Et=1,lc(e,pa(t,e.current)))}function $m(){var e=Ra.current;return e===null?!0:(Ie&4194048)===Ie?Wa===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?e===Wa:!1}function Fm(){var e=G.H;return G.H=bi,e===null?bi:e}function Gm(){var e=G.A;return G.A=kv,e}function gc(){Et=4,Cl||(Ie&4194048)!==Ie&&Ra.current!==null||(yr=!0),(Ol&134217727)===0&&(Ms&134217727)===0||mt===null||Al(mt,Ie,ka,!1)}function _d(e,t,a){var n=lt;lt|=2;var i=Fm(),c=Gm();(mt!==e||Ie!==t)&&(mc=null,Sr(e,t)),t=!1;var v=Et;e:do try{if(it!==0&&We!==null){var N=We,O=_a;switch(it){case 8:Ad(),v=6;break e;case 3:case 2:case 9:case 6:Ra.current===null&&(t=!0);var X=it;if(it=0,_a=null,Nr(e,N,O,X),a&&yr){v=0;break e}break;default:X=it,it=0,_a=null,Nr(e,N,O,X)}}Hv(),v=Et;break}catch(se){Ym(e,se)}while(!0);return t&&e.shellSuspendCounter++,Za=Ln=null,lt=n,G.H=i,G.A=c,We===null&&(mt=null,Ie=0,bl()),v}function Hv(){for(;We!==null;)Zm(We)}function Lv(e,t){var a=lt;lt|=2;var n=Fm(),i=Gm();mt!==e||Ie!==t?(mc=null,hc=Nt()+500,Sr(e,t)):yr=sl(e,t);e:do try{if(it!==0&&We!==null){t=We;var c=_a;t:switch(it){case 1:it=0,_a=null,Nr(e,t,c,1);break;case 2:case 9:if(ah(c)){it=0,_a=null,Qm(t);break}t=function(){it!==2&&it!==9||mt!==e||(it=7),En(e)},c.then(t,t);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:ah(c)?(it=0,_a=null,Qm(t)):(it=0,_a=null,Nr(e,t,c,7));break;case 5:var v=null;switch(We.tag){case 26:v=We.memoizedState;case 5:case 27:var N=We;if(v?A0(v):N.stateNode.complete){it=0,_a=null;var O=N.sibling;if(O!==null)We=O;else{var X=N.return;X!==null?(We=X,vc(X)):We=null}break t}}it=0,_a=null,Nr(e,t,c,5);break;case 6:it=0,_a=null,Nr(e,t,c,6);break;case 8:Ad(),Et=6;break e;default:throw Error(o(462))}}qv();break}catch(se){Ym(e,se)}while(!0);return Za=Ln=null,G.H=n,G.A=i,lt=a,We!==null?0:(mt=null,Ie=0,bl(),Et)}function qv(){for(;We!==null&&!ca();)Zm(We)}function Zm(e){var t=gm(e.alternate,e,Wn);e.memoizedProps=e.pendingProps,t===null?vc(e):We=t}function Qm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=om(a,t,t.pendingProps,t.type,void 0,Ie);break;case 11:t=om(a,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:Wo(t);default:ym(a,t),t=We=Vu(t,Wn),t=gm(a,t,Wn)}e.memoizedProps=e.pendingProps,t===null?vc(e):We=t}function Nr(e,t,a,n){Za=Ln=null,Wo(t),dr=null,fi=0;var i=t.return;try{if(Tv(e,i,t,a,Ie)){Et=1,lc(e,pa(a,e.current)),We=null;return}}catch(c){if(i!==null)throw We=i,c;Et=1,lc(e,pa(a,e.current)),We=null;return}t.flags&32768?(q||n===1?e=!0:yr||(Ie&536870912)!==0?e=!1:(Cl=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ra.current,n!==null&&n.tag===13&&(n.flags|=16384))),Wm(t,e)):vc(t)}function vc(e){var t=e;do{if((t.flags&32768)!==0){Wm(t,Cl);return}e=t.return;var a=Dv(t.alternate,t,Wn);if(a!==null){We=a;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Et===0&&(Et=5)}function Wm(e,t){do{var a=Rv(e.alternate,e);if(a!==null){a.flags&=32767,We=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){We=e;return}We=e=a}while(e!==null);Et=6,We=null}function Xm(e,t,a,n,i,c,v,N,O){e.cancelPendingCommit=null;do yc();while(Vt!==0);if((lt&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=ms,fu(e,a,c,v,N,O),e===mt&&(We=mt=null,Ie=0),br=t,Rl=e,Xn=a,Od=c,Dd=i,Lm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,$v(xn,function(){return e0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=G.T,G.T=null,i=ie.p,ie.p=2,v=lt,lt|=4;try{Av(e,t,a)}finally{lt=v,ie.p=i,G.T=n}}Vt=1,Pm(),Jm(),Im()}}function Pm(){if(Vt===1){Vt=0;var e=Rl,t=br,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=G.T,G.T=null;var n=ie.p;ie.p=2;var i=lt;lt|=4;try{Dm(t,e);var c=Gd,v=Do(e.containerInfo),N=c.focusedElem,O=c.selectionRange;if(v!==N&&N&&N.ownerDocument&&et(N.ownerDocument.documentElement,N)){if(O!==null&&Is(N)){var X=O.start,se=O.end;if(se===void 0&&(se=X),"selectionStart"in N)N.selectionStart=X,N.selectionEnd=Math.min(se,N.value.length);else{var ce=N.ownerDocument||document,J=ce&&ce.defaultView||window;if(J.getSelection){var K=J.getSelection(),je=N.textContent.length,ke=Math.min(O.start,je),ft=O.end===void 0?ke:Math.min(O.end,je);!K.extend&&ke>ft&&(v=ft,ft=ke,ke=v);var $=ku(N,ke),L=ku(N,ft);if($&&L&&(K.rangeCount!==1||K.anchorNode!==$.node||K.anchorOffset!==$.offset||K.focusNode!==L.node||K.focusOffset!==L.offset)){var W=ce.createRange();W.setStart($.node,$.offset),K.removeAllRanges(),ke>ft?(K.addRange(W),K.extend(L.node,L.offset)):(W.setEnd(L.node,L.offset),K.addRange(W))}}}}for(ce=[],K=N;K=K.parentNode;)K.nodeType===1&&ce.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ce.length;N++){var ue=ce[N];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Dc=!!Fd,Gd=Fd=null}finally{lt=i,ie.p=n,G.T=a}}e.current=t,Vt=2}}function Jm(){if(Vt===2){Vt=0;var e=Rl,t=br,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=G.T,G.T=null;var n=ie.p;ie.p=2;var i=lt;lt|=4;try{Em(e,t.alternate,t)}finally{lt=i,ie.p=n,G.T=a}}Vt=3}}function Im(){if(Vt===4||Vt===3){Vt=0,ma();var e=Rl,t=br,a=Xn,n=Lm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Vt=5:(Vt=0,br=Rl=null,Km(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Dl=null),sa(a),t=t.stateNode,na&&typeof na.onCommitFiberRoot=="function")try{na.onCommitFiberRoot(jt,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=G.T,i=ie.p,ie.p=2,G.T=null;try{for(var c=e.onRecoverableError,v=0;v<n.length;v++){var N=n[v];c(N.value,{componentStack:N.stack})}}finally{G.T=t,ie.p=i}}(Xn&3)!==0&&yc(),En(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===Rd?Oi++:(Oi=0,Rd=e):Oi=0,Di(0)}}function Km(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oi(t)))}function yc(){return Pm(),Jm(),Im(),e0()}function e0(){if(Vt!==5)return!1;var e=Rl,t=Od;Od=0;var a=sa(Xn),n=G.T,i=ie.p;try{ie.p=32>a?32:a,G.T=null,a=Dd,Dd=null;var c=Rl,v=Xn;if(Vt=0,br=Rl=null,Xn=0,(lt&6)!==0)throw Error(o(331));var N=lt;if(lt|=4,zm(c.current),Am(c,c.current,v,a),lt=N,Di(0,!1),na&&typeof na.onPostCommitFiberRoot=="function")try{na.onPostCommitFiberRoot(jt,c)}catch{}return!0}finally{ie.p=i,G.T=n,Km(e,t)}}function t0(e,t,a){t=pa(a,t),t=cd(e.stateNode,t,2),e=wl(e,t,2),e!==null&&(rl(e,2),En(e))}function ut(e,t,a){if(e.tag===3)t0(e,e,a);else for(;t!==null;){if(t.tag===3){t0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Dl===null||!Dl.has(n))){e=pa(a,e),a=am(2),n=wl(t,a,2),n!==null&&(nm(a,n,t,e),rl(n,2),En(n));break}}t=t.return}}function kd(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new zv;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(a)||(Md=!0,i.add(a),e=Vv.bind(null,e,t,a),t.then(e,e))}function Vv(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,mt===e&&(Ie&a)===a&&(Et===4||Et===3&&(Ie&62914560)===Ie&&300>Nt()-fc?(lt&2)===0&&Sr(e,0):Td|=a,pr===Ie&&(pr=0)),En(e)}function a0(e,t){t===0&&(t=qr()),e=Ya(e,t),e!==null&&(rl(e,t),En(e))}function Bv(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 n=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),a0(e,a)}function $v(e,t){return Ze(e,t)}var pc=null,jr=null,zd=!1,bc=!1,Ud=!1,_l=0;function En(e){e!==jr&&e.next===null&&(jr===null?pc=jr=e:jr=jr.next=e),bc=!0,zd||(zd=!0,Gv())}function Di(e,t){if(!Ud&&bc){Ud=!0;do for(var a=!1,n=pc;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var c=0;else{var v=n.suspendedLanes,N=n.pingedLanes;c=(1<<31-Zt(42|e)+1)-1,c&=i&~(v&~N),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,r0(n,c))}else c=Ie,c=Gl(n,n===mt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||sl(n,c)||(a=!0,r0(n,c));n=n.next}while(a);Ud=!1}}function Fv(){n0()}function n0(){bc=zd=!1;var e=0;_l!==0&&ty()&&(e=_l);for(var t=Nt(),a=null,n=pc;n!==null;){var i=n.next,c=l0(n,t);c===0?(n.next=null,a===null?pc=i:a.next=i,i===null&&(jr=a)):(a=n,(e!==0||(c&3)!==0)&&(bc=!0)),n=i}Vt!==0&&Vt!==5||Di(e),_l!==0&&(_l=0)}function l0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var v=31-Zt(c),N=1<<v,O=i[v];O===-1?((N&a)===0||(N&n)!==0)&&(i[v]=du(N,t)):O<=t&&(e.expiredLanes|=N),c&=~N}if(t=mt,a=Ie,a=Gl(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(it===2||it===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Ht(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||sl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Ht(n),sa(a)){case 2:case 8:a=Bt;break;case 32:a=xn;break;case 268435456:a=Fl;break;default:a=xn}return n=s0.bind(null,e),a=Ze(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Ht(n),e.callbackPriority=2,e.callbackNode=null,2}function s0(e,t){if(Vt!==0&&Vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(yc()&&e.callbackNode!==a)return null;var n=Ie;return n=Gl(e,e===mt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Vm(e,n,t),l0(e,Nt()),e.callbackNode!=null&&e.callbackNode===a?s0.bind(null,e):null)}function r0(e,t){if(yc())return null;Vm(e,t,!0)}function Gv(){ny(function(){(lt&6)!==0?Ze($e,Fv):n0()})}function Hd(){if(_l===0){var e=ur;e===0&&(e=ll,ll<<=1,(ll&261888)===0&&(ll=256)),_l=e}return _l}function i0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Kl(""+e)}function u0(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,n,i){if(t==="submit"&&a&&a.stateNode===i){var c=i0((i[Lt]||null).action),v=n.submitter;v&&(t=(t=v[Lt]||null)?i0(t.formAction):v.getAttribute("formAction"),t!==null&&(c=t,v=null));var N=new ns("action","action",null,n,i);e.push({event:N,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(_l!==0){var O=v?u0(i,v):new FormData(i);nd(a,{pending:!0,data:O,method:i.method,action:c},null,O)}}else typeof c=="function"&&(N.preventDefault(),O=v?u0(i,v):new FormData(i),nd(a,{pending:!0,data:O,method:i.method,action:c},c,O))},currentTarget:i}]})}}for(var Ld=0;Ld<ri.length;Ld++){var qd=ri[Ld],Qv=qd.toLowerCase(),Wv=qd[0].toUpperCase()+qd.slice(1);ya(Qv,"on"+Wv)}ya(Hu,"onAnimationEnd"),ya(Lu,"onAnimationIteration"),ya(tr,"onAnimationStart"),ya("dblclick","onDoubleClick"),ya("focusin","onFocus"),ya("focusout","onBlur"),ya(Ro,"onTransitionRun"),ya(Ao,"onTransitionStart"),ya(qu,"onTransitionCancel"),ya(li,"onTransitionEnd"),il("onMouseEnter",["mouseout","mouseover"]),il("onMouseLeave",["mouseout","mouseover"]),il("onPointerEnter",["pointerout","pointerover"]),il("onPointerLeave",["pointerout","pointerover"]),vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ri="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(Ri));function c0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var c=void 0;if(t)for(var v=n.length-1;0<=v;v--){var N=n[v],O=N.instance,X=N.currentTarget;if(N=N.listener,O!==c&&i.isPropagationStopped())break e;c=N,i.currentTarget=X;try{c(i)}catch(se){pl(se)}i.currentTarget=null,c=O}else for(v=0;v<n.length;v++){if(N=n[v],O=N.instance,X=N.currentTarget,N=N.listener,O!==c&&i.isPropagationStopped())break e;c=N,i.currentTarget=X;try{c(i)}catch(se){pl(se)}i.currentTarget=null,c=O}}}}function Xe(e,t){var a=t[Zl];a===void 0&&(a=t[Zl]=new Set);var n=e+"__bubble";a.has(n)||(o0(t,e,2,!1),a.add(n))}function Vd(e,t,a){var n=0;t&&(n|=4),o0(a,e,n,t)}var Sc="_reactListening"+Math.random().toString(36).slice(2);function Bd(e){if(!e[Sc]){e[Sc]=!0,gu.forEach(function(a){a!=="selectionchange"&&(Xv.has(a)||Vd(a,!1,e),Vd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sc]||(t[Sc]=!0,Vd("selectionchange",!1,t))}}function o0(e,t,a,n){switch(q0(t)){case 2:var i=jy;break;case 8:i=wy;break;default:i=af}a=i.bind(null,t,a,e),i=void 0,!Xr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function Yd(e,t,a,n,i){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var v=n.tag;if(v===3||v===4){var N=n.stateNode.containerInfo;if(N===i)break;if(v===4)for(v=n.return;v!==null;){var O=v.tag;if((O===3||O===4)&&v.stateNode.containerInfo===i)return;v=v.return}for(;N!==null;){if(v=On(N),v===null)return;if(O=v.tag,O===5||O===6||O===26||O===27){n=c=v;continue e}N=N.parentNode}}n=n.return}Wr(function(){var X=c,se=Zs(a),ce=[];e:{var J=si.get(e);if(J!==void 0){var K=ns,je=e;switch(e){case"keypress":if(as(a)===0)break e;case"keydown":case"keyup":K=go;break;case"focusin":je="focus",K=Js;break;case"focusout":je="blur",K=Js;break;case"beforeblur":case"afterblur":K=Js;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":K=Nu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=ro;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=po;break;case Hu:case Lu:case tr:K=dl;break;case li:K=bo;break;case"scroll":case"scrollend":K=Pr;break;case"wheel":K=No;break;case"copy":case"cut":case"paste":K=fl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=ju;break;case"toggle":case"beforetoggle":K=wo}var ke=(t&4)!==0,ft=!ke&&(e==="scroll"||e==="scrollend"),$=ke?J!==null?J+"Capture":null:J;ke=[];for(var L=X,W;L!==null;){var ue=L;if(W=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||W===null||$===null||(ue=es(L,$),ue!=null&&ke.push(Ai(L,ue,W))),ft)break;L=L.return}0<ke.length&&(J=new K(J,je,null,a,se),ce.push({event:J,listeners:ke}))}}if((t&7)===0){e:{if(J=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",J&&a!==Zr&&(je=a.relatedTarget||a.fromElement)&&(On(je)||je[Cn]))break e;if((K||J)&&(J=se.window===se?se:(J=se.ownerDocument)?J.defaultView||J.parentWindow:window,K?(je=a.relatedTarget||a.toElement,K=X,je=je?On(je):null,je!==null&&(ft=x(je),ke=je.tag,je!==ft||ke!==5&&ke!==27&&ke!==6)&&(je=null)):(K=null,je=X),K!==je)){if(ke=Nu,ue="onMouseLeave",$="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(ke=ju,ue="onPointerLeave",$="onPointerEnter",L="pointer"),ft=K==null?J:ga(K),W=je==null?J:ga(je),J=new ke(ue,L+"leave",K,a,se),J.target=ft,J.relatedTarget=W,ue=null,On(se)===X&&(ke=new ke($,L+"enter",je,a,se),ke.target=W,ke.relatedTarget=ft,ue=ke),ft=ue,K&&je)t:{for(ke=Pv,$=K,L=je,W=0,ue=$;ue;ue=ke(ue))W++;ue=0;for(var Re=L;Re;Re=ke(Re))ue++;for(;0<W-ue;)$=ke($),W--;for(;0<ue-W;)L=ke(L),ue--;for(;W--;){if($===L||L!==null&&$===L.alternate){ke=$;break t}$=ke($),L=ke(L)}ke=null}else ke=null;K!==null&&d0(ce,J,K,ke,!1),je!==null&&ft!==null&&d0(ce,ft,je,ke,!0)}}e:{if(J=X?ga(X):window,K=J.nodeName&&J.nodeName.toLowerCase(),K==="select"||K==="input"&&J.type==="file")var at=Au;else if(Ru(J))if(Sn)at=gt;else{at=gl;var Ee=Pe}else K=J.nodeName,!K||K.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?X&&Gs(X.elementType)&&(at=Au):at=Oo;if(at&&(at=at(e,X))){Ir(ce,at,a,se);break e}Ee&&Ee(e,J,X),e==="focusout"&&X&&J.type==="number"&&X.memoizedProps.value!=null&&Xl(J,"number",J.value)}switch(Ee=X?ga(X):window,e){case"focusin":(Ru(Ee)||Ee.contentEditable==="true")&&(vl=Ee,Ks=X,Xt=null);break;case"focusout":Xt=Ks=vl=null;break;case"mousedown":er=!0;break;case"contextmenu":case"mouseup":case"dragend":er=!1,hs(ce,a,se);break;case"selectionchange":if(zu)break;case"keydown":case"keyup":hs(ce,a,se)}var Fe;if(Jr)e:{switch(e){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else ml?Ou(e,a)&&(Ke="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ke="onCompositionStart");Ke&&(Mu&&a.locale!=="ko"&&(ml||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&ml&&(Fe=qt()):(pn=se,Qs="value"in pn?pn.value:pn.textContent,ml=!0)),Ee=Nc(X,Ke),0<Ee.length&&(Ke=new hl(Ke,e,null,a,se),ce.push({event:Ke,listeners:Ee}),Fe?Ke.data=Fe:(Fe=Du(a),Fe!==null&&(Ke.data=Fe)))),(Fe=Eo?Mo(e,a):To(e,a))&&(Ke=Nc(X,"onBeforeInput"),0<Ke.length&&(Ee=new hl("onBeforeInput","beforeinput",null,a,se),ce.push({event:Ee,listeners:Ke}),Ee.data=Fe)),Zv(ce,e,X,a,se)}c0(ce,t)})}function Ai(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Nc(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=es(e,a),i!=null&&n.unshift(Ai(e,i,c)),i=es(e,t),i!=null&&n.push(Ai(e,i,c))),e.tag===3)return n;e=e.return}return[]}function Pv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function d0(e,t,a,n,i){for(var c=t._reactName,v=[];a!==null&&a!==n;){var N=a,O=N.alternate,X=N.stateNode;if(N=N.tag,O!==null&&O===n)break;N!==5&&N!==26&&N!==27||X===null||(O=X,i?(X=es(a,c),X!=null&&v.unshift(Ai(a,X,O))):i||(X=es(a,c),X!=null&&v.push(Ai(a,X,O)))),a=a.return}v.length!==0&&e.push({event:t,listeners:v})}var Jv=/\r\n?/g,Iv=/\u0000|\uFFFD/g;function f0(e){return(typeof e=="string"?e:""+e).replace(Jv,`
|
|
49
|
+
`).replace(Iv,"")}function h0(e,t){return t=f0(t),f0(e)===t}function dt(e,t,a,n,i,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||an(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&an(e,""+n);break;case"className":Ys(e,"class",n);break;case"tabIndex":Ys(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ys(e,a,n);break;case"style":pu(e,n,c);break;case"data":if(t!=="object"){Ys(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Kl(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="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 c=="function"&&(a==="formAction"?(t!=="input"&&dt(e,t,"name",i.name,i,null),dt(e,t,"formEncType",i.formEncType,i,null),dt(e,t,"formMethod",i.formMethod,i,null),dt(e,t,"formTarget",i.formTarget,i,null)):(dt(e,t,"encType",i.encType,i,null),dt(e,t,"method",i.method,i,null),dt(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Kl(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=qa);break;case"onScroll":n!=null&&Xe("scroll",e);break;case"onScrollEnd":n!=null&&Xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=Kl(""+n),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":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":Xe("beforetoggle",e),Xe("toggle",e),Qt(e,"popover",n);break;case"xlinkActuate":rt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":rt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":rt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":rt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":rt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":rt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":rt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":rt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":rt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Qt(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=lo.get(a)||a,Qt(e,a,n))}}function $d(e,t,a,n,i,c){switch(a){case"style":pu(e,n,c);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?an(e,n):(typeof n=="number"||typeof n=="bigint")&&an(e,""+n);break;case"onScroll":n!=null&&Xe("scroll",e);break;case"onScrollEnd":n!=null&&Xe("scrollend",e);break;case"onClick":n!=null&&(e.onclick=qa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),c=e[Lt]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,i),typeof n=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,i);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Qt(e,a,n)}}}function Kt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xe("error",e),Xe("load",e);var n=!1,i=!1,c;for(c in a)if(a.hasOwnProperty(c)){var v=a[c];if(v!=null)switch(c){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:dt(e,t,c,v,a,null)}}i&&dt(e,t,"srcSet",a.srcSet,a,null),n&&dt(e,t,"src",a.src,a,null);return;case"input":Xe("invalid",e);var N=c=v=i=null,O=null,X=null;for(n in a)if(a.hasOwnProperty(n)){var se=a[n];if(se!=null)switch(n){case"name":i=se;break;case"type":v=se;break;case"checked":O=se;break;case"defaultChecked":X=se;break;case"value":c=se;break;case"defaultValue":N=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,t));break;default:dt(e,t,n,se,a,null)}}cl(e,c,N,O,X,v,i,!1);return;case"select":Xe("invalid",e),n=v=c=null;for(i in a)if(a.hasOwnProperty(i)&&(N=a[i],N!=null))switch(i){case"value":c=N;break;case"defaultValue":v=N;break;case"multiple":n=N;default:dt(e,t,i,N,a,null)}t=c,a=v,e.multiple=!!n,t!=null?Rn(e,!!n,t,!1):a!=null&&Rn(e,!!n,a,!0);return;case"textarea":Xe("invalid",e),c=i=n=null;for(v in a)if(a.hasOwnProperty(v)&&(N=a[v],N!=null))switch(v){case"value":n=N;break;case"defaultValue":i=N;break;case"children":c=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(o(91));break;default:dt(e,t,v,N,a,null)}Gr(e,n,i,c);return;case"option":for(O in a)if(a.hasOwnProperty(O)&&(n=a[O],n!=null))switch(O){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:dt(e,t,O,n,a,null)}return;case"dialog":Xe("beforetoggle",e),Xe("toggle",e),Xe("cancel",e),Xe("close",e);break;case"iframe":case"object":Xe("load",e);break;case"video":case"audio":for(n=0;n<Ri.length;n++)Xe(Ri[n],e);break;case"image":Xe("error",e),Xe("load",e);break;case"details":Xe("toggle",e);break;case"embed":case"source":case"link":Xe("error",e),Xe("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(X in a)if(a.hasOwnProperty(X)&&(n=a[X],n!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:dt(e,t,X,n,a,null)}return;default:if(Gs(t)){for(se in a)a.hasOwnProperty(se)&&(n=a[se],n!==void 0&&$d(e,t,se,n,a,void 0));return}}for(N in a)a.hasOwnProperty(N)&&(n=a[N],n!=null&&dt(e,t,N,n,a,null))}function Kv(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,c=null,v=null,N=null,O=null,X=null,se=null;for(K in a){var ce=a[K];if(a.hasOwnProperty(K)&&ce!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":O=ce;default:n.hasOwnProperty(K)||dt(e,t,K,null,n,ce)}}for(var J in n){var K=n[J];if(ce=a[J],n.hasOwnProperty(J)&&(K!=null||ce!=null))switch(J){case"type":c=K;break;case"name":i=K;break;case"checked":X=K;break;case"defaultChecked":se=K;break;case"value":v=K;break;case"defaultValue":N=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(o(137,t));break;default:K!==ce&&dt(e,t,J,K,n,ce)}}Fs(e,v,N,O,X,se,c,i);return;case"select":K=v=N=J=null;for(c in a)if(O=a[c],a.hasOwnProperty(c)&&O!=null)switch(c){case"value":break;case"multiple":K=O;default:n.hasOwnProperty(c)||dt(e,t,c,null,n,O)}for(i in n)if(c=n[i],O=a[i],n.hasOwnProperty(i)&&(c!=null||O!=null))switch(i){case"value":J=c;break;case"defaultValue":N=c;break;case"multiple":v=c;default:c!==O&&dt(e,t,i,c,n,O)}t=N,a=v,n=K,J!=null?Rn(e,!!a,J,!1):!!n!=!!a&&(t!=null?Rn(e,!!a,t,!0):Rn(e,!!a,a?[]:"",!1));return;case"textarea":K=J=null;for(N in a)if(i=a[N],a.hasOwnProperty(N)&&i!=null&&!n.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:dt(e,t,N,null,n,i)}for(v in n)if(i=n[v],c=a[v],n.hasOwnProperty(v)&&(i!=null||c!=null))switch(v){case"value":J=i;break;case"defaultValue":K=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==c&&dt(e,t,v,i,n,c)}Pl(e,J,K);return;case"option":for(var je in a)if(J=a[je],a.hasOwnProperty(je)&&J!=null&&!n.hasOwnProperty(je))switch(je){case"selected":e.selected=!1;break;default:dt(e,t,je,null,n,J)}for(O in n)if(J=n[O],K=a[O],n.hasOwnProperty(O)&&J!==K&&(J!=null||K!=null))switch(O){case"selected":e.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:dt(e,t,O,J,n,K)}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 ke in a)J=a[ke],a.hasOwnProperty(ke)&&J!=null&&!n.hasOwnProperty(ke)&&dt(e,t,ke,null,n,J);for(X in n)if(J=n[X],K=a[X],n.hasOwnProperty(X)&&J!==K&&(J!=null||K!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(o(137,t));break;default:dt(e,t,X,J,n,K)}return;default:if(Gs(t)){for(var ft in a)J=a[ft],a.hasOwnProperty(ft)&&J!==void 0&&!n.hasOwnProperty(ft)&&$d(e,t,ft,void 0,n,J);for(se in n)J=n[se],K=a[se],!n.hasOwnProperty(se)||J===K||J===void 0&&K===void 0||$d(e,t,se,J,n,K);return}}for(var $ in a)J=a[$],a.hasOwnProperty($)&&J!=null&&!n.hasOwnProperty($)&&dt(e,t,$,null,n,J);for(ce in n)J=n[ce],K=a[ce],!n.hasOwnProperty(ce)||J===K||J==null&&K==null||dt(e,t,ce,J,n,K)}function m0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ey(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var i=a[n],c=i.transferSize,v=i.initiatorType,N=i.duration;if(c&&N&&m0(v)){for(v=0,N=i.responseEnd,n+=1;n<a.length;n++){var O=a[n],X=O.startTime;if(X>N)break;var se=O.transferSize,ce=O.initiatorType;se&&m0(ce)&&(O=O.responseEnd,v+=se*(O<N?1:(N-X)/(O-X)))}if(--n,t+=8*(c+v)/(i.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 Fd=null,Gd=null;function jc(e){return e.nodeType===9?e:e.ownerDocument}function x0(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 g0(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 Zd(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 Qd=null;function ty(){var e=window.event;return e&&e.type==="popstate"?e===Qd?!1:(Qd=e,!0):(Qd=null,!1)}var v0=typeof setTimeout=="function"?setTimeout:void 0,ay=typeof clearTimeout=="function"?clearTimeout:void 0,y0=typeof Promise=="function"?Promise:void 0,ny=typeof queueMicrotask=="function"?queueMicrotask:typeof y0<"u"?function(e){return y0.resolve(null).then(e).catch(ly)}:v0;function ly(e){setTimeout(function(){throw e})}function kl(e){return e==="head"}function p0(e,t){var a=t,n=0;do{var i=a.nextSibling;if(e.removeChild(a),i&&i.nodeType===8)if(a=i.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(i),Tr(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")_i(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,_i(a);for(var c=a.firstChild;c;){var v=c.nextSibling,N=c.nodeName;c[Ql]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=v}}else a==="body"&&_i(e.ownerDocument.body);a=i}while(a);Tr(t)}function b0(e,t){var a=e;e=0;do{var n=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||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Wd(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":Wd(a),Bs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function sy(e,t,a,n){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Ql])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Xa(e.nextSibling),e===null)break}return null}function ry(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Xa(e.nextSibling),e===null))return null;return e}function S0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Xa(e.nextSibling),e===null))return null;return e}function Xd(e){return e.data==="$?"||e.data==="$~"}function Pd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function iy(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Xa(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 Jd=null;function N0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Xa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function j0(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 w0(e,t,a){switch(t=jc(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 _i(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Bs(e)}var Pa=new Map,E0=new Set;function wc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Pn=ie.d;ie.d={f:uy,r:cy,D:oy,C:dy,L:fy,m:hy,X:xy,S:my,M:gy};function uy(){var e=Pn.f(),t=xc();return e||t}function cy(e){var t=Ae(e);t!==null&&t.tag===5&&t.type==="form"?Yh(t):Pn.r(e)}var wr=typeof document>"u"?null:document;function M0(e,t,a){var n=wr;if(n&&typeof t=="string"&&t){var i=Wt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),E0.has(i)||(E0.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),Kt(t,"link",e),At(t),n.head.appendChild(t)))}}function oy(e){Pn.D(e),M0("dns-prefetch",e,null)}function dy(e,t){Pn.C(e,t),M0("preconnect",e,t)}function fy(e,t,a){Pn.L(e,t,a);var n=wr;if(n&&e&&t){var i='link[rel="preload"][as="'+Wt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+Wt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+Wt(a.imageSizes)+'"]')):i+='[href="'+Wt(e)+'"]';var c=i;switch(t){case"style":c=Er(e);break;case"script":c=Mr(e)}Pa.has(c)||(e=E({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Pa.set(c,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(ki(c))||t==="script"&&n.querySelector(zi(c))||(t=n.createElement("link"),Kt(t,"link",e),At(t),n.head.appendChild(t)))}}function hy(e,t){Pn.m(e,t);var a=wr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Wt(n)+'"][href="'+Wt(e)+'"]',c=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Mr(e)}if(!Pa.has(c)&&(e=E({rel:"modulepreload",href:e},t),Pa.set(c,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(zi(c)))return}n=a.createElement("link"),Kt(n,"link",e),At(n),a.head.appendChild(n)}}}function my(e,t,a){Pn.S(e,t,a);var n=wr;if(n&&e){var i=en(n).hoistableStyles,c=Er(e);t=t||"default";var v=i.get(c);if(!v){var N={loading:0,preload:null};if(v=n.querySelector(ki(c)))N.loading=5;else{e=E({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Pa.get(c))&&Id(e,a);var O=v=n.createElement("link");At(O),Kt(O,"link",e),O._p=new Promise(function(X,se){O.onload=X,O.onerror=se}),O.addEventListener("load",function(){N.loading|=1}),O.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Ec(v,t,n)}v={type:"stylesheet",instance:v,count:1,state:N},i.set(c,v)}}}function xy(e,t){Pn.X(e,t);var a=wr;if(a&&e){var n=en(a).hoistableScripts,i=Mr(e),c=n.get(i);c||(c=a.querySelector(zi(i)),c||(e=E({src:e,async:!0},t),(t=Pa.get(i))&&Kd(e,t),c=a.createElement("script"),At(c),Kt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function gy(e,t){Pn.M(e,t);var a=wr;if(a&&e){var n=en(a).hoistableScripts,i=Mr(e),c=n.get(i);c||(c=a.querySelector(zi(i)),c||(e=E({src:e,async:!0,type:"module"},t),(t=Pa.get(i))&&Kd(e,t),c=a.createElement("script"),At(c),Kt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function T0(e,t,a,n){var i=(i=xe.current)?wc(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Er(a.href),a=en(i).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Er(a.href);var c=en(i).hoistableStyles,v=c.get(e);if(v||(i=i.ownerDocument||i,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,v),(c=i.querySelector(ki(e)))&&!c._p&&(v.instance=c,v.state.loading=5),Pa.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},Pa.set(e,a),c||vy(i,e,a,v.state))),t&&n===null)throw Error(o(528,""));return v}if(t&&n!==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=Mr(a),a=en(i).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Er(e){return'href="'+Wt(e)+'"'}function ki(e){return'link[rel="stylesheet"]['+e+"]"}function C0(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function vy(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Kt(t,"link",a),At(t),e.head.appendChild(t))}function Mr(e){return'[src="'+Wt(e)+'"]'}function zi(e){return"script[async]"+e}function O0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Wt(a.href)+'"]');if(n)return t.instance=n,At(n),n;var i=E({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),At(n),Kt(n,"style",i),Ec(n,a.precedence,e),t.instance=n;case"stylesheet":i=Er(a.href);var c=e.querySelector(ki(i));if(c)return t.state.loading|=4,t.instance=c,At(c),c;n=C0(a),(i=Pa.get(i))&&Id(n,i),c=(e.ownerDocument||e).createElement("link"),At(c);var v=c;return v._p=new Promise(function(N,O){v.onload=N,v.onerror=O}),Kt(c,"link",n),t.state.loading|=4,Ec(c,a.precedence,e),t.instance=c;case"script":return c=Mr(a.src),(i=e.querySelector(zi(c)))?(t.instance=i,At(i),i):(n=a,(i=Pa.get(c))&&(n=E({},a),Kd(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),At(i),Kt(i,"link",n),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Ec(n,a.precedence,e));return t.instance}function Ec(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,c=i,v=0;v<n.length;v++){var N=n[v];if(N.dataset.precedence===t)c=N;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Id(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Kd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Mc=null;function D0(e,t,a){if(Mc===null){var n=new Map,i=Mc=new Map;i.set(a,n)}else i=Mc,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var c=a[i];if(!(c[Ql]||c[Mt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var v=c.getAttribute(t)||"";v=e+v;var N=n.get(v);N?N.push(c):n.set(v,[c])}}return n}function R0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function yy(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 A0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function py(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var i=Er(n.href),c=t.querySelector(ki(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Tc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,At(c);return}c=t.ownerDocument||t,n=C0(n),(i=Pa.get(i))&&Id(n,i),c=c.createElement("link"),At(c);var v=c;v._p=new Promise(function(N,O){v.onload=N,v.onerror=O}),Kt(c,"link",n),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Tc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var ef=0;function by(e,t){return e.stylesheets&&e.count===0&&Oc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Oc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&ef===0&&(ef=62500*ey());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Oc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>ef?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function Tc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Oc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Cc=null;function Oc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cc=new Map,t.forEach(Sy,e),Cc=null,Tc.call(e))}function Sy(e,t){if(!(t.state.loading&4)){var a=Cc.get(e);if(a)var n=a.get(null);else{a=new Map,Cc.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var v=i[c];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),n=v)}n&&a.set(null,n)}i=t.instance,v=i.getAttribute("data-precedence"),c=a.get(v)||n,c===n&&a.set(null,i),a.set(v,i),this.count++,n=Tc.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Ui={$$typeof:te,Provider:null,Consumer:null,_currentValue:ve,_currentValue2:ve,_threadCount:0};function Ny(e,t,a,n,i,c,v,N,O){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=Ls(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ls(0),this.hiddenUpdates=Ls(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function _0(e,t,a,n,i,c,v,N,O,X,se,ce){return e=new Ny(e,t,a,v,O,X,se,ce,N),t=1,c===!0&&(t|=24),c=Pt(3,null,null,t),e.current=c,c.stateNode=e,t=_o(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},Ho(c),e}function k0(e){return e?(e=Da,e):Da}function z0(e,t,a,n,i,c){i=k0(i),n.context===null?n.context=i:n.pendingContext=i,n=jl(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=wl(e,n,t),a!==null&&(Ea(a,e,t),mi(a,e,t))}function U0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function tf(e,t){U0(e,t),(e=e.alternate)&&U0(e,t)}function H0(e){if(e.tag===13||e.tag===31){var t=Ya(e,67108864);t!==null&&Ea(t,e,67108864),tf(e,67108864)}}function L0(e){if(e.tag===13||e.tag===31){var t=za();t=qs(t);var a=Ya(e,t);a!==null&&Ea(a,e,t),tf(e,t)}}var Dc=!0;function jy(e,t,a,n){var i=G.T;G.T=null;var c=ie.p;try{ie.p=2,af(e,t,a,n)}finally{ie.p=c,G.T=i}}function wy(e,t,a,n){var i=G.T;G.T=null;var c=ie.p;try{ie.p=8,af(e,t,a,n)}finally{ie.p=c,G.T=i}}function af(e,t,a,n){if(Dc){var i=nf(n);if(i===null)Yd(e,t,n,Rc,a),V0(e,n);else if(My(i,e,t,a,n))n.stopPropagation();else if(V0(e,n),t&4&&-1<Ey.indexOf(e)){for(;i!==null;){var c=Ae(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var v=gn(c.pendingLanes);if(v!==0){var N=c;for(N.pendingLanes|=2,N.entangledLanes|=2;v;){var O=1<<31-Zt(v);N.entanglements[1]|=O,v&=~O}En(c),(lt&6)===0&&(hc=Nt()+500,Di(0))}}break;case 31:case 13:N=Ya(c,2),N!==null&&Ea(N,c,2),xc(),tf(c,2)}if(c=nf(n),c===null&&Yd(e,t,n,Rc,a),c===i)break;i=c}i!==null&&n.stopPropagation()}else Yd(e,t,n,null,a)}}function nf(e){return e=Zs(e),lf(e)}var Rc=null;function lf(e){if(Rc=null,e=On(e),e!==null){var t=x(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=g(t),e!==null)return e;e=null}else if(a===31){if(e=j(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 Rc=e,null}function q0(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(ge()){case $e:return 2;case Bt:return 8;case xn:case Us:return 32;case Fl:return 268435456;default:return 32}default:return 32}}var sf=!1,zl=null,Ul=null,Hl=null,Hi=new Map,Li=new Map,Ll=[],Ey="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 V0(e,t){switch(e){case"focusin":case"focusout":zl=null;break;case"dragenter":case"dragleave":Ul=null;break;case"mouseover":case"mouseout":Hl=null;break;case"pointerover":case"pointerout":Hi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Li.delete(t.pointerId)}}function qi(e,t,a,n,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:c,targetContainers:[i]},t!==null&&(t=Ae(t),t!==null&&H0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function My(e,t,a,n,i){switch(t){case"focusin":return zl=qi(zl,e,t,a,n,i),!0;case"dragenter":return Ul=qi(Ul,e,t,a,n,i),!0;case"mouseover":return Hl=qi(Hl,e,t,a,n,i),!0;case"pointerover":var c=i.pointerId;return Hi.set(c,qi(Hi.get(c)||null,e,t,a,n,i)),!0;case"gotpointercapture":return c=i.pointerId,Li.set(c,qi(Li.get(c)||null,e,t,a,n,i)),!0}return!1}function B0(e){var t=On(e.target);if(t!==null){var a=x(t);if(a!==null){if(t=a.tag,t===13){if(t=g(a),t!==null){e.blockedOn=t,Br(e.priority,function(){L0(a)});return}}else if(t===31){if(t=j(a),t!==null){e.blockedOn=t,Br(e.priority,function(){L0(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 Ac(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=nf(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Zr=n,a.target.dispatchEvent(n),Zr=null}else return t=Ae(a),t!==null&&H0(t),e.blockedOn=a,!1;t.shift()}return!0}function Y0(e,t,a){Ac(e)&&a.delete(t)}function Ty(){sf=!1,zl!==null&&Ac(zl)&&(zl=null),Ul!==null&&Ac(Ul)&&(Ul=null),Hl!==null&&Ac(Hl)&&(Hl=null),Hi.forEach(Y0),Li.forEach(Y0)}function _c(e,t){e.blockedOn===t&&(e.blockedOn=null,sf||(sf=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Ty)))}var kc=null;function $0(e){kc!==e&&(kc=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){kc===e&&(kc=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(lf(n||a)===null)continue;break}var c=Ae(a);c!==null&&(e.splice(t,3),t-=3,nd(c,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function Tr(e){function t(O){return _c(O,e)}zl!==null&&_c(zl,e),Ul!==null&&_c(Ul,e),Hl!==null&&_c(Hl,e),Hi.forEach(t),Li.forEach(t);for(var a=0;a<Ll.length;a++){var n=Ll[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Ll.length&&(a=Ll[0],a.blockedOn===null);)B0(a),a.blockedOn===null&&Ll.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],c=a[n+1],v=i[Lt]||null;if(typeof c=="function")v||$0(a);else if(v){var N=null;if(c&&c.hasAttribute("formAction")){if(i=c,v=c[Lt]||null)N=v.formAction;else if(lf(i)!==null)continue}else N=v.action;typeof N=="function"?a[n+1]=N:(a.splice(n,3),n-=3),$0(a)}}}function F0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(v){return i=v})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function rf(e){this._internalRoot=e}zc.prototype.render=rf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=za();z0(a,n,e,t,null,null)},zc.prototype.unmount=rf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;z0(e.current,2,null,e,null,null),xc(),t[Cn]=null}};function zc(e){this._internalRoot=e}zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ll.length&&t!==0&&t<Ll[a].priority;a++);Ll.splice(a,0,e),a===0&&B0(e)}};var G0=u.version;if(G0!=="19.2.4")throw Error(o(527,G0,"19.2.4"));ie.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=p(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var Cy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uc.isDisabled&&Uc.supportsFiber)try{jt=Uc.inject(Cy),na=Uc}catch{}}return Bi.createRoot=function(e,t){if(!m(e))throw Error(o(299));var a=!1,n="",i=Ih,c=Kh,v=em;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=_0(e,1,!1,null,null,a,n,null,i,c,v,F0),e[Cn]=t.current,Bd(e),new rf(t)},Bi.hydrateRoot=function(e,t,a){if(!m(e))throw Error(o(299));var n=!1,i="",c=Ih,v=Kh,N=em,O=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError),a.formState!==void 0&&(O=a.formState)),t=_0(e,1,!0,t,a??null,n,i,O,c,v,N,F0),t.context=k0(null),a=t.current,n=za(),n=qs(n),i=jl(n),i.callback=null,wl(a,i,n),a=n,t.current.lanes=a,rl(t,a),En(t),e[Cn]=t.current,Bd(e),new zc(t)},Bi.version="19.2.4",Bi}var nx;function Vy(){if(nx)return df.exports;nx=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(u){console.error(u)}}return s(),df.exports=qy(),df.exports}var By=Vy();const Yy=kf(By);/**
|
|
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 lx="popstate";function $y(s={}){function u(m,x){let{pathname:g="/",search:j="",hash:b=""}=ks(m.location.hash.substring(1));return!g.startsWith("/")&&!g.startsWith(".")&&(g="/"+g),Mf("",{pathname:g,search:j,hash:b},x.state&&x.state.usr||null,x.state&&x.state.key||"default")}function d(m,x){let g=m.document.querySelector("base"),j="";if(g&&g.getAttribute("href")){let b=m.location.href,p=b.indexOf("#");j=p===-1?b:b.slice(0,p)}return j+"#"+(typeof x=="string"?x:nu(x))}function o(m,x){Ja(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(x)})`)}return Gy(u,d,o,s)}function pt(s,u){if(s===!1||s===null||typeof s>"u")throw new Error(u)}function Ja(s,u){if(!s){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Fy(){return Math.random().toString(36).substring(2,10)}function sx(s,u){return{usr:s.state,key:s.key,idx:u}}function Mf(s,u,d=null,o){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof u=="string"?ks(u):u,state:d,key:u&&u.key||o||Fy()}}function nu({pathname:s="/",search:u="",hash:d=""}){return u&&u!=="?"&&(s+=u.charAt(0)==="?"?u:"?"+u),d&&d!=="#"&&(s+=d.charAt(0)==="#"?d:"#"+d),s}function ks(s){let u={};if(s){let d=s.indexOf("#");d>=0&&(u.hash=s.substring(d),s=s.substring(0,d));let o=s.indexOf("?");o>=0&&(u.search=s.substring(o),s=s.substring(0,o)),s&&(u.pathname=s)}return u}function Gy(s,u,d,o={}){let{window:m=document.defaultView,v5Compat:x=!1}=o,g=m.history,j="POP",b=null,p=w();p==null&&(p=0,g.replaceState({...g.state,idx:p},""));function w(){return(g.state||{idx:null}).idx}function E(){j="POP";let H=w(),P=H==null?null:H-p;p=H,b&&b({action:j,location:T.location,delta:P})}function D(H,P){j="PUSH";let Q=Mf(T.location,H,P);d&&d(Q,H),p=w()+1;let te=sx(Q,p),ee=T.createHref(Q);try{g.pushState(te,"",ee)}catch(Y){if(Y instanceof DOMException&&Y.name==="DataCloneError")throw Y;m.location.assign(ee)}x&&b&&b({action:j,location:T.location,delta:1})}function R(H,P){j="REPLACE";let Q=Mf(T.location,H,P);d&&d(Q,H),p=w();let te=sx(Q,p),ee=T.createHref(Q);g.replaceState(te,"",ee),x&&b&&b({action:j,location:T.location,delta:0})}function M(H){return Zy(H)}let T={get action(){return j},get location(){return s(m,g)},listen(H){if(b)throw new Error("A history only accepts one active listener");return m.addEventListener(lx,E),b=H,()=>{m.removeEventListener(lx,E),b=null}},createHref(H){return u(m,H)},createURL:M,encodeLocation(H){let P=M(H);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:D,replace:R,go(H){return g.go(H)}};return T}function Zy(s,u=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),pt(d,"No window.location.(origin|href) available to create URL");let o=typeof s=="string"?s:nu(s);return o=o.replace(/ $/,"%20"),!u&&o.startsWith("//")&&(o=d+o),new URL(o,d)}function Xx(s,u,d="/"){return Qy(s,u,d,!1)}function Qy(s,u,d,o){let m=typeof u=="string"?ks(u):u,x=tl(m.pathname||"/",d);if(x==null)return null;let g=Px(s);Wy(g);let j=null;for(let b=0;j==null&&b<g.length;++b){let p=sp(x);j=np(g[b],p,o)}return j}function Px(s,u=[],d=[],o="",m=!1){let x=(g,j,b=m,p)=>{let w={relativePath:p===void 0?g.path||"":p,caseSensitive:g.caseSensitive===!0,childrenIndex:j,route:g};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(o)&&b)return;pt(w.relativePath.startsWith(o),`Absolute route path "${w.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(o.length)}let E=el([o,w.relativePath]),D=d.concat(w);g.children&&g.children.length>0&&(pt(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),Px(g.children,u,D,E,b)),!(g.path==null&&!g.index)&&u.push({path:E,score:tp(E,g.index),routesMeta:D})};return s.forEach((g,j)=>{var b;if(g.path===""||!((b=g.path)!=null&&b.includes("?")))x(g,j);else for(let p of Jx(g.path))x(g,j,!0,p)}),u}function Jx(s){let u=s.split("/");if(u.length===0)return[];let[d,...o]=u,m=d.endsWith("?"),x=d.replace(/\?$/,"");if(o.length===0)return m?[x,""]:[x];let g=Jx(o.join("/")),j=[];return j.push(...g.map(b=>b===""?x:[x,b].join("/"))),m&&j.push(...g),j.map(b=>s.startsWith("/")&&b===""?"/":b)}function Wy(s){s.sort((u,d)=>u.score!==d.score?d.score-u.score:ap(u.routesMeta.map(o=>o.childrenIndex),d.routesMeta.map(o=>o.childrenIndex)))}var Xy=/^:[\w-]+$/,Py=3,Jy=2,Iy=1,Ky=10,ep=-2,rx=s=>s==="*";function tp(s,u){let d=s.split("/"),o=d.length;return d.some(rx)&&(o+=ep),u&&(o+=Jy),d.filter(m=>!rx(m)).reduce((m,x)=>m+(Xy.test(x)?Py:x===""?Iy:Ky),o)}function ap(s,u){return s.length===u.length&&s.slice(0,-1).every((o,m)=>o===u[m])?s[s.length-1]-u[u.length-1]:0}function np(s,u,d=!1){let{routesMeta:o}=s,m={},x="/",g=[];for(let j=0;j<o.length;++j){let b=o[j],p=j===o.length-1,w=x==="/"?u:u.slice(x.length)||"/",E=Qc({path:b.relativePath,caseSensitive:b.caseSensitive,end:p},w),D=b.route;if(!E&&p&&d&&!o[o.length-1].route.index&&(E=Qc({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},w)),!E)return null;Object.assign(m,E.params),g.push({params:m,pathname:el([x,E.pathname]),pathnameBase:cp(el([x,E.pathnameBase])),route:D}),E.pathnameBase!=="/"&&(x=el([x,E.pathnameBase]))}return g}function Qc(s,u){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[d,o]=lp(s.path,s.caseSensitive,s.end),m=u.match(d);if(!m)return null;let x=m[0],g=x.replace(/(.)\/+$/,"$1"),j=m.slice(1);return{params:o.reduce((p,{paramName:w,isOptional:E},D)=>{if(w==="*"){let M=j[D]||"";g=x.slice(0,x.length-M.length).replace(/(.)\/+$/,"$1")}const R=j[D];return E&&!R?p[w]=void 0:p[w]=(R||"").replace(/%2F/g,"/"),p},{}),pathname:x,pathnameBase:g,pattern:s}}function lp(s,u=!1,d=!0){Ja(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let o=[],m="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,j,b)=>(o.push({paramName:j,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(o.push({paramName:"*"}),m+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?m+="\\/*$":s!==""&&s!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,u?void 0:"i"),o]}function sp(s){try{return s.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Ja(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),s}}function tl(s,u){if(u==="/")return s;if(!s.toLowerCase().startsWith(u.toLowerCase()))return null;let d=u.endsWith("/")?u.length-1:u.length,o=s.charAt(d);return o&&o!=="/"?null:s.slice(d)||"/"}var rp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ip(s,u="/"){let{pathname:d,search:o="",hash:m=""}=typeof s=="string"?ks(s):s,x;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?x=ix(d.substring(1),"/"):x=ix(d,u)):x=u,{pathname:x,search:op(o),hash:dp(m)}}function ix(s,u){let d=u.replace(/\/+$/,"").split("/");return s.split("/").forEach(m=>{m===".."?d.length>1&&d.pop():m!=="."&&d.push(m)}),d.length>1?d.join("/"):"/"}function xf(s,u,d,o){return`Cannot include a '${s}' character in a manually specified \`to.${u}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function up(s){return s.filter((u,d)=>d===0||u.route.path&&u.route.path.length>0)}function Uf(s){let u=up(s);return u.map((d,o)=>o===u.length-1?d.pathname:d.pathnameBase)}function Hf(s,u,d,o=!1){let m;typeof s=="string"?m=ks(s):(m={...s},pt(!m.pathname||!m.pathname.includes("?"),xf("?","pathname","search",m)),pt(!m.pathname||!m.pathname.includes("#"),xf("#","pathname","hash",m)),pt(!m.search||!m.search.includes("#"),xf("#","search","hash",m)));let x=s===""||m.pathname==="",g=x?"/":m.pathname,j;if(g==null)j=d;else{let E=u.length-1;if(!o&&g.startsWith("..")){let D=g.split("/");for(;D[0]==="..";)D.shift(),E-=1;m.pathname=D.join("/")}j=E>=0?u[E]:"/"}let b=ip(m,j),p=g&&g!=="/"&&g.endsWith("/"),w=(x||g===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(p||w)&&(b.pathname+="/"),b}var el=s=>s.join("/").replace(/\/\/+/g,"/"),cp=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),op=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,dp=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,fp=class{constructor(s,u,d,o=!1){this.status=s,this.statusText=u||"",this.internal=o,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function hp(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function mp(s){return s.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ix=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Kx(s,u){let d=s;if(typeof d!="string"||!rp.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let o=d,m=!1;if(Ix)try{let x=new URL(window.location.href),g=d.startsWith("//")?new URL(x.protocol+d):new URL(d),j=tl(g.pathname,u);g.origin===x.origin&&j!=null?d=j+g.search+g.hash:m=!0}catch{Ja(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:m,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var eg=["POST","PUT","PATCH","DELETE"];new Set(eg);var xp=["GET",...eg];new Set(xp);var kr=V.createContext(null);kr.displayName="DataRouter";var Ic=V.createContext(null);Ic.displayName="DataRouterState";var gp=V.createContext(!1),tg=V.createContext({isTransitioning:!1});tg.displayName="ViewTransition";var vp=V.createContext(new Map);vp.displayName="Fetchers";var yp=V.createContext(null);yp.displayName="Await";var La=V.createContext(null);La.displayName="Navigation";var ru=V.createContext(null);ru.displayName="Location";var Mn=V.createContext({outlet:null,matches:[],isDataRoute:!1});Mn.displayName="Route";var Lf=V.createContext(null);Lf.displayName="RouteError";var ag="REACT_ROUTER_ERROR",pp="REDIRECT",bp="ROUTE_ERROR_RESPONSE";function Sp(s){if(s.startsWith(`${ag}:${pp}:{`))try{let u=JSON.parse(s.slice(28));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.location=="string"&&typeof u.reloadDocument=="boolean"&&typeof u.replace=="boolean")return u}catch{}}function Np(s){if(s.startsWith(`${ag}:${bp}:{`))try{let u=JSON.parse(s.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new fp(u.status,u.statusText,u.data)}catch{}}function jp(s,{relative:u}={}){pt(zr(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:o}=V.useContext(La),{hash:m,pathname:x,search:g}=iu(s,{relative:u}),j=x;return d!=="/"&&(j=x==="/"?d:el([d,x])),o.createHref({pathname:j,search:g,hash:m})}function zr(){return V.useContext(ru)!=null}function nl(){return pt(zr(),"useLocation() may be used only in the context of a <Router> component."),V.useContext(ru).location}var ng="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function lg(s){V.useContext(La).static||V.useLayoutEffect(s)}function Kc(){let{isDataRoute:s}=V.useContext(Mn);return s?Up():wp()}function wp(){pt(zr(),"useNavigate() may be used only in the context of a <Router> component.");let s=V.useContext(kr),{basename:u,navigator:d}=V.useContext(La),{matches:o}=V.useContext(Mn),{pathname:m}=nl(),x=JSON.stringify(Uf(o)),g=V.useRef(!1);return lg(()=>{g.current=!0}),V.useCallback((b,p={})=>{if(Ja(g.current,ng),!g.current)return;if(typeof b=="number"){d.go(b);return}let w=Hf(b,JSON.parse(x),m,p.relative==="path");s==null&&u!=="/"&&(w.pathname=w.pathname==="/"?u:el([u,w.pathname])),(p.replace?d.replace:d.push)(w,p.state,p)},[u,d,x,m,s])}V.createContext(null);function iu(s,{relative:u}={}){let{matches:d}=V.useContext(Mn),{pathname:o}=nl(),m=JSON.stringify(Uf(d));return V.useMemo(()=>Hf(s,JSON.parse(m),o,u==="path"),[s,m,o,u])}function Ep(s,u){return sg(s,u)}function sg(s,u,d,o,m){var Q;pt(zr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=V.useContext(La),{matches:g}=V.useContext(Mn),j=g[g.length-1],b=j?j.params:{},p=j?j.pathname:"/",w=j?j.pathnameBase:"/",E=j&&j.route;{let te=E&&E.path||"";ig(p,!E||te.endsWith("*")||te.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${te}">) 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="${te}"> to <Route path="${te==="/"?"*":`${te}/*`}">.`)}let D=nl(),R;if(u){let te=typeof u=="string"?ks(u):u;pt(w==="/"||((Q=te.pathname)==null?void 0:Q.startsWith(w)),`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 "${w}" but pathname "${te.pathname}" was given in the \`location\` prop.`),R=te}else R=D;let M=R.pathname||"/",T=M;if(w!=="/"){let te=w.replace(/^\//,"").split("/");T="/"+M.replace(/^\//,"").split("/").slice(te.length).join("/")}let H=Xx(s,{pathname:T});Ja(E||H!=null,`No routes matched location "${R.pathname}${R.search}${R.hash}" `),Ja(H==null||H[H.length-1].route.element!==void 0||H[H.length-1].route.Component!==void 0||H[H.length-1].route.lazy!==void 0,`Matched leaf route at location "${R.pathname}${R.search}${R.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 P=Dp(H&&H.map(te=>Object.assign({},te,{params:Object.assign({},b,te.params),pathname:el([w,x.encodeLocation?x.encodeLocation(te.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:te.pathname]),pathnameBase:te.pathnameBase==="/"?w:el([w,x.encodeLocation?x.encodeLocation(te.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:te.pathnameBase])})),g,d,o,m);return u&&P?V.createElement(ru.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...R},navigationType:"POP"}},P):P}function Mp(){let s=zp(),u=hp(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),d=s instanceof Error?s.stack:null,o="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:o},x={padding:"2px 4px",backgroundColor:o},g=null;return console.error("Error handled by React Router default ErrorBoundary:",s),g=V.createElement(V.Fragment,null,V.createElement("p",null,"💿 Hey developer 👋"),V.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",V.createElement("code",{style:x},"ErrorBoundary")," or"," ",V.createElement("code",{style:x},"errorElement")," prop on your route.")),V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},u),d?V.createElement("pre",{style:m},d):null,g)}var Tp=V.createElement(Mp,null),rg=class extends V.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,u){return u.location!==s.location||u.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:u.error,location:u.location,revalidation:s.revalidation||u.revalidation}}componentDidCatch(s,u){this.props.onError?this.props.onError(s,u):console.error("React Router caught the following error during render",s)}render(){let s=this.state.error;if(this.context&&typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){const d=Np(s.digest);d&&(s=d)}let u=s!==void 0?V.createElement(Mn.Provider,{value:this.props.routeContext},V.createElement(Lf.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?V.createElement(Cp,{error:s},u):u}};rg.contextType=gp;var gf=new WeakMap;function Cp({children:s,error:u}){let{basename:d}=V.useContext(La);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let o=Sp(u.digest);if(o){let m=gf.get(u);if(m)throw m;let x=Kx(o.location,d);if(Ix&&!gf.get(u))if(x.isExternal||o.reloadDocument)window.location.href=x.absoluteURL||x.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(x.to,{replace:o.replace}));throw gf.set(u,g),g}return V.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return s}function Op({routeContext:s,match:u,children:d}){let o=V.useContext(kr);return o&&o.static&&o.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=u.route.id),V.createElement(Mn.Provider,{value:s},d)}function Dp(s,u=[],d=null,o=null,m=null){if(s==null){if(!d)return null;if(d.errors)s=d.matches;else if(u.length===0&&!d.initialized&&d.matches.length>0)s=d.matches;else return null}let x=s,g=d==null?void 0:d.errors;if(g!=null){let w=x.findIndex(E=>E.route.id&&(g==null?void 0:g[E.route.id])!==void 0);pt(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(g).join(",")}`),x=x.slice(0,Math.min(x.length,w+1))}let j=!1,b=-1;if(d)for(let w=0;w<x.length;w++){let E=x[w];if((E.route.HydrateFallback||E.route.hydrateFallbackElement)&&(b=w),E.route.id){let{loaderData:D,errors:R}=d,M=E.route.loader&&!D.hasOwnProperty(E.route.id)&&(!R||R[E.route.id]===void 0);if(E.route.lazy||M){j=!0,b>=0?x=x.slice(0,b+1):x=[x[0]];break}}}let p=d&&o?(w,E)=>{var D,R;o(w,{location:d.location,params:((R=(D=d.matches)==null?void 0:D[0])==null?void 0:R.params)??{},unstable_pattern:mp(d.matches),errorInfo:E})}:void 0;return x.reduceRight((w,E,D)=>{let R,M=!1,T=null,H=null;d&&(R=g&&E.route.id?g[E.route.id]:void 0,T=E.route.errorElement||Tp,j&&(b<0&&D===0?(ig("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),M=!0,H=null):b===D&&(M=!0,H=E.route.hydrateFallbackElement||null)));let P=u.concat(x.slice(0,D+1)),Q=()=>{let te;return R?te=T:M?te=H:E.route.Component?te=V.createElement(E.route.Component,null):E.route.element?te=E.route.element:te=w,V.createElement(Op,{match:E,routeContext:{outlet:w,matches:P,isDataRoute:d!=null},children:te})};return d&&(E.route.ErrorBoundary||E.route.errorElement||D===0)?V.createElement(rg,{location:d.location,revalidation:d.revalidation,component:T,error:R,children:Q(),routeContext:{outlet:null,matches:P,isDataRoute:!0},onError:p}):Q()},null)}function qf(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rp(s){let u=V.useContext(kr);return pt(u,qf(s)),u}function Ap(s){let u=V.useContext(Ic);return pt(u,qf(s)),u}function _p(s){let u=V.useContext(Mn);return pt(u,qf(s)),u}function Vf(s){let u=_p(s),d=u.matches[u.matches.length-1];return pt(d.route.id,`${s} can only be used on routes that contain a unique "id"`),d.route.id}function kp(){return Vf("useRouteId")}function zp(){var o;let s=V.useContext(Lf),u=Ap("useRouteError"),d=Vf("useRouteError");return s!==void 0?s:(o=u.errors)==null?void 0:o[d]}function Up(){let{router:s}=Rp("useNavigate"),u=Vf("useNavigate"),d=V.useRef(!1);return lg(()=>{d.current=!0}),V.useCallback(async(m,x={})=>{Ja(d.current,ng),d.current&&(typeof m=="number"?await s.navigate(m):await s.navigate(m,{fromRouteId:u,...x}))},[s,u])}var ux={};function ig(s,u,d){!u&&!ux[s]&&(ux[s]=!0,Ja(!1,d))}V.memo(Hp);function Hp({routes:s,future:u,state:d,onError:o}){return sg(s,void 0,d,o,u)}function Lp({to:s,replace:u,state:d,relative:o}){pt(zr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=V.useContext(La);Ja(!m,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:x}=V.useContext(Mn),{pathname:g}=nl(),j=Kc(),b=Hf(s,Uf(x),g,o==="path"),p=JSON.stringify(b);return V.useEffect(()=>{j(JSON.parse(p),{replace:u,state:d,relative:o})},[j,p,o,u,d]),null}function In(s){pt(!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 qp({basename:s="/",children:u=null,location:d,navigationType:o="POP",navigator:m,static:x=!1,unstable_useTransitions:g}){pt(!zr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let j=s.replace(/^\/*/,"/"),b=V.useMemo(()=>({basename:j,navigator:m,static:x,unstable_useTransitions:g,future:{}}),[j,m,x,g]);typeof d=="string"&&(d=ks(d));let{pathname:p="/",search:w="",hash:E="",state:D=null,key:R="default"}=d,M=V.useMemo(()=>{let T=tl(p,j);return T==null?null:{location:{pathname:T,search:w,hash:E,state:D,key:R},navigationType:o}},[j,p,w,E,D,R,o]);return Ja(M!=null,`<Router basename="${j}"> is not able to match the URL "${p}${w}${E}" because it does not start with the basename, so the <Router> won't render anything.`),M==null?null:V.createElement(La.Provider,{value:b},V.createElement(ru.Provider,{children:u,value:M}))}function Vp({children:s,location:u}){return Ep(Tf(s),u)}function Tf(s,u=[]){let d=[];return V.Children.forEach(s,(o,m)=>{if(!V.isValidElement(o))return;let x=[...u,m];if(o.type===V.Fragment){d.push.apply(d,Tf(o.props.children,x));return}pt(o.type===In,`[${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>`),pt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let g={id:o.props.id||x.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&&(g.children=Tf(o.props.children,x)),d.push(g)}),d}var Fc="get",Gc="application/x-www-form-urlencoded";function eo(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function Bp(s){return eo(s)&&s.tagName.toLowerCase()==="button"}function Yp(s){return eo(s)&&s.tagName.toLowerCase()==="form"}function $p(s){return eo(s)&&s.tagName.toLowerCase()==="input"}function Fp(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function Gp(s,u){return s.button===0&&(!u||u==="_self")&&!Fp(s)}var Hc=null;function Zp(){if(Hc===null)try{new FormData(document.createElement("form"),0),Hc=!1}catch{Hc=!0}return Hc}var Qp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vf(s){return s!=null&&!Qp.has(s)?(Ja(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gc}"`),null):s}function Wp(s,u){let d,o,m,x,g;if(Yp(s)){let j=s.getAttribute("action");o=j?tl(j,u):null,d=s.getAttribute("method")||Fc,m=vf(s.getAttribute("enctype"))||Gc,x=new FormData(s)}else if(Bp(s)||$p(s)&&(s.type==="submit"||s.type==="image")){let j=s.form;if(j==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=s.getAttribute("formaction")||j.getAttribute("action");if(o=b?tl(b,u):null,d=s.getAttribute("formmethod")||j.getAttribute("method")||Fc,m=vf(s.getAttribute("formenctype"))||vf(j.getAttribute("enctype"))||Gc,x=new FormData(j,s),!Zp()){let{name:p,type:w,value:E}=s;if(w==="image"){let D=p?`${p}.`:"";x.append(`${D}x`,"0"),x.append(`${D}y`,"0")}else p&&x.append(p,E)}}else{if(eo(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Fc,o=null,m=Gc,g=s}return x&&m==="text/plain"&&(g=x,x=void 0),{action:o,method:d.toLowerCase(),encType:m,formData:x,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Bf(s,u){if(s===!1||s===null||typeof s>"u")throw new Error(u)}function Xp(s,u,d,o){let m=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return d?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${o}`:m.pathname=`${m.pathname}.${o}`:m.pathname==="/"?m.pathname=`_root.${o}`:u&&tl(m.pathname,u)==="/"?m.pathname=`${u.replace(/\/$/,"")}/_root.${o}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${o}`,m}async function Pp(s,u){if(s.id in u)return u[s.id];try{let d=await import(s.module);return u[s.id]=d,d}catch(d){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Jp(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function Ip(s,u,d){let o=await Promise.all(s.map(async m=>{let x=u.routes[m.route.id];if(x){let g=await Pp(x,d);return g.links?g.links():[]}return[]}));return ab(o.flat(1).filter(Jp).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function cx(s,u,d,o,m,x){let g=(b,p)=>d[p]?b.route.id!==d[p].route.id:!0,j=(b,p)=>{var w;return d[p].pathname!==b.pathname||((w=d[p].route.path)==null?void 0:w.endsWith("*"))&&d[p].params["*"]!==b.params["*"]};return x==="assets"?u.filter((b,p)=>g(b,p)||j(b,p)):x==="data"?u.filter((b,p)=>{var E;let w=o.routes[b.route.id];if(!w||!w.hasLoader)return!1;if(g(b,p)||j(b,p))return!0;if(b.route.shouldRevalidate){let D=b.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((E=d[0])==null?void 0:E.params)||{},nextUrl:new URL(s,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof D=="boolean")return D}return!0}):[]}function Kp(s,u,{includeHydrateFallback:d}={}){return eb(s.map(o=>{let m=u.routes[o.route.id];if(!m)return[];let x=[m.module];return m.clientActionModule&&(x=x.concat(m.clientActionModule)),m.clientLoaderModule&&(x=x.concat(m.clientLoaderModule)),d&&m.hydrateFallbackModule&&(x=x.concat(m.hydrateFallbackModule)),m.imports&&(x=x.concat(m.imports)),x}).flat(1))}function eb(s){return[...new Set(s)]}function tb(s){let u={},d=Object.keys(s).sort();for(let o of d)u[o]=s[o];return u}function ab(s,u){let d=new Set;return new Set(u),s.reduce((o,m)=>{let x=JSON.stringify(tb(m));return d.has(x)||(d.add(x),o.push({key:x,link:m})),o},[])}function ug(){let s=V.useContext(kr);return Bf(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function nb(){let s=V.useContext(Ic);return Bf(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var Yf=V.createContext(void 0);Yf.displayName="FrameworkContext";function cg(){let s=V.useContext(Yf);return Bf(s,"You must render this element inside a <HydratedRouter> element"),s}function lb(s,u){let d=V.useContext(Yf),[o,m]=V.useState(!1),[x,g]=V.useState(!1),{onFocus:j,onBlur:b,onMouseEnter:p,onMouseLeave:w,onTouchStart:E}=u,D=V.useRef(null);V.useEffect(()=>{if(s==="render"&&g(!0),s==="viewport"){let T=P=>{P.forEach(Q=>{g(Q.isIntersecting)})},H=new IntersectionObserver(T,{threshold:.5});return D.current&&H.observe(D.current),()=>{H.disconnect()}}},[s]),V.useEffect(()=>{if(o){let T=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(T)}}},[o]);let R=()=>{m(!0)},M=()=>{m(!1),g(!1)};return d?s!=="intent"?[x,D,{}]:[x,D,{onFocus:Yi(j,R),onBlur:Yi(b,M),onMouseEnter:Yi(p,R),onMouseLeave:Yi(w,M),onTouchStart:Yi(E,R)}]:[!1,D,{}]}function Yi(s,u){return d=>{s&&s(d),d.defaultPrevented||u(d)}}function sb({page:s,...u}){let{router:d}=ug(),o=V.useMemo(()=>Xx(d.routes,s,d.basename),[d.routes,s,d.basename]);return o?V.createElement(ib,{page:s,matches:o,...u}):null}function rb(s){let{manifest:u,routeModules:d}=cg(),[o,m]=V.useState([]);return V.useEffect(()=>{let x=!1;return Ip(s,u,d).then(g=>{x||m(g)}),()=>{x=!0}},[s,u,d]),o}function ib({page:s,matches:u,...d}){let o=nl(),{future:m,manifest:x,routeModules:g}=cg(),{basename:j}=ug(),{loaderData:b,matches:p}=nb(),w=V.useMemo(()=>cx(s,u,p,x,o,"data"),[s,u,p,x,o]),E=V.useMemo(()=>cx(s,u,p,x,o,"assets"),[s,u,p,x,o]),D=V.useMemo(()=>{if(s===o.pathname+o.search+o.hash)return[];let T=new Set,H=!1;if(u.forEach(Q=>{var ee;let te=x.routes[Q.route.id];!te||!te.hasLoader||(!w.some(Y=>Y.route.id===Q.route.id)&&Q.route.id in b&&((ee=g[Q.route.id])!=null&&ee.shouldRevalidate)||te.hasClientLoader?H=!0:T.add(Q.route.id))}),T.size===0)return[];let P=Xp(s,j,m.unstable_trailingSlashAwareDataRequests,"data");return H&&T.size>0&&P.searchParams.set("_routes",u.filter(Q=>T.has(Q.route.id)).map(Q=>Q.route.id).join(",")),[P.pathname+P.search]},[j,m.unstable_trailingSlashAwareDataRequests,b,o,x,w,u,s,g]),R=V.useMemo(()=>Kp(E,x),[E,x]),M=rb(E);return V.createElement(V.Fragment,null,D.map(T=>V.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...d})),R.map(T=>V.createElement("link",{key:T,rel:"modulepreload",href:T,...d})),M.map(({key:T,link:H})=>V.createElement("link",{key:T,nonce:d.nonce,...H,crossOrigin:H.crossOrigin??d.crossOrigin})))}function ub(...s){return u=>{s.forEach(d=>{typeof d=="function"?d(u):d!=null&&(d.current=u)})}}var cb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{cb&&(window.__reactRouterVersion="7.13.0")}catch{}function ob({basename:s,children:u,unstable_useTransitions:d,window:o}){let m=V.useRef();m.current==null&&(m.current=$y({window:o,v5Compat:!0}));let x=m.current,[g,j]=V.useState({action:x.action,location:x.location}),b=V.useCallback(p=>{d===!1?j(p):V.startTransition(()=>j(p))},[d]);return V.useLayoutEffect(()=>x.listen(b),[x,b]),V.createElement(qp,{basename:s,children:u,location:g.location,navigationType:g.action,navigator:x,unstable_useTransitions:d})}var og=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dg=V.forwardRef(function({onClick:u,discover:d="render",prefetch:o="none",relative:m,reloadDocument:x,replace:g,state:j,target:b,to:p,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:D,...R},M){let{basename:T,unstable_useTransitions:H}=V.useContext(La),P=typeof p=="string"&&og.test(p),Q=Kx(p,T);p=Q.to;let te=jp(p,{relative:m}),[ee,Y,re]=lb(o,R),Z=hb(p,{replace:g,state:j,target:b,preventScrollReset:w,relative:m,viewTransition:E,unstable_defaultShouldRevalidate:D,unstable_useTransitions:H});function B(z){u&&u(z),z.defaultPrevented||Z(z)}let F=V.createElement("a",{...R,...re,href:Q.absoluteURL||te,onClick:Q.isExternal||x?u:B,ref:ub(M,Y),target:b,"data-discover":!P&&d==="render"?"true":void 0});return ee&&!P?V.createElement(V.Fragment,null,F,V.createElement(sb,{page:te})):F});dg.displayName="Link";var fg=V.forwardRef(function({"aria-current":u="page",caseSensitive:d=!1,className:o="",end:m=!1,style:x,to:g,viewTransition:j,children:b,...p},w){let E=iu(g,{relative:p.relative}),D=nl(),R=V.useContext(Ic),{navigator:M,basename:T}=V.useContext(La),H=R!=null&&yb(E)&&j===!0,P=M.encodeLocation?M.encodeLocation(E).pathname:E.pathname,Q=D.pathname,te=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;d||(Q=Q.toLowerCase(),te=te?te.toLowerCase():null,P=P.toLowerCase()),te&&T&&(te=tl(te,T)||te);const ee=P!=="/"&&P.endsWith("/")?P.length-1:P.length;let Y=Q===P||!m&&Q.startsWith(P)&&Q.charAt(ee)==="/",re=te!=null&&(te===P||!m&&te.startsWith(P)&&te.charAt(P.length)==="/"),Z={isActive:Y,isPending:re,isTransitioning:H},B=Y?u:void 0,F;typeof o=="function"?F=o(Z):F=[o,Y?"active":null,re?"pending":null,H?"transitioning":null].filter(Boolean).join(" ");let z=typeof x=="function"?x(Z):x;return V.createElement(dg,{...p,"aria-current":B,className:F,ref:w,style:z,to:g,viewTransition:j},typeof b=="function"?b(Z):b)});fg.displayName="NavLink";var db=V.forwardRef(({discover:s="render",fetcherKey:u,navigate:d,reloadDocument:o,replace:m,state:x,method:g=Fc,action:j,onSubmit:b,relative:p,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:D,...R},M)=>{let{unstable_useTransitions:T}=V.useContext(La),H=gb(),P=vb(j,{relative:p}),Q=g.toLowerCase()==="get"?"get":"post",te=typeof j=="string"&&og.test(j),ee=Y=>{if(b&&b(Y),Y.defaultPrevented)return;Y.preventDefault();let re=Y.nativeEvent.submitter,Z=(re==null?void 0:re.getAttribute("formmethod"))||g,B=()=>H(re||Y.currentTarget,{fetcherKey:u,method:Z,navigate:d,replace:m,state:x,relative:p,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:D});T&&d!==!1?V.startTransition(()=>B()):B()};return V.createElement("form",{ref:M,method:Q,action:P,onSubmit:o?b:ee,...R,"data-discover":!te&&s==="render"?"true":void 0})});db.displayName="Form";function fb(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hg(s){let u=V.useContext(kr);return pt(u,fb(s)),u}function hb(s,{target:u,replace:d,state:o,preventScrollReset:m,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:j,unstable_useTransitions:b}={}){let p=Kc(),w=nl(),E=iu(s,{relative:x});return V.useCallback(D=>{if(Gp(D,u)){D.preventDefault();let R=d!==void 0?d:nu(w)===nu(E),M=()=>p(s,{replace:R,state:o,preventScrollReset:m,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:j});b?V.startTransition(()=>M()):M()}},[w,p,E,d,o,u,s,m,x,g,j,b])}var mb=0,xb=()=>`__${String(++mb)}__`;function gb(){let{router:s}=hg("useSubmit"),{basename:u}=V.useContext(La),d=kp(),o=s.fetch,m=s.navigate;return V.useCallback(async(x,g={})=>{let{action:j,method:b,encType:p,formData:w,body:E}=Wp(x,u);if(g.navigate===!1){let D=g.fetcherKey||xb();await o(D,d,g.action||j,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:w,body:E,formMethod:g.method||b,formEncType:g.encType||p,flushSync:g.flushSync})}else await m(g.action||j,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:w,body:E,formMethod:g.method||b,formEncType:g.encType||p,replace:g.replace,state:g.state,fromRouteId:d,flushSync:g.flushSync,viewTransition:g.viewTransition})},[o,m,u,d])}function vb(s,{relative:u}={}){let{basename:d}=V.useContext(La),o=V.useContext(Mn);pt(o,"useFormAction must be used inside a RouteContext");let[m]=o.matches.slice(-1),x={...iu(s||".",{relative:u})},g=nl();if(s==null){x.search=g.search;let j=new URLSearchParams(x.search),b=j.getAll("index");if(b.some(w=>w==="")){j.delete("index"),b.filter(E=>E).forEach(E=>j.append("index",E));let w=j.toString();x.search=w?`?${w}`:""}}return(!s||s===".")&&m.route.index&&(x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(x.pathname=x.pathname==="/"?d:el([d,x.pathname])),nu(x)}function yb(s,{relative:u}={}){let d=V.useContext(tg);pt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=hg("useViewTransitionState"),m=iu(s,{relative:u});if(!d.isTransitioning)return!1;let x=tl(d.currentLocation.pathname,o)||d.currentLocation.pathname,g=tl(d.nextLocation.pathname,o)||d.nextLocation.pathname;return Qc(m.pathname,g)!=null||Qc(m.pathname,x)!=null}var pb=Wx();const bb=kf(pb);/**
|
|
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 mg=(...s)=>s.filter((u,d,o)=>!!u&&u.trim()!==""&&o.indexOf(u)===d).join(" ").trim();/**
|
|
66
|
+
* @license lucide-react v0.564.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const Sb=s=>s.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 Nb=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(u,d,o)=>o?o.toUpperCase():d.toLowerCase());/**
|
|
76
|
+
* @license lucide-react v0.564.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const ox=s=>{const u=Nb(s);return u.charAt(0).toUpperCase()+u.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 jb={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 wb=s=>{for(const u in s)if(u.startsWith("aria-")||u==="role"||u==="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 Eb=V.forwardRef(({color:s="currentColor",size:u=24,strokeWidth:d=2,absoluteStrokeWidth:o,className:m="",children:x,iconNode:g,...j},b)=>V.createElement("svg",{ref:b,...jb,width:u,height:u,stroke:s,strokeWidth:o?Number(d)*24/Number(u):d,className:mg("lucide",m),...!x&&!wb(j)&&{"aria-hidden":"true"},...j},[...g.map(([p,w])=>V.createElement(p,w)),...Array.isArray(x)?x:[x]]));/**
|
|
96
|
+
* @license lucide-react v0.564.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const ze=(s,u)=>{const d=V.forwardRef(({className:o,...m},x)=>V.createElement(Eb,{ref:x,iconNode:u,className:mg(`lucide-${Sb(ox(s))}`,`lucide-${s}`,o),...m}));return d.displayName=ox(s),d};/**
|
|
101
|
+
* @license lucide-react v0.564.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const Mb=[["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"}]],$f=ze("activity",Mb);/**
|
|
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 Tb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Cb=ze("arrow-down",Tb);/**
|
|
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 Ob=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],dx=ze("arrow-right",Ob);/**
|
|
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 Db=[["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"}]],Rb=ze("arrow-up-down",Db);/**
|
|
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 Ab=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],_b=ze("arrow-up",Ab);/**
|
|
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 kb=[["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"}]],zb=ze("bell",kb);/**
|
|
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 Ub=[["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"}]],fx=ze("briefcase",Ub);/**
|
|
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 Hb=[["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"}]],Wc=ze("calendar",Hb);/**
|
|
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 Lb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Zc=ze("check",Lb);/**
|
|
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 qb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],xg=ze("chevron-down",qb);/**
|
|
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 Vb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Bb=ze("chevron-left",Vb);/**
|
|
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 Yb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$b=ze("chevron-right",Yb);/**
|
|
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 Fb=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Gb=ze("chevron-up",Fb);/**
|
|
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 Zb=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Qb=ze("chevrons-up-down",Zb);/**
|
|
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 Wb=[["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"}]],al=ze("circle-alert",Wb);/**
|
|
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 Xb=[["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"}]],hx=ze("circle-arrow-down",Xb);/**
|
|
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 Pb=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],uu=ze("circle-check-big",Pb);/**
|
|
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 Jb=[["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"}]],Cf=ze("circle-x",Jb);/**
|
|
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 Ib=[["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"}]],gg=ze("clipboard-list",Ib);/**
|
|
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 Kb=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Xc=ze("clock",Kb);/**
|
|
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 e1=[["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"}]],vg=ze("external-link",e1);/**
|
|
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 t1=[["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"}]],a1=ze("eye-off",t1);/**
|
|
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 n1=[["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"}]],l1=ze("eye",n1);/**
|
|
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 s1=[["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"}]],r1=ze("file-text",s1);/**
|
|
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 i1=[["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"}]],u1=ze("git-pull-request",i1);/**
|
|
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 c1=[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]],o1=ze("hourglass",c1);/**
|
|
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 d1=[["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"}]],f1=ze("house",d1);/**
|
|
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 h1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],m1=ze("info",h1);/**
|
|
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 x1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],g1=ze("kanban",x1);/**
|
|
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 v1=[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]],y1=ze("list-ordered",v1);/**
|
|
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 p1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],yg=ze("loader-circle",p1);/**
|
|
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 b1=[["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"}]],pg=ze("map",b1);/**
|
|
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 S1=[["path",{d:"M5 12h14",key:"1ays0h"}]],N1=ze("minus",S1);/**
|
|
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 j1=[["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"}]],bg=ze("pause",j1);/**
|
|
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 w1=[["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"}]],Ff=ze("pen",w1);/**
|
|
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 E1=[["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"}]],Kn=ze("play",E1);/**
|
|
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 M1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ur=ze("plus",M1);/**
|
|
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 T1=[["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"}]],Sg=ze("rotate-ccw",T1);/**
|
|
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 C1=[["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"}]],O1=ze("save",C1);/**
|
|
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 D1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],cu=ze("search",D1);/**
|
|
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 R1=[["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"}]],Ng=ze("settings",R1);/**
|
|
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 A1=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],_1=ze("square-pen",A1);/**
|
|
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 k1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],z1=ze("terminal",k1);/**
|
|
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 U1=[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]],jg=ze("test-tube-diagonal",U1);/**
|
|
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 H1=[["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"}]],Gf=ze("trash-2",H1);/**
|
|
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 L1=[["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"}]],wg=ze("triangle-alert",L1);/**
|
|
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 q1=[["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"}]],V1=ze("wifi",q1);/**
|
|
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 B1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hr=ze("x",B1);/**
|
|
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 Y1=[["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"}]],$1=ze("zap",Y1),Zf="";let Qf=!1,Pc=null;function F1(s){Qf=s}function G1(s){Pc=s}function Z1(){return Qf}function Eg(s){return encodeURIComponent(s.replace(/\//g,"~"))}function bt(s){return Qf&&Pc?s.replace("/api/",`/api/projects/${Eg(Pc)}/`):s}function Q1(){return ht("/api/mode")}function Mg(){return ht("/api/projects")}async function ht(s,u){const d=`${Zf}${s}`,o=await fetch(d,{headers:{"Content-Type":"application/json",...u==null?void 0:u.headers},...u});if(!o.ok){const m=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${o.status}: ${o.statusText}`)}return o.json()}function tu(){return ht(bt("/api/status"))}function Tg(){return ht(bt("/api/prs"))}function W1(s,u){const d=`?lines=${encodeURIComponent(u)}`;return ht(bt(`/api/logs/${encodeURIComponent(s)}${d}`))}function Wf(){return ht(bt("/api/config"))}async function Cg(){if(Z1()){const u=(await Mg()).filter(o=>o.valid);return(await Promise.all(u.map(async o=>{try{const m=await ht(`/api/projects/${Eg(o.name)}/config`);return{projectId:o.name,config:m}}catch(m){return console.error(`Failed to fetch config for project ${o.name}`,m),null}}))).filter(o=>o!==null)}else{const s=await Wf();return[{projectId:Pc||"current",config:s}]}}function Ds(s){return ht(bt("/api/config"),{method:"PUT",body:JSON.stringify(s)})}function X1(){return ht(bt("/api/doctor"))}function Og(){return ht(bt("/api/schedule-info"))}function P1(){return ht(bt("/api/actions/run"),{method:"POST"})}function Dg(){return ht(bt("/api/actions/review"),{method:"POST"})}function J1(){return ht(bt("/api/actions/qa"),{method:"POST"})}function I1(){return ht(bt("/api/actions/audit"),{method:"POST"})}function K1(){return ht(bt("/api/actions/planner"),{method:"POST"})}function au(){return ht(bt("/api/actions/install-cron"),{method:"POST"})}function e2(){return ht(bt("/api/actions/uninstall-cron"),{method:"POST"})}function t2(s="all"){return ht(bt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:s})})}const $l=["Draft","Ready","In Progress","Review","Done"];function Rg(){return ht(bt("/api/board/status"))}function a2(s){return ht(bt("/api/board/issues"),{method:"POST",body:JSON.stringify(s)})}function Ag(s,u){return ht(bt(`/api/board/issues/${s}/move`),{method:"PATCH",body:JSON.stringify({column:u})})}async function n2(s){const u=`${Zf}${bt(`/api/board/issues/${s}`)}`,d=await fetch(u,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const o=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error||`HTTP ${d.status}: ${d.statusText}`)}}function l2(){return ht(bt("/api/actions/clear-lock"),{method:"POST"})}function s2(s,u=[],d){const o=(d==null?void 0:d.enabled)??!0,m=V.useRef(s);m.current=s,V.useEffect(()=>{if(!o)return;const x=`${Zf}${bt("/api/status/events")}`,g=new EventSource(x);return g.addEventListener("status_changed",j=>{try{const b=JSON.parse(j.data);m.current(b)}catch{}}),()=>{g.close()}},[o,...u])}function mx(){return ht("/api/queue/status")}function r2(s){const u=`?window=${encodeURIComponent(s)}`;return ht(`/api/queue/analytics${u}`)}function i2(s){return ht("/api/queue/clear",{method:"POST",body:JSON.stringify({force:s})})}function u2(){return ht(bt("/api/roadmap"))}function c2(){return ht(bt("/api/roadmap/scan"),{method:"POST"})}function _g(s){return ht(bt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:s})})}function Ia(s,u=[],d){const o=(d==null?void 0:d.enabled)??!0,[m,x]=V.useState(null),[g,j]=V.useState(!0),[b,p]=V.useState(null),w=V.useRef(s);w.current=s;const E=V.useRef(()=>{(async()=>{p(null);try{const R=await w.current();x(R)}catch(R){p(R instanceof Error?R:new Error("Unknown error"))}})()});return E.current=E.current.bind(E),V.useEffect(()=>{if(!o)return;let D=!1;return j(!0),p(null),(async()=>{try{const M=await w.current();D||x(M)}catch(M){D||p(M instanceof Error?M:new Error("Unknown error"))}finally{D||j(!1)}})(),()=>{D=!0}},[...u,o]),{data:m,loading:g,error:b,refetch:E.current}}const xx=s=>{let u;const d=new Set,o=(p,w)=>{const E=typeof p=="function"?p(u):p;if(!Object.is(E,u)){const D=u;u=w??(typeof E!="object"||E===null)?E:Object.assign({},u,E),d.forEach(R=>R(u,D))}},m=()=>u,j={setState:o,getState:m,getInitialState:()=>b,subscribe:p=>(d.add(p),()=>d.delete(p))},b=u=s(o,m,j);return j},o2=s=>s?xx(s):xx,d2=s=>s;function f2(s,u=d2){const d=Be.useSyncExternalStore(s.subscribe,()=>u(s.getState()),()=>u(s.getInitialState()));return Be.useDebugValue(d),d}const gx=s=>{const u=o2(s),d=o=>f2(u,o);return Object.assign(d,u),d},h2=s=>s?gx(s):gx,m2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,ha=h2(s=>({projectName:"Night Watch",setProjectName:u=>s({projectName:u}),toasts:[],addToast:u=>{const d=Math.random().toString(36).substring(7);s(o=>({toasts:[...o.toasts,{...u,id:d}]})),setTimeout(()=>{s(o=>({toasts:o.toasts.filter(m=>m.id!==d)}))},5e3)},removeToast:u=>s(d=>({toasts:d.toasts.filter(o=>o.id!==u)})),globalModeLoading:!0,setGlobalModeLoading:u=>s({globalModeLoading:u}),isGlobalMode:!1,setGlobalMode:u=>{F1(u),s({isGlobalMode:u})},projects:[],setProjects:u=>s({projects:u}),selectedProjectId:m2,selectProject:u=>{G1(u),u?localStorage.setItem("nw-selected-project",u):localStorage.removeItem("nw-selected-project"),s(d=>{const o=d.projects.find(m=>m.name===u);return{selectedProjectId:u,...o?{projectName:o.name}:{}}})},status:null,setStatus:u=>s({status:u})})),x2=()=>{const[s,u]=V.useState(!1),{projectName:d,isGlobalMode:o,projects:m,selectedProjectId:x,selectProject:g,globalModeLoading:j}=ha(),{data:b}=Ia(Tg,[x],{enabled:!j}),p=(b==null?void 0:b.length)??0,w=V.useMemo(()=>[{icon:f1,label:"Dashboard",path:"/"},{icon:g1,label:"Board",path:"/board"},{icon:u1,label:"Pull Requests",path:"/prs",badge:p},{icon:pg,label:"Roadmap",path:"/roadmap"},{icon:Wc,label:"Scheduling",path:"/scheduling"},{icon:z1,label:"Logs",path:"/logs"},{icon:Ng,label:"Settings",path:"/settings"}],[p]);return l.jsxs("aside",{className:`
|
|
346
|
+
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
347
|
+
${s?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
348
|
+
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
349
|
+
`,children:[l.jsx("div",{className:`p-6 border-b border-white/5 ${s?"items-center justify-center flex":""}`,children:s?l.jsx("div",{className:"relative group",children:l.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"})}):l.jsxs("div",{className:"relative w-full",children:[l.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:o?"Projects":"Workspace"}),o?l.jsxs("div",{className:"relative",children:[l.jsx(fx,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),l.jsx("select",{value:x||"",onChange:E=>g(E.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:m.filter(E=>E.valid).map(E=>l.jsx("option",{value:E.name,children:E.name},E.name))}),l.jsx(Qb,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):l.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:[l.jsx(fx,{className:"h-4 w-4 text-indigo-400 mr-3"}),l.jsx("span",{className:"truncate",children:d})]})]})}),l.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:l.jsx("ul",{className:"space-y-1.5 px-4",children:w.map(E=>l.jsx(Be.Fragment,{children:l.jsx("li",{children:l.jsx(fg,{to:E.path,className:({isActive:D})=>`
|
|
350
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
351
|
+
${D?"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"}
|
|
352
|
+
${s?"justify-center":""}
|
|
353
|
+
`,children:({isActive:D})=>l.jsxs(l.Fragment,{children:[l.jsx(E.icon,{className:`h-5 w-5 transition-colors ${D?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${s?"":"mr-3.5"}`}),!s&&l.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:E.label}),E.badge&&(s?l.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):l.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${D?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:E.badge})),D&&!s&&l.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)]"}),s&&l.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:E.label})]})})})},E.path))})}),l.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:l.jsx("button",{onClick:()=>u(!s),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s?l.jsx($b,{className:"h-5 w-5"}):l.jsx(Bb,{className:"h-5 w-5"})})})]})},g2=()=>{const{projectName:s}=ha();return l.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:[l.jsxs("div",{className:"flex items-center space-x-6",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),l.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:s})]}),l.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),l.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:[l.jsx(V1,{className:"h-3.5 w-3.5"}),l.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),l.jsxs("div",{className:"flex items-center space-x-5",children:[l.jsxs("div",{className:"relative hidden md:block group",children:[l.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]"}),l.jsx(cu,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[l.jsx(zb,{className:"h-5 w-5"}),l.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]}),l.jsx("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full transition-all",children:l.jsx(Ng,{className:"h-5 w-5"})})]}),l.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"})]})]})},v2=({toast:s,onDismiss:u})=>{const d={success:l.jsx(uu,{className:"h-5 w-5 text-green-400"}),error:l.jsx(al,{className:"h-5 w-5 text-red-400"}),info:l.jsx(m1,{className:"h-5 w-5 text-blue-400"}),warning:l.jsx(wg,{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 l.jsx("div",{className:`
|
|
354
|
+
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
355
|
+
bg-slate-900 border border-slate-800 border-l-4 ${o[s.type]}
|
|
356
|
+
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
357
|
+
animate-in slide-in-from-right-full fade-in duration-300
|
|
358
|
+
`,children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-start",children:[l.jsx("div",{className:"flex-shrink-0",children:d[s.type]}),l.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[l.jsx("p",{className:"text-sm font-medium text-slate-200",children:s.title}),s.message&&l.jsx("p",{className:"mt-1 text-sm text-slate-400",children:s.message})]}),l.jsx("div",{className:"ml-4 flex flex-shrink-0",children:l.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:()=>u(s.id),children:[l.jsx("span",{className:"sr-only",children:"Close"}),l.jsx(Hr,{className:"h-5 w-5"})]})})]})})})},y2=()=>{const{toasts:s,removeToast:u}=ha();return l.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:s.map(d=>l.jsx(v2,{toast:d,onDismiss:u},d.id))})};function p2(){const{setGlobalMode:s,setGlobalModeLoading:u,setProjects:d,selectProject:o,selectedProjectId:m}=ha();V.useEffect(()=>{u(!0),Q1().then(async({globalMode:x})=>{if(s(x),!x)return;const g=await Mg();d(g);const j=g.filter(b=>b.valid);m&&j.some(b=>b.name===m)?o(m):j.length>0&&o(j[0].name)}).catch(()=>{s(!1)}).finally(()=>{u(!1)})},[])}function vx(s){if(!(s!=null&&s.timestamp))return Number.NEGATIVE_INFINITY;const u=new Date(s.timestamp).getTime();return Number.isNaN(u)?Number.NEGATIVE_INFINITY:u}function Lc(s,u){return s?u?vx(s)>=vx(u)?s:u:s:u}function b2(){const{setStatus:s,selectedProjectId:u,globalModeLoading:d}=ha(),o=V.useRef(null);o.current=ha.getState().status,s2(m=>{Lc(m,o.current)===m&&s(m)},[u,d],{enabled:!d}),V.useEffect(()=>{if(d)return;tu().then(x=>{Lc(x,o.current)===x&&s(x)}).catch(()=>{});const m=setInterval(()=>{tu().then(x=>{Lc(x,o.current)===x&&s(x)}).catch(()=>{})},3e4);return()=>clearInterval(m)},[u,d,s]),V.useEffect(()=>{const m=()=>{tu().then(x=>{Lc(x,o.current)===x&&s(x)}).catch(()=>{})};return window.addEventListener("focus",m),()=>window.removeEventListener("focus",m)},[u,s])}const Ye=({children:s,className:u="",onClick:d})=>l.jsxs("div",{className:`
|
|
359
|
+
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
360
|
+
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
361
|
+
transition-all duration-300
|
|
362
|
+
${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
363
|
+
${u}
|
|
364
|
+
`,onClick:d,children:[d&&l.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),l.jsx("div",{className:"relative z-10",children:s})]}),qe=({children:s,variant:u="primary",size:d="md",loading:o=!1,className:m="",disabled:x,...g})=>{const j="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",b={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},p={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return l.jsxs("button",{className:`${j} ${b[u]} ${p[d]} ${m}`,disabled:x||o,...g,children:[o&&l.jsx(yg,{className:"mr-2 h-4 w-4 animate-spin"}),s]})},Ar=({children:s,variant:u="default",className:d=""})=>{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 l.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${o[u]} ${d}`,children:s})},kg={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"}},S2=({defaultColumn:s,onClose:u,onCreated:d})=>{const[o,m]=V.useState(""),[x,g]=V.useState(""),[j,b]=V.useState(s),[p,w]=V.useState(!1),[E,D]=V.useState(null),{addToast:R}=ha(),M=async T=>{if(T.preventDefault(),!!o.trim()){w(!0),D(null);try{await a2({title:o.trim(),body:x,column:j}),R({title:"Issue created",message:`"${o.trim()}" added to ${j}`,type:"success"}),d(),u()}catch(H){D(H instanceof Error?H.message:"Failed to create issue")}finally{w(!1)}}};return l.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[l.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:u}),l.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[l.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[l.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),l.jsx("button",{onClick:u,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l.jsx(Hr,{className:"h-5 w-5"})})]}),l.jsxs("form",{onSubmit:M,className:"p-6 space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),l.jsx("input",{type:"text",value:o,onChange:T=>m(T.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"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),l.jsx("select",{value:j,onChange:T=>b(T.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:$l.map(T=>l.jsx("option",{value:T,children:T},T))})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),l.jsx("textarea",{value:x,onChange:T=>g(T.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"})]}),E&&l.jsx("p",{className:"text-sm text-red-400",children:E}),l.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[l.jsx(qe,{variant:"ghost",type:"button",onClick:u,children:"Cancel"}),l.jsx(qe,{type:"submit",disabled:p||!o.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},N2=({issue:s,onClose:u,onMoved:d,onClosed:o})=>{const[m,x]=V.useState(!1),[g,j]=V.useState(!1),{addToast:b}=ha(),p=async D=>{if(D!==s.column){x(!0);try{await Ag(s.number,D),b({title:"Issue moved",message:`#${s.number} moved to ${D}`,type:"success"}),d(),u()}catch(R){b({title:"Move failed",message:R instanceof Error?R.message:"Failed to move issue",type:"error"})}finally{x(!1)}}},w=async()=>{if(confirm(`Close issue #${s.number}: "${s.title}"?`)){j(!0);try{await n2(s.number),b({title:"Issue closed",message:`#${s.number} closed on GitHub`,type:"success"}),o(),u()}catch(D){b({title:"Close failed",message:D instanceof Error?D.message:"Failed to close issue",type:"error"})}finally{j(!1)}}},E=s.column??"Draft";return l.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[l.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:u}),l.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[l.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[l.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[l.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[l.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",s.number]}),l.jsx(Ar,{variant:kg[E].badge,children:E})]}),l.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:s.title}),s.assignees.length>0&&l.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",s.assignees.join(", ")]})]}),l.jsx("button",{onClick:u,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:l.jsx(Hr,{className:"h-5 w-5"})})]}),l.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:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),$l.filter(D=>D!==s.column).map(D=>l.jsx("button",{onClick:()=>p(D),disabled:m,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:D},D))]}),l.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[s.url&&!s.url.startsWith("local://")&&l.jsxs("a",{href:s.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:[l.jsx(vg,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:"GitHub"})]}),l.jsx("button",{onClick:w,disabled:g,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:g?"Closing...":"Close Issue"})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:s.body?l.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:s.body}):l.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},j2=({issue:s,onClick:u,onDragStart:d})=>{const[o,m]=V.useState(!1);return l.jsx("div",{className:"relative",draggable:!0,onDragStart:x=>{x.dataTransfer.setData("issueNumber",String(s.number)),x.dataTransfer.effectAllowed="move",m(!0),d(s)},onDragEnd:()=>m(!1),children:l.jsxs(Ye,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${o?"opacity-30":""}`,onClick:u,children:[l.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",s.number]}),l.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:s.title}),s.assignees.length>0&&l.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:s.assignees.join(", ")})]})})},w2=({name:s,issues:u,draggingIssue:d,onIssueClick:o,onNewIssue:m,onMoveIssue:x,onDragStart:g})=>{const j=kg[s],[b,p]=V.useState(!1),w=d!==null&&d.column!==s;return l.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${b&&w?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:E=>{w&&(E.preventDefault(),E.dataTransfer.dropEffect="move",p(!0))},onDragLeave:()=>p(!1),onDrop:E=>{E.preventDefault(),p(!1),d&&d.column!==s&&x(d,s)},children:[l.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${j.dot}`}),l.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:s}),l.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:u.length})]}),l.jsx("button",{onClick:()=>m(s),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${s}`,children:l.jsx(Ur,{className:"h-3.5 w-3.5"})})]}),l.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:u.length===0?l.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${b&&w?"border-indigo-500/40":"border-slate-800"}`,children:l.jsx("span",{className:"text-xs text-slate-700",children:b&&w?"Drop here":"No issues"})}):u.map(E=>l.jsx(j2,{issue:E,onClick:()=>o(E),onDragStart:g},E.id))})]})},E2=()=>{const[s,u]=V.useState(null),[d,o]=V.useState(null),[m,x]=V.useState(null),[g,j]=V.useState(null),b=V.useRef(!1),{addToast:p,selectedProjectId:w,globalModeLoading:E}=ha(),{data:D,loading:R,error:M,refetch:T}=Ia(Rg,[w],{enabled:!E});V.useEffect(()=>{const Q=setInterval(()=>{b.current||T()},3e4);return()=>clearInterval(Q)},[T]);const H=V.useCallback(async(Q,te)=>{x(null);const ee=g??(D==null?void 0:D.columns);if(!ee)return;const Y=ee,re={};for(const B of $l)re[B]=(ee[B]??[]).filter(F=>F.number!==Q.number);const Z={...Q,column:te};re[te]=[...re[te]??[],Z],j(re),u(B=>(B==null?void 0:B.number)===Q.number?Z:B),b.current=!0;try{await Ag(Q.number,te),T(),setTimeout(()=>{j(null),b.current=!1},800)}catch(B){j(Y),u(F=>(F==null?void 0:F.number)===Q.number?Q:F),b.current=!1,p({title:"Move failed",message:B instanceof Error?B.message:"Failed to move issue",type:"error"})}},[p,T,g,D]);if(E||R)return l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(M&&M.message.includes("Board not configured"))return l.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[l.jsx("div",{className:"text-4xl",children:"📋"}),l.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),l.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",l.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(M)return l.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[l.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),l.jsx("div",{className:"text-sm text-slate-500",children:M.message}),l.jsx(qe,{onClick:()=>T(),children:"Retry"})]});if(!D)return null;const P=g??D.columns;return l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),l.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[$l.reduce((Q,te)=>{var ee;return Q+(((ee=P[te])==null?void 0:ee.length)??0)},0)," issues across ",$l.length," columns"]})]}),l.jsxs(qe,{onClick:()=>o("Ready"),children:[l.jsx(Ur,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),l.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>x(null),children:l.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${$l.length*236}px`},children:$l.map(Q=>l.jsx(w2,{name:Q,issues:P[Q]??[],draggingIssue:m,onIssueClick:u,onNewIssue:o,onMoveIssue:H,onDragStart:x},Q))})}),s&&l.jsx(N2,{issue:s,onClose:()=>u(null),onMoved:()=>T(),onClosed:()=>T()}),d&&l.jsx(S2,{defaultColumn:d,onClose:()=>o(null),onCreated:()=>T()})]})},M2={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"},T2=()=>{var Se,pe,G,ie,ve,we,oe,A,ne,he,ye;const s=Kc(),[u,d]=V.useState(null),[o,m]=V.useState(!1),[x,g]=V.useState(null),{setProjectName:j,addToast:b,selectedProjectId:p,globalModeLoading:w,status:E,setStatus:D}=ha(),R=()=>tu().then(D).catch(()=>{}),{data:M}=Ia(Og,[p],{enabled:!w}),{data:T}=Ia(()=>Rg().catch(()=>null),[p],{enabled:!w}),H=E;if(Be.useEffect(()=>{H!=null&&H.projectName&&j(H.projectName)},[H,j]),w)return l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!H)return l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx("div",{className:"text-slate-400",children:"Loading..."})});const P=H.prs.length,Q=H.prs.filter(me=>me.reviewScore!==null&&me.reviewScore<70).length,te=((Se=T==null?void 0:T.columns.Ready)==null?void 0:Se.length)??0,ee=((pe=T==null?void 0:T.columns["In Progress"])==null?void 0:pe.length)??0,Y=H.processes.find(me=>me.name==="executor"),re=H.processes.find(me=>me.name==="reviewer"),Z=H.processes.find(me=>me.name==="qa"),B=H.processes.find(me=>me.name==="audit"),F=H.processes.find(me=>me.name==="planner"),z=async me=>{d(me);try{const xe=await t2(me),Me=xe.results.every(Ge=>Ge.success);b({title:Me?"Process Cancelled":"Cancel Failed",message:xe.results.map(Ge=>Ge.message).join("; "),type:Me?"success":"error"})}catch(xe){b({title:"Cancel Failed",message:xe instanceof Error?xe.message:"Failed to cancel process",type:"error"})}finally{d(null),R()}},ae=async()=>{m(!0);try{await l2(),b({title:"Lock Cleared",message:"Stale executor state removed",type:"success"}),R()}catch(me){b({title:"Clear Failed",message:me instanceof Error?me.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},le=async(me,xe)=>{g(me);try{await xe(),b({title:`${me} Started`,message:`${me} is now running`,type:"success"}),R()}catch(Me){b({title:"Start Failed",message:Me instanceof Error?Me.message:`Failed to start ${me}`,type:"error"})}finally{g(null)}},de=me=>{if(!me)return"Not scheduled";try{const xe=new Date(me),Me=new Date,Ge=xe.getTime()-Me.getTime(),Le=Math.floor(Ge/6e4);return Le<0?"Running now...":Le<60?`In ${Le} min`:Le<1440?`In ${Math.floor(Le/60)} hr${Le>=120?"s":""}`:`In ${Math.floor(Le/1440)} day${Le>=2880?"s":""}`}catch{return"Unknown"}};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[l.jsxs(Ye,{className:"p-5",onClick:()=>s("/board"),children:[l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),l.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:te})]}),l.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:l.jsx(uu,{className:"h-5 w-5"})})]}),l.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),l.jsxs(Ye,{className:"p-5",onClick:()=>s("/board"),children:[l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),l.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:ee})]}),l.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:l.jsx($f,{className:"h-5 w-5"})})]}),l.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),l.jsxs(Ye,{className:"p-5",onClick:()=>s("/prs"),children:[l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),l.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:P})]}),l.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:l.jsx(Xc,{className:"h-5 w-5"})})]}),l.jsx("p",{className:`text-xs mt-4 ${Q>0?"text-red-400 font-medium":"text-slate-500"}`,children:Q>0?`${Q} need work`:"All passing"})]}),l.jsxs(Ye,{className:"p-5",children:[l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Cron Status"}),l.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:H.crontab.installed?"Active":"Inactive"})]}),l.jsx("div",{className:`p-2 rounded-lg ${H.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:l.jsx(Wc,{className:"h-5 w-5"})})]}),l.jsx("p",{className:"text-xs text-slate-500 mt-4",children:H.crontab.installed?`${H.crontab.entries.length} entr${H.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),l.jsxs(Ye,{className:"p-6",children:[l.jsx("h2",{className:"text-base font-semibold text-slate-200 mb-4",children:"System Status"}),l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Project"}),l.jsx("p",{className:"text-sm text-slate-200",children:H.projectName})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Provider"}),l.jsx("p",{className:"text-sm text-slate-200 capitalize",children:H.config.provider})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Last Updated"}),l.jsx("p",{className:"text-sm text-slate-200",children:new Date(H.timestamp).toLocaleString()})]})]})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsxs(Ye,{className:"p-6",children:[l.jsx("h3",{className:"text-base font-semibold text-slate-200 mb-4",children:"Process Status"}),l.jsx("div",{className:"space-y-2",children:[{label:"Executor",process:Y,subtitle:Y!=null&&Y.running?`PID: ${Y.pid} • ${H.activePrd??"Running"}`:"Idle",actions:l.jsxs(l.Fragment,{children:[(Y==null?void 0:Y.running)&&l.jsxs(qe,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300 border border-red-500/30 hover:border-red-400/50",onClick:()=>z("run"),disabled:u==="run",children:[l.jsx(Cf,{className:"h-4 w-4 mr-1"}),u==="run"?"Stopping...":"Stop"]}),!(Y!=null&&Y.running)&&H.activePrd&&l.jsx(qe,{size:"sm",variant:"ghost",className:"text-amber-400 hover:text-amber-300",onClick:ae,disabled:o,children:o?"Clearing...":"Force Clear"}),!(Y!=null&&Y.running)&&!H.activePrd&&l.jsxs(qe,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>le("Executor",P1),disabled:x==="Executor",children:[l.jsx(Kn,{className:"h-4 w-4 mr-1"}),x==="Executor"?"Starting...":"Run"]}),l.jsx(qe,{size:"sm",variant:"ghost",onClick:()=>s("/logs"),children:"Log"})]})},{label:"Reviewer",process:re,subtitle:re!=null&&re.running?`PID: ${re.pid} • Running`:"Idle",actions:l.jsxs(l.Fragment,{children:[re!=null&&re.running?l.jsxs(qe,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300 border border-red-500/30 hover:border-red-400/50",onClick:()=>z("review"),disabled:u==="review",children:[l.jsx(Cf,{className:"h-4 w-4 mr-1"}),u==="review"?"Stopping...":"Stop"]}):l.jsxs(qe,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>le("Reviewer",Dg),disabled:x==="Reviewer",children:[l.jsx(Kn,{className:"h-4 w-4 mr-1"}),x==="Reviewer"?"Starting...":"Run"]}),l.jsx(qe,{size:"sm",variant:"ghost",onClick:()=>s("/logs"),disabled:!(re!=null&&re.running),children:"Log"})]})},{label:"QA",process:Z,subtitle:Z!=null&&Z.running?`PID: ${Z.pid} • Running`:"Idle",actions:l.jsxs(l.Fragment,{children:[!(Z!=null&&Z.running)&&l.jsxs(qe,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>le("QA",J1),disabled:x==="QA",children:[l.jsx(Kn,{className:"h-4 w-4 mr-1"}),x==="QA"?"Starting...":"Run"]}),l.jsx(qe,{size:"sm",variant:"ghost",onClick:()=>s("/logs"),children:"Log"})]})},{label:"Auditor",process:B,subtitle:B!=null&&B.running?`PID: ${B.pid} • Running`:"Idle",actions:l.jsxs(l.Fragment,{children:[!(B!=null&&B.running)&&l.jsxs(qe,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>le("Auditor",I1),disabled:x==="Auditor",children:[l.jsx(Kn,{className:"h-4 w-4 mr-1"}),x==="Auditor"?"Starting...":"Run"]}),l.jsx(qe,{size:"sm",variant:"ghost",onClick:()=>s("/logs"),children:"Log"})]})},{label:"Planner",process:F,subtitle:F!=null&&F.running?`PID: ${F.pid} • Writing PRDs`:"Idle",actions:l.jsxs(l.Fragment,{children:[!(F!=null&&F.running)&&l.jsxs(qe,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>le("Planner",K1),disabled:x==="Planner",children:[l.jsx(Kn,{className:"h-4 w-4 mr-1"}),x==="Planner"?"Starting...":"Run"]}),l.jsx(qe,{size:"sm",variant:"ghost",onClick:()=>s("/logs"),children:"Log"})]})}].sort((me,xe)=>{var Me,Ge;return((Me=xe.process)!=null&&Me.running?1:0)-((Ge=me.process)!=null&&Ge.running?1:0)}).map(({label:me,process:xe,subtitle:Me,actions:Ge})=>l.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border transition-all ${xe!=null&&xe.running?"bg-green-500/5 border-green-500/40 shadow-[0_0_12px_rgba(34,197,94,0.08)]":"bg-slate-950/50 border-slate-800 opacity-60 hover:opacity-100"}`,children:[l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${xe!=null&&xe.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:`font-medium ${xe!=null&&xe.running?"text-slate-200":"text-slate-400"}`,children:me}),(xe==null?void 0:xe.running)&&l.jsx("span",{className:"text-[10px] font-semibold tracking-wider uppercase px-1.5 py-0.5 rounded bg-green-500/15 text-green-400 border border-green-500/30",children:"Live"})]}),l.jsx("div",{className:"text-xs text-slate-500",children:Me})]})]}),l.jsx("div",{className:"flex items-center space-x-2",children:Ge})]},me))})]}),l.jsxs(Ye,{className:"p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsx("h3",{className:"text-base font-semibold text-slate-200",children:"Scheduling"}),l.jsxs("button",{onClick:()=>s("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",l.jsx(dx,{className:"ml-1 h-3 w-3"})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("div",{className:`p-1.5 rounded-md ${M!=null&&M.executor.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-800 text-slate-500"}`,children:l.jsx(Wc,{className:"h-4 w-4"})}),l.jsxs("div",{children:[l.jsx("div",{className:`text-sm font-medium ${M!=null&&M.executor.installed?"text-slate-200":"text-slate-500"}`,children:"Executor"}),l.jsx("div",{className:"text-xs text-slate-500",children:M!=null&&M.paused?"Paused":de(M==null?void 0:M.executor.nextRun)})]})]})}),l.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("div",{className:`p-1.5 rounded-md ${M!=null&&M.reviewer.installed?"bg-purple-500/10 text-purple-400":"bg-slate-800 text-slate-500"}`,children:l.jsx(Xc,{className:"h-4 w-4"})}),l.jsxs("div",{children:[l.jsx("div",{className:`text-sm font-medium ${M!=null&&M.reviewer.installed?"text-slate-200":"text-slate-500"}`,children:"Reviewer"}),l.jsx("div",{className:"text-xs text-slate-500",children:M!=null&&M.paused?"Paused":de(M==null?void 0:M.reviewer.nextRun)})]})]})}),l.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("div",{className:`p-1.5 rounded-md ${(G=M==null?void 0:M.qa)!=null&&G.installed?"bg-green-500/10 text-green-400":"bg-slate-800 text-slate-500"}`,children:l.jsx(jg,{className:"h-4 w-4"})}),l.jsxs("div",{children:[l.jsx("div",{className:`text-sm font-medium ${(ie=M==null?void 0:M.qa)!=null&&ie.installed?"text-slate-200":"text-slate-500"}`,children:"QA"}),l.jsx("div",{className:"text-xs text-slate-500",children:M!=null&&M.paused?"Paused":de((ve=M==null?void 0:M.qa)==null?void 0:ve.nextRun)})]})]})}),l.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("div",{className:`p-1.5 rounded-md ${(we=M==null?void 0:M.audit)!=null&&we.installed?"bg-amber-500/10 text-amber-400":"bg-slate-800 text-slate-500"}`,children:l.jsx(cu,{className:"h-4 w-4"})}),l.jsxs("div",{children:[l.jsx("div",{className:`text-sm font-medium ${(oe=M==null?void 0:M.audit)!=null&&oe.installed?"text-slate-200":"text-slate-500"}`,children:"Auditor"}),l.jsx("div",{className:"text-xs text-slate-500",children:M!=null&&M.paused?"Paused":de((A=M==null?void 0:M.audit)==null?void 0:A.nextRun)})]})]})}),l.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("div",{className:`p-1.5 rounded-md ${(ne=M==null?void 0:M.planner)!=null&&ne.installed?"bg-cyan-500/10 text-cyan-400":"bg-slate-800 text-slate-500"}`,children:l.jsx(gg,{className:"h-4 w-4"})}),l.jsxs("div",{children:[l.jsx("div",{className:`text-sm font-medium ${(he=M==null?void 0:M.planner)!=null&&he.installed?"text-slate-200":"text-slate-500"}`,children:"Planner"}),l.jsx("div",{className:"text-xs text-slate-500",children:M!=null&&M.paused?"Paused":de((ye=M==null?void 0:M.planner)==null?void 0:ye.nextRun)})]})]})})]})]})]}),l.jsxs("div",{className:"mt-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),l.jsxs("button",{onClick:()=>s("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",l.jsx(dx,{className:"ml-1 h-3 w-3"})]})]}),l.jsx(Ye,{className:"p-4",children:T?l.jsx("div",{className:"flex flex-wrap gap-3",children:$l.map(me=>{var Me;const xe=((Me=T.columns[me])==null?void 0:Me.length)??0;return l.jsxs("button",{onClick:()=>s("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${M2[me]}`,children:[l.jsx("span",{className:"text-xs font-medium",children:me}),l.jsx("span",{className:"text-xs font-bold",children:xe})]},me)})}):l.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",l.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."]})})]})]})},C2=()=>{const[s,u]=V.useState(!0),[d,o]=V.useState(""),[m,x]=V.useState("executor"),g=V.useRef(null),{selectedProjectId:j,globalModeLoading:b}=ha(),{data:p,loading:w,error:E,refetch:D}=Ia(()=>W1(m,500),[m,j],{enabled:!b}),{data:R}=Ia(tu,[j],{enabled:!b}),M=(p==null?void 0:p.lines)||[];V.useEffect(()=>{s&&g.current&&(g.current.scrollTop=g.current.scrollHeight)},[M,s]),V.useEffect(()=>{if(!s)return;const Q=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(Q)},[s,m,D]);const T=M.filter(Q=>Q.toLowerCase().includes(d.toLowerCase())),H=Q=>{x(Q),o("")},P=Q=>{if(!(R!=null&&R.processes))return!1;const te=R.processes.find(ee=>ee.name===Q);return(te==null?void 0:te.running)??!1};return E?l.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[l.jsx(al,{className:"h-12 w-12 text-red-400"}),l.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),l.jsx("div",{className:"text-sm text-slate-500",children:E.message}),l.jsx(qe,{onClick:()=>D(),children:"Retry"})]}):l.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsxs("div",{className:"relative group",children:[l.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:Q=>o(Q.target.value)}),l.jsx(cu,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),l.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),l.jsxs("div",{className:"flex space-x-1",children:[l.jsx("button",{onClick:()=>H("executor"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="executor"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{children:"Executor"}),P("executor")&&l.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),l.jsx("button",{onClick:()=>H("reviewer"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="reviewer"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{children:"Reviewer"}),P("reviewer")&&l.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),l.jsx("button",{onClick:()=>H("qa"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="qa"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{children:"QA"}),P("qa")&&l.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),l.jsx("button",{onClick:()=>H("audit"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="audit"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{children:"Auditor"}),P("audit")&&l.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),l.jsx("button",{onClick:()=>H("planner"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="planner"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{children:"Planner"}),P("planner")&&l.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})})]})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsxs(qe,{size:"sm",variant:"ghost",onClick:()=>D(),children:[l.jsx(hx,{className:"h-4 w-4 mr-2"}),"Refresh"]}),l.jsxs(qe,{size:"sm",variant:"ghost",onClick:()=>u(!s),children:[s?l.jsx(bg,{className:"h-4 w-4 mr-2"}):l.jsx(Kn,{className:"h-4 w-4 mr-2"}),s?"Pause":"Resume"]})]})]}),l.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[l.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:[l.jsxs("span",{children:["File: ",m,".log"]}),l.jsxs("span",{children:[T.length," lines"]})]}),l.jsxs("div",{ref:g,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[w?l.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):T.length===0?l.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):T.map((Q,te)=>{const ee=Q.includes("[ERROR]"),Y=Q.includes("[WARN]");return l.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${ee?"text-red-400":Y?"text-amber-400":"text-slate-300"}`,children:[l.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:te+1}),Q]},te)}),s&&l.jsx("div",{className:"h-4"})," "]}),!s&&l.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:()=>u(!0),children:[l.jsx(hx,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},O2=()=>{const[s,u]=V.useState(null),[d,o]=V.useState(!1),[m,x]=V.useState("all"),[g,j]=V.useState("number"),[b,p]=V.useState("desc"),{addToast:w,selectedProjectId:E,globalModeLoading:D}=ha(),{data:R,loading:M,error:T,refetch:H}=Ia(Tg,[E],{enabled:!D}),P=R??[],Q=z=>{switch(z){case"pass":return l.jsx(uu,{className:"h-4 w-4 text-green-500"});case"fail":return l.jsx(Cf,{className:"h-4 w-4 text-red-500"});case"pending":return l.jsx(yg,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return l.jsx(al,{className:"h-4 w-4 text-slate-500"})}},te=z=>{switch(z){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},ee=z=>z===null?"No review decision yet":z===100?"PR has been approved":z===0?"Changes have been requested":`Review score: ${z}`,Y=V.useMemo(()=>P.filter(z=>{switch(m){case"needs-work":return z.ciStatus==="fail"||z.reviewScore===0;case"pending":return z.ciStatus==="pending"||z.ciStatus==="unknown"||z.reviewScore===null;case"passed":return z.ciStatus==="pass"&&z.reviewScore===100;case"all":default:return!0}}),[P,m]),re=V.useMemo(()=>[...Y].sort((ae,le)=>{let de=0;switch(g){case"number":de=ae.number-le.number;break;case"title":de=ae.title.localeCompare(le.title);break;case"branch":de=ae.branch.localeCompare(le.branch);break;case"ciStatus":{const Se={fail:0,pending:1,unknown:2,pass:3};de=(Se[ae.ciStatus]??2)-(Se[le.ciStatus]??2);break}case"reviewScore":{const Se=ae.reviewScore??-1,pe=le.reviewScore??-1;de=Se-pe;break}}return b==="asc"?de:-de}),[Y,g,b]),Z=z=>{g===z?p(b==="asc"?"desc":"asc"):(j(z),p("desc"))},B=z=>g!==z?l.jsx(Rb,{className:"h-3 w-3 text-slate-600"}):b==="asc"?l.jsx(_b,{className:"h-3 w-3 text-indigo-400"}):l.jsx(Cb,{className:"h-3 w-3 text-indigo-400"});if(M)return l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(T)return l.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[l.jsx(al,{className:"h-12 w-12 text-red-400"}),l.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),l.jsx("div",{className:"text-sm text-slate-500",children:T.message}),l.jsx(qe,{onClick:()=>H(),children:"Retry"})]});const F=async()=>{o(!0);try{const z=await Dg();w({title:"Reviewer Started",message:z.pid?`Started with PID ${z.pid}`:"Reviewer started",type:"success"})}catch(z){w({title:"Reviewer Failed",message:z instanceof Error?z.message:"Failed to start reviewer",type:"error"})}finally{o(!1)}};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex space-x-1",children:[l.jsx("button",{onClick:()=>x("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),l.jsx("button",{onClick:()=>x("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),l.jsx("button",{onClick:()=>x("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),l.jsx("button",{onClick:()=>x("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),l.jsxs(qe,{size:"sm",onClick:F,disabled:d,children:[l.jsx(cu,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),l.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:l.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[l.jsx("thead",{className:"bg-slate-950/50",children:l.jsxs("tr",{children:[l.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:()=>Z("number"),children:l.jsxs("div",{className:"flex items-center space-x-1",children:[l.jsx("span",{children:"Title"}),B("number")]})}),l.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:()=>Z("branch"),children:l.jsxs("div",{className:"flex items-center space-x-1",children:[l.jsx("span",{children:"Branch"}),B("branch")]})}),l.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:()=>Z("ciStatus"),children:l.jsxs("div",{className:"flex items-center space-x-1",children:[l.jsx("span",{children:"CI Status"}),B("ciStatus")]})}),l.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:()=>Z("reviewScore"),children:l.jsxs("div",{className:"flex items-center space-x-1",children:[l.jsx("span",{children:"Review Score"}),B("reviewScore")]})}),l.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),l.jsxs("tbody",{className:"divide-y divide-slate-800",children:[re.map(z=>l.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>u(s===z.number?null:z.number),children:[l.jsx("td",{className:"px-6 py-4",children:l.jsxs("div",{className:"flex items-center",children:[l.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",z.number]}),l.jsx("span",{className:"font-medium text-slate-200",children:z.title})]})}),l.jsx("td",{className:"px-6 py-4",children:l.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:z.branch})}),l.jsx("td",{className:"px-6 py-4",children:l.jsxs("div",{className:"flex items-center space-x-2",title:te(z.ciStatus),children:[Q(z.ciStatus),l.jsx("span",{className:"text-sm capitalize text-slate-400",children:z.ciStatus})]})}),l.jsx("td",{className:"px-6 py-4",children:z.reviewScore!==null?l.jsxs("div",{className:"flex items-center space-x-2",title:ee(z.reviewScore),children:[l.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:l.jsx("div",{className:`h-full ${z.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${z.reviewScore}%`}})}),l.jsx("span",{className:`text-sm font-bold ${z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:z.reviewScore})]}):l.jsx("span",{className:"text-slate-600 text-sm",title:"No review decision yet",children:"—"})}),l.jsx("td",{className:"px-6 py-4 text-right",children:l.jsx("a",{href:z.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:ae=>ae.stopPropagation(),children:l.jsx(vg,{className:"h-4 w-4"})})})]},z.number)),re.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:P.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),s&&l.jsx(Ye,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const z=P.find(ae=>ae.number===s);return z?l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-bold text-slate-200",children:z.title}),l.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",l.jsx("span",{className:"font-mono",children:z.branch})]})]}),l.jsxs("div",{className:"flex items-center space-x-4",children:[l.jsxs("div",{className:"text-center",title:te(z.ciStatus),children:[l.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),l.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[Q(z.ciStatus),l.jsx("span",{className:"text-sm capitalize text-slate-300",children:z.ciStatus})]})]}),z.reviewScore!==null&&l.jsxs("div",{className:"text-center",title:ee(z.reviewScore),children:[l.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),l.jsx("div",{className:`text-xl font-bold mt-1 ${z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:z.reviewScore})]})]})]}):null})()})]})},ea=Be.forwardRef(({className:s="",label:u,checked:d,onChange:o,...m},x)=>{const g=j=>{o&&o(j.target.checked)};return l.jsxs("label",{className:`inline-flex items-center cursor-pointer ${s}`,children:[l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:"checkbox",className:"sr-only peer",ref:x,checked:d,onChange:g,...m}),l.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"})]}),u&&l.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:u})]})});ea.displayName="Switch";const D2=()=>{const{addToast:s,selectedProjectId:u,globalModeLoading:d}=ha(),[o,m]=V.useState(!1),[x,g]=V.useState(!1),{data:j,loading:b,error:p,refetch:w}=Ia(u2,[u],{enabled:!d});V.useEffect(()=>{if(!(j!=null&&j.enabled))return;const Q=setInterval(()=>{w()},1e4);return()=>clearInterval(Q)},[j==null?void 0:j.enabled,w]);const E=async Q=>{g(!0);try{await _g(Q),s({title:Q?"Scanner Enabled":"Scanner Disabled",message:Q?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:Q?"success":"info"}),w()}catch(te){s({title:"Toggle Failed",message:te instanceof Error?te.message:"Failed to toggle scanner",type:"error"})}finally{g(!1)}},D=async()=>{m(!0);try{const Q=await c2();Q.created.length>0?s({title:"Scan Complete",message:`Created ${Q.created.length} PRD(s): ${Q.created.join(", ")}`,type:"success"}):s({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),Q.errors.length>0&&s({title:"Scan Errors",message:Q.errors.join("; "),type:"warning"}),w()}catch(Q){s({title:"Scan Failed",message:Q instanceof Error?Q.message:"Failed to scan roadmap",type:"error"})}finally{m(!1)}};if(b)return l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(p)return l.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[l.jsx(al,{className:"h-12 w-12 text-red-400"}),l.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),l.jsx("div",{className:"text-sm text-slate-500",children:p.message}),l.jsx(qe,{onClick:()=>w(),children:"Retry"})]});if(!j)return null;if(j.status==="no-roadmap")return l.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[l.jsx("div",{className:"flex items-center justify-between",children:l.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),l.jsx(Ye,{className:"p-12",children:l.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[l.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:l.jsx(pg,{className:"h-10 w-10 text-slate-500"})}),l.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),l.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",l.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 (",l.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",l.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const R=j.totalItems>0?Math.round(j.processedItems/j.totalItems*100):0,M=A2(j.status),T=_2(j.items),H=j.lastScan?k2(j.lastScan):"Never",P=j.autoScanInterval?Math.round(j.autoScanInterval/60):5;return l.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),l.jsxs("div",{className:"flex items-center space-x-4",children:[l.jsx(ea,{label:j.enabled?"Enabled":"Disabled",checked:j.enabled,onChange:E,disabled:x}),l.jsxs(qe,{onClick:D,loading:o,disabled:!j.enabled||j.status==="complete",children:[l.jsx(Kn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),l.jsx(Ye,{className:`p-6 border-2 ${M.borderColor}`,children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center space-x-4",children:[l.jsx(M.icon,{className:`h-8 w-8 ${M.textColor}`}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),l.jsx("div",{className:`text-2xl font-bold ${M.textColor}`,children:M.label})]})]}),l.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[l.jsxs("div",{children:["Last scan: ",l.jsx("span",{className:"text-slate-300",children:H})]}),j.enabled&&j.status!=="complete"&&l.jsxs("div",{children:["Auto-scan: ",l.jsxs("span",{className:"text-slate-300",children:["every ",P," min"]})]}),j.enabled&&j.status==="complete"&&l.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),l.jsxs(Ye,{className:"p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-3",children:[l.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),l.jsxs("span",{className:"text-sm text-slate-400",children:[j.processedItems," / ",j.totalItems," items (",R,"%)"]})]}),l.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:l.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${R===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${R}%`}})})]}),Object.entries(T).map(([Q,te])=>l.jsxs(Ye,{className:"p-6",children:[l.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:Q}),l.jsx("div",{className:"space-y-2",children:te.map(ee=>l.jsx(R2,{item:ee},ee.hash))})]},Q))]})};function R2({item:s}){const u=s.checked,d=s.processed;return l.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${u?"bg-slate-950/30 border-slate-800/50":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[l.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[u?l.jsx(N1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?l.jsx(uu,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):l.jsx(r1,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:`text-sm font-medium truncate ${u?"line-through text-slate-600":"text-slate-200"}`,children:s.title}),s.description&&l.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:s.description})]})]}),l.jsx("div",{className:"flex-shrink-0 ml-3",children:u?l.jsx(Ar,{variant:"neutral",children:"Skipped"}):d?l.jsx(Ar,{variant:"success",children:s.prdFile||"Processed"}):l.jsx(Ar,{variant:"warning",children:"Pending"})})]})}function A2(s){switch(s){case"complete":return{label:"Complete",icon:uu,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Xc,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:Kn,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:al,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:al,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function _2(s){const u={};for(const d of s){const o=d.section||"General";u[o]||(u[o]=[]),u[o].push(d)}return u}function k2(s){try{const u=new Date(s),o=new Date().getTime()-u.getTime(),m=Math.floor(o/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const x=Math.floor(m/60);return x<24?`${x} hr ago`:`${Math.floor(x/24)} day(s) ago`}catch{return"Unknown"}}const z2=({analytics:s})=>{const u=Object.entries(s.byProviderBucket).filter(([d])=>d!=="__unassigned__");return u.length===0?l.jsx("div",{className:"text-sm text-slate-500 py-2",children:"No provider bucket data available."}):l.jsx("div",{className:"space-y-2","data-testid":"provider-bucket-summary",children:u.map(([d,o])=>l.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-md bg-slate-950/40 border border-slate-800","data-testid":`provider-bucket-${d}`,children:[l.jsx("span",{className:"text-xs font-mono text-slate-300 truncate max-w-[60%]",title:d,children:d}),l.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-400 shrink-0",children:[l.jsxs("span",{children:[l.jsx("span",{className:"text-slate-200 font-medium",children:o.running})," running"]}),l.jsx("span",{className:"text-slate-700",children:"/"}),l.jsxs("span",{children:[l.jsx("span",{className:"text-slate-200 font-medium",children:o.pending})," pending"]})]})]},d))})};var Ts={},Ua={},$i={},Cs={},yf={},yx;function U2(){return yx||(yx=1,Object.defineProperty(yf,"__esModule",{value:!0})),yf}var Fi={},Gi={},px;function zs(){var u,d,o,m,x,zg,j;if(px)return Gi;px=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.CronField=void 0;let s=(j=class{constructor(p,w={rawValue:""}){st(this,x);st(this,u,!1);st(this,d,!1);st(this,o,!1);st(this,m,[]);Q0(this,"options",{rawValue:""});if(!Array.isArray(p))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(p.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...w,rawValue:w.rawValue??""},Oe(this,m,p.sort(j.sorter)),Oe(this,o,this.options.wildcard!==void 0?this.options.wildcard:Te(this,x,zg).call(this)),Oe(this,u,this.options.rawValue.includes("L")||p.includes("L")),Oe(this,d,this.options.rawValue.includes("?")||p.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 I(this,u)}get hasQuestionMarkChar(){return I(this,d)}get isWildcard(){return I(this,o)}get values(){return I(this,m)}static sorter(p,w){const E=typeof p=="number",D=typeof w=="number";return E&&D?p-w:!E&&!D?p.localeCompare(w):E?-1:1}static findNearestValueInList(p,w,E=!1){if(E){for(let D=p.length-1;D>=0;D--)if(p[D]<w)return p[D];return null}for(let D=0;D<p.length;D++)if(p[D]>w)return p[D];return null}findNearestValue(p,w=!1){return this.constructor.findNearestValueInList(this.values,p,w)}serialize(){return{wildcard:I(this,o),values:I(this,m)}}validate(){let p;const w=this.chars.length>0?` or chars ${this.chars.join("")}`:"",E=T=>H=>new RegExp(`^\\d{0,2}${H}$`).test(T),D=T=>(p=T,typeof T=="number"?T>=this.min&&T<=this.max:this.chars.some(E(T)));if(!I(this,m).every(D))throw new Error(`${this.constructor.name} Validation error, got value ${p} expected range ${this.min}-${this.max}${w}`);const M=I(this,m).find((T,H)=>I(this,m).indexOf(T)!==H);if(M)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${M}`)}},u=new WeakMap,d=new WeakMap,o=new WeakMap,m=new WeakMap,x=new WeakSet,zg=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(p,w)=>w+this.min).every(p=>I(this,m).includes(p))},j);return Gi.CronField=s,Gi}var bx;function H2(){if(bx)return Fi;bx=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.CronDayOfMonth=void 0;const s=zs(),u=1,d=31,o=Object.freeze(["L"]);let m=class extends s.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(g,j){super(g,j),this.validate()}get values(){return super.values}};return Fi.CronDayOfMonth=m,Fi}var Zi={},Sx;function L2(){if(Sx)return Zi;Sx=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronDayOfWeek=void 0;const s=zs(),u=0,d=7,o=Object.freeze(["L"]);let m=class extends s.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(g,j){super(g,j),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Zi.CronDayOfWeek=m,Zi}var Qi={},Nx;function q2(){if(Nx)return Qi;Nx=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronHour=void 0;const s=zs(),u=0,d=23,o=Object.freeze([]);let m=class extends s.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(g,j){super(g,j),this.validate()}get values(){return super.values}};return Qi.CronHour=m,Qi}var Wi={},jx;function V2(){if(jx)return Wi;jx=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronMinute=void 0;const s=zs(),u=0,d=59,o=Object.freeze([]);let m=class extends s.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(g,j){super(g,j),this.validate()}get values(){return super.values}};return Wi.CronMinute=m,Wi}var Xi={},pf={},Ma={},wx;function B2(){if(wx)return Ma;wx=1,Object.defineProperty(Ma,"__esModule",{value:!0});class s extends Error{}class u extends s{constructor(r){super(`Invalid DateTime: ${r.toMessage()}`)}}class d extends s{constructor(r){super(`Invalid Interval: ${r.toMessage()}`)}}class o extends s{constructor(r){super(`Invalid Duration: ${r.toMessage()}`)}}class m extends s{}class x extends s{constructor(r){super(`Invalid unit ${r}`)}}class g extends s{}class j extends s{constructor(){super("Zone is an abstract class")}}const b="numeric",p="short",w="long",E={year:b,month:b,day:b},D={year:b,month:p,day:b},R={year:b,month:p,day:b,weekday:p},M={year:b,month:w,day:b},T={year:b,month:w,day:b,weekday:w},H={hour:b,minute:b},P={hour:b,minute:b,second:b},Q={hour:b,minute:b,second:b,timeZoneName:p},te={hour:b,minute:b,second:b,timeZoneName:w},ee={hour:b,minute:b,hourCycle:"h23"},Y={hour:b,minute:b,second:b,hourCycle:"h23"},re={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:p},Z={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:w},B={year:b,month:b,day:b,hour:b,minute:b},F={year:b,month:b,day:b,hour:b,minute:b,second:b},z={year:b,month:p,day:b,hour:b,minute:b},ae={year:b,month:p,day:b,hour:b,minute:b,second:b},le={year:b,month:p,day:b,weekday:p,hour:b,minute:b},de={year:b,month:w,day:b,hour:b,minute:b,timeZoneName:p},Se={year:b,month:w,day:b,hour:b,minute:b,second:b,timeZoneName:p},pe={year:b,month:w,day:b,weekday:w,hour:b,minute:b,timeZoneName:w},G={year:b,month:w,day:b,weekday:w,hour:b,minute:b,second:b,timeZoneName:w};class ie{get type(){throw new j}get name(){throw new j}get ianaName(){return this.name}get isUniversal(){throw new j}offsetName(r,f){throw new j}formatOffset(r,f){throw new j}offset(r){throw new j}equals(r){throw new j}get isValid(){throw new j}}let ve=null;class we extends ie{static get instance(){return ve===null&&(ve=new we),ve}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(r,{format:f,locale:y}){return Rn(r,f,y)}formatOffset(r,f){return Jl(this.offset(r),f)}offset(r){return-new Date(r).getTimezoneOffset()}equals(r){return r.type==="system"}get isValid(){return!0}}const oe=new Map;function A(h){let r=oe.get(h);return r===void 0&&(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:h,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),oe.set(h,r)),r}const ne={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function he(h,r){const f=h.format(r).replace(/\u200E/g,""),y=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(f),[,S,C,k,U,q,fe,Ne]=y;return[k,S,C,U,q,fe,Ne]}function ye(h,r){const f=h.formatToParts(r),y=[];for(let S=0;S<f.length;S++){const{type:C,value:k}=f[S],U=ne[C];C==="era"?y[U]=k:Ae(U)||(y[U]=parseInt(k,10))}return y}const me=new Map;class xe extends ie{static create(r){let f=me.get(r);return f===void 0&&me.set(r,f=new xe(r)),f}static resetCache(){me.clear(),oe.clear()}static isValidSpecifier(r){return this.isValidZone(r)}static isValidZone(r){if(!r)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:r}).format(),!0}catch{return!1}}constructor(r){super(),this.zoneName=r,this.valid=xe.isValidZone(r)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(r,{format:f,locale:y}){return Rn(r,f,y,this.name)}formatOffset(r,f){return Jl(this.offset(r),f)}offset(r){if(!this.valid)return NaN;const f=new Date(r);if(isNaN(f))return NaN;const y=A(this.name);let[S,C,k,U,q,fe,Ne]=y.formatToParts?ye(y,f):he(y,f);U==="BC"&&(S=-Math.abs(S)+1);const Je=Wt({year:S,month:C,day:k,hour:q===24?0:q,minute:fe,second:Ne,millisecond:0});let _e=+f;const St=_e%1e3;return _e-=St>=0?St:1e3+St,(Je-_e)/(60*1e3)}equals(r){return r.type==="iana"&&r.name===this.name}get isValid(){return this.valid}}let Me={};function Ge(h,r={}){const f=JSON.stringify([h,r]);let y=Me[f];return y||(y=new Intl.ListFormat(h,r),Me[f]=y),y}const Le=new Map;function ta(h,r={}){const f=JSON.stringify([h,r]);let y=Le.get(f);return y===void 0&&(y=new Intl.DateTimeFormat(h,r),Le.set(f,y)),y}const aa=new Map;function Tn(h,r={}){const f=JSON.stringify([h,r]);let y=aa.get(f);return y===void 0&&(y=new Intl.NumberFormat(h,r),aa.set(f,y)),y}const hn=new Map;function Ta(h,r={}){const{base:f,...y}=r,S=JSON.stringify([h,y]);let C=hn.get(S);return C===void 0&&(C=new Intl.RelativeTimeFormat(h,r),hn.set(S,C)),C}let Ca=null;function mn(){return Ca||(Ca=new Intl.DateTimeFormat().resolvedOptions().locale,Ca)}const _=new Map;function be(h){let r=_.get(h);return r===void 0&&(r=new Intl.DateTimeFormat(h).resolvedOptions(),_.set(h,r)),r}const De=new Map;function Ze(h){let r=De.get(h);if(!r){const f=new Intl.Locale(h);r="getWeekInfo"in f?f.getWeekInfo():f.weekInfo,"minimalDays"in r||(r={...Fl,...r}),De.set(h,r)}return r}function Ht(h){const r=h.indexOf("-x-");r!==-1&&(h=h.substring(0,r));const f=h.indexOf("-u-");if(f===-1)return[h];{let y,S;try{y=ta(h).resolvedOptions(),S=h}catch{const q=h.substring(0,f);y=ta(q).resolvedOptions(),S=q}const{numberingSystem:C,calendar:k}=y;return[S,C,k]}}function ca(h,r,f){return(f||r)&&(h.includes("-u-")||(h+="-u"),f&&(h+=`-ca-${f}`),r&&(h+=`-nu-${r}`)),h}function ma(h){const r=[];for(let f=1;f<=12;f++){const y=Ce.utc(2009,f,1);r.push(h(y))}return r}function Nt(h){const r=[];for(let f=1;f<=7;f++){const y=Ce.utc(2016,11,13+f);r.push(h(y))}return r}function ge(h,r,f,y){const S=h.listingMode();return S==="error"?null:S==="en"?f(r):y(r)}function $e(h){return h.numberingSystem&&h.numberingSystem!=="latn"?!1:h.numberingSystem==="latn"||!h.locale||h.locale.startsWith("en")||be(h.locale).numberingSystem==="latn"}class Bt{constructor(r,f,y){this.padTo=y.padTo||0,this.floor=y.floor||!1;const{padTo:S,floor:C,...k}=y;if(!f||Object.keys(k).length>0){const U={useGrouping:!1,...y};y.padTo>0&&(U.minimumIntegerDigits=y.padTo),this.inf=Tn(r,U)}}format(r){if(this.inf){const f=this.floor?Math.floor(r):r;return this.inf.format(f)}else{const f=this.floor?Math.floor(r):Wl(r,3);return rt(f,this.padTo)}}}class xn{constructor(r,f,y){this.opts=y,this.originalZone=void 0;let S;if(this.opts.timeZone)this.dt=r;else if(r.zone.type==="fixed"){const k=-1*(r.offset/60),U=k>=0?`Etc/GMT+${k}`:`Etc/GMT${k}`;r.offset!==0&&xe.create(U).valid?(S=U,this.dt=r):(S="UTC",this.dt=r.offset===0?r:r.setZone("UTC").plus({minutes:r.offset}),this.originalZone=r.zone)}else r.zone.type==="system"?this.dt=r:r.zone.type==="iana"?(this.dt=r,S=r.zone.name):(S="UTC",this.dt=r.setZone("UTC").plus({minutes:r.offset}),this.originalZone=r.zone);const C={...this.opts};C.timeZone=C.timeZone||S,this.dtf=ta(f,C)}format(){return this.originalZone?this.formatToParts().map(({value:r})=>r).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const r=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?r.map(f=>{if(f.type==="timeZoneName"){const y=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...f,value:y}}else return f}):r}resolvedOptions(){return this.dtf.resolvedOptions()}}class Us{constructor(r,f,y){this.opts={style:"long",...y},!f&&Yr()&&(this.rtf=Ta(r,y))}format(r,f){return this.rtf?this.rtf.format(r,f):pn(f,r,this.opts.numeric,this.opts.style!=="long")}formatToParts(r,f){return this.rtf?this.rtf.formatToParts(r,f):[]}}const Fl={firstDay:1,minimalDays:4,weekend:[6,7]};class Qe{static fromOpts(r){return Qe.create(r.locale,r.numberingSystem,r.outputCalendar,r.weekSettings,r.defaultToEN)}static create(r,f,y,S,C=!1){const k=r||xt.defaultLocale,U=k||(C?"en-US":mn()),q=f||xt.defaultNumberingSystem,fe=y||xt.defaultOutputCalendar,Ne=$r(S)||xt.defaultWeekSettings;return new Qe(U,q,fe,Ne,k)}static resetCache(){Ca=null,Le.clear(),aa.clear(),hn.clear(),_.clear(),De.clear()}static fromObject({locale:r,numberingSystem:f,outputCalendar:y,weekSettings:S}={}){return Qe.create(r,f,y,S)}constructor(r,f,y,S,C){const[k,U,q]=Ht(r);this.locale=k,this.numberingSystem=f||U||null,this.outputCalendar=y||q||null,this.weekSettings=S,this.intl=ca(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=C,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=$e(this)),this.fastNumbersCached}listingMode(){const r=this.isEnglish(),f=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return r&&f?"en":"intl"}clone(r){return!r||Object.getOwnPropertyNames(r).length===0?this:Qe.create(r.locale||this.specifiedLocale,r.numberingSystem||this.numberingSystem,r.outputCalendar||this.outputCalendar,$r(r.weekSettings)||this.weekSettings,r.defaultToEN||!1)}redefaultToEN(r={}){return this.clone({...r,defaultToEN:!0})}redefaultToSystem(r={}){return this.clone({...r,defaultToEN:!1})}months(r,f=!1){return ge(this,r,bu,()=>{const y=this.intl==="ja"||this.intl.startsWith("ja-");f&=!y;const S=f?{month:r,day:"numeric"}:{month:r},C=f?"format":"standalone";if(!this.monthsCache[C][r]){const k=y?U=>this.dtFormatter(U,S).format():U=>this.extract(U,S,"month");this.monthsCache[C][r]=ma(k)}return this.monthsCache[C][r]})}weekdays(r,f=!1){return ge(this,r,Zs,()=>{const y=f?{weekday:r,year:"numeric",month:"long",day:"numeric"}:{weekday:r},S=f?"format":"standalone";return this.weekdaysCache[S][r]||(this.weekdaysCache[S][r]=Nt(C=>this.extract(C,y,"weekday"))),this.weekdaysCache[S][r]})}meridiems(){return ge(this,void 0,()=>An,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ce.utc(2016,11,13,9),Ce.utc(2016,11,13,19)].map(f=>this.extract(f,r,"dayperiod"))}return this.meridiemCache})}eras(r){return ge(this,r,Wr,()=>{const f={era:r};return this.eraCache[r]||(this.eraCache[r]=[Ce.utc(-40,1,1),Ce.utc(2017,1,1)].map(y=>this.extract(y,f,"era"))),this.eraCache[r]})}extract(r,f,y){const S=this.dtFormatter(r,f),C=S.formatToParts(),k=C.find(U=>U.type.toLowerCase()===y);return k?k.value:null}numberFormatter(r={}){return new Bt(this.intl,r.forceSimple||this.fastNumbers,r)}dtFormatter(r,f={}){return new xn(r,this.intl,f)}relFormatter(r={}){return new Us(this.intl,this.isEnglish(),r)}listFormatter(r={}){return Ge(this.intl,r)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||be(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:vn()?Ze(this.locale):Fl}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(r){return this.locale===r.locale&&this.numberingSystem===r.numberingSystem&&this.outputCalendar===r.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Lr=null;class jt extends ie{static get utcInstance(){return Lr===null&&(Lr=new jt(0)),Lr}static instance(r){return r===0?jt.utcInstance:new jt(r)}static parseSpecifier(r){if(r){const f=r.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(f)return new jt(Pl(f[1],f[2]))}return null}constructor(r){super(),this.fixed=r}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Jl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Jl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(r,f){return Jl(this.fixed,f)}get isUniversal(){return!0}offset(){return this.fixed}equals(r){return r.type==="fixed"&&r.fixed===this.fixed}get isValid(){return!0}}class na extends ie{constructor(r){super(),this.zoneName=r}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 Gt(h,r){if(Ae(h)||h===null)return r;if(h instanceof ie)return h;if(At(h)){const f=h.toLowerCase();return f==="default"?r:f==="local"||f==="system"?we.instance:f==="utc"||f==="gmt"?jt.utcInstance:jt.parseSpecifier(f)||xe.create(h)}else return ga(h)?jt.instance(h):typeof h=="object"&&"offset"in h&&typeof h.offset=="function"?h:new na(h)}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"},ou={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]},ao=Zt.hanidec.replace(/[\[|\]]/g,"").split("");function no(h){let r=parseInt(h,10);if(isNaN(r)){r="";for(let f=0;f<h.length;f++){const y=h.charCodeAt(f);if(h[f].search(Zt.hanidec)!==-1)r+=ao.indexOf(h[f]);else for(const S in ou){const[C,k]=ou[S];y>=C&&y<=k&&(r+=y-C)}}return parseInt(r,10)}else return r}const ll=new Map;function Hs(){ll.clear()}function la({numberingSystem:h},r=""){const f=h||"latn";let y=ll.get(f);y===void 0&&(y=new Map,ll.set(f,y));let S=y.get(r);return S===void 0&&(S=new RegExp(`${Zt[f]}${r}`),y.set(r,S)),S}let gn=()=>Date.now(),Gl="system",sl=null,du=null,qr=null,Ls=60,rl,fu=null;class xt{static get now(){return gn}static set now(r){gn=r}static set defaultZone(r){Gl=r}static get defaultZone(){return Gt(Gl,we.instance)}static get defaultLocale(){return sl}static set defaultLocale(r){sl=r}static get defaultNumberingSystem(){return du}static set defaultNumberingSystem(r){du=r}static get defaultOutputCalendar(){return qr}static set defaultOutputCalendar(r){qr=r}static get defaultWeekSettings(){return fu}static set defaultWeekSettings(r){fu=$r(r)}static get twoDigitCutoffYear(){return Ls}static set twoDigitCutoffYear(r){Ls=r%100}static get throwOnInvalid(){return rl}static set throwOnInvalid(r){rl=r}static resetCaches(){Qe.resetCache(),xe.resetCache(),Ce.resetCache(),Hs()}}class xa{constructor(r,f){this.reason=r,this.explanation=f}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Vr=[0,31,59,90,120,151,181,212,243,273,304,334],qs=[0,31,60,91,121,152,182,213,244,274,305,335];function sa(h,r){return new xa("unit out of range",`you specified ${r} (of type ${typeof r}) as a ${h}, which is invalid`)}function Vs(h,r,f){const y=new Date(Date.UTC(h,r-1,f));h<100&&h>=0&&y.setUTCFullYear(y.getUTCFullYear()-1900);const S=y.getUTCDay();return S===0?7:S}function Br(h,r,f){return f+(ul(h)?qs:Vr)[r-1]}function Ka(h,r){const f=ul(h)?qs:Vr,y=f.findIndex(C=>C<r),S=r-f[y];return{month:y+1,day:S}}function Mt(h,r){return(h-r+7)%7+1}function Lt(h,r=4,f=1){const{year:y,month:S,day:C}=h,k=Br(y,S,C),U=Mt(Vs(y,S,C),f);let q=Math.floor((k-U+14-r)/7),fe;return q<1?(fe=y-1,q=cl(fe,r,f)):q>cl(y,r,f)?(fe=y+1,q=1):fe=y,{weekYear:fe,weekNumber:q,weekday:U,...Il(h)}}function Cn(h,r=4,f=1){const{weekYear:y,weekNumber:S,weekday:C}=h,k=Mt(Vs(y,1,r),f),U=tn(y);let q=S*7+C-k-7+r,fe;q<1?(fe=y-1,q+=tn(fe)):q>U?(fe=y+1,q-=tn(y)):fe=y;const{month:Ne,day:Ue}=Ka(fe,q);return{year:fe,month:Ne,day:Ue,...Il(h)}}function Zl(h){const{year:r,month:f,day:y}=h,S=Br(r,f,y);return{year:r,ordinal:S,...Il(h)}}function hu(h){const{year:r,ordinal:f}=h,{month:y,day:S}=Ka(r,f);return{year:r,month:y,day:S,...Il(h)}}function mu(h,r){if(!Ae(h.localWeekday)||!Ae(h.localWeekNumber)||!Ae(h.localWeekYear)){if(!Ae(h.weekday)||!Ae(h.weekNumber)||!Ae(h.weekYear))throw new m("Cannot mix locale-based week fields with ISO-based week fields");return Ae(h.localWeekday)||(h.weekday=h.localWeekday),Ae(h.localWeekNumber)||(h.weekNumber=h.localWeekNumber),Ae(h.localWeekYear)||(h.weekYear=h.localWeekYear),delete h.localWeekday,delete h.localWeekNumber,delete h.localWeekYear,{minDaysInFirstWeek:r.getMinDaysInFirstWeek(),startOfWeek:r.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function xu(h,r=4,f=1){const y=en(h.weekYear),S=Qt(h.weekNumber,1,cl(h.weekYear,r,f)),C=Qt(h.weekday,1,7);return y?S?C?!1:sa("weekday",h.weekday):sa("week",h.weekNumber):sa("weekYear",h.weekYear)}function Ql(h){const r=en(h.year),f=Qt(h.ordinal,1,tn(h.year));return r?f?!1:sa("ordinal",h.ordinal):sa("year",h.year)}function Bs(h){const r=en(h.year),f=Qt(h.month,1,12),y=Qt(h.day,1,$s(h.year,h.month));return r?f?y?!1:sa("day",h.day):sa("month",h.month):sa("year",h.year)}function On(h){const{hour:r,minute:f,second:y,millisecond:S}=h,C=Qt(r,0,23)||r===24&&f===0&&y===0&&S===0,k=Qt(f,0,59),U=Qt(y,0,59),q=Qt(S,0,999);return C?k?U?q?!1:sa("millisecond",S):sa("second",y):sa("minute",f):sa("hour",r)}function Ae(h){return typeof h>"u"}function ga(h){return typeof h=="number"}function en(h){return typeof h=="number"&&h%1===0}function At(h){return typeof h=="string"}function gu(h){return Object.prototype.toString.call(h)==="[object Date]"}function Yr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function vn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function il(h){return Array.isArray(h)?h:[h]}function vu(h,r,f){if(h.length!==0)return h.reduce((y,S)=>{const C=[r(S),S];return y&&f(y[0],C[0])===y[0]?y:C},null)[1]}function yu(h,r){return r.reduce((f,y)=>(f[y]=h[y],f),{})}function Dn(h,r){return Object.prototype.hasOwnProperty.call(h,r)}function $r(h){if(h==null)return null;if(typeof h!="object")throw new g("Week settings must be an object");if(!Qt(h.firstDay,1,7)||!Qt(h.minimalDays,1,7)||!Array.isArray(h.weekend)||h.weekend.some(r=>!Qt(r,1,7)))throw new g("Invalid week settings");return{firstDay:h.firstDay,minimalDays:h.minimalDays,weekend:Array.from(h.weekend)}}function Qt(h,r,f){return en(h)&&h>=r&&h<=f}function Ys(h,r){return h-r*Math.floor(h/r)}function rt(h,r=2){const f=h<0;let y;return f?y="-"+(""+-h).padStart(r,"0"):y=(""+h).padStart(r,"0"),y}function Tt(h){if(!(Ae(h)||h===null||h===""))return parseInt(h,10)}function yn(h){if(!(Ae(h)||h===null||h===""))return parseFloat(h)}function Fr(h){if(!(Ae(h)||h===null||h==="")){const r=parseFloat("0."+h)*1e3;return Math.floor(r)}}function Wl(h,r,f="round"){const y=10**r;switch(f){case"expand":return h>0?Math.ceil(h*y)/y:Math.floor(h*y)/y;case"trunc":return Math.trunc(h*y)/y;case"round":return Math.round(h*y)/y;case"floor":return Math.floor(h*y)/y;case"ceil":return Math.ceil(h*y)/y;default:throw new RangeError(`Value rounding ${f} is out of range`)}}function ul(h){return h%4===0&&(h%100!==0||h%400===0)}function tn(h){return ul(h)?366:365}function $s(h,r){const f=Ys(r-1,12)+1,y=h+(r-f)/12;return f===2?ul(y)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][f-1]}function Wt(h){let r=Date.UTC(h.year,h.month-1,h.day,h.hour,h.minute,h.second,h.millisecond);return h.year<100&&h.year>=0&&(r=new Date(r),r.setUTCFullYear(h.year,h.month-1,h.day)),+r}function Fs(h,r,f){return-Mt(Vs(h,1,r),f)+r-1}function cl(h,r=4,f=1){const y=Fs(h,r,f),S=Fs(h+1,r,f);return(tn(h)-y+S)/7}function Xl(h){return h>99?h:h>xt.twoDigitCutoffYear?1900+h:2e3+h}function Rn(h,r,f,y=null){const S=new Date(h),C={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};y&&(C.timeZone=y);const k={timeZoneName:r,...C},U=new Intl.DateTimeFormat(f,k).formatToParts(S).find(q=>q.type.toLowerCase()==="timezonename");return U?U.value:null}function Pl(h,r){let f=parseInt(h,10);Number.isNaN(f)&&(f=0);const y=parseInt(r,10)||0,S=f<0||Object.is(f,-0)?-y:y;return f*60+S}function Gr(h){const r=Number(h);if(typeof h=="boolean"||h===""||!Number.isFinite(r))throw new g(`Invalid unit value ${h}`);return r}function an(h,r){const f={};for(const y in h)if(Dn(h,y)){const S=h[y];if(S==null)continue;f[r(y)]=Gr(S)}return f}function Jl(h,r){const f=Math.trunc(Math.abs(h/60)),y=Math.trunc(Math.abs(h%60)),S=h>=0?"+":"-";switch(r){case"short":return`${S}${rt(f,2)}:${rt(y,2)}`;case"narrow":return`${S}${f}${y>0?`:${y}`:""}`;case"techie":return`${S}${rt(f,2)}${rt(y,2)}`;default:throw new RangeError(`Value format ${r} is out of range for property format`)}}function Il(h){return yu(h,["hour","minute","second","millisecond"])}const pu=["January","February","March","April","May","June","July","August","September","October","November","December"],Gs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],lo=["J","F","M","A","M","J","J","A","S","O","N","D"];function bu(h){switch(h){case"narrow":return[...lo];case"short":return[...Gs];case"long":return[...pu];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 Kl=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],qa=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Zr=["M","T","W","T","F","S","S"];function Zs(h){switch(h){case"narrow":return[...Zr];case"short":return[...qa];case"long":return[...Kl];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const An=["AM","PM"],ol=["Before Christ","Anno Domini"],Su=["BC","AD"],Qr=["B","A"];function Wr(h){switch(h){case"narrow":return[...Qr];case"short":return[...Su];case"long":return[...ol];default:return null}}function es(h){return An[h.hour<12?0:1]}function nn(h,r){return Zs(r)[h.weekday-1]}function Xr(h,r){return bu(r)[h.month-1]}function ts(h,r){return Wr(r)[h.year<0?0:1]}function pn(h,r,f="always",y=!1){const S={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."]},C=["hours","minutes","seconds"].indexOf(h)===-1;if(f==="auto"&&C){const Ue=h==="days";switch(r){case 1:return Ue?"tomorrow":`next ${S[h][0]}`;case-1:return Ue?"yesterday":`last ${S[h][0]}`;case 0:return Ue?"today":`this ${S[h][0]}`}}const k=Object.is(r,-0)||r<0,U=Math.abs(r),q=U===1,fe=S[h],Ne=y?q?fe[1]:fe[2]||fe[1]:q?S[h][0]:h;return k?`${U} ${Ne} ago`:`in ${U} ${Ne}`}function Qs(h,r){let f="";for(const y of h)y.literal?f+=y.val:f+=r(y.val);return f}const Ws={D:E,DD:D,DDD:M,DDDD:T,t:H,tt:P,ttt:Q,tttt:te,T:ee,TT:Y,TTT:re,TTTT:Z,f:B,ff:z,fff:de,ffff:pe,F,FF:ae,FFF:Se,FFFF:G};class qt{static create(r,f={}){return new qt(r,f)}static parseFormat(r){let f=null,y="",S=!1;const C=[];for(let k=0;k<r.length;k++){const U=r.charAt(k);U==="'"?((y.length>0||S)&&C.push({literal:S||/^\s+$/.test(y),val:y===""?"'":y}),f=null,y="",S=!S):S||U===f?y+=U:(y.length>0&&C.push({literal:/^\s+$/.test(y),val:y}),y=U,f=U)}return y.length>0&&C.push({literal:S||/^\s+$/.test(y),val:y}),C}static macroTokenToFormatOpts(r){return Ws[r]}constructor(r,f){this.opts=f,this.loc=r,this.systemLoc=null}formatWithSystemDefault(r,f){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(r,{...this.opts,...f}).format()}dtFormatter(r,f={}){return this.loc.dtFormatter(r,{...this.opts,...f})}formatDateTime(r,f){return this.dtFormatter(r,f).format()}formatDateTimeParts(r,f){return this.dtFormatter(r,f).formatToParts()}formatInterval(r,f){return this.dtFormatter(r.start,f).dtf.formatRange(r.start.toJSDate(),r.end.toJSDate())}resolvedOptions(r,f){return this.dtFormatter(r,f).resolvedOptions()}num(r,f=0,y=void 0){if(this.opts.forceSimple)return rt(r,f);const S={...this.opts};return f>0&&(S.padTo=f),y&&(S.signDisplay=y),this.loc.numberFormatter(S).format(r)}formatDateTimeFromString(r,f){const y=this.loc.listingMode()==="en",S=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",C=(_e,St)=>this.loc.extract(r,_e,St),k=_e=>r.isOffsetFixed&&r.offset===0&&_e.allowZ?"Z":r.isValid?r.zone.formatOffset(r.ts,_e.format):"",U=()=>y?es(r):C({hour:"numeric",hourCycle:"h12"},"dayperiod"),q=(_e,St)=>y?Xr(r,_e):C(St?{month:_e}:{month:_e,day:"numeric"},"month"),fe=(_e,St)=>y?nn(r,_e):C(St?{weekday:_e}:{weekday:_e,month:"long",day:"numeric"},"weekday"),Ne=_e=>{const St=qt.macroTokenToFormatOpts(_e);return St?this.formatWithSystemDefault(r,St):_e},Ue=_e=>y?ts(r,_e):C({era:_e},"era"),Je=_e=>{switch(_e){case"S":return this.num(r.millisecond);case"u":case"SSS":return this.num(r.millisecond,3);case"s":return this.num(r.second);case"ss":return this.num(r.second,2);case"uu":return this.num(Math.floor(r.millisecond/10),2);case"uuu":return this.num(Math.floor(r.millisecond/100));case"m":return this.num(r.minute);case"mm":return this.num(r.minute,2);case"h":return this.num(r.hour%12===0?12:r.hour%12);case"hh":return this.num(r.hour%12===0?12:r.hour%12,2);case"H":return this.num(r.hour);case"HH":return this.num(r.hour,2);case"Z":return k({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return k({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return k({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return r.zone.offsetName(r.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return r.zone.offsetName(r.ts,{format:"long",locale:this.loc.locale});case"z":return r.zoneName;case"a":return U();case"d":return S?C({day:"numeric"},"day"):this.num(r.day);case"dd":return S?C({day:"2-digit"},"day"):this.num(r.day,2);case"c":return this.num(r.weekday);case"ccc":return fe("short",!0);case"cccc":return fe("long",!0);case"ccccc":return fe("narrow",!0);case"E":return this.num(r.weekday);case"EEE":return fe("short",!1);case"EEEE":return fe("long",!1);case"EEEEE":return fe("narrow",!1);case"L":return S?C({month:"numeric",day:"numeric"},"month"):this.num(r.month);case"LL":return S?C({month:"2-digit",day:"numeric"},"month"):this.num(r.month,2);case"LLL":return q("short",!0);case"LLLL":return q("long",!0);case"LLLLL":return q("narrow",!0);case"M":return S?C({month:"numeric"},"month"):this.num(r.month);case"MM":return S?C({month:"2-digit"},"month"):this.num(r.month,2);case"MMM":return q("short",!1);case"MMMM":return q("long",!1);case"MMMMM":return q("narrow",!1);case"y":return S?C({year:"numeric"},"year"):this.num(r.year);case"yy":return S?C({year:"2-digit"},"year"):this.num(r.year.toString().slice(-2),2);case"yyyy":return S?C({year:"numeric"},"year"):this.num(r.year,4);case"yyyyyy":return S?C({year:"numeric"},"year"):this.num(r.year,6);case"G":return Ue("short");case"GG":return Ue("long");case"GGGGG":return Ue("narrow");case"kk":return this.num(r.weekYear.toString().slice(-2),2);case"kkkk":return this.num(r.weekYear,4);case"W":return this.num(r.weekNumber);case"WW":return this.num(r.weekNumber,2);case"n":return this.num(r.localWeekNumber);case"nn":return this.num(r.localWeekNumber,2);case"ii":return this.num(r.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(r.localWeekYear,4);case"o":return this.num(r.ordinal);case"ooo":return this.num(r.ordinal,3);case"q":return this.num(r.quarter);case"qq":return this.num(r.quarter,2);case"X":return this.num(Math.floor(r.ts/1e3));case"x":return this.num(r.ts);default:return Ne(_e)}};return Qs(qt.parseFormat(f),Je)}formatDurationFromString(r,f){const y=this.opts.signMode==="negativeLargestOnly"?-1:1,S=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}},C=(Ne,Ue)=>Je=>{const _e=S(Je);if(_e){const St=Ue.isNegativeDuration&&_e!==Ue.largestUnit?y:1;let Yt;return this.opts.signMode==="negativeLargestOnly"&&_e!==Ue.largestUnit?Yt="never":this.opts.signMode==="all"?Yt="always":Yt="auto",this.num(Ne.get(_e)*St,Je.length,Yt)}else return Je},k=qt.parseFormat(f),U=k.reduce((Ne,{literal:Ue,val:Je})=>Ue?Ne:Ne.concat(Je),[]),q=r.shiftTo(...U.map(S).filter(Ne=>Ne)),fe={isNegativeDuration:q<0,largestUnit:Object.keys(q.values)[0]};return Qs(k,C(q,fe))}}const as=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ln(...h){const r=h.reduce((f,y)=>f+y.source,"");return RegExp(`^${r}$`)}function _n(...h){return r=>h.reduce(([f,y,S],C)=>{const[k,U,q]=C(r,S);return[{...f,...k},U||y,q]},[{},null,1]).slice(0,2)}function Ct(h,...r){if(h==null)return[null,null];for(const[f,y]of r){const S=f.exec(h);if(S)return y(S)}return[null,null]}function bn(...h){return(r,f)=>{const y={};let S;for(S=0;S<h.length;S++)y[h[S]]=Tt(r[f+S]);return[y,null,f+S]}}const ns=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,ls=`(?:${ns.source}?(?:\\[(${as.source})\\])?)?`,Pr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Xs=RegExp(`${Pr.source}${ls}`),ss=RegExp(`(?:[Tt]${Xs.source})?`),rs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ps=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Nu=/(\d{4})-?(\d{3})/,so=bn("weekYear","weekNumber","weekDay"),ro=bn("year","ordinal"),io=/(\d{4})-(\d\d)-(\d\d)/,Js=RegExp(`${Pr.source} ?(?:${ns.source}|(${as.source}))?`),uo=RegExp(`(?: ${Js.source})?`);function dl(h,r,f){const y=h[r];return Ae(y)?f:Tt(y)}function co(h,r){return[{year:dl(h,r),month:dl(h,r+1,1),day:dl(h,r+2,1)},null,r+3]}function fl(h,r){return[{hours:dl(h,r,0),minutes:dl(h,r+1,0),seconds:dl(h,r+2,0),milliseconds:Fr(h[r+3])},null,r+4]}function is(h,r){const f=!h[r]&&!h[r+1],y=Pl(h[r+1],h[r+2]),S=f?null:jt.instance(y);return[{},S,r+3]}function hl(h,r){const f=h[r]?xe.create(h[r]):null;return[{},f,r+1]}const oo=RegExp(`^T?${Pr.source}$`),fo=/^-?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 ho(h){const[r,f,y,S,C,k,U,q,fe]=h,Ne=r[0]==="-",Ue=q&&q[0]==="-",Je=(_e,St=!1)=>_e!==void 0&&(St||_e&&Ne)?-_e:_e;return[{years:Je(yn(f)),months:Je(yn(y)),weeks:Je(yn(S)),days:Je(yn(C)),hours:Je(yn(k)),minutes:Je(yn(U)),seconds:Je(yn(q),q==="-0"),milliseconds:Je(Fr(fe),Ue)}]}const mo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function us(h,r,f,y,S,C,k){const U={year:r.length===2?Xl(Tt(r)):Tt(r),month:Gs.indexOf(f)+1,day:Tt(y),hour:Tt(S),minute:Tt(C)};return k&&(U.second=Tt(k)),h&&(U.weekday=h.length>3?Kl.indexOf(h)+1:qa.indexOf(h)+1),U}const xo=/^(?:(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 go(h){const[,r,f,y,S,C,k,U,q,fe,Ne,Ue]=h,Je=us(r,S,y,f,C,k,U);let _e;return q?_e=mo[q]:fe?_e=0:_e=Pl(Ne,Ue),[Je,new jt(_e)]}function vo(h){return h.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const ju=/^(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$/,yo=/^(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$/,po=/^(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 wu(h){const[,r,f,y,S,C,k,U]=h;return[us(r,S,y,f,C,k,U),jt.utcInstance]}function bo(h){const[,r,f,y,S,C,k,U]=h;return[us(r,U,f,y,S,C,k),jt.utcInstance]}const So=ln(rs,ss),No=ln(Ps,ss),jo=ln(Nu,ss),wo=ln(Xs),Eu=_n(co,fl,is,hl),Jr=_n(so,fl,is,hl),cs=_n(ro,fl,is,hl),Eo=_n(fl,is,hl);function Mu(h){return Ct(h,[So,Eu],[No,Jr],[jo,cs],[wo,Eo])}function Tu(h){return Ct(vo(h),[xo,go])}function Cu(h){return Ct(h,[ju,wu],[yo,wu],[po,bo])}function Ou(h){return Ct(h,[fo,ho])}const Du=_n(fl);function ml(h){return Ct(h,[oo,Du])}const Mo=ln(io,uo),To=ln(Js),Co=_n(fl,is,hl);function Ru(h){return Ct(h,[Mo,Eu],[To,Co])}const Ir="Invalid Duration",xl={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}},os={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},...xl},va=146097/400,sn=146097/4800,Au={years:{quarters:4,months:12,weeks:va/7,days:va,hours:va*24,minutes:va*24*60,seconds:va*24*60*60,milliseconds:va*24*60*60*1e3},quarters:{months:3,weeks:va/28,days:va/4,hours:va*24/4,minutes:va*24*60/4,seconds:va*24*60*60/4,milliseconds:va*24*60*60*1e3/4},months:{weeks:sn/7,days:sn,hours:sn*24,minutes:sn*24*60,seconds:sn*24*60*60,milliseconds:sn*24*60*60*1e3},...xl},Sn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Kr=Sn.slice(0).reverse();function Oa(h,r,f=!1){const y={values:f?r.values:{...h.values,...r.values||{}},loc:h.loc.clone(r.loc),conversionAccuracy:r.conversionAccuracy||h.conversionAccuracy,matrix:r.matrix||h.matrix};return new Pe(y)}function ei(h,r){var f;let y=(f=r.milliseconds)!=null?f:0;for(const S of Kr.slice(1))r[S]&&(y+=r[S]*h[S].milliseconds);return y}function ti(h,r){const f=ei(h,r)<0?-1:1;Sn.reduceRight((y,S)=>{if(Ae(r[S]))return y;if(y){const C=r[y]*f,k=h[S][y],U=Math.floor(C/k);r[S]+=U*f,r[y]-=U*k*f}return S},null),Sn.reduce((y,S)=>{if(Ae(r[S]))return y;if(y){const C=r[y]%1;r[y]-=C,r[S]+=C*h[y][S]}return S},null)}function ai(h){const r={};for(const[f,y]of Object.entries(h))y!==0&&(r[f]=y);return r}class Pe{constructor(r){const f=r.conversionAccuracy==="longterm"||!1;let y=f?Au:os;r.matrix&&(y=r.matrix),this.values=r.values,this.loc=r.loc||Qe.create(),this.conversionAccuracy=f?"longterm":"casual",this.invalid=r.invalid||null,this.matrix=y,this.isLuxonDuration=!0}static fromMillis(r,f){return Pe.fromObject({milliseconds:r},f)}static fromObject(r,f={}){if(r==null||typeof r!="object")throw new g(`Duration.fromObject: argument expected to be an object, got ${r===null?"null":typeof r}`);return new Pe({values:an(r,Pe.normalizeUnit),loc:Qe.fromObject(f),conversionAccuracy:f.conversionAccuracy,matrix:f.matrix})}static fromDurationLike(r){if(ga(r))return Pe.fromMillis(r);if(Pe.isDuration(r))return r;if(typeof r=="object")return Pe.fromObject(r);throw new g(`Unknown duration argument ${r} of type ${typeof r}`)}static fromISO(r,f){const[y]=Ou(r);return y?Pe.fromObject(y,f):Pe.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static fromISOTime(r,f){const[y]=ml(r);return y?Pe.fromObject(y,f):Pe.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static invalid(r,f=null){if(!r)throw new g("need to specify a reason the Duration is invalid");const y=r instanceof xa?r:new xa(r,f);if(xt.throwOnInvalid)throw new o(y);return new Pe({invalid:y})}static normalizeUnit(r){const f={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"}[r&&r.toLowerCase()];if(!f)throw new x(r);return f}static isDuration(r){return r&&r.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(r,f={}){const y={...f,floor:f.round!==!1&&f.floor!==!1};return this.isValid?qt.create(this.loc,y).formatDurationFromString(this,r):Ir}toHuman(r={}){if(!this.isValid)return Ir;const f=r.showZeros!==!1,y=Sn.map(S=>{const C=this.values[S];return Ae(C)||C===0&&!f?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...r,unit:S.slice(0,-1)}).format(C)}).filter(S=>S);return this.loc.listFormatter({type:"conjunction",style:r.listStyle||"narrow",...r}).format(y)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let r="P";return this.years!==0&&(r+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(r+=this.months+this.quarters*3+"M"),this.weeks!==0&&(r+=this.weeks+"W"),this.days!==0&&(r+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(r+="T"),this.hours!==0&&(r+=this.hours+"H"),this.minutes!==0&&(r+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(r+=Wl(this.seconds+this.milliseconds/1e3,3)+"S"),r==="P"&&(r+="T0S"),r}toISOTime(r={}){if(!this.isValid)return null;const f=this.toMillis();return f<0||f>=864e5?null:(r={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...r,includeOffset:!1},Ce.fromMillis(f,{zone:"UTC"}).toISOTime(r))}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?ei(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(r){if(!this.isValid)return this;const f=Pe.fromDurationLike(r),y={};for(const S of Sn)(Dn(f.values,S)||Dn(this.values,S))&&(y[S]=f.get(S)+this.get(S));return Oa(this,{values:y},!0)}minus(r){if(!this.isValid)return this;const f=Pe.fromDurationLike(r);return this.plus(f.negate())}mapUnits(r){if(!this.isValid)return this;const f={};for(const y of Object.keys(this.values))f[y]=Gr(r(this.values[y],y));return Oa(this,{values:f},!0)}get(r){return this[Pe.normalizeUnit(r)]}set(r){if(!this.isValid)return this;const f={...this.values,...an(r,Pe.normalizeUnit)};return Oa(this,{values:f})}reconfigure({locale:r,numberingSystem:f,conversionAccuracy:y,matrix:S}={}){const k={loc:this.loc.clone({locale:r,numberingSystem:f}),matrix:S,conversionAccuracy:y};return Oa(this,k)}as(r){return this.isValid?this.shiftTo(r).get(r):NaN}normalize(){if(!this.isValid)return this;const r=this.toObject();return ti(this.matrix,r),Oa(this,{values:r},!0)}rescale(){if(!this.isValid)return this;const r=ai(this.normalize().shiftToAll().toObject());return Oa(this,{values:r},!0)}shiftTo(...r){if(!this.isValid)return this;if(r.length===0)return this;r=r.map(k=>Pe.normalizeUnit(k));const f={},y={},S=this.toObject();let C;for(const k of Sn)if(r.indexOf(k)>=0){C=k;let U=0;for(const fe in y)U+=this.matrix[fe][k]*y[fe],y[fe]=0;ga(S[k])&&(U+=S[k]);const q=Math.trunc(U);f[k]=q,y[k]=(U*1e3-q*1e3)/1e3}else ga(S[k])&&(y[k]=S[k]);for(const k in y)y[k]!==0&&(f[C]+=k===C?y[k]:y[k]/this.matrix[C][k]);return ti(this.matrix,f),Oa(this,{values:f},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const r={};for(const f of Object.keys(this.values))r[f]=this.values[f]===0?0:-this.values[f];return Oa(this,{values:r},!0)}removeZeros(){if(!this.isValid)return this;const r=ai(this.values);return Oa(this,{values:r},!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(r){if(!this.isValid||!r.isValid||!this.loc.equals(r.loc))return!1;function f(y,S){return y===void 0||y===0?S===void 0||S===0:y===S}for(const y of Sn)if(!f(this.values[y],r.values[y]))return!1;return!0}}const gl="Invalid Interval";function Oo(h,r){return!h||!h.isValid?gt.invalid("missing or invalid start"):!r||!r.isValid?gt.invalid("missing or invalid end"):r<h?gt.invalid("end before start",`The end of an interval must be after its start, but you had start=${h.toISO()} and end=${r.toISO()}`):null}class gt{constructor(r){this.s=r.start,this.e=r.end,this.invalid=r.invalid||null,this.isLuxonInterval=!0}static invalid(r,f=null){if(!r)throw new g("need to specify a reason the Interval is invalid");const y=r instanceof xa?r:new xa(r,f);if(xt.throwOnInvalid)throw new d(y);return new gt({invalid:y})}static fromDateTimes(r,f){const y=ba(r),S=ba(f),C=Oo(y,S);return C??new gt({start:y,end:S})}static after(r,f){const y=Pe.fromDurationLike(f),S=ba(r);return gt.fromDateTimes(S,S.plus(y))}static before(r,f){const y=Pe.fromDurationLike(f),S=ba(r);return gt.fromDateTimes(S.minus(y),S)}static fromISO(r,f){const[y,S]=(r||"").split("/",2);if(y&&S){let C,k;try{C=Ce.fromISO(y,f),k=C.isValid}catch{k=!1}let U,q;try{U=Ce.fromISO(S,f),q=U.isValid}catch{q=!1}if(k&&q)return gt.fromDateTimes(C,U);if(k){const fe=Pe.fromISO(S,f);if(fe.isValid)return gt.after(C,fe)}else if(q){const fe=Pe.fromISO(y,f);if(fe.isValid)return gt.before(U,fe)}}return gt.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static isInterval(r){return r&&r.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(r="milliseconds"){return this.isValid?this.toDuration(r).get(r):NaN}count(r="milliseconds",f){if(!this.isValid)return NaN;const y=this.start.startOf(r,f);let S;return f!=null&&f.useLocaleWeeks?S=this.end.reconfigure({locale:y.locale}):S=this.end,S=S.startOf(r,f),Math.floor(S.diff(y,r).get(r))+(S.valueOf()!==this.end.valueOf())}hasSame(r){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,r):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(r){return this.isValid?this.s>r:!1}isBefore(r){return this.isValid?this.e<=r:!1}contains(r){return this.isValid?this.s<=r&&this.e>r:!1}set({start:r,end:f}={}){return this.isValid?gt.fromDateTimes(r||this.s,f||this.e):this}splitAt(...r){if(!this.isValid)return[];const f=r.map(ba).filter(k=>this.contains(k)).sort((k,U)=>k.toMillis()-U.toMillis()),y=[];let{s:S}=this,C=0;for(;S<this.e;){const k=f[C]||this.e,U=+k>+this.e?this.e:k;y.push(gt.fromDateTimes(S,U)),S=U,C+=1}return y}splitBy(r){const f=Pe.fromDurationLike(r);if(!this.isValid||!f.isValid||f.as("milliseconds")===0)return[];let{s:y}=this,S=1,C;const k=[];for(;y<this.e;){const U=this.start.plus(f.mapUnits(q=>q*S));C=+U>+this.e?this.e:U,k.push(gt.fromDateTimes(y,C)),y=C,S+=1}return k}divideEqually(r){return this.isValid?this.splitBy(this.length()/r).slice(0,r):[]}overlaps(r){return this.e>r.s&&this.s<r.e}abutsStart(r){return this.isValid?+this.e==+r.s:!1}abutsEnd(r){return this.isValid?+r.e==+this.s:!1}engulfs(r){return this.isValid?this.s<=r.s&&this.e>=r.e:!1}equals(r){return!this.isValid||!r.isValid?!1:this.s.equals(r.s)&&this.e.equals(r.e)}intersection(r){if(!this.isValid)return this;const f=this.s>r.s?this.s:r.s,y=this.e<r.e?this.e:r.e;return f>=y?null:gt.fromDateTimes(f,y)}union(r){if(!this.isValid)return this;const f=this.s<r.s?this.s:r.s,y=this.e>r.e?this.e:r.e;return gt.fromDateTimes(f,y)}static merge(r){const[f,y]=r.sort((S,C)=>S.s-C.s).reduce(([S,C],k)=>C?C.overlaps(k)||C.abutsStart(k)?[S,C.union(k)]:[S.concat([C]),k]:[S,k],[[],null]);return y&&f.push(y),f}static xor(r){let f=null,y=0;const S=[],C=r.map(q=>[{time:q.s,type:"s"},{time:q.e,type:"e"}]),k=Array.prototype.concat(...C),U=k.sort((q,fe)=>q.time-fe.time);for(const q of U)y+=q.type==="s"?1:-1,y===1?f=q.time:(f&&+f!=+q.time&&S.push(gt.fromDateTimes(f,q.time)),f=null);return gt.merge(S)}difference(...r){return gt.xor([this].concat(r)).map(f=>this.intersection(f)).filter(f=>f&&!f.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:gl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(r=E,f={}){return this.isValid?qt.create(this.s.loc.clone(f),r).formatInterval(this):gl}toISO(r){return this.isValid?`${this.s.toISO(r)}/${this.e.toISO(r)}`:gl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:gl}toISOTime(r){return this.isValid?`${this.s.toISOTime(r)}/${this.e.toISOTime(r)}`:gl}toFormat(r,{separator:f=" – "}={}){return this.isValid?`${this.s.toFormat(r)}${f}${this.e.toFormat(r)}`:gl}toDuration(r,f){return this.isValid?this.e.diff(this.s,r,f):Pe.invalid(this.invalidReason)}mapEndpoints(r){return gt.fromDateTimes(r(this.s),r(this.e))}}class ds{static hasDST(r=xt.defaultZone){const f=Ce.now().setZone(r).set({month:12});return!r.isUniversal&&f.offset!==f.set({month:6}).offset}static isValidIANAZone(r){return xe.isValidZone(r)}static normalizeZone(r){return Gt(r,xt.defaultZone)}static getStartOfWeek({locale:r=null,locObj:f=null}={}){return(f||Qe.create(r)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:r=null,locObj:f=null}={}){return(f||Qe.create(r)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:r=null,locObj:f=null}={}){return(f||Qe.create(r)).getWeekendDays().slice()}static months(r="long",{locale:f=null,numberingSystem:y=null,locObj:S=null,outputCalendar:C="gregory"}={}){return(S||Qe.create(f,y,C)).months(r)}static monthsFormat(r="long",{locale:f=null,numberingSystem:y=null,locObj:S=null,outputCalendar:C="gregory"}={}){return(S||Qe.create(f,y,C)).months(r,!0)}static weekdays(r="long",{locale:f=null,numberingSystem:y=null,locObj:S=null}={}){return(S||Qe.create(f,y,null)).weekdays(r)}static weekdaysFormat(r="long",{locale:f=null,numberingSystem:y=null,locObj:S=null}={}){return(S||Qe.create(f,y,null)).weekdays(r,!0)}static meridiems({locale:r=null}={}){return Qe.create(r).meridiems()}static eras(r="short",{locale:f=null}={}){return Qe.create(f,null,"gregory").eras(r)}static features(){return{relative:Yr(),localeWeek:vn()}}}function ra(h,r){const f=S=>S.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),y=f(r)-f(h);return Math.floor(Pe.fromMillis(y).as("days"))}function fs(h,r,f){const y=[["years",(q,fe)=>fe.year-q.year],["quarters",(q,fe)=>fe.quarter-q.quarter+(fe.year-q.year)*4],["months",(q,fe)=>fe.month-q.month+(fe.year-q.year)*12],["weeks",(q,fe)=>{const Ne=ra(q,fe);return(Ne-Ne%7)/7}],["days",ra]],S={},C=h;let k,U;for(const[q,fe]of y)f.indexOf(q)>=0&&(k=q,S[q]=fe(h,r),U=C.plus(S),U>r?(S[q]--,h=C.plus(S),h>r&&(U=h,S[q]--,h=C.plus(S))):h=U);return[h,S,U,k]}function _u(h,r,f,y){let[S,C,k,U]=fs(h,r,f);const q=r-S,fe=f.filter(Ue=>["hours","minutes","seconds","milliseconds"].indexOf(Ue)>=0);fe.length===0&&(k<r&&(k=S.plus({[U]:1})),k!==S&&(C[U]=(C[U]||0)+q/(k-S)));const Ne=Pe.fromObject(C,y);return fe.length>0?Pe.fromMillis(q,y).shiftTo(...fe).plus(Ne):Ne}const ku="missing Intl.DateTimeFormat.formatToParts support";function et(h,r=f=>f){return{regex:h,deser:([f])=>r(no(f))}}const Is="[ ]",zu=new RegExp(Is,"g");function vl(h){return h.replace(/\./g,"\\.?").replace(zu,Is)}function Ks(h){return h.replace(/\./g,"").replace(zu," ").toLowerCase()}function Xt(h,r){return h===null?null:{regex:RegExp(h.map(vl).join("|")),deser:([f])=>h.findIndex(y=>Ks(f)===Ks(y))+r}}function er(h,r){return{regex:h,deser:([,f,y])=>Pl(f,y),groups:r}}function hs(h){return{regex:h,deser:([r])=>r}}function kn(h){return h.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function yl(h,r){const f=la(r),y=la(r,"{2}"),S=la(r,"{3}"),C=la(r,"{4}"),k=la(r,"{6}"),U=la(r,"{1,2}"),q=la(r,"{1,3}"),fe=la(r,"{1,6}"),Ne=la(r,"{1,9}"),Ue=la(r,"{2,4}"),Je=la(r,"{4,6}"),_e=$t=>({regex:RegExp(kn($t.val)),deser:([Nn])=>Nn,literal:!0}),Yt=($t=>{if(h.literal)return _e($t);switch($t.val){case"G":return Xt(r.eras("short"),0);case"GG":return Xt(r.eras("long"),0);case"y":return et(fe);case"yy":return et(Ue,Xl);case"yyyy":return et(C);case"yyyyy":return et(Je);case"yyyyyy":return et(k);case"M":return et(U);case"MM":return et(y);case"MMM":return Xt(r.months("short",!0),1);case"MMMM":return Xt(r.months("long",!0),1);case"L":return et(U);case"LL":return et(y);case"LLL":return Xt(r.months("short",!1),1);case"LLLL":return Xt(r.months("long",!1),1);case"d":return et(U);case"dd":return et(y);case"o":return et(q);case"ooo":return et(S);case"HH":return et(y);case"H":return et(U);case"hh":return et(y);case"h":return et(U);case"mm":return et(y);case"m":return et(U);case"q":return et(U);case"qq":return et(y);case"s":return et(U);case"ss":return et(y);case"S":return et(q);case"SSS":return et(S);case"u":return hs(Ne);case"uu":return hs(U);case"uuu":return et(f);case"a":return Xt(r.meridiems(),0);case"kkkk":return et(C);case"kk":return et(Ue,Xl);case"W":return et(U);case"WW":return et(y);case"E":case"c":return et(f);case"EEE":return Xt(r.weekdays("short",!1),1);case"EEEE":return Xt(r.weekdays("long",!1),1);case"ccc":return Xt(r.weekdays("short",!0),1);case"cccc":return Xt(r.weekdays("long",!0),1);case"Z":case"ZZ":return er(new RegExp(`([+-]${U.source})(?::(${y.source}))?`),2);case"ZZZ":return er(new RegExp(`([+-]${U.source})(${y.source})?`),2);case"z":return hs(/[a-z_+-/]{1,256}?/i);case" ":return hs(/[^\S\n\r]/);default:return _e($t)}})(h)||{invalidReason:ku};return Yt.token=h,Yt}const ni={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 Uu(h,r,f){const{type:y,value:S}=h;if(y==="literal"){const q=/^\s+$/.test(S);return{literal:!q,val:q?" ":S}}const C=r[y];let k=y;y==="hour"&&(r.hour12!=null?k=r.hour12?"hour12":"hour24":r.hourCycle!=null?r.hourCycle==="h11"||r.hourCycle==="h12"?k="hour12":k="hour24":k=f.hour12?"hour12":"hour24");let U=ni[k];if(typeof U=="object"&&(U=U[C]),U)return{literal:!1,val:U}}function zn(h){return[`^${h.map(f=>f.regex).reduce((f,y)=>`${f}(${y.source})`,"")}$`,h]}function Hu(h,r,f){const y=h.match(r);if(y){const S={};let C=1;for(const k in f)if(Dn(f,k)){const U=f[k],q=U.groups?U.groups+1:1;!U.literal&&U.token&&(S[U.token.val[0]]=U.deser(y.slice(C,C+q))),C+=q}return[y,S]}else return[y,{}]}function Lu(h){const r=C=>{switch(C){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 f=null,y;return Ae(h.z)||(f=xe.create(h.z)),Ae(h.Z)||(f||(f=new jt(h.Z)),y=h.Z),Ae(h.q)||(h.M=(h.q-1)*3+1),Ae(h.h)||(h.h<12&&h.a===1?h.h+=12:h.h===12&&h.a===0&&(h.h=0)),h.G===0&&h.y&&(h.y=-h.y),Ae(h.u)||(h.S=Fr(h.u)),[Object.keys(h).reduce((C,k)=>{const U=r(k);return U&&(C[U]=h[k]),C},{}),f,y]}let tr=null;function Ro(){return tr||(tr=Ce.fromMillis(1555555555555)),tr}function Ao(h,r){if(h.literal)return h;const f=qt.macroTokenToFormatOpts(h.val),y=ya(f,r);return y==null||y.includes(void 0)?h:y}function qu(h,r){return Array.prototype.concat(...h.map(f=>Ao(f,r)))}class li{constructor(r,f){if(this.locale=r,this.format=f,this.tokens=qu(qt.parseFormat(f),r),this.units=this.tokens.map(y=>yl(y,r)),this.disqualifyingUnit=this.units.find(y=>y.invalidReason),!this.disqualifyingUnit){const[y,S]=zn(this.units);this.regex=RegExp(y,"i"),this.handlers=S}}explainFromTokens(r){if(this.isValid){const[f,y]=Hu(r,this.regex,this.handlers),[S,C,k]=y?Lu(y):[null,null,void 0];if(Dn(y,"a")&&Dn(y,"H"))throw new m("Can't include meridiem when specifying 24-hour format");return{input:r,tokens:this.tokens,regex:this.regex,rawMatches:f,matches:y,result:S,zone:C,specificOffset:k}}else return{input:r,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function si(h,r,f){return new li(h,f).explainFromTokens(r)}function ri(h,r,f){const{result:y,zone:S,specificOffset:C,invalidReason:k}=si(h,r,f);return[y,S,C,k]}function ya(h,r){if(!h)return null;const y=qt.create(r,h).dtFormatter(Ro()),S=y.formatToParts(),C=y.resolvedOptions();return S.map(k=>Uu(k,h,C))}const pl="Invalid DateTime",oa=864e13;function Va(h){return new xa("unsupported zone",`the zone "${h.name}" is not supported`)}function ms(h){return h.weekData===null&&(h.weekData=Lt(h.c)),h.weekData}function bl(h){return h.localWeekData===null&&(h.localWeekData=Lt(h.c,h.loc.getMinDaysInFirstWeek(),h.loc.getStartOfWeek())),h.localWeekData}function Ba(h,r){const f={ts:h.ts,zone:h.zone,c:h.c,o:h.o,loc:h.loc,invalid:h.invalid};return new Ce({...f,...r,old:f})}function ar(h,r,f){let y=h-r*60*1e3;const S=f.offset(y);if(r===S)return[y,r];y-=(S-r)*60*1e3;const C=f.offset(y);return S===C?[y,S]:[h-Math.min(S,C)*60*1e3,Math.max(S,C)]}function Ya(h,r){h+=r*60*1e3;const f=new Date(h);return{year:f.getUTCFullYear(),month:f.getUTCMonth()+1,day:f.getUTCDate(),hour:f.getUTCHours(),minute:f.getUTCMinutes(),second:f.getUTCSeconds(),millisecond:f.getUTCMilliseconds()}}function xs(h,r,f){return ar(Wt(h),r,f)}function gs(h,r){const f=h.o,y=h.c.year+Math.trunc(r.years),S=h.c.month+Math.trunc(r.months)+Math.trunc(r.quarters)*3,C={...h.c,year:y,month:S,day:Math.min(h.c.day,$s(y,S))+Math.trunc(r.days)+Math.trunc(r.weeks)*7},k=Pe.fromObject({years:r.years-Math.trunc(r.years),quarters:r.quarters-Math.trunc(r.quarters),months:r.months-Math.trunc(r.months),weeks:r.weeks-Math.trunc(r.weeks),days:r.days-Math.trunc(r.days),hours:r.hours,minutes:r.minutes,seconds:r.seconds,milliseconds:r.milliseconds}).as("milliseconds"),U=Wt(C);let[q,fe]=ar(U,f,h.zone);return k!==0&&(q+=k,fe=h.zone.offset(q)),{ts:q,o:fe}}function Da(h,r,f,y,S,C){const{setZone:k,zone:U}=f;if(h&&Object.keys(h).length!==0||r){const q=r||U,fe=Ce.fromObject(h,{...f,zone:q,specificOffset:C});return k?fe:fe.setZone(U)}else return Ce.invalid(new xa("unparsable",`the input "${S}" can't be parsed as ${y}`))}function nr(h,r,f=!0){return h.isValid?qt.create(Qe.create("en-US"),{allowZ:f,forceSimple:!0}).formatDateTimeFromString(h,r):null}function Pt(h,r,f){const y=h.c.year>9999||h.c.year<0;let S="";if(y&&h.c.year>=0&&(S+="+"),S+=rt(h.c.year,y?6:4),f==="year")return S;if(r){if(S+="-",S+=rt(h.c.month),f==="month")return S;S+="-"}else if(S+=rt(h.c.month),f==="month")return S;return S+=rt(h.c.day),S}function lr(h,r,f,y,S,C,k){let U=!f||h.c.millisecond!==0||h.c.second!==0,q="";switch(k){case"day":case"month":case"year":break;default:if(q+=rt(h.c.hour),k==="hour")break;if(r){if(q+=":",q+=rt(h.c.minute),k==="minute")break;U&&(q+=":",q+=rt(h.c.second))}else{if(q+=rt(h.c.minute),k==="minute")break;U&&(q+=rt(h.c.second))}if(k==="second")break;U&&(!y||h.c.millisecond!==0)&&(q+=".",q+=rt(h.c.millisecond,3))}return S&&(h.isOffsetFixed&&h.offset===0&&!C?q+="Z":h.o<0?(q+="-",q+=rt(Math.trunc(-h.o/60)),q+=":",q+=rt(Math.trunc(-h.o%60))):(q+="+",q+=rt(Math.trunc(h.o/60)),q+=":",q+=rt(Math.trunc(h.o%60)))),C&&(q+="["+h.zone.ianaName+"]"),q}const $a={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Vu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},sr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Fa=["year","month","day","hour","minute","second","millisecond"],ii=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Bu=["year","ordinal","hour","minute","second","millisecond"];function Sl(h){const r={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"}[h.toLowerCase()];if(!r)throw new x(h);return r}function ui(h){switch(h.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Sl(h)}}function pa(h){if(rn===void 0&&(rn=xt.now()),h.type!=="iana")return h.offset(rn);const r=h.name;let f=ia.get(r);return f===void 0&&(f=h.offset(rn),ia.set(r,f)),f}function Un(h,r){const f=Gt(r.zone,xt.defaultZone);if(!f.isValid)return Ce.invalid(Va(f));const y=Qe.fromObject(r);let S,C;if(Ae(h.year))S=xt.now();else{for(const q of Fa)Ae(h[q])&&(h[q]=$a[q]);const k=Bs(h)||On(h);if(k)return Ce.invalid(k);const U=pa(f);[S,C]=xs(h,U,f)}return new Ce({ts:S,zone:f,loc:y,o:C})}function Hn(h,r,f){const y=Ae(f.round)?!0:f.round,S=Ae(f.rounding)?"trunc":f.rounding,C=(U,q)=>(U=Wl(U,y||f.calendary?0:2,f.calendary?"round":S),r.loc.clone(f).relFormatter(f).format(U,q)),k=U=>f.calendary?r.hasSame(h,U)?0:r.startOf(U).diff(h.startOf(U),U).get(U):r.diff(h,U).get(U);if(f.unit)return C(k(f.unit),f.unit);for(const U of f.units){const q=k(U);if(Math.abs(q)>=1)return C(q,U)}return C(h>r?-0:0,f.units[f.units.length-1])}function vs(h){let r={},f;return h.length>0&&typeof h[h.length-1]=="object"?(r=h[h.length-1],f=Array.from(h).slice(0,h.length-1)):f=Array.from(h),[r,f]}let rn;const ia=new Map;class Ce{constructor(r){const f=r.zone||xt.defaultZone;let y=r.invalid||(Number.isNaN(r.ts)?new xa("invalid input"):null)||(f.isValid?null:Va(f));this.ts=Ae(r.ts)?xt.now():r.ts;let S=null,C=null;if(!y)if(r.old&&r.old.ts===this.ts&&r.old.zone.equals(f))[S,C]=[r.old.c,r.old.o];else{const U=ga(r.o)&&!r.old?r.o:f.offset(this.ts);S=Ya(this.ts,U),y=Number.isNaN(S.year)?new xa("invalid input"):null,S=y?null:S,C=y?null:U}this._zone=f,this.loc=r.loc||Qe.create(),this.invalid=y,this.weekData=null,this.localWeekData=null,this.c=S,this.o=C,this.isLuxonDateTime=!0}static now(){return new Ce({})}static local(){const[r,f]=vs(arguments),[y,S,C,k,U,q,fe]=f;return Un({year:y,month:S,day:C,hour:k,minute:U,second:q,millisecond:fe},r)}static utc(){const[r,f]=vs(arguments),[y,S,C,k,U,q,fe]=f;return r.zone=jt.utcInstance,Un({year:y,month:S,day:C,hour:k,minute:U,second:q,millisecond:fe},r)}static fromJSDate(r,f={}){const y=gu(r)?r.valueOf():NaN;if(Number.isNaN(y))return Ce.invalid("invalid input");const S=Gt(f.zone,xt.defaultZone);return S.isValid?new Ce({ts:y,zone:S,loc:Qe.fromObject(f)}):Ce.invalid(Va(S))}static fromMillis(r,f={}){if(ga(r))return r<-oa||r>oa?Ce.invalid("Timestamp out of range"):new Ce({ts:r,zone:Gt(f.zone,xt.defaultZone),loc:Qe.fromObject(f)});throw new g(`fromMillis requires a numerical input, but received a ${typeof r} with value ${r}`)}static fromSeconds(r,f={}){if(ga(r))return new Ce({ts:r*1e3,zone:Gt(f.zone,xt.defaultZone),loc:Qe.fromObject(f)});throw new g("fromSeconds requires a numerical input")}static fromObject(r,f={}){r=r||{};const y=Gt(f.zone,xt.defaultZone);if(!y.isValid)return Ce.invalid(Va(y));const S=Qe.fromObject(f),C=an(r,ui),{minDaysInFirstWeek:k,startOfWeek:U}=mu(C,S),q=xt.now(),fe=Ae(f.specificOffset)?y.offset(q):f.specificOffset,Ne=!Ae(C.ordinal),Ue=!Ae(C.year),Je=!Ae(C.month)||!Ae(C.day),_e=Ue||Je,St=C.weekYear||C.weekNumber;if((_e||Ne)&&St)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Je&&Ne)throw new m("Can't mix ordinal dates with month/day");const Yt=St||C.weekday&&!_e;let $t,Nn,un=Ya(q,fe);Yt?($t=ii,Nn=Vu,un=Lt(un,k,U)):Ne?($t=Bu,Nn=sr,un=Zl(un)):($t=Fa,Nn=$a);let rr=!1;for(const Qa of $t){const ir=C[Qa];Ae(ir)?rr?C[Qa]=Nn[Qa]:C[Qa]=un[Qa]:rr=!0}const Ln=Yt?xu(C,k,U):Ne?Ql(C):Bs(C),Za=Ln||On(C);if(Za)return Ce.invalid(Za);const jn=Yt?Cn(C,k,U):Ne?hu(C):C,[cn,ci]=xs(jn,fe,y),qn=new Ce({ts:cn,zone:y,o:ci,loc:S});return C.weekday&&_e&&r.weekday!==qn.weekday?Ce.invalid("mismatched weekday",`you can't specify both a weekday of ${C.weekday} and a date of ${qn.toISO()}`):qn.isValid?qn:Ce.invalid(qn.invalid)}static fromISO(r,f={}){const[y,S]=Mu(r);return Da(y,S,f,"ISO 8601",r)}static fromRFC2822(r,f={}){const[y,S]=Tu(r);return Da(y,S,f,"RFC 2822",r)}static fromHTTP(r,f={}){const[y,S]=Cu(r);return Da(y,S,f,"HTTP",f)}static fromFormat(r,f,y={}){if(Ae(r)||Ae(f))throw new g("fromFormat requires an input string and a format");const{locale:S=null,numberingSystem:C=null}=y,k=Qe.fromOpts({locale:S,numberingSystem:C,defaultToEN:!0}),[U,q,fe,Ne]=ri(k,r,f);return Ne?Ce.invalid(Ne):Da(U,q,y,`format ${f}`,r,fe)}static fromString(r,f,y={}){return Ce.fromFormat(r,f,y)}static fromSQL(r,f={}){const[y,S]=Ru(r);return Da(y,S,f,"SQL",r)}static invalid(r,f=null){if(!r)throw new g("need to specify a reason the DateTime is invalid");const y=r instanceof xa?r:new xa(r,f);if(xt.throwOnInvalid)throw new u(y);return new Ce({invalid:y})}static isDateTime(r){return r&&r.isLuxonDateTime||!1}static parseFormatForOpts(r,f={}){const y=ya(r,Qe.fromObject(f));return y?y.map(S=>S?S.val:null).join(""):null}static expandFormat(r,f={}){return qu(qt.parseFormat(r),Qe.fromObject(f)).map(S=>S.val).join("")}static resetCache(){rn=void 0,ia.clear()}get(r){return this[r]}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?ms(this).weekYear:NaN}get weekNumber(){return this.isValid?ms(this).weekNumber:NaN}get weekday(){return this.isValid?ms(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?bl(this).weekday:NaN}get localWeekNumber(){return this.isValid?bl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?bl(this).weekYear:NaN}get ordinal(){return this.isValid?Zl(this.c).ordinal:NaN}get monthShort(){return this.isValid?ds.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ds.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ds.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ds.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 r=864e5,f=6e4,y=Wt(this.c),S=this.zone.offset(y-r),C=this.zone.offset(y+r),k=this.zone.offset(y-S*f),U=this.zone.offset(y-C*f);if(k===U)return[this];const q=y-k*f,fe=y-U*f,Ne=Ya(q,k),Ue=Ya(fe,U);return Ne.hour===Ue.hour&&Ne.minute===Ue.minute&&Ne.second===Ue.second&&Ne.millisecond===Ue.millisecond?[Ba(this,{ts:q}),Ba(this,{ts:fe})]:[this]}get isInLeapYear(){return ul(this.year)}get daysInMonth(){return $s(this.year,this.month)}get daysInYear(){return this.isValid?tn(this.year):NaN}get weeksInWeekYear(){return this.isValid?cl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?cl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(r={}){const{locale:f,numberingSystem:y,calendar:S}=qt.create(this.loc.clone(r),r).resolvedOptions(this);return{locale:f,numberingSystem:y,outputCalendar:S}}toUTC(r=0,f={}){return this.setZone(jt.instance(r),f)}toLocal(){return this.setZone(xt.defaultZone)}setZone(r,{keepLocalTime:f=!1,keepCalendarTime:y=!1}={}){if(r=Gt(r,xt.defaultZone),r.equals(this.zone))return this;if(r.isValid){let S=this.ts;if(f||y){const C=r.offset(this.ts),k=this.toObject();[S]=xs(k,C,r)}return Ba(this,{ts:S,zone:r})}else return Ce.invalid(Va(r))}reconfigure({locale:r,numberingSystem:f,outputCalendar:y}={}){const S=this.loc.clone({locale:r,numberingSystem:f,outputCalendar:y});return Ba(this,{loc:S})}setLocale(r){return this.reconfigure({locale:r})}set(r){if(!this.isValid)return this;const f=an(r,ui),{minDaysInFirstWeek:y,startOfWeek:S}=mu(f,this.loc),C=!Ae(f.weekYear)||!Ae(f.weekNumber)||!Ae(f.weekday),k=!Ae(f.ordinal),U=!Ae(f.year),q=!Ae(f.month)||!Ae(f.day),fe=U||q,Ne=f.weekYear||f.weekNumber;if((fe||k)&&Ne)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(q&&k)throw new m("Can't mix ordinal dates with month/day");let Ue;C?Ue=Cn({...Lt(this.c,y,S),...f},y,S):Ae(f.ordinal)?(Ue={...this.toObject(),...f},Ae(f.day)&&(Ue.day=Math.min($s(Ue.year,Ue.month),Ue.day))):Ue=hu({...Zl(this.c),...f});const[Je,_e]=xs(Ue,this.o,this.zone);return Ba(this,{ts:Je,o:_e})}plus(r){if(!this.isValid)return this;const f=Pe.fromDurationLike(r);return Ba(this,gs(this,f))}minus(r){if(!this.isValid)return this;const f=Pe.fromDurationLike(r).negate();return Ba(this,gs(this,f))}startOf(r,{useLocaleWeeks:f=!1}={}){if(!this.isValid)return this;const y={},S=Pe.normalizeUnit(r);switch(S){case"years":y.month=1;case"quarters":case"months":y.day=1;case"weeks":case"days":y.hour=0;case"hours":y.minute=0;case"minutes":y.second=0;case"seconds":y.millisecond=0;break}if(S==="weeks")if(f){const C=this.loc.getStartOfWeek(),{weekday:k}=this;k<C&&(y.weekNumber=this.weekNumber-1),y.weekday=C}else y.weekday=1;if(S==="quarters"){const C=Math.ceil(this.month/3);y.month=(C-1)*3+1}return this.set(y)}endOf(r,f){return this.isValid?this.plus({[r]:1}).startOf(r,f).minus(1):this}toFormat(r,f={}){return this.isValid?qt.create(this.loc.redefaultToEN(f)).formatDateTimeFromString(this,r):pl}toLocaleString(r=E,f={}){return this.isValid?qt.create(this.loc.clone(f),r).formatDateTime(this):pl}toLocaleParts(r={}){return this.isValid?qt.create(this.loc.clone(r),r).formatDateTimeParts(this):[]}toISO({format:r="extended",suppressSeconds:f=!1,suppressMilliseconds:y=!1,includeOffset:S=!0,extendedZone:C=!1,precision:k="milliseconds"}={}){if(!this.isValid)return null;k=Sl(k);const U=r==="extended";let q=Pt(this,U,k);return Fa.indexOf(k)>=3&&(q+="T"),q+=lr(this,U,f,y,S,C,k),q}toISODate({format:r="extended",precision:f="day"}={}){return this.isValid?Pt(this,r==="extended",Sl(f)):null}toISOWeekDate(){return nr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:r=!1,suppressSeconds:f=!1,includeOffset:y=!0,includePrefix:S=!1,extendedZone:C=!1,format:k="extended",precision:U="milliseconds"}={}){return this.isValid?(U=Sl(U),(S&&Fa.indexOf(U)>=3?"T":"")+lr(this,k==="extended",f,r,y,C,U)):null}toRFC2822(){return nr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return nr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Pt(this,!0):null}toSQLTime({includeOffset:r=!0,includeZone:f=!1,includeOffsetSpace:y=!0}={}){let S="HH:mm:ss.SSS";return(f||r)&&(y&&(S+=" "),f?S+="z":r&&(S+="ZZ")),nr(this,S,!0)}toSQL(r={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(r)}`:null}toString(){return this.isValid?this.toISO():pl}[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(r={}){if(!this.isValid)return{};const f={...this.c};return r.includeConfig&&(f.outputCalendar=this.outputCalendar,f.numberingSystem=this.loc.numberingSystem,f.locale=this.loc.locale),f}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(r,f="milliseconds",y={}){if(!this.isValid||!r.isValid)return Pe.invalid("created by diffing an invalid DateTime");const S={locale:this.locale,numberingSystem:this.numberingSystem,...y},C=il(f).map(Pe.normalizeUnit),k=r.valueOf()>this.valueOf(),U=k?this:r,q=k?r:this,fe=_u(U,q,C,S);return k?fe.negate():fe}diffNow(r="milliseconds",f={}){return this.diff(Ce.now(),r,f)}until(r){return this.isValid?gt.fromDateTimes(this,r):this}hasSame(r,f,y){if(!this.isValid)return!1;const S=r.valueOf(),C=this.setZone(r.zone,{keepLocalTime:!0});return C.startOf(f,y)<=S&&S<=C.endOf(f,y)}equals(r){return this.isValid&&r.isValid&&this.valueOf()===r.valueOf()&&this.zone.equals(r.zone)&&this.loc.equals(r.loc)}toRelative(r={}){if(!this.isValid)return null;const f=r.base||Ce.fromObject({},{zone:this.zone}),y=r.padding?this<f?-r.padding:r.padding:0;let S=["years","months","days","hours","minutes","seconds"],C=r.unit;return Array.isArray(r.unit)&&(S=r.unit,C=void 0),Hn(f,this.plus(y),{...r,numeric:"always",units:S,unit:C})}toRelativeCalendar(r={}){return this.isValid?Hn(r.base||Ce.fromObject({},{zone:this.zone}),this,{...r,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...r){if(!r.every(Ce.isDateTime))throw new g("min requires all arguments be DateTimes");return vu(r,f=>f.valueOf(),Math.min)}static max(...r){if(!r.every(Ce.isDateTime))throw new g("max requires all arguments be DateTimes");return vu(r,f=>f.valueOf(),Math.max)}static fromFormatExplain(r,f,y={}){const{locale:S=null,numberingSystem:C=null}=y,k=Qe.fromOpts({locale:S,numberingSystem:C,defaultToEN:!0});return si(k,r,f)}static fromStringExplain(r,f,y={}){return Ce.fromFormatExplain(r,f,y)}static buildFormatParser(r,f={}){const{locale:y=null,numberingSystem:S=null}=f,C=Qe.fromOpts({locale:y,numberingSystem:S,defaultToEN:!0});return new li(C,r)}static fromFormatParser(r,f,y={}){if(Ae(r)||Ae(f))throw new g("fromFormatParser requires an input string and a format parser");const{locale:S=null,numberingSystem:C=null}=y,k=Qe.fromOpts({locale:S,numberingSystem:C,defaultToEN:!0});if(!k.equals(f.locale))throw new g(`fromFormatParser called with a locale of ${k}, but the format parser was created for ${f.locale}`);const{result:U,zone:q,specificOffset:fe,invalidReason:Ne}=f.explainFromTokens(r);return Ne?Ce.invalid(Ne):Da(U,q,y,`format ${f.format}`,r,fe)}static get DATE_SHORT(){return E}static get DATE_MED(){return D}static get DATE_MED_WITH_WEEKDAY(){return R}static get DATE_FULL(){return M}static get DATE_HUGE(){return T}static get TIME_SIMPLE(){return H}static get TIME_WITH_SECONDS(){return P}static get TIME_WITH_SHORT_OFFSET(){return Q}static get TIME_WITH_LONG_OFFSET(){return te}static get TIME_24_SIMPLE(){return ee}static get TIME_24_WITH_SECONDS(){return Y}static get TIME_24_WITH_SHORT_OFFSET(){return re}static get TIME_24_WITH_LONG_OFFSET(){return Z}static get DATETIME_SHORT(){return B}static get DATETIME_SHORT_WITH_SECONDS(){return F}static get DATETIME_MED(){return z}static get DATETIME_MED_WITH_SECONDS(){return ae}static get DATETIME_MED_WITH_WEEKDAY(){return le}static get DATETIME_FULL(){return de}static get DATETIME_FULL_WITH_SECONDS(){return Se}static get DATETIME_HUGE(){return pe}static get DATETIME_HUGE_WITH_SECONDS(){return G}}function ba(h){if(Ce.isDateTime(h))return h;if(h&&h.valueOf&&ga(h.valueOf()))return Ce.fromJSDate(h);if(h&&typeof h=="object")return Ce.fromObject(h);throw new g(`Unknown datetime argument: ${h}, of type ${typeof h}`)}const Ga="3.7.2";return Ma.DateTime=Ce,Ma.Duration=Pe,Ma.FixedOffsetZone=jt,Ma.IANAZone=xe,Ma.Info=ds,Ma.Interval=gt,Ma.InvalidZone=na,Ma.Settings=xt,Ma.SystemZone=we,Ma.VERSION=Ga,Ma.Zone=ie,Ma}var Ex;function Xf(){return Ex||(Ex=1,(function(s){var x,g,j,b,p,Of,E,Bl;Object.defineProperty(s,"__esModule",{value:!0}),s.CronDate=s.DAYS_IN_MONTH=s.DateMathOp=s.TimeUnit=void 0;const u=B2();var d;(function(M){M.Second="Second",M.Minute="Minute",M.Hour="Hour",M.Day="Day",M.Month="Month",M.Year="Year"})(d||(s.TimeUnit=d={}));var o;(function(M){M.Add="Add",M.Subtract="Subtract"})(o||(s.DateMathOp=o={})),s.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const R=class R{constructor(T,H){st(this,E);st(this,x);st(this,g,null);st(this,j,null);st(this,b,{add:{[d.Year]:this.addYear.bind(this),[d.Month]:this.addMonth.bind(this),[d.Day]:this.addDay.bind(this),[d.Hour]:this.addHour.bind(this),[d.Minute]:this.addMinute.bind(this),[d.Second]:this.addSecond.bind(this)},subtract:{[d.Year]:this.subtractYear.bind(this),[d.Month]:this.subtractMonth.bind(this),[d.Day]:this.subtractDay.bind(this),[d.Hour]:this.subtractHour.bind(this),[d.Minute]:this.subtractMinute.bind(this),[d.Second]:this.subtractSecond.bind(this)}});const P={zone:H};if(T?T instanceof R?(Oe(this,x,I(T,x)),Oe(this,g,I(T,g)),Oe(this,j,I(T,j))):T instanceof Date?Oe(this,x,u.DateTime.fromJSDate(T,P)):typeof T=="number"?Oe(this,x,u.DateTime.fromMillis(T,P)):(Oe(this,x,u.DateTime.fromISO(T,P)),I(this,x).isValid||Oe(this,x,u.DateTime.fromRFC2822(T,P)),I(this,x).isValid||Oe(this,x,u.DateTime.fromSQL(T,P)),I(this,x).isValid||Oe(this,x,u.DateTime.fromFormat(T,"EEE, d MMM yyyy HH:mm:ss",P))):Oe(this,x,u.DateTime.local()),!I(this,x).isValid)throw new Error(`CronDate: unhandled timestamp: ${T}`);H&&H!==I(this,x).zoneName&&Oe(this,x,I(this,x).setZone(H))}get dstStart(){return I(this,g)}set dstStart(T){Oe(this,g,T)}get dstEnd(){return I(this,j)}set dstEnd(T){Oe(this,j,T)}addYear(){Oe(this,x,I(this,x).plus({years:1}))}addMonth(){Oe(this,x,I(this,x).plus({months:1}).startOf("month"))}addDay(){Oe(this,x,I(this,x).plus({days:1}).startOf("day"))}addHour(){Oe(this,x,I(this,x).plus({hours:1}).startOf("hour"))}addMinute(){Oe(this,x,I(this,x).plus({minutes:1}).startOf("minute"))}addSecond(){Oe(this,x,I(this,x).plus({seconds:1}))}subtractYear(){Oe(this,x,I(this,x).minus({years:1}))}subtractMonth(){Oe(this,x,I(this,x).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Oe(this,x,I(this,x).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Oe(this,x,I(this,x).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Oe(this,x,I(this,x).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Oe(this,x,I(this,x).minus({seconds:1}))}addUnit(T){I(this,b).add[T]()}subtractUnit(T){I(this,b).subtract[T]()}invokeDateOperation(T,H){if(T===o.Add){this.addUnit(H);return}if(T===o.Subtract){this.subtractUnit(H);return}throw new Error(`Invalid verb: ${T}`)}getDate(){return I(this,x).day}getFullYear(){return I(this,x).year}getDay(){const T=I(this,x).weekday;return T===7?0:T}getMonth(){return I(this,x).month-1}getHours(){return I(this,x).hour}getMinutes(){return I(this,x).minute}getSeconds(){return I(this,x).second}getMilliseconds(){return I(this,x).millisecond}getUTCOffset(){return I(this,x).offset}setStartOfDay(){Oe(this,x,I(this,x).startOf("day"))}setEndOfDay(){Oe(this,x,I(this,x).endOf("day"))}getTime(){return I(this,x).valueOf()}getUTCDate(){return Te(this,E,Bl).call(this).day}getUTCFullYear(){return Te(this,E,Bl).call(this).year}getUTCDay(){const T=Te(this,E,Bl).call(this).weekday;return T===7?0:T}getUTCMonth(){return Te(this,E,Bl).call(this).month-1}getUTCHours(){return Te(this,E,Bl).call(this).hour}getUTCMinutes(){return Te(this,E,Bl).call(this).minute}getUTCSeconds(){return Te(this,E,Bl).call(this).second}toISOString(){return I(this,x).toUTC().toISO()}toJSON(){return I(this,x).toJSON()}setDate(T){Oe(this,x,I(this,x).set({day:T}))}setFullYear(T){Oe(this,x,I(this,x).set({year:T}))}setDay(T){Oe(this,x,I(this,x).set({weekday:T}))}setMonth(T){Oe(this,x,I(this,x).set({month:T+1}))}setHours(T){Oe(this,x,I(this,x).set({hour:T}))}setMinutes(T){Oe(this,x,I(this,x).set({minute:T}))}setSeconds(T){Oe(this,x,I(this,x).set({second:T}))}setMilliseconds(T){Oe(this,x,I(this,x).set({millisecond:T}))}toString(){return this.toDate().toString()}toDate(){return I(this,x).toJSDate()}isLastDayOfMonth(){var P;const{day:T,month:H}=I(this,x);if(H===2){const Q=Te(P=R,p,Of).call(P,I(this,x).year);return T===s.DAYS_IN_MONTH[H-1]-(Q?0:1)}return T===s.DAYS_IN_MONTH[H-1]}isLastWeekdayOfMonth(){var Q;const{day:T,month:H}=I(this,x);let P;return H===2?P=s.DAYS_IN_MONTH[H-1]-(Te(Q=R,p,Of).call(Q,I(this,x).year)?0:1):P=s.DAYS_IN_MONTH[H-1],T>P-7}applyDateOperation(T,H,P){if(H===d.Month||H===d.Day){this.invokeDateOperation(T,H);return}const Q=this.getHours();this.invokeDateOperation(T,H);const te=this.getHours(),ee=te-Q;ee===2?P!==24&&(this.dstStart=te):ee===0&&this.getMinutes()===0&&this.getSeconds()===0&&P!==24&&(this.dstEnd=te)}};x=new WeakMap,g=new WeakMap,j=new WeakMap,b=new WeakMap,p=new WeakSet,Of=function(T){return T%4===0&&T%100!==0||T%400===0},E=new WeakSet,Bl=function(){return I(this,x).toUTC()},st(R,p);let m=R;s.CronDate=m,s.default=m})(pf)),pf}var Mx;function Y2(){if(Mx)return Xi;Mx=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronMonth=void 0;const s=Xf(),u=zs(),d=1,o=12,m=Object.freeze([]);let x=class extends u.CronField{static get min(){return d}static get max(){return o}static get chars(){return m}static get daysInMonth(){return s.DAYS_IN_MONTH}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}};return Xi.CronMonth=x,Xi}var Pi={},Tx;function $2(){if(Tx)return Pi;Tx=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.CronSecond=void 0;const s=zs(),u=0,d=59,o=Object.freeze([]);let m=class extends s.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(g,j){super(g,j),this.validate()}get values(){return super.values}};return Pi.CronSecond=m,Pi}var Cx;function Pf(){return Cx||(Cx=1,(function(s){var u=Cs&&Cs.__createBinding||(Object.create?(function(o,m,x,g){g===void 0&&(g=x);var j=Object.getOwnPropertyDescriptor(m,x);(!j||("get"in j?!m.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return m[x]}}),Object.defineProperty(o,g,j)}):(function(o,m,x,g){g===void 0&&(g=x),o[g]=m[x]})),d=Cs&&Cs.__exportStar||function(o,m){for(var x in o)x!=="default"&&!Object.prototype.hasOwnProperty.call(m,x)&&u(m,o,x)};Object.defineProperty(s,"__esModule",{value:!0}),d(U2(),s),d(H2(),s),d(L2(),s),d(zs(),s),d(q2(),s),d(V2(),s),d(Y2(),s),d($2(),s)})(Cs)),Cs}var Ox;function Lg(){var d,o,m,x,g,j,b,p,Ug,Hg;if(Ox)return $i;Ox=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.CronFieldCollection=void 0;const s=Pf();let u=(p=class{constructor({second:R,minute:M,hour:T,dayOfMonth:H,month:P,dayOfWeek:Q}){st(this,d);st(this,o);st(this,m);st(this,x);st(this,g);st(this,j);if(!R)throw new Error("Validation error, Field second is missing");if(!M)throw new Error("Validation error, Field minute is missing");if(!T)throw new Error("Validation error, Field hour is missing");if(!H)throw new Error("Validation error, Field dayOfMonth is missing");if(!P)throw new Error("Validation error, Field month is missing");if(!Q)throw new Error("Validation error, Field dayOfWeek is missing");if(P.values.length===1&&!H.hasLastChar&&!(parseInt(H.values[0],10)<=s.CronMonth.daysInMonth[P.values[0]-1]))throw new Error("Invalid explicit day of month definition");Oe(this,d,R),Oe(this,o,M),Oe(this,m,T),Oe(this,g,P),Oe(this,j,Q),Oe(this,x,H)}static from(R,M){return new p({second:this.resolveField(s.CronSecond,R.second,M.second),minute:this.resolveField(s.CronMinute,R.minute,M.minute),hour:this.resolveField(s.CronHour,R.hour,M.hour),dayOfMonth:this.resolveField(s.CronDayOfMonth,R.dayOfMonth,M.dayOfMonth),month:this.resolveField(s.CronMonth,R.month,M.month),dayOfWeek:this.resolveField(s.CronDayOfWeek,R.dayOfWeek,M.dayOfWeek)})}static resolveField(R,M,T){return T?T instanceof s.CronField?T:new R(T):M}get second(){return I(this,d)}get minute(){return I(this,o)}get hour(){return I(this,m)}get dayOfMonth(){return I(this,x)}get month(){return I(this,g)}get dayOfWeek(){return I(this,j)}static compactField(R){if(R.length===0)return[];const M=[];let T;return R.forEach((H,P,Q)=>{if(T===void 0){T={start:H,count:1};return}const te=Q[P-1]||T.start,ee=Q[P+1];if(H==="L"||H==="W"){M.push(T),M.push({start:H,count:1}),T=void 0;return}if(T.step===void 0&&ee!==void 0){const Y=H-te,re=ee-H;if(Y<=re){T={...T,count:2,end:H,step:Y};return}T.step=1}H-(T.end??0)===T.step?(T.count++,T.end=H):(T.count===1?M.push({start:T.start,count:1}):T.count===2?(M.push({start:T.start,count:1}),M.push({start:T.end??te,count:1})):M.push(T),T={start:H,count:1})}),T&&M.push(T),M}stringifyField(R){var P;let M=R.max,T=R.values;if(R instanceof s.CronDayOfWeek){M=6;const Q=I(this,j).values;T=Q[Q.length-1]===7?Q.slice(0,-1):Q}R instanceof s.CronDayOfMonth&&(M=I(this,g).values.length===1?s.CronMonth.daysInMonth[I(this,g).values[0]-1]:R.max);const H=p.compactField(T);if(H.length===1){const Q=Te(P=p,b,Ug).call(P,R,H[0],M);if(Q)return Q}return H.map(Q=>{var ee;const te=Q.count===1?Q.start.toString():Te(ee=p,b,Hg).call(ee,Q,M);return R instanceof s.CronDayOfWeek&&R.nthDay>0?`${te}#${R.nthDay}`:te}).join(",")}stringify(R=!1){const M=[];return R&&M.push(this.stringifyField(I(this,d))),M.push(this.stringifyField(I(this,o)),this.stringifyField(I(this,m)),this.stringifyField(I(this,x)),this.stringifyField(I(this,g)),this.stringifyField(I(this,j))),M.join(" ")}serialize(){return{second:I(this,d).serialize(),minute:I(this,o).serialize(),hour:I(this,m).serialize(),dayOfMonth:I(this,x).serialize(),month:I(this,g).serialize(),dayOfWeek:I(this,j).serialize()}}},d=new WeakMap,o=new WeakMap,m=new WeakMap,x=new WeakMap,g=new WeakMap,j=new WeakMap,b=new WeakSet,Ug=function(R,M,T){const H=M.step;return H?H===1&&M.start===R.min&&M.end&&M.end>=T?R.hasQuestionMarkChar?"?":"*":H!==1&&M.start===R.min&&M.end&&M.end>=T-H+1?`*/${H}`:null:null},Hg=function(R,M){const T=R.step;if(T===1)return`${R.start}-${R.end}`;const H=R.start===0?R.count-1:R.count;if(!T)throw new Error("Unexpected range step");if(!R.end)throw new Error("Unexpected range end");if(T*H>R.end){const P=(te,ee)=>{if(typeof R.start!="number")throw new Error("Unexpected range start");return ee%T===0?R.start+ee:null};if(typeof R.start!="number")throw new Error("Unexpected range start");const Q={length:R.end-R.start+1};return Array.from(Q,P).filter(te=>te!==null).join(",")}return R.end===M-T+1?`${R.start}/${T}`:`${R.start}-${R.end}/${T}`},st(p,b),p);return $i.CronFieldCollection=u,$i}var bf={},Dx;function Gg(){return Dx||(Dx=1,(function(s){var m,x,g,j,b,p,w,E,D,Yl,M,Rs,qg,Vg,Bg,Yg,Df,$g,Fg,Dr;Object.defineProperty(s,"__esModule",{value:!0}),s.CronExpression=s.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=s.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const u=Xf();s.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",s.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const d=1e4,B=class B{constructor(z,ae){st(this,M);st(this,m);st(this,x);st(this,g);st(this,j);st(this,b);st(this,p);st(this,w,null);st(this,E,!1);Oe(this,m,ae),Oe(this,x,ae.tz),Oe(this,j,ae.startDate?new u.CronDate(ae.startDate,I(this,x)):null),Oe(this,b,ae.endDate?new u.CronDate(ae.endDate,I(this,x)):null);let le=ae.currentDate??ae.startDate;if(le){const de=new u.CronDate(le,I(this,x));I(this,j)&&de.getTime()<I(this,j).getTime()?le=I(this,j):I(this,b)&&de.getTime()>I(this,b).getTime()&&(le=I(this,b))}Oe(this,g,new u.CronDate(le,I(this,x))),Oe(this,p,z)}get fields(){return I(this,p)}static fieldsToExpression(z,ae){return new B(z,ae||{})}next(){return Te(this,M,Dr).call(this)}prev(){return Te(this,M,Dr).call(this,!0)}hasNext(){const z=I(this,g);try{return Te(this,M,Dr).call(this),!0}catch{return!1}finally{Oe(this,g,z)}}hasPrev(){const z=I(this,g);try{return Te(this,M,Dr).call(this,!0),!0}catch{return!1}finally{Oe(this,g,z)}}take(z){const ae=[];if(z>=0)for(let le=0;le<z;le++)try{ae.push(this.next())}catch{return ae}else for(let le=0;le>z;le--)try{ae.push(this.prev())}catch{return ae}return ae}reset(z){Oe(this,g,new u.CronDate(z||I(this,m).currentDate))}stringify(z=!1){return I(this,p).stringify(z)}includesDate(z){const{second:ae,minute:le,hour:de,month:Se}=I(this,p),pe=new u.CronDate(z,I(this,x));return!(!ae.values.includes(pe.getSeconds())||!le.values.includes(pe.getMinutes())||!de.values.includes(pe.getHours())||!Se.values.includes(pe.getMonth()+1)||!Te(this,M,Df).call(this,pe)||I(this,p).dayOfWeek.nthDay>0&&Math.ceil(pe.getDate()/7)!==I(this,p).dayOfWeek.nthDay)}toString(){return I(this,m).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Te(this,M,Dr).call(this),done:!this.hasNext()})}}};m=new WeakMap,x=new WeakMap,g=new WeakMap,j=new WeakMap,b=new WeakMap,p=new WeakMap,w=new WeakMap,E=new WeakMap,D=new WeakSet,Yl=function(z,ae){return ae.some(le=>le===z)},M=new WeakSet,Rs=function(z,ae){return z[ae?z.length-1:0]},qg=function(z){const ae=`${z.getFullYear()}-${z.getMonth()+1}-${z.getDate()}`;if(I(this,w)===ae)return I(this,E);const le=new u.CronDate(z);le.setStartOfDay();const de=new u.CronDate(z);return de.setEndOfDay(),Oe(this,w,ae),Oe(this,E,le.getUTCOffset()!==de.getUTCOffset()),I(this,E)},Vg=function(z,ae,le){const de=I(this,p).second.values,Se=z.getSeconds(),pe=I(this,p).second.findNearestValue(Se,le);if(pe!==null){z.setSeconds(pe);return}z.applyDateOperation(ae,u.TimeUnit.Minute,I(this,p).hour.values.length),z.setSeconds(Te(this,M,Rs).call(this,de,le))},Bg=function(z,ae,le){const de=I(this,p).minute.values,Se=I(this,p).second.values,pe=z.getMinutes(),G=I(this,p).minute.findNearestValue(pe,le);if(G!==null){z.setMinutes(G),z.setSeconds(Te(this,M,Rs).call(this,Se,le));return}z.applyDateOperation(ae,u.TimeUnit.Hour,I(this,p).hour.values.length),z.setMinutes(Te(this,M,Rs).call(this,de,le)),z.setSeconds(Te(this,M,Rs).call(this,Se,le))},Yg=function(z,ae){const le=ae.isLastWeekdayOfMonth();return z.some(de=>{const Se=parseInt(de.toString().charAt(0),10)%7;if(Number.isNaN(Se))throw new Error(`Invalid last weekday of the month expression: ${de}`);return ae.getDay()===Se&&le})},Df=function(z){var ie,ve,we;const ae=I(this,p).dayOfMonth.isWildcard,le=!ae,de=I(this,p).dayOfWeek.isWildcard,Se=!de,pe=Te(ie=B,D,Yl).call(ie,z.getDate(),I(this,p).dayOfMonth.values)||I(this,p).dayOfMonth.hasLastChar&&z.isLastDayOfMonth(),G=Te(ve=B,D,Yl).call(ve,z.getDay(),I(this,p).dayOfWeek.values)||I(this,p).dayOfWeek.hasLastChar&&Te(we=B,D,Yg).call(we,I(this,p).dayOfWeek.values,z);return!!(le&&Se&&(pe||G)||pe&&!Se||ae&&!de&&G)},$g=function(z,ae,le){var oe,A;const de=I(this,p).hour.values,Se=de,pe=z.getHours(),G=Te(oe=B,D,Yl).call(oe,pe,de),ie=z.dstStart===pe,ve=z.dstEnd===pe;if(ie)return Te(A=B,D,Yl).call(A,pe-1,de)?!0:(z.invokeDateOperation(ae,u.TimeUnit.Hour),!1);if(ve&&!le)return z.dstEnd=null,z.applyDateOperation(u.DateMathOp.Add,u.TimeUnit.Hour,Se.length),!1;if(G)return!0;z.dstStart=null;const we=I(this,p).hour.findNearestValue(pe,le);if(we===null)return z.applyDateOperation(ae,u.TimeUnit.Day,Se.length),!1;if(Te(this,M,qg).call(this,z)){const ne=le?pe-we:we-pe;for(let he=0;he<ne;he++)z.applyDateOperation(ae,u.TimeUnit.Hour,Se.length)}else z.setHours(we);return z.setMinutes(Te(this,M,Rs).call(this,I(this,p).minute.values,le)),z.setSeconds(Te(this,M,Rs).call(this,I(this,p).second.values,le)),!1},Fg=function(z){if(!I(this,j)&&!I(this,b))return;const ae=z.getTime();if(I(this,j)&&ae<I(this,j).getTime())throw new Error(s.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(I(this,b)&&ae>I(this,b).getTime())throw new Error(s.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Dr=function(z=!1){var pe,G,ie;const ae=z?u.DateMathOp.Subtract:u.DateMathOp.Add,le=new u.CronDate(I(this,g)),de=le.getTime();let Se=0;for(;++Se<d;){if(Te(this,M,Fg).call(this,le),!Te(this,M,Df).call(this,le)){le.applyDateOperation(ae,u.TimeUnit.Day,I(this,p).hour.values.length);continue}if(!(I(this,p).dayOfWeek.nthDay<=0||Math.ceil(le.getDate()/7)===I(this,p).dayOfWeek.nthDay)){le.applyDateOperation(ae,u.TimeUnit.Day,I(this,p).hour.values.length);continue}if(!Te(pe=B,D,Yl).call(pe,le.getMonth()+1,I(this,p).month.values)){le.applyDateOperation(ae,u.TimeUnit.Month,I(this,p).hour.values.length);continue}if(Te(this,M,$g).call(this,le,ae,z)){if(!Te(G=B,D,Yl).call(G,le.getMinutes(),I(this,p).minute.values)){Te(this,M,Bg).call(this,le,ae,z);continue}if(!Te(ie=B,D,Yl).call(ie,le.getSeconds(),I(this,p).second.values)){Te(this,M,Vg).call(this,le,ae,z);continue}if(de===le.getTime()){(ae==="Add"||le.getMilliseconds()===0)&&le.applyDateOperation(ae,u.TimeUnit.Second,I(this,p).hour.values.length);continue}break}}if(Se>d)throw new Error(s.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return le.getMilliseconds()!==0&&le.setMilliseconds(0),Oe(this,g,le),le},st(B,D);let o=B;s.CronExpression=o,s.default=o})(bf)),bf}var qc={},Rx;function F2(){if(Rx)return qc;Rx=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.seededRandom=d;function s(o){let m=2166136261;for(let x=0;x<o.length;x++)m^=o.charCodeAt(x),m=Math.imul(m,16777619);return()=>m>>>0}function u(o){return()=>{let m=o+=1831565813;return m=Math.imul(m^m>>>15,m|1),m^=m+Math.imul(m^m>>>7,m|61),((m^m>>>14)>>>0)/4294967296}}function d(o){const m=o?s(o)():Math.floor(Math.random()*1e10);return u(m)}return qc}var Ax;function Af(){var p,w,Zg,As,Qg,Wg,Xg,Pg,Jg,Ig,Kg,Rf,ev,tv;if(Ax)return Ua;Ax=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.CronExpressionParser=Ua.DayOfWeek=Ua.Months=Ua.CronUnit=Ua.PredefinedExpressions=void 0;const s=Lg(),u=Gg(),d=F2(),o=Pf();var m;(function(Z){Z["@yearly"]="0 0 0 1 1 *",Z["@annually"]="0 0 0 1 1 *",Z["@monthly"]="0 0 0 1 * *",Z["@weekly"]="0 0 0 * * 0",Z["@daily"]="0 0 0 * * *",Z["@hourly"]="0 0 * * * *",Z["@minutely"]="0 * * * * *",Z["@secondly"]="* * * * * *",Z["@weekdays"]="0 0 0 * * 1-5",Z["@weekends"]="0 0 0 * * 0,6"})(m||(Ua.PredefinedExpressions=m={}));var x;(function(Z){Z.Second="Second",Z.Minute="Minute",Z.Hour="Hour",Z.DayOfMonth="DayOfMonth",Z.Month="Month",Z.DayOfWeek="DayOfWeek"})(x||(Ua.CronUnit=x={}));var g;(function(Z){Z[Z.jan=1]="jan",Z[Z.feb=2]="feb",Z[Z.mar=3]="mar",Z[Z.apr=4]="apr",Z[Z.may=5]="may",Z[Z.jun=6]="jun",Z[Z.jul=7]="jul",Z[Z.aug=8]="aug",Z[Z.sep=9]="sep",Z[Z.oct=10]="oct",Z[Z.nov=11]="nov",Z[Z.dec=12]="dec"})(g||(Ua.Months=g={}));var j;(function(Z){Z[Z.sun=0]="sun",Z[Z.mon=1]="mon",Z[Z.tue=2]="tue",Z[Z.wed=3]="wed",Z[Z.thu=4]="thu",Z[Z.fri=5]="fri",Z[Z.sat=6]="sat"})(j||(Ua.DayOfWeek=j={}));let b=(w=class{static parse(B,F={}){var he,ye,me,xe,Me,Ge,Le,ta;const{strict:z=!1,hashSeed:ae}=F,le=(0,d.seededRandom)(ae);B=m[B]||B;const de=Te(he=w,p,Zg).call(he,B,z);if(!(de.dayOfMonth==="*"||de.dayOfWeek==="*"||!z))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const Se=Te(ye=w,p,As).call(ye,x.Second,de.second,o.CronSecond.constraints,le),pe=Te(me=w,p,As).call(me,x.Minute,de.minute,o.CronMinute.constraints,le),G=Te(xe=w,p,As).call(xe,x.Hour,de.hour,o.CronHour.constraints,le),ie=Te(Me=w,p,As).call(Me,x.Month,de.month,o.CronMonth.constraints,le),ve=Te(Ge=w,p,As).call(Ge,x.DayOfMonth,de.dayOfMonth,o.CronDayOfMonth.constraints,le),{dayOfWeek:we,nthDayOfWeek:oe}=Te(Le=w,p,ev).call(Le,de.dayOfWeek),A=Te(ta=w,p,As).call(ta,x.DayOfWeek,we,o.CronDayOfWeek.constraints,le),ne=new s.CronFieldCollection({second:new o.CronSecond(Se,{rawValue:de.second}),minute:new o.CronMinute(pe,{rawValue:de.minute}),hour:new o.CronHour(G,{rawValue:de.hour}),dayOfMonth:new o.CronDayOfMonth(ve,{rawValue:de.dayOfMonth}),month:new o.CronMonth(ie,{rawValue:de.month}),dayOfWeek:new o.CronDayOfWeek(A,{rawValue:de.dayOfWeek,nthDayOfWeek:oe})});return new u.CronExpression(ne,{...F,expression:B})}},p=new WeakSet,Zg=function(B,F){if(F&&!B.length)throw new Error("Invalid cron expression");B=B||"0 * * * * *";const z=B.trim().split(/\s+/);if(F&&z.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(z.length>6)throw new Error("Invalid cron expression, too many fields");const ae=["*","*","*","*","*","0"];z.length<ae.length&&z.unshift(...ae.slice(z.length));const[le,de,Se,pe,G,ie]=z;return{second:le,minute:de,hour:Se,dayOfMonth:pe,month:G,dayOfWeek:ie}},As=function(B,F,z,ae){if((B===x.Month||B===x.DayOfWeek)&&(F=F.replace(/[a-z]{3}/gi,le=>{le=le.toLowerCase();const de=g[le]||j[le];if(de===void 0)throw new Error(`Validation error, cannot resolve alias "${le}"`);return de.toString()})),!z.validChars.test(F))throw new Error(`Invalid characters, got value: ${F}`);return F=Te(this,p,Qg).call(this,F,z),F=Te(this,p,Wg).call(this,F,z,ae),Te(this,p,Xg).call(this,B,F,z)},Qg=function(B,F){return B.replace(/[*?]/g,F.min+"-"+F.max)},Wg=function(B,F,z){const ae=z();return B.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(le,de,Se,pe)=>{if(de&&Se&&pe){const G=parseInt(de,10),ie=parseInt(Se,10),ve=parseInt(pe,10);if(G>ie)throw new Error(`Invalid range: ${G}-${ie}, min > max`);if(ve<=0)throw new Error(`Invalid step: ${ve}, must be positive`);const we=Math.max(G,F.min),oe=Math.floor(ae*ve),A=[];for(let ne=Math.floor(we/ve)*ve+oe;ne<=ie;ne+=ve)ne>=we&&A.push(ne);return A.join(",")}else if(de&&Se){const G=parseInt(de,10),ie=parseInt(Se,10);if(G>ie)throw new Error(`Invalid range: ${G}-${ie}, min > max`);return String(Math.floor(ae*(ie-G+1))+G)}else if(pe){const G=parseInt(pe,10);if(G<=0)throw new Error(`Invalid step: ${G}, must be positive`);const ie=Math.floor(ae*G),ve=[];for(let we=Math.floor(F.min/G)*G+ie;we<=F.max;we+=G)we>=F.min&&ve.push(we);return ve.join(",")}else return String(Math.floor(ae*(F.max-F.min+1)+F.min))})},Xg=function(B,F,z){const ae=[];function le(Se,pe){var G;if(Array.isArray(Se))ae.push(...Se);else if(Te(G=w,p,tv).call(G,pe,Se))ae.push(Se);else{const ie=parseInt(Se.toString(),10);if(!(ie>=pe.min&&ie<=pe.max))throw new Error(`Constraint error, got value ${Se} expected range ${pe.min}-${pe.max}`);ae.push(B===x.DayOfWeek?ie%7:Se)}}return F.split(",").forEach(Se=>{var pe;if(!(Se.length>0))throw new Error("Invalid list value format");le(Te(pe=w,p,Pg).call(pe,B,Se,z),z)}),ae},Pg=function(B,F,z){var le,de;const ae=F.split("/");if(ae.length>2)throw new Error(`Invalid repeat: ${F}`);return ae.length===2?(isNaN(parseInt(ae[0],10))||(ae[0]=`${ae[0]}-${z.max}`),Te(le=w,p,Rf).call(le,B,ae[0],parseInt(ae[1],10),z)):Te(de=w,p,Rf).call(de,B,F,1,z)},Jg=function(B,F,z){if(!(!isNaN(B)&&!isNaN(F)&&B>=z.min&&F<=z.max))throw new Error(`Constraint error, got range ${B}-${F} expected range ${z.min}-${z.max}`);if(B>F)throw new Error(`Invalid range: ${B}-${F}, min(${B}) > max(${F})`)},Ig=function(B){if(!(!isNaN(B)&&B>0))throw new Error(`Constraint error, cannot repeat at every ${B} time.`)},Kg=function(B,F,z,ae){const le=[];B===x.DayOfWeek&&z%7===0&&le.push(0);for(let de=F;de<=z;de+=ae)le.indexOf(de)===-1&&le.push(de);return le},Rf=function(B,F,z,ae){const le=F.split("-");if(le.length<=1)return isNaN(+F)?F:+F;const[de,Se]=le.map(pe=>parseInt(pe,10));return Te(this,p,Jg).call(this,de,Se,ae),Te(this,p,Ig).call(this,z),Te(this,p,Kg).call(this,B,de,Se,z)},ev=function(B){const F=B.split("#");if(F.length<=1)return{dayOfWeek:F[0]};const z=+F[F.length-1],ae=B.match(/([,-/])/);if(ae!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ae==null?void 0:ae[0]}\` special characters are incompatible`);if(!(F.length<=2&&!isNaN(z)&&z>=1&&z<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:F[0],nthDayOfWeek:z}},tv=function(B,F){return B.chars.some(z=>F.toString().includes(z))},st(w,p),w);return Ua.CronExpressionParser=b,Ua}var fn={};const G2={},Z2=Object.freeze(Object.defineProperty({__proto__:null,default:G2},Symbol.toStringTag,{value:"Module"})),_x=Ay(Z2);var kx;function Q2(){var x,g,_f,av;if(kx)return fn;kx=1;var s=fn&&fn.__createBinding||(Object.create?(function(p,w,E,D){D===void 0&&(D=E);var R=Object.getOwnPropertyDescriptor(w,E);(!R||("get"in R?!w.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(p,D,R)}):(function(p,w,E,D){D===void 0&&(D=E),p[D]=w[E]})),u=fn&&fn.__setModuleDefault||(Object.create?(function(p,w){Object.defineProperty(p,"default",{enumerable:!0,value:w})}):function(p,w){p.default=w}),d=fn&&fn.__importStar||(function(){var p=function(w){return p=Object.getOwnPropertyNames||function(E){var D=[];for(var R in E)Object.prototype.hasOwnProperty.call(E,R)&&(D[D.length]=R);return D},p(w)};return function(w){if(w&&w.__esModule)return w;var E={};if(w!=null)for(var D=p(w),R=0;R<D.length;R++)D[R]!=="default"&&s(E,w,D[R]);return u(E,w),E}})();Object.defineProperty(fn,"__esModule",{value:!0}),fn.CronFileParser=void 0;const o=Af();let m=(g=class{static async parseFile(w){var R;const{readFile:E}=await Promise.resolve().then(()=>d(_x)),D=await E(w,"utf8");return Te(R=g,x,_f).call(R,D)}static parseFileSync(w){var R;const{readFileSync:E}=_x,D=E(w,"utf8");return Te(R=g,x,_f).call(R,D)}},x=new WeakSet,_f=function(w){var R;const E=w.split(`
|
|
365
|
+
`),D={variables:{},expressions:[],errors:{}};for(const M of E){const T=M.trim();if(T.length===0||T.startsWith("#"))continue;const H=T.match(/^(.*)=(.*)$/);if(H){const[,P,Q]=H;D.variables[P]=Q.replace(/["']/g,"");continue}try{const P=Te(R=g,x,av).call(R,T);D.expressions.push(P.interval)}catch(P){D.errors[T]=P}}return D},av=function(w){const E=w.split(" ");return{interval:o.CronExpressionParser.parse(E.slice(0,5).join(" ")),command:E.slice(5,E.length)}},st(g,x),g);return fn.CronFileParser=m,fn}var zx;function W2(){return zx||(zx=1,(function(s){var u=Ts&&Ts.__createBinding||(Object.create?(function(p,w,E,D){D===void 0&&(D=E);var R=Object.getOwnPropertyDescriptor(w,E);(!R||("get"in R?!w.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(p,D,R)}):(function(p,w,E,D){D===void 0&&(D=E),p[D]=w[E]})),d=Ts&&Ts.__exportStar||function(p,w){for(var E in p)E!=="default"&&!Object.prototype.hasOwnProperty.call(w,E)&&u(w,p,E)};Object.defineProperty(s,"__esModule",{value:!0}),s.CronFileParser=s.CronExpressionParser=s.CronExpression=s.CronFieldCollection=s.CronDate=void 0;const o=Af();var m=Xf();Object.defineProperty(s,"CronDate",{enumerable:!0,get:function(){return m.CronDate}});var x=Lg();Object.defineProperty(s,"CronFieldCollection",{enumerable:!0,get:function(){return x.CronFieldCollection}});var g=Gg();Object.defineProperty(s,"CronExpression",{enumerable:!0,get:function(){return g.CronExpression}});var j=Af();Object.defineProperty(s,"CronExpressionParser",{enumerable:!0,get:function(){return j.CronExpressionParser}});var b=Q2();Object.defineProperty(s,"CronFileParser",{enumerable:!0,get:function(){return b.CronFileParser}}),d(Pf(),s),s.default=o.CronExpressionParser})(Ts)),Ts}var X2=W2();const nv=6048e5,P2=864e5,J2=6e4,I2=36e5,Ux=Symbol.for("constructDateFrom");function Ha(s,u){return typeof s=="function"?s(u):s&&typeof s=="object"&&Ux in s?s[Ux](u):s instanceof Date?new s.constructor(u):new Date(u)}function Rt(s,u){return Ha(u||s,s)}function K2(s,u,d){return Ha(s,+Rt(s)+u)}function Vc(s,u,d){return K2(s,u*I2)}let eS={};function to(){return eS}function lu(s,u){var j,b,p,w;const d=to(),o=(u==null?void 0:u.weekStartsOn)??((b=(j=u==null?void 0:u.locale)==null?void 0:j.options)==null?void 0:b.weekStartsOn)??d.weekStartsOn??((w=(p=d.locale)==null?void 0:p.options)==null?void 0:w.weekStartsOn)??0,m=Rt(s,u==null?void 0:u.in),x=m.getDay(),g=(x<o?7:0)+x-o;return m.setDate(m.getDate()-g),m.setHours(0,0,0,0),m}function Jc(s,u){return lu(s,{...u,weekStartsOn:1})}function lv(s,u){const d=Rt(s,u==null?void 0:u.in),o=d.getFullYear(),m=Ha(d,0);m.setFullYear(o+1,0,4),m.setHours(0,0,0,0);const x=Jc(m),g=Ha(d,0);g.setFullYear(o,0,4),g.setHours(0,0,0,0);const j=Jc(g);return d.getTime()>=x.getTime()?o+1:d.getTime()>=j.getTime()?o:o-1}function Hx(s){const u=Rt(s),d=new Date(Date.UTC(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours(),u.getMinutes(),u.getSeconds(),u.getMilliseconds()));return d.setUTCFullYear(u.getFullYear()),+s-+d}function tS(s,...u){const d=Ha.bind(null,u.find(o=>typeof o=="object"));return u.map(d)}function Lx(s,u){const d=Rt(s,u==null?void 0:u.in);return d.setHours(0,0,0,0),d}function aS(s,u,d){const[o,m]=tS(d==null?void 0:d.in,s,u),x=Lx(o),g=Lx(m),j=+x-Hx(x),b=+g-Hx(g);return Math.round((j-b)/P2)}function nS(s,u){const d=lv(s,u),o=Ha(s,0);return o.setFullYear(d,0,4),o.setHours(0,0,0,0),Jc(o)}function lS(s,u){let d,o=u==null?void 0:u.in;return s.forEach(m=>{!o&&typeof m=="object"&&(o=Ha.bind(null,m));const x=Rt(m,o);(!d||d<x||isNaN(+x))&&(d=x)}),Ha(o,d||NaN)}function sS(s,u){let d,o=u==null?void 0:u.in;return s.forEach(m=>{!o&&typeof m=="object"&&(o=Ha.bind(null,m));const x=Rt(m,o);(!d||d>x||isNaN(+x))&&(d=x)}),Ha(o,d||NaN)}function rS(s){return s instanceof Date||typeof s=="object"&&Object.prototype.toString.call(s)==="[object Date]"}function iS(s){return!(!rS(s)&&typeof s!="number"||isNaN(+Rt(s)))}function uS(s){return u=>{const o=(s?Math[s]:Math.trunc)(u);return o===0?0:o}}function cS(s,u){return+Rt(s)-+Rt(u)}function qx(s,u,d){const o=cS(s,u)/J2;return uS(d==null?void 0:d.roundingMethod)(o)}function oS(s,u){const d=Rt(s,u==null?void 0:u.in);return d.setFullYear(d.getFullYear(),0,1),d.setHours(0,0,0,0),d}const dS={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"}},fS=(s,u,d)=>{let o;const m=dS[s];return typeof m=="string"?o=m:u===1?o=m.one:o=m.other.replace("{{count}}",u.toString()),d!=null&&d.addSuffix?d.comparison&&d.comparison>0?"in "+o:o+" ago":o};function Sf(s){return(u={})=>{const d=u.width?String(u.width):s.defaultWidth;return s.formats[d]||s.formats[s.defaultWidth]}}const hS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},mS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gS={date:Sf({formats:hS,defaultWidth:"full"}),time:Sf({formats:mS,defaultWidth:"full"}),dateTime:Sf({formats:xS,defaultWidth:"full"})},vS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},yS=(s,u,d,o)=>vS[s];function Ji(s){return(u,d)=>{const o=d!=null&&d.context?String(d.context):"standalone";let m;if(o==="formatting"&&s.formattingValues){const g=s.defaultFormattingWidth||s.defaultWidth,j=d!=null&&d.width?String(d.width):g;m=s.formattingValues[j]||s.formattingValues[g]}else{const g=s.defaultWidth,j=d!=null&&d.width?String(d.width):s.defaultWidth;m=s.values[j]||s.values[g]}const x=s.argumentCallback?s.argumentCallback(u):u;return m[x]}}const pS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},SS={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"]},NS={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"]},jS={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"}},wS={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"}},ES=(s,u)=>{const d=Number(s),o=d%100;if(o>20||o<10)switch(o%10){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd"}return d+"th"},MS={ordinalNumber:ES,era:Ji({values:pS,defaultWidth:"wide"}),quarter:Ji({values:bS,defaultWidth:"wide",argumentCallback:s=>s-1}),month:Ji({values:SS,defaultWidth:"wide"}),day:Ji({values:NS,defaultWidth:"wide"}),dayPeriod:Ji({values:jS,defaultWidth:"wide",formattingValues:wS,defaultFormattingWidth:"wide"})};function Ii(s){return(u,d={})=>{const o=d.width,m=o&&s.matchPatterns[o]||s.matchPatterns[s.defaultMatchWidth],x=u.match(m);if(!x)return null;const g=x[0],j=o&&s.parsePatterns[o]||s.parsePatterns[s.defaultParseWidth],b=Array.isArray(j)?CS(j,E=>E.test(g)):TS(j,E=>E.test(g));let p;p=s.valueCallback?s.valueCallback(b):b,p=d.valueCallback?d.valueCallback(p):p;const w=u.slice(g.length);return{value:p,rest:w}}}function TS(s,u){for(const d in s)if(Object.prototype.hasOwnProperty.call(s,d)&&u(s[d]))return d}function CS(s,u){for(let d=0;d<s.length;d++)if(u(s[d]))return d}function OS(s){return(u,d={})=>{const o=u.match(s.matchPattern);if(!o)return null;const m=o[0],x=u.match(s.parsePattern);if(!x)return null;let g=s.valueCallback?s.valueCallback(x[0]):x[0];g=d.valueCallback?d.valueCallback(g):g;const j=u.slice(m.length);return{value:g,rest:j}}}const DS=/^(\d+)(th|st|nd|rd)?/i,RS=/\d+/i,AS={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},_S={any:[/^b/i,/^(a|c)/i]},kS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zS={any:[/1/i,/2/i,/3/i,/4/i]},US={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},HS={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]},LS={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},qS={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]},VS={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},BS={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}},YS={ordinalNumber:OS({matchPattern:DS,parsePattern:RS,valueCallback:s=>parseInt(s,10)}),era:Ii({matchPatterns:AS,defaultMatchWidth:"wide",parsePatterns:_S,defaultParseWidth:"any"}),quarter:Ii({matchPatterns:kS,defaultMatchWidth:"wide",parsePatterns:zS,defaultParseWidth:"any",valueCallback:s=>s+1}),month:Ii({matchPatterns:US,defaultMatchWidth:"wide",parsePatterns:HS,defaultParseWidth:"any"}),day:Ii({matchPatterns:LS,defaultMatchWidth:"wide",parsePatterns:qS,defaultParseWidth:"any"}),dayPeriod:Ii({matchPatterns:VS,defaultMatchWidth:"any",parsePatterns:BS,defaultParseWidth:"any"})},$S={code:"en-US",formatDistance:fS,formatLong:gS,formatRelative:yS,localize:MS,match:YS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function FS(s,u){const d=Rt(s,u==null?void 0:u.in);return aS(d,oS(d))+1}function GS(s,u){const d=Rt(s,u==null?void 0:u.in),o=+Jc(d)-+nS(d);return Math.round(o/nv)+1}function sv(s,u){var w,E,D,R;const d=Rt(s,u==null?void 0:u.in),o=d.getFullYear(),m=to(),x=(u==null?void 0:u.firstWeekContainsDate)??((E=(w=u==null?void 0:u.locale)==null?void 0:w.options)==null?void 0:E.firstWeekContainsDate)??m.firstWeekContainsDate??((R=(D=m.locale)==null?void 0:D.options)==null?void 0:R.firstWeekContainsDate)??1,g=Ha((u==null?void 0:u.in)||s,0);g.setFullYear(o+1,0,x),g.setHours(0,0,0,0);const j=lu(g,u),b=Ha((u==null?void 0:u.in)||s,0);b.setFullYear(o,0,x),b.setHours(0,0,0,0);const p=lu(b,u);return+d>=+j?o+1:+d>=+p?o:o-1}function ZS(s,u){var j,b,p,w;const d=to(),o=(u==null?void 0:u.firstWeekContainsDate)??((b=(j=u==null?void 0:u.locale)==null?void 0:j.options)==null?void 0:b.firstWeekContainsDate)??d.firstWeekContainsDate??((w=(p=d.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??1,m=sv(s,u),x=Ha((u==null?void 0:u.in)||s,0);return x.setFullYear(m,0,o),x.setHours(0,0,0,0),lu(x,u)}function QS(s,u){const d=Rt(s,u==null?void 0:u.in),o=+lu(d,u)-+ZS(d,u);return Math.round(o/nv)+1}function ct(s,u){const d=s<0?"-":"",o=Math.abs(s).toString().padStart(u,"0");return d+o}const Vl={y(s,u){const d=s.getFullYear(),o=d>0?d:1-d;return ct(u==="yy"?o%100:o,u.length)},M(s,u){const d=s.getMonth();return u==="M"?String(d+1):ct(d+1,2)},d(s,u){return ct(s.getDate(),u.length)},a(s,u){const d=s.getHours()/12>=1?"pm":"am";switch(u){case"a":case"aa":return d.toUpperCase();case"aaa":return d;case"aaaaa":return d[0];case"aaaa":default:return d==="am"?"a.m.":"p.m."}},h(s,u){return ct(s.getHours()%12||12,u.length)},H(s,u){return ct(s.getHours(),u.length)},m(s,u){return ct(s.getMinutes(),u.length)},s(s,u){return ct(s.getSeconds(),u.length)},S(s,u){const d=u.length,o=s.getMilliseconds(),m=Math.trunc(o*Math.pow(10,d-3));return ct(m,u.length)}},Cr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Vx={G:function(s,u,d){const o=s.getFullYear()>0?1:0;switch(u){case"G":case"GG":case"GGG":return d.era(o,{width:"abbreviated"});case"GGGGG":return d.era(o,{width:"narrow"});case"GGGG":default:return d.era(o,{width:"wide"})}},y:function(s,u,d){if(u==="yo"){const o=s.getFullYear(),m=o>0?o:1-o;return d.ordinalNumber(m,{unit:"year"})}return Vl.y(s,u)},Y:function(s,u,d,o){const m=sv(s,o),x=m>0?m:1-m;if(u==="YY"){const g=x%100;return ct(g,2)}return u==="Yo"?d.ordinalNumber(x,{unit:"year"}):ct(x,u.length)},R:function(s,u){const d=lv(s);return ct(d,u.length)},u:function(s,u){const d=s.getFullYear();return ct(d,u.length)},Q:function(s,u,d){const o=Math.ceil((s.getMonth()+1)/3);switch(u){case"Q":return String(o);case"QQ":return ct(o,2);case"Qo":return d.ordinalNumber(o,{unit:"quarter"});case"QQQ":return d.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return d.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return d.quarter(o,{width:"wide",context:"formatting"})}},q:function(s,u,d){const o=Math.ceil((s.getMonth()+1)/3);switch(u){case"q":return String(o);case"qq":return ct(o,2);case"qo":return d.ordinalNumber(o,{unit:"quarter"});case"qqq":return d.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return d.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return d.quarter(o,{width:"wide",context:"standalone"})}},M:function(s,u,d){const o=s.getMonth();switch(u){case"M":case"MM":return Vl.M(s,u);case"Mo":return d.ordinalNumber(o+1,{unit:"month"});case"MMM":return d.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return d.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return d.month(o,{width:"wide",context:"formatting"})}},L:function(s,u,d){const o=s.getMonth();switch(u){case"L":return String(o+1);case"LL":return ct(o+1,2);case"Lo":return d.ordinalNumber(o+1,{unit:"month"});case"LLL":return d.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return d.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return d.month(o,{width:"wide",context:"standalone"})}},w:function(s,u,d,o){const m=QS(s,o);return u==="wo"?d.ordinalNumber(m,{unit:"week"}):ct(m,u.length)},I:function(s,u,d){const o=GS(s);return u==="Io"?d.ordinalNumber(o,{unit:"week"}):ct(o,u.length)},d:function(s,u,d){return u==="do"?d.ordinalNumber(s.getDate(),{unit:"date"}):Vl.d(s,u)},D:function(s,u,d){const o=FS(s);return u==="Do"?d.ordinalNumber(o,{unit:"dayOfYear"}):ct(o,u.length)},E:function(s,u,d){const o=s.getDay();switch(u){case"E":case"EE":case"EEE":return d.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return d.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return d.day(o,{width:"short",context:"formatting"});case"EEEE":default:return d.day(o,{width:"wide",context:"formatting"})}},e:function(s,u,d,o){const m=s.getDay(),x=(m-o.weekStartsOn+8)%7||7;switch(u){case"e":return String(x);case"ee":return ct(x,2);case"eo":return d.ordinalNumber(x,{unit:"day"});case"eee":return d.day(m,{width:"abbreviated",context:"formatting"});case"eeeee":return d.day(m,{width:"narrow",context:"formatting"});case"eeeeee":return d.day(m,{width:"short",context:"formatting"});case"eeee":default:return d.day(m,{width:"wide",context:"formatting"})}},c:function(s,u,d,o){const m=s.getDay(),x=(m-o.weekStartsOn+8)%7||7;switch(u){case"c":return String(x);case"cc":return ct(x,u.length);case"co":return d.ordinalNumber(x,{unit:"day"});case"ccc":return d.day(m,{width:"abbreviated",context:"standalone"});case"ccccc":return d.day(m,{width:"narrow",context:"standalone"});case"cccccc":return d.day(m,{width:"short",context:"standalone"});case"cccc":default:return d.day(m,{width:"wide",context:"standalone"})}},i:function(s,u,d){const o=s.getDay(),m=o===0?7:o;switch(u){case"i":return String(m);case"ii":return ct(m,u.length);case"io":return d.ordinalNumber(m,{unit:"day"});case"iii":return d.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return d.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return d.day(o,{width:"short",context:"formatting"});case"iiii":default:return d.day(o,{width:"wide",context:"formatting"})}},a:function(s,u,d){const m=s.getHours()/12>=1?"pm":"am";switch(u){case"a":case"aa":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"aaa":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return d.dayPeriod(m,{width:"narrow",context:"formatting"});case"aaaa":default:return d.dayPeriod(m,{width:"wide",context:"formatting"})}},b:function(s,u,d){const o=s.getHours();let m;switch(o===12?m=Cr.noon:o===0?m=Cr.midnight:m=o/12>=1?"pm":"am",u){case"b":case"bb":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"bbb":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return d.dayPeriod(m,{width:"narrow",context:"formatting"});case"bbbb":default:return d.dayPeriod(m,{width:"wide",context:"formatting"})}},B:function(s,u,d){const o=s.getHours();let m;switch(o>=17?m=Cr.evening:o>=12?m=Cr.afternoon:o>=4?m=Cr.morning:m=Cr.night,u){case"B":case"BB":case"BBB":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"BBBBB":return d.dayPeriod(m,{width:"narrow",context:"formatting"});case"BBBB":default:return d.dayPeriod(m,{width:"wide",context:"formatting"})}},h:function(s,u,d){if(u==="ho"){let o=s.getHours()%12;return o===0&&(o=12),d.ordinalNumber(o,{unit:"hour"})}return Vl.h(s,u)},H:function(s,u,d){return u==="Ho"?d.ordinalNumber(s.getHours(),{unit:"hour"}):Vl.H(s,u)},K:function(s,u,d){const o=s.getHours()%12;return u==="Ko"?d.ordinalNumber(o,{unit:"hour"}):ct(o,u.length)},k:function(s,u,d){let o=s.getHours();return o===0&&(o=24),u==="ko"?d.ordinalNumber(o,{unit:"hour"}):ct(o,u.length)},m:function(s,u,d){return u==="mo"?d.ordinalNumber(s.getMinutes(),{unit:"minute"}):Vl.m(s,u)},s:function(s,u,d){return u==="so"?d.ordinalNumber(s.getSeconds(),{unit:"second"}):Vl.s(s,u)},S:function(s,u){return Vl.S(s,u)},X:function(s,u,d){const o=s.getTimezoneOffset();if(o===0)return"Z";switch(u){case"X":return Yx(o);case"XXXX":case"XX":return _s(o);case"XXXXX":case"XXX":default:return _s(o,":")}},x:function(s,u,d){const o=s.getTimezoneOffset();switch(u){case"x":return Yx(o);case"xxxx":case"xx":return _s(o);case"xxxxx":case"xxx":default:return _s(o,":")}},O:function(s,u,d){const o=s.getTimezoneOffset();switch(u){case"O":case"OO":case"OOO":return"GMT"+Bx(o,":");case"OOOO":default:return"GMT"+_s(o,":")}},z:function(s,u,d){const o=s.getTimezoneOffset();switch(u){case"z":case"zz":case"zzz":return"GMT"+Bx(o,":");case"zzzz":default:return"GMT"+_s(o,":")}},t:function(s,u,d){const o=Math.trunc(+s/1e3);return ct(o,u.length)},T:function(s,u,d){return ct(+s,u.length)}};function Bx(s,u=""){const d=s>0?"-":"+",o=Math.abs(s),m=Math.trunc(o/60),x=o%60;return x===0?d+String(m):d+String(m)+u+ct(x,2)}function Yx(s,u){return s%60===0?(s>0?"-":"+")+ct(Math.abs(s)/60,2):_s(s,u)}function _s(s,u=""){const d=s>0?"-":"+",o=Math.abs(s),m=ct(Math.trunc(o/60),2),x=ct(o%60,2);return d+m+u+x}const $x=(s,u)=>{switch(s){case"P":return u.date({width:"short"});case"PP":return u.date({width:"medium"});case"PPP":return u.date({width:"long"});case"PPPP":default:return u.date({width:"full"})}},rv=(s,u)=>{switch(s){case"p":return u.time({width:"short"});case"pp":return u.time({width:"medium"});case"ppp":return u.time({width:"long"});case"pppp":default:return u.time({width:"full"})}},WS=(s,u)=>{const d=s.match(/(P+)(p+)?/)||[],o=d[1],m=d[2];if(!m)return $x(s,u);let x;switch(o){case"P":x=u.dateTime({width:"short"});break;case"PP":x=u.dateTime({width:"medium"});break;case"PPP":x=u.dateTime({width:"long"});break;case"PPPP":default:x=u.dateTime({width:"full"});break}return x.replace("{{date}}",$x(o,u)).replace("{{time}}",rv(m,u))},XS={p:rv,P:WS},PS=/^D+$/,JS=/^Y+$/,IS=["D","DD","YY","YYYY"];function KS(s){return PS.test(s)}function eN(s){return JS.test(s)}function tN(s,u,d){const o=aN(s,u,d);if(console.warn(o),IS.includes(s))throw new RangeError(o)}function aN(s,u,d){const o=s[0]==="Y"?"years":"days of the month";return`Use \`${s.toLowerCase()}\` instead of \`${s}\` (in \`${u}\`) for formatting ${o} to the input \`${d}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const nN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sN=/^'([^]*?)'?$/,rN=/''/g,iN=/[a-zA-Z]/;function Os(s,u,d){var w,E,D,R;const o=to(),m=o.locale??$S,x=o.firstWeekContainsDate??((E=(w=o.locale)==null?void 0:w.options)==null?void 0:E.firstWeekContainsDate)??1,g=o.weekStartsOn??((R=(D=o.locale)==null?void 0:D.options)==null?void 0:R.weekStartsOn)??0,j=Rt(s,d==null?void 0:d.in);if(!iS(j))throw new RangeError("Invalid time value");let b=u.match(lN).map(M=>{const T=M[0];if(T==="p"||T==="P"){const H=XS[T];return H(M,m.formatLong)}return M}).join("").match(nN).map(M=>{if(M==="''")return{isToken:!1,value:"'"};const T=M[0];if(T==="'")return{isToken:!1,value:uN(M)};if(Vx[T])return{isToken:!0,value:M};if(T.match(iN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:M}});m.localize.preprocessor&&(b=m.localize.preprocessor(j,b));const p={firstWeekContainsDate:x,weekStartsOn:g,locale:m};return b.map(M=>{if(!M.isToken)return M.value;const T=M.value;(eN(T)||KS(T))&&tN(T,u,String(s));const H=Vx[T[0]];return H(j,T,m.localize,p)}).join("")}function uN(s){const u=s.match(sN);return u?u[1].replace(rN,"'"):s}function cN(s,u){return+Rt(s)>+Rt(u)}function oN(s,u){return+Rt(s)<+Rt(u)}function dN(s,u){const d=Rt(s,u==null?void 0:u.in);return d.setMinutes(0,0,0),d}const Nf=[{id:"executor",label:"Executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"}},{id:"reviewer",label:"Reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"}},{id:"qa",label:"QA",color:{bg:"bg-purple-500",border:"border-purple-500/60"}},{id:"audit",label:"Audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"}},{id:"slicer",label:"Planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"}}],Bc=[{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"}],Jn=160,Yc=14,fN=10,hN=7,Fx=4,iv=({configs:s,currentProjectId:u,onEditJob:d,queueStatus:o,queueAnalytics:m})=>{const x=V.useMemo(()=>dN(new Date),[]),g=V.useMemo(()=>Vc(x,24),[x]),j=V.useMemo(()=>Vc(x,-24),[x]),b=g,p=V.useMemo(()=>{const ee=[];for(let Y=0;Y<=24;Y++)ee.push(Vc(x,Y));return ee},[x]),w=V.useMemo(()=>{const ee=[];return s.forEach(({projectId:Y,config:re})=>{const Z={executor:re.executorEnabled!==!1?re.cronSchedule:null,reviewer:re.reviewerEnabled?re.reviewerSchedule:null,qa:re.qa.enabled?re.qa.schedule:null,audit:re.audit.enabled?re.audit.schedule:null,slicer:re.roadmapScanner.enabled?re.roadmapScanner.slicerSchedule:null},B=re.cronScheduleOffset||0;Object.entries(Z).forEach(([F,z])=>{if(z)try{const ae=X2.CronExpressionParser.parse(z,{currentDate:x,endDate:g,iterator:!0});for(;ae.hasNext();){const le=ae.next(),de=new Date(le.getTime());de.setMinutes(de.getMinutes()+B),cN(de,x)&&oN(de,g)&&ee.push({projectId:Y,jobType:F,time:de})}}catch(ae){console.error(`Failed to parse cron "${z}" for ${Y}/${F}`,ae)}})}),ee},[s,x,g]),E=V.useMemo(()=>{const ee=new Set;return s.length===0||(s.every(Y=>Y.config.executorEnabled===!1)&&ee.add("executor"),s.every(Y=>!Y.config.reviewerEnabled)&&ee.add("reviewer"),s.every(Y=>!Y.config.qa.enabled)&&ee.add("qa"),s.every(Y=>!Y.config.audit.enabled)&&ee.add("audit"),s.every(Y=>!Y.config.roadmapScanner.enabled)&&ee.add("slicer")),ee},[s]),D=V.useMemo(()=>{const ee=new Map;let Y=0;return s.forEach(re=>{re.projectId===u||(ee.set(re.projectId,Y%Bc.length),Y++)}),ee},[s,u]),R=ee=>qx(ee,x),M=V.useMemo(()=>{const ee=[];for(let Y=0;Y<=24;Y++)ee.push(Vc(j,Y));return ee},[j]),T=ee=>{const Y=sS([lS([ee,j]),b]);return qx(Y,j)},H=V.useMemo(()=>{const ee=(m==null?void 0:m.recentRuns)??[],Y=new Map;for(const re of ee){const Z=re.providerKey||"default",B=new Date(re.startedAt*1e3),F=re.finishedAt?new Date(re.finishedAt*1e3):new Date;F<j||B>b||(Y.has(Z)||Y.set(Z,[]),Y.get(Z).push({id:re.id,jobType:re.jobType,status:re.status,projectPath:re.projectPath,startedAt:B,finishedAt:F,throttledCount:re.throttledCount}))}if(o!=null&&o.running){const re=o.running.providerKey??"default";Y.has(re)||Y.set(re,[]),Y.get(re).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(Y.entries()).sort(([re],[Z])=>re.localeCompare(Z)).map(([re,Z])=>({providerKey:re,runs:Z.sort((B,F)=>B.startedAt.getTime()-F.startedAt.getTime())}))},[b,j,m,o]),P=ee=>ee.split(/[-_]/).map(Y=>Y.charAt(0).toUpperCase()+Y.slice(1)).join(" "),Q=s.length>1,te=l.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:p.map((ee,Y)=>l.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},Y))});return l.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-slate-800 bg-slate-950/50 flex flex-col",children:[l.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Execution Timeline (Next 24h)"}),l.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Upcoming scheduled runs across projects. Aligned columns = overlap."})]}),Q&&l.jsxs("div",{className:"flex flex-wrap gap-2 justify-end max-w-sm",children:[l.jsxs("div",{className:"flex items-center gap-1 mr-1",children:[l.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-400 shrink-0"}),l.jsx("span",{className:"text-[10px] text-slate-400 font-semibold",children:"current"})]}),s.filter(ee=>ee.projectId!==u).slice(0,5).map(ee=>{const Y=D.get(ee.projectId)??0,re=Bc[Y],Z=(ee.projectId.split("/").pop()??ee.projectId).slice(0,14);return l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("div",{className:`w-2 h-2 rounded-full ${re.bg} shrink-0`}),l.jsx("span",{className:"text-[10px] text-slate-500",title:ee.projectId,children:Z})]},ee.projectId)})]})]}),l.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:l.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+Jn},children:[l.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[l.jsx("div",{style:{width:Jn},className:"shrink-0 border-r border-slate-800"}),l.jsx("div",{className:"flex-1 relative",children:p.map((ee,Y)=>l.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:Y*60},children:l.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Os(ee,"HH:mm")})},Y))})]}),l.jsxs("div",{className:"relative",children:[s.length===0&&l.jsx("div",{className:"flex items-center justify-center p-8",children:l.jsx("p",{className:"text-sm text-slate-500 italic",children:"No project data available for timeline."})}),Nf.map(ee=>{const Y=E.has(ee.id),re=w.filter(B=>B.jobType===ee.id);if(!Q)return l.jsxs("div",{className:`flex border-b border-slate-800/30 ${Y?"opacity-40":""}`,children:[l.jsxs("div",{style:{width:Jn},className:"shrink-0 p-3 border-r border-slate-800/50 flex items-center gap-2",children:[l.jsx("div",{className:`w-2 h-2 rounded-full ${ee.color.bg} shrink-0`}),l.jsx("span",{className:"text-xs font-semibold text-slate-300",children:ee.label})]}),l.jsxs("div",{className:"flex-1 relative h-10",children:[te,re.length===0?l.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:l.jsx("span",{className:"text-[10px] text-slate-600 italic",children:Y?"Disabled":"No runs in this window"})}):re.map((B,F)=>l.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(B.projectId,B.jobType),style:{left:R(B.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${ee.color.bg} ${ee.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${ee.label} at ${Os(B.time,"HH:mm")}`,children:l.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:Os(B.time,"HH:mm")})},F))]})]},ee.id);const Z=s.length*Yc+Fx*2;return l.jsxs("div",{className:`flex border-b border-slate-800/30 ${Y?"opacity-40":""}`,children:[l.jsxs("div",{style:{width:Jn,height:Z},className:"shrink-0 border-r border-slate-800/50 flex flex-col px-2 py-1",children:[l.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[l.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${ee.color.bg} shrink-0`}),l.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:ee.label})]}),s.map(B=>{const F=B.projectId===u,z=(B.projectId.split("/").pop()??B.projectId).slice(0,14),ae=D.get(B.projectId)??0,le=F?ee.color.bg:Bc[ae].bg;return l.jsxs("div",{style:{height:Yc},className:"flex items-center gap-1 overflow-hidden",children:[l.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${le}`}),l.jsx("span",{className:`text-[9px] truncate ${F?"text-slate-200 font-semibold":"text-slate-600"}`,title:B.projectId,children:F?`${z} ★`:z})]},B.projectId)})]}),l.jsxs("div",{className:"flex-1 relative",style:{height:Z},children:[te,s.map((B,F)=>{const z=B.projectId===u,ae=re.filter(ie=>ie.projectId===B.projectId),le=Fx+F*Yc,de=z?fN:hN,Se=Math.floor((Yc-de)/2),pe=D.get(B.projectId)??0,G=z?{bg:ee.color.bg,border:ee.color.border}:Bc[pe];return l.jsxs(Be.Fragment,{children:[F>0&&l.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:le}}),ae.map((ie,ve)=>l.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(B.projectId,ie.jobType),style:{left:R(ie.time)-3,top:le+Se,height:de},className:`absolute w-6 rounded border ${G.bg} ${G.border} ${z?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${B.projectId} · ${ee.label} @ ${Os(ie.time,"HH:mm")}`,children:l.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:Os(ie.time,"HH:mm")})},ve))]},B.projectId)}),re.length===0&&!Y&&l.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:l.jsx("span",{className:"text-[10px] text-slate-700 italic",children:"No runs in this window"})})]})]},ee.id)})]}),l.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Jn+R(new Date)},children:l.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})}),l.jsxs("div",{className:"p-3 bg-slate-900/40 flex items-center gap-4 text-[10px] text-slate-500",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("div",{className:"w-1.5 h-3 rounded bg-blue-500/50 border border-blue-500"}),l.jsx("span",{children:"Each block = one scheduled run"})]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("div",{className:"w-[1px] h-4 bg-rose-500"}),l.jsx("span",{children:"Current Time"})]}),Q&&l.jsx("div",{className:"flex items-center gap-1.5",children:l.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),H.length>0&&l.jsxs("div",{className:"border-t border-slate-800",children:[l.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between gap-4",children:[l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Recent Execution Runs"}),l.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Last 24h of real runs grouped by provider bucket."})]}),l.jsxs("div",{className:"text-[10px] uppercase tracking-[0.2em] text-slate-500",children:[(m==null?void 0:m.recentRuns.length)??0," recorded runs"]})]}),l.jsx("div",{className:"overflow-x-auto custom-scrollbar","data-testid":"provider-execution-timeline",children:l.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+Jn},children:[l.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[l.jsx("div",{style:{width:Jn},className:"shrink-0 border-r border-slate-800"}),l.jsx("div",{className:"flex-1 relative flex",children:M.map((ee,Y)=>l.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:Y*60},children:l.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Os(ee,"HH:mm")})},Y))})]}),l.jsx("div",{className:"relative",children:H.map(({providerKey:ee,runs:Y})=>l.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${ee}`,children:[l.jsxs("div",{style:{width:Jn},className:"shrink-0 p-3 border-r border-slate-800/50 flex flex-col justify-center",children:[l.jsx("span",{className:"text-xs font-semibold text-slate-300 truncate",title:ee,children:P(ee)}),l.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:ee})]}),l.jsxs("div",{className:"flex-1 relative h-14",children:[l.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:M.map((re,Z)=>l.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},Z))}),Y.map(re=>{const Z=Nf.find(pe=>pe.id===re.jobType)??Nf[0],B=T(re.startedAt),F=T(re.finishedAt),z=Math.max(F-B,8),ae=re.status==="running",le=re.status==="error"||re.status==="failed"||re.status==="errored",de=ae?"bg-green-500":le?"bg-red-500":Z.color.bg,Se=ae?"border-green-400/60":le?"border-red-400/60":Z.color.border;return l.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${de} ${Se} opacity-85 shadow-lg ${ae?"animate-pulse":""}`,style:{left:B,width:z},title:`${ee} • ${Z.label} • ${Os(re.startedAt,"MMM d HH:mm")} • ${re.status}`,"data-testid":"provider-execution-run",children:l.jsxs("div",{className:"h-full px-2 flex items-center justify-between gap-2 text-[10px] text-white/90 overflow-hidden whitespace-nowrap",children:[l.jsx("span",{className:"font-semibold uppercase tracking-wide",children:Z.label}),l.jsx("span",{className:"text-white/70",children:re.status}),re.throttledCount>0&&l.jsxs("span",{className:"text-yellow-100",children:["throttle ",re.throttledCount,"x"]})]})},`${ee}-${re.id}-${re.startedAt.getTime()}`)})]})]},ee))}),l.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Jn+T(new Date)},children:l.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},tt=Be.forwardRef(({className:s="",label:u,error:d,helperText:o,rightIcon:m,...x},g)=>{const j=Be.useId(),b=x.id??j,p=d?`${b}-error`:void 0,w=!d&&o?`${b}-help`:void 0,E=[p,w].filter(Boolean).join(" ")||void 0;return l.jsxs("div",{className:"w-full",children:[u&&l.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{ref:g,id:b,"aria-describedby":E,"aria-invalid":d?!0:x["aria-invalid"],className:`
|
|
366
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
367
|
+
px-3 py-2 text-sm text-slate-200
|
|
368
|
+
placeholder:text-slate-600
|
|
369
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
370
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
371
|
+
transition-all duration-200
|
|
372
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
373
|
+
${m?"pr-10":""}
|
|
374
|
+
${s}
|
|
375
|
+
`,...x}),m&&l.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:m})]}),d?l.jsx("p",{id:p,className:"mt-1.5 text-xs text-red-400",children:d}):o?l.jsx("p",{id:w,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});tt.displayName="Input";const fa=Be.forwardRef(({className:s="",label:u,error:d,helperText:o,options:m,value:x,onChange:g,children:j,...b},p)=>{const w=Be.useId(),E=b.id??w,D=d?`${E}-error`:void 0,R=!d&&o?`${E}-help`:void 0,M=[D,R].filter(Boolean).join(" ")||void 0,T=H=>{g&&g(H.target.value)};return l.jsxs("div",{className:"w-full",children:[u&&l.jsx("label",{htmlFor:E,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),l.jsxs("div",{className:"relative",children:[l.jsx("select",{ref:p,id:E,"aria-describedby":M,"aria-invalid":d?!0:b["aria-invalid"],className:`
|
|
376
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
377
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
378
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
379
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
380
|
+
transition-all duration-200
|
|
381
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
382
|
+
${s}
|
|
383
|
+
`,value:x,onChange:T,...b,children:m?m.map(H=>l.jsx("option",{value:H.value,children:H.label},H.value)):j}),l.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:l.jsx(xg,{className:"h-4 w-4"})})]}),d?l.jsx("p",{id:D,className:"mt-1.5 text-xs text-red-400",children:d}):o?l.jsx("p",{id:R,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});fa.displayName="Select";const uv=({tabs:s,activeTab:u,onChange:d,className:o=""})=>{var b,p;const[m,x]=Be.useState((b=s[0])==null?void 0:b.id),g=u||m,j=w=>{d?d(w):x(w)};return l.jsxs("div",{className:`flex flex-col ${o}`,children:[l.jsx("div",{className:"border-b border-slate-800 mb-6",children:l.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:s.map(w=>l.jsx("button",{onClick:()=>j(w.id),className:`
|
|
384
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
385
|
+
${g===w.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
386
|
+
`,children:w.label},w.id))})}),l.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=s.find(w=>w.id===g))==null?void 0:p.content})]})},su=[{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"}],Jf=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am"}}];function _r(s){return s.trim().replace(/\s+/g," ")}function Rr(s,u){return _r(s)===_r(u)}function mN(s){if(s)return Jf.find(u=>u.id===s)}function cv(s,u,d,o,m,x){return Rr(s.schedules.executor,u)&&Rr(s.schedules.reviewer,d)&&Rr(s.schedules.qa,o)&&Rr(s.schedules.audit,m)&&Rr(s.schedules.slicer,x)}function xN(s,u,d,o,m){return Jf.find(x=>cv(x,s,u,d,o,m))}function ov(s,u,d,o,m,x){const g=mN(s);return g&&cv(g,u,d,o,m,x)?g:xN(u,d,o,m,x)}function jf(s){const u=_r(s),d=u.split(/\s+/);if(d.length!==5)return u;const[o,m,x,g,j]=d,b=/^\d+$/.test(o),p=su.find(w=>_r(w.value)===u);if(p)return p.label;if(o==="*/30"&&m==="*")return"Every 30 minutes";if(o==="0"&&m==="*")return"Every hour";if(o.startsWith("*/"))return`Every ${parseInt(o.replace("*/",""),10)} minutes`;if(b&&m.startsWith("*/")&&x==="*"&&g==="*"&&j==="*"){const w=parseInt(m.replace("*/",""),10);return o==="0"?`Every ${w} hours`:`Every ${w} hours at :${o.padStart(2,"0")}`}if(o==="0"&&m.startsWith("*/"))return`Every ${parseInt(m.replace("*/",""),10)} hours`;if(o==="0"&&m.includes("-")){const[w,E]=m.split("-");return`Every hour from ${Ki(w)} to ${Ki(E)}`}if(b&&m.includes("-")&&x==="*"&&g==="*"&&j==="*"){const[w,E]=m.split("-");return`Every hour from ${eu(w,o)} to ${eu(E,o)}`}if(o==="0"&&m.includes(",")){const w=m.split(",").map(Ki);return w.length<=3?`At ${w.join(" and ")}`:`At ${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}if(b&&m.includes(",")&&x==="*"&&g==="*"&&(j==="*"||j==="1-5")){const w=m.split(",").map(D=>eu(D,o)),E=j==="1-5"?"Weekdays at ":"At ";return w.length<=3?`${E}${w.join(" and ")}`:`${E}${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}return o==="0"&&m!=="*"&&x==="*"&&g==="*"&&j==="*"?`Daily at ${Ki(m)}`:b&&m!=="*"&&x==="*"&&g==="*"&&j==="*"?`Daily at ${eu(m,o)}`:o==="0"&&m!=="*"&&x==="*"&&g==="*"&&j==="1-5"?`Weekdays at ${Ki(m)}`:b&&m!=="*"&&x==="*"&&g==="*"&&j==="1-5"?`Weekdays at ${eu(m,o)}`:u}function Ki(s){const u=parseInt(s,10);return u===0?"12 AM":u<12?`${u} AM`:u===12?"12 PM":`${u-12} PM`}function eu(s,u){const d=u.padStart(2,"0"),o=parseInt(s,10);return Number.isNaN(o)?`${s}:${d}`:o===0?`12:${d} AM`:o<12?`${o}:${d} AM`:o===12?`12:${d} PM`:`${o-12}:${d} PM`}function dv(s){const u=_r(s),d=su.find(o=>_r(o.value)===u);return(d==null?void 0:d.value)??"__custom__"}function gN(s){const u=new Date,d=s.getTime()-u.getTime(),o=Math.floor(d/6e4),m=Math.floor(o/60),x=Math.floor(m/24);return o<1?"less than a minute":o<60?`in ${o} minute${o>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${x} day${x>1?"s":""}`}function vN(s){const u={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return s.toLocaleDateString("en-US",u)}function yN(s){const u=new Date,d=s.getTime()-u.getTime(),o=Math.floor(d/6e4);return o>=0&&o<30}const pN=()=>{var mn,_,be,De,Ze,Ht,ca,ma,Nt;const{addToast:s,selectedProjectId:u,globalModeLoading:d}=ha(),o=Kc(),[m,x]=V.useState(!1),[g,j]=V.useState(!1),[b,p]=V.useState([]);V.useEffect(()=>{d||Cg().then(p).catch(console.error)},[u,d]);const w=(ge,$e)=>{ge===u||ge==="current"?o(`/settings?tab=schedules&mode=custom&jobType=${$e}`):s({title:"Project Switch Required",message:`To edit ${ge}, please switch to that project in the sidebar.`,type:"info"})},[E,D]=V.useState(null),[R,M]=V.useState({executorSchedule:"",reviewerSchedule:"",isEditing:!1}),[T,H]=V.useState(null),[P,Q]=V.useState(null),[te,ee]=V.useState(!1),{data:Y,loading:re,error:Z,refetch:B}=Ia(Og,[u],{enabled:!d}),{data:F,loading:z,refetch:ae}=Ia(Wf,[u],{enabled:!d});V.useEffect(()=>{const ge=setInterval(()=>{B()},3e4);return()=>clearInterval(ge)},[B]),V.useEffect(()=>{if(d)return;const ge=()=>{mx().then(H).catch(()=>{}),r2(24).then(Q).catch(()=>{})};ge();const $e=setInterval(ge,3e4);return()=>clearInterval($e)},[d,u]),V.useEffect(()=>{F&&!R.isEditing&&M({executorSchedule:F.cronSchedule,reviewerSchedule:F.reviewerSchedule,isEditing:!1})},[F,R.isEditing]);const le=()=>{ae(),B()},de=(ge,$e)=>ge instanceof Error?ge.message:$e,Se=async()=>{if(Y){x(!0);try{Y.paused?(await au(),s({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await e2(),s({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),le()}catch(ge){s({title:"Action Failed",message:de(ge,"Failed to toggle schedule state"),type:"error"})}finally{x(!1)}}},pe=()=>{F&&M({executorSchedule:F.cronSchedule,reviewerSchedule:F.reviewerSchedule,isEditing:!0})},G=()=>{F&&M({executorSchedule:F.cronSchedule,reviewerSchedule:F.reviewerSchedule,isEditing:!1})},ie=async()=>{if(F){j(!0);try{await Ds({cronSchedule:R.executorSchedule,reviewerSchedule:R.reviewerSchedule});let ge="";try{await au()}catch($e){ge=de($e,"Failed to reinstall cron schedules")}M($e=>({...$e,isEditing:!1})),le(),s(ge?{title:"Schedules Saved (Cron Reinstall Failed)",message:ge,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(ge){s({title:"Save Failed",message:de(ge,"Failed to save schedules"),type:"error"})}finally{j(!1)}}},ve=async()=>{ee(!0);try{const ge=await i2(!0);H(null),mx().then(H).catch(()=>{}),s({title:"Queue Cleared",message:`Removed ${ge.cleared} stale job${ge.cleared!==1?"s":""} from the queue.`,type:"success"})}catch(ge){s({title:"Clear Failed",message:ge instanceof Error?ge.message:"Failed to clear queue",type:"error"})}finally{ee(!1)}},we=async(ge,$e)=>{if(F){D(ge);try{ge==="executor"?await Ds({executorEnabled:$e}):ge==="reviewer"?await Ds({reviewerEnabled:$e}):ge==="qa"?await Ds({qa:{...F.qa,enabled:$e}}):ge==="audit"?await Ds({audit:{...F.audit,enabled:$e}}):await Ds({roadmapScanner:{...F.roadmapScanner,enabled:$e}});let Bt="";try{await au()}catch(xn){Bt=de(xn,"Failed to reinstall cron schedules")}le(),s(Bt?{title:"Job Saved (Cron Reinstall Failed)",message:Bt,type:"warning"}:{title:"Job Updated",message:`${ge[0].toUpperCase()+ge.slice(1)} ${$e?"enabled":"disabled"}.`,type:"success"})}catch(Bt){s({title:"Update Failed",message:de(Bt,"Failed to update job configuration"),type:"error"})}finally{D(null)}}},oe=ge=>{if(!ge)return l.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const $e=new Date(ge),Bt=yN($e);return l.jsxs("div",{className:"flex items-center space-x-2",children:[Bt&&l.jsxs("span",{className:"relative flex h-3 w-3",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),l.jsxs("div",{className:"text-sm",children:[l.jsx("span",{className:"text-slate-200 font-medium",children:gN($e)}),l.jsxs("span",{className:"text-slate-500 ml-2",children:["(",vN($e),")"]})]})]})},A=(ge,$e,Bt,xn)=>{const Us=dv($e),Fl=Us==="__custom__";return l.jsxs("div",{className:`space-y-3 ${xn?"opacity-50 pointer-events-none":""}`,children:[l.jsx("div",{className:"flex items-center space-x-3",children:l.jsx(fa,{label:`${ge} Preset`,options:su,value:Us,onChange:Qe=>{Qe!=="__custom__"&&Bt(Qe)},className:"flex-1"})}),Fl&&l.jsx(tt,{label:"Custom Cron Expression",value:$e,onChange:Qe=>Bt(Qe.target.value),placeholder:"* * * * *",helperText:"Format: minute hour day month weekday (e.g., 0 */2 * * * for every 2 hours)"}),l.jsxs("div",{className:"text-sm text-slate-400",children:["Human-readable: ",l.jsx("span",{className:"text-slate-200",children:jf($e)})]})]})},ne=ge=>{if(!ge||ge.delayMinutes<=0)return l.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const $e=[];return ge.balancedDelayMinutes>0&&$e.push(`auto +${ge.balancedDelayMinutes}m`),ge.manualDelayMinutes>0&&$e.push(`manual +${ge.manualDelayMinutes}m`),l.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Delayed after cron fire:",l.jsxs("span",{className:"text-slate-300",children:[" ",$e.join(" • ")]})]})};if(re||z)return l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(Z||!Y||!F)return l.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[l.jsx(al,{className:"h-12 w-12 text-red-400"}),l.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),l.jsx("div",{className:"text-sm text-slate-500",children:(Z==null?void 0:Z.message)||"Unknown error"}),l.jsx(qe,{onClick:()=>{B(),ae()},children:"Retry"})]});const he=Y.paused,ye=he?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",me=he?"Paused":"Active",xe=ov(F.scheduleBundleId,F.cronSchedule,F.reviewerSchedule,F.qa.schedule,F.audit.schedule,F.roadmapScanner.slicerSchedule||"35 */12 * * *"),Me=(ge,$e,Bt)=>!xe||!Rr(xe.schedules[ge],$e)?jf(Bt):`${xe.label} • ${xe.hints[ge]}`,Ge=T!=null&&T.running?1:0,Le=(T==null?void 0:T.pending.total)??0,ta=(P==null?void 0:P.averageWaitSeconds)??null,aa=P?P.recentRuns.filter(ge=>ge.throttledCount>0).length:null,Tn=ge=>ge===null?"—":ge<60?`${Math.round(ge)}s`:`${Math.floor(ge/60)}m ${Math.round(ge%60)}s`,hn=l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4","data-testid":"queue-overview-cards",children:[l.jsx(Ye,{className:"p-4",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx($f,{className:"h-5 w-5 text-green-400 shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Running"}),l.jsx("div",{className:"text-2xl font-bold text-slate-100","data-testid":"overview-running",children:T?Ge:"—"}),(T==null?void 0:T.running)&&l.jsxs("div",{className:"text-[11px] text-slate-400 truncate mt-0.5",children:[T.running.jobType," · ",T.running.projectName]})]}),(Ge>0||Le>0)&&l.jsx(qe,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300 shrink-0",onClick:ve,loading:te,title:"Force clear all stale running and pending queue entries",children:"Clear"})]})}),l.jsx(Ye,{className:"p-4",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(y1,{className:"h-5 w-5 text-indigo-400 shrink-0"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Pending"}),l.jsx("div",{className:"text-2xl font-bold text-slate-100","data-testid":"overview-pending",children:T?Le:"—"})]})]})}),l.jsx(Ye,{className:"p-4",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(o1,{className:"h-5 w-5 text-amber-400 shrink-0"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Avg Wait"}),l.jsx("div",{className:"text-2xl font-bold text-slate-100","data-testid":"overview-avg-wait",children:Tn(ta)})]})]})}),l.jsx(Ye,{className:"p-4",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx($1,{className:"h-5 w-5 text-yellow-400 shrink-0"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Throttled"}),l.jsx("div",{className:`text-2xl font-bold ${aa&&aa>0?"text-yellow-300":"text-slate-100"}`,"data-testid":"overview-throttled",children:aa!==null?aa:"—"}),l.jsx("div",{className:"text-[11px] text-slate-500 mt-0.5",children:"in last 24h"})]})]})})]}),l.jsx(iv,{configs:b,currentProjectId:u,onEditJob:w,queueStatus:T,queueAnalytics:P}),P&&l.jsxs(Ye,{className:"p-6",children:[l.jsx("h3",{className:"text-sm font-semibold text-slate-300 uppercase tracking-wide mb-4",children:"Provider Buckets"}),l.jsx(z2,{analytics:P})]})]}),Ta=l.jsxs("div",{className:"space-y-6",children:[l.jsx(Ye,{className:`p-6 border-2 ${ye}`,children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center space-x-4",children:[l.jsx(Xc,{className:"h-8 w-8"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400",children:"Cron Status"}),l.jsx("div",{className:"text-2xl font-bold",children:me}),l.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),l.jsx(qe,{variant:he?"primary":"outline",size:"lg",onClick:Se,loading:m,children:he?l.jsxs(l.Fragment,{children:[l.jsx(Kn,{className:"h-5 w-5 mr-2"}),"Resume"]}):l.jsxs(l.Fragment,{children:[l.jsx(bg,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsxs(Ye,{className:`p-6 ${F.executorEnabled===!1?"opacity-50":""}`,children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Executor"}),F.executorEnabled===!1?l.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"}):!R.isEditing&&l.jsxs(qe,{variant:"ghost",size:"sm",onClick:pe,children:[l.jsx(_1,{className:"h-4 w-4 mr-1"}),"Edit"]})]}),R.isEditing?A("Executor",R.executorSchedule,ge=>M($e=>({...$e,executorSchedule:ge})),F.executorEnabled===!1):l.jsx("div",{className:"space-y-4",children:F.executorEnabled!==!1?l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),l.jsx("div",{className:"text-lg text-slate-200 font-medium",children:Me("executor",F.cronSchedule,Y.executor.schedule)}),l.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:Y.executor.schedule}),ne(Y.executor)]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),oe(Y.executor.nextRun)]}),l.jsxs("div",{className:`flex items-center space-x-2 text-sm ${Y.executor.installed?"text-green-400":"text-amber-400"}`,children:[l.jsx(Zc,{className:"h-4 w-4"}),l.jsx("span",{children:Y.executor.installed?"Installed":"Not installed"})]})]}):l.jsx("div",{className:"text-slate-500 text-sm",children:"Executor is disabled in settings."})})]}),l.jsxs(Ye,{className:`p-6 ${F.reviewerEnabled?"":"opacity-50"}`,children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Reviewer"}),!F.reviewerEnabled&&l.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),R.isEditing?A("Reviewer",R.reviewerSchedule,ge=>M($e=>({...$e,reviewerSchedule:ge})),!F.reviewerEnabled):l.jsx("div",{className:"space-y-4",children:F.reviewerEnabled?l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),l.jsx("div",{className:"text-lg text-slate-200 font-medium",children:Me("reviewer",F.reviewerSchedule,Y.reviewer.schedule)}),l.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:Y.reviewer.schedule}),ne(Y.reviewer)]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),oe(Y.reviewer.nextRun)]}),l.jsxs("div",{className:`flex items-center space-x-2 text-sm ${Y.reviewer.installed?"text-green-400":"text-amber-400"}`,children:[l.jsx(Zc,{className:"h-4 w-4"}),l.jsx("span",{children:Y.reviewer.installed?"Installed":"Not installed"})]})]}):l.jsx("div",{className:"text-slate-500 text-sm",children:"Automated reviews are disabled. Enable them in Settings to configure the reviewer schedule."})})]})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[l.jsxs(Ye,{className:`p-6 ${F.qa.enabled?"":"opacity-50"}`,children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("h3",{className:"text-lg font-semibold text-slate-200 flex items-center gap-2",children:[l.jsx(jg,{className:"h-4 w-4"}),"QA"]}),!F.qa.enabled&&l.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),F.qa.enabled?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),l.jsx("div",{className:"text-lg text-slate-200 font-medium",children:Me("qa",F.qa.schedule,((mn=Y.qa)==null?void 0:mn.schedule)??F.qa.schedule)}),l.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((_=Y.qa)==null?void 0:_.schedule)??F.qa.schedule}),ne(Y.qa)]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),oe((be=Y.qa)==null?void 0:be.nextRun)]})]}):l.jsx("div",{className:"text-slate-500 text-sm",children:"QA is disabled in settings."})]}),l.jsxs(Ye,{className:`p-6 ${F.audit.enabled?"":"opacity-50"}`,children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("h3",{className:"text-lg font-semibold text-slate-200 flex items-center gap-2",children:[l.jsx(cu,{className:"h-4 w-4"}),"Auditor"]}),!F.audit.enabled&&l.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),F.audit.enabled?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),l.jsx("div",{className:"text-lg text-slate-200 font-medium",children:Me("audit",F.audit.schedule,((De=Y.audit)==null?void 0:De.schedule)??F.audit.schedule)}),l.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((Ze=Y.audit)==null?void 0:Ze.schedule)??F.audit.schedule}),ne(Y.audit)]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),oe((Ht=Y.audit)==null?void 0:Ht.nextRun)]})]}):l.jsx("div",{className:"text-slate-500 text-sm",children:"Audit is disabled in settings."})]}),l.jsxs(Ye,{className:`p-6 ${F.roadmapScanner.enabled?"":"opacity-50"}`,children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("h3",{className:"text-lg font-semibold text-slate-200 flex items-center gap-2",children:[l.jsx(gg,{className:"h-4 w-4"}),"Planner"]}),!F.roadmapScanner.enabled&&l.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),F.roadmapScanner.enabled?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),l.jsx("div",{className:"text-lg text-slate-200 font-medium",children:Me("slicer",F.roadmapScanner.slicerSchedule,((ca=Y.planner)==null?void 0:ca.schedule)??F.roadmapScanner.slicerSchedule)}),l.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((ma=Y.planner)==null?void 0:ma.schedule)??F.roadmapScanner.slicerSchedule}),ne(Y.planner)]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),oe((Nt=Y.planner)==null?void 0:Nt.nextRun)]})]}):l.jsx("div",{className:"text-slate-500 text-sm",children:"Planner uses roadmap scanner scheduling."})]})]}),l.jsxs(Ye,{className:"p-6",children:[l.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[l.jsx(Wc,{className:"h-5 w-5 text-slate-400"}),l.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),Y.entries.length===0?l.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):l.jsx("div",{className:"space-y-2",children:Y.entries.map((ge,$e)=>l.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:ge},$e))})]}),R.isEditing&&l.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-4 border-t border-slate-800",children:[l.jsx(qe,{variant:"ghost",onClick:G,children:"Cancel"}),l.jsxs(qe,{onClick:ie,loading:g,children:[l.jsx(Zc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]}),Ca=l.jsxs(Ye,{className:"p-6",children:[l.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Job Enablement"}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Executor"}),l.jsx("div",{className:"text-xs text-slate-500",children:"Creates implementation PRs from PRDs"})]}),l.jsx(ea,{checked:F.executorEnabled!==!1,disabled:E!==null,"aria-label":"Toggle executor automation",onChange:ge=>we("executor",ge)})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Reviewer"}),l.jsx("div",{className:"text-xs text-slate-500",children:"Reviews PRs and manages merge readiness"})]}),l.jsx(ea,{checked:F.reviewerEnabled,disabled:E!==null,"aria-label":"Toggle reviewer automation",onChange:ge=>we("reviewer",ge)})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-slate-200",children:"QA"}),l.jsx("div",{className:"text-xs text-slate-500",children:"Generates and runs quality checks on PRs"})]}),l.jsx(ea,{checked:F.qa.enabled,disabled:E!==null,"aria-label":"Toggle QA automation",onChange:ge=>we("qa",ge)})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Auditor"}),l.jsx("div",{className:"text-xs text-slate-500",children:"Runs automated audit reports"})]}),l.jsx(ea,{checked:F.audit.enabled,disabled:E!==null,"aria-label":"Toggle audit automation",onChange:ge=>we("audit",ge)})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 md:col-span-2",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Planner"}),l.jsx("div",{className:"text-xs text-slate-500",children:"Creates PRDs from audit findings and pending roadmap items"})]}),l.jsx(ea,{checked:F.roadmapScanner.enabled,disabled:E!==null,"aria-label":"Toggle planner automation",onChange:ge=>we("planner",ge)})]})]})]});return l.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"}),xe&&l.jsxs("div",{className:"text-right",children:[l.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Schedule Bundle"}),l.jsx("div",{className:"text-sm font-medium text-indigo-300",children:xe.label}),l.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",Y.schedulingPriority,"/5 across registered projects"]})]})]}),l.jsx(uv,{tabs:[{id:"overview",label:"Overview",content:hn},{id:"schedules",label:"Schedules",content:Ta},{id:"jobs",label:"Jobs",content:Ca}]})]})},Gx=({presetId:s,preset:u,isBuiltIn:d,onEdit:o,onDelete:m,onReset:x})=>{const g=u.envVars?Object.keys(u.envVars).length:0;return l.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:[l.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("h4",{className:"text-sm font-medium text-slate-200",children:u.name}),d&&l.jsx(Ar,{variant:"info",className:"text-[10px]",children:"Built-in"})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.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 ${u.name} preset`,title:"Edit preset",children:l.jsx(Ff,{className:"h-4 w-4"})}),d?x&&l.jsx("button",{type:"button",onClick:x,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${u.name} to defaults`,title:"Reset to defaults",children:l.jsx(Sg,{className:"h-4 w-4"})}):m&&l.jsx("button",{type:"button",onClick:m,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${u.name} preset`,title:"Delete preset",children:l.jsx(Gf,{className:"h-4 w-4"})})]})]}),l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("span",{className:"text-xs text-slate-500",children:"Command:"}),l.jsxs("code",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-indigo-400 font-mono",children:[u.command,u.subcommand&&` ${u.subcommand}`]})]}),u.model&&l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("span",{className:"text-xs text-slate-500",children:"Model:"}),l.jsx(Ar,{variant:"neutral",className:"text-[10px] font-mono",children:u.model})]}),l.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[l.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",s]}),g>0&&l.jsxs("span",{className:"text-xs text-slate-500",children:[g," env var",g!==1?"s":""]})]})]})},bN=({isOpen:s,onClose:u,title:d,children:o})=>(V.useEffect(()=>{const m=x=>{x.key==="Escape"&&u()};return s&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[s,u]),s?bb.createPortal(l.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[l.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:u,"aria-hidden":"true"}),l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[l.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:d}),l.jsx("button",{onClick:u,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:l.jsx(Hr,{className:"h-5 w-5"})})]}),l.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:o})]})]}),document.body):null),SN=s=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>s.toUpperCase().includes(d)),NN=({value:s,isSensitive:u})=>{const[d,o]=Be.useState(!1);return u?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?s:"***********"}),l.jsx("button",{type:"button",onClick:()=>o(!d),className:"text-slate-500 hover:text-slate-300","aria-label":d?"Hide sensitive value":"Show sensitive value",title:d?"Hide sensitive value":"Show sensitive value",children:d?l.jsx(a1,{className:"h-4 w-4"}):l.jsx(l1,{className:"h-4 w-4"})})]}):l.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:s})},fv=({envVars:s,onChange:u,compact:d=!1})=>{const[o,m]=Be.useState(""),[x,g]=Be.useState(""),[j,b]=Be.useState(null),[p,w]=Be.useState(""),E=()=>{if(o.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(o)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}u({...s,[o]:x}),m(""),g("")}},D=P=>{const Q={...s};delete Q[P],u(Q)},R=P=>{b(P),w(s[P]??"")},M=()=>{j&&(u({...s,[j]:p}),b(null),w(""))},T=()=>{b(null),w("")},H=Object.entries(s);return l.jsxs("div",{className:"space-y-4",children:[!d&&l.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),l.jsx("div",{className:"space-y-2",children:H.length===0?l.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):H.map(([P,Q])=>l.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[l.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[l.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:P}),j===P?l.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[l.jsx("input",{type:"text",value:p,onChange:te=>w(te.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),l.jsx("button",{type:"button",onClick:M,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${P} value`,title:`Save ${P} value`,children:l.jsx(Zc,{className:"h-4 w-4"})}),l.jsx("button",{type:"button",onClick:T,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${P}`,title:`Cancel editing ${P}`,children:l.jsx(Hr,{className:"h-4 w-4"})})]}):l.jsx(NN,{value:Q,isSensitive:SN(P)})]}),j!==P&&l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{type:"button",onClick:()=>R(P),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${P}`,title:`Edit ${P}`,children:l.jsx(Ff,{className:"h-4 w-4"})}),l.jsx("button",{type:"button",onClick:()=>D(P),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${P}`,title:`Delete ${P}`,children:l.jsx(Gf,{className:"h-4 w-4"})})]})]},P))}),l.jsxs("div",{className:`flex items-end gap-3 ${d?"":"pt-4 border-t border-slate-800"}`,children:[l.jsxs("div",{className:"flex-1",children:[!d&&l.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),l.jsx("input",{type:"text",value:o,onChange:P=>m(P.target.value.toUpperCase()),placeholder:d?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),l.jsxs("div",{className:"flex-1",children:[!d&&l.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),l.jsx("input",{type:"text",value:x,onChange:P=>g(P.target.value),placeholder:d?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),l.jsxs(qe,{onClick:E,disabled:!o.trim(),size:d?"sm":"md",children:[l.jsx(Ur,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},Zx={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:""}},jN=({isOpen:s,onClose:u,onSave:d,presetId:o,preset:m,isBuiltIn:x,existingIds:g})=>{const[j,b]=Be.useState(""),[p,w]=Be.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[E,D]=Be.useState(!1),[R,M]=Be.useState("custom"),[T,H]=Be.useState(null);Be.useEffect(()=>{s&&(o&&m?(b(o),w({name:m.name,command:m.command,subcommand:m.subcommand??"",promptFlag:m.promptFlag??"",autoApproveFlag:m.autoApproveFlag??"",workdirFlag:m.workdirFlag??"",modelFlag:m.modelFlag??"",model:m.model??"",envVars:m.envVars??{}}),o==="claude"||m.command==="claude"?M("claude"):o==="codex"||m.command==="codex"?M("codex"):M("custom")):(b(""),w({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),M("custom")),H(null),D(!1))},[s,o,m]);const P=Y=>{if(M(Y),Y!=="custom"&&Zx[Y]){const re=Zx[Y];w(Z=>({...Z,...re,envVars:Z.envVars})),!o&&!j&&b(Y)}},Q=(Y,re)=>{w(Z=>({...Z,[Y]:re})),H(null)},te=()=>{if(!p.name.trim())return H("Name is required"),!1;if(!p.command.trim())return H("Command is required"),!1;if(!o){if(!j.trim())return H("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(j))return H("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(g.includes(j))return H("A preset with this ID already exists"),!1}return!0},ee=()=>{var re,Z,B,F,z,ae;if(!te())return;const Y={name:p.name.trim(),command:p.command.trim()};(re=p.subcommand)!=null&&re.trim()&&(Y.subcommand=p.subcommand.trim()),(Z=p.promptFlag)!=null&&Z.trim()&&(Y.promptFlag=p.promptFlag.trim()),(B=p.autoApproveFlag)!=null&&B.trim()&&(Y.autoApproveFlag=p.autoApproveFlag.trim()),(F=p.workdirFlag)!=null&&F.trim()&&(Y.workdirFlag=p.workdirFlag.trim()),(z=p.modelFlag)!=null&&z.trim()&&(Y.modelFlag=p.modelFlag.trim()),(ae=p.model)!=null&&ae.trim()&&(Y.model=p.model.trim()),p.envVars&&Object.keys(p.envVars).length>0&&(Y.envVars=p.envVars),d(o||j,Y),u()};return l.jsx(bN,{isOpen:s,onClose:u,title:o?`Edit Preset: ${m==null?void 0:m.name}`:"Add Provider Preset",children:l.jsxs("div",{className:"space-y-6",children:[T&&l.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:T}),!x&&l.jsx("div",{children:l.jsx(fa,{label:"Template",value:R,onChange:P,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&&l.jsx(tt,{label:"Preset ID",value:j,onChange:Y=>b(Y.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,"")),placeholder:"e.g., my-custom-provider",helperText:"Unique identifier for this preset (lowercase, numbers, hyphens, underscores)"}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(tt,{label:"Display Name",value:p.name,onChange:Y=>Q("name",Y.target.value),placeholder:"e.g., My Custom Provider",required:!0}),l.jsx(tt,{label:"Command",value:p.command,onChange:Y=>Q("command",Y.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(tt,{label:"Model",value:p.model??"",onChange:Y=>Q("model",Y.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),l.jsx(tt,{label:"Model Flag",value:p.modelFlag??"",onChange:Y=>Q("modelFlag",Y.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),l.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[l.jsxs("button",{type:"button",onClick:()=>D(!E),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[E?l.jsx(Gb,{className:"h-4 w-4"}):l.jsx(xg,{className:"h-4 w-4"}),"Advanced Options"]}),E&&l.jsxs("div",{className:"mt-4 space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(tt,{label:"Subcommand",value:p.subcommand??"",onChange:Y=>Q("subcommand",Y.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),l.jsx(tt,{label:"Prompt Flag",value:p.promptFlag??"",onChange:Y=>Q("promptFlag",Y.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(tt,{label:"Auto-Approve Flag",value:p.autoApproveFlag??"",onChange:Y=>Q("autoApproveFlag",Y.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),l.jsx(tt,{label:"Workdir Flag",value:p.workdirFlag??"",onChange:Y=>Q("workdirFlag",Y.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),l.jsx(fv,{envVars:p.envVars??{},onChange:Y=>Q("envVars",Y),compact:!0})]})]})]}),l.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[l.jsx(qe,{variant:"ghost",onClick:u,children:"Cancel"}),l.jsx(qe,{onClick:ee,children:o?"Save Changes":"Add Preset"})]})]})})},Or=({label:s,value:u,onChange:d,helperText:o,placeholder:m="5 */3 * * *"})=>{const x=dv(u),g=x==="__custom__",j=w=>{w!=="__custom__"&&d(w)},b=w=>{d(w.target.value)},p=su.find(w=>w.value===x);return l.jsxs("div",{className:"space-y-3",children:[l.jsx(fa,{label:s,value:x,onChange:j,options:su.map(w=>({label:w.label,value:w.value})),helperText:g?void 0:(p==null?void 0:p.description)||o}),g&&l.jsxs("div",{className:"space-y-2 mt-2",children:[l.jsx(tt,{label:"Cron Expression",value:u,onChange:b,placeholder:m}),l.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[l.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",l.jsx("br",{}),l.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",l.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",l.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})},$c=["claude","codex"],wf=s=>{var u,d,o,m,x,g,j;return{provider:s.provider,providerLabel:s.providerLabel??"",providerPresets:s.providerPresets??{},defaultBranch:s.defaultBranch,prdDir:s.prdDir||"docs/prds",branchPrefix:s.branchPrefix,branchPatterns:s.branchPatterns||[],executorEnabled:s.executorEnabled??!0,reviewerEnabled:s.reviewerEnabled,minReviewScore:s.minReviewScore,maxRuntime:s.maxRuntime,reviewerMaxRuntime:s.reviewerMaxRuntime,maxLogSize:s.maxLogSize,cronSchedule:s.cronSchedule||"5 */3 * * *",reviewerSchedule:s.reviewerSchedule||"25 */6 * * *",scheduleBundleId:s.scheduleBundleId??null,cronScheduleOffset:s.cronScheduleOffset??0,schedulingPriority:s.schedulingPriority??3,maxRetries:s.maxRetries??3,reviewerMaxRetries:s.reviewerMaxRetries??2,reviewerRetryDelay:s.reviewerRetryDelay??30,providerEnv:s.providerEnv||{},notifications:s.notifications||{webhooks:[]},prdPriority:s.prdPriority||[],roadmapScanner:{enabled:((u=s.roadmapScanner)==null?void 0:u.enabled)??!0,roadmapPath:((d=s.roadmapScanner)==null?void 0:d.roadmapPath)??"ROADMAP.md",autoScanInterval:((o=s.roadmapScanner)==null?void 0:o.autoScanInterval)??300,slicerSchedule:((m=s.roadmapScanner)==null?void 0:m.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((x=s.roadmapScanner)==null?void 0:x.slicerMaxRuntime)??600,priorityMode:((g=s.roadmapScanner)==null?void 0:g.priorityMode)??"roadmap-first",issueColumn:((j=s.roadmapScanner)==null?void 0:j.issueColumn)??"Draft"},templatesDir:s.templatesDir||".night-watch/templates",boardProvider:s.boardProvider||{enabled:!0,provider:"github"},jobProviders:s.jobProviders||{},autoMerge:s.autoMerge??!1,autoMergeMethod:s.autoMergeMethod??"squash",fallbackOnRateLimit:s.fallbackOnRateLimit??!0,primaryFallbackModel:s.primaryFallbackModel??s.claudeModel??"sonnet",secondaryFallbackModel:s.secondaryFallbackModel??s.primaryFallbackModel??s.claudeModel??"sonnet",claudeModel:s.primaryFallbackModel??s.claudeModel??"sonnet",qa:s.qa||{enabled:!0,schedule:"45 2,14 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},audit:s.audit||{enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800},queue:s.queue||{enabled:!0,maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10}}}},Qx=s=>{const u=ov(s.scheduleBundleId,s.cronSchedule,s.reviewerSchedule,s.qa.schedule,s.audit.schedule,s.roadmapScanner.slicerSchedule??"35 */12 * * *");return u?{mode:"template",selectedTemplateId:u.id}:{mode:"custom",selectedTemplateId:""}},wN=({notifications:s,onChange:u})=>{const[d,o]=Be.useState(null),[m,x]=Be.useState(!1),[g,j]=Be.useState({type:"slack",url:"",events:[]}),b=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],p=()=>{u({webhooks:[...s.webhooks,g]}),j({type:"slack",url:"",events:[]}),x(!1)},w=(M,T)=>{const H=[...s.webhooks];H[M]=T,u({webhooks:H})},E=M=>{u({webhooks:s.webhooks.filter((T,H)=>H!==M)})},D=(M,T)=>M.includes(T)?M.filter(H=>H!==T):[...M,T],R=({webhook:M,onChange:T,onSave:H,onCancel:P,isNew:Q})=>l.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(fa,{label:"Type",value:M.type,onChange:te=>{const ee=te;T(ee==="telegram"?{type:ee,botToken:"",chatId:"",events:M.events}:{type:ee,url:"",events:M.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),M.type==="telegram"?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"relative",children:l.jsx(tt,{label:"Bot Token",type:"password",value:M.botToken||"",onChange:te=>T({...M,botToken:te.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),l.jsx(tt,{label:"Chat ID",value:M.chatId||"",onChange:te=>T({...M,chatId:te.target.value}),placeholder:"123456789"})]}):l.jsx("div",{className:"md:col-span-2",children:l.jsx(tt,{label:"Webhook URL",type:"password",value:M.url||"",onChange:te=>T({...M,url:te.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:b.map(te=>l.jsx("button",{type:"button",onClick:()=>T({...M,events:D(M.events,te.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${M.events.includes(te.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:te.label},te.value))})]}),l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx(qe,{variant:"ghost",onClick:P,children:"Cancel"}),l.jsx(qe,{onClick:H,disabled:M.events.length===0||(M.type==="telegram"?!M.botToken||!M.chatId:!M.url),children:Q?"Add Webhook":"Save Changes"})]})]});return l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),l.jsx("div",{className:"space-y-3",children:s.webhooks.length===0?l.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):s.webhooks.map((M,T)=>l.jsx("div",{children:d===T?l.jsx(R,{webhook:M,onChange:H=>w(T,H),onSave:()=>o(null),onCancel:()=>o(null)}):l.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:M.type}),M.type==="telegram"&&l.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",M.chatId]})]}),l.jsx("div",{className:"flex flex-wrap gap-1",children:M.events.map(H=>l.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:H.replace("_"," ")},H))})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{type:"button",onClick:()=>o(T),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${M.type} webhook`,title:`Edit ${M.type} webhook`,children:l.jsx(Ff,{className:"h-4 w-4"})}),l.jsx("button",{type:"button",onClick:()=>E(T),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${M.type} webhook`,title:`Delete ${M.type} webhook`,children:l.jsx(Gf,{className:"h-4 w-4"})})]})]})},T))}),m?l.jsx(R,{webhook:g,onChange:j,onSave:p,onCancel:()=>x(!1),isNew:!0}):l.jsxs(qe,{variant:"ghost",onClick:()=>x(!0),children:[l.jsx(Ur,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},Ef=({label:s,value:u,onChange:d,placeholder:o,helpText:m})=>{const[x,g]=Be.useState(""),j=()=>{x.trim()&&!u.includes(x.trim())&&(d([...u,x.trim()]),g(""))},b=w=>{d(u.filter(E=>E!==w))},p=w=>{w.key==="Enter"&&(w.preventDefault(),j())};return l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:s}),l.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:u.map(w=>l.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[w,l.jsx("button",{type:"button",onClick:()=>b(w),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${w}`,title:`Remove ${w}`,children:l.jsx(Hr,{className:"h-3 w-3"})})]},w))}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:x,onChange:w=>g(w.target.value),onKeyDown:p,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"}),l.jsx(qe,{onClick:j,disabled:!x.trim(),"aria-label":`Add ${s.toLowerCase()} value`,children:l.jsx(Ur,{className:"h-4 w-4"})})]}),m&&l.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},EN=()=>{const{addToast:s,projectName:u,selectedProjectId:d,globalModeLoading:o}=ha(),[m,x]=Be.useState(!1),[g,j]=Be.useState(null),b=Be.useRef(!1),[p,w]=Be.useState("template"),[E,D]=Be.useState("always-on"),[R,M]=Be.useState("general"),T=nl(),[H,P]=Be.useState(!1),[Q,te]=Be.useState(null),[ee,Y]=Be.useState(null),[re,Z]=Be.useState(null),{data:B,loading:F,error:z,refetch:ae}=Ia(Wf,[d],{enabled:!o}),{data:le,loading:de,refetch:Se}=Ia(X1,[d],{enabled:!o}),pe=le??[];Be.useEffect(()=>{const _=new URLSearchParams(T.search),be=_.get("tab"),De=_.get("mode");be&&M(be),De==="custom"?w("custom"):De==="template"&&w("template");const Ze=_.get("jobType");Ze&&be==="schedules"&&setTimeout(()=>{we("current",Ze)},300)},[T.search,B]);const G=Be.useCallback(_=>{const be=Qx(_);w(be.mode),D(be.selectedTemplateId)},[]);Be.useEffect(()=>{if(B)if(b.current)b.current=!1;else{const _=wf(B);j(_),G(_)}},[B,G]);const[ie,ve]=Be.useState([]);Be.useEffect(()=>{Cg().then(ve).catch(console.error)},[B]);const we=(_,be)=>{_===u||_==="current"?(p!=="custom"&&ne(),setTimeout(()=>{const De={executor:"job-schedule-executor",reviewer:"job-schedule-reviewer",qa:"job-schedule-qa",audit:"job-schedule-audit",slicer:"job-schedule-slicer"},Ze=document.getElementById(De[be]||"");Ze&&(Ze.scrollIntoView({behavior:"smooth",block:"center"}),Ze.classList.add("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900","rounded-lg"),setTimeout(()=>Ze.classList.remove("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900"),2e3))},50)):s({title:"Project Switch Required",message:`To edit ${_}, please switch to that project in the sidebar.`,type:"info"})},oe=(_,be)=>{j(De=>De&&{...De,[_]:be})},A=()=>{if(w("template"),!g)return;const _=Qx(g);_.mode==="template"&&(D(_.selectedTemplateId),oe("scheduleBundleId",_.selectedTemplateId))},ne=()=>{w("custom"),oe("scheduleBundleId",null),D("")},he=_=>{D(_.id),j(be=>be&&{...be,cronSchedule:_.schedules.executor,reviewerSchedule:_.schedules.reviewer,scheduleBundleId:_.id,qa:{...be.qa,schedule:_.schedules.qa},audit:{...be.audit,schedule:_.schedules.audit},roadmapScanner:{...be.roadmapScanner,slicerSchedule:_.schedules.slicer},fallbackOnRateLimit:!0})},ye=async()=>{var De,Ze,Ht;if(!g)return;const _=g.cronSchedule!==(B==null?void 0:B.cronSchedule)||g.reviewerSchedule!==(B==null?void 0:B.reviewerSchedule)||g.cronScheduleOffset!==((B==null?void 0:B.cronScheduleOffset)??0)||g.schedulingPriority!==((B==null?void 0:B.schedulingPriority)??3)||g.executorEnabled!==((B==null?void 0:B.executorEnabled)??!0)||g.reviewerEnabled!==((B==null?void 0:B.reviewerEnabled)??!0)||g.queue.enabled!==(((De=B==null?void 0:B.queue)==null?void 0:De.enabled)??!0)||g.qa.enabled!==((B==null?void 0:B.qa.enabled)??!0)||g.qa.schedule!==(B==null?void 0:B.qa.schedule)||g.audit.enabled!==((B==null?void 0:B.audit.enabled)??!0)||g.audit.schedule!==(B==null?void 0:B.audit.schedule)||g.roadmapScanner.enabled!==(((Ze=B==null?void 0:B.roadmapScanner)==null?void 0:Ze.enabled)??!0)||(g.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((Ht=B==null?void 0:B.roadmapScanner)==null?void 0:Ht.slicerSchedule)||"35 */12 * * *"),be={};for(const[ca,ma]of Object.entries(g.jobProviders))ma!=null&&ma!==""&&(be[ca]=ma);x(!0);try{const ca=await Ds({provider:g.provider,providerLabel:g.providerLabel.trim(),providerPresets:Object.keys(g.providerPresets).length>0?g.providerPresets:void 0,defaultBranch:g.defaultBranch,prdDir:g.prdDir,branchPrefix:g.branchPrefix,branchPatterns:g.branchPatterns,executorEnabled:g.executorEnabled,reviewerEnabled:g.reviewerEnabled,minReviewScore:g.minReviewScore,maxRuntime:g.maxRuntime,reviewerMaxRuntime:g.reviewerMaxRuntime,maxLogSize:g.maxLogSize,cronSchedule:g.cronSchedule,reviewerSchedule:g.reviewerSchedule,scheduleBundleId:p==="template"?g.scheduleBundleId:null,cronScheduleOffset:g.cronScheduleOffset,schedulingPriority:g.schedulingPriority,maxRetries:g.maxRetries,reviewerMaxRetries:g.reviewerMaxRetries,reviewerRetryDelay:g.reviewerRetryDelay,providerEnv:g.providerEnv,notifications:g.notifications,prdPriority:g.prdPriority,roadmapScanner:g.roadmapScanner,templatesDir:g.templatesDir,boardProvider:g.boardProvider,jobProviders:be,autoMerge:g.autoMerge,autoMergeMethod:g.autoMergeMethod,fallbackOnRateLimit:g.fallbackOnRateLimit,primaryFallbackModel:g.primaryFallbackModel,secondaryFallbackModel:g.secondaryFallbackModel,claudeModel:g.primaryFallbackModel,qa:g.qa,audit:g.audit,queue:g.queue}),ma=wf(ca);j(ma),G(ma);let Nt="";if(_)try{await au()}catch(ge){Nt=ge instanceof Error?ge.message:"failed to reinstall cron schedules"}s(Nt?{title:"Settings Saved (Cron Reinstall Failed)",message:Nt,type:"warning"}:{title:"Settings Saved",message:_?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),b.current=!0,ae(),Se()}catch(ca){s({title:"Save Failed",message:ca instanceof Error?ca.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},me=()=>{if(B){const _=wf(B);j(_),G(_),s({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},xe=async _=>{try{const be=await _g(_);oe("roadmapScanner",be.roadmapScanner);let De="";try{await au()}catch(Ze){De=Ze instanceof Error?Ze.message:"Failed to reinstall cron schedules"}s(De?{title:"Planner Saved (Cron Reinstall Failed)",message:De,type:"warning"}:{title:_?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${_?"enabled":"disabled"}.`,type:"success"})}catch(be){s({title:"Toggle Failed",message:be instanceof Error?be.message:"Failed to toggle roadmap scanner",type:"error"})}},Me=_=>({claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"}})[_]??null,Ge=()=>({...{claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"}},...g==null?void 0:g.providerPresets}),Le=_=>{const be=Ge();return Object.entries(be).map(([De,Ze])=>({label:Ze.name,value:De}))},ta=(_,be)=>{const De=[];be.provider===_&&De.push("Global Provider");const Ze={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner"};for(const[Ht,ca]of Object.entries(be.jobProviders))ca===_&&De.push(Ze[Ht]??Ht);return De},aa=_=>{const De=Ge()[_];De&&(te(_),Y(De),P(!0))},Tn=(_,be)=>{if(!g)return;const De={...g.providerPresets,[_]:be};oe("providerPresets",De),Q||s({title:"Preset Added",message:`${be.name} has been added. You can now assign it to jobs.`,type:"success"})},hn=_=>{var Ze,Ht;if(!g)return;if($c.includes(_)){s({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const be=ta(_,g);if(be.length>0){Z({presetId:_,presetName:((Ze=Ge()[_])==null?void 0:Ze.name)??_,references:be});return}const De={...g.providerPresets};delete De[_],oe("providerPresets",De),s({title:"Preset Deleted",message:`${((Ht=Ge()[_])==null?void 0:Ht.name)??_} has been removed.`,type:"success"})},Ta=_=>{if(!g)return;const be={...g.providerPresets};delete be[_],oe("providerPresets",be),s({title:"Preset Reset",message:`${_} has been reset to built-in defaults.`,type:"success"})},Ca=()=>{if(!re||!g)return;const{presetId:_}=re,be={...g.providerPresets};delete be[_],oe("providerPresets",be);const De={...g.jobProviders};for(const Ze of Object.keys(De))De[Ze]===_&&delete De[Ze];oe("jobProviders",De),g.provider===_&&oe("provider","claude"),Z(null),s({title:"Preset Deleted",message:`${re.presetName} has been removed and all references cleared.`,type:"success"})};if(F||!g)return l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(z)return l.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[l.jsx(al,{className:"h-12 w-12 text-red-400"}),l.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),l.jsx("div",{className:"text-sm text-slate-500",children:z.message}),l.jsx(qe,{onClick:()=>ae(),children:"Retry"})]});const mn=[{id:"general",label:"General",content:l.jsx(Ye,{className:"p-6 space-y-6",children:l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[l.jsx(tt,{label:"Project Name",value:u,disabled:!0}),l.jsx(tt,{label:"Default Branch",value:g.defaultBranch,onChange:_=>oe("defaultBranch",_.target.value)}),l.jsx(tt,{label:"PRD Directory",value:g.prdDir,onChange:_=>oe("prdDir",_.target.value),helperText:"Directory containing PRD files (relative to project root)"}),l.jsx(tt,{label:"Branch Prefix",value:g.branchPrefix,onChange:_=>oe("branchPrefix",_.target.value)}),l.jsx("div",{className:"md:col-span-2",children:l.jsx(ea,{label:"Enable PRD Executor",checked:g.executorEnabled,onChange:_=>oe("executorEnabled",_)})}),l.jsx("div",{className:"md:col-span-2",children:l.jsx(ea,{label:"Enable Automated Reviews",checked:g.reviewerEnabled,onChange:_=>oe("reviewerEnabled",_)})}),l.jsx("div",{className:"md:col-span-2",children:l.jsx(ea,{label:"Auto-merge approved PRs",checked:g.autoMerge,onChange:_=>oe("autoMerge",_)})}),g.autoMerge&&l.jsx(fa,{label:"Merge Method",value:g.autoMergeMethod,onChange:_=>oe("autoMergeMethod",_),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]})]}),l.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:l.jsx(Ef,{label:"Branch Patterns",value:g.branchPatterns,onChange:_=>oe("branchPatterns",_),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})})},{id:"providers",label:"Providers",content:l.jsxs("div",{className:"space-y-6",children:[l.jsxs(Ye,{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Presets"}),l.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure AI provider presets with custom commands, models, and environment variables"})]}),l.jsxs(qe,{onClick:()=>{te(null),Y(null),P(!0)},children:[l.jsx(Ur,{className:"h-4 w-4 mr-2"}),"Add Provider"]})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[$c.map(_=>{const De=g.providerPresets[_]||Me(_);return De?l.jsx(Gx,{presetId:_,preset:De,isBuiltIn:!0,onEdit:()=>aa(_),onReset:()=>Ta(_)},_):null}),Object.entries(g.providerPresets).filter(([_])=>!$c.includes(_)).map(([_,be])=>l.jsx(Gx,{presetId:_,preset:be,isBuiltIn:!1,onEdit:()=>aa(_),onDelete:()=>hn(_)},_))]})]}),l.jsxs(Ye,{className:"p-6 space-y-6",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Assignments"}),l.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Assign provider presets to specific job types. Jobs without an assignment use the global provider."})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-indigo-500/30 bg-indigo-500/5 gap-4",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Global Provider"}),l.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Default preset for all jobs without a specific assignment"})]}),l.jsx("div",{className:"w-64",children:l.jsx(fa,{value:g.provider,onChange:_=>oe("provider",_),options:Le(g.providerPresets)})})]}),[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"}].map(({key:_,label:be})=>l.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[l.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:be}),l.jsx("div",{className:"w-64",children:l.jsx(fa,{value:g.jobProviders[_]??"",onChange:De=>{const Ze={...g.jobProviders};De===""?delete Ze[_]:Ze[_]=De,oe("jobProviders",Ze)},options:[{label:"Use Global (default)",value:""},...Le(g.providerPresets)]})})]},_))]})]}),l.jsxs(Ye,{className:"p-6 space-y-6",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Rate Limit Fallback"}),l.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Native Claude fallback settings for when a Claude proxy is rate-limited"})]}),l.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/70 p-4",children:l.jsx("p",{className:"text-sm text-slate-300",children:"These settings control native Claude retry behavior after a Claude proxy rate limit. They apply globally regardless of which preset is assigned."})}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(fa,{label:"Primary Native Claude Fallback",value:g.primaryFallbackModel,onChange:_=>{const be=_;oe("primaryFallbackModel",be),oe("claudeModel",be)},options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"First native Claude model used for the rate-limit fallback attempt"}),l.jsx(fa,{label:"Secondary Native Claude Fallback",value:g.secondaryFallbackModel,onChange:_=>oe("secondaryFallbackModel",_),options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"Used only if the primary native Claude fallback is also rate-limited"}),l.jsxs("div",{className:"md:col-span-2",children:[l.jsx(ea,{label:"Fallback on Rate Limit",checked:g.fallbackOnRateLimit,onChange:_=>oe("fallbackOnRateLimit",_)}),l.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"When enabled, Night Watch retries with the primary native Claude fallback model, then the secondary one if the primary is also rate-limited"})]})]})]}),l.jsxs(Ye,{className:"p-6",children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Provider Environment Variables"}),l.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Environment variables passed to all provider CLIs. Preset-level env vars take precedence."}),l.jsx(fv,{envVars:g.providerEnv,onChange:_=>oe("providerEnv",_)})]})]})},{id:"runtime",label:"Runtime",content:l.jsxs("div",{className:"space-y-6",children:[l.jsxs(Ye,{className:"p-6 space-y-6",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),l.jsxs("div",{className:"flex items-center space-x-4",children:[l.jsx("input",{type:"range",min:"0",max:"100",value:g.minReviewScore,onChange:_=>oe("minReviewScore",Number(_.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),l.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:g.minReviewScore})]}),l.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(tt,{label:"Max Runtime (Executor)",type:"number",value:String(g.maxRuntime),onChange:_=>oe("maxRuntime",Number(_.target.value||0)),rightIcon:l.jsx("span",{className:"text-xs",children:"sec"})}),l.jsx(tt,{label:"Max Runtime (Reviewer)",type:"number",value:String(g.reviewerMaxRuntime),onChange:_=>oe("reviewerMaxRuntime",Number(_.target.value||0)),rightIcon:l.jsx("span",{className:"text-xs",children:"sec"})}),l.jsx(tt,{label:"Max Log Size",type:"number",value:String(g.maxLogSize),onChange:_=>oe("maxLogSize",Number(_.target.value||0)),rightIcon:l.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),l.jsxs(Ye,{className:"p-6 space-y-6",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),l.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automatic retry behavior for the PR reviewer when fixes do not fully resolve issues."})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(tt,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(g.reviewerMaxRetries),onChange:_=>{const be=Math.min(10,Math.max(0,Number(_.target.value||0)));oe("reviewerMaxRetries",be)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),l.jsx(tt,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(g.reviewerRetryDelay),onChange:_=>{const be=Math.min(300,Math.max(0,Number(_.target.value||0)));oe("reviewerRetryDelay",be)},helperText:"Wait time between retry attempts to let CI settle."})]})]})]})},{id:"schedules",label:"Schedules",content:l.jsxs(Ye,{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),l.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),l.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[l.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${p==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:A,children:"Template"}),l.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${p==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:ne,children:"Custom"})]})]}),l.jsx(iv,{configs:ie,currentProjectId:d,onEditJob:we}),p==="template"?l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Jf.map(_=>{const be=E===_.id;return l.jsxs("button",{type:"button",onClick:()=>he(_),className:`text-left p-4 rounded-lg border transition-colors ${be?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[l.jsx("div",{className:"font-medium text-slate-200 mb-1",children:_.label}),l.jsx("p",{className:"text-xs text-slate-400 mb-3",children:_.description}),l.jsx("div",{className:"space-y-0.5",children:[["Executor",_.hints.executor],["Reviewer",_.hints.reviewer],["QA",_.hints.qa],["Audit",_.hints.audit],["Slicer",_.hints.slicer]].map(([De,Ze])=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:De}),l.jsx("span",{className:"text-xs text-slate-400",children:Ze})]},De))})]},_.id)})}):l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx("div",{id:"job-schedule-executor",children:l.jsx(Or,{label:"PRD Execution Schedule",value:g.cronSchedule,onChange:_=>oe("cronSchedule",_)})}),l.jsx("div",{id:"job-schedule-reviewer",children:l.jsx(Or,{label:"PR Review Schedule",value:g.reviewerSchedule,onChange:_=>oe("reviewerSchedule",_)})}),l.jsx("div",{id:"job-schedule-qa",children:l.jsx(Or,{label:"QA Schedule",value:g.qa.schedule,onChange:_=>oe("qa",{...g.qa,schedule:_})})}),l.jsx("div",{id:"job-schedule-audit",children:l.jsx(Or,{label:"Audit Schedule",value:g.audit.schedule,onChange:_=>oe("audit",{...g.audit,schedule:_})})}),g.roadmapScanner.enabled&&l.jsx("div",{id:"job-schedule-slicer",children:l.jsx(Or,{label:"Planner Schedule",value:g.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:_=>oe("roadmapScanner",{...g.roadmapScanner,slicerSchedule:_})})})]}),l.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[l.jsx(fa,{label:"Scheduling Priority",value:String(g.schedulingPriority),onChange:_=>oe("schedulingPriority",Number(_)),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."}),l.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),l.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),l.jsx(ea,{checked:g.queue.enabled,onChange:_=>oe("queue",{...g.queue,enabled:_})})]})}),l.jsx(tt,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(g.cronScheduleOffset),onChange:_=>{const be=Math.min(59,Math.max(0,Number(_.target.value||0)));oe("cronScheduleOffset",be)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]})},{id:"notifications",label:"Notifications",content:l.jsxs(Ye,{className:"p-6",children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),l.jsx(wN,{notifications:g.notifications,onChange:_=>oe("notifications",_)})]})},{id:"roadmap",label:"Planner",content:l.jsxs(Ye,{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),l.jsx("p",{className:"text-sm text-slate-400",children:"Generate one PRD per run using ROADMAP.md first, then audit findings when roadmap work is exhausted"})]}),l.jsx(ea,{checked:g.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:xe})]}),g.roadmapScanner.enabled&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[l.jsx(tt,{label:"Roadmap File Path",value:g.roadmapScanner.roadmapPath,onChange:_=>oe("roadmapScanner",{...g.roadmapScanner,roadmapPath:_.target.value}),helperText:"Primary planning source (relative to project root)."}),l.jsx(Or,{label:"Planner Schedule",value:g.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:_=>oe("roadmapScanner",{...g.roadmapScanner,slicerSchedule:_})})]}),l.jsxs("div",{className:"pt-4 border-t border-slate-800",children:[l.jsx("h4",{className:"text-md font-medium text-slate-200 mb-4",children:"Planner Execution"}),l.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Planner creates one PRD at a time and can auto-create a board issue for handoff."}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(tt,{label:"Planner Max Runtime",type:"number",value:String(g.roadmapScanner.slicerMaxRuntime||""),onChange:_=>oe("roadmapScanner",{...g.roadmapScanner,slicerMaxRuntime:Number(_.target.value||0)}),rightIcon:l.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),l.jsx(fa,{label:"Planner Priority Mode",value:g.roadmapScanner.priorityMode||"roadmap-first",onChange:_=>oe("roadmapScanner",{...g.roadmapScanner,priorityMode:_==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}],helperText:"Choose whether planner consumes roadmap items or audit findings first."}),l.jsx(fa,{label:"Planner Issue Column",value:g.roadmapScanner.issueColumn||"Draft",onChange:_=>oe("roadmapScanner",{...g.roadmapScanner,issueColumn:_==="Ready"?"Ready":"Draft"}),options:[{label:"Draft (default)",value:"Draft"},{label:"Ready",value:"Ready"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})]})]})},{id:"board",label:"Board",content:l.jsxs(Ye,{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),l.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),l.jsx(ea,{checked:g.boardProvider.enabled,onChange:_=>oe("boardProvider",{...g.boardProvider,enabled:_})})]}),g.boardProvider.enabled&&l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[l.jsx(fa,{label:"Board Provider",value:g.boardProvider.provider,onChange:_=>oe("boardProvider",{...g.boardProvider,provider:_}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),g.boardProvider.provider==="github"&&l.jsxs(l.Fragment,{children:[l.jsx(tt,{label:"Project Number",type:"number",value:String(g.boardProvider.projectNumber||""),onChange:_=>oe("boardProvider",{...g.boardProvider,projectNumber:_.target.value?Number(_.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),l.jsx(tt,{label:"Repository",value:g.boardProvider.repo||"",onChange:_=>oe("boardProvider",{...g.boardProvider,repo:_.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),g.boardProvider.provider==="local"&&l.jsx("div",{className:"md:col-span-2",children:l.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]})},{id:"qa",label:"QA",content:l.jsxs(Ye,{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),l.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),l.jsx(ea,{checked:g.qa.enabled,onChange:_=>oe("qa",{...g.qa,enabled:_})})]}),g.qa.enabled&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[l.jsx(tt,{label:"Max Runtime",type:"number",value:String(g.qa.maxRuntime),onChange:_=>oe("qa",{...g.qa,maxRuntime:Number(_.target.value||0)}),rightIcon:l.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),l.jsx(fa,{label:"Artifacts",value:g.qa.artifacts,onChange:_=>oe("qa",{...g.qa,artifacts:_}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),l.jsx(tt,{label:"Skip Label",value:g.qa.skipLabel,onChange:_=>oe("qa",{...g.qa,skipLabel:_.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),l.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[l.jsx(Ef,{label:"QA Branch Patterns",value:g.qa.branchPatterns,onChange:_=>oe("qa",{...g.qa,branchPatterns:_}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA (defaults to top-level branchPatterns if empty)"}),l.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),l.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Automatically install Playwright browsers if missing during QA run"})]}),l.jsx(ea,{checked:g.qa.autoInstallPlaywright,onChange:_=>oe("qa",{...g.qa,autoInstallPlaywright:_})})]})]})]})]})},{id:"audit",label:"Audit",content:l.jsxs(Ye,{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),l.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),l.jsx(ea,{checked:g.audit.enabled,onChange:_=>oe("audit",{...g.audit,enabled:_})})]}),g.audit.enabled&&l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:l.jsx(tt,{label:"Max Runtime",type:"number",value:String(g.audit.maxRuntime),onChange:_=>oe("audit",{...g.audit,maxRuntime:Number(_.target.value||0)}),rightIcon:l.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})})]})},{id:"advanced",label:"Advanced",content:l.jsxs(Ye,{className:"p-6 space-y-6",children:[l.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),l.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(tt,{label:"Templates Directory",value:g.templatesDir,onChange:_=>oe("templatesDir",_.target.value),helperText:"Directory for custom template overrides"}),l.jsx(tt,{label:"Max Retries",type:"number",min:"1",value:String(g.maxRetries),onChange:_=>{const be=Math.max(1,Number(_.target.value||1));oe("maxRetries",be)},helperText:"Retry attempts for rate-limited API calls"})]}),l.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:l.jsx(Ef,{label:"PRD Priority",value:g.prdPriority,onChange:_=>oe("prdPriority",_),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]})}];return l.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[l.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),l.jsx(uv,{tabs:mn,activeTab:R,onChange:M}),l.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[l.jsxs(qe,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:me,children:[l.jsx(Sg,{className:"h-4 w-4 mr-2"}),"Reset"]}),l.jsxs(qe,{onClick:ye,loading:m,children:[l.jsx(O1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),l.jsxs("div",{className:"mt-12",children:[l.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[l.jsx($f,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),l.jsx(Ye,{className:"divide-y divide-slate-800",children:de?l.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):pe.map((_,be)=>{const De=_.status==="pass",Ze=_.status==="warn",Ht=De?"bg-green-500/10 text-green-400 border-green-500/20":Ze?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return l.jsxs("div",{className:"p-4 flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-slate-200",children:_.name}),l.jsx("p",{className:"text-xs text-slate-500",children:_.detail})]}),l.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${Ht}`,children:_.status.toUpperCase()})]},`${_.name}-${be}`)})})]}),l.jsx(jN,{isOpen:H,onClose:()=>{P(!1),te(null),Y(null)},onSave:Tn,presetId:Q,preset:ee,isBuiltIn:Q?$c.includes(Q):!1,existingIds:Object.keys(Ge())}),re&&l.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[l.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>Z(null),"aria-hidden":"true"}),l.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[l.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[l.jsx(wg,{className:"h-6 w-6 text-amber-400"}),l.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:"Cannot Delete Preset"})]}),l.jsxs("p",{className:"text-sm text-slate-300 mb-4",children:[l.jsx("strong",{children:re.presetName})," is currently assigned to the following jobs:"]}),l.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:re.references.map(_=>l.jsx("li",{children:_},_))}),l.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.'}),l.jsxs("div",{className:"flex justify-end gap-3",children:[l.jsx(qe,{variant:"ghost",onClick:()=>Z(null),children:"Cancel"}),l.jsx(qe,{variant:"secondary",onClick:Ca,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},MN=()=>(p2(),b2(),l.jsx(ob,{children:l.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[l.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"}),l.jsx(x2,{}),l.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[l.jsx(g2,{}),l.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:l.jsx("div",{className:"max-w-7xl mx-auto w-full",children:l.jsxs(Vp,{children:[l.jsx(In,{path:"/",element:l.jsx(T2,{})}),l.jsx(In,{path:"/prs",element:l.jsx(O2,{})}),l.jsx(In,{path:"/board",element:l.jsx(E2,{})}),l.jsx(In,{path:"/scheduling",element:l.jsx(pN,{})}),l.jsx(In,{path:"/logs",element:l.jsx(C2,{})}),l.jsx(In,{path:"/roadmap",element:l.jsx(D2,{})}),l.jsx(In,{path:"/settings",element:l.jsx(EN,{})}),l.jsx(In,{path:"*",element:l.jsx(Lp,{to:"/",replace:!0})})]})})})]}),l.jsx(y2,{})]})})),hv=document.getElementById("root");if(!hv)throw new Error("Could not find root element to mount to");const TN=Yy.createRoot(hv);TN.render(l.jsx(Be.StrictMode,{children:l.jsx(MN,{})}));
|