@jonit-dev/night-watch-cli 1.7.81 → 1.7.82
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 +47 -9
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +2 -1
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/qa.d.ts.map +1 -1
- package/dist/commands/qa.js +2 -1
- package/dist/commands/qa.js.map +1 -1
- package/dist/commands/review.d.ts.map +1 -1
- package/dist/commands/review.js +2 -1
- package/dist/commands/review.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +7 -2
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/slice.d.ts.map +1 -1
- package/dist/commands/slice.js +2 -1
- package/dist/commands/slice.js.map +1 -1
- package/dist/scripts/night-watch-cron.sh +39 -25
- package/dist/scripts/night-watch-helpers.sh +2 -2
- package/dist/web/assets/index-DF99BowV.js +381 -0
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
var Nv=Object.defineProperty;var Y0=l=>{throw TypeError(l)};var wv=(l,u,d)=>u in l?Nv(l,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[u]=d;var $0=(l,u,d)=>wv(l,typeof u!="symbol"?u+"":u,d),rf=(l,u,d)=>u.has(l)||Y0("Cannot "+d);var P=(l,u,d)=>(rf(l,u,"read from private field"),d?d.call(l):u.get(l)),et=(l,u,d)=>u.has(l)?Y0("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(l):u.set(l,d),Te=(l,u,d,o)=>(rf(l,u,"write to private field"),o?o.call(l,d):u.set(l,d),d),Me=(l,u,d)=>(rf(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 g of m.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).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 Yx(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function jv(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 uf={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 G0;function Mv(){if(G0)return Hi;G0=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function d(o,x,m){var g=null;if(m!==void 0&&(g=""+m),x.key!==void 0&&(g=""+x.key),"key"in x){m={};for(var w in x)w!=="key"&&(m[w]=x[w])}else m=x;return x=m.ref,{$$typeof:l,type:o,key:g,ref:x!==void 0?x:null,props:m}}return Hi.Fragment=u,Hi.jsx=d,Hi.jsxs=d,Hi}var F0;function Ev(){return F0||(F0=1,uf.exports=Mv()),uf.exports}var s=Ev(),cf={exports:{}},ke={};/**
|
|
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 Z0;function Tv(){if(Z0)return ke;Z0=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"),g=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),_=Symbol.iterator;function A(O){return O===null||typeof O!="object"?null:(O=_&&O[_]||O["@@iterator"],typeof O=="function"?O:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,C={};function ne(O,Q,ce){this.props=O,this.context=Q,this.refs=C,this.updater=ce||E}ne.prototype.isReactComponent={},ne.prototype.setState=function(O,Q){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,Q,"setState")},ne.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function I(){}I.prototype=ne.prototype;function le(O,Q,ce){this.props=O,this.context=Q,this.refs=C,this.updater=ce||E}var te=le.prototype=new I;te.constructor=le,T(te,ne.prototype),te.isPureReactComponent=!0;var K=Array.isArray;function oe(){}var X={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function $(O,Q,ce){var ye=ce.ref;return{$$typeof:l,type:O,key:Q,ref:ye!==void 0?ye:null,props:ce}}function H(O,Q){return $(O.type,Q,O.props)}function ae(O){return typeof O=="object"&&O!==null&&O.$$typeof===l}function B(O){var Q={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(ce){return Q[ce]})}var de=/\/+/g;function pe(O,Q){return typeof O=="object"&&O!==null&&O.key!=null?B(""+O.key):Q.toString(36)}function ve(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(oe,oe):(O.status="pending",O.then(function(Q){O.status==="pending"&&(O.status="fulfilled",O.value=Q)},function(Q){O.status==="pending"&&(O.status="rejected",O.reason=Q)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function G(O,Q,ce,ye,he){var me=typeof O;(me==="undefined"||me==="boolean")&&(O=null);var we=!1;if(O===null)we=!0;else switch(me){case"bigint":case"string":case"number":we=!0;break;case"object":switch(O.$$typeof){case l:case u:we=!0;break;case j:return we=O._init,G(we(O._payload),Q,ce,ye,he)}}if(we)return he=he(O),we=ye===""?"."+pe(O,0):ye,K(he)?(ce="",we!=null&&(ce=we.replace(de,"$&/")+"/"),G(he,Q,ce,"",function(sa){return sa})):he!=null&&(ae(he)&&(he=H(he,ce+(he.key==null||O&&O.key===he.key?"":(""+he.key).replace(de,"$&/")+"/")+we)),Q.push(he)),1;we=0;var Be=ye===""?".":ye+":";if(K(O))for(var qe=0;qe<O.length;qe++)ye=O[qe],me=Be+pe(ye,qe),we+=G(ye,Q,ce,me,he);else if(qe=A(O),typeof qe=="function")for(O=qe.call(O),qe=0;!(ye=O.next()).done;)ye=ye.value,me=Be+pe(ye,qe++),we+=G(ye,Q,ce,me,he);else if(me==="object"){if(typeof O.then=="function")return G(ve(O),Q,ce,ye,he);throw Q=String(O),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return we}function re(O,Q,ce){if(O==null)return O;var ye=[],he=0;return G(O,ye,"","",function(me){return Q.call(ce,me,he++)}),ye}function xe(O){if(O._status===-1){var Q=O._result;Q=Q(),Q.then(function(ce){(O._status===0||O._status===-1)&&(O._status=1,O._result=ce)},function(ce){(O._status===0||O._status===-1)&&(O._status=2,O._result=ce)}),O._status===-1&&(O._status=0,O._result=Q)}if(O._status===1)return O._result.default;throw O._result}var Ne=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},U={map:re,forEach:function(O,Q,ce){re(O,function(){Q.apply(this,arguments)},ce)},count:function(O){var Q=0;return re(O,function(){Q++}),Q},toArray:function(O){return re(O,function(Q){return Q})||[]},only:function(O){if(!ae(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return ke.Activity=M,ke.Children=U,ke.Component=ne,ke.Fragment=d,ke.Profiler=x,ke.PureComponent=le,ke.StrictMode=o,ke.Suspense=b,ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,ke.__COMPILER_RUNTIME={__proto__:null,c:function(O){return X.H.useMemoCache(O)}},ke.cache=function(O){return function(){return O.apply(null,arguments)}},ke.cacheSignal=function(){return null},ke.cloneElement=function(O,Q,ce){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ye=T({},O.props),he=O.key;if(Q!=null)for(me in Q.key!==void 0&&(he=""+Q.key),Q)!J.call(Q,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&Q.ref===void 0||(ye[me]=Q[me]);var me=arguments.length-2;if(me===1)ye.children=ce;else if(1<me){for(var we=Array(me),Be=0;Be<me;Be++)we[Be]=arguments[Be+2];ye.children=we}return $(O.type,he,ye)},ke.createContext=function(O){return O={$$typeof:g,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:m,_context:O},O},ke.createElement=function(O,Q,ce){var ye,he={},me=null;if(Q!=null)for(ye in Q.key!==void 0&&(me=""+Q.key),Q)J.call(Q,ye)&&ye!=="key"&&ye!=="__self"&&ye!=="__source"&&(he[ye]=Q[ye]);var we=arguments.length-2;if(we===1)he.children=ce;else if(1<we){for(var Be=Array(we),qe=0;qe<we;qe++)Be[qe]=arguments[qe+2];he.children=Be}if(O&&O.defaultProps)for(ye in we=O.defaultProps,we)he[ye]===void 0&&(he[ye]=we[ye]);return $(O,me,he)},ke.createRef=function(){return{current:null}},ke.forwardRef=function(O){return{$$typeof:w,render:O}},ke.isValidElement=ae,ke.lazy=function(O){return{$$typeof:j,_payload:{_status:-1,_result:O},_init:xe}},ke.memo=function(O,Q){return{$$typeof:p,type:O,compare:Q===void 0?null:Q}},ke.startTransition=function(O){var Q=X.T,ce={};X.T=ce;try{var ye=O(),he=X.S;he!==null&&he(ce,ye),typeof ye=="object"&&ye!==null&&typeof ye.then=="function"&&ye.then(oe,Ne)}catch(me){Ne(me)}finally{Q!==null&&ce.types!==null&&(Q.types=ce.types),X.T=Q}},ke.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},ke.use=function(O){return X.H.use(O)},ke.useActionState=function(O,Q,ce){return X.H.useActionState(O,Q,ce)},ke.useCallback=function(O,Q){return X.H.useCallback(O,Q)},ke.useContext=function(O){return X.H.useContext(O)},ke.useDebugValue=function(){},ke.useDeferredValue=function(O,Q){return X.H.useDeferredValue(O,Q)},ke.useEffect=function(O,Q){return X.H.useEffect(O,Q)},ke.useEffectEvent=function(O){return X.H.useEffectEvent(O)},ke.useId=function(){return X.H.useId()},ke.useImperativeHandle=function(O,Q,ce){return X.H.useImperativeHandle(O,Q,ce)},ke.useInsertionEffect=function(O,Q){return X.H.useInsertionEffect(O,Q)},ke.useLayoutEffect=function(O,Q){return X.H.useLayoutEffect(O,Q)},ke.useMemo=function(O,Q){return X.H.useMemo(O,Q)},ke.useOptimistic=function(O,Q){return X.H.useOptimistic(O,Q)},ke.useReducer=function(O,Q,ce){return X.H.useReducer(O,Q,ce)},ke.useRef=function(O){return X.H.useRef(O)},ke.useState=function(O){return X.H.useState(O)},ke.useSyncExternalStore=function(O,Q,ce){return X.H.useSyncExternalStore(O,Q,ce)},ke.useTransition=function(){return X.H.useTransition()},ke.version="19.2.4",ke}var Q0;function Af(){return Q0||(Q0=1,cf.exports=Tv()),cf.exports}var V=Af();const Ke=Yx(V);var of={exports:{}},Li={},df={exports:{}},ff={};/**
|
|
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 W0;function Cv(){return W0||(W0=1,(function(l){function u(G,re){var xe=G.length;G.push(re);e:for(;0<xe;){var Ne=xe-1>>>1,U=G[Ne];if(0<x(U,re))G[Ne]=re,G[xe]=U,xe=Ne;else break e}}function d(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var re=G[0],xe=G.pop();if(xe!==re){G[0]=xe;e:for(var Ne=0,U=G.length,O=U>>>1;Ne<O;){var Q=2*(Ne+1)-1,ce=G[Q],ye=Q+1,he=G[ye];if(0>x(ce,xe))ye<U&&0>x(he,ce)?(G[Ne]=he,G[ye]=xe,Ne=ye):(G[Ne]=ce,G[Q]=xe,Ne=Q);else if(ye<U&&0>x(he,xe))G[Ne]=he,G[ye]=xe,Ne=ye;else break e}}return re}function x(G,re){var xe=G.sortIndex-re.sortIndex;return xe!==0?xe:G.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 g=Date,w=g.now();l.unstable_now=function(){return g.now()-w}}var b=[],p=[],j=1,M=null,_=3,A=!1,E=!1,T=!1,C=!1,ne=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null;function te(G){for(var re=d(p);re!==null;){if(re.callback===null)o(p);else if(re.startTime<=G)o(p),re.sortIndex=re.expirationTime,u(b,re);else break;re=d(p)}}function K(G){if(T=!1,te(G),!E)if(d(b)!==null)E=!0,oe||(oe=!0,B());else{var re=d(p);re!==null&&ve(K,re.startTime-G)}}var oe=!1,X=-1,J=5,$=-1;function H(){return C?!0:!(l.unstable_now()-$<J)}function ae(){if(C=!1,oe){var G=l.unstable_now();$=G;var re=!0;try{e:{E=!1,T&&(T=!1,I(X),X=-1),A=!0;var xe=_;try{t:{for(te(G),M=d(b);M!==null&&!(M.expirationTime>G&&H());){var Ne=M.callback;if(typeof Ne=="function"){M.callback=null,_=M.priorityLevel;var U=Ne(M.expirationTime<=G);if(G=l.unstable_now(),typeof U=="function"){M.callback=U,te(G),re=!0;break t}M===d(b)&&o(b),te(G)}else o(b);M=d(b)}if(M!==null)re=!0;else{var O=d(p);O!==null&&ve(K,O.startTime-G),re=!1}}break e}finally{M=null,_=xe,A=!1}re=void 0}}finally{re?B():oe=!1}}}var B;if(typeof le=="function")B=function(){le(ae)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,pe=de.port2;de.port1.onmessage=ae,B=function(){pe.postMessage(null)}}else B=function(){ne(ae,0)};function ve(G,re){X=ne(function(){G(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(G){G.callback=null},l.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<G?Math.floor(1e3/G):5},l.unstable_getCurrentPriorityLevel=function(){return _},l.unstable_next=function(G){switch(_){case 1:case 2:case 3:var re=3;break;default:re=_}var xe=_;_=re;try{return G()}finally{_=xe}},l.unstable_requestPaint=function(){C=!0},l.unstable_runWithPriority=function(G,re){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var xe=_;_=G;try{return re()}finally{_=xe}},l.unstable_scheduleCallback=function(G,re,xe){var Ne=l.unstable_now();switch(typeof xe=="object"&&xe!==null?(xe=xe.delay,xe=typeof xe=="number"&&0<xe?Ne+xe:Ne):xe=Ne,G){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=xe+U,G={id:j++,callback:re,priorityLevel:G,startTime:xe,expirationTime:U,sortIndex:-1},xe>Ne?(G.sortIndex=xe,u(p,G),d(b)===null&&G===d(p)&&(T?(I(X),X=-1):T=!0,ve(K,xe-Ne))):(G.sortIndex=U,u(b,G),E||A||(E=!0,oe||(oe=!0,B()))),G},l.unstable_shouldYield=H,l.unstable_wrapCallback=function(G){var re=_;return function(){var xe=_;_=re;try{return G.apply(this,arguments)}finally{_=xe}}}})(ff)),ff}var X0;function Ov(){return X0||(X0=1,df.exports=Cv()),df.exports}var hf={exports:{}},ta={};/**
|
|
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 J0;function Dv(){if(J0)return ta;J0=1;var l=Af();function u(b){var p="https://react.dev/errors/"+b;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)p+="&args[]="+encodeURIComponent(arguments[j])}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,j){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:x,key:M==null?null:""+M,children:b,containerInfo:p,implementation:j}}var g=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function w(b,p){if(b==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return ta.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ta.createPortal=function(b,p){var j=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,j)},ta.flushSync=function(b){var p=g.T,j=o.p;try{if(g.T=null,o.p=2,b)return b()}finally{g.T=p,o.p=j,o.d.f()}},ta.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))},ta.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},ta.preinit=function(b,p){if(typeof b=="string"&&p&&typeof p.as=="string"){var j=p.as,M=w(j,p.crossOrigin),_=typeof p.integrity=="string"?p.integrity:void 0,A=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;j==="style"?o.d.S(b,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:M,integrity:_,fetchPriority:A}):j==="script"&&o.d.X(b,{crossOrigin:M,integrity:_,fetchPriority:A,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},ta.preinitModule=function(b,p){if(typeof b=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var j=w(p.as,p.crossOrigin);o.d.M(b,{crossOrigin:j,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)},ta.preload=function(b,p){if(typeof b=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var j=p.as,M=w(j,p.crossOrigin);o.d.L(b,j,{crossOrigin:M,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})}},ta.preloadModule=function(b,p){if(typeof b=="string")if(p){var j=w(p.as,p.crossOrigin);o.d.m(b,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:j,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(b)},ta.requestFormReset=function(b){o.d.r(b)},ta.unstable_batchedUpdates=function(b,p){return b(p)},ta.useFormState=function(b,p,j){return g.H.useFormState(b,p,j)},ta.useFormStatus=function(){return g.H.useHostTransitionStatus()},ta.version="19.2.4",ta}var I0;function Rv(){if(I0)return hf.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(),hf.exports=Dv(),hf.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 K0;function _v(){if(K0)return Li;K0=1;var l=Ov(),u=Af(),d=Rv();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 g(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function w(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 y=!1,N=i.child;N;){if(N===a){y=!0,a=i,n=c;break}if(N===n){y=!0,n=i,a=c;break}N=N.sibling}if(!y){for(N=c.child;N;){if(N===a){y=!0,a=c,n=i;break}if(N===n){y=!0,n=c,a=i;break}N=N.sibling}if(!y)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 j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var M=Object.assign,_=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),le=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function B(e){return e===null||typeof e!="object"?null:(e=ae&&e[ae]||e["@@iterator"],typeof e=="function"?e:null)}var de=Symbol.for("react.client.reference");function pe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case ne:return"Profiler";case C:return"StrictMode";case K:return"Suspense";case oe:return"SuspenseList";case $:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case le:return e.displayName||"Context";case I:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}var ve=Array.isArray,G=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,xe={pending:!1,data:null,method:null,action:null},Ne=[],U=-1;function O(e){return{current:e}}function Q(e){0>U||(e.current=Ne[U],Ne[U]=null,U--)}function ce(e,t){U++,Ne[U]=e.current,e.current=t}var ye=O(null),he=O(null),me=O(null),we=O(null);function Be(e,t){switch(ce(me,t),ce(he,e),ce(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?d0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=d0(t),e=f0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Q(ye),ce(ye,e)}function qe(){Q(ye),Q(he),Q(me)}function sa(e){e.memoizedState!==null&&ce(we,e);var t=ye.current,a=f0(t,e.type);t!==a&&(ce(he,e),ce(ye,a))}function pa(e){he.current===e&&(Q(ye),Q(he)),we.current===e&&(Q(we),Ai._currentValue=xe)}var Bl,Xn;function Ga(e){if(Bl===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Bl=t&&t[1]||"",Xn=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Bl+e+Xn}var Fa=!1;function Jn(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(ee){var W=ee}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(ee){W=ee}e.call(ue.prototype)}}else{try{throw Error()}catch(ee){W=ee}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ee){if(ee&&W&&typeof ee.stack=="string")return[ee.stack,W.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(),y=c[0],N=c[1];if(y&&N){var R=y.split(`
|
|
44
|
+
`),Z=N.split(`
|
|
45
|
+
`);for(i=n=0;n<R.length&&!R[n].includes("DetermineComponentFrameRoot");)n++;for(;i<Z.length&&!Z[i].includes("DetermineComponentFrameRoot");)i++;if(n===R.length||i===Z.length)for(n=R.length-1,i=Z.length-1;1<=n&&0<=i&&R[n]!==Z[i];)i--;for(;1<=n&&0<=i;n--,i--)if(R[n]!==Z[i]){if(n!==1||i!==1)do if(n--,i--,0>i||R[n]!==Z[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:"")?Ga(a):""}function In(e,t){switch(e.tag){case 26:case 27:case 5:return Ga(e.type);case 16:return Ga("Lazy");case 13:return e.child!==t&&t!==null?Ga("Suspense Fallback"):Ga("Suspense");case 19:return Ga("SuspenseList");case 0:case 15:return Jn(e.type,!1);case 11:return Jn(e.type.render,!1);case 1:return Jn(e.type,!0);case 31:return Ga("Activity");default:return""}}function Kn(e){try{var t="",a=null;do t+=In(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var sn=Object.prototype.hasOwnProperty,Pn=l.unstable_scheduleCallback,el=l.unstable_cancelCallback,ks=l.unstable_shouldYield,zs=l.unstable_requestPaint,zt=l.unstable_now,ge=l.unstable_getCurrentPriorityLevel,Ue=l.unstable_ImmediatePriority,Ut=l.unstable_UserBlockingPriority,rn=l.unstable_NormalPriority,Us=l.unstable_LowPriority,Yl=l.unstable_IdlePriority,Ye=l.log,zr=l.unstable_setDisableYieldValue,vt=null,Jt=null;function Vt(e){if(typeof Ye=="function"&&zr(e),Jt&&typeof Jt.setStrictMode=="function")try{Jt.setStrictMode(vt,e)}catch{}}var Bt=Math.clz32?Math.clz32:ao,cu=Math.log,to=Math.LN2;function ao(e){return e>>>=0,e===0?32:31-(cu(e)/to|0)|0}var tl=256,Hs=262144,It=4194304;function un(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,y=e.pingedLanes;e=e.warmLanes;var N=n&134217727;return N!==0?(n=N&~c,n!==0?i=un(n):(y&=N,y!==0?i=un(y):a||(a=N&~e,a!==0&&(i=un(a))))):(N=n&~c,N!==0?i=un(N):y!==0?i=un(y):a||(a=n&~e,a!==0&&(i=un(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 al(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ou(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=It;return It<<=1,(It&62914560)===0&&(It=4194304),e}function Ls(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function nl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function du(e,t,a,n,i,c){var y=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,Z=e.hiddenUpdates;for(a=y&~a;0<a;){var se=31-Bt(a),ue=1<<se;N[se]=0,R[se]=-1;var W=Z[se];if(W!==null)for(Z[se]=null,se=0;se<W.length;se++){var ee=W[se];ee!==null&&(ee.lane&=-536870913)}a&=~ue}n!==0&&ot(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(y&~t))}function ot(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Bt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function ra(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Bt(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 Kt(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:z0(e.type))}function Lr(e,t){var a=re.p;try{return re.p=e,t()}finally{re.p=a}}var Za=Math.random().toString(36).slice(2),St="__reactFiber$"+Za,_t="__reactProps$"+Za,pn="__reactContainer$"+Za,Gl="__reactEvents$"+Za,fu="__reactListeners$"+Za,hu="__reactHandles$"+Za,mu="__reactResources$"+Za,Fl="__reactMarker$"+Za;function Bs(e){delete e[St],delete e[_t],delete e[Gl],delete e[fu],delete e[hu]}function bn(e){var t=e[St];if(t)return t;for(var a=e.parentNode;a;){if(t=a[pn]||a[St]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=p0(e);e!==null;){if(a=e[St])return a;e=p0(e)}return t}e=a,a=e.parentNode}return null}function Oe(e){if(e=e[St]||e[pn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ia(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Qa(e){var t=e[mu];return t||(t=e[mu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Tt(e){e[Fl]=!0}var xu=new Set,qr={};function cn(e,t){ll(e,t),ll(e+"Capture",t)}function ll(e,t){for(qr[e]=t,e=0;e<t.length;e++)xu.add(t[e])}var gu=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),yu={},Sn={};function Vr(e){return sn.call(Sn,e)?!0:sn.call(yu,e)?!1:gu.test(e)?Sn[e]=!0:(yu[e]=!0,!1)}function Yt(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 Nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function on(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(y){a=""+y,c.call(this,y)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zl(e){if(!e._valueTracker){var t=on(e)?"checked":"value";e._valueTracker=Br(e,t,""+e[t])}}function sl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=on(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Wa(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 $t(e){return e.replace($s,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gs(e,t,a,n,i,c,y,N){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Ql(e,y,Nt(t)):a!=null?Ql(e,y,Nt(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=""+Nt(N):e.removeAttribute("name")}function rl(e,t,a,n,i,c,y,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)){Zl(e);return}a=a!=null?""+Nt(a):"",t=t!=null?""+Nt(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,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Zl(e)}function Ql(e,t,a){t==="number"&&Wa(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Nn(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=""+Nt(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=""+Nt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Nt(a):""}function Yr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(ve(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Nt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Zl(e)}function Xa(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 vu(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 Fs(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 no=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"]]),pu=/^[\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 pu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Da(){}var $r=null;function Zs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wn=null,il=null;function bu(e){var t=Oe(e);if(t&&(e=t.stateNode)){var a=e[_t]||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="'+$t(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[_t]||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&&sl(n)}break e;case"textarea":Wl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Nn(e,!!a.multiple,t,!1)}}}var Gr=!1;function Fr(e,t,a){if(Gr)return e(t,a);Gr=!0;try{var n=e(t);return n}finally{if(Gr=!1,(wn!==null||il!==null)&&(mc(),wn&&(t=wn,e=il,il=wn=null,bu(t),e)))for(t=0;t<e.length;t++)bu(e[t])}}function Kl(e,t){var a=e.stateNode;if(a===null)return null;var n=a[_t]||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 Ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zr=!1;if(Ja)try{var Pl={};Object.defineProperty(Pl,"passive",{get:function(){Zr=!0}}),window.addEventListener("test",Pl,Pl),window.removeEventListener("test",Pl,Pl)}catch{Zr=!1}var dn=null,Qs=null,Ws=null;function At(){if(Ws)return Ws;var e,t=Qs,a=t.length,n,i="value"in dn?dn.value:dn.textContent,c=i.length;for(e=0;e<a&&t[e]===i[e];e++);var y=a-e;for(n=1;n<=y&&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 Ia(){return!0}function jn(){return!1}function wt(e){function t(a,n,i,c,y){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=c,this.target=y,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)?Ia:jn,this.isPropagationStopped=jn,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ia)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ia)},persist:function(){},isPersistent:Ia}),t}var fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ts=wt(fn),as=M({},fn,{view:0,detail:0}),Qr=wt(as),Xs,ns,ls,Js=M({},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}}),Su=wt(Js),lo=M({},Js,{dataTransfer:0}),so=wt(lo),ro=M({},as,{relatedTarget:0}),Is=wt(ro),io=M({},fn,{animationName:0,elapsedTime:0,pseudoElement:0}),ul=wt(io),uo=M({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cl=wt(uo),ss=M({},fn,{data:0}),ol=wt(ss),co={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oo={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"},fo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ho(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fo[e])?!!t[e]:!1}function rs(){return ho}var mo=M({},as,{key:function(e){if(e.key){var t=co[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"?oo[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}}),xo=wt(mo),go=M({},Js,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nu=wt(go),yo=M({},as,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rs}),vo=wt(yo),wu=M({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0}),po=wt(wu),bo=M({},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}),So=wt(bo),No=M({},fn,{newState:0,oldState:0}),wo=wt(No),ju=[9,13,27,32],Wr=Ja&&"CompositionEvent"in window,is=null;Ja&&"documentMode"in document&&(is=document.documentMode);var jo=Ja&&"TextEvent"in window&&!is,Mu=Ja&&(!Wr||is&&8<is&&11>=is),Eu=" ",Tu=!1;function Cu(e,t){switch(e){case"keyup":return ju.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ou(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dl=!1;function Mo(e,t){switch(e){case"compositionend":return Ou(t);case"keypress":return t.which!==32?null:(Tu=!0,Eu);case"textInput":return e=t.data,e===Eu&&Tu?null:e;default:return null}}function Eo(e,t){if(dl)return e==="compositionend"||!Wr&&Cu(e,t)?(e=At(),Ws=Qs=dn=null,dl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mu&&t.locale!=="ko"?null:t.data;default:return null}}var To={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 Du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!To[e.type]:t==="textarea"}function Xr(e,t,a,n){wn?il?il.push(n):il=[n]:wn=n,t=Sc(t,"onChange"),0<t.length&&(a=new ts("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var fl=null,us=null;function ua(e){s0(e,0)}function Ka(e){var t=ia(e);if(sl(t))return e}function Ru(e,t){if(e==="change")return t}var hn=!1;if(Ja){var Jr;if(Ja){var ba="oninput"in document;if(!ba){var Ir=document.createElement("div");Ir.setAttribute("oninput","return;"),ba=typeof Ir.oninput=="function"}Jr=ba}else Jr=!1;hn=Jr&&(!document.documentMode||9<document.documentMode)}function Kr(){fl&&(fl.detachEvent("onpropertychange",Pr),us=fl=null)}function Pr(e){if(e.propertyName==="value"&&Ka(us)){var t=[];Xr(t,us,e,Zs(e)),Fr(ua,t)}}function Fe(e,t,a){e==="focusin"?(Kr(),fl=t,us=a,fl.attachEvent("onpropertychange",Pr)):e==="focusout"&&Kr()}function hl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ka(us)}function Co(e,t){if(e==="click")return Ka(t)}function ft(e,t){if(e==="input"||e==="change")return Ka(t)}function cs(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:cs;function os(e,t){if(Pt(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(!sn.call(t,i)||!Pt(e[i],t[i]))return!1}return!0}function _u(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Au(e,t){var a=_u(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=_u(a)}}function 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 Oo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wa(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=Wa(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 ku=Ja&&"documentMode"in document&&11>=document.documentMode,ml=null,Ps=null,Gt=null,er=!1;function ds(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;er||ml==null||ml!==Wa(n)||(n=ml,"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}),Gt&&os(Gt,n)||(Gt=n,n=Sc(Ps,"onSelect"),0<n.length&&(t=new ts("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=ml)))}function Mn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var xl={animationend:Mn("Animation","AnimationEnd"),animationiteration:Mn("Animation","AnimationIteration"),animationstart:Mn("Animation","AnimationStart"),transitionrun:Mn("Transition","TransitionRun"),transitionstart:Mn("Transition","TransitionStart"),transitioncancel:Mn("Transition","TransitionCancel"),transitionend:Mn("Transition","TransitionEnd")},ei={},zu={};Ja&&(zu=document.createElement("div").style,"AnimationEvent"in window||(delete xl.animationend.animation,delete xl.animationiteration.animation,delete xl.animationstart.animation),"TransitionEvent"in window||delete xl.transitionend.transition);function En(e){if(ei[e])return ei[e];if(!xl[e])return e;var t=xl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in zu)return ei[e]=t[a];return e}var Uu=En("animationend"),Hu=En("animationiteration"),tr=En("animationstart"),Do=En("transitionrun"),Ro=En("transitionstart"),Lu=En("transitioncancel"),ti=En("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 ca(e,t){ai.set(e,t),cn(t,[e])}var gl=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)},aa=[],Ra=0,fs=0;function yl(){for(var e=Ra,t=fs=Ra=0;t<e;){var a=aa[t];aa[t++]=null;var n=aa[t];aa[t++]=null;var i=aa[t];aa[t++]=null;var c=aa[t];if(aa[t++]=null,n!==null&&i!==null){var y=n.pending;y===null?i.next=i:(i.next=y.next,y.next=i),n.pending=i}c!==0&&hs(a,i,c)}}function _a(e,t,a,n){aa[Ra++]=e,aa[Ra++]=t,aa[Ra++]=a,aa[Ra++]=n,fs|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ar(e,t,a,n){return _a(e,t,a,n),ms(e)}function Aa(e,t){return _a(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-Bt(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<Ei)throw Ei=0,Dd=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Sa={};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 Ft(e,t,a,n){return new nr(e,t,a,n)}function lr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ka(e,t){var a=e.alternate;return a===null?(a=Ft(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 qu(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 y=0;if(n=e,typeof e=="function")lr(e)&&(y=1);else if(typeof e=="string")y=ov(e,a,ye.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $:return e=Ft(31,a,t,i),e.elementType=$,e.lanes=c,e;case T:return za(a.children,i,c,t);case C:y=8,i|=24;break;case ne:return e=Ft(12,a,t,i|2),e.elementType=ne,e.lanes=c,e;case K:return e=Ft(13,a,t,i),e.elementType=K,e.lanes=c,e;case oe:return e=Ft(19,a,t,i),e.elementType=oe,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case le:y=10;break e;case I:y=9;break e;case te:y=11;break e;case X:y=14;break e;case J:y=16,n=null;break e}y=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=Ft(y,a,t,i),t.elementType=e,t.type=n,t.lanes=c,t}function za(e,t,a,n){return e=Ft(7,e,n,t),e.lanes=a,e}function li(e,t,a){return e=Ft(6,e,null,t),e.lanes=a,e}function Vu(e){var t=Ft(18,null,null,0);return t.stateNode=e,t}function vl(e,t,a){return t=Ft(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 oa(e,t){if(typeof e=="object"&&e!==null){var a=si.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Kn(t)},si.set(e,t),t)}return{value:e,source:t,stack:Kn(t)}}var Tn=[],Cn=0,xs=null,Pa=0,ea=[],Ee=0,da=null,Ua=1,h="";function r(e,t){Tn[Cn++]=Pa,Tn[Cn++]=xs,xs=e,Pa=t}function f(e,t,a){ea[Ee++]=Ua,ea[Ee++]=h,ea[Ee++]=da,da=e;var n=Ua;e=h;var i=32-Bt(n)-1;n&=~(1<<i),a+=1;var c=32-Bt(t)+i;if(30<c){var y=i-i%5;c=(n&(1<<y)-1).toString(32),n>>=y,i-=y,Ua=1<<32-Bt(t)+i|a<<i|n,h=c+e}else Ua=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=Tn[--Cn],Tn[Cn]=null,Pa=Tn[--Cn],Tn[Cn]=null;for(;e===da;)da=ea[--Ee],ea[Ee]=null,h=ea[--Ee],ea[Ee]=null,Ua=ea[--Ee],ea[Ee]=null}function D(e,t){ea[Ee++]=Ua,ea[Ee++]=h,ea[Ee++]=da,Ua=t.id,h=t.overflow,da=e}var k=null,z=null,q=!1,fe=null,be=!1,Ae=Error(o(519));function Ze(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw en(oa(t,e)),Ae}function De(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[St]=e,t[_t]=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),rl(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||c0(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=Da),t=!0):t=!1,t||Ze(e,!0)}function yt(e){for(k=e.return;k;)switch(k.tag){case 5:case 31:case 13:be=!1;return;case 27:case 3:be=!0;return;default:k=k.return}}function Ht(e){if(e!==k)return!1;if(!q)return yt(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")||Fd(e.type,e.memoizedProps)),a=!a),a&&z&&Ze(e),yt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));z=v0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));z=v0(e)}else t===27?(t=z,Rl(e.type)?(e=Jd,Jd=null,z=e):z=t):z=k?Va(e.stateNode.nextSibling):null;return!0}function Lt(){z=k=null,q=!1}function mn(){var e=fe;return e!==null&&(xa===null?xa=e:xa.push.apply(xa,e),fe=null),e}function en(e){fe===null?fe=[e]:fe.push(e)}var rr=O(null),On=null,Ha=null;function xn(e,t,a){ce(rr,t._currentValue),t._currentValue=a}function tn(e){e._currentValue=rr.current,Q(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 Dn(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var y=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||(y=null);break e}c=N.next}}else if(i.tag===18){if(y=i.return,y===null)throw Error(o(341));y.lanes|=a,c=y.alternate,c!==null&&(c.lanes|=a),ri(y,a,e),y=null}else y=i.child;if(y!==null)y.return=i;else for(y=i;y!==null;){if(y===e){y=null;break}if(i=y.sibling,i!==null){i.return=y.return,y=i;break}y=y.return}i=y}}function La(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 y=i.alternate;if(y===null)throw Error(o(387));if(y=y.memoizedProps,y!==null){var N=i.type;Pt(i.pendingProps.value,y.value)||(e!==null?e.push(N):e=[N])}}else if(i===we.current){if(y=i.alternate,y===null)throw Error(o(387));y.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Ai):e=[Ai])}i=i.return}e!==null&&Dn(t,e,a,n),t.flags|=262144}function ir(e){for(e=e.firstContext;e!==null;){if(!Pt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gs(e){On=e,Ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Zt(e){return Wf(On,e)}function Bu(e,t){return On===null&&gs(e),Wf(e,t)}function Wf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ha===null){if(e===null)throw Error(o(308));Ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ha=Ha.next=t;return a}var ry=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()})}},iy=l.unstable_scheduleCallback,uy=l.unstable_NormalPriority,Ct={$$typeof:le,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _o(){return{controller:new ry,data:new Map,refCount:0}}function ii(e){e.refCount--,e.refCount===0&&iy(uy,function(){e.controller.abort()})}var ui=null,Ao=0,ur=0,cr=null;function cy(e,t){if(ui===null){var a=ui=[];Ao=0,ur=Ud(),cr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Ao++,t.then(Xf,Xf),t}function Xf(){if(--Ao===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 oy(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 Jf=G.S;G.S=function(e,t){Am=zt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&cy(e,t),Jf!==null&&Jf(e,t)};var ys=O(null);function ko(){var e=ys.current;return e!==null?e:ct.pooledCache}function Yu(e,t){t===null?ce(ys,ys.current):ce(ys,t.pool)}function If(){var e=ko();return e===null?null:{parent:Ct._currentValue,pool:e}}var or=Error(o(460)),zo=Error(o(474)),$u=Error(o(542)),Gu={then:function(){}};function Kf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Pf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Da,Da),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,th(e),e;default:if(typeof t.status=="string")t.then(Da,Da);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,th(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 eh(){if(ps===null)throw Error(o(459));var e=ps;return ps=null,e}function th(e){if(e===or||e===$u)throw Error(o(483))}var dr=null,ci=0;function Fu(e){var t=ci;return ci+=1,dr===null&&(dr=[]),Pf(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 ah(e){function t(Y,L){if(e){var F=Y.deletions;F===null?(Y.deletions=[L],Y.flags|=16):F.push(L)}}function a(Y,L){if(!e)return null;for(;L!==null;)t(Y,L),L=L.sibling;return null}function n(Y){for(var L=new Map;Y!==null;)Y.key!==null?L.set(Y.key,Y):L.set(Y.index,Y),Y=Y.sibling;return L}function i(Y,L){return Y=ka(Y,L),Y.index=0,Y.sibling=null,Y}function c(Y,L,F){return Y.index=F,e?(F=Y.alternate,F!==null?(F=F.index,F<L?(Y.flags|=67108866,L):F):(Y.flags|=67108866,L)):(Y.flags|=1048576,L)}function y(Y){return e&&Y.alternate===null&&(Y.flags|=67108866),Y}function N(Y,L,F,ie){return L===null||L.tag!==6?(L=li(F,Y.mode,ie),L.return=Y,L):(L=i(L,F),L.return=Y,L)}function R(Y,L,F,ie){var Ce=F.type;return Ce===T?se(Y,L,F.props.children,ie,F.key):L!==null&&(L.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&vs(Ce)===L.type)?(L=i(L,F.props),oi(L,F),L.return=Y,L):(L=sr(F.type,F.key,F.props,null,Y.mode,ie),oi(L,F),L.return=Y,L)}function Z(Y,L,F,ie){return L===null||L.tag!==4||L.stateNode.containerInfo!==F.containerInfo||L.stateNode.implementation!==F.implementation?(L=vl(F,Y.mode,ie),L.return=Y,L):(L=i(L,F.children||[]),L.return=Y,L)}function se(Y,L,F,ie,Ce){return L===null||L.tag!==7?(L=za(F,Y.mode,ie,Ce),L.return=Y,L):(L=i(L,F),L.return=Y,L)}function ue(Y,L,F){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=li(""+L,Y.mode,F),L.return=Y,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case A:return F=sr(L.type,L.key,L.props,null,Y.mode,F),oi(F,L),F.return=Y,F;case E:return L=vl(L,Y.mode,F),L.return=Y,L;case J:return L=vs(L),ue(Y,L,F)}if(ve(L)||B(L))return L=za(L,Y.mode,F,null),L.return=Y,L;if(typeof L.then=="function")return ue(Y,Fu(L),F);if(L.$$typeof===le)return ue(Y,Bu(Y,L),F);Zu(Y,L)}return null}function W(Y,L,F,ie){var Ce=L!==null?L.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return Ce!==null?null:N(Y,L,""+F,ie);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case A:return F.key===Ce?R(Y,L,F,ie):null;case E:return F.key===Ce?Z(Y,L,F,ie):null;case J:return F=vs(F),W(Y,L,F,ie)}if(ve(F)||B(F))return Ce!==null?null:se(Y,L,F,ie,null);if(typeof F.then=="function")return W(Y,L,Fu(F),ie);if(F.$$typeof===le)return W(Y,L,Bu(Y,F),ie);Zu(Y,F)}return null}function ee(Y,L,F,ie,Ce){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Y=Y.get(F)||null,N(L,Y,""+ie,Ce);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case A:return Y=Y.get(ie.key===null?F:ie.key)||null,R(L,Y,ie,Ce);case E:return Y=Y.get(ie.key===null?F:ie.key)||null,Z(L,Y,ie,Ce);case J:return ie=vs(ie),ee(Y,L,F,ie,Ce)}if(ve(ie)||B(ie))return Y=Y.get(F)||null,se(L,Y,ie,Ce,null);if(typeof ie.then=="function")return ee(Y,L,F,Fu(ie),Ce);if(ie.$$typeof===le)return ee(Y,L,F,Bu(L,ie),Ce);Zu(L,ie)}return null}function Se(Y,L,F,ie){for(var Ce=null,Je=null,je=L,He=L=0,We=null;je!==null&&He<F.length;He++){je.index>He?(We=je,je=null):We=je.sibling;var Ie=W(Y,je,F[He],ie);if(Ie===null){je===null&&(je=We);break}e&&je&&Ie.alternate===null&&t(Y,je),L=c(Ie,L,He),Je===null?Ce=Ie:Je.sibling=Ie,Je=Ie,je=We}if(He===F.length)return a(Y,je),q&&r(Y,He),Ce;if(je===null){for(;He<F.length;He++)je=ue(Y,F[He],ie),je!==null&&(L=c(je,L,He),Je===null?Ce=je:Je.sibling=je,Je=je);return q&&r(Y,He),Ce}for(je=n(je);He<F.length;He++)We=ee(je,Y,He,F[He],ie),We!==null&&(e&&We.alternate!==null&&je.delete(We.key===null?He:We.key),L=c(We,L,He),Je===null?Ce=We:Je.sibling=We,Je=We);return e&&je.forEach(function(Ul){return t(Y,Ul)}),q&&r(Y,He),Ce}function Re(Y,L,F,ie){if(F==null)throw Error(o(151));for(var Ce=null,Je=null,je=L,He=L=0,We=null,Ie=F.next();je!==null&&!Ie.done;He++,Ie=F.next()){je.index>He?(We=je,je=null):We=je.sibling;var Ul=W(Y,je,Ie.value,ie);if(Ul===null){je===null&&(je=We);break}e&&je&&Ul.alternate===null&&t(Y,je),L=c(Ul,L,He),Je===null?Ce=Ul:Je.sibling=Ul,Je=Ul,je=We}if(Ie.done)return a(Y,je),q&&r(Y,He),Ce;if(je===null){for(;!Ie.done;He++,Ie=F.next())Ie=ue(Y,Ie.value,ie),Ie!==null&&(L=c(Ie,L,He),Je===null?Ce=Ie:Je.sibling=Ie,Je=Ie);return q&&r(Y,He),Ce}for(je=n(je);!Ie.done;He++,Ie=F.next())Ie=ee(je,Y,He,Ie.value,ie),Ie!==null&&(e&&Ie.alternate!==null&&je.delete(Ie.key===null?He:Ie.key),L=c(Ie,L,He),Je===null?Ce=Ie:Je.sibling=Ie,Je=Ie);return e&&je.forEach(function(Sv){return t(Y,Sv)}),q&&r(Y,He),Ce}function it(Y,L,F,ie){if(typeof F=="object"&&F!==null&&F.type===T&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case A:e:{for(var Ce=F.key;L!==null;){if(L.key===Ce){if(Ce=F.type,Ce===T){if(L.tag===7){a(Y,L.sibling),ie=i(L,F.props.children),ie.return=Y,Y=ie;break e}}else if(L.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&vs(Ce)===L.type){a(Y,L.sibling),ie=i(L,F.props),oi(ie,F),ie.return=Y,Y=ie;break e}a(Y,L);break}else t(Y,L);L=L.sibling}F.type===T?(ie=za(F.props.children,Y.mode,ie,F.key),ie.return=Y,Y=ie):(ie=sr(F.type,F.key,F.props,null,Y.mode,ie),oi(ie,F),ie.return=Y,Y=ie)}return y(Y);case E:e:{for(Ce=F.key;L!==null;){if(L.key===Ce)if(L.tag===4&&L.stateNode.containerInfo===F.containerInfo&&L.stateNode.implementation===F.implementation){a(Y,L.sibling),ie=i(L,F.children||[]),ie.return=Y,Y=ie;break e}else{a(Y,L);break}else t(Y,L);L=L.sibling}ie=vl(F,Y.mode,ie),ie.return=Y,Y=ie}return y(Y);case J:return F=vs(F),it(Y,L,F,ie)}if(ve(F))return Se(Y,L,F,ie);if(B(F)){if(Ce=B(F),typeof Ce!="function")throw Error(o(150));return F=Ce.call(F),Re(Y,L,F,ie)}if(typeof F.then=="function")return it(Y,L,Fu(F),ie);if(F.$$typeof===le)return it(Y,L,Bu(Y,F),ie);Zu(Y,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,L!==null&&L.tag===6?(a(Y,L.sibling),ie=i(L,F),ie.return=Y,Y=ie):(a(Y,L),ie=li(F,Y.mode,ie),ie.return=Y,Y=ie),y(Y)):a(Y,L)}return function(Y,L,F,ie){try{ci=0;var Ce=it(Y,L,F,ie);return dr=null,Ce}catch(je){if(je===or||je===$u)throw je;var Je=Ft(29,je,null,Y.mode);return Je.lanes=ie,Je.return=Y,Je}finally{}}}var bs=ah(!0),nh=ah(!1),pl=!1;function Uo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ho(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 bl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sl(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 _a(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,ra(e,a)}}function Lo(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 y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?i=c=y:c=c.next=y,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 qo=!1;function fi(){if(qo){var e=cr;if(e!==null)throw e}}function hi(e,t,a,n){qo=!1;var i=e.updateQueue;pl=!1;var c=i.firstBaseUpdate,y=i.lastBaseUpdate,N=i.shared.pending;if(N!==null){i.shared.pending=null;var R=N,Z=R.next;R.next=null,y===null?c=Z:y.next=Z,y=R;var se=e.alternate;se!==null&&(se=se.updateQueue,N=se.lastBaseUpdate,N!==y&&(N===null?se.firstBaseUpdate=Z:N.next=Z,se.lastBaseUpdate=R))}if(c!==null){var ue=i.baseState;y=0,se=Z=R=null,N=c;do{var W=N.lane&-536870913,ee=W!==N.lane;if(ee?(Qe&W)===W:(n&W)===W){W!==0&&W===ur&&(qo=!0),se!==null&&(se=se.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Se=e,Re=N;W=t;var it=a;switch(Re.tag){case 1:if(Se=Re.payload,typeof Se=="function"){ue=Se.call(it,ue,W);break e}ue=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Re.payload,W=typeof Se=="function"?Se.call(it,ue,W):Se,W==null)break e;ue=M({},ue,W);break e;case 2:pl=!0}}W=N.callback,W!==null&&(e.flags|=64,ee&&(e.flags|=8192),ee=i.callbacks,ee===null?i.callbacks=[W]:ee.push(W))}else ee={lane:W,tag:N.tag,payload:N.payload,callback:N.callback,next:null},se===null?(Z=se=ee,R=ue):se=se.next=ee,y|=W;if(N=N.next,N===null){if(N=i.shared.pending,N===null)break;ee=N,N=ee.next,ee.next=null,i.lastBaseUpdate=ee,i.shared.pending=null}}while(!0);se===null&&(R=ue),i.baseState=R,i.firstBaseUpdate=Z,i.lastBaseUpdate=se,c===null&&(i.shared.lanes=0),El|=y,e.lanes=y,e.memoizedState=ue}}function lh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function sh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)lh(a[e],t)}var fr=O(null),Qu=O(0);function rh(e,t){e=qn,ce(Qu,e),ce(fr,t),qn=e|t.baseLanes}function Vo(){ce(Qu,qn),ce(fr,fr.current)}function Bo(){qn=Qu.current,Q(fr),Q(Qu)}var Na=O(null),qa=null;function Nl(e){var t=e.alternate;ce(jt,jt.current&1),ce(Na,e),qa===null&&(t===null||fr.current!==null||t.memoizedState!==null)&&(qa=e)}function Yo(e){ce(jt,jt.current),ce(Na,e),qa===null&&(qa=e)}function ih(e){e.tag===22?(ce(jt,jt.current),ce(Na,e),qa===null&&(qa=e)):wl()}function wl(){ce(jt,jt.current),ce(Na,Na.current)}function wa(e){Q(Na),qa===e&&(qa=null),Q(jt)}var jt=O(0);function Wu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Wd(a)||Xd(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 Rn=0,ze=null,st=null,Ot=null,Xu=!1,hr=!1,Ss=!1,Ju=0,mi=0,mr=null,dy=0;function pt(){throw Error(o(321))}function $o(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Pt(e[a],t[a]))return!1;return!0}function Go(e,t,a,n,i,c){return Rn=c,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Gh:sd,Ss=!1,c=a(n,i),Ss=!1,hr&&(c=ch(t,a,n,i)),uh(e),c}function uh(e){G.H=yi;var t=st!==null&&st.next!==null;if(Rn=0,Ot=st=ze=null,Xu=!1,mi=0,mr=null,t)throw Error(o(300));e===null||Dt||(e=e.dependencies,e!==null&&ir(e)&&(Dt=!0))}function ch(e,t,a,n){ze=e;var i=0;do{if(hr&&(mr=null),mi=0,hr=!1,25<=i)throw Error(o(301));if(i+=1,Ot=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)}G.H=Fh,c=t(a,n)}while(hr);return c}function fy(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?xi(t):t,e=e.useState()[0],(st!==null?st.memoizedState:null)!==e&&(ze.flags|=1024),t}function Fo(){var e=Ju!==0;return Ju=0,e}function Zo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Qo(e){if(Xu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Xu=!1}Rn=0,Ot=st=ze=null,hr=!1,mi=Ju=0,mr=null}function na(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?ze.memoizedState=Ot=e:Ot=Ot.next=e,Ot}function Mt(){if(st===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=Ot===null?ze.memoizedState:Ot.next;if(t!==null)Ot=t,st=e;else{if(e===null)throw ze.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},Ot===null?ze.memoizedState=Ot=e:Ot=Ot.next=e}return Ot}function Iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xi(e){var t=mi;return mi+=1,mr===null&&(mr=[]),e=Pf(mr,e,t),t=ze,(Ot===null?t.memoizedState:Ot.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Gh:sd),e}function Ku(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xi(e);if(e.$$typeof===le)return Zt(e)}throw Error(o(438,String(e)))}function Wo(e){var t=null,a=ze.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=ze.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Iu(),ze.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]=H;return t.index++,a}function _n(e,t){return typeof t=="function"?t(e):t}function Pu(e){var t=Mt();return Xo(t,st,e)}function Xo(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 y=i.next;i.next=c.next,c.next=y}t.baseQueue=i=c,n.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var N=y=null,R=null,Z=t,se=!1;do{var ue=Z.lane&-536870913;if(ue!==Z.lane?(Qe&ue)===ue:(Rn&ue)===ue){var W=Z.revertLane;if(W===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),ue===ur&&(se=!0);else if((Rn&W)===W){Z=Z.next,W===ur&&(se=!0);continue}else ue={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},R===null?(N=R=ue,y=c):R=R.next=ue,ze.lanes|=W,El|=W;ue=Z.action,Ss&&a(c,ue),c=Z.hasEagerState?Z.eagerState:a(c,ue)}else W={lane:ue,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},R===null?(N=R=W,y=c):R=R.next=W,ze.lanes|=ue,El|=ue;Z=Z.next}while(Z!==null&&Z!==t);if(R===null?y=c:R.next=N,!Pt(c,e.memoizedState)&&(Dt=!0,se&&(a=cr,a!==null)))throw a;e.memoizedState=c,e.baseState=y,e.baseQueue=R,n.lastRenderedState=c}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Jo(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 y=i=i.next;do c=e(c,y.action),y=y.next;while(y!==i);Pt(c,t.memoizedState)||(Dt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function oh(e,t,a){var n=ze,i=Mt(),c=q;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var y=!Pt((st||i).memoizedState,a);if(y&&(i.memoizedState=a,Dt=!0),i=i.queue,Po(hh.bind(null,n,i,e),[e]),i.getSnapshot!==t||y||Ot!==null&&Ot.memoizedState.tag&1){if(n.flags|=2048,xr(9,{destroy:void 0},fh.bind(null,n,i,a,t),null),ct===null)throw Error(o(349));c||(Rn&127)!==0||dh(n,t,a)}return a}function dh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ze.updateQueue,t===null?(t=Iu(),ze.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function fh(e,t,a,n){t.value=a,t.getSnapshot=n,mh(t)&&xh(e)}function hh(e,t,a){return a(function(){mh(t)&&xh(e)})}function mh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Pt(e,a)}catch{return!0}}function xh(e){var t=Aa(e,2);t!==null&&ga(t,e,2)}function Io(e){var t=na();if(typeof e=="function"){var a=e;if(e=a(),Ss){Vt(!0);try{a()}finally{Vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_n,lastRenderedState:e},t}function gh(e,t,a,n){return e.baseState=a,Xo(e,st,typeof n=="function"?n:_n)}function hy(e,t,a,n,i){if(ac(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(y){c.listeners.push(y)}};G.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,yh(t,c)):(c.next=a.next,t.pending=a.next=c)}}function yh(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=G.T,y={};G.T=y;try{var N=a(i,n),R=G.S;R!==null&&R(y,N),vh(e,t,N)}catch(Z){Ko(e,t,Z)}finally{c!==null&&y.types!==null&&(c.types=y.types),G.T=c}}else try{c=a(i,n),vh(e,t,c)}catch(Z){Ko(e,t,Z)}}function vh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){ph(e,t,n)},function(n){return Ko(e,t,n)}):ph(e,t,a)}function ph(e,t,a){t.status="fulfilled",t.value=a,bh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,yh(e,a)))}function Ko(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,bh(t),t=t.next;while(t!==n)}e.action=null}function bh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Sh(e,t){return t}function Nh(e,t){if(q){var a=ct.formState;if(a!==null){e:{var n=ze;if(q){if(z){t:{for(var i=z,c=be;i.nodeType!==8;){if(!c){i=null;break t}if(i=Va(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){z=Va(i.nextSibling),n=i.data==="F!";break e}}Ze(n)}n=!1}n&&(t=a[0])}}return a=na(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sh,lastRenderedState:t},a.queue=n,a=Bh.bind(null,ze,n),n.dispatch=a,n=Io(!1),c=ld.bind(null,ze,!1,n.queue),n=na(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=hy.bind(null,ze,i,c,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function wh(e){var t=Mt();return jh(t,st,e)}function jh(e,t,a){if(t=Xo(e,t,Sh)[0],e=Pu(_n)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=xi(t)}catch(y){throw y===or?$u:y}else n=t;t=Mt();var i=t.queue,c=i.dispatch;return a!==t.memoizedState&&(ze.flags|=2048,xr(9,{destroy:void 0},my.bind(null,i,a),null)),[n,c,e]}function my(e,t){e.action=t}function Mh(e){var t=Mt(),a=st;if(a!==null)return jh(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=ze.updateQueue,t===null&&(t=Iu(),ze.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 Eh(){return Mt().memoizedState}function ec(e,t,a,n){var i=na();ze.flags|=e,i.memoizedState=xr(1|t,{destroy:void 0},a,n===void 0?null:n)}function tc(e,t,a,n){var i=Mt();n=n===void 0?null:n;var c=i.memoizedState.inst;st!==null&&n!==null&&$o(n,st.memoizedState.deps)?i.memoizedState=xr(t,c,a,n):(ze.flags|=e,i.memoizedState=xr(1|t,c,a,n))}function Th(e,t){ec(8390656,8,e,t)}function Po(e,t){tc(2048,8,e,t)}function xy(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=Iu(),ze.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Ch(e){var t=Mt().memoizedState;return xy({ref:t,nextImpl:e}),function(){if((Pe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Oh(e,t){return tc(4,2,e,t)}function Dh(e,t){return tc(4,4,e,t)}function Rh(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 _h(e,t,a){a=a!=null?a.concat([e]):null,tc(4,4,Rh.bind(null,t,e),a)}function ed(){}function Ah(e,t){var a=Mt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&$o(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function kh(e,t){var a=Mt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&$o(t,n[1]))return n[0];if(n=e(),Ss){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[n,t],n}function td(e,t,a){return a===void 0||(Rn&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=zm(),ze.lanes|=e,El|=e,a)}function zh(e,t,a,n){return Pt(a,t)?a:fr.current!==null?(e=td(e,a,n),Pt(e,t)||(Dt=!0),e):(Rn&42)===0||(Rn&1073741824)!==0&&(Qe&261930)===0?(Dt=!0,e.memoizedState=a):(e=zm(),ze.lanes|=e,El|=e,t)}function Uh(e,t,a,n,i){var c=re.p;re.p=c!==0&&8>c?c:8;var y=G.T,N={};G.T=N,ld(e,!1,t,a);try{var R=i(),Z=G.S;if(Z!==null&&Z(N,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var se=oy(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,y!==null&&N.types!==null&&(y.types=N.types),G.T=y}}function gy(){}function ad(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=Hh(e).queue;Uh(e,i,t,xe,a===null?gy:function(){return Lh(e),a(n)})}function Hh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_n,lastRenderedState:xe},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_n,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Lh(e){var t=Hh(e);t.next===null&&(t=e.alternate.memoizedState),gi(e,t.next.queue,{},Ea())}function nd(){return Zt(Ai)}function qh(){return Mt().memoizedState}function Vh(){return Mt().memoizedState}function yy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ea();e=bl(a);var n=Sl(t,e,a);n!==null&&(ga(n,t,a),di(n,t,a)),t={cache:_o()},e.payload=t;return}t=t.return}}function vy(e,t,a){var n=Ea();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ac(e)?Yh(t,a):(a=ar(e,t,a,n),a!==null&&(ga(a,e,n),$h(a,t,n)))}function Bh(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(ac(e))Yh(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var y=t.lastRenderedState,N=c(y,a);if(i.hasEagerState=!0,i.eagerState=N,Pt(N,y))return _a(e,t,i,0),ct===null&&yl(),!1}catch{}finally{}if(a=ar(e,t,i,n),a!==null)return ga(a,e,n),$h(a,t,n),!0}return!1}function ld(e,t,a,n){if(n={lane:2,revertLane:Ud(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ac(e)){if(t)throw Error(o(479))}else t=ar(e,a,n,2),t!==null&&ga(t,e,2)}function ac(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function Yh(e,t){hr=Xu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function $h(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,ra(e,a)}}var yi={readContext:Zt,use:Ku,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};yi.useEffectEvent=pt;var Gh={readContext:Zt,use:Ku,useCallback:function(e,t){return na().memoizedState=[e,t===void 0?null:t],e},useContext:Zt,useEffect:Th,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ec(4194308,4,Rh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ec(4194308,4,e,t)},useInsertionEffect:function(e,t){ec(4,2,e,t)},useMemo:function(e,t){var a=na();t=t===void 0?null:t;var n=e();if(Ss){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=na();if(a!==void 0){var i=a(t);if(Ss){Vt(!0);try{a(t)}finally{Vt(!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=vy.bind(null,ze,e),[n.memoizedState,e]},useRef:function(e){var t=na();return e={current:e},t.memoizedState=e},useState:function(e){e=Io(e);var t=e.queue,a=Bh.bind(null,ze,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ed,useDeferredValue:function(e,t){var a=na();return td(a,e,t)},useTransition:function(){var e=Io(!1);return e=Uh.bind(null,ze,e.queue,!0,!1),na().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=ze,i=na();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||dh(n,t,a)}i.memoizedState=a;var c={value:a,getSnapshot:t};return i.queue=c,Th(hh.bind(null,n,c,e),[e]),n.flags|=2048,xr(9,{destroy:void 0},fh.bind(null,n,c,a,t),null),a},useId:function(){var e=na(),t=ct.identifierPrefix;if(q){var a=h,n=Ua;a=(n&~(1<<32-Bt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ju++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=dy++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:nd,useFormState:Nh,useActionState:Nh,useOptimistic:function(e){var t=na();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ld.bind(null,ze,!0,a),a.dispatch=t,[e,t]},useMemoCache:Wo,useCacheRefresh:function(){return na().memoizedState=yy.bind(null,ze)},useEffectEvent:function(e){var t=na(),a={impl:e};return t.memoizedState=a,function(){if((Pe&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},sd={readContext:Zt,use:Ku,useCallback:Ah,useContext:Zt,useEffect:Po,useImperativeHandle:_h,useInsertionEffect:Oh,useLayoutEffect:Dh,useMemo:kh,useReducer:Pu,useRef:Eh,useState:function(){return Pu(_n)},useDebugValue:ed,useDeferredValue:function(e,t){var a=Mt();return zh(a,st.memoizedState,e,t)},useTransition:function(){var e=Pu(_n)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:xi(e),t]},useSyncExternalStore:oh,useId:qh,useHostTransitionStatus:nd,useFormState:wh,useActionState:wh,useOptimistic:function(e,t){var a=Mt();return gh(a,st,e,t)},useMemoCache:Wo,useCacheRefresh:Vh};sd.useEffectEvent=Ch;var Fh={readContext:Zt,use:Ku,useCallback:Ah,useContext:Zt,useEffect:Po,useImperativeHandle:_h,useInsertionEffect:Oh,useLayoutEffect:Dh,useMemo:kh,useReducer:Jo,useRef:Eh,useState:function(){return Jo(_n)},useDebugValue:ed,useDeferredValue:function(e,t){var a=Mt();return st===null?td(a,e,t):zh(a,st.memoizedState,e,t)},useTransition:function(){var e=Jo(_n)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:xi(e),t]},useSyncExternalStore:oh,useId:qh,useHostTransitionStatus:nd,useFormState:Mh,useActionState:Mh,useOptimistic:function(e,t){var a=Mt();return st!==null?gh(a,st,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Wo,useCacheRefresh:Vh};Fh.useEffectEvent=Ch;function rd(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:M({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var id={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ea(),i=bl(n);i.payload=t,a!=null&&(i.callback=a),t=Sl(e,i,n),t!==null&&(ga(t,e,n),di(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ea(),i=bl(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=Sl(e,i,n),t!==null&&(ga(t,e,n),di(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ea(),n=bl(a);n.tag=2,t!=null&&(n.callback=t),t=Sl(e,n,a),t!==null&&(ga(t,e,a),di(t,e,a))}};function Zh(e,t,a,n,i,c,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,y):t.prototype&&t.prototype.isPureReactComponent?!os(a,n)||!os(i,c):!0}function Qh(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&&id.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=M({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Wh(e){gl(e)}function Xh(e){console.error(e)}function Jh(e){gl(e)}function nc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Ih(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 ud(e,t,a){return a=bl(a),a.tag=3,a.payload={element:null},a.callback=function(){nc(e,t)},a}function Kh(e){return e=bl(e),e.tag=3,e}function Ph(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(){Ih(t,a,n)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Ih(t,a,n),typeof i!="function"&&(Tl===null?Tl=new Set([this]):Tl.add(this));var N=n.stack;this.componentDidCatch(n.value,{componentStack:N!==null?N:""})})}function py(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&La(t,a,i,!0),a=Na.current,a!==null){switch(a.tag){case 31:case 13:return qa===null?xc():a.alternate===null&&bt===0&&(bt=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===Gu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Ad(e,n,i)),!1;case 22:return a.flags|=65536,n===Gu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Ad(e,n,i)),!1}throw Error(o(435,a.tag))}return Ad(e,n,i),xc(),!1}if(q)return t=Na.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Ae&&(e=Error(o(422),{cause:n}),en(oa(e,a)))):(n!==Ae&&(t=Error(o(423),{cause:n}),en(oa(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=oa(n,a),i=ud(e.stateNode,n,i),Lo(e,i),bt!==4&&(bt=2)),!1;var c=Error(o(520),{cause:n});if(c=oa(c,a),Mi===null?Mi=[c]:Mi.push(c),bt!==4&&(bt=2),t===null)return!0;n=oa(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=ud(a.stateNode,n,e),Lo(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"&&(Tl===null||!Tl.has(c))))return a.flags|=65536,i&=-i,a.lanes|=i,i=Kh(i),Ph(i,e,a,n),Lo(a,i),!1}a=a.return}while(a!==null);return!1}var cd=Error(o(461)),Dt=!1;function Qt(e,t,a,n){t.child=e===null?nh(t,null,a,n):bs(t,e.child,a,n)}function em(e,t,a,n,i){a=a.render;var c=t.ref;if("ref"in n){var y={};for(var N in n)N!=="ref"&&(y[N]=n[N])}else y=n;return gs(t),n=Go(e,t,a,y,c,i),N=Fo(),e!==null&&!Dt?(Zo(e,t,i),An(e,t,i)):(q&&N&&v(t),t.flags|=1,Qt(e,t,n,i),t.child)}function tm(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,am(e,t,c,n,i)):(e=sr(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!yd(e,i)){var y=c.memoizedProps;if(a=a.compare,a=a!==null?a:os,a(y,n)&&e.ref===t.ref)return An(e,t,i)}return t.flags|=1,e=ka(c,n),e.ref=t.ref,e.return=t,t.child=e}function am(e,t,a,n,i){if(e!==null){var c=e.memoizedProps;if(os(c,n)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=n=c,yd(e,i))(e.flags&131072)!==0&&(Dt=!0);else return t.lanes=e.lanes,An(e,t,i)}return od(e,t,a,n,i)}function nm(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 lm(e,t,c,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Yu(t,c!==null?c.cachePool:null),c!==null?rh(t,c):Vo(),ih(t);else return n=t.lanes=536870912,lm(e,t,c!==null?c.baseLanes|a:a,a,n)}else c!==null?(Yu(t,c.cachePool),rh(t,c),wl(),t.memoizedState=null):(e!==null&&Yu(t,null),Vo(),wl());return Qt(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 lm(e,t,a,n,i){var c=ko();return c=c===null?null:{parent:Ct._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Yu(t,null),Vo(),ih(t),e!==null&&La(e,t,n,!0),t.childLanes=i,null}function lc(e,t){return t=rc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sm(e,t,a){return bs(t,e.child,null,a),e=lc(t,t.pendingProps),e.flags|=2,wa(t),t.memoizedState=null,e}function by(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=lc(t,n),t.lanes=536870912,vi(null,e);if(Yo(t),(e=z)?(e=y0(e,be),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:da!==null?{id:Ua,overflow:h}:null,retryLane:536870912,hydrationErrors:null},a=Vu(e),a.return=t,t.child=a,k=t,z=null)):e=null,e===null)throw Ze(t);return t.lanes=536870912,null}return lc(t,n)}var c=e.memoizedState;if(c!==null){var y=c.dehydrated;if(Yo(t),i)if(t.flags&256)t.flags&=-257,t=sm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Dt||La(e,t,a,!1),i=(a&e.childLanes)!==0,Dt||i){if(n=ct,n!==null&&(y=Hr(n,a),y!==0&&y!==c.retryLane))throw c.retryLane=y,Aa(e,y),ga(n,e,y),cd;xc(),t=sm(e,t,a)}else e=c.treeContext,z=Va(y.nextSibling),k=t,q=!0,fe=null,be=!1,e!==null&&D(t,e),t=lc(t,n),t.flags|=4096;return t}return e=ka(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function sc(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 od(e,t,a,n,i){return gs(t),a=Go(e,t,a,n,void 0,i),n=Fo(),e!==null&&!Dt?(Zo(e,t,i),An(e,t,i)):(q&&n&&v(t),t.flags|=1,Qt(e,t,a,i),t.child)}function rm(e,t,a,n,i,c){return gs(t),t.updateQueue=null,a=ch(t,n,a,i),uh(e),n=Fo(),e!==null&&!Dt?(Zo(e,t,c),An(e,t,c)):(q&&n&&v(t),t.flags|=1,Qt(e,t,a,c),t.child)}function im(e,t,a,n,i){if(gs(t),t.stateNode===null){var c=Sa,y=a.contextType;typeof y=="object"&&y!==null&&(c=Zt(y)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=id,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},Uo(t),y=a.contextType,c.context=typeof y=="object"&&y!==null?Zt(y):Sa,c.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(rd(t,a,y,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(y=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),y!==c.state&&id.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 Z=c.context,se=a.contextType;y=Sa,typeof se=="object"&&se!==null&&(y=Zt(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||Z!==y)&&Qh(t,c,n,y),pl=!1;var W=t.memoizedState;c.state=W,hi(t,n,c,i),fi(),Z=t.memoizedState,N||W!==Z||pl?(typeof ue=="function"&&(rd(t,a,ue,n),Z=t.memoizedState),(R=pl||Zh(t,a,R,n,W,Z,y))?(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=Z),c.props=n,c.state=Z,c.context=y,n=R):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,Ho(e,t),y=t.memoizedProps,se=Ns(a,y),c.props=se,ue=t.pendingProps,W=c.context,Z=a.contextType,R=Sa,typeof Z=="object"&&Z!==null&&(R=Zt(Z)),N=a.getDerivedStateFromProps,(Z=typeof N=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y!==ue||W!==R)&&Qh(t,c,n,R),pl=!1,W=t.memoizedState,c.state=W,hi(t,n,c,i),fi();var ee=t.memoizedState;y!==ue||W!==ee||pl||e!==null&&e.dependencies!==null&&ir(e.dependencies)?(typeof N=="function"&&(rd(t,a,N,n),ee=t.memoizedState),(se=pl||Zh(t,a,se,n,W,ee,R)||e!==null&&e.dependencies!==null&&ir(e.dependencies))?(Z||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,ee,R),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,ee,R)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=ee),c.props=n,c.state=ee,c.context=R,n=se):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,sc(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)):Qt(e,t,a,i),t.memoizedState=c.state,e=t.child):e=An(e,t,i),e}function um(e,t,a,n){return Lt(),t.flags|=256,Qt(e,t,a,n),t.child}var dd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fd(e){return{baseLanes:e,cachePool:If()}}function hd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ma),e}function cm(e,t,a){var n=t.pendingProps,i=!1,c=(t.flags&128)!==0,y;if((y=c)||(y=e!==null&&e.memoizedState===null?!1:(jt.current&2)!==0),y&&(i=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(q){if(i?Nl(t):wl(),(e=z)?(e=y0(e,be),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:da!==null?{id:Ua,overflow:h}:null,retryLane:536870912,hydrationErrors:null},a=Vu(e),a.return=t,t.child=a,k=t,z=null)):e=null,e===null)throw Ze(t);return Xd(e)?t.lanes=32:t.lanes=536870912,null}var N=n.children;return n=n.fallback,i?(wl(),i=t.mode,N=rc({mode:"hidden",children:N},i),n=za(n,i,a,null),N.return=t,n.return=t,N.sibling=n,t.child=N,n=t.child,n.memoizedState=fd(a),n.childLanes=hd(e,y,a),t.memoizedState=dd,vi(null,n)):(Nl(t),md(t,N))}var R=e.memoizedState;if(R!==null&&(N=R.dehydrated,N!==null)){if(c)t.flags&256?(Nl(t),t.flags&=-257,t=xd(e,t,a)):t.memoizedState!==null?(wl(),t.child=e.child,t.flags|=128,t=null):(wl(),N=n.fallback,i=t.mode,n=rc({mode:"visible",children:n.children},i),N=za(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=fd(a),n.childLanes=hd(e,y,a),t.memoizedState=dd,t=vi(null,n));else if(Nl(t),Xd(N)){if(y=N.nextSibling&&N.nextSibling.dataset,y)var Z=y.dgst;y=Z,n=Error(o(419)),n.stack="",n.digest=y,en({value:n,source:null,stack:null}),t=xd(e,t,a)}else if(Dt||La(e,t,a,!1),y=(a&e.childLanes)!==0,Dt||y){if(y=ct,y!==null&&(n=Hr(y,a),n!==0&&n!==R.retryLane))throw R.retryLane=n,Aa(e,n),ga(y,e,n),cd;Wd(N)||xc(),t=xd(e,t,a)}else Wd(N)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,z=Va(N.nextSibling),k=t,q=!0,fe=null,be=!1,e!==null&&D(t,e),t=md(t,n.children),t.flags|=4096);return t}return i?(wl(),N=n.fallback,i=t.mode,R=e.child,Z=R.sibling,n=ka(R,{mode:"hidden",children:n.children}),n.subtreeFlags=R.subtreeFlags&65011712,Z!==null?N=ka(Z,N):(N=za(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=fd(a):(i=N.cachePool,i!==null?(R=Ct._currentValue,i=i.parent!==R?{parent:R,pool:R}:i):i=If(),N={baseLanes:N.baseLanes|a,cachePool:i}),n.memoizedState=N,n.childLanes=hd(e,y,a),t.memoizedState=dd,vi(e.child,n)):(Nl(t),a=e.child,e=a.sibling,a=ka(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function md(e,t){return t=rc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rc(e,t){return e=Ft(22,e,null,t),e.lanes=0,e}function xd(e,t,a){return bs(t,e.child,null,a),e=md(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function om(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ri(e.return,t,a)}function gd(e,t,a,n,i,c){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,treeForkCount:c}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=n,y.tail=a,y.tailMode=i,y.treeForkCount=c)}function dm(e,t,a){var n=t.pendingProps,i=n.revealOrder,c=n.tail;n=n.children;var y=jt.current,N=(y&2)!==0;if(N?(y=y&1|2,t.flags|=128):y&=1,ce(jt,y),Qt(e,t,n,a),n=q?Pa:0,!N&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&om(e,a,t);else if(e.tag===19)om(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&&Wu(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),gd(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&&Wu(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}gd(t,!0,a,null,c,n);break;case"together":gd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function An(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),El|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(La(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=ka(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ka(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function yd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ir(e)))}function Sy(e,t,a){switch(t.tag){case 3:Be(t,t.stateNode.containerInfo),xn(t,Ct,e.memoizedState.cache),Lt();break;case 27:case 5:sa(t);break;case 4:Be(t,t.stateNode.containerInfo);break;case 10:xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Yo(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Nl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?cm(e,t,a):(Nl(t),e=An(e,t,a),e!==null?e.sibling:null);Nl(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(La(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return dm(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ce(jt,jt.current),n)break;return null;case 22:return t.lanes=0,nm(e,t,a,t.pendingProps);case 24:xn(t,Ct,e.memoizedState.cache)}return An(e,t,a)}function fm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Dt=!0;else{if(!yd(e,a)&&(t.flags&128)===0)return Dt=!1,Sy(e,t,a);Dt=(e.flags&131072)!==0}else Dt=!1,q&&(t.flags&1048576)!==0&&f(t,Pa,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=im(null,t,e,n,a)):(t.tag=0,t=od(null,t,e,n,a));else{if(e!=null){var i=e.$$typeof;if(i===te){t.tag=11,t=em(null,t,e,n,a);break e}else if(i===X){t.tag=14,t=tm(null,t,e,n,a);break e}}throw t=pe(e)||e,Error(o(306,t,""))}}return t;case 0:return od(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=Ns(n,t.pendingProps),im(e,t,n,i,a);case 3:e:{if(Be(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var c=t.memoizedState;i=c.element,Ho(e,t),hi(t,n,null,a);var y=t.memoizedState;if(n=y.cache,xn(t,Ct,n),n!==c.cache&&Dn(t,[Ct],a,!0),fi(),n=y.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=um(e,t,n,a);break e}else if(n!==i){i=oa(Error(o(424)),t),en(i),t=um(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(z=Va(e.firstChild),k=t,q=!0,fe=null,be=!0,a=nh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Lt(),n===i){t=An(e,t,a);break e}Qt(e,t,n,a)}t=t.child}return t;case 26:return sc(e,t),e===null?(a=w0(t.type,null,t.pendingProps,null))?t.memoizedState=a:q||(a=t.type,e=t.pendingProps,n=Nc(me.current).createElement(a),n[St]=t,n[_t]=e,Wt(n,a,e),Tt(n),t.stateNode=n):t.memoizedState=w0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return sa(t),e===null&&q&&(n=t.stateNode=b0(t.type,t.pendingProps,me.current),k=t,be=!0,i=z,Rl(t.type)?(Jd=i,z=Va(n.firstChild)):z=i),Qt(e,t,t.pendingProps.children,a),sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&q&&((i=n=z)&&(n=Iy(n,t.type,t.pendingProps,be),n!==null?(t.stateNode=n,k=t,z=Va(n.firstChild),be=!1,i=!0):i=!1),i||Ze(t)),sa(t),i=t.type,c=t.pendingProps,y=e!==null?e.memoizedProps:null,n=c.children,Fd(i,c)?n=null:y!==null&&Fd(i,y)&&(t.flags|=32),t.memoizedState!==null&&(i=Go(e,t,fy,null,null,a),Ai._currentValue=i),sc(e,t),Qt(e,t,n,a),t.child;case 6:return e===null&&q&&((e=a=z)&&(a=Ky(a,t.pendingProps,be),a!==null?(t.stateNode=a,k=t,z=null,e=!0):e=!1),e||Ze(t)),null;case 13:return cm(e,t,a);case 4:return Be(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=bs(t,null,n,a):Qt(e,t,n,a),t.child;case 11:return em(e,t,t.type,t.pendingProps,a);case 7:return Qt(e,t,t.pendingProps,a),t.child;case 8:return Qt(e,t,t.pendingProps.children,a),t.child;case 12:return Qt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,xn(t,t.type,n.value),Qt(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,gs(t),i=Zt(i),n=n(i),t.flags|=1,Qt(e,t,n,a),t.child;case 14:return tm(e,t,t.type,t.pendingProps,a);case 15:return am(e,t,t.type,t.pendingProps,a);case 19:return dm(e,t,a);case 31:return by(e,t,a);case 22:return nm(e,t,a,t.pendingProps);case 24:return gs(t),n=Zt(Ct),e===null?(i=ko(),i===null&&(i=ct,c=_o(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=a),i=c),t.memoizedState={parent:n,cache:i},Uo(t),xn(t,Ct,i)):((e.lanes&a)!==0&&(Ho(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),xn(t,Ct,n)):(n=c.cache,xn(t,Ct,n),n!==i.cache&&Dn(t,[Ct],a,!0))),Qt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function kn(e){e.flags|=4}function vd(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(qm())e.flags|=8192;else throw ps=Gu,zo}else e.flags&=-16777217}function hm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!C0(t))if(qm())e.flags|=8192;else throw ps=Gu,zo}function ic(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 ht(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 Ny(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 ht(t),null;case 1:return ht(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),tn(Ct),qe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ht(t)?kn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,mn())),ht(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(kn(t),c!==null?(ht(t),hm(t,c)):(ht(t),vd(t,i,null,n,a))):c?c!==e.memoizedState?(kn(t),ht(t),hm(t,c)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&kn(t),ht(t),vd(t,i,e,n,a)),null;case 27:if(pa(t),a=me.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&kn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return ht(t),null}e=ye.current,Ht(t)?De(t):(e=b0(i,n,a),t.stateNode=e,kn(t))}return ht(t),null;case 5:if(pa(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&kn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return ht(t),null}if(c=ye.current,Ht(t))De(t);else{var y=Nc(me.current);switch(c){case 1:c=y.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=y.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=y.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=y.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=y.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof n.is=="string"?y.createElement("select",{is:n.is}):y.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?y.createElement(i,{is:n.is}):y.createElement(i)}}c[St]=t,c[_t]=n;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)c.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=c;e:switch(Wt(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&&kn(t)}}return ht(t),vd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&kn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=me.current,Ht(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=k,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[St]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||c0(e.nodeValue,a)),e||Ze(t,!0)}else e=Nc(e).createTextNode(n),e[St]=t,t.stateNode=e}return ht(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Ht(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[St]=t}else Lt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),e=!1}else a=mn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(wa(t),t):(wa(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ht(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ht(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[St]=t}else Lt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),i=!1}else i=mn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(wa(t),t):(wa(t),null)}return wa(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),ic(t,t.updateQueue),ht(t),null);case 4:return qe(),e===null&&Vd(t.stateNode.containerInfo),ht(t),null;case 10:return tn(t.type),ht(t),null;case 19:if(Q(jt),n=t.memoizedState,n===null)return ht(t),null;if(i=(t.flags&128)!==0,c=n.rendering,c===null)if(i)pi(n,!1);else{if(bt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Wu(e),c!==null){for(t.flags|=128,pi(n,!1),e=c.updateQueue,t.updateQueue=e,ic(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)qu(a,e),a=a.sibling;return ce(jt,jt.current&1|2),q&&r(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&zt()>fc&&(t.flags|=128,i=!0,pi(n,!1),t.lanes=4194304)}else{if(!i)if(e=Wu(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,ic(t,e),pi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!q)return ht(t),null}else 2*zt()-n.renderingStartTime>fc&&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=zt(),e.sibling=null,a=jt.current,ce(jt,i?a&1|2:a&1),q&&r(t,n.treeForkCount),e):(ht(t),null);case 22:case 23:return wa(t),Bo(),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&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),a=t.updateQueue,a!==null&&ic(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&&Q(ys),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),tn(Ct),ht(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function wy(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 tn(Ct),qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pa(t),null;case 31:if(t.memoizedState!==null){if(wa(t),t.alternate===null)throw Error(o(340));Lt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Lt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Q(jt),null;case 4:return qe(),null;case 10:return tn(t.type),null;case 22:case 23:return wa(t),Bo(),e!==null&&Q(ys),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return tn(Ct),null;case 25:return null;default:return null}}function mm(e,t){switch(S(t),t.tag){case 3:tn(Ct),qe();break;case 26:case 27:case 5:pa(t);break;case 4:qe();break;case 31:t.memoizedState!==null&&wa(t);break;case 13:wa(t);break;case 19:Q(jt);break;case 10:tn(t.type);break;case 22:case 23:wa(t),Bo(),e!==null&&Q(ys);break;case 24:tn(Ct)}}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,y=a.inst;n=c(),y.destroy=n}a=a.next}while(a!==i)}}catch(N){nt(t,t.return,N)}}function jl(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 y=n.inst,N=y.destroy;if(N!==void 0){y.destroy=void 0,i=t;var R=a,Z=N;try{Z()}catch(se){nt(i,R,se)}}}n=n.next}while(n!==c)}}catch(se){nt(t,t.return,se)}}function xm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{sh(t,a)}catch(n){nt(e,e.return,n)}}}function gm(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 gn(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 ym(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 pd(e,t,a){try{var n=e.stateNode;Fy(n,e.type,a,t),n[_t]=t}catch(i){nt(e,e.return,i)}}function vm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Rl(e.type)||e.tag===4}function bd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vm(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&&Rl(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 Sd(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=Da));else if(n!==4&&(n===27&&Rl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Sd(e,t,a),e=e.sibling;e!==null;)Sd(e,t,a),e=e.sibling}function uc(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&&Rl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(uc(e,t,a),e=e.sibling;e!==null;)uc(e,t,a),e=e.sibling}function pm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Wt(t,n,a),t[St]=e,t[_t]=a}catch(c){nt(e,e.return,c)}}var zn=!1,Rt=!1,Nd=!1,bm=typeof WeakSet=="function"?WeakSet:Set,qt=null;function jy(e,t){if(e=e.containerInfo,$d=Oc,e=Oo(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 y=0,N=-1,R=-1,Z=0,se=0,ue=e,W=null;t:for(;;){for(var ee;ue!==a||i!==0&&ue.nodeType!==3||(N=y+i),ue!==c||n!==0&&ue.nodeType!==3||(R=y+n),ue.nodeType===3&&(y+=ue.nodeValue.length),(ee=ue.firstChild)!==null;)W=ue,ue=ee;for(;;){if(ue===e)break t;if(W===a&&++Z===i&&(N=y),W===c&&++se===n&&(R=y),(ee=ue.nextSibling)!==null)break;ue=W,W=ue.parentNode}ue=ee}a=N===-1||R===-1?null:{start:N,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Gd={focusedElem:e,selectionRange:a},Oc=!1,qt=t;qt!==null;)if(t=qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,qt=e;else for(;qt!==null;){switch(t=qt,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)Qd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qd(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,qt=e;break}qt=t.return}}function Sm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Hn(e,a),n&4&&bi(5,a);break;case 1:if(Hn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){nt(a,a.return,y)}else{var i=Ns(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){nt(a,a.return,y)}}n&64&&xm(a),n&512&&Si(a,a.return);break;case 3:if(Hn(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{sh(e,t)}catch(y){nt(a,a.return,y)}}break;case 27:t===null&&n&4&&pm(a);case 26:case 5:Hn(e,a),t===null&&n&4&&ym(a),n&512&&Si(a,a.return);break;case 12:Hn(e,a);break;case 31:Hn(e,a),n&4&&jm(e,a);break;case 13:Hn(e,a),n&4&&Mm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ay.bind(null,a),Py(e,a))));break;case 22:if(n=a.memoizedState!==null||zn,!n){t=t!==null&&t.memoizedState!==null||Rt,i=zn;var c=Rt;zn=n,(Rt=t)&&!c?Ln(e,a,(a.subtreeFlags&8772)!==0):Hn(e,a),zn=i,Rt=c}break;case 30:break;default:Hn(e,a)}}function Nm(e){var t=e.alternate;t!==null&&(e.alternate=null,Nm(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 mt=null,fa=!1;function Un(e,t,a){for(a=a.child;a!==null;)wm(e,t,a),a=a.sibling}function wm(e,t,a){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(vt,a)}catch{}switch(a.tag){case 26:Rt||gn(a,t),Un(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Rt||gn(a,t);var n=mt,i=fa;Rl(a.type)&&(mt=a.stateNode,fa=!1),Un(e,t,a),Di(a.stateNode),mt=n,fa=i;break;case 5:Rt||gn(a,t);case 6:if(n=mt,i=fa,mt=null,Un(e,t,a),mt=n,fa=i,mt!==null)if(fa)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(a.stateNode)}catch(c){nt(a,t,c)}else try{mt.removeChild(a.stateNode)}catch(c){nt(a,t,c)}break;case 18:mt!==null&&(fa?(e=mt,x0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Tr(e)):x0(mt,a.stateNode));break;case 4:n=mt,i=fa,mt=a.stateNode.containerInfo,fa=!0,Un(e,t,a),mt=n,fa=i;break;case 0:case 11:case 14:case 15:jl(2,a,t),Rt||jl(4,a,t),Un(e,t,a);break;case 1:Rt||(gn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&gm(a,t,n)),Un(e,t,a);break;case 21:Un(e,t,a);break;case 22:Rt=(n=Rt)||a.memoizedState!==null,Un(e,t,a),Rt=n;break;default:Un(e,t,a)}}function jm(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 Mm(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 My(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new bm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new bm),t;default:throw Error(o(435,e.tag))}}function cc(e,t){var a=My(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var i=ky.bind(null,e,n);n.then(i,i)}})}function ha(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],c=e,y=t,N=y;e:for(;N!==null;){switch(N.tag){case 27:if(Rl(N.type)){mt=N.stateNode,fa=!1;break e}break;case 5:mt=N.stateNode,fa=!1;break e;case 3:case 4:mt=N.stateNode.containerInfo,fa=!0;break e}N=N.return}if(mt===null)throw Error(o(160));wm(c,y,i),mt=null,fa=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Em(t,e),t=t.sibling}var an=null;function Em(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ha(t,e),ma(e),n&4&&(jl(3,e,e.return),bi(3,e),jl(5,e,e.return));break;case 1:ha(t,e),ma(e),n&512&&(Rt||a===null||gn(a,a.return)),n&64&&zn&&(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=an;if(ha(t,e),ma(e),n&512&&(Rt||a===null||gn(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[Fl]||c[St]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(n),i.head.insertBefore(c,i.querySelector("head > title"))),Wt(c,n,a),c[St]=e,Tt(c),n=c;break e;case"link":var y=E0("link","href",i).get(n+(a.href||""));if(y){for(var N=0;N<y.length;N++)if(c=y[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)){y.splice(N,1);break t}}c=i.createElement(n),Wt(c,n,a),i.head.appendChild(c);break;case"meta":if(y=E0("meta","content",i).get(n+(a.content||""))){for(N=0;N<y.length;N++)if(c=y[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)){y.splice(N,1);break t}}c=i.createElement(n),Wt(c,n,a),i.head.appendChild(c);break;default:throw Error(o(468,n))}c[St]=e,Tt(c),n=c}e.stateNode=n}else T0(i,e.type,e.stateNode);else e.stateNode=M0(i,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?T0(i,e.type,e.stateNode):M0(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&pd(e,e.memoizedProps,a.memoizedProps)}break;case 27:ha(t,e),ma(e),n&512&&(Rt||a===null||gn(a,a.return)),a!==null&&n&4&&pd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ha(t,e),ma(e),n&512&&(Rt||a===null||gn(a,a.return)),e.flags&32){i=e.stateNode;try{Xa(i,"")}catch(Se){nt(e,e.return,Se)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,pd(e,i,a!==null?a.memoizedProps:i)),n&1024&&(Nd=!0);break;case 6:if(ha(t,e),ma(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(Mc=null,i=an,an=wc(t.containerInfo),ha(t,e),an=i,ma(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Tr(t.containerInfo)}catch(Se){nt(e,e.return,Se)}Nd&&(Nd=!1,Tm(e));break;case 4:n=an,an=wc(e.stateNode.containerInfo),ha(t,e),ma(e),an=n;break;case 12:ha(t,e),ma(e);break;case 31:ha(t,e),ma(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 13:ha(t,e),ma(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(dc=zt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 22:i=e.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,Z=zn,se=Rt;if(zn=Z||i,Rt=se||R,ha(t,e),Rt=se,zn=Z,ma(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||R||zn||Rt||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)y=c.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{N=R.stateNode;var ue=R.memoizedProps.style,W=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;N.style.display=W==null||typeof W=="boolean"?"":(""+W).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 ee=R.stateNode;i?g0(ee,!0):g0(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,cc(e,a))));break;case 19:ha(t,e),ma(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 30:break;case 21:break;default:ha(t,e),ma(e)}}function ma(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(vm(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,c=bd(e);uc(e,c,i);break;case 5:var y=a.stateNode;a.flags&32&&(Xa(y,""),a.flags&=-33);var N=bd(e);uc(e,N,y);break;case 3:case 4:var R=a.stateNode.containerInfo,Z=bd(e);Sd(e,Z,R);break;default:throw Error(o(161))}}catch(se){nt(e,e.return,se)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Hn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sm(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:jl(4,t,t.return),ws(t);break;case 1:gn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&gm(t,t.return,a),ws(t);break;case 27:Di(t.stateNode);case 26:case 5:gn(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 Ln(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,c=t,y=c.flags;switch(c.tag){case 0:case 11:case 15:Ln(i,c,a),bi(4,c);break;case 1:if(Ln(i,c,a),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(Z){nt(n,n.return,Z)}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++)lh(R[i],N)}catch(Z){nt(n,n.return,Z)}}a&&y&64&&xm(c),Si(c,c.return);break;case 27:pm(c);case 26:case 5:Ln(i,c,a),a&&n===null&&y&4&&ym(c),Si(c,c.return);break;case 12:Ln(i,c,a);break;case 31:Ln(i,c,a),a&&y&4&&jm(i,c);break;case 13:Ln(i,c,a),a&&y&4&&Mm(i,c);break;case 22:c.memoizedState===null&&Ln(i,c,a),Si(c,c.return);break;case 30:break;default:Ln(i,c,a)}t=t.sibling}}function wd(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&ii(a))}function jd(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 nn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cm(e,t,a,n),t=t.sibling}function Cm(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:nn(e,t,a,n),i&2048&&bi(9,t);break;case 1:nn(e,t,a,n);break;case 3:nn(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){nn(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,y=c.id,N=c.onPostCommit;typeof N=="function"&&N(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){nt(t,t.return,R)}}else nn(e,t,a,n);break;case 31:nn(e,t,a,n);break;case 13:nn(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,y=t.alternate,t.memoizedState!==null?c._visibility&2?nn(e,t,a,n):Ni(e,t):c._visibility&2?nn(e,t,a,n):(c._visibility|=2,gr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&wd(y,t);break;case 24:nn(e,t,a,n),i&2048&&jd(t.alternate,t);break;default:nn(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,y=t,N=a,R=n,Z=y.flags;switch(y.tag){case 0:case 11:case 15:gr(c,y,N,R,i),bi(8,y);break;case 23:break;case 22:var se=y.stateNode;y.memoizedState!==null?se._visibility&2?gr(c,y,N,R,i):Ni(c,y):(se._visibility|=2,gr(c,y,N,R,i)),i&&Z&2048&&wd(y.alternate,y);break;case 24:gr(c,y,N,R,i),i&&Z&2048&&jd(y.alternate,y);break;default:gr(c,y,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&&wd(n.alternate,n);break;case 24:Ni(a,n),i&2048&&jd(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;)Om(e,t,a),e=e.sibling}function Om(e,t,a){switch(e.tag){case 26:yr(e,t,a),e.flags&wi&&e.memoizedState!==null&&dv(a,an,e.memoizedState,e.memoizedProps);break;case 5:yr(e,t,a);break;case 3:case 4:var n=an;an=wc(e.stateNode.containerInfo),yr(e,t,a),an=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 Dm(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];qt=n,_m(n,e)}Dm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rm(e),e=e.sibling}function Rm(e){switch(e.tag){case 0:case 11:case 15:ji(e),e.flags&2048&&jl(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,oc(e)):ji(e);break;default:ji(e)}}function oc(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];qt=n,_m(n,e)}Dm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:jl(8,t,t.return),oc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,oc(t));break;default:oc(t)}e=e.sibling}}function _m(e,t){for(;qt!==null;){var a=qt;switch(a.tag){case 0:case 11:case 15:jl(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,qt=n;else e:for(a=e;qt!==null;){n=qt;var i=n.sibling,c=n.return;if(Nm(n),n===a){qt=null;break e}if(i!==null){i.return=c,qt=i;break e}qt=c}}}var Ey={getCacheForType:function(e){var t=Zt(Ct),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Zt(Ct).controller.signal}},Ty=typeof WeakMap=="function"?WeakMap:Map,Pe=0,ct=null,$e=null,Qe=0,at=0,ja=null,Ml=!1,vr=!1,Md=!1,qn=0,bt=0,El=0,js=0,Ed=0,Ma=0,pr=0,Mi=null,xa=null,Td=!1,dc=0,Am=0,fc=1/0,hc=null,Tl=null,kt=0,Cl=null,br=null,Vn=0,Cd=0,Od=null,km=null,Ei=0,Dd=null;function Ea(){return(Pe&2)!==0&&Qe!==0?Qe&-Qe:G.T!==null?Ud():Vs()}function zm(){if(Ma===0)if((Qe&536870912)===0||q){var e=Hs;Hs<<=1,(Hs&3932160)===0&&(Hs=262144),Ma=e}else Ma=536870912;return e=Na.current,e!==null&&(e.flags|=32),Ma}function ga(e,t,a){(e===ct&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(Sr(e,0),Ol(e,Qe,Ma,!1)),nl(e,a),((Pe&2)===0||e!==ct)&&(e===ct&&((Pe&2)===0&&(js|=a),bt===4&&Ol(e,Qe,Ma,!1)),yn(e))}function Um(e,t,a){if((Pe&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||al(e,t),i=n?Dy(e,t):_d(e,t,!0),c=n;do{if(i===0){vr&&!n&&Ol(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!Cy(a)){i=_d(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var N=e;i=Mi;var R=N.current.memoizedState.isDehydrated;if(R&&(Sr(N,y).flags|=256),y=_d(N,y,!1),y!==2){if(Md&&!R){N.errorRecoveryDisabledLanes|=c,js|=c,i=4;break e}c=xa,xa=i,c!==null&&(xa===null?xa=c:xa.push.apply(xa,c))}i=y}if(c=!1,i!==2)continue}}if(i===1){Sr(e,0),Ol(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:Ol(n,t,Ma,!Ml);break e;case 2:xa=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=dc+300-zt(),10<i)){if(Ol(n,t,Ma,!Ml),$l(n,0,!0)!==0)break e;Vn=t,n.timeoutHandle=h0(Hm.bind(null,n,a,xa,hc,Td,t,Ma,js,pr,Ml,c,"Throttled",-0,0),i);break e}Hm(n,a,xa,hc,Td,t,Ma,js,pr,Ml,c,null,-0,0)}}break}while(!0);yn(e)}function Hm(e,t,a,n,i,c,y,N,R,Z,se,ue,W,ee){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:Da},Om(t,c,ue);var Se=(c&62914560)===c?dc-zt():(c&4194048)===c?Am-zt():0;if(Se=fv(ue,Se),Se!==null){Vn=c,e.cancelPendingCommit=Se(Fm.bind(null,e,t,c,a,n,i,y,N,R,se,ue,null,W,ee)),Ol(e,c,y,!Z);return}}Fm(e,t,c,a,n,i,y,N,R)}function Cy(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(!Pt(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 Ol(e,t,a,n){t&=~Ed,t&=~js,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var c=31-Bt(i),y=1<<c;n[c]=-1,i&=~y}a!==0&&ot(e,a,t)}function mc(){return(Pe&6)===0?(Ti(0),!1):!0}function Rd(){if($e!==null){if(at===0)var e=$e.return;else e=$e,Ha=On=null,Qo(e),dr=null,ci=0,e=$e;for(;e!==null;)mm(e.alternate,e),e=e.return;$e=null}}function Sr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Wy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Vn=0,Rd(),ct=e,$e=a=ka(e.current,null),Qe=t,at=0,ja=null,Ml=!1,vr=al(e,t),Md=!1,pr=Ma=Ed=js=El=bt=0,xa=Mi=null,Td=!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-Bt(n),c=1<<i;t|=e[i],n&=~c}return qn=t,yl(),a}function Lm(e,t){ze=null,G.H=yi,t===or||t===$u?(t=eh(),at=3):t===zo?(t=eh(),at=4):at=t===cd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ja=t,$e===null&&(bt=1,nc(e,oa(t,e.current)))}function qm(){var e=Na.current;return e===null?!0:(Qe&4194048)===Qe?qa===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===qa:!1}function Vm(){var e=G.H;return G.H=yi,e===null?yi:e}function Bm(){var e=G.A;return G.A=Ey,e}function xc(){bt=4,Ml||(Qe&4194048)!==Qe&&Na.current!==null||(vr=!0),(El&134217727)===0&&(js&134217727)===0||ct===null||Ol(ct,Qe,Ma,!1)}function _d(e,t,a){var n=Pe;Pe|=2;var i=Vm(),c=Bm();(ct!==e||Qe!==t)&&(hc=null,Sr(e,t)),t=!1;var y=bt;e:do try{if(at!==0&&$e!==null){var N=$e,R=ja;switch(at){case 8:Rd(),y=6;break e;case 3:case 2:case 9:case 6:Na.current===null&&(t=!0);var Z=at;if(at=0,ja=null,Nr(e,N,R,Z),a&&vr){y=0;break e}break;default:Z=at,at=0,ja=null,Nr(e,N,R,Z)}}Oy(),y=bt;break}catch(se){Lm(e,se)}while(!0);return t&&e.shellSuspendCounter++,Ha=On=null,Pe=n,G.H=i,G.A=c,$e===null&&(ct=null,Qe=0,yl()),y}function Oy(){for(;$e!==null;)Ym($e)}function Dy(e,t){var a=Pe;Pe|=2;var n=Vm(),i=Bm();ct!==e||Qe!==t?(hc=null,fc=zt()+500,Sr(e,t)):vr=al(e,t);e:do try{if(at!==0&&$e!==null){t=$e;var c=ja;t:switch(at){case 1:at=0,ja=null,Nr(e,t,c,1);break;case 2:case 9:if(Kf(c)){at=0,ja=null,$m(t);break}t=function(){at!==2&&at!==9||ct!==e||(at=7),yn(e)},c.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:Kf(c)?(at=0,ja=null,$m(t)):(at=0,ja=null,Nr(e,t,c,7));break;case 5:var y=null;switch($e.tag){case 26:y=$e.memoizedState;case 5:case 27:var N=$e;if(y?C0(y):N.stateNode.complete){at=0,ja=null;var R=N.sibling;if(R!==null)$e=R;else{var Z=N.return;Z!==null?($e=Z,gc(Z)):$e=null}break t}}at=0,ja=null,Nr(e,t,c,5);break;case 6:at=0,ja=null,Nr(e,t,c,6);break;case 8:Rd(),bt=6;break e;default:throw Error(o(462))}}Ry();break}catch(se){Lm(e,se)}while(!0);return Ha=On=null,G.H=n,G.A=i,Pe=a,$e!==null?0:(ct=null,Qe=0,yl(),bt)}function Ry(){for(;$e!==null&&!ks();)Ym($e)}function Ym(e){var t=fm(e.alternate,e,qn);e.memoizedProps=e.pendingProps,t===null?gc(e):$e=t}function $m(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=rm(a,t,t.pendingProps,t.type,void 0,Qe);break;case 11:t=rm(a,t,t.pendingProps,t.type.render,t.ref,Qe);break;case 5:Qo(t);default:mm(a,t),t=$e=qu(t,qn),t=fm(a,t,qn)}e.memoizedProps=e.pendingProps,t===null?gc(e):$e=t}function Nr(e,t,a,n){Ha=On=null,Qo(t),dr=null,ci=0;var i=t.return;try{if(py(e,i,t,a,Qe)){bt=1,nc(e,oa(a,e.current)),$e=null;return}}catch(c){if(i!==null)throw $e=i,c;bt=1,nc(e,oa(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=Na.current,n!==null&&n.tag===13&&(n.flags|=16384))),Gm(t,e)):gc(t)}function gc(e){var t=e;do{if((t.flags&32768)!==0){Gm(t,Ml);return}e=t.return;var a=Ny(t.alternate,t,qn);if(a!==null){$e=a;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);bt===0&&(bt=5)}function Gm(e,t){do{var a=wy(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);bt=6,$e=null}function Fm(e,t,a,n,i,c,y,N,R){e.cancelPendingCommit=null;do yc();while(kt!==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,du(e,a,c,y,N,R),e===ct&&($e=ct=null,Qe=0),br=t,Cl=e,Vn=a,Cd=c,Od=i,km=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,zy(rn,function(){return Jm(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=G.T,G.T=null,i=re.p,re.p=2,y=Pe,Pe|=4;try{jy(e,t,a)}finally{Pe=y,re.p=i,G.T=n}}kt=1,Zm(),Qm(),Wm()}}function Zm(){if(kt===1){kt=0;var e=Cl,t=br,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=G.T,G.T=null;var n=re.p;re.p=2;var i=Pe;Pe|=4;try{Em(t,e);var c=Gd,y=Oo(e.containerInfo),N=c.focusedElem,R=c.selectionRange;if(y!==N&&N&&N.ownerDocument&&Xe(N.ownerDocument.documentElement,N)){if(R!==null&&Ks(N)){var Z=R.start,se=R.end;if(se===void 0&&(se=Z),"selectionStart"in N)N.selectionStart=Z,N.selectionEnd=Math.min(se,N.value.length);else{var ue=N.ownerDocument||document,W=ue&&ue.defaultView||window;if(W.getSelection){var ee=W.getSelection(),Se=N.textContent.length,Re=Math.min(R.start,Se),it=R.end===void 0?Re:Math.min(R.end,Se);!ee.extend&&Re>it&&(y=it,it=Re,Re=y);var Y=Au(N,Re),L=Au(N,it);if(Y&&L&&(ee.rangeCount!==1||ee.anchorNode!==Y.node||ee.anchorOffset!==Y.offset||ee.focusNode!==L.node||ee.focusOffset!==L.offset)){var F=ue.createRange();F.setStart(Y.node,Y.offset),ee.removeAllRanges(),Re>it?(ee.addRange(F),ee.extend(L.node,L.offset)):(F.setEnd(L.node,L.offset),ee.addRange(F))}}}}for(ue=[],ee=N;ee=ee.parentNode;)ee.nodeType===1&&ue.push({element:ee,left:ee.scrollLeft,top:ee.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}}Oc=!!$d,Gd=$d=null}finally{Pe=i,re.p=n,G.T=a}}e.current=t,kt=2}}function Qm(){if(kt===2){kt=0;var e=Cl,t=br,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=G.T,G.T=null;var n=re.p;re.p=2;var i=Pe;Pe|=4;try{Sm(e,t.alternate,t)}finally{Pe=i,re.p=n,G.T=a}}kt=3}}function Wm(){if(kt===4||kt===3){kt=0,zs();var e=Cl,t=br,a=Vn,n=km;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?kt=5:(kt=0,br=Cl=null,Xm(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Tl=null),Kt(a),t=t.stateNode,Jt&&typeof Jt.onCommitFiberRoot=="function")try{Jt.onCommitFiberRoot(vt,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=G.T,i=re.p,re.p=2,G.T=null;try{for(var c=e.onRecoverableError,y=0;y<n.length;y++){var N=n[y];c(N.value,{componentStack:N.stack})}}finally{G.T=t,re.p=i}}(Vn&3)!==0&&yc(),yn(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===Dd?Ei++:(Ei=0,Dd=e):Ei=0,Ti(0)}}function Xm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ii(t)))}function yc(){return Zm(),Qm(),Wm(),Jm()}function Jm(){if(kt!==5)return!1;var e=Cl,t=Cd;Cd=0;var a=Kt(Vn),n=G.T,i=re.p;try{re.p=32>a?32:a,G.T=null,a=Od,Od=null;var c=Cl,y=Vn;if(kt=0,br=Cl=null,Vn=0,(Pe&6)!==0)throw Error(o(331));var N=Pe;if(Pe|=4,Rm(c.current),Cm(c,c.current,y,a),Pe=N,Ti(0,!1),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(vt,c)}catch{}return!0}finally{re.p=i,G.T=n,Xm(e,t)}}function Im(e,t,a){t=oa(a,t),t=ud(e.stateNode,t,2),e=Sl(e,t,2),e!==null&&(nl(e,2),yn(e))}function nt(e,t,a){if(e.tag===3)Im(e,e,a);else for(;t!==null;){if(t.tag===3){Im(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Tl===null||!Tl.has(n))){e=oa(a,e),a=Kh(2),n=Sl(t,a,2),n!==null&&(Ph(a,n,t,e),nl(n,2),yn(n));break}}t=t.return}}function Ad(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Ty;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(a)||(Md=!0,i.add(a),e=_y.bind(null,e,t,a),t.then(e,e))}function _y(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&&(bt===4||bt===3&&(Qe&62914560)===Qe&&300>zt()-dc?(Pe&2)===0&&Sr(e,0):Ed|=a,pr===Qe&&(pr=0)),yn(e)}function Km(e,t){t===0&&(t=Ur()),e=Aa(e,t),e!==null&&(nl(e,t),yn(e))}function Ay(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Km(e,a)}function ky(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),Km(e,a)}function zy(e,t){return Pn(e,t)}var vc=null,wr=null,kd=!1,pc=!1,zd=!1,Dl=0;function yn(e){e!==wr&&e.next===null&&(wr===null?vc=wr=e:wr=wr.next=e),pc=!0,kd||(kd=!0,Hy())}function Ti(e,t){if(!zd&&pc){zd=!0;do for(var a=!1,n=vc;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var c=0;else{var y=n.suspendedLanes,N=n.pingedLanes;c=(1<<31-Bt(42|e)+1)-1,c&=i&~(y&~N),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,a0(n,c))}else c=Qe,c=$l(n,n===ct?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||al(n,c)||(a=!0,a0(n,c));n=n.next}while(a);zd=!1}}function Uy(){Pm()}function Pm(){pc=kd=!1;var e=0;Dl!==0&&Qy()&&(e=Dl);for(var t=zt(),a=null,n=vc;n!==null;){var i=n.next,c=e0(n,t);c===0?(n.next=null,a===null?vc=i:a.next=i,i===null&&(wr=a)):(a=n,(e!==0||(c&3)!==0)&&(pc=!0)),n=i}kt!==0&&kt!==5||Ti(e),Dl!==0&&(Dl=0)}function e0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var y=31-Bt(c),N=1<<y,R=i[y];R===-1?((N&a)===0||(N&n)!==0)&&(i[y]=ou(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&&el(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||al(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&el(n),Kt(a)){case 2:case 8:a=Ut;break;case 32:a=rn;break;case 268435456:a=Yl;break;default:a=rn}return n=t0.bind(null,e),a=Pn(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&el(n),e.callbackPriority=2,e.callbackNode=null,2}function t0(e,t){if(kt!==0&&kt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(yc()&&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:(Um(e,n,t),e0(e,zt()),e.callbackNode!=null&&e.callbackNode===a?t0.bind(null,e):null)}function a0(e,t){if(yc())return null;Um(e,t,!0)}function Hy(){Xy(function(){(Pe&6)!==0?Pn(Ue,Uy):Pm()})}function Ud(){if(Dl===0){var e=ur;e===0&&(e=tl,tl<<=1,(tl&261888)===0&&(tl=256)),Dl=e}return Dl}function n0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Il(""+e)}function l0(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 Ly(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var c=n0((i[_t]||null).action),y=n.submitter;y&&(t=(t=y[_t]||null)?n0(t.formAction):y.getAttribute("formAction"),t!==null&&(c=t,y=null));var N=new ts("action","action",null,n,i);e.push({event:N,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Dl!==0){var R=y?l0(i,y):new FormData(i);ad(a,{pending:!0,data:R,method:i.method,action:c},null,R)}}else typeof c=="function"&&(N.preventDefault(),R=y?l0(i,y):new FormData(i),ad(a,{pending:!0,data:R,method:i.method,action:c},c,R))},currentTarget:i}]})}}for(var Hd=0;Hd<ni.length;Hd++){var Ld=ni[Hd],qy=Ld.toLowerCase(),Vy=Ld[0].toUpperCase()+Ld.slice(1);ca(qy,"on"+Vy)}ca(Uu,"onAnimationEnd"),ca(Hu,"onAnimationIteration"),ca(tr,"onAnimationStart"),ca("dblclick","onDoubleClick"),ca("focusin","onFocus"),ca("focusout","onBlur"),ca(Do,"onTransitionRun"),ca(Ro,"onTransitionStart"),ca(Lu,"onTransitionCancel"),ca(ti,"onTransitionEnd"),ll("onMouseEnter",["mouseout","mouseover"]),ll("onMouseLeave",["mouseout","mouseover"]),ll("onPointerEnter",["pointerout","pointerover"]),ll("onPointerLeave",["pointerout","pointerover"]),cn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),cn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),cn("onBeforeInput",["compositionend","keypress","textInput","paste"]),cn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),cn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),cn("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(" "),By=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ci));function s0(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 y=n.length-1;0<=y;y--){var N=n[y],R=N.instance,Z=N.currentTarget;if(N=N.listener,R!==c&&i.isPropagationStopped())break e;c=N,i.currentTarget=Z;try{c(i)}catch(se){gl(se)}i.currentTarget=null,c=R}else for(y=0;y<n.length;y++){if(N=n[y],R=N.instance,Z=N.currentTarget,N=N.listener,R!==c&&i.isPropagationStopped())break e;c=N,i.currentTarget=Z;try{c(i)}catch(se){gl(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)||(r0(t,e,2,!1),a.add(n))}function qd(e,t,a){var n=0;t&&(n|=4),r0(a,e,n,t)}var bc="_reactListening"+Math.random().toString(36).slice(2);function Vd(e){if(!e[bc]){e[bc]=!0,xu.forEach(function(a){a!=="selectionchange"&&(By.has(a)||qd(a,!1,e),qd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bc]||(t[bc]=!0,qd("selectionchange",!1,t))}}function r0(e,t,a,n){switch(z0(t)){case 2:var i=xv;break;case 8:i=gv;break;default:i=tf}a=i.bind(null,t,a,e),i=void 0,!Zr||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 Bd(e,t,a,n,i){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var y=n.tag;if(y===3||y===4){var N=n.stateNode.containerInfo;if(N===i)break;if(y===4)for(y=n.return;y!==null;){var R=y.tag;if((R===3||R===4)&&y.stateNode.containerInfo===i)return;y=y.return}for(;N!==null;){if(y=bn(N),y===null)return;if(R=y.tag,R===5||R===6||R===26||R===27){n=c=y;continue e}N=N.parentNode}}n=n.return}Fr(function(){var Z=c,se=Zs(a),ue=[];e:{var W=ai.get(e);if(W!==void 0){var ee=ts,Se=e;switch(e){case"keypress":if(es(a)===0)break e;case"keydown":case"keyup":ee=xo;break;case"focusin":Se="focus",ee=Is;break;case"focusout":Se="blur",ee=Is;break;case"beforeblur":case"afterblur":ee=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":ee=Su;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=so;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=vo;break;case Uu:case Hu:case tr:ee=ul;break;case ti:ee=po;break;case"scroll":case"scrollend":ee=Qr;break;case"wheel":ee=So;break;case"copy":case"cut":case"paste":ee=cl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Nu;break;case"toggle":case"beforetoggle":ee=wo}var Re=(t&4)!==0,it=!Re&&(e==="scroll"||e==="scrollend"),Y=Re?W!==null?W+"Capture":null:W;Re=[];for(var L=Z,F;L!==null;){var ie=L;if(F=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||F===null||Y===null||(ie=Kl(L,Y),ie!=null&&Re.push(Oi(L,ie,F))),it)break;L=L.return}0<Re.length&&(W=new ee(W,Se,null,a,se),ue.push({event:W,listeners:Re}))}}if((t&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",W&&a!==$r&&(Se=a.relatedTarget||a.fromElement)&&(bn(Se)||Se[pn]))break e;if((ee||W)&&(W=se.window===se?se:(W=se.ownerDocument)?W.defaultView||W.parentWindow:window,ee?(Se=a.relatedTarget||a.toElement,ee=Z,Se=Se?bn(Se):null,Se!==null&&(it=m(Se),Re=Se.tag,Se!==it||Re!==5&&Re!==27&&Re!==6)&&(Se=null)):(ee=null,Se=Z),ee!==Se)){if(Re=Su,ie="onMouseLeave",Y="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(Re=Nu,ie="onPointerLeave",Y="onPointerEnter",L="pointer"),it=ee==null?W:ia(ee),F=Se==null?W:ia(Se),W=new Re(ie,L+"leave",ee,a,se),W.target=it,W.relatedTarget=F,ie=null,bn(se)===Z&&(Re=new Re(Y,L+"enter",Se,a,se),Re.target=F,Re.relatedTarget=it,ie=Re),it=ie,ee&&Se)t:{for(Re=Yy,Y=ee,L=Se,F=0,ie=Y;ie;ie=Re(ie))F++;ie=0;for(var Ce=L;Ce;Ce=Re(Ce))ie++;for(;0<F-ie;)Y=Re(Y),F--;for(;0<ie-F;)L=Re(L),ie--;for(;F--;){if(Y===L||L!==null&&Y===L.alternate){Re=Y;break t}Y=Re(Y),L=Re(L)}Re=null}else Re=null;ee!==null&&i0(ue,W,ee,Re,!1),Se!==null&&it!==null&&i0(ue,it,Se,Re,!0)}}e:{if(W=Z?ia(Z):window,ee=W.nodeName&&W.nodeName.toLowerCase(),ee==="select"||ee==="input"&&W.type==="file")var Je=Ru;else if(Du(W))if(hn)Je=ft;else{Je=hl;var je=Fe}else ee=W.nodeName,!ee||ee.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?Z&&Fs(Z.elementType)&&(Je=Ru):Je=Co;if(Je&&(Je=Je(e,Z))){Xr(ue,Je,a,se);break e}je&&je(e,W,Z),e==="focusout"&&Z&&W.type==="number"&&Z.memoizedProps.value!=null&&Ql(W,"number",W.value)}switch(je=Z?ia(Z):window,e){case"focusin":(Du(je)||je.contentEditable==="true")&&(ml=je,Ps=Z,Gt=null);break;case"focusout":Gt=Ps=ml=null;break;case"mousedown":er=!0;break;case"contextmenu":case"mouseup":case"dragend":er=!1,ds(ue,a,se);break;case"selectionchange":if(ku)break;case"keydown":case"keyup":ds(ue,a,se)}var He;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 dl?Cu(e,a)&&(We="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(We="onCompositionStart");We&&(Mu&&a.locale!=="ko"&&(dl||We!=="onCompositionStart"?We==="onCompositionEnd"&&dl&&(He=At()):(dn=se,Qs="value"in dn?dn.value:dn.textContent,dl=!0)),je=Sc(Z,We),0<je.length&&(We=new ol(We,e,null,a,se),ue.push({event:We,listeners:je}),He?We.data=He:(He=Ou(a),He!==null&&(We.data=He)))),(He=jo?Mo(e,a):Eo(e,a))&&(We=Sc(Z,"onBeforeInput"),0<We.length&&(je=new ol("onBeforeInput","beforeinput",null,a,se),ue.push({event:je,listeners:We}),je.data=He)),Ly(ue,e,Z,a,se)}s0(ue,t)})}function Oi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Sc(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 Yy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function i0(e,t,a,n,i){for(var c=t._reactName,y=[];a!==null&&a!==n;){var N=a,R=N.alternate,Z=N.stateNode;if(N=N.tag,R!==null&&R===n)break;N!==5&&N!==26&&N!==27||Z===null||(R=Z,i?(Z=Kl(a,c),Z!=null&&y.unshift(Oi(a,Z,R))):i||(Z=Kl(a,c),Z!=null&&y.push(Oi(a,Z,R)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var $y=/\r\n?/g,Gy=/\u0000|\uFFFD/g;function u0(e){return(typeof e=="string"?e:""+e).replace($y,`
|
|
49
|
+
`).replace(Gy,"")}function c0(e,t){return t=u0(t),u0(e)===t}function rt(e,t,a,n,i,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Xa(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Xa(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":vu(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=Da);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),Yt(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":Yt(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=no.get(a)||a,Yt(e,a,n))}}function Yd(e,t,a,n,i,c){switch(a){case"style":vu(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"?Xa(e,n):(typeof n=="number"||typeof n=="bigint")&&Xa(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=Da);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[_t]||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,""):Yt(e,a,n)}}}function Wt(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 y=a[c];if(y!=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,y,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=y=i=null,R=null,Z=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":y=se;break;case"checked":R=se;break;case"defaultChecked":Z=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)}}rl(e,c,N,R,Z,y,i,!1);return;case"select":Ge("invalid",e),n=y=c=null;for(i in a)if(a.hasOwnProperty(i)&&(N=a[i],N!=null))switch(i){case"value":c=N;break;case"defaultValue":y=N;break;case"multiple":n=N;default:rt(e,t,i,N,a,null)}t=c,a=y,e.multiple=!!n,t!=null?Nn(e,!!n,t,!1):a!=null&&Nn(e,!!n,a,!0);return;case"textarea":Ge("invalid",e),c=i=n=null;for(y in a)if(a.hasOwnProperty(y)&&(N=a[y],N!=null))switch(y){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,y,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(Z in a)if(a.hasOwnProperty(Z)&&(n=a[Z],n!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:rt(e,t,Z,n,a,null)}return;default:if(Fs(t)){for(se in a)a.hasOwnProperty(se)&&(n=a[se],n!==void 0&&Yd(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 Fy(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,y=null,N=null,R=null,Z=null,se=null;for(ee in a){var ue=a[ee];if(a.hasOwnProperty(ee)&&ue!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":R=ue;default:n.hasOwnProperty(ee)||rt(e,t,ee,null,n,ue)}}for(var W in n){var ee=n[W];if(ue=a[W],n.hasOwnProperty(W)&&(ee!=null||ue!=null))switch(W){case"type":c=ee;break;case"name":i=ee;break;case"checked":Z=ee;break;case"defaultChecked":se=ee;break;case"value":y=ee;break;case"defaultValue":N=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(o(137,t));break;default:ee!==ue&&rt(e,t,W,ee,n,ue)}}Gs(e,y,N,R,Z,se,c,i);return;case"select":ee=y=N=W=null;for(c in a)if(R=a[c],a.hasOwnProperty(c)&&R!=null)switch(c){case"value":break;case"multiple":ee=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":W=c;break;case"defaultValue":N=c;break;case"multiple":y=c;default:c!==R&&rt(e,t,i,c,n,R)}t=N,a=y,n=ee,W!=null?Nn(e,!!a,W,!1):!!n!=!!a&&(t!=null?Nn(e,!!a,t,!0):Nn(e,!!a,a?[]:"",!1));return;case"textarea":ee=W=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(y in n)if(i=n[y],c=a[y],n.hasOwnProperty(y)&&(i!=null||c!=null))switch(y){case"value":W=i;break;case"defaultValue":ee=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==c&&rt(e,t,y,i,n,c)}Wl(e,W,ee);return;case"option":for(var Se in a)if(W=a[Se],a.hasOwnProperty(Se)&&W!=null&&!n.hasOwnProperty(Se))switch(Se){case"selected":e.selected=!1;break;default:rt(e,t,Se,null,n,W)}for(R in n)if(W=n[R],ee=a[R],n.hasOwnProperty(R)&&W!==ee&&(W!=null||ee!=null))switch(R){case"selected":e.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:rt(e,t,R,W,n,ee)}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)W=a[Re],a.hasOwnProperty(Re)&&W!=null&&!n.hasOwnProperty(Re)&&rt(e,t,Re,null,n,W);for(Z in n)if(W=n[Z],ee=a[Z],n.hasOwnProperty(Z)&&W!==ee&&(W!=null||ee!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(o(137,t));break;default:rt(e,t,Z,W,n,ee)}return;default:if(Fs(t)){for(var it in a)W=a[it],a.hasOwnProperty(it)&&W!==void 0&&!n.hasOwnProperty(it)&&Yd(e,t,it,void 0,n,W);for(se in n)W=n[se],ee=a[se],!n.hasOwnProperty(se)||W===ee||W===void 0&&ee===void 0||Yd(e,t,se,W,n,ee);return}}for(var Y in a)W=a[Y],a.hasOwnProperty(Y)&&W!=null&&!n.hasOwnProperty(Y)&&rt(e,t,Y,null,n,W);for(ue in n)W=n[ue],ee=a[ue],!n.hasOwnProperty(ue)||W===ee||W==null&&ee==null||rt(e,t,ue,W,n,ee)}function o0(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,y=i.initiatorType,N=i.duration;if(c&&N&&o0(y)){for(y=0,N=i.responseEnd,n+=1;n<a.length;n++){var R=a[n],Z=R.startTime;if(Z>N)break;var se=R.transferSize,ue=R.initiatorType;se&&o0(ue)&&(R=R.responseEnd,y+=se*(R<N?1:(N-Z)/(R-Z)))}if(--n,t+=8*(c+y)/(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 $d=null,Gd=null;function Nc(e){return e.nodeType===9?e:e.ownerDocument}function d0(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 f0(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 Fd(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 Zd=null;function Qy(){var e=window.event;return e&&e.type==="popstate"?e===Zd?!1:(Zd=e,!0):(Zd=null,!1)}var h0=typeof setTimeout=="function"?setTimeout:void 0,Wy=typeof clearTimeout=="function"?clearTimeout:void 0,m0=typeof Promise=="function"?Promise:void 0,Xy=typeof queueMicrotask=="function"?queueMicrotask:typeof m0<"u"?function(e){return m0.resolve(null).then(e).catch(Jy)}:h0;function Jy(e){setTimeout(function(){throw e})}function Rl(e){return e==="head"}function x0(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 y=c.nextSibling,N=c.nodeName;c[Fl]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=y}}else a==="body"&&Di(e.ownerDocument.body);a=i}while(a);Tr(t)}function g0(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 Qd(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":Qd(a),Bs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Iy(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[Fl])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=Va(e.nextSibling),e===null)break}return null}function Ky(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Va(e.nextSibling),e===null))return null;return e}function y0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Va(e.nextSibling),e===null))return null;return e}function Wd(e){return e.data==="$?"||e.data==="$~"}function Xd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Py(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 Va(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Jd=null;function v0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Va(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function p0(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 b0(e,t,a){switch(t=Nc(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 Ba=new Map,S0=new Set;function wc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Bn=re.d;re.d={f:ev,r:tv,D:av,C:nv,L:lv,m:sv,X:iv,S:rv,M:uv};function ev(){var e=Bn.f(),t=mc();return e||t}function tv(e){var t=Oe(e);t!==null&&t.tag===5&&t.type==="form"?Lh(t):Bn.r(e)}var jr=typeof document>"u"?null:document;function N0(e,t,a){var n=jr;if(n&&typeof t=="string"&&t){var i=$t(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),S0.has(i)||(S0.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),Wt(t,"link",e),Tt(t),n.head.appendChild(t)))}}function av(e){Bn.D(e),N0("dns-prefetch",e,null)}function nv(e,t){Bn.C(e,t),N0("preconnect",e,t)}function lv(e,t,a){Bn.L(e,t,a);var n=jr;if(n&&e&&t){var i='link[rel="preload"][as="'+$t(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+$t(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+$t(a.imageSizes)+'"]')):i+='[href="'+$t(e)+'"]';var c=i;switch(t){case"style":c=Mr(e);break;case"script":c=Er(e)}Ba.has(c)||(e=M({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ba.set(c,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(Ri(c))||t==="script"&&n.querySelector(_i(c))||(t=n.createElement("link"),Wt(t,"link",e),Tt(t),n.head.appendChild(t)))}}function sv(e,t){Bn.m(e,t);var a=jr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+$t(n)+'"][href="'+$t(e)+'"]',c=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Er(e)}if(!Ba.has(c)&&(e=M({rel:"modulepreload",href:e},t),Ba.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"),Wt(n,"link",e),Tt(n),a.head.appendChild(n)}}}function rv(e,t,a){Bn.S(e,t,a);var n=jr;if(n&&e){var i=Qa(n).hoistableStyles,c=Mr(e);t=t||"default";var y=i.get(c);if(!y){var N={loading:0,preload:null};if(y=n.querySelector(Ri(c)))N.loading=5;else{e=M({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ba.get(c))&&Id(e,a);var R=y=n.createElement("link");Tt(R),Wt(R,"link",e),R._p=new Promise(function(Z,se){R.onload=Z,R.onerror=se}),R.addEventListener("load",function(){N.loading|=1}),R.addEventListener("error",function(){N.loading|=2}),N.loading|=4,jc(y,t,n)}y={type:"stylesheet",instance:y,count:1,state:N},i.set(c,y)}}}function iv(e,t){Bn.X(e,t);var a=jr;if(a&&e){var n=Qa(a).hoistableScripts,i=Er(e),c=n.get(i);c||(c=a.querySelector(_i(i)),c||(e=M({src:e,async:!0},t),(t=Ba.get(i))&&Kd(e,t),c=a.createElement("script"),Tt(c),Wt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function uv(e,t){Bn.M(e,t);var a=jr;if(a&&e){var n=Qa(a).hoistableScripts,i=Er(e),c=n.get(i);c||(c=a.querySelector(_i(i)),c||(e=M({src:e,async:!0,type:"module"},t),(t=Ba.get(i))&&Kd(e,t),c=a.createElement("script"),Tt(c),Wt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function w0(e,t,a,n){var i=(i=me.current)?wc(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Mr(a.href),a=Qa(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=Mr(a.href);var c=Qa(i).hoistableStyles,y=c.get(e);if(y||(i=i.ownerDocument||i,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,y),(c=i.querySelector(Ri(e)))&&!c._p&&(y.instance=c,y.state.loading=5),Ba.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},Ba.set(e,a),c||cv(i,e,a,y.state))),t&&n===null)throw Error(o(528,""));return y}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=Er(a),a=Qa(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 Mr(e){return'href="'+$t(e)+'"'}function Ri(e){return'link[rel="stylesheet"]['+e+"]"}function j0(e){return M({},e,{"data-precedence":e.precedence,precedence:null})}function cv(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}),Wt(t,"link",a),Tt(t),e.head.appendChild(t))}function Er(e){return'[src="'+$t(e)+'"]'}function _i(e){return"script[async]"+e}function M0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+$t(a.href)+'"]');if(n)return t.instance=n,Tt(n),n;var i=M({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Tt(n),Wt(n,"style",i),jc(n,a.precedence,e),t.instance=n;case"stylesheet":i=Mr(a.href);var c=e.querySelector(Ri(i));if(c)return t.state.loading|=4,t.instance=c,Tt(c),c;n=j0(a),(i=Ba.get(i))&&Id(n,i),c=(e.ownerDocument||e).createElement("link"),Tt(c);var y=c;return y._p=new Promise(function(N,R){y.onload=N,y.onerror=R}),Wt(c,"link",n),t.state.loading|=4,jc(c,a.precedence,e),t.instance=c;case"script":return c=Er(a.src),(i=e.querySelector(_i(c)))?(t.instance=i,Tt(i),i):(n=a,(i=Ba.get(c))&&(n=M({},a),Kd(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),Tt(i),Wt(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,jc(n,a.precedence,e));return t.instance}function jc(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,y=0;y<n.length;y++){var N=n[y];if(N.dataset.precedence===t)c=N;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Id(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Kd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Mc=null;function E0(e,t,a){if(Mc===null){var n=new Map,i=Mc=new Map;i.set(a,n)}else i=Mc,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var c=a[i];if(!(c[Fl]||c[St]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var y=c.getAttribute(t)||"";y=e+y;var N=n.get(y);N?N.push(c):n.set(y,[c])}}return n}function T0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function ov(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 C0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function dv(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=Mr(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,Tt(c);return}c=t.ownerDocument||t,n=j0(n),(i=Ba.get(i))&&Id(n,i),c=c.createElement("link"),Tt(c);var y=c;y._p=new Promise(function(N,R){y.onload=N,y.onerror=R}),Wt(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 Pd=0;function fv(e,t){return e.stylesheets&&e.count===0&&Cc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Pd===0&&(Pd=62500*Zy());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Pd?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)Cc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Tc=null;function Cc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Tc=new Map,t.forEach(hv,e),Tc=null,Ec.call(e))}function hv(e,t){if(!(t.state.loading&4)){var a=Tc.get(e);if(a)var n=a.get(null);else{a=new Map,Tc.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var y=i[c];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),n=y)}n&&a.set(null,n)}i=t.instance,y=i.getAttribute("data-precedence"),c=a.get(y)||n,c===n&&a.set(null,i),a.set(y,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:le,Provider:null,Consumer:null,_currentValue:xe,_currentValue2:xe,_threadCount:0};function mv(e,t,a,n,i,c,y,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=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function O0(e,t,a,n,i,c,y,N,R,Z,se,ue){return e=new mv(e,t,a,y,R,Z,se,ue,N),t=1,c===!0&&(t|=24),c=Ft(3,null,null,t),e.current=c,c.stateNode=e,t=_o(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},Uo(c),e}function D0(e){return e?(e=Sa,e):Sa}function R0(e,t,a,n,i,c){i=D0(i),n.context===null?n.context=i:n.pendingContext=i,n=bl(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=Sl(e,n,t),a!==null&&(ga(a,e,t),di(a,e,t))}function _0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ef(e,t){_0(e,t),(e=e.alternate)&&_0(e,t)}function A0(e){if(e.tag===13||e.tag===31){var t=Aa(e,67108864);t!==null&&ga(t,e,67108864),ef(e,67108864)}}function k0(e){if(e.tag===13||e.tag===31){var t=Ea();t=qs(t);var a=Aa(e,t);a!==null&&ga(a,e,t),ef(e,t)}}var Oc=!0;function xv(e,t,a,n){var i=G.T;G.T=null;var c=re.p;try{re.p=2,tf(e,t,a,n)}finally{re.p=c,G.T=i}}function gv(e,t,a,n){var i=G.T;G.T=null;var c=re.p;try{re.p=8,tf(e,t,a,n)}finally{re.p=c,G.T=i}}function tf(e,t,a,n){if(Oc){var i=af(n);if(i===null)Bd(e,t,n,Dc,a),U0(e,n);else if(vv(i,e,t,a,n))n.stopPropagation();else if(U0(e,n),t&4&&-1<yv.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 y=un(c.pendingLanes);if(y!==0){var N=c;for(N.pendingLanes|=2,N.entangledLanes|=2;y;){var R=1<<31-Bt(y);N.entanglements[1]|=R,y&=~R}yn(c),(Pe&6)===0&&(fc=zt()+500,Ti(0))}}break;case 31:case 13:N=Aa(c,2),N!==null&&ga(N,c,2),mc(),ef(c,2)}if(c=af(n),c===null&&Bd(e,t,n,Dc,a),c===i)break;i=c}i!==null&&n.stopPropagation()}else Bd(e,t,n,null,a)}}function af(e){return e=Zs(e),nf(e)}var Dc=null;function nf(e){if(Dc=null,e=bn(e),e!==null){var t=m(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=g(t),e!==null)return e;e=null}else if(a===31){if(e=w(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 Dc=e,null}function z0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ge()){case Ue:return 2;case Ut:return 8;case rn:case Us:return 32;case Yl:return 268435456;default:return 32}default:return 32}}var lf=!1,_l=null,Al=null,kl=null,ki=new Map,zi=new Map,zl=[],yv="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 U0(e,t){switch(e){case"focusin":case"focusout":_l=null;break;case"dragenter":case"dragleave":Al=null;break;case"mouseover":case"mouseout":kl=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&&A0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function vv(e,t,a,n,i){switch(t){case"focusin":return _l=Ui(_l,e,t,a,n,i),!0;case"dragenter":return Al=Ui(Al,e,t,a,n,i),!0;case"mouseover":return kl=Ui(kl,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 H0(e){var t=bn(e.target);if(t!==null){var a=m(t);if(a!==null){if(t=a.tag,t===13){if(t=g(a),t!==null){e.blockedOn=t,Lr(e.priority,function(){k0(a)});return}}else if(t===31){if(t=w(a),t!==null){e.blockedOn=t,Lr(e.priority,function(){k0(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 Rc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=af(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&&A0(t),e.blockedOn=a,!1;t.shift()}return!0}function L0(e,t,a){Rc(e)&&a.delete(t)}function pv(){lf=!1,_l!==null&&Rc(_l)&&(_l=null),Al!==null&&Rc(Al)&&(Al=null),kl!==null&&Rc(kl)&&(kl=null),ki.forEach(L0),zi.forEach(L0)}function _c(e,t){e.blockedOn===t&&(e.blockedOn=null,lf||(lf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,pv)))}var Ac=null;function q0(e){Ac!==e&&(Ac=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Ac===e&&(Ac=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(nf(n||a)===null)continue;break}var c=Oe(a);c!==null&&(e.splice(t,3),t-=3,ad(c,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function Tr(e){function t(R){return _c(R,e)}_l!==null&&_c(_l,e),Al!==null&&_c(Al,e),kl!==null&&_c(kl,e),ki.forEach(t),zi.forEach(t);for(var a=0;a<zl.length;a++){var n=zl[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<zl.length&&(a=zl[0],a.blockedOn===null);)H0(a),a.blockedOn===null&&zl.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],y=i[_t]||null;if(typeof c=="function")y||q0(a);else if(y){var N=null;if(c&&c.hasAttribute("formAction")){if(i=c,y=c[_t]||null)N=y.formAction;else if(nf(i)!==null)continue}else N=y.action;typeof N=="function"?a[n+1]=N:(a.splice(n,3),n-=3),q0(a)}}}function V0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(y){return i=y})},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 sf(e){this._internalRoot=e}kc.prototype.render=sf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Ea();R0(a,n,e,t,null,null)},kc.prototype.unmount=sf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;R0(e.current,2,null,e,null,null),mc(),t[pn]=null}};function kc(e){this._internalRoot=e}kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<zl.length&&t!==0&&t<zl[a].priority;a++);zl.splice(a,0,e),a===0&&H0(e)}};var B0=u.version;if(B0!=="19.2.4")throw Error(o(527,B0,"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?j(e):null,e=e===null?null:e.stateNode,e};var bv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zc.isDisabled&&zc.supportsFiber)try{vt=zc.inject(bv),Jt=zc}catch{}}return Li.createRoot=function(e,t){if(!x(e))throw Error(o(299));var a=!1,n="",i=Wh,c=Xh,y=Jh;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&&(y=t.onRecoverableError)),t=O0(e,1,!1,null,null,a,n,null,i,c,y,V0),e[pn]=t.current,Vd(e),new sf(t)},Li.hydrateRoot=function(e,t,a){if(!x(e))throw Error(o(299));var n=!1,i="",c=Wh,y=Xh,N=Jh,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&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),t=O0(e,1,!0,t,a??null,n,i,R,c,y,N,V0),t.context=D0(null),a=t.current,n=Ea(),n=qs(n),i=bl(n),i.callback=null,Sl(a,i,n),a=n,t.current.lanes=a,nl(t,a),yn(t),e[pn]=t.current,Vd(e),new kc(t)},Li.version="19.2.4",Li}var P0;function Av(){if(P0)return of.exports;P0=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(),of.exports=_v(),of.exports}var kv=Av();const zv=Yx(kv);/**
|
|
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 ex="popstate";function Uv(l={}){function u(x,m){let{pathname:g="/",search:w="",hash:b=""}=_s(x.location.hash.substring(1));return!g.startsWith("/")&&!g.startsWith(".")&&(g="/"+g),Mf("",{pathname:g,search:w,hash:b},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function d(x,m){let g=x.document.querySelector("base"),w="";if(g&&g.getAttribute("href")){let b=x.location.href,p=b.indexOf("#");w=p===-1?b:b.slice(0,p)}return w+"#"+(typeof m=="string"?m:eu(m))}function o(x,m){Ya(x.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return Lv(u,d,o,l)}function xt(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function Ya(l,u){if(!l){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Hv(){return Math.random().toString(36).substring(2,10)}function tx(l,u){return{usr:l.state,key:l.key,idx:u}}function Mf(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||Hv()}}function eu({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 Lv(l,u,d,o={}){let{window:x=document.defaultView,v5Compat:m=!1}=o,g=x.history,w="POP",b=null,p=j();p==null&&(p=0,g.replaceState({...g.state,idx:p},""));function j(){return(g.state||{idx:null}).idx}function M(){w="POP";let C=j(),ne=C==null?null:C-p;p=C,b&&b({action:w,location:T.location,delta:ne})}function _(C,ne){w="PUSH";let I=Mf(T.location,C,ne);d&&d(I,C),p=j()+1;let le=tx(I,p),te=T.createHref(I);try{g.pushState(le,"",te)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;x.location.assign(te)}m&&b&&b({action:w,location:T.location,delta:1})}function A(C,ne){w="REPLACE";let I=Mf(T.location,C,ne);d&&d(I,C),p=j();let le=tx(I,p),te=T.createHref(I);g.replaceState(le,"",te),m&&b&&b({action:w,location:T.location,delta:0})}function E(C){return qv(C)}let T={get action(){return w},get location(){return l(x,g)},listen(C){if(b)throw new Error("A history only accepts one active listener");return x.addEventListener(ex,M),b=C,()=>{x.removeEventListener(ex,M),b=null}},createHref(C){return u(x,C)},createURL:E,encodeLocation(C){let ne=E(C);return{pathname:ne.pathname,search:ne.search,hash:ne.hash}},push:_,replace:A,go(C){return g.go(C)}};return T}function qv(l,u=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),xt(d,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:eu(l);return o=o.replace(/ $/,"%20"),!u&&o.startsWith("//")&&(o=d+o),new URL(o,d)}function $x(l,u,d="/"){return Vv(l,u,d,!1)}function Vv(l,u,d,o){let x=typeof u=="string"?_s(u):u,m=Zn(x.pathname||"/",d);if(m==null)return null;let g=Gx(l);Bv(g);let w=null;for(let b=0;w==null&&b<g.length;++b){let p=Kv(m);w=Jv(g[b],p,o)}return w}function Gx(l,u=[],d=[],o="",x=!1){let m=(g,w,b=x,p)=>{let j={relativePath:p===void 0?g.path||"":p,caseSensitive:g.caseSensitive===!0,childrenIndex:w,route:g};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(o)&&b)return;xt(j.relativePath.startsWith(o),`Absolute route path "${j.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(o.length)}let M=Fn([o,j.relativePath]),_=d.concat(j);g.children&&g.children.length>0&&(xt(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${M}".`),Gx(g.children,u,_,M,b)),!(g.path==null&&!g.index)&&u.push({path:M,score:Wv(M,g.index),routesMeta:_})};return l.forEach((g,w)=>{var b;if(g.path===""||!((b=g.path)!=null&&b.includes("?")))m(g,w);else for(let p of Fx(g.path))m(g,w,!0,p)}),u}function Fx(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 g=Fx(o.join("/")),w=[];return w.push(...g.map(b=>b===""?m:[m,b].join("/"))),x&&w.push(...g),w.map(b=>l.startsWith("/")&&b===""?"/":b)}function Bv(l){l.sort((u,d)=>u.score!==d.score?d.score-u.score:Xv(u.routesMeta.map(o=>o.childrenIndex),d.routesMeta.map(o=>o.childrenIndex)))}var Yv=/^:[\w-]+$/,$v=3,Gv=2,Fv=1,Zv=10,Qv=-2,ax=l=>l==="*";function Wv(l,u){let d=l.split("/"),o=d.length;return d.some(ax)&&(o+=Qv),u&&(o+=Gv),d.filter(x=>!ax(x)).reduce((x,m)=>x+(Yv.test(m)?$v:m===""?Fv:Zv),o)}function Xv(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 Jv(l,u,d=!1){let{routesMeta:o}=l,x={},m="/",g=[];for(let w=0;w<o.length;++w){let b=o[w],p=w===o.length-1,j=m==="/"?u:u.slice(m.length)||"/",M=Zc({path:b.relativePath,caseSensitive:b.caseSensitive,end:p},j),_=b.route;if(!M&&p&&d&&!o[o.length-1].route.index&&(M=Zc({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},j)),!M)return null;Object.assign(x,M.params),g.push({params:x,pathname:Fn([m,M.pathname]),pathnameBase:ap(Fn([m,M.pathnameBase])),route:_}),M.pathnameBase!=="/"&&(m=Fn([m,M.pathnameBase]))}return g}function Zc(l,u){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[d,o]=Iv(l.path,l.caseSensitive,l.end),x=u.match(d);if(!x)return null;let m=x[0],g=m.replace(/(.)\/+$/,"$1"),w=x.slice(1);return{params:o.reduce((p,{paramName:j,isOptional:M},_)=>{if(j==="*"){let E=w[_]||"";g=m.slice(0,m.length-E.length).replace(/(.)\/+$/,"$1")}const A=w[_];return M&&!A?p[j]=void 0:p[j]=(A||"").replace(/%2F/g,"/"),p},{}),pathname:m,pathnameBase:g,pattern:l}}function Iv(l,u=!1,d=!0){Ya(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,(g,w,b)=>(o.push({paramName:w,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 Kv(l){try{return l.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Ya(!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 Zn(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 Pv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ep(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=nx(d.substring(1),"/"):m=nx(d,u)):m=u,{pathname:m,search:np(o),hash:lp(x)}}function nx(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 mf(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 tp(l){return l.filter((u,d)=>d===0||u.route.path&&u.route.path.length>0)}function kf(l){let u=tp(l);return u.map((d,o)=>o===u.length-1?d.pathname:d.pathnameBase)}function zf(l,u,d,o=!1){let x;typeof l=="string"?x=_s(l):(x={...l},xt(!x.pathname||!x.pathname.includes("?"),mf("?","pathname","search",x)),xt(!x.pathname||!x.pathname.includes("#"),mf("#","pathname","hash",x)),xt(!x.search||!x.search.includes("#"),mf("#","search","hash",x)));let m=l===""||x.pathname==="",g=m?"/":x.pathname,w;if(g==null)w=d;else{let M=u.length-1;if(!o&&g.startsWith("..")){let _=g.split("/");for(;_[0]==="..";)_.shift(),M-=1;x.pathname=_.join("/")}w=M>=0?u[M]:"/"}let b=ep(x,w),p=g&&g!=="/"&&g.endsWith("/"),j=(m||g===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(p||j)&&(b.pathname+="/"),b}var Fn=l=>l.join("/").replace(/\/\/+/g,"/"),ap=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),np=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,lp=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,sp=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 rp(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function ip(l){return l.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Zx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qx(l,u){let d=l;if(typeof d!="string"||!Pv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let o=d,x=!1;if(Zx)try{let m=new URL(window.location.href),g=d.startsWith("//")?new URL(m.protocol+d):new URL(d),w=Zn(g.pathname,u);g.origin===m.origin&&w!=null?d=w+g.search+g.hash:x=!0}catch{Ya(!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 Wx=["POST","PUT","PATCH","DELETE"];new Set(Wx);var up=["GET",...Wx];new Set(up);var Ar=V.createContext(null);Ar.displayName="DataRouter";var Ic=V.createContext(null);Ic.displayName="DataRouterState";var cp=V.createContext(!1),Xx=V.createContext({isTransitioning:!1});Xx.displayName="ViewTransition";var op=V.createContext(new Map);op.displayName="Fetchers";var dp=V.createContext(null);dp.displayName="Await";var Oa=V.createContext(null);Oa.displayName="Navigation";var nu=V.createContext(null);nu.displayName="Location";var vn=V.createContext({outlet:null,matches:[],isDataRoute:!1});vn.displayName="Route";var Uf=V.createContext(null);Uf.displayName="RouteError";var Jx="REACT_ROUTER_ERROR",fp="REDIRECT",hp="ROUTE_ERROR_RESPONSE";function mp(l){if(l.startsWith(`${Jx}:${fp}:{`))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 xp(l){if(l.startsWith(`${Jx}:${hp}:{`))try{let u=JSON.parse(l.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new sp(u.status,u.statusText,u.data)}catch{}}function gp(l,{relative:u}={}){xt(kr(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:o}=V.useContext(Oa),{hash:x,pathname:m,search:g}=lu(l,{relative:u}),w=m;return d!=="/"&&(w=m==="/"?d:Fn([d,m])),o.createHref({pathname:w,search:g,hash:x})}function kr(){return V.useContext(nu)!=null}function Wn(){return xt(kr(),"useLocation() may be used only in the context of a <Router> component."),V.useContext(nu).location}var Ix="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Kx(l){V.useContext(Oa).static||V.useLayoutEffect(l)}function Kc(){let{isDataRoute:l}=V.useContext(vn);return l?Op():yp()}function yp(){xt(kr(),"useNavigate() may be used only in the context of a <Router> component.");let l=V.useContext(Ar),{basename:u,navigator:d}=V.useContext(Oa),{matches:o}=V.useContext(vn),{pathname:x}=Wn(),m=JSON.stringify(kf(o)),g=V.useRef(!1);return Kx(()=>{g.current=!0}),V.useCallback((b,p={})=>{if(Ya(g.current,Ix),!g.current)return;if(typeof b=="number"){d.go(b);return}let j=zf(b,JSON.parse(m),x,p.relative==="path");l==null&&u!=="/"&&(j.pathname=j.pathname==="/"?u:Fn([u,j.pathname])),(p.replace?d.replace:d.push)(j,p.state,p)},[u,d,m,x,l])}V.createContext(null);function lu(l,{relative:u}={}){let{matches:d}=V.useContext(vn),{pathname:o}=Wn(),x=JSON.stringify(kf(d));return V.useMemo(()=>zf(l,JSON.parse(x),o,u==="path"),[l,x,o,u])}function vp(l,u){return Px(l,u)}function Px(l,u,d,o,x){var I;xt(kr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:m}=V.useContext(Oa),{matches:g}=V.useContext(vn),w=g[g.length-1],b=w?w.params:{},p=w?w.pathname:"/",j=w?w.pathnameBase:"/",M=w&&w.route;{let le=M&&M.path||"";tg(p,!M||le.endsWith("*")||le.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${le}">) 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="${le}"> to <Route path="${le==="/"?"*":`${le}/*`}">.`)}let _=Wn(),A;if(u){let le=typeof u=="string"?_s(u):u;xt(j==="/"||((I=le.pathname)==null?void 0:I.startsWith(j)),`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 "${j}" but pathname "${le.pathname}" was given in the \`location\` prop.`),A=le}else A=_;let E=A.pathname||"/",T=E;if(j!=="/"){let le=j.replace(/^\//,"").split("/");T="/"+E.replace(/^\//,"").split("/").slice(le.length).join("/")}let C=$x(l,{pathname:T});Ya(M||C!=null,`No routes matched location "${A.pathname}${A.search}${A.hash}" `),Ya(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 "${A.pathname}${A.search}${A.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let ne=wp(C&&C.map(le=>Object.assign({},le,{params:Object.assign({},b,le.params),pathname:Fn([j,m.encodeLocation?m.encodeLocation(le.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:le.pathname]),pathnameBase:le.pathnameBase==="/"?j:Fn([j,m.encodeLocation?m.encodeLocation(le.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:le.pathnameBase])})),g,d,o,x);return u&&ne?V.createElement(nu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...A},navigationType:"POP"}},ne):ne}function pp(){let l=Cp(),u=rp(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},g=null;return console.error("Error handled by React Router default ErrorBoundary:",l),g=V.createElement(V.Fragment,null,V.createElement("p",null,"💿 Hey developer 👋"),V.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",V.createElement("code",{style: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,g)}var bp=V.createElement(pp,null),eg=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=xp(l.digest);d&&(l=d)}let u=l!==void 0?V.createElement(vn.Provider,{value:this.props.routeContext},V.createElement(Uf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?V.createElement(Sp,{error:l},u):u}};eg.contextType=cp;var xf=new WeakMap;function Sp({children:l,error:u}){let{basename:d}=V.useContext(Oa);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let o=mp(u.digest);if(o){let x=xf.get(u);if(x)throw x;let m=Qx(o.location,d);if(Zx&&!xf.get(u))if(m.isExternal||o.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:o.replace}));throw xf.set(u,g),g}return V.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return l}function Np({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(vn.Provider,{value:l},d)}function wp(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,g=d==null?void 0:d.errors;if(g!=null){let j=m.findIndex(M=>M.route.id&&(g==null?void 0:g[M.route.id])!==void 0);xt(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(g).join(",")}`),m=m.slice(0,Math.min(m.length,j+1))}let w=!1,b=-1;if(d)for(let j=0;j<m.length;j++){let M=m[j];if((M.route.HydrateFallback||M.route.hydrateFallbackElement)&&(b=j),M.route.id){let{loaderData:_,errors:A}=d,E=M.route.loader&&!_.hasOwnProperty(M.route.id)&&(!A||A[M.route.id]===void 0);if(M.route.lazy||E){w=!0,b>=0?m=m.slice(0,b+1):m=[m[0]];break}}}let p=d&&o?(j,M)=>{var _,A;o(j,{location:d.location,params:((A=(_=d.matches)==null?void 0:_[0])==null?void 0:A.params)??{},unstable_pattern:ip(d.matches),errorInfo:M})}:void 0;return m.reduceRight((j,M,_)=>{let A,E=!1,T=null,C=null;d&&(A=g&&M.route.id?g[M.route.id]:void 0,T=M.route.errorElement||bp,w&&(b<0&&_===0?(tg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,C=null):b===_&&(E=!0,C=M.route.hydrateFallbackElement||null)));let ne=u.concat(m.slice(0,_+1)),I=()=>{let le;return A?le=T:E?le=C:M.route.Component?le=V.createElement(M.route.Component,null):M.route.element?le=M.route.element:le=j,V.createElement(Np,{match:M,routeContext:{outlet:j,matches:ne,isDataRoute:d!=null},children:le})};return d&&(M.route.ErrorBoundary||M.route.errorElement||_===0)?V.createElement(eg,{location:d.location,revalidation:d.revalidation,component:T,error:A,children:I(),routeContext:{outlet:null,matches:ne,isDataRoute:!0},onError:p}):I()},null)}function Hf(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jp(l){let u=V.useContext(Ar);return xt(u,Hf(l)),u}function Mp(l){let u=V.useContext(Ic);return xt(u,Hf(l)),u}function Ep(l){let u=V.useContext(vn);return xt(u,Hf(l)),u}function Lf(l){let u=Ep(l),d=u.matches[u.matches.length-1];return xt(d.route.id,`${l} can only be used on routes that contain a unique "id"`),d.route.id}function Tp(){return Lf("useRouteId")}function Cp(){var o;let l=V.useContext(Uf),u=Mp("useRouteError"),d=Lf("useRouteError");return l!==void 0?l:(o=u.errors)==null?void 0:o[d]}function Op(){let{router:l}=jp("useNavigate"),u=Lf("useNavigate"),d=V.useRef(!1);return Kx(()=>{d.current=!0}),V.useCallback(async(x,m={})=>{Ya(d.current,Ix),d.current&&(typeof x=="number"?await l.navigate(x):await l.navigate(x,{fromRouteId:u,...m}))},[l,u])}var lx={};function tg(l,u,d){!u&&!lx[l]&&(lx[l]=!0,Ya(!1,d))}V.memo(Dp);function Dp({routes:l,future:u,state:d,onError:o}){return Px(l,void 0,d,o,u)}function Rp({to:l,replace:u,state:d,relative:o}){xt(kr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:x}=V.useContext(Oa);Ya(!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(vn),{pathname:g}=Wn(),w=Kc(),b=zf(l,kf(m),g,o==="path"),p=JSON.stringify(b);return V.useEffect(()=>{w(JSON.parse(p),{replace:u,state:d,relative:o})},[w,p,o,u,d]),null}function $n(l){xt(!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 _p({basename:l="/",children:u=null,location:d,navigationType:o="POP",navigator:x,static:m=!1,unstable_useTransitions:g}){xt(!kr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let w=l.replace(/^\/*/,"/"),b=V.useMemo(()=>({basename:w,navigator:x,static:m,unstable_useTransitions:g,future:{}}),[w,x,m,g]);typeof d=="string"&&(d=_s(d));let{pathname:p="/",search:j="",hash:M="",state:_=null,key:A="default"}=d,E=V.useMemo(()=>{let T=Zn(p,w);return T==null?null:{location:{pathname:T,search:j,hash:M,state:_,key:A},navigationType:o}},[w,p,j,M,_,A,o]);return Ya(E!=null,`<Router basename="${w}"> is not able to match the URL "${p}${j}${M}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:V.createElement(Oa.Provider,{value:b},V.createElement(nu.Provider,{children:u,value:E}))}function Ap({children:l,location:u}){return vp(Ef(l),u)}function Ef(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,Ef(o.props.children,m));return}xt(o.type===$n,`[${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>`),xt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let g={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&&(g.children=Ef(o.props.children,m)),d.push(g)}),d}var Yc="get",$c="application/x-www-form-urlencoded";function Pc(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function kp(l){return Pc(l)&&l.tagName.toLowerCase()==="button"}function zp(l){return Pc(l)&&l.tagName.toLowerCase()==="form"}function Up(l){return Pc(l)&&l.tagName.toLowerCase()==="input"}function Hp(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Lp(l,u){return l.button===0&&(!u||u==="_self")&&!Hp(l)}var Uc=null;function qp(){if(Uc===null)try{new FormData(document.createElement("form"),0),Uc=!1}catch{Uc=!0}return Uc}var Vp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gf(l){return l!=null&&!Vp.has(l)?(Ya(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${$c}"`),null):l}function Bp(l,u){let d,o,x,m,g;if(zp(l)){let w=l.getAttribute("action");o=w?Zn(w,u):null,d=l.getAttribute("method")||Yc,x=gf(l.getAttribute("enctype"))||$c,m=new FormData(l)}else if(kp(l)||Up(l)&&(l.type==="submit"||l.type==="image")){let w=l.form;if(w==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=l.getAttribute("formaction")||w.getAttribute("action");if(o=b?Zn(b,u):null,d=l.getAttribute("formmethod")||w.getAttribute("method")||Yc,x=gf(l.getAttribute("formenctype"))||gf(w.getAttribute("enctype"))||$c,m=new FormData(w,l),!qp()){let{name:p,type:j,value:M}=l;if(j==="image"){let _=p?`${p}.`:"";m.append(`${_}x`,"0"),m.append(`${_}y`,"0")}else p&&m.append(p,M)}}else{if(Pc(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Yc,o=null,x=$c,g=l}return m&&x==="text/plain"&&(g=m,m=void 0),{action:o,method:d.toLowerCase(),encType:x,formData:m,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qf(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function Yp(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&&Zn(x.pathname,u)==="/"?x.pathname=`${u.replace(/\/$/,"")}/_root.${o}`:x.pathname=`${x.pathname.replace(/\/$/,"")}.${o}`,x}async function $p(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 Gp(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 Fp(l,u,d){let o=await Promise.all(l.map(async x=>{let m=u.routes[x.route.id];if(m){let g=await $p(m,d);return g.links?g.links():[]}return[]}));return Xp(o.flat(1).filter(Gp).filter(x=>x.rel==="stylesheet"||x.rel==="preload").map(x=>x.rel==="stylesheet"?{...x,rel:"prefetch",as:"style"}:{...x,rel:"prefetch"}))}function sx(l,u,d,o,x,m){let g=(b,p)=>d[p]?b.route.id!==d[p].route.id:!0,w=(b,p)=>{var j;return d[p].pathname!==b.pathname||((j=d[p].route.path)==null?void 0:j.endsWith("*"))&&d[p].params["*"]!==b.params["*"]};return m==="assets"?u.filter((b,p)=>g(b,p)||w(b,p)):m==="data"?u.filter((b,p)=>{var M;let j=o.routes[b.route.id];if(!j||!j.hasLoader)return!1;if(g(b,p)||w(b,p))return!0;if(b.route.shouldRevalidate){let _=b.route.shouldRevalidate({currentUrl:new URL(x.pathname+x.search+x.hash,window.origin),currentParams:((M=d[0])==null?void 0:M.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 Qp(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 Qp(l){return[...new Set(l)]}function Wp(l){let u={},d=Object.keys(l).sort();for(let o of d)u[o]=l[o];return u}function Xp(l,u){let d=new Set;return new Set(u),l.reduce((o,x)=>{let m=JSON.stringify(Wp(x));return d.has(m)||(d.add(m),o.push({key:m,link:x})),o},[])}function ag(){let l=V.useContext(Ar);return qf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function Jp(){let l=V.useContext(Ic);return qf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Vf=V.createContext(void 0);Vf.displayName="FrameworkContext";function ng(){let l=V.useContext(Vf);return qf(l,"You must render this element inside a <HydratedRouter> element"),l}function Ip(l,u){let d=V.useContext(Vf),[o,x]=V.useState(!1),[m,g]=V.useState(!1),{onFocus:w,onBlur:b,onMouseEnter:p,onMouseLeave:j,onTouchStart:M}=u,_=V.useRef(null);V.useEffect(()=>{if(l==="render"&&g(!0),l==="viewport"){let T=ne=>{ne.forEach(I=>{g(I.isIntersecting)})},C=new IntersectionObserver(T,{threshold:.5});return _.current&&C.observe(_.current),()=>{C.disconnect()}}},[l]),V.useEffect(()=>{if(o){let T=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(T)}}},[o]);let A=()=>{x(!0)},E=()=>{x(!1),g(!1)};return d?l!=="intent"?[m,_,{}]:[m,_,{onFocus:qi(w,A),onBlur:qi(b,E),onMouseEnter:qi(p,A),onMouseLeave:qi(j,E),onTouchStart:qi(M,A)}]:[!1,_,{}]}function qi(l,u){return d=>{l&&l(d),d.defaultPrevented||u(d)}}function Kp({page:l,...u}){let{router:d}=ag(),o=V.useMemo(()=>$x(d.routes,l,d.basename),[d.routes,l,d.basename]);return o?V.createElement(eb,{page:l,matches:o,...u}):null}function Pp(l){let{manifest:u,routeModules:d}=ng(),[o,x]=V.useState([]);return V.useEffect(()=>{let m=!1;return Fp(l,u,d).then(g=>{m||x(g)}),()=>{m=!0}},[l,u,d]),o}function eb({page:l,matches:u,...d}){let o=Wn(),{future:x,manifest:m,routeModules:g}=ng(),{basename:w}=ag(),{loaderData:b,matches:p}=Jp(),j=V.useMemo(()=>sx(l,u,p,m,o,"data"),[l,u,p,m,o]),M=V.useMemo(()=>sx(l,u,p,m,o,"assets"),[l,u,p,m,o]),_=V.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let T=new Set,C=!1;if(u.forEach(I=>{var te;let le=m.routes[I.route.id];!le||!le.hasLoader||(!j.some(K=>K.route.id===I.route.id)&&I.route.id in b&&((te=g[I.route.id])!=null&&te.shouldRevalidate)||le.hasClientLoader?C=!0:T.add(I.route.id))}),T.size===0)return[];let ne=Yp(l,w,x.unstable_trailingSlashAwareDataRequests,"data");return C&&T.size>0&&ne.searchParams.set("_routes",u.filter(I=>T.has(I.route.id)).map(I=>I.route.id).join(",")),[ne.pathname+ne.search]},[w,x.unstable_trailingSlashAwareDataRequests,b,o,m,j,u,l,g]),A=V.useMemo(()=>Zp(M,m),[M,m]),E=Pp(M);return V.createElement(V.Fragment,null,_.map(T=>V.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...d})),A.map(T=>V.createElement("link",{key:T,rel:"modulepreload",href:T,...d})),E.map(({key:T,link:C})=>V.createElement("link",{key:T,nonce:d.nonce,...C,crossOrigin:C.crossOrigin??d.crossOrigin})))}function tb(...l){return u=>{l.forEach(d=>{typeof d=="function"?d(u):d!=null&&(d.current=u)})}}var ab=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ab&&(window.__reactRouterVersion="7.13.0")}catch{}function nb({basename:l,children:u,unstable_useTransitions:d,window:o}){let x=V.useRef();x.current==null&&(x.current=Uv({window:o,v5Compat:!0}));let m=x.current,[g,w]=V.useState({action:m.action,location:m.location}),b=V.useCallback(p=>{d===!1?w(p):V.startTransition(()=>w(p))},[d]);return V.useLayoutEffect(()=>m.listen(b),[m,b]),V.createElement(_p,{basename:l,children:u,location:g.location,navigationType:g.action,navigator:m,unstable_useTransitions:d})}var lg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sg=V.forwardRef(function({onClick:u,discover:d="render",prefetch:o="none",relative:x,reloadDocument:m,replace:g,state:w,target:b,to:p,preventScrollReset:j,viewTransition:M,unstable_defaultShouldRevalidate:_,...A},E){let{basename:T,unstable_useTransitions:C}=V.useContext(Oa),ne=typeof p=="string"&&lg.test(p),I=Qx(p,T);p=I.to;let le=gp(p,{relative:x}),[te,K,oe]=Ip(o,A),X=rb(p,{replace:g,state:w,target:b,preventScrollReset:j,relative:x,viewTransition:M,unstable_defaultShouldRevalidate:_,unstable_useTransitions:C});function J(H){u&&u(H),H.defaultPrevented||X(H)}let $=V.createElement("a",{...A,...oe,href:I.absoluteURL||le,onClick:I.isExternal||m?u:J,ref:tb(E,K),target:b,"data-discover":!ne&&d==="render"?"true":void 0});return te&&!ne?V.createElement(V.Fragment,null,$,V.createElement(Kp,{page:le})):$});sg.displayName="Link";var rg=V.forwardRef(function({"aria-current":u="page",caseSensitive:d=!1,className:o="",end:x=!1,style:m,to:g,viewTransition:w,children:b,...p},j){let M=lu(g,{relative:p.relative}),_=Wn(),A=V.useContext(Ic),{navigator:E,basename:T}=V.useContext(Oa),C=A!=null&&db(M)&&w===!0,ne=E.encodeLocation?E.encodeLocation(M).pathname:M.pathname,I=_.pathname,le=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;d||(I=I.toLowerCase(),le=le?le.toLowerCase():null,ne=ne.toLowerCase()),le&&T&&(le=Zn(le,T)||le);const te=ne!=="/"&&ne.endsWith("/")?ne.length-1:ne.length;let K=I===ne||!x&&I.startsWith(ne)&&I.charAt(te)==="/",oe=le!=null&&(le===ne||!x&&le.startsWith(ne)&&le.charAt(ne.length)==="/"),X={isActive:K,isPending:oe,isTransitioning:C},J=K?u:void 0,$;typeof o=="function"?$=o(X):$=[o,K?"active":null,oe?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let H=typeof m=="function"?m(X):m;return V.createElement(sg,{...p,"aria-current":J,className:$,ref:j,style:H,to:g,viewTransition:w},typeof b=="function"?b(X):b)});rg.displayName="NavLink";var lb=V.forwardRef(({discover:l="render",fetcherKey:u,navigate:d,reloadDocument:o,replace:x,state:m,method:g=Yc,action:w,onSubmit:b,relative:p,preventScrollReset:j,viewTransition:M,unstable_defaultShouldRevalidate:_,...A},E)=>{let{unstable_useTransitions:T}=V.useContext(Oa),C=cb(),ne=ob(w,{relative:p}),I=g.toLowerCase()==="get"?"get":"post",le=typeof w=="string"&&lg.test(w),te=K=>{if(b&&b(K),K.defaultPrevented)return;K.preventDefault();let oe=K.nativeEvent.submitter,X=(oe==null?void 0:oe.getAttribute("formmethod"))||g,J=()=>C(oe||K.currentTarget,{fetcherKey:u,method:X,navigate:d,replace:x,state:m,relative:p,preventScrollReset:j,viewTransition:M,unstable_defaultShouldRevalidate:_});T&&d!==!1?V.startTransition(()=>J()):J()};return V.createElement("form",{ref:E,method:I,action:ne,onSubmit:o?b:te,...A,"data-discover":!le&&l==="render"?"true":void 0})});lb.displayName="Form";function sb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ig(l){let u=V.useContext(Ar);return xt(u,sb(l)),u}function rb(l,{target:u,replace:d,state:o,preventScrollReset:x,relative:m,viewTransition:g,unstable_defaultShouldRevalidate:w,unstable_useTransitions:b}={}){let p=Kc(),j=Wn(),M=lu(l,{relative:m});return V.useCallback(_=>{if(Lp(_,u)){_.preventDefault();let A=d!==void 0?d:eu(j)===eu(M),E=()=>p(l,{replace:A,state:o,preventScrollReset:x,relative:m,viewTransition:g,unstable_defaultShouldRevalidate:w});b?V.startTransition(()=>E()):E()}},[j,p,M,d,o,u,l,x,m,g,w,b])}var ib=0,ub=()=>`__${String(++ib)}__`;function cb(){let{router:l}=ig("useSubmit"),{basename:u}=V.useContext(Oa),d=Tp(),o=l.fetch,x=l.navigate;return V.useCallback(async(m,g={})=>{let{action:w,method:b,encType:p,formData:j,body:M}=Bp(m,u);if(g.navigate===!1){let _=g.fetcherKey||ub();await o(_,d,g.action||w,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:j,body:M,formMethod:g.method||b,formEncType:g.encType||p,flushSync:g.flushSync})}else await x(g.action||w,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:j,body:M,formMethod:g.method||b,formEncType:g.encType||p,replace:g.replace,state:g.state,fromRouteId:d,flushSync:g.flushSync,viewTransition:g.viewTransition})},[o,x,u,d])}function ob(l,{relative:u}={}){let{basename:d}=V.useContext(Oa),o=V.useContext(vn);xt(o,"useFormAction must be used inside a RouteContext");let[x]=o.matches.slice(-1),m={...lu(l||".",{relative:u})},g=Wn();if(l==null){m.search=g.search;let w=new URLSearchParams(m.search),b=w.getAll("index");if(b.some(j=>j==="")){w.delete("index"),b.filter(M=>M).forEach(M=>w.append("index",M));let j=w.toString();m.search=j?`?${j}`:""}}return(!l||l===".")&&x.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(m.pathname=m.pathname==="/"?d:Fn([d,m.pathname])),eu(m)}function db(l,{relative:u}={}){let d=V.useContext(Xx);xt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=ig("useViewTransitionState"),x=lu(l,{relative:u});if(!d.isTransitioning)return!1;let m=Zn(d.currentLocation.pathname,o)||d.currentLocation.pathname,g=Zn(d.nextLocation.pathname,o)||d.nextLocation.pathname;return Zc(x.pathname,g)!=null||Zc(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 ug=(...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 fb=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 hb=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 rx=l=>{const u=hb(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 mb={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 xb=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 gb=V.forwardRef(({color:l="currentColor",size:u=24,strokeWidth:d=2,absoluteStrokeWidth:o,className:x="",children:m,iconNode:g,...w},b)=>V.createElement("svg",{ref:b,...mb,width:u,height:u,stroke:l,strokeWidth:o?Number(d)*24/Number(u):d,className:ug("lucide",x),...!m&&!xb(w)&&{"aria-hidden":"true"},...w},[...g.map(([p,j])=>V.createElement(p,j)),...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 _e=(l,u)=>{const d=V.forwardRef(({className:o,...x},m)=>V.createElement(gb,{ref:m,iconNode:u,className:ug(`lucide-${fb(rx(l))}`,`lucide-${l}`,o),...x}));return d.displayName=rx(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 yb=[["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"}]],Bf=_e("activity",yb);/**
|
|
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 vb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],pb=_e("arrow-down",vb);/**
|
|
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 bb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ix=_e("arrow-right",bb);/**
|
|
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 Sb=[["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"}]],Nb=_e("arrow-up-down",Sb);/**
|
|
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 wb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],jb=_e("arrow-up",wb);/**
|
|
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 Mb=[["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=_e("bell",Mb);/**
|
|
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 Tb=[["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"}]],ux=_e("briefcase",Tb);/**
|
|
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 Cb=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Qc=_e("calendar",Cb);/**
|
|
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 Ob=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Gc=_e("check",Ob);/**
|
|
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 Db=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Rb=_e("chevron-down",Db);/**
|
|
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 _b=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ab=_e("chevron-left",_b);/**
|
|
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 kb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zb=_e("chevron-right",kb);/**
|
|
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 Ub=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Hb=_e("chevrons-up-down",Ub);/**
|
|
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 Lb=[["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"}]],Qn=_e("circle-alert",Lb);/**
|
|
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 qb=[["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"}]],cx=_e("circle-arrow-down",qb);/**
|
|
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 Vb=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],su=_e("circle-check-big",Vb);/**
|
|
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 Bb=[["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"}]],Tf=_e("circle-x",Bb);/**
|
|
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 Yb=[["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"}]],cg=_e("clipboard-list",Yb);/**
|
|
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 $b=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Wc=_e("clock",$b);/**
|
|
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 Gb=[["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"}]],og=_e("external-link",Gb);/**
|
|
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 Fb=[["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=_e("eye-off",Fb);/**
|
|
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 Qb=[["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"}]],Wb=_e("eye",Qb);/**
|
|
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 Xb=[["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"}]],Jb=_e("file-text",Xb);/**
|
|
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 Ib=[["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"}]],Kb=_e("git-pull-request",Ib);/**
|
|
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 Pb=[["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"}]],e1=_e("hourglass",Pb);/**
|
|
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 t1=[["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"}]],a1=_e("house",t1);/**
|
|
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 n1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],l1=_e("info",n1);/**
|
|
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 s1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],r1=_e("kanban",s1);/**
|
|
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 i1=[["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"}]],u1=_e("list-ordered",i1);/**
|
|
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 c1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],dg=_e("loader-circle",c1);/**
|
|
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 o1=[["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"}]],fg=_e("map",o1);/**
|
|
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 d1=[["path",{d:"M5 12h14",key:"1ays0h"}]],f1=_e("minus",d1);/**
|
|
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 h1=[["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"}]],hg=_e("pause",h1);/**
|
|
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 m1=[["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"}]],mg=_e("pen",m1);/**
|
|
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 x1=[["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"}]],Gn=_e("play",x1);/**
|
|
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 g1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ru=_e("plus",g1);/**
|
|
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 y1=[["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"}]],v1=_e("rotate-ccw",y1);/**
|
|
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 p1=[["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"}]],b1=_e("save",p1);/**
|
|
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 S1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],iu=_e("search",S1);/**
|
|
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 N1=[["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"}]],xg=_e("settings",N1);/**
|
|
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 w1=[["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"}]],j1=_e("square-pen",w1);/**
|
|
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 M1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],E1=_e("terminal",M1);/**
|
|
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 T1=[["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"}]],gg=_e("test-tube-diagonal",T1);/**
|
|
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 C1=[["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"}]],yg=_e("trash-2",C1);/**
|
|
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 O1=[["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"}]],D1=_e("triangle-alert",O1);/**
|
|
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 R1=[["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"}]],_1=_e("wifi",R1);/**
|
|
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 A1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],uu=_e("x",A1);/**
|
|
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 k1=[["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"}]],z1=_e("zap",k1),Yf="";let $f=!1,Xc=null;function U1(l){$f=l}function H1(l){Xc=l}function L1(){return $f}function vg(l){return encodeURIComponent(l.replace(/\//g,"~"))}function gt(l){return $f&&Xc?l.replace("/api/",`/api/projects/${vg(Xc)}/`):l}function q1(){return ut("/api/mode")}function pg(){return ut("/api/projects")}async function ut(l,u){const d=`${Yf}${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 Ki(){return ut(gt("/api/status"))}function bg(){return ut(gt("/api/prs"))}function V1(l,u){const d=`?lines=${encodeURIComponent(u)}`;return ut(gt(`/api/logs/${encodeURIComponent(l)}${d}`))}function Gf(){return ut(gt("/api/config"))}async function Sg(){if(L1()){const u=(await pg()).filter(o=>o.valid);return(await Promise.all(u.map(async o=>{try{const x=await ut(`/api/projects/${vg(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 Gf();return[{projectId:Xc||"current",config:l}]}}function Cs(l){return ut(gt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function B1(){return ut(gt("/api/doctor"))}function Ng(){return ut(gt("/api/schedule-info"))}function Y1(){return ut(gt("/api/actions/run"),{method:"POST"})}function wg(){return ut(gt("/api/actions/review"),{method:"POST"})}function $1(){return ut(gt("/api/actions/qa"),{method:"POST"})}function G1(){return ut(gt("/api/actions/audit"),{method:"POST"})}function F1(){return ut(gt("/api/actions/planner"),{method:"POST"})}function Pi(){return ut(gt("/api/actions/install-cron"),{method:"POST"})}function Z1(){return ut(gt("/api/actions/uninstall-cron"),{method:"POST"})}function Q1(l="all"){return ut(gt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Vl=["Draft","Ready","In Progress","Review","Done"];function jg(){return ut(gt("/api/board/status"))}function W1(l){return ut(gt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function Mg(l,u){return ut(gt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:u})})}async function X1(l){const u=`${Yf}${gt(`/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 J1(){return ut(gt("/api/actions/clear-lock"),{method:"POST"})}function I1(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=`${Yf}${gt("/api/status/events")}`,g=new EventSource(m);return g.addEventListener("status_changed",w=>{try{const b=JSON.parse(w.data);x.current(b)}catch{}}),()=>{g.close()}},[o,...u])}function ox(){return ut("/api/queue/status")}function K1(l){const u=`?window=${encodeURIComponent(l)}`;return ut(`/api/queue/analytics${u}`)}function P1(l){return ut("/api/queue/clear",{method:"POST",body:JSON.stringify({force:l})})}function e2(){return ut(gt("/api/roadmap"))}function t2(){return ut(gt("/api/roadmap/scan"),{method:"POST"})}function Eg(l){return ut(gt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function $a(l,u=[],d){const o=(d==null?void 0:d.enabled)??!0,[x,m]=V.useState(null),[g,w]=V.useState(!0),[b,p]=V.useState(null),j=V.useRef(l);j.current=l;const M=V.useRef(()=>{(async()=>{p(null);try{const A=await j.current();m(A)}catch(A){p(A instanceof Error?A:new Error("Unknown error"))}})()});return M.current=M.current.bind(M),V.useEffect(()=>{if(!o)return;let _=!1;return w(!0),p(null),(async()=>{try{const E=await j.current();_||m(E)}catch(E){_||p(E instanceof Error?E:new Error("Unknown error"))}finally{_||w(!1)}})(),()=>{_=!0}},[...u,o]),{data:x,loading:g,error:b,refetch:M.current}}const dx=l=>{let u;const d=new Set,o=(p,j)=>{const M=typeof p=="function"?p(u):p;if(!Object.is(M,u)){const _=u;u=j??(typeof M!="object"||M===null)?M:Object.assign({},u,M),d.forEach(A=>A(u,_))}},x=()=>u,w={setState:o,getState:x,getInitialState:()=>b,subscribe:p=>(d.add(p),()=>d.delete(p))},b=u=l(o,x,w);return w},a2=l=>l?dx(l):dx,n2=l=>l;function l2(l,u=n2){const d=Ke.useSyncExternalStore(l.subscribe,()=>u(l.getState()),()=>u(l.getInitialState()));return Ke.useDebugValue(d),d}const fx=l=>{const u=a2(l),d=o=>l2(u,o);return Object.assign(d,u),d},s2=l=>l?fx(l):fx,r2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,la=s2(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=>{U1(u),l({isGlobalMode:u})},projects:[],setProjects:u=>l({projects:u}),selectedProjectId:r2,selectProject:u=>{H1(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}:{}}})},status:null,setStatus:u=>l({status:u})})),i2=()=>{const[l,u]=V.useState(!1),{projectName:d,isGlobalMode:o,projects:x,selectedProjectId:m,selectProject:g,globalModeLoading:w}=la(),{data:b}=$a(bg,[m],{enabled:!w}),p=(b==null?void 0:b.length)??0,j=V.useMemo(()=>[{icon:a1,label:"Dashboard",path:"/"},{icon:r1,label:"Board",path:"/board"},{icon:Kb,label:"Pull Requests",path:"/prs",badge:p},{icon:fg,label:"Roadmap",path:"/roadmap"},{icon:Qc,label:"Scheduling",path:"/scheduling"},{icon:E1,label:"Logs",path:"/logs"},{icon:xg,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(ux,{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:M=>g(M.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(M=>M.valid).map(M=>s.jsx("option",{value:M.name,children:M.name},M.name))}),s.jsx(Hb,{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(ux,{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:j.map(M=>s.jsx(Ke.Fragment,{children:s.jsx("li",{children:s.jsx(rg,{to:M.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(M.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:M.label}),M.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:M.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:M.label})]})})})},M.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(zb,{className:"h-5 w-5"}):s.jsx(Ab,{className:"h-5 w-5"})})})]})},u2=()=>{const{projectName:l}=la();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(_1,{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(iu,{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(xg,{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"})]})]})},c2=({toast:l,onDismiss:u})=>{const d={success:s.jsx(su,{className:"h-5 w-5 text-green-400"}),error:s.jsx(Qn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(l1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(D1,{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(uu,{className:"h-5 w-5"})]})})]})})})},o2=()=>{const{toasts:l,removeToast:u}=la();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(c2,{toast:d,onDismiss:u},d.id))})};function d2(){const{setGlobalMode:l,setGlobalModeLoading:u,setProjects:d,selectProject:o,selectedProjectId:x}=la();V.useEffect(()=>{u(!0),q1().then(async({globalMode:m})=>{if(l(m),!m)return;const g=await pg();d(g);const w=g.filter(b=>b.valid);x&&w.some(b=>b.name===x)?o(x):w.length>0&&o(w[0].name)}).catch(()=>{l(!1)}).finally(()=>{u(!1)})},[])}function hx(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 Hc(l,u){return l?u?hx(l)>=hx(u)?l:u:l:u}function f2(){const{setStatus:l,selectedProjectId:u,globalModeLoading:d}=la(),o=V.useRef(null);o.current=la.getState().status,I1(x=>{Hc(x,o.current)===x&&l(x)},[u,d],{enabled:!d}),V.useEffect(()=>{if(d)return;Ki().then(m=>{Hc(m,o.current)===m&&l(m)}).catch(()=>{});const x=setInterval(()=>{Ki().then(m=>{Hc(m,o.current)===m&&l(m)}).catch(()=>{})},3e4);return()=>clearInterval(x)},[u,d,l]),V.useEffect(()=>{const x=()=>{Ki().then(m=>{Hc(m,o.current)===m&&l(m)}).catch(()=>{})};return window.addEventListener("focus",x),()=>window.removeEventListener("focus",x)},[u,l])}const Le=({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})]}),Ve=({children:l,variant:u="primary",size:d="md",loading:o=!1,className:x="",disabled:m,...g})=>{const w="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:`${w} ${b[u]} ${p[d]} ${x}`,disabled:m||o,...g,children:[o&&s.jsx(dg,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},Fc=({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})},Tg={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"}},h2=({defaultColumn:l,onClose:u,onCreated:d})=>{const[o,x]=V.useState(""),[m,g]=V.useState(""),[w,b]=V.useState(l),[p,j]=V.useState(!1),[M,_]=V.useState(null),{addToast:A}=la(),E=async T=>{if(T.preventDefault(),!!o.trim()){j(!0),_(null);try{await W1({title:o.trim(),body:m,column:w}),A({title:"Issue created",message:`"${o.trim()}" added to ${w}`,type:"success"}),d(),u()}catch(C){_(C instanceof Error?C.message:"Failed to create issue")}finally{j(!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(uu,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:E,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:T=>x(T.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),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:w,onChange:T=>b(T.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Vl.map(T=>s.jsx("option",{value:T,children:T},T))})]}),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:T=>g(T.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),M&&s.jsx("p",{className:"text-sm text-red-400",children:M}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Ve,{variant:"ghost",type:"button",onClick:u,children:"Cancel"}),s.jsx(Ve,{type:"submit",disabled:p||!o.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},m2=({issue:l,onClose:u,onMoved:d,onClosed:o})=>{const[x,m]=V.useState(!1),[g,w]=V.useState(!1),{addToast:b}=la(),p=async _=>{if(_!==l.column){m(!0);try{await Mg(l.number,_),b({title:"Issue moved",message:`#${l.number} moved to ${_}`,type:"success"}),d(),u()}catch(A){b({title:"Move failed",message:A instanceof Error?A.message:"Failed to move issue",type:"error"})}finally{m(!1)}}},j=async()=>{if(confirm(`Close issue #${l.number}: "${l.title}"?`)){w(!0);try{await X1(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{w(!1)}}},M=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(Fc,{variant:Tg[M].badge,children:M})]}),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(uu,{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:"}),Vl.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(og,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:j,disabled:g,className:"text-xs px-2.5 py-1 rounded-md bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20 transition-colors disabled:opacity-50",children:g?"Closing...":"Close Issue"})]})]}),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."})})]})]})},x2=({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(Le,{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(", ")})]})})},g2=({name:l,issues:u,draggingIssue:d,onIssueClick:o,onNewIssue:x,onMoveIssue:m,onDragStart:g})=>{const w=Tg[l],[b,p]=V.useState(!1),j=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&&j?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:M=>{j&&(M.preventDefault(),M.dataTransfer.dropEffect="move",p(!0))},onDragLeave:()=>p(!1),onDrop:M=>{M.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 ${w.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(ru,{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&&j?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:b&&j?"Drop here":"No issues"})}):u.map(M=>s.jsx(x2,{issue:M,onClick:()=>o(M),onDragStart:g},M.id))})]})},y2=()=>{const[l,u]=V.useState(null),[d,o]=V.useState(null),[x,m]=V.useState(null),[g,w]=V.useState(null),b=V.useRef(!1),{addToast:p,selectedProjectId:j,globalModeLoading:M}=la(),{data:_,loading:A,error:E,refetch:T}=$a(jg,[j],{enabled:!M});V.useEffect(()=>{const I=setInterval(()=>{b.current||T()},3e4);return()=>clearInterval(I)},[T]);const C=V.useCallback(async(I,le)=>{m(null);const te=g??(_==null?void 0:_.columns);if(!te)return;const K=te,oe={};for(const J of Vl)oe[J]=(te[J]??[]).filter($=>$.number!==I.number);const X={...I,column:le};oe[le]=[...oe[le]??[],X],w(oe),u(J=>(J==null?void 0:J.number)===I.number?X:J),b.current=!0;try{await Mg(I.number,le),T(),setTimeout(()=>{w(null),b.current=!1},800)}catch(J){w(K),u($=>($==null?void 0:$.number)===I.number?I:$),b.current=!1,p({title:"Move failed",message:J instanceof Error?J.message:"Failed to move issue",type:"error"})}},[p,T,g,_]);if(M||A)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(E&&E.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(E)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:E.message}),s.jsx(Ve,{onClick:()=>T(),children:"Retry"})]});if(!_)return null;const ne=g??_.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:[Vl.reduce((I,le)=>{var te;return I+(((te=ne[le])==null?void 0:te.length)??0)},0)," issues across ",Vl.length," columns"]})]}),s.jsxs(Ve,{onClick:()=>o("Ready"),children:[s.jsx(ru,{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:`${Vl.length*236}px`},children:Vl.map(I=>s.jsx(g2,{name:I,issues:ne[I]??[],draggingIssue:x,onIssueClick:u,onNewIssue:o,onMoveIssue:C,onDragStart:m},I))})}),l&&s.jsx(m2,{issue:l,onClose:()=>u(null),onMoved:()=>T(),onClosed:()=>T()}),d&&s.jsx(h2,{defaultColumn:d,onClose:()=>o(null),onCreated:()=>T()})]})},v2={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"},p2=()=>{var pe,ve,G,re,xe,Ne,U,O,Q,ce,ye;const l=Kc(),[u,d]=V.useState(null),[o,x]=V.useState(!1),[m,g]=V.useState(null),{setProjectName:w,addToast:b,selectedProjectId:p,globalModeLoading:j,status:M,setStatus:_}=la(),A=()=>Ki().then(_).catch(()=>{}),{data:E}=$a(Ng,[p],{enabled:!j}),{data:T}=$a(()=>jg().catch(()=>null),[p],{enabled:!j}),C=M;if(Ke.useEffect(()=>{C!=null&&C.projectName&&w(C.projectName)},[C,w]),j)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!C)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const ne=C.prs.length,I=C.prs.filter(he=>he.reviewScore!==null&&he.reviewScore<70).length,le=((pe=T==null?void 0:T.columns.Ready)==null?void 0:pe.length)??0,te=((ve=T==null?void 0:T.columns["In Progress"])==null?void 0:ve.length)??0,K=C.processes.find(he=>he.name==="executor"),oe=C.processes.find(he=>he.name==="reviewer"),X=C.processes.find(he=>he.name==="qa"),J=C.processes.find(he=>he.name==="audit"),$=C.processes.find(he=>he.name==="planner"),H=async he=>{d(he);try{const me=await Q1(he),we=me.results.every(Be=>Be.success);b({title:we?"Process Cancelled":"Cancel Failed",message:me.results.map(Be=>Be.message).join("; "),type:we?"success":"error"})}catch(me){b({title:"Cancel Failed",message:me instanceof Error?me.message:"Failed to cancel process",type:"error"})}finally{d(null),A()}},ae=async()=>{x(!0);try{await J1(),b({title:"Lock Cleared",message:"Stale executor state removed",type:"success"}),A()}catch(he){b({title:"Clear Failed",message:he instanceof Error?he.message:"Failed to clear lock",type:"error"})}finally{x(!1)}},B=async(he,me)=>{g(he);try{await me(),b({title:`${he} Started`,message:`${he} is now running`,type:"success"}),A()}catch(we){b({title:"Start Failed",message:we instanceof Error?we.message:`Failed to start ${he}`,type:"error"})}finally{g(null)}},de=he=>{if(!he)return"Not scheduled";try{const me=new Date(he),we=new Date,Be=me.getTime()-we.getTime(),qe=Math.floor(Be/6e4);return qe<0?"Running now...":qe<60?`In ${qe} min`:qe<1440?`In ${Math.floor(qe/60)} hr${qe>=120?"s":""}`:`In ${Math.floor(qe/1440)} day${qe>=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(Le,{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:le})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(su,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(Le,{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:te})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Bf,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(Le,{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(Wc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${I>0?"text-red-400 font-medium":"text-slate-500"}`,children:I>0?`${I} need work`:"All passing"})]}),s.jsxs(Le,{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:C.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${C.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(Qc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:C.crontab.installed?`${C.crontab.entries.length} entr${C.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(Le,{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:C.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:C.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(C.timestamp).toLocaleString()})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(Le,{className:"p-6",children:[s.jsx("h3",{className:"text-base font-semibold text-slate-200 mb-4",children:"Process Status"}),s.jsx("div",{className:"space-y-2",children:[{label:"Executor",process:K,subtitle:K!=null&&K.running?`PID: ${K.pid} • ${C.activePrd??"Running"}`:"Idle",actions:s.jsxs(s.Fragment,{children:[(K==null?void 0:K.running)&&s.jsxs(Ve,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300 border border-red-500/30 hover:border-red-400/50",onClick:()=>H("run"),disabled:u==="run",children:[s.jsx(Tf,{className:"h-4 w-4 mr-1"}),u==="run"?"Stopping...":"Stop"]}),!(K!=null&&K.running)&&C.activePrd&&s.jsx(Ve,{size:"sm",variant:"ghost",className:"text-amber-400 hover:text-amber-300",onClick:ae,disabled:o,children:o?"Clearing...":"Force Clear"}),!(K!=null&&K.running)&&!C.activePrd&&s.jsxs(Ve,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>B("Executor",Y1),disabled:m==="Executor",children:[s.jsx(Gn,{className:"h-4 w-4 mr-1"}),m==="Executor"?"Starting...":"Run"]}),s.jsx(Ve,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"Log"})]})},{label:"Reviewer",process:oe,subtitle:oe!=null&&oe.running?`PID: ${oe.pid} • Running`:"Idle",actions:s.jsxs(s.Fragment,{children:[oe!=null&&oe.running?s.jsxs(Ve,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300 border border-red-500/30 hover:border-red-400/50",onClick:()=>H("review"),disabled:u==="review",children:[s.jsx(Tf,{className:"h-4 w-4 mr-1"}),u==="review"?"Stopping...":"Stop"]}):s.jsxs(Ve,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>B("Reviewer",wg),disabled:m==="Reviewer",children:[s.jsx(Gn,{className:"h-4 w-4 mr-1"}),m==="Reviewer"?"Starting...":"Run"]}),s.jsx(Ve,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),disabled:!(oe!=null&&oe.running),children:"Log"})]})},{label:"QA",process:X,subtitle:X!=null&&X.running?`PID: ${X.pid} • Running`:"Idle",actions:s.jsxs(s.Fragment,{children:[!(X!=null&&X.running)&&s.jsxs(Ve,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>B("QA",$1),disabled:m==="QA",children:[s.jsx(Gn,{className:"h-4 w-4 mr-1"}),m==="QA"?"Starting...":"Run"]}),s.jsx(Ve,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"Log"})]})},{label:"Auditor",process:J,subtitle:J!=null&&J.running?`PID: ${J.pid} • Running`:"Idle",actions:s.jsxs(s.Fragment,{children:[!(J!=null&&J.running)&&s.jsxs(Ve,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>B("Auditor",G1),disabled:m==="Auditor",children:[s.jsx(Gn,{className:"h-4 w-4 mr-1"}),m==="Auditor"?"Starting...":"Run"]}),s.jsx(Ve,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"Log"})]})},{label:"Planner",process:$,subtitle:$!=null&&$.running?`PID: ${$.pid} • Writing PRDs`:"Idle",actions:s.jsxs(s.Fragment,{children:[!($!=null&&$.running)&&s.jsxs(Ve,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>B("Planner",F1),disabled:m==="Planner",children:[s.jsx(Gn,{className:"h-4 w-4 mr-1"}),m==="Planner"?"Starting...":"Run"]}),s.jsx(Ve,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"Log"})]})}].sort((he,me)=>{var we,Be;return((we=me.process)!=null&&we.running?1:0)-((Be=he.process)!=null&&Be.running?1:0)}).map(({label:he,process:me,subtitle:we,actions:Be})=>s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border transition-all ${me!=null&&me.running?"bg-green-500/5 border-green-500/40 shadow-[0_0_12px_rgba(34,197,94,0.08)]":"bg-slate-950/50 border-slate-800 opacity-60 hover:opacity-100"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${me!=null&&me.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:`font-medium ${me!=null&&me.running?"text-slate-200":"text-slate-400"}`,children:he}),(me==null?void 0:me.running)&&s.jsx("span",{className:"text-[10px] font-semibold tracking-wider uppercase px-1.5 py-0.5 rounded bg-green-500/15 text-green-400 border border-green-500/30",children:"Live"})]}),s.jsx("div",{className:"text-xs text-slate-500",children:we})]})]}),s.jsx("div",{className:"flex items-center space-x-2",children:Be})]},he))})]}),s.jsxs(Le,{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(ix,{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 ${E!=null&&E.executor.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(Qc,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${E!=null&&E.executor.installed?"text-slate-200":"text-slate-500"}`,children:"Executor"}),s.jsx("div",{className:"text-xs text-slate-500",children:E!=null&&E.paused?"Paused":de(E==null?void 0:E.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 ${E!=null&&E.reviewer.installed?"bg-purple-500/10 text-purple-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(Wc,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${E!=null&&E.reviewer.installed?"text-slate-200":"text-slate-500"}`,children:"Reviewer"}),s.jsx("div",{className:"text-xs text-slate-500",children:E!=null&&E.paused?"Paused":de(E==null?void 0:E.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 ${(G=E==null?void 0:E.qa)!=null&&G.installed?"bg-green-500/10 text-green-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(gg,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${(re=E==null?void 0:E.qa)!=null&&re.installed?"text-slate-200":"text-slate-500"}`,children:"QA"}),s.jsx("div",{className:"text-xs text-slate-500",children:E!=null&&E.paused?"Paused":de((xe=E==null?void 0:E.qa)==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 ${(Ne=E==null?void 0:E.audit)!=null&&Ne.installed?"bg-amber-500/10 text-amber-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(iu,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${(U=E==null?void 0:E.audit)!=null&&U.installed?"text-slate-200":"text-slate-500"}`,children:"Auditor"}),s.jsx("div",{className:"text-xs text-slate-500",children:E!=null&&E.paused?"Paused":de((O=E==null?void 0:E.audit)==null?void 0:O.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 ${(Q=E==null?void 0:E.planner)!=null&&Q.installed?"bg-cyan-500/10 text-cyan-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(cg,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${(ce=E==null?void 0:E.planner)!=null&&ce.installed?"text-slate-200":"text-slate-500"}`,children:"Planner"}),s.jsx("div",{className:"text-xs text-slate-500",children:E!=null&&E.paused?"Paused":de((ye=E==null?void 0:E.planner)==null?void 0:ye.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(ix,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(Le,{className:"p-4",children:T?s.jsx("div",{className:"flex flex-wrap gap-3",children:Vl.map(he=>{var we;const me=((we=T.columns[he])==null?void 0:we.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 ${v2[he]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:he}),s.jsx("span",{className:"text-xs font-bold",children:me})]},he)})}):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."]})})]})]})},b2=()=>{const[l,u]=V.useState(!0),[d,o]=V.useState(""),[x,m]=V.useState("executor"),g=V.useRef(null),{selectedProjectId:w,globalModeLoading:b}=la(),{data:p,loading:j,error:M,refetch:_}=$a(()=>V1(x,500),[x,w],{enabled:!b}),{data:A}=$a(Ki,[w],{enabled:!b}),E=(p==null?void 0:p.lines)||[];V.useEffect(()=>{l&&g.current&&(g.current.scrollTop=g.current.scrollHeight)},[E,l]),V.useEffect(()=>{if(!l)return;const I=window.setInterval(()=>{_()},3e3);return()=>window.clearInterval(I)},[l,x,_]);const T=E.filter(I=>I.toLowerCase().includes(d.toLowerCase())),C=I=>{m(I),o("")},ne=I=>{if(!(A!=null&&A.processes))return!1;const le=A.processes.find(te=>te.name===I);return(le==null?void 0:le.running)??!1};return M?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Qn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),s.jsx("div",{className:"text-sm text-slate-500",children:M.message}),s.jsx(Ve,{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:I=>o(I.target.value)}),s.jsx(iu,{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"}),ne("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"}),ne("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"}),ne("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"}),ne("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"}),ne("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(Ve,{size:"sm",variant:"ghost",onClick:()=>_(),children:[s.jsx(cx,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Ve,{size:"sm",variant:"ghost",onClick:()=>u(!l),children:[l?s.jsx(hg,{className:"h-4 w-4 mr-2"}):s.jsx(Gn,{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:[T.length," lines"]})]}),s.jsxs("div",{ref:g,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[j?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):T.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"}):T.map((I,le)=>{const te=I.includes("[ERROR]"),K=I.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${te?"text-red-400":K?"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:le+1}),I]},le)}),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(cx,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},S2=()=>{const[l,u]=V.useState(null),[d,o]=V.useState(!1),[x,m]=V.useState("all"),[g,w]=V.useState("number"),[b,p]=V.useState("desc"),{addToast:j,selectedProjectId:M,globalModeLoading:_}=la(),{data:A,loading:E,error:T,refetch:C}=$a(bg,[M],{enabled:!_}),ne=A??[],I=H=>{switch(H){case"pass":return s.jsx(su,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(Tf,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(dg,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(Qn,{className:"h-4 w-4 text-slate-500"})}},le=H=>{switch(H){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},te=H=>H===null?"No review decision yet":H===100?"PR has been approved":H===0?"Changes have been requested":`Review score: ${H}`,K=V.useMemo(()=>ne.filter(H=>{switch(x){case"needs-work":return H.ciStatus==="fail"||H.reviewScore===0;case"pending":return H.ciStatus==="pending"||H.ciStatus==="unknown"||H.reviewScore===null;case"passed":return H.ciStatus==="pass"&&H.reviewScore===100;case"all":default:return!0}}),[ne,x]),oe=V.useMemo(()=>[...K].sort((ae,B)=>{let de=0;switch(g){case"number":de=ae.number-B.number;break;case"title":de=ae.title.localeCompare(B.title);break;case"branch":de=ae.branch.localeCompare(B.branch);break;case"ciStatus":{const pe={fail:0,pending:1,unknown:2,pass:3};de=(pe[ae.ciStatus]??2)-(pe[B.ciStatus]??2);break}case"reviewScore":{const pe=ae.reviewScore??-1,ve=B.reviewScore??-1;de=pe-ve;break}}return b==="asc"?de:-de}),[K,g,b]),X=H=>{g===H?p(b==="asc"?"desc":"asc"):(w(H),p("desc"))},J=H=>g!==H?s.jsx(Nb,{className:"h-3 w-3 text-slate-600"}):b==="asc"?s.jsx(jb,{className:"h-3 w-3 text-indigo-400"}):s.jsx(pb,{className:"h-3 w-3 text-indigo-400"});if(E)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(T)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Qn,{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:T.message}),s.jsx(Ve,{onClick:()=>C(),children:"Retry"})]});const $=async()=>{o(!0);try{const H=await wg();j({title:"Reviewer Started",message:H.pid?`Started with PID ${H.pid}`:"Reviewer started",type:"success"})}catch(H){j({title:"Reviewer Failed",message:H instanceof Error?H.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(Ve,{size:"sm",onClick:$,disabled:d,children:[s.jsx(iu,{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:()=>X("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),J("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:()=>X("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),J("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:()=>X("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),J("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:()=>X("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),J("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:[oe.map(H=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>u(l===H.number?null:H.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:["#",H.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:H.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:H.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:le(H.ciStatus),children:[I(H.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:H.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:H.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:te(H.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${H.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${H.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${H.reviewScore>=70?"text-green-500":"text-red-500"}`,children:H.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:H.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:ae=>ae.stopPropagation(),children:s.jsx(og,{className:"h-4 w-4"})})})]},H.number)),oe.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:ne.length===0?"No open PRs found.":`No PRs match the "${x}" filter.`})})]})]})}),l&&s.jsx(Le,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const H=ne.find(ae=>ae.number===l);return H?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:H.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:H.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:le(H.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:[I(H.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:H.ciStatus})]})]}),H.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:te(H.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${H.reviewScore>=70?"text-green-500":"text-red-500"}`,children:H.reviewScore})]})]})]}):null})()})]})},Xt=Ke.forwardRef(({className:l="",label:u,checked:d,onChange:o,...x},m)=>{const g=w=>{o&&o(w.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:g,...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})]})});Xt.displayName="Switch";const N2=()=>{const{addToast:l,selectedProjectId:u,globalModeLoading:d}=la(),[o,x]=V.useState(!1),[m,g]=V.useState(!1),{data:w,loading:b,error:p,refetch:j}=$a(e2,[u],{enabled:!d});V.useEffect(()=>{if(!(w!=null&&w.enabled))return;const I=setInterval(()=>{j()},1e4);return()=>clearInterval(I)},[w==null?void 0:w.enabled,j]);const M=async I=>{g(!0);try{await Eg(I),l({title:I?"Scanner Enabled":"Scanner Disabled",message:I?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:I?"success":"info"}),j()}catch(le){l({title:"Toggle Failed",message:le instanceof Error?le.message:"Failed to toggle scanner",type:"error"})}finally{g(!1)}},_=async()=>{x(!0);try{const I=await t2();I.created.length>0?l({title:"Scan Complete",message:`Created ${I.created.length} PRD(s): ${I.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),I.errors.length>0&&l({title:"Scan Errors",message:I.errors.join("; "),type:"warning"}),j()}catch(I){l({title:"Scan Failed",message:I instanceof Error?I.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(Qn,{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(Ve,{onClick:()=>j(),children:"Retry"})]});if(!w)return null;if(w.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(Le,{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(fg,{className:"h-10 w-10 text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),s.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",s.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const A=w.totalItems>0?Math.round(w.processedItems/w.totalItems*100):0,E=j2(w.status),T=M2(w.items),C=w.lastScan?E2(w.lastScan):"Never",ne=w.autoScanInterval?Math.round(w.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(Xt,{label:w.enabled?"Enabled":"Disabled",checked:w.enabled,onChange:M,disabled:m}),s.jsxs(Ve,{onClick:_,loading:o,disabled:!w.enabled||w.status==="complete",children:[s.jsx(Gn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(Le,{className:`p-6 border-2 ${E.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(E.icon,{className:`h-8 w-8 ${E.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 ${E.textColor}`,children:E.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})]}),w.enabled&&w.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",ne," min"]})]}),w.enabled&&w.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(Le,{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:[w.processedItems," / ",w.totalItems," items (",A,"%)"]})]}),s.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${A===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${A}%`}})})]}),Object.entries(T).map(([I,le])=>s.jsxs(Le,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:I}),s.jsx("div",{className:"space-y-2",children:le.map(te=>s.jsx(w2,{item:te},te.hash))})]},I))]})};function w2({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(f1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(su,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Jb,{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(Fc,{variant:"neutral",children:"Skipped"}):d?s.jsx(Fc,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(Fc,{variant:"warning",children:"Pending"})})]})}function j2(l){switch(l){case"complete":return{label:"Complete",icon:su,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Wc,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:Gn,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Qn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Qn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function M2(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 T2=({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 Ms={},Ta={},Vi={},Es={},yf={},mx;function C2(){return mx||(mx=1,Object.defineProperty(yf,"__esModule",{value:!0})),yf}var Bi={},Yi={},xx;function As(){var u,d,o,x,m,Cg,w;if(xx)return Yi;xx=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.CronField=void 0;let l=(w=class{constructor(p,j={rawValue:""}){et(this,m);et(this,u,!1);et(this,d,!1);et(this,o,!1);et(this,x,[]);$0(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={...j,rawValue:j.rawValue??""},Te(this,x,p.sort(w.sorter)),Te(this,o,this.options.wildcard!==void 0?this.options.wildcard:Me(this,m,Cg).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 P(this,u)}get hasQuestionMarkChar(){return P(this,d)}get isWildcard(){return P(this,o)}get values(){return P(this,x)}static sorter(p,j){const M=typeof p=="number",_=typeof j=="number";return M&&_?p-j:!M&&!_?p.localeCompare(j):M?-1:1}static findNearestValueInList(p,j,M=!1){if(M){for(let _=p.length-1;_>=0;_--)if(p[_]<j)return p[_];return null}for(let _=0;_<p.length;_++)if(p[_]>j)return p[_];return null}findNearestValue(p,j=!1){return this.constructor.findNearestValueInList(this.values,p,j)}serialize(){return{wildcard:P(this,o),values:P(this,x)}}validate(){let p;const j=this.chars.length>0?` or chars ${this.chars.join("")}`:"",M=T=>C=>new RegExp(`^\\d{0,2}${C}$`).test(T),_=T=>(p=T,typeof T=="number"?T>=this.min&&T<=this.max:this.chars.some(M(T)));if(!P(this,x).every(_))throw new Error(`${this.constructor.name} Validation error, got value ${p} expected range ${this.min}-${this.max}${j}`);const E=P(this,x).find((T,C)=>P(this,x).indexOf(T)!==C);if(E)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${E}`)}},u=new WeakMap,d=new WeakMap,o=new WeakMap,x=new WeakMap,m=new WeakSet,Cg=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(p,j)=>j+this.min).every(p=>P(this,x).includes(p))},w);return Yi.CronField=l,Yi}var gx;function O2(){if(gx)return Bi;gx=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(g,w){super(g,w),this.validate()}get values(){return super.values}};return Bi.CronDayOfMonth=x,Bi}var $i={},yx;function D2(){if(yx)return $i;yx=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(g,w){super(g,w),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return $i.CronDayOfWeek=x,$i}var Gi={},vx;function R2(){if(vx)return Gi;vx=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(g,w){super(g,w),this.validate()}get values(){return super.values}};return Gi.CronHour=x,Gi}var Fi={},px;function _2(){if(px)return Fi;px=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.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(g,w){super(g,w),this.validate()}get values(){return super.values}};return Fi.CronMinute=x,Fi}var Zi={},vf={},ya={},bx;function A2(){if(bx)return ya;bx=1,Object.defineProperty(ya,"__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 g extends l{}class w extends l{constructor(){super("Zone is an abstract class")}}const b="numeric",p="short",j="long",M={year:b,month:b,day:b},_={year:b,month:p,day:b},A={year:b,month:p,day:b,weekday:p},E={year:b,month:j,day:b},T={year:b,month:j,day:b,weekday:j},C={hour:b,minute:b},ne={hour:b,minute:b,second:b},I={hour:b,minute:b,second:b,timeZoneName:p},le={hour:b,minute:b,second:b,timeZoneName:j},te={hour:b,minute:b,hourCycle:"h23"},K={hour:b,minute:b,second:b,hourCycle:"h23"},oe={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:p},X={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:j},J={year:b,month:b,day:b,hour:b,minute:b},$={year:b,month:b,day:b,hour:b,minute:b,second:b},H={year:b,month:p,day:b,hour:b,minute:b},ae={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:j,day:b,hour:b,minute:b,timeZoneName:p},pe={year:b,month:j,day:b,hour:b,minute:b,second:b,timeZoneName:p},ve={year:b,month:j,day:b,weekday:j,hour:b,minute:b,timeZoneName:j},G={year:b,month:j,day:b,weekday:j,hour:b,minute:b,second:b,timeZoneName:j};class re{get type(){throw new w}get name(){throw new w}get ianaName(){return this.name}get isUniversal(){throw new w}offsetName(r,f){throw new w}formatOffset(r,f){throw new w}offset(r){throw new w}equals(r){throw new w}get isValid(){throw new w}}let xe=null;class Ne extends re{static get instance(){return xe===null&&(xe=new Ne),xe}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(r,{format:f,locale:v}){return Nn(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 U=new Map;function O(h){let r=U.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"}),U.set(h,r)),r}const Q={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,D,k,z,q,fe,be]=v;return[k,S,D,z,q,fe,be]}function ye(h,r){const f=h.formatToParts(r),v=[];for(let S=0;S<f.length;S++){const{type:D,value:k}=f[S],z=Q[D];D==="era"?v[z]=k:Oe(z)||(v[z]=parseInt(k,10))}return v}const he=new Map;class me extends re{static create(r){let f=he.get(r);return f===void 0&&he.set(r,f=new me(r)),f}static resetCache(){he.clear(),U.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=me.isValidZone(r)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(r,{format:f,locale:v}){return Nn(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=O(this.name);let[S,D,k,z,q,fe,be]=v.formatToParts?ye(v,f):ce(v,f);z==="BC"&&(S=-Math.abs(S)+1);const Ze=$t({year:S,month:D,day:k,hour:q===24?0:q,minute:fe,second:be,millisecond:0});let De=+f;const yt=De%1e3;return De-=yt>=0?yt:1e3+yt,(Ze-De)/(60*1e3)}equals(r){return r.type==="iana"&&r.name===this.name}get isValid(){return this.valid}}let we={};function Be(h,r={}){const f=JSON.stringify([h,r]);let v=we[f];return v||(v=new Intl.ListFormat(h,r),we[f]=v),v}const qe=new Map;function sa(h,r={}){const f=JSON.stringify([h,r]);let v=qe.get(f);return v===void 0&&(v=new Intl.DateTimeFormat(h,r),qe.set(f,v)),v}const pa=new Map;function Bl(h,r={}){const f=JSON.stringify([h,r]);let v=pa.get(f);return v===void 0&&(v=new Intl.NumberFormat(h,r),pa.set(f,v)),v}const Xn=new Map;function Ga(h,r={}){const{base:f,...v}=r,S=JSON.stringify([h,v]);let D=Xn.get(S);return D===void 0&&(D=new Intl.RelativeTimeFormat(h,r),Xn.set(S,D)),D}let Fa=null;function Jn(){return Fa||(Fa=new Intl.DateTimeFormat().resolvedOptions().locale,Fa)}const In=new Map;function Kn(h){let r=In.get(h);return r===void 0&&(r=new Intl.DateTimeFormat(h).resolvedOptions(),In.set(h,r)),r}const sn=new Map;function Pn(h){let r=sn.get(h);if(!r){const f=new Intl.Locale(h);r="getWeekInfo"in f?f.getWeekInfo():f.weekInfo,"minimalDays"in r||(r={...Yl,...r}),sn.set(h,r)}return r}function el(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=sa(h).resolvedOptions(),S=h}catch{const q=h.substring(0,f);v=sa(q).resolvedOptions(),S=q}const{numberingSystem:D,calendar:k}=v;return[S,D,k]}}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=Ee.utc(2009,f,1);r.push(h(v))}return r}function zt(h){const r=[];for(let f=1;f<=7;f++){const v=Ee.utc(2016,11,13+f);r.push(h(v))}return r}function ge(h,r,f,v){const S=h.listingMode();return S==="error"?null:S==="en"?f(r):v(r)}function Ue(h){return h.numberingSystem&&h.numberingSystem!=="latn"?!1:h.numberingSystem==="latn"||!h.locale||h.locale.startsWith("en")||Kn(h.locale).numberingSystem==="latn"}class Ut{constructor(r,f,v){this.padTo=v.padTo||0,this.floor=v.floor||!1;const{padTo:S,floor:D,...k}=v;if(!f||Object.keys(k).length>0){const z={useGrouping:!1,...v};v.padTo>0&&(z.minimumIntegerDigits=v.padTo),this.inf=Bl(r,z)}}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):Zl(r,3);return tt(f,this.padTo)}}}class rn{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 k=-1*(r.offset/60),z=k>=0?`Etc/GMT+${k}`:`Etc/GMT${k}`;r.offset!==0&&me.create(z).valid?(S=z,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 D={...this.opts};D.timeZone=D.timeZone||S,this.dtf=sa(f,D)}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=Ga(r,v))}format(r,f){return this.rtf?this.rtf.format(r,f):dn(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,D=!1){const k=r||ot.defaultLocale,z=k||(D?"en-US":Jn()),q=f||ot.defaultNumberingSystem,fe=v||ot.defaultOutputCalendar,be=Vr(S)||ot.defaultWeekSettings;return new Ye(z,q,fe,be,k)}static resetCache(){Fa=null,qe.clear(),pa.clear(),Xn.clear(),In.clear(),sn.clear()}static fromObject({locale:r,numberingSystem:f,outputCalendar:v,weekSettings:S}={}){return Ye.create(r,f,v,S)}constructor(r,f,v,S,D){const[k,z,q]=el(r);this.locale=k,this.numberingSystem=f||z||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=D,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ue(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 ge(this,r,pu,()=>{const v=this.intl==="ja"||this.intl.startsWith("ja-");f&=!v;const S=f?{month:r,day:"numeric"}:{month:r},D=f?"format":"standalone";if(!this.monthsCache[D][r]){const k=v?z=>this.dtFormatter(z,S).format():z=>this.extract(z,S,"month");this.monthsCache[D][r]=zs(k)}return this.monthsCache[D][r]})}weekdays(r,f=!1){return ge(this,r,Zs,()=>{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]=zt(D=>this.extract(D,v,"weekday"))),this.weekdaysCache[S][r]})}meridiems(){return ge(this,void 0,()=>wn,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ee.utc(2016,11,13,9),Ee.utc(2016,11,13,19)].map(f=>this.extract(f,r,"dayperiod"))}return this.meridiemCache})}eras(r){return ge(this,r,Fr,()=>{const f={era:r};return this.eraCache[r]||(this.eraCache[r]=[Ee.utc(-40,1,1),Ee.utc(2017,1,1)].map(v=>this.extract(v,f,"era"))),this.eraCache[r]})}extract(r,f,v){const S=this.dtFormatter(r,f),D=S.formatToParts(),k=D.find(z=>z.type.toLowerCase()===v);return k?k.value:null}numberFormatter(r={}){return new Ut(this.intl,r.forceSimple||this.fastNumbers,r)}dtFormatter(r,f={}){return new rn(r,this.intl,f)}relFormatter(r={}){return new Us(this.intl,this.isEnglish(),r)}listFormatter(r={}){return Be(this.intl,r)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Kn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:cn()?Pn(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 vt extends re{static get utcInstance(){return zr===null&&(zr=new vt(0)),zr}static instance(r){return r===0?vt.utcInstance:new vt(r)}static parseSpecifier(r){if(r){const f=r.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(f)return new vt(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 Jt 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 Vt(h,r){if(Oe(h)||h===null)return r;if(h instanceof re)return h;if(Tt(h)){const f=h.toLowerCase();return f==="default"?r:f==="local"||f==="system"?Ne.instance:f==="utc"||f==="gmt"?vt.utcInstance:vt.parseSpecifier(f)||me.create(h)}else return ia(h)?vt.instance(h):typeof h=="object"&&"offset"in h&&typeof h.offset=="function"?h:new Jt(h)}const Bt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},cu={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]},to=Bt.hanidec.replace(/[\[|\]]/g,"").split("");function ao(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(Bt.hanidec)!==-1)r+=to.indexOf(h[f]);else for(const S in cu){const[D,k]=cu[S];v>=D&&v<=k&&(r+=v-D)}}return parseInt(r,10)}else return r}const tl=new Map;function Hs(){tl.clear()}function It({numberingSystem:h},r=""){const f=h||"latn";let v=tl.get(f);v===void 0&&(v=new Map,tl.set(f,v));let S=v.get(r);return S===void 0&&(S=new RegExp(`${Bt[f]}${r}`),v.set(r,S)),S}let un=()=>Date.now(),$l="system",al=null,ou=null,Ur=null,Ls=60,nl,du=null;class ot{static get now(){return un}static set now(r){un=r}static set defaultZone(r){$l=r}static get defaultZone(){return Vt($l,Ne.instance)}static get defaultLocale(){return al}static set defaultLocale(r){al=r}static get defaultNumberingSystem(){return ou}static set defaultNumberingSystem(r){ou=r}static get defaultOutputCalendar(){return Ur}static set defaultOutputCalendar(r){Ur=r}static get defaultWeekSettings(){return du}static set defaultWeekSettings(r){du=Vr(r)}static get twoDigitCutoffYear(){return Ls}static set twoDigitCutoffYear(r){Ls=r%100}static get throwOnInvalid(){return nl}static set throwOnInvalid(r){nl=r}static resetCaches(){Ye.resetCache(),me.resetCache(),Ee.resetCache(),Hs()}}class ra{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 Kt(h,r){return new ra("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+(sl(h)?qs:Hr)[r-1]}function Za(h,r){const f=sl(h)?qs:Hr,v=f.findIndex(D=>D<r),S=r-f[v];return{month:v+1,day:S}}function St(h,r){return(h-r+7)%7+1}function _t(h,r=4,f=1){const{year:v,month:S,day:D}=h,k=Lr(v,S,D),z=St(Vs(v,S,D),f);let q=Math.floor((k-z+14-r)/7),fe;return q<1?(fe=v-1,q=rl(fe,r,f)):q>rl(v,r,f)?(fe=v+1,q=1):fe=v,{weekYear:fe,weekNumber:q,weekday:z,...Jl(h)}}function pn(h,r=4,f=1){const{weekYear:v,weekNumber:S,weekday:D}=h,k=St(Vs(v,1,r),f),z=Wa(v);let q=S*7+D-k-7+r,fe;q<1?(fe=v-1,q+=Wa(fe)):q>z?(fe=v+1,q-=Wa(v)):fe=v;const{month:be,day:Ae}=Za(fe,q);return{year:fe,month:be,day:Ae,...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 fu(h){const{year:r,ordinal:f}=h,{month:v,day:S}=Za(r,f);return{year:r,month:v,day:S,...Jl(h)}}function hu(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 mu(h,r=4,f=1){const v=Qa(h.weekYear),S=Yt(h.weekNumber,1,rl(h.weekYear,r,f)),D=Yt(h.weekday,1,7);return v?S?D?!1:Kt("weekday",h.weekday):Kt("week",h.weekNumber):Kt("weekYear",h.weekYear)}function Fl(h){const r=Qa(h.year),f=Yt(h.ordinal,1,Wa(h.year));return r?f?!1:Kt("ordinal",h.ordinal):Kt("year",h.year)}function Bs(h){const r=Qa(h.year),f=Yt(h.month,1,12),v=Yt(h.day,1,$s(h.year,h.month));return r?f?v?!1:Kt("day",h.day):Kt("month",h.month):Kt("year",h.year)}function bn(h){const{hour:r,minute:f,second:v,millisecond:S}=h,D=Yt(r,0,23)||r===24&&f===0&&v===0&&S===0,k=Yt(f,0,59),z=Yt(v,0,59),q=Yt(S,0,999);return D?k?z?q?!1:Kt("millisecond",S):Kt("second",v):Kt("minute",f):Kt("hour",r)}function Oe(h){return typeof h>"u"}function ia(h){return typeof h=="number"}function Qa(h){return typeof h=="number"&&h%1===0}function Tt(h){return typeof h=="string"}function xu(h){return Object.prototype.toString.call(h)==="[object Date]"}function qr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function cn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ll(h){return Array.isArray(h)?h:[h]}function gu(h,r,f){if(h.length!==0)return h.reduce((v,S)=>{const D=[r(S),S];return v&&f(v[0],D[0])===v[0]?v:D},null)[1]}function yu(h,r){return r.reduce((f,v)=>(f[v]=h[v],f),{})}function Sn(h,r){return Object.prototype.hasOwnProperty.call(h,r)}function Vr(h){if(h==null)return null;if(typeof h!="object")throw new g("Week settings must be an object");if(!Yt(h.firstDay,1,7)||!Yt(h.minimalDays,1,7)||!Array.isArray(h.weekend)||h.weekend.some(r=>!Yt(r,1,7)))throw new g("Invalid week settings");return{firstDay:h.firstDay,minimalDays:h.minimalDays,weekend:Array.from(h.weekend)}}function Yt(h,r,f){return Qa(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 Nt(h){if(!(Oe(h)||h===null||h===""))return parseInt(h,10)}function on(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 Zl(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 sl(h){return h%4===0&&(h%100!==0||h%400===0)}function Wa(h){return sl(h)?366:365}function $s(h,r){const f=Ys(r-1,12)+1,v=h+(r-f)/12;return f===2?sl(v)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][f-1]}function $t(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-St(Vs(h,1,r),f)+r-1}function rl(h,r=4,f=1){const v=Gs(h,r,f),S=Gs(h+1,r,f);return(Wa(h)-v+S)/7}function Ql(h){return h>99?h:h>ot.twoDigitCutoffYear?1900+h:2e3+h}function Nn(h,r,f,v=null){const S=new Date(h),D={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};v&&(D.timeZone=v);const k={timeZoneName:r,...D},z=new Intl.DateTimeFormat(f,k).formatToParts(S).find(q=>q.type.toLowerCase()==="timezonename");return z?z.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 g(`Invalid unit value ${h}`);return r}function Xa(h,r){const f={};for(const v in h)if(Sn(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 yu(h,["hour","minute","second","millisecond"])}const vu=["January","February","March","April","May","June","July","August","September","October","November","December"],Fs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],no=["J","F","M","A","M","J","J","A","S","O","N","D"];function pu(h){switch(h){case"narrow":return[...no];case"short":return[...Fs];case"long":return[...vu];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"],Da=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$r=["M","T","W","T","F","S","S"];function Zs(h){switch(h){case"narrow":return[...$r];case"short":return[...Da];case"long":return[...Il];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const wn=["AM","PM"],il=["Before Christ","Anno Domini"],bu=["BC","AD"],Gr=["B","A"];function Fr(h){switch(h){case"narrow":return[...Gr];case"short":return[...bu];case"long":return[...il];default:return null}}function Kl(h){return wn[h.hour<12?0:1]}function Ja(h,r){return Zs(r)[h.weekday-1]}function Zr(h,r){return pu(r)[h.month-1]}function Pl(h,r){return Fr(r)[h.year<0?0:1]}function dn(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."]},D=["hours","minutes","seconds"].indexOf(h)===-1;if(f==="auto"&&D){const Ae=h==="days";switch(r){case 1:return Ae?"tomorrow":`next ${S[h][0]}`;case-1:return Ae?"yesterday":`last ${S[h][0]}`;case 0:return Ae?"today":`this ${S[h][0]}`}}const k=Object.is(r,-0)||r<0,z=Math.abs(r),q=z===1,fe=S[h],be=v?q?fe[1]:fe[2]||fe[1]:q?S[h][0]:h;return k?`${z} ${be} ago`:`in ${z} ${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:M,DD:_,DDD:E,DDDD:T,t:C,tt:ne,ttt:I,tttt:le,T:te,TT:K,TTT:oe,TTTT:X,f:J,ff:H,fff:de,ffff:ve,F:$,FF:ae,FFF:pe,FFFF:G};class At{static create(r,f={}){return new At(r,f)}static parseFormat(r){let f=null,v="",S=!1;const D=[];for(let k=0;k<r.length;k++){const z=r.charAt(k);z==="'"?((v.length>0||S)&&D.push({literal:S||/^\s+$/.test(v),val:v===""?"'":v}),f=null,v="",S=!S):S||z===f?v+=z:(v.length>0&&D.push({literal:/^\s+$/.test(v),val:v}),v=z,f=z)}return v.length>0&&D.push({literal:S||/^\s+$/.test(v),val:v}),D}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",D=(De,yt)=>this.loc.extract(r,De,yt),k=De=>r.isOffsetFixed&&r.offset===0&&De.allowZ?"Z":r.isValid?r.zone.formatOffset(r.ts,De.format):"",z=()=>v?Kl(r):D({hour:"numeric",hourCycle:"h12"},"dayperiod"),q=(De,yt)=>v?Zr(r,De):D(yt?{month:De}:{month:De,day:"numeric"},"month"),fe=(De,yt)=>v?Ja(r,De):D(yt?{weekday:De}:{weekday:De,month:"long",day:"numeric"},"weekday"),be=De=>{const yt=At.macroTokenToFormatOpts(De);return yt?this.formatWithSystemDefault(r,yt):De},Ae=De=>v?Pl(r,De):D({era:De},"era"),Ze=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 k({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return k({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return k({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return r.zone.offsetName(r.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return r.zone.offsetName(r.ts,{format:"long",locale:this.loc.locale});case"z":return r.zoneName;case"a":return z();case"d":return S?D({day:"numeric"},"day"):this.num(r.day);case"dd":return S?D({day:"2-digit"},"day"):this.num(r.day,2);case"c":return this.num(r.weekday);case"ccc":return fe("short",!0);case"cccc":return fe("long",!0);case"ccccc":return fe("narrow",!0);case"E":return this.num(r.weekday);case"EEE":return fe("short",!1);case"EEEE":return fe("long",!1);case"EEEEE":return fe("narrow",!1);case"L":return S?D({month:"numeric",day:"numeric"},"month"):this.num(r.month);case"LL":return S?D({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?D({month:"numeric"},"month"):this.num(r.month);case"MM":return S?D({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?D({year:"numeric"},"year"):this.num(r.year);case"yy":return S?D({year:"2-digit"},"year"):this.num(r.year.toString().slice(-2),2);case"yyyy":return S?D({year:"numeric"},"year"):this.num(r.year,4);case"yyyyyy":return S?D({year:"numeric"},"year"):this.num(r.year,6);case"G":return Ae("short");case"GG":return Ae("long");case"GGGGG":return Ae("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(At.parseFormat(f),Ze)}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}},D=(be,Ae)=>Ze=>{const De=S(Ze);if(De){const yt=Ae.isNegativeDuration&&De!==Ae.largestUnit?v:1;let Ht;return this.opts.signMode==="negativeLargestOnly"&&De!==Ae.largestUnit?Ht="never":this.opts.signMode==="all"?Ht="always":Ht="auto",this.num(be.get(De)*yt,Ze.length,Ht)}else return Ze},k=At.parseFormat(f),z=k.reduce((be,{literal:Ae,val:Ze})=>Ae?be:be.concat(Ze),[]),q=r.shiftTo(...z.map(S).filter(be=>be)),fe={isNegativeDuration:q<0,largestUnit:Object.keys(q.values)[0]};return Qs(k,D(q,fe))}}const es=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ia(...h){const r=h.reduce((f,v)=>f+v.source,"");return RegExp(`^${r}$`)}function jn(...h){return r=>h.reduce(([f,v,S],D)=>{const[k,z,q]=D(r,S);return[{...f,...k},z||v,q]},[{},null,1]).slice(0,2)}function wt(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 fn(...h){return(r,f)=>{const v={};let S;for(S=0;S<h.length;S++)v[h[S]]=Nt(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))?/,Su=/(\d{4})-?(\d{3})/,lo=fn("weekYear","weekNumber","weekDay"),so=fn("year","ordinal"),ro=/(\d{4})-(\d\d)-(\d\d)/,Is=RegExp(`${Qr.source} ?(?:${ts.source}|(${es.source}))?`),io=RegExp(`(?: ${Is.source})?`);function ul(h,r,f){const v=h[r];return Oe(v)?f:Nt(v)}function uo(h,r){return[{year:ul(h,r),month:ul(h,r+1,1),day:ul(h,r+2,1)},null,r+3]}function cl(h,r){return[{hours:ul(h,r,0),minutes:ul(h,r+1,0),seconds:ul(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:vt.instance(v);return[{},S,r+3]}function ol(h,r){const f=h[r]?me.create(h[r]):null;return[{},f,r+1]}const co=RegExp(`^T?${Qr.source}$`),oo=/^-?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 fo(h){const[r,f,v,S,D,k,z,q,fe]=h,be=r[0]==="-",Ae=q&&q[0]==="-",Ze=(De,yt=!1)=>De!==void 0&&(yt||De&&be)?-De:De;return[{years:Ze(on(f)),months:Ze(on(v)),weeks:Ze(on(S)),days:Ze(on(D)),hours:Ze(on(k)),minutes:Ze(on(z)),seconds:Ze(on(q),q==="-0"),milliseconds:Ze(Br(fe),Ae)}]}const ho={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,D,k){const z={year:r.length===2?Ql(Nt(r)):Nt(r),month:Fs.indexOf(f)+1,day:Nt(v),hour:Nt(S),minute:Nt(D)};return k&&(z.second=Nt(k)),h&&(z.weekday=h.length>3?Il.indexOf(h)+1:Da.indexOf(h)+1),z}const mo=/^(?:(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 xo(h){const[,r,f,v,S,D,k,z,q,fe,be,Ae]=h,Ze=rs(r,S,v,f,D,k,z);let De;return q?De=ho[q]:fe?De=0:De=Wl(be,Ae),[Ze,new vt(De)]}function go(h){return h.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Nu=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,yo=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,vo=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function wu(h){const[,r,f,v,S,D,k,z]=h;return[rs(r,S,v,f,D,k,z),vt.utcInstance]}function po(h){const[,r,f,v,S,D,k,z]=h;return[rs(r,z,f,v,S,D,k),vt.utcInstance]}const bo=Ia(ls,ns),So=Ia(Js,ns),No=Ia(Su,ns),wo=Ia(Xs),ju=jn(uo,cl,ss,ol),Wr=jn(lo,cl,ss,ol),is=jn(so,cl,ss,ol),jo=jn(cl,ss,ol);function Mu(h){return wt(h,[bo,ju],[So,Wr],[No,is],[wo,jo])}function Eu(h){return wt(go(h),[mo,xo])}function Tu(h){return wt(h,[Nu,wu],[yo,wu],[vo,po])}function Cu(h){return wt(h,[oo,fo])}const Ou=jn(cl);function dl(h){return wt(h,[co,Ou])}const Mo=Ia(ro,io),Eo=Ia(Is),To=jn(cl,ss,ol);function Du(h){return wt(h,[Mo,ju],[Eo,To])}const Xr="Invalid Duration",fl={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},...fl},ua=146097/400,Ka=146097/4800,Ru={years:{quarters:4,months:12,weeks:ua/7,days:ua,hours:ua*24,minutes:ua*24*60,seconds:ua*24*60*60,milliseconds:ua*24*60*60*1e3},quarters:{months:3,weeks:ua/28,days:ua/4,hours:ua*24/4,minutes:ua*24*60/4,seconds:ua*24*60*60/4,milliseconds:ua*24*60*60*1e3/4},months:{weeks:Ka/7,days:Ka,hours:Ka*24,minutes:Ka*24*60,seconds:Ka*24*60*60,milliseconds:Ka*24*60*60*1e3},...fl},hn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Jr=hn.slice(0).reverse();function ba(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 Fe(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;hn.reduceRight((v,S)=>{if(Oe(r[S]))return v;if(v){const D=r[v]*f,k=h[S][v],z=Math.floor(D/k);r[S]+=z*f,r[v]-=z*k*f}return S},null),hn.reduce((v,S)=>{if(Oe(r[S]))return v;if(v){const D=r[v]%1;r[v]-=D,r[S]+=D*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 Fe{constructor(r){const f=r.conversionAccuracy==="longterm"||!1;let v=f?Ru: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 Fe.fromObject({milliseconds:r},f)}static fromObject(r,f={}){if(r==null||typeof r!="object")throw new g(`Duration.fromObject: argument expected to be an object, got ${r===null?"null":typeof r}`);return new Fe({values:Xa(r,Fe.normalizeUnit),loc:Ye.fromObject(f),conversionAccuracy:f.conversionAccuracy,matrix:f.matrix})}static fromDurationLike(r){if(ia(r))return Fe.fromMillis(r);if(Fe.isDuration(r))return r;if(typeof r=="object")return Fe.fromObject(r);throw new g(`Unknown duration argument ${r} of type ${typeof r}`)}static fromISO(r,f){const[v]=Cu(r);return v?Fe.fromObject(v,f):Fe.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static fromISOTime(r,f){const[v]=dl(r);return v?Fe.fromObject(v,f):Fe.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static invalid(r,f=null){if(!r)throw new g("need to specify a reason the Duration is invalid");const v=r instanceof ra?r:new ra(r,f);if(ot.throwOnInvalid)throw new o(v);return new Fe({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?At.create(this.loc,v).formatDurationFromString(this,r):Xr}toHuman(r={}){if(!this.isValid)return Xr;const f=r.showZeros!==!1,v=hn.map(S=>{const D=this.values[S];return Oe(D)||D===0&&!f?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...r,unit:S.slice(0,-1)}).format(D)}).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+=Zl(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},Ee.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=Fe.fromDurationLike(r),v={};for(const S of hn)(Sn(f.values,S)||Sn(this.values,S))&&(v[S]=f.get(S)+this.get(S));return ba(this,{values:v},!0)}minus(r){if(!this.isValid)return this;const f=Fe.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 ba(this,{values:f},!0)}get(r){return this[Fe.normalizeUnit(r)]}set(r){if(!this.isValid)return this;const f={...this.values,...Xa(r,Fe.normalizeUnit)};return ba(this,{values:f})}reconfigure({locale:r,numberingSystem:f,conversionAccuracy:v,matrix:S}={}){const k={loc:this.loc.clone({locale:r,numberingSystem:f}),matrix:S,conversionAccuracy:v};return ba(this,k)}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),ba(this,{values:r},!0)}rescale(){if(!this.isValid)return this;const r=Pr(this.normalize().shiftToAll().toObject());return ba(this,{values:r},!0)}shiftTo(...r){if(!this.isValid)return this;if(r.length===0)return this;r=r.map(k=>Fe.normalizeUnit(k));const f={},v={},S=this.toObject();let D;for(const k of hn)if(r.indexOf(k)>=0){D=k;let z=0;for(const fe in v)z+=this.matrix[fe][k]*v[fe],v[fe]=0;ia(S[k])&&(z+=S[k]);const q=Math.trunc(z);f[k]=q,v[k]=(z*1e3-q*1e3)/1e3}else ia(S[k])&&(v[k]=S[k]);for(const k in v)v[k]!==0&&(f[D]+=k===D?v[k]:v[k]/this.matrix[D][k]);return Kr(this.matrix,f),ba(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 ba(this,{values:r},!0)}removeZeros(){if(!this.isValid)return this;const r=Pr(this.values);return ba(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 hn)if(!f(this.values[v],r.values[v]))return!1;return!0}}const hl="Invalid Interval";function Co(h,r){return!h||!h.isValid?ft.invalid("missing or invalid start"):!r||!r.isValid?ft.invalid("missing or invalid end"):r<h?ft.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 ft{constructor(r){this.s=r.start,this.e=r.end,this.invalid=r.invalid||null,this.isLuxonInterval=!0}static invalid(r,f=null){if(!r)throw new g("need to specify a reason the Interval is invalid");const v=r instanceof ra?r:new ra(r,f);if(ot.throwOnInvalid)throw new d(v);return new ft({invalid:v})}static fromDateTimes(r,f){const v=da(r),S=da(f),D=Co(v,S);return D??new ft({start:v,end:S})}static after(r,f){const v=Fe.fromDurationLike(f),S=da(r);return ft.fromDateTimes(S,S.plus(v))}static before(r,f){const v=Fe.fromDurationLike(f),S=da(r);return ft.fromDateTimes(S.minus(v),S)}static fromISO(r,f){const[v,S]=(r||"").split("/",2);if(v&&S){let D,k;try{D=Ee.fromISO(v,f),k=D.isValid}catch{k=!1}let z,q;try{z=Ee.fromISO(S,f),q=z.isValid}catch{q=!1}if(k&&q)return ft.fromDateTimes(D,z);if(k){const fe=Fe.fromISO(S,f);if(fe.isValid)return ft.after(D,fe)}else if(q){const fe=Fe.fromISO(v,f);if(fe.isValid)return ft.before(z,fe)}}return ft.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?ft.fromDateTimes(r||this.s,f||this.e):this}splitAt(...r){if(!this.isValid)return[];const f=r.map(da).filter(k=>this.contains(k)).sort((k,z)=>k.toMillis()-z.toMillis()),v=[];let{s:S}=this,D=0;for(;S<this.e;){const k=f[D]||this.e,z=+k>+this.e?this.e:k;v.push(ft.fromDateTimes(S,z)),S=z,D+=1}return v}splitBy(r){const f=Fe.fromDurationLike(r);if(!this.isValid||!f.isValid||f.as("milliseconds")===0)return[];let{s:v}=this,S=1,D;const k=[];for(;v<this.e;){const z=this.start.plus(f.mapUnits(q=>q*S));D=+z>+this.e?this.e:z,k.push(ft.fromDateTimes(v,D)),v=D,S+=1}return k}divideEqually(r){return this.isValid?this.splitBy(this.length()/r).slice(0,r):[]}overlaps(r){return this.e>r.s&&this.s<r.e}abutsStart(r){return this.isValid?+this.e==+r.s:!1}abutsEnd(r){return this.isValid?+r.e==+this.s:!1}engulfs(r){return this.isValid?this.s<=r.s&&this.e>=r.e:!1}equals(r){return!this.isValid||!r.isValid?!1:this.s.equals(r.s)&&this.e.equals(r.e)}intersection(r){if(!this.isValid)return this;const f=this.s>r.s?this.s:r.s,v=this.e<r.e?this.e:r.e;return f>=v?null:ft.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 ft.fromDateTimes(f,v)}static merge(r){const[f,v]=r.sort((S,D)=>S.s-D.s).reduce(([S,D],k)=>D?D.overlaps(k)||D.abutsStart(k)?[S,D.union(k)]:[S.concat([D]),k]:[S,k],[[],null]);return v&&f.push(v),f}static xor(r){let f=null,v=0;const S=[],D=r.map(q=>[{time:q.s,type:"s"},{time:q.e,type:"e"}]),k=Array.prototype.concat(...D),z=k.sort((q,fe)=>q.time-fe.time);for(const q of z)v+=q.type==="s"?1:-1,v===1?f=q.time:(f&&+f!=+q.time&&S.push(ft.fromDateTimes(f,q.time)),f=null);return ft.merge(S)}difference(...r){return ft.xor([this].concat(r)).map(f=>this.intersection(f)).filter(f=>f&&!f.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:hl}[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=M,f={}){return this.isValid?At.create(this.s.loc.clone(f),r).formatInterval(this):hl}toISO(r){return this.isValid?`${this.s.toISO(r)}/${this.e.toISO(r)}`:hl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:hl}toISOTime(r){return this.isValid?`${this.s.toISOTime(r)}/${this.e.toISOTime(r)}`:hl}toFormat(r,{separator:f=" – "}={}){return this.isValid?`${this.s.toFormat(r)}${f}${this.e.toFormat(r)}`:hl}toDuration(r,f){return this.isValid?this.e.diff(this.s,r,f):Fe.invalid(this.invalidReason)}mapEndpoints(r){return ft.fromDateTimes(r(this.s),r(this.e))}}class cs{static hasDST(r=ot.defaultZone){const f=Ee.now().setZone(r).set({month:12});return!r.isUniversal&&f.offset!==f.set({month:6}).offset}static isValidIANAZone(r){return me.isValidZone(r)}static normalizeZone(r){return Vt(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:D="gregory"}={}){return(S||Ye.create(f,v,D)).months(r)}static monthsFormat(r="long",{locale:f=null,numberingSystem:v=null,locObj:S=null,outputCalendar:D="gregory"}={}){return(S||Ye.create(f,v,D)).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:cn()}}}function Pt(h,r){const f=S=>S.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),v=f(r)-f(h);return Math.floor(Fe.fromMillis(v).as("days"))}function os(h,r,f){const v=[["years",(q,fe)=>fe.year-q.year],["quarters",(q,fe)=>fe.quarter-q.quarter+(fe.year-q.year)*4],["months",(q,fe)=>fe.month-q.month+(fe.year-q.year)*12],["weeks",(q,fe)=>{const be=Pt(q,fe);return(be-be%7)/7}],["days",Pt]],S={},D=h;let k,z;for(const[q,fe]of v)f.indexOf(q)>=0&&(k=q,S[q]=fe(h,r),z=D.plus(S),z>r?(S[q]--,h=D.plus(S),h>r&&(z=h,S[q]--,h=D.plus(S))):h=z);return[h,S,z,k]}function _u(h,r,f,v){let[S,D,k,z]=os(h,r,f);const q=r-S,fe=f.filter(Ae=>["hours","minutes","seconds","milliseconds"].indexOf(Ae)>=0);fe.length===0&&(k<r&&(k=S.plus({[z]:1})),k!==S&&(D[z]=(D[z]||0)+q/(k-S)));const be=Fe.fromObject(D,v);return fe.length>0?Fe.fromMillis(q,v).shiftTo(...fe).plus(be):be}const Au="missing Intl.DateTimeFormat.formatToParts support";function Xe(h,r=f=>f){return{regex:h,deser:([f])=>r(ao(f))}}const Ks="[ ]",ku=new RegExp(Ks,"g");function ml(h){return h.replace(/\./g,"\\.?").replace(ku,Ks)}function Ps(h){return h.replace(/\./g,"").replace(ku," ").toLowerCase()}function Gt(h,r){return h===null?null:{regex:RegExp(h.map(ml).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 Mn(h){return h.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function xl(h,r){const f=It(r),v=It(r,"{2}"),S=It(r,"{3}"),D=It(r,"{4}"),k=It(r,"{6}"),z=It(r,"{1,2}"),q=It(r,"{1,3}"),fe=It(r,"{1,6}"),be=It(r,"{1,9}"),Ae=It(r,"{2,4}"),Ze=It(r,"{4,6}"),De=Lt=>({regex:RegExp(Mn(Lt.val)),deser:([mn])=>mn,literal:!0}),Ht=(Lt=>{if(h.literal)return De(Lt);switch(Lt.val){case"G":return Gt(r.eras("short"),0);case"GG":return Gt(r.eras("long"),0);case"y":return Xe(fe);case"yy":return Xe(Ae,Ql);case"yyyy":return Xe(D);case"yyyyy":return Xe(Ze);case"yyyyyy":return Xe(k);case"M":return Xe(z);case"MM":return Xe(v);case"MMM":return Gt(r.months("short",!0),1);case"MMMM":return Gt(r.months("long",!0),1);case"L":return Xe(z);case"LL":return Xe(v);case"LLL":return Gt(r.months("short",!1),1);case"LLLL":return Gt(r.months("long",!1),1);case"d":return Xe(z);case"dd":return Xe(v);case"o":return Xe(q);case"ooo":return Xe(S);case"HH":return Xe(v);case"H":return Xe(z);case"hh":return Xe(v);case"h":return Xe(z);case"mm":return Xe(v);case"m":return Xe(z);case"q":return Xe(z);case"qq":return Xe(v);case"s":return Xe(z);case"ss":return Xe(v);case"S":return Xe(q);case"SSS":return Xe(S);case"u":return ds(be);case"uu":return ds(z);case"uuu":return Xe(f);case"a":return Gt(r.meridiems(),0);case"kkkk":return Xe(D);case"kk":return Xe(Ae,Ql);case"W":return Xe(z);case"WW":return Xe(v);case"E":case"c":return Xe(f);case"EEE":return Gt(r.weekdays("short",!1),1);case"EEEE":return Gt(r.weekdays("long",!1),1);case"ccc":return Gt(r.weekdays("short",!0),1);case"cccc":return Gt(r.weekdays("long",!0),1);case"Z":case"ZZ":return er(new RegExp(`([+-]${z.source})(?::(${v.source}))?`),2);case"ZZZ":return er(new RegExp(`([+-]${z.source})(${v.source})?`),2);case"z":return ds(/[a-z_+-/]{1,256}?/i);case" ":return ds(/[^\S\n\r]/);default:return De(Lt)}})(h)||{invalidReason:Au};return Ht.token=h,Ht}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 zu(h,r,f){const{type:v,value:S}=h;if(v==="literal"){const q=/^\s+$/.test(S);return{literal:!q,val:q?" ":S}}const D=r[v];let k=v;v==="hour"&&(r.hour12!=null?k=r.hour12?"hour12":"hour24":r.hourCycle!=null?r.hourCycle==="h11"||r.hourCycle==="h12"?k="hour12":k="hour24":k=f.hour12?"hour12":"hour24");let z=ei[k];if(typeof z=="object"&&(z=z[D]),z)return{literal:!1,val:z}}function En(h){return[`^${h.map(f=>f.regex).reduce((f,v)=>`${f}(${v.source})`,"")}$`,h]}function Uu(h,r,f){const v=h.match(r);if(v){const S={};let D=1;for(const k in f)if(Sn(f,k)){const z=f[k],q=z.groups?z.groups+1:1;!z.literal&&z.token&&(S[z.token.val[0]]=z.deser(v.slice(D,D+q))),D+=q}return[v,S]}else return[v,{}]}function Hu(h){const r=D=>{switch(D){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=me.create(h.z)),Oe(h.Z)||(f||(f=new vt(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((D,k)=>{const z=r(k);return z&&(D[z]=h[k]),D},{}),f,v]}let tr=null;function Do(){return tr||(tr=Ee.fromMillis(1555555555555)),tr}function Ro(h,r){if(h.literal)return h;const f=At.macroTokenToFormatOpts(h.val),v=ca(f,r);return v==null||v.includes(void 0)?h:v}function Lu(h,r){return Array.prototype.concat(...h.map(f=>Ro(f,r)))}class ti{constructor(r,f){if(this.locale=r,this.format=f,this.tokens=Lu(At.parseFormat(f),r),this.units=this.tokens.map(v=>xl(v,r)),this.disqualifyingUnit=this.units.find(v=>v.invalidReason),!this.disqualifyingUnit){const[v,S]=En(this.units);this.regex=RegExp(v,"i"),this.handlers=S}}explainFromTokens(r){if(this.isValid){const[f,v]=Uu(r,this.regex,this.handlers),[S,D,k]=v?Hu(v):[null,null,void 0];if(Sn(v,"a")&&Sn(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:D,specificOffset:k}}else return{input:r,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ai(h,r,f){return new ti(h,f).explainFromTokens(r)}function ni(h,r,f){const{result:v,zone:S,specificOffset:D,invalidReason:k}=ai(h,r,f);return[v,S,D,k]}function ca(h,r){if(!h)return null;const v=At.create(r,h).dtFormatter(Do()),S=v.formatToParts(),D=v.resolvedOptions();return S.map(k=>zu(k,h,D))}const gl="Invalid DateTime",aa=864e13;function Ra(h){return new ra("unsupported zone",`the zone "${h.name}" is not supported`)}function fs(h){return h.weekData===null&&(h.weekData=_t(h.c)),h.weekData}function yl(h){return h.localWeekData===null&&(h.localWeekData=_t(h.c,h.loc.getMinDaysInFirstWeek(),h.loc.getStartOfWeek())),h.localWeekData}function _a(h,r){const f={ts:h.ts,zone:h.zone,c:h.c,o:h.o,loc:h.loc,invalid:h.invalid};return new Ee({...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 D=f.offset(v);return S===D?[v,S]:[h-Math.min(S,D)*60*1e3,Math.max(S,D)]}function Aa(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($t(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,D={...h.c,year:v,month:S,day:Math.min(h.c.day,$s(v,S))+Math.trunc(r.days)+Math.trunc(r.weeks)*7},k=Fe.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"),z=$t(D);let[q,fe]=ar(z,f,h.zone);return k!==0&&(q+=k,fe=h.zone.offset(q)),{ts:q,o:fe}}function Sa(h,r,f,v,S,D){const{setZone:k,zone:z}=f;if(h&&Object.keys(h).length!==0||r){const q=r||z,fe=Ee.fromObject(h,{...f,zone:q,specificOffset:D});return k?fe:fe.setZone(z)}else return Ee.invalid(new ra("unparsable",`the input "${S}" can't be parsed as ${v}`))}function nr(h,r,f=!0){return h.isValid?At.create(Ye.create("en-US"),{allowZ:f,forceSimple:!0}).formatDateTimeFromString(h,r):null}function Ft(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,D,k){let z=!f||h.c.millisecond!==0||h.c.second!==0,q="";switch(k){case"day":case"month":case"year":break;default:if(q+=tt(h.c.hour),k==="hour")break;if(r){if(q+=":",q+=tt(h.c.minute),k==="minute")break;z&&(q+=":",q+=tt(h.c.second))}else{if(q+=tt(h.c.minute),k==="minute")break;z&&(q+=tt(h.c.second))}if(k==="second")break;z&&(!v||h.c.millisecond!==0)&&(q+=".",q+=tt(h.c.millisecond,3))}return S&&(h.isOffsetFixed&&h.offset===0&&!D?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)))),D&&(q+="["+h.zone.ianaName+"]"),q}const ka={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},qu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},sr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},za=["year","month","day","hour","minute","second","millisecond"],li=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Vu=["year","ordinal","hour","minute","second","millisecond"];function vl(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 vl(h)}}function oa(h){if(Pa===void 0&&(Pa=ot.now()),h.type!=="iana")return h.offset(Pa);const r=h.name;let f=ea.get(r);return f===void 0&&(f=h.offset(Pa),ea.set(r,f)),f}function Tn(h,r){const f=Vt(r.zone,ot.defaultZone);if(!f.isValid)return Ee.invalid(Ra(f));const v=Ye.fromObject(r);let S,D;if(Oe(h.year))S=ot.now();else{for(const q of za)Oe(h[q])&&(h[q]=ka[q]);const k=Bs(h)||bn(h);if(k)return Ee.invalid(k);const z=oa(f);[S,D]=hs(h,z,f)}return new Ee({ts:S,zone:f,loc:v,o:D})}function Cn(h,r,f){const v=Oe(f.round)?!0:f.round,S=Oe(f.rounding)?"trunc":f.rounding,D=(z,q)=>(z=Zl(z,v||f.calendary?0:2,f.calendary?"round":S),r.loc.clone(f).relFormatter(f).format(z,q)),k=z=>f.calendary?r.hasSame(h,z)?0:r.startOf(z).diff(h.startOf(z),z).get(z):r.diff(h,z).get(z);if(f.unit)return D(k(f.unit),f.unit);for(const z of f.units){const q=k(z);if(Math.abs(q)>=1)return D(q,z)}return D(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 Pa;const ea=new Map;class Ee{constructor(r){const f=r.zone||ot.defaultZone;let v=r.invalid||(Number.isNaN(r.ts)?new ra("invalid input"):null)||(f.isValid?null:Ra(f));this.ts=Oe(r.ts)?ot.now():r.ts;let S=null,D=null;if(!v)if(r.old&&r.old.ts===this.ts&&r.old.zone.equals(f))[S,D]=[r.old.c,r.old.o];else{const z=ia(r.o)&&!r.old?r.o:f.offset(this.ts);S=Aa(this.ts,z),v=Number.isNaN(S.year)?new ra("invalid input"):null,S=v?null:S,D=v?null:z}this._zone=f,this.loc=r.loc||Ye.create(),this.invalid=v,this.weekData=null,this.localWeekData=null,this.c=S,this.o=D,this.isLuxonDateTime=!0}static now(){return new Ee({})}static local(){const[r,f]=xs(arguments),[v,S,D,k,z,q,fe]=f;return Tn({year:v,month:S,day:D,hour:k,minute:z,second:q,millisecond:fe},r)}static utc(){const[r,f]=xs(arguments),[v,S,D,k,z,q,fe]=f;return r.zone=vt.utcInstance,Tn({year:v,month:S,day:D,hour:k,minute:z,second:q,millisecond:fe},r)}static fromJSDate(r,f={}){const v=xu(r)?r.valueOf():NaN;if(Number.isNaN(v))return Ee.invalid("invalid input");const S=Vt(f.zone,ot.defaultZone);return S.isValid?new Ee({ts:v,zone:S,loc:Ye.fromObject(f)}):Ee.invalid(Ra(S))}static fromMillis(r,f={}){if(ia(r))return r<-aa||r>aa?Ee.invalid("Timestamp out of range"):new Ee({ts:r,zone:Vt(f.zone,ot.defaultZone),loc:Ye.fromObject(f)});throw new g(`fromMillis requires a numerical input, but received a ${typeof r} with value ${r}`)}static fromSeconds(r,f={}){if(ia(r))return new Ee({ts:r*1e3,zone:Vt(f.zone,ot.defaultZone),loc:Ye.fromObject(f)});throw new g("fromSeconds requires a numerical input")}static fromObject(r,f={}){r=r||{};const v=Vt(f.zone,ot.defaultZone);if(!v.isValid)return Ee.invalid(Ra(v));const S=Ye.fromObject(f),D=Xa(r,si),{minDaysInFirstWeek:k,startOfWeek:z}=hu(D,S),q=ot.now(),fe=Oe(f.specificOffset)?v.offset(q):f.specificOffset,be=!Oe(D.ordinal),Ae=!Oe(D.year),Ze=!Oe(D.month)||!Oe(D.day),De=Ae||Ze,yt=D.weekYear||D.weekNumber;if((De||be)&&yt)throw new x("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Ze&&be)throw new x("Can't mix ordinal dates with month/day");const Ht=yt||D.weekday&&!De;let Lt,mn,en=Aa(q,fe);Ht?(Lt=li,mn=qu,en=_t(en,k,z)):be?(Lt=Vu,mn=sr,en=Gl(en)):(Lt=za,mn=ka);let rr=!1;for(const La of Lt){const ir=D[La];Oe(ir)?rr?D[La]=mn[La]:D[La]=en[La]:rr=!0}const On=Ht?mu(D,k,z):be?Fl(D):Bs(D),Ha=On||bn(D);if(Ha)return Ee.invalid(Ha);const xn=Ht?pn(D,k,z):be?fu(D):D,[tn,ri]=hs(xn,fe,v),Dn=new Ee({ts:tn,zone:v,o:ri,loc:S});return D.weekday&&De&&r.weekday!==Dn.weekday?Ee.invalid("mismatched weekday",`you can't specify both a weekday of ${D.weekday} and a date of ${Dn.toISO()}`):Dn.isValid?Dn:Ee.invalid(Dn.invalid)}static fromISO(r,f={}){const[v,S]=Mu(r);return Sa(v,S,f,"ISO 8601",r)}static fromRFC2822(r,f={}){const[v,S]=Eu(r);return Sa(v,S,f,"RFC 2822",r)}static fromHTTP(r,f={}){const[v,S]=Tu(r);return Sa(v,S,f,"HTTP",f)}static fromFormat(r,f,v={}){if(Oe(r)||Oe(f))throw new g("fromFormat requires an input string and a format");const{locale:S=null,numberingSystem:D=null}=v,k=Ye.fromOpts({locale:S,numberingSystem:D,defaultToEN:!0}),[z,q,fe,be]=ni(k,r,f);return be?Ee.invalid(be):Sa(z,q,v,`format ${f}`,r,fe)}static fromString(r,f,v={}){return Ee.fromFormat(r,f,v)}static fromSQL(r,f={}){const[v,S]=Du(r);return Sa(v,S,f,"SQL",r)}static invalid(r,f=null){if(!r)throw new g("need to specify a reason the DateTime is invalid");const v=r instanceof ra?r:new ra(r,f);if(ot.throwOnInvalid)throw new u(v);return new Ee({invalid:v})}static isDateTime(r){return r&&r.isLuxonDateTime||!1}static parseFormatForOpts(r,f={}){const v=ca(r,Ye.fromObject(f));return v?v.map(S=>S?S.val:null).join(""):null}static expandFormat(r,f={}){return Lu(At.parseFormat(r),Ye.fromObject(f)).map(S=>S.val).join("")}static resetCache(){Pa=void 0,ea.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?yl(this).weekday:NaN}get localWeekNumber(){return this.isValid?yl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?yl(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=$t(this.c),S=this.zone.offset(v-r),D=this.zone.offset(v+r),k=this.zone.offset(v-S*f),z=this.zone.offset(v-D*f);if(k===z)return[this];const q=v-k*f,fe=v-z*f,be=Aa(q,k),Ae=Aa(fe,z);return be.hour===Ae.hour&&be.minute===Ae.minute&&be.second===Ae.second&&be.millisecond===Ae.millisecond?[_a(this,{ts:q}),_a(this,{ts:fe})]:[this]}get isInLeapYear(){return sl(this.year)}get daysInMonth(){return $s(this.year,this.month)}get daysInYear(){return this.isValid?Wa(this.year):NaN}get weeksInWeekYear(){return this.isValid?rl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?rl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(r={}){const{locale:f,numberingSystem:v,calendar:S}=At.create(this.loc.clone(r),r).resolvedOptions(this);return{locale:f,numberingSystem:v,outputCalendar:S}}toUTC(r=0,f={}){return this.setZone(vt.instance(r),f)}toLocal(){return this.setZone(ot.defaultZone)}setZone(r,{keepLocalTime:f=!1,keepCalendarTime:v=!1}={}){if(r=Vt(r,ot.defaultZone),r.equals(this.zone))return this;if(r.isValid){let S=this.ts;if(f||v){const D=r.offset(this.ts),k=this.toObject();[S]=hs(k,D,r)}return _a(this,{ts:S,zone:r})}else return Ee.invalid(Ra(r))}reconfigure({locale:r,numberingSystem:f,outputCalendar:v}={}){const S=this.loc.clone({locale:r,numberingSystem:f,outputCalendar:v});return _a(this,{loc:S})}setLocale(r){return this.reconfigure({locale:r})}set(r){if(!this.isValid)return this;const f=Xa(r,si),{minDaysInFirstWeek:v,startOfWeek:S}=hu(f,this.loc),D=!Oe(f.weekYear)||!Oe(f.weekNumber)||!Oe(f.weekday),k=!Oe(f.ordinal),z=!Oe(f.year),q=!Oe(f.month)||!Oe(f.day),fe=z||q,be=f.weekYear||f.weekNumber;if((fe||k)&&be)throw new x("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(q&&k)throw new x("Can't mix ordinal dates with month/day");let Ae;D?Ae=pn({..._t(this.c,v,S),...f},v,S):Oe(f.ordinal)?(Ae={...this.toObject(),...f},Oe(f.day)&&(Ae.day=Math.min($s(Ae.year,Ae.month),Ae.day))):Ae=fu({...Gl(this.c),...f});const[Ze,De]=hs(Ae,this.o,this.zone);return _a(this,{ts:Ze,o:De})}plus(r){if(!this.isValid)return this;const f=Fe.fromDurationLike(r);return _a(this,ms(this,f))}minus(r){if(!this.isValid)return this;const f=Fe.fromDurationLike(r).negate();return _a(this,ms(this,f))}startOf(r,{useLocaleWeeks:f=!1}={}){if(!this.isValid)return this;const v={},S=Fe.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 D=this.loc.getStartOfWeek(),{weekday:k}=this;k<D&&(v.weekNumber=this.weekNumber-1),v.weekday=D}else v.weekday=1;if(S==="quarters"){const D=Math.ceil(this.month/3);v.month=(D-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?At.create(this.loc.redefaultToEN(f)).formatDateTimeFromString(this,r):gl}toLocaleString(r=M,f={}){return this.isValid?At.create(this.loc.clone(f),r).formatDateTime(this):gl}toLocaleParts(r={}){return this.isValid?At.create(this.loc.clone(r),r).formatDateTimeParts(this):[]}toISO({format:r="extended",suppressSeconds:f=!1,suppressMilliseconds:v=!1,includeOffset:S=!0,extendedZone:D=!1,precision:k="milliseconds"}={}){if(!this.isValid)return null;k=vl(k);const z=r==="extended";let q=Ft(this,z,k);return za.indexOf(k)>=3&&(q+="T"),q+=lr(this,z,f,v,S,D,k),q}toISODate({format:r="extended",precision:f="day"}={}){return this.isValid?Ft(this,r==="extended",vl(f)):null}toISOWeekDate(){return nr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:r=!1,suppressSeconds:f=!1,includeOffset:v=!0,includePrefix:S=!1,extendedZone:D=!1,format:k="extended",precision:z="milliseconds"}={}){return this.isValid?(z=vl(z),(S&&za.indexOf(z)>=3?"T":"")+lr(this,k==="extended",f,r,v,D,z)):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?Ft(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():gl}[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 Fe.invalid("created by diffing an invalid DateTime");const S={locale:this.locale,numberingSystem:this.numberingSystem,...v},D=ll(f).map(Fe.normalizeUnit),k=r.valueOf()>this.valueOf(),z=k?this:r,q=k?r:this,fe=_u(z,q,D,S);return k?fe.negate():fe}diffNow(r="milliseconds",f={}){return this.diff(Ee.now(),r,f)}until(r){return this.isValid?ft.fromDateTimes(this,r):this}hasSame(r,f,v){if(!this.isValid)return!1;const S=r.valueOf(),D=this.setZone(r.zone,{keepLocalTime:!0});return D.startOf(f,v)<=S&&S<=D.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||Ee.fromObject({},{zone:this.zone}),v=r.padding?this<f?-r.padding:r.padding:0;let S=["years","months","days","hours","minutes","seconds"],D=r.unit;return Array.isArray(r.unit)&&(S=r.unit,D=void 0),Cn(f,this.plus(v),{...r,numeric:"always",units:S,unit:D})}toRelativeCalendar(r={}){return this.isValid?Cn(r.base||Ee.fromObject({},{zone:this.zone}),this,{...r,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...r){if(!r.every(Ee.isDateTime))throw new g("min requires all arguments be DateTimes");return gu(r,f=>f.valueOf(),Math.min)}static max(...r){if(!r.every(Ee.isDateTime))throw new g("max requires all arguments be DateTimes");return gu(r,f=>f.valueOf(),Math.max)}static fromFormatExplain(r,f,v={}){const{locale:S=null,numberingSystem:D=null}=v,k=Ye.fromOpts({locale:S,numberingSystem:D,defaultToEN:!0});return ai(k,r,f)}static fromStringExplain(r,f,v={}){return Ee.fromFormatExplain(r,f,v)}static buildFormatParser(r,f={}){const{locale:v=null,numberingSystem:S=null}=f,D=Ye.fromOpts({locale:v,numberingSystem:S,defaultToEN:!0});return new ti(D,r)}static fromFormatParser(r,f,v={}){if(Oe(r)||Oe(f))throw new g("fromFormatParser requires an input string and a format parser");const{locale:S=null,numberingSystem:D=null}=v,k=Ye.fromOpts({locale:S,numberingSystem:D,defaultToEN:!0});if(!k.equals(f.locale))throw new g(`fromFormatParser called with a locale of ${k}, but the format parser was created for ${f.locale}`);const{result:z,zone:q,specificOffset:fe,invalidReason:be}=f.explainFromTokens(r);return be?Ee.invalid(be):Sa(z,q,v,`format ${f.format}`,r,fe)}static get DATE_SHORT(){return M}static get DATE_MED(){return _}static get DATE_MED_WITH_WEEKDAY(){return A}static get DATE_FULL(){return E}static get DATE_HUGE(){return T}static get TIME_SIMPLE(){return C}static get TIME_WITH_SECONDS(){return ne}static get TIME_WITH_SHORT_OFFSET(){return I}static get TIME_WITH_LONG_OFFSET(){return le}static get TIME_24_SIMPLE(){return te}static get TIME_24_WITH_SECONDS(){return K}static get TIME_24_WITH_SHORT_OFFSET(){return oe}static get TIME_24_WITH_LONG_OFFSET(){return X}static get DATETIME_SHORT(){return J}static get DATETIME_SHORT_WITH_SECONDS(){return $}static get DATETIME_MED(){return H}static get DATETIME_MED_WITH_SECONDS(){return ae}static get DATETIME_MED_WITH_WEEKDAY(){return B}static get DATETIME_FULL(){return de}static get DATETIME_FULL_WITH_SECONDS(){return pe}static get DATETIME_HUGE(){return ve}static get DATETIME_HUGE_WITH_SECONDS(){return G}}function da(h){if(Ee.isDateTime(h))return h;if(h&&h.valueOf&&ia(h.valueOf()))return Ee.fromJSDate(h);if(h&&typeof h=="object")return Ee.fromObject(h);throw new g(`Unknown datetime argument: ${h}, of type ${typeof h}`)}const Ua="3.7.2";return ya.DateTime=Ee,ya.Duration=Fe,ya.FixedOffsetZone=vt,ya.IANAZone=me,ya.Info=cs,ya.Interval=ft,ya.InvalidZone=Jt,ya.Settings=ot,ya.SystemZone=Ne,ya.VERSION=Ua,ya.Zone=re,ya}var Sx;function Ff(){return Sx||(Sx=1,(function(l){var m,g,w,b,p,Cf,M,Ll;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const u=A2();var d;(function(E){E.Second="Second",E.Minute="Minute",E.Hour="Hour",E.Day="Day",E.Month="Month",E.Year="Year"})(d||(l.TimeUnit=d={}));var o;(function(E){E.Add="Add",E.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 A=class A{constructor(T,C){et(this,M);et(this,m);et(this,g,null);et(this,w,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 ne={zone:C};if(T?T instanceof A?(Te(this,m,P(T,m)),Te(this,g,P(T,g)),Te(this,w,P(T,w))):T instanceof Date?Te(this,m,u.DateTime.fromJSDate(T,ne)):typeof T=="number"?Te(this,m,u.DateTime.fromMillis(T,ne)):(Te(this,m,u.DateTime.fromISO(T,ne)),P(this,m).isValid||Te(this,m,u.DateTime.fromRFC2822(T,ne)),P(this,m).isValid||Te(this,m,u.DateTime.fromSQL(T,ne)),P(this,m).isValid||Te(this,m,u.DateTime.fromFormat(T,"EEE, d MMM yyyy HH:mm:ss",ne))):Te(this,m,u.DateTime.local()),!P(this,m).isValid)throw new Error(`CronDate: unhandled timestamp: ${T}`);C&&C!==P(this,m).zoneName&&Te(this,m,P(this,m).setZone(C))}get dstStart(){return P(this,g)}set dstStart(T){Te(this,g,T)}get dstEnd(){return P(this,w)}set dstEnd(T){Te(this,w,T)}addYear(){Te(this,m,P(this,m).plus({years:1}))}addMonth(){Te(this,m,P(this,m).plus({months:1}).startOf("month"))}addDay(){Te(this,m,P(this,m).plus({days:1}).startOf("day"))}addHour(){Te(this,m,P(this,m).plus({hours:1}).startOf("hour"))}addMinute(){Te(this,m,P(this,m).plus({minutes:1}).startOf("minute"))}addSecond(){Te(this,m,P(this,m).plus({seconds:1}))}subtractYear(){Te(this,m,P(this,m).minus({years:1}))}subtractMonth(){Te(this,m,P(this,m).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Te(this,m,P(this,m).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Te(this,m,P(this,m).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Te(this,m,P(this,m).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Te(this,m,P(this,m).minus({seconds:1}))}addUnit(T){P(this,b).add[T]()}subtractUnit(T){P(this,b).subtract[T]()}invokeDateOperation(T,C){if(T===o.Add){this.addUnit(C);return}if(T===o.Subtract){this.subtractUnit(C);return}throw new Error(`Invalid verb: ${T}`)}getDate(){return P(this,m).day}getFullYear(){return P(this,m).year}getDay(){const T=P(this,m).weekday;return T===7?0:T}getMonth(){return P(this,m).month-1}getHours(){return P(this,m).hour}getMinutes(){return P(this,m).minute}getSeconds(){return P(this,m).second}getMilliseconds(){return P(this,m).millisecond}getUTCOffset(){return P(this,m).offset}setStartOfDay(){Te(this,m,P(this,m).startOf("day"))}setEndOfDay(){Te(this,m,P(this,m).endOf("day"))}getTime(){return P(this,m).valueOf()}getUTCDate(){return Me(this,M,Ll).call(this).day}getUTCFullYear(){return Me(this,M,Ll).call(this).year}getUTCDay(){const T=Me(this,M,Ll).call(this).weekday;return T===7?0:T}getUTCMonth(){return Me(this,M,Ll).call(this).month-1}getUTCHours(){return Me(this,M,Ll).call(this).hour}getUTCMinutes(){return Me(this,M,Ll).call(this).minute}getUTCSeconds(){return Me(this,M,Ll).call(this).second}toISOString(){return P(this,m).toUTC().toISO()}toJSON(){return P(this,m).toJSON()}setDate(T){Te(this,m,P(this,m).set({day:T}))}setFullYear(T){Te(this,m,P(this,m).set({year:T}))}setDay(T){Te(this,m,P(this,m).set({weekday:T}))}setMonth(T){Te(this,m,P(this,m).set({month:T+1}))}setHours(T){Te(this,m,P(this,m).set({hour:T}))}setMinutes(T){Te(this,m,P(this,m).set({minute:T}))}setSeconds(T){Te(this,m,P(this,m).set({second:T}))}setMilliseconds(T){Te(this,m,P(this,m).set({millisecond:T}))}toString(){return this.toDate().toString()}toDate(){return P(this,m).toJSDate()}isLastDayOfMonth(){var ne;const{day:T,month:C}=P(this,m);if(C===2){const I=Me(ne=A,p,Cf).call(ne,P(this,m).year);return T===l.DAYS_IN_MONTH[C-1]-(I?0:1)}return T===l.DAYS_IN_MONTH[C-1]}isLastWeekdayOfMonth(){var I;const{day:T,month:C}=P(this,m);let ne;return C===2?ne=l.DAYS_IN_MONTH[C-1]-(Me(I=A,p,Cf).call(I,P(this,m).year)?0:1):ne=l.DAYS_IN_MONTH[C-1],T>ne-7}applyDateOperation(T,C,ne){if(C===d.Month||C===d.Day){this.invokeDateOperation(T,C);return}const I=this.getHours();this.invokeDateOperation(T,C);const le=this.getHours(),te=le-I;te===2?ne!==24&&(this.dstStart=le):te===0&&this.getMinutes()===0&&this.getSeconds()===0&&ne!==24&&(this.dstEnd=le)}};m=new WeakMap,g=new WeakMap,w=new WeakMap,b=new WeakMap,p=new WeakSet,Cf=function(T){return T%4===0&&T%100!==0||T%400===0},M=new WeakSet,Ll=function(){return P(this,m).toUTC()},et(A,p);let x=A;l.CronDate=x,l.default=x})(vf)),vf}var Nx;function k2(){if(Nx)return Zi;Nx=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronMonth=void 0;const l=Ff(),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(w,b){super(w,b),this.validate()}get values(){return super.values}};return Zi.CronMonth=m,Zi}var Qi={},wx;function z2(){if(wx)return Qi;wx=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(g,w){super(g,w),this.validate()}get values(){return super.values}};return Qi.CronSecond=x,Qi}var jx;function Zf(){return jx||(jx=1,(function(l){var u=Es&&Es.__createBinding||(Object.create?(function(o,x,m,g){g===void 0&&(g=m);var w=Object.getOwnPropertyDescriptor(x,m);(!w||("get"in w?!x.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return x[m]}}),Object.defineProperty(o,g,w)}):(function(o,x,m,g){g===void 0&&(g=m),o[g]=x[m]})),d=Es&&Es.__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(C2(),l),d(O2(),l),d(D2(),l),d(As(),l),d(R2(),l),d(_2(),l),d(k2(),l),d(z2(),l)})(Es)),Es}var Mx;function Rg(){var d,o,x,m,g,w,b,p,Og,Dg;if(Mx)return Vi;Mx=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.CronFieldCollection=void 0;const l=Zf();let u=(p=class{constructor({second:A,minute:E,hour:T,dayOfMonth:C,month:ne,dayOfWeek:I}){et(this,d);et(this,o);et(this,x);et(this,m);et(this,g);et(this,w);if(!A)throw new Error("Validation error, Field second is missing");if(!E)throw new Error("Validation error, Field minute is missing");if(!T)throw new Error("Validation error, Field hour is missing");if(!C)throw new Error("Validation error, Field dayOfMonth is missing");if(!ne)throw new Error("Validation error, Field month is missing");if(!I)throw new Error("Validation error, Field dayOfWeek is missing");if(ne.values.length===1&&!C.hasLastChar&&!(parseInt(C.values[0],10)<=l.CronMonth.daysInMonth[ne.values[0]-1]))throw new Error("Invalid explicit day of month definition");Te(this,d,A),Te(this,o,E),Te(this,x,T),Te(this,g,ne),Te(this,w,I),Te(this,m,C)}static from(A,E){return new p({second:this.resolveField(l.CronSecond,A.second,E.second),minute:this.resolveField(l.CronMinute,A.minute,E.minute),hour:this.resolveField(l.CronHour,A.hour,E.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,A.dayOfMonth,E.dayOfMonth),month:this.resolveField(l.CronMonth,A.month,E.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,A.dayOfWeek,E.dayOfWeek)})}static resolveField(A,E,T){return T?T instanceof l.CronField?T:new A(T):E}get second(){return P(this,d)}get minute(){return P(this,o)}get hour(){return P(this,x)}get dayOfMonth(){return P(this,m)}get month(){return P(this,g)}get dayOfWeek(){return P(this,w)}static compactField(A){if(A.length===0)return[];const E=[];let T;return A.forEach((C,ne,I)=>{if(T===void 0){T={start:C,count:1};return}const le=I[ne-1]||T.start,te=I[ne+1];if(C==="L"||C==="W"){E.push(T),E.push({start:C,count:1}),T=void 0;return}if(T.step===void 0&&te!==void 0){const K=C-le,oe=te-C;if(K<=oe){T={...T,count:2,end:C,step:K};return}T.step=1}C-(T.end??0)===T.step?(T.count++,T.end=C):(T.count===1?E.push({start:T.start,count:1}):T.count===2?(E.push({start:T.start,count:1}),E.push({start:T.end??le,count:1})):E.push(T),T={start:C,count:1})}),T&&E.push(T),E}stringifyField(A){var ne;let E=A.max,T=A.values;if(A instanceof l.CronDayOfWeek){E=6;const I=P(this,w).values;T=I[I.length-1]===7?I.slice(0,-1):I}A instanceof l.CronDayOfMonth&&(E=P(this,g).values.length===1?l.CronMonth.daysInMonth[P(this,g).values[0]-1]:A.max);const C=p.compactField(T);if(C.length===1){const I=Me(ne=p,b,Og).call(ne,A,C[0],E);if(I)return I}return C.map(I=>{var te;const le=I.count===1?I.start.toString():Me(te=p,b,Dg).call(te,I,E);return A instanceof l.CronDayOfWeek&&A.nthDay>0?`${le}#${A.nthDay}`:le}).join(",")}stringify(A=!1){const E=[];return A&&E.push(this.stringifyField(P(this,d))),E.push(this.stringifyField(P(this,o)),this.stringifyField(P(this,x)),this.stringifyField(P(this,m)),this.stringifyField(P(this,g)),this.stringifyField(P(this,w))),E.join(" ")}serialize(){return{second:P(this,d).serialize(),minute:P(this,o).serialize(),hour:P(this,x).serialize(),dayOfMonth:P(this,m).serialize(),month:P(this,g).serialize(),dayOfWeek:P(this,w).serialize()}}},d=new WeakMap,o=new WeakMap,x=new WeakMap,m=new WeakMap,g=new WeakMap,w=new WeakMap,b=new WeakSet,Og=function(A,E,T){const C=E.step;return C?C===1&&E.start===A.min&&E.end&&E.end>=T?A.hasQuestionMarkChar?"?":"*":C!==1&&E.start===A.min&&E.end&&E.end>=T-C+1?`*/${C}`:null:null},Dg=function(A,E){const T=A.step;if(T===1)return`${A.start}-${A.end}`;const C=A.start===0?A.count-1:A.count;if(!T)throw new Error("Unexpected range step");if(!A.end)throw new Error("Unexpected range end");if(T*C>A.end){const ne=(le,te)=>{if(typeof A.start!="number")throw new Error("Unexpected range start");return te%T===0?A.start+te:null};if(typeof A.start!="number")throw new Error("Unexpected range start");const I={length:A.end-A.start+1};return Array.from(I,ne).filter(le=>le!==null).join(",")}return A.end===E-T+1?`${A.start}/${T}`:`${A.start}-${A.end}/${T}`},et(p,b),p);return Vi.CronFieldCollection=u,Vi}var pf={},Ex;function Lg(){return Ex||(Ex=1,(function(l){var x,m,g,w,b,p,j,M,_,ql,E,Os,_g,Ag,kg,zg,Of,Ug,Hg,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=Ff();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,J=class J{constructor(H,ae){et(this,E);et(this,x);et(this,m);et(this,g);et(this,w);et(this,b);et(this,p);et(this,j,null);et(this,M,!1);Te(this,x,ae),Te(this,m,ae.tz),Te(this,w,ae.startDate?new u.CronDate(ae.startDate,P(this,m)):null),Te(this,b,ae.endDate?new u.CronDate(ae.endDate,P(this,m)):null);let B=ae.currentDate??ae.startDate;if(B){const de=new u.CronDate(B,P(this,m));P(this,w)&&de.getTime()<P(this,w).getTime()?B=P(this,w):P(this,b)&&de.getTime()>P(this,b).getTime()&&(B=P(this,b))}Te(this,g,new u.CronDate(B,P(this,m))),Te(this,p,H)}get fields(){return P(this,p)}static fieldsToExpression(H,ae){return new J(H,ae||{})}next(){return Me(this,E,Dr).call(this)}prev(){return Me(this,E,Dr).call(this,!0)}hasNext(){const H=P(this,g);try{return Me(this,E,Dr).call(this),!0}catch{return!1}finally{Te(this,g,H)}}hasPrev(){const H=P(this,g);try{return Me(this,E,Dr).call(this,!0),!0}catch{return!1}finally{Te(this,g,H)}}take(H){const ae=[];if(H>=0)for(let B=0;B<H;B++)try{ae.push(this.next())}catch{return ae}else for(let B=0;B>H;B--)try{ae.push(this.prev())}catch{return ae}return ae}reset(H){Te(this,g,new u.CronDate(H||P(this,x).currentDate))}stringify(H=!1){return P(this,p).stringify(H)}includesDate(H){const{second:ae,minute:B,hour:de,month:pe}=P(this,p),ve=new u.CronDate(H,P(this,m));return!(!ae.values.includes(ve.getSeconds())||!B.values.includes(ve.getMinutes())||!de.values.includes(ve.getHours())||!pe.values.includes(ve.getMonth()+1)||!Me(this,E,Of).call(this,ve)||P(this,p).dayOfWeek.nthDay>0&&Math.ceil(ve.getDate()/7)!==P(this,p).dayOfWeek.nthDay)}toString(){return P(this,x).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Me(this,E,Dr).call(this),done:!this.hasNext()})}}};x=new WeakMap,m=new WeakMap,g=new WeakMap,w=new WeakMap,b=new WeakMap,p=new WeakMap,j=new WeakMap,M=new WeakMap,_=new WeakSet,ql=function(H,ae){return ae.some(B=>B===H)},E=new WeakSet,Os=function(H,ae){return H[ae?H.length-1:0]},_g=function(H){const ae=`${H.getFullYear()}-${H.getMonth()+1}-${H.getDate()}`;if(P(this,j)===ae)return P(this,M);const B=new u.CronDate(H);B.setStartOfDay();const de=new u.CronDate(H);return de.setEndOfDay(),Te(this,j,ae),Te(this,M,B.getUTCOffset()!==de.getUTCOffset()),P(this,M)},Ag=function(H,ae,B){const de=P(this,p).second.values,pe=H.getSeconds(),ve=P(this,p).second.findNearestValue(pe,B);if(ve!==null){H.setSeconds(ve);return}H.applyDateOperation(ae,u.TimeUnit.Minute,P(this,p).hour.values.length),H.setSeconds(Me(this,E,Os).call(this,de,B))},kg=function(H,ae,B){const de=P(this,p).minute.values,pe=P(this,p).second.values,ve=H.getMinutes(),G=P(this,p).minute.findNearestValue(ve,B);if(G!==null){H.setMinutes(G),H.setSeconds(Me(this,E,Os).call(this,pe,B));return}H.applyDateOperation(ae,u.TimeUnit.Hour,P(this,p).hour.values.length),H.setMinutes(Me(this,E,Os).call(this,de,B)),H.setSeconds(Me(this,E,Os).call(this,pe,B))},zg=function(H,ae){const B=ae.isLastWeekdayOfMonth();return H.some(de=>{const pe=parseInt(de.toString().charAt(0),10)%7;if(Number.isNaN(pe))throw new Error(`Invalid last weekday of the month expression: ${de}`);return ae.getDay()===pe&&B})},Of=function(H){var re,xe,Ne;const ae=P(this,p).dayOfMonth.isWildcard,B=!ae,de=P(this,p).dayOfWeek.isWildcard,pe=!de,ve=Me(re=J,_,ql).call(re,H.getDate(),P(this,p).dayOfMonth.values)||P(this,p).dayOfMonth.hasLastChar&&H.isLastDayOfMonth(),G=Me(xe=J,_,ql).call(xe,H.getDay(),P(this,p).dayOfWeek.values)||P(this,p).dayOfWeek.hasLastChar&&Me(Ne=J,_,zg).call(Ne,P(this,p).dayOfWeek.values,H);return!!(B&&pe&&(ve||G)||ve&&!pe||ae&&!de&&G)},Ug=function(H,ae,B){var U,O;const de=P(this,p).hour.values,pe=de,ve=H.getHours(),G=Me(U=J,_,ql).call(U,ve,de),re=H.dstStart===ve,xe=H.dstEnd===ve;if(re)return Me(O=J,_,ql).call(O,ve-1,de)?!0:(H.invokeDateOperation(ae,u.TimeUnit.Hour),!1);if(xe&&!B)return H.dstEnd=null,H.applyDateOperation(u.DateMathOp.Add,u.TimeUnit.Hour,pe.length),!1;if(G)return!0;H.dstStart=null;const Ne=P(this,p).hour.findNearestValue(ve,B);if(Ne===null)return H.applyDateOperation(ae,u.TimeUnit.Day,pe.length),!1;if(Me(this,E,_g).call(this,H)){const Q=B?ve-Ne:Ne-ve;for(let ce=0;ce<Q;ce++)H.applyDateOperation(ae,u.TimeUnit.Hour,pe.length)}else H.setHours(Ne);return H.setMinutes(Me(this,E,Os).call(this,P(this,p).minute.values,B)),H.setSeconds(Me(this,E,Os).call(this,P(this,p).second.values,B)),!1},Hg=function(H){if(!P(this,w)&&!P(this,b))return;const ae=H.getTime();if(P(this,w)&&ae<P(this,w).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(P(this,b)&&ae>P(this,b).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Dr=function(H=!1){var ve,G,re;const ae=H?u.DateMathOp.Subtract:u.DateMathOp.Add,B=new u.CronDate(P(this,g)),de=B.getTime();let pe=0;for(;++pe<d;){if(Me(this,E,Hg).call(this,B),!Me(this,E,Of).call(this,B)){B.applyDateOperation(ae,u.TimeUnit.Day,P(this,p).hour.values.length);continue}if(!(P(this,p).dayOfWeek.nthDay<=0||Math.ceil(B.getDate()/7)===P(this,p).dayOfWeek.nthDay)){B.applyDateOperation(ae,u.TimeUnit.Day,P(this,p).hour.values.length);continue}if(!Me(ve=J,_,ql).call(ve,B.getMonth()+1,P(this,p).month.values)){B.applyDateOperation(ae,u.TimeUnit.Month,P(this,p).hour.values.length);continue}if(Me(this,E,Ug).call(this,B,ae,H)){if(!Me(G=J,_,ql).call(G,B.getMinutes(),P(this,p).minute.values)){Me(this,E,kg).call(this,B,ae,H);continue}if(!Me(re=J,_,ql).call(re,B.getSeconds(),P(this,p).second.values)){Me(this,E,Ag).call(this,B,ae,H);continue}if(de===B.getTime()){(ae==="Add"||B.getMilliseconds()===0)&&B.applyDateOperation(ae,u.TimeUnit.Second,P(this,p).hour.values.length);continue}break}}if(pe>d)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return B.getMilliseconds()!==0&&B.setMilliseconds(0),Te(this,g,B),B},et(J,_);let o=J;l.CronExpression=o,l.default=o})(pf)),pf}var Lc={},Tx;function U2(){if(Tx)return Lc;Tx=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.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 Lc}var Cx;function Rf(){var p,j,qg,Ds,Vg,Bg,Yg,$g,Gg,Fg,Zg,Df,Qg,Wg;if(Cx)return Ta;Cx=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.CronExpressionParser=Ta.DayOfWeek=Ta.Months=Ta.CronUnit=Ta.PredefinedExpressions=void 0;const l=Rg(),u=Lg(),d=U2(),o=Zf();var x;(function(X){X["@yearly"]="0 0 0 1 1 *",X["@annually"]="0 0 0 1 1 *",X["@monthly"]="0 0 0 1 * *",X["@weekly"]="0 0 0 * * 0",X["@daily"]="0 0 0 * * *",X["@hourly"]="0 0 * * * *",X["@minutely"]="0 * * * * *",X["@secondly"]="* * * * * *",X["@weekdays"]="0 0 0 * * 1-5",X["@weekends"]="0 0 0 * * 0,6"})(x||(Ta.PredefinedExpressions=x={}));var m;(function(X){X.Second="Second",X.Minute="Minute",X.Hour="Hour",X.DayOfMonth="DayOfMonth",X.Month="Month",X.DayOfWeek="DayOfWeek"})(m||(Ta.CronUnit=m={}));var g;(function(X){X[X.jan=1]="jan",X[X.feb=2]="feb",X[X.mar=3]="mar",X[X.apr=4]="apr",X[X.may=5]="may",X[X.jun=6]="jun",X[X.jul=7]="jul",X[X.aug=8]="aug",X[X.sep=9]="sep",X[X.oct=10]="oct",X[X.nov=11]="nov",X[X.dec=12]="dec"})(g||(Ta.Months=g={}));var w;(function(X){X[X.sun=0]="sun",X[X.mon=1]="mon",X[X.tue=2]="tue",X[X.wed=3]="wed",X[X.thu=4]="thu",X[X.fri=5]="fri",X[X.sat=6]="sat"})(w||(Ta.DayOfWeek=w={}));let b=(j=class{static parse(J,$={}){var ce,ye,he,me,we,Be,qe,sa;const{strict:H=!1,hashSeed:ae}=$,B=(0,d.seededRandom)(ae);J=x[J]||J;const de=Me(ce=j,p,qg).call(ce,J,H);if(!(de.dayOfMonth==="*"||de.dayOfWeek==="*"||!H))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const pe=Me(ye=j,p,Ds).call(ye,m.Second,de.second,o.CronSecond.constraints,B),ve=Me(he=j,p,Ds).call(he,m.Minute,de.minute,o.CronMinute.constraints,B),G=Me(me=j,p,Ds).call(me,m.Hour,de.hour,o.CronHour.constraints,B),re=Me(we=j,p,Ds).call(we,m.Month,de.month,o.CronMonth.constraints,B),xe=Me(Be=j,p,Ds).call(Be,m.DayOfMonth,de.dayOfMonth,o.CronDayOfMonth.constraints,B),{dayOfWeek:Ne,nthDayOfWeek:U}=Me(qe=j,p,Qg).call(qe,de.dayOfWeek),O=Me(sa=j,p,Ds).call(sa,m.DayOfWeek,Ne,o.CronDayOfWeek.constraints,B),Q=new l.CronFieldCollection({second:new o.CronSecond(pe,{rawValue:de.second}),minute:new o.CronMinute(ve,{rawValue:de.minute}),hour:new o.CronHour(G,{rawValue:de.hour}),dayOfMonth:new o.CronDayOfMonth(xe,{rawValue:de.dayOfMonth}),month:new o.CronMonth(re,{rawValue:de.month}),dayOfWeek:new o.CronDayOfWeek(O,{rawValue:de.dayOfWeek,nthDayOfWeek:U})});return new u.CronExpression(Q,{...$,expression:J})}},p=new WeakSet,qg=function(J,$){if($&&!J.length)throw new Error("Invalid cron expression");J=J||"0 * * * * *";const H=J.trim().split(/\s+/);if($&&H.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(H.length>6)throw new Error("Invalid cron expression, too many fields");const ae=["*","*","*","*","*","0"];H.length<ae.length&&H.unshift(...ae.slice(H.length));const[B,de,pe,ve,G,re]=H;return{second:B,minute:de,hour:pe,dayOfMonth:ve,month:G,dayOfWeek:re}},Ds=function(J,$,H,ae){if((J===m.Month||J===m.DayOfWeek)&&($=$.replace(/[a-z]{3}/gi,B=>{B=B.toLowerCase();const de=g[B]||w[B];if(de===void 0)throw new Error(`Validation error, cannot resolve alias "${B}"`);return de.toString()})),!H.validChars.test($))throw new Error(`Invalid characters, got value: ${$}`);return $=Me(this,p,Vg).call(this,$,H),$=Me(this,p,Bg).call(this,$,H,ae),Me(this,p,Yg).call(this,J,$,H)},Vg=function(J,$){return J.replace(/[*?]/g,$.min+"-"+$.max)},Bg=function(J,$,H){const ae=H();return J.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(B,de,pe,ve)=>{if(de&&pe&&ve){const G=parseInt(de,10),re=parseInt(pe,10),xe=parseInt(ve,10);if(G>re)throw new Error(`Invalid range: ${G}-${re}, min > max`);if(xe<=0)throw new Error(`Invalid step: ${xe}, must be positive`);const Ne=Math.max(G,$.min),U=Math.floor(ae*xe),O=[];for(let Q=Math.floor(Ne/xe)*xe+U;Q<=re;Q+=xe)Q>=Ne&&O.push(Q);return O.join(",")}else if(de&&pe){const G=parseInt(de,10),re=parseInt(pe,10);if(G>re)throw new Error(`Invalid range: ${G}-${re}, min > max`);return String(Math.floor(ae*(re-G+1))+G)}else if(ve){const G=parseInt(ve,10);if(G<=0)throw new Error(`Invalid step: ${G}, must be positive`);const re=Math.floor(ae*G),xe=[];for(let Ne=Math.floor($.min/G)*G+re;Ne<=$.max;Ne+=G)Ne>=$.min&&xe.push(Ne);return xe.join(",")}else return String(Math.floor(ae*($.max-$.min+1)+$.min))})},Yg=function(J,$,H){const ae=[];function B(pe,ve){var G;if(Array.isArray(pe))ae.push(...pe);else if(Me(G=j,p,Wg).call(G,ve,pe))ae.push(pe);else{const re=parseInt(pe.toString(),10);if(!(re>=ve.min&&re<=ve.max))throw new Error(`Constraint error, got value ${pe} expected range ${ve.min}-${ve.max}`);ae.push(J===m.DayOfWeek?re%7:pe)}}return $.split(",").forEach(pe=>{var ve;if(!(pe.length>0))throw new Error("Invalid list value format");B(Me(ve=j,p,$g).call(ve,J,pe,H),H)}),ae},$g=function(J,$,H){var B,de;const ae=$.split("/");if(ae.length>2)throw new Error(`Invalid repeat: ${$}`);return ae.length===2?(isNaN(parseInt(ae[0],10))||(ae[0]=`${ae[0]}-${H.max}`),Me(B=j,p,Df).call(B,J,ae[0],parseInt(ae[1],10),H)):Me(de=j,p,Df).call(de,J,$,1,H)},Gg=function(J,$,H){if(!(!isNaN(J)&&!isNaN($)&&J>=H.min&&$<=H.max))throw new Error(`Constraint error, got range ${J}-${$} expected range ${H.min}-${H.max}`);if(J>$)throw new Error(`Invalid range: ${J}-${$}, min(${J}) > max(${$})`)},Fg=function(J){if(!(!isNaN(J)&&J>0))throw new Error(`Constraint error, cannot repeat at every ${J} time.`)},Zg=function(J,$,H,ae){const B=[];J===m.DayOfWeek&&H%7===0&&B.push(0);for(let de=$;de<=H;de+=ae)B.indexOf(de)===-1&&B.push(de);return B},Df=function(J,$,H,ae){const B=$.split("-");if(B.length<=1)return isNaN(+$)?$:+$;const[de,pe]=B.map(ve=>parseInt(ve,10));return Me(this,p,Gg).call(this,de,pe,ae),Me(this,p,Fg).call(this,H),Me(this,p,Zg).call(this,J,de,pe,H)},Qg=function(J){const $=J.split("#");if($.length<=1)return{dayOfWeek:$[0]};const H=+$[$.length-1],ae=J.match(/([,-/])/);if(ae!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ae==null?void 0:ae[0]}\` special characters are incompatible`);if(!($.length<=2&&!isNaN(H)&&H>=1&&H<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:$[0],nthDayOfWeek:H}},Wg=function(J,$){return J.chars.some(H=>$.toString().includes(H))},et(j,p),j);return Ta.CronExpressionParser=b,Ta}var ln={};const H2={},L2=Object.freeze(Object.defineProperty({__proto__:null,default:H2},Symbol.toStringTag,{value:"Module"})),Ox=jv(L2);var Dx;function q2(){var m,g,_f,Xg;if(Dx)return ln;Dx=1;var l=ln&&ln.__createBinding||(Object.create?(function(p,j,M,_){_===void 0&&(_=M);var A=Object.getOwnPropertyDescriptor(j,M);(!A||("get"in A?!j.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return j[M]}}),Object.defineProperty(p,_,A)}):(function(p,j,M,_){_===void 0&&(_=M),p[_]=j[M]})),u=ln&&ln.__setModuleDefault||(Object.create?(function(p,j){Object.defineProperty(p,"default",{enumerable:!0,value:j})}):function(p,j){p.default=j}),d=ln&&ln.__importStar||(function(){var p=function(j){return p=Object.getOwnPropertyNames||function(M){var _=[];for(var A in M)Object.prototype.hasOwnProperty.call(M,A)&&(_[_.length]=A);return _},p(j)};return function(j){if(j&&j.__esModule)return j;var M={};if(j!=null)for(var _=p(j),A=0;A<_.length;A++)_[A]!=="default"&&l(M,j,_[A]);return u(M,j),M}})();Object.defineProperty(ln,"__esModule",{value:!0}),ln.CronFileParser=void 0;const o=Rf();let x=(g=class{static async parseFile(j){var A;const{readFile:M}=await Promise.resolve().then(()=>d(Ox)),_=await M(j,"utf8");return Me(A=g,m,_f).call(A,_)}static parseFileSync(j){var A;const{readFileSync:M}=Ox,_=M(j,"utf8");return Me(A=g,m,_f).call(A,_)}},m=new WeakSet,_f=function(j){var A;const M=j.split(`
|
|
360
|
+
`),_={variables:{},expressions:[],errors:{}};for(const E of M){const T=E.trim();if(T.length===0||T.startsWith("#"))continue;const C=T.match(/^(.*)=(.*)$/);if(C){const[,ne,I]=C;_.variables[ne]=I.replace(/["']/g,"");continue}try{const ne=Me(A=g,m,Xg).call(A,T);_.expressions.push(ne.interval)}catch(ne){_.errors[T]=ne}}return _},Xg=function(j){const M=j.split(" ");return{interval:o.CronExpressionParser.parse(M.slice(0,5).join(" ")),command:M.slice(5,M.length)}},et(g,m),g);return ln.CronFileParser=x,ln}var Rx;function V2(){return Rx||(Rx=1,(function(l){var u=Ms&&Ms.__createBinding||(Object.create?(function(p,j,M,_){_===void 0&&(_=M);var A=Object.getOwnPropertyDescriptor(j,M);(!A||("get"in A?!j.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return j[M]}}),Object.defineProperty(p,_,A)}):(function(p,j,M,_){_===void 0&&(_=M),p[_]=j[M]})),d=Ms&&Ms.__exportStar||function(p,j){for(var M in p)M!=="default"&&!Object.prototype.hasOwnProperty.call(j,M)&&u(j,p,M)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const o=Rf();var x=Ff();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return x.CronDate}});var m=Rg();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return m.CronFieldCollection}});var g=Lg();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return g.CronExpression}});var w=Rf();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return w.CronExpressionParser}});var b=q2();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return b.CronFileParser}}),d(Zf(),l),l.default=o.CronExpressionParser})(Ms)),Ms}var B2=V2();const Jg=6048e5,Y2=864e5,$2=6e4,G2=36e5,_x=Symbol.for("constructDateFrom");function Ca(l,u){return typeof l=="function"?l(u):l&&typeof l=="object"&&_x in l?l[_x](u):l instanceof Date?new l.constructor(u):new Date(u)}function Et(l,u){return Ca(u||l,l)}function F2(l,u,d){return Ca(l,+Et(l)+u)}function qc(l,u,d){return F2(l,u*G2)}let Z2={};function eo(){return Z2}function tu(l,u){var w,b,p,j;const d=eo(),o=(u==null?void 0:u.weekStartsOn)??((b=(w=u==null?void 0:u.locale)==null?void 0:w.options)==null?void 0:b.weekStartsOn)??d.weekStartsOn??((j=(p=d.locale)==null?void 0:p.options)==null?void 0:j.weekStartsOn)??0,x=Et(l,u==null?void 0:u.in),m=x.getDay(),g=(m<o?7:0)+m-o;return x.setDate(x.getDate()-g),x.setHours(0,0,0,0),x}function Jc(l,u){return tu(l,{...u,weekStartsOn:1})}function Ig(l,u){const d=Et(l,u==null?void 0:u.in),o=d.getFullYear(),x=Ca(d,0);x.setFullYear(o+1,0,4),x.setHours(0,0,0,0);const m=Jc(x),g=Ca(d,0);g.setFullYear(o,0,4),g.setHours(0,0,0,0);const w=Jc(g);return d.getTime()>=m.getTime()?o+1:d.getTime()>=w.getTime()?o:o-1}function Ax(l){const u=Et(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 Q2(l,...u){const d=Ca.bind(null,u.find(o=>typeof o=="object"));return u.map(d)}function kx(l,u){const d=Et(l,u==null?void 0:u.in);return d.setHours(0,0,0,0),d}function W2(l,u,d){const[o,x]=Q2(d==null?void 0:d.in,l,u),m=kx(o),g=kx(x),w=+m-Ax(m),b=+g-Ax(g);return Math.round((w-b)/Y2)}function X2(l,u){const d=Ig(l,u),o=Ca(l,0);return o.setFullYear(d,0,4),o.setHours(0,0,0,0),Jc(o)}function J2(l,u){let d,o=u==null?void 0:u.in;return l.forEach(x=>{!o&&typeof x=="object"&&(o=Ca.bind(null,x));const m=Et(x,o);(!d||d<m||isNaN(+m))&&(d=m)}),Ca(o,d||NaN)}function I2(l,u){let d,o=u==null?void 0:u.in;return l.forEach(x=>{!o&&typeof x=="object"&&(o=Ca.bind(null,x));const m=Et(x,o);(!d||d>m||isNaN(+m))&&(d=m)}),Ca(o,d||NaN)}function K2(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function P2(l){return!(!K2(l)&&typeof l!="number"||isNaN(+Et(l)))}function eS(l){return u=>{const o=(l?Math[l]:Math.trunc)(u);return o===0?0:o}}function tS(l,u){return+Et(l)-+Et(u)}function zx(l,u,d){const o=tS(l,u)/$2;return eS(d==null?void 0:d.roundingMethod)(o)}function aS(l,u){const d=Et(l,u==null?void 0:u.in);return d.setFullYear(d.getFullYear(),0,1),d.setHours(0,0,0,0),d}const nS={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"}},lS=(l,u,d)=>{let o;const x=nS[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 bf(l){return(u={})=>{const d=u.width?String(u.width):l.defaultWidth;return l.formats[d]||l.formats[l.defaultWidth]}}const sS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},rS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},iS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},uS={date:bf({formats:sS,defaultWidth:"full"}),time:bf({formats:rS,defaultWidth:"full"}),dateTime:bf({formats:iS,defaultWidth:"full"})},cS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},oS=(l,u,d,o)=>cS[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 g=l.defaultFormattingWidth||l.defaultWidth,w=d!=null&&d.width?String(d.width):g;x=l.formattingValues[w]||l.formattingValues[g]}else{const g=l.defaultWidth,w=d!=null&&d.width?String(d.width):l.defaultWidth;x=l.values[w]||l.values[g]}const m=l.argumentCallback?l.argumentCallback(u):u;return x[m]}}const dS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hS={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"]},mS={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"]},xS={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"}},gS={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"}},yS=(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"},vS={ordinalNumber:yS,era:Wi({values:dS,defaultWidth:"wide"}),quarter:Wi({values:fS,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Wi({values:hS,defaultWidth:"wide"}),day:Wi({values:mS,defaultWidth:"wide"}),dayPeriod:Wi({values:xS,defaultWidth:"wide",formattingValues:gS,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 g=m[0],w=o&&l.parsePatterns[o]||l.parsePatterns[l.defaultParseWidth],b=Array.isArray(w)?bS(w,M=>M.test(g)):pS(w,M=>M.test(g));let p;p=l.valueCallback?l.valueCallback(b):b,p=d.valueCallback?d.valueCallback(p):p;const j=u.slice(g.length);return{value:p,rest:j}}}function pS(l,u){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&u(l[d]))return d}function bS(l,u){for(let d=0;d<l.length;d++)if(u(l[d]))return d}function SS(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 g=l.valueCallback?l.valueCallback(m[0]):m[0];g=d.valueCallback?d.valueCallback(g):g;const w=u.slice(x.length);return{value:g,rest:w}}}const NS=/^(\d+)(th|st|nd|rd)?/i,wS=/\d+/i,jS={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},MS={any:[/^b/i,/^(a|c)/i]},ES={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},TS={any:[/1/i,/2/i,/3/i,/4/i]},CS={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},OS={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]},DS={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},RS={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]},_S={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},AS={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}},kS={ordinalNumber:SS({matchPattern:NS,parsePattern:wS,valueCallback:l=>parseInt(l,10)}),era:Xi({matchPatterns:jS,defaultMatchWidth:"wide",parsePatterns:MS,defaultParseWidth:"any"}),quarter:Xi({matchPatterns:ES,defaultMatchWidth:"wide",parsePatterns:TS,defaultParseWidth:"any",valueCallback:l=>l+1}),month:Xi({matchPatterns:CS,defaultMatchWidth:"wide",parsePatterns:OS,defaultParseWidth:"any"}),day:Xi({matchPatterns:DS,defaultMatchWidth:"wide",parsePatterns:RS,defaultParseWidth:"any"}),dayPeriod:Xi({matchPatterns:_S,defaultMatchWidth:"any",parsePatterns:AS,defaultParseWidth:"any"})},zS={code:"en-US",formatDistance:lS,formatLong:uS,formatRelative:oS,localize:vS,match:kS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function US(l,u){const d=Et(l,u==null?void 0:u.in);return W2(d,aS(d))+1}function HS(l,u){const d=Et(l,u==null?void 0:u.in),o=+Jc(d)-+X2(d);return Math.round(o/Jg)+1}function Kg(l,u){var j,M,_,A;const d=Et(l,u==null?void 0:u.in),o=d.getFullYear(),x=eo(),m=(u==null?void 0:u.firstWeekContainsDate)??((M=(j=u==null?void 0:u.locale)==null?void 0:j.options)==null?void 0:M.firstWeekContainsDate)??x.firstWeekContainsDate??((A=(_=x.locale)==null?void 0:_.options)==null?void 0:A.firstWeekContainsDate)??1,g=Ca((u==null?void 0:u.in)||l,0);g.setFullYear(o+1,0,m),g.setHours(0,0,0,0);const w=tu(g,u),b=Ca((u==null?void 0:u.in)||l,0);b.setFullYear(o,0,m),b.setHours(0,0,0,0);const p=tu(b,u);return+d>=+w?o+1:+d>=+p?o:o-1}function LS(l,u){var w,b,p,j;const d=eo(),o=(u==null?void 0:u.firstWeekContainsDate)??((b=(w=u==null?void 0:u.locale)==null?void 0:w.options)==null?void 0:b.firstWeekContainsDate)??d.firstWeekContainsDate??((j=(p=d.locale)==null?void 0:p.options)==null?void 0:j.firstWeekContainsDate)??1,x=Kg(l,u),m=Ca((u==null?void 0:u.in)||l,0);return m.setFullYear(x,0,o),m.setHours(0,0,0,0),tu(m,u)}function qS(l,u){const d=Et(l,u==null?void 0:u.in),o=+tu(d,u)-+LS(d,u);return Math.round(o/Jg)+1}function lt(l,u){const d=l<0?"-":"",o=Math.abs(l).toString().padStart(u,"0");return d+o}const Hl={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"},Ux={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 Hl.y(l,u)},Y:function(l,u,d,o){const x=Kg(l,o),m=x>0?x:1-x;if(u==="YY"){const g=m%100;return lt(g,2)}return u==="Yo"?d.ordinalNumber(m,{unit:"year"}):lt(m,u.length)},R:function(l,u){const d=Ig(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 Hl.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=qS(l,o);return u==="wo"?d.ordinalNumber(x,{unit:"week"}):lt(x,u.length)},I:function(l,u,d){const o=HS(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"}):Hl.d(l,u)},D:function(l,u,d){const o=US(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 Hl.h(l,u)},H:function(l,u,d){return u==="Ho"?d.ordinalNumber(l.getHours(),{unit:"hour"}):Hl.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"}):Hl.m(l,u)},s:function(l,u,d){return u==="so"?d.ordinalNumber(l.getSeconds(),{unit:"second"}):Hl.s(l,u)},S:function(l,u){return Hl.S(l,u)},X:function(l,u,d){const o=l.getTimezoneOffset();if(o===0)return"Z";switch(u){case"X":return Lx(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 Lx(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"+Hx(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"+Hx(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 Hx(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 Lx(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 qx=(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"})}},Pg=(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"})}},VS=(l,u)=>{const d=l.match(/(P+)(p+)?/)||[],o=d[1],x=d[2];if(!x)return qx(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}}",qx(o,u)).replace("{{time}}",Pg(x,u))},BS={p:Pg,P:VS},YS=/^D+$/,$S=/^Y+$/,GS=["D","DD","YY","YYYY"];function FS(l){return YS.test(l)}function ZS(l){return $S.test(l)}function QS(l,u,d){const o=WS(l,u,d);if(console.warn(o),GS.includes(l))throw new RangeError(o)}function WS(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 XS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,JS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,IS=/^'([^]*?)'?$/,KS=/''/g,PS=/[a-zA-Z]/;function Ts(l,u,d){var j,M,_,A;const o=eo(),x=o.locale??zS,m=o.firstWeekContainsDate??((M=(j=o.locale)==null?void 0:j.options)==null?void 0:M.firstWeekContainsDate)??1,g=o.weekStartsOn??((A=(_=o.locale)==null?void 0:_.options)==null?void 0:A.weekStartsOn)??0,w=Et(l,d==null?void 0:d.in);if(!P2(w))throw new RangeError("Invalid time value");let b=u.match(JS).map(E=>{const T=E[0];if(T==="p"||T==="P"){const C=BS[T];return C(E,x.formatLong)}return E}).join("").match(XS).map(E=>{if(E==="''")return{isToken:!1,value:"'"};const T=E[0];if(T==="'")return{isToken:!1,value:eN(E)};if(Ux[T])return{isToken:!0,value:E};if(T.match(PS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:E}});x.localize.preprocessor&&(b=x.localize.preprocessor(w,b));const p={firstWeekContainsDate:m,weekStartsOn:g,locale:x};return b.map(E=>{if(!E.isToken)return E.value;const T=E.value;(ZS(T)||FS(T))&&QS(T,u,String(l));const C=Ux[T[0]];return C(w,T,x.localize,p)}).join("")}function eN(l){const u=l.match(IS);return u?u[1].replace(KS,"'"):l}function tN(l,u){return+Et(l)>+Et(u)}function aN(l,u){return+Et(l)<+Et(u)}function nN(l,u){const d=Et(l,u==null?void 0:u.in);return d.setMinutes(0,0,0),d}const Sf=[{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"}}],Vc=[{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"}],Yn=160,Bc=14,lN=10,sN=7,Vx=4,ey=({configs:l,currentProjectId:u,onEditJob:d,queueStatus:o,queueAnalytics:x})=>{const m=V.useMemo(()=>nN(new Date),[]),g=V.useMemo(()=>qc(m,24),[m]),w=V.useMemo(()=>qc(m,-24),[m]),b=g,p=V.useMemo(()=>{const te=[];for(let K=0;K<=24;K++)te.push(qc(m,K));return te},[m]),j=V.useMemo(()=>{const te=[];return l.forEach(({projectId:K,config:oe})=>{const X={executor:oe.executorEnabled!==!1?oe.cronSchedule:null,reviewer:oe.reviewerEnabled?oe.reviewerSchedule:null,qa:oe.qa.enabled?oe.qa.schedule:null,audit:oe.audit.enabled?oe.audit.schedule:null,slicer:oe.roadmapScanner.enabled?oe.roadmapScanner.slicerSchedule:null},J=oe.cronScheduleOffset||0;Object.entries(X).forEach(([$,H])=>{if(H)try{const ae=B2.CronExpressionParser.parse(H,{currentDate:m,endDate:g,iterator:!0});for(;ae.hasNext();){const B=ae.next(),de=new Date(B.getTime());de.setMinutes(de.getMinutes()+J),tN(de,m)&&aN(de,g)&&te.push({projectId:K,jobType:$,time:de})}}catch(ae){console.error(`Failed to parse cron "${H}" for ${K}/${$}`,ae)}})}),te},[l,m,g]),M=V.useMemo(()=>{const te=new Set;return l.length===0||(l.every(K=>K.config.executorEnabled===!1)&&te.add("executor"),l.every(K=>!K.config.reviewerEnabled)&&te.add("reviewer"),l.every(K=>!K.config.qa.enabled)&&te.add("qa"),l.every(K=>!K.config.audit.enabled)&&te.add("audit"),l.every(K=>!K.config.roadmapScanner.enabled)&&te.add("slicer")),te},[l]),_=V.useMemo(()=>{const te=new Map;let K=0;return l.forEach(oe=>{oe.projectId===u||(te.set(oe.projectId,K%Vc.length),K++)}),te},[l,u]),A=te=>zx(te,m),E=V.useMemo(()=>{const te=[];for(let K=0;K<=24;K++)te.push(qc(w,K));return te},[w]),T=te=>{const K=I2([J2([te,w]),b]);return zx(K,w)},C=V.useMemo(()=>{const te=(x==null?void 0:x.recentRuns)??[],K=new Map;for(const oe of te){const X=oe.providerKey||"default",J=new Date(oe.startedAt*1e3),$=oe.finishedAt?new Date(oe.finishedAt*1e3):new Date;$<w||J>b||(K.has(X)||K.set(X,[]),K.get(X).push({id:oe.id,jobType:oe.jobType,status:oe.status,projectPath:oe.projectPath,startedAt:J,finishedAt:$,throttledCount:oe.throttledCount}))}if(o!=null&&o.running){const oe=o.running.providerKey??"default";K.has(oe)||K.set(oe,[]),K.get(oe).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(K.entries()).sort(([oe],[X])=>oe.localeCompare(X)).map(([oe,X])=>({providerKey:oe,runs:X.sort((J,$)=>J.startedAt.getTime()-$.startedAt.getTime())}))},[b,w,x,o]),ne=te=>te.split(/[-_]/).map(K=>K.charAt(0).toUpperCase()+K.slice(1)).join(" "),I=l.length>1,le=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:p.map((te,K)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},K))});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."})]}),I&&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(te=>te.projectId!==u).slice(0,5).map(te=>{const K=_.get(te.projectId)??0,oe=Vc[K],X=(te.projectId.split("/").pop()??te.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 ${oe.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:te.projectId,children:X})]},te.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+Yn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Yn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:p.map((te,K)=>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:K*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ts(te,"HH:mm")})},K))})]}),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."})}),Sf.map(te=>{const K=M.has(te.id),oe=j.filter(J=>J.jobType===te.id);if(!I)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${K?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Yn},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 ${te.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:te.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[le,oe.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:K?"Disabled":"No runs in this window"})}):oe.map((J,$)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(J.projectId,J.jobType),style:{left:A(J.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${te.color.bg} ${te.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${te.label} at ${Ts(J.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-10",children:Ts(J.time,"HH:mm")})},$))]})]},te.id);const X=l.length*Bc+Vx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${K?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Yn,height:X},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 ${te.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:te.label})]}),l.map(J=>{const $=J.projectId===u,H=(J.projectId.split("/").pop()??J.projectId).slice(0,14),ae=_.get(J.projectId)??0,B=$?te.color.bg:Vc[ae].bg;return s.jsxs("div",{style:{height:Bc},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:J.projectId,children:$?`${H} ★`:H})]},J.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:X},children:[le,l.map((J,$)=>{const H=J.projectId===u,ae=oe.filter(re=>re.projectId===J.projectId),B=Vx+$*Bc,de=H?lN:sN,pe=Math.floor((Bc-de)/2),ve=_.get(J.projectId)??0,G=H?{bg:te.color.bg,border:te.color.border}:Vc[ve];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}}),ae.map((re,xe)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(J.projectId,re.jobType),style:{left:A(re.time)-3,top:B+pe,height:de},className:`absolute w-6 rounded border ${G.bg} ${G.border} ${H?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${J.projectId} · ${te.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")})},xe))]},J.projectId)}),oe.length===0&&!K&&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"})})]})]},te.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Yn+A(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})}),s.jsxs("div",{className:"p-3 bg-slate-900/40 flex items-center gap-4 text-[10px] text-slate-500",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-1.5 h-3 rounded bg-blue-500/50 border border-blue-500"}),s.jsx("span",{children:"Each block = one scheduled run"})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-[1px] h-4 bg-rose-500"}),s.jsx("span",{children:"Current Time"})]}),I&&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+Yn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Yn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:E.map((te,K)=>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:K*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ts(te,"HH:mm")})},K))})]}),s.jsx("div",{className:"relative",children:C.map(({providerKey:te,runs:K})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${te}`,children:[s.jsxs("div",{style:{width:Yn},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:te,children:ne(te)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:te})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:E.map((oe,X)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},X))}),K.map(oe=>{const X=Sf.find(ve=>ve.id===oe.jobType)??Sf[0],J=T(oe.startedAt),$=T(oe.finishedAt),H=Math.max($-J,8),ae=oe.status==="running",B=oe.status==="error"||oe.status==="failed"||oe.status==="errored",de=ae?"bg-green-500":B?"bg-red-500":X.color.bg,pe=ae?"border-green-400/60":B?"border-red-400/60":X.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${de} ${pe} opacity-85 shadow-lg ${ae?"animate-pulse":""}`,style:{left:J,width:H},title:`${te} • ${X.label} • ${Ts(oe.startedAt,"MMM d HH:mm")} • ${oe.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:X.label}),s.jsx("span",{className:"text-white/70",children:oe.status}),oe.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",oe.throttledCount,"x"]})]})},`${te}-${oe.id}-${oe.startedAt.getTime()}`)})]})]},te))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Yn+T(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},g)=>{const w=Ke.useId(),b=m.id??w,p=d?`${b}-error`:void 0,j=!d&&o?`${b}-help`:void 0,M=[p,j].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:g,id:b,"aria-describedby":M,"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:j,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});dt.displayName="Input";const va=Ke.forwardRef(({className:l="",label:u,error:d,helperText:o,options:x,value:m,onChange:g,children:w,...b},p)=>{const j=Ke.useId(),M=b.id??j,_=d?`${M}-error`:void 0,A=!d&&o?`${M}-help`:void 0,E=[_,A].filter(Boolean).join(" ")||void 0,T=C=>{g&&g(C.target.value)};return s.jsxs("div",{className:"w-full",children:[u&&s.jsx("label",{htmlFor:M,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:M,"aria-describedby":E,"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:T,...b,children:x?x.map(C=>s.jsx("option",{value:C.value,children:C.label},C.value)):w}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Rb,{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:A,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});va.displayName="Select";const ty=({tabs:l,activeTab:u,onChange:d,className:o=""})=>{var b,p;const[x,m]=Ke.useState((b=l[0])==null?void 0:b.id),g=u||x,w=j=>{d?d(j):m(j)};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(j=>s.jsx("button",{onClick:()=>w(j.id),className:`
|
|
379
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
380
|
+
${g===j.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
381
|
+
`,children:j.label},j.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=l.find(j=>j.id===g))==null?void 0:p.content})]})},au=[{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"}],Qf=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am"}}];function _r(l){return l.trim().replace(/\s+/g," ")}function Rr(l,u){return _r(l)===_r(u)}function rN(l){if(l)return Qf.find(u=>u.id===l)}function ay(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 iN(l,u,d,o,x){return Qf.find(m=>ay(m,l,u,d,o,x))}function ny(l,u,d,o,x,m){const g=rN(l);return g&&ay(g,u,d,o,x,m)?g:iN(u,d,o,x,m)}function Nf(l){const u=_r(l),d=u.split(/\s+/);if(d.length!==5)return u;const[o,x,m,g,w]=d,b=/^\d+$/.test(o),p=au.find(j=>_r(j.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==="*"&&g==="*"&&w==="*"){const j=parseInt(x.replace("*/",""),10);return o==="0"?`Every ${j} hours`:`Every ${j} hours at :${o.padStart(2,"0")}`}if(o==="0"&&x.startsWith("*/"))return`Every ${parseInt(x.replace("*/",""),10)} hours`;if(o==="0"&&x.includes("-")){const[j,M]=x.split("-");return`Every hour from ${Ji(j)} to ${Ji(M)}`}if(b&&x.includes("-")&&m==="*"&&g==="*"&&w==="*"){const[j,M]=x.split("-");return`Every hour from ${Ii(j,o)} to ${Ii(M,o)}`}if(o==="0"&&x.includes(",")){const j=x.split(",").map(Ji);return j.length<=3?`At ${j.join(" and ")}`:`At ${j.slice(0,-1).join(", ")}, and ${j[j.length-1]}`}if(b&&x.includes(",")&&m==="*"&&g==="*"&&(w==="*"||w==="1-5")){const j=x.split(",").map(_=>Ii(_,o)),M=w==="1-5"?"Weekdays at ":"At ";return j.length<=3?`${M}${j.join(" and ")}`:`${M}${j.slice(0,-1).join(", ")}, and ${j[j.length-1]}`}return o==="0"&&x!=="*"&&m==="*"&&g==="*"&&w==="*"?`Daily at ${Ji(x)}`:b&&x!=="*"&&m==="*"&&g==="*"&&w==="*"?`Daily at ${Ii(x,o)}`:o==="0"&&x!=="*"&&m==="*"&&g==="*"&&w==="1-5"?`Weekdays at ${Ji(x)}`:b&&x!=="*"&&m==="*"&&g==="*"&&w==="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 ly(l){const u=_r(l),d=au.find(o=>_r(o.value)===u);return(d==null?void 0:d.value)??"__custom__"}function uN(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 cN(l){const u={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",u)}function oN(l){const u=new Date,d=l.getTime()-u.getTime(),o=Math.floor(d/6e4);return o>=0&&o<30}const dN=()=>{var Jn,In,Kn,sn,Pn,el,ks,zs,zt;const{addToast:l,selectedProjectId:u,globalModeLoading:d}=la(),o=Kc(),[x,m]=V.useState(!1),[g,w]=V.useState(!1),[b,p]=V.useState([]);V.useEffect(()=>{d||Sg().then(p).catch(console.error)},[u,d]);const j=(ge,Ue)=>{ge===u||ge==="current"?o(`/settings?tab=schedules&mode=custom&jobType=${Ue}`):l({title:"Project Switch Required",message:`To edit ${ge}, please switch to that project in the sidebar.`,type:"info"})},[M,_]=V.useState(null),[A,E]=V.useState({executorSchedule:"",reviewerSchedule:"",isEditing:!1}),[T,C]=V.useState(null),[ne,I]=V.useState(null),[le,te]=V.useState(!1),{data:K,loading:oe,error:X,refetch:J}=$a(Ng,[u],{enabled:!d}),{data:$,loading:H,refetch:ae}=$a(Gf,[u],{enabled:!d});V.useEffect(()=>{const ge=setInterval(()=>{J()},3e4);return()=>clearInterval(ge)},[J]),V.useEffect(()=>{if(d)return;const ge=()=>{ox().then(C).catch(()=>{}),K1(24).then(I).catch(()=>{})};ge();const Ue=setInterval(ge,3e4);return()=>clearInterval(Ue)},[d,u]),V.useEffect(()=>{$&&!A.isEditing&&E({executorSchedule:$.cronSchedule,reviewerSchedule:$.reviewerSchedule,isEditing:!1})},[$,A.isEditing]);const B=()=>{ae(),J()},de=(ge,Ue)=>ge instanceof Error?ge.message:Ue,pe=async()=>{if(K){m(!0);try{K.paused?(await Pi(),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(ge){l({title:"Action Failed",message:de(ge,"Failed to toggle schedule state"),type:"error"})}finally{m(!1)}}},ve=()=>{$&&E({executorSchedule:$.cronSchedule,reviewerSchedule:$.reviewerSchedule,isEditing:!0})},G=()=>{$&&E({executorSchedule:$.cronSchedule,reviewerSchedule:$.reviewerSchedule,isEditing:!1})},re=async()=>{if($){w(!0);try{await Cs({cronSchedule:A.executorSchedule,reviewerSchedule:A.reviewerSchedule});let ge="";try{await Pi()}catch(Ue){ge=de(Ue,"Failed to reinstall cron schedules")}E(Ue=>({...Ue,isEditing:!1})),B(),l(ge?{title:"Schedules Saved (Cron Reinstall Failed)",message:ge,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(ge){l({title:"Save Failed",message:de(ge,"Failed to save schedules"),type:"error"})}finally{w(!1)}}},xe=async()=>{te(!0);try{const ge=await P1(!0);C(null),ox().then(C).catch(()=>{}),l({title:"Queue Cleared",message:`Removed ${ge.cleared} stale job${ge.cleared!==1?"s":""} from the queue.`,type:"success"})}catch(ge){l({title:"Clear Failed",message:ge instanceof Error?ge.message:"Failed to clear queue",type:"error"})}finally{te(!1)}},Ne=async(ge,Ue)=>{if($){_(ge);try{ge==="executor"?await Cs({executorEnabled:Ue}):ge==="reviewer"?await Cs({reviewerEnabled:Ue}):ge==="qa"?await Cs({qa:{...$.qa,enabled:Ue}}):ge==="audit"?await Cs({audit:{...$.audit,enabled:Ue}}):await Cs({roadmapScanner:{...$.roadmapScanner,enabled:Ue}});let Ut="";try{await Pi()}catch(rn){Ut=de(rn,"Failed to reinstall cron schedules")}B(),l(Ut?{title:"Job Saved (Cron Reinstall Failed)",message:Ut,type:"warning"}:{title:"Job Updated",message:`${ge[0].toUpperCase()+ge.slice(1)} ${Ue?"enabled":"disabled"}.`,type:"success"})}catch(Ut){l({title:"Update Failed",message:de(Ut,"Failed to update job configuration"),type:"error"})}finally{_(null)}}},U=ge=>{if(!ge)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const Ue=new Date(ge),Ut=oN(Ue);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Ut&&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:uN(Ue)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",cN(Ue),")"]})]})]})},O=(ge,Ue,Ut,rn)=>{const Us=ly(Ue),Yl=Us==="__custom__";return s.jsxs("div",{className:`space-y-3 ${rn?"opacity-50 pointer-events-none":""}`,children:[s.jsx("div",{className:"flex items-center space-x-3",children:s.jsx(va,{label:`${ge} Preset`,options:au,value:Us,onChange:Ye=>{Ye!=="__custom__"&&Ut(Ye)},className:"flex-1"})}),Yl&&s.jsx(dt,{label:"Custom Cron Expression",value:Ue,onChange:Ye=>Ut(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:Nf(Ue)})]})]})},Q=ge=>{if(!ge||ge.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const Ue=[];return ge.balancedDelayMinutes>0&&Ue.push(`auto +${ge.balancedDelayMinutes}m`),ge.manualDelayMinutes>0&&Ue.push(`manual +${ge.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:[" ",Ue.join(" • ")]})]})};if(oe||H)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(X||!K||!$)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Qn,{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:(X==null?void 0:X.message)||"Unknown error"}),s.jsx(Ve,{onClick:()=>{J(),ae()},children:"Retry"})]});const ce=K.paused,ye=ce?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",he=ce?"Paused":"Active",me=ny($.scheduleBundleId,$.cronSchedule,$.reviewerSchedule,$.qa.schedule,$.audit.schedule,$.roadmapScanner.slicerSchedule||"35 */12 * * *"),we=(ge,Ue,Ut)=>!me||!Rr(me.schedules[ge],Ue)?Nf(Ut):`${me.label} • ${me.hints[ge]}`,Be=T!=null&&T.running?1:0,qe=(T==null?void 0:T.pending.total)??0,sa=(ne==null?void 0:ne.averageWaitSeconds)??null,pa=ne?ne.recentRuns.filter(ge=>ge.throttledCount>0).length:null,Bl=ge=>ge===null?"—":ge<60?`${Math.round(ge)}s`:`${Math.floor(ge/60)}m ${Math.round(ge%60)}s`,Xn=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(Le,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Bf,{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:T?Be:"—"}),(T==null?void 0:T.running)&&s.jsxs("div",{className:"text-[11px] text-slate-400 truncate mt-0.5",children:[T.running.jobType," · ",T.running.projectName]})]}),(Be>0||qe>0)&&s.jsx(Ve,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300 shrink-0",onClick:xe,loading:le,title:"Force clear all stale running and pending queue entries",children:"Clear"})]})}),s.jsx(Le,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(u1,{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:T?qe:"—"})]})]})}),s.jsx(Le,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(e1,{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:Bl(sa)})]})]})}),s.jsx(Le,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(z1,{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 ${pa&&pa>0?"text-yellow-300":"text-slate-100"}`,"data-testid":"overview-throttled",children:pa!==null?pa:"—"}),s.jsx("div",{className:"text-[11px] text-slate-500 mt-0.5",children:"in last 24h"})]})]})})]}),s.jsx(ey,{configs:b,currentProjectId:u,onEditJob:j,queueStatus:T,queueAnalytics:ne}),ne&&s.jsxs(Le,{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(T2,{analytics:ne})]})]}),Ga=s.jsxs("div",{className:"space-y-6",children:[s.jsx(Le,{className:`p-6 border-2 ${ye}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Wc,{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:he}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Ve,{variant:ce?"primary":"outline",size:"lg",onClick:pe,loading:x,children:ce?s.jsxs(s.Fragment,{children:[s.jsx(Gn,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(hg,{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(Le,{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"}):!A.isEditing&&s.jsxs(Ve,{variant:"ghost",size:"sm",onClick:ve,children:[s.jsx(j1,{className:"h-4 w-4 mr-1"}),"Edit"]})]}),A.isEditing?O("Executor",A.executorSchedule,ge=>E(Ue=>({...Ue,executorSchedule:ge})),$.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:we("executor",$.cronSchedule,K.executor.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:K.executor.schedule}),Q(K.executor)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),U(K.executor.nextRun)]}),s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${K.executor.installed?"text-green-400":"text-amber-400"}`,children:[s.jsx(Gc,{className:"h-4 w-4"}),s.jsx("span",{children:K.executor.installed?"Installed":"Not installed"})]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"Executor is disabled in settings."})})]}),s.jsxs(Le,{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"})]}),A.isEditing?O("Reviewer",A.reviewerSchedule,ge=>E(Ue=>({...Ue,reviewerSchedule:ge})),!$.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:we("reviewer",$.reviewerSchedule,K.reviewer.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:K.reviewer.schedule}),Q(K.reviewer)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),U(K.reviewer.nextRun)]}),s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${K.reviewer.installed?"text-green-400":"text-amber-400"}`,children:[s.jsx(Gc,{className:"h-4 w-4"}),s.jsx("span",{children:K.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(Le,{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(gg,{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:we("qa",$.qa.schedule,((Jn=K.qa)==null?void 0:Jn.schedule)??$.qa.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((In=K.qa)==null?void 0:In.schedule)??$.qa.schedule}),Q(K.qa)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),U((Kn=K.qa)==null?void 0:Kn.nextRun)]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"QA is disabled in settings."})]}),s.jsxs(Le,{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(iu,{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:we("audit",$.audit.schedule,((sn=K.audit)==null?void 0:sn.schedule)??$.audit.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((Pn=K.audit)==null?void 0:Pn.schedule)??$.audit.schedule}),Q(K.audit)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),U((el=K.audit)==null?void 0:el.nextRun)]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"Audit is disabled in settings."})]}),s.jsxs(Le,{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(cg,{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:we("slicer",$.roadmapScanner.slicerSchedule,((ks=K.planner)==null?void 0:ks.schedule)??$.roadmapScanner.slicerSchedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((zs=K.planner)==null?void 0:zs.schedule)??$.roadmapScanner.slicerSchedule}),Q(K.planner)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),U((zt=K.planner)==null?void 0:zt.nextRun)]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"Planner uses roadmap scanner scheduling."})]})]}),s.jsxs(Le,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(Qc,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),K.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:K.entries.map((ge,Ue)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:ge},Ue))})]}),A.isEditing&&s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-4 border-t border-slate-800",children:[s.jsx(Ve,{variant:"ghost",onClick:G,children:"Cancel"}),s.jsxs(Ve,{onClick:re,loading:g,children:[s.jsx(Gc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]}),Fa=s.jsxs(Le,{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(Xt,{checked:$.executorEnabled!==!1,disabled:M!==null,"aria-label":"Toggle executor automation",onChange:ge=>Ne("executor",ge)})]}),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(Xt,{checked:$.reviewerEnabled,disabled:M!==null,"aria-label":"Toggle reviewer automation",onChange:ge=>Ne("reviewer",ge)})]}),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(Xt,{checked:$.qa.enabled,disabled:M!==null,"aria-label":"Toggle QA automation",onChange:ge=>Ne("qa",ge)})]}),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(Xt,{checked:$.audit.enabled,disabled:M!==null,"aria-label":"Toggle audit automation",onChange:ge=>Ne("audit",ge)})]}),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(Xt,{checked:$.roadmapScanner.enabled,disabled:M!==null,"aria-label":"Toggle planner automation",onChange:ge=>Ne("planner",ge)})]})]})]});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"}),me&&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:me.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",K.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(ty,{tabs:[{id:"overview",label:"Overview",content:Xn},{id:"schedules",label:"Schedules",content:Ga},{id:"jobs",label:"Jobs",content:Fa}]})]})},Or=({label:l,value:u,onChange:d,helperText:o,placeholder:x="5 */3 * * *"})=>{const m=ly(u),g=m==="__custom__",w=j=>{j!=="__custom__"&&d(j)},b=j=>{d(j.target.value)},p=au.find(j=>j.value===m);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(va,{label:l,value:m,onChange:w,options:au.map(j=>({label:j.label,value:j.value})),helperText:g?void 0:(p==null?void 0:p.description)||o}),g&&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)"]})]})]})},wf=l=>{var u,d,o,x,m,g,w;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:((g=l.roadmapScanner)==null?void 0:g.priorityMode)??"roadmap-first",issueColumn:((w=l.roadmapScanner)==null?void 0:w.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,primaryFallbackModel:l.primaryFallbackModel??l.claudeModel??"sonnet",secondaryFallbackModel:l.secondaryFallbackModel??l.primaryFallbackModel??l.claudeModel??"sonnet",claudeModel:l.primaryFallbackModel??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}}}},Bx=l=>{const u=ny(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:""}},fN=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>l.toUpperCase().includes(d)),hN=({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(Wb,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},mN=({envVars:l,onChange:u})=>{const[d,o]=Ke.useState(""),[x,m]=Ke.useState(""),[g,w]=Ke.useState(null),[b,p]=Ke.useState(""),j=()=>{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("")}},M=C=>{const ne={...l};delete ne[C],u(ne)},_=C=>{w(C),p(l[C])},A=()=>{g&&(u({...l,[g]:b}),w(null),p(""))},E=()=>{w(null),p("")},T=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:T.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No provider environment variables configured."}):T.map(([C,ne])=>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}),g===C?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:b,onChange:I=>p(I.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:A,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${C} value`,title:`Save ${C} value`,children:s.jsx(Gc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:E,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${C}`,title:`Cancel editing ${C}`,children:s.jsx(uu,{className:"h-4 w-4"})})]}):s.jsx(hN,{value:ne,isSensitive:fN(C)})]}),g!==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(mg,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>M(C),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${C}`,title:`Delete ${C}`,children:s.jsx(yg,{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(Ve,{onClick:j,disabled:!d.trim(),children:[s.jsx(ru,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},xN=({notifications:l,onChange:u})=>{const[d,o]=Ke.useState(null),[x,m]=Ke.useState(!1),[g,w]=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,g]}),w({type:"slack",url:"",events:[]}),m(!1)},j=(E,T)=>{const C=[...l.webhooks];C[E]=T,u({webhooks:C})},M=E=>{u({webhooks:l.webhooks.filter((T,C)=>C!==E)})},_=(E,T)=>E.includes(T)?E.filter(C=>C!==T):[...E,T],A=({webhook:E,onChange:T,onSave:C,onCancel:ne,isNew:I})=>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(va,{label:"Type",value:E.type,onChange:le=>{const te=le;T(te==="telegram"?{type:te,botToken:"",chatId:"",events:E.events}:{type:te,url:"",events:E.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),E.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(dt,{label:"Bot Token",type:"password",value:E.botToken||"",onChange:le=>T({...E,botToken:le.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(dt,{label:"Chat ID",value:E.chatId||"",onChange:le=>T({...E,chatId:le.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(dt,{label:"Webhook URL",type:"password",value:E.url||"",onChange:le=>T({...E,url:le.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(le=>s.jsx("button",{type:"button",onClick:()=>T({...E,events:_(E.events,le.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${E.events.includes(le.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:le.label},le.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Ve,{variant:"ghost",onClick:ne,children:"Cancel"}),s.jsx(Ve,{onClick:C,disabled:E.events.length===0||(E.type==="telegram"?!E.botToken||!E.chatId:!E.url),children:I?"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((E,T)=>s.jsx("div",{children:d===T?s.jsx(A,{webhook:E,onChange:C=>j(T,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:E.type}),E.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",E.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:E.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(T),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${E.type} webhook`,title:`Edit ${E.type} webhook`,children:s.jsx(mg,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>M(T),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${E.type} webhook`,title:`Delete ${E.type} webhook`,children:s.jsx(yg,{className:"h-4 w-4"})})]})]})},T))}),x?s.jsx(A,{webhook:g,onChange:w,onSave:p,onCancel:()=>m(!1),isNew:!0}):s.jsxs(Ve,{variant:"ghost",onClick:()=>m(!0),children:[s.jsx(ru,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},jf=({label:l,value:u,onChange:d,placeholder:o,helpText:x})=>{const[m,g]=Ke.useState(""),w=()=>{m.trim()&&!u.includes(m.trim())&&(d([...u,m.trim()]),g(""))},b=j=>{d(u.filter(M=>M!==j))},p=j=>{j.key==="Enter"&&(j.preventDefault(),w())};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(j=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[j,s.jsx("button",{type:"button",onClick:()=>b(j),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${j}`,title:`Remove ${j}`,children:s.jsx(uu,{className:"h-3 w-3"})})]},j))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:m,onChange:j=>g(j.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(Ve,{onClick:w,disabled:!m.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(ru,{className:"h-4 w-4"})})]}),x&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:x})]})},gN=()=>{const{addToast:l,projectName:u,selectedProjectId:d,globalModeLoading:o}=la(),[x,m]=Ke.useState(!1),[g,w]=Ke.useState(null),b=Ke.useRef(!1),[p,j]=Ke.useState("template"),[M,_]=Ke.useState("always-on"),[A,E]=Ke.useState("general"),T=Wn(),{data:C,loading:ne,error:I,refetch:le}=$a(Gf,[d],{enabled:!o}),{data:te,loading:K,refetch:oe}=$a(B1,[d],{enabled:!o}),X=te??[];Ke.useEffect(()=>{const U=new URLSearchParams(T.search),O=U.get("tab"),Q=U.get("mode");O&&E(O),Q==="custom"?j("custom"):Q==="template"&&j("template");const ce=U.get("jobType");ce&&O==="schedules"&&setTimeout(()=>{ae("current",ce)},300)},[T.search,C]);const J=Ke.useCallback(U=>{const O=Bx(U);j(O.mode),_(O.selectedTemplateId)},[]);Ke.useEffect(()=>{if(C)if(b.current)b.current=!1;else{const U=wf(C);w(U),J(U)}},[C,J]);const[$,H]=Ke.useState([]);Ke.useEffect(()=>{Sg().then(H).catch(console.error)},[C]);const ae=(U,O)=>{U===u||U==="current"?(p!=="custom"&&pe(),setTimeout(()=>{const Q={executor:"job-schedule-executor",reviewer:"job-schedule-reviewer",qa:"job-schedule-qa",audit:"job-schedule-audit",slicer:"job-schedule-slicer"},ce=document.getElementById(Q[O]||"");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 ${U}, please switch to that project in the sidebar.`,type:"info"})},B=(U,O)=>{w(Q=>Q&&{...Q,[U]:O})},de=()=>{if(j("template"),!g)return;const U=Bx(g);U.mode==="template"&&(_(U.selectedTemplateId),B("scheduleBundleId",U.selectedTemplateId))},pe=()=>{j("custom"),B("scheduleBundleId",null),_("")},ve=U=>{_(U.id),w(O=>O&&{...O,cronSchedule:U.schedules.executor,reviewerSchedule:U.schedules.reviewer,scheduleBundleId:U.id,qa:{...O.qa,schedule:U.schedules.qa},audit:{...O.audit,schedule:U.schedules.audit},roadmapScanner:{...O.roadmapScanner,slicerSchedule:U.schedules.slicer},fallbackOnRateLimit:!0})},G=async()=>{var Q,ce,ye;if(!g)return;const U=g.cronSchedule!==(C==null?void 0:C.cronSchedule)||g.reviewerSchedule!==(C==null?void 0:C.reviewerSchedule)||g.cronScheduleOffset!==((C==null?void 0:C.cronScheduleOffset)??0)||g.schedulingPriority!==((C==null?void 0:C.schedulingPriority)??3)||g.executorEnabled!==((C==null?void 0:C.executorEnabled)??!0)||g.reviewerEnabled!==((C==null?void 0:C.reviewerEnabled)??!0)||g.queue.enabled!==(((Q=C==null?void 0:C.queue)==null?void 0:Q.enabled)??!0)||g.qa.enabled!==((C==null?void 0:C.qa.enabled)??!0)||g.qa.schedule!==(C==null?void 0:C.qa.schedule)||g.audit.enabled!==((C==null?void 0:C.audit.enabled)??!0)||g.audit.schedule!==(C==null?void 0:C.audit.schedule)||g.roadmapScanner.enabled!==(((ce=C==null?void 0:C.roadmapScanner)==null?void 0:ce.enabled)??!0)||(g.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((ye=C==null?void 0:C.roadmapScanner)==null?void 0:ye.slicerSchedule)||"35 */12 * * *"),O={};for(const[he,me]of Object.entries(g.jobProviders))me!=null&&me!==""&&(O[he]=me);m(!0);try{const he=await Cs({provider:g.provider,providerLabel:g.providerLabel.trim(),defaultBranch:g.defaultBranch,prdDir:g.prdDir,branchPrefix:g.branchPrefix,branchPatterns:g.branchPatterns,executorEnabled:g.executorEnabled,reviewerEnabled:g.reviewerEnabled,minReviewScore:g.minReviewScore,maxRuntime:g.maxRuntime,reviewerMaxRuntime:g.reviewerMaxRuntime,maxLogSize:g.maxLogSize,cronSchedule:g.cronSchedule,reviewerSchedule:g.reviewerSchedule,scheduleBundleId:p==="template"?g.scheduleBundleId:null,cronScheduleOffset:g.cronScheduleOffset,schedulingPriority:g.schedulingPriority,maxRetries:g.maxRetries,reviewerMaxRetries:g.reviewerMaxRetries,reviewerRetryDelay:g.reviewerRetryDelay,providerEnv:g.providerEnv,notifications:g.notifications,prdPriority:g.prdPriority,roadmapScanner:g.roadmapScanner,templatesDir:g.templatesDir,boardProvider:g.boardProvider,jobProviders:O,autoMerge:g.autoMerge,autoMergeMethod:g.autoMergeMethod,fallbackOnRateLimit:g.fallbackOnRateLimit,primaryFallbackModel:g.primaryFallbackModel,secondaryFallbackModel:g.secondaryFallbackModel,claudeModel:g.primaryFallbackModel,qa:g.qa,audit:g.audit,queue:g.queue}),me=wf(he);w(me),J(me);let we="";if(U)try{await Pi()}catch(Be){we=Be instanceof Error?Be.message:"failed to reinstall cron schedules"}l(we?{title:"Settings Saved (Cron Reinstall Failed)",message:we,type:"warning"}:{title:"Settings Saved",message:U?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),b.current=!0,le(),oe()}catch(he){l({title:"Save Failed",message:he instanceof Error?he.message:"Failed to save configuration",type:"error"})}finally{m(!1)}},re=()=>{if(C){const U=wf(C);w(U),J(U),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},xe=async U=>{try{const O=await Eg(U);B("roadmapScanner",O.roadmapScanner);let Q="";try{await Pi()}catch(ce){Q=ce instanceof Error?ce.message:"Failed to reinstall cron schedules"}l(Q?{title:"Planner Saved (Cron Reinstall Failed)",message:Q,type:"warning"}:{title:U?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${U?"enabled":"disabled"}.`,type:"success"})}catch(O){l({title:"Toggle Failed",message:O instanceof Error?O.message:"Failed to toggle roadmap scanner",type:"error"})}};if(ne||!g)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(I)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Qn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),s.jsx("div",{className:"text-sm text-slate-500",children:I.message}),s.jsx(Ve,{onClick:()=>le(),children:"Retry"})]});const Ne=[{id:"general",label:"General",content:s.jsx(Le,{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:g.defaultBranch,onChange:U=>B("defaultBranch",U.target.value)}),s.jsx(dt,{label:"PRD Directory",value:g.prdDir,onChange:U=>B("prdDir",U.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(dt,{label:"Branch Prefix",value:g.branchPrefix,onChange:U=>B("branchPrefix",U.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Xt,{label:"Enable PRD Executor",checked:g.executorEnabled,onChange:U=>B("executorEnabled",U)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Xt,{label:"Enable Automated Reviews",checked:g.reviewerEnabled,onChange:U=>B("reviewerEnabled",U)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Xt,{label:"Auto-merge approved PRs",checked:g.autoMerge,onChange:U=>B("autoMerge",U)})}),g.autoMerge&&s.jsx(va,{label:"Merge Method",value:g.autoMergeMethod,onChange:U=>B("autoMergeMethod",U),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(jf,{label:"Branch Patterns",value:g.branchPatterns,onChange:U=>B("branchPatterns",U),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(Le,{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(va,{label:"Provider",value:g.provider,onChange:U=>B("provider",U),options:[{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]}),s.jsx(dt,{label:"Provider Label",value:g.providerLabel,onChange:U=>B("providerLabel",U.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(va,{label:"Primary Fallback Model",value:g.primaryFallbackModel,onChange:U=>{const O=U;B("primaryFallbackModel",O),B("claudeModel",O)},options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"First native Claude model used for direct Claude execution and the first rate-limit fallback attempt"}),s.jsx(va,{label:"Secondary Fallback Model",value:g.secondaryFallbackModel,onChange:U=>B("secondaryFallbackModel",U),options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"Used only if the primary fallback model is also rate-limited"}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx(Xt,{label:"Fallback on Rate Limit",checked:g.fallbackOnRateLimit,onChange:U=>B("fallbackOnRateLimit",U)}),s.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"When enabled, Night Watch retries with the primary native Claude fallback model, then the secondary one if the primary is also rate-limited"})]})]})]}),s.jsxs(Le,{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:U,label:O})=>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:O}),s.jsx("div",{className:"w-64",children:s.jsx(va,{value:g.jobProviders[U]??"",onChange:Q=>{const ce={...g.jobProviders};Q===""?delete ce[U]:ce[U]=Q,B("jobProviders",ce)},options:[{label:"Use Global (default)",value:""},{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]})})]},U))})]}),s.jsxs(Le,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Provider Environment Variables"}),s.jsx(mN,{envVars:g.providerEnv,onChange:U=>B("providerEnv",U)})]})]})},{id:"runtime",label:"Runtime",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Le,{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:g.minReviewScore,onChange:U=>B("minReviewScore",Number(U.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:g.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(g.maxRuntime),onChange:U=>B("maxRuntime",Number(U.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(dt,{label:"Max Runtime (Reviewer)",type:"number",value:String(g.reviewerMaxRuntime),onChange:U=>B("reviewerMaxRuntime",Number(U.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(dt,{label:"Max Log Size",type:"number",value:String(g.maxLogSize),onChange:U=>B("maxLogSize",Number(U.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(Le,{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(g.reviewerMaxRetries),onChange:U=>{const O=Math.min(10,Math.max(0,Number(U.target.value||0)));B("reviewerMaxRetries",O)},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(g.reviewerRetryDelay),onChange:U=>{const O=Math.min(300,Math.max(0,Number(U.target.value||0)));B("reviewerRetryDelay",O)},helperText:"Wait time between retry attempts to let CI settle."})]})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs(Le,{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:pe,children:"Custom"})]})]}),s.jsx(ey,{configs:$,currentProjectId:d,onEditJob:ae}),p==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Qf.map(U=>{const O=M===U.id;return s.jsxs("button",{type:"button",onClick:()=>ve(U),className:`text-left p-4 rounded-lg border transition-colors ${O?"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:U.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:U.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",U.hints.executor],["Reviewer",U.hints.reviewer],["QA",U.hints.qa],["Audit",U.hints.audit],["Slicer",U.hints.slicer]].map(([Q,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:Q}),s.jsx("span",{className:"text-xs text-slate-400",children:ce})]},Q))})]},U.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:g.cronSchedule,onChange:U=>B("cronSchedule",U)})}),s.jsx("div",{id:"job-schedule-reviewer",children:s.jsx(Or,{label:"PR Review Schedule",value:g.reviewerSchedule,onChange:U=>B("reviewerSchedule",U)})}),s.jsx("div",{id:"job-schedule-qa",children:s.jsx(Or,{label:"QA Schedule",value:g.qa.schedule,onChange:U=>B("qa",{...g.qa,schedule:U})})}),s.jsx("div",{id:"job-schedule-audit",children:s.jsx(Or,{label:"Audit Schedule",value:g.audit.schedule,onChange:U=>B("audit",{...g.audit,schedule:U})})}),g.roadmapScanner.enabled&&s.jsx("div",{id:"job-schedule-slicer",children:s.jsx(Or,{label:"Planner Schedule",value:g.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:U=>B("roadmapScanner",{...g.roadmapScanner,slicerSchedule:U})})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(va,{label:"Scheduling Priority",value:String(g.schedulingPriority),onChange:U=>B("schedulingPriority",Number(U)),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(Xt,{checked:g.queue.enabled,onChange:U=>B("queue",{...g.queue,enabled:U})})]})}),s.jsx(dt,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(g.cronScheduleOffset),onChange:U=>{const O=Math.min(59,Math.max(0,Number(U.target.value||0)));B("cronScheduleOffset",O)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]})},{id:"notifications",label:"Notifications",content:s.jsxs(Le,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(xN,{notifications:g.notifications,onChange:U=>B("notifications",U)})]})},{id:"roadmap",label:"Planner",content:s.jsxs(Le,{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(Xt,{checked:g.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:xe})]}),g.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:g.roadmapScanner.roadmapPath,onChange:U=>B("roadmapScanner",{...g.roadmapScanner,roadmapPath:U.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(Or,{label:"Planner Schedule",value:g.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:U=>B("roadmapScanner",{...g.roadmapScanner,slicerSchedule:U})})]}),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(g.roadmapScanner.slicerMaxRuntime||""),onChange:U=>B("roadmapScanner",{...g.roadmapScanner,slicerMaxRuntime:Number(U.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(va,{label:"Planner Priority Mode",value:g.roadmapScanner.priorityMode||"roadmap-first",onChange:U=>B("roadmapScanner",{...g.roadmapScanner,priorityMode:U==="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(va,{label:"Planner Issue Column",value:g.roadmapScanner.issueColumn||"Draft",onChange:U=>B("roadmapScanner",{...g.roadmapScanner,issueColumn:U==="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(Le,{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(Xt,{checked:g.boardProvider.enabled,onChange:U=>B("boardProvider",{...g.boardProvider,enabled:U})})]}),g.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(va,{label:"Board Provider",value:g.boardProvider.provider,onChange:U=>B("boardProvider",{...g.boardProvider,provider:U}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),g.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(dt,{label:"Project Number",type:"number",value:String(g.boardProvider.projectNumber||""),onChange:U=>B("boardProvider",{...g.boardProvider,projectNumber:U.target.value?Number(U.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(dt,{label:"Repository",value:g.boardProvider.repo||"",onChange:U=>B("boardProvider",{...g.boardProvider,repo:U.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),g.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(Le,{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(Xt,{checked:g.qa.enabled,onChange:U=>B("qa",{...g.qa,enabled:U})})]}),g.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(g.qa.maxRuntime),onChange:U=>B("qa",{...g.qa,maxRuntime:Number(U.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(va,{label:"Artifacts",value:g.qa.artifacts,onChange:U=>B("qa",{...g.qa,artifacts:U}),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:g.qa.skipLabel,onChange:U=>B("qa",{...g.qa,skipLabel:U.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(jf,{label:"QA Branch Patterns",value:g.qa.branchPatterns,onChange:U=>B("qa",{...g.qa,branchPatterns:U}),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(Xt,{checked:g.qa.autoInstallPlaywright,onChange:U=>B("qa",{...g.qa,autoInstallPlaywright:U})})]})]})]})]})},{id:"audit",label:"Audit",content:s.jsxs(Le,{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(Xt,{checked:g.audit.enabled,onChange:U=>B("audit",{...g.audit,enabled:U})})]}),g.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(g.audit.maxRuntime),onChange:U=>B("audit",{...g.audit,maxRuntime:Number(U.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(Le,{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:g.templatesDir,onChange:U=>B("templatesDir",U.target.value),helperText:"Directory for custom template overrides"}),s.jsx(dt,{label:"Max Retries",type:"number",min:"1",value:String(g.maxRetries),onChange:U=>{const O=Math.max(1,Number(U.target.value||1));B("maxRetries",O)},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(jf,{label:"PRD Priority",value:g.prdPriority,onChange:U=>B("prdPriority",U),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(ty,{tabs:Ne,activeTab:A,onChange:E}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(Ve,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:re,children:[s.jsx(v1,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Ve,{onClick:G,loading:x,children:[s.jsx(b1,{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(Bf,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),s.jsx(Le,{className:"divide-y divide-slate-800",children:K?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):X.map((U,O)=>{const Q=U.status==="pass",ce=U.status==="warn",ye=Q?"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:U.name}),s.jsx("p",{className:"text-xs text-slate-500",children:U.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${ye}`,children:U.status.toUpperCase()})]},`${U.name}-${O}`)})})]})]})},yN=()=>(d2(),f2(),s.jsx(nb,{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(i2,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(u2,{}),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(Ap,{children:[s.jsx($n,{path:"/",element:s.jsx(p2,{})}),s.jsx($n,{path:"/prs",element:s.jsx(S2,{})}),s.jsx($n,{path:"/board",element:s.jsx(y2,{})}),s.jsx($n,{path:"/scheduling",element:s.jsx(dN,{})}),s.jsx($n,{path:"/logs",element:s.jsx(b2,{})}),s.jsx($n,{path:"/roadmap",element:s.jsx(N2,{})}),s.jsx($n,{path:"/settings",element:s.jsx(gN,{})}),s.jsx($n,{path:"*",element:s.jsx(Rp,{to:"/",replace:!0})})]})})})]}),s.jsx(o2,{})]})})),sy=document.getElementById("root");if(!sy)throw new Error("Could not find root element to mount to");const vN=zv.createRoot(sy);vN.render(s.jsx(Ke.StrictMode,{children:s.jsx(yN,{})}));
|