@jonit-dev/night-watch-cli 1.7.68 → 1.7.70
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 +73 -14
- package/dist/commands/queue.js +1 -1
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/shared/env-builder.js +1 -1
- package/dist/commands/shared/env-builder.js.map +1 -1
- package/dist/commands/slice.js +1 -1
- package/dist/commands/slice.js.map +1 -1
- package/dist/scripts/night-watch-cron.sh +17 -17
- package/dist/scripts/night-watch-pr-reviewer-cron.sh +14 -10
- package/dist/scripts/night-watch-qa-cron.sh +10 -9
- package/dist/web/assets/index-DGWsvFj6.css +1 -0
- package/dist/web/assets/index-DtrDkci5.js +381 -0
- package/dist/web/assets/index-MA6fM0ab.js +381 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
var Sv=Object.defineProperty;var V0=l=>{throw TypeError(l)};var Nv=(l,u,d)=>u in l?Sv(l,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[u]=d;var B0=(l,u,d)=>Nv(l,typeof u!="symbol"?u+"":u,d),lf=(l,u,d)=>u.has(l)||V0("Cannot "+d);var te=(l,u,d)=>(lf(l,u,"read from private field"),d?d.call(l):u.get(l)),et=(l,u,d)=>u.has(l)?V0("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(l):u.set(l,d),Te=(l,u,d,o)=>(lf(l,u,"write to private field"),o?o.call(l,d):u.set(l,d),d),Ee=(l,u,d)=>(lf(l,u,"access private method"),d);(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const x of document.querySelectorAll('link[rel="modulepreload"]'))o(x);new MutationObserver(x=>{for(const m of x)if(m.type==="childList")for(const y of m.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&o(y)}).observe(document,{childList:!0,subtree:!0});function d(x){const m={};return x.integrity&&(m.integrity=x.integrity),x.referrerPolicy&&(m.referrerPolicy=x.referrerPolicy),x.crossOrigin==="use-credentials"?m.credentials="include":x.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function o(x){if(x.ep)return;x.ep=!0;const m=d(x);fetch(x.href,m)}})();function Vx(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function wv(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var u=l.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(l).forEach(function(o){var x=Object.getOwnPropertyDescriptor(l,o);Object.defineProperty(d,o,x.get?x:{enumerable:!0,get:function(){return l[o]}})}),d}var sf={exports:{}},Hi={};/**
|
|
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 Y0;function jv(){if(Y0)return Hi;Y0=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function d(o,x,m){var y=null;if(m!==void 0&&(y=""+m),x.key!==void 0&&(y=""+x.key),"key"in x){m={};for(var j in x)j!=="key"&&(m[j]=x[j])}else m=x;return x=m.ref,{$$typeof:l,type:o,key:y,ref:x!==void 0?x:null,props:m}}return Hi.Fragment=u,Hi.jsx=d,Hi.jsxs=d,Hi}var $0;function Ev(){return $0||($0=1,sf.exports=jv()),sf.exports}var s=Ev(),rf={exports:{}},ze={};/**
|
|
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 G0;function Mv(){if(G0)return ze;G0=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),y=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"),_=Symbol.iterator;function k(T){return T===null||typeof T!="object"?null:(T=_&&T[_]||T["@@iterator"],typeof T=="function"?T:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,C={};function Y(T,X,ce){this.props=T,this.context=X,this.refs=C,this.updater=ce||D}Y.prototype.isReactComponent={},Y.prototype.setState=function(T,X){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,X,"setState")},Y.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function K(){}K.prototype=Y.prototype;function J(T,X,ce){this.props=T,this.context=X,this.refs=C,this.updater=ce||D}var ne=J.prototype=new K;ne.constructor=J,M(ne,Y.prototype),ne.isPureReactComponent=!0;var le=Array.isArray;function fe(){}var P={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function $(T,X,ce){var xe=ce.ref;return{$$typeof:l,type:T,key:X,ref:xe!==void 0?xe:null,props:ce}}function A(T,X){return $(T.type,X,T.props)}function ee(T){return typeof T=="object"&&T!==null&&T.$$typeof===l}function B(T){var X={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(ce){return X[ce]})}var de=/\/+/g;function ye(T,X){return typeof T=="object"&&T!==null&&T.key!=null?B(""+T.key):X.toString(36)}function ge(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(fe,fe):(T.status="pending",T.then(function(X){T.status==="pending"&&(T.status="fulfilled",T.value=X)},function(X){T.status==="pending"&&(T.status="rejected",T.reason=X)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function Z(T,X,ce,xe,we){var ve=typeof T;(ve==="undefined"||ve==="boolean")&&(T=null);var _e=!1;if(T===null)_e=!0;else switch(ve){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(T.$$typeof){case l:case u:_e=!0;break;case w:return _e=T._init,Z(_e(T._payload),X,ce,xe,we)}}if(_e)return we=we(T),_e=xe===""?"."+ye(T,0):xe,le(we)?(ce="",_e!=null&&(ce=_e.replace(de,"$&/")+"/"),Z(we,X,ce,"",function(ft){return ft})):we!=null&&(ee(we)&&(we=A(we,ce+(we.key==null||T&&T.key===we.key?"":(""+we.key).replace(de,"$&/")+"/")+_e)),X.push(we)),1;_e=0;var pe=xe===""?".":xe+":";if(le(T))for(var Ue=0;Ue<T.length;Ue++)xe=T[Ue],ve=pe+ye(xe,Ue),_e+=Z(xe,X,ce,ve,we);else if(Ue=k(T),typeof Ue=="function")for(T=Ue.call(T),Ue=0;!(xe=T.next()).done;)xe=xe.value,ve=pe+ye(xe,Ue++),_e+=Z(xe,X,ce,ve,we);else if(ve==="object"){if(typeof T.then=="function")return Z(ge(T),X,ce,xe,we);throw X=String(T),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return _e}function re(T,X,ce){if(T==null)return T;var xe=[],we=0;return Z(T,xe,"","",function(ve){return X.call(ce,ve,we++)}),xe}function he(T){if(T._status===-1){var X=T._result;X=X(),X.then(function(ce){(T._status===0||T._status===-1)&&(T._status=1,T._result=ce)},function(ce){(T._status===0||T._status===-1)&&(T._status=2,T._result=ce)}),T._status===-1&&(T._status=0,T._result=X)}if(T._status===1)return T._result.default;throw T._result}var Ne=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},H={map:re,forEach:function(T,X,ce){re(T,function(){X.apply(this,arguments)},ce)},count:function(T){var X=0;return re(T,function(){X++}),X},toArray:function(T){return re(T,function(X){return X})||[]},only:function(T){if(!ee(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return ze.Activity=E,ze.Children=H,ze.Component=Y,ze.Fragment=d,ze.Profiler=x,ze.PureComponent=J,ze.StrictMode=o,ze.Suspense=b,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,ze.__COMPILER_RUNTIME={__proto__:null,c:function(T){return P.H.useMemoCache(T)}},ze.cache=function(T){return function(){return T.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(T,X,ce){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var xe=M({},T.props),we=T.key;if(X!=null)for(ve in X.key!==void 0&&(we=""+X.key),X)!F.call(X,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&X.ref===void 0||(xe[ve]=X[ve]);var ve=arguments.length-2;if(ve===1)xe.children=ce;else if(1<ve){for(var _e=Array(ve),pe=0;pe<ve;pe++)_e[pe]=arguments[pe+2];xe.children=_e}return $(T.type,we,xe)},ze.createContext=function(T){return T={$$typeof:y,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:m,_context:T},T},ze.createElement=function(T,X,ce){var xe,we={},ve=null;if(X!=null)for(xe in X.key!==void 0&&(ve=""+X.key),X)F.call(X,xe)&&xe!=="key"&&xe!=="__self"&&xe!=="__source"&&(we[xe]=X[xe]);var _e=arguments.length-2;if(_e===1)we.children=ce;else if(1<_e){for(var pe=Array(_e),Ue=0;Ue<_e;Ue++)pe[Ue]=arguments[Ue+2];we.children=pe}if(T&&T.defaultProps)for(xe in _e=T.defaultProps,_e)we[xe]===void 0&&(we[xe]=_e[xe]);return $(T,ve,we)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(T){return{$$typeof:j,render:T}},ze.isValidElement=ee,ze.lazy=function(T){return{$$typeof:w,_payload:{_status:-1,_result:T},_init:he}},ze.memo=function(T,X){return{$$typeof:p,type:T,compare:X===void 0?null:X}},ze.startTransition=function(T){var X=P.T,ce={};P.T=ce;try{var xe=T(),we=P.S;we!==null&&we(ce,xe),typeof xe=="object"&&xe!==null&&typeof xe.then=="function"&&xe.then(fe,Ne)}catch(ve){Ne(ve)}finally{X!==null&&ce.types!==null&&(X.types=ce.types),P.T=X}},ze.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},ze.use=function(T){return P.H.use(T)},ze.useActionState=function(T,X,ce){return P.H.useActionState(T,X,ce)},ze.useCallback=function(T,X){return P.H.useCallback(T,X)},ze.useContext=function(T){return P.H.useContext(T)},ze.useDebugValue=function(){},ze.useDeferredValue=function(T,X){return P.H.useDeferredValue(T,X)},ze.useEffect=function(T,X){return P.H.useEffect(T,X)},ze.useEffectEvent=function(T){return P.H.useEffectEvent(T)},ze.useId=function(){return P.H.useId()},ze.useImperativeHandle=function(T,X,ce){return P.H.useImperativeHandle(T,X,ce)},ze.useInsertionEffect=function(T,X){return P.H.useInsertionEffect(T,X)},ze.useLayoutEffect=function(T,X){return P.H.useLayoutEffect(T,X)},ze.useMemo=function(T,X){return P.H.useMemo(T,X)},ze.useOptimistic=function(T,X){return P.H.useOptimistic(T,X)},ze.useReducer=function(T,X,ce){return P.H.useReducer(T,X,ce)},ze.useRef=function(T){return P.H.useRef(T)},ze.useState=function(T){return P.H.useState(T)},ze.useSyncExternalStore=function(T,X,ce){return P.H.useSyncExternalStore(T,X,ce)},ze.useTransition=function(){return P.H.useTransition()},ze.version="19.2.4",ze}var Z0;function Rf(){return Z0||(Z0=1,rf.exports=Mv()),rf.exports}var V=Rf();const Ke=Vx(V);var uf={exports:{}},Li={},cf={exports:{}},of={};/**
|
|
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 F0;function Tv(){return F0||(F0=1,(function(l){function u(Z,re){var he=Z.length;Z.push(re);e:for(;0<he;){var Ne=he-1>>>1,H=Z[Ne];if(0<x(H,re))Z[Ne]=re,Z[he]=H,he=Ne;else break e}}function d(Z){return Z.length===0?null:Z[0]}function o(Z){if(Z.length===0)return null;var re=Z[0],he=Z.pop();if(he!==re){Z[0]=he;e:for(var Ne=0,H=Z.length,T=H>>>1;Ne<T;){var X=2*(Ne+1)-1,ce=Z[X],xe=X+1,we=Z[xe];if(0>x(ce,he))xe<H&&0>x(we,ce)?(Z[Ne]=we,Z[xe]=he,Ne=xe):(Z[Ne]=ce,Z[X]=he,Ne=X);else if(xe<H&&0>x(we,he))Z[Ne]=we,Z[xe]=he,Ne=xe;else break e}}return re}function x(Z,re){var he=Z.sortIndex-re.sortIndex;return he!==0?he:Z.id-re.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var y=Date,j=y.now();l.unstable_now=function(){return y.now()-j}}var b=[],p=[],w=1,E=null,_=3,k=!1,D=!1,M=!1,C=!1,Y=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null;function ne(Z){for(var re=d(p);re!==null;){if(re.callback===null)o(p);else if(re.startTime<=Z)o(p),re.sortIndex=re.expirationTime,u(b,re);else break;re=d(p)}}function le(Z){if(M=!1,ne(Z),!D)if(d(b)!==null)D=!0,fe||(fe=!0,B());else{var re=d(p);re!==null&&ge(le,re.startTime-Z)}}var fe=!1,P=-1,F=5,$=-1;function A(){return C?!0:!(l.unstable_now()-$<F)}function ee(){if(C=!1,fe){var Z=l.unstable_now();$=Z;var re=!0;try{e:{D=!1,M&&(M=!1,K(P),P=-1),k=!0;var he=_;try{t:{for(ne(Z),E=d(b);E!==null&&!(E.expirationTime>Z&&A());){var Ne=E.callback;if(typeof Ne=="function"){E.callback=null,_=E.priorityLevel;var H=Ne(E.expirationTime<=Z);if(Z=l.unstable_now(),typeof H=="function"){E.callback=H,ne(Z),re=!0;break t}E===d(b)&&o(b),ne(Z)}else o(b);E=d(b)}if(E!==null)re=!0;else{var T=d(p);T!==null&&ge(le,T.startTime-Z),re=!1}}break e}finally{E=null,_=he,k=!1}re=void 0}}finally{re?B():fe=!1}}}var B;if(typeof J=="function")B=function(){J(ee)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,ye=de.port2;de.port1.onmessage=ee,B=function(){ye.postMessage(null)}}else B=function(){Y(ee,0)};function ge(Z,re){P=Y(function(){Z(l.unstable_now())},re)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(Z){Z.callback=null},l.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<Z?Math.floor(1e3/Z):5},l.unstable_getCurrentPriorityLevel=function(){return _},l.unstable_next=function(Z){switch(_){case 1:case 2:case 3:var re=3;break;default:re=_}var he=_;_=re;try{return Z()}finally{_=he}},l.unstable_requestPaint=function(){C=!0},l.unstable_runWithPriority=function(Z,re){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var he=_;_=Z;try{return re()}finally{_=he}},l.unstable_scheduleCallback=function(Z,re,he){var Ne=l.unstable_now();switch(typeof he=="object"&&he!==null?(he=he.delay,he=typeof he=="number"&&0<he?Ne+he:Ne):he=Ne,Z){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=he+H,Z={id:w++,callback:re,priorityLevel:Z,startTime:he,expirationTime:H,sortIndex:-1},he>Ne?(Z.sortIndex=he,u(p,Z),d(b)===null&&Z===d(p)&&(M?(K(P),P=-1):M=!0,ge(le,he-Ne))):(Z.sortIndex=H,u(b,Z),D||k||(D=!0,fe||(fe=!0,B()))),Z},l.unstable_shouldYield=A,l.unstable_wrapCallback=function(Z){var re=_;return function(){var he=_;_=re;try{return Z.apply(this,arguments)}finally{_=he}}}})(of)),of}var Q0;function Cv(){return Q0||(Q0=1,cf.exports=Tv()),cf.exports}var df={exports:{}},la={};/**
|
|
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 W0;function Ov(){if(W0)return la;W0=1;var l=Rf();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},x=Symbol.for("react.portal");function m(b,p,w){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:x,key:E==null?null:""+E,children:b,containerInfo:p,implementation:w}}var y=l.__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 la.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,la.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 m(b,p,null,w)},la.flushSync=function(b){var p=y.T,w=o.p;try{if(y.T=null,o.p=2,b)return b()}finally{y.T=p,o.p=w,o.d.f()}},la.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))},la.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},la.preinit=function(b,p){if(typeof b=="string"&&p&&typeof p.as=="string"){var w=p.as,E=j(w,p.crossOrigin),_=typeof p.integrity=="string"?p.integrity:void 0,k=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:_,fetchPriority:k}):w==="script"&&o.d.X(b,{crossOrigin:E,integrity:_,fetchPriority:k,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},la.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)},la.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})}},la.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)},la.requestFormReset=function(b){o.d.r(b)},la.unstable_batchedUpdates=function(b,p){return b(p)},la.useFormState=function(b,p,w){return y.H.useFormState(b,p,w)},la.useFormStatus=function(){return y.H.useHostTransitionStatus()},la.version="19.2.4",la}var X0;function Dv(){if(X0)return df.exports;X0=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),df.exports=Ov(),df.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 J0;function Rv(){if(J0)return Li;J0=1;var l=Cv(),u=Rf(),d=Dv();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 x(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(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 y(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(m(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=m(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 g=!1,N=i.child;N;){if(N===a){g=!0,a=i,n=c;break}if(N===n){g=!0,n=i,a=c;break}N=N.sibling}if(!g){for(N=c.child;N;){if(N===a){g=!0,a=c,n=i;break}if(N===n){g=!0,n=c,a=i;break}N=N.sibling}if(!g)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,_=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),J=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),A=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function B(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var de=Symbol.for("react.client.reference");function ye(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 M:return"Fragment";case Y:return"Profiler";case C:return"StrictMode";case le:return"Suspense";case fe:return"SuspenseList";case $:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case J:return e.displayName||"Context";case K:return(e._context.displayName||"Context")+".Consumer";case ne:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var ge=Array.isArray,Z=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},Ne=[],H=-1;function T(e){return{current:e}}function X(e){0>H||(e.current=Ne[H],Ne[H]=null,H--)}function ce(e,t){H++,Ne[H]=e.current,e.current=t}var xe=T(null),we=T(null),ve=T(null),_e=T(null);function pe(e,t){switch(ce(ve,t),ce(we,e),ce(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?c0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=c0(t),e=o0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}X(xe),ce(xe,e)}function Ue(){X(xe),X(we),X(ve)}function ft(e){e.memoizedState!==null&&ce(_e,e);var t=xe.current,a=o0(t,e.type);t!==a&&(ce(we,e),ce(xe,a))}function At(e){we.current===e&&(X(xe),X(we)),_e.current===e&&(X(_e),Ai._currentValue=he)}var Kt,Jn;function Za(e){if(Kt===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Kt=t&&t[1]||"",Jn=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Kt+e+Jn}var Fa=!1;function In(e,t){if(!e||Fa)return"";Fa=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ae){var I=ae}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(ae){I=ae}e.call(ue.prototype)}}else{try{throw Error()}catch(ae){I=ae}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ae){if(ae&&I&&typeof ae.stack=="string")return[ae.stack,I.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(),g=c[0],N=c[1];if(g&&N){var R=g.split(`
|
|
44
|
+
`),W=N.split(`
|
|
45
|
+
`);for(i=n=0;n<R.length&&!R[n].includes("DetermineComponentFrameRoot");)n++;for(;i<W.length&&!W[i].includes("DetermineComponentFrameRoot");)i++;if(n===R.length||i===W.length)for(n=R.length-1,i=W.length-1;1<=n&&0<=i&&R[n]!==W[i];)i--;for(;1<=n&&0<=i;n--,i--)if(R[n]!==W[i]){if(n!==1||i!==1)do if(n--,i--,0>i||R[n]!==W[i]){var se=`
|
|
46
|
+
`+R[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{Fa=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Za(a):""}function Kn(e,t){switch(e.tag){case 26:case 27:case 5:return Za(e.type);case 16:return Za("Lazy");case 13:return e.child!==t&&t!==null?Za("Suspense Fallback"):Za("Suspense");case 19:return Za("SuspenseList");case 0:case 15:return In(e.type,!1);case 11:return In(e.type.render,!1);case 1:return In(e.type,!0);case 31:return Za("Activity");default:return""}}function Pn(e){try{var t="",a=null;do t+=Kn(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var rn=Object.prototype.hasOwnProperty,el=l.unstable_scheduleCallback,tl=l.unstable_cancelCallback,ks=l.unstable_shouldYield,zs=l.unstable_requestPaint,Ht=l.unstable_now,me=l.unstable_getCurrentPriorityLevel,Le=l.unstable_ImmediatePriority,Lt=l.unstable_UserBlockingPriority,un=l.unstable_NormalPriority,Us=l.unstable_LowPriority,Yl=l.unstable_IdlePriority,Ye=l.log,zr=l.unstable_setDisableYieldValue,pt=null,Pt=null;function Yt(e){if(typeof Ye=="function"&&zr(e),Pt&&typeof Pt.setStrictMode=="function")try{Pt.setStrictMode(pt,e)}catch{}}var $t=Math.clz32?Math.clz32:eo,uu=Math.log,Pc=Math.LN2;function eo(e){return e>>>=0,e===0?32:31-(uu(e)/Pc|0)|0}var al=256,Hs=262144,ea=4194304;function cn(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 $l(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,c=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var N=n&134217727;return N!==0?(n=N&~c,n!==0?i=cn(n):(g&=N,g!==0?i=cn(g):a||(a=N&~e,a!==0&&(i=cn(a))))):(N=n&~c,N!==0?i=cn(N):g!==0?i=cn(g):a||(a=n&~e,a!==0&&(i=cn(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 nl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function cu(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 Ur(){var e=ea;return ea<<=1,(ea&62914560)===0&&(ea=4194304),e}function Ls(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ll(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ou(e,t,a,n,i,c){var g=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,R=e.expirationTimes,W=e.hiddenUpdates;for(a=g&~a;0<a;){var se=31-$t(a),ue=1<<se;N[se]=0,R[se]=-1;var I=W[se];if(I!==null)for(W[se]=null,se=0;se<I.length;se++){var ae=I[se];ae!==null&&(ae.lane&=-536870913)}a&=~ue}n!==0&&ot(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(g&~t))}function ot(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-$t(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function ia(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-$t(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function Hr(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 ta(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vs(){var e=re.p;return e!==0?e:(e=window.event,e===void 0?32:A0(e.type))}function Lr(e,t){var a=re.p;try{return re.p=e,t()}finally{re.p=a}}var Qa=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Qa,kt="__reactProps$"+Qa,Sn="__reactContainer$"+Qa,Gl="__reactEvents$"+Qa,du="__reactListeners$"+Qa,fu="__reactHandles$"+Qa,hu="__reactResources$"+Qa,Zl="__reactMarker$"+Qa;function Bs(e){delete e[Nt],delete e[kt],delete e[Gl],delete e[du],delete e[fu]}function Nn(e){var t=e[Nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Sn]||a[Nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=y0(e);e!==null;){if(a=e[Nt])return a;e=y0(e)}return t}e=a,a=e.parentNode}return null}function Oe(e){if(e=e[Nt]||e[Sn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ua(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Wa(e){var t=e[hu];return t||(t=e[hu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ct(e){e[Zl]=!0}var mu=new Set,qr={};function on(e,t){sl(e,t),sl(e+"Capture",t)}function sl(e,t){for(qr[e]=t,e=0;e<t.length;e++)mu.add(t[e])}var xu=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]*$"),gu={},wn={};function Vr(e){return rn.call(wn,e)?!0:rn.call(gu,e)?!1:xu.test(e)?wn[e]=!0:(gu[e]=!0,!1)}function Gt(e,t,a){if(Vr(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 tt(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 wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function dn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Br(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(g){a=""+g,c.call(this,g)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fl(e){if(!e._valueTracker){var t=dn(e)?"checked":"value";e._valueTracker=Br(e,t,""+e[t])}}function rl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=dn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Xa(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 Zt(e){return e.replace($s,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gs(e,t,a,n,i,c,g,N){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+wt(t)):e.value!==""+wt(t)&&(e.value=""+wt(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Ql(e,g,wt(t)):a!=null?Ql(e,g,wt(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=""+wt(N):e.removeAttribute("name")}function il(e,t,a,n,i,c,g,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)){Fl(e);return}a=a!=null?""+wt(a):"",t=t!=null?""+wt(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,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Fl(e)}function Ql(e,t,a){t==="number"&&Xa(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function jn(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=""+wt(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 Wl(e,t,a){if(t!=null&&(t=""+wt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+wt(a):""}function Yr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(ge(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=wt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Fl(e)}function Ja(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Xl=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 Jl(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||Xl.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function yu(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&&Jl(e,i,n)}else for(var c in t)t.hasOwnProperty(c)&&Jl(e,c,t[c])}function Zs(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 to=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"]]),vu=/^[\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 Il(e){return vu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _a(){}var $r=null;function Fs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var En=null,ul=null;function pu(e){var t=Oe(e);if(t&&(e=t.stateNode)){var a=e[kt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gs(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="'+Zt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[kt]||null;if(!i)throw Error(o(90));Gs(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&&rl(n)}break e;case"textarea":Wl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&jn(e,!!a.multiple,t,!1)}}}var Gr=!1;function Zr(e,t,a){if(Gr)return e(t,a);Gr=!0;try{var n=e(t);return n}finally{if(Gr=!1,(En!==null||ul!==null)&&(hc(),En&&(t=En,e=ul,ul=En=null,pu(t),e)))for(t=0;t<e.length;t++)pu(e[t])}}function Kl(e,t){var a=e.stateNode;if(a===null)return null;var n=a[kt]||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 Ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fr=!1;if(Ia)try{var Pl={};Object.defineProperty(Pl,"passive",{get:function(){Fr=!0}}),window.addEventListener("test",Pl,Pl),window.removeEventListener("test",Pl,Pl)}catch{Fr=!1}var fn=null,Qs=null,Ws=null;function zt(){if(Ws)return Ws;var e,t=Qs,a=t.length,n,i="value"in fn?fn.value:fn.textContent,c=i.length;for(e=0;e<a&&t[e]===i[e];e++);var g=a-e;for(n=1;n<=g&&t[a-n]===i[c-n];n++);return Ws=i.slice(e,1<n?1-n:void 0)}function es(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 Ka(){return!0}function Mn(){return!1}function jt(e){function t(a,n,i,c,g){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=c,this.target=g,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)?Ka:Mn,this.isPropagationStopped=Mn,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=Ka)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ka)},persist:function(){},isPersistent:Ka}),t}var hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ts=jt(hn),as=E({},hn,{view:0,detail:0}),Qr=jt(as),Xs,ns,ls,Js=E({},as,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rs,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!==ls&&(ls&&e.type==="mousemove"?(Xs=e.screenX-ls.screenX,ns=e.screenY-ls.screenY):ns=Xs=0,ls=e),Xs)},movementY:function(e){return"movementY"in e?e.movementY:ns}}),bu=jt(Js),ao=E({},Js,{dataTransfer:0}),no=jt(ao),lo=E({},as,{relatedTarget:0}),Is=jt(lo),so=E({},hn,{animationName:0,elapsedTime:0,pseudoElement:0}),cl=jt(so),ro=E({},hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ol=jt(ro),ss=E({},hn,{data:0}),dl=jt(ss),io={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uo={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"},co={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=co[e])?!!t[e]:!1}function rs(){return oo}var fo=E({},as,{key:function(e){if(e.key){var t=io[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?uo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rs,charCode:function(e){return e.type==="keypress"?es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ho=jt(fo),mo=E({},Js,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Su=jt(mo),xo=E({},as,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rs}),go=jt(xo),Nu=E({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0}),yo=jt(Nu),vo=E({},Js,{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}),po=jt(vo),bo=E({},hn,{newState:0,oldState:0}),So=jt(bo),wu=[9,13,27,32],Wr=Ia&&"CompositionEvent"in window,is=null;Ia&&"documentMode"in document&&(is=document.documentMode);var No=Ia&&"TextEvent"in window&&!is,ju=Ia&&(!Wr||is&&8<is&&11>=is),Eu=" ",Mu=!1;function Tu(e,t){switch(e){case"keyup":return wu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fl=!1;function wo(e,t){switch(e){case"compositionend":return Cu(t);case"keypress":return t.which!==32?null:(Mu=!0,Eu);case"textInput":return e=t.data,e===Eu&&Mu?null:e;default:return null}}function jo(e,t){if(fl)return e==="compositionend"||!Wr&&Tu(e,t)?(e=zt(),Ws=Qs=fn=null,fl=!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 ju&&t.locale!=="ko"?null:t.data;default:return null}}var Eo={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 Ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Eo[e.type]:t==="textarea"}function Xr(e,t,a,n){En?ul?ul.push(n):ul=[n]:En=n,t=bc(t,"onChange"),0<t.length&&(a=new ts("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var hl=null,us=null;function ca(e){n0(e,0)}function Pa(e){var t=ua(e);if(rl(t))return e}function Du(e,t){if(e==="change")return t}var mn=!1;if(Ia){var Jr;if(Ia){var pa="oninput"in document;if(!pa){var Ir=document.createElement("div");Ir.setAttribute("oninput","return;"),pa=typeof Ir.oninput=="function"}Jr=pa}else Jr=!1;mn=Jr&&(!document.documentMode||9<document.documentMode)}function Kr(){hl&&(hl.detachEvent("onpropertychange",Pr),us=hl=null)}function Pr(e){if(e.propertyName==="value"&&Pa(us)){var t=[];Xr(t,us,e,Fs(e)),Zr(ca,t)}}function Ze(e,t,a){e==="focusin"?(Kr(),hl=t,us=a,hl.attachEvent("onpropertychange",Pr)):e==="focusout"&&Kr()}function ml(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Pa(us)}function Mo(e,t){if(e==="click")return Pa(t)}function ht(e,t){if(e==="input"||e==="change")return Pa(t)}function cs(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var aa=typeof Object.is=="function"?Object.is:cs;function os(e,t){if(aa(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(!rn.call(t,i)||!aa(e[i],t[i]))return!1}return!0}function Ru(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _u(e,t){var a=Ru(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=Ru(a)}}function Xe(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xe(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function To(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xa(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=Xa(e.document)}return t}function Ks(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 Au=Ia&&"documentMode"in document&&11>=document.documentMode,xl=null,Ps=null,Ft=null,er=!1;function ds(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;er||xl==null||xl!==Xa(n)||(n=xl,"selectionStart"in n&&Ks(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}),Ft&&os(Ft,n)||(Ft=n,n=bc(Ps,"onSelect"),0<n.length&&(t=new ts("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=xl)))}function Tn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var gl={animationend:Tn("Animation","AnimationEnd"),animationiteration:Tn("Animation","AnimationIteration"),animationstart:Tn("Animation","AnimationStart"),transitionrun:Tn("Transition","TransitionRun"),transitionstart:Tn("Transition","TransitionStart"),transitioncancel:Tn("Transition","TransitionCancel"),transitionend:Tn("Transition","TransitionEnd")},ei={},ku={};Ia&&(ku=document.createElement("div").style,"AnimationEvent"in window||(delete gl.animationend.animation,delete gl.animationiteration.animation,delete gl.animationstart.animation),"TransitionEvent"in window||delete gl.transitionend.transition);function Cn(e){if(ei[e])return ei[e];if(!gl[e])return e;var t=gl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in ku)return ei[e]=t[a];return e}var zu=Cn("animationend"),Uu=Cn("animationiteration"),tr=Cn("animationstart"),Co=Cn("transitionrun"),Oo=Cn("transitionstart"),Hu=Cn("transitioncancel"),ti=Cn("transitionend"),ai=new Map,ni="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ni.push("scrollEnd");function oa(e,t){ai.set(e,t),on(t,[e])}var yl=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)},sa=[],Aa=0,fs=0;function vl(){for(var e=Aa,t=fs=Aa=0;t<e;){var a=sa[t];sa[t++]=null;var n=sa[t];sa[t++]=null;var i=sa[t];sa[t++]=null;var c=sa[t];if(sa[t++]=null,n!==null&&i!==null){var g=n.pending;g===null?i.next=i:(i.next=g.next,g.next=i),n.pending=i}c!==0&&hs(a,i,c)}}function ka(e,t,a,n){sa[Aa++]=e,sa[Aa++]=t,sa[Aa++]=a,sa[Aa++]=n,fs|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ar(e,t,a,n){return ka(e,t,a,n),ms(e)}function za(e,t){return ka(e,null,null,t),ms(e)}function hs(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-$t(a),e=c.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),c):null}function ms(e){if(50<Mi)throw Mi=0,Cd=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ba={};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 Qt(e,t,a,n){return new nr(e,t,a,n)}function lr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ua(e,t){var a=e.alternate;return a===null?(a=Qt(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 Lu(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 g=0;if(n=e,typeof e=="function")lr(e)&&(g=1);else if(typeof e=="string")g=cv(e,a,xe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $:return e=Qt(31,a,t,i),e.elementType=$,e.lanes=c,e;case M:return Ha(a.children,i,c,t);case C:g=8,i|=24;break;case Y:return e=Qt(12,a,t,i|2),e.elementType=Y,e.lanes=c,e;case le:return e=Qt(13,a,t,i),e.elementType=le,e.lanes=c,e;case fe:return e=Qt(19,a,t,i),e.elementType=fe,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case J:g=10;break e;case K:g=9;break e;case ne:g=11;break e;case P:g=14;break e;case F:g=16,n=null;break e}g=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=Qt(g,a,t,i),t.elementType=e,t.type=n,t.lanes=c,t}function Ha(e,t,a,n){return e=Qt(7,e,n,t),e.lanes=a,e}function li(e,t,a){return e=Qt(6,e,null,t),e.lanes=a,e}function qu(e){var t=Qt(18,null,null,0);return t.stateNode=e,t}function pl(e,t,a){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var si=new WeakMap;function da(e,t){if(typeof e=="object"&&e!==null){var a=si.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Pn(t)},si.set(e,t),t)}return{value:e,source:t,stack:Pn(t)}}var On=[],Dn=0,xs=null,en=0,na=[],Me=0,fa=null,La=1,h="";function r(e,t){On[Dn++]=en,On[Dn++]=xs,xs=e,en=t}function f(e,t,a){na[Me++]=La,na[Me++]=h,na[Me++]=fa,fa=e;var n=La;e=h;var i=32-$t(n)-1;n&=~(1<<i),a+=1;var c=32-$t(t)+i;if(30<c){var g=i-i%5;c=(n&(1<<g)-1).toString(32),n>>=g,i-=g,La=1<<32-$t(t)+i|a<<i|n,h=c+e}else La=1<<c|a<<i|n,h=e}function v(e){e.return!==null&&(r(e,1),f(e,1,0))}function S(e){for(;e===xs;)xs=On[--Dn],On[Dn]=null,en=On[--Dn],On[Dn]=null;for(;e===fa;)fa=na[--Me],na[Me]=null,h=na[--Me],na[Me]=null,La=na[--Me],na[Me]=null}function O(e,t){na[Me++]=La,na[Me++]=h,na[Me++]=fa,La=t.id,h=t.overflow,fa=e}var z=null,U=null,q=!1,oe=null,be=!1,ke=Error(o(519));function Fe(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tn(da(t,e)),ke}function De(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Nt]=e,t[kt]=n,a){case"dialog":Ge("cancel",t),Ge("close",t);break;case"iframe":case"object":case"embed":Ge("load",t);break;case"video":case"audio":for(a=0;a<Ci.length;a++)Ge(Ci[a],t);break;case"source":Ge("error",t);break;case"img":case"image":case"link":Ge("error",t),Ge("load",t);break;case"details":Ge("toggle",t);break;case"input":Ge("invalid",t),il(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ge("invalid",t);break;case"textarea":Ge("invalid",t),Yr(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||i0(t.textContent,a)?(n.popover!=null&&(Ge("beforetoggle",t),Ge("toggle",t)),n.onScroll!=null&&Ge("scroll",t),n.onScrollEnd!=null&&Ge("scrollend",t),n.onClick!=null&&(t.onclick=_a),t=!0):t=!1,t||Fe(e,!0)}function vt(e){for(z=e.return;z;)switch(z.tag){case 5:case 31:case 13:be=!1;return;case 27:case 3:be=!0;return;default:z=z.return}}function qt(e){if(e!==z)return!1;if(!q)return vt(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")||$d(e.type,e.memoizedProps)),a=!a),a&&U&&Fe(e),vt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));U=g0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));U=g0(e)}else t===27?(t=U,_l(e.type)?(e=Wd,Wd=null,U=e):U=t):U=z?Ya(e.stateNode.nextSibling):null;return!0}function Vt(){U=z=null,q=!1}function xn(){var e=oe;return e!==null&&(ga===null?ga=e:ga.push.apply(ga,e),oe=null),e}function tn(e){oe===null?oe=[e]:oe.push(e)}var rr=T(null),Rn=null,qa=null;function gn(e,t,a){ce(rr,t._currentValue),t._currentValue=a}function an(e){e._currentValue=rr.current,X(rr)}function ri(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 _n(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var g=i.child;c=c.firstContext;e:for(;c!==null;){var N=c;c=i;for(var R=0;R<t.length;R++)if(N.context===t[R]){c.lanes|=a,N=c.alternate,N!==null&&(N.lanes|=a),ri(c.return,a,e),n||(g=null);break e}c=N.next}}else if(i.tag===18){if(g=i.return,g===null)throw Error(o(341));g.lanes|=a,c=g.alternate,c!==null&&(c.lanes|=a),ri(g,a,e),g=null}else g=i.child;if(g!==null)g.return=i;else for(g=i;g!==null;){if(g===e){g=null;break}if(i=g.sibling,i!==null){i.return=g.return,g=i;break}g=g.return}i=g}}function Va(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 g=i.alternate;if(g===null)throw Error(o(387));if(g=g.memoizedProps,g!==null){var N=i.type;aa(i.pendingProps.value,g.value)||(e!==null?e.push(N):e=[N])}}else if(i===_e.current){if(g=i.alternate,g===null)throw Error(o(387));g.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Ai):e=[Ai])}i=i.return}e!==null&&_n(t,e,a,n),t.flags|=262144}function ir(e){for(e=e.firstContext;e!==null;){if(!aa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gs(e){Rn=e,qa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Wt(e){return Ff(Rn,e)}function Vu(e,t){return Rn===null&&gs(e),Ff(e,t)}function Ff(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},qa===null){if(e===null)throw Error(o(308));qa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qa=qa.next=t;return a}var sy=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()})}},ry=l.unstable_scheduleCallback,iy=l.unstable_NormalPriority,Ot={$$typeof:J,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Do(){return{controller:new sy,data:new Map,refCount:0}}function ii(e){e.refCount--,e.refCount===0&&ry(iy,function(){e.controller.abort()})}var ui=null,Ro=0,ur=0,cr=null;function uy(e,t){if(ui===null){var a=ui=[];Ro=0,ur=kd(),cr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Ro++,t.then(Qf,Qf),t}function Qf(){if(--Ro===0&&ui!==null){cr!==null&&(cr.status="fulfilled");var e=ui;ui=null,ur=0,cr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function cy(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 Wf=Z.S;Z.S=function(e,t){Rm=Ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&uy(e,t),Wf!==null&&Wf(e,t)};var ys=T(null);function _o(){var e=ys.current;return e!==null?e:ct.pooledCache}function Bu(e,t){t===null?ce(ys,ys.current):ce(ys,t.pool)}function Xf(){var e=_o();return e===null?null:{parent:Ot._currentValue,pool:e}}var or=Error(o(460)),Ao=Error(o(474)),Yu=Error(o(542)),$u={then:function(){}};function Jf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function If(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(_a,_a),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Pf(e),e;default:if(typeof t.status=="string")t.then(_a,_a);else{if(e=ct,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,Pf(e),e}throw ps=t,or}}function vs(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ps=a,or):a}}var ps=null;function Kf(){if(ps===null)throw Error(o(459));var e=ps;return ps=null,e}function Pf(e){if(e===or||e===Yu)throw Error(o(483))}var dr=null,ci=0;function Gu(e){var t=ci;return ci+=1,dr===null&&(dr=[]),If(dr,e,t)}function oi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zu(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function eh(e){function t(G,L){if(e){var Q=G.deletions;Q===null?(G.deletions=[L],G.flags|=16):Q.push(L)}}function a(G,L){if(!e)return null;for(;L!==null;)t(G,L),L=L.sibling;return null}function n(G){for(var L=new Map;G!==null;)G.key!==null?L.set(G.key,G):L.set(G.index,G),G=G.sibling;return L}function i(G,L){return G=Ua(G,L),G.index=0,G.sibling=null,G}function c(G,L,Q){return G.index=Q,e?(Q=G.alternate,Q!==null?(Q=Q.index,Q<L?(G.flags|=67108866,L):Q):(G.flags|=67108866,L)):(G.flags|=1048576,L)}function g(G){return e&&G.alternate===null&&(G.flags|=67108866),G}function N(G,L,Q,ie){return L===null||L.tag!==6?(L=li(Q,G.mode,ie),L.return=G,L):(L=i(L,Q),L.return=G,L)}function R(G,L,Q,ie){var Ce=Q.type;return Ce===M?se(G,L,Q.props.children,ie,Q.key):L!==null&&(L.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===F&&vs(Ce)===L.type)?(L=i(L,Q.props),oi(L,Q),L.return=G,L):(L=sr(Q.type,Q.key,Q.props,null,G.mode,ie),oi(L,Q),L.return=G,L)}function W(G,L,Q,ie){return L===null||L.tag!==4||L.stateNode.containerInfo!==Q.containerInfo||L.stateNode.implementation!==Q.implementation?(L=pl(Q,G.mode,ie),L.return=G,L):(L=i(L,Q.children||[]),L.return=G,L)}function se(G,L,Q,ie,Ce){return L===null||L.tag!==7?(L=Ha(Q,G.mode,ie,Ce),L.return=G,L):(L=i(L,Q),L.return=G,L)}function ue(G,L,Q){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=li(""+L,G.mode,Q),L.return=G,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case k:return Q=sr(L.type,L.key,L.props,null,G.mode,Q),oi(Q,L),Q.return=G,Q;case D:return L=pl(L,G.mode,Q),L.return=G,L;case F:return L=vs(L),ue(G,L,Q)}if(ge(L)||B(L))return L=Ha(L,G.mode,Q,null),L.return=G,L;if(typeof L.then=="function")return ue(G,Gu(L),Q);if(L.$$typeof===J)return ue(G,Vu(G,L),Q);Zu(G,L)}return null}function I(G,L,Q,ie){var Ce=L!==null?L.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Ce!==null?null:N(G,L,""+Q,ie);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case k:return Q.key===Ce?R(G,L,Q,ie):null;case D:return Q.key===Ce?W(G,L,Q,ie):null;case F:return Q=vs(Q),I(G,L,Q,ie)}if(ge(Q)||B(Q))return Ce!==null?null:se(G,L,Q,ie,null);if(typeof Q.then=="function")return I(G,L,Gu(Q),ie);if(Q.$$typeof===J)return I(G,L,Vu(G,Q),ie);Zu(G,Q)}return null}function ae(G,L,Q,ie,Ce){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return G=G.get(Q)||null,N(L,G,""+ie,Ce);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case k:return G=G.get(ie.key===null?Q:ie.key)||null,R(L,G,ie,Ce);case D:return G=G.get(ie.key===null?Q:ie.key)||null,W(L,G,ie,Ce);case F:return ie=vs(ie),ae(G,L,Q,ie,Ce)}if(ge(ie)||B(ie))return G=G.get(Q)||null,se(L,G,ie,Ce,null);if(typeof ie.then=="function")return ae(G,L,Q,Gu(ie),Ce);if(ie.$$typeof===J)return ae(G,L,Q,Vu(L,ie),Ce);Zu(L,ie)}return null}function Se(G,L,Q,ie){for(var Ce=null,Je=null,je=L,qe=L=0,We=null;je!==null&&qe<Q.length;qe++){je.index>qe?(We=je,je=null):We=je.sibling;var Ie=I(G,je,Q[qe],ie);if(Ie===null){je===null&&(je=We);break}e&&je&&Ie.alternate===null&&t(G,je),L=c(Ie,L,qe),Je===null?Ce=Ie:Je.sibling=Ie,Je=Ie,je=We}if(qe===Q.length)return a(G,je),q&&r(G,qe),Ce;if(je===null){for(;qe<Q.length;qe++)je=ue(G,Q[qe],ie),je!==null&&(L=c(je,L,qe),Je===null?Ce=je:Je.sibling=je,Je=je);return q&&r(G,qe),Ce}for(je=n(je);qe<Q.length;qe++)We=ae(je,G,qe,Q[qe],ie),We!==null&&(e&&We.alternate!==null&&je.delete(We.key===null?qe:We.key),L=c(We,L,qe),Je===null?Ce=We:Je.sibling=We,Je=We);return e&&je.forEach(function(Hl){return t(G,Hl)}),q&&r(G,qe),Ce}function Re(G,L,Q,ie){if(Q==null)throw Error(o(151));for(var Ce=null,Je=null,je=L,qe=L=0,We=null,Ie=Q.next();je!==null&&!Ie.done;qe++,Ie=Q.next()){je.index>qe?(We=je,je=null):We=je.sibling;var Hl=I(G,je,Ie.value,ie);if(Hl===null){je===null&&(je=We);break}e&&je&&Hl.alternate===null&&t(G,je),L=c(Hl,L,qe),Je===null?Ce=Hl:Je.sibling=Hl,Je=Hl,je=We}if(Ie.done)return a(G,je),q&&r(G,qe),Ce;if(je===null){for(;!Ie.done;qe++,Ie=Q.next())Ie=ue(G,Ie.value,ie),Ie!==null&&(L=c(Ie,L,qe),Je===null?Ce=Ie:Je.sibling=Ie,Je=Ie);return q&&r(G,qe),Ce}for(je=n(je);!Ie.done;qe++,Ie=Q.next())Ie=ae(je,G,qe,Ie.value,ie),Ie!==null&&(e&&Ie.alternate!==null&&je.delete(Ie.key===null?qe:Ie.key),L=c(Ie,L,qe),Je===null?Ce=Ie:Je.sibling=Ie,Je=Ie);return e&&je.forEach(function(bv){return t(G,bv)}),q&&r(G,qe),Ce}function it(G,L,Q,ie){if(typeof Q=="object"&&Q!==null&&Q.type===M&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case k:e:{for(var Ce=Q.key;L!==null;){if(L.key===Ce){if(Ce=Q.type,Ce===M){if(L.tag===7){a(G,L.sibling),ie=i(L,Q.props.children),ie.return=G,G=ie;break e}}else if(L.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===F&&vs(Ce)===L.type){a(G,L.sibling),ie=i(L,Q.props),oi(ie,Q),ie.return=G,G=ie;break e}a(G,L);break}else t(G,L);L=L.sibling}Q.type===M?(ie=Ha(Q.props.children,G.mode,ie,Q.key),ie.return=G,G=ie):(ie=sr(Q.type,Q.key,Q.props,null,G.mode,ie),oi(ie,Q),ie.return=G,G=ie)}return g(G);case D:e:{for(Ce=Q.key;L!==null;){if(L.key===Ce)if(L.tag===4&&L.stateNode.containerInfo===Q.containerInfo&&L.stateNode.implementation===Q.implementation){a(G,L.sibling),ie=i(L,Q.children||[]),ie.return=G,G=ie;break e}else{a(G,L);break}else t(G,L);L=L.sibling}ie=pl(Q,G.mode,ie),ie.return=G,G=ie}return g(G);case F:return Q=vs(Q),it(G,L,Q,ie)}if(ge(Q))return Se(G,L,Q,ie);if(B(Q)){if(Ce=B(Q),typeof Ce!="function")throw Error(o(150));return Q=Ce.call(Q),Re(G,L,Q,ie)}if(typeof Q.then=="function")return it(G,L,Gu(Q),ie);if(Q.$$typeof===J)return it(G,L,Vu(G,Q),ie);Zu(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,L!==null&&L.tag===6?(a(G,L.sibling),ie=i(L,Q),ie.return=G,G=ie):(a(G,L),ie=li(Q,G.mode,ie),ie.return=G,G=ie),g(G)):a(G,L)}return function(G,L,Q,ie){try{ci=0;var Ce=it(G,L,Q,ie);return dr=null,Ce}catch(je){if(je===or||je===Yu)throw je;var Je=Qt(29,je,null,G.mode);return Je.lanes=ie,Je.return=G,Je}finally{}}}var bs=eh(!0),th=eh(!1),bl=!1;function ko(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zo(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 Sl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Nl(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Pe&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=ms(e),hs(e,null,a),t}return ka(e,n,t,a),ms(e)}function di(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,ia(e,a)}}function Uo(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 g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?i=c=g:c=c.next=g,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 Ho=!1;function fi(){if(Ho){var e=cr;if(e!==null)throw e}}function hi(e,t,a,n){Ho=!1;var i=e.updateQueue;bl=!1;var c=i.firstBaseUpdate,g=i.lastBaseUpdate,N=i.shared.pending;if(N!==null){i.shared.pending=null;var R=N,W=R.next;R.next=null,g===null?c=W:g.next=W,g=R;var se=e.alternate;se!==null&&(se=se.updateQueue,N=se.lastBaseUpdate,N!==g&&(N===null?se.firstBaseUpdate=W:N.next=W,se.lastBaseUpdate=R))}if(c!==null){var ue=i.baseState;g=0,se=W=R=null,N=c;do{var I=N.lane&-536870913,ae=I!==N.lane;if(ae?(Qe&I)===I:(n&I)===I){I!==0&&I===ur&&(Ho=!0),se!==null&&(se=se.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Se=e,Re=N;I=t;var it=a;switch(Re.tag){case 1:if(Se=Re.payload,typeof Se=="function"){ue=Se.call(it,ue,I);break e}ue=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Re.payload,I=typeof Se=="function"?Se.call(it,ue,I):Se,I==null)break e;ue=E({},ue,I);break e;case 2:bl=!0}}I=N.callback,I!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=i.callbacks,ae===null?i.callbacks=[I]:ae.push(I))}else ae={lane:I,tag:N.tag,payload:N.payload,callback:N.callback,next:null},se===null?(W=se=ae,R=ue):se=se.next=ae,g|=I;if(N=N.next,N===null){if(N=i.shared.pending,N===null)break;ae=N,N=ae.next,ae.next=null,i.lastBaseUpdate=ae,i.shared.pending=null}}while(!0);se===null&&(R=ue),i.baseState=R,i.firstBaseUpdate=W,i.lastBaseUpdate=se,c===null&&(i.shared.lanes=0),Tl|=g,e.lanes=g,e.memoizedState=ue}}function ah(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function nh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ah(a[e],t)}var fr=T(null),Fu=T(0);function lh(e,t){e=Bn,ce(Fu,e),ce(fr,t),Bn=e|t.baseLanes}function Lo(){ce(Fu,Bn),ce(fr,fr.current)}function qo(){Bn=Fu.current,X(fr),X(Fu)}var Sa=T(null),Ba=null;function wl(e){var t=e.alternate;ce(Et,Et.current&1),ce(Sa,e),Ba===null&&(t===null||fr.current!==null||t.memoizedState!==null)&&(Ba=e)}function Vo(e){ce(Et,Et.current),ce(Sa,e),Ba===null&&(Ba=e)}function sh(e){e.tag===22?(ce(Et,Et.current),ce(Sa,e),Ba===null&&(Ba=e)):jl()}function jl(){ce(Et,Et.current),ce(Sa,Sa.current)}function Na(e){X(Sa),Ba===e&&(Ba=null),X(Et)}var Et=T(0);function Qu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Fd(a)||Qd(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 An=0,He=null,st=null,Dt=null,Wu=!1,hr=!1,Ss=!1,Xu=0,mi=0,mr=null,oy=0;function bt(){throw Error(o(321))}function Bo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!aa(e[a],t[a]))return!1;return!0}function Yo(e,t,a,n,i,c){return An=c,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Z.H=e===null||e.memoizedState===null?Yh:nd,Ss=!1,c=a(n,i),Ss=!1,hr&&(c=ih(t,a,n,i)),rh(e),c}function rh(e){Z.H=yi;var t=st!==null&&st.next!==null;if(An=0,Dt=st=He=null,Wu=!1,mi=0,mr=null,t)throw Error(o(300));e===null||Rt||(e=e.dependencies,e!==null&&ir(e)&&(Rt=!0))}function ih(e,t,a,n){He=e;var i=0;do{if(hr&&(mr=null),mi=0,hr=!1,25<=i)throw Error(o(301));if(i+=1,Dt=st=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}Z.H=$h,c=t(a,n)}while(hr);return c}function dy(){var e=Z.H,t=e.useState()[0];return t=typeof t.then=="function"?xi(t):t,e=e.useState()[0],(st!==null?st.memoizedState:null)!==e&&(He.flags|=1024),t}function $o(){var e=Xu!==0;return Xu=0,e}function Go(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Zo(e){if(Wu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wu=!1}An=0,Dt=st=He=null,hr=!1,mi=Xu=0,mr=null}function ra(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?He.memoizedState=Dt=e:Dt=Dt.next=e,Dt}function Mt(){if(st===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=Dt===null?He.memoizedState:Dt.next;if(t!==null)Dt=t,st=e;else{if(e===null)throw He.alternate===null?Error(o(467)):Error(o(310));st=e,e={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},Dt===null?He.memoizedState=Dt=e:Dt=Dt.next=e}return Dt}function Ju(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xi(e){var t=mi;return mi+=1,mr===null&&(mr=[]),e=If(mr,e,t),t=He,(Dt===null?t.memoizedState:Dt.next)===null&&(t=t.alternate,Z.H=t===null||t.memoizedState===null?Yh:nd),e}function Iu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xi(e);if(e.$$typeof===J)return Wt(e)}throw Error(o(438,String(e)))}function Fo(e){var t=null,a=He.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=He.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=Ju(),He.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]=A;return t.index++,a}function kn(e,t){return typeof t=="function"?t(e):t}function Ku(e){var t=Mt();return Qo(t,st,e)}function Qo(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 g=i.next;i.next=c.next,c.next=g}t.baseQueue=i=c,n.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var N=g=null,R=null,W=t,se=!1;do{var ue=W.lane&-536870913;if(ue!==W.lane?(Qe&ue)===ue:(An&ue)===ue){var I=W.revertLane;if(I===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),ue===ur&&(se=!0);else if((An&I)===I){W=W.next,I===ur&&(se=!0);continue}else ue={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},R===null?(N=R=ue,g=c):R=R.next=ue,He.lanes|=I,Tl|=I;ue=W.action,Ss&&a(c,ue),c=W.hasEagerState?W.eagerState:a(c,ue)}else I={lane:ue,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},R===null?(N=R=I,g=c):R=R.next=I,He.lanes|=ue,Tl|=ue;W=W.next}while(W!==null&&W!==t);if(R===null?g=c:R.next=N,!aa(c,e.memoizedState)&&(Rt=!0,se&&(a=cr,a!==null)))throw a;e.memoizedState=c,e.baseState=g,e.baseQueue=R,n.lastRenderedState=c}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Wo(e){var t=Mt(),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 g=i=i.next;do c=e(c,g.action),g=g.next;while(g!==i);aa(c,t.memoizedState)||(Rt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function uh(e,t,a){var n=He,i=Mt(),c=q;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var g=!aa((st||i).memoizedState,a);if(g&&(i.memoizedState=a,Rt=!0),i=i.queue,Io(dh.bind(null,n,i,e),[e]),i.getSnapshot!==t||g||Dt!==null&&Dt.memoizedState.tag&1){if(n.flags|=2048,xr(9,{destroy:void 0},oh.bind(null,n,i,a,t),null),ct===null)throw Error(o(349));c||(An&127)!==0||ch(n,t,a)}return a}function ch(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=He.updateQueue,t===null?(t=Ju(),He.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function oh(e,t,a,n){t.value=a,t.getSnapshot=n,fh(t)&&hh(e)}function dh(e,t,a){return a(function(){fh(t)&&hh(e)})}function fh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!aa(e,a)}catch{return!0}}function hh(e){var t=za(e,2);t!==null&&ya(t,e,2)}function Xo(e){var t=ra();if(typeof e=="function"){var a=e;if(e=a(),Ss){Yt(!0);try{a()}finally{Yt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kn,lastRenderedState:e},t}function mh(e,t,a,n){return e.baseState=a,Qo(e,st,typeof n=="function"?n:kn)}function fy(e,t,a,n,i){if(tc(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(g){c.listeners.push(g)}};Z.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,xh(t,c)):(c.next=a.next,t.pending=a.next=c)}}function xh(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=Z.T,g={};Z.T=g;try{var N=a(i,n),R=Z.S;R!==null&&R(g,N),gh(e,t,N)}catch(W){Jo(e,t,W)}finally{c!==null&&g.types!==null&&(c.types=g.types),Z.T=c}}else try{c=a(i,n),gh(e,t,c)}catch(W){Jo(e,t,W)}}function gh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){yh(e,t,n)},function(n){return Jo(e,t,n)}):yh(e,t,a)}function yh(e,t,a){t.status="fulfilled",t.value=a,vh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,xh(e,a)))}function Jo(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,vh(t),t=t.next;while(t!==n)}e.action=null}function vh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ph(e,t){return t}function bh(e,t){if(q){var a=ct.formState;if(a!==null){e:{var n=He;if(q){if(U){t:{for(var i=U,c=be;i.nodeType!==8;){if(!c){i=null;break t}if(i=Ya(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){U=Ya(i.nextSibling),n=i.data==="F!";break e}}Fe(n)}n=!1}n&&(t=a[0])}}return a=ra(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ph,lastRenderedState:t},a.queue=n,a=qh.bind(null,He,n),n.dispatch=a,n=Xo(!1),c=ad.bind(null,He,!1,n.queue),n=ra(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=fy.bind(null,He,i,c,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function Sh(e){var t=Mt();return Nh(t,st,e)}function Nh(e,t,a){if(t=Qo(e,t,ph)[0],e=Ku(kn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=xi(t)}catch(g){throw g===or?Yu:g}else n=t;t=Mt();var i=t.queue,c=i.dispatch;return a!==t.memoizedState&&(He.flags|=2048,xr(9,{destroy:void 0},hy.bind(null,i,a),null)),[n,c,e]}function hy(e,t){e.action=t}function wh(e){var t=Mt(),a=st;if(a!==null)return Nh(t,a,e);Mt(),t=t.memoizedState,a=Mt();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=He.updateQueue,t===null&&(t=Ju(),He.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 jh(){return Mt().memoizedState}function Pu(e,t,a,n){var i=ra();He.flags|=e,i.memoizedState=xr(1|t,{destroy:void 0},a,n===void 0?null:n)}function ec(e,t,a,n){var i=Mt();n=n===void 0?null:n;var c=i.memoizedState.inst;st!==null&&n!==null&&Bo(n,st.memoizedState.deps)?i.memoizedState=xr(t,c,a,n):(He.flags|=e,i.memoizedState=xr(1|t,c,a,n))}function Eh(e,t){Pu(8390656,8,e,t)}function Io(e,t){ec(2048,8,e,t)}function my(e){He.flags|=4;var t=He.updateQueue;if(t===null)t=Ju(),He.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Mh(e){var t=Mt().memoizedState;return my({ref:t,nextImpl:e}),function(){if((Pe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Th(e,t){return ec(4,2,e,t)}function Ch(e,t){return ec(4,4,e,t)}function Oh(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 Dh(e,t,a){a=a!=null?a.concat([e]):null,ec(4,4,Oh.bind(null,t,e),a)}function Ko(){}function Rh(e,t){var a=Mt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Bo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function _h(e,t){var a=Mt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Bo(t,n[1]))return n[0];if(n=e(),Ss){Yt(!0);try{e()}finally{Yt(!1)}}return a.memoizedState=[n,t],n}function Po(e,t,a){return a===void 0||(An&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Am(),He.lanes|=e,Tl|=e,a)}function Ah(e,t,a,n){return aa(a,t)?a:fr.current!==null?(e=Po(e,a,n),aa(e,t)||(Rt=!0),e):(An&42)===0||(An&1073741824)!==0&&(Qe&261930)===0?(Rt=!0,e.memoizedState=a):(e=Am(),He.lanes|=e,Tl|=e,t)}function kh(e,t,a,n,i){var c=re.p;re.p=c!==0&&8>c?c:8;var g=Z.T,N={};Z.T=N,ad(e,!1,t,a);try{var R=i(),W=Z.S;if(W!==null&&W(N,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var se=cy(R,n);gi(e,t,se,Ea(e))}else gi(e,t,n,Ea(e))}catch(ue){gi(e,t,{then:function(){},status:"rejected",reason:ue},Ea())}finally{re.p=c,g!==null&&N.types!==null&&(g.types=N.types),Z.T=g}}function xy(){}function ed(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=zh(e).queue;kh(e,i,t,he,a===null?xy:function(){return Uh(e),a(n)})}function zh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:kn,lastRenderedState:he},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:kn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Uh(e){var t=zh(e);t.next===null&&(t=e.alternate.memoizedState),gi(e,t.next.queue,{},Ea())}function td(){return Wt(Ai)}function Hh(){return Mt().memoizedState}function Lh(){return Mt().memoizedState}function gy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ea();e=Sl(a);var n=Nl(t,e,a);n!==null&&(ya(n,t,a),di(n,t,a)),t={cache:Do()},e.payload=t;return}t=t.return}}function yy(e,t,a){var n=Ea();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},tc(e)?Vh(t,a):(a=ar(e,t,a,n),a!==null&&(ya(a,e,n),Bh(a,t,n)))}function qh(e,t,a){var n=Ea();gi(e,t,a,n)}function gi(e,t,a,n){var i={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(tc(e))Vh(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var g=t.lastRenderedState,N=c(g,a);if(i.hasEagerState=!0,i.eagerState=N,aa(N,g))return ka(e,t,i,0),ct===null&&vl(),!1}catch{}finally{}if(a=ar(e,t,i,n),a!==null)return ya(a,e,n),Bh(a,t,n),!0}return!1}function ad(e,t,a,n){if(n={lane:2,revertLane:kd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},tc(e)){if(t)throw Error(o(479))}else t=ar(e,a,n,2),t!==null&&ya(t,e,2)}function tc(e){var t=e.alternate;return e===He||t!==null&&t===He}function Vh(e,t){hr=Wu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Bh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,ia(e,a)}}var yi={readContext:Wt,use:Iu,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};yi.useEffectEvent=bt;var Yh={readContext:Wt,use:Iu,useCallback:function(e,t){return ra().memoizedState=[e,t===void 0?null:t],e},useContext:Wt,useEffect:Eh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Pu(4194308,4,Oh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Pu(4194308,4,e,t)},useInsertionEffect:function(e,t){Pu(4,2,e,t)},useMemo:function(e,t){var a=ra();t=t===void 0?null:t;var n=e();if(Ss){Yt(!0);try{e()}finally{Yt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ra();if(a!==void 0){var i=a(t);if(Ss){Yt(!0);try{a(t)}finally{Yt(!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=yy.bind(null,He,e),[n.memoizedState,e]},useRef:function(e){var t=ra();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,a=qh.bind(null,He,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Ko,useDeferredValue:function(e,t){var a=ra();return Po(a,e,t)},useTransition:function(){var e=Xo(!1);return e=kh.bind(null,He,e.queue,!0,!1),ra().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=He,i=ra();if(q){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),ct===null)throw Error(o(349));(Qe&127)!==0||ch(n,t,a)}i.memoizedState=a;var c={value:a,getSnapshot:t};return i.queue=c,Eh(dh.bind(null,n,c,e),[e]),n.flags|=2048,xr(9,{destroy:void 0},oh.bind(null,n,c,a,t),null),a},useId:function(){var e=ra(),t=ct.identifierPrefix;if(q){var a=h,n=La;a=(n&~(1<<32-$t(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Xu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=oy++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:td,useFormState:bh,useActionState:bh,useOptimistic:function(e){var t=ra();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ad.bind(null,He,!0,a),a.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return ra().memoizedState=gy.bind(null,He)},useEffectEvent:function(e){var t=ra(),a={impl:e};return t.memoizedState=a,function(){if((Pe&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},nd={readContext:Wt,use:Iu,useCallback:Rh,useContext:Wt,useEffect:Io,useImperativeHandle:Dh,useInsertionEffect:Th,useLayoutEffect:Ch,useMemo:_h,useReducer:Ku,useRef:jh,useState:function(){return Ku(kn)},useDebugValue:Ko,useDeferredValue:function(e,t){var a=Mt();return Ah(a,st.memoizedState,e,t)},useTransition:function(){var e=Ku(kn)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:xi(e),t]},useSyncExternalStore:uh,useId:Hh,useHostTransitionStatus:td,useFormState:Sh,useActionState:Sh,useOptimistic:function(e,t){var a=Mt();return mh(a,st,e,t)},useMemoCache:Fo,useCacheRefresh:Lh};nd.useEffectEvent=Mh;var $h={readContext:Wt,use:Iu,useCallback:Rh,useContext:Wt,useEffect:Io,useImperativeHandle:Dh,useInsertionEffect:Th,useLayoutEffect:Ch,useMemo:_h,useReducer:Wo,useRef:jh,useState:function(){return Wo(kn)},useDebugValue:Ko,useDeferredValue:function(e,t){var a=Mt();return st===null?Po(a,e,t):Ah(a,st.memoizedState,e,t)},useTransition:function(){var e=Wo(kn)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:xi(e),t]},useSyncExternalStore:uh,useId:Hh,useHostTransitionStatus:td,useFormState:wh,useActionState:wh,useOptimistic:function(e,t){var a=Mt();return st!==null?mh(a,st,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Fo,useCacheRefresh:Lh};$h.useEffectEvent=Mh;function ld(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 sd={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ea(),i=Sl(n);i.payload=t,a!=null&&(i.callback=a),t=Nl(e,i,n),t!==null&&(ya(t,e,n),di(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ea(),i=Sl(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=Nl(e,i,n),t!==null&&(ya(t,e,n),di(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ea(),n=Sl(a);n.tag=2,t!=null&&(n.callback=t),t=Nl(e,n,a),t!==null&&(ya(t,e,a),di(t,e,a))}};function Gh(e,t,a,n,i,c,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,g):t.prototype&&t.prototype.isPureReactComponent?!os(a,n)||!os(i,c):!0}function Zh(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&&sd.enqueueReplaceState(t,t.state,null)}function Ns(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 Fh(e){yl(e)}function Qh(e){console.error(e)}function Wh(e){yl(e)}function ac(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Xh(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 rd(e,t,a){return a=Sl(a),a.tag=3,a.payload={element:null},a.callback=function(){ac(e,t)},a}function Jh(e){return e=Sl(e),e.tag=3,e}function Ih(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(){Xh(t,a,n)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Xh(t,a,n),typeof i!="function"&&(Cl===null?Cl=new Set([this]):Cl.add(this));var N=n.stack;this.componentDidCatch(n.value,{componentStack:N!==null?N:""})})}function vy(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Va(t,a,i,!0),a=Sa.current,a!==null){switch(a.tag){case 31:case 13:return Ba===null?mc():a.alternate===null&&St===0&&(St=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===$u?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Rd(e,n,i)),!1;case 22:return a.flags|=65536,n===$u?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)),Rd(e,n,i)),!1}throw Error(o(435,a.tag))}return Rd(e,n,i),mc(),!1}if(q)return t=Sa.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==ke&&(e=Error(o(422),{cause:n}),tn(da(e,a)))):(n!==ke&&(t=Error(o(423),{cause:n}),tn(da(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=da(n,a),i=rd(e.stateNode,n,i),Uo(e,i),St!==4&&(St=2)),!1;var c=Error(o(520),{cause:n});if(c=da(c,a),Ei===null?Ei=[c]:Ei.push(c),St!==4&&(St=2),t===null)return!0;n=da(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=rd(a.stateNode,n,e),Uo(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"&&(Cl===null||!Cl.has(c))))return a.flags|=65536,i&=-i,a.lanes|=i,i=Jh(i),Ih(i,e,a,n),Uo(a,i),!1}a=a.return}while(a!==null);return!1}var id=Error(o(461)),Rt=!1;function Xt(e,t,a,n){t.child=e===null?th(t,null,a,n):bs(t,e.child,a,n)}function Kh(e,t,a,n,i){a=a.render;var c=t.ref;if("ref"in n){var g={};for(var N in n)N!=="ref"&&(g[N]=n[N])}else g=n;return gs(t),n=Yo(e,t,a,g,c,i),N=$o(),e!==null&&!Rt?(Go(e,t,i),zn(e,t,i)):(q&&N&&v(t),t.flags|=1,Xt(e,t,n,i),t.child)}function Ph(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,em(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,!xd(e,i)){var g=c.memoizedProps;if(a=a.compare,a=a!==null?a:os,a(g,n)&&e.ref===t.ref)return zn(e,t,i)}return t.flags|=1,e=Ua(c,n),e.ref=t.ref,e.return=t,t.child=e}function em(e,t,a,n,i){if(e!==null){var c=e.memoizedProps;if(os(c,n)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=n=c,xd(e,i))(e.flags&131072)!==0&&(Rt=!0);else return t.lanes=e.lanes,zn(e,t,i)}return ud(e,t,a,n,i)}function tm(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 am(e,t,c,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Bu(t,c!==null?c.cachePool:null),c!==null?lh(t,c):Lo(),sh(t);else return n=t.lanes=536870912,am(e,t,c!==null?c.baseLanes|a:a,a,n)}else c!==null?(Bu(t,c.cachePool),lh(t,c),jl(),t.memoizedState=null):(e!==null&&Bu(t,null),Lo(),jl());return Xt(e,t,i,a),t.child}function vi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function am(e,t,a,n,i){var c=_o();return c=c===null?null:{parent:Ot._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Bu(t,null),Lo(),sh(t),e!==null&&Va(e,t,n,!0),t.childLanes=i,null}function nc(e,t){return t=sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function nm(e,t,a){return bs(t,e.child,null,a),e=nc(t,t.pendingProps),e.flags|=2,Na(t),t.memoizedState=null,e}function py(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=nc(t,n),t.lanes=536870912,vi(null,e);if(Vo(t),(e=U)?(e=x0(e,be),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fa!==null?{id:La,overflow:h}:null,retryLane:536870912,hydrationErrors:null},a=qu(e),a.return=t,t.child=a,z=t,U=null)):e=null,e===null)throw Fe(t);return t.lanes=536870912,null}return nc(t,n)}var c=e.memoizedState;if(c!==null){var g=c.dehydrated;if(Vo(t),i)if(t.flags&256)t.flags&=-257,t=nm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Rt||Va(e,t,a,!1),i=(a&e.childLanes)!==0,Rt||i){if(n=ct,n!==null&&(g=Hr(n,a),g!==0&&g!==c.retryLane))throw c.retryLane=g,za(e,g),ya(n,e,g),id;mc(),t=nm(e,t,a)}else e=c.treeContext,U=Ya(g.nextSibling),z=t,q=!0,oe=null,be=!1,e!==null&&O(t,e),t=nc(t,n),t.flags|=4096;return t}return e=Ua(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lc(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 ud(e,t,a,n,i){return gs(t),a=Yo(e,t,a,n,void 0,i),n=$o(),e!==null&&!Rt?(Go(e,t,i),zn(e,t,i)):(q&&n&&v(t),t.flags|=1,Xt(e,t,a,i),t.child)}function lm(e,t,a,n,i,c){return gs(t),t.updateQueue=null,a=ih(t,n,a,i),rh(e),n=$o(),e!==null&&!Rt?(Go(e,t,c),zn(e,t,c)):(q&&n&&v(t),t.flags|=1,Xt(e,t,a,c),t.child)}function sm(e,t,a,n,i){if(gs(t),t.stateNode===null){var c=ba,g=a.contextType;typeof g=="object"&&g!==null&&(c=Wt(g)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=sd,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},ko(t),g=a.contextType,c.context=typeof g=="object"&&g!==null?Wt(g):ba,c.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(ld(t,a,g,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(g=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),g!==c.state&&sd.enqueueReplaceState(c,c.state,null),hi(t,n,c,i),fi(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var N=t.memoizedProps,R=Ns(a,N);c.props=R;var W=c.context,se=a.contextType;g=ba,typeof se=="object"&&se!==null&&(g=Wt(se));var ue=a.getDerivedStateFromProps;se=typeof ue=="function"||typeof c.getSnapshotBeforeUpdate=="function",N=t.pendingProps!==N,se||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(N||W!==g)&&Zh(t,c,n,g),bl=!1;var I=t.memoizedState;c.state=I,hi(t,n,c,i),fi(),W=t.memoizedState,N||I!==W||bl?(typeof ue=="function"&&(ld(t,a,ue,n),W=t.memoizedState),(R=bl||Gh(t,a,R,n,I,W,g))?(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=W),c.props=n,c.state=W,c.context=g,n=R):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,zo(e,t),g=t.memoizedProps,se=Ns(a,g),c.props=se,ue=t.pendingProps,I=c.context,W=a.contextType,R=ba,typeof W=="object"&&W!==null&&(R=Wt(W)),N=a.getDerivedStateFromProps,(W=typeof N=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(g!==ue||I!==R)&&Zh(t,c,n,R),bl=!1,I=t.memoizedState,c.state=I,hi(t,n,c,i),fi();var ae=t.memoizedState;g!==ue||I!==ae||bl||e!==null&&e.dependencies!==null&&ir(e.dependencies)?(typeof N=="function"&&(ld(t,a,N,n),ae=t.memoizedState),(se=bl||Gh(t,a,se,n,I,ae,R)||e!==null&&e.dependencies!==null&&ir(e.dependencies))?(W||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,ae,R),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,ae,R)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=ae),c.props=n,c.state=ae,c.context=R,n=se):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,lc(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=bs(t,e.child,null,i),t.child=bs(t,null,a,i)):Xt(e,t,a,i),t.memoizedState=c.state,e=t.child):e=zn(e,t,i),e}function rm(e,t,a,n){return Vt(),t.flags|=256,Xt(e,t,a,n),t.child}var cd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function od(e){return{baseLanes:e,cachePool:Xf()}}function dd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ja),e}function im(e,t,a){var n=t.pendingProps,i=!1,c=(t.flags&128)!==0,g;if((g=c)||(g=e!==null&&e.memoizedState===null?!1:(Et.current&2)!==0),g&&(i=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(q){if(i?wl(t):jl(),(e=U)?(e=x0(e,be),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fa!==null?{id:La,overflow:h}:null,retryLane:536870912,hydrationErrors:null},a=qu(e),a.return=t,t.child=a,z=t,U=null)):e=null,e===null)throw Fe(t);return Qd(e)?t.lanes=32:t.lanes=536870912,null}var N=n.children;return n=n.fallback,i?(jl(),i=t.mode,N=sc({mode:"hidden",children:N},i),n=Ha(n,i,a,null),N.return=t,n.return=t,N.sibling=n,t.child=N,n=t.child,n.memoizedState=od(a),n.childLanes=dd(e,g,a),t.memoizedState=cd,vi(null,n)):(wl(t),fd(t,N))}var R=e.memoizedState;if(R!==null&&(N=R.dehydrated,N!==null)){if(c)t.flags&256?(wl(t),t.flags&=-257,t=hd(e,t,a)):t.memoizedState!==null?(jl(),t.child=e.child,t.flags|=128,t=null):(jl(),N=n.fallback,i=t.mode,n=sc({mode:"visible",children:n.children},i),N=Ha(N,i,a,null),N.flags|=2,n.return=t,N.return=t,n.sibling=N,t.child=n,bs(t,e.child,null,a),n=t.child,n.memoizedState=od(a),n.childLanes=dd(e,g,a),t.memoizedState=cd,t=vi(null,n));else if(wl(t),Qd(N)){if(g=N.nextSibling&&N.nextSibling.dataset,g)var W=g.dgst;g=W,n=Error(o(419)),n.stack="",n.digest=g,tn({value:n,source:null,stack:null}),t=hd(e,t,a)}else if(Rt||Va(e,t,a,!1),g=(a&e.childLanes)!==0,Rt||g){if(g=ct,g!==null&&(n=Hr(g,a),n!==0&&n!==R.retryLane))throw R.retryLane=n,za(e,n),ya(g,e,n),id;Fd(N)||mc(),t=hd(e,t,a)}else Fd(N)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,U=Ya(N.nextSibling),z=t,q=!0,oe=null,be=!1,e!==null&&O(t,e),t=fd(t,n.children),t.flags|=4096);return t}return i?(jl(),N=n.fallback,i=t.mode,R=e.child,W=R.sibling,n=Ua(R,{mode:"hidden",children:n.children}),n.subtreeFlags=R.subtreeFlags&65011712,W!==null?N=Ua(W,N):(N=Ha(N,i,a,null),N.flags|=2),N.return=t,n.return=t,n.sibling=N,t.child=n,vi(null,n),n=t.child,N=e.child.memoizedState,N===null?N=od(a):(i=N.cachePool,i!==null?(R=Ot._currentValue,i=i.parent!==R?{parent:R,pool:R}:i):i=Xf(),N={baseLanes:N.baseLanes|a,cachePool:i}),n.memoizedState=N,n.childLanes=dd(e,g,a),t.memoizedState=cd,vi(e.child,n)):(wl(t),a=e.child,e=a.sibling,a=Ua(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function fd(e,t){return t=sc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function sc(e,t){return e=Qt(22,e,null,t),e.lanes=0,e}function hd(e,t,a){return bs(t,e.child,null,a),e=fd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function um(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ri(e.return,t,a)}function md(e,t,a,n,i,c){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,treeForkCount:c}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=n,g.tail=a,g.tailMode=i,g.treeForkCount=c)}function cm(e,t,a){var n=t.pendingProps,i=n.revealOrder,c=n.tail;n=n.children;var g=Et.current,N=(g&2)!==0;if(N?(g=g&1|2,t.flags|=128):g&=1,ce(Et,g),Xt(e,t,n,a),n=q?en:0,!N&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&um(e,a,t);else if(e.tag===19)um(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&&Qu(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),md(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&&Qu(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}md(t,!0,a,null,c,n);break;case"together":md(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function zn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Tl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Va(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=Ua(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ua(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function xd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ir(e)))}function by(e,t,a){switch(t.tag){case 3:pe(t,t.stateNode.containerInfo),gn(t,Ot,e.memoizedState.cache),Vt();break;case 27:case 5:ft(t);break;case 4:pe(t,t.stateNode.containerInfo);break;case 10:gn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Vo(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(wl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?im(e,t,a):(wl(t),e=zn(e,t,a),e!==null?e.sibling:null);wl(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Va(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return cm(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ce(Et,Et.current),n)break;return null;case 22:return t.lanes=0,tm(e,t,a,t.pendingProps);case 24:gn(t,Ot,e.memoizedState.cache)}return zn(e,t,a)}function om(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Rt=!0;else{if(!xd(e,a)&&(t.flags&128)===0)return Rt=!1,by(e,t,a);Rt=(e.flags&131072)!==0}else Rt=!1,q&&(t.flags&1048576)!==0&&f(t,en,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=vs(t.elementType),t.type=e,typeof e=="function")lr(e)?(n=Ns(e,n),t.tag=1,t=sm(null,t,e,n,a)):(t.tag=0,t=ud(null,t,e,n,a));else{if(e!=null){var i=e.$$typeof;if(i===ne){t.tag=11,t=Kh(null,t,e,n,a);break e}else if(i===P){t.tag=14,t=Ph(null,t,e,n,a);break e}}throw t=ye(e)||e,Error(o(306,t,""))}}return t;case 0:return ud(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=Ns(n,t.pendingProps),sm(e,t,n,i,a);case 3:e:{if(pe(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var c=t.memoizedState;i=c.element,zo(e,t),hi(t,n,null,a);var g=t.memoizedState;if(n=g.cache,gn(t,Ot,n),n!==c.cache&&_n(t,[Ot],a,!0),fi(),n=g.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=rm(e,t,n,a);break e}else if(n!==i){i=da(Error(o(424)),t),tn(i),t=rm(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=Ya(e.firstChild),z=t,q=!0,oe=null,be=!0,a=th(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Vt(),n===i){t=zn(e,t,a);break e}Xt(e,t,n,a)}t=t.child}return t;case 26:return lc(e,t),e===null?(a=S0(t.type,null,t.pendingProps,null))?t.memoizedState=a:q||(a=t.type,e=t.pendingProps,n=Sc(ve.current).createElement(a),n[Nt]=t,n[kt]=e,Jt(n,a,e),Ct(n),t.stateNode=n):t.memoizedState=S0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ft(t),e===null&&q&&(n=t.stateNode=v0(t.type,t.pendingProps,ve.current),z=t,be=!0,i=U,_l(t.type)?(Wd=i,U=Ya(n.firstChild)):U=i),Xt(e,t,t.pendingProps.children,a),lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&q&&((i=n=U)&&(n=Jy(n,t.type,t.pendingProps,be),n!==null?(t.stateNode=n,z=t,U=Ya(n.firstChild),be=!1,i=!0):i=!1),i||Fe(t)),ft(t),i=t.type,c=t.pendingProps,g=e!==null?e.memoizedProps:null,n=c.children,$d(i,c)?n=null:g!==null&&$d(i,g)&&(t.flags|=32),t.memoizedState!==null&&(i=Yo(e,t,dy,null,null,a),Ai._currentValue=i),lc(e,t),Xt(e,t,n,a),t.child;case 6:return e===null&&q&&((e=a=U)&&(a=Iy(a,t.pendingProps,be),a!==null?(t.stateNode=a,z=t,U=null,e=!0):e=!1),e||Fe(t)),null;case 13:return im(e,t,a);case 4:return pe(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=bs(t,null,n,a):Xt(e,t,n,a),t.child;case 11:return Kh(e,t,t.type,t.pendingProps,a);case 7:return Xt(e,t,t.pendingProps,a),t.child;case 8:return Xt(e,t,t.pendingProps.children,a),t.child;case 12:return Xt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,gn(t,t.type,n.value),Xt(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,gs(t),i=Wt(i),n=n(i),t.flags|=1,Xt(e,t,n,a),t.child;case 14:return Ph(e,t,t.type,t.pendingProps,a);case 15:return em(e,t,t.type,t.pendingProps,a);case 19:return cm(e,t,a);case 31:return py(e,t,a);case 22:return tm(e,t,a,t.pendingProps);case 24:return gs(t),n=Wt(Ot),e===null?(i=_o(),i===null&&(i=ct,c=Do(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=a),i=c),t.memoizedState={parent:n,cache:i},ko(t),gn(t,Ot,i)):((e.lanes&a)!==0&&(zo(e,t),hi(t,null,null,a),fi()),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),gn(t,Ot,n)):(n=c.cache,gn(t,Ot,n),n!==i.cache&&_n(t,[Ot],a,!0))),Xt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Un(e){e.flags|=4}function gd(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(Hm())e.flags|=8192;else throw ps=$u,Ao}else e.flags&=-16777217}function dm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!M0(t))if(Hm())e.flags|=8192;else throw ps=$u,Ao}function rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ur():536870912,e.lanes|=t,pr|=t)}function pi(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 mt(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 Sy(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 mt(t),null;case 1:return mt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),an(Ot),Ue(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(qt(t)?Un(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xn())),mt(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(Un(t),c!==null?(mt(t),dm(t,c)):(mt(t),gd(t,i,null,n,a))):c?c!==e.memoizedState?(Un(t),mt(t),dm(t,c)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Un(t),mt(t),gd(t,i,e,n,a)),null;case 27:if(At(t),a=ve.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Un(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return mt(t),null}e=xe.current,qt(t)?De(t):(e=v0(i,n,a),t.stateNode=e,Un(t))}return mt(t),null;case 5:if(At(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Un(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return mt(t),null}if(c=xe.current,qt(t))De(t);else{var g=Sc(ve.current);switch(c){case 1:c=g.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=g.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=g.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=g.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=g.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof n.is=="string"?g.createElement("select",{is:n.is}):g.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?g.createElement(i,{is:n.is}):g.createElement(i)}}c[Nt]=t,c[kt]=n;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)c.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=c;e:switch(Jt(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&&Un(t)}}return mt(t),gd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Un(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=ve.current,qt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=z,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||i0(e.nodeValue,a)),e||Fe(t,!0)}else e=Sc(e).createTextNode(n),e[Nt]=t,t.stateNode=e}return mt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=qt(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[Nt]=t}else Vt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else a=xn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Na(t),t):(Na(t),null);if((t.flags&128)!==0)throw Error(o(558))}return mt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=qt(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[Nt]=t}else Vt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),i=!1}else i=xn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Na(t),t):(Na(t),null)}return Na(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),rc(t,t.updateQueue),mt(t),null);case 4:return Ue(),e===null&&Ld(t.stateNode.containerInfo),mt(t),null;case 10:return an(t.type),mt(t),null;case 19:if(X(Et),n=t.memoizedState,n===null)return mt(t),null;if(i=(t.flags&128)!==0,c=n.rendering,c===null)if(i)pi(n,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Qu(e),c!==null){for(t.flags|=128,pi(n,!1),e=c.updateQueue,t.updateQueue=e,rc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Lu(a,e),a=a.sibling;return ce(Et,Et.current&1|2),q&&r(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ht()>dc&&(t.flags|=128,i=!0,pi(n,!1),t.lanes=4194304)}else{if(!i)if(e=Qu(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,rc(t,e),pi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!q)return mt(t),null}else 2*Ht()-n.renderingStartTime>dc&&a!==536870912&&(t.flags|=128,i=!0,pi(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=Ht(),e.sibling=null,a=Et.current,ce(Et,i?a&1|2:a&1),q&&r(t,n.treeForkCount),e):(mt(t),null);case 22:case 23:return Na(t),qo(),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&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),a=t.updateQueue,a!==null&&rc(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&&X(ys),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),an(Ot),mt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Ny(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 an(Ot),Ue(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return At(t),null;case 31:if(t.memoizedState!==null){if(Na(t),t.alternate===null)throw Error(o(340));Vt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Na(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Vt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(Et),null;case 4:return Ue(),null;case 10:return an(t.type),null;case 22:case 23:return Na(t),qo(),e!==null&&X(ys),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return an(Ot),null;case 25:return null;default:return null}}function fm(e,t){switch(S(t),t.tag){case 3:an(Ot),Ue();break;case 26:case 27:case 5:At(t);break;case 4:Ue();break;case 31:t.memoizedState!==null&&Na(t);break;case 13:Na(t);break;case 19:X(Et);break;case 10:an(t.type);break;case 22:case 23:Na(t),qo(),e!==null&&X(ys);break;case 24:an(Ot)}}function bi(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,g=a.inst;n=c(),g.destroy=n}a=a.next}while(a!==i)}}catch(N){nt(t,t.return,N)}}function El(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 g=n.inst,N=g.destroy;if(N!==void 0){g.destroy=void 0,i=t;var R=a,W=N;try{W()}catch(se){nt(i,R,se)}}}n=n.next}while(n!==c)}}catch(se){nt(t,t.return,se)}}function hm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{nh(t,a)}catch(n){nt(e,e.return,n)}}}function mm(e,t,a){a.props=Ns(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){nt(e,t,n)}}function Si(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){nt(e,t,i)}}function yn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){nt(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){nt(e,t,i)}else a.current=null}function xm(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){nt(e,e.return,i)}}function yd(e,t,a){try{var n=e.stateNode;Gy(n,e.type,a,t),n[kt]=t}catch(i){nt(e,e.return,i)}}function gm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_l(e.type)||e.tag===4}function vd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gm(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&&_l(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 pd(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=_a));else if(n!==4&&(n===27&&_l(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(pd(e,t,a),e=e.sibling;e!==null;)pd(e,t,a),e=e.sibling}function ic(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&&_l(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ic(e,t,a),e=e.sibling;e!==null;)ic(e,t,a),e=e.sibling}function ym(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Jt(t,n,a),t[Nt]=e,t[kt]=a}catch(c){nt(e,e.return,c)}}var Hn=!1,_t=!1,bd=!1,vm=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function wy(e,t){if(e=e.containerInfo,Bd=Cc,e=To(e),Ks(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 g=0,N=-1,R=-1,W=0,se=0,ue=e,I=null;t:for(;;){for(var ae;ue!==a||i!==0&&ue.nodeType!==3||(N=g+i),ue!==c||n!==0&&ue.nodeType!==3||(R=g+n),ue.nodeType===3&&(g+=ue.nodeValue.length),(ae=ue.firstChild)!==null;)I=ue,ue=ae;for(;;){if(ue===e)break t;if(I===a&&++W===i&&(N=g),I===c&&++se===n&&(R=g),(ae=ue.nextSibling)!==null)break;ue=I,I=ue.parentNode}ue=ae}a=N===-1||R===-1?null:{start:N,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Yd={focusedElem:e,selectionRange:a},Cc=!1,Bt=t;Bt!==null;)if(t=Bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Bt=e;else for(;Bt!==null;){switch(t=Bt,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 Se=Ns(a.type,i);e=n.getSnapshotBeforeUpdate(Se,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(Re){nt(a,a.return,Re)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Zd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Zd(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,Bt=e;break}Bt=t.return}}function pm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:qn(e,a),n&4&&bi(5,a);break;case 1:if(qn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){nt(a,a.return,g)}else{var i=Ns(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){nt(a,a.return,g)}}n&64&&hm(a),n&512&&Si(a,a.return);break;case 3:if(qn(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{nh(e,t)}catch(g){nt(a,a.return,g)}}break;case 27:t===null&&n&4&&ym(a);case 26:case 5:qn(e,a),t===null&&n&4&&xm(a),n&512&&Si(a,a.return);break;case 12:qn(e,a);break;case 31:qn(e,a),n&4&&Nm(e,a);break;case 13:qn(e,a),n&4&&wm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=_y.bind(null,a),Ky(e,a))));break;case 22:if(n=a.memoizedState!==null||Hn,!n){t=t!==null&&t.memoizedState!==null||_t,i=Hn;var c=_t;Hn=n,(_t=t)&&!c?Vn(e,a,(a.subtreeFlags&8772)!==0):qn(e,a),Hn=i,_t=c}break;case 30:break;default:qn(e,a)}}function bm(e){var t=e.alternate;t!==null&&(e.alternate=null,bm(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 xt=null,ha=!1;function Ln(e,t,a){for(a=a.child;a!==null;)Sm(e,t,a),a=a.sibling}function Sm(e,t,a){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(pt,a)}catch{}switch(a.tag){case 26:_t||yn(a,t),Ln(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:_t||yn(a,t);var n=xt,i=ha;_l(a.type)&&(xt=a.stateNode,ha=!1),Ln(e,t,a),Di(a.stateNode),xt=n,ha=i;break;case 5:_t||yn(a,t);case 6:if(n=xt,i=ha,xt=null,Ln(e,t,a),xt=n,ha=i,xt!==null)if(ha)try{(xt.nodeType===9?xt.body:xt.nodeName==="HTML"?xt.ownerDocument.body:xt).removeChild(a.stateNode)}catch(c){nt(a,t,c)}else try{xt.removeChild(a.stateNode)}catch(c){nt(a,t,c)}break;case 18:xt!==null&&(ha?(e=xt,h0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Tr(e)):h0(xt,a.stateNode));break;case 4:n=xt,i=ha,xt=a.stateNode.containerInfo,ha=!0,Ln(e,t,a),xt=n,ha=i;break;case 0:case 11:case 14:case 15:El(2,a,t),_t||El(4,a,t),Ln(e,t,a);break;case 1:_t||(yn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&mm(a,t,n)),Ln(e,t,a);break;case 21:Ln(e,t,a);break;case 22:_t=(n=_t)||a.memoizedState!==null,Ln(e,t,a),_t=n;break;default:Ln(e,t,a)}}function Nm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Tr(e)}catch(a){nt(t,t.return,a)}}}function wm(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){nt(t,t.return,a)}}function jy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new vm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new vm),t;default:throw Error(o(435,e.tag))}}function uc(e,t){var a=jy(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var i=Ay.bind(null,e,n);n.then(i,i)}})}function ma(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],c=e,g=t,N=g;e:for(;N!==null;){switch(N.tag){case 27:if(_l(N.type)){xt=N.stateNode,ha=!1;break e}break;case 5:xt=N.stateNode,ha=!1;break e;case 3:case 4:xt=N.stateNode.containerInfo,ha=!0;break e}N=N.return}if(xt===null)throw Error(o(160));Sm(c,g,i),xt=null,ha=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jm(t,e),t=t.sibling}var nn=null;function jm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ma(t,e),xa(e),n&4&&(El(3,e,e.return),bi(3,e),El(5,e,e.return));break;case 1:ma(t,e),xa(e),n&512&&(_t||a===null||yn(a,a.return)),n&64&&Hn&&(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=nn;if(ma(t,e),xa(e),n&512&&(_t||a===null||yn(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[Zl]||c[Nt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(n),i.head.insertBefore(c,i.querySelector("head > title"))),Jt(c,n,a),c[Nt]=e,Ct(c),n=c;break e;case"link":var g=j0("link","href",i).get(n+(a.href||""));if(g){for(var N=0;N<g.length;N++)if(c=g[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)){g.splice(N,1);break t}}c=i.createElement(n),Jt(c,n,a),i.head.appendChild(c);break;case"meta":if(g=j0("meta","content",i).get(n+(a.content||""))){for(N=0;N<g.length;N++)if(c=g[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)){g.splice(N,1);break t}}c=i.createElement(n),Jt(c,n,a),i.head.appendChild(c);break;default:throw Error(o(468,n))}c[Nt]=e,Ct(c),n=c}e.stateNode=n}else E0(i,e.type,e.stateNode);else e.stateNode=w0(i,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?E0(i,e.type,e.stateNode):w0(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&yd(e,e.memoizedProps,a.memoizedProps)}break;case 27:ma(t,e),xa(e),n&512&&(_t||a===null||yn(a,a.return)),a!==null&&n&4&&yd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ma(t,e),xa(e),n&512&&(_t||a===null||yn(a,a.return)),e.flags&32){i=e.stateNode;try{Ja(i,"")}catch(Se){nt(e,e.return,Se)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,yd(e,i,a!==null?a.memoizedProps:i)),n&1024&&(bd=!0);break;case 6:if(ma(t,e),xa(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(Se){nt(e,e.return,Se)}}break;case 3:if(jc=null,i=nn,nn=Nc(t.containerInfo),ma(t,e),nn=i,xa(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Tr(t.containerInfo)}catch(Se){nt(e,e.return,Se)}bd&&(bd=!1,Em(e));break;case 4:n=nn,nn=Nc(e.stateNode.containerInfo),ma(t,e),xa(e),nn=n;break;case 12:ma(t,e),xa(e);break;case 31:ma(t,e),xa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,uc(e,n)));break;case 13:ma(t,e),xa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(oc=Ht()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,uc(e,n)));break;case 22:i=e.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,W=Hn,se=_t;if(Hn=W||i,_t=se||R,ma(t,e),_t=se,Hn=W,xa(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||R||Hn||_t||ws(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){R=a=t;try{if(c=R.stateNode,i)g=c.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{N=R.stateNode;var ue=R.memoizedProps.style,I=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;N.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(Se){nt(R,R.return,Se)}}}else if(t.tag===6){if(a===null){R=t;try{R.stateNode.nodeValue=i?"":R.memoizedProps}catch(Se){nt(R,R.return,Se)}}}else if(t.tag===18){if(a===null){R=t;try{var ae=R.stateNode;i?m0(ae,!0):m0(R.stateNode,!1)}catch(Se){nt(R,R.return,Se)}}}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,uc(e,a))));break;case 19:ma(t,e),xa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,uc(e,n)));break;case 30:break;case 21:break;default:ma(t,e),xa(e)}}function xa(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(gm(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,c=vd(e);ic(e,c,i);break;case 5:var g=a.stateNode;a.flags&32&&(Ja(g,""),a.flags&=-33);var N=vd(e);ic(e,N,g);break;case 3:case 4:var R=a.stateNode.containerInfo,W=vd(e);pd(e,W,R);break;default:throw Error(o(161))}}catch(se){nt(e,e.return,se)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Em(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Em(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function qn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pm(e,t.alternate,t),t=t.sibling}function ws(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:El(4,t,t.return),ws(t);break;case 1:yn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&mm(t,t.return,a),ws(t);break;case 27:Di(t.stateNode);case 26:case 5:yn(t,t.return),ws(t);break;case 22:t.memoizedState===null&&ws(t);break;case 30:ws(t);break;default:ws(t)}e=e.sibling}}function Vn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,c=t,g=c.flags;switch(c.tag){case 0:case 11:case 15:Vn(i,c,a),bi(4,c);break;case 1:if(Vn(i,c,a),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(W){nt(n,n.return,W)}if(n=c,i=n.updateQueue,i!==null){var N=n.stateNode;try{var R=i.shared.hiddenCallbacks;if(R!==null)for(i.shared.hiddenCallbacks=null,i=0;i<R.length;i++)ah(R[i],N)}catch(W){nt(n,n.return,W)}}a&&g&64&&hm(c),Si(c,c.return);break;case 27:ym(c);case 26:case 5:Vn(i,c,a),a&&n===null&&g&4&&xm(c),Si(c,c.return);break;case 12:Vn(i,c,a);break;case 31:Vn(i,c,a),a&&g&4&&Nm(i,c);break;case 13:Vn(i,c,a),a&&g&4&&wm(i,c);break;case 22:c.memoizedState===null&&Vn(i,c,a),Si(c,c.return);break;case 30:break;default:Vn(i,c,a)}t=t.sibling}}function Sd(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&&ii(a))}function Nd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ii(e))}function ln(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Mm(e,t,a,n),t=t.sibling}function Mm(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:ln(e,t,a,n),i&2048&&bi(9,t);break;case 1:ln(e,t,a,n);break;case 3:ln(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&&ii(e)));break;case 12:if(i&2048){ln(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,g=c.id,N=c.onPostCommit;typeof N=="function"&&N(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){nt(t,t.return,R)}}else ln(e,t,a,n);break;case 31:ln(e,t,a,n);break;case 13:ln(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,g=t.alternate,t.memoizedState!==null?c._visibility&2?ln(e,t,a,n):Ni(e,t):c._visibility&2?ln(e,t,a,n):(c._visibility|=2,gr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Sd(g,t);break;case 24:ln(e,t,a,n),i&2048&&Nd(t.alternate,t);break;default:ln(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,g=t,N=a,R=n,W=g.flags;switch(g.tag){case 0:case 11:case 15:gr(c,g,N,R,i),bi(8,g);break;case 23:break;case 22:var se=g.stateNode;g.memoizedState!==null?se._visibility&2?gr(c,g,N,R,i):Ni(c,g):(se._visibility|=2,gr(c,g,N,R,i)),i&&W&2048&&Sd(g.alternate,g);break;case 24:gr(c,g,N,R,i),i&&W&2048&&Nd(g.alternate,g);break;default:gr(c,g,N,R,i)}t=t.sibling}}function Ni(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:Ni(a,n),i&2048&&Sd(n.alternate,n);break;case 24:Ni(a,n),i&2048&&Nd(n.alternate,n);break;default:Ni(a,n)}t=t.sibling}}var wi=8192;function yr(e,t,a){if(e.subtreeFlags&wi)for(e=e.child;e!==null;)Tm(e,t,a),e=e.sibling}function Tm(e,t,a){switch(e.tag){case 26:yr(e,t,a),e.flags&wi&&e.memoizedState!==null&&ov(a,nn,e.memoizedState,e.memoizedProps);break;case 5:yr(e,t,a);break;case 3:case 4:var n=nn;nn=Nc(e.stateNode.containerInfo),yr(e,t,a),nn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=wi,wi=16777216,yr(e,t,a),wi=n):yr(e,t,a));break;default:yr(e,t,a)}}function Cm(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 ji(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];Bt=n,Dm(n,e)}Cm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Om(e),e=e.sibling}function Om(e){switch(e.tag){case 0:case 11:case 15:ji(e),e.flags&2048&&El(9,e,e.return);break;case 3:ji(e);break;case 12:ji(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cc(e)):ji(e);break;default:ji(e)}}function cc(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];Bt=n,Dm(n,e)}Cm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:El(8,t,t.return),cc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,cc(t));break;default:cc(t)}e=e.sibling}}function Dm(e,t){for(;Bt!==null;){var a=Bt;switch(a.tag){case 0:case 11:case 15:El(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:ii(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Bt=n;else e:for(a=e;Bt!==null;){n=Bt;var i=n.sibling,c=n.return;if(bm(n),n===a){Bt=null;break e}if(i!==null){i.return=c,Bt=i;break e}Bt=c}}}var Ey={getCacheForType:function(e){var t=Wt(Ot),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Wt(Ot).controller.signal}},My=typeof WeakMap=="function"?WeakMap:Map,Pe=0,ct=null,$e=null,Qe=0,at=0,wa=null,Ml=!1,vr=!1,wd=!1,Bn=0,St=0,Tl=0,js=0,jd=0,ja=0,pr=0,Ei=null,ga=null,Ed=!1,oc=0,Rm=0,dc=1/0,fc=null,Cl=null,Ut=0,Ol=null,br=null,Yn=0,Md=0,Td=null,_m=null,Mi=0,Cd=null;function Ea(){return(Pe&2)!==0&&Qe!==0?Qe&-Qe:Z.T!==null?kd():Vs()}function Am(){if(ja===0)if((Qe&536870912)===0||q){var e=Hs;Hs<<=1,(Hs&3932160)===0&&(Hs=262144),ja=e}else ja=536870912;return e=Sa.current,e!==null&&(e.flags|=32),ja}function ya(e,t,a){(e===ct&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(Sr(e,0),Dl(e,Qe,ja,!1)),ll(e,a),((Pe&2)===0||e!==ct)&&(e===ct&&((Pe&2)===0&&(js|=a),St===4&&Dl(e,Qe,ja,!1)),vn(e))}function km(e,t,a){if((Pe&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||nl(e,t),i=n?Oy(e,t):Dd(e,t,!0),c=n;do{if(i===0){vr&&!n&&Dl(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!Ty(a)){i=Dd(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var N=e;i=Ei;var R=N.current.memoizedState.isDehydrated;if(R&&(Sr(N,g).flags|=256),g=Dd(N,g,!1),g!==2){if(wd&&!R){N.errorRecoveryDisabledLanes|=c,js|=c,i=4;break e}c=ga,ga=i,c!==null&&(ga===null?ga=c:ga.push.apply(ga,c))}i=g}if(c=!1,i!==2)continue}}if(i===1){Sr(e,0),Dl(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:Dl(n,t,ja,!Ml);break e;case 2:ga=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=oc+300-Ht(),10<i)){if(Dl(n,t,ja,!Ml),$l(n,0,!0)!==0)break e;Yn=t,n.timeoutHandle=d0(zm.bind(null,n,a,ga,fc,Ed,t,ja,js,pr,Ml,c,"Throttled",-0,0),i);break e}zm(n,a,ga,fc,Ed,t,ja,js,pr,Ml,c,null,-0,0)}}break}while(!0);vn(e)}function zm(e,t,a,n,i,c,g,N,R,W,se,ue,I,ae){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_a},Tm(t,c,ue);var Se=(c&62914560)===c?oc-Ht():(c&4194048)===c?Rm-Ht():0;if(Se=dv(ue,Se),Se!==null){Yn=c,e.cancelPendingCommit=Se($m.bind(null,e,t,c,a,n,i,g,N,R,se,ue,null,I,ae)),Dl(e,c,g,!W);return}}$m(e,t,c,a,n,i,g,N,R)}function Ty(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(!aa(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 Dl(e,t,a,n){t&=~jd,t&=~js,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var c=31-$t(i),g=1<<c;n[c]=-1,i&=~g}a!==0&&ot(e,a,t)}function hc(){return(Pe&6)===0?(Ti(0),!1):!0}function Od(){if($e!==null){if(at===0)var e=$e.return;else e=$e,qa=Rn=null,Zo(e),dr=null,ci=0,e=$e;for(;e!==null;)fm(e.alternate,e),e=e.return;$e=null}}function Sr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Qy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Yn=0,Od(),ct=e,$e=a=Ua(e.current,null),Qe=t,at=0,wa=null,Ml=!1,vr=nl(e,t),wd=!1,pr=ja=jd=js=Tl=St=0,ga=Ei=null,Ed=!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-$t(n),c=1<<i;t|=e[i],n&=~c}return Bn=t,vl(),a}function Um(e,t){He=null,Z.H=yi,t===or||t===Yu?(t=Kf(),at=3):t===Ao?(t=Kf(),at=4):at=t===id?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,wa=t,$e===null&&(St=1,ac(e,da(t,e.current)))}function Hm(){var e=Sa.current;return e===null?!0:(Qe&4194048)===Qe?Ba===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===Ba:!1}function Lm(){var e=Z.H;return Z.H=yi,e===null?yi:e}function qm(){var e=Z.A;return Z.A=Ey,e}function mc(){St=4,Ml||(Qe&4194048)!==Qe&&Sa.current!==null||(vr=!0),(Tl&134217727)===0&&(js&134217727)===0||ct===null||Dl(ct,Qe,ja,!1)}function Dd(e,t,a){var n=Pe;Pe|=2;var i=Lm(),c=qm();(ct!==e||Qe!==t)&&(fc=null,Sr(e,t)),t=!1;var g=St;e:do try{if(at!==0&&$e!==null){var N=$e,R=wa;switch(at){case 8:Od(),g=6;break e;case 3:case 2:case 9:case 6:Sa.current===null&&(t=!0);var W=at;if(at=0,wa=null,Nr(e,N,R,W),a&&vr){g=0;break e}break;default:W=at,at=0,wa=null,Nr(e,N,R,W)}}Cy(),g=St;break}catch(se){Um(e,se)}while(!0);return t&&e.shellSuspendCounter++,qa=Rn=null,Pe=n,Z.H=i,Z.A=c,$e===null&&(ct=null,Qe=0,vl()),g}function Cy(){for(;$e!==null;)Vm($e)}function Oy(e,t){var a=Pe;Pe|=2;var n=Lm(),i=qm();ct!==e||Qe!==t?(fc=null,dc=Ht()+500,Sr(e,t)):vr=nl(e,t);e:do try{if(at!==0&&$e!==null){t=$e;var c=wa;t:switch(at){case 1:at=0,wa=null,Nr(e,t,c,1);break;case 2:case 9:if(Jf(c)){at=0,wa=null,Bm(t);break}t=function(){at!==2&&at!==9||ct!==e||(at=7),vn(e)},c.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:Jf(c)?(at=0,wa=null,Bm(t)):(at=0,wa=null,Nr(e,t,c,7));break;case 5:var g=null;switch($e.tag){case 26:g=$e.memoizedState;case 5:case 27:var N=$e;if(g?M0(g):N.stateNode.complete){at=0,wa=null;var R=N.sibling;if(R!==null)$e=R;else{var W=N.return;W!==null?($e=W,xc(W)):$e=null}break t}}at=0,wa=null,Nr(e,t,c,5);break;case 6:at=0,wa=null,Nr(e,t,c,6);break;case 8:Od(),St=6;break e;default:throw Error(o(462))}}Dy();break}catch(se){Um(e,se)}while(!0);return qa=Rn=null,Z.H=n,Z.A=i,Pe=a,$e!==null?0:(ct=null,Qe=0,vl(),St)}function Dy(){for(;$e!==null&&!ks();)Vm($e)}function Vm(e){var t=om(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?xc(e):$e=t}function Bm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=lm(a,t,t.pendingProps,t.type,void 0,Qe);break;case 11:t=lm(a,t,t.pendingProps,t.type.render,t.ref,Qe);break;case 5:Zo(t);default:fm(a,t),t=$e=Lu(t,Bn),t=om(a,t,Bn)}e.memoizedProps=e.pendingProps,t===null?xc(e):$e=t}function Nr(e,t,a,n){qa=Rn=null,Zo(t),dr=null,ci=0;var i=t.return;try{if(vy(e,i,t,a,Qe)){St=1,ac(e,da(a,e.current)),$e=null;return}}catch(c){if(i!==null)throw $e=i,c;St=1,ac(e,da(a,e.current)),$e=null;return}t.flags&32768?(q||n===1?e=!0:vr||(Qe&536870912)!==0?e=!1:(Ml=e=!0,(n===2||n===9||n===3||n===6)&&(n=Sa.current,n!==null&&n.tag===13&&(n.flags|=16384))),Ym(t,e)):xc(t)}function xc(e){var t=e;do{if((t.flags&32768)!==0){Ym(t,Ml);return}e=t.return;var a=Sy(t.alternate,t,Bn);if(a!==null){$e=a;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);St===0&&(St=5)}function Ym(e,t){do{var a=Ny(e.alternate,e);if(a!==null){a.flags&=32767,$e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){$e=e;return}$e=e=a}while(e!==null);St=6,$e=null}function $m(e,t,a,n,i,c,g,N,R){e.cancelPendingCommit=null;do gc();while(Ut!==0);if((Pe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=fs,ou(e,a,c,g,N,R),e===ct&&($e=ct=null,Qe=0),br=t,Ol=e,Yn=a,Md=c,Td=i,_m=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ky(un,function(){return Wm(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=Z.T,Z.T=null,i=re.p,re.p=2,g=Pe,Pe|=4;try{wy(e,t,a)}finally{Pe=g,re.p=i,Z.T=n}}Ut=1,Gm(),Zm(),Fm()}}function Gm(){if(Ut===1){Ut=0;var e=Ol,t=br,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=Z.T,Z.T=null;var n=re.p;re.p=2;var i=Pe;Pe|=4;try{jm(t,e);var c=Yd,g=To(e.containerInfo),N=c.focusedElem,R=c.selectionRange;if(g!==N&&N&&N.ownerDocument&&Xe(N.ownerDocument.documentElement,N)){if(R!==null&&Ks(N)){var W=R.start,se=R.end;if(se===void 0&&(se=W),"selectionStart"in N)N.selectionStart=W,N.selectionEnd=Math.min(se,N.value.length);else{var ue=N.ownerDocument||document,I=ue&&ue.defaultView||window;if(I.getSelection){var ae=I.getSelection(),Se=N.textContent.length,Re=Math.min(R.start,Se),it=R.end===void 0?Re:Math.min(R.end,Se);!ae.extend&&Re>it&&(g=it,it=Re,Re=g);var G=_u(N,Re),L=_u(N,it);if(G&&L&&(ae.rangeCount!==1||ae.anchorNode!==G.node||ae.anchorOffset!==G.offset||ae.focusNode!==L.node||ae.focusOffset!==L.offset)){var Q=ue.createRange();Q.setStart(G.node,G.offset),ae.removeAllRanges(),Re>it?(ae.addRange(Q),ae.extend(L.node,L.offset)):(Q.setEnd(L.node,L.offset),ae.addRange(Q))}}}}for(ue=[],ae=N;ae=ae.parentNode;)ae.nodeType===1&&ue.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ue.length;N++){var ie=ue[N];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Cc=!!Bd,Yd=Bd=null}finally{Pe=i,re.p=n,Z.T=a}}e.current=t,Ut=2}}function Zm(){if(Ut===2){Ut=0;var e=Ol,t=br,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=Z.T,Z.T=null;var n=re.p;re.p=2;var i=Pe;Pe|=4;try{pm(e,t.alternate,t)}finally{Pe=i,re.p=n,Z.T=a}}Ut=3}}function Fm(){if(Ut===4||Ut===3){Ut=0,zs();var e=Ol,t=br,a=Yn,n=_m;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ut=5:(Ut=0,br=Ol=null,Qm(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Cl=null),ta(a),t=t.stateNode,Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(pt,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=Z.T,i=re.p,re.p=2,Z.T=null;try{for(var c=e.onRecoverableError,g=0;g<n.length;g++){var N=n[g];c(N.value,{componentStack:N.stack})}}finally{Z.T=t,re.p=i}}(Yn&3)!==0&&gc(),vn(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===Cd?Mi++:(Mi=0,Cd=e):Mi=0,Ti(0)}}function Qm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ii(t)))}function gc(){return Gm(),Zm(),Fm(),Wm()}function Wm(){if(Ut!==5)return!1;var e=Ol,t=Md;Md=0;var a=ta(Yn),n=Z.T,i=re.p;try{re.p=32>a?32:a,Z.T=null,a=Td,Td=null;var c=Ol,g=Yn;if(Ut=0,br=Ol=null,Yn=0,(Pe&6)!==0)throw Error(o(331));var N=Pe;if(Pe|=4,Om(c.current),Mm(c,c.current,g,a),Pe=N,Ti(0,!1),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(pt,c)}catch{}return!0}finally{re.p=i,Z.T=n,Qm(e,t)}}function Xm(e,t,a){t=da(a,t),t=rd(e.stateNode,t,2),e=Nl(e,t,2),e!==null&&(ll(e,2),vn(e))}function nt(e,t,a){if(e.tag===3)Xm(e,e,a);else for(;t!==null;){if(t.tag===3){Xm(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Cl===null||!Cl.has(n))){e=da(a,e),a=Jh(2),n=Nl(t,a,2),n!==null&&(Ih(a,n,t,e),ll(n,2),vn(n));break}}t=t.return}}function Rd(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new My;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)||(wd=!0,i.add(a),e=Ry.bind(null,e,t,a),t.then(e,e))}function Ry(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ct===e&&(Qe&a)===a&&(St===4||St===3&&(Qe&62914560)===Qe&&300>Ht()-oc?(Pe&2)===0&&Sr(e,0):jd|=a,pr===Qe&&(pr=0)),vn(e)}function Jm(e,t){t===0&&(t=Ur()),e=za(e,t),e!==null&&(ll(e,t),vn(e))}function _y(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Jm(e,a)}function Ay(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),Jm(e,a)}function ky(e,t){return el(e,t)}var yc=null,wr=null,_d=!1,vc=!1,Ad=!1,Rl=0;function vn(e){e!==wr&&e.next===null&&(wr===null?yc=wr=e:wr=wr.next=e),vc=!0,_d||(_d=!0,Uy())}function Ti(e,t){if(!Ad&&vc){Ad=!0;do for(var a=!1,n=yc;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var c=0;else{var g=n.suspendedLanes,N=n.pingedLanes;c=(1<<31-$t(42|e)+1)-1,c&=i&~(g&~N),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,e0(n,c))}else c=Qe,c=$l(n,n===ct?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||nl(n,c)||(a=!0,e0(n,c));n=n.next}while(a);Ad=!1}}function zy(){Im()}function Im(){vc=_d=!1;var e=0;Rl!==0&&Fy()&&(e=Rl);for(var t=Ht(),a=null,n=yc;n!==null;){var i=n.next,c=Km(n,t);c===0?(n.next=null,a===null?yc=i:a.next=i,i===null&&(wr=a)):(a=n,(e!==0||(c&3)!==0)&&(vc=!0)),n=i}Ut!==0&&Ut!==5||Ti(e),Rl!==0&&(Rl=0)}function Km(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var g=31-$t(c),N=1<<g,R=i[g];R===-1?((N&a)===0||(N&n)!==0)&&(i[g]=cu(N,t)):R<=t&&(e.expiredLanes|=N),c&=~N}if(t=ct,a=Qe,a=$l(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(at===2||at===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&tl(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||nl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&tl(n),ta(a)){case 2:case 8:a=Lt;break;case 32:a=un;break;case 268435456:a=Yl;break;default:a=un}return n=Pm.bind(null,e),a=el(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&tl(n),e.callbackPriority=2,e.callbackNode=null,2}function Pm(e,t){if(Ut!==0&&Ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(gc()&&e.callbackNode!==a)return null;var n=Qe;return n=$l(e,e===ct?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(km(e,n,t),Km(e,Ht()),e.callbackNode!=null&&e.callbackNode===a?Pm.bind(null,e):null)}function e0(e,t){if(gc())return null;km(e,t,!0)}function Uy(){Wy(function(){(Pe&6)!==0?el(Le,zy):Im()})}function kd(){if(Rl===0){var e=ur;e===0&&(e=al,al<<=1,(al&261888)===0&&(al=256)),Rl=e}return Rl}function t0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Il(""+e)}function a0(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 Hy(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var c=t0((i[kt]||null).action),g=n.submitter;g&&(t=(t=g[kt]||null)?t0(t.formAction):g.getAttribute("formAction"),t!==null&&(c=t,g=null));var N=new ts("action","action",null,n,i);e.push({event:N,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Rl!==0){var R=g?a0(i,g):new FormData(i);ed(a,{pending:!0,data:R,method:i.method,action:c},null,R)}}else typeof c=="function"&&(N.preventDefault(),R=g?a0(i,g):new FormData(i),ed(a,{pending:!0,data:R,method:i.method,action:c},c,R))},currentTarget:i}]})}}for(var zd=0;zd<ni.length;zd++){var Ud=ni[zd],Ly=Ud.toLowerCase(),qy=Ud[0].toUpperCase()+Ud.slice(1);oa(Ly,"on"+qy)}oa(zu,"onAnimationEnd"),oa(Uu,"onAnimationIteration"),oa(tr,"onAnimationStart"),oa("dblclick","onDoubleClick"),oa("focusin","onFocus"),oa("focusout","onBlur"),oa(Co,"onTransitionRun"),oa(Oo,"onTransitionStart"),oa(Hu,"onTransitionCancel"),oa(ti,"onTransitionEnd"),sl("onMouseEnter",["mouseout","mouseover"]),sl("onMouseLeave",["mouseout","mouseover"]),sl("onPointerEnter",["pointerout","pointerover"]),sl("onPointerLeave",["pointerout","pointerover"]),on("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),on("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),on("onBeforeInput",["compositionend","keypress","textInput","paste"]),on("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),on("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),on("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ci="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(" "),Vy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ci));function n0(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 g=n.length-1;0<=g;g--){var N=n[g],R=N.instance,W=N.currentTarget;if(N=N.listener,R!==c&&i.isPropagationStopped())break e;c=N,i.currentTarget=W;try{c(i)}catch(se){yl(se)}i.currentTarget=null,c=R}else for(g=0;g<n.length;g++){if(N=n[g],R=N.instance,W=N.currentTarget,N=N.listener,R!==c&&i.isPropagationStopped())break e;c=N,i.currentTarget=W;try{c(i)}catch(se){yl(se)}i.currentTarget=null,c=R}}}}function Ge(e,t){var a=t[Gl];a===void 0&&(a=t[Gl]=new Set);var n=e+"__bubble";a.has(n)||(l0(t,e,2,!1),a.add(n))}function Hd(e,t,a){var n=0;t&&(n|=4),l0(a,e,n,t)}var pc="_reactListening"+Math.random().toString(36).slice(2);function Ld(e){if(!e[pc]){e[pc]=!0,mu.forEach(function(a){a!=="selectionchange"&&(Vy.has(a)||Hd(a,!1,e),Hd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pc]||(t[pc]=!0,Hd("selectionchange",!1,t))}}function l0(e,t,a,n){switch(A0(t)){case 2:var i=mv;break;case 8:i=xv;break;default:i=Pd}a=i.bind(null,t,a,e),i=void 0,!Fr||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 qd(e,t,a,n,i){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var g=n.tag;if(g===3||g===4){var N=n.stateNode.containerInfo;if(N===i)break;if(g===4)for(g=n.return;g!==null;){var R=g.tag;if((R===3||R===4)&&g.stateNode.containerInfo===i)return;g=g.return}for(;N!==null;){if(g=Nn(N),g===null)return;if(R=g.tag,R===5||R===6||R===26||R===27){n=c=g;continue e}N=N.parentNode}}n=n.return}Zr(function(){var W=c,se=Fs(a),ue=[];e:{var I=ai.get(e);if(I!==void 0){var ae=ts,Se=e;switch(e){case"keypress":if(es(a)===0)break e;case"keydown":case"keyup":ae=ho;break;case"focusin":Se="focus",ae=Is;break;case"focusout":Se="blur",ae=Is;break;case"beforeblur":case"afterblur":ae=Is;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":ae=bu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=no;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=go;break;case zu:case Uu:case tr:ae=cl;break;case ti:ae=yo;break;case"scroll":case"scrollend":ae=Qr;break;case"wheel":ae=po;break;case"copy":case"cut":case"paste":ae=ol;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=Su;break;case"toggle":case"beforetoggle":ae=So}var Re=(t&4)!==0,it=!Re&&(e==="scroll"||e==="scrollend"),G=Re?I!==null?I+"Capture":null:I;Re=[];for(var L=W,Q;L!==null;){var ie=L;if(Q=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||Q===null||G===null||(ie=Kl(L,G),ie!=null&&Re.push(Oi(L,ie,Q))),it)break;L=L.return}0<Re.length&&(I=new ae(I,Se,null,a,se),ue.push({event:I,listeners:Re}))}}if((t&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",I&&a!==$r&&(Se=a.relatedTarget||a.fromElement)&&(Nn(Se)||Se[Sn]))break e;if((ae||I)&&(I=se.window===se?se:(I=se.ownerDocument)?I.defaultView||I.parentWindow:window,ae?(Se=a.relatedTarget||a.toElement,ae=W,Se=Se?Nn(Se):null,Se!==null&&(it=m(Se),Re=Se.tag,Se!==it||Re!==5&&Re!==27&&Re!==6)&&(Se=null)):(ae=null,Se=W),ae!==Se)){if(Re=bu,ie="onMouseLeave",G="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(Re=Su,ie="onPointerLeave",G="onPointerEnter",L="pointer"),it=ae==null?I:ua(ae),Q=Se==null?I:ua(Se),I=new Re(ie,L+"leave",ae,a,se),I.target=it,I.relatedTarget=Q,ie=null,Nn(se)===W&&(Re=new Re(G,L+"enter",Se,a,se),Re.target=Q,Re.relatedTarget=it,ie=Re),it=ie,ae&&Se)t:{for(Re=By,G=ae,L=Se,Q=0,ie=G;ie;ie=Re(ie))Q++;ie=0;for(var Ce=L;Ce;Ce=Re(Ce))ie++;for(;0<Q-ie;)G=Re(G),Q--;for(;0<ie-Q;)L=Re(L),ie--;for(;Q--;){if(G===L||L!==null&&G===L.alternate){Re=G;break t}G=Re(G),L=Re(L)}Re=null}else Re=null;ae!==null&&s0(ue,I,ae,Re,!1),Se!==null&&it!==null&&s0(ue,it,Se,Re,!0)}}e:{if(I=W?ua(W):window,ae=I.nodeName&&I.nodeName.toLowerCase(),ae==="select"||ae==="input"&&I.type==="file")var Je=Du;else if(Ou(I))if(mn)Je=ht;else{Je=ml;var je=Ze}else ae=I.nodeName,!ae||ae.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?W&&Zs(W.elementType)&&(Je=Du):Je=Mo;if(Je&&(Je=Je(e,W))){Xr(ue,Je,a,se);break e}je&&je(e,I,W),e==="focusout"&&W&&I.type==="number"&&W.memoizedProps.value!=null&&Ql(I,"number",I.value)}switch(je=W?ua(W):window,e){case"focusin":(Ou(je)||je.contentEditable==="true")&&(xl=je,Ps=W,Ft=null);break;case"focusout":Ft=Ps=xl=null;break;case"mousedown":er=!0;break;case"contextmenu":case"mouseup":case"dragend":er=!1,ds(ue,a,se);break;case"selectionchange":if(Au)break;case"keydown":case"keyup":ds(ue,a,se)}var qe;if(Wr)e:{switch(e){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else fl?Tu(e,a)&&(We="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(We="onCompositionStart");We&&(ju&&a.locale!=="ko"&&(fl||We!=="onCompositionStart"?We==="onCompositionEnd"&&fl&&(qe=zt()):(fn=se,Qs="value"in fn?fn.value:fn.textContent,fl=!0)),je=bc(W,We),0<je.length&&(We=new dl(We,e,null,a,se),ue.push({event:We,listeners:je}),qe?We.data=qe:(qe=Cu(a),qe!==null&&(We.data=qe)))),(qe=No?wo(e,a):jo(e,a))&&(We=bc(W,"onBeforeInput"),0<We.length&&(je=new dl("onBeforeInput","beforeinput",null,a,se),ue.push({event:je,listeners:We}),je.data=qe)),Hy(ue,e,W,a,se)}n0(ue,t)})}function Oi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function bc(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=Kl(e,a),i!=null&&n.unshift(Oi(e,i,c)),i=Kl(e,t),i!=null&&n.push(Oi(e,i,c))),e.tag===3)return n;e=e.return}return[]}function By(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function s0(e,t,a,n,i){for(var c=t._reactName,g=[];a!==null&&a!==n;){var N=a,R=N.alternate,W=N.stateNode;if(N=N.tag,R!==null&&R===n)break;N!==5&&N!==26&&N!==27||W===null||(R=W,i?(W=Kl(a,c),W!=null&&g.unshift(Oi(a,W,R))):i||(W=Kl(a,c),W!=null&&g.push(Oi(a,W,R)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var Yy=/\r\n?/g,$y=/\u0000|\uFFFD/g;function r0(e){return(typeof e=="string"?e:""+e).replace(Yy,`
|
|
49
|
+
`).replace($y,"")}function i0(e,t){return t=r0(t),r0(e)===t}function rt(e,t,a,n,i,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Ja(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Ja(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":yu(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=Il(""+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"&&rt(e,t,"name",i.name,i,null),rt(e,t,"formEncType",i.formEncType,i,null),rt(e,t,"formMethod",i.formMethod,i,null),rt(e,t,"formTarget",i.formTarget,i,null)):(rt(e,t,"encType",i.encType,i,null),rt(e,t,"method",i.method,i,null),rt(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Il(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=_a);break;case"onScroll":n!=null&&Ge("scroll",e);break;case"onScrollEnd":n!=null&&Ge("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=Il(""+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":Ge("beforetoggle",e),Ge("toggle",e),Gt(e,"popover",n);break;case"xlinkActuate":tt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":tt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":tt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":tt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":tt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":tt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":tt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":tt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":tt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Gt(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=to.get(a)||a,Gt(e,a,n))}}function Vd(e,t,a,n,i,c){switch(a){case"style":yu(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"?Ja(e,n):(typeof n=="number"||typeof n=="bigint")&&Ja(e,""+n);break;case"onScroll":n!=null&&Ge("scroll",e);break;case"onScrollEnd":n!=null&&Ge("scrollend",e);break;case"onClick":n!=null&&(e.onclick=_a);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qr.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[kt]||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,""):Gt(e,a,n)}}}function Jt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",e),Ge("load",e);var n=!1,i=!1,c;for(c in a)if(a.hasOwnProperty(c)){var g=a[c];if(g!=null)switch(c){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:rt(e,t,c,g,a,null)}}i&&rt(e,t,"srcSet",a.srcSet,a,null),n&&rt(e,t,"src",a.src,a,null);return;case"input":Ge("invalid",e);var N=c=g=i=null,R=null,W=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":g=se;break;case"checked":R=se;break;case"defaultChecked":W=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:rt(e,t,n,se,a,null)}}il(e,c,N,R,W,g,i,!1);return;case"select":Ge("invalid",e),n=g=c=null;for(i in a)if(a.hasOwnProperty(i)&&(N=a[i],N!=null))switch(i){case"value":c=N;break;case"defaultValue":g=N;break;case"multiple":n=N;default:rt(e,t,i,N,a,null)}t=c,a=g,e.multiple=!!n,t!=null?jn(e,!!n,t,!1):a!=null&&jn(e,!!n,a,!0);return;case"textarea":Ge("invalid",e),c=i=n=null;for(g in a)if(a.hasOwnProperty(g)&&(N=a[g],N!=null))switch(g){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:rt(e,t,g,N,a,null)}Yr(e,n,i,c);return;case"option":for(R in a)if(a.hasOwnProperty(R)&&(n=a[R],n!=null))switch(R){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:rt(e,t,R,n,a,null)}return;case"dialog":Ge("beforetoggle",e),Ge("toggle",e),Ge("cancel",e),Ge("close",e);break;case"iframe":case"object":Ge("load",e);break;case"video":case"audio":for(n=0;n<Ci.length;n++)Ge(Ci[n],e);break;case"image":Ge("error",e),Ge("load",e);break;case"details":Ge("toggle",e);break;case"embed":case"source":case"link":Ge("error",e),Ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(W in a)if(a.hasOwnProperty(W)&&(n=a[W],n!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:rt(e,t,W,n,a,null)}return;default:if(Zs(t)){for(se in a)a.hasOwnProperty(se)&&(n=a[se],n!==void 0&&Vd(e,t,se,n,a,void 0));return}}for(N in a)a.hasOwnProperty(N)&&(n=a[N],n!=null&&rt(e,t,N,n,a,null))}function Gy(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,g=null,N=null,R=null,W=null,se=null;for(ae in a){var ue=a[ae];if(a.hasOwnProperty(ae)&&ue!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":R=ue;default:n.hasOwnProperty(ae)||rt(e,t,ae,null,n,ue)}}for(var I in n){var ae=n[I];if(ue=a[I],n.hasOwnProperty(I)&&(ae!=null||ue!=null))switch(I){case"type":c=ae;break;case"name":i=ae;break;case"checked":W=ae;break;case"defaultChecked":se=ae;break;case"value":g=ae;break;case"defaultValue":N=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,t));break;default:ae!==ue&&rt(e,t,I,ae,n,ue)}}Gs(e,g,N,R,W,se,c,i);return;case"select":ae=g=N=I=null;for(c in a)if(R=a[c],a.hasOwnProperty(c)&&R!=null)switch(c){case"value":break;case"multiple":ae=R;default:n.hasOwnProperty(c)||rt(e,t,c,null,n,R)}for(i in n)if(c=n[i],R=a[i],n.hasOwnProperty(i)&&(c!=null||R!=null))switch(i){case"value":I=c;break;case"defaultValue":N=c;break;case"multiple":g=c;default:c!==R&&rt(e,t,i,c,n,R)}t=N,a=g,n=ae,I!=null?jn(e,!!a,I,!1):!!n!=!!a&&(t!=null?jn(e,!!a,t,!0):jn(e,!!a,a?[]:"",!1));return;case"textarea":ae=I=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:rt(e,t,N,null,n,i)}for(g in n)if(i=n[g],c=a[g],n.hasOwnProperty(g)&&(i!=null||c!=null))switch(g){case"value":I=i;break;case"defaultValue":ae=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==c&&rt(e,t,g,i,n,c)}Wl(e,I,ae);return;case"option":for(var Se in a)if(I=a[Se],a.hasOwnProperty(Se)&&I!=null&&!n.hasOwnProperty(Se))switch(Se){case"selected":e.selected=!1;break;default:rt(e,t,Se,null,n,I)}for(R in n)if(I=n[R],ae=a[R],n.hasOwnProperty(R)&&I!==ae&&(I!=null||ae!=null))switch(R){case"selected":e.selected=I&&typeof I!="function"&&typeof I!="symbol";break;default:rt(e,t,R,I,n,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in a)I=a[Re],a.hasOwnProperty(Re)&&I!=null&&!n.hasOwnProperty(Re)&&rt(e,t,Re,null,n,I);for(W in n)if(I=n[W],ae=a[W],n.hasOwnProperty(W)&&I!==ae&&(I!=null||ae!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(137,t));break;default:rt(e,t,W,I,n,ae)}return;default:if(Zs(t)){for(var it in a)I=a[it],a.hasOwnProperty(it)&&I!==void 0&&!n.hasOwnProperty(it)&&Vd(e,t,it,void 0,n,I);for(se in n)I=n[se],ae=a[se],!n.hasOwnProperty(se)||I===ae||I===void 0&&ae===void 0||Vd(e,t,se,I,n,ae);return}}for(var G in a)I=a[G],a.hasOwnProperty(G)&&I!=null&&!n.hasOwnProperty(G)&&rt(e,t,G,null,n,I);for(ue in n)I=n[ue],ae=a[ue],!n.hasOwnProperty(ue)||I===ae||I==null&&ae==null||rt(e,t,ue,I,n,ae)}function u0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zy(){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,g=i.initiatorType,N=i.duration;if(c&&N&&u0(g)){for(g=0,N=i.responseEnd,n+=1;n<a.length;n++){var R=a[n],W=R.startTime;if(W>N)break;var se=R.transferSize,ue=R.initiatorType;se&&u0(ue)&&(R=R.responseEnd,g+=se*(R<N?1:(N-W)/(R-W)))}if(--n,t+=8*(c+g)/(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 Bd=null,Yd=null;function Sc(e){return e.nodeType===9?e:e.ownerDocument}function c0(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 o0(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 $d(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 Gd=null;function Fy(){var e=window.event;return e&&e.type==="popstate"?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var d0=typeof setTimeout=="function"?setTimeout:void 0,Qy=typeof clearTimeout=="function"?clearTimeout:void 0,f0=typeof Promise=="function"?Promise:void 0,Wy=typeof queueMicrotask=="function"?queueMicrotask:typeof f0<"u"?function(e){return f0.resolve(null).then(e).catch(Xy)}:d0;function Xy(e){setTimeout(function(){throw e})}function _l(e){return e==="head"}function h0(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")Di(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Di(a);for(var c=a.firstChild;c;){var g=c.nextSibling,N=c.nodeName;c[Zl]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=g}}else a==="body"&&Di(e.ownerDocument.body);a=i}while(a);Tr(t)}function m0(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 Zd(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":Zd(a),Bs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Jy(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[Zl])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=Ya(e.nextSibling),e===null)break}return null}function Iy(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ya(e.nextSibling),e===null))return null;return e}function x0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ya(e.nextSibling),e===null))return null;return e}function Fd(e){return e.data==="$?"||e.data==="$~"}function Qd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ky(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 Ya(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 Wd=null;function g0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ya(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function y0(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 v0(e,t,a){switch(t=Sc(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 Di(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Bs(e)}var $a=new Map,p0=new Set;function Nc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var $n=re.d;re.d={f:Py,r:ev,D:tv,C:av,L:nv,m:lv,X:rv,S:sv,M:iv};function Py(){var e=$n.f(),t=hc();return e||t}function ev(e){var t=Oe(e);t!==null&&t.tag===5&&t.type==="form"?Uh(t):$n.r(e)}var jr=typeof document>"u"?null:document;function b0(e,t,a){var n=jr;if(n&&typeof t=="string"&&t){var i=Zt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),p0.has(i)||(p0.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),Jt(t,"link",e),Ct(t),n.head.appendChild(t)))}}function tv(e){$n.D(e),b0("dns-prefetch",e,null)}function av(e,t){$n.C(e,t),b0("preconnect",e,t)}function nv(e,t,a){$n.L(e,t,a);var n=jr;if(n&&e&&t){var i='link[rel="preload"][as="'+Zt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+Zt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+Zt(a.imageSizes)+'"]')):i+='[href="'+Zt(e)+'"]';var c=i;switch(t){case"style":c=Er(e);break;case"script":c=Mr(e)}$a.has(c)||(e=E({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),$a.set(c,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(Ri(c))||t==="script"&&n.querySelector(_i(c))||(t=n.createElement("link"),Jt(t,"link",e),Ct(t),n.head.appendChild(t)))}}function lv(e,t){$n.m(e,t);var a=jr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Zt(n)+'"][href="'+Zt(e)+'"]',c=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Mr(e)}if(!$a.has(c)&&(e=E({rel:"modulepreload",href:e},t),$a.set(c,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(_i(c)))return}n=a.createElement("link"),Jt(n,"link",e),Ct(n),a.head.appendChild(n)}}}function sv(e,t,a){$n.S(e,t,a);var n=jr;if(n&&e){var i=Wa(n).hoistableStyles,c=Er(e);t=t||"default";var g=i.get(c);if(!g){var N={loading:0,preload:null};if(g=n.querySelector(Ri(c)))N.loading=5;else{e=E({rel:"stylesheet",href:e,"data-precedence":t},a),(a=$a.get(c))&&Xd(e,a);var R=g=n.createElement("link");Ct(R),Jt(R,"link",e),R._p=new Promise(function(W,se){R.onload=W,R.onerror=se}),R.addEventListener("load",function(){N.loading|=1}),R.addEventListener("error",function(){N.loading|=2}),N.loading|=4,wc(g,t,n)}g={type:"stylesheet",instance:g,count:1,state:N},i.set(c,g)}}}function rv(e,t){$n.X(e,t);var a=jr;if(a&&e){var n=Wa(a).hoistableScripts,i=Mr(e),c=n.get(i);c||(c=a.querySelector(_i(i)),c||(e=E({src:e,async:!0},t),(t=$a.get(i))&&Jd(e,t),c=a.createElement("script"),Ct(c),Jt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function iv(e,t){$n.M(e,t);var a=jr;if(a&&e){var n=Wa(a).hoistableScripts,i=Mr(e),c=n.get(i);c||(c=a.querySelector(_i(i)),c||(e=E({src:e,async:!0,type:"module"},t),(t=$a.get(i))&&Jd(e,t),c=a.createElement("script"),Ct(c),Jt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function S0(e,t,a,n){var i=(i=ve.current)?Nc(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=Wa(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=Wa(i).hoistableStyles,g=c.get(e);if(g||(i=i.ownerDocument||i,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,g),(c=i.querySelector(Ri(e)))&&!c._p&&(g.instance=c,g.state.loading=5),$a.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},$a.set(e,a),c||uv(i,e,a,g.state))),t&&n===null)throw Error(o(528,""));return g}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=Wa(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="'+Zt(e)+'"'}function Ri(e){return'link[rel="stylesheet"]['+e+"]"}function N0(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function uv(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}),Jt(t,"link",a),Ct(t),e.head.appendChild(t))}function Mr(e){return'[src="'+Zt(e)+'"]'}function _i(e){return"script[async]"+e}function w0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Zt(a.href)+'"]');if(n)return t.instance=n,Ct(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"),Ct(n),Jt(n,"style",i),wc(n,a.precedence,e),t.instance=n;case"stylesheet":i=Er(a.href);var c=e.querySelector(Ri(i));if(c)return t.state.loading|=4,t.instance=c,Ct(c),c;n=N0(a),(i=$a.get(i))&&Xd(n,i),c=(e.ownerDocument||e).createElement("link"),Ct(c);var g=c;return g._p=new Promise(function(N,R){g.onload=N,g.onerror=R}),Jt(c,"link",n),t.state.loading|=4,wc(c,a.precedence,e),t.instance=c;case"script":return c=Mr(a.src),(i=e.querySelector(_i(c)))?(t.instance=i,Ct(i),i):(n=a,(i=$a.get(c))&&(n=E({},a),Jd(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ct(i),Jt(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,wc(n,a.precedence,e));return t.instance}function wc(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,g=0;g<n.length;g++){var N=n[g];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 Xd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Jd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var jc=null;function j0(e,t,a){if(jc===null){var n=new Map,i=jc=new Map;i.set(a,n)}else i=jc,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[Zl]||c[Nt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var g=c.getAttribute(t)||"";g=e+g;var N=n.get(g);N?N.push(c):n.set(g,[c])}}return n}function E0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function cv(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 M0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ov(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(Ri(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ec.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,Ct(c);return}c=t.ownerDocument||t,n=N0(n),(i=$a.get(i))&&Xd(n,i),c=c.createElement("link"),Ct(c);var g=c;g._p=new Promise(function(N,R){g.onload=N,g.onerror=R}),Jt(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=Ec.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Id=0;function dv(e,t){return e.stylesheets&&e.count===0&&Tc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Tc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Id===0&&(Id=62500*Zy());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Tc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Id?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function Ec(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mc=null;function Tc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mc=new Map,t.forEach(fv,e),Mc=null,Ec.call(e))}function fv(e,t){if(!(t.state.loading&4)){var a=Mc.get(e);if(a)var n=a.get(null);else{a=new Map,Mc.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var g=i[c];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),n=g)}n&&a.set(null,n)}i=t.instance,g=i.getAttribute("data-precedence"),c=a.get(g)||n,c===n&&a.set(null,i),a.set(g,i),this.count++,n=Ec.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 Ai={$$typeof:J,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function hv(e,t,a,n,i,c,g,N,R){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=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function T0(e,t,a,n,i,c,g,N,R,W,se,ue){return e=new hv(e,t,a,g,R,W,se,ue,N),t=1,c===!0&&(t|=24),c=Qt(3,null,null,t),e.current=c,c.stateNode=e,t=Do(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},ko(c),e}function C0(e){return e?(e=ba,e):ba}function O0(e,t,a,n,i,c){i=C0(i),n.context===null?n.context=i:n.pendingContext=i,n=Sl(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=Nl(e,n,t),a!==null&&(ya(a,e,t),di(a,e,t))}function D0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Kd(e,t){D0(e,t),(e=e.alternate)&&D0(e,t)}function R0(e){if(e.tag===13||e.tag===31){var t=za(e,67108864);t!==null&&ya(t,e,67108864),Kd(e,67108864)}}function _0(e){if(e.tag===13||e.tag===31){var t=Ea();t=qs(t);var a=za(e,t);a!==null&&ya(a,e,t),Kd(e,t)}}var Cc=!0;function mv(e,t,a,n){var i=Z.T;Z.T=null;var c=re.p;try{re.p=2,Pd(e,t,a,n)}finally{re.p=c,Z.T=i}}function xv(e,t,a,n){var i=Z.T;Z.T=null;var c=re.p;try{re.p=8,Pd(e,t,a,n)}finally{re.p=c,Z.T=i}}function Pd(e,t,a,n){if(Cc){var i=ef(n);if(i===null)qd(e,t,n,Oc,a),k0(e,n);else if(yv(i,e,t,a,n))n.stopPropagation();else if(k0(e,n),t&4&&-1<gv.indexOf(e)){for(;i!==null;){var c=Oe(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var g=cn(c.pendingLanes);if(g!==0){var N=c;for(N.pendingLanes|=2,N.entangledLanes|=2;g;){var R=1<<31-$t(g);N.entanglements[1]|=R,g&=~R}vn(c),(Pe&6)===0&&(dc=Ht()+500,Ti(0))}}break;case 31:case 13:N=za(c,2),N!==null&&ya(N,c,2),hc(),Kd(c,2)}if(c=ef(n),c===null&&qd(e,t,n,Oc,a),c===i)break;i=c}i!==null&&n.stopPropagation()}else qd(e,t,n,null,a)}}function ef(e){return e=Fs(e),tf(e)}var Oc=null;function tf(e){if(Oc=null,e=Nn(e),e!==null){var t=m(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=y(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 Oc=e,null}function A0(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(me()){case Le:return 2;case Lt:return 8;case un:case Us:return 32;case Yl:return 268435456;default:return 32}default:return 32}}var af=!1,Al=null,kl=null,zl=null,ki=new Map,zi=new Map,Ul=[],gv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function k0(e,t){switch(e){case"focusin":case"focusout":Al=null;break;case"dragenter":case"dragleave":kl=null;break;case"mouseover":case"mouseout":zl=null;break;case"pointerover":case"pointerout":ki.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zi.delete(t.pointerId)}}function Ui(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=Oe(t),t!==null&&R0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function yv(e,t,a,n,i){switch(t){case"focusin":return Al=Ui(Al,e,t,a,n,i),!0;case"dragenter":return kl=Ui(kl,e,t,a,n,i),!0;case"mouseover":return zl=Ui(zl,e,t,a,n,i),!0;case"pointerover":var c=i.pointerId;return ki.set(c,Ui(ki.get(c)||null,e,t,a,n,i)),!0;case"gotpointercapture":return c=i.pointerId,zi.set(c,Ui(zi.get(c)||null,e,t,a,n,i)),!0}return!1}function z0(e){var t=Nn(e.target);if(t!==null){var a=m(t);if(a!==null){if(t=a.tag,t===13){if(t=y(a),t!==null){e.blockedOn=t,Lr(e.priority,function(){_0(a)});return}}else if(t===31){if(t=j(a),t!==null){e.blockedOn=t,Lr(e.priority,function(){_0(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 Dc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ef(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);$r=n,a.target.dispatchEvent(n),$r=null}else return t=Oe(a),t!==null&&R0(t),e.blockedOn=a,!1;t.shift()}return!0}function U0(e,t,a){Dc(e)&&a.delete(t)}function vv(){af=!1,Al!==null&&Dc(Al)&&(Al=null),kl!==null&&Dc(kl)&&(kl=null),zl!==null&&Dc(zl)&&(zl=null),ki.forEach(U0),zi.forEach(U0)}function Rc(e,t){e.blockedOn===t&&(e.blockedOn=null,af||(af=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,vv)))}var _c=null;function H0(e){_c!==e&&(_c=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){_c===e&&(_c=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(tf(n||a)===null)continue;break}var c=Oe(a);c!==null&&(e.splice(t,3),t-=3,ed(c,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function Tr(e){function t(R){return Rc(R,e)}Al!==null&&Rc(Al,e),kl!==null&&Rc(kl,e),zl!==null&&Rc(zl,e),ki.forEach(t),zi.forEach(t);for(var a=0;a<Ul.length;a++){var n=Ul[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Ul.length&&(a=Ul[0],a.blockedOn===null);)z0(a),a.blockedOn===null&&Ul.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],g=i[kt]||null;if(typeof c=="function")g||H0(a);else if(g){var N=null;if(c&&c.hasAttribute("formAction")){if(i=c,g=c[kt]||null)N=g.formAction;else if(tf(i)!==null)continue}else N=g.action;typeof N=="function"?a[n+1]=N:(a.splice(n,3),n-=3),H0(a)}}}function L0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(g){return i=g})},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 nf(e){this._internalRoot=e}Ac.prototype.render=nf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Ea();O0(a,n,e,t,null,null)},Ac.prototype.unmount=nf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;O0(e.current,2,null,e,null,null),hc(),t[Sn]=null}};function Ac(e){this._internalRoot=e}Ac.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ul.length&&t!==0&&t<Ul[a].priority;a++);Ul.splice(a,0,e),a===0&&z0(e)}};var q0=u.version;if(q0!=="19.2.4")throw Error(o(527,q0,"19.2.4"));re.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 pv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var kc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kc.isDisabled&&kc.supportsFiber)try{pt=kc.inject(pv),Pt=kc}catch{}}return Li.createRoot=function(e,t){if(!x(e))throw Error(o(299));var a=!1,n="",i=Fh,c=Qh,g=Wh;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&&(g=t.onRecoverableError)),t=T0(e,1,!1,null,null,a,n,null,i,c,g,L0),e[Sn]=t.current,Ld(e),new nf(t)},Li.hydrateRoot=function(e,t,a){if(!x(e))throw Error(o(299));var n=!1,i="",c=Fh,g=Qh,N=Wh,R=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&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),t=T0(e,1,!0,t,a??null,n,i,R,c,g,N,L0),t.context=C0(null),a=t.current,n=Ea(),n=qs(n),i=Sl(n),i.callback=null,Nl(a,i,n),a=n,t.current.lanes=a,ll(t,a),vn(t),e[Sn]=t.current,Ld(e),new Ac(t)},Li.version="19.2.4",Li}var I0;function _v(){if(I0)return uf.exports;I0=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),uf.exports=Rv(),uf.exports}var Av=_v();const kv=Vx(Av);/**
|
|
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 K0="popstate";function zv(l={}){function u(x,m){let{pathname:y="/",search:j="",hash:b=""}=_s(x.location.hash.substring(1));return!y.startsWith("/")&&!y.startsWith(".")&&(y="/"+y),wf("",{pathname:y,search:j,hash:b},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function d(x,m){let y=x.document.querySelector("base"),j="";if(y&&y.getAttribute("href")){let b=x.location.href,p=b.indexOf("#");j=p===-1?b:b.slice(0,p)}return j+"#"+(typeof m=="string"?m:Pi(m))}function o(x,m){Ga(x.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return Hv(u,d,o,l)}function gt(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function Ga(l,u){if(!l){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Uv(){return Math.random().toString(36).substring(2,10)}function P0(l,u){return{usr:l.state,key:l.key,idx:u}}function wf(l,u,d=null,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof u=="string"?_s(u):u,state:d,key:u&&u.key||o||Uv()}}function Pi({pathname:l="/",search:u="",hash:d=""}){return u&&u!=="?"&&(l+=u.charAt(0)==="?"?u:"?"+u),d&&d!=="#"&&(l+=d.charAt(0)==="#"?d:"#"+d),l}function _s(l){let u={};if(l){let d=l.indexOf("#");d>=0&&(u.hash=l.substring(d),l=l.substring(0,d));let o=l.indexOf("?");o>=0&&(u.search=l.substring(o),l=l.substring(0,o)),l&&(u.pathname=l)}return u}function Hv(l,u,d,o={}){let{window:x=document.defaultView,v5Compat:m=!1}=o,y=x.history,j="POP",b=null,p=w();p==null&&(p=0,y.replaceState({...y.state,idx:p},""));function w(){return(y.state||{idx:null}).idx}function E(){j="POP";let C=w(),Y=C==null?null:C-p;p=C,b&&b({action:j,location:M.location,delta:Y})}function _(C,Y){j="PUSH";let K=wf(M.location,C,Y);d&&d(K,C),p=w()+1;let J=P0(K,p),ne=M.createHref(K);try{y.pushState(J,"",ne)}catch(le){if(le instanceof DOMException&&le.name==="DataCloneError")throw le;x.location.assign(ne)}m&&b&&b({action:j,location:M.location,delta:1})}function k(C,Y){j="REPLACE";let K=wf(M.location,C,Y);d&&d(K,C),p=w();let J=P0(K,p),ne=M.createHref(K);y.replaceState(J,"",ne),m&&b&&b({action:j,location:M.location,delta:0})}function D(C){return Lv(C)}let M={get action(){return j},get location(){return l(x,y)},listen(C){if(b)throw new Error("A history only accepts one active listener");return x.addEventListener(K0,E),b=C,()=>{x.removeEventListener(K0,E),b=null}},createHref(C){return u(x,C)},createURL:D,encodeLocation(C){let Y=D(C);return{pathname:Y.pathname,search:Y.search,hash:Y.hash}},push:_,replace:k,go(C){return y.go(C)}};return M}function Lv(l,u=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),gt(d,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:Pi(l);return o=o.replace(/ $/,"%20"),!u&&o.startsWith("//")&&(o=d+o),new URL(o,d)}function Bx(l,u,d="/"){return qv(l,u,d,!1)}function qv(l,u,d,o){let x=typeof u=="string"?_s(u):u,m=Wn(x.pathname||"/",d);if(m==null)return null;let y=Yx(l);Vv(y);let j=null;for(let b=0;j==null&&b<y.length;++b){let p=Iv(m);j=Xv(y[b],p,o)}return j}function Yx(l,u=[],d=[],o="",x=!1){let m=(y,j,b=x,p)=>{let w={relativePath:p===void 0?y.path||"":p,caseSensitive:y.caseSensitive===!0,childrenIndex:j,route:y};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(o)&&b)return;gt(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=Qn([o,w.relativePath]),_=d.concat(w);y.children&&y.children.length>0&&(gt(y.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),Yx(y.children,u,_,E,b)),!(y.path==null&&!y.index)&&u.push({path:E,score:Qv(E,y.index),routesMeta:_})};return l.forEach((y,j)=>{var b;if(y.path===""||!((b=y.path)!=null&&b.includes("?")))m(y,j);else for(let p of $x(y.path))m(y,j,!0,p)}),u}function $x(l){let u=l.split("/");if(u.length===0)return[];let[d,...o]=u,x=d.endsWith("?"),m=d.replace(/\?$/,"");if(o.length===0)return x?[m,""]:[m];let y=$x(o.join("/")),j=[];return j.push(...y.map(b=>b===""?m:[m,b].join("/"))),x&&j.push(...y),j.map(b=>l.startsWith("/")&&b===""?"/":b)}function Vv(l){l.sort((u,d)=>u.score!==d.score?d.score-u.score:Wv(u.routesMeta.map(o=>o.childrenIndex),d.routesMeta.map(o=>o.childrenIndex)))}var Bv=/^:[\w-]+$/,Yv=3,$v=2,Gv=1,Zv=10,Fv=-2,ex=l=>l==="*";function Qv(l,u){let d=l.split("/"),o=d.length;return d.some(ex)&&(o+=Fv),u&&(o+=$v),d.filter(x=>!ex(x)).reduce((x,m)=>x+(Bv.test(m)?Yv:m===""?Gv:Zv),o)}function Wv(l,u){return l.length===u.length&&l.slice(0,-1).every((o,x)=>o===u[x])?l[l.length-1]-u[u.length-1]:0}function Xv(l,u,d=!1){let{routesMeta:o}=l,x={},m="/",y=[];for(let j=0;j<o.length;++j){let b=o[j],p=j===o.length-1,w=m==="/"?u:u.slice(m.length)||"/",E=Gc({path:b.relativePath,caseSensitive:b.caseSensitive,end:p},w),_=b.route;if(!E&&p&&d&&!o[o.length-1].route.index&&(E=Gc({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},w)),!E)return null;Object.assign(x,E.params),y.push({params:x,pathname:Qn([m,E.pathname]),pathnameBase:tp(Qn([m,E.pathnameBase])),route:_}),E.pathnameBase!=="/"&&(m=Qn([m,E.pathnameBase]))}return y}function Gc(l,u){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[d,o]=Jv(l.path,l.caseSensitive,l.end),x=u.match(d);if(!x)return null;let m=x[0],y=m.replace(/(.)\/+$/,"$1"),j=x.slice(1);return{params:o.reduce((p,{paramName:w,isOptional:E},_)=>{if(w==="*"){let D=j[_]||"";y=m.slice(0,m.length-D.length).replace(/(.)\/+$/,"$1")}const k=j[_];return E&&!k?p[w]=void 0:p[w]=(k||"").replace(/%2F/g,"/"),p},{}),pathname:m,pathnameBase:y,pattern:l}}function Jv(l,u=!1,d=!0){Ga(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let o=[],x="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(y,j,b)=>(o.push({paramName:j,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(o.push({paramName:"*"}),x+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?x+="\\/*$":l!==""&&l!=="/"&&(x+="(?:(?=\\/|$))"),[new RegExp(x,u?void 0:"i"),o]}function Iv(l){try{return l.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Ga(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),l}}function Wn(l,u){if(u==="/")return l;if(!l.toLowerCase().startsWith(u.toLowerCase()))return null;let d=u.endsWith("/")?u.length-1:u.length,o=l.charAt(d);return o&&o!=="/"?null:l.slice(d)||"/"}var Kv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Pv(l,u="/"){let{pathname:d,search:o="",hash:x=""}=typeof l=="string"?_s(l):l,m;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?m=tx(d.substring(1),"/"):m=tx(d,u)):m=u,{pathname:m,search:ap(o),hash:np(x)}}function tx(l,u){let d=u.replace(/\/+$/,"").split("/");return l.split("/").forEach(x=>{x===".."?d.length>1&&d.pop():x!=="."&&d.push(x)}),d.length>1?d.join("/"):"/"}function ff(l,u,d,o){return`Cannot include a '${l}' 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 ep(l){return l.filter((u,d)=>d===0||u.route.path&&u.route.path.length>0)}function _f(l){let u=ep(l);return u.map((d,o)=>o===u.length-1?d.pathname:d.pathnameBase)}function Af(l,u,d,o=!1){let x;typeof l=="string"?x=_s(l):(x={...l},gt(!x.pathname||!x.pathname.includes("?"),ff("?","pathname","search",x)),gt(!x.pathname||!x.pathname.includes("#"),ff("#","pathname","hash",x)),gt(!x.search||!x.search.includes("#"),ff("#","search","hash",x)));let m=l===""||x.pathname==="",y=m?"/":x.pathname,j;if(y==null)j=d;else{let E=u.length-1;if(!o&&y.startsWith("..")){let _=y.split("/");for(;_[0]==="..";)_.shift(),E-=1;x.pathname=_.join("/")}j=E>=0?u[E]:"/"}let b=Pv(x,j),p=y&&y!=="/"&&y.endsWith("/"),w=(m||y===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(p||w)&&(b.pathname+="/"),b}var Qn=l=>l.join("/").replace(/\/\/+/g,"/"),tp=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),ap=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,np=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,lp=class{constructor(l,u,d,o=!1){this.status=l,this.statusText=u||"",this.internal=o,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function sp(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function rp(l){return l.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Gx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Zx(l,u){let d=l;if(typeof d!="string"||!Kv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let o=d,x=!1;if(Gx)try{let m=new URL(window.location.href),y=d.startsWith("//")?new URL(m.protocol+d):new URL(d),j=Wn(y.pathname,u);y.origin===m.origin&&j!=null?d=j+y.search+y.hash:x=!0}catch{Ga(!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:x,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Fx=["POST","PUT","PATCH","DELETE"];new Set(Fx);var ip=["GET",...Fx];new Set(ip);var Ar=V.createContext(null);Ar.displayName="DataRouter";var Xc=V.createContext(null);Xc.displayName="DataRouterState";var up=V.createContext(!1),Qx=V.createContext({isTransitioning:!1});Qx.displayName="ViewTransition";var cp=V.createContext(new Map);cp.displayName="Fetchers";var op=V.createContext(null);op.displayName="Await";var Da=V.createContext(null);Da.displayName="Navigation";var au=V.createContext(null);au.displayName="Location";var bn=V.createContext({outlet:null,matches:[],isDataRoute:!1});bn.displayName="Route";var kf=V.createContext(null);kf.displayName="RouteError";var Wx="REACT_ROUTER_ERROR",dp="REDIRECT",fp="ROUTE_ERROR_RESPONSE";function hp(l){if(l.startsWith(`${Wx}:${dp}:{`))try{let u=JSON.parse(l.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 mp(l){if(l.startsWith(`${Wx}:${fp}:{`))try{let u=JSON.parse(l.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new lp(u.status,u.statusText,u.data)}catch{}}function xp(l,{relative:u}={}){gt(kr(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:o}=V.useContext(Da),{hash:x,pathname:m,search:y}=nu(l,{relative:u}),j=m;return d!=="/"&&(j=m==="/"?d:Qn([d,m])),o.createHref({pathname:j,search:y,hash:x})}function kr(){return V.useContext(au)!=null}function Xn(){return gt(kr(),"useLocation() may be used only in the context of a <Router> component."),V.useContext(au).location}var Xx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jx(l){V.useContext(Da).static||V.useLayoutEffect(l)}function Jc(){let{isDataRoute:l}=V.useContext(bn);return l?Cp():gp()}function gp(){gt(kr(),"useNavigate() may be used only in the context of a <Router> component.");let l=V.useContext(Ar),{basename:u,navigator:d}=V.useContext(Da),{matches:o}=V.useContext(bn),{pathname:x}=Xn(),m=JSON.stringify(_f(o)),y=V.useRef(!1);return Jx(()=>{y.current=!0}),V.useCallback((b,p={})=>{if(Ga(y.current,Xx),!y.current)return;if(typeof b=="number"){d.go(b);return}let w=Af(b,JSON.parse(m),x,p.relative==="path");l==null&&u!=="/"&&(w.pathname=w.pathname==="/"?u:Qn([u,w.pathname])),(p.replace?d.replace:d.push)(w,p.state,p)},[u,d,m,x,l])}V.createContext(null);function nu(l,{relative:u}={}){let{matches:d}=V.useContext(bn),{pathname:o}=Xn(),x=JSON.stringify(_f(d));return V.useMemo(()=>Af(l,JSON.parse(x),o,u==="path"),[l,x,o,u])}function yp(l,u){return Ix(l,u)}function Ix(l,u,d,o,x){var K;gt(kr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:m}=V.useContext(Da),{matches:y}=V.useContext(bn),j=y[y.length-1],b=j?j.params:{},p=j?j.pathname:"/",w=j?j.pathnameBase:"/",E=j&&j.route;{let J=E&&E.path||"";Px(p,!E||J.endsWith("*")||J.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${J}">) 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="${J}"> to <Route path="${J==="/"?"*":`${J}/*`}">.`)}let _=Xn(),k;if(u){let J=typeof u=="string"?_s(u):u;gt(w==="/"||((K=J.pathname)==null?void 0:K.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 "${J.pathname}" was given in the \`location\` prop.`),k=J}else k=_;let D=k.pathname||"/",M=D;if(w!=="/"){let J=w.replace(/^\//,"").split("/");M="/"+D.replace(/^\//,"").split("/").slice(J.length).join("/")}let C=Bx(l,{pathname:M});Ga(E||C!=null,`No routes matched location "${k.pathname}${k.search}${k.hash}" `),Ga(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${k.pathname}${k.search}${k.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 Y=Np(C&&C.map(J=>Object.assign({},J,{params:Object.assign({},b,J.params),pathname:Qn([w,m.encodeLocation?m.encodeLocation(J.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:J.pathname]),pathnameBase:J.pathnameBase==="/"?w:Qn([w,m.encodeLocation?m.encodeLocation(J.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:J.pathnameBase])})),y,d,o,x);return u&&Y?V.createElement(au.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...k},navigationType:"POP"}},Y):Y}function vp(){let l=Tp(),u=sp(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),d=l instanceof Error?l.stack:null,o="rgba(200,200,200, 0.5)",x={padding:"0.5rem",backgroundColor:o},m={padding:"2px 4px",backgroundColor:o},y=null;return console.error("Error handled by React Router default ErrorBoundary:",l),y=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:m},"ErrorBoundary")," or"," ",V.createElement("code",{style:m},"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:x},d):null,y)}var pp=V.createElement(vp,null),Kx=class extends V.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,u){return u.location!==l.location||u.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:u.error,location:u.location,revalidation:l.revalidation||u.revalidation}}componentDidCatch(l,u){this.props.onError?this.props.onError(l,u):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const d=mp(l.digest);d&&(l=d)}let u=l!==void 0?V.createElement(bn.Provider,{value:this.props.routeContext},V.createElement(kf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?V.createElement(bp,{error:l},u):u}};Kx.contextType=up;var hf=new WeakMap;function bp({children:l,error:u}){let{basename:d}=V.useContext(Da);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let o=hp(u.digest);if(o){let x=hf.get(u);if(x)throw x;let m=Zx(o.location,d);if(Gx&&!hf.get(u))if(m.isExternal||o.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const y=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:o.replace}));throw hf.set(u,y),y}return V.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return l}function Sp({routeContext:l,match:u,children:d}){let o=V.useContext(Ar);return o&&o.static&&o.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=u.route.id),V.createElement(bn.Provider,{value:l},d)}function Np(l,u=[],d=null,o=null,x=null){if(l==null){if(!d)return null;if(d.errors)l=d.matches;else if(u.length===0&&!d.initialized&&d.matches.length>0)l=d.matches;else return null}let m=l,y=d==null?void 0:d.errors;if(y!=null){let w=m.findIndex(E=>E.route.id&&(y==null?void 0:y[E.route.id])!==void 0);gt(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(y).join(",")}`),m=m.slice(0,Math.min(m.length,w+1))}let j=!1,b=-1;if(d)for(let w=0;w<m.length;w++){let E=m[w];if((E.route.HydrateFallback||E.route.hydrateFallbackElement)&&(b=w),E.route.id){let{loaderData:_,errors:k}=d,D=E.route.loader&&!_.hasOwnProperty(E.route.id)&&(!k||k[E.route.id]===void 0);if(E.route.lazy||D){j=!0,b>=0?m=m.slice(0,b+1):m=[m[0]];break}}}let p=d&&o?(w,E)=>{var _,k;o(w,{location:d.location,params:((k=(_=d.matches)==null?void 0:_[0])==null?void 0:k.params)??{},unstable_pattern:rp(d.matches),errorInfo:E})}:void 0;return m.reduceRight((w,E,_)=>{let k,D=!1,M=null,C=null;d&&(k=y&&E.route.id?y[E.route.id]:void 0,M=E.route.errorElement||pp,j&&(b<0&&_===0?(Px("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),D=!0,C=null):b===_&&(D=!0,C=E.route.hydrateFallbackElement||null)));let Y=u.concat(m.slice(0,_+1)),K=()=>{let J;return k?J=M:D?J=C:E.route.Component?J=V.createElement(E.route.Component,null):E.route.element?J=E.route.element:J=w,V.createElement(Sp,{match:E,routeContext:{outlet:w,matches:Y,isDataRoute:d!=null},children:J})};return d&&(E.route.ErrorBoundary||E.route.errorElement||_===0)?V.createElement(Kx,{location:d.location,revalidation:d.revalidation,component:M,error:k,children:K(),routeContext:{outlet:null,matches:Y,isDataRoute:!0},onError:p}):K()},null)}function zf(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wp(l){let u=V.useContext(Ar);return gt(u,zf(l)),u}function jp(l){let u=V.useContext(Xc);return gt(u,zf(l)),u}function Ep(l){let u=V.useContext(bn);return gt(u,zf(l)),u}function Uf(l){let u=Ep(l),d=u.matches[u.matches.length-1];return gt(d.route.id,`${l} can only be used on routes that contain a unique "id"`),d.route.id}function Mp(){return Uf("useRouteId")}function Tp(){var o;let l=V.useContext(kf),u=jp("useRouteError"),d=Uf("useRouteError");return l!==void 0?l:(o=u.errors)==null?void 0:o[d]}function Cp(){let{router:l}=wp("useNavigate"),u=Uf("useNavigate"),d=V.useRef(!1);return Jx(()=>{d.current=!0}),V.useCallback(async(x,m={})=>{Ga(d.current,Xx),d.current&&(typeof x=="number"?await l.navigate(x):await l.navigate(x,{fromRouteId:u,...m}))},[l,u])}var ax={};function Px(l,u,d){!u&&!ax[l]&&(ax[l]=!0,Ga(!1,d))}V.memo(Op);function Op({routes:l,future:u,state:d,onError:o}){return Ix(l,void 0,d,o,u)}function Dp({to:l,replace:u,state:d,relative:o}){gt(kr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:x}=V.useContext(Da);Ga(!x,"<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:m}=V.useContext(bn),{pathname:y}=Xn(),j=Jc(),b=Af(l,_f(m),y,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 Zn(l){gt(!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 Rp({basename:l="/",children:u=null,location:d,navigationType:o="POP",navigator:x,static:m=!1,unstable_useTransitions:y}){gt(!kr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let j=l.replace(/^\/*/,"/"),b=V.useMemo(()=>({basename:j,navigator:x,static:m,unstable_useTransitions:y,future:{}}),[j,x,m,y]);typeof d=="string"&&(d=_s(d));let{pathname:p="/",search:w="",hash:E="",state:_=null,key:k="default"}=d,D=V.useMemo(()=>{let M=Wn(p,j);return M==null?null:{location:{pathname:M,search:w,hash:E,state:_,key:k},navigationType:o}},[j,p,w,E,_,k,o]);return Ga(D!=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.`),D==null?null:V.createElement(Da.Provider,{value:b},V.createElement(au.Provider,{children:u,value:D}))}function _p({children:l,location:u}){return yp(jf(l),u)}function jf(l,u=[]){let d=[];return V.Children.forEach(l,(o,x)=>{if(!V.isValidElement(o))return;let m=[...u,x];if(o.type===V.Fragment){d.push.apply(d,jf(o.props.children,m));return}gt(o.type===Zn,`[${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>`),gt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let y={id:o.props.id||m.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&&(y.children=jf(o.props.children,m)),d.push(y)}),d}var Vc="get",Bc="application/x-www-form-urlencoded";function Ic(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function Ap(l){return Ic(l)&&l.tagName.toLowerCase()==="button"}function kp(l){return Ic(l)&&l.tagName.toLowerCase()==="form"}function zp(l){return Ic(l)&&l.tagName.toLowerCase()==="input"}function Up(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Hp(l,u){return l.button===0&&(!u||u==="_self")&&!Up(l)}var zc=null;function Lp(){if(zc===null)try{new FormData(document.createElement("form"),0),zc=!1}catch{zc=!0}return zc}var qp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function mf(l){return l!=null&&!qp.has(l)?(Ga(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Bc}"`),null):l}function Vp(l,u){let d,o,x,m,y;if(kp(l)){let j=l.getAttribute("action");o=j?Wn(j,u):null,d=l.getAttribute("method")||Vc,x=mf(l.getAttribute("enctype"))||Bc,m=new FormData(l)}else if(Ap(l)||zp(l)&&(l.type==="submit"||l.type==="image")){let j=l.form;if(j==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=l.getAttribute("formaction")||j.getAttribute("action");if(o=b?Wn(b,u):null,d=l.getAttribute("formmethod")||j.getAttribute("method")||Vc,x=mf(l.getAttribute("formenctype"))||mf(j.getAttribute("enctype"))||Bc,m=new FormData(j,l),!Lp()){let{name:p,type:w,value:E}=l;if(w==="image"){let _=p?`${p}.`:"";m.append(`${_}x`,"0"),m.append(`${_}y`,"0")}else p&&m.append(p,E)}}else{if(Ic(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Vc,o=null,x=Bc,y=l}return m&&x==="text/plain"&&(y=m,m=void 0),{action:o,method:d.toLowerCase(),encType:x,formData:m,body:y}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Hf(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function Bp(l,u,d,o){let x=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return d?x.pathname.endsWith("/")?x.pathname=`${x.pathname}_.${o}`:x.pathname=`${x.pathname}.${o}`:x.pathname==="/"?x.pathname=`_root.${o}`:u&&Wn(x.pathname,u)==="/"?x.pathname=`${u.replace(/\/$/,"")}/_root.${o}`:x.pathname=`${x.pathname.replace(/\/$/,"")}.${o}`,x}async function Yp(l,u){if(l.id in u)return u[l.id];try{let d=await import(l.module);return u[l.id]=d,d}catch(d){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $p(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function Gp(l,u,d){let o=await Promise.all(l.map(async x=>{let m=u.routes[x.route.id];if(m){let y=await Yp(m,d);return y.links?y.links():[]}return[]}));return Wp(o.flat(1).filter($p).filter(x=>x.rel==="stylesheet"||x.rel==="preload").map(x=>x.rel==="stylesheet"?{...x,rel:"prefetch",as:"style"}:{...x,rel:"prefetch"}))}function nx(l,u,d,o,x,m){let y=(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 m==="assets"?u.filter((b,p)=>y(b,p)||j(b,p)):m==="data"?u.filter((b,p)=>{var E;let w=o.routes[b.route.id];if(!w||!w.hasLoader)return!1;if(y(b,p)||j(b,p))return!0;if(b.route.shouldRevalidate){let _=b.route.shouldRevalidate({currentUrl:new URL(x.pathname+x.search+x.hash,window.origin),currentParams:((E=d[0])==null?void 0:E.params)||{},nextUrl:new URL(l,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function Zp(l,u,{includeHydrateFallback:d}={}){return Fp(l.map(o=>{let x=u.routes[o.route.id];if(!x)return[];let m=[x.module];return x.clientActionModule&&(m=m.concat(x.clientActionModule)),x.clientLoaderModule&&(m=m.concat(x.clientLoaderModule)),d&&x.hydrateFallbackModule&&(m=m.concat(x.hydrateFallbackModule)),x.imports&&(m=m.concat(x.imports)),m}).flat(1))}function Fp(l){return[...new Set(l)]}function Qp(l){let u={},d=Object.keys(l).sort();for(let o of d)u[o]=l[o];return u}function Wp(l,u){let d=new Set;return new Set(u),l.reduce((o,x)=>{let m=JSON.stringify(Qp(x));return d.has(m)||(d.add(m),o.push({key:m,link:x})),o},[])}function eg(){let l=V.useContext(Ar);return Hf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function Xp(){let l=V.useContext(Xc);return Hf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Lf=V.createContext(void 0);Lf.displayName="FrameworkContext";function tg(){let l=V.useContext(Lf);return Hf(l,"You must render this element inside a <HydratedRouter> element"),l}function Jp(l,u){let d=V.useContext(Lf),[o,x]=V.useState(!1),[m,y]=V.useState(!1),{onFocus:j,onBlur:b,onMouseEnter:p,onMouseLeave:w,onTouchStart:E}=u,_=V.useRef(null);V.useEffect(()=>{if(l==="render"&&y(!0),l==="viewport"){let M=Y=>{Y.forEach(K=>{y(K.isIntersecting)})},C=new IntersectionObserver(M,{threshold:.5});return _.current&&C.observe(_.current),()=>{C.disconnect()}}},[l]),V.useEffect(()=>{if(o){let M=setTimeout(()=>{y(!0)},100);return()=>{clearTimeout(M)}}},[o]);let k=()=>{x(!0)},D=()=>{x(!1),y(!1)};return d?l!=="intent"?[m,_,{}]:[m,_,{onFocus:qi(j,k),onBlur:qi(b,D),onMouseEnter:qi(p,k),onMouseLeave:qi(w,D),onTouchStart:qi(E,k)}]:[!1,_,{}]}function qi(l,u){return d=>{l&&l(d),d.defaultPrevented||u(d)}}function Ip({page:l,...u}){let{router:d}=eg(),o=V.useMemo(()=>Bx(d.routes,l,d.basename),[d.routes,l,d.basename]);return o?V.createElement(Pp,{page:l,matches:o,...u}):null}function Kp(l){let{manifest:u,routeModules:d}=tg(),[o,x]=V.useState([]);return V.useEffect(()=>{let m=!1;return Gp(l,u,d).then(y=>{m||x(y)}),()=>{m=!0}},[l,u,d]),o}function Pp({page:l,matches:u,...d}){let o=Xn(),{future:x,manifest:m,routeModules:y}=tg(),{basename:j}=eg(),{loaderData:b,matches:p}=Xp(),w=V.useMemo(()=>nx(l,u,p,m,o,"data"),[l,u,p,m,o]),E=V.useMemo(()=>nx(l,u,p,m,o,"assets"),[l,u,p,m,o]),_=V.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let M=new Set,C=!1;if(u.forEach(K=>{var ne;let J=m.routes[K.route.id];!J||!J.hasLoader||(!w.some(le=>le.route.id===K.route.id)&&K.route.id in b&&((ne=y[K.route.id])!=null&&ne.shouldRevalidate)||J.hasClientLoader?C=!0:M.add(K.route.id))}),M.size===0)return[];let Y=Bp(l,j,x.unstable_trailingSlashAwareDataRequests,"data");return C&&M.size>0&&Y.searchParams.set("_routes",u.filter(K=>M.has(K.route.id)).map(K=>K.route.id).join(",")),[Y.pathname+Y.search]},[j,x.unstable_trailingSlashAwareDataRequests,b,o,m,w,u,l,y]),k=V.useMemo(()=>Zp(E,m),[E,m]),D=Kp(E);return V.createElement(V.Fragment,null,_.map(M=>V.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...d})),k.map(M=>V.createElement("link",{key:M,rel:"modulepreload",href:M,...d})),D.map(({key:M,link:C})=>V.createElement("link",{key:M,nonce:d.nonce,...C,crossOrigin:C.crossOrigin??d.crossOrigin})))}function eb(...l){return u=>{l.forEach(d=>{typeof d=="function"?d(u):d!=null&&(d.current=u)})}}var tb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{tb&&(window.__reactRouterVersion="7.13.0")}catch{}function ab({basename:l,children:u,unstable_useTransitions:d,window:o}){let x=V.useRef();x.current==null&&(x.current=zv({window:o,v5Compat:!0}));let m=x.current,[y,j]=V.useState({action:m.action,location:m.location}),b=V.useCallback(p=>{d===!1?j(p):V.startTransition(()=>j(p))},[d]);return V.useLayoutEffect(()=>m.listen(b),[m,b]),V.createElement(Rp,{basename:l,children:u,location:y.location,navigationType:y.action,navigator:m,unstable_useTransitions:d})}var ag=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ng=V.forwardRef(function({onClick:u,discover:d="render",prefetch:o="none",relative:x,reloadDocument:m,replace:y,state:j,target:b,to:p,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:_,...k},D){let{basename:M,unstable_useTransitions:C}=V.useContext(Da),Y=typeof p=="string"&&ag.test(p),K=Zx(p,M);p=K.to;let J=xp(p,{relative:x}),[ne,le,fe]=Jp(o,k),P=sb(p,{replace:y,state:j,target:b,preventScrollReset:w,relative:x,viewTransition:E,unstable_defaultShouldRevalidate:_,unstable_useTransitions:C});function F(A){u&&u(A),A.defaultPrevented||P(A)}let $=V.createElement("a",{...k,...fe,href:K.absoluteURL||J,onClick:K.isExternal||m?u:F,ref:eb(D,le),target:b,"data-discover":!Y&&d==="render"?"true":void 0});return ne&&!Y?V.createElement(V.Fragment,null,$,V.createElement(Ip,{page:J})):$});ng.displayName="Link";var lg=V.forwardRef(function({"aria-current":u="page",caseSensitive:d=!1,className:o="",end:x=!1,style:m,to:y,viewTransition:j,children:b,...p},w){let E=nu(y,{relative:p.relative}),_=Xn(),k=V.useContext(Xc),{navigator:D,basename:M}=V.useContext(Da),C=k!=null&&ob(E)&&j===!0,Y=D.encodeLocation?D.encodeLocation(E).pathname:E.pathname,K=_.pathname,J=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;d||(K=K.toLowerCase(),J=J?J.toLowerCase():null,Y=Y.toLowerCase()),J&&M&&(J=Wn(J,M)||J);const ne=Y!=="/"&&Y.endsWith("/")?Y.length-1:Y.length;let le=K===Y||!x&&K.startsWith(Y)&&K.charAt(ne)==="/",fe=J!=null&&(J===Y||!x&&J.startsWith(Y)&&J.charAt(Y.length)==="/"),P={isActive:le,isPending:fe,isTransitioning:C},F=le?u:void 0,$;typeof o=="function"?$=o(P):$=[o,le?"active":null,fe?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let A=typeof m=="function"?m(P):m;return V.createElement(ng,{...p,"aria-current":F,className:$,ref:w,style:A,to:y,viewTransition:j},typeof b=="function"?b(P):b)});lg.displayName="NavLink";var nb=V.forwardRef(({discover:l="render",fetcherKey:u,navigate:d,reloadDocument:o,replace:x,state:m,method:y=Vc,action:j,onSubmit:b,relative:p,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:_,...k},D)=>{let{unstable_useTransitions:M}=V.useContext(Da),C=ub(),Y=cb(j,{relative:p}),K=y.toLowerCase()==="get"?"get":"post",J=typeof j=="string"&&ag.test(j),ne=le=>{if(b&&b(le),le.defaultPrevented)return;le.preventDefault();let fe=le.nativeEvent.submitter,P=(fe==null?void 0:fe.getAttribute("formmethod"))||y,F=()=>C(fe||le.currentTarget,{fetcherKey:u,method:P,navigate:d,replace:x,state:m,relative:p,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:_});M&&d!==!1?V.startTransition(()=>F()):F()};return V.createElement("form",{ref:D,method:K,action:Y,onSubmit:o?b:ne,...k,"data-discover":!J&&l==="render"?"true":void 0})});nb.displayName="Form";function lb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sg(l){let u=V.useContext(Ar);return gt(u,lb(l)),u}function sb(l,{target:u,replace:d,state:o,preventScrollReset:x,relative:m,viewTransition:y,unstable_defaultShouldRevalidate:j,unstable_useTransitions:b}={}){let p=Jc(),w=Xn(),E=nu(l,{relative:m});return V.useCallback(_=>{if(Hp(_,u)){_.preventDefault();let k=d!==void 0?d:Pi(w)===Pi(E),D=()=>p(l,{replace:k,state:o,preventScrollReset:x,relative:m,viewTransition:y,unstable_defaultShouldRevalidate:j});b?V.startTransition(()=>D()):D()}},[w,p,E,d,o,u,l,x,m,y,j,b])}var rb=0,ib=()=>`__${String(++rb)}__`;function ub(){let{router:l}=sg("useSubmit"),{basename:u}=V.useContext(Da),d=Mp(),o=l.fetch,x=l.navigate;return V.useCallback(async(m,y={})=>{let{action:j,method:b,encType:p,formData:w,body:E}=Vp(m,u);if(y.navigate===!1){let _=y.fetcherKey||ib();await o(_,d,y.action||j,{unstable_defaultShouldRevalidate:y.unstable_defaultShouldRevalidate,preventScrollReset:y.preventScrollReset,formData:w,body:E,formMethod:y.method||b,formEncType:y.encType||p,flushSync:y.flushSync})}else await x(y.action||j,{unstable_defaultShouldRevalidate:y.unstable_defaultShouldRevalidate,preventScrollReset:y.preventScrollReset,formData:w,body:E,formMethod:y.method||b,formEncType:y.encType||p,replace:y.replace,state:y.state,fromRouteId:d,flushSync:y.flushSync,viewTransition:y.viewTransition})},[o,x,u,d])}function cb(l,{relative:u}={}){let{basename:d}=V.useContext(Da),o=V.useContext(bn);gt(o,"useFormAction must be used inside a RouteContext");let[x]=o.matches.slice(-1),m={...nu(l||".",{relative:u})},y=Xn();if(l==null){m.search=y.search;let j=new URLSearchParams(m.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();m.search=w?`?${w}`:""}}return(!l||l===".")&&x.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(m.pathname=m.pathname==="/"?d:Qn([d,m.pathname])),Pi(m)}function ob(l,{relative:u}={}){let d=V.useContext(Qx);gt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=sg("useViewTransitionState"),x=nu(l,{relative:u});if(!d.isTransitioning)return!1;let m=Wn(d.currentLocation.pathname,o)||d.currentLocation.pathname,y=Wn(d.nextLocation.pathname,o)||d.nextLocation.pathname;return Gc(x.pathname,y)!=null||Gc(x.pathname,m)!=null}/**
|
|
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 rg=(...l)=>l.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 db=l=>l.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 fb=l=>l.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 lx=l=>{const u=fb(l);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 hb={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 mb=l=>{for(const u in l)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 xb=V.forwardRef(({color:l="currentColor",size:u=24,strokeWidth:d=2,absoluteStrokeWidth:o,className:x="",children:m,iconNode:y,...j},b)=>V.createElement("svg",{ref:b,...hb,width:u,height:u,stroke:l,strokeWidth:o?Number(d)*24/Number(u):d,className:rg("lucide",x),...!m&&!mb(j)&&{"aria-hidden":"true"},...j},[...y.map(([p,w])=>V.createElement(p,w)),...Array.isArray(m)?m:[m]]));/**
|
|
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 Ae=(l,u)=>{const d=V.forwardRef(({className:o,...x},m)=>V.createElement(xb,{ref:m,iconNode:u,className:rg(`lucide-${db(lx(l))}`,`lucide-${l}`,o),...x}));return d.displayName=lx(l),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 gb=[["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"}]],qf=Ae("activity",gb);/**
|
|
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 yb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],vb=Ae("arrow-down",yb);/**
|
|
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 pb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],sx=Ae("arrow-right",pb);/**
|
|
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 bb=[["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"}]],Sb=Ae("arrow-up-down",bb);/**
|
|
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 Nb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],wb=Ae("arrow-up",Nb);/**
|
|
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 jb=[["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"}]],Eb=Ae("bell",jb);/**
|
|
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 Mb=[["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"}]],rx=Ae("briefcase",Mb);/**
|
|
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 Tb=[["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"}]],Zc=Ae("calendar",Tb);/**
|
|
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 Cb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Yc=Ae("check",Cb);/**
|
|
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 Ob=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Db=Ae("chevron-down",Ob);/**
|
|
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 Rb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_b=Ae("chevron-left",Rb);/**
|
|
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 Ab=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],kb=Ae("chevron-right",Ab);/**
|
|
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 zb=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Ub=Ae("chevrons-up-down",zb);/**
|
|
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 Hb=[["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"}]],pn=Ae("circle-alert",Hb);/**
|
|
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 Lb=[["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"}]],ix=Ae("circle-arrow-down",Lb);/**
|
|
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 qb=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],lu=Ae("circle-check-big",qb);/**
|
|
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 Vb=[["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"}]],Ef=Ae("circle-x",Vb);/**
|
|
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 Bb=[["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"}]],ig=Ae("clipboard-list",Bb);/**
|
|
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 Yb=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Fc=Ae("clock",Yb);/**
|
|
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 $b=[["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"}]],ug=Ae("external-link",$b);/**
|
|
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 Gb=[["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"}]],Zb=Ae("eye-off",Gb);/**
|
|
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 Fb=[["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"}]],Qb=Ae("eye",Fb);/**
|
|
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 Wb=[["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"}]],Xb=Ae("file-text",Wb);/**
|
|
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 Jb=[["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"}]],Ib=Ae("git-pull-request",Jb);/**
|
|
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 Kb=[["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"}]],Pb=Ae("hourglass",Kb);/**
|
|
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 e1=[["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"}]],t1=Ae("house",e1);/**
|
|
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 a1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],n1=Ae("info",a1);/**
|
|
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 l1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],s1=Ae("kanban",l1);/**
|
|
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 r1=[["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"}]],i1=Ae("list-ordered",r1);/**
|
|
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 u1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],cg=Ae("loader-circle",u1);/**
|
|
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 c1=[["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"}]],og=Ae("map",c1);/**
|
|
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 o1=[["path",{d:"M5 12h14",key:"1ays0h"}]],d1=Ae("minus",o1);/**
|
|
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 f1=[["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"}]],dg=Ae("pause",f1);/**
|
|
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 h1=[["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"}]],fg=Ae("pen",h1);/**
|
|
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 m1=[["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"}]],Fn=Ae("play",m1);/**
|
|
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 x1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],su=Ae("plus",x1);/**
|
|
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 g1=[["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"}]],y1=Ae("rotate-ccw",g1);/**
|
|
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 v1=[["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"}]],p1=Ae("save",v1);/**
|
|
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 b1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ru=Ae("search",b1);/**
|
|
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 S1=[["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"}]],hg=Ae("settings",S1);/**
|
|
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 N1=[["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"}]],w1=Ae("square-pen",N1);/**
|
|
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 j1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],E1=Ae("terminal",j1);/**
|
|
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 M1=[["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"}]],mg=Ae("test-tube-diagonal",M1);/**
|
|
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 T1=[["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"}]],xg=Ae("trash-2",T1);/**
|
|
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 C1=[["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"}]],O1=Ae("triangle-alert",C1);/**
|
|
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 D1=[["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"}]],R1=Ae("wifi",D1);/**
|
|
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 _1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],iu=Ae("x",_1);/**
|
|
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 A1=[["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"}]],k1=Ae("zap",A1),Vf="";let Bf=!1,Qc=null;function z1(l){Bf=l}function U1(l){Qc=l}function H1(){return Bf}function gg(l){return encodeURIComponent(l.replace(/\//g,"~"))}function yt(l){return Bf&&Qc?l.replace("/api/",`/api/projects/${gg(Qc)}/`):l}function L1(){return ut("/api/mode")}function yg(){return ut("/api/projects")}async function ut(l,u){const d=`${Vf}${l}`,o=await fetch(d,{headers:{"Content-Type":"application/json",...u==null?void 0:u.headers},...u});if(!o.ok){const x=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(x.error||`HTTP ${o.status}: ${o.statusText}`)}return o.json()}function vg(){return ut(yt("/api/status"))}function pg(){return ut(yt("/api/prs"))}function q1(l,u){const d=`?lines=${encodeURIComponent(u)}`;return ut(yt(`/api/logs/${encodeURIComponent(l)}${d}`))}function Yf(){return ut(yt("/api/config"))}async function bg(){if(H1()){const u=(await yg()).filter(o=>o.valid);return(await Promise.all(u.map(async o=>{try{const x=await ut(`/api/projects/${gg(o.name)}/config`);return{projectId:o.name,config:x}}catch(x){return console.error(`Failed to fetch config for project ${o.name}`,x),null}}))).filter(o=>o!==null)}else{const l=await Yf();return[{projectId:Qc||"current",config:l}]}}function Cs(l){return ut(yt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function V1(){return ut(yt("/api/doctor"))}function Sg(){return ut(yt("/api/schedule-info"))}function B1(){return ut(yt("/api/actions/run"),{method:"POST"})}function Ng(){return ut(yt("/api/actions/review"),{method:"POST"})}function Y1(){return ut(yt("/api/actions/qa"),{method:"POST"})}function $1(){return ut(yt("/api/actions/audit"),{method:"POST"})}function G1(){return ut(yt("/api/actions/planner"),{method:"POST"})}function Ki(){return ut(yt("/api/actions/install-cron"),{method:"POST"})}function Z1(){return ut(yt("/api/actions/uninstall-cron"),{method:"POST"})}function F1(l="all"){return ut(yt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Bl=["Draft","Ready","In Progress","Review","Done"];function wg(){return ut(yt("/api/board/status"))}function Q1(l){return ut(yt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function jg(l,u){return ut(yt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:u})})}async function W1(l){const u=`${Vf}${yt(`/api/board/issues/${l}`)}`,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 X1(){return ut(yt("/api/actions/clear-lock"),{method:"POST"})}function J1(l,u=[],d){const o=(d==null?void 0:d.enabled)??!0,x=V.useRef(l);x.current=l,V.useEffect(()=>{if(!o)return;const m=`${Vf}${yt("/api/status/events")}`,y=new EventSource(m);return y.addEventListener("status_changed",j=>{try{const b=JSON.parse(j.data);x.current(b)}catch{}}),()=>{y.close()}},[o,...u])}function ux(){return ut("/api/queue/status")}function I1(l){const u=`?window=${encodeURIComponent(l)}`;return ut(`/api/queue/analytics${u}`)}function K1(l){return ut("/api/queue/clear",{method:"POST",body:JSON.stringify({force:l})})}function P1(){return ut(yt("/api/roadmap"))}function e2(){return ut(yt("/api/roadmap/scan"),{method:"POST"})}function Eg(l){return ut(yt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function Ca(l,u=[],d){const o=(d==null?void 0:d.enabled)??!0,[x,m]=V.useState(null),[y,j]=V.useState(!0),[b,p]=V.useState(null),w=V.useRef(l);w.current=l;const E=V.useRef(()=>{(async()=>{p(null);try{const k=await w.current();m(k)}catch(k){p(k instanceof Error?k:new Error("Unknown error"))}})()});return E.current=E.current.bind(E),V.useEffect(()=>{if(!o)return;let _=!1;return j(!0),p(null),(async()=>{try{const D=await w.current();_||m(D)}catch(D){_||p(D instanceof Error?D:new Error("Unknown error"))}finally{_||j(!1)}})(),()=>{_=!0}},[...u,o]),{data:x,loading:y,error:b,refetch:E.current}}const cx=l=>{let u;const d=new Set,o=(p,w)=>{const E=typeof p=="function"?p(u):p;if(!Object.is(E,u)){const _=u;u=w??(typeof E!="object"||E===null)?E:Object.assign({},u,E),d.forEach(k=>k(u,_))}},x=()=>u,j={setState:o,getState:x,getInitialState:()=>b,subscribe:p=>(d.add(p),()=>d.delete(p))},b=u=l(o,x,j);return j},t2=l=>l?cx(l):cx,a2=l=>l;function n2(l,u=a2){const d=Ke.useSyncExternalStore(l.subscribe,()=>u(l.getState()),()=>u(l.getInitialState()));return Ke.useDebugValue(d),d}const ox=l=>{const u=t2(l),d=o=>n2(u,o);return Object.assign(d,u),d},l2=l=>l?ox(l):ox,s2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Ra=l2(l=>({projectName:"Night Watch",setProjectName:u=>l({projectName:u}),toasts:[],addToast:u=>{const d=Math.random().toString(36).substring(7);l(o=>({toasts:[...o.toasts,{...u,id:d}]})),setTimeout(()=>{l(o=>({toasts:o.toasts.filter(x=>x.id!==d)}))},5e3)},removeToast:u=>l(d=>({toasts:d.toasts.filter(o=>o.id!==u)})),globalModeLoading:!0,setGlobalModeLoading:u=>l({globalModeLoading:u}),isGlobalMode:!1,setGlobalMode:u=>{z1(u),l({isGlobalMode:u})},projects:[],setProjects:u=>l({projects:u}),selectedProjectId:s2,selectProject:u=>{U1(u),u?localStorage.setItem("nw-selected-project",u):localStorage.removeItem("nw-selected-project"),l(d=>{const o=d.projects.find(x=>x.name===u);return{selectedProjectId:u,...o?{projectName:o.name}:{}}})}})),r2=()=>{const[l,u]=V.useState(!1),{projectName:d,isGlobalMode:o,projects:x,selectedProjectId:m,selectProject:y,globalModeLoading:j}=Ra(),{data:b}=Ca(pg,[m],{enabled:!j}),p=(b==null?void 0:b.length)??0,w=V.useMemo(()=>[{icon:t1,label:"Dashboard",path:"/"},{icon:s1,label:"Board",path:"/board"},{icon:Ib,label:"Pull Requests",path:"/prs",badge:p},{icon:og,label:"Roadmap",path:"/roadmap"},{icon:Zc,label:"Scheduling",path:"/scheduling"},{icon:E1,label:"Logs",path:"/logs"},{icon:hg,label:"Settings",path:"/settings"}],[p]);return s.jsxs("aside",{className:`
|
|
341
|
+
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
342
|
+
${l?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
343
|
+
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
344
|
+
`,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${l?"items-center justify-center flex":""}`,children:l?s.jsx("div",{className:"relative group",children:s.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:o?"Projects":"Workspace"}),o?s.jsxs("div",{className:"relative",children:[s.jsx(rx,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),s.jsx("select",{value:m||"",onChange:E=>y(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:x.filter(E=>E.valid).map(E=>s.jsx("option",{value:E.name,children:E.name},E.name))}),s.jsx(Ub,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):s.jsxs("div",{className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 px-3.5 text-sm font-medium shadow-sm flex items-center",children:[s.jsx(rx,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:d})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:w.map(E=>s.jsx(Ke.Fragment,{children:s.jsx("li",{children:s.jsx(lg,{to:E.path,className:({isActive:_})=>`
|
|
345
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
346
|
+
${_?"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"}
|
|
347
|
+
${l?"justify-center":""}
|
|
348
|
+
`,children:({isActive:_})=>s.jsxs(s.Fragment,{children:[s.jsx(E.icon,{className:`h-5 w-5 transition-colors ${_?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${l?"":"mr-3.5"}`}),!l&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:E.label}),E.badge&&(l?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${_?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:E.badge})),_&&!l&&s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),l&&s.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:E.label})]})})})},E.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>u(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(kb,{className:"h-5 w-5"}):s.jsx(_b,{className:"h-5 w-5"})})})]})},i2=()=>{const{projectName:l}=Ra();return s.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[s.jsxs("div",{className:"flex items-center space-x-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),s.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:l})]}),s.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),s.jsxs("div",{className:"flex items-center space-x-2 text-xs font-medium px-3 py-1.5 rounded-full border transition-colors bg-emerald-500/5 text-emerald-400 border-emerald-500/20 shadow-[0_0_10px_-4px_rgba(16,185,129,0.3)]",children:[s.jsx(R1,{className:"h-3.5 w-3.5"}),s.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),s.jsxs("div",{className:"flex items-center space-x-5",children:[s.jsxs("div",{className:"relative hidden md:block group",children:[s.jsx("input",{type:"text",placeholder:"Search ( / )",className:"w-72 pl-10 pr-4 py-2 rounded-lg border border-white/5 bg-white/5 text-sm text-slate-200 focus:outline-none focus:ring-1 focus:ring-indigo-500/50 focus:border-indigo-500/50 transition-all placeholder:text-slate-600 focus:bg-[#0b101b]"}),s.jsx(ru,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[s.jsx(Eb,{className:"h-5 w-5"}),s.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]}),s.jsx("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full transition-all",children:s.jsx(hg,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-600 ring-2 ring-white/10 flex items-center justify-center text-white font-bold text-xs shadow-lg",children:"AD"})]})]})},u2=({toast:l,onDismiss:u})=>{const d={success:s.jsx(lu,{className:"h-5 w-5 text-green-400"}),error:s.jsx(pn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(n1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(O1,{className:"h-5 w-5 text-amber-400"})},o={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
|
|
349
|
+
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
350
|
+
bg-slate-900 border border-slate-800 border-l-4 ${o[l.type]}
|
|
351
|
+
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
352
|
+
animate-in slide-in-from-right-full fade-in duration-300
|
|
353
|
+
`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:d[l.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:l.title}),l.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:l.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>u(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(iu,{className:"h-5 w-5"})]})})]})})})},c2=()=>{const{toasts:l,removeToast:u}=Ra();return s.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:l.map(d=>s.jsx(u2,{toast:d,onDismiss:u},d.id))})};function o2(){const{setGlobalMode:l,setGlobalModeLoading:u,setProjects:d,selectProject:o,selectedProjectId:x}=Ra();V.useEffect(()=>{u(!0),L1().then(async({globalMode:m})=>{if(l(m),!m)return;const y=await yg();d(y);const j=y.filter(b=>b.valid);x&&j.some(b=>b.name===x)?o(x):j.length>0&&o(j[0].name)}).catch(()=>{l(!1)}).finally(()=>{u(!1)})},[])}const Ve=({children:l,className:u="",onClick:d})=>s.jsxs("div",{className:`
|
|
354
|
+
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
355
|
+
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
356
|
+
transition-all duration-300
|
|
357
|
+
${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
358
|
+
${u}
|
|
359
|
+
`,onClick:d,children:[d&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:l})]}),Be=({children:l,variant:u="primary",size:d="md",loading:o=!1,className:x="",disabled:m,...y})=>{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 s.jsxs("button",{className:`${j} ${b[u]} ${p[d]} ${x}`,disabled:m||o,...y,children:[o&&s.jsx(cg,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},$c=({children:l,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 s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${o[u]} ${d}`,children:l})},Mg={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"}},d2=({defaultColumn:l,onClose:u,onCreated:d})=>{const[o,x]=V.useState(""),[m,y]=V.useState(""),[j,b]=V.useState(l),[p,w]=V.useState(!1),[E,_]=V.useState(null),{addToast:k}=Ra(),D=async M=>{if(M.preventDefault(),!!o.trim()){w(!0),_(null);try{await Q1({title:o.trim(),body:m,column:j}),k({title:"Issue created",message:`"${o.trim()}" added to ${j}`,type:"success"}),d(),u()}catch(C){_(C instanceof Error?C.message:"Failed to create issue")}finally{w(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:u}),s.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),s.jsx("button",{onClick:u,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(iu,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:D,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:o,onChange:M=>x(M.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:j,onChange:M=>b(M.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:Bl.map(M=>s.jsx("option",{value:M,children:M},M))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:m,onChange:M=>y(M.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&&s.jsx("p",{className:"text-sm text-red-400",children:E}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Be,{variant:"ghost",type:"button",onClick:u,children:"Cancel"}),s.jsx(Be,{type:"submit",disabled:p||!o.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},f2=({issue:l,onClose:u,onMoved:d,onClosed:o})=>{const[x,m]=V.useState(!1),[y,j]=V.useState(!1),{addToast:b}=Ra(),p=async _=>{if(_!==l.column){m(!0);try{await jg(l.number,_),b({title:"Issue moved",message:`#${l.number} moved to ${_}`,type:"success"}),d(),u()}catch(k){b({title:"Move failed",message:k instanceof Error?k.message:"Failed to move issue",type:"error"})}finally{m(!1)}}},w=async()=>{if(confirm(`Close issue #${l.number}: "${l.title}"?`)){j(!0);try{await W1(l.number),b({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),o(),u()}catch(_){b({title:"Close failed",message:_ instanceof Error?_.message:"Failed to close issue",type:"error"})}finally{j(!1)}}},E=l.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:u}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",l.number]}),s.jsx($c,{variant:Mg[E].badge,children:E})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:l.title}),l.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",l.assignees.join(", ")]})]}),s.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:s.jsx(iu,{className:"h-5 w-5"})})]}),s.jsxs("div",{className:"flex items-center space-x-3 px-6 py-3 border-b border-white/5 flex-shrink-0 flex-wrap gap-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),Bl.filter(_=>_!==l.column).map(_=>s.jsx("button",{onClick:()=>p(_),disabled:x,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:_},_))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[l.url&&!l.url.startsWith("local://")&&s.jsxs("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(ug,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:w,disabled:y,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:y?"Closing...":"Close Issue"})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:l.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},h2=({issue:l,onClick:u,onDragStart:d})=>{const[o,x]=V.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:m=>{m.dataTransfer.setData("issueNumber",String(l.number)),m.dataTransfer.effectAllowed="move",x(!0),d(l)},onDragEnd:()=>x(!1),children:s.jsxs(Ve,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${o?"opacity-30":""}`,onClick:u,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",l.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:l.title}),l.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:l.assignees.join(", ")})]})})},m2=({name:l,issues:u,draggingIssue:d,onIssueClick:o,onNewIssue:x,onMoveIssue:m,onDragStart:y})=>{const j=Mg[l],[b,p]=V.useState(!1),w=d!==null&&d.column!==l;return s.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!==l&&m(d,l)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${j.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:l}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:u.length})]}),s.jsx("button",{onClick:()=>x(l),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${l}`,children:s.jsx(su,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:u.length===0?s.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:s.jsx("span",{className:"text-xs text-slate-700",children:b&&w?"Drop here":"No issues"})}):u.map(E=>s.jsx(h2,{issue:E,onClick:()=>o(E),onDragStart:y},E.id))})]})},x2=()=>{const[l,u]=V.useState(null),[d,o]=V.useState(null),[x,m]=V.useState(null),[y,j]=V.useState(null),b=V.useRef(!1),{addToast:p,selectedProjectId:w,globalModeLoading:E}=Ra(),{data:_,loading:k,error:D,refetch:M}=Ca(wg,[w],{enabled:!E});V.useEffect(()=>{const K=setInterval(()=>{b.current||M()},3e4);return()=>clearInterval(K)},[M]);const C=V.useCallback(async(K,J)=>{m(null);const ne=y??(_==null?void 0:_.columns);if(!ne)return;const le=ne,fe={};for(const F of Bl)fe[F]=(ne[F]??[]).filter($=>$.number!==K.number);const P={...K,column:J};fe[J]=[...fe[J]??[],P],j(fe),u(F=>(F==null?void 0:F.number)===K.number?P:F),b.current=!0;try{await jg(K.number,J),M(),setTimeout(()=>{j(null),b.current=!1},800)}catch(F){j(le),u($=>($==null?void 0:$.number)===K.number?K:$),b.current=!1,p({title:"Move failed",message:F instanceof Error?F.message:"Failed to move issue",type:"error"})}},[p,M,y,_]);if(E||k)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(D&&D.message.includes("Board not configured"))return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-4xl",children:"📋"}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),s.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",s.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(D)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),s.jsx("div",{className:"text-sm text-slate-500",children:D.message}),s.jsx(Be,{onClick:()=>M(),children:"Retry"})]});if(!_)return null;const Y=y??_.columns;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),s.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[Bl.reduce((K,J)=>{var ne;return K+(((ne=Y[J])==null?void 0:ne.length)??0)},0)," issues across ",Bl.length," columns"]})]}),s.jsxs(Be,{onClick:()=>o("Ready"),children:[s.jsx(su,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>m(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Bl.length*236}px`},children:Bl.map(K=>s.jsx(m2,{name:K,issues:Y[K]??[],draggingIssue:x,onIssueClick:u,onNewIssue:o,onMoveIssue:C,onDragStart:m},K))})}),l&&s.jsx(f2,{issue:l,onClose:()=>u(null),onMoved:()=>M(),onClosed:()=>M()}),d&&s.jsx(d2,{defaultColumn:d,onClose:()=>o(null),onCreated:()=>M()})]})};function dx(l){if(!(l!=null&&l.timestamp))return Number.NEGATIVE_INFINITY;const u=new Date(l.timestamp).getTime();return Number.isNaN(u)?Number.NEGATIVE_INFINITY:u}function g2(l,u){return l?u?dx(l)>=dx(u)?l:u:l:u}const y2={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"},v2=()=>{var re,he,Ne,H,T,X,ce,xe,we,ve,_e;const l=Jc(),[u,d]=V.useState(null),[o,x]=V.useState(!1),[m,y]=V.useState(null),[j,b]=V.useState(null),{setProjectName:p,addToast:w,selectedProjectId:E,globalModeLoading:_}=Ra(),{data:k,loading:D,error:M,refetch:C}=Ca(vg,[E],{enabled:!_}),{data:Y}=Ca(Sg,[E],{enabled:!_}),{data:K}=Ca(()=>wg().catch(()=>null),[E],{enabled:!_});J1(pe=>{b(pe)},[E,_],{enabled:!_});const J=g2(j,k);if(Ke.useEffect(()=>{J!=null&&J.projectName&&p(J.projectName)},[J,p]),V.useEffect(()=>{const pe=setInterval(()=>{C()},3e4);return()=>clearInterval(pe)},[C]),V.useEffect(()=>{const pe=()=>C();return window.addEventListener("focus",pe),()=>window.removeEventListener("focus",pe)},[C]),_||D)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(M)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(pn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load dashboard data"}),s.jsx("div",{className:"text-sm text-slate-500",children:M.message}),s.jsx(Be,{onClick:()=>C(),children:"Retry"})]});if(!J)return null;const ne=J.prs.length,le=J.prs.filter(pe=>pe.reviewScore!==null&&pe.reviewScore<70).length,fe=((re=K==null?void 0:K.columns.Ready)==null?void 0:re.length)??0,P=((he=K==null?void 0:K.columns["In Progress"])==null?void 0:he.length)??0,F=J.processes.find(pe=>pe.name==="executor"),$=J.processes.find(pe=>pe.name==="reviewer"),A=J.processes.find(pe=>pe.name==="qa"),ee=J.processes.find(pe=>pe.name==="audit"),B=J.processes.find(pe=>pe.name==="planner"),de=async pe=>{d(pe);try{const Ue=await F1(pe),ft=Ue.results.every(At=>At.success);w({title:ft?"Process Cancelled":"Cancel Failed",message:Ue.results.map(At=>At.message).join("; "),type:ft?"success":"error"})}catch(Ue){w({title:"Cancel Failed",message:Ue instanceof Error?Ue.message:"Failed to cancel process",type:"error"})}finally{d(null),C()}},ye=async()=>{x(!0);try{await X1(),w({title:"Lock Cleared",message:"Stale executor state removed",type:"success"}),C()}catch(pe){w({title:"Clear Failed",message:pe instanceof Error?pe.message:"Failed to clear lock",type:"error"})}finally{x(!1)}},ge=async(pe,Ue)=>{y(pe);try{await Ue(),w({title:`${pe} Started`,message:`${pe} is now running`,type:"success"}),C()}catch(ft){w({title:"Start Failed",message:ft instanceof Error?ft.message:`Failed to start ${pe}`,type:"error"})}finally{y(null)}},Z=pe=>{if(!pe)return"Not scheduled";try{const Ue=new Date(pe),ft=new Date,At=Ue.getTime()-ft.getTime(),Kt=Math.floor(At/6e4);return Kt<0?"Running now...":Kt<60?`In ${Kt} min`:Kt<1440?`In ${Math.floor(Kt/60)} hr${Kt>=120?"s":""}`:`In ${Math.floor(Kt/1440)} day${Kt>=2880?"s":""}`}catch{return"Unknown"}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(Ve,{className:"p-5",onClick:()=>l("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:fe})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(lu,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(Ve,{className:"p-5",onClick:()=>l("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:P})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(qf,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(Ve,{className:"p-5",onClick:()=>l("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:ne})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Fc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${le>0?"text-red-400 font-medium":"text-slate-500"}`,children:le>0?`${le} need work`:"All passing"})]}),s.jsxs(Ve,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Cron Status"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:J.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${J.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(Zc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:J.crontab.installed?`${J.crontab.entries.length} entr${J.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(Ve,{className:"p-6",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200 mb-4",children:"System Status"}),s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Project"}),s.jsx("p",{className:"text-sm text-slate-200",children:J.projectName})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Provider"}),s.jsx("p",{className:"text-sm text-slate-200 capitalize",children:J.config.provider})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Last Updated"}),s.jsx("p",{className:"text-sm text-slate-200",children:new Date(J.timestamp).toLocaleString()})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(Ve,{className:"p-6",children:[s.jsx("h3",{className:"text-base font-semibold text-slate-200 mb-4",children:"Process Status"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${F!=null&&F.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{children:[s.jsx("div",{className:`font-medium ${F!=null&&F.running?"text-slate-200":"text-slate-400"}`,children:"Executor"}),s.jsx("div",{className:"text-xs text-slate-500",children:F!=null&&F.running?`PID: ${F.pid} • ${J.activePrd??"Running"}`:"Idle"})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[(F==null?void 0:F.running)&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>de("run"),disabled:u==="run",children:[s.jsx(Ef,{className:"h-4 w-4 mr-1"}),u==="run"?"Stopping...":"Stop"]}),!(F!=null&&F.running)&&J.activePrd&&s.jsx(Be,{size:"sm",variant:"ghost",className:"text-amber-400 hover:text-amber-300",onClick:ye,disabled:o,children:o?"Clearing...":"Force Clear"}),!(F!=null&&F.running)&&!J.activePrd&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>ge("Executor",B1),disabled:m==="Executor",children:[s.jsx(Fn,{className:"h-4 w-4 mr-1"}),m==="Executor"?"Starting...":"Run"]}),s.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"View Log"})]})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${$!=null&&$.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{children:[s.jsx("div",{className:`font-medium ${$!=null&&$.running?"text-slate-200":"text-slate-400"}`,children:"Reviewer"}),s.jsx("div",{className:"text-xs text-slate-500",children:$!=null&&$.running?`PID: ${$.pid} • Running`:"Idle"})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[($==null?void 0:$.running)&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>de("review"),disabled:u==="review",children:[s.jsx(Ef,{className:"h-4 w-4 mr-1"}),u==="review"?"Stopping...":"Stop"]}),!($!=null&&$.running)&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>ge("Reviewer",Ng),disabled:m==="Reviewer",children:[s.jsx(Fn,{className:"h-4 w-4 mr-1"}),m==="Reviewer"?"Starting...":"Run"]}),s.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),disabled:!($!=null&&$.running),children:"View Log"})]})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${A!=null&&A.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{children:[s.jsx("div",{className:`font-medium ${A!=null&&A.running?"text-slate-200":"text-slate-400"}`,children:"QA"}),s.jsx("div",{className:"text-xs text-slate-500",children:A!=null&&A.running?`PID: ${A.pid} • Running`:"Idle"})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[!(A!=null&&A.running)&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>ge("QA",Y1),disabled:m==="QA",children:[s.jsx(Fn,{className:"h-4 w-4 mr-1"}),m==="QA"?"Starting...":"Run"]}),s.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"View Log"})]})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${ee!=null&&ee.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{children:[s.jsx("div",{className:`font-medium ${ee!=null&&ee.running?"text-slate-200":"text-slate-400"}`,children:"Auditor"}),s.jsx("div",{className:"text-xs text-slate-500",children:ee!=null&&ee.running?`PID: ${ee.pid} • Running`:"Idle"})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[!(ee!=null&&ee.running)&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>ge("Auditor",$1),disabled:m==="Auditor",children:[s.jsx(Fn,{className:"h-4 w-4 mr-1"}),m==="Auditor"?"Starting...":"Run"]}),s.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"View Log"})]})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${B!=null&&B.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{children:[s.jsx("div",{className:`font-medium ${B!=null&&B.running?"text-slate-200":"text-slate-400"}`,children:"Planner"}),s.jsx("div",{className:"text-xs text-slate-500",children:B!=null&&B.running?`PID: ${B.pid} • Writing PRDs`:"Idle"})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[!(B!=null&&B.running)&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>ge("Planner",G1),disabled:m==="Planner",children:[s.jsx(Fn,{className:"h-4 w-4 mr-1"}),m==="Planner"?"Starting...":"Run"]}),s.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"View Log"})]})]})]})]}),s.jsxs(Ve,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-base font-semibold text-slate-200",children:"Scheduling"}),s.jsxs("button",{onClick:()=>l("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(sx,{className:"ml-1 h-3 w-3"})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-1.5 rounded-md ${Y!=null&&Y.executor.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(Zc,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${Y!=null&&Y.executor.installed?"text-slate-200":"text-slate-500"}`,children:"Executor"}),s.jsx("div",{className:"text-xs text-slate-500",children:Y!=null&&Y.paused?"Paused":Z(Y==null?void 0:Y.executor.nextRun)})]})]})}),s.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-1.5 rounded-md ${Y!=null&&Y.reviewer.installed?"bg-purple-500/10 text-purple-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(Fc,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${Y!=null&&Y.reviewer.installed?"text-slate-200":"text-slate-500"}`,children:"Reviewer"}),s.jsx("div",{className:"text-xs text-slate-500",children:Y!=null&&Y.paused?"Paused":Z(Y==null?void 0:Y.reviewer.nextRun)})]})]})}),s.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-1.5 rounded-md ${(Ne=Y==null?void 0:Y.qa)!=null&&Ne.installed?"bg-green-500/10 text-green-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(mg,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${(H=Y==null?void 0:Y.qa)!=null&&H.installed?"text-slate-200":"text-slate-500"}`,children:"QA"}),s.jsx("div",{className:"text-xs text-slate-500",children:Y!=null&&Y.paused?"Paused":Z((T=Y==null?void 0:Y.qa)==null?void 0:T.nextRun)})]})]})}),s.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-1.5 rounded-md ${(X=Y==null?void 0:Y.audit)!=null&&X.installed?"bg-amber-500/10 text-amber-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(ru,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${(ce=Y==null?void 0:Y.audit)!=null&&ce.installed?"text-slate-200":"text-slate-500"}`,children:"Auditor"}),s.jsx("div",{className:"text-xs text-slate-500",children:Y!=null&&Y.paused?"Paused":Z((xe=Y==null?void 0:Y.audit)==null?void 0:xe.nextRun)})]})]})}),s.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-1.5 rounded-md ${(we=Y==null?void 0:Y.planner)!=null&&we.installed?"bg-cyan-500/10 text-cyan-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(ig,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${(ve=Y==null?void 0:Y.planner)!=null&&ve.installed?"text-slate-200":"text-slate-500"}`,children:"Planner"}),s.jsx("div",{className:"text-xs text-slate-500",children:Y!=null&&Y.paused?"Paused":Z((_e=Y==null?void 0:Y.planner)==null?void 0:_e.nextRun)})]})]})})]})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),s.jsxs("button",{onClick:()=>l("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(sx,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(Ve,{className:"p-4",children:K?s.jsx("div",{className:"flex flex-wrap gap-3",children:Bl.map(pe=>{var ft;const Ue=((ft=K.columns[pe])==null?void 0:ft.length)??0;return s.jsxs("button",{onClick:()=>l("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${y2[pe]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:pe}),s.jsx("span",{className:"text-xs font-bold",children:Ue})]},pe)})}):s.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",s.jsx("code",{className:"font-mono bg-slate-800 px-1.5 py-0.5 rounded text-indigo-300 text-xs",children:"night-watch board setup"})," to enable."]})})]})]})},p2=()=>{const[l,u]=V.useState(!0),[d,o]=V.useState(""),[x,m]=V.useState("executor"),y=V.useRef(null),{selectedProjectId:j,globalModeLoading:b}=Ra(),{data:p,loading:w,error:E,refetch:_}=Ca(()=>q1(x,500),[x,j],{enabled:!b}),{data:k}=Ca(vg,[j],{enabled:!b}),D=(p==null?void 0:p.lines)||[];V.useEffect(()=>{l&&y.current&&(y.current.scrollTop=y.current.scrollHeight)},[D,l]),V.useEffect(()=>{if(!l)return;const K=window.setInterval(()=>{_()},3e3);return()=>window.clearInterval(K)},[l,x,_]);const M=D.filter(K=>K.toLowerCase().includes(d.toLowerCase())),C=K=>{m(K),o("")},Y=K=>{if(!(k!=null&&k.processes))return!1;const J=k.processes.find(ne=>ne.name===K);return(J==null?void 0:J.running)??!1};return E?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(pn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),s.jsx("div",{className:"text-sm text-slate-500",children:E.message}),s.jsx(Be,{onClick:()=>_(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:K=>o(K.target.value)}),s.jsx(ru,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),s.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>C("executor"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="executor"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Executor"}),Y("executor")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>C("reviewer"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="reviewer"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Reviewer"}),Y("reviewer")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>C("qa"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="qa"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"QA"}),Y("qa")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>C("audit"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="audit"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Auditor"}),Y("audit")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>C("planner"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="planner"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Planner"}),Y("planner")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Be,{size:"sm",variant:"ghost",onClick:()=>_(),children:[s.jsx(ix,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Be,{size:"sm",variant:"ghost",onClick:()=>u(!l),children:[l?s.jsx(dg,{className:"h-4 w-4 mr-2"}):s.jsx(Fn,{className:"h-4 w-4 mr-2"}),l?"Pause":"Resume"]})]})]}),s.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[s.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[s.jsxs("span",{children:["File: ",x,".log"]}),s.jsxs("span",{children:[M.length," lines"]})]}),s.jsxs("div",{ref:y,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[w?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):M.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):M.map((K,J)=>{const ne=K.includes("[ERROR]"),le=K.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${ne?"text-red-400":le?"text-amber-400":"text-slate-300"}`,children:[s.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:J+1}),K]},J)}),l&&s.jsx("div",{className:"h-4"})," "]}),!l&&s.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>u(!0),children:[s.jsx(ix,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},b2=()=>{const[l,u]=V.useState(null),[d,o]=V.useState(!1),[x,m]=V.useState("all"),[y,j]=V.useState("number"),[b,p]=V.useState("desc"),{addToast:w,selectedProjectId:E,globalModeLoading:_}=Ra(),{data:k,loading:D,error:M,refetch:C}=Ca(pg,[E],{enabled:!_}),Y=k??[],K=A=>{switch(A){case"pass":return s.jsx(lu,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(Ef,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(cg,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(pn,{className:"h-4 w-4 text-slate-500"})}},J=A=>{switch(A){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"}},ne=A=>A===null?"No review decision yet":A===100?"PR has been approved":A===0?"Changes have been requested":`Review score: ${A}`,le=V.useMemo(()=>Y.filter(A=>{switch(x){case"needs-work":return A.ciStatus==="fail"||A.reviewScore===0;case"pending":return A.ciStatus==="pending"||A.ciStatus==="unknown"||A.reviewScore===null;case"passed":return A.ciStatus==="pass"&&A.reviewScore===100;case"all":default:return!0}}),[Y,x]),fe=V.useMemo(()=>[...le].sort((ee,B)=>{let de=0;switch(y){case"number":de=ee.number-B.number;break;case"title":de=ee.title.localeCompare(B.title);break;case"branch":de=ee.branch.localeCompare(B.branch);break;case"ciStatus":{const ye={fail:0,pending:1,unknown:2,pass:3};de=(ye[ee.ciStatus]??2)-(ye[B.ciStatus]??2);break}case"reviewScore":{const ye=ee.reviewScore??-1,ge=B.reviewScore??-1;de=ye-ge;break}}return b==="asc"?de:-de}),[le,y,b]),P=A=>{y===A?p(b==="asc"?"desc":"asc"):(j(A),p("desc"))},F=A=>y!==A?s.jsx(Sb,{className:"h-3 w-3 text-slate-600"}):b==="asc"?s.jsx(wb,{className:"h-3 w-3 text-indigo-400"}):s.jsx(vb,{className:"h-3 w-3 text-indigo-400"});if(D)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(M)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(pn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:M.message}),s.jsx(Be,{onClick:()=>C(),children:"Retry"})]});const $=async()=>{o(!0);try{const A=await Ng();w({title:"Reviewer Started",message:A.pid?`Started with PID ${A.pid}`:"Reviewer started",type:"success"})}catch(A){w({title:"Reviewer Failed",message:A instanceof Error?A.message:"Failed to start reviewer",type:"error"})}finally{o(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>m("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),s.jsx("button",{onClick:()=>m("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),s.jsx("button",{onClick:()=>m("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),s.jsx("button",{onClick:()=>m("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),s.jsxs(Be,{size:"sm",onClick:$,disabled:d,children:[s.jsx(ru,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),F("number")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),F("branch")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),F("ciStatus")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),F("reviewScore")]})}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-800",children:[fe.map(A=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>u(l===A.number?null:A.number),children:[s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center",children:[s.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",A.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:A.title})]})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:A.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:J(A.ciStatus),children:[K(A.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:A.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:A.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:ne(A.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${A.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${A.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${A.reviewScore>=70?"text-green-500":"text-red-500"}`,children:A.reviewScore})]}):s.jsx("span",{className:"text-slate-600 text-sm",title:"No review decision yet",children:"—"})}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("a",{href:A.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:ee=>ee.stopPropagation(),children:s.jsx(ug,{className:"h-4 w-4"})})})]},A.number)),fe.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:Y.length===0?"No open PRs found.":`No PRs match the "${x}" filter.`})})]})]})}),l&&s.jsx(Ve,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const A=Y.find(ee=>ee.number===l);return A?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:A.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:A.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:J(A.ciStatus),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),s.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[K(A.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:A.ciStatus})]})]}),A.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:ne(A.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${A.reviewScore>=70?"text-green-500":"text-red-500"}`,children:A.reviewScore})]})]})]}):null})()})]})},It=Ke.forwardRef(({className:l="",label:u,checked:d,onChange:o,...x},m)=>{const y=j=>{o&&o(j.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${l}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:m,checked:d,onChange:y,...x}),s.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),u&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:u})]})});It.displayName="Switch";const S2=()=>{const{addToast:l,selectedProjectId:u,globalModeLoading:d}=Ra(),[o,x]=V.useState(!1),[m,y]=V.useState(!1),{data:j,loading:b,error:p,refetch:w}=Ca(P1,[u],{enabled:!d});V.useEffect(()=>{if(!(j!=null&&j.enabled))return;const K=setInterval(()=>{w()},1e4);return()=>clearInterval(K)},[j==null?void 0:j.enabled,w]);const E=async K=>{y(!0);try{await Eg(K),l({title:K?"Scanner Enabled":"Scanner Disabled",message:K?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:K?"success":"info"}),w()}catch(J){l({title:"Toggle Failed",message:J instanceof Error?J.message:"Failed to toggle scanner",type:"error"})}finally{y(!1)}},_=async()=>{x(!0);try{const K=await e2();K.created.length>0?l({title:"Scan Complete",message:`Created ${K.created.length} PRD(s): ${K.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),K.errors.length>0&&l({title:"Scan Errors",message:K.errors.join("; "),type:"warning"}),w()}catch(K){l({title:"Scan Failed",message:K instanceof Error?K.message:"Failed to scan roadmap",type:"error"})}finally{x(!1)}};if(b)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(p)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(pn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:p.message}),s.jsx(Be,{onClick:()=>w(),children:"Retry"})]});if(!j)return null;if(j.status==="no-roadmap")return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),s.jsx(Ve,{className:"p-12",children:s.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[s.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:s.jsx(og,{className:"h-10 w-10 text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),s.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",s.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const k=j.totalItems>0?Math.round(j.processedItems/j.totalItems*100):0,D=w2(j.status),M=j2(j.items),C=j.lastScan?E2(j.lastScan):"Never",Y=j.autoScanInterval?Math.round(j.autoScanInterval/60):5;return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(It,{label:j.enabled?"Enabled":"Disabled",checked:j.enabled,onChange:E,disabled:m}),s.jsxs(Be,{onClick:_,loading:o,disabled:!j.enabled||j.status==="complete",children:[s.jsx(Fn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(Ve,{className:`p-6 border-2 ${D.borderColor}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(D.icon,{className:`h-8 w-8 ${D.textColor}`}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),s.jsx("div",{className:`text-2xl font-bold ${D.textColor}`,children:D.label})]})]}),s.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[s.jsxs("div",{children:["Last scan: ",s.jsx("span",{className:"text-slate-300",children:C})]}),j.enabled&&j.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",Y," min"]})]}),j.enabled&&j.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(Ve,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[j.processedItems," / ",j.totalItems," items (",k,"%)"]})]}),s.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${k===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${k}%`}})})]}),Object.entries(M).map(([K,J])=>s.jsxs(Ve,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:K}),s.jsx("div",{className:"space-y-2",children:J.map(ne=>s.jsx(N2,{item:ne},ne.hash))})]},K))]})};function N2({item:l}){const u=l.checked,d=l.processed;return s.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:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[u?s.jsx(d1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(lu,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Xb,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${u?"line-through text-slate-600":"text-slate-200"}`,children:l.title}),l.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:l.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:u?s.jsx($c,{variant:"neutral",children:"Skipped"}):d?s.jsx($c,{variant:"success",children:l.prdFile||"Processed"}):s.jsx($c,{variant:"warning",children:"Pending"})})]})}function w2(l){switch(l){case"complete":return{label:"Complete",icon:lu,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Fc,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:Fn,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:pn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:pn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function j2(l){const u={};for(const d of l){const o=d.section||"General";u[o]||(u[o]=[]),u[o].push(d)}return u}function E2(l){try{const u=new Date(l),o=new Date().getTime()-u.getTime(),x=Math.floor(o/6e4);if(x<1)return"Just now";if(x<60)return`${x} min ago`;const m=Math.floor(x/60);return m<24?`${m} hr ago`:`${Math.floor(m/24)} day(s) ago`}catch{return"Unknown"}}const M2=({analytics:l})=>{const u=Object.entries(l.byProviderBucket).filter(([d])=>d!=="__unassigned__");return u.length===0?s.jsx("div",{className:"text-sm text-slate-500 py-2",children:"No provider bucket data available."}):s.jsx("div",{className:"space-y-2","data-testid":"provider-bucket-summary",children:u.map(([d,o])=>s.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:[s.jsx("span",{className:"text-xs font-mono text-slate-300 truncate max-w-[60%]",title:d,children:d}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-400 shrink-0",children:[s.jsxs("span",{children:[s.jsx("span",{className:"text-slate-200 font-medium",children:o.running})," running"]}),s.jsx("span",{className:"text-slate-700",children:"/"}),s.jsxs("span",{children:[s.jsx("span",{className:"text-slate-200 font-medium",children:o.pending})," pending"]})]})]},d))})};var Es={},Ma={},Vi={},Ms={},xf={},fx;function T2(){return fx||(fx=1,Object.defineProperty(xf,"__esModule",{value:!0})),xf}var Bi={},Yi={},hx;function As(){var u,d,o,x,m,Tg,j;if(hx)return Yi;hx=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.CronField=void 0;let l=(j=class{constructor(p,w={rawValue:""}){et(this,m);et(this,u,!1);et(this,d,!1);et(this,o,!1);et(this,x,[]);B0(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??""},Te(this,x,p.sort(j.sorter)),Te(this,o,this.options.wildcard!==void 0?this.options.wildcard:Ee(this,m,Tg).call(this)),Te(this,u,this.options.rawValue.includes("L")||p.includes("L")),Te(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 te(this,u)}get hasQuestionMarkChar(){return te(this,d)}get isWildcard(){return te(this,o)}get values(){return te(this,x)}static sorter(p,w){const E=typeof p=="number",_=typeof w=="number";return E&&_?p-w:!E&&!_?p.localeCompare(w):E?-1:1}static findNearestValueInList(p,w,E=!1){if(E){for(let _=p.length-1;_>=0;_--)if(p[_]<w)return p[_];return null}for(let _=0;_<p.length;_++)if(p[_]>w)return p[_];return null}findNearestValue(p,w=!1){return this.constructor.findNearestValueInList(this.values,p,w)}serialize(){return{wildcard:te(this,o),values:te(this,x)}}validate(){let p;const w=this.chars.length>0?` or chars ${this.chars.join("")}`:"",E=M=>C=>new RegExp(`^\\d{0,2}${C}$`).test(M),_=M=>(p=M,typeof M=="number"?M>=this.min&&M<=this.max:this.chars.some(E(M)));if(!te(this,x).every(_))throw new Error(`${this.constructor.name} Validation error, got value ${p} expected range ${this.min}-${this.max}${w}`);const D=te(this,x).find((M,C)=>te(this,x).indexOf(M)!==C);if(D)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${D}`)}},u=new WeakMap,d=new WeakMap,o=new WeakMap,x=new WeakMap,m=new WeakSet,Tg=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=>te(this,x).includes(p))},j);return Yi.CronField=l,Yi}var mx;function C2(){if(mx)return Bi;mx=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.CronDayOfMonth=void 0;const l=As(),u=1,d=31,o=Object.freeze(["L"]);let x=class extends l.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(y,j){super(y,j),this.validate()}get values(){return super.values}};return Bi.CronDayOfMonth=x,Bi}var $i={},xx;function O2(){if(xx)return $i;xx=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.CronDayOfWeek=void 0;const l=As(),u=0,d=7,o=Object.freeze(["L"]);let x=class extends l.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(y,j){super(y,j),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return $i.CronDayOfWeek=x,$i}var Gi={},gx;function D2(){if(gx)return Gi;gx=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.CronHour=void 0;const l=As(),u=0,d=23,o=Object.freeze([]);let x=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(y,j){super(y,j),this.validate()}get values(){return super.values}};return Gi.CronHour=x,Gi}var Zi={},yx;function R2(){if(yx)return Zi;yx=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronMinute=void 0;const l=As(),u=0,d=59,o=Object.freeze([]);let x=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(y,j){super(y,j),this.validate()}get values(){return super.values}};return Zi.CronMinute=x,Zi}var Fi={},gf={},va={},vx;function _2(){if(vx)return va;vx=1,Object.defineProperty(va,"__esModule",{value:!0});class l extends Error{}class u extends l{constructor(r){super(`Invalid DateTime: ${r.toMessage()}`)}}class d extends l{constructor(r){super(`Invalid Interval: ${r.toMessage()}`)}}class o extends l{constructor(r){super(`Invalid Duration: ${r.toMessage()}`)}}class x extends l{}class m extends l{constructor(r){super(`Invalid unit ${r}`)}}class y extends l{}class j extends l{constructor(){super("Zone is an abstract class")}}const b="numeric",p="short",w="long",E={year:b,month:b,day:b},_={year:b,month:p,day:b},k={year:b,month:p,day:b,weekday:p},D={year:b,month:w,day:b},M={year:b,month:w,day:b,weekday:w},C={hour:b,minute:b},Y={hour:b,minute:b,second:b},K={hour:b,minute:b,second:b,timeZoneName:p},J={hour:b,minute:b,second:b,timeZoneName:w},ne={hour:b,minute:b,hourCycle:"h23"},le={hour:b,minute:b,second:b,hourCycle:"h23"},fe={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:p},P={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:w},F={year:b,month:b,day:b,hour:b,minute:b},$={year:b,month:b,day:b,hour:b,minute:b,second:b},A={year:b,month:p,day:b,hour:b,minute:b},ee={year:b,month:p,day:b,hour:b,minute:b,second:b},B={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},ye={year:b,month:w,day:b,hour:b,minute:b,second:b,timeZoneName:p},ge={year:b,month:w,day:b,weekday:w,hour:b,minute:b,timeZoneName:w},Z={year:b,month:w,day:b,weekday:w,hour:b,minute:b,second:b,timeZoneName:w};class re{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 he=null;class Ne extends re{static get instance(){return he===null&&(he=new Ne),he}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(r,{format:f,locale:v}){return jn(r,f,v)}formatOffset(r,f){return Xl(this.offset(r),f)}offset(r){return-new Date(r).getTimezoneOffset()}equals(r){return r.type==="system"}get isValid(){return!0}}const H=new Map;function T(h){let r=H.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"}),H.set(h,r)),r}const X={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ce(h,r){const f=h.format(r).replace(/\u200E/g,""),v=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(f),[,S,O,z,U,q,oe,be]=v;return[z,S,O,U,q,oe,be]}function xe(h,r){const f=h.formatToParts(r),v=[];for(let S=0;S<f.length;S++){const{type:O,value:z}=f[S],U=X[O];O==="era"?v[U]=z:Oe(U)||(v[U]=parseInt(z,10))}return v}const we=new Map;class ve extends re{static create(r){let f=we.get(r);return f===void 0&&we.set(r,f=new ve(r)),f}static resetCache(){we.clear(),H.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=ve.isValidZone(r)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(r,{format:f,locale:v}){return jn(r,f,v,this.name)}formatOffset(r,f){return Xl(this.offset(r),f)}offset(r){if(!this.valid)return NaN;const f=new Date(r);if(isNaN(f))return NaN;const v=T(this.name);let[S,O,z,U,q,oe,be]=v.formatToParts?xe(v,f):ce(v,f);U==="BC"&&(S=-Math.abs(S)+1);const Fe=Zt({year:S,month:O,day:z,hour:q===24?0:q,minute:oe,second:be,millisecond:0});let De=+f;const vt=De%1e3;return De-=vt>=0?vt:1e3+vt,(Fe-De)/(60*1e3)}equals(r){return r.type==="iana"&&r.name===this.name}get isValid(){return this.valid}}let _e={};function pe(h,r={}){const f=JSON.stringify([h,r]);let v=_e[f];return v||(v=new Intl.ListFormat(h,r),_e[f]=v),v}const Ue=new Map;function ft(h,r={}){const f=JSON.stringify([h,r]);let v=Ue.get(f);return v===void 0&&(v=new Intl.DateTimeFormat(h,r),Ue.set(f,v)),v}const At=new Map;function Kt(h,r={}){const f=JSON.stringify([h,r]);let v=At.get(f);return v===void 0&&(v=new Intl.NumberFormat(h,r),At.set(f,v)),v}const Jn=new Map;function Za(h,r={}){const{base:f,...v}=r,S=JSON.stringify([h,v]);let O=Jn.get(S);return O===void 0&&(O=new Intl.RelativeTimeFormat(h,r),Jn.set(S,O)),O}let Fa=null;function In(){return Fa||(Fa=new Intl.DateTimeFormat().resolvedOptions().locale,Fa)}const Kn=new Map;function Pn(h){let r=Kn.get(h);return r===void 0&&(r=new Intl.DateTimeFormat(h).resolvedOptions(),Kn.set(h,r)),r}const rn=new Map;function el(h){let r=rn.get(h);if(!r){const f=new Intl.Locale(h);r="getWeekInfo"in f?f.getWeekInfo():f.weekInfo,"minimalDays"in r||(r={...Yl,...r}),rn.set(h,r)}return r}function tl(h){const r=h.indexOf("-x-");r!==-1&&(h=h.substring(0,r));const f=h.indexOf("-u-");if(f===-1)return[h];{let v,S;try{v=ft(h).resolvedOptions(),S=h}catch{const q=h.substring(0,f);v=ft(q).resolvedOptions(),S=q}const{numberingSystem:O,calendar:z}=v;return[S,O,z]}}function ks(h,r,f){return(f||r)&&(h.includes("-u-")||(h+="-u"),f&&(h+=`-ca-${f}`),r&&(h+=`-nu-${r}`)),h}function zs(h){const r=[];for(let f=1;f<=12;f++){const v=Me.utc(2009,f,1);r.push(h(v))}return r}function Ht(h){const r=[];for(let f=1;f<=7;f++){const v=Me.utc(2016,11,13+f);r.push(h(v))}return r}function me(h,r,f,v){const S=h.listingMode();return S==="error"?null:S==="en"?f(r):v(r)}function Le(h){return h.numberingSystem&&h.numberingSystem!=="latn"?!1:h.numberingSystem==="latn"||!h.locale||h.locale.startsWith("en")||Pn(h.locale).numberingSystem==="latn"}class Lt{constructor(r,f,v){this.padTo=v.padTo||0,this.floor=v.floor||!1;const{padTo:S,floor:O,...z}=v;if(!f||Object.keys(z).length>0){const U={useGrouping:!1,...v};v.padTo>0&&(U.minimumIntegerDigits=v.padTo),this.inf=Kt(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):Fl(r,3);return tt(f,this.padTo)}}}class un{constructor(r,f,v){this.opts=v,this.originalZone=void 0;let S;if(this.opts.timeZone)this.dt=r;else if(r.zone.type==="fixed"){const z=-1*(r.offset/60),U=z>=0?`Etc/GMT+${z}`:`Etc/GMT${z}`;r.offset!==0&&ve.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 O={...this.opts};O.timeZone=O.timeZone||S,this.dtf=ft(f,O)}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 v=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...f,value:v}}else return f}):r}resolvedOptions(){return this.dtf.resolvedOptions()}}class Us{constructor(r,f,v){this.opts={style:"long",...v},!f&&qr()&&(this.rtf=Za(r,v))}format(r,f){return this.rtf?this.rtf.format(r,f):fn(f,r,this.opts.numeric,this.opts.style!=="long")}formatToParts(r,f){return this.rtf?this.rtf.formatToParts(r,f):[]}}const Yl={firstDay:1,minimalDays:4,weekend:[6,7]};class Ye{static fromOpts(r){return Ye.create(r.locale,r.numberingSystem,r.outputCalendar,r.weekSettings,r.defaultToEN)}static create(r,f,v,S,O=!1){const z=r||ot.defaultLocale,U=z||(O?"en-US":In()),q=f||ot.defaultNumberingSystem,oe=v||ot.defaultOutputCalendar,be=Vr(S)||ot.defaultWeekSettings;return new Ye(U,q,oe,be,z)}static resetCache(){Fa=null,Ue.clear(),At.clear(),Jn.clear(),Kn.clear(),rn.clear()}static fromObject({locale:r,numberingSystem:f,outputCalendar:v,weekSettings:S}={}){return Ye.create(r,f,v,S)}constructor(r,f,v,S,O){const[z,U,q]=tl(r);this.locale=z,this.numberingSystem=f||U||null,this.outputCalendar=v||q||null,this.weekSettings=S,this.intl=ks(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=O,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Le(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:Ye.create(r.locale||this.specifiedLocale,r.numberingSystem||this.numberingSystem,r.outputCalendar||this.outputCalendar,Vr(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 me(this,r,vu,()=>{const v=this.intl==="ja"||this.intl.startsWith("ja-");f&=!v;const S=f?{month:r,day:"numeric"}:{month:r},O=f?"format":"standalone";if(!this.monthsCache[O][r]){const z=v?U=>this.dtFormatter(U,S).format():U=>this.extract(U,S,"month");this.monthsCache[O][r]=zs(z)}return this.monthsCache[O][r]})}weekdays(r,f=!1){return me(this,r,Fs,()=>{const v=f?{weekday:r,year:"numeric",month:"long",day:"numeric"}:{weekday:r},S=f?"format":"standalone";return this.weekdaysCache[S][r]||(this.weekdaysCache[S][r]=Ht(O=>this.extract(O,v,"weekday"))),this.weekdaysCache[S][r]})}meridiems(){return me(this,void 0,()=>En,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Me.utc(2016,11,13,9),Me.utc(2016,11,13,19)].map(f=>this.extract(f,r,"dayperiod"))}return this.meridiemCache})}eras(r){return me(this,r,Zr,()=>{const f={era:r};return this.eraCache[r]||(this.eraCache[r]=[Me.utc(-40,1,1),Me.utc(2017,1,1)].map(v=>this.extract(v,f,"era"))),this.eraCache[r]})}extract(r,f,v){const S=this.dtFormatter(r,f),O=S.formatToParts(),z=O.find(U=>U.type.toLowerCase()===v);return z?z.value:null}numberFormatter(r={}){return new Lt(this.intl,r.forceSimple||this.fastNumbers,r)}dtFormatter(r,f={}){return new un(r,this.intl,f)}relFormatter(r={}){return new Us(this.intl,this.isEnglish(),r)}listFormatter(r={}){return pe(this.intl,r)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Pn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:on()?el(this.locale):Yl}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 zr=null;class pt extends re{static get utcInstance(){return zr===null&&(zr=new pt(0)),zr}static instance(r){return r===0?pt.utcInstance:new pt(r)}static parseSpecifier(r){if(r){const f=r.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(f)return new pt(Wl(f[1],f[2]))}return null}constructor(r){super(),this.fixed=r}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Xl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Xl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(r,f){return Xl(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 Pt extends re{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 Yt(h,r){if(Oe(h)||h===null)return r;if(h instanceof re)return h;if(Ct(h)){const f=h.toLowerCase();return f==="default"?r:f==="local"||f==="system"?Ne.instance:f==="utc"||f==="gmt"?pt.utcInstance:pt.parseSpecifier(f)||ve.create(h)}else return ua(h)?pt.instance(h):typeof h=="object"&&"offset"in h&&typeof h.offset=="function"?h:new Pt(h)}const $t={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},uu={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]},Pc=$t.hanidec.replace(/[\[|\]]/g,"").split("");function eo(h){let r=parseInt(h,10);if(isNaN(r)){r="";for(let f=0;f<h.length;f++){const v=h.charCodeAt(f);if(h[f].search($t.hanidec)!==-1)r+=Pc.indexOf(h[f]);else for(const S in uu){const[O,z]=uu[S];v>=O&&v<=z&&(r+=v-O)}}return parseInt(r,10)}else return r}const al=new Map;function Hs(){al.clear()}function ea({numberingSystem:h},r=""){const f=h||"latn";let v=al.get(f);v===void 0&&(v=new Map,al.set(f,v));let S=v.get(r);return S===void 0&&(S=new RegExp(`${$t[f]}${r}`),v.set(r,S)),S}let cn=()=>Date.now(),$l="system",nl=null,cu=null,Ur=null,Ls=60,ll,ou=null;class ot{static get now(){return cn}static set now(r){cn=r}static set defaultZone(r){$l=r}static get defaultZone(){return Yt($l,Ne.instance)}static get defaultLocale(){return nl}static set defaultLocale(r){nl=r}static get defaultNumberingSystem(){return cu}static set defaultNumberingSystem(r){cu=r}static get defaultOutputCalendar(){return Ur}static set defaultOutputCalendar(r){Ur=r}static get defaultWeekSettings(){return ou}static set defaultWeekSettings(r){ou=Vr(r)}static get twoDigitCutoffYear(){return Ls}static set twoDigitCutoffYear(r){Ls=r%100}static get throwOnInvalid(){return ll}static set throwOnInvalid(r){ll=r}static resetCaches(){Ye.resetCache(),ve.resetCache(),Me.resetCache(),Hs()}}class ia{constructor(r,f){this.reason=r,this.explanation=f}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Hr=[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 ta(h,r){return new ia("unit out of range",`you specified ${r} (of type ${typeof r}) as a ${h}, which is invalid`)}function Vs(h,r,f){const v=new Date(Date.UTC(h,r-1,f));h<100&&h>=0&&v.setUTCFullYear(v.getUTCFullYear()-1900);const S=v.getUTCDay();return S===0?7:S}function Lr(h,r,f){return f+(rl(h)?qs:Hr)[r-1]}function Qa(h,r){const f=rl(h)?qs:Hr,v=f.findIndex(O=>O<r),S=r-f[v];return{month:v+1,day:S}}function Nt(h,r){return(h-r+7)%7+1}function kt(h,r=4,f=1){const{year:v,month:S,day:O}=h,z=Lr(v,S,O),U=Nt(Vs(v,S,O),f);let q=Math.floor((z-U+14-r)/7),oe;return q<1?(oe=v-1,q=il(oe,r,f)):q>il(v,r,f)?(oe=v+1,q=1):oe=v,{weekYear:oe,weekNumber:q,weekday:U,...Jl(h)}}function Sn(h,r=4,f=1){const{weekYear:v,weekNumber:S,weekday:O}=h,z=Nt(Vs(v,1,r),f),U=Xa(v);let q=S*7+O-z-7+r,oe;q<1?(oe=v-1,q+=Xa(oe)):q>U?(oe=v+1,q-=Xa(v)):oe=v;const{month:be,day:ke}=Qa(oe,q);return{year:oe,month:be,day:ke,...Jl(h)}}function Gl(h){const{year:r,month:f,day:v}=h,S=Lr(r,f,v);return{year:r,ordinal:S,...Jl(h)}}function du(h){const{year:r,ordinal:f}=h,{month:v,day:S}=Qa(r,f);return{year:r,month:v,day:S,...Jl(h)}}function fu(h,r){if(!Oe(h.localWeekday)||!Oe(h.localWeekNumber)||!Oe(h.localWeekYear)){if(!Oe(h.weekday)||!Oe(h.weekNumber)||!Oe(h.weekYear))throw new x("Cannot mix locale-based week fields with ISO-based week fields");return Oe(h.localWeekday)||(h.weekday=h.localWeekday),Oe(h.localWeekNumber)||(h.weekNumber=h.localWeekNumber),Oe(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 hu(h,r=4,f=1){const v=Wa(h.weekYear),S=Gt(h.weekNumber,1,il(h.weekYear,r,f)),O=Gt(h.weekday,1,7);return v?S?O?!1:ta("weekday",h.weekday):ta("week",h.weekNumber):ta("weekYear",h.weekYear)}function Zl(h){const r=Wa(h.year),f=Gt(h.ordinal,1,Xa(h.year));return r?f?!1:ta("ordinal",h.ordinal):ta("year",h.year)}function Bs(h){const r=Wa(h.year),f=Gt(h.month,1,12),v=Gt(h.day,1,$s(h.year,h.month));return r?f?v?!1:ta("day",h.day):ta("month",h.month):ta("year",h.year)}function Nn(h){const{hour:r,minute:f,second:v,millisecond:S}=h,O=Gt(r,0,23)||r===24&&f===0&&v===0&&S===0,z=Gt(f,0,59),U=Gt(v,0,59),q=Gt(S,0,999);return O?z?U?q?!1:ta("millisecond",S):ta("second",v):ta("minute",f):ta("hour",r)}function Oe(h){return typeof h>"u"}function ua(h){return typeof h=="number"}function Wa(h){return typeof h=="number"&&h%1===0}function Ct(h){return typeof h=="string"}function mu(h){return Object.prototype.toString.call(h)==="[object Date]"}function qr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function on(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function sl(h){return Array.isArray(h)?h:[h]}function xu(h,r,f){if(h.length!==0)return h.reduce((v,S)=>{const O=[r(S),S];return v&&f(v[0],O[0])===v[0]?v:O},null)[1]}function gu(h,r){return r.reduce((f,v)=>(f[v]=h[v],f),{})}function wn(h,r){return Object.prototype.hasOwnProperty.call(h,r)}function Vr(h){if(h==null)return null;if(typeof h!="object")throw new y("Week settings must be an object");if(!Gt(h.firstDay,1,7)||!Gt(h.minimalDays,1,7)||!Array.isArray(h.weekend)||h.weekend.some(r=>!Gt(r,1,7)))throw new y("Invalid week settings");return{firstDay:h.firstDay,minimalDays:h.minimalDays,weekend:Array.from(h.weekend)}}function Gt(h,r,f){return Wa(h)&&h>=r&&h<=f}function Ys(h,r){return h-r*Math.floor(h/r)}function tt(h,r=2){const f=h<0;let v;return f?v="-"+(""+-h).padStart(r,"0"):v=(""+h).padStart(r,"0"),v}function wt(h){if(!(Oe(h)||h===null||h===""))return parseInt(h,10)}function dn(h){if(!(Oe(h)||h===null||h===""))return parseFloat(h)}function Br(h){if(!(Oe(h)||h===null||h==="")){const r=parseFloat("0."+h)*1e3;return Math.floor(r)}}function Fl(h,r,f="round"){const v=10**r;switch(f){case"expand":return h>0?Math.ceil(h*v)/v:Math.floor(h*v)/v;case"trunc":return Math.trunc(h*v)/v;case"round":return Math.round(h*v)/v;case"floor":return Math.floor(h*v)/v;case"ceil":return Math.ceil(h*v)/v;default:throw new RangeError(`Value rounding ${f} is out of range`)}}function rl(h){return h%4===0&&(h%100!==0||h%400===0)}function Xa(h){return rl(h)?366:365}function $s(h,r){const f=Ys(r-1,12)+1,v=h+(r-f)/12;return f===2?rl(v)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][f-1]}function Zt(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 Gs(h,r,f){return-Nt(Vs(h,1,r),f)+r-1}function il(h,r=4,f=1){const v=Gs(h,r,f),S=Gs(h+1,r,f);return(Xa(h)-v+S)/7}function Ql(h){return h>99?h:h>ot.twoDigitCutoffYear?1900+h:2e3+h}function jn(h,r,f,v=null){const S=new Date(h),O={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};v&&(O.timeZone=v);const z={timeZoneName:r,...O},U=new Intl.DateTimeFormat(f,z).formatToParts(S).find(q=>q.type.toLowerCase()==="timezonename");return U?U.value:null}function Wl(h,r){let f=parseInt(h,10);Number.isNaN(f)&&(f=0);const v=parseInt(r,10)||0,S=f<0||Object.is(f,-0)?-v:v;return f*60+S}function Yr(h){const r=Number(h);if(typeof h=="boolean"||h===""||!Number.isFinite(r))throw new y(`Invalid unit value ${h}`);return r}function Ja(h,r){const f={};for(const v in h)if(wn(h,v)){const S=h[v];if(S==null)continue;f[r(v)]=Yr(S)}return f}function Xl(h,r){const f=Math.trunc(Math.abs(h/60)),v=Math.trunc(Math.abs(h%60)),S=h>=0?"+":"-";switch(r){case"short":return`${S}${tt(f,2)}:${tt(v,2)}`;case"narrow":return`${S}${f}${v>0?`:${v}`:""}`;case"techie":return`${S}${tt(f,2)}${tt(v,2)}`;default:throw new RangeError(`Value format ${r} is out of range for property format`)}}function Jl(h){return gu(h,["hour","minute","second","millisecond"])}const yu=["January","February","March","April","May","June","July","August","September","October","November","December"],Zs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],to=["J","F","M","A","M","J","J","A","S","O","N","D"];function vu(h){switch(h){case"narrow":return[...to];case"short":return[...Zs];case"long":return[...yu];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 Il=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],_a=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$r=["M","T","W","T","F","S","S"];function Fs(h){switch(h){case"narrow":return[...$r];case"short":return[..._a];case"long":return[...Il];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const En=["AM","PM"],ul=["Before Christ","Anno Domini"],pu=["BC","AD"],Gr=["B","A"];function Zr(h){switch(h){case"narrow":return[...Gr];case"short":return[...pu];case"long":return[...ul];default:return null}}function Kl(h){return En[h.hour<12?0:1]}function Ia(h,r){return Fs(r)[h.weekday-1]}function Fr(h,r){return vu(r)[h.month-1]}function Pl(h,r){return Zr(r)[h.year<0?0:1]}function fn(h,r,f="always",v=!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."]},O=["hours","minutes","seconds"].indexOf(h)===-1;if(f==="auto"&&O){const ke=h==="days";switch(r){case 1:return ke?"tomorrow":`next ${S[h][0]}`;case-1:return ke?"yesterday":`last ${S[h][0]}`;case 0:return ke?"today":`this ${S[h][0]}`}}const z=Object.is(r,-0)||r<0,U=Math.abs(r),q=U===1,oe=S[h],be=v?q?oe[1]:oe[2]||oe[1]:q?S[h][0]:h;return z?`${U} ${be} ago`:`in ${U} ${be}`}function Qs(h,r){let f="";for(const v of h)v.literal?f+=v.val:f+=r(v.val);return f}const Ws={D:E,DD:_,DDD:D,DDDD:M,t:C,tt:Y,ttt:K,tttt:J,T:ne,TT:le,TTT:fe,TTTT:P,f:F,ff:A,fff:de,ffff:ge,F:$,FF:ee,FFF:ye,FFFF:Z};class zt{static create(r,f={}){return new zt(r,f)}static parseFormat(r){let f=null,v="",S=!1;const O=[];for(let z=0;z<r.length;z++){const U=r.charAt(z);U==="'"?((v.length>0||S)&&O.push({literal:S||/^\s+$/.test(v),val:v===""?"'":v}),f=null,v="",S=!S):S||U===f?v+=U:(v.length>0&&O.push({literal:/^\s+$/.test(v),val:v}),v=U,f=U)}return v.length>0&&O.push({literal:S||/^\s+$/.test(v),val:v}),O}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,v=void 0){if(this.opts.forceSimple)return tt(r,f);const S={...this.opts};return f>0&&(S.padTo=f),v&&(S.signDisplay=v),this.loc.numberFormatter(S).format(r)}formatDateTimeFromString(r,f){const v=this.loc.listingMode()==="en",S=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",O=(De,vt)=>this.loc.extract(r,De,vt),z=De=>r.isOffsetFixed&&r.offset===0&&De.allowZ?"Z":r.isValid?r.zone.formatOffset(r.ts,De.format):"",U=()=>v?Kl(r):O({hour:"numeric",hourCycle:"h12"},"dayperiod"),q=(De,vt)=>v?Fr(r,De):O(vt?{month:De}:{month:De,day:"numeric"},"month"),oe=(De,vt)=>v?Ia(r,De):O(vt?{weekday:De}:{weekday:De,month:"long",day:"numeric"},"weekday"),be=De=>{const vt=zt.macroTokenToFormatOpts(De);return vt?this.formatWithSystemDefault(r,vt):De},ke=De=>v?Pl(r,De):O({era:De},"era"),Fe=De=>{switch(De){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 z({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return z({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return z({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?O({day:"numeric"},"day"):this.num(r.day);case"dd":return S?O({day:"2-digit"},"day"):this.num(r.day,2);case"c":return this.num(r.weekday);case"ccc":return oe("short",!0);case"cccc":return oe("long",!0);case"ccccc":return oe("narrow",!0);case"E":return this.num(r.weekday);case"EEE":return oe("short",!1);case"EEEE":return oe("long",!1);case"EEEEE":return oe("narrow",!1);case"L":return S?O({month:"numeric",day:"numeric"},"month"):this.num(r.month);case"LL":return S?O({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?O({month:"numeric"},"month"):this.num(r.month);case"MM":return S?O({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?O({year:"numeric"},"year"):this.num(r.year);case"yy":return S?O({year:"2-digit"},"year"):this.num(r.year.toString().slice(-2),2);case"yyyy":return S?O({year:"numeric"},"year"):this.num(r.year,4);case"yyyyyy":return S?O({year:"numeric"},"year"):this.num(r.year,6);case"G":return ke("short");case"GG":return ke("long");case"GGGGG":return ke("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 be(De)}};return Qs(zt.parseFormat(f),Fe)}formatDurationFromString(r,f){const v=this.opts.signMode==="negativeLargestOnly"?-1:1,S=be=>{switch(be[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}},O=(be,ke)=>Fe=>{const De=S(Fe);if(De){const vt=ke.isNegativeDuration&&De!==ke.largestUnit?v:1;let qt;return this.opts.signMode==="negativeLargestOnly"&&De!==ke.largestUnit?qt="never":this.opts.signMode==="all"?qt="always":qt="auto",this.num(be.get(De)*vt,Fe.length,qt)}else return Fe},z=zt.parseFormat(f),U=z.reduce((be,{literal:ke,val:Fe})=>ke?be:be.concat(Fe),[]),q=r.shiftTo(...U.map(S).filter(be=>be)),oe={isNegativeDuration:q<0,largestUnit:Object.keys(q.values)[0]};return Qs(z,O(q,oe))}}const es=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ka(...h){const r=h.reduce((f,v)=>f+v.source,"");return RegExp(`^${r}$`)}function Mn(...h){return r=>h.reduce(([f,v,S],O)=>{const[z,U,q]=O(r,S);return[{...f,...z},U||v,q]},[{},null,1]).slice(0,2)}function jt(h,...r){if(h==null)return[null,null];for(const[f,v]of r){const S=f.exec(h);if(S)return v(S)}return[null,null]}function hn(...h){return(r,f)=>{const v={};let S;for(S=0;S<h.length;S++)v[h[S]]=wt(r[f+S]);return[v,null,f+S]}}const ts=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,as=`(?:${ts.source}?(?:\\[(${es.source})\\])?)?`,Qr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Xs=RegExp(`${Qr.source}${as}`),ns=RegExp(`(?:[Tt]${Xs.source})?`),ls=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Js=/(\d{4})-?W(\d\d)(?:-?(\d))?/,bu=/(\d{4})-?(\d{3})/,ao=hn("weekYear","weekNumber","weekDay"),no=hn("year","ordinal"),lo=/(\d{4})-(\d\d)-(\d\d)/,Is=RegExp(`${Qr.source} ?(?:${ts.source}|(${es.source}))?`),so=RegExp(`(?: ${Is.source})?`);function cl(h,r,f){const v=h[r];return Oe(v)?f:wt(v)}function ro(h,r){return[{year:cl(h,r),month:cl(h,r+1,1),day:cl(h,r+2,1)},null,r+3]}function ol(h,r){return[{hours:cl(h,r,0),minutes:cl(h,r+1,0),seconds:cl(h,r+2,0),milliseconds:Br(h[r+3])},null,r+4]}function ss(h,r){const f=!h[r]&&!h[r+1],v=Wl(h[r+1],h[r+2]),S=f?null:pt.instance(v);return[{},S,r+3]}function dl(h,r){const f=h[r]?ve.create(h[r]):null;return[{},f,r+1]}const io=RegExp(`^T?${Qr.source}$`),uo=/^-?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 co(h){const[r,f,v,S,O,z,U,q,oe]=h,be=r[0]==="-",ke=q&&q[0]==="-",Fe=(De,vt=!1)=>De!==void 0&&(vt||De&&be)?-De:De;return[{years:Fe(dn(f)),months:Fe(dn(v)),weeks:Fe(dn(S)),days:Fe(dn(O)),hours:Fe(dn(z)),minutes:Fe(dn(U)),seconds:Fe(dn(q),q==="-0"),milliseconds:Fe(Br(oe),ke)}]}const oo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function rs(h,r,f,v,S,O,z){const U={year:r.length===2?Ql(wt(r)):wt(r),month:Zs.indexOf(f)+1,day:wt(v),hour:wt(S),minute:wt(O)};return z&&(U.second=wt(z)),h&&(U.weekday=h.length>3?Il.indexOf(h)+1:_a.indexOf(h)+1),U}const fo=/^(?:(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 ho(h){const[,r,f,v,S,O,z,U,q,oe,be,ke]=h,Fe=rs(r,S,v,f,O,z,U);let De;return q?De=oo[q]:oe?De=0:De=Wl(be,ke),[Fe,new pt(De)]}function mo(h){return h.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Su=/^(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$/,xo=/^(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$/,go=/^(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 Nu(h){const[,r,f,v,S,O,z,U]=h;return[rs(r,S,v,f,O,z,U),pt.utcInstance]}function yo(h){const[,r,f,v,S,O,z,U]=h;return[rs(r,U,f,v,S,O,z),pt.utcInstance]}const vo=Ka(ls,ns),po=Ka(Js,ns),bo=Ka(bu,ns),So=Ka(Xs),wu=Mn(ro,ol,ss,dl),Wr=Mn(ao,ol,ss,dl),is=Mn(no,ol,ss,dl),No=Mn(ol,ss,dl);function ju(h){return jt(h,[vo,wu],[po,Wr],[bo,is],[So,No])}function Eu(h){return jt(mo(h),[fo,ho])}function Mu(h){return jt(h,[Su,Nu],[xo,Nu],[go,yo])}function Tu(h){return jt(h,[uo,co])}const Cu=Mn(ol);function fl(h){return jt(h,[io,Cu])}const wo=Ka(lo,so),jo=Ka(Is),Eo=Mn(ol,ss,dl);function Ou(h){return jt(h,[wo,wu],[jo,Eo])}const Xr="Invalid Duration",hl={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}},us={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},...hl},ca=146097/400,Pa=146097/4800,Du={years:{quarters:4,months:12,weeks:ca/7,days:ca,hours:ca*24,minutes:ca*24*60,seconds:ca*24*60*60,milliseconds:ca*24*60*60*1e3},quarters:{months:3,weeks:ca/28,days:ca/4,hours:ca*24/4,minutes:ca*24*60/4,seconds:ca*24*60*60/4,milliseconds:ca*24*60*60*1e3/4},months:{weeks:Pa/7,days:Pa,hours:Pa*24,minutes:Pa*24*60,seconds:Pa*24*60*60,milliseconds:Pa*24*60*60*1e3},...hl},mn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Jr=mn.slice(0).reverse();function pa(h,r,f=!1){const v={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 Ze(v)}function Ir(h,r){var f;let v=(f=r.milliseconds)!=null?f:0;for(const S of Jr.slice(1))r[S]&&(v+=r[S]*h[S].milliseconds);return v}function Kr(h,r){const f=Ir(h,r)<0?-1:1;mn.reduceRight((v,S)=>{if(Oe(r[S]))return v;if(v){const O=r[v]*f,z=h[S][v],U=Math.floor(O/z);r[S]+=U*f,r[v]-=U*z*f}return S},null),mn.reduce((v,S)=>{if(Oe(r[S]))return v;if(v){const O=r[v]%1;r[v]-=O,r[S]+=O*h[v][S]}return S},null)}function Pr(h){const r={};for(const[f,v]of Object.entries(h))v!==0&&(r[f]=v);return r}class Ze{constructor(r){const f=r.conversionAccuracy==="longterm"||!1;let v=f?Du:us;r.matrix&&(v=r.matrix),this.values=r.values,this.loc=r.loc||Ye.create(),this.conversionAccuracy=f?"longterm":"casual",this.invalid=r.invalid||null,this.matrix=v,this.isLuxonDuration=!0}static fromMillis(r,f){return Ze.fromObject({milliseconds:r},f)}static fromObject(r,f={}){if(r==null||typeof r!="object")throw new y(`Duration.fromObject: argument expected to be an object, got ${r===null?"null":typeof r}`);return new Ze({values:Ja(r,Ze.normalizeUnit),loc:Ye.fromObject(f),conversionAccuracy:f.conversionAccuracy,matrix:f.matrix})}static fromDurationLike(r){if(ua(r))return Ze.fromMillis(r);if(Ze.isDuration(r))return r;if(typeof r=="object")return Ze.fromObject(r);throw new y(`Unknown duration argument ${r} of type ${typeof r}`)}static fromISO(r,f){const[v]=Tu(r);return v?Ze.fromObject(v,f):Ze.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static fromISOTime(r,f){const[v]=fl(r);return v?Ze.fromObject(v,f):Ze.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static invalid(r,f=null){if(!r)throw new y("need to specify a reason the Duration is invalid");const v=r instanceof ia?r:new ia(r,f);if(ot.throwOnInvalid)throw new o(v);return new Ze({invalid:v})}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 m(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 v={...f,floor:f.round!==!1&&f.floor!==!1};return this.isValid?zt.create(this.loc,v).formatDurationFromString(this,r):Xr}toHuman(r={}){if(!this.isValid)return Xr;const f=r.showZeros!==!1,v=mn.map(S=>{const O=this.values[S];return Oe(O)||O===0&&!f?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...r,unit:S.slice(0,-1)}).format(O)}).filter(S=>S);return this.loc.listFormatter({type:"conjunction",style:r.listStyle||"narrow",...r}).format(v)}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+=Fl(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},Me.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?Ir(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(r){if(!this.isValid)return this;const f=Ze.fromDurationLike(r),v={};for(const S of mn)(wn(f.values,S)||wn(this.values,S))&&(v[S]=f.get(S)+this.get(S));return pa(this,{values:v},!0)}minus(r){if(!this.isValid)return this;const f=Ze.fromDurationLike(r);return this.plus(f.negate())}mapUnits(r){if(!this.isValid)return this;const f={};for(const v of Object.keys(this.values))f[v]=Yr(r(this.values[v],v));return pa(this,{values:f},!0)}get(r){return this[Ze.normalizeUnit(r)]}set(r){if(!this.isValid)return this;const f={...this.values,...Ja(r,Ze.normalizeUnit)};return pa(this,{values:f})}reconfigure({locale:r,numberingSystem:f,conversionAccuracy:v,matrix:S}={}){const z={loc:this.loc.clone({locale:r,numberingSystem:f}),matrix:S,conversionAccuracy:v};return pa(this,z)}as(r){return this.isValid?this.shiftTo(r).get(r):NaN}normalize(){if(!this.isValid)return this;const r=this.toObject();return Kr(this.matrix,r),pa(this,{values:r},!0)}rescale(){if(!this.isValid)return this;const r=Pr(this.normalize().shiftToAll().toObject());return pa(this,{values:r},!0)}shiftTo(...r){if(!this.isValid)return this;if(r.length===0)return this;r=r.map(z=>Ze.normalizeUnit(z));const f={},v={},S=this.toObject();let O;for(const z of mn)if(r.indexOf(z)>=0){O=z;let U=0;for(const oe in v)U+=this.matrix[oe][z]*v[oe],v[oe]=0;ua(S[z])&&(U+=S[z]);const q=Math.trunc(U);f[z]=q,v[z]=(U*1e3-q*1e3)/1e3}else ua(S[z])&&(v[z]=S[z]);for(const z in v)v[z]!==0&&(f[O]+=z===O?v[z]:v[z]/this.matrix[O][z]);return Kr(this.matrix,f),pa(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 pa(this,{values:r},!0)}removeZeros(){if(!this.isValid)return this;const r=Pr(this.values);return pa(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(v,S){return v===void 0||v===0?S===void 0||S===0:v===S}for(const v of mn)if(!f(this.values[v],r.values[v]))return!1;return!0}}const ml="Invalid Interval";function Mo(h,r){return!h||!h.isValid?ht.invalid("missing or invalid start"):!r||!r.isValid?ht.invalid("missing or invalid end"):r<h?ht.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 ht{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 y("need to specify a reason the Interval is invalid");const v=r instanceof ia?r:new ia(r,f);if(ot.throwOnInvalid)throw new d(v);return new ht({invalid:v})}static fromDateTimes(r,f){const v=fa(r),S=fa(f),O=Mo(v,S);return O??new ht({start:v,end:S})}static after(r,f){const v=Ze.fromDurationLike(f),S=fa(r);return ht.fromDateTimes(S,S.plus(v))}static before(r,f){const v=Ze.fromDurationLike(f),S=fa(r);return ht.fromDateTimes(S.minus(v),S)}static fromISO(r,f){const[v,S]=(r||"").split("/",2);if(v&&S){let O,z;try{O=Me.fromISO(v,f),z=O.isValid}catch{z=!1}let U,q;try{U=Me.fromISO(S,f),q=U.isValid}catch{q=!1}if(z&&q)return ht.fromDateTimes(O,U);if(z){const oe=Ze.fromISO(S,f);if(oe.isValid)return ht.after(O,oe)}else if(q){const oe=Ze.fromISO(v,f);if(oe.isValid)return ht.before(U,oe)}}return ht.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 v=this.start.startOf(r,f);let S;return f!=null&&f.useLocaleWeeks?S=this.end.reconfigure({locale:v.locale}):S=this.end,S=S.startOf(r,f),Math.floor(S.diff(v,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?ht.fromDateTimes(r||this.s,f||this.e):this}splitAt(...r){if(!this.isValid)return[];const f=r.map(fa).filter(z=>this.contains(z)).sort((z,U)=>z.toMillis()-U.toMillis()),v=[];let{s:S}=this,O=0;for(;S<this.e;){const z=f[O]||this.e,U=+z>+this.e?this.e:z;v.push(ht.fromDateTimes(S,U)),S=U,O+=1}return v}splitBy(r){const f=Ze.fromDurationLike(r);if(!this.isValid||!f.isValid||f.as("milliseconds")===0)return[];let{s:v}=this,S=1,O;const z=[];for(;v<this.e;){const U=this.start.plus(f.mapUnits(q=>q*S));O=+U>+this.e?this.e:U,z.push(ht.fromDateTimes(v,O)),v=O,S+=1}return z}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,v=this.e<r.e?this.e:r.e;return f>=v?null:ht.fromDateTimes(f,v)}union(r){if(!this.isValid)return this;const f=this.s<r.s?this.s:r.s,v=this.e>r.e?this.e:r.e;return ht.fromDateTimes(f,v)}static merge(r){const[f,v]=r.sort((S,O)=>S.s-O.s).reduce(([S,O],z)=>O?O.overlaps(z)||O.abutsStart(z)?[S,O.union(z)]:[S.concat([O]),z]:[S,z],[[],null]);return v&&f.push(v),f}static xor(r){let f=null,v=0;const S=[],O=r.map(q=>[{time:q.s,type:"s"},{time:q.e,type:"e"}]),z=Array.prototype.concat(...O),U=z.sort((q,oe)=>q.time-oe.time);for(const q of U)v+=q.type==="s"?1:-1,v===1?f=q.time:(f&&+f!=+q.time&&S.push(ht.fromDateTimes(f,q.time)),f=null);return ht.merge(S)}difference(...r){return ht.xor([this].concat(r)).map(f=>this.intersection(f)).filter(f=>f&&!f.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:ml}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(r=E,f={}){return this.isValid?zt.create(this.s.loc.clone(f),r).formatInterval(this):ml}toISO(r){return this.isValid?`${this.s.toISO(r)}/${this.e.toISO(r)}`:ml}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ml}toISOTime(r){return this.isValid?`${this.s.toISOTime(r)}/${this.e.toISOTime(r)}`:ml}toFormat(r,{separator:f=" – "}={}){return this.isValid?`${this.s.toFormat(r)}${f}${this.e.toFormat(r)}`:ml}toDuration(r,f){return this.isValid?this.e.diff(this.s,r,f):Ze.invalid(this.invalidReason)}mapEndpoints(r){return ht.fromDateTimes(r(this.s),r(this.e))}}class cs{static hasDST(r=ot.defaultZone){const f=Me.now().setZone(r).set({month:12});return!r.isUniversal&&f.offset!==f.set({month:6}).offset}static isValidIANAZone(r){return ve.isValidZone(r)}static normalizeZone(r){return Yt(r,ot.defaultZone)}static getStartOfWeek({locale:r=null,locObj:f=null}={}){return(f||Ye.create(r)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:r=null,locObj:f=null}={}){return(f||Ye.create(r)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:r=null,locObj:f=null}={}){return(f||Ye.create(r)).getWeekendDays().slice()}static months(r="long",{locale:f=null,numberingSystem:v=null,locObj:S=null,outputCalendar:O="gregory"}={}){return(S||Ye.create(f,v,O)).months(r)}static monthsFormat(r="long",{locale:f=null,numberingSystem:v=null,locObj:S=null,outputCalendar:O="gregory"}={}){return(S||Ye.create(f,v,O)).months(r,!0)}static weekdays(r="long",{locale:f=null,numberingSystem:v=null,locObj:S=null}={}){return(S||Ye.create(f,v,null)).weekdays(r)}static weekdaysFormat(r="long",{locale:f=null,numberingSystem:v=null,locObj:S=null}={}){return(S||Ye.create(f,v,null)).weekdays(r,!0)}static meridiems({locale:r=null}={}){return Ye.create(r).meridiems()}static eras(r="short",{locale:f=null}={}){return Ye.create(f,null,"gregory").eras(r)}static features(){return{relative:qr(),localeWeek:on()}}}function aa(h,r){const f=S=>S.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),v=f(r)-f(h);return Math.floor(Ze.fromMillis(v).as("days"))}function os(h,r,f){const v=[["years",(q,oe)=>oe.year-q.year],["quarters",(q,oe)=>oe.quarter-q.quarter+(oe.year-q.year)*4],["months",(q,oe)=>oe.month-q.month+(oe.year-q.year)*12],["weeks",(q,oe)=>{const be=aa(q,oe);return(be-be%7)/7}],["days",aa]],S={},O=h;let z,U;for(const[q,oe]of v)f.indexOf(q)>=0&&(z=q,S[q]=oe(h,r),U=O.plus(S),U>r?(S[q]--,h=O.plus(S),h>r&&(U=h,S[q]--,h=O.plus(S))):h=U);return[h,S,U,z]}function Ru(h,r,f,v){let[S,O,z,U]=os(h,r,f);const q=r-S,oe=f.filter(ke=>["hours","minutes","seconds","milliseconds"].indexOf(ke)>=0);oe.length===0&&(z<r&&(z=S.plus({[U]:1})),z!==S&&(O[U]=(O[U]||0)+q/(z-S)));const be=Ze.fromObject(O,v);return oe.length>0?Ze.fromMillis(q,v).shiftTo(...oe).plus(be):be}const _u="missing Intl.DateTimeFormat.formatToParts support";function Xe(h,r=f=>f){return{regex:h,deser:([f])=>r(eo(f))}}const Ks="[ ]",Au=new RegExp(Ks,"g");function xl(h){return h.replace(/\./g,"\\.?").replace(Au,Ks)}function Ps(h){return h.replace(/\./g,"").replace(Au," ").toLowerCase()}function Ft(h,r){return h===null?null:{regex:RegExp(h.map(xl).join("|")),deser:([f])=>h.findIndex(v=>Ps(f)===Ps(v))+r}}function er(h,r){return{regex:h,deser:([,f,v])=>Wl(f,v),groups:r}}function ds(h){return{regex:h,deser:([r])=>r}}function Tn(h){return h.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function gl(h,r){const f=ea(r),v=ea(r,"{2}"),S=ea(r,"{3}"),O=ea(r,"{4}"),z=ea(r,"{6}"),U=ea(r,"{1,2}"),q=ea(r,"{1,3}"),oe=ea(r,"{1,6}"),be=ea(r,"{1,9}"),ke=ea(r,"{2,4}"),Fe=ea(r,"{4,6}"),De=Vt=>({regex:RegExp(Tn(Vt.val)),deser:([xn])=>xn,literal:!0}),qt=(Vt=>{if(h.literal)return De(Vt);switch(Vt.val){case"G":return Ft(r.eras("short"),0);case"GG":return Ft(r.eras("long"),0);case"y":return Xe(oe);case"yy":return Xe(ke,Ql);case"yyyy":return Xe(O);case"yyyyy":return Xe(Fe);case"yyyyyy":return Xe(z);case"M":return Xe(U);case"MM":return Xe(v);case"MMM":return Ft(r.months("short",!0),1);case"MMMM":return Ft(r.months("long",!0),1);case"L":return Xe(U);case"LL":return Xe(v);case"LLL":return Ft(r.months("short",!1),1);case"LLLL":return Ft(r.months("long",!1),1);case"d":return Xe(U);case"dd":return Xe(v);case"o":return Xe(q);case"ooo":return Xe(S);case"HH":return Xe(v);case"H":return Xe(U);case"hh":return Xe(v);case"h":return Xe(U);case"mm":return Xe(v);case"m":return Xe(U);case"q":return Xe(U);case"qq":return Xe(v);case"s":return Xe(U);case"ss":return Xe(v);case"S":return Xe(q);case"SSS":return Xe(S);case"u":return ds(be);case"uu":return ds(U);case"uuu":return Xe(f);case"a":return Ft(r.meridiems(),0);case"kkkk":return Xe(O);case"kk":return Xe(ke,Ql);case"W":return Xe(U);case"WW":return Xe(v);case"E":case"c":return Xe(f);case"EEE":return Ft(r.weekdays("short",!1),1);case"EEEE":return Ft(r.weekdays("long",!1),1);case"ccc":return Ft(r.weekdays("short",!0),1);case"cccc":return Ft(r.weekdays("long",!0),1);case"Z":case"ZZ":return er(new RegExp(`([+-]${U.source})(?::(${v.source}))?`),2);case"ZZZ":return er(new RegExp(`([+-]${U.source})(${v.source})?`),2);case"z":return ds(/[a-z_+-/]{1,256}?/i);case" ":return ds(/[^\S\n\r]/);default:return De(Vt)}})(h)||{invalidReason:_u};return qt.token=h,qt}const ei={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 ku(h,r,f){const{type:v,value:S}=h;if(v==="literal"){const q=/^\s+$/.test(S);return{literal:!q,val:q?" ":S}}const O=r[v];let z=v;v==="hour"&&(r.hour12!=null?z=r.hour12?"hour12":"hour24":r.hourCycle!=null?r.hourCycle==="h11"||r.hourCycle==="h12"?z="hour12":z="hour24":z=f.hour12?"hour12":"hour24");let U=ei[z];if(typeof U=="object"&&(U=U[O]),U)return{literal:!1,val:U}}function Cn(h){return[`^${h.map(f=>f.regex).reduce((f,v)=>`${f}(${v.source})`,"")}$`,h]}function zu(h,r,f){const v=h.match(r);if(v){const S={};let O=1;for(const z in f)if(wn(f,z)){const U=f[z],q=U.groups?U.groups+1:1;!U.literal&&U.token&&(S[U.token.val[0]]=U.deser(v.slice(O,O+q))),O+=q}return[v,S]}else return[v,{}]}function Uu(h){const r=O=>{switch(O){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,v;return Oe(h.z)||(f=ve.create(h.z)),Oe(h.Z)||(f||(f=new pt(h.Z)),v=h.Z),Oe(h.q)||(h.M=(h.q-1)*3+1),Oe(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),Oe(h.u)||(h.S=Br(h.u)),[Object.keys(h).reduce((O,z)=>{const U=r(z);return U&&(O[U]=h[z]),O},{}),f,v]}let tr=null;function Co(){return tr||(tr=Me.fromMillis(1555555555555)),tr}function Oo(h,r){if(h.literal)return h;const f=zt.macroTokenToFormatOpts(h.val),v=oa(f,r);return v==null||v.includes(void 0)?h:v}function Hu(h,r){return Array.prototype.concat(...h.map(f=>Oo(f,r)))}class ti{constructor(r,f){if(this.locale=r,this.format=f,this.tokens=Hu(zt.parseFormat(f),r),this.units=this.tokens.map(v=>gl(v,r)),this.disqualifyingUnit=this.units.find(v=>v.invalidReason),!this.disqualifyingUnit){const[v,S]=Cn(this.units);this.regex=RegExp(v,"i"),this.handlers=S}}explainFromTokens(r){if(this.isValid){const[f,v]=zu(r,this.regex,this.handlers),[S,O,z]=v?Uu(v):[null,null,void 0];if(wn(v,"a")&&wn(v,"H"))throw new x("Can't include meridiem when specifying 24-hour format");return{input:r,tokens:this.tokens,regex:this.regex,rawMatches:f,matches:v,result:S,zone:O,specificOffset:z}}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 ai(h,r,f){return new ti(h,f).explainFromTokens(r)}function ni(h,r,f){const{result:v,zone:S,specificOffset:O,invalidReason:z}=ai(h,r,f);return[v,S,O,z]}function oa(h,r){if(!h)return null;const v=zt.create(r,h).dtFormatter(Co()),S=v.formatToParts(),O=v.resolvedOptions();return S.map(z=>ku(z,h,O))}const yl="Invalid DateTime",sa=864e13;function Aa(h){return new ia("unsupported zone",`the zone "${h.name}" is not supported`)}function fs(h){return h.weekData===null&&(h.weekData=kt(h.c)),h.weekData}function vl(h){return h.localWeekData===null&&(h.localWeekData=kt(h.c,h.loc.getMinDaysInFirstWeek(),h.loc.getStartOfWeek())),h.localWeekData}function ka(h,r){const f={ts:h.ts,zone:h.zone,c:h.c,o:h.o,loc:h.loc,invalid:h.invalid};return new Me({...f,...r,old:f})}function ar(h,r,f){let v=h-r*60*1e3;const S=f.offset(v);if(r===S)return[v,r];v-=(S-r)*60*1e3;const O=f.offset(v);return S===O?[v,S]:[h-Math.min(S,O)*60*1e3,Math.max(S,O)]}function za(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 hs(h,r,f){return ar(Zt(h),r,f)}function ms(h,r){const f=h.o,v=h.c.year+Math.trunc(r.years),S=h.c.month+Math.trunc(r.months)+Math.trunc(r.quarters)*3,O={...h.c,year:v,month:S,day:Math.min(h.c.day,$s(v,S))+Math.trunc(r.days)+Math.trunc(r.weeks)*7},z=Ze.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=Zt(O);let[q,oe]=ar(U,f,h.zone);return z!==0&&(q+=z,oe=h.zone.offset(q)),{ts:q,o:oe}}function ba(h,r,f,v,S,O){const{setZone:z,zone:U}=f;if(h&&Object.keys(h).length!==0||r){const q=r||U,oe=Me.fromObject(h,{...f,zone:q,specificOffset:O});return z?oe:oe.setZone(U)}else return Me.invalid(new ia("unparsable",`the input "${S}" can't be parsed as ${v}`))}function nr(h,r,f=!0){return h.isValid?zt.create(Ye.create("en-US"),{allowZ:f,forceSimple:!0}).formatDateTimeFromString(h,r):null}function Qt(h,r,f){const v=h.c.year>9999||h.c.year<0;let S="";if(v&&h.c.year>=0&&(S+="+"),S+=tt(h.c.year,v?6:4),f==="year")return S;if(r){if(S+="-",S+=tt(h.c.month),f==="month")return S;S+="-"}else if(S+=tt(h.c.month),f==="month")return S;return S+=tt(h.c.day),S}function lr(h,r,f,v,S,O,z){let U=!f||h.c.millisecond!==0||h.c.second!==0,q="";switch(z){case"day":case"month":case"year":break;default:if(q+=tt(h.c.hour),z==="hour")break;if(r){if(q+=":",q+=tt(h.c.minute),z==="minute")break;U&&(q+=":",q+=tt(h.c.second))}else{if(q+=tt(h.c.minute),z==="minute")break;U&&(q+=tt(h.c.second))}if(z==="second")break;U&&(!v||h.c.millisecond!==0)&&(q+=".",q+=tt(h.c.millisecond,3))}return S&&(h.isOffsetFixed&&h.offset===0&&!O?q+="Z":h.o<0?(q+="-",q+=tt(Math.trunc(-h.o/60)),q+=":",q+=tt(Math.trunc(-h.o%60))):(q+="+",q+=tt(Math.trunc(h.o/60)),q+=":",q+=tt(Math.trunc(h.o%60)))),O&&(q+="["+h.zone.ianaName+"]"),q}const Ua={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Lu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},sr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ha=["year","month","day","hour","minute","second","millisecond"],li=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],qu=["year","ordinal","hour","minute","second","millisecond"];function pl(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 m(h);return r}function si(h){switch(h.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return pl(h)}}function da(h){if(en===void 0&&(en=ot.now()),h.type!=="iana")return h.offset(en);const r=h.name;let f=na.get(r);return f===void 0&&(f=h.offset(en),na.set(r,f)),f}function On(h,r){const f=Yt(r.zone,ot.defaultZone);if(!f.isValid)return Me.invalid(Aa(f));const v=Ye.fromObject(r);let S,O;if(Oe(h.year))S=ot.now();else{for(const q of Ha)Oe(h[q])&&(h[q]=Ua[q]);const z=Bs(h)||Nn(h);if(z)return Me.invalid(z);const U=da(f);[S,O]=hs(h,U,f)}return new Me({ts:S,zone:f,loc:v,o:O})}function Dn(h,r,f){const v=Oe(f.round)?!0:f.round,S=Oe(f.rounding)?"trunc":f.rounding,O=(U,q)=>(U=Fl(U,v||f.calendary?0:2,f.calendary?"round":S),r.loc.clone(f).relFormatter(f).format(U,q)),z=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 O(z(f.unit),f.unit);for(const U of f.units){const q=z(U);if(Math.abs(q)>=1)return O(q,U)}return O(h>r?-0:0,f.units[f.units.length-1])}function xs(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 en;const na=new Map;class Me{constructor(r){const f=r.zone||ot.defaultZone;let v=r.invalid||(Number.isNaN(r.ts)?new ia("invalid input"):null)||(f.isValid?null:Aa(f));this.ts=Oe(r.ts)?ot.now():r.ts;let S=null,O=null;if(!v)if(r.old&&r.old.ts===this.ts&&r.old.zone.equals(f))[S,O]=[r.old.c,r.old.o];else{const U=ua(r.o)&&!r.old?r.o:f.offset(this.ts);S=za(this.ts,U),v=Number.isNaN(S.year)?new ia("invalid input"):null,S=v?null:S,O=v?null:U}this._zone=f,this.loc=r.loc||Ye.create(),this.invalid=v,this.weekData=null,this.localWeekData=null,this.c=S,this.o=O,this.isLuxonDateTime=!0}static now(){return new Me({})}static local(){const[r,f]=xs(arguments),[v,S,O,z,U,q,oe]=f;return On({year:v,month:S,day:O,hour:z,minute:U,second:q,millisecond:oe},r)}static utc(){const[r,f]=xs(arguments),[v,S,O,z,U,q,oe]=f;return r.zone=pt.utcInstance,On({year:v,month:S,day:O,hour:z,minute:U,second:q,millisecond:oe},r)}static fromJSDate(r,f={}){const v=mu(r)?r.valueOf():NaN;if(Number.isNaN(v))return Me.invalid("invalid input");const S=Yt(f.zone,ot.defaultZone);return S.isValid?new Me({ts:v,zone:S,loc:Ye.fromObject(f)}):Me.invalid(Aa(S))}static fromMillis(r,f={}){if(ua(r))return r<-sa||r>sa?Me.invalid("Timestamp out of range"):new Me({ts:r,zone:Yt(f.zone,ot.defaultZone),loc:Ye.fromObject(f)});throw new y(`fromMillis requires a numerical input, but received a ${typeof r} with value ${r}`)}static fromSeconds(r,f={}){if(ua(r))return new Me({ts:r*1e3,zone:Yt(f.zone,ot.defaultZone),loc:Ye.fromObject(f)});throw new y("fromSeconds requires a numerical input")}static fromObject(r,f={}){r=r||{};const v=Yt(f.zone,ot.defaultZone);if(!v.isValid)return Me.invalid(Aa(v));const S=Ye.fromObject(f),O=Ja(r,si),{minDaysInFirstWeek:z,startOfWeek:U}=fu(O,S),q=ot.now(),oe=Oe(f.specificOffset)?v.offset(q):f.specificOffset,be=!Oe(O.ordinal),ke=!Oe(O.year),Fe=!Oe(O.month)||!Oe(O.day),De=ke||Fe,vt=O.weekYear||O.weekNumber;if((De||be)&&vt)throw new x("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Fe&&be)throw new x("Can't mix ordinal dates with month/day");const qt=vt||O.weekday&&!De;let Vt,xn,tn=za(q,oe);qt?(Vt=li,xn=Lu,tn=kt(tn,z,U)):be?(Vt=qu,xn=sr,tn=Gl(tn)):(Vt=Ha,xn=Ua);let rr=!1;for(const Va of Vt){const ir=O[Va];Oe(ir)?rr?O[Va]=xn[Va]:O[Va]=tn[Va]:rr=!0}const Rn=qt?hu(O,z,U):be?Zl(O):Bs(O),qa=Rn||Nn(O);if(qa)return Me.invalid(qa);const gn=qt?Sn(O,z,U):be?du(O):O,[an,ri]=hs(gn,oe,v),_n=new Me({ts:an,zone:v,o:ri,loc:S});return O.weekday&&De&&r.weekday!==_n.weekday?Me.invalid("mismatched weekday",`you can't specify both a weekday of ${O.weekday} and a date of ${_n.toISO()}`):_n.isValid?_n:Me.invalid(_n.invalid)}static fromISO(r,f={}){const[v,S]=ju(r);return ba(v,S,f,"ISO 8601",r)}static fromRFC2822(r,f={}){const[v,S]=Eu(r);return ba(v,S,f,"RFC 2822",r)}static fromHTTP(r,f={}){const[v,S]=Mu(r);return ba(v,S,f,"HTTP",f)}static fromFormat(r,f,v={}){if(Oe(r)||Oe(f))throw new y("fromFormat requires an input string and a format");const{locale:S=null,numberingSystem:O=null}=v,z=Ye.fromOpts({locale:S,numberingSystem:O,defaultToEN:!0}),[U,q,oe,be]=ni(z,r,f);return be?Me.invalid(be):ba(U,q,v,`format ${f}`,r,oe)}static fromString(r,f,v={}){return Me.fromFormat(r,f,v)}static fromSQL(r,f={}){const[v,S]=Ou(r);return ba(v,S,f,"SQL",r)}static invalid(r,f=null){if(!r)throw new y("need to specify a reason the DateTime is invalid");const v=r instanceof ia?r:new ia(r,f);if(ot.throwOnInvalid)throw new u(v);return new Me({invalid:v})}static isDateTime(r){return r&&r.isLuxonDateTime||!1}static parseFormatForOpts(r,f={}){const v=oa(r,Ye.fromObject(f));return v?v.map(S=>S?S.val:null).join(""):null}static expandFormat(r,f={}){return Hu(zt.parseFormat(r),Ye.fromObject(f)).map(S=>S.val).join("")}static resetCache(){en=void 0,na.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?fs(this).weekYear:NaN}get weekNumber(){return this.isValid?fs(this).weekNumber:NaN}get weekday(){return this.isValid?fs(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?vl(this).weekday:NaN}get localWeekNumber(){return this.isValid?vl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?vl(this).weekYear:NaN}get ordinal(){return this.isValid?Gl(this.c).ordinal:NaN}get monthShort(){return this.isValid?cs.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?cs.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?cs.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?cs.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,v=Zt(this.c),S=this.zone.offset(v-r),O=this.zone.offset(v+r),z=this.zone.offset(v-S*f),U=this.zone.offset(v-O*f);if(z===U)return[this];const q=v-z*f,oe=v-U*f,be=za(q,z),ke=za(oe,U);return be.hour===ke.hour&&be.minute===ke.minute&&be.second===ke.second&&be.millisecond===ke.millisecond?[ka(this,{ts:q}),ka(this,{ts:oe})]:[this]}get isInLeapYear(){return rl(this.year)}get daysInMonth(){return $s(this.year,this.month)}get daysInYear(){return this.isValid?Xa(this.year):NaN}get weeksInWeekYear(){return this.isValid?il(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?il(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(r={}){const{locale:f,numberingSystem:v,calendar:S}=zt.create(this.loc.clone(r),r).resolvedOptions(this);return{locale:f,numberingSystem:v,outputCalendar:S}}toUTC(r=0,f={}){return this.setZone(pt.instance(r),f)}toLocal(){return this.setZone(ot.defaultZone)}setZone(r,{keepLocalTime:f=!1,keepCalendarTime:v=!1}={}){if(r=Yt(r,ot.defaultZone),r.equals(this.zone))return this;if(r.isValid){let S=this.ts;if(f||v){const O=r.offset(this.ts),z=this.toObject();[S]=hs(z,O,r)}return ka(this,{ts:S,zone:r})}else return Me.invalid(Aa(r))}reconfigure({locale:r,numberingSystem:f,outputCalendar:v}={}){const S=this.loc.clone({locale:r,numberingSystem:f,outputCalendar:v});return ka(this,{loc:S})}setLocale(r){return this.reconfigure({locale:r})}set(r){if(!this.isValid)return this;const f=Ja(r,si),{minDaysInFirstWeek:v,startOfWeek:S}=fu(f,this.loc),O=!Oe(f.weekYear)||!Oe(f.weekNumber)||!Oe(f.weekday),z=!Oe(f.ordinal),U=!Oe(f.year),q=!Oe(f.month)||!Oe(f.day),oe=U||q,be=f.weekYear||f.weekNumber;if((oe||z)&&be)throw new x("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(q&&z)throw new x("Can't mix ordinal dates with month/day");let ke;O?ke=Sn({...kt(this.c,v,S),...f},v,S):Oe(f.ordinal)?(ke={...this.toObject(),...f},Oe(f.day)&&(ke.day=Math.min($s(ke.year,ke.month),ke.day))):ke=du({...Gl(this.c),...f});const[Fe,De]=hs(ke,this.o,this.zone);return ka(this,{ts:Fe,o:De})}plus(r){if(!this.isValid)return this;const f=Ze.fromDurationLike(r);return ka(this,ms(this,f))}minus(r){if(!this.isValid)return this;const f=Ze.fromDurationLike(r).negate();return ka(this,ms(this,f))}startOf(r,{useLocaleWeeks:f=!1}={}){if(!this.isValid)return this;const v={},S=Ze.normalizeUnit(r);switch(S){case"years":v.month=1;case"quarters":case"months":v.day=1;case"weeks":case"days":v.hour=0;case"hours":v.minute=0;case"minutes":v.second=0;case"seconds":v.millisecond=0;break}if(S==="weeks")if(f){const O=this.loc.getStartOfWeek(),{weekday:z}=this;z<O&&(v.weekNumber=this.weekNumber-1),v.weekday=O}else v.weekday=1;if(S==="quarters"){const O=Math.ceil(this.month/3);v.month=(O-1)*3+1}return this.set(v)}endOf(r,f){return this.isValid?this.plus({[r]:1}).startOf(r,f).minus(1):this}toFormat(r,f={}){return this.isValid?zt.create(this.loc.redefaultToEN(f)).formatDateTimeFromString(this,r):yl}toLocaleString(r=E,f={}){return this.isValid?zt.create(this.loc.clone(f),r).formatDateTime(this):yl}toLocaleParts(r={}){return this.isValid?zt.create(this.loc.clone(r),r).formatDateTimeParts(this):[]}toISO({format:r="extended",suppressSeconds:f=!1,suppressMilliseconds:v=!1,includeOffset:S=!0,extendedZone:O=!1,precision:z="milliseconds"}={}){if(!this.isValid)return null;z=pl(z);const U=r==="extended";let q=Qt(this,U,z);return Ha.indexOf(z)>=3&&(q+="T"),q+=lr(this,U,f,v,S,O,z),q}toISODate({format:r="extended",precision:f="day"}={}){return this.isValid?Qt(this,r==="extended",pl(f)):null}toISOWeekDate(){return nr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:r=!1,suppressSeconds:f=!1,includeOffset:v=!0,includePrefix:S=!1,extendedZone:O=!1,format:z="extended",precision:U="milliseconds"}={}){return this.isValid?(U=pl(U),(S&&Ha.indexOf(U)>=3?"T":"")+lr(this,z==="extended",f,r,v,O,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?Qt(this,!0):null}toSQLTime({includeOffset:r=!0,includeZone:f=!1,includeOffsetSpace:v=!0}={}){let S="HH:mm:ss.SSS";return(f||r)&&(v&&(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():yl}[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",v={}){if(!this.isValid||!r.isValid)return Ze.invalid("created by diffing an invalid DateTime");const S={locale:this.locale,numberingSystem:this.numberingSystem,...v},O=sl(f).map(Ze.normalizeUnit),z=r.valueOf()>this.valueOf(),U=z?this:r,q=z?r:this,oe=Ru(U,q,O,S);return z?oe.negate():oe}diffNow(r="milliseconds",f={}){return this.diff(Me.now(),r,f)}until(r){return this.isValid?ht.fromDateTimes(this,r):this}hasSame(r,f,v){if(!this.isValid)return!1;const S=r.valueOf(),O=this.setZone(r.zone,{keepLocalTime:!0});return O.startOf(f,v)<=S&&S<=O.endOf(f,v)}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||Me.fromObject({},{zone:this.zone}),v=r.padding?this<f?-r.padding:r.padding:0;let S=["years","months","days","hours","minutes","seconds"],O=r.unit;return Array.isArray(r.unit)&&(S=r.unit,O=void 0),Dn(f,this.plus(v),{...r,numeric:"always",units:S,unit:O})}toRelativeCalendar(r={}){return this.isValid?Dn(r.base||Me.fromObject({},{zone:this.zone}),this,{...r,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...r){if(!r.every(Me.isDateTime))throw new y("min requires all arguments be DateTimes");return xu(r,f=>f.valueOf(),Math.min)}static max(...r){if(!r.every(Me.isDateTime))throw new y("max requires all arguments be DateTimes");return xu(r,f=>f.valueOf(),Math.max)}static fromFormatExplain(r,f,v={}){const{locale:S=null,numberingSystem:O=null}=v,z=Ye.fromOpts({locale:S,numberingSystem:O,defaultToEN:!0});return ai(z,r,f)}static fromStringExplain(r,f,v={}){return Me.fromFormatExplain(r,f,v)}static buildFormatParser(r,f={}){const{locale:v=null,numberingSystem:S=null}=f,O=Ye.fromOpts({locale:v,numberingSystem:S,defaultToEN:!0});return new ti(O,r)}static fromFormatParser(r,f,v={}){if(Oe(r)||Oe(f))throw new y("fromFormatParser requires an input string and a format parser");const{locale:S=null,numberingSystem:O=null}=v,z=Ye.fromOpts({locale:S,numberingSystem:O,defaultToEN:!0});if(!z.equals(f.locale))throw new y(`fromFormatParser called with a locale of ${z}, but the format parser was created for ${f.locale}`);const{result:U,zone:q,specificOffset:oe,invalidReason:be}=f.explainFromTokens(r);return be?Me.invalid(be):ba(U,q,v,`format ${f.format}`,r,oe)}static get DATE_SHORT(){return E}static get DATE_MED(){return _}static get DATE_MED_WITH_WEEKDAY(){return k}static get DATE_FULL(){return D}static get DATE_HUGE(){return M}static get TIME_SIMPLE(){return C}static get TIME_WITH_SECONDS(){return Y}static get TIME_WITH_SHORT_OFFSET(){return K}static get TIME_WITH_LONG_OFFSET(){return J}static get TIME_24_SIMPLE(){return ne}static get TIME_24_WITH_SECONDS(){return le}static get TIME_24_WITH_SHORT_OFFSET(){return fe}static get TIME_24_WITH_LONG_OFFSET(){return P}static get DATETIME_SHORT(){return F}static get DATETIME_SHORT_WITH_SECONDS(){return $}static get DATETIME_MED(){return A}static get DATETIME_MED_WITH_SECONDS(){return ee}static get DATETIME_MED_WITH_WEEKDAY(){return B}static get DATETIME_FULL(){return de}static get DATETIME_FULL_WITH_SECONDS(){return ye}static get DATETIME_HUGE(){return ge}static get DATETIME_HUGE_WITH_SECONDS(){return Z}}function fa(h){if(Me.isDateTime(h))return h;if(h&&h.valueOf&&ua(h.valueOf()))return Me.fromJSDate(h);if(h&&typeof h=="object")return Me.fromObject(h);throw new y(`Unknown datetime argument: ${h}, of type ${typeof h}`)}const La="3.7.2";return va.DateTime=Me,va.Duration=Ze,va.FixedOffsetZone=pt,va.IANAZone=ve,va.Info=cs,va.Interval=ht,va.InvalidZone=Pt,va.Settings=ot,va.SystemZone=Ne,va.VERSION=La,va.Zone=re,va}var px;function $f(){return px||(px=1,(function(l){var m,y,j,b,p,Mf,E,ql;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const u=_2();var d;(function(D){D.Second="Second",D.Minute="Minute",D.Hour="Hour",D.Day="Day",D.Month="Month",D.Year="Year"})(d||(l.TimeUnit=d={}));var o;(function(D){D.Add="Add",D.Subtract="Subtract"})(o||(l.DateMathOp=o={})),l.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const k=class k{constructor(M,C){et(this,E);et(this,m);et(this,y,null);et(this,j,null);et(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 Y={zone:C};if(M?M instanceof k?(Te(this,m,te(M,m)),Te(this,y,te(M,y)),Te(this,j,te(M,j))):M instanceof Date?Te(this,m,u.DateTime.fromJSDate(M,Y)):typeof M=="number"?Te(this,m,u.DateTime.fromMillis(M,Y)):(Te(this,m,u.DateTime.fromISO(M,Y)),te(this,m).isValid||Te(this,m,u.DateTime.fromRFC2822(M,Y)),te(this,m).isValid||Te(this,m,u.DateTime.fromSQL(M,Y)),te(this,m).isValid||Te(this,m,u.DateTime.fromFormat(M,"EEE, d MMM yyyy HH:mm:ss",Y))):Te(this,m,u.DateTime.local()),!te(this,m).isValid)throw new Error(`CronDate: unhandled timestamp: ${M}`);C&&C!==te(this,m).zoneName&&Te(this,m,te(this,m).setZone(C))}get dstStart(){return te(this,y)}set dstStart(M){Te(this,y,M)}get dstEnd(){return te(this,j)}set dstEnd(M){Te(this,j,M)}addYear(){Te(this,m,te(this,m).plus({years:1}))}addMonth(){Te(this,m,te(this,m).plus({months:1}).startOf("month"))}addDay(){Te(this,m,te(this,m).plus({days:1}).startOf("day"))}addHour(){Te(this,m,te(this,m).plus({hours:1}).startOf("hour"))}addMinute(){Te(this,m,te(this,m).plus({minutes:1}).startOf("minute"))}addSecond(){Te(this,m,te(this,m).plus({seconds:1}))}subtractYear(){Te(this,m,te(this,m).minus({years:1}))}subtractMonth(){Te(this,m,te(this,m).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Te(this,m,te(this,m).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Te(this,m,te(this,m).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Te(this,m,te(this,m).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Te(this,m,te(this,m).minus({seconds:1}))}addUnit(M){te(this,b).add[M]()}subtractUnit(M){te(this,b).subtract[M]()}invokeDateOperation(M,C){if(M===o.Add){this.addUnit(C);return}if(M===o.Subtract){this.subtractUnit(C);return}throw new Error(`Invalid verb: ${M}`)}getDate(){return te(this,m).day}getFullYear(){return te(this,m).year}getDay(){const M=te(this,m).weekday;return M===7?0:M}getMonth(){return te(this,m).month-1}getHours(){return te(this,m).hour}getMinutes(){return te(this,m).minute}getSeconds(){return te(this,m).second}getMilliseconds(){return te(this,m).millisecond}getUTCOffset(){return te(this,m).offset}setStartOfDay(){Te(this,m,te(this,m).startOf("day"))}setEndOfDay(){Te(this,m,te(this,m).endOf("day"))}getTime(){return te(this,m).valueOf()}getUTCDate(){return Ee(this,E,ql).call(this).day}getUTCFullYear(){return Ee(this,E,ql).call(this).year}getUTCDay(){const M=Ee(this,E,ql).call(this).weekday;return M===7?0:M}getUTCMonth(){return Ee(this,E,ql).call(this).month-1}getUTCHours(){return Ee(this,E,ql).call(this).hour}getUTCMinutes(){return Ee(this,E,ql).call(this).minute}getUTCSeconds(){return Ee(this,E,ql).call(this).second}toISOString(){return te(this,m).toUTC().toISO()}toJSON(){return te(this,m).toJSON()}setDate(M){Te(this,m,te(this,m).set({day:M}))}setFullYear(M){Te(this,m,te(this,m).set({year:M}))}setDay(M){Te(this,m,te(this,m).set({weekday:M}))}setMonth(M){Te(this,m,te(this,m).set({month:M+1}))}setHours(M){Te(this,m,te(this,m).set({hour:M}))}setMinutes(M){Te(this,m,te(this,m).set({minute:M}))}setSeconds(M){Te(this,m,te(this,m).set({second:M}))}setMilliseconds(M){Te(this,m,te(this,m).set({millisecond:M}))}toString(){return this.toDate().toString()}toDate(){return te(this,m).toJSDate()}isLastDayOfMonth(){var Y;const{day:M,month:C}=te(this,m);if(C===2){const K=Ee(Y=k,p,Mf).call(Y,te(this,m).year);return M===l.DAYS_IN_MONTH[C-1]-(K?0:1)}return M===l.DAYS_IN_MONTH[C-1]}isLastWeekdayOfMonth(){var K;const{day:M,month:C}=te(this,m);let Y;return C===2?Y=l.DAYS_IN_MONTH[C-1]-(Ee(K=k,p,Mf).call(K,te(this,m).year)?0:1):Y=l.DAYS_IN_MONTH[C-1],M>Y-7}applyDateOperation(M,C,Y){if(C===d.Month||C===d.Day){this.invokeDateOperation(M,C);return}const K=this.getHours();this.invokeDateOperation(M,C);const J=this.getHours(),ne=J-K;ne===2?Y!==24&&(this.dstStart=J):ne===0&&this.getMinutes()===0&&this.getSeconds()===0&&Y!==24&&(this.dstEnd=J)}};m=new WeakMap,y=new WeakMap,j=new WeakMap,b=new WeakMap,p=new WeakSet,Mf=function(M){return M%4===0&&M%100!==0||M%400===0},E=new WeakSet,ql=function(){return te(this,m).toUTC()},et(k,p);let x=k;l.CronDate=x,l.default=x})(gf)),gf}var bx;function A2(){if(bx)return Fi;bx=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.CronMonth=void 0;const l=$f(),u=As(),d=1,o=12,x=Object.freeze([]);let m=class extends u.CronField{static get min(){return d}static get max(){return o}static get chars(){return x}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}};return Fi.CronMonth=m,Fi}var Qi={},Sx;function k2(){if(Sx)return Qi;Sx=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronSecond=void 0;const l=As(),u=0,d=59,o=Object.freeze([]);let x=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(y,j){super(y,j),this.validate()}get values(){return super.values}};return Qi.CronSecond=x,Qi}var Nx;function Gf(){return Nx||(Nx=1,(function(l){var u=Ms&&Ms.__createBinding||(Object.create?(function(o,x,m,y){y===void 0&&(y=m);var j=Object.getOwnPropertyDescriptor(x,m);(!j||("get"in j?!x.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return x[m]}}),Object.defineProperty(o,y,j)}):(function(o,x,m,y){y===void 0&&(y=m),o[y]=x[m]})),d=Ms&&Ms.__exportStar||function(o,x){for(var m in o)m!=="default"&&!Object.prototype.hasOwnProperty.call(x,m)&&u(x,o,m)};Object.defineProperty(l,"__esModule",{value:!0}),d(T2(),l),d(C2(),l),d(O2(),l),d(As(),l),d(D2(),l),d(R2(),l),d(A2(),l),d(k2(),l)})(Ms)),Ms}var wx;function Dg(){var d,o,x,m,y,j,b,p,Cg,Og;if(wx)return Vi;wx=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.CronFieldCollection=void 0;const l=Gf();let u=(p=class{constructor({second:k,minute:D,hour:M,dayOfMonth:C,month:Y,dayOfWeek:K}){et(this,d);et(this,o);et(this,x);et(this,m);et(this,y);et(this,j);if(!k)throw new Error("Validation error, Field second is missing");if(!D)throw new Error("Validation error, Field minute is missing");if(!M)throw new Error("Validation error, Field hour is missing");if(!C)throw new Error("Validation error, Field dayOfMonth is missing");if(!Y)throw new Error("Validation error, Field month is missing");if(!K)throw new Error("Validation error, Field dayOfWeek is missing");if(Y.values.length===1&&!C.hasLastChar&&!(parseInt(C.values[0],10)<=l.CronMonth.daysInMonth[Y.values[0]-1]))throw new Error("Invalid explicit day of month definition");Te(this,d,k),Te(this,o,D),Te(this,x,M),Te(this,y,Y),Te(this,j,K),Te(this,m,C)}static from(k,D){return new p({second:this.resolveField(l.CronSecond,k.second,D.second),minute:this.resolveField(l.CronMinute,k.minute,D.minute),hour:this.resolveField(l.CronHour,k.hour,D.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,k.dayOfMonth,D.dayOfMonth),month:this.resolveField(l.CronMonth,k.month,D.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,k.dayOfWeek,D.dayOfWeek)})}static resolveField(k,D,M){return M?M instanceof l.CronField?M:new k(M):D}get second(){return te(this,d)}get minute(){return te(this,o)}get hour(){return te(this,x)}get dayOfMonth(){return te(this,m)}get month(){return te(this,y)}get dayOfWeek(){return te(this,j)}static compactField(k){if(k.length===0)return[];const D=[];let M;return k.forEach((C,Y,K)=>{if(M===void 0){M={start:C,count:1};return}const J=K[Y-1]||M.start,ne=K[Y+1];if(C==="L"||C==="W"){D.push(M),D.push({start:C,count:1}),M=void 0;return}if(M.step===void 0&&ne!==void 0){const le=C-J,fe=ne-C;if(le<=fe){M={...M,count:2,end:C,step:le};return}M.step=1}C-(M.end??0)===M.step?(M.count++,M.end=C):(M.count===1?D.push({start:M.start,count:1}):M.count===2?(D.push({start:M.start,count:1}),D.push({start:M.end??J,count:1})):D.push(M),M={start:C,count:1})}),M&&D.push(M),D}stringifyField(k){var Y;let D=k.max,M=k.values;if(k instanceof l.CronDayOfWeek){D=6;const K=te(this,j).values;M=K[K.length-1]===7?K.slice(0,-1):K}k instanceof l.CronDayOfMonth&&(D=te(this,y).values.length===1?l.CronMonth.daysInMonth[te(this,y).values[0]-1]:k.max);const C=p.compactField(M);if(C.length===1){const K=Ee(Y=p,b,Cg).call(Y,k,C[0],D);if(K)return K}return C.map(K=>{var ne;const J=K.count===1?K.start.toString():Ee(ne=p,b,Og).call(ne,K,D);return k instanceof l.CronDayOfWeek&&k.nthDay>0?`${J}#${k.nthDay}`:J}).join(",")}stringify(k=!1){const D=[];return k&&D.push(this.stringifyField(te(this,d))),D.push(this.stringifyField(te(this,o)),this.stringifyField(te(this,x)),this.stringifyField(te(this,m)),this.stringifyField(te(this,y)),this.stringifyField(te(this,j))),D.join(" ")}serialize(){return{second:te(this,d).serialize(),minute:te(this,o).serialize(),hour:te(this,x).serialize(),dayOfMonth:te(this,m).serialize(),month:te(this,y).serialize(),dayOfWeek:te(this,j).serialize()}}},d=new WeakMap,o=new WeakMap,x=new WeakMap,m=new WeakMap,y=new WeakMap,j=new WeakMap,b=new WeakSet,Cg=function(k,D,M){const C=D.step;return C?C===1&&D.start===k.min&&D.end&&D.end>=M?k.hasQuestionMarkChar?"?":"*":C!==1&&D.start===k.min&&D.end&&D.end>=M-C+1?`*/${C}`:null:null},Og=function(k,D){const M=k.step;if(M===1)return`${k.start}-${k.end}`;const C=k.start===0?k.count-1:k.count;if(!M)throw new Error("Unexpected range step");if(!k.end)throw new Error("Unexpected range end");if(M*C>k.end){const Y=(J,ne)=>{if(typeof k.start!="number")throw new Error("Unexpected range start");return ne%M===0?k.start+ne:null};if(typeof k.start!="number")throw new Error("Unexpected range start");const K={length:k.end-k.start+1};return Array.from(K,Y).filter(J=>J!==null).join(",")}return k.end===D-M+1?`${k.start}/${M}`:`${k.start}-${k.end}/${M}`},et(p,b),p);return Vi.CronFieldCollection=u,Vi}var yf={},jx;function Hg(){return jx||(jx=1,(function(l){var x,m,y,j,b,p,w,E,_,Vl,D,Os,Rg,_g,Ag,kg,Tf,zg,Ug,Dr;Object.defineProperty(l,"__esModule",{value:!0}),l.CronExpression=l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const u=$f();l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const d=1e4,F=class F{constructor(A,ee){et(this,D);et(this,x);et(this,m);et(this,y);et(this,j);et(this,b);et(this,p);et(this,w,null);et(this,E,!1);Te(this,x,ee),Te(this,m,ee.tz),Te(this,j,ee.startDate?new u.CronDate(ee.startDate,te(this,m)):null),Te(this,b,ee.endDate?new u.CronDate(ee.endDate,te(this,m)):null);let B=ee.currentDate??ee.startDate;if(B){const de=new u.CronDate(B,te(this,m));te(this,j)&&de.getTime()<te(this,j).getTime()?B=te(this,j):te(this,b)&&de.getTime()>te(this,b).getTime()&&(B=te(this,b))}Te(this,y,new u.CronDate(B,te(this,m))),Te(this,p,A)}get fields(){return te(this,p)}static fieldsToExpression(A,ee){return new F(A,ee||{})}next(){return Ee(this,D,Dr).call(this)}prev(){return Ee(this,D,Dr).call(this,!0)}hasNext(){const A=te(this,y);try{return Ee(this,D,Dr).call(this),!0}catch{return!1}finally{Te(this,y,A)}}hasPrev(){const A=te(this,y);try{return Ee(this,D,Dr).call(this,!0),!0}catch{return!1}finally{Te(this,y,A)}}take(A){const ee=[];if(A>=0)for(let B=0;B<A;B++)try{ee.push(this.next())}catch{return ee}else for(let B=0;B>A;B--)try{ee.push(this.prev())}catch{return ee}return ee}reset(A){Te(this,y,new u.CronDate(A||te(this,x).currentDate))}stringify(A=!1){return te(this,p).stringify(A)}includesDate(A){const{second:ee,minute:B,hour:de,month:ye}=te(this,p),ge=new u.CronDate(A,te(this,m));return!(!ee.values.includes(ge.getSeconds())||!B.values.includes(ge.getMinutes())||!de.values.includes(ge.getHours())||!ye.values.includes(ge.getMonth()+1)||!Ee(this,D,Tf).call(this,ge)||te(this,p).dayOfWeek.nthDay>0&&Math.ceil(ge.getDate()/7)!==te(this,p).dayOfWeek.nthDay)}toString(){return te(this,x).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ee(this,D,Dr).call(this),done:!this.hasNext()})}}};x=new WeakMap,m=new WeakMap,y=new WeakMap,j=new WeakMap,b=new WeakMap,p=new WeakMap,w=new WeakMap,E=new WeakMap,_=new WeakSet,Vl=function(A,ee){return ee.some(B=>B===A)},D=new WeakSet,Os=function(A,ee){return A[ee?A.length-1:0]},Rg=function(A){const ee=`${A.getFullYear()}-${A.getMonth()+1}-${A.getDate()}`;if(te(this,w)===ee)return te(this,E);const B=new u.CronDate(A);B.setStartOfDay();const de=new u.CronDate(A);return de.setEndOfDay(),Te(this,w,ee),Te(this,E,B.getUTCOffset()!==de.getUTCOffset()),te(this,E)},_g=function(A,ee,B){const de=te(this,p).second.values,ye=A.getSeconds(),ge=te(this,p).second.findNearestValue(ye,B);if(ge!==null){A.setSeconds(ge);return}A.applyDateOperation(ee,u.TimeUnit.Minute,te(this,p).hour.values.length),A.setSeconds(Ee(this,D,Os).call(this,de,B))},Ag=function(A,ee,B){const de=te(this,p).minute.values,ye=te(this,p).second.values,ge=A.getMinutes(),Z=te(this,p).minute.findNearestValue(ge,B);if(Z!==null){A.setMinutes(Z),A.setSeconds(Ee(this,D,Os).call(this,ye,B));return}A.applyDateOperation(ee,u.TimeUnit.Hour,te(this,p).hour.values.length),A.setMinutes(Ee(this,D,Os).call(this,de,B)),A.setSeconds(Ee(this,D,Os).call(this,ye,B))},kg=function(A,ee){const B=ee.isLastWeekdayOfMonth();return A.some(de=>{const ye=parseInt(de.toString().charAt(0),10)%7;if(Number.isNaN(ye))throw new Error(`Invalid last weekday of the month expression: ${de}`);return ee.getDay()===ye&&B})},Tf=function(A){var re,he,Ne;const ee=te(this,p).dayOfMonth.isWildcard,B=!ee,de=te(this,p).dayOfWeek.isWildcard,ye=!de,ge=Ee(re=F,_,Vl).call(re,A.getDate(),te(this,p).dayOfMonth.values)||te(this,p).dayOfMonth.hasLastChar&&A.isLastDayOfMonth(),Z=Ee(he=F,_,Vl).call(he,A.getDay(),te(this,p).dayOfWeek.values)||te(this,p).dayOfWeek.hasLastChar&&Ee(Ne=F,_,kg).call(Ne,te(this,p).dayOfWeek.values,A);return!!(B&&ye&&(ge||Z)||ge&&!ye||ee&&!de&&Z)},zg=function(A,ee,B){var H,T;const de=te(this,p).hour.values,ye=de,ge=A.getHours(),Z=Ee(H=F,_,Vl).call(H,ge,de),re=A.dstStart===ge,he=A.dstEnd===ge;if(re)return Ee(T=F,_,Vl).call(T,ge-1,de)?!0:(A.invokeDateOperation(ee,u.TimeUnit.Hour),!1);if(he&&!B)return A.dstEnd=null,A.applyDateOperation(u.DateMathOp.Add,u.TimeUnit.Hour,ye.length),!1;if(Z)return!0;A.dstStart=null;const Ne=te(this,p).hour.findNearestValue(ge,B);if(Ne===null)return A.applyDateOperation(ee,u.TimeUnit.Day,ye.length),!1;if(Ee(this,D,Rg).call(this,A)){const X=B?ge-Ne:Ne-ge;for(let ce=0;ce<X;ce++)A.applyDateOperation(ee,u.TimeUnit.Hour,ye.length)}else A.setHours(Ne);return A.setMinutes(Ee(this,D,Os).call(this,te(this,p).minute.values,B)),A.setSeconds(Ee(this,D,Os).call(this,te(this,p).second.values,B)),!1},Ug=function(A){if(!te(this,j)&&!te(this,b))return;const ee=A.getTime();if(te(this,j)&&ee<te(this,j).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(te(this,b)&&ee>te(this,b).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Dr=function(A=!1){var ge,Z,re;const ee=A?u.DateMathOp.Subtract:u.DateMathOp.Add,B=new u.CronDate(te(this,y)),de=B.getTime();let ye=0;for(;++ye<d;){if(Ee(this,D,Ug).call(this,B),!Ee(this,D,Tf).call(this,B)){B.applyDateOperation(ee,u.TimeUnit.Day,te(this,p).hour.values.length);continue}if(!(te(this,p).dayOfWeek.nthDay<=0||Math.ceil(B.getDate()/7)===te(this,p).dayOfWeek.nthDay)){B.applyDateOperation(ee,u.TimeUnit.Day,te(this,p).hour.values.length);continue}if(!Ee(ge=F,_,Vl).call(ge,B.getMonth()+1,te(this,p).month.values)){B.applyDateOperation(ee,u.TimeUnit.Month,te(this,p).hour.values.length);continue}if(Ee(this,D,zg).call(this,B,ee,A)){if(!Ee(Z=F,_,Vl).call(Z,B.getMinutes(),te(this,p).minute.values)){Ee(this,D,Ag).call(this,B,ee,A);continue}if(!Ee(re=F,_,Vl).call(re,B.getSeconds(),te(this,p).second.values)){Ee(this,D,_g).call(this,B,ee,A);continue}if(de===B.getTime()){(ee==="Add"||B.getMilliseconds()===0)&&B.applyDateOperation(ee,u.TimeUnit.Second,te(this,p).hour.values.length);continue}break}}if(ye>d)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return B.getMilliseconds()!==0&&B.setMilliseconds(0),Te(this,y,B),B},et(F,_);let o=F;l.CronExpression=o,l.default=o})(yf)),yf}var Uc={},Ex;function z2(){if(Ex)return Uc;Ex=1,Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.seededRandom=d;function l(o){let x=2166136261;for(let m=0;m<o.length;m++)x^=o.charCodeAt(m),x=Math.imul(x,16777619);return()=>x>>>0}function u(o){return()=>{let x=o+=1831565813;return x=Math.imul(x^x>>>15,x|1),x^=x+Math.imul(x^x>>>7,x|61),((x^x>>>14)>>>0)/4294967296}}function d(o){const x=o?l(o)():Math.floor(Math.random()*1e10);return u(x)}return Uc}var Mx;function Of(){var p,w,Lg,Ds,qg,Vg,Bg,Yg,$g,Gg,Zg,Cf,Fg,Qg;if(Mx)return Ma;Mx=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.CronExpressionParser=Ma.DayOfWeek=Ma.Months=Ma.CronUnit=Ma.PredefinedExpressions=void 0;const l=Dg(),u=Hg(),d=z2(),o=Gf();var x;(function(P){P["@yearly"]="0 0 0 1 1 *",P["@annually"]="0 0 0 1 1 *",P["@monthly"]="0 0 0 1 * *",P["@weekly"]="0 0 0 * * 0",P["@daily"]="0 0 0 * * *",P["@hourly"]="0 0 * * * *",P["@minutely"]="0 * * * * *",P["@secondly"]="* * * * * *",P["@weekdays"]="0 0 0 * * 1-5",P["@weekends"]="0 0 0 * * 0,6"})(x||(Ma.PredefinedExpressions=x={}));var m;(function(P){P.Second="Second",P.Minute="Minute",P.Hour="Hour",P.DayOfMonth="DayOfMonth",P.Month="Month",P.DayOfWeek="DayOfWeek"})(m||(Ma.CronUnit=m={}));var y;(function(P){P[P.jan=1]="jan",P[P.feb=2]="feb",P[P.mar=3]="mar",P[P.apr=4]="apr",P[P.may=5]="may",P[P.jun=6]="jun",P[P.jul=7]="jul",P[P.aug=8]="aug",P[P.sep=9]="sep",P[P.oct=10]="oct",P[P.nov=11]="nov",P[P.dec=12]="dec"})(y||(Ma.Months=y={}));var j;(function(P){P[P.sun=0]="sun",P[P.mon=1]="mon",P[P.tue=2]="tue",P[P.wed=3]="wed",P[P.thu=4]="thu",P[P.fri=5]="fri",P[P.sat=6]="sat"})(j||(Ma.DayOfWeek=j={}));let b=(w=class{static parse(F,$={}){var ce,xe,we,ve,_e,pe,Ue,ft;const{strict:A=!1,hashSeed:ee}=$,B=(0,d.seededRandom)(ee);F=x[F]||F;const de=Ee(ce=w,p,Lg).call(ce,F,A);if(!(de.dayOfMonth==="*"||de.dayOfWeek==="*"||!A))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ye=Ee(xe=w,p,Ds).call(xe,m.Second,de.second,o.CronSecond.constraints,B),ge=Ee(we=w,p,Ds).call(we,m.Minute,de.minute,o.CronMinute.constraints,B),Z=Ee(ve=w,p,Ds).call(ve,m.Hour,de.hour,o.CronHour.constraints,B),re=Ee(_e=w,p,Ds).call(_e,m.Month,de.month,o.CronMonth.constraints,B),he=Ee(pe=w,p,Ds).call(pe,m.DayOfMonth,de.dayOfMonth,o.CronDayOfMonth.constraints,B),{dayOfWeek:Ne,nthDayOfWeek:H}=Ee(Ue=w,p,Fg).call(Ue,de.dayOfWeek),T=Ee(ft=w,p,Ds).call(ft,m.DayOfWeek,Ne,o.CronDayOfWeek.constraints,B),X=new l.CronFieldCollection({second:new o.CronSecond(ye,{rawValue:de.second}),minute:new o.CronMinute(ge,{rawValue:de.minute}),hour:new o.CronHour(Z,{rawValue:de.hour}),dayOfMonth:new o.CronDayOfMonth(he,{rawValue:de.dayOfMonth}),month:new o.CronMonth(re,{rawValue:de.month}),dayOfWeek:new o.CronDayOfWeek(T,{rawValue:de.dayOfWeek,nthDayOfWeek:H})});return new u.CronExpression(X,{...$,expression:F})}},p=new WeakSet,Lg=function(F,$){if($&&!F.length)throw new Error("Invalid cron expression");F=F||"0 * * * * *";const A=F.trim().split(/\s+/);if($&&A.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(A.length>6)throw new Error("Invalid cron expression, too many fields");const ee=["*","*","*","*","*","0"];A.length<ee.length&&A.unshift(...ee.slice(A.length));const[B,de,ye,ge,Z,re]=A;return{second:B,minute:de,hour:ye,dayOfMonth:ge,month:Z,dayOfWeek:re}},Ds=function(F,$,A,ee){if((F===m.Month||F===m.DayOfWeek)&&($=$.replace(/[a-z]{3}/gi,B=>{B=B.toLowerCase();const de=y[B]||j[B];if(de===void 0)throw new Error(`Validation error, cannot resolve alias "${B}"`);return de.toString()})),!A.validChars.test($))throw new Error(`Invalid characters, got value: ${$}`);return $=Ee(this,p,qg).call(this,$,A),$=Ee(this,p,Vg).call(this,$,A,ee),Ee(this,p,Bg).call(this,F,$,A)},qg=function(F,$){return F.replace(/[*?]/g,$.min+"-"+$.max)},Vg=function(F,$,A){const ee=A();return F.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(B,de,ye,ge)=>{if(de&&ye&&ge){const Z=parseInt(de,10),re=parseInt(ye,10),he=parseInt(ge,10);if(Z>re)throw new Error(`Invalid range: ${Z}-${re}, min > max`);if(he<=0)throw new Error(`Invalid step: ${he}, must be positive`);const Ne=Math.max(Z,$.min),H=Math.floor(ee*he),T=[];for(let X=Math.floor(Ne/he)*he+H;X<=re;X+=he)X>=Ne&&T.push(X);return T.join(",")}else if(de&&ye){const Z=parseInt(de,10),re=parseInt(ye,10);if(Z>re)throw new Error(`Invalid range: ${Z}-${re}, min > max`);return String(Math.floor(ee*(re-Z+1))+Z)}else if(ge){const Z=parseInt(ge,10);if(Z<=0)throw new Error(`Invalid step: ${Z}, must be positive`);const re=Math.floor(ee*Z),he=[];for(let Ne=Math.floor($.min/Z)*Z+re;Ne<=$.max;Ne+=Z)Ne>=$.min&&he.push(Ne);return he.join(",")}else return String(Math.floor(ee*($.max-$.min+1)+$.min))})},Bg=function(F,$,A){const ee=[];function B(ye,ge){var Z;if(Array.isArray(ye))ee.push(...ye);else if(Ee(Z=w,p,Qg).call(Z,ge,ye))ee.push(ye);else{const re=parseInt(ye.toString(),10);if(!(re>=ge.min&&re<=ge.max))throw new Error(`Constraint error, got value ${ye} expected range ${ge.min}-${ge.max}`);ee.push(F===m.DayOfWeek?re%7:ye)}}return $.split(",").forEach(ye=>{var ge;if(!(ye.length>0))throw new Error("Invalid list value format");B(Ee(ge=w,p,Yg).call(ge,F,ye,A),A)}),ee},Yg=function(F,$,A){var B,de;const ee=$.split("/");if(ee.length>2)throw new Error(`Invalid repeat: ${$}`);return ee.length===2?(isNaN(parseInt(ee[0],10))||(ee[0]=`${ee[0]}-${A.max}`),Ee(B=w,p,Cf).call(B,F,ee[0],parseInt(ee[1],10),A)):Ee(de=w,p,Cf).call(de,F,$,1,A)},$g=function(F,$,A){if(!(!isNaN(F)&&!isNaN($)&&F>=A.min&&$<=A.max))throw new Error(`Constraint error, got range ${F}-${$} expected range ${A.min}-${A.max}`);if(F>$)throw new Error(`Invalid range: ${F}-${$}, min(${F}) > max(${$})`)},Gg=function(F){if(!(!isNaN(F)&&F>0))throw new Error(`Constraint error, cannot repeat at every ${F} time.`)},Zg=function(F,$,A,ee){const B=[];F===m.DayOfWeek&&A%7===0&&B.push(0);for(let de=$;de<=A;de+=ee)B.indexOf(de)===-1&&B.push(de);return B},Cf=function(F,$,A,ee){const B=$.split("-");if(B.length<=1)return isNaN(+$)?$:+$;const[de,ye]=B.map(ge=>parseInt(ge,10));return Ee(this,p,$g).call(this,de,ye,ee),Ee(this,p,Gg).call(this,A),Ee(this,p,Zg).call(this,F,de,ye,A)},Fg=function(F){const $=F.split("#");if($.length<=1)return{dayOfWeek:$[0]};const A=+$[$.length-1],ee=F.match(/([,-/])/);if(ee!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ee==null?void 0:ee[0]}\` special characters are incompatible`);if(!($.length<=2&&!isNaN(A)&&A>=1&&A<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:$[0],nthDayOfWeek:A}},Qg=function(F,$){return F.chars.some(A=>$.toString().includes(A))},et(w,p),w);return Ma.CronExpressionParser=b,Ma}var sn={};const U2={},H2=Object.freeze(Object.defineProperty({__proto__:null,default:U2},Symbol.toStringTag,{value:"Module"})),Tx=wv(H2);var Cx;function L2(){var m,y,Df,Wg;if(Cx)return sn;Cx=1;var l=sn&&sn.__createBinding||(Object.create?(function(p,w,E,_){_===void 0&&(_=E);var k=Object.getOwnPropertyDescriptor(w,E);(!k||("get"in k?!w.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(p,_,k)}):(function(p,w,E,_){_===void 0&&(_=E),p[_]=w[E]})),u=sn&&sn.__setModuleDefault||(Object.create?(function(p,w){Object.defineProperty(p,"default",{enumerable:!0,value:w})}):function(p,w){p.default=w}),d=sn&&sn.__importStar||(function(){var p=function(w){return p=Object.getOwnPropertyNames||function(E){var _=[];for(var k in E)Object.prototype.hasOwnProperty.call(E,k)&&(_[_.length]=k);return _},p(w)};return function(w){if(w&&w.__esModule)return w;var E={};if(w!=null)for(var _=p(w),k=0;k<_.length;k++)_[k]!=="default"&&l(E,w,_[k]);return u(E,w),E}})();Object.defineProperty(sn,"__esModule",{value:!0}),sn.CronFileParser=void 0;const o=Of();let x=(y=class{static async parseFile(w){var k;const{readFile:E}=await Promise.resolve().then(()=>d(Tx)),_=await E(w,"utf8");return Ee(k=y,m,Df).call(k,_)}static parseFileSync(w){var k;const{readFileSync:E}=Tx,_=E(w,"utf8");return Ee(k=y,m,Df).call(k,_)}},m=new WeakSet,Df=function(w){var k;const E=w.split(`
|
|
360
|
+
`),_={variables:{},expressions:[],errors:{}};for(const D of E){const M=D.trim();if(M.length===0||M.startsWith("#"))continue;const C=M.match(/^(.*)=(.*)$/);if(C){const[,Y,K]=C;_.variables[Y]=K.replace(/["']/g,"");continue}try{const Y=Ee(k=y,m,Wg).call(k,M);_.expressions.push(Y.interval)}catch(Y){_.errors[M]=Y}}return _},Wg=function(w){const E=w.split(" ");return{interval:o.CronExpressionParser.parse(E.slice(0,5).join(" ")),command:E.slice(5,E.length)}},et(y,m),y);return sn.CronFileParser=x,sn}var Ox;function q2(){return Ox||(Ox=1,(function(l){var u=Es&&Es.__createBinding||(Object.create?(function(p,w,E,_){_===void 0&&(_=E);var k=Object.getOwnPropertyDescriptor(w,E);(!k||("get"in k?!w.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(p,_,k)}):(function(p,w,E,_){_===void 0&&(_=E),p[_]=w[E]})),d=Es&&Es.__exportStar||function(p,w){for(var E in p)E!=="default"&&!Object.prototype.hasOwnProperty.call(w,E)&&u(w,p,E)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const o=Of();var x=$f();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return x.CronDate}});var m=Dg();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return m.CronFieldCollection}});var y=Hg();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return y.CronExpression}});var j=Of();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return j.CronExpressionParser}});var b=L2();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return b.CronFileParser}}),d(Gf(),l),l.default=o.CronExpressionParser})(Es)),Es}var V2=q2();const Xg=6048e5,B2=864e5,Y2=6e4,$2=36e5,Dx=Symbol.for("constructDateFrom");function Oa(l,u){return typeof l=="function"?l(u):l&&typeof l=="object"&&Dx in l?l[Dx](u):l instanceof Date?new l.constructor(u):new Date(u)}function Tt(l,u){return Oa(u||l,l)}function G2(l,u,d){return Oa(l,+Tt(l)+u)}function Hc(l,u,d){return G2(l,u*$2)}let Z2={};function Kc(){return Z2}function eu(l,u){var j,b,p,w;const d=Kc(),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,x=Tt(l,u==null?void 0:u.in),m=x.getDay(),y=(m<o?7:0)+m-o;return x.setDate(x.getDate()-y),x.setHours(0,0,0,0),x}function Wc(l,u){return eu(l,{...u,weekStartsOn:1})}function Jg(l,u){const d=Tt(l,u==null?void 0:u.in),o=d.getFullYear(),x=Oa(d,0);x.setFullYear(o+1,0,4),x.setHours(0,0,0,0);const m=Wc(x),y=Oa(d,0);y.setFullYear(o,0,4),y.setHours(0,0,0,0);const j=Wc(y);return d.getTime()>=m.getTime()?o+1:d.getTime()>=j.getTime()?o:o-1}function Rx(l){const u=Tt(l),d=new Date(Date.UTC(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours(),u.getMinutes(),u.getSeconds(),u.getMilliseconds()));return d.setUTCFullYear(u.getFullYear()),+l-+d}function F2(l,...u){const d=Oa.bind(null,u.find(o=>typeof o=="object"));return u.map(d)}function _x(l,u){const d=Tt(l,u==null?void 0:u.in);return d.setHours(0,0,0,0),d}function Q2(l,u,d){const[o,x]=F2(d==null?void 0:d.in,l,u),m=_x(o),y=_x(x),j=+m-Rx(m),b=+y-Rx(y);return Math.round((j-b)/B2)}function W2(l,u){const d=Jg(l,u),o=Oa(l,0);return o.setFullYear(d,0,4),o.setHours(0,0,0,0),Wc(o)}function X2(l,u){let d,o=u==null?void 0:u.in;return l.forEach(x=>{!o&&typeof x=="object"&&(o=Oa.bind(null,x));const m=Tt(x,o);(!d||d<m||isNaN(+m))&&(d=m)}),Oa(o,d||NaN)}function J2(l,u){let d,o=u==null?void 0:u.in;return l.forEach(x=>{!o&&typeof x=="object"&&(o=Oa.bind(null,x));const m=Tt(x,o);(!d||d>m||isNaN(+m))&&(d=m)}),Oa(o,d||NaN)}function I2(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function K2(l){return!(!I2(l)&&typeof l!="number"||isNaN(+Tt(l)))}function P2(l){return u=>{const o=(l?Math[l]:Math.trunc)(u);return o===0?0:o}}function eS(l,u){return+Tt(l)-+Tt(u)}function Ax(l,u,d){const o=eS(l,u)/Y2;return P2(d==null?void 0:d.roundingMethod)(o)}function tS(l,u){const d=Tt(l,u==null?void 0:u.in);return d.setFullYear(d.getFullYear(),0,1),d.setHours(0,0,0,0),d}const aS={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"}},nS=(l,u,d)=>{let o;const x=aS[l];return typeof x=="string"?o=x:u===1?o=x.one:o=x.other.replace("{{count}}",u.toString()),d!=null&&d.addSuffix?d.comparison&&d.comparison>0?"in "+o:o+" ago":o};function vf(l){return(u={})=>{const d=u.width?String(u.width):l.defaultWidth;return l.formats[d]||l.formats[l.defaultWidth]}}const lS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},sS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},iS={date:vf({formats:lS,defaultWidth:"full"}),time:vf({formats:sS,defaultWidth:"full"}),dateTime:vf({formats:rS,defaultWidth:"full"})},uS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cS=(l,u,d,o)=>uS[l];function Wi(l){return(u,d)=>{const o=d!=null&&d.context?String(d.context):"standalone";let x;if(o==="formatting"&&l.formattingValues){const y=l.defaultFormattingWidth||l.defaultWidth,j=d!=null&&d.width?String(d.width):y;x=l.formattingValues[j]||l.formattingValues[y]}else{const y=l.defaultWidth,j=d!=null&&d.width?String(d.width):l.defaultWidth;x=l.values[j]||l.values[y]}const m=l.argumentCallback?l.argumentCallback(u):u;return x[m]}}const oS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},dS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},fS={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"]},hS={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"]},mS={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"}},xS={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"}},gS=(l,u)=>{const d=Number(l),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"},yS={ordinalNumber:gS,era:Wi({values:oS,defaultWidth:"wide"}),quarter:Wi({values:dS,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Wi({values:fS,defaultWidth:"wide"}),day:Wi({values:hS,defaultWidth:"wide"}),dayPeriod:Wi({values:mS,defaultWidth:"wide",formattingValues:xS,defaultFormattingWidth:"wide"})};function Xi(l){return(u,d={})=>{const o=d.width,x=o&&l.matchPatterns[o]||l.matchPatterns[l.defaultMatchWidth],m=u.match(x);if(!m)return null;const y=m[0],j=o&&l.parsePatterns[o]||l.parsePatterns[l.defaultParseWidth],b=Array.isArray(j)?pS(j,E=>E.test(y)):vS(j,E=>E.test(y));let p;p=l.valueCallback?l.valueCallback(b):b,p=d.valueCallback?d.valueCallback(p):p;const w=u.slice(y.length);return{value:p,rest:w}}}function vS(l,u){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&u(l[d]))return d}function pS(l,u){for(let d=0;d<l.length;d++)if(u(l[d]))return d}function bS(l){return(u,d={})=>{const o=u.match(l.matchPattern);if(!o)return null;const x=o[0],m=u.match(l.parsePattern);if(!m)return null;let y=l.valueCallback?l.valueCallback(m[0]):m[0];y=d.valueCallback?d.valueCallback(y):y;const j=u.slice(x.length);return{value:y,rest:j}}}const SS=/^(\d+)(th|st|nd|rd)?/i,NS=/\d+/i,wS={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},jS={any:[/^b/i,/^(a|c)/i]},ES={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},MS={any:[/1/i,/2/i,/3/i,/4/i]},TS={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},CS={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]},OS={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},DS={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]},RS={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},_S={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}},AS={ordinalNumber:bS({matchPattern:SS,parsePattern:NS,valueCallback:l=>parseInt(l,10)}),era:Xi({matchPatterns:wS,defaultMatchWidth:"wide",parsePatterns:jS,defaultParseWidth:"any"}),quarter:Xi({matchPatterns:ES,defaultMatchWidth:"wide",parsePatterns:MS,defaultParseWidth:"any",valueCallback:l=>l+1}),month:Xi({matchPatterns:TS,defaultMatchWidth:"wide",parsePatterns:CS,defaultParseWidth:"any"}),day:Xi({matchPatterns:OS,defaultMatchWidth:"wide",parsePatterns:DS,defaultParseWidth:"any"}),dayPeriod:Xi({matchPatterns:RS,defaultMatchWidth:"any",parsePatterns:_S,defaultParseWidth:"any"})},kS={code:"en-US",formatDistance:nS,formatLong:iS,formatRelative:cS,localize:yS,match:AS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zS(l,u){const d=Tt(l,u==null?void 0:u.in);return Q2(d,tS(d))+1}function US(l,u){const d=Tt(l,u==null?void 0:u.in),o=+Wc(d)-+W2(d);return Math.round(o/Xg)+1}function Ig(l,u){var w,E,_,k;const d=Tt(l,u==null?void 0:u.in),o=d.getFullYear(),x=Kc(),m=(u==null?void 0:u.firstWeekContainsDate)??((E=(w=u==null?void 0:u.locale)==null?void 0:w.options)==null?void 0:E.firstWeekContainsDate)??x.firstWeekContainsDate??((k=(_=x.locale)==null?void 0:_.options)==null?void 0:k.firstWeekContainsDate)??1,y=Oa((u==null?void 0:u.in)||l,0);y.setFullYear(o+1,0,m),y.setHours(0,0,0,0);const j=eu(y,u),b=Oa((u==null?void 0:u.in)||l,0);b.setFullYear(o,0,m),b.setHours(0,0,0,0);const p=eu(b,u);return+d>=+j?o+1:+d>=+p?o:o-1}function HS(l,u){var j,b,p,w;const d=Kc(),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,x=Ig(l,u),m=Oa((u==null?void 0:u.in)||l,0);return m.setFullYear(x,0,o),m.setHours(0,0,0,0),eu(m,u)}function LS(l,u){const d=Tt(l,u==null?void 0:u.in),o=+eu(d,u)-+HS(d,u);return Math.round(o/Xg)+1}function lt(l,u){const d=l<0?"-":"",o=Math.abs(l).toString().padStart(u,"0");return d+o}const Ll={y(l,u){const d=l.getFullYear(),o=d>0?d:1-d;return lt(u==="yy"?o%100:o,u.length)},M(l,u){const d=l.getMonth();return u==="M"?String(d+1):lt(d+1,2)},d(l,u){return lt(l.getDate(),u.length)},a(l,u){const d=l.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(l,u){return lt(l.getHours()%12||12,u.length)},H(l,u){return lt(l.getHours(),u.length)},m(l,u){return lt(l.getMinutes(),u.length)},s(l,u){return lt(l.getSeconds(),u.length)},S(l,u){const d=u.length,o=l.getMilliseconds(),x=Math.trunc(o*Math.pow(10,d-3));return lt(x,u.length)}},Cr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},kx={G:function(l,u,d){const o=l.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(l,u,d){if(u==="yo"){const o=l.getFullYear(),x=o>0?o:1-o;return d.ordinalNumber(x,{unit:"year"})}return Ll.y(l,u)},Y:function(l,u,d,o){const x=Ig(l,o),m=x>0?x:1-x;if(u==="YY"){const y=m%100;return lt(y,2)}return u==="Yo"?d.ordinalNumber(m,{unit:"year"}):lt(m,u.length)},R:function(l,u){const d=Jg(l);return lt(d,u.length)},u:function(l,u){const d=l.getFullYear();return lt(d,u.length)},Q:function(l,u,d){const o=Math.ceil((l.getMonth()+1)/3);switch(u){case"Q":return String(o);case"QQ":return lt(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(l,u,d){const o=Math.ceil((l.getMonth()+1)/3);switch(u){case"q":return String(o);case"qq":return lt(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(l,u,d){const o=l.getMonth();switch(u){case"M":case"MM":return Ll.M(l,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(l,u,d){const o=l.getMonth();switch(u){case"L":return String(o+1);case"LL":return lt(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(l,u,d,o){const x=LS(l,o);return u==="wo"?d.ordinalNumber(x,{unit:"week"}):lt(x,u.length)},I:function(l,u,d){const o=US(l);return u==="Io"?d.ordinalNumber(o,{unit:"week"}):lt(o,u.length)},d:function(l,u,d){return u==="do"?d.ordinalNumber(l.getDate(),{unit:"date"}):Ll.d(l,u)},D:function(l,u,d){const o=zS(l);return u==="Do"?d.ordinalNumber(o,{unit:"dayOfYear"}):lt(o,u.length)},E:function(l,u,d){const o=l.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(l,u,d,o){const x=l.getDay(),m=(x-o.weekStartsOn+8)%7||7;switch(u){case"e":return String(m);case"ee":return lt(m,2);case"eo":return d.ordinalNumber(m,{unit:"day"});case"eee":return d.day(x,{width:"abbreviated",context:"formatting"});case"eeeee":return d.day(x,{width:"narrow",context:"formatting"});case"eeeeee":return d.day(x,{width:"short",context:"formatting"});case"eeee":default:return d.day(x,{width:"wide",context:"formatting"})}},c:function(l,u,d,o){const x=l.getDay(),m=(x-o.weekStartsOn+8)%7||7;switch(u){case"c":return String(m);case"cc":return lt(m,u.length);case"co":return d.ordinalNumber(m,{unit:"day"});case"ccc":return d.day(x,{width:"abbreviated",context:"standalone"});case"ccccc":return d.day(x,{width:"narrow",context:"standalone"});case"cccccc":return d.day(x,{width:"short",context:"standalone"});case"cccc":default:return d.day(x,{width:"wide",context:"standalone"})}},i:function(l,u,d){const o=l.getDay(),x=o===0?7:o;switch(u){case"i":return String(x);case"ii":return lt(x,u.length);case"io":return d.ordinalNumber(x,{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(l,u,d){const x=l.getHours()/12>=1?"pm":"am";switch(u){case"a":case"aa":return d.dayPeriod(x,{width:"abbreviated",context:"formatting"});case"aaa":return d.dayPeriod(x,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return d.dayPeriod(x,{width:"narrow",context:"formatting"});case"aaaa":default:return d.dayPeriod(x,{width:"wide",context:"formatting"})}},b:function(l,u,d){const o=l.getHours();let x;switch(o===12?x=Cr.noon:o===0?x=Cr.midnight:x=o/12>=1?"pm":"am",u){case"b":case"bb":return d.dayPeriod(x,{width:"abbreviated",context:"formatting"});case"bbb":return d.dayPeriod(x,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return d.dayPeriod(x,{width:"narrow",context:"formatting"});case"bbbb":default:return d.dayPeriod(x,{width:"wide",context:"formatting"})}},B:function(l,u,d){const o=l.getHours();let x;switch(o>=17?x=Cr.evening:o>=12?x=Cr.afternoon:o>=4?x=Cr.morning:x=Cr.night,u){case"B":case"BB":case"BBB":return d.dayPeriod(x,{width:"abbreviated",context:"formatting"});case"BBBBB":return d.dayPeriod(x,{width:"narrow",context:"formatting"});case"BBBB":default:return d.dayPeriod(x,{width:"wide",context:"formatting"})}},h:function(l,u,d){if(u==="ho"){let o=l.getHours()%12;return o===0&&(o=12),d.ordinalNumber(o,{unit:"hour"})}return Ll.h(l,u)},H:function(l,u,d){return u==="Ho"?d.ordinalNumber(l.getHours(),{unit:"hour"}):Ll.H(l,u)},K:function(l,u,d){const o=l.getHours()%12;return u==="Ko"?d.ordinalNumber(o,{unit:"hour"}):lt(o,u.length)},k:function(l,u,d){let o=l.getHours();return o===0&&(o=24),u==="ko"?d.ordinalNumber(o,{unit:"hour"}):lt(o,u.length)},m:function(l,u,d){return u==="mo"?d.ordinalNumber(l.getMinutes(),{unit:"minute"}):Ll.m(l,u)},s:function(l,u,d){return u==="so"?d.ordinalNumber(l.getSeconds(),{unit:"second"}):Ll.s(l,u)},S:function(l,u){return Ll.S(l,u)},X:function(l,u,d){const o=l.getTimezoneOffset();if(o===0)return"Z";switch(u){case"X":return Ux(o);case"XXXX":case"XX":return Rs(o);case"XXXXX":case"XXX":default:return Rs(o,":")}},x:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"x":return Ux(o);case"xxxx":case"xx":return Rs(o);case"xxxxx":case"xxx":default:return Rs(o,":")}},O:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"O":case"OO":case"OOO":return"GMT"+zx(o,":");case"OOOO":default:return"GMT"+Rs(o,":")}},z:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"z":case"zz":case"zzz":return"GMT"+zx(o,":");case"zzzz":default:return"GMT"+Rs(o,":")}},t:function(l,u,d){const o=Math.trunc(+l/1e3);return lt(o,u.length)},T:function(l,u,d){return lt(+l,u.length)}};function zx(l,u=""){const d=l>0?"-":"+",o=Math.abs(l),x=Math.trunc(o/60),m=o%60;return m===0?d+String(x):d+String(x)+u+lt(m,2)}function Ux(l,u){return l%60===0?(l>0?"-":"+")+lt(Math.abs(l)/60,2):Rs(l,u)}function Rs(l,u=""){const d=l>0?"-":"+",o=Math.abs(l),x=lt(Math.trunc(o/60),2),m=lt(o%60,2);return d+x+u+m}const Hx=(l,u)=>{switch(l){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"})}},Kg=(l,u)=>{switch(l){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"})}},qS=(l,u)=>{const d=l.match(/(P+)(p+)?/)||[],o=d[1],x=d[2];if(!x)return Hx(l,u);let m;switch(o){case"P":m=u.dateTime({width:"short"});break;case"PP":m=u.dateTime({width:"medium"});break;case"PPP":m=u.dateTime({width:"long"});break;case"PPPP":default:m=u.dateTime({width:"full"});break}return m.replace("{{date}}",Hx(o,u)).replace("{{time}}",Kg(x,u))},VS={p:Kg,P:qS},BS=/^D+$/,YS=/^Y+$/,$S=["D","DD","YY","YYYY"];function GS(l){return BS.test(l)}function ZS(l){return YS.test(l)}function FS(l,u,d){const o=QS(l,u,d);if(console.warn(o),$S.includes(l))throw new RangeError(o)}function QS(l,u,d){const o=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${u}\`) for formatting ${o} to the input \`${d}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const WS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,XS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JS=/^'([^]*?)'?$/,IS=/''/g,KS=/[a-zA-Z]/;function Ts(l,u,d){var w,E,_,k;const o=Kc(),x=o.locale??kS,m=o.firstWeekContainsDate??((E=(w=o.locale)==null?void 0:w.options)==null?void 0:E.firstWeekContainsDate)??1,y=o.weekStartsOn??((k=(_=o.locale)==null?void 0:_.options)==null?void 0:k.weekStartsOn)??0,j=Tt(l,d==null?void 0:d.in);if(!K2(j))throw new RangeError("Invalid time value");let b=u.match(XS).map(D=>{const M=D[0];if(M==="p"||M==="P"){const C=VS[M];return C(D,x.formatLong)}return D}).join("").match(WS).map(D=>{if(D==="''")return{isToken:!1,value:"'"};const M=D[0];if(M==="'")return{isToken:!1,value:PS(D)};if(kx[M])return{isToken:!0,value:D};if(M.match(KS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:D}});x.localize.preprocessor&&(b=x.localize.preprocessor(j,b));const p={firstWeekContainsDate:m,weekStartsOn:y,locale:x};return b.map(D=>{if(!D.isToken)return D.value;const M=D.value;(ZS(M)||GS(M))&&FS(M,u,String(l));const C=kx[M[0]];return C(j,M,x.localize,p)}).join("")}function PS(l){const u=l.match(JS);return u?u[1].replace(IS,"'"):l}function eN(l,u){return+Tt(l)>+Tt(u)}function tN(l,u){return+Tt(l)<+Tt(u)}function aN(l,u){const d=Tt(l,u==null?void 0:u.in);return d.setMinutes(0,0,0),d}const pf=[{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"}}],Lc=[{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"}],Gn=160,qc=14,nN=10,lN=7,Lx=4,Pg=({configs:l,currentProjectId:u,onEditJob:d,queueStatus:o,queueAnalytics:x})=>{const m=V.useMemo(()=>aN(new Date),[]),y=V.useMemo(()=>Hc(m,24),[m]),j=V.useMemo(()=>Hc(m,-24),[m]),b=y,p=V.useMemo(()=>{const ne=[];for(let le=0;le<=24;le++)ne.push(Hc(m,le));return ne},[m]),w=V.useMemo(()=>{const ne=[];return l.forEach(({projectId:le,config:fe})=>{const P={executor:fe.executorEnabled!==!1?fe.cronSchedule:null,reviewer:fe.reviewerEnabled?fe.reviewerSchedule:null,qa:fe.qa.enabled?fe.qa.schedule:null,audit:fe.audit.enabled?fe.audit.schedule:null,slicer:fe.roadmapScanner.enabled?fe.roadmapScanner.slicerSchedule:null},F=fe.cronScheduleOffset||0;Object.entries(P).forEach(([$,A])=>{if(A)try{const ee=V2.CronExpressionParser.parse(A,{currentDate:m,endDate:y,iterator:!0});for(;ee.hasNext();){const B=ee.next(),de=new Date(B.getTime());de.setMinutes(de.getMinutes()+F),eN(de,m)&&tN(de,y)&&ne.push({projectId:le,jobType:$,time:de})}}catch(ee){console.error(`Failed to parse cron "${A}" for ${le}/${$}`,ee)}})}),ne},[l,m,y]),E=V.useMemo(()=>{const ne=new Set;return l.length===0||(l.every(le=>le.config.executorEnabled===!1)&&ne.add("executor"),l.every(le=>!le.config.reviewerEnabled)&&ne.add("reviewer"),l.every(le=>!le.config.qa.enabled)&&ne.add("qa"),l.every(le=>!le.config.audit.enabled)&&ne.add("audit"),l.every(le=>!le.config.roadmapScanner.enabled)&&ne.add("slicer")),ne},[l]),_=V.useMemo(()=>{const ne=new Map;let le=0;return l.forEach(fe=>{fe.projectId===u||(ne.set(fe.projectId,le%Lc.length),le++)}),ne},[l,u]),k=ne=>Ax(ne,m),D=V.useMemo(()=>{const ne=[];for(let le=0;le<=24;le++)ne.push(Hc(j,le));return ne},[j]),M=ne=>{const le=J2([X2([ne,j]),b]);return Ax(le,j)},C=V.useMemo(()=>{const ne=(x==null?void 0:x.recentRuns)??[],le=new Map;for(const fe of ne){const P=fe.providerKey||"default",F=new Date(fe.startedAt*1e3),$=fe.finishedAt?new Date(fe.finishedAt*1e3):new Date;$<j||F>b||(le.has(P)||le.set(P,[]),le.get(P).push({id:fe.id,jobType:fe.jobType,status:fe.status,projectPath:fe.projectPath,startedAt:F,finishedAt:$,throttledCount:fe.throttledCount}))}if(o!=null&&o.running){const fe=o.running.providerKey??"default";le.has(fe)||le.set(fe,[]),le.get(fe).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(le.entries()).sort(([fe],[P])=>fe.localeCompare(P)).map(([fe,P])=>({providerKey:fe,runs:P.sort((F,$)=>F.startedAt.getTime()-$.startedAt.getTime())}))},[b,j,x,o]),Y=ne=>ne.split(/[-_]/).map(le=>le.charAt(0).toUpperCase()+le.slice(1)).join(" "),K=l.length>1,J=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:p.map((ne,le)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},le))});return s.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-slate-800 bg-slate-950/50 flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Execution Timeline (Next 24h)"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Upcoming scheduled runs across projects. Aligned columns = overlap."})]}),K&&s.jsxs("div",{className:"flex flex-wrap gap-2 justify-end max-w-sm",children:[s.jsxs("div",{className:"flex items-center gap-1 mr-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-400 shrink-0"}),s.jsx("span",{className:"text-[10px] text-slate-400 font-semibold",children:"current"})]}),l.filter(ne=>ne.projectId!==u).slice(0,5).map(ne=>{const le=_.get(ne.projectId)??0,fe=Lc[le],P=(ne.projectId.split("/").pop()??ne.projectId).slice(0,14);return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${fe.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:ne.projectId,children:P})]},ne.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+Gn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Gn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:p.map((ne,le)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:le*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ts(ne,"HH:mm")})},le))})]}),s.jsxs("div",{className:"relative",children:[l.length===0&&s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("p",{className:"text-sm text-slate-500 italic",children:"No project data available for timeline."})}),pf.map(ne=>{const le=E.has(ne.id),fe=w.filter(F=>F.jobType===ne.id);if(!K)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${le?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Gn},className:"shrink-0 p-3 border-r border-slate-800/50 flex items-center gap-2",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${ne.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:ne.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[J,fe.length===0?s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-600 italic",children:le?"Disabled":"No runs in this window"})}):fe.map((F,$)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(F.projectId,F.jobType),style:{left:k(F.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${ne.color.bg} ${ne.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${ne.label} at ${Ts(F.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-10",children:Ts(F.time,"HH:mm")})},$))]})]},ne.id);const P=l.length*qc+Lx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${le?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Gn,height:P},className:"shrink-0 border-r border-slate-800/50 flex flex-col px-2 py-1",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[s.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${ne.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:ne.label})]}),l.map(F=>{const $=F.projectId===u,A=(F.projectId.split("/").pop()??F.projectId).slice(0,14),ee=_.get(F.projectId)??0,B=$?ne.color.bg:Lc[ee].bg;return s.jsxs("div",{style:{height:qc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${B}`}),s.jsx("span",{className:`text-[9px] truncate ${$?"text-slate-200 font-semibold":"text-slate-600"}`,title:F.projectId,children:$?`${A} ★`:A})]},F.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:P},children:[J,l.map((F,$)=>{const A=F.projectId===u,ee=fe.filter(re=>re.projectId===F.projectId),B=Lx+$*qc,de=A?nN:lN,ye=Math.floor((qc-de)/2),ge=_.get(F.projectId)??0,Z=A?{bg:ne.color.bg,border:ne.color.border}:Lc[ge];return s.jsxs(Ke.Fragment,{children:[$>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:B}}),ee.map((re,he)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(F.projectId,re.jobType),style:{left:k(re.time)-3,top:B+ye,height:de},className:`absolute w-6 rounded border ${Z.bg} ${Z.border} ${A?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${F.projectId} · ${ne.label} @ ${Ts(re.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-20",children:Ts(re.time,"HH:mm")})},he))]},F.projectId)}),fe.length===0&&!le&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-700 italic",children:"No runs in this window"})})]})]},ne.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Gn+k(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})}),s.jsxs("div",{className:"p-3 bg-slate-900/40 flex items-center gap-4 text-[10px] text-slate-500",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-1.5 h-3 rounded bg-blue-500/50 border border-blue-500"}),s.jsx("span",{children:"Each block = one scheduled run"})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-[1px] h-4 bg-rose-500"}),s.jsx("span",{children:"Current Time"})]}),K&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),C.length>0&&s.jsxs("div",{className:"border-t border-slate-800",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Recent Execution Runs"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Last 24h of real runs grouped by provider bucket."})]}),s.jsxs("div",{className:"text-[10px] uppercase tracking-[0.2em] text-slate-500",children:[(x==null?void 0:x.recentRuns.length)??0," recorded runs"]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar","data-testid":"provider-execution-timeline",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+Gn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Gn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:D.map((ne,le)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:le*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ts(ne,"HH:mm")})},le))})]}),s.jsx("div",{className:"relative",children:C.map(({providerKey:ne,runs:le})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${ne}`,children:[s.jsxs("div",{style:{width:Gn},className:"shrink-0 p-3 border-r border-slate-800/50 flex flex-col justify-center",children:[s.jsx("span",{className:"text-xs font-semibold text-slate-300 truncate",title:ne,children:Y(ne)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:ne})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:D.map((fe,P)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},P))}),le.map(fe=>{const P=pf.find(ge=>ge.id===fe.jobType)??pf[0],F=M(fe.startedAt),$=M(fe.finishedAt),A=Math.max($-F,8),ee=fe.status==="running",B=fe.status==="error"||fe.status==="failed"||fe.status==="errored",de=ee?"bg-green-500":B?"bg-red-500":P.color.bg,ye=ee?"border-green-400/60":B?"border-red-400/60":P.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${de} ${ye} opacity-85 shadow-lg ${ee?"animate-pulse":""}`,style:{left:F,width:A},title:`${ne} • ${P.label} • ${Ts(fe.startedAt,"MMM d HH:mm")} • ${fe.status}`,"data-testid":"provider-execution-run",children:s.jsxs("div",{className:"h-full px-2 flex items-center justify-between gap-2 text-[10px] text-white/90 overflow-hidden whitespace-nowrap",children:[s.jsx("span",{className:"font-semibold uppercase tracking-wide",children:P.label}),s.jsx("span",{className:"text-white/70",children:fe.status}),fe.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",fe.throttledCount,"x"]})]})},`${ne}-${fe.id}-${fe.startedAt.getTime()}`)})]})]},ne))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Gn+M(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},dt=Ke.forwardRef(({className:l="",label:u,error:d,helperText:o,rightIcon:x,...m},y)=>{const j=Ke.useId(),b=m.id??j,p=d?`${b}-error`:void 0,w=!d&&o?`${b}-help`:void 0,E=[p,w].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[u&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:y,id:b,"aria-describedby":E,"aria-invalid":d?!0:m["aria-invalid"],className:`
|
|
361
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
362
|
+
px-3 py-2 text-sm text-slate-200
|
|
363
|
+
placeholder:text-slate-600
|
|
364
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
365
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
366
|
+
transition-all duration-200
|
|
367
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
368
|
+
${x?"pr-10":""}
|
|
369
|
+
${l}
|
|
370
|
+
`,...m}),x&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:x})]}),d?s.jsx("p",{id:p,className:"mt-1.5 text-xs text-red-400",children:d}):o?s.jsx("p",{id:w,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});dt.displayName="Input";const Ta=Ke.forwardRef(({className:l="",label:u,error:d,helperText:o,options:x,value:m,onChange:y,children:j,...b},p)=>{const w=Ke.useId(),E=b.id??w,_=d?`${E}-error`:void 0,k=!d&&o?`${E}-help`:void 0,D=[_,k].filter(Boolean).join(" ")||void 0,M=C=>{y&&y(C.target.value)};return s.jsxs("div",{className:"w-full",children:[u&&s.jsx("label",{htmlFor:E,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:p,id:E,"aria-describedby":D,"aria-invalid":d?!0:b["aria-invalid"],className:`
|
|
371
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
372
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
373
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
374
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
375
|
+
transition-all duration-200
|
|
376
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
377
|
+
${l}
|
|
378
|
+
`,value:m,onChange:M,...b,children:x?x.map(C=>s.jsx("option",{value:C.value,children:C.label},C.value)):j}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Db,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:_,className:"mt-1.5 text-xs text-red-400",children:d}):o?s.jsx("p",{id:k,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});Ta.displayName="Select";const ey=({tabs:l,activeTab:u,onChange:d,className:o=""})=>{var b,p;const[x,m]=Ke.useState((b=l[0])==null?void 0:b.id),y=u||x,j=w=>{d?d(w):m(w)};return s.jsxs("div",{className:`flex flex-col ${o}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:l.map(w=>s.jsx("button",{onClick:()=>j(w.id),className:`
|
|
379
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
380
|
+
${y===w.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
381
|
+
`,children:w.label},w.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=l.find(w=>w.id===y))==null?void 0:p.content})]})},tu=[{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"}],Zf=[{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 aggressive cadence — executor every 2h, reviewer every 3h.",schedules:{executor:"5 */2 * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *"},hints:{executor:"Every 2h 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(l){return l.trim().replace(/\s+/g," ")}function Rr(l,u){return _r(l)===_r(u)}function sN(l){if(l)return Zf.find(u=>u.id===l)}function ty(l,u,d,o,x,m){return Rr(l.schedules.executor,u)&&Rr(l.schedules.reviewer,d)&&Rr(l.schedules.qa,o)&&Rr(l.schedules.audit,x)&&Rr(l.schedules.slicer,m)}function rN(l,u,d,o,x){return Zf.find(m=>ty(m,l,u,d,o,x))}function ay(l,u,d,o,x,m){const y=sN(l);return y&&ty(y,u,d,o,x,m)?y:rN(u,d,o,x,m)}function bf(l){const u=_r(l),d=u.split(/\s+/);if(d.length!==5)return u;const[o,x,m,y,j]=d,b=/^\d+$/.test(o),p=tu.find(w=>_r(w.value)===u);if(p)return p.label;if(o==="*/30"&&x==="*")return"Every 30 minutes";if(o==="0"&&x==="*")return"Every hour";if(o.startsWith("*/"))return`Every ${parseInt(o.replace("*/",""),10)} minutes`;if(b&&x.startsWith("*/")&&m==="*"&&y==="*"&&j==="*"){const w=parseInt(x.replace("*/",""),10);return o==="0"?`Every ${w} hours`:`Every ${w} hours at :${o.padStart(2,"0")}`}if(o==="0"&&x.startsWith("*/"))return`Every ${parseInt(x.replace("*/",""),10)} hours`;if(o==="0"&&x.includes("-")){const[w,E]=x.split("-");return`Every hour from ${Ji(w)} to ${Ji(E)}`}if(b&&x.includes("-")&&m==="*"&&y==="*"&&j==="*"){const[w,E]=x.split("-");return`Every hour from ${Ii(w,o)} to ${Ii(E,o)}`}if(o==="0"&&x.includes(",")){const w=x.split(",").map(Ji);return w.length<=3?`At ${w.join(" and ")}`:`At ${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}if(b&&x.includes(",")&&m==="*"&&y==="*"&&(j==="*"||j==="1-5")){const w=x.split(",").map(_=>Ii(_,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"&&x!=="*"&&m==="*"&&y==="*"&&j==="*"?`Daily at ${Ji(x)}`:b&&x!=="*"&&m==="*"&&y==="*"&&j==="*"?`Daily at ${Ii(x,o)}`:o==="0"&&x!=="*"&&m==="*"&&y==="*"&&j==="1-5"?`Weekdays at ${Ji(x)}`:b&&x!=="*"&&m==="*"&&y==="*"&&j==="1-5"?`Weekdays at ${Ii(x,o)}`:u}function Ji(l){const u=parseInt(l,10);return u===0?"12 AM":u<12?`${u} AM`:u===12?"12 PM":`${u-12} PM`}function Ii(l,u){const d=u.padStart(2,"0"),o=parseInt(l,10);return Number.isNaN(o)?`${l}:${d}`:o===0?`12:${d} AM`:o<12?`${o}:${d} AM`:o===12?`12:${d} PM`:`${o-12}:${d} PM`}function ny(l){const u=_r(l),d=tu.find(o=>_r(o.value)===u);return(d==null?void 0:d.value)??"__custom__"}function iN(l){const u=new Date,d=l.getTime()-u.getTime(),o=Math.floor(d/6e4),x=Math.floor(o/60),m=Math.floor(x/24);return o<1?"less than a minute":o<60?`in ${o} minute${o>1?"s":""}`:x<24?`in ${x} hour${x>1?"s":""}`:`in ${m} day${m>1?"s":""}`}function uN(l){const u={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",u)}function cN(l){const u=new Date,d=l.getTime()-u.getTime(),o=Math.floor(d/6e4);return o>=0&&o<30}const oN=()=>{var In,Kn,Pn,rn,el,tl,ks,zs,Ht;const{addToast:l,selectedProjectId:u,globalModeLoading:d}=Ra(),o=Jc(),[x,m]=V.useState(!1),[y,j]=V.useState(!1),[b,p]=V.useState([]);V.useEffect(()=>{d||bg().then(p).catch(console.error)},[u,d]);const w=(me,Le)=>{me===u||me==="current"?o(`/settings?tab=schedules&mode=custom&jobType=${Le}`):l({title:"Project Switch Required",message:`To edit ${me}, please switch to that project in the sidebar.`,type:"info"})},[E,_]=V.useState(null),[k,D]=V.useState({executorSchedule:"",reviewerSchedule:"",isEditing:!1}),[M,C]=V.useState(null),[Y,K]=V.useState(null),[J,ne]=V.useState(!1),{data:le,loading:fe,error:P,refetch:F}=Ca(Sg,[u],{enabled:!d}),{data:$,loading:A,refetch:ee}=Ca(Yf,[u],{enabled:!d});V.useEffect(()=>{const me=setInterval(()=>{F()},3e4);return()=>clearInterval(me)},[F]),V.useEffect(()=>{if(d)return;const me=()=>{ux().then(C).catch(()=>{}),I1(24).then(K).catch(()=>{})};me();const Le=setInterval(me,3e4);return()=>clearInterval(Le)},[d,u]),V.useEffect(()=>{$&&!k.isEditing&&D({executorSchedule:$.cronSchedule,reviewerSchedule:$.reviewerSchedule,isEditing:!1})},[$,k.isEditing]);const B=()=>{ee(),F()},de=(me,Le)=>me instanceof Error?me.message:Le,ye=async()=>{if(le){m(!0);try{le.paused?(await Ki(),l({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await Z1(),l({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),B()}catch(me){l({title:"Action Failed",message:de(me,"Failed to toggle schedule state"),type:"error"})}finally{m(!1)}}},ge=()=>{$&&D({executorSchedule:$.cronSchedule,reviewerSchedule:$.reviewerSchedule,isEditing:!0})},Z=()=>{$&&D({executorSchedule:$.cronSchedule,reviewerSchedule:$.reviewerSchedule,isEditing:!1})},re=async()=>{if($){j(!0);try{await Cs({cronSchedule:k.executorSchedule,reviewerSchedule:k.reviewerSchedule});let me="";try{await Ki()}catch(Le){me=de(Le,"Failed to reinstall cron schedules")}D(Le=>({...Le,isEditing:!1})),B(),l(me?{title:"Schedules Saved (Cron Reinstall Failed)",message:me,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(me){l({title:"Save Failed",message:de(me,"Failed to save schedules"),type:"error"})}finally{j(!1)}}},he=async()=>{ne(!0);try{const me=await K1(!0);C(null),ux().then(C).catch(()=>{}),l({title:"Queue Cleared",message:`Removed ${me.cleared} stale job${me.cleared!==1?"s":""} from the queue.`,type:"success"})}catch(me){l({title:"Clear Failed",message:me instanceof Error?me.message:"Failed to clear queue",type:"error"})}finally{ne(!1)}},Ne=async(me,Le)=>{if($){_(me);try{me==="executor"?await Cs({executorEnabled:Le}):me==="reviewer"?await Cs({reviewerEnabled:Le}):me==="qa"?await Cs({qa:{...$.qa,enabled:Le}}):me==="audit"?await Cs({audit:{...$.audit,enabled:Le}}):await Cs({roadmapScanner:{...$.roadmapScanner,enabled:Le}});let Lt="";try{await Ki()}catch(un){Lt=de(un,"Failed to reinstall cron schedules")}B(),l(Lt?{title:"Job Saved (Cron Reinstall Failed)",message:Lt,type:"warning"}:{title:"Job Updated",message:`${me[0].toUpperCase()+me.slice(1)} ${Le?"enabled":"disabled"}.`,type:"success"})}catch(Lt){l({title:"Update Failed",message:de(Lt,"Failed to update job configuration"),type:"error"})}finally{_(null)}}},H=me=>{if(!me)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const Le=new Date(me),Lt=cN(Le);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Lt&&s.jsxs("span",{className:"relative flex h-3 w-3",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-slate-200 font-medium",children:iN(Le)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",uN(Le),")"]})]})]})},T=(me,Le,Lt,un)=>{const Us=ny(Le),Yl=Us==="__custom__";return s.jsxs("div",{className:`space-y-3 ${un?"opacity-50 pointer-events-none":""}`,children:[s.jsx("div",{className:"flex items-center space-x-3",children:s.jsx(Ta,{label:`${me} Preset`,options:tu,value:Us,onChange:Ye=>{Ye!=="__custom__"&&Lt(Ye)},className:"flex-1"})}),Yl&&s.jsx(dt,{label:"Custom Cron Expression",value:Le,onChange:Ye=>Lt(Ye.target.value),placeholder:"* * * * *",helperText:"Format: minute hour day month weekday (e.g., 0 */2 * * * for every 2 hours)"}),s.jsxs("div",{className:"text-sm text-slate-400",children:["Human-readable: ",s.jsx("span",{className:"text-slate-200",children:bf(Le)})]})]})},X=me=>{if(!me||me.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const Le=[];return me.balancedDelayMinutes>0&&Le.push(`auto +${me.balancedDelayMinutes}m`),me.manualDelayMinutes>0&&Le.push(`manual +${me.manualDelayMinutes}m`),s.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Delayed after cron fire:",s.jsxs("span",{className:"text-slate-300",children:[" ",Le.join(" • ")]})]})};if(fe||A)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(P||!le||!$)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(pn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),s.jsx("div",{className:"text-sm text-slate-500",children:(P==null?void 0:P.message)||"Unknown error"}),s.jsx(Be,{onClick:()=>{F(),ee()},children:"Retry"})]});const ce=le.paused,xe=ce?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",we=ce?"Paused":"Active",ve=ay($.scheduleBundleId,$.cronSchedule,$.reviewerSchedule,$.qa.schedule,$.audit.schedule,$.roadmapScanner.slicerSchedule||"35 */12 * * *"),_e=(me,Le,Lt)=>!ve||!Rr(ve.schedules[me],Le)?bf(Lt):`${ve.label} • ${ve.hints[me]}`,pe=M!=null&&M.running?1:0,Ue=(M==null?void 0:M.pending.total)??0,ft=(Y==null?void 0:Y.averageWaitSeconds)??null,At=Y?Y.recentRuns.filter(me=>me.throttledCount>0).length:null,Kt=me=>me===null?"—":me<60?`${Math.round(me)}s`:`${Math.floor(me/60)}m ${Math.round(me%60)}s`,Jn=s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4","data-testid":"queue-overview-cards",children:[s.jsx(Ve,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(qf,{className:"h-5 w-5 text-green-400 shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Running"}),s.jsx("div",{className:"text-2xl font-bold text-slate-100","data-testid":"overview-running",children:M?pe:"—"}),(M==null?void 0:M.running)&&s.jsxs("div",{className:"text-[11px] text-slate-400 truncate mt-0.5",children:[M.running.jobType," · ",M.running.projectName]})]}),(pe>0||Ue>0)&&s.jsx(Be,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300 shrink-0",onClick:he,loading:J,title:"Force clear all stale running and pending queue entries",children:"Clear"})]})}),s.jsx(Ve,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(i1,{className:"h-5 w-5 text-indigo-400 shrink-0"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Pending"}),s.jsx("div",{className:"text-2xl font-bold text-slate-100","data-testid":"overview-pending",children:M?Ue:"—"})]})]})}),s.jsx(Ve,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Pb,{className:"h-5 w-5 text-amber-400 shrink-0"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Avg Wait"}),s.jsx("div",{className:"text-2xl font-bold text-slate-100","data-testid":"overview-avg-wait",children:Kt(ft)})]})]})}),s.jsx(Ve,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(k1,{className:"h-5 w-5 text-yellow-400 shrink-0"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Throttled"}),s.jsx("div",{className:`text-2xl font-bold ${At&&At>0?"text-yellow-300":"text-slate-100"}`,"data-testid":"overview-throttled",children:At!==null?At:"—"}),s.jsx("div",{className:"text-[11px] text-slate-500 mt-0.5",children:"in last 24h"})]})]})})]}),s.jsx(Pg,{configs:b,currentProjectId:u,onEditJob:w,queueStatus:M,queueAnalytics:Y}),Y&&s.jsxs(Ve,{className:"p-6",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-300 uppercase tracking-wide mb-4",children:"Provider Buckets"}),s.jsx(M2,{analytics:Y})]})]}),Za=s.jsxs("div",{className:"space-y-6",children:[s.jsx(Ve,{className:`p-6 border-2 ${xe}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Fc,{className:"h-8 w-8"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Cron Status"}),s.jsx("div",{className:"text-2xl font-bold",children:we}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Be,{variant:ce?"primary":"outline",size:"lg",onClick:ye,loading:x,children:ce?s.jsxs(s.Fragment,{children:[s.jsx(Fn,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(dg,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(Ve,{className:`p-6 ${$.executorEnabled===!1?"opacity-50":""}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Executor"}),$.executorEnabled===!1?s.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"}):!k.isEditing&&s.jsxs(Be,{variant:"ghost",size:"sm",onClick:ge,children:[s.jsx(w1,{className:"h-4 w-4 mr-1"}),"Edit"]})]}),k.isEditing?T("Executor",k.executorSchedule,me=>D(Le=>({...Le,executorSchedule:me})),$.executorEnabled===!1):s.jsx("div",{className:"space-y-4",children:$.executorEnabled!==!1?s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),s.jsx("div",{className:"text-lg text-slate-200 font-medium",children:_e("executor",$.cronSchedule,le.executor.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:le.executor.schedule}),X(le.executor)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),H(le.executor.nextRun)]}),s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${le.executor.installed?"text-green-400":"text-amber-400"}`,children:[s.jsx(Yc,{className:"h-4 w-4"}),s.jsx("span",{children:le.executor.installed?"Installed":"Not installed"})]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"Executor is disabled in settings."})})]}),s.jsxs(Ve,{className:`p-6 ${$.reviewerEnabled?"":"opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Reviewer"}),!$.reviewerEnabled&&s.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),k.isEditing?T("Reviewer",k.reviewerSchedule,me=>D(Le=>({...Le,reviewerSchedule:me})),!$.reviewerEnabled):s.jsx("div",{className:"space-y-4",children:$.reviewerEnabled?s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),s.jsx("div",{className:"text-lg text-slate-200 font-medium",children:_e("reviewer",$.reviewerSchedule,le.reviewer.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:le.reviewer.schedule}),X(le.reviewer)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),H(le.reviewer.nextRun)]}),s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${le.reviewer.installed?"text-green-400":"text-amber-400"}`,children:[s.jsx(Yc,{className:"h-4 w-4"}),s.jsx("span",{children:le.reviewer.installed?"Installed":"Not installed"})]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"Automated reviews are disabled. Enable them in Settings to configure the reviewer schedule."})})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs(Ve,{className:`p-6 ${$.qa.enabled?"":"opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h3",{className:"text-lg font-semibold text-slate-200 flex items-center gap-2",children:[s.jsx(mg,{className:"h-4 w-4"}),"QA"]}),!$.qa.enabled&&s.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),$.qa.enabled?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),s.jsx("div",{className:"text-lg text-slate-200 font-medium",children:_e("qa",$.qa.schedule,((In=le.qa)==null?void 0:In.schedule)??$.qa.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((Kn=le.qa)==null?void 0:Kn.schedule)??$.qa.schedule}),X(le.qa)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),H((Pn=le.qa)==null?void 0:Pn.nextRun)]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"QA is disabled in settings."})]}),s.jsxs(Ve,{className:`p-6 ${$.audit.enabled?"":"opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h3",{className:"text-lg font-semibold text-slate-200 flex items-center gap-2",children:[s.jsx(ru,{className:"h-4 w-4"}),"Auditor"]}),!$.audit.enabled&&s.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),$.audit.enabled?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),s.jsx("div",{className:"text-lg text-slate-200 font-medium",children:_e("audit",$.audit.schedule,((rn=le.audit)==null?void 0:rn.schedule)??$.audit.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((el=le.audit)==null?void 0:el.schedule)??$.audit.schedule}),X(le.audit)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),H((tl=le.audit)==null?void 0:tl.nextRun)]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"Audit is disabled in settings."})]}),s.jsxs(Ve,{className:`p-6 ${$.roadmapScanner.enabled?"":"opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h3",{className:"text-lg font-semibold text-slate-200 flex items-center gap-2",children:[s.jsx(ig,{className:"h-4 w-4"}),"Planner"]}),!$.roadmapScanner.enabled&&s.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),$.roadmapScanner.enabled?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),s.jsx("div",{className:"text-lg text-slate-200 font-medium",children:_e("slicer",$.roadmapScanner.slicerSchedule,((ks=le.planner)==null?void 0:ks.schedule)??$.roadmapScanner.slicerSchedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((zs=le.planner)==null?void 0:zs.schedule)??$.roadmapScanner.slicerSchedule}),X(le.planner)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),H((Ht=le.planner)==null?void 0:Ht.nextRun)]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"Planner uses roadmap scanner scheduling."})]})]}),s.jsxs(Ve,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(Zc,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),le.entries.length===0?s.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):s.jsx("div",{className:"space-y-2",children:le.entries.map((me,Le)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:me},Le))})]}),k.isEditing&&s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-4 border-t border-slate-800",children:[s.jsx(Be,{variant:"ghost",onClick:Z,children:"Cancel"}),s.jsxs(Be,{onClick:re,loading:y,children:[s.jsx(Yc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]}),Fa=s.jsxs(Ve,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Job Enablement"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Executor"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Creates implementation PRs from PRDs"})]}),s.jsx(It,{checked:$.executorEnabled!==!1,disabled:E!==null,"aria-label":"Toggle executor automation",onChange:me=>Ne("executor",me)})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Reviewer"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Reviews PRs and manages merge readiness"})]}),s.jsx(It,{checked:$.reviewerEnabled,disabled:E!==null,"aria-label":"Toggle reviewer automation",onChange:me=>Ne("reviewer",me)})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"QA"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Generates and runs quality checks on PRs"})]}),s.jsx(It,{checked:$.qa.enabled,disabled:E!==null,"aria-label":"Toggle QA automation",onChange:me=>Ne("qa",me)})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Auditor"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Runs automated audit reports"})]}),s.jsx(It,{checked:$.audit.enabled,disabled:E!==null,"aria-label":"Toggle audit automation",onChange:me=>Ne("audit",me)})]}),s.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:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Planner"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Creates PRDs from audit findings and pending roadmap items"})]}),s.jsx(It,{checked:$.roadmapScanner.enabled,disabled:E!==null,"aria-label":"Toggle planner automation",onChange:me=>Ne("planner",me)})]})]})]});return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"}),ve&&s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Schedule Bundle"}),s.jsx("div",{className:"text-sm font-medium text-indigo-300",children:ve.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",le.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(ey,{tabs:[{id:"overview",label:"Overview",content:Jn},{id:"schedules",label:"Schedules",content:Za},{id:"jobs",label:"Jobs",content:Fa}]})]})},Or=({label:l,value:u,onChange:d,helperText:o,placeholder:x="5 */3 * * *"})=>{const m=ny(u),y=m==="__custom__",j=w=>{w!=="__custom__"&&d(w)},b=w=>{d(w.target.value)},p=tu.find(w=>w.value===m);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(Ta,{label:l,value:m,onChange:j,options:tu.map(w=>({label:w.label,value:w.value})),helperText:y?void 0:(p==null?void 0:p.description)||o}),y&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(dt,{label:"Cron Expression",value:u,onChange:b,placeholder:x}),s.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[s.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",s.jsx("br",{}),s.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})},Sf=l=>{var u,d,o,x,m,y,j;return{provider:l.provider,providerLabel:l.providerLabel??"",defaultBranch:l.defaultBranch,prdDir:l.prdDir||"docs/prds",branchPrefix:l.branchPrefix,branchPatterns:l.branchPatterns||[],executorEnabled:l.executorEnabled??!0,reviewerEnabled:l.reviewerEnabled,minReviewScore:l.minReviewScore,maxRuntime:l.maxRuntime,reviewerMaxRuntime:l.reviewerMaxRuntime,maxLogSize:l.maxLogSize,cronSchedule:l.cronSchedule||"5 */3 * * *",reviewerSchedule:l.reviewerSchedule||"25 */6 * * *",scheduleBundleId:l.scheduleBundleId??null,cronScheduleOffset:l.cronScheduleOffset??0,schedulingPriority:l.schedulingPriority??3,maxRetries:l.maxRetries??3,reviewerMaxRetries:l.reviewerMaxRetries??2,reviewerRetryDelay:l.reviewerRetryDelay??30,providerEnv:l.providerEnv||{},notifications:l.notifications||{webhooks:[]},prdPriority:l.prdPriority||[],roadmapScanner:{enabled:((u=l.roadmapScanner)==null?void 0:u.enabled)??!0,roadmapPath:((d=l.roadmapScanner)==null?void 0:d.roadmapPath)??"ROADMAP.md",autoScanInterval:((o=l.roadmapScanner)==null?void 0:o.autoScanInterval)??300,slicerSchedule:((x=l.roadmapScanner)==null?void 0:x.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((m=l.roadmapScanner)==null?void 0:m.slicerMaxRuntime)??600,priorityMode:((y=l.roadmapScanner)==null?void 0:y.priorityMode)??"roadmap-first",issueColumn:((j=l.roadmapScanner)==null?void 0:j.issueColumn)??"Draft"},templatesDir:l.templatesDir||".night-watch/templates",boardProvider:l.boardProvider||{enabled:!0,provider:"github"},jobProviders:l.jobProviders||{},autoMerge:l.autoMerge??!1,autoMergeMethod:l.autoMergeMethod??"squash",fallbackOnRateLimit:l.fallbackOnRateLimit??!0,claudeModel:l.claudeModel??"sonnet",qa:l.qa||{enabled:!0,schedule:"45 2,14 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},audit:l.audit||{enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800},queue:l.queue||{enabled:!0,maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10}}}},qx=l=>{const u=ay(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??"35 */12 * * *");return u?{mode:"template",selectedTemplateId:u.id}:{mode:"custom",selectedTemplateId:""}},dN=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>l.toUpperCase().includes(d)),fN=({value:l,isSensitive:u})=>{const[d,o]=Ke.useState(!1);return u?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?l:"••••••••••••"}),s.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?s.jsx(Zb,{className:"h-4 w-4"}):s.jsx(Qb,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},hN=({envVars:l,onChange:u})=>{const[d,o]=Ke.useState(""),[x,m]=Ke.useState(""),[y,j]=Ke.useState(null),[b,p]=Ke.useState(""),w=()=>{if(d.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(d)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}u({...l,[d]:x}),o(""),m("")}},E=C=>{const Y={...l};delete Y[C],u(Y)},_=C=>{j(C),p(l[C])},k=()=>{y&&(u({...l,[y]:b}),j(null),p(""))},D=()=>{j(null),p("")},M=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:M.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No provider environment variables configured."}):M.map(([C,Y])=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:C}),y===C?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:b,onChange:K=>p(K.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),s.jsx("button",{type:"button",onClick:k,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${C} value`,title:`Save ${C} value`,children:s.jsx(Yc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:D,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${C}`,title:`Cancel editing ${C}`,children:s.jsx(iu,{className:"h-4 w-4"})})]}):s.jsx(fN,{value:Y,isSensitive:dN(C)})]}),y!==C&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>_(C),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${C}`,title:`Edit ${C}`,children:s.jsx(fg,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>E(C),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${C}`,title:`Delete ${C}`,children:s.jsx(xg,{className:"h-4 w-4"})})]})]},C))}),s.jsxs("div",{className:"flex items-end gap-3 pt-4 border-t border-slate-800",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:d,onChange:C=>o(C.target.value.toUpperCase()),placeholder:"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:x,onChange:C=>m(C.target.value),placeholder:"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Be,{onClick:w,disabled:!d.trim(),children:[s.jsx(su,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},mN=({notifications:l,onChange:u})=>{const[d,o]=Ke.useState(null),[x,m]=Ke.useState(!1),[y,j]=Ke.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:[...l.webhooks,y]}),j({type:"slack",url:"",events:[]}),m(!1)},w=(D,M)=>{const C=[...l.webhooks];C[D]=M,u({webhooks:C})},E=D=>{u({webhooks:l.webhooks.filter((M,C)=>C!==D)})},_=(D,M)=>D.includes(M)?D.filter(C=>C!==M):[...D,M],k=({webhook:D,onChange:M,onSave:C,onCancel:Y,isNew:K})=>s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ta,{label:"Type",value:D.type,onChange:J=>{const ne=J;M(ne==="telegram"?{type:ne,botToken:"",chatId:"",events:D.events}:{type:ne,url:"",events:D.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),D.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(dt,{label:"Bot Token",type:"password",value:D.botToken||"",onChange:J=>M({...D,botToken:J.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(dt,{label:"Chat ID",value:D.chatId||"",onChange:J=>M({...D,chatId:J.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(dt,{label:"Webhook URL",type:"password",value:D.url||"",onChange:J=>M({...D,url:J.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:b.map(J=>s.jsx("button",{type:"button",onClick:()=>M({...D,events:_(D.events,J.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${D.events.includes(J.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:J.label},J.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Be,{variant:"ghost",onClick:Y,children:"Cancel"}),s.jsx(Be,{onClick:C,disabled:D.events.length===0||(D.type==="telegram"?!D.botToken||!D.chatId:!D.url),children:K?"Add Webhook":"Save Changes"})]})]});return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:l.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):l.webhooks.map((D,M)=>s.jsx("div",{children:d===M?s.jsx(k,{webhook:D,onChange:C=>w(M,C),onSave:()=>o(null),onCancel:()=>o(null)}):s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:D.type}),D.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",D.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:D.events.map(C=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:C.replace("_"," ")},C))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>o(M),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${D.type} webhook`,title:`Edit ${D.type} webhook`,children:s.jsx(fg,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>E(M),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${D.type} webhook`,title:`Delete ${D.type} webhook`,children:s.jsx(xg,{className:"h-4 w-4"})})]})]})},M))}),x?s.jsx(k,{webhook:y,onChange:j,onSave:p,onCancel:()=>m(!1),isNew:!0}):s.jsxs(Be,{variant:"ghost",onClick:()=>m(!0),children:[s.jsx(su,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},Nf=({label:l,value:u,onChange:d,placeholder:o,helpText:x})=>{const[m,y]=Ke.useState(""),j=()=>{m.trim()&&!u.includes(m.trim())&&(d([...u,m.trim()]),y(""))},b=w=>{d(u.filter(E=>E!==w))},p=w=>{w.key==="Enter"&&(w.preventDefault(),j())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:l}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:u.map(w=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[w,s.jsx("button",{type:"button",onClick:()=>b(w),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${w}`,title:`Remove ${w}`,children:s.jsx(iu,{className:"h-3 w-3"})})]},w))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:m,onChange:w=>y(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"}),s.jsx(Be,{onClick:j,disabled:!m.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(su,{className:"h-4 w-4"})})]}),x&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:x})]})},xN=()=>{const{addToast:l,projectName:u,selectedProjectId:d,globalModeLoading:o}=Ra(),[x,m]=Ke.useState(!1),[y,j]=Ke.useState(null),b=Ke.useRef(!1),[p,w]=Ke.useState("template"),[E,_]=Ke.useState("always-on"),[k,D]=Ke.useState("general"),M=Xn(),{data:C,loading:Y,error:K,refetch:J}=Ca(Yf,[d],{enabled:!o}),{data:ne,loading:le,refetch:fe}=Ca(V1,[d],{enabled:!o}),P=ne??[];Ke.useEffect(()=>{const H=new URLSearchParams(M.search),T=H.get("tab"),X=H.get("mode");T&&D(T),X==="custom"?w("custom"):X==="template"&&w("template");const ce=H.get("jobType");ce&&T==="schedules"&&setTimeout(()=>{ee("current",ce)},300)},[M.search,C]);const F=Ke.useCallback(H=>{const T=qx(H);w(T.mode),_(T.selectedTemplateId)},[]);Ke.useEffect(()=>{if(C)if(b.current)b.current=!1;else{const H=Sf(C);j(H),F(H)}},[C,F]);const[$,A]=Ke.useState([]);Ke.useEffect(()=>{bg().then(A).catch(console.error)},[C]);const ee=(H,T)=>{H===u||H==="current"?(p!=="custom"&&ye(),setTimeout(()=>{const X={executor:"job-schedule-executor",reviewer:"job-schedule-reviewer",qa:"job-schedule-qa",audit:"job-schedule-audit",slicer:"job-schedule-slicer"},ce=document.getElementById(X[T]||"");ce&&(ce.scrollIntoView({behavior:"smooth",block:"center"}),ce.classList.add("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900","rounded-lg"),setTimeout(()=>ce.classList.remove("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900"),2e3))},50)):l({title:"Project Switch Required",message:`To edit ${H}, please switch to that project in the sidebar.`,type:"info"})},B=(H,T)=>{j(X=>X&&{...X,[H]:T})},de=()=>{if(w("template"),!y)return;const H=qx(y);H.mode==="template"&&(_(H.selectedTemplateId),B("scheduleBundleId",H.selectedTemplateId))},ye=()=>{w("custom"),B("scheduleBundleId",null),_("")},ge=H=>{_(H.id),j(T=>T&&{...T,cronSchedule:H.schedules.executor,reviewerSchedule:H.schedules.reviewer,scheduleBundleId:H.id,qa:{...T.qa,schedule:H.schedules.qa},audit:{...T.audit,schedule:H.schedules.audit},roadmapScanner:{...T.roadmapScanner,slicerSchedule:H.schedules.slicer},fallbackOnRateLimit:!0})},Z=async()=>{var X,ce,xe;if(!y)return;const H=y.cronSchedule!==(C==null?void 0:C.cronSchedule)||y.reviewerSchedule!==(C==null?void 0:C.reviewerSchedule)||y.cronScheduleOffset!==((C==null?void 0:C.cronScheduleOffset)??0)||y.schedulingPriority!==((C==null?void 0:C.schedulingPriority)??3)||y.executorEnabled!==((C==null?void 0:C.executorEnabled)??!0)||y.reviewerEnabled!==((C==null?void 0:C.reviewerEnabled)??!0)||y.queue.enabled!==(((X=C==null?void 0:C.queue)==null?void 0:X.enabled)??!0)||y.qa.enabled!==((C==null?void 0:C.qa.enabled)??!0)||y.qa.schedule!==(C==null?void 0:C.qa.schedule)||y.audit.enabled!==((C==null?void 0:C.audit.enabled)??!0)||y.audit.schedule!==(C==null?void 0:C.audit.schedule)||y.roadmapScanner.enabled!==(((ce=C==null?void 0:C.roadmapScanner)==null?void 0:ce.enabled)??!0)||(y.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((xe=C==null?void 0:C.roadmapScanner)==null?void 0:xe.slicerSchedule)||"35 */12 * * *"),T={};for(const[we,ve]of Object.entries(y.jobProviders))ve!=null&&ve!==""&&(T[we]=ve);m(!0);try{const we=await Cs({provider:y.provider,providerLabel:y.providerLabel.trim(),defaultBranch:y.defaultBranch,prdDir:y.prdDir,branchPrefix:y.branchPrefix,branchPatterns:y.branchPatterns,executorEnabled:y.executorEnabled,reviewerEnabled:y.reviewerEnabled,minReviewScore:y.minReviewScore,maxRuntime:y.maxRuntime,reviewerMaxRuntime:y.reviewerMaxRuntime,maxLogSize:y.maxLogSize,cronSchedule:y.cronSchedule,reviewerSchedule:y.reviewerSchedule,scheduleBundleId:p==="template"?y.scheduleBundleId:null,cronScheduleOffset:y.cronScheduleOffset,schedulingPriority:y.schedulingPriority,maxRetries:y.maxRetries,reviewerMaxRetries:y.reviewerMaxRetries,reviewerRetryDelay:y.reviewerRetryDelay,providerEnv:y.providerEnv,notifications:y.notifications,prdPriority:y.prdPriority,roadmapScanner:y.roadmapScanner,templatesDir:y.templatesDir,boardProvider:y.boardProvider,jobProviders:T,autoMerge:y.autoMerge,autoMergeMethod:y.autoMergeMethod,fallbackOnRateLimit:y.fallbackOnRateLimit,claudeModel:y.claudeModel,qa:y.qa,audit:y.audit,queue:y.queue}),ve=Sf(we);j(ve),F(ve);let _e="";if(H)try{await Ki()}catch(pe){_e=pe instanceof Error?pe.message:"failed to reinstall cron schedules"}l(_e?{title:"Settings Saved (Cron Reinstall Failed)",message:_e,type:"warning"}:{title:"Settings Saved",message:H?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),b.current=!0,J(),fe()}catch(we){l({title:"Save Failed",message:we instanceof Error?we.message:"Failed to save configuration",type:"error"})}finally{m(!1)}},re=()=>{if(C){const H=Sf(C);j(H),F(H),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},he=async H=>{try{const T=await Eg(H);B("roadmapScanner",T.roadmapScanner);let X="";try{await Ki()}catch(ce){X=ce instanceof Error?ce.message:"Failed to reinstall cron schedules"}l(X?{title:"Planner Saved (Cron Reinstall Failed)",message:X,type:"warning"}:{title:H?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${H?"enabled":"disabled"}.`,type:"success"})}catch(T){l({title:"Toggle Failed",message:T instanceof Error?T.message:"Failed to toggle roadmap scanner",type:"error"})}};if(Y||!y)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(K)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(pn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),s.jsx("div",{className:"text-sm text-slate-500",children:K.message}),s.jsx(Be,{onClick:()=>J(),children:"Retry"})]});const Ne=[{id:"general",label:"General",content:s.jsx(Ve,{className:"p-6 space-y-6",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[s.jsx(dt,{label:"Project Name",value:u,disabled:!0}),s.jsx(dt,{label:"Default Branch",value:y.defaultBranch,onChange:H=>B("defaultBranch",H.target.value)}),s.jsx(dt,{label:"PRD Directory",value:y.prdDir,onChange:H=>B("prdDir",H.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(dt,{label:"Branch Prefix",value:y.branchPrefix,onChange:H=>B("branchPrefix",H.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(It,{label:"Enable PRD Executor",checked:y.executorEnabled,onChange:H=>B("executorEnabled",H)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(It,{label:"Enable Automated Reviews",checked:y.reviewerEnabled,onChange:H=>B("reviewerEnabled",H)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(It,{label:"Auto-merge approved PRs",checked:y.autoMerge,onChange:H=>B("autoMerge",H)})}),y.autoMerge&&s.jsx(Ta,{label:"Merge Method",value:y.autoMergeMethod,onChange:H=>B("autoMergeMethod",H),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]})]}),s.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:s.jsx(Nf,{label:"Branch Patterns",value:y.branchPatterns,onChange:H=>B("branchPatterns",H),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})})},{id:"providers",label:"Providers",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Ve,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Global Provider"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Default AI provider used for all jobs unless overridden below"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ta,{label:"Provider",value:y.provider,onChange:H=>B("provider",H),options:[{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]}),s.jsx(dt,{label:"Provider Label",value:y.providerLabel,onChange:H=>B("providerLabel",H.target.value),placeholder:"e.g. GLM-5 (auto-derived if blank)",helperText:"Human-friendly name shown in PR comments, review footers, and commit attribution"}),s.jsx(Ta,{label:"Claude Model",value:y.claudeModel,onChange:H=>B("claudeModel",H),options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"Model used for native Claude execution (when no proxy is set or after fallback)"}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx(It,{label:"Fallback on Rate Limit",checked:y.fallbackOnRateLimit,onChange:H=>B("fallbackOnRateLimit",H)}),s.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"When enabled, automatically fall back to native Claude API after rate-limit on proxy provider"})]})]})]}),s.jsxs(Ve,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Per-Job Provider Overrides"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:'Override the AI provider for specific job types. Leave as "Use Global" to use the default provider.'})]}),s.jsx("div",{className:"space-y-4",children:[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"}].map(({key:H,label:T})=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:T}),s.jsx("div",{className:"w-64",children:s.jsx(Ta,{value:y.jobProviders[H]??"",onChange:X=>{const ce={...y.jobProviders};X===""?delete ce[H]:ce[H]=X,B("jobProviders",ce)},options:[{label:"Use Global (default)",value:""},{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]})})]},H))})]}),s.jsxs(Ve,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Provider Environment Variables"}),s.jsx(hN,{envVars:y.providerEnv,onChange:H=>B("providerEnv",H)})]})]})},{id:"runtime",label:"Runtime",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Ve,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("input",{type:"range",min:"0",max:"100",value:y.minReviewScore,onChange:H=>B("minReviewScore",Number(H.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),s.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:y.minReviewScore})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(dt,{label:"Max Runtime (Executor)",type:"number",value:String(y.maxRuntime),onChange:H=>B("maxRuntime",Number(H.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(dt,{label:"Max Runtime (Reviewer)",type:"number",value:String(y.reviewerMaxRuntime),onChange:H=>B("reviewerMaxRuntime",Number(H.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(dt,{label:"Max Log Size",type:"number",value:String(y.maxLogSize),onChange:H=>B("maxLogSize",Number(H.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(Ve,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automatic retry behavior for the PR reviewer when fixes do not fully resolve issues."})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(dt,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(y.reviewerMaxRetries),onChange:H=>{const T=Math.min(10,Math.max(0,Number(H.target.value||0)));B("reviewerMaxRetries",T)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(dt,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(y.reviewerRetryDelay),onChange:H=>{const T=Math.min(300,Math.max(0,Number(H.target.value||0)));B("reviewerRetryDelay",T)},helperText:"Wait time between retry attempts to let CI settle."})]})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs(Ve,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${p==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:de,children:"Template"}),s.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:ye,children:"Custom"})]})]}),s.jsx(Pg,{configs:$,currentProjectId:d,onEditJob:ee}),p==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Zf.map(H=>{const T=E===H.id;return s.jsxs("button",{type:"button",onClick:()=>ge(H),className:`text-left p-4 rounded-lg border transition-colors ${T?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children:H.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:H.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",H.hints.executor],["Reviewer",H.hints.reviewer],["QA",H.hints.qa],["Audit",H.hints.audit],["Slicer",H.hints.slicer]].map(([X,ce])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:X}),s.jsx("span",{className:"text-xs text-slate-400",children:ce})]},X))})]},H.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx("div",{id:"job-schedule-executor",children:s.jsx(Or,{label:"PRD Execution Schedule",value:y.cronSchedule,onChange:H=>B("cronSchedule",H)})}),s.jsx("div",{id:"job-schedule-reviewer",children:s.jsx(Or,{label:"PR Review Schedule",value:y.reviewerSchedule,onChange:H=>B("reviewerSchedule",H)})}),s.jsx("div",{id:"job-schedule-qa",children:s.jsx(Or,{label:"QA Schedule",value:y.qa.schedule,onChange:H=>B("qa",{...y.qa,schedule:H})})}),s.jsx("div",{id:"job-schedule-audit",children:s.jsx(Or,{label:"Audit Schedule",value:y.audit.schedule,onChange:H=>B("audit",{...y.audit,schedule:H})})}),y.roadmapScanner.enabled&&s.jsx("div",{id:"job-schedule-slicer",children:s.jsx(Or,{label:"Planner Schedule",value:y.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:H=>B("roadmapScanner",{...y.roadmapScanner,slicerSchedule:H})})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(Ta,{label:"Scheduling Priority",value:String(y.schedulingPriority),onChange:H=>B("schedulingPriority",Number(H)),options:[{label:"1 · Lowest",value:"1"},{label:"2 · Low",value:"2"},{label:"3 · Balanced",value:"3"},{label:"4 · High",value:"4"},{label:"5 · Highest",value:"5"}],helperText:"Higher-priority projects get earlier balanced start slots and win queue tie-breakers first."}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),s.jsx(It,{checked:y.queue.enabled,onChange:H=>B("queue",{...y.queue,enabled:H})})]})}),s.jsx(dt,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(y.cronScheduleOffset),onChange:H=>{const T=Math.min(59,Math.max(0,Number(H.target.value||0)));B("cronScheduleOffset",T)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]})},{id:"notifications",label:"Notifications",content:s.jsxs(Ve,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(mN,{notifications:y.notifications,onChange:H=>B("notifications",H)})]})},{id:"roadmap",label:"Planner",content:s.jsxs(Ve,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Generate one PRD per run using ROADMAP.md first, then audit findings when roadmap work is exhausted"})]}),s.jsx(It,{checked:y.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:he})]}),y.roadmapScanner.enabled&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(dt,{label:"Roadmap File Path",value:y.roadmapScanner.roadmapPath,onChange:H=>B("roadmapScanner",{...y.roadmapScanner,roadmapPath:H.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(Or,{label:"Planner Schedule",value:y.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:H=>B("roadmapScanner",{...y.roadmapScanner,slicerSchedule:H})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800",children:[s.jsx("h4",{className:"text-md font-medium text-slate-200 mb-4",children:"Planner Execution"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Planner creates one PRD at a time and can auto-create a board issue for handoff."}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(dt,{label:"Planner Max Runtime",type:"number",value:String(y.roadmapScanner.slicerMaxRuntime||""),onChange:H=>B("roadmapScanner",{...y.roadmapScanner,slicerMaxRuntime:Number(H.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(Ta,{label:"Planner Priority Mode",value:y.roadmapScanner.priorityMode||"roadmap-first",onChange:H=>B("roadmapScanner",{...y.roadmapScanner,priorityMode:H==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}],helperText:"Choose whether planner consumes roadmap items or audit findings first."}),s.jsx(Ta,{label:"Planner Issue Column",value:y.roadmapScanner.issueColumn||"Draft",onChange:H=>B("roadmapScanner",{...y.roadmapScanner,issueColumn:H==="Ready"?"Ready":"Draft"}),options:[{label:"Draft (default)",value:"Draft"},{label:"Ready",value:"Ready"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})]})]})},{id:"board",label:"Board",content:s.jsxs(Ve,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(It,{checked:y.boardProvider.enabled,onChange:H=>B("boardProvider",{...y.boardProvider,enabled:H})})]}),y.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(Ta,{label:"Board Provider",value:y.boardProvider.provider,onChange:H=>B("boardProvider",{...y.boardProvider,provider:H}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),y.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(dt,{label:"Project Number",type:"number",value:String(y.boardProvider.projectNumber||""),onChange:H=>B("boardProvider",{...y.boardProvider,projectNumber:H.target.value?Number(H.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(dt,{label:"Repository",value:y.boardProvider.repo||"",onChange:H=>B("boardProvider",{...y.boardProvider,repo:H.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),y.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]})},{id:"qa",label:"QA",content:s.jsxs(Ve,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),s.jsx(It,{checked:y.qa.enabled,onChange:H=>B("qa",{...y.qa,enabled:H})})]}),y.qa.enabled&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(dt,{label:"Max Runtime",type:"number",value:String(y.qa.maxRuntime),onChange:H=>B("qa",{...y.qa,maxRuntime:Number(H.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(Ta,{label:"Artifacts",value:y.qa.artifacts,onChange:H=>B("qa",{...y.qa,artifacts:H}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(dt,{label:"Skip Label",value:y.qa.skipLabel,onChange:H=>B("qa",{...y.qa,skipLabel:H.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[s.jsx(Nf,{label:"QA Branch Patterns",value:y.qa.branchPatterns,onChange:H=>B("qa",{...y.qa,branchPatterns:H}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA (defaults to top-level branchPatterns if empty)"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Automatically install Playwright browsers if missing during QA run"})]}),s.jsx(It,{checked:y.qa.autoInstallPlaywright,onChange:H=>B("qa",{...y.qa,autoInstallPlaywright:H})})]})]})]})]})},{id:"audit",label:"Audit",content:s.jsxs(Ve,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),s.jsx(It,{checked:y.audit.enabled,onChange:H=>B("audit",{...y.audit,enabled:H})})]}),y.audit.enabled&&s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:s.jsx(dt,{label:"Max Runtime",type:"number",value:String(y.audit.maxRuntime),onChange:H=>B("audit",{...y.audit,maxRuntime:Number(H.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})})]})},{id:"advanced",label:"Advanced",content:s.jsxs(Ve,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(dt,{label:"Templates Directory",value:y.templatesDir,onChange:H=>B("templatesDir",H.target.value),helperText:"Directory for custom template overrides"}),s.jsx(dt,{label:"Max Retries",type:"number",min:"1",value:String(y.maxRetries),onChange:H=>{const T=Math.max(1,Number(H.target.value||1));B("maxRetries",T)},helperText:"Retry attempts for rate-limited API calls"})]}),s.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:s.jsx(Nf,{label:"PRD Priority",value:y.prdPriority,onChange:H=>B("prdPriority",H),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),s.jsx(ey,{tabs:Ne,activeTab:k,onChange:D}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(Be,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:re,children:[s.jsx(y1,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Be,{onClick:Z,loading:x,children:[s.jsx(p1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),s.jsxs("div",{className:"mt-12",children:[s.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[s.jsx(qf,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),s.jsx(Ve,{className:"divide-y divide-slate-800",children:le?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):P.map((H,T)=>{const X=H.status==="pass",ce=H.status==="warn",xe=X?"bg-green-500/10 text-green-400 border-green-500/20":ce?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return s.jsxs("div",{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:H.name}),s.jsx("p",{className:"text-xs text-slate-500",children:H.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${xe}`,children:H.status.toUpperCase()})]},`${H.name}-${T}`)})})]})]})},gN=()=>(o2(),s.jsx(ab,{children:s.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[s.jsx("div",{className:"absolute top-0 left-0 w-full h-96 bg-indigo-900/10 rounded-full blur-[120px] -translate-y-1/2 pointer-events-none z-0"}),s.jsx(r2,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(i2,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:s.jsx("div",{className:"max-w-7xl mx-auto w-full",children:s.jsxs(_p,{children:[s.jsx(Zn,{path:"/",element:s.jsx(v2,{})}),s.jsx(Zn,{path:"/prs",element:s.jsx(b2,{})}),s.jsx(Zn,{path:"/board",element:s.jsx(x2,{})}),s.jsx(Zn,{path:"/scheduling",element:s.jsx(oN,{})}),s.jsx(Zn,{path:"/logs",element:s.jsx(p2,{})}),s.jsx(Zn,{path:"/roadmap",element:s.jsx(S2,{})}),s.jsx(Zn,{path:"/settings",element:s.jsx(xN,{})}),s.jsx(Zn,{path:"*",element:s.jsx(Dp,{to:"/",replace:!0})})]})})})]}),s.jsx(c2,{})]})})),ly=document.getElementById("root");if(!ly)throw new Error("Could not find root element to mount to");const yN=kv.createRoot(ly);yN.render(s.jsx(Ke.StrictMode,{children:s.jsx(gN,{})}));
|