@jonit-dev/night-watch-cli 1.8.8-beta.10 → 1.8.8-beta.11
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 +346 -57
- package/dist/cli.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +4 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +25 -0
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/merge.d.ts +26 -0
- package/dist/commands/merge.d.ts.map +1 -0
- package/dist/commands/merge.js +159 -0
- package/dist/commands/merge.js.map +1 -0
- package/dist/commands/review.d.ts +0 -1
- package/dist/commands/review.d.ts.map +1 -1
- package/dist/commands/review.js +0 -13
- package/dist/commands/review.js.map +1 -1
- package/dist/commands/slice.d.ts +1 -0
- package/dist/commands/slice.d.ts.map +1 -1
- package/dist/commands/slice.js +19 -19
- package/dist/commands/slice.js.map +1 -1
- package/dist/scripts/night-watch-merger-cron.sh +321 -0
- package/dist/scripts/night-watch-pr-reviewer-cron.sh +1 -137
- package/dist/templates/slicer.md +54 -64
- package/dist/web/assets/index-CPQbZ1BL.css +1 -0
- package/dist/web/assets/index-CiRJZI4z.js +386 -0
- package/dist/web/assets/index-ZE5lOeJp.js +386 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
var Vp=Object.defineProperty;var Q0=l=>{throw TypeError(l)};var Yp=(l,r,c)=>r in l?Vp(l,r,{enumerable:!0,configurable:!0,writable:!0,value:c}):l[r]=c;var X0=(l,r,c)=>Yp(l,typeof r!="symbol"?r+"":r,c),of=(l,r,c)=>r.has(l)||Q0("Cannot "+c);var te=(l,r,c)=>(of(l,r,"read from private field"),c?c.call(l):r.get(l)),ut=(l,r,c)=>r.has(l)?Q0("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(l):r.set(l,c),Ee=(l,r,c,o)=>(of(l,r,"write to private field"),o?o.call(l,c):r.set(l,c),c),we=(l,r,c)=>(of(l,r,"access private method"),c);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))o(h);new MutationObserver(h=>{for(const f of h)if(f.type==="childList")for(const v of f.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&o(v)}).observe(document,{childList:!0,subtree:!0});function c(h){const f={};return h.integrity&&(f.integrity=h.integrity),h.referrerPolicy&&(f.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?f.credentials="include":h.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(h){if(h.ep)return;h.ep=!0;const f=c(h);fetch(h.href,f)}})();function Hf(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function $p(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var r=l.default;if(typeof r=="function"){var c=function o(){return this instanceof o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};c.prototype=r.prototype}else c={};return Object.defineProperty(c,"__esModule",{value:!0}),Object.keys(l).forEach(function(o){var h=Object.getOwnPropertyDescriptor(l,o);Object.defineProperty(c,o,h.get?h:{enumerable:!0,get:function(){return l[o]}})}),c}var df={exports:{}},Yi={};/**
|
|
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 J0;function Fp(){if(J0)return Yi;J0=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(o,h,f){var v=null;if(f!==void 0&&(v=""+f),h.key!==void 0&&(v=""+h.key),"key"in h){f={};for(var N in h)N!=="key"&&(f[N]=h[N])}else f=h;return h=f.ref,{$$typeof:l,type:o,key:v,ref:h!==void 0?h:null,props:f}}return Yi.Fragment=r,Yi.jsx=c,Yi.jsxs=c,Yi}var K0;function Gp(){return K0||(K0=1,df.exports=Fp()),df.exports}var s=Gp(),ff={exports:{}},Be={};/**
|
|
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 eg;function Pp(){if(eg)return Be;eg=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),v=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),j=Symbol.iterator;function D(A){return A===null||typeof A!="object"?null:(A=j&&A[j]||A["@@iterator"],typeof A=="function"?A:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,R={};function Q(A,se,me){this.props=A,this.context=se,this.refs=R,this.updater=me||C}Q.prototype.isReactComponent={},Q.prototype.setState=function(A,se){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,se,"setState")},Q.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Y(){}Y.prototype=Q.prototype;function G(A,se,me){this.props=A,this.context=se,this.refs=R,this.updater=me||C}var ee=G.prototype=new Y;ee.constructor=G,M(ee,Q.prototype),ee.isPureReactComponent=!0;var de=Array.isArray;function Z(){}var P={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function ne(A,se,me){var ye=me.ref;return{$$typeof:l,type:A,key:se,ref:ye!==void 0?ye:null,props:me}}function z(A,se){return ne(A.type,se,A.props)}function I(A){return typeof A=="object"&&A!==null&&A.$$typeof===l}function _(A){var se={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(me){return se[me]})}var ce=/\/+/g;function he(A,se){return typeof A=="object"&&A!==null&&A.key!=null?_(""+A.key):se.toString(36)}function q(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(Z,Z):(A.status="pending",A.then(function(se){A.status==="pending"&&(A.status="fulfilled",A.value=se)},function(se){A.status==="pending"&&(A.status="rejected",A.reason=se)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function $(A,se,me,ye,Ce){var Te=typeof A;(Te==="undefined"||Te==="boolean")&&(A=null);var Ve=!1;if(A===null)Ve=!0;else switch(Te){case"bigint":case"string":case"number":Ve=!0;break;case"object":switch(A.$$typeof){case l:case r:Ve=!0;break;case S:return Ve=A._init,$(Ve(A._payload),se,me,ye,Ce)}}if(Ve)return Ce=Ce(A),Ve=ye===""?"."+he(A,0):ye,de(Ce)?(me="",Ve!=null&&(me=Ve.replace(ce,"$&/")+"/"),$(Ce,se,me,"",function(ia){return ia})):Ce!=null&&(I(Ce)&&(Ce=z(Ce,me+(Ce.key==null||A&&A.key===Ce.key?"":(""+Ce.key).replace(ce,"$&/")+"/")+Ve)),se.push(Ce)),1;Ve=0;var Nt=ye===""?".":ye+":";if(de(A))for(var at=0;at<A.length;at++)ye=A[at],Te=Nt+he(ye,at),Ve+=$(ye,se,me,Te,Ce);else if(at=D(A),typeof at=="function")for(A=at.call(A),at=0;!(ye=A.next()).done;)ye=ye.value,Te=Nt+he(ye,at++),Ve+=$(ye,se,me,Te,Ce);else if(Te==="object"){if(typeof A.then=="function")return $(q(A),se,me,ye,Ce);throw se=String(A),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return Ve}function ie(A,se,me){if(A==null)return A;var ye=[],Ce=0;return $(A,ye,"","",function(Te){return se.call(me,Te,Ce++)}),ye}function ge(A){if(A._status===-1){var se=A._result;se=se(),se.then(function(me){(A._status===0||A._status===-1)&&(A._status=1,A._result=me)},function(me){(A._status===0||A._status===-1)&&(A._status=2,A._result=me)}),A._status===-1&&(A._status=0,A._result=se)}if(A._status===1)return A._result.default;throw A._result}var Se=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},De={map:ie,forEach:function(A,se,me){ie(A,function(){se.apply(this,arguments)},me)},count:function(A){var se=0;return ie(A,function(){se++}),se},toArray:function(A){return ie(A,function(se){return se})||[]},only:function(A){if(!I(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Be.Activity=T,Be.Children=De,Be.Component=Q,Be.Fragment=c,Be.Profiler=h,Be.PureComponent=G,Be.StrictMode=o,Be.Suspense=b,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Be.__COMPILER_RUNTIME={__proto__:null,c:function(A){return P.H.useMemoCache(A)}},Be.cache=function(A){return function(){return A.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(A,se,me){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ye=M({},A.props),Ce=A.key;if(se!=null)for(Te in se.key!==void 0&&(Ce=""+se.key),se)!W.call(se,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&se.ref===void 0||(ye[Te]=se[Te]);var Te=arguments.length-2;if(Te===1)ye.children=me;else if(1<Te){for(var Ve=Array(Te),Nt=0;Nt<Te;Nt++)Ve[Nt]=arguments[Nt+2];ye.children=Ve}return ne(A.type,Ce,ye)},Be.createContext=function(A){return A={$$typeof:v,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:f,_context:A},A},Be.createElement=function(A,se,me){var ye,Ce={},Te=null;if(se!=null)for(ye in se.key!==void 0&&(Te=""+se.key),se)W.call(se,ye)&&ye!=="key"&&ye!=="__self"&&ye!=="__source"&&(Ce[ye]=se[ye]);var Ve=arguments.length-2;if(Ve===1)Ce.children=me;else if(1<Ve){for(var Nt=Array(Ve),at=0;at<Ve;at++)Nt[at]=arguments[at+2];Ce.children=Nt}if(A&&A.defaultProps)for(ye in Ve=A.defaultProps,Ve)Ce[ye]===void 0&&(Ce[ye]=Ve[ye]);return ne(A,Te,Ce)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(A){return{$$typeof:N,render:A}},Be.isValidElement=I,Be.lazy=function(A){return{$$typeof:S,_payload:{_status:-1,_result:A},_init:ge}},Be.memo=function(A,se){return{$$typeof:x,type:A,compare:se===void 0?null:se}},Be.startTransition=function(A){var se=P.T,me={};P.T=me;try{var ye=A(),Ce=P.S;Ce!==null&&Ce(me,ye),typeof ye=="object"&&ye!==null&&typeof ye.then=="function"&&ye.then(Z,Se)}catch(Te){Se(Te)}finally{se!==null&&me.types!==null&&(se.types=me.types),P.T=se}},Be.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Be.use=function(A){return P.H.use(A)},Be.useActionState=function(A,se,me){return P.H.useActionState(A,se,me)},Be.useCallback=function(A,se){return P.H.useCallback(A,se)},Be.useContext=function(A){return P.H.useContext(A)},Be.useDebugValue=function(){},Be.useDeferredValue=function(A,se){return P.H.useDeferredValue(A,se)},Be.useEffect=function(A,se){return P.H.useEffect(A,se)},Be.useEffectEvent=function(A){return P.H.useEffectEvent(A)},Be.useId=function(){return P.H.useId()},Be.useImperativeHandle=function(A,se,me){return P.H.useImperativeHandle(A,se,me)},Be.useInsertionEffect=function(A,se){return P.H.useInsertionEffect(A,se)},Be.useLayoutEffect=function(A,se){return P.H.useLayoutEffect(A,se)},Be.useMemo=function(A,se){return P.H.useMemo(A,se)},Be.useOptimistic=function(A,se){return P.H.useOptimistic(A,se)},Be.useReducer=function(A,se,me){return P.H.useReducer(A,se,me)},Be.useRef=function(A){return P.H.useRef(A)},Be.useState=function(A){return P.H.useState(A)},Be.useSyncExternalStore=function(A,se,me){return P.H.useSyncExternalStore(A,se,me)},Be.useTransition=function(){return P.H.useTransition()},Be.version="19.2.4",Be}var tg;function Lf(){return tg||(tg=1,ff.exports=Pp()),ff.exports}var U=Lf();const qe=Hf(U);var hf={exports:{}},$i={},mf={exports:{}},gf={};/**
|
|
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 ag;function Zp(){return ag||(ag=1,(function(l){function r($,ie){var ge=$.length;$.push(ie);e:for(;0<ge;){var Se=ge-1>>>1,De=$[Se];if(0<h(De,ie))$[Se]=ie,$[ge]=De,ge=Se;else break e}}function c($){return $.length===0?null:$[0]}function o($){if($.length===0)return null;var ie=$[0],ge=$.pop();if(ge!==ie){$[0]=ge;e:for(var Se=0,De=$.length,A=De>>>1;Se<A;){var se=2*(Se+1)-1,me=$[se],ye=se+1,Ce=$[ye];if(0>h(me,ge))ye<De&&0>h(Ce,me)?($[Se]=Ce,$[ye]=ge,Se=ye):($[Se]=me,$[se]=ge,Se=se);else if(ye<De&&0>h(Ce,ge))$[Se]=Ce,$[ye]=ge,Se=ye;else break e}}return ie}function h($,ie){var ge=$.sortIndex-ie.sortIndex;return ge!==0?ge:$.id-ie.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var v=Date,N=v.now();l.unstable_now=function(){return v.now()-N}}var b=[],x=[],S=1,T=null,j=3,D=!1,C=!1,M=!1,R=!1,Q=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function ee($){for(var ie=c(x);ie!==null;){if(ie.callback===null)o(x);else if(ie.startTime<=$)o(x),ie.sortIndex=ie.expirationTime,r(b,ie);else break;ie=c(x)}}function de($){if(M=!1,ee($),!C)if(c(b)!==null)C=!0,Z||(Z=!0,_());else{var ie=c(x);ie!==null&&q(de,ie.startTime-$)}}var Z=!1,P=-1,W=5,ne=-1;function z(){return R?!0:!(l.unstable_now()-ne<W)}function I(){if(R=!1,Z){var $=l.unstable_now();ne=$;var ie=!0;try{e:{C=!1,M&&(M=!1,Y(P),P=-1),D=!0;var ge=j;try{t:{for(ee($),T=c(b);T!==null&&!(T.expirationTime>$&&z());){var Se=T.callback;if(typeof Se=="function"){T.callback=null,j=T.priorityLevel;var De=Se(T.expirationTime<=$);if($=l.unstable_now(),typeof De=="function"){T.callback=De,ee($),ie=!0;break t}T===c(b)&&o(b),ee($)}else o(b);T=c(b)}if(T!==null)ie=!0;else{var A=c(x);A!==null&&q(de,A.startTime-$),ie=!1}}break e}finally{T=null,j=ge,D=!1}ie=void 0}}finally{ie?_():Z=!1}}}var _;if(typeof G=="function")_=function(){G(I)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,he=ce.port2;ce.port1.onmessage=I,_=function(){he.postMessage(null)}}else _=function(){Q(I,0)};function q($,ie){P=Q(function(){$(l.unstable_now())},ie)}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($){$.callback=null},l.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<$?Math.floor(1e3/$):5},l.unstable_getCurrentPriorityLevel=function(){return j},l.unstable_next=function($){switch(j){case 1:case 2:case 3:var ie=3;break;default:ie=j}var ge=j;j=ie;try{return $()}finally{j=ge}},l.unstable_requestPaint=function(){R=!0},l.unstable_runWithPriority=function($,ie){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var ge=j;j=$;try{return ie()}finally{j=ge}},l.unstable_scheduleCallback=function($,ie,ge){var Se=l.unstable_now();switch(typeof ge=="object"&&ge!==null?(ge=ge.delay,ge=typeof ge=="number"&&0<ge?Se+ge:Se):ge=Se,$){case 1:var De=-1;break;case 2:De=250;break;case 5:De=1073741823;break;case 4:De=1e4;break;default:De=5e3}return De=ge+De,$={id:S++,callback:ie,priorityLevel:$,startTime:ge,expirationTime:De,sortIndex:-1},ge>Se?($.sortIndex=ge,r(x,$),c(b)===null&&$===c(x)&&(M?(Y(P),P=-1):M=!0,q(de,ge-Se))):($.sortIndex=De,r(b,$),C||D||(C=!0,Z||(Z=!0,_()))),$},l.unstable_shouldYield=z,l.unstable_wrapCallback=function($){var ie=j;return function(){var ge=j;j=ie;try{return $.apply(this,arguments)}finally{j=ge}}}})(gf)),gf}var ng;function Wp(){return ng||(ng=1,mf.exports=Zp()),mf.exports}var xf={exports:{}},ma={};/**
|
|
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 lg;function Ip(){if(lg)return ma;lg=1;var l=Lf();function r(b){var x="https://react.dev/errors/"+b;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)x+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+b+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var o={d:{f:c,r:function(){throw Error(r(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},h=Symbol.for("react.portal");function f(b,x,S){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:T==null?null:""+T,children:b,containerInfo:x,implementation:S}}var v=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function N(b,x){if(b==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return ma.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ma.createPortal=function(b,x){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(r(299));return f(b,x,null,S)},ma.flushSync=function(b){var x=v.T,S=o.p;try{if(v.T=null,o.p=2,b)return b()}finally{v.T=x,o.p=S,o.d.f()}},ma.preconnect=function(b,x){typeof b=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(b,x))},ma.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},ma.preinit=function(b,x){if(typeof b=="string"&&x&&typeof x.as=="string"){var S=x.as,T=N(S,x.crossOrigin),j=typeof x.integrity=="string"?x.integrity:void 0,D=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;S==="style"?o.d.S(b,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:T,integrity:j,fetchPriority:D}):S==="script"&&o.d.X(b,{crossOrigin:T,integrity:j,fetchPriority:D,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},ma.preinitModule=function(b,x){if(typeof b=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var S=N(x.as,x.crossOrigin);o.d.M(b,{crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(b)},ma.preload=function(b,x){if(typeof b=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var S=x.as,T=N(S,x.crossOrigin);o.d.L(b,S,{crossOrigin:T,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},ma.preloadModule=function(b,x){if(typeof b=="string")if(x){var S=N(x.as,x.crossOrigin);o.d.m(b,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(b)},ma.requestFormReset=function(b){o.d.r(b)},ma.unstable_batchedUpdates=function(b,x){return b(x)},ma.useFormState=function(b,x,S){return v.H.useFormState(b,x,S)},ma.useFormStatus=function(){return v.H.useHostTransitionStatus()},ma.version="19.2.4",ma}var sg;function rx(){if(sg)return xf.exports;sg=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(r){console.error(r)}}return l(),xf.exports=Ip(),xf.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 rg;function Qp(){if(rg)return $i;rg=1;var l=Wp(),r=Lf(),c=rx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function v(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 N(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(f(e)!==e)throw Error(o(188))}function x(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,n=t;;){var u=a.return;if(u===null)break;var d=u.alternate;if(d===null){if(n=u.return,n!==null){a=n;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===a)return b(u),e;if(d===n)return b(u),t;d=d.sibling}throw Error(o(188))}if(a.return!==n.return)a=u,n=d;else{for(var y=!1,E=u.child;E;){if(E===a){y=!0,a=u,n=d;break}if(E===n){y=!0,n=u,a=d;break}E=E.sibling}if(!y){for(E=d.child;E;){if(E===a){y=!0,a=d,n=u;break}if(E===n){y=!0,n=d,a=u;break}E=E.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 S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,j=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),G=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function _(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Symbol.for("react.client.reference");function he(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case Q:return"Profiler";case R:return"StrictMode";case de:return"Suspense";case Z:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case G:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:he(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}var q=Array.isArray,$=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},Se=[],De=-1;function A(e){return{current:e}}function se(e){0>De||(e.current=Se[De],Se[De]=null,De--)}function me(e,t){De++,Se[De]=e.current,e.current=t}var ye=A(null),Ce=A(null),Te=A(null),Ve=A(null);function Nt(e,t){switch(me(Te,t),me(Ce,e),me(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?v0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=v0(t),e=b0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(ye),me(ye,e)}function at(){se(ye),se(Ce),se(Te)}function ia(e){e.memoizedState!==null&&me(Ve,e);var t=ye.current,a=b0(t,e.type);t!==a&&(me(Ce,e),me(ye,a))}function xa(e){Ce.current===e&&(se(ye),se(Ce)),Ve.current===e&&(se(Ve),Hi._currentValue=ge)}var Dn,pn;function xe(e){if(Dn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Dn=t&&t[1]||"",pn=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Dn+e+pn}var _e=!1;function Ot(e,t){if(!e||_e)return"";_e=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ae){var K=ae}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(ae){K=ae}e.call(oe.prototype)}}else{try{throw Error()}catch(ae){K=ae}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ae){if(ae&&K&&typeof ae.stack=="string")return[ae.stack,K.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=n.DetermineComponentFrameRoot(),y=d[0],E=d[1];if(y&&E){var k=y.split(`
|
|
44
|
+
`),J=E.split(`
|
|
45
|
+
`);for(u=n=0;n<k.length&&!k[n].includes("DetermineComponentFrameRoot");)n++;for(;u<J.length&&!J[u].includes("DetermineComponentFrameRoot");)u++;if(n===k.length||u===J.length)for(n=k.length-1,u=J.length-1;1<=n&&0<=u&&k[n]!==J[u];)u--;for(;1<=n&&0<=u;n--,u--)if(k[n]!==J[u]){if(n!==1||u!==1)do if(n--,u--,0>u||k[n]!==J[u]){var re=`
|
|
46
|
+
`+k[n].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=n&&0<=u);break}}}finally{_e=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?xe(a):""}function At(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe("Lazy");case 13:return e.child!==t&&t!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return Ot(e.type,!1);case 11:return Ot(e.type.render,!1);case 1:return Ot(e.type,!0);case 31:return xe("Activity");default:return""}}function ya(e){try{var t="",a=null;do t+=At(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var ua=Object.prototype.hasOwnProperty,an=l.unstable_scheduleCallback,le=l.unstable_cancelCallback,pe=l.unstable_shouldYield,Re=l.unstable_requestPaint,Ue=l.unstable_now,Ge=l.unstable_getCurrentPriorityLevel,Ke=l.unstable_ImmediatePriority,kt=l.unstable_UserBlockingPriority,Mt=l.unstable_NormalPriority,Gt=l.unstable_LowPriority,ca=l.unstable_IdlePriority,$e=l.log,ba=l.unstable_setDisableYieldValue,rt=null,yt=null;function wt(e){if(typeof $e=="function"&&ba(e),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(rt,e)}catch{}}var jt=Math.clz32?Math.clz32:so,Rn=Math.log,Bs=Math.LN2;function so(e){return e>>>=0,e===0?32:31-(Rn(e)/Bs|0)|0}var il=256,Vs=262144,oa=4194304;function vn(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 Il(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var E=n&134217727;return E!==0?(n=E&~d,n!==0?u=vn(n):(y&=E,y!==0?u=vn(y):a||(a=E&~e,a!==0&&(u=vn(a))))):(E=n&~d,E!==0?u=vn(E):y!==0?u=vn(y):a||(a=n&~e,a!==0&&(u=vn(a)))),u===0?0:t!==0&&t!==u&&(t&d)===0&&(d=u&-u,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:u}function ul(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function du(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vr(){var e=oa;return oa<<=1,(oa&62914560)===0&&(oa=4194304),e}function Ys(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function cl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fu(e,t,a,n,u,d){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 E=e.entanglements,k=e.expirationTimes,J=e.hiddenUpdates;for(a=y&~a;0<a;){var re=31-jt(a),oe=1<<re;E[re]=0,k[re]=-1;var K=J[re];if(K!==null)for(J[re]=null,re=0;re<K.length;re++){var ae=K[re];ae!==null&&(ae.lane&=-536870913)}a&=~oe}n!==0&&pt(e,n,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~t))}function pt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-jt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function Sa(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-jt(a),u=1<<n;u&t|e[n]&t&&(e[n]|=t),a&=~u}}function Yr(e,t){var a=t&-t;return a=(a&42)!==0?1:$s(a),(a&(e.suspendedLanes|t))!==0?0:a}function $s(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 da(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fs(){var e=ie.p;return e!==0?e:(e=window.event,e===void 0?32:$0(e.type))}function $r(e,t){var a=ie.p;try{return ie.p=e,t()}finally{ie.p=a}}var nn=Math.random().toString(36).slice(2),_t="__reactFiber$"+nn,Pt="__reactProps$"+nn,An="__reactContainer$"+nn,Ql="__reactEvents$"+nn,hu="__reactListeners$"+nn,mu="__reactHandles$"+nn,gu="__reactResources$"+nn,Xl="__reactMarker$"+nn;function Gs(e){delete e[_t],delete e[Pt],delete e[Ql],delete e[hu],delete e[mu]}function kn(e){var t=e[_t];if(t)return t;for(var a=e.parentNode;a;){if(t=a[An]||a[_t]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=M0(e);e!==null;){if(a=e[_t])return a;e=M0(e)}return t}e=a,a=e.parentNode}return null}function Oe(e){if(e=e[_t]||e[An]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Na(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ln(e){var t=e[gu];return t||(t=e[gu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Bt(e){e[Xl]=!0}var xu=new Set,Fr={};function bn(e,t){ol(e,t),ol(e+"Capture",t)}function ol(e,t){for(Fr[e]=t,e=0;e<t.length;e++)xu.add(t[e])}var yu=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]*$"),pu={},_n={};function Gr(e){return ua.call(_n,e)?!0:ua.call(pu,e)?!1:yu.test(e)?_n[e]=!0:(pu[e]=!0,!1)}function Kt(e,t,a){if(Gr(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 Ps(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 ct(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 zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Pr(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 u=n.get,d=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(y){a=""+y,d.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 Jl(e){if(!e._valueTracker){var t=Sn(e)?"checked":"value";e._valueTracker=Pr(e,t,""+e[t])}}function dl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Sn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function sn(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 Zs=/[\n"\\]/g;function ea(e){return e.replace(Zs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ws(e,t,a,n,u,d,y,E){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=""+zt(t)):e.value!==""+zt(t)&&(e.value=""+zt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Kl(e,y,zt(t)):a!=null?Kl(e,y,zt(a)):n!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+zt(E):e.removeAttribute("name")}function fl(e,t,a,n,u,d,y,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Jl(e);return}a=a!=null?""+zt(a):"",t=t!=null?""+zt(t):a,E||t===e.value||(e.value=t),e.defaultValue=t}n=n??u,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=E?e.checked:!!n,e.defaultChecked=!!n,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Jl(e)}function Kl(e,t,a){t==="number"&&sn(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function zn(e,t,a,n){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&n&&(e[a].defaultSelected=!0)}else{for(a=""+zt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,n&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function es(e,t,a){if(t!=null&&(t=""+zt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+zt(a):""}function Zr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(q(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=zt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Jl(e)}function rn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var ts=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 as(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||ts.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 u in t)n=t[u],t.hasOwnProperty(u)&&a[u]!==n&&as(e,u,n)}else for(var d in t)t.hasOwnProperty(d)&&as(e,d,t[d])}function Is(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 ro=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),bu=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ns(e){return bu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $a(){}var Wr=null;function Qs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Un=null,hl=null;function Su(e){var t=Oe(e);if(t&&(e=t.stateNode)){var a=e[Pt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ws(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="'+ea(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var u=n[Pt]||null;if(!u)throw Error(o(90));Ws(n,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&dl(n)}break e;case"textarea":es(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&zn(e,!!a.multiple,t,!1)}}}var Ir=!1;function Qr(e,t,a){if(Ir)return e(t,a);Ir=!0;try{var n=e(t);return n}finally{if(Ir=!1,(Un!==null||hl!==null)&&(gc(),Un&&(t=Un,e=hl,hl=Un=null,Su(t),e)))for(t=0;t<e.length;t++)Su(e[t])}}function ls(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Pt]||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 un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xr=!1;if(un)try{var ss={};Object.defineProperty(ss,"passive",{get:function(){Xr=!0}}),window.addEventListener("test",ss,ss),window.removeEventListener("test",ss,ss)}catch{Xr=!1}var Nn=null,Xs=null,Js=null;function Zt(){if(Js)return Js;var e,t=Xs,a=t.length,n,u="value"in Nn?Nn.value:Nn.textContent,d=u.length;for(e=0;e<a&&t[e]===u[e];e++);var y=a-e;for(n=1;n<=y&&t[a-n]===u[d-n];n++);return Js=u.slice(e,1<n?1-n:void 0)}function rs(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 cn(){return!0}function qn(){return!1}function Ut(e){function t(a,n,u,d,y){this._reactName=a,this._targetInst=u,this.type=n,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?cn:qn,this.isPropagationStopped=qn,this}return T(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=cn)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=cn)},persist:function(){},isPersistent:cn}),t}var wn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},is=Ut(wn),us=T({},wn,{view:0,detail:0}),Jr=Ut(us),Ks,cs,os,er=T({},us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fs,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!==os&&(os&&e.type==="mousemove"?(Ks=e.screenX-os.screenX,cs=e.screenY-os.screenY):cs=Ks=0,os=e),Ks)},movementY:function(e){return"movementY"in e?e.movementY:cs}}),Nu=Ut(er),io=T({},er,{dataTransfer:0}),uo=Ut(io),co=T({},us,{relatedTarget:0}),tr=Ut(co),oo=T({},wn,{animationName:0,elapsedTime:0,pseudoElement:0}),ml=Ut(oo),fo=T({},wn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gl=Ut(fo),ds=T({},wn,{data:0}),xl=Ut(ds),ho={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mo={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"},go={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=go[e])?!!t[e]:!1}function fs(){return xo}var yo=T({},us,{key:function(e){if(e.key){var t=ho[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fs,charCode:function(e){return e.type==="keypress"?rs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),po=Ut(yo),vo=T({},er,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wu=Ut(vo),bo=T({},us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fs}),So=Ut(bo),ju=T({},wn,{propertyName:0,elapsedTime:0,pseudoElement:0}),No=Ut(ju),wo=T({},er,{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}),jo=Ut(wo),Eo=T({},wn,{newState:0,oldState:0}),To=Ut(Eo),Eu=[9,13,27,32],Kr=un&&"CompositionEvent"in window,hs=null;un&&"documentMode"in document&&(hs=document.documentMode);var Mo=un&&"TextEvent"in window&&!hs,Tu=un&&(!Kr||hs&&8<hs&&11>=hs),Mu=" ",Cu=!1;function Ou(e,t){switch(e){case"keyup":return Eu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Du(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yl=!1;function Co(e,t){switch(e){case"compositionend":return Du(t);case"keypress":return t.which!==32?null:(Cu=!0,Mu);case"textInput":return e=t.data,e===Mu&&Cu?null:e;default:return null}}function Oo(e,t){if(yl)return e==="compositionend"||!Kr&&Ou(e,t)?(e=Zt(),Js=Xs=Nn=null,yl=!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 Tu&&t.locale!=="ko"?null:t.data;default:return null}}var Do={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ru(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Do[e.type]:t==="textarea"}function ei(e,t,a,n){Un?hl?hl.push(n):hl=[n]:Un=n,t=Nc(t,"onChange"),0<t.length&&(a=new is("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var pl=null,ms=null;function wa(e){h0(e,0)}function on(e){var t=Na(e);if(dl(t))return e}function Au(e,t){if(e==="change")return t}var jn=!1;if(un){var ti;if(un){var ka="oninput"in document;if(!ka){var ai=document.createElement("div");ai.setAttribute("oninput","return;"),ka=typeof ai.oninput=="function"}ti=ka}else ti=!1;jn=ti&&(!document.documentMode||9<document.documentMode)}function ni(){pl&&(pl.detachEvent("onpropertychange",li),ms=pl=null)}function li(e){if(e.propertyName==="value"&&on(ms)){var t=[];ei(t,ms,e,Qs(e)),Qr(wa,t)}}function Ie(e,t,a){e==="focusin"?(ni(),pl=t,ms=a,pl.attachEvent("onpropertychange",li)):e==="focusout"&&ni()}function vl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return on(ms)}function Ro(e,t){if(e==="click")return on(t)}function bt(e,t){if(e==="input"||e==="change")return on(t)}function gs(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fa=typeof Object.is=="function"?Object.is:gs;function xs(e,t){if(fa(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 u=a[n];if(!ua.call(t,u)||!fa(e[u],t[u]))return!1}return!0}function ku(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _u(e,t){var a=ku(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=ku(a)}}function tt(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tt(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ao(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=sn(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=sn(e.document)}return t}function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var zu=un&&"documentMode"in document&&11>=document.documentMode,bl=null,nr=null,ta=null,lr=!1;function ys(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;lr||bl==null||bl!==sn(n)||(n=bl,"selectionStart"in n&&ar(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}),ta&&xs(ta,n)||(ta=n,n=Nc(nr,"onSelect"),0<n.length&&(t=new is("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=bl)))}function Hn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Sl={animationend:Hn("Animation","AnimationEnd"),animationiteration:Hn("Animation","AnimationIteration"),animationstart:Hn("Animation","AnimationStart"),transitionrun:Hn("Transition","TransitionRun"),transitionstart:Hn("Transition","TransitionStart"),transitioncancel:Hn("Transition","TransitionCancel"),transitionend:Hn("Transition","TransitionEnd")},si={},Uu={};un&&(Uu=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function Ln(e){if(si[e])return si[e];if(!Sl[e])return e;var t=Sl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Uu)return si[e]=t[a];return e}var qu=Ln("animationend"),Hu=Ln("animationiteration"),sr=Ln("animationstart"),ko=Ln("transitionrun"),_o=Ln("transitionstart"),Lu=Ln("transitioncancel"),ri=Ln("transitionend"),ii=new Map,ui="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(" ");ui.push("scrollEnd");function ja(e,t){ii.set(e,t),bn(t,[e])}var Nl=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)},pa=[],Fa=0,ps=0;function wl(){for(var e=Fa,t=ps=Fa=0;t<e;){var a=pa[t];pa[t++]=null;var n=pa[t];pa[t++]=null;var u=pa[t];pa[t++]=null;var d=pa[t];if(pa[t++]=null,n!==null&&u!==null){var y=n.pending;y===null?u.next=u:(u.next=y.next,y.next=u),n.pending=u}d!==0&&vs(a,u,d)}}function Ga(e,t,a,n){pa[Fa++]=e,pa[Fa++]=t,pa[Fa++]=a,pa[Fa++]=n,ps|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function rr(e,t,a,n){return Ga(e,t,a,n),bs(e)}function Pa(e,t){return Ga(e,null,null,t),bs(e)}function vs(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var u=!1,d=e.return;d!==null;)d.childLanes|=a,n=d.alternate,n!==null&&(n.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&t!==null&&(u=31-jt(a),e=d.hiddenUpdates,n=e[u],n===null?e[u]=[t]:n.push(t),t.lane=a|536870912),d):null}function bs(e){if(50<Ri)throw Ri=0,kd=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _a={};function ir(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 aa(e,t,a,n){return new ir(e,t,a,n)}function ur(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Za(e,t){var a=e.alternate;return a===null?(a=aa(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 Bu(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 cr(e,t,a,n,u,d){var y=0;if(n=e,typeof e=="function")ur(e)&&(y=1);else if(typeof e=="string")y=Op(e,a,ye.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=aa(31,a,t,u),e.elementType=ne,e.lanes=d,e;case M:return Wa(a.children,u,d,t);case R:y=8,u|=24;break;case Q:return e=aa(12,a,t,u|2),e.elementType=Q,e.lanes=d,e;case de:return e=aa(13,a,t,u),e.elementType=de,e.lanes=d,e;case Z:return e=aa(19,a,t,u),e.elementType=Z,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:y=10;break e;case Y:y=9;break e;case ee:y=11;break e;case P:y=14;break e;case W:y=16,n=null;break e}y=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=aa(y,a,t,u),t.elementType=e,t.type=n,t.lanes=d,t}function Wa(e,t,a,n){return e=aa(7,e,n,t),e.lanes=a,e}function ci(e,t,a){return e=aa(6,e,null,t),e.lanes=a,e}function Vu(e){var t=aa(18,null,null,0);return t.stateNode=e,t}function jl(e,t,a){return t=aa(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var oi=new WeakMap;function Ea(e,t){if(typeof e=="object"&&e!==null){var a=oi.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ya(t)},oi.set(e,t),t)}return{value:e,source:t,stack:ya(t)}}var Bn=[],Vn=0,Ss=null,dn=0,ha=[],je=0,Ta=null,Ia=1,g="";function i(e,t){Bn[Vn++]=dn,Bn[Vn++]=Ss,Ss=e,dn=t}function m(e,t,a){ha[je++]=Ia,ha[je++]=g,ha[je++]=Ta,Ta=e;var n=Ia;e=g;var u=32-jt(n)-1;n&=~(1<<u),a+=1;var d=32-jt(t)+u;if(30<d){var y=u-u%5;d=(n&(1<<y)-1).toString(32),n>>=y,u-=y,Ia=1<<32-jt(t)+u|a<<u|n,g=d+e}else Ia=1<<d|a<<u|n,g=e}function p(e){e.return!==null&&(i(e,1),m(e,1,0))}function w(e){for(;e===Ss;)Ss=Bn[--Vn],Bn[Vn]=null,dn=Bn[--Vn],Bn[Vn]=null;for(;e===Ta;)Ta=ha[--je],ha[je]=null,g=ha[--je],ha[je]=null,Ia=ha[--je],ha[je]=null}function O(e,t){ha[je++]=Ia,ha[je++]=g,ha[je++]=Ta,Ia=t.id,g=t.overflow,Ta=e}var H=null,L=null,V=!1,fe=null,ve=!1,Le=Error(o(519));function Qe(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fn(Ea(t,e)),Le}function Ae(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[_t]=e,t[Pt]=n,a){case"dialog":We("cancel",t),We("close",t);break;case"iframe":case"object":case"embed":We("load",t);break;case"video":case"audio":for(a=0;a<ki.length;a++)We(ki[a],t);break;case"source":We("error",t);break;case"img":case"image":case"link":We("error",t),We("load",t);break;case"details":We("toggle",t);break;case"input":We("invalid",t),fl(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":We("invalid",t);break;case"textarea":We("invalid",t),Zr(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||y0(t.textContent,a)?(n.popover!=null&&(We("beforetoggle",t),We("toggle",t)),n.onScroll!=null&&We("scroll",t),n.onScrollEnd!=null&&We("scrollend",t),n.onClick!=null&&(t.onclick=$a),t=!0):t=!1,t||Qe(e,!0)}function Ct(e){for(H=e.return;H;)switch(H.tag){case 5:case 31:case 13:ve=!1;return;case 27:case 3:ve=!0;return;default:H=H.return}}function It(e){if(e!==H)return!1;if(!V)return Ct(e),V=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Wd(e.type,e.memoizedProps)),a=!a),a&&L&&Qe(e),Ct(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));L=T0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));L=T0(e)}else t===27?(t=L,ql(e.type)?(e=Kd,Kd=null,L=e):L=t):L=H?Ka(e.stateNode.nextSibling):null;return!0}function Qt(){L=H=null,V=!1}function En(){var e=fe;return e!==null&&(Da===null?Da=e:Da.push.apply(Da,e),fe=null),e}function fn(e){fe===null?fe=[e]:fe.push(e)}var or=A(null),Yn=null,Qa=null;function Tn(e,t,a){me(or,t._currentValue),t._currentValue=a}function hn(e){e._currentValue=or.current,se(or)}function di(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function $n(e,t,a,n){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var y=u.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=u;for(var k=0;k<t.length;k++)if(E.context===t[k]){d.lanes|=a,E=d.alternate,E!==null&&(E.lanes|=a),di(d.return,a,e),n||(y=null);break e}d=E.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(o(341));y.lanes|=a,d=y.alternate,d!==null&&(d.lanes|=a),di(y,a,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function Xa(e,t,a,n){e=null;for(var u=t,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(o(387));if(y=y.memoizedProps,y!==null){var E=u.type;fa(u.pendingProps.value,y.value)||(e!==null?e.push(E):e=[E])}}else if(u===Ve.current){if(y=u.alternate,y===null)throw Error(o(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Hi):e=[Hi])}u=u.return}e!==null&&$n(t,e,a,n),t.flags|=262144}function dr(e){for(e=e.firstContext;e!==null;){if(!fa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ns(e){Yn=e,Qa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function na(e){return ah(Yn,e)}function Yu(e,t){return Yn===null&&Ns(e),ah(e,t)}function ah(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Qa===null){if(e===null)throw Error(o(308));Qa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Qa=Qa.next=t;return a}var Ey=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()})}},Ty=l.unstable_scheduleCallback,My=l.unstable_NormalPriority,Vt={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zo(){return{controller:new Ey,data:new Map,refCount:0}}function fi(e){e.refCount--,e.refCount===0&&Ty(My,function(){e.controller.abort()})}var hi=null,Uo=0,fr=0,hr=null;function Cy(e,t){if(hi===null){var a=hi=[];Uo=0,fr=Ld(),hr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Uo++,t.then(nh,nh),t}function nh(){if(--Uo===0&&hi!==null){hr!==null&&(hr.status="fulfilled");var e=hi;hi=null,fr=0,hr=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(u){a.push(u)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(n.status="rejected",n.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),n}var lh=$.S;$.S=function(e,t){Vm=Ue(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Cy(e,t),lh!==null&&lh(e,t)};var ws=A(null);function qo(){var e=ws.current;return e!==null?e:xt.pooledCache}function $u(e,t){t===null?me(ws,ws.current):me(ws,t.pool)}function sh(){var e=qo();return e===null?null:{parent:Vt._currentValue,pool:e}}var mr=Error(o(460)),Ho=Error(o(474)),Fu=Error(o(542)),Gu={then:function(){}};function rh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ih(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then($a,$a),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ch(e),e;default:if(typeof t.status=="string")t.then($a,$a);else{if(e=xt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=n}},function(n){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ch(e),e}throw Es=t,mr}}function js(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Es=a,mr):a}}var Es=null;function uh(){if(Es===null)throw Error(o(459));var e=Es;return Es=null,e}function ch(e){if(e===mr||e===Fu)throw Error(o(483))}var gr=null,mi=0;function Pu(e){var t=mi;return mi+=1,gr===null&&(gr=[]),ih(gr,e,t)}function gi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zu(e,t){throw t.$$typeof===j?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function oh(e){function t(F,B){if(e){var X=F.deletions;X===null?(F.deletions=[B],F.flags|=16):X.push(B)}}function a(F,B){if(!e)return null;for(;B!==null;)t(F,B),B=B.sibling;return null}function n(F){for(var B=new Map;F!==null;)F.key!==null?B.set(F.key,F):B.set(F.index,F),F=F.sibling;return B}function u(F,B){return F=Za(F,B),F.index=0,F.sibling=null,F}function d(F,B,X){return F.index=X,e?(X=F.alternate,X!==null?(X=X.index,X<B?(F.flags|=67108866,B):X):(F.flags|=67108866,B)):(F.flags|=1048576,B)}function y(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function E(F,B,X,ue){return B===null||B.tag!==6?(B=ci(X,F.mode,ue),B.return=F,B):(B=u(B,X),B.return=F,B)}function k(F,B,X,ue){var Me=X.type;return Me===M?re(F,B,X.props.children,ue,X.key):B!==null&&(B.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===W&&js(Me)===B.type)?(B=u(B,X.props),gi(B,X),B.return=F,B):(B=cr(X.type,X.key,X.props,null,F.mode,ue),gi(B,X),B.return=F,B)}function J(F,B,X,ue){return B===null||B.tag!==4||B.stateNode.containerInfo!==X.containerInfo||B.stateNode.implementation!==X.implementation?(B=jl(X,F.mode,ue),B.return=F,B):(B=u(B,X.children||[]),B.return=F,B)}function re(F,B,X,ue,Me){return B===null||B.tag!==7?(B=Wa(X,F.mode,ue,Me),B.return=F,B):(B=u(B,X),B.return=F,B)}function oe(F,B,X){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return B=ci(""+B,F.mode,X),B.return=F,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case D:return X=cr(B.type,B.key,B.props,null,F.mode,X),gi(X,B),X.return=F,X;case C:return B=jl(B,F.mode,X),B.return=F,B;case W:return B=js(B),oe(F,B,X)}if(q(B)||_(B))return B=Wa(B,F.mode,X,null),B.return=F,B;if(typeof B.then=="function")return oe(F,Pu(B),X);if(B.$$typeof===G)return oe(F,Yu(F,B),X);Zu(F,B)}return null}function K(F,B,X,ue){var Me=B!==null?B.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Me!==null?null:E(F,B,""+X,ue);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case D:return X.key===Me?k(F,B,X,ue):null;case C:return X.key===Me?J(F,B,X,ue):null;case W:return X=js(X),K(F,B,X,ue)}if(q(X)||_(X))return Me!==null?null:re(F,B,X,ue,null);if(typeof X.then=="function")return K(F,B,Pu(X),ue);if(X.$$typeof===G)return K(F,B,Yu(F,X),ue);Zu(F,X)}return null}function ae(F,B,X,ue,Me){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return F=F.get(X)||null,E(B,F,""+ue,Me);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case D:return F=F.get(ue.key===null?X:ue.key)||null,k(B,F,ue,Me);case C:return F=F.get(ue.key===null?X:ue.key)||null,J(B,F,ue,Me);case W:return ue=js(ue),ae(F,B,X,ue,Me)}if(q(ue)||_(ue))return F=F.get(X)||null,re(B,F,ue,Me,null);if(typeof ue.then=="function")return ae(F,B,X,Pu(ue),Me);if(ue.$$typeof===G)return ae(F,B,X,Yu(B,ue),Me);Zu(B,ue)}return null}function be(F,B,X,ue){for(var Me=null,nt=null,Ne=B,Fe=B=0,Je=null;Ne!==null&&Fe<X.length;Fe++){Ne.index>Fe?(Je=Ne,Ne=null):Je=Ne.sibling;var lt=K(F,Ne,X[Fe],ue);if(lt===null){Ne===null&&(Ne=Je);break}e&&Ne&<.alternate===null&&t(F,Ne),B=d(lt,B,Fe),nt===null?Me=lt:nt.sibling=lt,nt=lt,Ne=Je}if(Fe===X.length)return a(F,Ne),V&&i(F,Fe),Me;if(Ne===null){for(;Fe<X.length;Fe++)Ne=oe(F,X[Fe],ue),Ne!==null&&(B=d(Ne,B,Fe),nt===null?Me=Ne:nt.sibling=Ne,nt=Ne);return V&&i(F,Fe),Me}for(Ne=n(Ne);Fe<X.length;Fe++)Je=ae(Ne,F,Fe,X[Fe],ue),Je!==null&&(e&&Je.alternate!==null&&Ne.delete(Je.key===null?Fe:Je.key),B=d(Je,B,Fe),nt===null?Me=Je:nt.sibling=Je,nt=Je);return e&&Ne.forEach(function(Yl){return t(F,Yl)}),V&&i(F,Fe),Me}function ke(F,B,X,ue){if(X==null)throw Error(o(151));for(var Me=null,nt=null,Ne=B,Fe=B=0,Je=null,lt=X.next();Ne!==null&&!lt.done;Fe++,lt=X.next()){Ne.index>Fe?(Je=Ne,Ne=null):Je=Ne.sibling;var Yl=K(F,Ne,lt.value,ue);if(Yl===null){Ne===null&&(Ne=Je);break}e&&Ne&&Yl.alternate===null&&t(F,Ne),B=d(Yl,B,Fe),nt===null?Me=Yl:nt.sibling=Yl,nt=Yl,Ne=Je}if(lt.done)return a(F,Ne),V&&i(F,Fe),Me;if(Ne===null){for(;!lt.done;Fe++,lt=X.next())lt=oe(F,lt.value,ue),lt!==null&&(B=d(lt,B,Fe),nt===null?Me=lt:nt.sibling=lt,nt=lt);return V&&i(F,Fe),Me}for(Ne=n(Ne);!lt.done;Fe++,lt=X.next())lt=ae(Ne,F,Fe,lt.value,ue),lt!==null&&(e&<.alternate!==null&&Ne.delete(lt.key===null?Fe:lt.key),B=d(lt,B,Fe),nt===null?Me=lt:nt.sibling=lt,nt=lt);return e&&Ne.forEach(function(Bp){return t(F,Bp)}),V&&i(F,Fe),Me}function gt(F,B,X,ue){if(typeof X=="object"&&X!==null&&X.type===M&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case D:e:{for(var Me=X.key;B!==null;){if(B.key===Me){if(Me=X.type,Me===M){if(B.tag===7){a(F,B.sibling),ue=u(B,X.props.children),ue.return=F,F=ue;break e}}else if(B.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===W&&js(Me)===B.type){a(F,B.sibling),ue=u(B,X.props),gi(ue,X),ue.return=F,F=ue;break e}a(F,B);break}else t(F,B);B=B.sibling}X.type===M?(ue=Wa(X.props.children,F.mode,ue,X.key),ue.return=F,F=ue):(ue=cr(X.type,X.key,X.props,null,F.mode,ue),gi(ue,X),ue.return=F,F=ue)}return y(F);case C:e:{for(Me=X.key;B!==null;){if(B.key===Me)if(B.tag===4&&B.stateNode.containerInfo===X.containerInfo&&B.stateNode.implementation===X.implementation){a(F,B.sibling),ue=u(B,X.children||[]),ue.return=F,F=ue;break e}else{a(F,B);break}else t(F,B);B=B.sibling}ue=jl(X,F.mode,ue),ue.return=F,F=ue}return y(F);case W:return X=js(X),gt(F,B,X,ue)}if(q(X))return be(F,B,X,ue);if(_(X)){if(Me=_(X),typeof Me!="function")throw Error(o(150));return X=Me.call(X),ke(F,B,X,ue)}if(typeof X.then=="function")return gt(F,B,Pu(X),ue);if(X.$$typeof===G)return gt(F,B,Yu(F,X),ue);Zu(F,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,B!==null&&B.tag===6?(a(F,B.sibling),ue=u(B,X),ue.return=F,F=ue):(a(F,B),ue=ci(X,F.mode,ue),ue.return=F,F=ue),y(F)):a(F,B)}return function(F,B,X,ue){try{mi=0;var Me=gt(F,B,X,ue);return gr=null,Me}catch(Ne){if(Ne===mr||Ne===Fu)throw Ne;var nt=aa(29,Ne,null,F.mode);return nt.lanes=ue,nt.return=F,nt}finally{}}}var Ts=oh(!0),dh=oh(!1),El=!1;function Lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bo(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 Tl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ml(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(it&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=bs(e),vs(e,null,a),t}return Ga(e,n,t,a),bs(e)}function xi(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,Sa(e,a)}}function Vo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?u=d=y:d=d.next=y,a=a.next}while(a!==null);d===null?u=d=t:d=d.next=t}else u=d=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:d,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 Yo=!1;function yi(){if(Yo){var e=hr;if(e!==null)throw e}}function pi(e,t,a,n){Yo=!1;var u=e.updateQueue;El=!1;var d=u.firstBaseUpdate,y=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var k=E,J=k.next;k.next=null,y===null?d=J:y.next=J,y=k;var re=e.alternate;re!==null&&(re=re.updateQueue,E=re.lastBaseUpdate,E!==y&&(E===null?re.firstBaseUpdate=J:E.next=J,re.lastBaseUpdate=k))}if(d!==null){var oe=u.baseState;y=0,re=J=k=null,E=d;do{var K=E.lane&-536870913,ae=K!==E.lane;if(ae?(Xe&K)===K:(n&K)===K){K!==0&&K===fr&&(Yo=!0),re!==null&&(re=re.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var be=e,ke=E;K=t;var gt=a;switch(ke.tag){case 1:if(be=ke.payload,typeof be=="function"){oe=be.call(gt,oe,K);break e}oe=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=ke.payload,K=typeof be=="function"?be.call(gt,oe,K):be,K==null)break e;oe=T({},oe,K);break e;case 2:El=!0}}K=E.callback,K!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=u.callbacks,ae===null?u.callbacks=[K]:ae.push(K))}else ae={lane:K,tag:E.tag,payload:E.payload,callback:E.callback,next:null},re===null?(J=re=ae,k=oe):re=re.next=ae,y|=K;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;ae=E,E=ae.next,ae.next=null,u.lastBaseUpdate=ae,u.shared.pending=null}}while(!0);re===null&&(k=oe),u.baseState=k,u.firstBaseUpdate=J,u.lastBaseUpdate=re,d===null&&(u.shared.lanes=0),Al|=y,e.lanes=y,e.memoizedState=oe}}function fh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function hh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)fh(a[e],t)}var xr=A(null),Wu=A(0);function mh(e,t){e=Jn,me(Wu,e),me(xr,t),Jn=e|t.baseLanes}function $o(){me(Wu,Jn),me(xr,xr.current)}function Fo(){Jn=Wu.current,se(xr),se(Wu)}var za=A(null),Ja=null;function Cl(e){var t=e.alternate;me(qt,qt.current&1),me(za,e),Ja===null&&(t===null||xr.current!==null||t.memoizedState!==null)&&(Ja=e)}function Go(e){me(qt,qt.current),me(za,e),Ja===null&&(Ja=e)}function gh(e){e.tag===22?(me(qt,qt.current),me(za,e),Ja===null&&(Ja=e)):Ol()}function Ol(){me(qt,qt.current),me(za,za.current)}function Ua(e){se(za),Ja===e&&(Ja=null),se(qt)}var qt=A(0);function Iu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Xd(a)||Jd(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 Fn=0,Ye=null,ht=null,Yt=null,Qu=!1,yr=!1,Ms=!1,Xu=0,vi=0,pr=null,Dy=0;function Dt(){throw Error(o(321))}function Po(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!fa(e[a],t[a]))return!1;return!0}function Zo(e,t,a,n,u,d){return Fn=d,Ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?Jh:ud,Ms=!1,d=a(n,u),Ms=!1,yr&&(d=yh(t,a,n,u)),xh(e),d}function xh(e){$.H=Ni;var t=ht!==null&&ht.next!==null;if(Fn=0,Yt=ht=Ye=null,Qu=!1,vi=0,pr=null,t)throw Error(o(300));e===null||$t||(e=e.dependencies,e!==null&&dr(e)&&($t=!0))}function yh(e,t,a,n){Ye=e;var u=0;do{if(yr&&(pr=null),vi=0,yr=!1,25<=u)throw Error(o(301));if(u+=1,Yt=ht=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}$.H=Kh,d=t(a,n)}while(yr);return d}function Ry(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?bi(t):t,e=e.useState()[0],(ht!==null?ht.memoizedState:null)!==e&&(Ye.flags|=1024),t}function Wo(){var e=Xu!==0;return Xu=0,e}function Io(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Qo(e){if(Qu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qu=!1}Fn=0,Yt=ht=Ye=null,yr=!1,vi=Xu=0,pr=null}function va(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yt===null?Ye.memoizedState=Yt=e:Yt=Yt.next=e,Yt}function Ht(){if(ht===null){var e=Ye.alternate;e=e!==null?e.memoizedState:null}else e=ht.next;var t=Yt===null?Ye.memoizedState:Yt.next;if(t!==null)Yt=t,ht=e;else{if(e===null)throw Ye.alternate===null?Error(o(467)):Error(o(310));ht=e,e={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Yt===null?Ye.memoizedState=Yt=e:Yt=Yt.next=e}return Yt}function Ju(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bi(e){var t=vi;return vi+=1,pr===null&&(pr=[]),e=ih(pr,e,t),t=Ye,(Yt===null?t.memoizedState:Yt.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?Jh:ud),e}function Ku(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bi(e);if(e.$$typeof===G)return na(e)}throw Error(o(438,String(e)))}function Xo(e){var t=null,a=Ye.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ye.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ju(),Ye.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=z;return t.index++,a}function Gn(e,t){return typeof t=="function"?t(e):t}function ec(e){var t=Ht();return Jo(t,ht,e)}function Jo(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var u=e.baseQueue,d=n.pending;if(d!==null){if(u!==null){var y=u.next;u.next=d.next,d.next=y}t.baseQueue=u=d,n.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var E=y=null,k=null,J=t,re=!1;do{var oe=J.lane&-536870913;if(oe!==J.lane?(Xe&oe)===oe:(Fn&oe)===oe){var K=J.revertLane;if(K===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),oe===fr&&(re=!0);else if((Fn&K)===K){J=J.next,K===fr&&(re=!0);continue}else oe={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},k===null?(E=k=oe,y=d):k=k.next=oe,Ye.lanes|=K,Al|=K;oe=J.action,Ms&&a(d,oe),d=J.hasEagerState?J.eagerState:a(d,oe)}else K={lane:oe,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},k===null?(E=k=K,y=d):k=k.next=K,Ye.lanes|=oe,Al|=oe;J=J.next}while(J!==null&&J!==t);if(k===null?y=d:k.next=E,!fa(d,e.memoizedState)&&($t=!0,re&&(a=hr,a!==null)))throw a;e.memoizedState=d,e.baseState=y,e.baseQueue=k,n.lastRenderedState=d}return u===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Ko(e){var t=Ht(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,u=a.pending,d=t.memoizedState;if(u!==null){a.pending=null;var y=u=u.next;do d=e(d,y.action),y=y.next;while(y!==u);fa(d,t.memoizedState)||($t=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,n]}function ph(e,t,a){var n=Ye,u=Ht(),d=V;if(d){if(a===void 0)throw Error(o(407));a=a()}else a=t();var y=!fa((ht||u).memoizedState,a);if(y&&(u.memoizedState=a,$t=!0),u=u.queue,ad(Sh.bind(null,n,u,e),[e]),u.getSnapshot!==t||y||Yt!==null&&Yt.memoizedState.tag&1){if(n.flags|=2048,vr(9,{destroy:void 0},bh.bind(null,n,u,a,t),null),xt===null)throw Error(o(349));d||(Fn&127)!==0||vh(n,t,a)}return a}function vh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ye.updateQueue,t===null?(t=Ju(),Ye.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function bh(e,t,a,n){t.value=a,t.getSnapshot=n,Nh(t)&&wh(e)}function Sh(e,t,a){return a(function(){Nh(t)&&wh(e)})}function Nh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!fa(e,a)}catch{return!0}}function wh(e){var t=Pa(e,2);t!==null&&Ra(t,e,2)}function ed(e){var t=va();if(typeof e=="function"){var a=e;if(e=a(),Ms){wt(!0);try{a()}finally{wt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:e},t}function jh(e,t,a,n){return e.baseState=a,Jo(e,ht,typeof n=="function"?n:Gn)}function Ay(e,t,a,n,u){if(nc(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};$.T!==null?a(!0):d.isTransition=!1,n(d),a=t.pending,a===null?(d.next=t.pending=d,Eh(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Eh(e,t){var a=t.action,n=t.payload,u=e.state;if(t.isTransition){var d=$.T,y={};$.T=y;try{var E=a(u,n),k=$.S;k!==null&&k(y,E),Th(e,t,E)}catch(J){td(e,t,J)}finally{d!==null&&y.types!==null&&(d.types=y.types),$.T=d}}else try{d=a(u,n),Th(e,t,d)}catch(J){td(e,t,J)}}function Th(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Mh(e,t,n)},function(n){return td(e,t,n)}):Mh(e,t,a)}function Mh(e,t,a){t.status="fulfilled",t.value=a,Ch(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Eh(e,a)))}function td(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Ch(t),t=t.next;while(t!==n)}e.action=null}function Ch(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Oh(e,t){return t}function Dh(e,t){if(V){var a=xt.formState;if(a!==null){e:{var n=Ye;if(V){if(L){t:{for(var u=L,d=ve;u.nodeType!==8;){if(!d){u=null;break t}if(u=Ka(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){L=Ka(u.nextSibling),n=u.data==="F!";break e}}Qe(n)}n=!1}n&&(t=a[0])}}return a=va(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oh,lastRenderedState:t},a.queue=n,a=Ih.bind(null,Ye,n),n.dispatch=a,n=ed(!1),d=id.bind(null,Ye,!1,n.queue),n=va(),u={state:t,dispatch:null,action:e,pending:null},n.queue=u,a=Ay.bind(null,Ye,u,d,a),u.dispatch=a,n.memoizedState=e,[t,a,!1]}function Rh(e){var t=Ht();return Ah(t,ht,e)}function Ah(e,t,a){if(t=Jo(e,t,Oh)[0],e=ec(Gn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=bi(t)}catch(y){throw y===mr?Fu:y}else n=t;t=Ht();var u=t.queue,d=u.dispatch;return a!==t.memoizedState&&(Ye.flags|=2048,vr(9,{destroy:void 0},ky.bind(null,u,a),null)),[n,d,e]}function ky(e,t){e.action=t}function kh(e){var t=Ht(),a=ht;if(a!==null)return Ah(t,a,e);Ht(),t=t.memoizedState,a=Ht();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function vr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Ye.updateQueue,t===null&&(t=Ju(),Ye.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 _h(){return Ht().memoizedState}function tc(e,t,a,n){var u=va();Ye.flags|=e,u.memoizedState=vr(1|t,{destroy:void 0},a,n===void 0?null:n)}function ac(e,t,a,n){var u=Ht();n=n===void 0?null:n;var d=u.memoizedState.inst;ht!==null&&n!==null&&Po(n,ht.memoizedState.deps)?u.memoizedState=vr(t,d,a,n):(Ye.flags|=e,u.memoizedState=vr(1|t,d,a,n))}function zh(e,t){tc(8390656,8,e,t)}function ad(e,t){ac(2048,8,e,t)}function _y(e){Ye.flags|=4;var t=Ye.updateQueue;if(t===null)t=Ju(),Ye.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Uh(e){var t=Ht().memoizedState;return _y({ref:t,nextImpl:e}),function(){if((it&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function qh(e,t){return ac(4,2,e,t)}function Hh(e,t){return ac(4,4,e,t)}function Lh(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 Bh(e,t,a){a=a!=null?a.concat([e]):null,ac(4,4,Lh.bind(null,t,e),a)}function nd(){}function Vh(e,t){var a=Ht();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Po(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Yh(e,t){var a=Ht();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Po(t,n[1]))return n[0];if(n=e(),Ms){wt(!0);try{e()}finally{wt(!1)}}return a.memoizedState=[n,t],n}function ld(e,t,a){return a===void 0||(Fn&1073741824)!==0&&(Xe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=$m(),Ye.lanes|=e,Al|=e,a)}function $h(e,t,a,n){return fa(a,t)?a:xr.current!==null?(e=ld(e,a,n),fa(e,t)||($t=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(Xe&261930)===0?($t=!0,e.memoizedState=a):(e=$m(),Ye.lanes|=e,Al|=e,t)}function Fh(e,t,a,n,u){var d=ie.p;ie.p=d!==0&&8>d?d:8;var y=$.T,E={};$.T=E,id(e,!1,t,a);try{var k=u(),J=$.S;if(J!==null&&J(E,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var re=Oy(k,n);Si(e,t,re,La(e))}else Si(e,t,n,La(e))}catch(oe){Si(e,t,{then:function(){},status:"rejected",reason:oe},La())}finally{ie.p=d,y!==null&&E.types!==null&&(y.types=E.types),$.T=y}}function zy(){}function sd(e,t,a,n){if(e.tag!==5)throw Error(o(476));var u=Gh(e).queue;Fh(e,u,t,ge,a===null?zy:function(){return Ph(e),a(n)})}function Gh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:ge},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ph(e){var t=Gh(e);t.next===null&&(t=e.alternate.memoizedState),Si(e,t.next.queue,{},La())}function rd(){return na(Hi)}function Zh(){return Ht().memoizedState}function Wh(){return Ht().memoizedState}function Uy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=La();e=Tl(a);var n=Ml(t,e,a);n!==null&&(Ra(n,t,a),xi(n,t,a)),t={cache:zo()},e.payload=t;return}t=t.return}}function qy(e,t,a){var n=La();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},nc(e)?Qh(t,a):(a=rr(e,t,a,n),a!==null&&(Ra(a,e,n),Xh(a,t,n)))}function Ih(e,t,a){var n=La();Si(e,t,a,n)}function Si(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(nc(e))Qh(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,E=d(y,a);if(u.hasEagerState=!0,u.eagerState=E,fa(E,y))return Ga(e,t,u,0),xt===null&&wl(),!1}catch{}finally{}if(a=rr(e,t,u,n),a!==null)return Ra(a,e,n),Xh(a,t,n),!0}return!1}function id(e,t,a,n){if(n={lane:2,revertLane:Ld(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},nc(e)){if(t)throw Error(o(479))}else t=rr(e,a,n,2),t!==null&&Ra(t,e,2)}function nc(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function Qh(e,t){yr=Qu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Xh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Sa(e,a)}}var Ni={readContext:na,use:Ku,useCallback:Dt,useContext:Dt,useEffect:Dt,useImperativeHandle:Dt,useLayoutEffect:Dt,useInsertionEffect:Dt,useMemo:Dt,useReducer:Dt,useRef:Dt,useState:Dt,useDebugValue:Dt,useDeferredValue:Dt,useTransition:Dt,useSyncExternalStore:Dt,useId:Dt,useHostTransitionStatus:Dt,useFormState:Dt,useActionState:Dt,useOptimistic:Dt,useMemoCache:Dt,useCacheRefresh:Dt};Ni.useEffectEvent=Dt;var Jh={readContext:na,use:Ku,useCallback:function(e,t){return va().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:zh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,tc(4194308,4,Lh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return tc(4194308,4,e,t)},useInsertionEffect:function(e,t){tc(4,2,e,t)},useMemo:function(e,t){var a=va();t=t===void 0?null:t;var n=e();if(Ms){wt(!0);try{e()}finally{wt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=va();if(a!==void 0){var u=a(t);if(Ms){wt(!0);try{a(t)}finally{wt(!1)}}}else u=t;return n.memoizedState=n.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},n.queue=e,e=e.dispatch=qy.bind(null,Ye,e),[n.memoizedState,e]},useRef:function(e){var t=va();return e={current:e},t.memoizedState=e},useState:function(e){e=ed(e);var t=e.queue,a=Ih.bind(null,Ye,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:nd,useDeferredValue:function(e,t){var a=va();return ld(a,e,t)},useTransition:function(){var e=ed(!1);return e=Fh.bind(null,Ye,e.queue,!0,!1),va().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ye,u=va();if(V){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),xt===null)throw Error(o(349));(Xe&127)!==0||vh(n,t,a)}u.memoizedState=a;var d={value:a,getSnapshot:t};return u.queue=d,zh(Sh.bind(null,n,d,e),[e]),n.flags|=2048,vr(9,{destroy:void 0},bh.bind(null,n,d,a,t),null),a},useId:function(){var e=va(),t=xt.identifierPrefix;if(V){var a=g,n=Ia;a=(n&~(1<<32-jt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Xu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Dy++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:rd,useFormState:Dh,useActionState:Dh,useOptimistic:function(e){var t=va();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=id.bind(null,Ye,!0,a),a.dispatch=t,[e,t]},useMemoCache:Xo,useCacheRefresh:function(){return va().memoizedState=Uy.bind(null,Ye)},useEffectEvent:function(e){var t=va(),a={impl:e};return t.memoizedState=a,function(){if((it&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},ud={readContext:na,use:Ku,useCallback:Vh,useContext:na,useEffect:ad,useImperativeHandle:Bh,useInsertionEffect:qh,useLayoutEffect:Hh,useMemo:Yh,useReducer:ec,useRef:_h,useState:function(){return ec(Gn)},useDebugValue:nd,useDeferredValue:function(e,t){var a=Ht();return $h(a,ht.memoizedState,e,t)},useTransition:function(){var e=ec(Gn)[0],t=Ht().memoizedState;return[typeof e=="boolean"?e:bi(e),t]},useSyncExternalStore:ph,useId:Zh,useHostTransitionStatus:rd,useFormState:Rh,useActionState:Rh,useOptimistic:function(e,t){var a=Ht();return jh(a,ht,e,t)},useMemoCache:Xo,useCacheRefresh:Wh};ud.useEffectEvent=Uh;var Kh={readContext:na,use:Ku,useCallback:Vh,useContext:na,useEffect:ad,useImperativeHandle:Bh,useInsertionEffect:qh,useLayoutEffect:Hh,useMemo:Yh,useReducer:Ko,useRef:_h,useState:function(){return Ko(Gn)},useDebugValue:nd,useDeferredValue:function(e,t){var a=Ht();return ht===null?ld(a,e,t):$h(a,ht.memoizedState,e,t)},useTransition:function(){var e=Ko(Gn)[0],t=Ht().memoizedState;return[typeof e=="boolean"?e:bi(e),t]},useSyncExternalStore:ph,useId:Zh,useHostTransitionStatus:rd,useFormState:kh,useActionState:kh,useOptimistic:function(e,t){var a=Ht();return ht!==null?jh(a,ht,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Xo,useCacheRefresh:Wh};Kh.useEffectEvent=Uh;function cd(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:T({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var od={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=La(),u=Tl(n);u.payload=t,a!=null&&(u.callback=a),t=Ml(e,u,n),t!==null&&(Ra(t,e,n),xi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=La(),u=Tl(n);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=Ml(e,u,n),t!==null&&(Ra(t,e,n),xi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=La(),n=Tl(a);n.tag=2,t!=null&&(n.callback=t),t=Ml(e,n,a),t!==null&&(Ra(t,e,a),xi(t,e,a))}};function em(e,t,a,n,u,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,d,y):t.prototype&&t.prototype.isPureReactComponent?!xs(a,n)||!xs(u,d):!0}function tm(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&&od.enqueueReplaceState(t,t.state,null)}function Cs(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=T({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function am(e){Nl(e)}function nm(e){console.error(e)}function lm(e){Nl(e)}function lc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function sm(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function dd(e,t,a){return a=Tl(a),a.tag=3,a.payload={element:null},a.callback=function(){lc(e,t)},a}function rm(e){return e=Tl(e),e.tag=3,e}function im(e,t,a,n){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var d=n.value;e.payload=function(){return u(d)},e.callback=function(){sm(t,a,n)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){sm(t,a,n),typeof u!="function"&&(kl===null?kl=new Set([this]):kl.add(this));var E=n.stack;this.componentDidCatch(n.value,{componentStack:E!==null?E:""})})}function Hy(e,t,a,n,u){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Xa(t,a,u,!0),a=za.current,a!==null){switch(a.tag){case 31:case 13:return Ja===null?xc():a.alternate===null&&Rt===0&&(Rt=3),a.flags&=-257,a.flags|=65536,a.lanes=u,n===Gu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Ud(e,n,u)),!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)),Ud(e,n,u)),!1}throw Error(o(435,a.tag))}return Ud(e,n,u),xc(),!1}if(V)return t=za.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,n!==Le&&(e=Error(o(422),{cause:n}),fn(Ea(e,a)))):(n!==Le&&(t=Error(o(423),{cause:n}),fn(Ea(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,n=Ea(n,a),u=dd(e.stateNode,n,u),Vo(e,u),Rt!==4&&(Rt=2)),!1;var d=Error(o(520),{cause:n});if(d=Ea(d,a),Di===null?Di=[d]:Di.push(d),Rt!==4&&(Rt=2),t===null)return!0;n=Ea(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=dd(a.stateNode,n,e),Vo(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(kl===null||!kl.has(d))))return a.flags|=65536,u&=-u,a.lanes|=u,u=rm(u),im(u,e,a,n),Vo(a,u),!1}a=a.return}while(a!==null);return!1}var fd=Error(o(461)),$t=!1;function la(e,t,a,n){t.child=e===null?dh(t,null,a,n):Ts(t,e.child,a,n)}function um(e,t,a,n,u){a=a.render;var d=t.ref;if("ref"in n){var y={};for(var E in n)E!=="ref"&&(y[E]=n[E])}else y=n;return Ns(t),n=Zo(e,t,a,y,d,u),E=Wo(),e!==null&&!$t?(Io(e,t,u),Pn(e,t,u)):(V&&E&&p(t),t.flags|=1,la(e,t,n,u),t.child)}function cm(e,t,a,n,u){if(e===null){var d=a.type;return typeof d=="function"&&!ur(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,om(e,t,d,n,u)):(e=cr(a.type,null,n,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!bd(e,u)){var y=d.memoizedProps;if(a=a.compare,a=a!==null?a:xs,a(y,n)&&e.ref===t.ref)return Pn(e,t,u)}return t.flags|=1,e=Za(d,n),e.ref=t.ref,e.return=t,t.child=e}function om(e,t,a,n,u){if(e!==null){var d=e.memoizedProps;if(xs(d,n)&&e.ref===t.ref)if($t=!1,t.pendingProps=n=d,bd(e,u))(e.flags&131072)!==0&&($t=!0);else return t.lanes=e.lanes,Pn(e,t,u)}return hd(e,t,a,n,u)}function dm(e,t,a,n){var u=n.children,d=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(d=d!==null?d.baseLanes|a:a,e!==null){for(n=t.child=e.child,u=0;n!==null;)u=u|n.lanes|n.childLanes,n=n.sibling;n=u&~d}else n=0,t.child=null;return fm(e,t,d,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&$u(t,d!==null?d.cachePool:null),d!==null?mh(t,d):$o(),gh(t);else return n=t.lanes=536870912,fm(e,t,d!==null?d.baseLanes|a:a,a,n)}else d!==null?($u(t,d.cachePool),mh(t,d),Ol(),t.memoizedState=null):(e!==null&&$u(t,null),$o(),Ol());return la(e,t,u,a),t.child}function wi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fm(e,t,a,n,u){var d=qo();return d=d===null?null:{parent:Vt._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&$u(t,null),$o(),gh(t),e!==null&&Xa(e,t,n,!0),t.childLanes=u,null}function sc(e,t){return t=ic({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function hm(e,t,a){return Ts(t,e.child,null,a),e=sc(t,t.pendingProps),e.flags|=2,Ua(t),t.memoizedState=null,e}function Ly(e,t,a){var n=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(V){if(n.mode==="hidden")return e=sc(t,n),t.lanes=536870912,wi(null,e);if(Go(t),(e=L)?(e=E0(e,ve),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:Ia,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Vu(e),a.return=t,t.child=a,H=t,L=null)):e=null,e===null)throw Qe(t);return t.lanes=536870912,null}return sc(t,n)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(Go(t),u)if(t.flags&256)t.flags&=-257,t=hm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if($t||Xa(e,t,a,!1),u=(a&e.childLanes)!==0,$t||u){if(n=xt,n!==null&&(y=Yr(n,a),y!==0&&y!==d.retryLane))throw d.retryLane=y,Pa(e,y),Ra(n,e,y),fd;xc(),t=hm(e,t,a)}else e=d.treeContext,L=Ka(y.nextSibling),H=t,V=!0,fe=null,ve=!1,e!==null&&O(t,e),t=sc(t,n),t.flags|=4096;return t}return e=Za(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function rc(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function hd(e,t,a,n,u){return Ns(t),a=Zo(e,t,a,n,void 0,u),n=Wo(),e!==null&&!$t?(Io(e,t,u),Pn(e,t,u)):(V&&n&&p(t),t.flags|=1,la(e,t,a,u),t.child)}function mm(e,t,a,n,u,d){return Ns(t),t.updateQueue=null,a=yh(t,n,a,u),xh(e),n=Wo(),e!==null&&!$t?(Io(e,t,d),Pn(e,t,d)):(V&&n&&p(t),t.flags|=1,la(e,t,a,d),t.child)}function gm(e,t,a,n,u){if(Ns(t),t.stateNode===null){var d=_a,y=a.contextType;typeof y=="object"&&y!==null&&(d=na(y)),d=new a(n,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=od,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=n,d.state=t.memoizedState,d.refs={},Lo(t),y=a.contextType,d.context=typeof y=="object"&&y!==null?na(y):_a,d.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(cd(t,a,y,n),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&od.enqueueReplaceState(d,d.state,null),pi(t,n,d,u),yi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,k=Cs(a,E);d.props=k;var J=d.context,re=a.contextType;y=_a,typeof re=="object"&&re!==null&&(y=na(re));var oe=a.getDerivedStateFromProps;re=typeof oe=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,re||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||J!==y)&&tm(t,d,n,y),El=!1;var K=t.memoizedState;d.state=K,pi(t,n,d,u),yi(),J=t.memoizedState,E||K!==J||El?(typeof oe=="function"&&(cd(t,a,oe,n),J=t.memoizedState),(k=El||em(t,a,k,n,K,J,y))?(re||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=J),d.props=n,d.state=J,d.context=y,n=k):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{d=t.stateNode,Bo(e,t),y=t.memoizedProps,re=Cs(a,y),d.props=re,oe=t.pendingProps,K=d.context,J=a.contextType,k=_a,typeof J=="object"&&J!==null&&(k=na(J)),E=a.getDerivedStateFromProps,(J=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==oe||K!==k)&&tm(t,d,n,k),El=!1,K=t.memoizedState,d.state=K,pi(t,n,d,u),yi();var ae=t.memoizedState;y!==oe||K!==ae||El||e!==null&&e.dependencies!==null&&dr(e.dependencies)?(typeof E=="function"&&(cd(t,a,E,n),ae=t.memoizedState),(re=El||em(t,a,re,n,K,ae,k)||e!==null&&e.dependencies!==null&&dr(e.dependencies))?(J||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(n,ae,k),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(n,ae,k)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=ae),d.props=n,d.state=ae,d.context=k,n=re):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=1024),n=!1)}return d=n,rc(e,t),n=(t.flags&128)!==0,d||n?(d=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&n?(t.child=Ts(t,e.child,null,u),t.child=Ts(t,null,a,u)):la(e,t,a,u),t.memoizedState=d.state,e=t.child):e=Pn(e,t,u),e}function xm(e,t,a,n){return Qt(),t.flags|=256,la(e,t,a,n),t.child}var md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gd(e){return{baseLanes:e,cachePool:sh()}}function xd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ha),e}function ym(e,t,a){var n=t.pendingProps,u=!1,d=(t.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(qt.current&2)!==0),y&&(u=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(V){if(u?Cl(t):Ol(),(e=L)?(e=E0(e,ve),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:Ia,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Vu(e),a.return=t,t.child=a,H=t,L=null)):e=null,e===null)throw Qe(t);return Jd(e)?t.lanes=32:t.lanes=536870912,null}var E=n.children;return n=n.fallback,u?(Ol(),u=t.mode,E=ic({mode:"hidden",children:E},u),n=Wa(n,u,a,null),E.return=t,n.return=t,E.sibling=n,t.child=E,n=t.child,n.memoizedState=gd(a),n.childLanes=xd(e,y,a),t.memoizedState=md,wi(null,n)):(Cl(t),yd(t,E))}var k=e.memoizedState;if(k!==null&&(E=k.dehydrated,E!==null)){if(d)t.flags&256?(Cl(t),t.flags&=-257,t=pd(e,t,a)):t.memoizedState!==null?(Ol(),t.child=e.child,t.flags|=128,t=null):(Ol(),E=n.fallback,u=t.mode,n=ic({mode:"visible",children:n.children},u),E=Wa(E,u,a,null),E.flags|=2,n.return=t,E.return=t,n.sibling=E,t.child=n,Ts(t,e.child,null,a),n=t.child,n.memoizedState=gd(a),n.childLanes=xd(e,y,a),t.memoizedState=md,t=wi(null,n));else if(Cl(t),Jd(E)){if(y=E.nextSibling&&E.nextSibling.dataset,y)var J=y.dgst;y=J,n=Error(o(419)),n.stack="",n.digest=y,fn({value:n,source:null,stack:null}),t=pd(e,t,a)}else if($t||Xa(e,t,a,!1),y=(a&e.childLanes)!==0,$t||y){if(y=xt,y!==null&&(n=Yr(y,a),n!==0&&n!==k.retryLane))throw k.retryLane=n,Pa(e,n),Ra(y,e,n),fd;Xd(E)||xc(),t=pd(e,t,a)}else Xd(E)?(t.flags|=192,t.child=e.child,t=null):(e=k.treeContext,L=Ka(E.nextSibling),H=t,V=!0,fe=null,ve=!1,e!==null&&O(t,e),t=yd(t,n.children),t.flags|=4096);return t}return u?(Ol(),E=n.fallback,u=t.mode,k=e.child,J=k.sibling,n=Za(k,{mode:"hidden",children:n.children}),n.subtreeFlags=k.subtreeFlags&65011712,J!==null?E=Za(J,E):(E=Wa(E,u,a,null),E.flags|=2),E.return=t,n.return=t,n.sibling=E,t.child=n,wi(null,n),n=t.child,E=e.child.memoizedState,E===null?E=gd(a):(u=E.cachePool,u!==null?(k=Vt._currentValue,u=u.parent!==k?{parent:k,pool:k}:u):u=sh(),E={baseLanes:E.baseLanes|a,cachePool:u}),n.memoizedState=E,n.childLanes=xd(e,y,a),t.memoizedState=md,wi(e.child,n)):(Cl(t),a=e.child,e=a.sibling,a=Za(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 yd(e,t){return t=ic({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ic(e,t){return e=aa(22,e,null,t),e.lanes=0,e}function pd(e,t,a){return Ts(t,e.child,null,a),e=yd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),di(e.return,t,a)}function vd(e,t,a,n,u,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:u,treeForkCount:d}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=n,y.tail=a,y.tailMode=u,y.treeForkCount=d)}function vm(e,t,a){var n=t.pendingProps,u=n.revealOrder,d=n.tail;n=n.children;var y=qt.current,E=(y&2)!==0;if(E?(y=y&1|2,t.flags|=128):y&=1,me(qt,y),la(e,t,n,a),n=V?dn:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&pm(e,a,t);else if(e.tag===19)pm(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(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&Iu(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),vd(t,!1,u,a,d,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Iu(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}vd(t,!0,a,null,d,n);break;case"together":vd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Pn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Al|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Xa(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=Za(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Za(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function bd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&dr(e)))}function By(e,t,a){switch(t.tag){case 3:Nt(t,t.stateNode.containerInfo),Tn(t,Vt,e.memoizedState.cache),Qt();break;case 27:case 5:ia(t);break;case 4:Nt(t,t.stateNode.containerInfo);break;case 10:Tn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Go(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Cl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?ym(e,t,a):(Cl(t),e=Pn(e,t,a),e!==null?e.sibling:null);Cl(t);break;case 19:var u=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Xa(e,t,a,!1),n=(a&t.childLanes)!==0),u){if(n)return vm(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),me(qt,qt.current),n)break;return null;case 22:return t.lanes=0,dm(e,t,a,t.pendingProps);case 24:Tn(t,Vt,e.memoizedState.cache)}return Pn(e,t,a)}function bm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)$t=!0;else{if(!bd(e,a)&&(t.flags&128)===0)return $t=!1,By(e,t,a);$t=(e.flags&131072)!==0}else $t=!1,V&&(t.flags&1048576)!==0&&m(t,dn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=js(t.elementType),t.type=e,typeof e=="function")ur(e)?(n=Cs(e,n),t.tag=1,t=gm(null,t,e,n,a)):(t.tag=0,t=hd(null,t,e,n,a));else{if(e!=null){var u=e.$$typeof;if(u===ee){t.tag=11,t=um(null,t,e,n,a);break e}else if(u===P){t.tag=14,t=cm(null,t,e,n,a);break e}}throw t=he(e)||e,Error(o(306,t,""))}}return t;case 0:return hd(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,u=Cs(n,t.pendingProps),gm(e,t,n,u,a);case 3:e:{if(Nt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var d=t.memoizedState;u=d.element,Bo(e,t),pi(t,n,null,a);var y=t.memoizedState;if(n=y.cache,Tn(t,Vt,n),n!==d.cache&&$n(t,[Vt],a,!0),yi(),n=y.element,d.isDehydrated)if(d={element:n,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=xm(e,t,n,a);break e}else if(n!==u){u=Ea(Error(o(424)),t),fn(u),t=xm(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(L=Ka(e.firstChild),H=t,V=!0,fe=null,ve=!0,a=dh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Qt(),n===u){t=Pn(e,t,a);break e}la(e,t,n,a)}t=t.child}return t;case 26:return rc(e,t),e===null?(a=R0(t.type,null,t.pendingProps,null))?t.memoizedState=a:V||(a=t.type,e=t.pendingProps,n=wc(Te.current).createElement(a),n[_t]=t,n[Pt]=e,sa(n,a,e),Bt(n),t.stateNode=n):t.memoizedState=R0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ia(t),e===null&&V&&(n=t.stateNode=C0(t.type,t.pendingProps,Te.current),H=t,ve=!0,u=L,ql(t.type)?(Kd=u,L=Ka(n.firstChild)):L=u),la(e,t,t.pendingProps.children,a),rc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((u=n=L)&&(n=xp(n,t.type,t.pendingProps,ve),n!==null?(t.stateNode=n,H=t,L=Ka(n.firstChild),ve=!1,u=!0):u=!1),u||Qe(t)),ia(t),u=t.type,d=t.pendingProps,y=e!==null?e.memoizedProps:null,n=d.children,Wd(u,d)?n=null:y!==null&&Wd(u,y)&&(t.flags|=32),t.memoizedState!==null&&(u=Zo(e,t,Ry,null,null,a),Hi._currentValue=u),rc(e,t),la(e,t,n,a),t.child;case 6:return e===null&&V&&((e=a=L)&&(a=yp(a,t.pendingProps,ve),a!==null?(t.stateNode=a,H=t,L=null,e=!0):e=!1),e||Qe(t)),null;case 13:return ym(e,t,a);case 4:return Nt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ts(t,null,n,a):la(e,t,n,a),t.child;case 11:return um(e,t,t.type,t.pendingProps,a);case 7:return la(e,t,t.pendingProps,a),t.child;case 8:return la(e,t,t.pendingProps.children,a),t.child;case 12:return la(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,Tn(t,t.type,n.value),la(e,t,n.children,a),t.child;case 9:return u=t.type._context,n=t.pendingProps.children,Ns(t),u=na(u),n=n(u),t.flags|=1,la(e,t,n,a),t.child;case 14:return cm(e,t,t.type,t.pendingProps,a);case 15:return om(e,t,t.type,t.pendingProps,a);case 19:return vm(e,t,a);case 31:return Ly(e,t,a);case 22:return dm(e,t,a,t.pendingProps);case 24:return Ns(t),n=na(Vt),e===null?(u=qo(),u===null&&(u=xt,d=zo(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=a),u=d),t.memoizedState={parent:n,cache:u},Lo(t),Tn(t,Vt,u)):((e.lanes&a)!==0&&(Bo(e,t),pi(t,null,null,a),yi()),u=e.memoizedState,d=t.memoizedState,u.parent!==n?(u={parent:n,cache:n},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Tn(t,Vt,n)):(n=d.cache,Tn(t,Vt,n),n!==u.cache&&$n(t,[Vt],a,!0))),la(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Zn(e){e.flags|=4}function Sd(e,t,a,n,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Zm())e.flags|=8192;else throw Es=Gu,Ho}else e.flags&=-16777217}function Sm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!U0(t))if(Zm())e.flags|=8192;else throw Es=Gu,Ho}function uc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Vr():536870912,e.lanes|=t,wr|=t)}function ji(e,t){if(!V)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 St(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags&65011712,n|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags,n|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Vy(e,t,a){var n=t.pendingProps;switch(w(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(t),null;case 1:return St(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),hn(Vt),at(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(It(t)?Zn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,En())),St(t),null;case 26:var u=t.type,d=t.memoizedState;return e===null?(Zn(t),d!==null?(St(t),Sm(t,d)):(St(t),Sd(t,u,null,n,a))):d?d!==e.memoizedState?(Zn(t),St(t),Sm(t,d)):(St(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Zn(t),St(t),Sd(t,u,e,n,a)),null;case 27:if(xa(t),a=Te.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Zn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return St(t),null}e=ye.current,It(t)?Ae(t):(e=C0(u,n,a),t.stateNode=e,Zn(t))}return St(t),null;case 5:if(xa(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Zn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return St(t),null}if(d=ye.current,It(t))Ae(t);else{var y=wc(Te.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof n.is=="string"?y.createElement("select",{is:n.is}):y.createElement("select"),n.multiple?d.multiple=!0:n.size&&(d.size=n.size);break;default:d=typeof n.is=="string"?y.createElement(u,{is:n.is}):y.createElement(u)}}d[_t]=t,d[Pt]=n;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)d.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=d;e:switch(sa(d,u,n),u){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Zn(t)}}return St(t),Sd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Zn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=Te.current,It(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=H,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[_t]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||y0(e.nodeValue,a)),e||Qe(t,!0)}else e=wc(e).createTextNode(n),e[_t]=t,t.stateNode=e}return St(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=It(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[_t]=t}else Qt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;St(t),e=!1}else a=En(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ua(t),t):(Ua(t),null);if((t.flags&128)!==0)throw Error(o(558))}return St(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=It(t),n!==null&&n.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[_t]=t}else Qt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;St(t),u=!1}else u=En(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Ua(t),t):(Ua(t),null)}return Ua(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),d=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(d=n.memoizedState.cachePool.pool),d!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),uc(t,t.updateQueue),St(t),null);case 4:return at(),e===null&&$d(t.stateNode.containerInfo),St(t),null;case 10:return hn(t.type),St(t),null;case 19:if(se(qt),n=t.memoizedState,n===null)return St(t),null;if(u=(t.flags&128)!==0,d=n.rendering,d===null)if(u)ji(n,!1);else{if(Rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Iu(e),d!==null){for(t.flags|=128,ji(n,!1),e=d.updateQueue,t.updateQueue=e,uc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Bu(a,e),a=a.sibling;return me(qt,qt.current&1|2),V&&i(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ue()>hc&&(t.flags|=128,u=!0,ji(n,!1),t.lanes=4194304)}else{if(!u)if(e=Iu(d),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,uc(t,e),ji(n,!0),n.tail===null&&n.tailMode==="hidden"&&!d.alternate&&!V)return St(t),null}else 2*Ue()-n.renderingStartTime>hc&&a!==536870912&&(t.flags|=128,u=!0,ji(n,!1),t.lanes=4194304);n.isBackwards?(d.sibling=t.child,t.child=d):(e=n.last,e!==null?e.sibling=d:t.child=d,n.last=d)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ue(),e.sibling=null,a=qt.current,me(qt,u?a&1|2:a&1),V&&i(t,n.treeForkCount),e):(St(t),null);case 22:case 23:return Ua(t),Fo(),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&&(St(t),t.subtreeFlags&6&&(t.flags|=8192)):St(t),a=t.updateQueue,a!==null&&uc(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&se(ws),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),hn(Vt),St(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Yy(e,t){switch(w(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return hn(Vt),at(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xa(t),null;case 31:if(t.memoizedState!==null){if(Ua(t),t.alternate===null)throw Error(o(340));Qt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ua(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Qt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(qt),null;case 4:return at(),null;case 10:return hn(t.type),null;case 22:case 23:return Ua(t),Fo(),e!==null&&se(ws),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return hn(Vt),null;case 25:return null;default:return null}}function Nm(e,t){switch(w(t),t.tag){case 3:hn(Vt),at();break;case 26:case 27:case 5:xa(t);break;case 4:at();break;case 31:t.memoizedState!==null&&Ua(t);break;case 13:Ua(t);break;case 19:se(qt);break;case 10:hn(t.type);break;case 22:case 23:Ua(t),Fo(),e!==null&&se(ws);break;case 24:hn(Vt)}}function Ei(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){n=void 0;var d=a.create,y=a.inst;n=d(),y.destroy=n}a=a.next}while(a!==u)}}catch(E){dt(t,t.return,E)}}function Dl(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var d=u.next;n=d;do{if((n.tag&e)===e){var y=n.inst,E=y.destroy;if(E!==void 0){y.destroy=void 0,u=t;var k=a,J=E;try{J()}catch(re){dt(u,k,re)}}}n=n.next}while(n!==d)}}catch(re){dt(t,t.return,re)}}function wm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{hh(t,a)}catch(n){dt(e,e.return,n)}}}function jm(e,t,a){a.props=Cs(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){dt(e,t,n)}}function Ti(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(u){dt(e,t,u)}}function Mn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){dt(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){dt(e,t,u)}else a.current=null}function Em(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(u){dt(e,e.return,u)}}function Nd(e,t,a){try{var n=e.stateNode;op(n,e.type,a,t),n[Pt]=t}catch(u){dt(e,e.return,u)}}function Tm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ql(e.type)||e.tag===4}function wd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tm(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&&ql(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 jd(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=$a));else if(n!==4&&(n===27&&ql(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(jd(e,t,a),e=e.sibling;e!==null;)jd(e,t,a),e=e.sibling}function cc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&ql(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(cc(e,t,a),e=e.sibling;e!==null;)cc(e,t,a),e=e.sibling}function Mm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);sa(t,n,a),t[_t]=e,t[Pt]=a}catch(d){dt(e,e.return,d)}}var Wn=!1,Ft=!1,Ed=!1,Cm=typeof WeakSet=="function"?WeakSet:Set,Xt=null;function $y(e,t){if(e=e.containerInfo,Pd=Dc,e=Ao(e),ar(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 u=n.anchorOffset,d=n.focusNode;n=n.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var y=0,E=-1,k=-1,J=0,re=0,oe=e,K=null;t:for(;;){for(var ae;oe!==a||u!==0&&oe.nodeType!==3||(E=y+u),oe!==d||n!==0&&oe.nodeType!==3||(k=y+n),oe.nodeType===3&&(y+=oe.nodeValue.length),(ae=oe.firstChild)!==null;)K=oe,oe=ae;for(;;){if(oe===e)break t;if(K===a&&++J===u&&(E=y),K===d&&++re===n&&(k=y),(ae=oe.nextSibling)!==null)break;oe=K,K=oe.parentNode}oe=ae}a=E===-1||k===-1?null:{start:E,end:k}}else a=null}a=a||{start:0,end:0}}else a=null;for(Zd={focusedElem:e,selectionRange:a},Dc=!1,Xt=t;Xt!==null;)if(t=Xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Xt=e;else for(;Xt!==null;){switch(t=Xt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,u=d.memoizedProps,d=d.memoizedState,n=a.stateNode;try{var be=Cs(a.type,u);e=n.getSnapshotBeforeUpdate(be,d),n.__reactInternalSnapshotBeforeUpdate=e}catch(ke){dt(a,a.return,ke)}}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,Xt=e;break}Xt=t.return}}function Om(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Qn(e,a),n&4&&Ei(5,a);break;case 1:if(Qn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){dt(a,a.return,y)}else{var u=Cs(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){dt(a,a.return,y)}}n&64&&wm(a),n&512&&Ti(a,a.return);break;case 3:if(Qn(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{hh(e,t)}catch(y){dt(a,a.return,y)}}break;case 27:t===null&&n&4&&Mm(a);case 26:case 5:Qn(e,a),t===null&&n&4&&Em(a),n&512&&Ti(a,a.return);break;case 12:Qn(e,a);break;case 31:Qn(e,a),n&4&&Am(e,a);break;case 13:Qn(e,a),n&4&&km(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Jy.bind(null,a),pp(e,a))));break;case 22:if(n=a.memoizedState!==null||Wn,!n){t=t!==null&&t.memoizedState!==null||Ft,u=Wn;var d=Ft;Wn=n,(Ft=t)&&!d?Xn(e,a,(a.subtreeFlags&8772)!==0):Qn(e,a),Wn=u,Ft=d}break;case 30:break;default:Qn(e,a)}}function Dm(e){var t=e.alternate;t!==null&&(e.alternate=null,Dm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Gs(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 Et=null,Ma=!1;function In(e,t,a){for(a=a.child;a!==null;)Rm(e,t,a),a=a.sibling}function Rm(e,t,a){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(rt,a)}catch{}switch(a.tag){case 26:Ft||Mn(a,t),In(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ft||Mn(a,t);var n=Et,u=Ma;ql(a.type)&&(Et=a.stateNode,Ma=!1),In(e,t,a),zi(a.stateNode),Et=n,Ma=u;break;case 5:Ft||Mn(a,t);case 6:if(n=Et,u=Ma,Et=null,In(e,t,a),Et=n,Ma=u,Et!==null)if(Ma)try{(Et.nodeType===9?Et.body:Et.nodeName==="HTML"?Et.ownerDocument.body:Et).removeChild(a.stateNode)}catch(d){dt(a,t,d)}else try{Et.removeChild(a.stateNode)}catch(d){dt(a,t,d)}break;case 18:Et!==null&&(Ma?(e=Et,w0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Rr(e)):w0(Et,a.stateNode));break;case 4:n=Et,u=Ma,Et=a.stateNode.containerInfo,Ma=!0,In(e,t,a),Et=n,Ma=u;break;case 0:case 11:case 14:case 15:Dl(2,a,t),Ft||Dl(4,a,t),In(e,t,a);break;case 1:Ft||(Mn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&jm(a,t,n)),In(e,t,a);break;case 21:In(e,t,a);break;case 22:Ft=(n=Ft)||a.memoizedState!==null,In(e,t,a),Ft=n;break;default:In(e,t,a)}}function Am(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Rr(e)}catch(a){dt(t,t.return,a)}}}function km(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Rr(e)}catch(a){dt(t,t.return,a)}}function Fy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Cm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Cm),t;default:throw Error(o(435,e.tag))}}function oc(e,t){var a=Fy(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var u=Ky.bind(null,e,n);n.then(u,u)}})}function Ca(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var u=a[n],d=e,y=t,E=y;e:for(;E!==null;){switch(E.tag){case 27:if(ql(E.type)){Et=E.stateNode,Ma=!1;break e}break;case 5:Et=E.stateNode,Ma=!1;break e;case 3:case 4:Et=E.stateNode.containerInfo,Ma=!0;break e}E=E.return}if(Et===null)throw Error(o(160));Rm(d,y,u),Et=null,Ma=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_m(t,e),t=t.sibling}var mn=null;function _m(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ca(t,e),Oa(e),n&4&&(Dl(3,e,e.return),Ei(3,e),Dl(5,e,e.return));break;case 1:Ca(t,e),Oa(e),n&512&&(Ft||a===null||Mn(a,a.return)),n&64&&Wn&&(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 u=mn;if(Ca(t,e),Oa(e),n&512&&(Ft||a===null||Mn(a,a.return)),n&4){var d=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,u=u.ownerDocument||u;t:switch(n){case"title":d=u.getElementsByTagName("title")[0],(!d||d[Xl]||d[_t]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(n),u.head.insertBefore(d,u.querySelector("head > title"))),sa(d,n,a),d[_t]=e,Bt(d),n=d;break e;case"link":var y=_0("link","href",u).get(n+(a.href||""));if(y){for(var E=0;E<y.length;E++)if(d=y[E],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(E,1);break t}}d=u.createElement(n),sa(d,n,a),u.head.appendChild(d);break;case"meta":if(y=_0("meta","content",u).get(n+(a.content||""))){for(E=0;E<y.length;E++)if(d=y[E],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(E,1);break t}}d=u.createElement(n),sa(d,n,a),u.head.appendChild(d);break;default:throw Error(o(468,n))}d[_t]=e,Bt(d),n=d}e.stateNode=n}else z0(u,e.type,e.stateNode);else e.stateNode=k0(u,n,e.memoizedProps);else d!==n?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,n===null?z0(u,e.type,e.stateNode):k0(u,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Nd(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ca(t,e),Oa(e),n&512&&(Ft||a===null||Mn(a,a.return)),a!==null&&n&4&&Nd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ca(t,e),Oa(e),n&512&&(Ft||a===null||Mn(a,a.return)),e.flags&32){u=e.stateNode;try{rn(u,"")}catch(be){dt(e,e.return,be)}}n&4&&e.stateNode!=null&&(u=e.memoizedProps,Nd(e,u,a!==null?a.memoizedProps:u)),n&1024&&(Ed=!0);break;case 6:if(Ca(t,e),Oa(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(be){dt(e,e.return,be)}}break;case 3:if(Tc=null,u=mn,mn=jc(t.containerInfo),Ca(t,e),mn=u,Oa(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Rr(t.containerInfo)}catch(be){dt(e,e.return,be)}Ed&&(Ed=!1,zm(e));break;case 4:n=mn,mn=jc(e.stateNode.containerInfo),Ca(t,e),Oa(e),mn=n;break;case 12:Ca(t,e),Oa(e);break;case 31:Ca(t,e),Oa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 13:Ca(t,e),Oa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(fc=Ue()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 22:u=e.memoizedState!==null;var k=a!==null&&a.memoizedState!==null,J=Wn,re=Ft;if(Wn=J||u,Ft=re||k,Ca(t,e),Ft=re,Wn=J,Oa(e),n&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||k||Wn||Ft||Os(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){k=a=t;try{if(d=k.stateNode,u)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{E=k.stateNode;var oe=k.memoizedProps.style,K=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;E.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(be){dt(k,k.return,be)}}}else if(t.tag===6){if(a===null){k=t;try{k.stateNode.nodeValue=u?"":k.memoizedProps}catch(be){dt(k,k.return,be)}}}else if(t.tag===18){if(a===null){k=t;try{var ae=k.stateNode;u?j0(ae,!0):j0(k.stateNode,!1)}catch(be){dt(k,k.return,be)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,oc(e,a))));break;case 19:Ca(t,e),Oa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 30:break;case 21:break;default:Ca(t,e),Oa(e)}}function Oa(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Tm(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var u=a.stateNode,d=wd(e);cc(e,d,u);break;case 5:var y=a.stateNode;a.flags&32&&(rn(y,""),a.flags&=-33);var E=wd(e);cc(e,E,y);break;case 3:case 4:var k=a.stateNode.containerInfo,J=wd(e);jd(e,J,k);break;default:throw Error(o(161))}}catch(re){dt(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;zm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Qn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Om(e,t.alternate,t),t=t.sibling}function Os(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Dl(4,t,t.return),Os(t);break;case 1:Mn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&jm(t,t.return,a),Os(t);break;case 27:zi(t.stateNode);case 26:case 5:Mn(t,t.return),Os(t);break;case 22:t.memoizedState===null&&Os(t);break;case 30:Os(t);break;default:Os(t)}e=e.sibling}}function Xn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,u=e,d=t,y=d.flags;switch(d.tag){case 0:case 11:case 15:Xn(u,d,a),Ei(4,d);break;case 1:if(Xn(u,d,a),n=d,u=n.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(J){dt(n,n.return,J)}if(n=d,u=n.updateQueue,u!==null){var E=n.stateNode;try{var k=u.shared.hiddenCallbacks;if(k!==null)for(u.shared.hiddenCallbacks=null,u=0;u<k.length;u++)fh(k[u],E)}catch(J){dt(n,n.return,J)}}a&&y&64&&wm(d),Ti(d,d.return);break;case 27:Mm(d);case 26:case 5:Xn(u,d,a),a&&n===null&&y&4&&Em(d),Ti(d,d.return);break;case 12:Xn(u,d,a);break;case 31:Xn(u,d,a),a&&y&4&&Am(u,d);break;case 13:Xn(u,d,a),a&&y&4&&km(u,d);break;case 22:d.memoizedState===null&&Xn(u,d,a),Ti(d,d.return);break;case 30:break;default:Xn(u,d,a)}t=t.sibling}}function Td(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&&fi(a))}function Md(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fi(e))}function gn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Um(e,t,a,n),t=t.sibling}function Um(e,t,a,n){var u=t.flags;switch(t.tag){case 0:case 11:case 15:gn(e,t,a,n),u&2048&&Ei(9,t);break;case 1:gn(e,t,a,n);break;case 3:gn(e,t,a,n),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fi(e)));break;case 12:if(u&2048){gn(e,t,a,n),e=t.stateNode;try{var d=t.memoizedProps,y=d.id,E=d.onPostCommit;typeof E=="function"&&E(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(k){dt(t,t.return,k)}}else gn(e,t,a,n);break;case 31:gn(e,t,a,n);break;case 13:gn(e,t,a,n);break;case 23:break;case 22:d=t.stateNode,y=t.alternate,t.memoizedState!==null?d._visibility&2?gn(e,t,a,n):Mi(e,t):d._visibility&2?gn(e,t,a,n):(d._visibility|=2,br(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Td(y,t);break;case 24:gn(e,t,a,n),u&2048&&Md(t.alternate,t);break;default:gn(e,t,a,n)}}function br(e,t,a,n,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,y=t,E=a,k=n,J=y.flags;switch(y.tag){case 0:case 11:case 15:br(d,y,E,k,u),Ei(8,y);break;case 23:break;case 22:var re=y.stateNode;y.memoizedState!==null?re._visibility&2?br(d,y,E,k,u):Mi(d,y):(re._visibility|=2,br(d,y,E,k,u)),u&&J&2048&&Td(y.alternate,y);break;case 24:br(d,y,E,k,u),u&&J&2048&&Md(y.alternate,y);break;default:br(d,y,E,k,u)}t=t.sibling}}function Mi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,u=n.flags;switch(n.tag){case 22:Mi(a,n),u&2048&&Td(n.alternate,n);break;case 24:Mi(a,n),u&2048&&Md(n.alternate,n);break;default:Mi(a,n)}t=t.sibling}}var Ci=8192;function Sr(e,t,a){if(e.subtreeFlags&Ci)for(e=e.child;e!==null;)qm(e,t,a),e=e.sibling}function qm(e,t,a){switch(e.tag){case 26:Sr(e,t,a),e.flags&Ci&&e.memoizedState!==null&&Dp(a,mn,e.memoizedState,e.memoizedProps);break;case 5:Sr(e,t,a);break;case 3:case 4:var n=mn;mn=jc(e.stateNode.containerInfo),Sr(e,t,a),mn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ci,Ci=16777216,Sr(e,t,a),Ci=n):Sr(e,t,a));break;default:Sr(e,t,a)}}function Hm(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 Oi(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];Xt=n,Bm(n,e)}Hm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lm(e),e=e.sibling}function Lm(e){switch(e.tag){case 0:case 11:case 15:Oi(e),e.flags&2048&&Dl(9,e,e.return);break;case 3:Oi(e);break;case 12:Oi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,dc(e)):Oi(e);break;default:Oi(e)}}function dc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Xt=n,Bm(n,e)}Hm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Dl(8,t,t.return),dc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,dc(t));break;default:dc(t)}e=e.sibling}}function Bm(e,t){for(;Xt!==null;){var a=Xt;switch(a.tag){case 0:case 11:case 15:Dl(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:fi(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Xt=n;else e:for(a=e;Xt!==null;){n=Xt;var u=n.sibling,d=n.return;if(Dm(n),n===a){Xt=null;break e}if(u!==null){u.return=d,Xt=u;break e}Xt=d}}}var Gy={getCacheForType:function(e){var t=na(Vt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return na(Vt).controller.signal}},Py=typeof WeakMap=="function"?WeakMap:Map,it=0,xt=null,Ze=null,Xe=0,ot=0,qa=null,Rl=!1,Nr=!1,Cd=!1,Jn=0,Rt=0,Al=0,Ds=0,Od=0,Ha=0,wr=0,Di=null,Da=null,Dd=!1,fc=0,Vm=0,hc=1/0,mc=null,kl=null,Wt=0,_l=null,jr=null,Kn=0,Rd=0,Ad=null,Ym=null,Ri=0,kd=null;function La(){return(it&2)!==0&&Xe!==0?Xe&-Xe:$.T!==null?Ld():Fs()}function $m(){if(Ha===0)if((Xe&536870912)===0||V){var e=Vs;Vs<<=1,(Vs&3932160)===0&&(Vs=262144),Ha=e}else Ha=536870912;return e=za.current,e!==null&&(e.flags|=32),Ha}function Ra(e,t,a){(e===xt&&(ot===2||ot===9)||e.cancelPendingCommit!==null)&&(Er(e,0),zl(e,Xe,Ha,!1)),cl(e,a),((it&2)===0||e!==xt)&&(e===xt&&((it&2)===0&&(Ds|=a),Rt===4&&zl(e,Xe,Ha,!1)),Cn(e))}function Fm(e,t,a){if((it&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ul(e,t),u=n?Iy(e,t):zd(e,t,!0),d=n;do{if(u===0){Nr&&!n&&zl(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!Zy(a)){u=zd(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var E=e;u=Di;var k=E.current.memoizedState.isDehydrated;if(k&&(Er(E,y).flags|=256),y=zd(E,y,!1),y!==2){if(Cd&&!k){E.errorRecoveryDisabledLanes|=d,Ds|=d,u=4;break e}d=Da,Da=u,d!==null&&(Da===null?Da=d:Da.push.apply(Da,d))}u=y}if(d=!1,u!==2)continue}}if(u===1){Er(e,0),zl(e,t,0,!0);break}e:{switch(n=e,d=u,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:zl(n,t,Ha,!Rl);break e;case 2:Da=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(u=fc+300-Ue(),10<u)){if(zl(n,t,Ha,!Rl),Il(n,0,!0)!==0)break e;Kn=t,n.timeoutHandle=S0(Gm.bind(null,n,a,Da,mc,Dd,t,Ha,Ds,wr,Rl,d,"Throttled",-0,0),u);break e}Gm(n,a,Da,mc,Dd,t,Ha,Ds,wr,Rl,d,null,-0,0)}}break}while(!0);Cn(e)}function Gm(e,t,a,n,u,d,y,E,k,J,re,oe,K,ae){if(e.timeoutHandle=-1,oe=t.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$a},qm(t,d,oe);var be=(d&62914560)===d?fc-Ue():(d&4194048)===d?Vm-Ue():0;if(be=Rp(oe,be),be!==null){Kn=d,e.cancelPendingCommit=be(Km.bind(null,e,t,d,a,n,u,y,E,k,re,oe,null,K,ae)),zl(e,d,y,!J);return}}Km(e,t,d,a,n,u,y,E,k)}function Zy(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 u=a[n],d=u.getSnapshot;u=u.value;try{if(!fa(d(),u))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 zl(e,t,a,n){t&=~Od,t&=~Ds,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var u=t;0<u;){var d=31-jt(u),y=1<<d;n[d]=-1,u&=~y}a!==0&&pt(e,a,t)}function gc(){return(it&6)===0?(Ai(0),!1):!0}function _d(){if(Ze!==null){if(ot===0)var e=Ze.return;else e=Ze,Qa=Yn=null,Qo(e),gr=null,mi=0,e=Ze;for(;e!==null;)Nm(e.alternate,e),e=e.return;Ze=null}}function Er(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,hp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Kn=0,_d(),xt=e,Ze=a=Za(e.current,null),Xe=t,ot=0,qa=null,Rl=!1,Nr=ul(e,t),Cd=!1,wr=Ha=Od=Ds=Al=Rt=0,Da=Di=null,Dd=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var u=31-jt(n),d=1<<u;t|=e[u],n&=~d}return Jn=t,wl(),a}function Pm(e,t){Ye=null,$.H=Ni,t===mr||t===Fu?(t=uh(),ot=3):t===Ho?(t=uh(),ot=4):ot=t===fd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qa=t,Ze===null&&(Rt=1,lc(e,Ea(t,e.current)))}function Zm(){var e=za.current;return e===null?!0:(Xe&4194048)===Xe?Ja===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?e===Ja:!1}function Wm(){var e=$.H;return $.H=Ni,e===null?Ni:e}function Im(){var e=$.A;return $.A=Gy,e}function xc(){Rt=4,Rl||(Xe&4194048)!==Xe&&za.current!==null||(Nr=!0),(Al&134217727)===0&&(Ds&134217727)===0||xt===null||zl(xt,Xe,Ha,!1)}function zd(e,t,a){var n=it;it|=2;var u=Wm(),d=Im();(xt!==e||Xe!==t)&&(mc=null,Er(e,t)),t=!1;var y=Rt;e:do try{if(ot!==0&&Ze!==null){var E=Ze,k=qa;switch(ot){case 8:_d(),y=6;break e;case 3:case 2:case 9:case 6:za.current===null&&(t=!0);var J=ot;if(ot=0,qa=null,Tr(e,E,k,J),a&&Nr){y=0;break e}break;default:J=ot,ot=0,qa=null,Tr(e,E,k,J)}}Wy(),y=Rt;break}catch(re){Pm(e,re)}while(!0);return t&&e.shellSuspendCounter++,Qa=Yn=null,it=n,$.H=u,$.A=d,Ze===null&&(xt=null,Xe=0,wl()),y}function Wy(){for(;Ze!==null;)Qm(Ze)}function Iy(e,t){var a=it;it|=2;var n=Wm(),u=Im();xt!==e||Xe!==t?(mc=null,hc=Ue()+500,Er(e,t)):Nr=ul(e,t);e:do try{if(ot!==0&&Ze!==null){t=Ze;var d=qa;t:switch(ot){case 1:ot=0,qa=null,Tr(e,t,d,1);break;case 2:case 9:if(rh(d)){ot=0,qa=null,Xm(t);break}t=function(){ot!==2&&ot!==9||xt!==e||(ot=7),Cn(e)},d.then(t,t);break e;case 3:ot=7;break e;case 4:ot=5;break e;case 7:rh(d)?(ot=0,qa=null,Xm(t)):(ot=0,qa=null,Tr(e,t,d,7));break;case 5:var y=null;switch(Ze.tag){case 26:y=Ze.memoizedState;case 5:case 27:var E=Ze;if(y?U0(y):E.stateNode.complete){ot=0,qa=null;var k=E.sibling;if(k!==null)Ze=k;else{var J=E.return;J!==null?(Ze=J,yc(J)):Ze=null}break t}}ot=0,qa=null,Tr(e,t,d,5);break;case 6:ot=0,qa=null,Tr(e,t,d,6);break;case 8:_d(),Rt=6;break e;default:throw Error(o(462))}}Qy();break}catch(re){Pm(e,re)}while(!0);return Qa=Yn=null,$.H=n,$.A=u,it=a,Ze!==null?0:(xt=null,Xe=0,wl(),Rt)}function Qy(){for(;Ze!==null&&!pe();)Qm(Ze)}function Qm(e){var t=bm(e.alternate,e,Jn);e.memoizedProps=e.pendingProps,t===null?yc(e):Ze=t}function Xm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=mm(a,t,t.pendingProps,t.type,void 0,Xe);break;case 11:t=mm(a,t,t.pendingProps,t.type.render,t.ref,Xe);break;case 5:Qo(t);default:Nm(a,t),t=Ze=Bu(t,Jn),t=bm(a,t,Jn)}e.memoizedProps=e.pendingProps,t===null?yc(e):Ze=t}function Tr(e,t,a,n){Qa=Yn=null,Qo(t),gr=null,mi=0;var u=t.return;try{if(Hy(e,u,t,a,Xe)){Rt=1,lc(e,Ea(a,e.current)),Ze=null;return}}catch(d){if(u!==null)throw Ze=u,d;Rt=1,lc(e,Ea(a,e.current)),Ze=null;return}t.flags&32768?(V||n===1?e=!0:Nr||(Xe&536870912)!==0?e=!1:(Rl=e=!0,(n===2||n===9||n===3||n===6)&&(n=za.current,n!==null&&n.tag===13&&(n.flags|=16384))),Jm(t,e)):yc(t)}function yc(e){var t=e;do{if((t.flags&32768)!==0){Jm(t,Rl);return}e=t.return;var a=Vy(t.alternate,t,Jn);if(a!==null){Ze=a;return}if(t=t.sibling,t!==null){Ze=t;return}Ze=t=e}while(t!==null);Rt===0&&(Rt=5)}function Jm(e,t){do{var a=Yy(e.alternate,e);if(a!==null){a.flags&=32767,Ze=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ze=e;return}Ze=e=a}while(e!==null);Rt=6,Ze=null}function Km(e,t,a,n,u,d,y,E,k){e.cancelPendingCommit=null;do pc();while(Wt!==0);if((it&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=ps,fu(e,a,d,y,E,k),e===xt&&(Ze=xt=null,Xe=0),jr=t,_l=e,Kn=a,Rd=d,Ad=u,Ym=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ep(Mt,function(){return l0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=$.T,$.T=null,u=ie.p,ie.p=2,y=it,it|=4;try{$y(e,t,a)}finally{it=y,ie.p=u,$.T=n}}Wt=1,e0(),t0(),a0()}}function e0(){if(Wt===1){Wt=0;var e=_l,t=jr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=$.T,$.T=null;var n=ie.p;ie.p=2;var u=it;it|=4;try{_m(t,e);var d=Zd,y=Ao(e.containerInfo),E=d.focusedElem,k=d.selectionRange;if(y!==E&&E&&E.ownerDocument&&tt(E.ownerDocument.documentElement,E)){if(k!==null&&ar(E)){var J=k.start,re=k.end;if(re===void 0&&(re=J),"selectionStart"in E)E.selectionStart=J,E.selectionEnd=Math.min(re,E.value.length);else{var oe=E.ownerDocument||document,K=oe&&oe.defaultView||window;if(K.getSelection){var ae=K.getSelection(),be=E.textContent.length,ke=Math.min(k.start,be),gt=k.end===void 0?ke:Math.min(k.end,be);!ae.extend&&ke>gt&&(y=gt,gt=ke,ke=y);var F=_u(E,ke),B=_u(E,gt);if(F&&B&&(ae.rangeCount!==1||ae.anchorNode!==F.node||ae.anchorOffset!==F.offset||ae.focusNode!==B.node||ae.focusOffset!==B.offset)){var X=oe.createRange();X.setStart(F.node,F.offset),ae.removeAllRanges(),ke>gt?(ae.addRange(X),ae.extend(B.node,B.offset)):(X.setEnd(B.node,B.offset),ae.addRange(X))}}}}for(oe=[],ae=E;ae=ae.parentNode;)ae.nodeType===1&&oe.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<oe.length;E++){var ue=oe[E];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Dc=!!Pd,Zd=Pd=null}finally{it=u,ie.p=n,$.T=a}}e.current=t,Wt=2}}function t0(){if(Wt===2){Wt=0;var e=_l,t=jr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=$.T,$.T=null;var n=ie.p;ie.p=2;var u=it;it|=4;try{Om(e,t.alternate,t)}finally{it=u,ie.p=n,$.T=a}}Wt=3}}function a0(){if(Wt===4||Wt===3){Wt=0,Re();var e=_l,t=jr,a=Kn,n=Ym;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Wt=5:(Wt=0,jr=_l=null,n0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(kl=null),da(a),t=t.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(rt,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=$.T,u=ie.p,ie.p=2,$.T=null;try{for(var d=e.onRecoverableError,y=0;y<n.length;y++){var E=n[y];d(E.value,{componentStack:E.stack})}}finally{$.T=t,ie.p=u}}(Kn&3)!==0&&pc(),Cn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===kd?Ri++:(Ri=0,kd=e):Ri=0,Ai(0)}}function n0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fi(t)))}function pc(){return e0(),t0(),a0(),l0()}function l0(){if(Wt!==5)return!1;var e=_l,t=Rd;Rd=0;var a=da(Kn),n=$.T,u=ie.p;try{ie.p=32>a?32:a,$.T=null,a=Ad,Ad=null;var d=_l,y=Kn;if(Wt=0,jr=_l=null,Kn=0,(it&6)!==0)throw Error(o(331));var E=it;if(it|=4,Lm(d.current),Um(d,d.current,y,a),it=E,Ai(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(rt,d)}catch{}return!0}finally{ie.p=u,$.T=n,n0(e,t)}}function s0(e,t,a){t=Ea(a,t),t=dd(e.stateNode,t,2),e=Ml(e,t,2),e!==null&&(cl(e,2),Cn(e))}function dt(e,t,a){if(e.tag===3)s0(e,e,a);else for(;t!==null;){if(t.tag===3){s0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(kl===null||!kl.has(n))){e=Ea(a,e),a=rm(2),n=Ml(t,a,2),n!==null&&(im(a,n,t,e),cl(n,2),Cn(n));break}}t=t.return}}function Ud(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Py;var u=new Set;n.set(t,u)}else u=n.get(t),u===void 0&&(u=new Set,n.set(t,u));u.has(a)||(Cd=!0,u.add(a),e=Xy.bind(null,e,t,a),t.then(e,e))}function Xy(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,xt===e&&(Xe&a)===a&&(Rt===4||Rt===3&&(Xe&62914560)===Xe&&300>Ue()-fc?(it&2)===0&&Er(e,0):Od|=a,wr===Xe&&(wr=0)),Cn(e)}function r0(e,t){t===0&&(t=Vr()),e=Pa(e,t),e!==null&&(cl(e,t),Cn(e))}function Jy(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),r0(e,a)}function Ky(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,u=e.memoizedState;u!==null&&(a=u.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),r0(e,a)}function ep(e,t){return an(e,t)}var vc=null,Mr=null,qd=!1,bc=!1,Hd=!1,Ul=0;function Cn(e){e!==Mr&&e.next===null&&(Mr===null?vc=Mr=e:Mr=Mr.next=e),bc=!0,qd||(qd=!0,ap())}function Ai(e,t){if(!Hd&&bc){Hd=!0;do for(var a=!1,n=vc;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var d=0;else{var y=n.suspendedLanes,E=n.pingedLanes;d=(1<<31-jt(42|e)+1)-1,d&=u&~(y&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,o0(n,d))}else d=Xe,d=Il(n,n===xt?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(d&3)===0||ul(n,d)||(a=!0,o0(n,d));n=n.next}while(a);Hd=!1}}function tp(){i0()}function i0(){bc=qd=!1;var e=0;Ul!==0&&fp()&&(e=Ul);for(var t=Ue(),a=null,n=vc;n!==null;){var u=n.next,d=u0(n,t);d===0?(n.next=null,a===null?vc=u:a.next=u,u===null&&(Mr=a)):(a=n,(e!==0||(d&3)!==0)&&(bc=!0)),n=u}Wt!==0&&Wt!==5||Ai(e),Ul!==0&&(Ul=0)}function u0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-jt(d),E=1<<y,k=u[y];k===-1?((E&a)===0||(E&n)!==0)&&(u[y]=du(E,t)):k<=t&&(e.expiredLanes|=E),d&=~E}if(t=xt,a=Xe,a=Il(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(ot===2||ot===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&le(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ul(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&le(n),da(a)){case 2:case 8:a=kt;break;case 32:a=Mt;break;case 268435456:a=ca;break;default:a=Mt}return n=c0.bind(null,e),a=an(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&le(n),e.callbackPriority=2,e.callbackNode=null,2}function c0(e,t){if(Wt!==0&&Wt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(pc()&&e.callbackNode!==a)return null;var n=Xe;return n=Il(e,e===xt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Fm(e,n,t),u0(e,Ue()),e.callbackNode!=null&&e.callbackNode===a?c0.bind(null,e):null)}function o0(e,t){if(pc())return null;Fm(e,t,!0)}function ap(){mp(function(){(it&6)!==0?an(Ke,tp):i0()})}function Ld(){if(Ul===0){var e=fr;e===0&&(e=il,il<<=1,(il&261888)===0&&(il=256)),Ul=e}return Ul}function d0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ns(""+e)}function f0(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 np(e,t,a,n,u){if(t==="submit"&&a&&a.stateNode===u){var d=d0((u[Pt]||null).action),y=n.submitter;y&&(t=(t=y[Pt]||null)?d0(t.formAction):y.getAttribute("formAction"),t!==null&&(d=t,y=null));var E=new is("action","action",null,n,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ul!==0){var k=y?f0(u,y):new FormData(u);sd(a,{pending:!0,data:k,method:u.method,action:d},null,k)}}else typeof d=="function"&&(E.preventDefault(),k=y?f0(u,y):new FormData(u),sd(a,{pending:!0,data:k,method:u.method,action:d},d,k))},currentTarget:u}]})}}for(var Bd=0;Bd<ui.length;Bd++){var Vd=ui[Bd],lp=Vd.toLowerCase(),sp=Vd[0].toUpperCase()+Vd.slice(1);ja(lp,"on"+sp)}ja(qu,"onAnimationEnd"),ja(Hu,"onAnimationIteration"),ja(sr,"onAnimationStart"),ja("dblclick","onDoubleClick"),ja("focusin","onFocus"),ja("focusout","onBlur"),ja(ko,"onTransitionRun"),ja(_o,"onTransitionStart"),ja(Lu,"onTransitionCancel"),ja(ri,"onTransitionEnd"),ol("onMouseEnter",["mouseout","mouseover"]),ol("onMouseLeave",["mouseout","mouseover"]),ol("onPointerEnter",["pointerout","pointerover"]),ol("onPointerLeave",["pointerout","pointerover"]),bn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bn("onBeforeInput",["compositionend","keypress","textInput","paste"]),bn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ki="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(" "),rp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ki));function h0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],u=n.event;n=n.listeners;e:{var d=void 0;if(t)for(var y=n.length-1;0<=y;y--){var E=n[y],k=E.instance,J=E.currentTarget;if(E=E.listener,k!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=J;try{d(u)}catch(re){Nl(re)}u.currentTarget=null,d=k}else for(y=0;y<n.length;y++){if(E=n[y],k=E.instance,J=E.currentTarget,E=E.listener,k!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=J;try{d(u)}catch(re){Nl(re)}u.currentTarget=null,d=k}}}}function We(e,t){var a=t[Ql];a===void 0&&(a=t[Ql]=new Set);var n=e+"__bubble";a.has(n)||(m0(t,e,2,!1),a.add(n))}function Yd(e,t,a){var n=0;t&&(n|=4),m0(a,e,n,t)}var Sc="_reactListening"+Math.random().toString(36).slice(2);function $d(e){if(!e[Sc]){e[Sc]=!0,xu.forEach(function(a){a!=="selectionchange"&&(rp.has(a)||Yd(a,!1,e),Yd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sc]||(t[Sc]=!0,Yd("selectionchange",!1,t))}}function m0(e,t,a,n){switch($0(t)){case 2:var u=_p;break;case 8:u=zp;break;default:u=lf}a=u.bind(null,t,a,e),u=void 0,!Xr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),n?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function Fd(e,t,a,n,u){var d=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 E=n.stateNode.containerInfo;if(E===u)break;if(y===4)for(y=n.return;y!==null;){var k=y.tag;if((k===3||k===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;E!==null;){if(y=kn(E),y===null)return;if(k=y.tag,k===5||k===6||k===26||k===27){n=d=y;continue e}E=E.parentNode}}n=n.return}Qr(function(){var J=d,re=Qs(a),oe=[];e:{var K=ii.get(e);if(K!==void 0){var ae=is,be=e;switch(e){case"keypress":if(rs(a)===0)break e;case"keydown":case"keyup":ae=po;break;case"focusin":be="focus",ae=tr;break;case"focusout":be="blur",ae=tr;break;case"beforeblur":case"afterblur":ae=tr;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=Nu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=uo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=So;break;case qu:case Hu:case sr:ae=ml;break;case ri:ae=No;break;case"scroll":case"scrollend":ae=Jr;break;case"wheel":ae=jo;break;case"copy":case"cut":case"paste":ae=gl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=wu;break;case"toggle":case"beforetoggle":ae=To}var ke=(t&4)!==0,gt=!ke&&(e==="scroll"||e==="scrollend"),F=ke?K!==null?K+"Capture":null:K;ke=[];for(var B=J,X;B!==null;){var ue=B;if(X=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||X===null||F===null||(ue=ls(B,F),ue!=null&&ke.push(_i(B,ue,X))),gt)break;B=B.return}0<ke.length&&(K=new ae(K,be,null,a,re),oe.push({event:K,listeners:ke}))}}if((t&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",K&&a!==Wr&&(be=a.relatedTarget||a.fromElement)&&(kn(be)||be[An]))break e;if((ae||K)&&(K=re.window===re?re:(K=re.ownerDocument)?K.defaultView||K.parentWindow:window,ae?(be=a.relatedTarget||a.toElement,ae=J,be=be?kn(be):null,be!==null&&(gt=f(be),ke=be.tag,be!==gt||ke!==5&&ke!==27&&ke!==6)&&(be=null)):(ae=null,be=J),ae!==be)){if(ke=Nu,ue="onMouseLeave",F="onMouseEnter",B="mouse",(e==="pointerout"||e==="pointerover")&&(ke=wu,ue="onPointerLeave",F="onPointerEnter",B="pointer"),gt=ae==null?K:Na(ae),X=be==null?K:Na(be),K=new ke(ue,B+"leave",ae,a,re),K.target=gt,K.relatedTarget=X,ue=null,kn(re)===J&&(ke=new ke(F,B+"enter",be,a,re),ke.target=X,ke.relatedTarget=gt,ue=ke),gt=ue,ae&&be)t:{for(ke=ip,F=ae,B=be,X=0,ue=F;ue;ue=ke(ue))X++;ue=0;for(var Me=B;Me;Me=ke(Me))ue++;for(;0<X-ue;)F=ke(F),X--;for(;0<ue-X;)B=ke(B),ue--;for(;X--;){if(F===B||B!==null&&F===B.alternate){ke=F;break t}F=ke(F),B=ke(B)}ke=null}else ke=null;ae!==null&&g0(oe,K,ae,ke,!1),be!==null&>!==null&&g0(oe,gt,be,ke,!0)}}e:{if(K=J?Na(J):window,ae=K.nodeName&&K.nodeName.toLowerCase(),ae==="select"||ae==="input"&&K.type==="file")var nt=Au;else if(Ru(K))if(jn)nt=bt;else{nt=vl;var Ne=Ie}else ae=K.nodeName,!ae||ae.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?J&&Is(J.elementType)&&(nt=Au):nt=Ro;if(nt&&(nt=nt(e,J))){ei(oe,nt,a,re);break e}Ne&&Ne(e,K,J),e==="focusout"&&J&&K.type==="number"&&J.memoizedProps.value!=null&&Kl(K,"number",K.value)}switch(Ne=J?Na(J):window,e){case"focusin":(Ru(Ne)||Ne.contentEditable==="true")&&(bl=Ne,nr=J,ta=null);break;case"focusout":ta=nr=bl=null;break;case"mousedown":lr=!0;break;case"contextmenu":case"mouseup":case"dragend":lr=!1,ys(oe,a,re);break;case"selectionchange":if(zu)break;case"keydown":case"keyup":ys(oe,a,re)}var Fe;if(Kr)e:{switch(e){case"compositionstart":var Je="onCompositionStart";break e;case"compositionend":Je="onCompositionEnd";break e;case"compositionupdate":Je="onCompositionUpdate";break e}Je=void 0}else yl?Ou(e,a)&&(Je="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Je="onCompositionStart");Je&&(Tu&&a.locale!=="ko"&&(yl||Je!=="onCompositionStart"?Je==="onCompositionEnd"&&yl&&(Fe=Zt()):(Nn=re,Xs="value"in Nn?Nn.value:Nn.textContent,yl=!0)),Ne=Nc(J,Je),0<Ne.length&&(Je=new xl(Je,e,null,a,re),oe.push({event:Je,listeners:Ne}),Fe?Je.data=Fe:(Fe=Du(a),Fe!==null&&(Je.data=Fe)))),(Fe=Mo?Co(e,a):Oo(e,a))&&(Je=Nc(J,"onBeforeInput"),0<Je.length&&(Ne=new xl("onBeforeInput","beforeinput",null,a,re),oe.push({event:Ne,listeners:Je}),Ne.data=Fe)),np(oe,e,J,a,re)}h0(oe,t)})}function _i(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Nc(e,t){for(var a=t+"Capture",n=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=ls(e,a),u!=null&&n.unshift(_i(e,u,d)),u=ls(e,t),u!=null&&n.push(_i(e,u,d))),e.tag===3)return n;e=e.return}return[]}function ip(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function g0(e,t,a,n,u){for(var d=t._reactName,y=[];a!==null&&a!==n;){var E=a,k=E.alternate,J=E.stateNode;if(E=E.tag,k!==null&&k===n)break;E!==5&&E!==26&&E!==27||J===null||(k=J,u?(J=ls(a,d),J!=null&&y.unshift(_i(a,J,k))):u||(J=ls(a,d),J!=null&&y.push(_i(a,J,k)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var up=/\r\n?/g,cp=/\u0000|\uFFFD/g;function x0(e){return(typeof e=="string"?e:""+e).replace(up,`
|
|
49
|
+
`).replace(cp,"")}function y0(e,t){return t=x0(t),x0(e)===t}function mt(e,t,a,n,u,d){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||rn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&rn(e,""+n);break;case"className":Ps(e,"class",n);break;case"tabIndex":Ps(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ps(e,a,n);break;case"style":vu(e,n,d);break;case"data":if(t!=="object"){Ps(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=ns(""+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 d=="function"&&(a==="formAction"?(t!=="input"&&mt(e,t,"name",u.name,u,null),mt(e,t,"formEncType",u.formEncType,u,null),mt(e,t,"formMethod",u.formMethod,u,null),mt(e,t,"formTarget",u.formTarget,u,null)):(mt(e,t,"encType",u.encType,u,null),mt(e,t,"method",u.method,u,null),mt(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ns(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=$a);break;case"onScroll":n!=null&&We("scroll",e);break;case"onScrollEnd":n!=null&&We("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(u.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=ns(""+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":We("beforetoggle",e),We("toggle",e),Kt(e,"popover",n);break;case"xlinkActuate":ct(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":ct(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":ct(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":ct(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":ct(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":ct(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":ct(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":ct(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":ct(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Kt(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=ro.get(a)||a,Kt(e,a,n))}}function Gd(e,t,a,n,u,d){switch(a){case"style":vu(e,n,d);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?rn(e,n):(typeof n=="number"||typeof n=="bigint")&&rn(e,""+n);break;case"onScroll":n!=null&&We("scroll",e);break;case"onScrollEnd":n!=null&&We("scrollend",e);break;case"onClick":n!=null&&(e.onclick=$a);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),d=e[Pt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,u),typeof n=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,u);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Kt(e,a,n)}}}function sa(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",e),We("load",e);var n=!1,u=!1,d;for(d in a)if(a.hasOwnProperty(d)){var y=a[d];if(y!=null)switch(d){case"src":n=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:mt(e,t,d,y,a,null)}}u&&mt(e,t,"srcSet",a.srcSet,a,null),n&&mt(e,t,"src",a.src,a,null);return;case"input":We("invalid",e);var E=d=y=u=null,k=null,J=null;for(n in a)if(a.hasOwnProperty(n)){var re=a[n];if(re!=null)switch(n){case"name":u=re;break;case"type":y=re;break;case"checked":k=re;break;case"defaultChecked":J=re;break;case"value":d=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(o(137,t));break;default:mt(e,t,n,re,a,null)}}fl(e,d,E,k,J,y,u,!1);return;case"select":We("invalid",e),n=y=d=null;for(u in a)if(a.hasOwnProperty(u)&&(E=a[u],E!=null))switch(u){case"value":d=E;break;case"defaultValue":y=E;break;case"multiple":n=E;default:mt(e,t,u,E,a,null)}t=d,a=y,e.multiple=!!n,t!=null?zn(e,!!n,t,!1):a!=null&&zn(e,!!n,a,!0);return;case"textarea":We("invalid",e),d=u=n=null;for(y in a)if(a.hasOwnProperty(y)&&(E=a[y],E!=null))switch(y){case"value":n=E;break;case"defaultValue":u=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(o(91));break;default:mt(e,t,y,E,a,null)}Zr(e,n,u,d);return;case"option":for(k in a)if(a.hasOwnProperty(k)&&(n=a[k],n!=null))switch(k){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:mt(e,t,k,n,a,null)}return;case"dialog":We("beforetoggle",e),We("toggle",e),We("cancel",e),We("close",e);break;case"iframe":case"object":We("load",e);break;case"video":case"audio":for(n=0;n<ki.length;n++)We(ki[n],e);break;case"image":We("error",e),We("load",e);break;case"details":We("toggle",e);break;case"embed":case"source":case"link":We("error",e),We("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(J in a)if(a.hasOwnProperty(J)&&(n=a[J],n!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:mt(e,t,J,n,a,null)}return;default:if(Is(t)){for(re in a)a.hasOwnProperty(re)&&(n=a[re],n!==void 0&&Gd(e,t,re,n,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(n=a[E],n!=null&&mt(e,t,E,n,a,null))}function op(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 u=null,d=null,y=null,E=null,k=null,J=null,re=null;for(ae in a){var oe=a[ae];if(a.hasOwnProperty(ae)&&oe!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":k=oe;default:n.hasOwnProperty(ae)||mt(e,t,ae,null,n,oe)}}for(var K in n){var ae=n[K];if(oe=a[K],n.hasOwnProperty(K)&&(ae!=null||oe!=null))switch(K){case"type":d=ae;break;case"name":u=ae;break;case"checked":J=ae;break;case"defaultChecked":re=ae;break;case"value":y=ae;break;case"defaultValue":E=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,t));break;default:ae!==oe&&mt(e,t,K,ae,n,oe)}}Ws(e,y,E,k,J,re,d,u);return;case"select":ae=y=E=K=null;for(d in a)if(k=a[d],a.hasOwnProperty(d)&&k!=null)switch(d){case"value":break;case"multiple":ae=k;default:n.hasOwnProperty(d)||mt(e,t,d,null,n,k)}for(u in n)if(d=n[u],k=a[u],n.hasOwnProperty(u)&&(d!=null||k!=null))switch(u){case"value":K=d;break;case"defaultValue":E=d;break;case"multiple":y=d;default:d!==k&&mt(e,t,u,d,n,k)}t=E,a=y,n=ae,K!=null?zn(e,!!a,K,!1):!!n!=!!a&&(t!=null?zn(e,!!a,t,!0):zn(e,!!a,a?[]:"",!1));return;case"textarea":ae=K=null;for(E in a)if(u=a[E],a.hasOwnProperty(E)&&u!=null&&!n.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:mt(e,t,E,null,n,u)}for(y in n)if(u=n[y],d=a[y],n.hasOwnProperty(y)&&(u!=null||d!=null))switch(y){case"value":K=u;break;case"defaultValue":ae=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==d&&mt(e,t,y,u,n,d)}es(e,K,ae);return;case"option":for(var be in a)if(K=a[be],a.hasOwnProperty(be)&&K!=null&&!n.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:mt(e,t,be,null,n,K)}for(k in n)if(K=n[k],ae=a[k],n.hasOwnProperty(k)&&K!==ae&&(K!=null||ae!=null))switch(k){case"selected":e.selected=K&&typeof K!="function"&&typeof K!="symbol";break;default:mt(e,t,k,K,n,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ke in a)K=a[ke],a.hasOwnProperty(ke)&&K!=null&&!n.hasOwnProperty(ke)&&mt(e,t,ke,null,n,K);for(J in n)if(K=n[J],ae=a[J],n.hasOwnProperty(J)&&K!==ae&&(K!=null||ae!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(o(137,t));break;default:mt(e,t,J,K,n,ae)}return;default:if(Is(t)){for(var gt in a)K=a[gt],a.hasOwnProperty(gt)&&K!==void 0&&!n.hasOwnProperty(gt)&&Gd(e,t,gt,void 0,n,K);for(re in n)K=n[re],ae=a[re],!n.hasOwnProperty(re)||K===ae||K===void 0&&ae===void 0||Gd(e,t,re,K,n,ae);return}}for(var F in a)K=a[F],a.hasOwnProperty(F)&&K!=null&&!n.hasOwnProperty(F)&&mt(e,t,F,null,n,K);for(oe in n)K=n[oe],ae=a[oe],!n.hasOwnProperty(oe)||K===ae||K==null&&ae==null||mt(e,t,oe,K,n,ae)}function p0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dp(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var u=a[n],d=u.transferSize,y=u.initiatorType,E=u.duration;if(d&&E&&p0(y)){for(y=0,E=u.responseEnd,n+=1;n<a.length;n++){var k=a[n],J=k.startTime;if(J>E)break;var re=k.transferSize,oe=k.initiatorType;re&&p0(oe)&&(k=k.responseEnd,y+=re*(k<E?1:(E-J)/(k-J)))}if(--n,t+=8*(d+y)/(u.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 Pd=null,Zd=null;function wc(e){return e.nodeType===9?e:e.ownerDocument}function v0(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 b0(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 Wd(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 Id=null;function fp(){var e=window.event;return e&&e.type==="popstate"?e===Id?!1:(Id=e,!0):(Id=null,!1)}var S0=typeof setTimeout=="function"?setTimeout:void 0,hp=typeof clearTimeout=="function"?clearTimeout:void 0,N0=typeof Promise=="function"?Promise:void 0,mp=typeof queueMicrotask=="function"?queueMicrotask:typeof N0<"u"?function(e){return N0.resolve(null).then(e).catch(gp)}:S0;function gp(e){setTimeout(function(){throw e})}function ql(e){return e==="head"}function w0(e,t){var a=t,n=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(u),Rr(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")zi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,zi(a);for(var d=a.firstChild;d;){var y=d.nextSibling,E=d.nodeName;d[Xl]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=y}}else a==="body"&&zi(e.ownerDocument.body);a=u}while(a);Rr(t)}function j0(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),Gs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function xp(e,t,a,n){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Xl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Ka(e.nextSibling),e===null)break}return null}function yp(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ka(e.nextSibling),e===null))return null;return e}function E0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ka(e.nextSibling),e===null))return null;return e}function Xd(e){return e.data==="$?"||e.data==="$~"}function Jd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function pp(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 Ka(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 Kd=null;function T0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ka(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function M0(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 C0(e,t,a){switch(t=wc(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 zi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Gs(e)}var en=new Map,O0=new Set;function jc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var el=ie.d;ie.d={f:vp,r:bp,D:Sp,C:Np,L:wp,m:jp,X:Tp,S:Ep,M:Mp};function vp(){var e=el.f(),t=gc();return e||t}function bp(e){var t=Oe(e);t!==null&&t.tag===5&&t.type==="form"?Ph(t):el.r(e)}var Cr=typeof document>"u"?null:document;function D0(e,t,a){var n=Cr;if(n&&typeof t=="string"&&t){var u=ea(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),O0.has(u)||(O0.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),sa(t,"link",e),Bt(t),n.head.appendChild(t)))}}function Sp(e){el.D(e),D0("dns-prefetch",e,null)}function Np(e,t){el.C(e,t),D0("preconnect",e,t)}function wp(e,t,a){el.L(e,t,a);var n=Cr;if(n&&e&&t){var u='link[rel="preload"][as="'+ea(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+ea(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+ea(a.imageSizes)+'"]')):u+='[href="'+ea(e)+'"]';var d=u;switch(t){case"style":d=Or(e);break;case"script":d=Dr(e)}en.has(d)||(e=T({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),en.set(d,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Ui(d))||t==="script"&&n.querySelector(qi(d))||(t=n.createElement("link"),sa(t,"link",e),Bt(t),n.head.appendChild(t)))}}function jp(e,t){el.m(e,t);var a=Cr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+ea(n)+'"][href="'+ea(e)+'"]',d=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Dr(e)}if(!en.has(d)&&(e=T({rel:"modulepreload",href:e},t),en.set(d,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(qi(d)))return}n=a.createElement("link"),sa(n,"link",e),Bt(n),a.head.appendChild(n)}}}function Ep(e,t,a){el.S(e,t,a);var n=Cr;if(n&&e){var u=ln(n).hoistableStyles,d=Or(e);t=t||"default";var y=u.get(d);if(!y){var E={loading:0,preload:null};if(y=n.querySelector(Ui(d)))E.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},a),(a=en.get(d))&&ef(e,a);var k=y=n.createElement("link");Bt(k),sa(k,"link",e),k._p=new Promise(function(J,re){k.onload=J,k.onerror=re}),k.addEventListener("load",function(){E.loading|=1}),k.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Ec(y,t,n)}y={type:"stylesheet",instance:y,count:1,state:E},u.set(d,y)}}}function Tp(e,t){el.X(e,t);var a=Cr;if(a&&e){var n=ln(a).hoistableScripts,u=Dr(e),d=n.get(u);d||(d=a.querySelector(qi(u)),d||(e=T({src:e,async:!0},t),(t=en.get(u))&&tf(e,t),d=a.createElement("script"),Bt(d),sa(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function Mp(e,t){el.M(e,t);var a=Cr;if(a&&e){var n=ln(a).hoistableScripts,u=Dr(e),d=n.get(u);d||(d=a.querySelector(qi(u)),d||(e=T({src:e,async:!0,type:"module"},t),(t=en.get(u))&&tf(e,t),d=a.createElement("script"),Bt(d),sa(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function R0(e,t,a,n){var u=(u=Te.current)?jc(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Or(a.href),a=ln(u).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=Or(a.href);var d=ln(u).hoistableStyles,y=d.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=u.querySelector(Ui(e)))&&!d._p&&(y.instance=d,y.state.loading=5),en.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},en.set(e,a),d||Cp(u,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=Dr(a),a=ln(u).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 Or(e){return'href="'+ea(e)+'"'}function Ui(e){return'link[rel="stylesheet"]['+e+"]"}function A0(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Cp(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}),sa(t,"link",a),Bt(t),e.head.appendChild(t))}function Dr(e){return'[src="'+ea(e)+'"]'}function qi(e){return"script[async]"+e}function k0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+ea(a.href)+'"]');if(n)return t.instance=n,Bt(n),n;var u=T({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Bt(n),sa(n,"style",u),Ec(n,a.precedence,e),t.instance=n;case"stylesheet":u=Or(a.href);var d=e.querySelector(Ui(u));if(d)return t.state.loading|=4,t.instance=d,Bt(d),d;n=A0(a),(u=en.get(u))&&ef(n,u),d=(e.ownerDocument||e).createElement("link"),Bt(d);var y=d;return y._p=new Promise(function(E,k){y.onload=E,y.onerror=k}),sa(d,"link",n),t.state.loading|=4,Ec(d,a.precedence,e),t.instance=d;case"script":return d=Dr(a.src),(u=e.querySelector(qi(d)))?(t.instance=u,Bt(u),u):(n=a,(u=en.get(d))&&(n=T({},a),tf(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),Bt(u),sa(u,"link",n),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Ec(n,a.precedence,e));return t.instance}function Ec(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,d=u,y=0;y<n.length;y++){var E=n[y];if(E.dataset.precedence===t)d=E;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function ef(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function tf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Tc=null;function _0(e,t,a){if(Tc===null){var n=new Map,u=Tc=new Map;u.set(a,n)}else u=Tc,n=u.get(a),n||(n=new Map,u.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var d=a[u];if(!(d[Xl]||d[_t]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(t)||"";y=e+y;var E=n.get(y);E?E.push(d):n.set(y,[d])}}return n}function z0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Op(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 U0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Dp(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 u=Or(n.href),d=t.querySelector(Ui(u));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Mc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,Bt(d);return}d=t.ownerDocument||t,n=A0(n),(u=en.get(u))&&ef(n,u),d=d.createElement("link"),Bt(d);var y=d;y._p=new Promise(function(E,k){y.onload=E,y.onerror=k}),sa(d,"link",n),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Mc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var af=0;function Rp(e,t){return e.stylesheets&&e.count===0&&Oc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Oc(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&af===0&&(af=62500*dp());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Oc(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>af?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function Mc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Oc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Cc=null;function Oc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cc=new Map,t.forEach(Ap,e),Cc=null,Mc.call(e))}function Ap(e,t){if(!(t.state.loading&4)){var a=Cc.get(e);if(a)var n=a.get(null);else{a=new Map,Cc.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var y=u[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),n=y)}n&&a.set(null,n)}u=t.instance,y=u.getAttribute("data-precedence"),d=a.get(y)||n,d===n&&a.set(null,u),a.set(y,u),this.count++,n=Mc.bind(this),u.addEventListener("load",n),u.addEventListener("error",n),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Hi={$$typeof:G,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function kp(e,t,a,n,u,d,y,E,k){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=Ys(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ys(0),this.hiddenUpdates=Ys(null),this.identifierPrefix=n,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function q0(e,t,a,n,u,d,y,E,k,J,re,oe){return e=new kp(e,t,a,y,k,J,re,oe,E),t=1,d===!0&&(t|=24),d=aa(3,null,null,t),e.current=d,d.stateNode=e,t=zo(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:n,isDehydrated:a,cache:t},Lo(d),e}function H0(e){return e?(e=_a,e):_a}function L0(e,t,a,n,u,d){u=H0(u),n.context===null?n.context=u:n.pendingContext=u,n=Tl(t),n.payload={element:a},d=d===void 0?null:d,d!==null&&(n.callback=d),a=Ml(e,n,t),a!==null&&(Ra(a,e,t),xi(a,e,t))}function B0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function nf(e,t){B0(e,t),(e=e.alternate)&&B0(e,t)}function V0(e){if(e.tag===13||e.tag===31){var t=Pa(e,67108864);t!==null&&Ra(t,e,67108864),nf(e,67108864)}}function Y0(e){if(e.tag===13||e.tag===31){var t=La();t=$s(t);var a=Pa(e,t);a!==null&&Ra(a,e,t),nf(e,t)}}var Dc=!0;function _p(e,t,a,n){var u=$.T;$.T=null;var d=ie.p;try{ie.p=2,lf(e,t,a,n)}finally{ie.p=d,$.T=u}}function zp(e,t,a,n){var u=$.T;$.T=null;var d=ie.p;try{ie.p=8,lf(e,t,a,n)}finally{ie.p=d,$.T=u}}function lf(e,t,a,n){if(Dc){var u=sf(n);if(u===null)Fd(e,t,n,Rc,a),F0(e,n);else if(qp(u,e,t,a,n))n.stopPropagation();else if(F0(e,n),t&4&&-1<Up.indexOf(e)){for(;u!==null;){var d=Oe(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=vn(d.pendingLanes);if(y!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;y;){var k=1<<31-jt(y);E.entanglements[1]|=k,y&=~k}Cn(d),(it&6)===0&&(hc=Ue()+500,Ai(0))}}break;case 31:case 13:E=Pa(d,2),E!==null&&Ra(E,d,2),gc(),nf(d,2)}if(d=sf(n),d===null&&Fd(e,t,n,Rc,a),d===u)break;u=d}u!==null&&n.stopPropagation()}else Fd(e,t,n,null,a)}}function sf(e){return e=Qs(e),rf(e)}var Rc=null;function rf(e){if(Rc=null,e=kn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=v(t),e!==null)return e;e=null}else if(a===31){if(e=N(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Rc=e,null}function $0(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 Ke:return 2;case kt:return 8;case Mt:case Gt:return 32;case ca:return 268435456;default:return 32}default:return 32}}var uf=!1,Hl=null,Ll=null,Bl=null,Li=new Map,Bi=new Map,Vl=[],Up="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 F0(e,t){switch(e){case"focusin":case"focusout":Hl=null;break;case"dragenter":case"dragleave":Ll=null;break;case"mouseover":case"mouseout":Bl=null;break;case"pointerover":case"pointerout":Li.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bi.delete(t.pointerId)}}function Vi(e,t,a,n,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:d,targetContainers:[u]},t!==null&&(t=Oe(t),t!==null&&V0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function qp(e,t,a,n,u){switch(t){case"focusin":return Hl=Vi(Hl,e,t,a,n,u),!0;case"dragenter":return Ll=Vi(Ll,e,t,a,n,u),!0;case"mouseover":return Bl=Vi(Bl,e,t,a,n,u),!0;case"pointerover":var d=u.pointerId;return Li.set(d,Vi(Li.get(d)||null,e,t,a,n,u)),!0;case"gotpointercapture":return d=u.pointerId,Bi.set(d,Vi(Bi.get(d)||null,e,t,a,n,u)),!0}return!1}function G0(e){var t=kn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=v(a),t!==null){e.blockedOn=t,$r(e.priority,function(){Y0(a)});return}}else if(t===31){if(t=N(a),t!==null){e.blockedOn=t,$r(e.priority,function(){Y0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ac(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=sf(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Wr=n,a.target.dispatchEvent(n),Wr=null}else return t=Oe(a),t!==null&&V0(t),e.blockedOn=a,!1;t.shift()}return!0}function P0(e,t,a){Ac(e)&&a.delete(t)}function Hp(){uf=!1,Hl!==null&&Ac(Hl)&&(Hl=null),Ll!==null&&Ac(Ll)&&(Ll=null),Bl!==null&&Ac(Bl)&&(Bl=null),Li.forEach(P0),Bi.forEach(P0)}function kc(e,t){e.blockedOn===t&&(e.blockedOn=null,uf||(uf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Hp)))}var _c=null;function Z0(e){_c!==e&&(_c=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){_c===e&&(_c=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],u=e[t+2];if(typeof n!="function"){if(rf(n||a)===null)continue;break}var d=Oe(a);d!==null&&(e.splice(t,3),t-=3,sd(d,{pending:!0,data:u,method:a.method,action:n},n,u))}}))}function Rr(e){function t(k){return kc(k,e)}Hl!==null&&kc(Hl,e),Ll!==null&&kc(Ll,e),Bl!==null&&kc(Bl,e),Li.forEach(t),Bi.forEach(t);for(var a=0;a<Vl.length;a++){var n=Vl[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Vl.length&&(a=Vl[0],a.blockedOn===null);)G0(a),a.blockedOn===null&&Vl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var u=a[n],d=a[n+1],y=u[Pt]||null;if(typeof d=="function")y||Z0(a);else if(y){var E=null;if(d&&d.hasAttribute("formAction")){if(u=d,y=d[Pt]||null)E=y.formAction;else if(rf(u)!==null)continue}else E=y.action;typeof E=="function"?a[n+1]=E:(a.splice(n,3),n-=3),Z0(a)}}}function W0(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,u=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),u!==null&&(u(),u=null)}}}function cf(e){this._internalRoot=e}zc.prototype.render=cf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=La();L0(a,n,e,t,null,null)},zc.prototype.unmount=cf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;L0(e.current,2,null,e,null,null),gc(),t[An]=null}};function zc(e){this._internalRoot=e}zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Vl.length&&t!==0&&t<Vl[a].priority;a++);Vl.splice(a,0,e),a===0&&G0(e)}};var I0=r.version;if(I0!=="19.2.4")throw Error(o(527,I0,"19.2.4"));ie.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=x(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Lp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uc.isDisabled&&Uc.supportsFiber)try{rt=Uc.inject(Lp),yt=Uc}catch{}}return $i.createRoot=function(e,t){if(!h(e))throw Error(o(299));var a=!1,n="",u=am,d=nm,y=lm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=q0(e,1,!1,null,null,a,n,null,u,d,y,W0),e[An]=t.current,$d(e),new cf(t)},$i.hydrateRoot=function(e,t,a){if(!h(e))throw Error(o(299));var n=!1,u="",d=am,y=nm,E=lm,k=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(k=a.formState)),t=q0(e,1,!0,t,a??null,n,u,k,d,y,E,W0),t.context=H0(null),a=t.current,n=La(),n=$s(n),u=Tl(n),u.callback=null,Ml(a,u,n),a=n,t.current.lanes=a,cl(t,a),Cn(t),e[An]=t.current,$d(e),new zc(t)},$i.version="19.2.4",$i}var ig;function Xp(){if(ig)return hf.exports;ig=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(r){console.error(r)}}return l(),hf.exports=Qp(),hf.exports}var Jp=Xp();const Kp=Hf(Jp);/**
|
|
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 ug="popstate";function ev(l={}){function r(h,f){let{pathname:v="/",search:N="",hash:b=""}=Hs(h.location.hash.substring(1));return!v.startsWith("/")&&!v.startsWith(".")&&(v="/"+v),Cf("",{pathname:v,search:N,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function c(h,f){let v=h.document.querySelector("base"),N="";if(v&&v.getAttribute("href")){let b=h.location.href,x=b.indexOf("#");N=x===-1?b:b.slice(0,x)}return N+"#"+(typeof f=="string"?f:su(f))}function o(h,f){tn(h.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return av(r,c,o,l)}function Tt(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function tn(l,r){if(!l){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function tv(){return Math.random().toString(36).substring(2,10)}function cg(l,r){return{usr:l.state,key:l.key,idx:r}}function Cf(l,r,c=null,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?Hs(r):r,state:c,key:r&&r.key||o||tv()}}function su({pathname:l="/",search:r="",hash:c=""}){return r&&r!=="?"&&(l+=r.charAt(0)==="?"?r:"?"+r),c&&c!=="#"&&(l+=c.charAt(0)==="#"?c:"#"+c),l}function Hs(l){let r={};if(l){let c=l.indexOf("#");c>=0&&(r.hash=l.substring(c),l=l.substring(0,c));let o=l.indexOf("?");o>=0&&(r.search=l.substring(o),l=l.substring(0,o)),l&&(r.pathname=l)}return r}function av(l,r,c,o={}){let{window:h=document.defaultView,v5Compat:f=!1}=o,v=h.history,N="POP",b=null,x=S();x==null&&(x=0,v.replaceState({...v.state,idx:x},""));function S(){return(v.state||{idx:null}).idx}function T(){N="POP";let R=S(),Q=R==null?null:R-x;x=R,b&&b({action:N,location:M.location,delta:Q})}function j(R,Q){N="PUSH";let Y=Cf(M.location,R,Q);c&&c(Y,R),x=S()+1;let G=cg(Y,x),ee=M.createHref(Y);try{v.pushState(G,"",ee)}catch(de){if(de instanceof DOMException&&de.name==="DataCloneError")throw de;h.location.assign(ee)}f&&b&&b({action:N,location:M.location,delta:1})}function D(R,Q){N="REPLACE";let Y=Cf(M.location,R,Q);c&&c(Y,R),x=S();let G=cg(Y,x),ee=M.createHref(Y);v.replaceState(G,"",ee),f&&b&&b({action:N,location:M.location,delta:0})}function C(R){return nv(R)}let M={get action(){return N},get location(){return l(h,v)},listen(R){if(b)throw new Error("A history only accepts one active listener");return h.addEventListener(ug,T),b=R,()=>{h.removeEventListener(ug,T),b=null}},createHref(R){return r(h,R)},createURL:C,encodeLocation(R){let Q=C(R);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:j,replace:D,go(R){return v.go(R)}};return M}function nv(l,r=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Tt(c,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:su(l);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=c+o),new URL(o,c)}function ix(l,r,c="/"){return lv(l,r,c,!1)}function lv(l,r,c,o){let h=typeof r=="string"?Hs(r):r,f=sl(h.pathname||"/",c);if(f==null)return null;let v=ux(l);sv(v);let N=null;for(let b=0;N==null&&b<v.length;++b){let x=xv(f);N=mv(v[b],x,o)}return N}function ux(l,r=[],c=[],o="",h=!1){let f=(v,N,b=h,x)=>{let S={relativePath:x===void 0?v.path||"":x,caseSensitive:v.caseSensitive===!0,childrenIndex:N,route:v};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(o)&&b)return;Tt(S.relativePath.startsWith(o),`Absolute route path "${S.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(o.length)}let T=ll([o,S.relativePath]),j=c.concat(S);v.children&&v.children.length>0&&(Tt(v.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${T}".`),ux(v.children,r,j,T,b)),!(v.path==null&&!v.index)&&r.push({path:T,score:fv(T,v.index),routesMeta:j})};return l.forEach((v,N)=>{var b;if(v.path===""||!((b=v.path)!=null&&b.includes("?")))f(v,N);else for(let x of cx(v.path))f(v,N,!0,x)}),r}function cx(l){let r=l.split("/");if(r.length===0)return[];let[c,...o]=r,h=c.endsWith("?"),f=c.replace(/\?$/,"");if(o.length===0)return h?[f,""]:[f];let v=cx(o.join("/")),N=[];return N.push(...v.map(b=>b===""?f:[f,b].join("/"))),h&&N.push(...v),N.map(b=>l.startsWith("/")&&b===""?"/":b)}function sv(l){l.sort((r,c)=>r.score!==c.score?c.score-r.score:hv(r.routesMeta.map(o=>o.childrenIndex),c.routesMeta.map(o=>o.childrenIndex)))}var rv=/^:[\w-]+$/,iv=3,uv=2,cv=1,ov=10,dv=-2,og=l=>l==="*";function fv(l,r){let c=l.split("/"),o=c.length;return c.some(og)&&(o+=dv),r&&(o+=uv),c.filter(h=>!og(h)).reduce((h,f)=>h+(rv.test(f)?iv:f===""?cv:ov),o)}function hv(l,r){return l.length===r.length&&l.slice(0,-1).every((o,h)=>o===r[h])?l[l.length-1]-r[r.length-1]:0}function mv(l,r,c=!1){let{routesMeta:o}=l,h={},f="/",v=[];for(let N=0;N<o.length;++N){let b=o[N],x=N===o.length-1,S=f==="/"?r:r.slice(f.length)||"/",T=Pc({path:b.relativePath,caseSensitive:b.caseSensitive,end:x},S),j=b.route;if(!T&&x&&c&&!o[o.length-1].route.index&&(T=Pc({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},S)),!T)return null;Object.assign(h,T.params),v.push({params:h,pathname:ll([f,T.pathname]),pathnameBase:bv(ll([f,T.pathnameBase])),route:j}),T.pathnameBase!=="/"&&(f=ll([f,T.pathnameBase]))}return v}function Pc(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[c,o]=gv(l.path,l.caseSensitive,l.end),h=r.match(c);if(!h)return null;let f=h[0],v=f.replace(/(.)\/+$/,"$1"),N=h.slice(1);return{params:o.reduce((x,{paramName:S,isOptional:T},j)=>{if(S==="*"){let C=N[j]||"";v=f.slice(0,f.length-C.length).replace(/(.)\/+$/,"$1")}const D=N[j];return T&&!D?x[S]=void 0:x[S]=(D||"").replace(/%2F/g,"/"),x},{}),pathname:f,pathnameBase:v,pattern:l}}function gv(l,r=!1,c=!0){tn(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=[],h="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(v,N,b)=>(o.push({paramName:N,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(o.push({paramName:"*"}),h+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?h+="\\/*$":l!==""&&l!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,r?void 0:"i"),o]}function xv(l){try{return l.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return tn(!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 (${r}).`),l}}function sl(l,r){if(r==="/")return l;if(!l.toLowerCase().startsWith(r.toLowerCase()))return null;let c=r.endsWith("/")?r.length-1:r.length,o=l.charAt(c);return o&&o!=="/"?null:l.slice(c)||"/"}var yv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function pv(l,r="/"){let{pathname:c,search:o="",hash:h=""}=typeof l=="string"?Hs(l):l,f;return c?(c=c.replace(/\/\/+/g,"/"),c.startsWith("/")?f=dg(c.substring(1),"/"):f=dg(c,r)):f=r,{pathname:f,search:Sv(o),hash:Nv(h)}}function dg(l,r){let c=r.replace(/\/+$/,"").split("/");return l.split("/").forEach(h=>{h===".."?c.length>1&&c.pop():h!=="."&&c.push(h)}),c.length>1?c.join("/"):"/"}function yf(l,r,c,o){return`Cannot include a '${l}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function vv(l){return l.filter((r,c)=>c===0||r.route.path&&r.route.path.length>0)}function Bf(l){let r=vv(l);return r.map((c,o)=>o===r.length-1?c.pathname:c.pathnameBase)}function Vf(l,r,c,o=!1){let h;typeof l=="string"?h=Hs(l):(h={...l},Tt(!h.pathname||!h.pathname.includes("?"),yf("?","pathname","search",h)),Tt(!h.pathname||!h.pathname.includes("#"),yf("#","pathname","hash",h)),Tt(!h.search||!h.search.includes("#"),yf("#","search","hash",h)));let f=l===""||h.pathname==="",v=f?"/":h.pathname,N;if(v==null)N=c;else{let T=r.length-1;if(!o&&v.startsWith("..")){let j=v.split("/");for(;j[0]==="..";)j.shift(),T-=1;h.pathname=j.join("/")}N=T>=0?r[T]:"/"}let b=pv(h,N),x=v&&v!=="/"&&v.endsWith("/"),S=(f||v===".")&&c.endsWith("/");return!b.pathname.endsWith("/")&&(x||S)&&(b.pathname+="/"),b}var ll=l=>l.join("/").replace(/\/\/+/g,"/"),bv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Sv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Nv=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,wv=class{constructor(l,r,c,o=!1){this.status=l,this.statusText=r||"",this.internal=o,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function jv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Ev(l){return l.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ox=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function dx(l,r){let c=l;if(typeof c!="string"||!yv.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let o=c,h=!1;if(ox)try{let f=new URL(window.location.href),v=c.startsWith("//")?new URL(f.protocol+c):new URL(c),N=sl(v.pathname,r);v.origin===f.origin&&N!=null?c=N+v.search+v.hash:h=!0}catch{tn(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:h,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var fx=["POST","PUT","PATCH","DELETE"];new Set(fx);var Tv=["GET",...fx];new Set(Tv);var qr=U.createContext(null);qr.displayName="DataRouter";var eo=U.createContext(null);eo.displayName="DataRouterState";var Mv=U.createContext(!1),hx=U.createContext({isTransitioning:!1});hx.displayName="ViewTransition";var Cv=U.createContext(new Map);Cv.displayName="Fetchers";var Ov=U.createContext(null);Ov.displayName="Await";var Ya=U.createContext(null);Ya.displayName="Navigation";var uu=U.createContext(null);uu.displayName="Location";var On=U.createContext({outlet:null,matches:[],isDataRoute:!1});On.displayName="Route";var Yf=U.createContext(null);Yf.displayName="RouteError";var mx="REACT_ROUTER_ERROR",Dv="REDIRECT",Rv="ROUTE_ERROR_RESPONSE";function Av(l){if(l.startsWith(`${mx}:${Dv}:{`))try{let r=JSON.parse(l.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function kv(l){if(l.startsWith(`${mx}:${Rv}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new wv(r.status,r.statusText,r.data)}catch{}}function _v(l,{relative:r}={}){Tt(Hr(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:o}=U.useContext(Ya),{hash:h,pathname:f,search:v}=cu(l,{relative:r}),N=f;return c!=="/"&&(N=f==="/"?c:ll([c,f])),o.createHref({pathname:N,search:v,hash:h})}function Hr(){return U.useContext(uu)!=null}function Zl(){return Tt(Hr(),"useLocation() may be used only in the context of a <Router> component."),U.useContext(uu).location}var gx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function xx(l){U.useContext(Ya).static||U.useLayoutEffect(l)}function $f(){let{isDataRoute:l}=U.useContext(On);return l?Zv():zv()}function zv(){Tt(Hr(),"useNavigate() may be used only in the context of a <Router> component.");let l=U.useContext(qr),{basename:r,navigator:c}=U.useContext(Ya),{matches:o}=U.useContext(On),{pathname:h}=Zl(),f=JSON.stringify(Bf(o)),v=U.useRef(!1);return xx(()=>{v.current=!0}),U.useCallback((b,x={})=>{if(tn(v.current,gx),!v.current)return;if(typeof b=="number"){c.go(b);return}let S=Vf(b,JSON.parse(f),h,x.relative==="path");l==null&&r!=="/"&&(S.pathname=S.pathname==="/"?r:ll([r,S.pathname])),(x.replace?c.replace:c.push)(S,x.state,x)},[r,c,f,h,l])}U.createContext(null);function cu(l,{relative:r}={}){let{matches:c}=U.useContext(On),{pathname:o}=Zl(),h=JSON.stringify(Bf(c));return U.useMemo(()=>Vf(l,JSON.parse(h),o,r==="path"),[l,h,o,r])}function Uv(l,r){return yx(l,r)}function yx(l,r,c,o,h){var Y;Tt(Hr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=U.useContext(Ya),{matches:v}=U.useContext(On),N=v[v.length-1],b=N?N.params:{},x=N?N.pathname:"/",S=N?N.pathnameBase:"/",T=N&&N.route;{let G=T&&T.path||"";vx(x,!T||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${G}">) 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="${G}"> to <Route path="${G==="/"?"*":`${G}/*`}">.`)}let j=Zl(),D;if(r){let G=typeof r=="string"?Hs(r):r;Tt(S==="/"||((Y=G.pathname)==null?void 0:Y.startsWith(S)),`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 "${S}" but pathname "${G.pathname}" was given in the \`location\` prop.`),D=G}else D=j;let C=D.pathname||"/",M=C;if(S!=="/"){let G=S.replace(/^\//,"").split("/");M="/"+C.replace(/^\//,"").split("/").slice(G.length).join("/")}let R=ix(l,{pathname:M});tn(T||R!=null,`No routes matched location "${D.pathname}${D.search}${D.hash}" `),tn(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${D.pathname}${D.search}${D.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let Q=Vv(R&&R.map(G=>Object.assign({},G,{params:Object.assign({},b,G.params),pathname:ll([S,f.encodeLocation?f.encodeLocation(G.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?S:ll([S,f.encodeLocation?f.encodeLocation(G.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathnameBase])})),v,c,o,h);return r&&Q?U.createElement(uu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},Q):Q}function qv(){let l=Pv(),r=jv(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),c=l instanceof Error?l.stack:null,o="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},v=null;return console.error("Error handled by React Router default ErrorBoundary:",l),v=U.createElement(U.Fragment,null,U.createElement("p",null,"💿 Hey developer 👋"),U.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",U.createElement("code",{style:f},"ErrorBoundary")," or"," ",U.createElement("code",{style:f},"errorElement")," prop on your route.")),U.createElement(U.Fragment,null,U.createElement("h2",null,"Unexpected Application Error!"),U.createElement("h3",{style:{fontStyle:"italic"}},r),c?U.createElement("pre",{style:h},c):null,v)}var Hv=U.createElement(qv,null),px=class extends U.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,r){return r.location!==l.location||r.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:r.error,location:r.location,revalidation:l.revalidation||r.revalidation}}componentDidCatch(l,r){this.props.onError?this.props.onError(l,r):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 c=kv(l.digest);c&&(l=c)}let r=l!==void 0?U.createElement(On.Provider,{value:this.props.routeContext},U.createElement(Yf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?U.createElement(Lv,{error:l},r):r}};px.contextType=Mv;var pf=new WeakMap;function Lv({children:l,error:r}){let{basename:c}=U.useContext(Ya);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=Av(r.digest);if(o){let h=pf.get(r);if(h)throw h;let f=dx(o.location,c);if(ox&&!pf.get(r))if(f.isExternal||o.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:o.replace}));throw pf.set(r,v),v}return U.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return l}function Bv({routeContext:l,match:r,children:c}){let o=U.useContext(qr);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),U.createElement(On.Provider,{value:l},c)}function Vv(l,r=[],c=null,o=null,h=null){if(l==null){if(!c)return null;if(c.errors)l=c.matches;else if(r.length===0&&!c.initialized&&c.matches.length>0)l=c.matches;else return null}let f=l,v=c==null?void 0:c.errors;if(v!=null){let S=f.findIndex(T=>T.route.id&&(v==null?void 0:v[T.route.id])!==void 0);Tt(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(v).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let N=!1,b=-1;if(c)for(let S=0;S<f.length;S++){let T=f[S];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(b=S),T.route.id){let{loaderData:j,errors:D}=c,C=T.route.loader&&!j.hasOwnProperty(T.route.id)&&(!D||D[T.route.id]===void 0);if(T.route.lazy||C){N=!0,b>=0?f=f.slice(0,b+1):f=[f[0]];break}}}let x=c&&o?(S,T)=>{var j,D;o(S,{location:c.location,params:((D=(j=c.matches)==null?void 0:j[0])==null?void 0:D.params)??{},unstable_pattern:Ev(c.matches),errorInfo:T})}:void 0;return f.reduceRight((S,T,j)=>{let D,C=!1,M=null,R=null;c&&(D=v&&T.route.id?v[T.route.id]:void 0,M=T.route.errorElement||Hv,N&&(b<0&&j===0?(vx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,R=null):b===j&&(C=!0,R=T.route.hydrateFallbackElement||null)));let Q=r.concat(f.slice(0,j+1)),Y=()=>{let G;return D?G=M:C?G=R:T.route.Component?G=U.createElement(T.route.Component,null):T.route.element?G=T.route.element:G=S,U.createElement(Bv,{match:T,routeContext:{outlet:S,matches:Q,isDataRoute:c!=null},children:G})};return c&&(T.route.ErrorBoundary||T.route.errorElement||j===0)?U.createElement(px,{location:c.location,revalidation:c.revalidation,component:M,error:D,children:Y(),routeContext:{outlet:null,matches:Q,isDataRoute:!0},onError:x}):Y()},null)}function Ff(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yv(l){let r=U.useContext(qr);return Tt(r,Ff(l)),r}function $v(l){let r=U.useContext(eo);return Tt(r,Ff(l)),r}function Fv(l){let r=U.useContext(On);return Tt(r,Ff(l)),r}function Gf(l){let r=Fv(l),c=r.matches[r.matches.length-1];return Tt(c.route.id,`${l} can only be used on routes that contain a unique "id"`),c.route.id}function Gv(){return Gf("useRouteId")}function Pv(){var o;let l=U.useContext(Yf),r=$v("useRouteError"),c=Gf("useRouteError");return l!==void 0?l:(o=r.errors)==null?void 0:o[c]}function Zv(){let{router:l}=Yv("useNavigate"),r=Gf("useNavigate"),c=U.useRef(!1);return xx(()=>{c.current=!0}),U.useCallback(async(h,f={})=>{tn(c.current,gx),c.current&&(typeof h=="number"?await l.navigate(h):await l.navigate(h,{fromRouteId:r,...f}))},[l,r])}var fg={};function vx(l,r,c){!r&&!fg[l]&&(fg[l]=!0,tn(!1,c))}U.memo(Wv);function Wv({routes:l,future:r,state:c,onError:o}){return yx(l,void 0,c,o,r)}function Iv({to:l,replace:r,state:c,relative:o}){Tt(Hr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:h}=U.useContext(Ya);tn(!h,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=U.useContext(On),{pathname:v}=Zl(),N=$f(),b=Vf(l,Bf(f),v,o==="path"),x=JSON.stringify(b);return U.useEffect(()=>{N(JSON.parse(x),{replace:r,state:c,relative:o})},[N,x,o,r,c]),null}function al(l){Tt(!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 Qv({basename:l="/",children:r=null,location:c,navigationType:o="POP",navigator:h,static:f=!1,unstable_useTransitions:v}){Tt(!Hr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let N=l.replace(/^\/*/,"/"),b=U.useMemo(()=>({basename:N,navigator:h,static:f,unstable_useTransitions:v,future:{}}),[N,h,f,v]);typeof c=="string"&&(c=Hs(c));let{pathname:x="/",search:S="",hash:T="",state:j=null,key:D="default"}=c,C=U.useMemo(()=>{let M=sl(x,N);return M==null?null:{location:{pathname:M,search:S,hash:T,state:j,key:D},navigationType:o}},[N,x,S,T,j,D,o]);return tn(C!=null,`<Router basename="${N}"> is not able to match the URL "${x}${S}${T}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:U.createElement(Ya.Provider,{value:b},U.createElement(uu.Provider,{children:r,value:C}))}function Xv({children:l,location:r}){return Uv(Of(l),r)}function Of(l,r=[]){let c=[];return U.Children.forEach(l,(o,h)=>{if(!U.isValidElement(o))return;let f=[...r,h];if(o.type===U.Fragment){c.push.apply(c,Of(o.props.children,f));return}Tt(o.type===al,`[${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>`),Tt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let v={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(v.children=Of(o.props.children,f)),c.push(v)}),c}var $c="get",Fc="application/x-www-form-urlencoded";function to(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function Jv(l){return to(l)&&l.tagName.toLowerCase()==="button"}function Kv(l){return to(l)&&l.tagName.toLowerCase()==="form"}function eb(l){return to(l)&&l.tagName.toLowerCase()==="input"}function tb(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function ab(l,r){return l.button===0&&(!r||r==="_self")&&!tb(l)}var qc=null;function nb(){if(qc===null)try{new FormData(document.createElement("form"),0),qc=!1}catch{qc=!0}return qc}var lb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vf(l){return l!=null&&!lb.has(l)?(tn(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Fc}"`),null):l}function sb(l,r){let c,o,h,f,v;if(Kv(l)){let N=l.getAttribute("action");o=N?sl(N,r):null,c=l.getAttribute("method")||$c,h=vf(l.getAttribute("enctype"))||Fc,f=new FormData(l)}else if(Jv(l)||eb(l)&&(l.type==="submit"||l.type==="image")){let N=l.form;if(N==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=l.getAttribute("formaction")||N.getAttribute("action");if(o=b?sl(b,r):null,c=l.getAttribute("formmethod")||N.getAttribute("method")||$c,h=vf(l.getAttribute("formenctype"))||vf(N.getAttribute("enctype"))||Fc,f=new FormData(N,l),!nb()){let{name:x,type:S,value:T}=l;if(S==="image"){let j=x?`${x}.`:"";f.append(`${j}x`,"0"),f.append(`${j}y`,"0")}else x&&f.append(x,T)}}else{if(to(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=$c,o=null,h=Fc,v=l}return f&&h==="text/plain"&&(v=f,f=void 0),{action:o,method:c.toLowerCase(),encType:h,formData:f,body:v}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Pf(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function rb(l,r,c,o){let h=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return c?h.pathname.endsWith("/")?h.pathname=`${h.pathname}_.${o}`:h.pathname=`${h.pathname}.${o}`:h.pathname==="/"?h.pathname=`_root.${o}`:r&&sl(h.pathname,r)==="/"?h.pathname=`${r.replace(/\/$/,"")}/_root.${o}`:h.pathname=`${h.pathname.replace(/\/$/,"")}.${o}`,h}async function ib(l,r){if(l.id in r)return r[l.id];try{let c=await import(l.module);return r[l.id]=c,c}catch(c){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ub(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 cb(l,r,c){let o=await Promise.all(l.map(async h=>{let f=r.routes[h.route.id];if(f){let v=await ib(f,c);return v.links?v.links():[]}return[]}));return hb(o.flat(1).filter(ub).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function hg(l,r,c,o,h,f){let v=(b,x)=>c[x]?b.route.id!==c[x].route.id:!0,N=(b,x)=>{var S;return c[x].pathname!==b.pathname||((S=c[x].route.path)==null?void 0:S.endsWith("*"))&&c[x].params["*"]!==b.params["*"]};return f==="assets"?r.filter((b,x)=>v(b,x)||N(b,x)):f==="data"?r.filter((b,x)=>{var T;let S=o.routes[b.route.id];if(!S||!S.hasLoader)return!1;if(v(b,x)||N(b,x))return!0;if(b.route.shouldRevalidate){let j=b.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:((T=c[0])==null?void 0:T.params)||{},nextUrl:new URL(l,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof j=="boolean")return j}return!0}):[]}function ob(l,r,{includeHydrateFallback:c}={}){return db(l.map(o=>{let h=r.routes[o.route.id];if(!h)return[];let f=[h.module];return h.clientActionModule&&(f=f.concat(h.clientActionModule)),h.clientLoaderModule&&(f=f.concat(h.clientLoaderModule)),c&&h.hydrateFallbackModule&&(f=f.concat(h.hydrateFallbackModule)),h.imports&&(f=f.concat(h.imports)),f}).flat(1))}function db(l){return[...new Set(l)]}function fb(l){let r={},c=Object.keys(l).sort();for(let o of c)r[o]=l[o];return r}function hb(l,r){let c=new Set;return new Set(r),l.reduce((o,h)=>{let f=JSON.stringify(fb(h));return c.has(f)||(c.add(f),o.push({key:f,link:h})),o},[])}function bx(){let l=U.useContext(qr);return Pf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function mb(){let l=U.useContext(eo);return Pf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Zf=U.createContext(void 0);Zf.displayName="FrameworkContext";function Sx(){let l=U.useContext(Zf);return Pf(l,"You must render this element inside a <HydratedRouter> element"),l}function gb(l,r){let c=U.useContext(Zf),[o,h]=U.useState(!1),[f,v]=U.useState(!1),{onFocus:N,onBlur:b,onMouseEnter:x,onMouseLeave:S,onTouchStart:T}=r,j=U.useRef(null);U.useEffect(()=>{if(l==="render"&&v(!0),l==="viewport"){let M=Q=>{Q.forEach(Y=>{v(Y.isIntersecting)})},R=new IntersectionObserver(M,{threshold:.5});return j.current&&R.observe(j.current),()=>{R.disconnect()}}},[l]),U.useEffect(()=>{if(o){let M=setTimeout(()=>{v(!0)},100);return()=>{clearTimeout(M)}}},[o]);let D=()=>{h(!0)},C=()=>{h(!1),v(!1)};return c?l!=="intent"?[f,j,{}]:[f,j,{onFocus:Fi(N,D),onBlur:Fi(b,C),onMouseEnter:Fi(x,D),onMouseLeave:Fi(S,C),onTouchStart:Fi(T,D)}]:[!1,j,{}]}function Fi(l,r){return c=>{l&&l(c),c.defaultPrevented||r(c)}}function xb({page:l,...r}){let{router:c}=bx(),o=U.useMemo(()=>ix(c.routes,l,c.basename),[c.routes,l,c.basename]);return o?U.createElement(pb,{page:l,matches:o,...r}):null}function yb(l){let{manifest:r,routeModules:c}=Sx(),[o,h]=U.useState([]);return U.useEffect(()=>{let f=!1;return cb(l,r,c).then(v=>{f||h(v)}),()=>{f=!0}},[l,r,c]),o}function pb({page:l,matches:r,...c}){let o=Zl(),{future:h,manifest:f,routeModules:v}=Sx(),{basename:N}=bx(),{loaderData:b,matches:x}=mb(),S=U.useMemo(()=>hg(l,r,x,f,o,"data"),[l,r,x,f,o]),T=U.useMemo(()=>hg(l,r,x,f,o,"assets"),[l,r,x,f,o]),j=U.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let M=new Set,R=!1;if(r.forEach(Y=>{var ee;let G=f.routes[Y.route.id];!G||!G.hasLoader||(!S.some(de=>de.route.id===Y.route.id)&&Y.route.id in b&&((ee=v[Y.route.id])!=null&&ee.shouldRevalidate)||G.hasClientLoader?R=!0:M.add(Y.route.id))}),M.size===0)return[];let Q=rb(l,N,h.unstable_trailingSlashAwareDataRequests,"data");return R&&M.size>0&&Q.searchParams.set("_routes",r.filter(Y=>M.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[Q.pathname+Q.search]},[N,h.unstable_trailingSlashAwareDataRequests,b,o,f,S,r,l,v]),D=U.useMemo(()=>ob(T,f),[T,f]),C=yb(T);return U.createElement(U.Fragment,null,j.map(M=>U.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...c})),D.map(M=>U.createElement("link",{key:M,rel:"modulepreload",href:M,...c})),C.map(({key:M,link:R})=>U.createElement("link",{key:M,nonce:c.nonce,...R,crossOrigin:R.crossOrigin??c.crossOrigin})))}function vb(...l){return r=>{l.forEach(c=>{typeof c=="function"?c(r):c!=null&&(c.current=r)})}}var bb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{bb&&(window.__reactRouterVersion="7.13.0")}catch{}function Sb({basename:l,children:r,unstable_useTransitions:c,window:o}){let h=U.useRef();h.current==null&&(h.current=ev({window:o,v5Compat:!0}));let f=h.current,[v,N]=U.useState({action:f.action,location:f.location}),b=U.useCallback(x=>{c===!1?N(x):U.startTransition(()=>N(x))},[c]);return U.useLayoutEffect(()=>f.listen(b),[f,b]),U.createElement(Qv,{basename:l,children:r,location:v.location,navigationType:v.action,navigator:f,unstable_useTransitions:c})}var Nx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wx=U.forwardRef(function({onClick:r,discover:c="render",prefetch:o="none",relative:h,reloadDocument:f,replace:v,state:N,target:b,to:x,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:j,...D},C){let{basename:M,unstable_useTransitions:R}=U.useContext(Ya),Q=typeof x=="string"&&Nx.test(x),Y=dx(x,M);x=Y.to;let G=_v(x,{relative:h}),[ee,de,Z]=gb(o,D),P=jb(x,{replace:v,state:N,target:b,preventScrollReset:S,relative:h,viewTransition:T,unstable_defaultShouldRevalidate:j,unstable_useTransitions:R});function W(z){r&&r(z),z.defaultPrevented||P(z)}let ne=U.createElement("a",{...D,...Z,href:Y.absoluteURL||G,onClick:Y.isExternal||f?r:W,ref:vb(C,de),target:b,"data-discover":!Q&&c==="render"?"true":void 0});return ee&&!Q?U.createElement(U.Fragment,null,ne,U.createElement(xb,{page:G})):ne});wx.displayName="Link";var jx=U.forwardRef(function({"aria-current":r="page",caseSensitive:c=!1,className:o="",end:h=!1,style:f,to:v,viewTransition:N,children:b,...x},S){let T=cu(v,{relative:x.relative}),j=Zl(),D=U.useContext(eo),{navigator:C,basename:M}=U.useContext(Ya),R=D!=null&&Ob(T)&&N===!0,Q=C.encodeLocation?C.encodeLocation(T).pathname:T.pathname,Y=j.pathname,G=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;c||(Y=Y.toLowerCase(),G=G?G.toLowerCase():null,Q=Q.toLowerCase()),G&&M&&(G=sl(G,M)||G);const ee=Q!=="/"&&Q.endsWith("/")?Q.length-1:Q.length;let de=Y===Q||!h&&Y.startsWith(Q)&&Y.charAt(ee)==="/",Z=G!=null&&(G===Q||!h&&G.startsWith(Q)&&G.charAt(Q.length)==="/"),P={isActive:de,isPending:Z,isTransitioning:R},W=de?r:void 0,ne;typeof o=="function"?ne=o(P):ne=[o,de?"active":null,Z?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let z=typeof f=="function"?f(P):f;return U.createElement(wx,{...x,"aria-current":W,className:ne,ref:S,style:z,to:v,viewTransition:N},typeof b=="function"?b(P):b)});jx.displayName="NavLink";var Nb=U.forwardRef(({discover:l="render",fetcherKey:r,navigate:c,reloadDocument:o,replace:h,state:f,method:v=$c,action:N,onSubmit:b,relative:x,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:j,...D},C)=>{let{unstable_useTransitions:M}=U.useContext(Ya),R=Mb(),Q=Cb(N,{relative:x}),Y=v.toLowerCase()==="get"?"get":"post",G=typeof N=="string"&&Nx.test(N),ee=de=>{if(b&&b(de),de.defaultPrevented)return;de.preventDefault();let Z=de.nativeEvent.submitter,P=(Z==null?void 0:Z.getAttribute("formmethod"))||v,W=()=>R(Z||de.currentTarget,{fetcherKey:r,method:P,navigate:c,replace:h,state:f,relative:x,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:j});M&&c!==!1?U.startTransition(()=>W()):W()};return U.createElement("form",{ref:C,method:Y,action:Q,onSubmit:o?b:ee,...D,"data-discover":!G&&l==="render"?"true":void 0})});Nb.displayName="Form";function wb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ex(l){let r=U.useContext(qr);return Tt(r,wb(l)),r}function jb(l,{target:r,replace:c,state:o,preventScrollReset:h,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:N,unstable_useTransitions:b}={}){let x=$f(),S=Zl(),T=cu(l,{relative:f});return U.useCallback(j=>{if(ab(j,r)){j.preventDefault();let D=c!==void 0?c:su(S)===su(T),C=()=>x(l,{replace:D,state:o,preventScrollReset:h,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:N});b?U.startTransition(()=>C()):C()}},[S,x,T,c,o,r,l,h,f,v,N,b])}var Eb=0,Tb=()=>`__${String(++Eb)}__`;function Mb(){let{router:l}=Ex("useSubmit"),{basename:r}=U.useContext(Ya),c=Gv(),o=l.fetch,h=l.navigate;return U.useCallback(async(f,v={})=>{let{action:N,method:b,encType:x,formData:S,body:T}=sb(f,r);if(v.navigate===!1){let j=v.fetcherKey||Tb();await o(j,c,v.action||N,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:S,body:T,formMethod:v.method||b,formEncType:v.encType||x,flushSync:v.flushSync})}else await h(v.action||N,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:S,body:T,formMethod:v.method||b,formEncType:v.encType||x,replace:v.replace,state:v.state,fromRouteId:c,flushSync:v.flushSync,viewTransition:v.viewTransition})},[o,h,r,c])}function Cb(l,{relative:r}={}){let{basename:c}=U.useContext(Ya),o=U.useContext(On);Tt(o,"useFormAction must be used inside a RouteContext");let[h]=o.matches.slice(-1),f={...cu(l||".",{relative:r})},v=Zl();if(l==null){f.search=v.search;let N=new URLSearchParams(f.search),b=N.getAll("index");if(b.some(S=>S==="")){N.delete("index"),b.filter(T=>T).forEach(T=>N.append("index",T));let S=N.toString();f.search=S?`?${S}`:""}}return(!l||l===".")&&h.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(f.pathname=f.pathname==="/"?c:ll([c,f.pathname])),su(f)}function Ob(l,{relative:r}={}){let c=U.useContext(hx);Tt(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Ex("useViewTransitionState"),h=cu(l,{relative:r});if(!c.isTransitioning)return!1;let f=sl(c.currentLocation.pathname,o)||c.currentLocation.pathname,v=sl(c.nextLocation.pathname,o)||c.nextLocation.pathname;return Pc(h.pathname,v)!=null||Pc(h.pathname,f)!=null}var Db=rx();const Rb=Hf(Db);/**
|
|
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 Tx=(...l)=>l.filter((r,c,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===c).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 Ab=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 kb=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,c,o)=>o?o.toUpperCase():c.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 mg=l=>{const r=kb(l);return r.charAt(0).toUpperCase()+r.slice(1)};/**
|
|
81
|
+
* @license lucide-react v0.564.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/var _b={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 zb=l=>{for(const r in l)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};/**
|
|
91
|
+
* @license lucide-react v0.564.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const Ub=U.forwardRef(({color:l="currentColor",size:r=24,strokeWidth:c=2,absoluteStrokeWidth:o,className:h="",children:f,iconNode:v,...N},b)=>U.createElement("svg",{ref:b,..._b,width:r,height:r,stroke:l,strokeWidth:o?Number(c)*24/Number(r):c,className:Tx("lucide",h),...!f&&!zb(N)&&{"aria-hidden":"true"},...N},[...v.map(([x,S])=>U.createElement(x,S)),...Array.isArray(f)?f:[f]]));/**
|
|
96
|
+
* @license lucide-react v0.564.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const ze=(l,r)=>{const c=U.forwardRef(({className:o,...h},f)=>U.createElement(Ub,{ref:f,iconNode:r,className:Tx(`lucide-${Ab(mg(l))}`,`lucide-${l}`,o),...h}));return c.displayName=mg(l),c};/**
|
|
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 qb=[["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"}]],Mx=ze("activity",qb);/**
|
|
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 Hb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Lb=ze("arrow-down",Hb);/**
|
|
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"}]],gg=ze("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 Vb=[["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"}]],Yb=ze("arrow-up-down",Vb);/**
|
|
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 $b=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Fb=ze("arrow-up",$b);/**
|
|
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 Gb=[["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"}]],Pb=ze("bell",Gb);/**
|
|
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 Zb=[["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"}]],xg=ze("briefcase",Zb);/**
|
|
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 Wb=[["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"}]],Wf=ze("calendar",Wb);/**
|
|
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 Ib=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Qb=ze("chart-no-axes-column",Ib);/**
|
|
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 Xb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Gc=ze("check",Xb);/**
|
|
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 Jb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Cx=ze("chevron-down",Jb);/**
|
|
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:"m15 18-6-6 6-6",key:"1wnfg3"}]],e1=ze("chevron-left",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 t1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],a1=ze("chevron-right",t1);/**
|
|
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 n1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],l1=ze("chevron-up",n1);/**
|
|
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 s1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],r1=ze("chevrons-up-down",s1);/**
|
|
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 i1=[["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"}]],rl=ze("circle-alert",i1);/**
|
|
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 u1=[["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"}]],yg=ze("circle-arrow-down",u1);/**
|
|
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 c1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ou=ze("circle-check-big",c1);/**
|
|
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 o1=[["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"}]],d1=ze("circle-x",o1);/**
|
|
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 f1=[["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"}]],pg=ze("clipboard-list",f1);/**
|
|
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 h1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Zc=ze("clock",h1);/**
|
|
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 m1=[["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"}]],Ox=ze("external-link",m1);/**
|
|
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 g1=[["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"}]],x1=ze("eye-off",g1);/**
|
|
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 y1=[["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"}]],p1=ze("eye",y1);/**
|
|
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 v1=[["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"}]],Df=ze("file-text",v1);/**
|
|
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 b1=[["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"}]],S1=ze("git-pull-request",b1);/**
|
|
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 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],w1=ze("globe",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 j1=[["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"}]],E1=ze("house",j1);/**
|
|
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 T1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],M1=ze("info",T1);/**
|
|
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:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],O1=ze("kanban",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 D1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Dx=ze("loader-circle",D1);/**
|
|
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 R1=[["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"}]],Rx=ze("map",R1);/**
|
|
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 A1=[["path",{d:"M5 12h14",key:"1ays0h"}]],k1=ze("minus",A1);/**
|
|
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 _1=[["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"}]],Ax=ze("pause",_1);/**
|
|
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 z1=[["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"}]],ao=ze("pen",z1);/**
|
|
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 U1=[["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"}]],zr=ze("play",U1);/**
|
|
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 q1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Wl=ze("plus",q1);/**
|
|
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 H1=[["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"}]],kx=ze("rotate-ccw",H1);/**
|
|
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 L1=[["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=ze("save",L1);/**
|
|
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 V1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],no=ze("search",V1);/**
|
|
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 Y1=[["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"}]],$1=ze("settings",Y1);/**
|
|
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 F1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],vg=ze("square",F1);/**
|
|
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 G1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],P1=ze("terminal",G1);/**
|
|
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 Z1=[["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"}]],W1=ze("test-tube-diagonal",Z1);/**
|
|
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 I1=[["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"}]],Lr=ze("trash-2",I1);/**
|
|
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 Q1=[["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"}]],ru=ze("triangle-alert",Q1);/**
|
|
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 X1=[["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"}]],J1=ze("wifi",X1);/**
|
|
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:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Br=ze("x",K1);/**
|
|
341
|
+
* @license lucide-react v0.564.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const eS=[["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"}]],bg=ze("zap",eS),_x=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"}},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"}},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"}},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"}},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"}},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"}},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"}}],zx=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"},triggerEndpoint:"/api/actions/run",scheduleTemplateKey:"executor",getEnabled:l=>l.executorEnabled??!0,getSchedule:l=>l.cronSchedule??"5 */2 * * *",settingsSection:"general",buildEnabledPatch:l=>({executorEnabled:l})},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"},triggerEndpoint:"/api/actions/review",scheduleTemplateKey:"reviewer",getEnabled:l=>l.reviewerEnabled??!0,getSchedule:l=>l.reviewerSchedule??"25 */3 * * *",settingsSection:"general",buildEnabledPatch:l=>({reviewerEnabled:l})},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"},triggerEndpoint:"/api/actions/qa",scheduleTemplateKey:"qa",getEnabled:l=>{var r;return((r=l.qa)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.qa)==null?void 0:r.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(l,r)=>({qa:{...r.qa??{},enabled:l}})},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"},triggerEndpoint:"/api/actions/audit",scheduleTemplateKey:"audit",getEnabled:l=>{var r;return((r=l.audit)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.audit)==null?void 0:r.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({audit:{...r.audit??{},enabled:l}})},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"},triggerEndpoint:"/api/actions/planner",scheduleTemplateKey:"slicer",getEnabled:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({roadmapScanner:{...r.roadmapScanner??{},enabled:l}})},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"},triggerEndpoint:"/api/actions/analytics",scheduleTemplateKey:"analytics",getEnabled:l=>{var r;return((r=l.analytics)==null?void 0:r.enabled)??!1},getSchedule:l=>{var r;return((r=l.analytics)==null?void 0:r.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({analytics:{...r.analytics??{},enabled:l}})},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"},triggerEndpoint:"/api/actions/merge",scheduleTemplateKey:"merger",getEnabled:l=>{var r;return((r=l.merger)==null?void 0:r.enabled)??!1},getSchedule:l=>{var r;return((r=l.merger)==null?void 0:r.schedule)??"55 */4 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({merger:{...r.merger??{},enabled:l}})}];function Ux(l){return zx.find(r=>r.id===l)}const If="";let Qf=!1,Wc=null;function tS(l){Qf=l}function Sg(l){Wc=l}function aS(){return Qf}function Xf(l){return encodeURIComponent(l.replace(/\//g,"~"))}function vt(l){return Qf&&Wc?l.replace("/api/",`/api/projects/${Xf(Wc)}/`):l}function nS(){return st("/api/mode")}function qx(){return st("/api/projects")}function lS(l){const r=Xf(l);return st(`/api/projects/${r}`,{method:"DELETE"})}async function st(l,r){const c=`${If}${l}`,o=await fetch(c,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!o.ok){const h=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(h.error||`HTTP ${o.status}: ${o.statusText}`)}return o.json()}function bf(){return st(vt("/api/status"))}function Hx(){return st(vt("/api/prs"))}function sS(l,r){const c=`?lines=${encodeURIComponent(r)}`;return st(vt(`/api/logs/${encodeURIComponent(l)}${c}`))}function Jf(){return st(vt("/api/config"))}async function Lx(){if(aS()){const r=(await qx()).filter(o=>o.valid);return(await Promise.all(r.map(async o=>{try{const h=await st(`/api/projects/${Xf(o.name)}/config`);return{projectId:o.name,config:h}}catch(h){return console.error(`Failed to fetch config for project ${o.name}`,h),null}}))).filter(o=>o!==null)}else{const l=await Jf();return[{projectId:Wc||"current",config:l}]}}function Ic(l){return st(vt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function rS(){return st(vt("/api/doctor"))}function Bx(){return st(vt("/api/schedule-info"))}function iS(){return st(vt("/api/actions/run"),{method:"POST"})}function Vx(){return st(vt("/api/actions/review"),{method:"POST"})}function uS(){return st(vt("/api/actions/qa"),{method:"POST"})}function cS(){return st(vt("/api/actions/audit"),{method:"POST"})}function oS(){return st(vt("/api/actions/analytics"),{method:"POST"})}function dS(){return st(vt("/api/actions/planner"),{method:"POST"})}function fS(l){const r=Ux(l);return r?st(vt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${l}`))}function lu(){return st(vt("/api/actions/install-cron"),{method:"POST"})}function hS(){return st(vt("/api/actions/uninstall-cron"),{method:"POST"})}function mS(l="all"){return st(vt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Pl=["Draft","Ready","In Progress","Review","Done"];function Yx(){return st(vt("/api/board/status"))}function gS(l){return st(vt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function $x(l,r){return st(vt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function xS(l){const r=`${If}${vt(`/api/board/issues/${l}`)}`,c=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!c.ok){const o=await c.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error||`HTTP ${c.status}: ${c.statusText}`)}}function yS(){return st(vt("/api/actions/clear-lock"),{method:"POST"})}function pS(l,r=[],c){const o=(c==null?void 0:c.enabled)??!0,h=U.useRef(l);h.current=l,U.useEffect(()=>{if(!o)return;const f=`${If}${vt("/api/status/events")}`,v=new EventSource(f);return v.addEventListener("status_changed",N=>{try{const b=JSON.parse(N.data);h.current(b)}catch{}}),()=>{v.close()}},[o,...r])}function vS(){return st("/api/queue/status")}function bS(l){const r=`?window=${encodeURIComponent(l)}`;return st(`/api/queue/analytics${r}`)}function SS(){return st("/api/global-notifications")}function Ng(l){return st("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function NS(){return st(vt("/api/roadmap"))}function wS(){return st(vt("/api/roadmap/scan"),{method:"POST"})}function Fx(l){return st(vt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function yn(l,r=[],c){const o=(c==null?void 0:c.enabled)??!0,[h,f]=U.useState(null),[v,N]=U.useState(!0),[b,x]=U.useState(null),S=U.useRef(l);S.current=l;const T=U.useRef(()=>{(async()=>{x(null);try{const D=await S.current();f(D)}catch(D){x(D instanceof Error?D:new Error("Unknown error"))}})()});return U.useEffect(()=>{if(!o)return;let j=!1;return N(!0),x(null),(async()=>{try{const C=await S.current();j||f(C)}catch(C){j||x(C instanceof Error?C:new Error("Unknown error"))}finally{j||N(!1)}})(),()=>{j=!0}},[...r,o]),{data:h,loading:v,error:b,refetch:T.current}}const wg=l=>{let r;const c=new Set,o=(x,S)=>{const T=typeof x=="function"?x(r):x;if(!Object.is(T,r)){const j=r;r=S??(typeof T!="object"||T===null)?T:Object.assign({},r,T),c.forEach(D=>D(r,j))}},h=()=>r,N={setState:o,getState:h,getInitialState:()=>b,subscribe:x=>(c.add(x),()=>c.delete(x))},b=r=l(o,h,N);return N},jS=l=>l?wg(l):wg,ES=l=>l;function TS(l,r=ES){const c=qe.useSyncExternalStore(l.subscribe,()=>r(l.getState()),()=>r(l.getInitialState()));return qe.useDebugValue(c),c}const jg=l=>{const r=jS(l),c=o=>TS(r,o);return Object.assign(c,r),c},MS=l=>l?jg(l):jg,CS=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Jt=MS((l,r)=>({projectName:"Night Watch",setProjectName:c=>l({projectName:c}),toasts:[],addToast:c=>{const o=Math.random().toString(36).substring(7);l(h=>({toasts:[...h.toasts,{...c,id:o}]})),setTimeout(()=>{l(h=>({toasts:h.toasts.filter(f=>f.id!==o)}))},5e3)},removeToast:c=>l(o=>({toasts:o.toasts.filter(h=>h.id!==c)})),status:null,setStatus:c=>l(o=>!o.status||new Date(c.timestamp)>new Date(o.status.timestamp)?{status:c}:o),globalModeLoading:!0,setGlobalModeLoading:c=>l({globalModeLoading:c}),isGlobalMode:!1,setGlobalMode:c=>{tS(c),l({isGlobalMode:c})},projects:[],setProjects:c=>l({projects:c}),selectedProjectId:CS,selectProject:c=>{Sg(c),c?localStorage.setItem("nw-selected-project",c):localStorage.removeItem("nw-selected-project"),l(o=>{const h=o.projects.find(f=>f.name===c);return{selectedProjectId:c,...h?{projectName:h.name}:{}}})},removeProjectFromList:c=>{l(o=>{var N;const h=o.projects.filter(b=>b.name!==c),f=o.selectedProjectId===c,v=f?((N=h[0])==null?void 0:N.name)??null:o.selectedProjectId;return f&&(Sg(v),v?localStorage.setItem("nw-selected-project",v):localStorage.removeItem("nw-selected-project")),{projects:h,selectedProjectId:v,...f&&h[0]?{projectName:h[0].name}:{}}})},getJobStates:()=>{const{status:c}=r(),o=c==null?void 0:c.config;return zx.map(h=>({id:h.id,label:h.label,processName:h.processName,color:h.color,enabled:o?h.getEnabled(o):!0,schedule:o?h.getSchedule(o):"",triggerEndpoint:h.triggerEndpoint}))}})),OS=()=>{const[l,r]=U.useState(!1),{projectName:c,isGlobalMode:o,projects:h,selectedProjectId:f,selectProject:v,globalModeLoading:N}=Jt(),{data:b}=yn(Hx,[f],{enabled:!N}),x=(b==null?void 0:b.length)??0,S=U.useMemo(()=>[{icon:E1,label:"Dashboard",path:"/",section:"Overview"},{icon:P1,label:"Logs",path:"/logs"},{icon:O1,label:"Board",path:"/board",section:"Work"},{icon:S1,label:"Pull Requests",path:"/prs",badge:x},{icon:Rx,label:"Roadmap",path:"/roadmap"},{icon:Wf,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:$1,label:"Settings",path:"/settings",section:"Config"}],[x]);return s.jsxs("aside",{className:`
|
|
346
|
+
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
347
|
+
${l?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
348
|
+
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
349
|
+
`,children:[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(xg,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),s.jsx("select",{value:f||"",onChange:T=>v(T.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:h.filter(T=>T.valid).map(T=>s.jsx("option",{value:T.name,children:T.name},T.name))}),s.jsx(r1,{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(xg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:c})]})]})}),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:S.map(T=>s.jsxs(qe.Fragment,{children:[T.section&&!l&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:T.section}),s.jsx("li",{children:s.jsx(jx,{to:T.path,className:({isActive:j})=>`
|
|
350
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
351
|
+
${j?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
|
|
352
|
+
${l?"justify-center":""}
|
|
353
|
+
`,children:({isActive:j})=>s.jsxs(s.Fragment,{children:[s.jsx(T.icon,{className:`h-5 w-5 transition-colors ${j?"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:T.label}),T.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 ${j?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:T.badge})),j&&!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:T.label})]})})})]},T.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>r(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(a1,{className:"h-5 w-5"}):s.jsx(e1,{className:"h-5 w-5"})})})]})},DS=()=>{const{projectName:l}=Jt();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(J1,{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(no,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),s.jsx("div",{className:"flex items-center space-x-3",children:s.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[s.jsx(Pb,{className:"h-5 w-5"}),s.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]})}),s.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-600 ring-2 ring-white/10 flex items-center justify-center text-white font-bold text-xs shadow-lg",children:"AD"})]})]})},RS=({toast:l,onDismiss:r})=>{const c={success:s.jsx(ou,{className:"h-5 w-5 text-green-400"}),error:s.jsx(rl,{className:"h-5 w-5 text-red-400"}),info:s.jsx(M1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(ru,{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:`
|
|
354
|
+
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
355
|
+
bg-slate-900 border border-slate-800 border-l-4 ${o[l.type]}
|
|
356
|
+
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
357
|
+
animate-in slide-in-from-right-full fade-in duration-300
|
|
358
|
+
`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:c[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:()=>r(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Br,{className:"h-5 w-5"})]})})]})})})},AS=()=>{const{toasts:l,removeToast:r}=Jt();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(c=>s.jsx(RS,{toast:c,onDismiss:r},c.id))})};function kS(){const{setGlobalMode:l,setGlobalModeLoading:r,setProjects:c,selectProject:o,selectedProjectId:h}=Jt();U.useEffect(()=>{r(!0),nS().then(async({globalMode:f})=>{if(l(f),!f)return;const v=await qx();c(v);const N=v.filter(b=>b.valid);h&&N.some(b=>b.name===h)?o(h):N.length>0&&o(N[0].name)}).catch(()=>{l(!1)}).finally(()=>{r(!1)})},[])}function Eg(l){if(!(l!=null&&l.timestamp))return Number.NEGATIVE_INFINITY;const r=new Date(l.timestamp).getTime();return Number.isNaN(r)?Number.NEGATIVE_INFINITY:r}function Hc(l,r){return l?r?Eg(l)>=Eg(r)?l:r:l:r}function _S(){const{setStatus:l,setProjectName:r,selectedProjectId:c,globalModeLoading:o,status:h}=Jt(),f=U.useRef(null);f.current=Jt.getState().status,pS(v=>{Hc(v,f.current)===v&&l(v)},[c,o],{enabled:!o}),U.useEffect(()=>{if(o)return;bf().then(N=>{Hc(N,f.current)===N&&l(N)}).catch(()=>{});const v=setInterval(()=>{bf().then(N=>{Hc(N,f.current)===N&&l(N)}).catch(()=>{})},3e4);return()=>clearInterval(v)},[c,o,l]),U.useEffect(()=>{const v=()=>{bf().then(N=>{Hc(N,f.current)===N&&l(N)}).catch(()=>{})};return window.addEventListener("focus",v),()=>window.removeEventListener("focus",v)},[c,l]),U.useEffect(()=>{h!=null&&h.projectName&&r(h.projectName)},[h==null?void 0:h.projectName,r])}const et=({children:l,className:r="",onClick:c})=>s.jsxs("div",{className:`
|
|
359
|
+
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
360
|
+
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
361
|
+
transition-all duration-300
|
|
362
|
+
${c?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
363
|
+
${r}
|
|
364
|
+
`,onClick:c,children:[c&&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})]}),Pe=({children:l,variant:r="primary",size:c="md",loading:o=!1,className:h="",disabled:f,...v})=>{const N="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"},x={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${N} ${b[r]} ${x[c]} ${h}`,disabled:f||o,...v,children:[o&&s.jsx(Dx,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},_r=({children:l,variant:r="default",className:c=""})=>{const o={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${o[r]} ${c}`,children:l})},Gx={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"}},zS=({defaultColumn:l,onClose:r,onCreated:c})=>{const[o,h]=U.useState(""),[f,v]=U.useState(""),[N,b]=U.useState(l),[x,S]=U.useState(!1),[T,j]=U.useState(null),{addToast:D}=Jt(),C=async M=>{if(M.preventDefault(),!!o.trim()){S(!0),j(null);try{await gS({title:o.trim(),body:f,column:N}),D({title:"Issue created",message:`"${o.trim()}" added to ${N}`,type:"success"}),c(),r()}catch(R){j(R instanceof Error?R.message:"Failed to create issue")}finally{S(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(Br,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:C,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:o,onChange:M=>h(M.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:N,onChange:M=>b(M.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Pl.map(M=>s.jsx("option",{value:M,children:M},M))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:f,onChange:M=>v(M.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),T&&s.jsx("p",{className:"text-sm text-red-400",children:T}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Pe,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Pe,{type:"submit",disabled:x||!o.trim(),children:x?"Creating...":"Create Issue"})]})]})]})]})},US=({issue:l,onClose:r,onMoved:c,onClosed:o})=>{const[h,f]=U.useState(!1),[v,N]=U.useState(!1),[b,x]=U.useState(!1),{addToast:S}=Jt(),T=async C=>{if(C!==l.column){f(!0);try{await $x(l.number,C),S({title:"Issue moved",message:`#${l.number} moved to ${C}`,type:"success"}),c(),r()}catch(M){S({title:"Move failed",message:M instanceof Error?M.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},j=async()=>{x(!1),N(!0);try{await xS(l.number),S({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),o(),r()}catch(C){S({title:"Close failed",message:C instanceof Error?C.message:"Failed to close issue",type:"error"})}finally{N(!1)}},D=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:r}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",l.number]}),s.jsx(_r,{variant:Gx[D].badge,children:D})]}),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:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:s.jsx(Br,{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:"}),Pl.filter(C=>C!==l.column).map(C=>s.jsx("button",{onClick:()=>T(C),disabled:h,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:C},C))]}),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(Ox,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>x(!0),disabled:v,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:v?"Closing...":"Close Issue"})]})]}),b&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>x(!1)}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border border-white/10 rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-100 mb-2",children:"Close issue?"}),s.jsxs("p",{className:"text-sm text-slate-400 mb-4",children:["Close issue #",l.number,': "',l.title,'"?']}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx(Pe,{variant:"ghost",onClick:()=>x(!1),children:"Cancel"}),s.jsx(Pe,{onClick:j,children:"Confirm"})]})]})]}),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."})})]})]})},qS=({issue:l,onClick:r,onDragStart:c})=>{const[o,h]=U.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(l.number)),f.dataTransfer.effectAllowed="move",h(!0),c(l)},onDragEnd:()=>h(!1),children:s.jsxs(et,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${o?"opacity-30":""}`,onClick:r,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",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(", ")})]})})},HS=({name:l,issues:r,draggingIssue:c,onIssueClick:o,onNewIssue:h,onMoveIssue:f,onDragStart:v})=>{const N=Gx[l],[b,x]=U.useState(!1),S=c!==null&&c.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${b&&S?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:T=>{S&&(T.preventDefault(),T.dataTransfer.dropEffect="move",x(!0))},onDragLeave:()=>x(!1),onDrop:T=>{T.preventDefault(),x(!1),c&&c.column!==l&&f(c,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 ${N.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:r.length})]}),s.jsx("button",{onClick:()=>h(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(Wl,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:r.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${b&&S?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:b&&S?"Drop here":"No issues"})}):r.map(T=>s.jsx(qS,{issue:T,onClick:()=>o(T),onDragStart:v},T.id))})]})},LS=()=>{const[l,r]=U.useState(null),[c,o]=U.useState(null),[h,f]=U.useState(null),[v,N]=U.useState(null),b=U.useRef(!1),{addToast:x,selectedProjectId:S,globalModeLoading:T}=Jt(),{data:j,loading:D,error:C,refetch:M}=yn(Yx,[S],{enabled:!T});U.useEffect(()=>{const Y=setInterval(()=>{b.current||M()},3e4);return()=>clearInterval(Y)},[M]);const R=U.useCallback(async(Y,G)=>{f(null);const ee=v??(j==null?void 0:j.columns);if(!ee)return;const de=ee,Z={};for(const W of Pl)Z[W]=(ee[W]??[]).filter(ne=>ne.number!==Y.number);const P={...Y,column:G};Z[G]=[...Z[G]??[],P],N(Z),r(W=>(W==null?void 0:W.number)===Y.number?P:W),b.current=!0;try{await $x(Y.number,G),M(),setTimeout(()=>{N(null),b.current=!1},800)}catch(W){N(de),r(ne=>(ne==null?void 0:ne.number)===Y.number?Y:ne),b.current=!1,x({title:"Move failed",message:W instanceof Error?W.message:"Failed to move issue",type:"error"})}},[x,M,v,j]);if(T||D)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(C&&C.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(C)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:C.message}),s.jsx(Pe,{onClick:()=>M(),children:"Retry"})]});if(!j)return null;const Q=v??j.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:[Pl.reduce((Y,G)=>{var ee;return Y+(((ee=Q[G])==null?void 0:ee.length)??0)},0)," issues across ",Pl.length," columns"]})]}),s.jsxs(Pe,{onClick:()=>o("Ready"),children:[s.jsx(Wl,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>f(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Pl.length*236}px`},children:Pl.map(Y=>s.jsx(HS,{name:Y,issues:Q[Y]??[],draggingIssue:h,onIssueClick:r,onNewIssue:o,onMoveIssue:R,onDragStart:f},Y))})}),l&&s.jsx(US,{issue:l,onClose:()=>r(null),onMoved:()=>M(),onClosed:()=>M()}),c&&s.jsx(zS,{defaultColumn:c,onClose:()=>o(null),onCreated:()=>M()})]})},BS=[{name:"executor",displayName:"Executor",processName:"executor",triggerId:"executor",cancelType:"run",runningLabel:"Running",idleLabel:"Idle"},{name:"reviewer",displayName:"Reviewer",processName:"reviewer",triggerId:"reviewer",cancelType:"review",runningLabel:"Running",idleLabel:"Idle"},{name:"qa",displayName:"QA",processName:"qa",triggerId:"qa",runningLabel:"Running",idleLabel:"Idle"},{name:"auditor",displayName:"Auditor",processName:"audit",triggerId:"audit",runningLabel:"Running",idleLabel:"Idle"},{name:"planner",displayName:"Planner",processName:"planner",triggerId:"planner",runningLabel:"Writing PRDs",idleLabel:"Idle"},{name:"analytics",displayName:"Analytics",processName:"analytics",triggerId:"analytics",runningLabel:"Running",idleLabel:"Idle"}],VS=({processes:l,activePrd:r,onCancelProcess:c,onForceClear:o,onViewLog:h,cancellingProcess:f,clearingLock:v,onTriggerJob:N,triggeringJob:b})=>{const x=T=>l.find(j=>j.name===T),S=(T,j)=>T.length<=j?T:T.slice(0,j-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:BS.map(T=>{const j=x(T.processName),D=(j==null?void 0:j.running)??!1,C=j==null?void 0:j.pid,M=f===T.cancelType,R=D&&T.cancelType,Q=!D&&T.name==="executor"&&r,Y=D?C?`PID: ${C}`:T.runningLabel:T.idleLabel,G=D&&T.name==="executor"&&r?S(r,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${D?"bg-green-950/30 border-green-800/50":"bg-slate-950/50 border-slate-800"}`,children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${D?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:`text-sm font-medium ${D?"text-slate-200":"text-slate-400"}`,children:T.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:G?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Df,{className:"h-3 w-3 flex-shrink-0"}),G]}):Y})]}),s.jsxs("div",{className:"flex-shrink-0",children:[R&&s.jsx("button",{onClick:()=>T.cancelType&&c(T.cancelType),disabled:M,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(vg,{className:"h-3.5 w-3.5"})}),Q&&s.jsx("button",{onClick:o,disabled:v,className:"p-1 text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 rounded transition-colors disabled:opacity-50",title:"Force clear stale state",children:s.jsx(vg,{className:"h-3.5 w-3.5"})}),!R&&!Q&&D&&s.jsx("button",{onClick:h,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Df,{className:"h-3.5 w-3.5"})}),!D&&!Q&&s.jsx("button",{onClick:()=>N(T.triggerId),disabled:b!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${T.displayName}`,children:b===T.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(zr,{className:"h-3.5 w-3.5"})})]})]},T.name)})})},YS={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"},$S=()=>{var z,I;const l=$f(),[r,c]=U.useState(null),[o,h]=U.useState(!1),[f,v]=U.useState(null),{setProjectName:N,addToast:b,selectedProjectId:x,globalModeLoading:S,status:T}=Jt(),{data:j}=yn(Bx,[x],{enabled:!S}),{data:D,loading:C}=yn(()=>Yx().catch(()=>null),[x],{enabled:!S}),M=T;if(qe.useEffect(()=>{M!=null&&M.projectName&&N(M.projectName)},[M,N]),S)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!M)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const R=M.prs.length,Q=M.prs.filter(_=>_.reviewScore!==null&&_.reviewScore<70).length,Y=((z=D==null?void 0:D.columns.Ready)==null?void 0:z.length)??0,G=((I=D==null?void 0:D.columns["In Progress"])==null?void 0:I.length)??0;M.processes.find(_=>_.name==="executor"),M.processes.find(_=>_.name==="reviewer"),M.processes.find(_=>_.name==="qa"),M.processes.find(_=>_.name==="audit"),M.processes.find(_=>_.name==="planner"),M.processes.find(_=>_.name==="analytics");const ee=async _=>{c(_);try{const ce=await mS(_),he=ce.results.every(q=>q.success);b({title:he?"Process Cancelled":"Cancel Failed",message:ce.results.map(q=>q.message).join("; "),type:he?"success":"error"})}catch(ce){b({title:"Cancel Failed",message:ce instanceof Error?ce.message:"Failed to cancel process",type:"error"})}finally{c(null)}},de=async()=>{h(!0);try{await yS(),b({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(_){b({title:"Clear Failed",message:_ instanceof Error?_.message:"Failed to clear lock",type:"error"})}finally{h(!1)}},Z=async _=>{v(_);try{await{executor:iS,reviewer:Vx,qa:uS,audit:cS,planner:dS,analytics:oS}[_](),b({title:"Job Triggered",message:`${_[0].toUpperCase()+_.slice(1)} job has been queued.`,type:"success"})}catch(ce){b({title:"Trigger Failed",message:ce instanceof Error?ce.message:`Failed to trigger ${_}`,type:"error"})}finally{v(null)}},P=_=>{if(!_)return"Not scheduled";try{const ce=new Date(_),he=new Date,q=ce.getTime()-he.getTime(),$=Math.floor(q/6e4);return $<0?"Running now...":$<60?`in ${$} min`:$<1440?`in ${Math.floor($/60)} hr${$>=120?"s":""}`:`in ${Math.floor($/1440)} day${$>=2880?"s":""}`}catch{return"Unknown"}},ne=(()=>{var he,q,$;if(j!=null&&j.paused)return null;const _=[{agent:"Executor",nextRun:(j==null?void 0:j.executor.nextRun)??null},{agent:"Reviewer",nextRun:(j==null?void 0:j.reviewer.nextRun)??null},{agent:"QA",nextRun:((he=j==null?void 0:j.qa)==null?void 0:he.nextRun)??null},{agent:"Auditor",nextRun:((q=j==null?void 0:j.audit)==null?void 0:q.nextRun)??null},{agent:"Planner",nextRun:(($=j==null?void 0:j.planner)==null?void 0:$.nextRun)??null}];let ce=null;for(const ie of _)ie.nextRun&&(!ce||new Date(ie.nextRun)<new Date(ce.nextRun))&&(ce=ie);return ce?{agent:ce.agent,time:P(ce.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(et,{className:"p-5",onClick:()=>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:Y})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(ou,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(et,{className:"p-5",onClick:()=>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:G})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Mx,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(et,{className:"p-5",onClick:()=>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:R})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Zc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${Q>0?"text-red-400 font-medium":"text-slate-500"}`,children:Q>0?`${Q} need work`:"All passing"})]}),s.jsxs(et,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:j!=null&&j.paused?"Paused":M.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${j!=null&&j.paused?"bg-amber-500/10 text-amber-400":M.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(Wf,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:j!=null&&j.paused?"All schedules paused":M.crontab.installed?`${M.crontab.entries.length} entr${M.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(et,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>l("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(VS,{processes:M.processes,activePrd:M.activePrd,onCancelProcess:ee,onForceClear:de,onViewLog:()=>l("/logs"),cancellingProcess:r,clearingLock:o,onTriggerJob:Z,triggeringJob:f})]}),ne&&s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[s.jsx("span",{children:"Next automation:"}),s.jsx("span",{className:"text-slate-200 font-medium",children:ne.agent}),s.jsx("span",{children:ne.time})]}),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(gg,{className:"ml-1 h-3 w-3"})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),s.jsxs("button",{onClick:()=>l("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(gg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(et,{className:"p-4",children:C?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):D?s.jsx("div",{className:"flex flex-wrap gap-3",children:Pl.map(_=>{var he;const ce=((he=D.columns[_])==null?void 0:he.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 ${YS[_]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:_}),s.jsx("span",{className:"text-xs font-bold",children:ce})]},_)})}):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."]})})]})]})},FS=()=>{const[l,r]=U.useState(!0),[c,o]=U.useState(""),[h,f]=U.useState("executor"),v=U.useRef(null),{selectedProjectId:N,globalModeLoading:b}=Jt(),x=Jt(Y=>Y.status),{data:S,loading:T,error:j,refetch:D}=yn(()=>sS(h,500),[h,N],{enabled:!b}),C=(S==null?void 0:S.lines)||[];U.useEffect(()=>{l&&v.current&&(v.current.scrollTop=v.current.scrollHeight)},[C,l]),U.useEffect(()=>{if(!l)return;const Y=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(Y)},[l,h,D]);const M=C.filter(Y=>Y.toLowerCase().includes(c.toLowerCase())),R=Y=>{f(Y),o("")},Q=Y=>{if(!(x!=null&&x.processes))return!1;const G=x.processes.find(ee=>ee.name===Y);return(G==null?void 0:G.running)??!1};return j?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(rl,{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:j.message}),s.jsx(Pe,{onClick:()=>D(),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:c,onChange:Y=>o(Y.target.value)}),s.jsx(no,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),s.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),s.jsx("div",{className:"flex space-x-1",children:_x.map(({processName:Y,label:G})=>s.jsx("button",{onClick:()=>R(Y),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h===Y?"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:G}),Q(Y)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},Y))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Pe,{size:"sm",variant:"ghost",onClick:()=>D(),children:[s.jsx(yg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Pe,{size:"sm",variant:"ghost",onClick:()=>r(!l),children:[l?s.jsx(Ax,{className:"h-4 w-4 mr-2"}):s.jsx(zr,{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: ",h,".log"]}),s.jsxs("span",{children:[M.length," lines"]})]}),s.jsxs("div",{ref:v,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[T?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):M.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:c?"No logs match your filter":"No logs yet — logs will appear after the first run"}):M.map((Y,G)=>{const ee=Y.includes("[ERROR]"),de=Y.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${ee?"text-red-400":de?"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:G+1}),Y]},G)}),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:()=>r(!0),children:[s.jsx(yg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},GS=()=>{const[l,r]=U.useState(null),[c,o]=U.useState(!1),[h,f]=U.useState("all"),[v,N]=U.useState("number"),[b,x]=U.useState("desc"),{addToast:S,selectedProjectId:T,globalModeLoading:j}=Jt(),{data:D,loading:C,error:M,refetch:R}=yn(Hx,[T],{enabled:!j}),Q=D??[],Y=z=>{switch(z){case"pass":return s.jsx(ou,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(d1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Dx,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(rl,{className:"h-4 w-4 text-slate-500"})}},G=z=>{switch(z){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},ee=z=>z===null?"No review decision yet":z===100?"PR has been approved":z===0?"Changes have been requested":`Review score: ${z}`,de=U.useMemo(()=>Q.filter(z=>{switch(h){case"needs-work":return z.ciStatus==="fail"||z.reviewScore===0;case"pending":return z.ciStatus==="pending"||z.ciStatus==="unknown"||z.reviewScore===null;case"passed":return z.ciStatus==="pass"&&z.reviewScore===100;case"all":default:return!0}}),[Q,h]),Z=U.useMemo(()=>[...de].sort((I,_)=>{let ce=0;switch(v){case"number":ce=I.number-_.number;break;case"title":ce=I.title.localeCompare(_.title);break;case"branch":ce=I.branch.localeCompare(_.branch);break;case"ciStatus":{const he={fail:0,pending:1,unknown:2,pass:3};ce=(he[I.ciStatus]??2)-(he[_.ciStatus]??2);break}case"reviewScore":{const he=I.reviewScore??-1,q=_.reviewScore??-1;ce=he-q;break}}return b==="asc"?ce:-ce}),[de,v,b]),P=z=>{v===z?x(b==="asc"?"desc":"asc"):(N(z),x("desc"))},W=z=>v!==z?s.jsx(Yb,{className:"h-3 w-3 text-slate-600"}):b==="asc"?s.jsx(Fb,{className:"h-3 w-3 text-indigo-400"}):s.jsx(Lb,{className:"h-3 w-3 text-indigo-400"});if(C)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(M)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(rl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:M.message}),s.jsx(Pe,{onClick:()=>R(),children:"Retry"})]});const ne=async()=>{o(!0);try{const z=await Vx();S({title:"Reviewer Started",message:z.pid?`Started with PID ${z.pid}`:"Reviewer started",type:"success"})}catch(z){S({title:"Reviewer Failed",message:z instanceof Error?z.message:"Failed to start reviewer",type:"error"})}finally{o(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),s.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),s.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),s.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),s.jsxs(Pe,{size:"sm",onClick:ne,disabled:c,children:[s.jsx(no,{className:"h-4 w-4 mr-2"}),c?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),W("number")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),W("branch")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),W("ciStatus")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),W("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:[Z.map(z=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(l===z.number?null:z.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:["#",z.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:z.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:z.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:G(z.ciStatus),children:[Y(z.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:z.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:z.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:ee(z.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${z.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${z.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:z.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:z.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:I=>I.stopPropagation(),children:s.jsx(Ox,{className:"h-4 w-4"})})})]},z.number)),Z.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:Q.length===0?"No open PRs found.":`No PRs match the "${h}" filter.`})})]})]})}),l&&s.jsx(et,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const z=Q.find(I=>I.number===l);return z?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:z.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:z.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:G(z.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:[Y(z.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:z.ciStatus})]})]}),z.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:ee(z.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:z.reviewScore})]})]})]}):null})()})]})},ga=qe.forwardRef(({className:l="",label:r,checked:c,onChange:o,...h},f)=>{const v=N=>{o&&o(N.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:f,checked:c,onChange:v,...h}),s.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),r&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:r})]})});ga.displayName="Switch";const PS=()=>{const{addToast:l,selectedProjectId:r,globalModeLoading:c}=Jt(),[o,h]=U.useState(!1),[f,v]=U.useState(!1),{data:N,loading:b,error:x,refetch:S}=yn(NS,[r],{enabled:!c});U.useEffect(()=>{if(!(N!=null&&N.enabled))return;const Y=setInterval(()=>{S()},1e4);return()=>clearInterval(Y)},[N==null?void 0:N.enabled,S]);const T=async Y=>{v(!0);try{await Fx(Y),l({title:Y?"Scanner Enabled":"Scanner Disabled",message:Y?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:Y?"success":"info"}),S()}catch(G){l({title:"Toggle Failed",message:G instanceof Error?G.message:"Failed to toggle scanner",type:"error"})}finally{v(!1)}},j=async()=>{h(!0);try{const Y=await wS();Y.created.length>0?l({title:"Scan Complete",message:`Created ${Y.created.length} PRD(s): ${Y.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),Y.errors.length>0&&l({title:"Scan Errors",message:Y.errors.join("; "),type:"warning"}),S()}catch(Y){l({title:"Scan Failed",message:Y instanceof Error?Y.message:"Failed to scan roadmap",type:"error"})}finally{h(!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(x)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(rl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:x.message}),s.jsx(Pe,{onClick:()=>S(),children:"Retry"})]});if(!N)return null;if(N.status==="no-roadmap")return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),s.jsx(et,{className:"p-12",children:s.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[s.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:s.jsx(Rx,{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 D=N.totalItems>0?Math.round(N.processedItems/N.totalItems*100):0,C=WS(N.status),M=IS(N.items),R=N.lastScan?QS(N.lastScan):"Never",Q=N.autoScanInterval?Math.round(N.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(ga,{label:N.enabled?"Enabled":"Disabled",checked:N.enabled,onChange:T,disabled:f}),s.jsxs(Pe,{onClick:j,loading:o,disabled:!N.enabled||N.status==="complete",children:[s.jsx(zr,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(et,{className:`p-6 border-2 ${C.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(C.icon,{className:`h-8 w-8 ${C.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 ${C.textColor}`,children:C.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:R})]}),N.enabled&&N.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",Q," min"]})]}),N.enabled&&N.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(et,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[N.processedItems," / ",N.totalItems," items (",D,"%)"]})]}),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 ${D===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${D}%`}})})]}),Object.entries(M).map(([Y,G])=>s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:Y}),s.jsx("div",{className:"space-y-2",children:G.map(ee=>s.jsx(ZS,{item:ee},ee.hash))})]},Y))]})};function ZS({item:l}){const r=l.checked,c=l.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${r?"bg-slate-950/30 border-slate-800/50":c?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[r?s.jsx(k1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):c?s.jsx(ou,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Df,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${r?"line-through text-slate-600":"text-slate-200"}`,children: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:r?s.jsx(_r,{variant:"neutral",children:"Skipped"}):c?s.jsx(_r,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(_r,{variant:"warning",children:"Pending"})})]})}function WS(l){switch(l){case"complete":return{label:"Complete",icon:ou,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Zc,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:zr,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:rl,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:rl,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function IS(l){const r={};for(const c of l){const o=c.section||"General";r[o]||(r[o]=[]),r[o].push(c)}return r}function QS(l){try{const r=new Date(l),o=new Date().getTime()-r.getTime(),h=Math.floor(o/6e4);if(h<1)return"Just now";if(h<60)return`${h} min ago`;const f=Math.floor(h/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const He=qe.forwardRef(({className:l="",label:r,error:c,helperText:o,rightIcon:h,...f},v)=>{const N=qe.useId(),b=f.id??N,x=c?`${b}-error`:void 0,S=!c&&o?`${b}-help`:void 0,T=[x,S].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:v,id:b,"aria-describedby":T,"aria-invalid":c?!0:f["aria-invalid"],className:`
|
|
365
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
366
|
+
px-3 py-2 text-sm text-slate-200
|
|
367
|
+
placeholder:text-slate-600
|
|
368
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
369
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
370
|
+
transition-all duration-200
|
|
371
|
+
${c?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
372
|
+
${h?"pr-10":""}
|
|
373
|
+
${l}
|
|
374
|
+
`,...f}),h&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:h})]}),c?s.jsx("p",{id:x,className:"mt-1.5 text-xs text-red-400",children:c}):o?s.jsx("p",{id:S,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});He.displayName="Input";const ra=qe.forwardRef(({className:l="",label:r,error:c,helperText:o,options:h,value:f,onChange:v,children:N,...b},x)=>{const S=qe.useId(),T=b.id??S,j=c?`${T}-error`:void 0,D=!c&&o?`${T}-help`:void 0,C=[j,D].filter(Boolean).join(" ")||void 0,M=R=>{v&&v(R.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:T,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:x,id:T,"aria-describedby":C,"aria-invalid":c?!0:b["aria-invalid"],className:`
|
|
375
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
376
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
377
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
378
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
379
|
+
transition-all duration-200
|
|
380
|
+
${c?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
381
|
+
${l}
|
|
382
|
+
`,value:f,onChange:M,...b,children:h?h.map(R=>s.jsx("option",{value:R.value,children:R.label},R.value)):N}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Cx,{className:"h-4 w-4"})})]}),c?s.jsx("p",{id:j,className:"mt-1.5 text-xs text-red-400",children:c}):o?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});ra.displayName="Select";const Px=({tabs:l,activeTab:r,onChange:c,className:o=""})=>{var b,x;const[h,f]=qe.useState((b=l[0])==null?void 0:b.id),v=r||h,N=S=>{c?c(S):f(S)};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(S=>s.jsx("button",{onClick:()=>N(S.id),className:`
|
|
383
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
384
|
+
${v===S.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
385
|
+
`,children:S.label},S.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(x=l.find(S=>S.id===v))==null?void 0:x.content})]})},Qc=[{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"}],Kf=[{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 * * *",merger:"55 */4 * * *"},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",merger:"Every 4h at :55"}},{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 * * *",merger:"55 */4 * * *"},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",merger:"Every 4h at :55"}},{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",merger:"55 */4 * * 1-5"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am",merger:"Every 4h at :55 weekdays"}},{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",merger:"55 */8 * * *"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am",merger:"Every 8h at :55"}}];function Ur(l){return l?l.trim().replace(/\s+/g," "):""}function _s(l,r){return Ur(l)===Ur(r)}function XS(l){if(l)return Kf.find(r=>r.id===l)}function Zx(l,r,c,o,h,f,v){return _s(l.schedules.executor,r)&&_s(l.schedules.reviewer,c)&&_s(l.schedules.qa,o)&&_s(l.schedules.audit,h)&&_s(l.schedules.slicer,f)&&_s(l.schedules.merger,v)}function JS(l,r,c,o,h,f){return Kf.find(v=>Zx(v,l,r,c,o,h,f))}function nu(l,r,c,o,h,f,v){const N=XS(l);return N&&Zx(N,r,c,o,h,f,v)?N:JS(r,c,o,h,f,v)}function Tg(l){const r=Ur(l),c=r.split(/\s+/);if(c.length!==5)return r;const[o,h,f,v,N]=c,b=/^\d+$/.test(o),x=Qc.find(S=>Ur(S.value)===r);if(x)return x.label;if(o==="*/30"&&h==="*")return"Every 30 minutes";if(o==="0"&&h==="*")return"Every hour";if(o.startsWith("*/"))return`Every ${parseInt(o.replace("*/",""),10)} minutes`;if(b&&h.startsWith("*/")&&f==="*"&&v==="*"&&N==="*"){const S=parseInt(h.replace("*/",""),10);return o==="0"?`Every ${S} hours`:`Every ${S} hours at :${o.padStart(2,"0")}`}if(o==="0"&&h.startsWith("*/"))return`Every ${parseInt(h.replace("*/",""),10)} hours`;if(o==="0"&&h.includes("-")){const[S,T]=h.split("-");return`Every hour from ${Gi(S)} to ${Gi(T)}`}if(b&&h.includes("-")&&f==="*"&&v==="*"&&N==="*"){const[S,T]=h.split("-");return`Every hour from ${Pi(S,o)} to ${Pi(T,o)}`}if(o==="0"&&h.includes(",")){const S=h.split(",").map(Gi);return S.length<=3?`At ${S.join(" and ")}`:`At ${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}if(b&&h.includes(",")&&f==="*"&&v==="*"&&(N==="*"||N==="1-5")){const S=h.split(",").map(j=>Pi(j,o)),T=N==="1-5"?"Weekdays at ":"At ";return S.length<=3?`${T}${S.join(" and ")}`:`${T}${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}return o==="0"&&h!=="*"&&f==="*"&&v==="*"&&N==="*"?`Daily at ${Gi(h)}`:b&&h!=="*"&&f==="*"&&v==="*"&&N==="*"?`Daily at ${Pi(h,o)}`:o==="0"&&h!=="*"&&f==="*"&&v==="*"&&N==="1-5"?`Weekdays at ${Gi(h)}`:b&&h!=="*"&&f==="*"&&v==="*"&&N==="1-5"?`Weekdays at ${Pi(h,o)}`:r}function Gi(l){const r=parseInt(l,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function Pi(l,r){const c=r.padStart(2,"0"),o=parseInt(l,10);return Number.isNaN(o)?`${l}:${c}`:o===0?`12:${c} AM`:o<12?`${o}:${c} AM`:o===12?`12:${c} PM`:`${o-12}:${c} PM`}function KS(l){const r=Ur(l),c=Qc.find(o=>Ur(o.value)===r);return(c==null?void 0:c.value)??"__custom__"}function e2(l){const r=new Date,c=l.getTime()-r.getTime(),o=Math.floor(c/6e4),h=Math.floor(o/60),f=Math.floor(h/24);return o<1?"less than a minute":o<60?`in ${o} minute${o>1?"s":""}`:h<24?`in ${h} hour${h>1?"s":""}`:`in ${f} day${f>1?"s":""}`}function t2(l){const r={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",r)}function a2(l){const r=new Date,c=l.getTime()-r.getTime(),o=Math.floor(c/6e4);return o>=0&&o<30}const nl=({label:l,value:r,onChange:c,helperText:o,placeholder:h="5 */3 * * *"})=>{const f=KS(r),v=f==="__custom__",N=S=>{S!=="__custom__"&&c(S)},b=S=>{c(S.target.value)},x=Qc.find(S=>S.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(ra,{label:l,value:f,onChange:N,options:Qc.map(S=>({label:S.label,value:S.value})),helperText:v?void 0:(x==null?void 0:x.description)||o}),v&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(He,{label:"Cron Expression",value:r,onChange:b,placeholder:h}),s.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[s.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",s.jsx("br",{}),s.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})};var Rs={},Ba={},Zi={},As={},Sf={},Mg;function n2(){return Mg||(Mg=1,Object.defineProperty(Sf,"__esModule",{value:!0})),Sf}var Wi={},Ii={},Cg;function Ls(){var r,c,o,h,f,Wx,N;if(Cg)return Ii;Cg=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronField=void 0;let l=(N=class{constructor(x,S={rawValue:""}){ut(this,f);ut(this,r,!1);ut(this,c,!1);ut(this,o,!1);ut(this,h,[]);X0(this,"options",{rawValue:""});if(!Array.isArray(x))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(x.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...S,rawValue:S.rawValue??""},Ee(this,h,x.sort(N.sorter)),Ee(this,o,this.options.wildcard!==void 0?this.options.wildcard:we(this,f,Wx).call(this)),Ee(this,r,this.options.rawValue.includes("L")||x.includes("L")),Ee(this,c,this.options.rawValue.includes("?")||x.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return te(this,r)}get hasQuestionMarkChar(){return te(this,c)}get isWildcard(){return te(this,o)}get values(){return te(this,h)}static sorter(x,S){const T=typeof x=="number",j=typeof S=="number";return T&&j?x-S:!T&&!j?x.localeCompare(S):T?-1:1}static findNearestValueInList(x,S,T=!1){if(T){for(let j=x.length-1;j>=0;j--)if(x[j]<S)return x[j];return null}for(let j=0;j<x.length;j++)if(x[j]>S)return x[j];return null}findNearestValue(x,S=!1){return this.constructor.findNearestValueInList(this.values,x,S)}serialize(){return{wildcard:te(this,o),values:te(this,h)}}validate(){let x;const S=this.chars.length>0?` or chars ${this.chars.join("")}`:"",T=M=>R=>new RegExp(`^\\d{0,2}${R}$`).test(M),j=M=>(x=M,typeof M=="number"?M>=this.min&&M<=this.max:this.chars.some(T(M)));if(!te(this,h).every(j))throw new Error(`${this.constructor.name} Validation error, got value ${x} expected range ${this.min}-${this.max}${S}`);const C=te(this,h).find((M,R)=>te(this,h).indexOf(M)!==R);if(C)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${C}`)}},r=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,f=new WeakSet,Wx=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(x,S)=>S+this.min).every(x=>te(this,h).includes(x))},N);return Ii.CronField=l,Ii}var Og;function l2(){if(Og)return Wi;Og=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronDayOfMonth=void 0;const l=Ls(),r=1,c=31,o=Object.freeze(["L"]);let h=class extends l.CronField{static get min(){return r}static get max(){return c}static get chars(){return o}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Wi.CronDayOfMonth=h,Wi}var Qi={},Dg;function s2(){if(Dg)return Qi;Dg=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronDayOfWeek=void 0;const l=Ls(),r=0,c=7,o=Object.freeze(["L"]);let h=class extends l.CronField{static get min(){return r}static get max(){return c}static get chars(){return o}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Qi.CronDayOfWeek=h,Qi}var Xi={},Rg;function r2(){if(Rg)return Xi;Rg=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronHour=void 0;const l=Ls(),r=0,c=23,o=Object.freeze([]);let h=class extends l.CronField{static get min(){return r}static get max(){return c}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Xi.CronHour=h,Xi}var Ji={},Ag;function i2(){if(Ag)return Ji;Ag=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronMinute=void 0;const l=Ls(),r=0,c=59,o=Object.freeze([]);let h=class extends l.CronField{static get min(){return r}static get max(){return c}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Ji.CronMinute=h,Ji}var Ki={},Nf={},Aa={},kg;function u2(){if(kg)return Aa;kg=1,Object.defineProperty(Aa,"__esModule",{value:!0});class l extends Error{}class r extends l{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class c extends l{constructor(i){super(`Invalid Interval: ${i.toMessage()}`)}}class o extends l{constructor(i){super(`Invalid Duration: ${i.toMessage()}`)}}class h extends l{}class f extends l{constructor(i){super(`Invalid unit ${i}`)}}class v extends l{}class N extends l{constructor(){super("Zone is an abstract class")}}const b="numeric",x="short",S="long",T={year:b,month:b,day:b},j={year:b,month:x,day:b},D={year:b,month:x,day:b,weekday:x},C={year:b,month:S,day:b},M={year:b,month:S,day:b,weekday:S},R={hour:b,minute:b},Q={hour:b,minute:b,second:b},Y={hour:b,minute:b,second:b,timeZoneName:x},G={hour:b,minute:b,second:b,timeZoneName:S},ee={hour:b,minute:b,hourCycle:"h23"},de={hour:b,minute:b,second:b,hourCycle:"h23"},Z={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:x},P={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:S},W={year:b,month:b,day:b,hour:b,minute:b},ne={year:b,month:b,day:b,hour:b,minute:b,second:b},z={year:b,month:x,day:b,hour:b,minute:b},I={year:b,month:x,day:b,hour:b,minute:b,second:b},_={year:b,month:x,day:b,weekday:x,hour:b,minute:b},ce={year:b,month:S,day:b,hour:b,minute:b,timeZoneName:x},he={year:b,month:S,day:b,hour:b,minute:b,second:b,timeZoneName:x},q={year:b,month:S,day:b,weekday:S,hour:b,minute:b,timeZoneName:S},$={year:b,month:S,day:b,weekday:S,hour:b,minute:b,second:b,timeZoneName:S};class ie{get type(){throw new N}get name(){throw new N}get ianaName(){return this.name}get isUniversal(){throw new N}offsetName(i,m){throw new N}formatOffset(i,m){throw new N}offset(i){throw new N}equals(i){throw new N}get isValid(){throw new N}}let ge=null;class Se extends ie{static get instance(){return ge===null&&(ge=new Se),ge}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:m,locale:p}){return zn(i,m,p)}formatOffset(i,m){return ts(this.offset(i),m)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const De=new Map;function A(g){let i=De.get(g);return i===void 0&&(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),De.set(g,i)),i}const se={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function me(g,i){const m=g.format(i).replace(/\u200E/g,""),p=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(m),[,w,O,H,L,V,fe,ve]=p;return[H,w,O,L,V,fe,ve]}function ye(g,i){const m=g.formatToParts(i),p=[];for(let w=0;w<m.length;w++){const{type:O,value:H}=m[w],L=se[O];O==="era"?p[L]=H:Oe(L)||(p[L]=parseInt(H,10))}return p}const Ce=new Map;class Te extends ie{static create(i){let m=Ce.get(i);return m===void 0&&Ce.set(i,m=new Te(i)),m}static resetCache(){Ce.clear(),De.clear()}static isValidSpecifier(i){return this.isValidZone(i)}static isValidZone(i){if(!i)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:i}).format(),!0}catch{return!1}}constructor(i){super(),this.zoneName=i,this.valid=Te.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(i,{format:m,locale:p}){return zn(i,m,p,this.name)}formatOffset(i,m){return ts(this.offset(i),m)}offset(i){if(!this.valid)return NaN;const m=new Date(i);if(isNaN(m))return NaN;const p=A(this.name);let[w,O,H,L,V,fe,ve]=p.formatToParts?ye(p,m):me(p,m);L==="BC"&&(w=-Math.abs(w)+1);const Qe=ea({year:w,month:O,day:H,hour:V===24?0:V,minute:fe,second:ve,millisecond:0});let Ae=+m;const Ct=Ae%1e3;return Ae-=Ct>=0?Ct:1e3+Ct,(Qe-Ae)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let Ve={};function Nt(g,i={}){const m=JSON.stringify([g,i]);let p=Ve[m];return p||(p=new Intl.ListFormat(g,i),Ve[m]=p),p}const at=new Map;function ia(g,i={}){const m=JSON.stringify([g,i]);let p=at.get(m);return p===void 0&&(p=new Intl.DateTimeFormat(g,i),at.set(m,p)),p}const xa=new Map;function Dn(g,i={}){const m=JSON.stringify([g,i]);let p=xa.get(m);return p===void 0&&(p=new Intl.NumberFormat(g,i),xa.set(m,p)),p}const pn=new Map;function xe(g,i={}){const{base:m,...p}=i,w=JSON.stringify([g,p]);let O=pn.get(w);return O===void 0&&(O=new Intl.RelativeTimeFormat(g,i),pn.set(w,O)),O}let _e=null;function Ot(){return _e||(_e=new Intl.DateTimeFormat().resolvedOptions().locale,_e)}const At=new Map;function ya(g){let i=At.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),At.set(g,i)),i}const ua=new Map;function an(g){let i=ua.get(g);if(!i){const m=new Intl.Locale(g);i="getWeekInfo"in m?m.getWeekInfo():m.weekInfo,"minimalDays"in i||(i={...ca,...i}),ua.set(g,i)}return i}function le(g){const i=g.indexOf("-x-");i!==-1&&(g=g.substring(0,i));const m=g.indexOf("-u-");if(m===-1)return[g];{let p,w;try{p=ia(g).resolvedOptions(),w=g}catch{const V=g.substring(0,m);p=ia(V).resolvedOptions(),w=V}const{numberingSystem:O,calendar:H}=p;return[w,O,H]}}function pe(g,i,m){return(m||i)&&(g.includes("-u-")||(g+="-u"),m&&(g+=`-ca-${m}`),i&&(g+=`-nu-${i}`)),g}function Re(g){const i=[];for(let m=1;m<=12;m++){const p=je.utc(2009,m,1);i.push(g(p))}return i}function Ue(g){const i=[];for(let m=1;m<=7;m++){const p=je.utc(2016,11,13+m);i.push(g(p))}return i}function Ge(g,i,m,p){const w=g.listingMode();return w==="error"?null:w==="en"?m(i):p(i)}function Ke(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||ya(g.locale).numberingSystem==="latn"}class kt{constructor(i,m,p){this.padTo=p.padTo||0,this.floor=p.floor||!1;const{padTo:w,floor:O,...H}=p;if(!m||Object.keys(H).length>0){const L={useGrouping:!1,...p};p.padTo>0&&(L.minimumIntegerDigits=p.padTo),this.inf=Dn(i,L)}}format(i){if(this.inf){const m=this.floor?Math.floor(i):i;return this.inf.format(m)}else{const m=this.floor?Math.floor(i):Jl(i,3);return ct(m,this.padTo)}}}class Mt{constructor(i,m,p){this.opts=p,this.originalZone=void 0;let w;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const H=-1*(i.offset/60),L=H>=0?`Etc/GMT+${H}`:`Etc/GMT${H}`;i.offset!==0&&Te.create(L).valid?(w=L,this.dt=i):(w="UTC",this.dt=i.offset===0?i:i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone)}else i.zone.type==="system"?this.dt=i:i.zone.type==="iana"?(this.dt=i,w=i.zone.name):(w="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const O={...this.opts};O.timeZone=O.timeZone||w,this.dtf=ia(m,O)}format(){return this.originalZone?this.formatToParts().map(({value:i})=>i).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const i=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?i.map(m=>{if(m.type==="timeZoneName"){const p=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...m,value:p}}else return m}):i}resolvedOptions(){return this.dtf.resolvedOptions()}}class Gt{constructor(i,m,p){this.opts={style:"long",...p},!m&&Fr()&&(this.rtf=xe(i,p))}format(i,m){return this.rtf?this.rtf.format(i,m):Nn(m,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,m){return this.rtf?this.rtf.formatToParts(i,m):[]}}const ca={firstDay:1,minimalDays:4,weekend:[6,7]};class $e{static fromOpts(i){return $e.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,m,p,w,O=!1){const H=i||pt.defaultLocale,L=H||(O?"en-US":Ot()),V=m||pt.defaultNumberingSystem,fe=p||pt.defaultOutputCalendar,ve=Gr(w)||pt.defaultWeekSettings;return new $e(L,V,fe,ve,H)}static resetCache(){_e=null,at.clear(),xa.clear(),pn.clear(),At.clear(),ua.clear()}static fromObject({locale:i,numberingSystem:m,outputCalendar:p,weekSettings:w}={}){return $e.create(i,m,p,w)}constructor(i,m,p,w,O){const[H,L,V]=le(i);this.locale=H,this.numberingSystem=m||L||null,this.outputCalendar=p||V||null,this.weekSettings=w,this.intl=pe(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=O,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ke(this)),this.fastNumbersCached}listingMode(){const i=this.isEnglish(),m=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return i&&m?"en":"intl"}clone(i){return!i||Object.getOwnPropertyNames(i).length===0?this:$e.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,Gr(i.weekSettings)||this.weekSettings,i.defaultToEN||!1)}redefaultToEN(i={}){return this.clone({...i,defaultToEN:!0})}redefaultToSystem(i={}){return this.clone({...i,defaultToEN:!1})}months(i,m=!1){return Ge(this,i,bu,()=>{const p=this.intl==="ja"||this.intl.startsWith("ja-");m&=!p;const w=m?{month:i,day:"numeric"}:{month:i},O=m?"format":"standalone";if(!this.monthsCache[O][i]){const H=p?L=>this.dtFormatter(L,w).format():L=>this.extract(L,w,"month");this.monthsCache[O][i]=Re(H)}return this.monthsCache[O][i]})}weekdays(i,m=!1){return Ge(this,i,Qs,()=>{const p=m?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},w=m?"format":"standalone";return this.weekdaysCache[w][i]||(this.weekdaysCache[w][i]=Ue(O=>this.extract(O,p,"weekday"))),this.weekdaysCache[w][i]})}meridiems(){return Ge(this,void 0,()=>Un,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[je.utc(2016,11,13,9),je.utc(2016,11,13,19)].map(m=>this.extract(m,i,"dayperiod"))}return this.meridiemCache})}eras(i){return Ge(this,i,Qr,()=>{const m={era:i};return this.eraCache[i]||(this.eraCache[i]=[je.utc(-40,1,1),je.utc(2017,1,1)].map(p=>this.extract(p,m,"era"))),this.eraCache[i]})}extract(i,m,p){const w=this.dtFormatter(i,m),O=w.formatToParts(),H=O.find(L=>L.type.toLowerCase()===p);return H?H.value:null}numberFormatter(i={}){return new kt(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,m={}){return new Mt(i,this.intl,m)}relFormatter(i={}){return new Gt(this.intl,this.isEnglish(),i)}listFormatter(i={}){return Nt(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||ya(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:bn()?an(this.locale):ca}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(i){return this.locale===i.locale&&this.numberingSystem===i.numberingSystem&&this.outputCalendar===i.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let ba=null;class rt extends ie{static get utcInstance(){return ba===null&&(ba=new rt(0)),ba}static instance(i){return i===0?rt.utcInstance:new rt(i)}static parseSpecifier(i){if(i){const m=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(m)return new rt(es(m[1],m[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ts(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ts(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,m){return ts(this.fixed,m)}get isUniversal(){return!0}offset(){return this.fixed}equals(i){return i.type==="fixed"&&i.fixed===this.fixed}get isValid(){return!0}}class yt extends ie{constructor(i){super(),this.zoneName=i}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function wt(g,i){if(Oe(g)||g===null)return i;if(g instanceof ie)return g;if(Bt(g)){const m=g.toLowerCase();return m==="default"?i:m==="local"||m==="system"?Se.instance:m==="utc"||m==="gmt"?rt.utcInstance:rt.parseSpecifier(m)||Te.create(g)}else return Na(g)?rt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new yt(g)}const jt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Rn={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]},Bs=jt.hanidec.replace(/[\[|\]]/g,"").split("");function so(g){let i=parseInt(g,10);if(isNaN(i)){i="";for(let m=0;m<g.length;m++){const p=g.charCodeAt(m);if(g[m].search(jt.hanidec)!==-1)i+=Bs.indexOf(g[m]);else for(const w in Rn){const[O,H]=Rn[w];p>=O&&p<=H&&(i+=p-O)}}return parseInt(i,10)}else return i}const il=new Map;function Vs(){il.clear()}function oa({numberingSystem:g},i=""){const m=g||"latn";let p=il.get(m);p===void 0&&(p=new Map,il.set(m,p));let w=p.get(i);return w===void 0&&(w=new RegExp(`${jt[m]}${i}`),p.set(i,w)),w}let vn=()=>Date.now(),Il="system",ul=null,du=null,Vr=null,Ys=60,cl,fu=null;class pt{static get now(){return vn}static set now(i){vn=i}static set defaultZone(i){Il=i}static get defaultZone(){return wt(Il,Se.instance)}static get defaultLocale(){return ul}static set defaultLocale(i){ul=i}static get defaultNumberingSystem(){return du}static set defaultNumberingSystem(i){du=i}static get defaultOutputCalendar(){return Vr}static set defaultOutputCalendar(i){Vr=i}static get defaultWeekSettings(){return fu}static set defaultWeekSettings(i){fu=Gr(i)}static get twoDigitCutoffYear(){return Ys}static set twoDigitCutoffYear(i){Ys=i%100}static get throwOnInvalid(){return cl}static set throwOnInvalid(i){cl=i}static resetCaches(){$e.resetCache(),Te.resetCache(),je.resetCache(),Vs()}}class Sa{constructor(i,m){this.reason=i,this.explanation=m}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Yr=[0,31,59,90,120,151,181,212,243,273,304,334],$s=[0,31,60,91,121,152,182,213,244,274,305,335];function da(g,i){return new Sa("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function Fs(g,i,m){const p=new Date(Date.UTC(g,i-1,m));g<100&&g>=0&&p.setUTCFullYear(p.getUTCFullYear()-1900);const w=p.getUTCDay();return w===0?7:w}function $r(g,i,m){return m+(dl(g)?$s:Yr)[i-1]}function nn(g,i){const m=dl(g)?$s:Yr,p=m.findIndex(O=>O<i),w=i-m[p];return{month:p+1,day:w}}function _t(g,i){return(g-i+7)%7+1}function Pt(g,i=4,m=1){const{year:p,month:w,day:O}=g,H=$r(p,w,O),L=_t(Fs(p,w,O),m);let V=Math.floor((H-L+14-i)/7),fe;return V<1?(fe=p-1,V=fl(fe,i,m)):V>fl(p,i,m)?(fe=p+1,V=1):fe=p,{weekYear:fe,weekNumber:V,weekday:L,...as(g)}}function An(g,i=4,m=1){const{weekYear:p,weekNumber:w,weekday:O}=g,H=_t(Fs(p,1,i),m),L=sn(p);let V=w*7+O-H-7+i,fe;V<1?(fe=p-1,V+=sn(fe)):V>L?(fe=p+1,V-=sn(p)):fe=p;const{month:ve,day:Le}=nn(fe,V);return{year:fe,month:ve,day:Le,...as(g)}}function Ql(g){const{year:i,month:m,day:p}=g,w=$r(i,m,p);return{year:i,ordinal:w,...as(g)}}function hu(g){const{year:i,ordinal:m}=g,{month:p,day:w}=nn(i,m);return{year:i,month:p,day:w,...as(g)}}function mu(g,i){if(!Oe(g.localWeekday)||!Oe(g.localWeekNumber)||!Oe(g.localWeekYear)){if(!Oe(g.weekday)||!Oe(g.weekNumber)||!Oe(g.weekYear))throw new h("Cannot mix locale-based week fields with ISO-based week fields");return Oe(g.localWeekday)||(g.weekday=g.localWeekday),Oe(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),Oe(g.localWeekYear)||(g.weekYear=g.localWeekYear),delete g.localWeekday,delete g.localWeekNumber,delete g.localWeekYear,{minDaysInFirstWeek:i.getMinDaysInFirstWeek(),startOfWeek:i.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function gu(g,i=4,m=1){const p=ln(g.weekYear),w=Kt(g.weekNumber,1,fl(g.weekYear,i,m)),O=Kt(g.weekday,1,7);return p?w?O?!1:da("weekday",g.weekday):da("week",g.weekNumber):da("weekYear",g.weekYear)}function Xl(g){const i=ln(g.year),m=Kt(g.ordinal,1,sn(g.year));return i?m?!1:da("ordinal",g.ordinal):da("year",g.year)}function Gs(g){const i=ln(g.year),m=Kt(g.month,1,12),p=Kt(g.day,1,Zs(g.year,g.month));return i?m?p?!1:da("day",g.day):da("month",g.month):da("year",g.year)}function kn(g){const{hour:i,minute:m,second:p,millisecond:w}=g,O=Kt(i,0,23)||i===24&&m===0&&p===0&&w===0,H=Kt(m,0,59),L=Kt(p,0,59),V=Kt(w,0,999);return O?H?L?V?!1:da("millisecond",w):da("second",p):da("minute",m):da("hour",i)}function Oe(g){return typeof g>"u"}function Na(g){return typeof g=="number"}function ln(g){return typeof g=="number"&&g%1===0}function Bt(g){return typeof g=="string"}function xu(g){return Object.prototype.toString.call(g)==="[object Date]"}function Fr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function bn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ol(g){return Array.isArray(g)?g:[g]}function yu(g,i,m){if(g.length!==0)return g.reduce((p,w)=>{const O=[i(w),w];return p&&m(p[0],O[0])===p[0]?p:O},null)[1]}function pu(g,i){return i.reduce((m,p)=>(m[p]=g[p],m),{})}function _n(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function Gr(g){if(g==null)return null;if(typeof g!="object")throw new v("Week settings must be an object");if(!Kt(g.firstDay,1,7)||!Kt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Kt(i,1,7)))throw new v("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Kt(g,i,m){return ln(g)&&g>=i&&g<=m}function Ps(g,i){return g-i*Math.floor(g/i)}function ct(g,i=2){const m=g<0;let p;return m?p="-"+(""+-g).padStart(i,"0"):p=(""+g).padStart(i,"0"),p}function zt(g){if(!(Oe(g)||g===null||g===""))return parseInt(g,10)}function Sn(g){if(!(Oe(g)||g===null||g===""))return parseFloat(g)}function Pr(g){if(!(Oe(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function Jl(g,i,m="round"){const p=10**i;switch(m){case"expand":return g>0?Math.ceil(g*p)/p:Math.floor(g*p)/p;case"trunc":return Math.trunc(g*p)/p;case"round":return Math.round(g*p)/p;case"floor":return Math.floor(g*p)/p;case"ceil":return Math.ceil(g*p)/p;default:throw new RangeError(`Value rounding ${m} is out of range`)}}function dl(g){return g%4===0&&(g%100!==0||g%400===0)}function sn(g){return dl(g)?366:365}function Zs(g,i){const m=Ps(i-1,12)+1,p=g+(i-m)/12;return m===2?dl(p)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][m-1]}function ea(g){let i=Date.UTC(g.year,g.month-1,g.day,g.hour,g.minute,g.second,g.millisecond);return g.year<100&&g.year>=0&&(i=new Date(i),i.setUTCFullYear(g.year,g.month-1,g.day)),+i}function Ws(g,i,m){return-_t(Fs(g,1,i),m)+i-1}function fl(g,i=4,m=1){const p=Ws(g,i,m),w=Ws(g+1,i,m);return(sn(g)-p+w)/7}function Kl(g){return g>99?g:g>pt.twoDigitCutoffYear?1900+g:2e3+g}function zn(g,i,m,p=null){const w=new Date(g),O={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};p&&(O.timeZone=p);const H={timeZoneName:i,...O},L=new Intl.DateTimeFormat(m,H).formatToParts(w).find(V=>V.type.toLowerCase()==="timezonename");return L?L.value:null}function es(g,i){let m=parseInt(g,10);Number.isNaN(m)&&(m=0);const p=parseInt(i,10)||0,w=m<0||Object.is(m,-0)?-p:p;return m*60+w}function Zr(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new v(`Invalid unit value ${g}`);return i}function rn(g,i){const m={};for(const p in g)if(_n(g,p)){const w=g[p];if(w==null)continue;m[i(p)]=Zr(w)}return m}function ts(g,i){const m=Math.trunc(Math.abs(g/60)),p=Math.trunc(Math.abs(g%60)),w=g>=0?"+":"-";switch(i){case"short":return`${w}${ct(m,2)}:${ct(p,2)}`;case"narrow":return`${w}${m}${p>0?`:${p}`:""}`;case"techie":return`${w}${ct(m,2)}${ct(p,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function as(g){return pu(g,["hour","minute","second","millisecond"])}const vu=["January","February","March","April","May","June","July","August","September","October","November","December"],Is=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ro=["J","F","M","A","M","J","J","A","S","O","N","D"];function bu(g){switch(g){case"narrow":return[...ro];case"short":return[...Is];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 ns=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],$a=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Wr=["M","T","W","T","F","S","S"];function Qs(g){switch(g){case"narrow":return[...Wr];case"short":return[...$a];case"long":return[...ns];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Un=["AM","PM"],hl=["Before Christ","Anno Domini"],Su=["BC","AD"],Ir=["B","A"];function Qr(g){switch(g){case"narrow":return[...Ir];case"short":return[...Su];case"long":return[...hl];default:return null}}function ls(g){return Un[g.hour<12?0:1]}function un(g,i){return Qs(i)[g.weekday-1]}function Xr(g,i){return bu(i)[g.month-1]}function ss(g,i){return Qr(i)[g.year<0?0:1]}function Nn(g,i,m="always",p=!1){const w={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},O=["hours","minutes","seconds"].indexOf(g)===-1;if(m==="auto"&&O){const Le=g==="days";switch(i){case 1:return Le?"tomorrow":`next ${w[g][0]}`;case-1:return Le?"yesterday":`last ${w[g][0]}`;case 0:return Le?"today":`this ${w[g][0]}`}}const H=Object.is(i,-0)||i<0,L=Math.abs(i),V=L===1,fe=w[g],ve=p?V?fe[1]:fe[2]||fe[1]:V?w[g][0]:g;return H?`${L} ${ve} ago`:`in ${L} ${ve}`}function Xs(g,i){let m="";for(const p of g)p.literal?m+=p.val:m+=i(p.val);return m}const Js={D:T,DD:j,DDD:C,DDDD:M,t:R,tt:Q,ttt:Y,tttt:G,T:ee,TT:de,TTT:Z,TTTT:P,f:W,ff:z,fff:ce,ffff:q,F:ne,FF:I,FFF:he,FFFF:$};class Zt{static create(i,m={}){return new Zt(i,m)}static parseFormat(i){let m=null,p="",w=!1;const O=[];for(let H=0;H<i.length;H++){const L=i.charAt(H);L==="'"?((p.length>0||w)&&O.push({literal:w||/^\s+$/.test(p),val:p===""?"'":p}),m=null,p="",w=!w):w||L===m?p+=L:(p.length>0&&O.push({literal:/^\s+$/.test(p),val:p}),p=L,m=L)}return p.length>0&&O.push({literal:w||/^\s+$/.test(p),val:p}),O}static macroTokenToFormatOpts(i){return Js[i]}constructor(i,m){this.opts=m,this.loc=i,this.systemLoc=null}formatWithSystemDefault(i,m){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(i,{...this.opts,...m}).format()}dtFormatter(i,m={}){return this.loc.dtFormatter(i,{...this.opts,...m})}formatDateTime(i,m){return this.dtFormatter(i,m).format()}formatDateTimeParts(i,m){return this.dtFormatter(i,m).formatToParts()}formatInterval(i,m){return this.dtFormatter(i.start,m).dtf.formatRange(i.start.toJSDate(),i.end.toJSDate())}resolvedOptions(i,m){return this.dtFormatter(i,m).resolvedOptions()}num(i,m=0,p=void 0){if(this.opts.forceSimple)return ct(i,m);const w={...this.opts};return m>0&&(w.padTo=m),p&&(w.signDisplay=p),this.loc.numberFormatter(w).format(i)}formatDateTimeFromString(i,m){const p=this.loc.listingMode()==="en",w=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",O=(Ae,Ct)=>this.loc.extract(i,Ae,Ct),H=Ae=>i.isOffsetFixed&&i.offset===0&&Ae.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,Ae.format):"",L=()=>p?ls(i):O({hour:"numeric",hourCycle:"h12"},"dayperiod"),V=(Ae,Ct)=>p?Xr(i,Ae):O(Ct?{month:Ae}:{month:Ae,day:"numeric"},"month"),fe=(Ae,Ct)=>p?un(i,Ae):O(Ct?{weekday:Ae}:{weekday:Ae,month:"long",day:"numeric"},"weekday"),ve=Ae=>{const Ct=Zt.macroTokenToFormatOpts(Ae);return Ct?this.formatWithSystemDefault(i,Ct):Ae},Le=Ae=>p?ss(i,Ae):O({era:Ae},"era"),Qe=Ae=>{switch(Ae){case"S":return this.num(i.millisecond);case"u":case"SSS":return this.num(i.millisecond,3);case"s":return this.num(i.second);case"ss":return this.num(i.second,2);case"uu":return this.num(Math.floor(i.millisecond/10),2);case"uuu":return this.num(Math.floor(i.millisecond/100));case"m":return this.num(i.minute);case"mm":return this.num(i.minute,2);case"h":return this.num(i.hour%12===0?12:i.hour%12);case"hh":return this.num(i.hour%12===0?12:i.hour%12,2);case"H":return this.num(i.hour);case"HH":return this.num(i.hour,2);case"Z":return H({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return H({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return H({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return i.zone.offsetName(i.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return i.zone.offsetName(i.ts,{format:"long",locale:this.loc.locale});case"z":return i.zoneName;case"a":return L();case"d":return w?O({day:"numeric"},"day"):this.num(i.day);case"dd":return w?O({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return fe("short",!0);case"cccc":return fe("long",!0);case"ccccc":return fe("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return fe("short",!1);case"EEEE":return fe("long",!1);case"EEEEE":return fe("narrow",!1);case"L":return w?O({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return w?O({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return V("short",!0);case"LLLL":return V("long",!0);case"LLLLL":return V("narrow",!0);case"M":return w?O({month:"numeric"},"month"):this.num(i.month);case"MM":return w?O({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return V("short",!1);case"MMMM":return V("long",!1);case"MMMMM":return V("narrow",!1);case"y":return w?O({year:"numeric"},"year"):this.num(i.year);case"yy":return w?O({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return w?O({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return w?O({year:"numeric"},"year"):this.num(i.year,6);case"G":return Le("short");case"GG":return Le("long");case"GGGGG":return Le("narrow");case"kk":return this.num(i.weekYear.toString().slice(-2),2);case"kkkk":return this.num(i.weekYear,4);case"W":return this.num(i.weekNumber);case"WW":return this.num(i.weekNumber,2);case"n":return this.num(i.localWeekNumber);case"nn":return this.num(i.localWeekNumber,2);case"ii":return this.num(i.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(i.localWeekYear,4);case"o":return this.num(i.ordinal);case"ooo":return this.num(i.ordinal,3);case"q":return this.num(i.quarter);case"qq":return this.num(i.quarter,2);case"X":return this.num(Math.floor(i.ts/1e3));case"x":return this.num(i.ts);default:return ve(Ae)}};return Xs(Zt.parseFormat(m),Qe)}formatDurationFromString(i,m){const p=this.opts.signMode==="negativeLargestOnly"?-1:1,w=ve=>{switch(ve[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},O=(ve,Le)=>Qe=>{const Ae=w(Qe);if(Ae){const Ct=Le.isNegativeDuration&&Ae!==Le.largestUnit?p:1;let It;return this.opts.signMode==="negativeLargestOnly"&&Ae!==Le.largestUnit?It="never":this.opts.signMode==="all"?It="always":It="auto",this.num(ve.get(Ae)*Ct,Qe.length,It)}else return Qe},H=Zt.parseFormat(m),L=H.reduce((ve,{literal:Le,val:Qe})=>Le?ve:ve.concat(Qe),[]),V=i.shiftTo(...L.map(w).filter(ve=>ve)),fe={isNegativeDuration:V<0,largestUnit:Object.keys(V.values)[0]};return Xs(H,O(V,fe))}}const rs=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function cn(...g){const i=g.reduce((m,p)=>m+p.source,"");return RegExp(`^${i}$`)}function qn(...g){return i=>g.reduce(([m,p,w],O)=>{const[H,L,V]=O(i,w);return[{...m,...H},L||p,V]},[{},null,1]).slice(0,2)}function Ut(g,...i){if(g==null)return[null,null];for(const[m,p]of i){const w=m.exec(g);if(w)return p(w)}return[null,null]}function wn(...g){return(i,m)=>{const p={};let w;for(w=0;w<g.length;w++)p[g[w]]=zt(i[m+w]);return[p,null,m+w]}}const is=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,us=`(?:${is.source}?(?:\\[(${rs.source})\\])?)?`,Jr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ks=RegExp(`${Jr.source}${us}`),cs=RegExp(`(?:[Tt]${Ks.source})?`),os=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,er=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Nu=/(\d{4})-?(\d{3})/,io=wn("weekYear","weekNumber","weekDay"),uo=wn("year","ordinal"),co=/(\d{4})-(\d\d)-(\d\d)/,tr=RegExp(`${Jr.source} ?(?:${is.source}|(${rs.source}))?`),oo=RegExp(`(?: ${tr.source})?`);function ml(g,i,m){const p=g[i];return Oe(p)?m:zt(p)}function fo(g,i){return[{year:ml(g,i),month:ml(g,i+1,1),day:ml(g,i+2,1)},null,i+3]}function gl(g,i){return[{hours:ml(g,i,0),minutes:ml(g,i+1,0),seconds:ml(g,i+2,0),milliseconds:Pr(g[i+3])},null,i+4]}function ds(g,i){const m=!g[i]&&!g[i+1],p=es(g[i+1],g[i+2]),w=m?null:rt.instance(p);return[{},w,i+3]}function xl(g,i){const m=g[i]?Te.create(g[i]):null;return[{},m,i+1]}const ho=RegExp(`^T?${Jr.source}$`),mo=/^-?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 go(g){const[i,m,p,w,O,H,L,V,fe]=g,ve=i[0]==="-",Le=V&&V[0]==="-",Qe=(Ae,Ct=!1)=>Ae!==void 0&&(Ct||Ae&&ve)?-Ae:Ae;return[{years:Qe(Sn(m)),months:Qe(Sn(p)),weeks:Qe(Sn(w)),days:Qe(Sn(O)),hours:Qe(Sn(H)),minutes:Qe(Sn(L)),seconds:Qe(Sn(V),V==="-0"),milliseconds:Qe(Pr(fe),Le)}]}const xo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fs(g,i,m,p,w,O,H){const L={year:i.length===2?Kl(zt(i)):zt(i),month:Is.indexOf(m)+1,day:zt(p),hour:zt(w),minute:zt(O)};return H&&(L.second=zt(H)),g&&(L.weekday=g.length>3?ns.indexOf(g)+1:$a.indexOf(g)+1),L}const yo=/^(?:(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 po(g){const[,i,m,p,w,O,H,L,V,fe,ve,Le]=g,Qe=fs(i,w,p,m,O,H,L);let Ae;return V?Ae=xo[V]:fe?Ae=0:Ae=es(ve,Le),[Qe,new rt(Ae)]}function vo(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const wu=/^(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$/,bo=/^(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$/,So=/^(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 ju(g){const[,i,m,p,w,O,H,L]=g;return[fs(i,w,p,m,O,H,L),rt.utcInstance]}function No(g){const[,i,m,p,w,O,H,L]=g;return[fs(i,L,m,p,w,O,H),rt.utcInstance]}const wo=cn(os,cs),jo=cn(er,cs),Eo=cn(Nu,cs),To=cn(Ks),Eu=qn(fo,gl,ds,xl),Kr=qn(io,gl,ds,xl),hs=qn(uo,gl,ds,xl),Mo=qn(gl,ds,xl);function Tu(g){return Ut(g,[wo,Eu],[jo,Kr],[Eo,hs],[To,Mo])}function Mu(g){return Ut(vo(g),[yo,po])}function Cu(g){return Ut(g,[wu,ju],[bo,ju],[So,No])}function Ou(g){return Ut(g,[mo,go])}const Du=qn(gl);function yl(g){return Ut(g,[ho,Du])}const Co=cn(co,oo),Oo=cn(tr),Do=qn(gl,ds,xl);function Ru(g){return Ut(g,[Co,Eu],[Oo,Do])}const ei="Invalid Duration",pl={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}},ms={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},...pl},wa=146097/400,on=146097/4800,Au={years:{quarters:4,months:12,weeks:wa/7,days:wa,hours:wa*24,minutes:wa*24*60,seconds:wa*24*60*60,milliseconds:wa*24*60*60*1e3},quarters:{months:3,weeks:wa/28,days:wa/4,hours:wa*24/4,minutes:wa*24*60/4,seconds:wa*24*60*60/4,milliseconds:wa*24*60*60*1e3/4},months:{weeks:on/7,days:on,hours:on*24,minutes:on*24*60,seconds:on*24*60*60,milliseconds:on*24*60*60*1e3},...pl},jn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ti=jn.slice(0).reverse();function ka(g,i,m=!1){const p={values:m?i.values:{...g.values,...i.values||{}},loc:g.loc.clone(i.loc),conversionAccuracy:i.conversionAccuracy||g.conversionAccuracy,matrix:i.matrix||g.matrix};return new Ie(p)}function ai(g,i){var m;let p=(m=i.milliseconds)!=null?m:0;for(const w of ti.slice(1))i[w]&&(p+=i[w]*g[w].milliseconds);return p}function ni(g,i){const m=ai(g,i)<0?-1:1;jn.reduceRight((p,w)=>{if(Oe(i[w]))return p;if(p){const O=i[p]*m,H=g[w][p],L=Math.floor(O/H);i[w]+=L*m,i[p]-=L*H*m}return w},null),jn.reduce((p,w)=>{if(Oe(i[w]))return p;if(p){const O=i[p]%1;i[p]-=O,i[w]+=O*g[p][w]}return w},null)}function li(g){const i={};for(const[m,p]of Object.entries(g))p!==0&&(i[m]=p);return i}class Ie{constructor(i){const m=i.conversionAccuracy==="longterm"||!1;let p=m?Au:ms;i.matrix&&(p=i.matrix),this.values=i.values,this.loc=i.loc||$e.create(),this.conversionAccuracy=m?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=p,this.isLuxonDuration=!0}static fromMillis(i,m){return Ie.fromObject({milliseconds:i},m)}static fromObject(i,m={}){if(i==null||typeof i!="object")throw new v(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new Ie({values:rn(i,Ie.normalizeUnit),loc:$e.fromObject(m),conversionAccuracy:m.conversionAccuracy,matrix:m.matrix})}static fromDurationLike(i){if(Na(i))return Ie.fromMillis(i);if(Ie.isDuration(i))return i;if(typeof i=="object")return Ie.fromObject(i);throw new v(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,m){const[p]=Ou(i);return p?Ie.fromObject(p,m):Ie.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,m){const[p]=yl(i);return p?Ie.fromObject(p,m):Ie.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,m=null){if(!i)throw new v("need to specify a reason the Duration is invalid");const p=i instanceof Sa?i:new Sa(i,m);if(pt.throwOnInvalid)throw new o(p);return new Ie({invalid:p})}static normalizeUnit(i){const m={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[i&&i.toLowerCase()];if(!m)throw new f(i);return m}static isDuration(i){return i&&i.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(i,m={}){const p={...m,floor:m.round!==!1&&m.floor!==!1};return this.isValid?Zt.create(this.loc,p).formatDurationFromString(this,i):ei}toHuman(i={}){if(!this.isValid)return ei;const m=i.showZeros!==!1,p=jn.map(w=>{const O=this.values[w];return Oe(O)||O===0&&!m?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:w.slice(0,-1)}).format(O)}).filter(w=>w);return this.loc.listFormatter({type:"conjunction",style:i.listStyle||"narrow",...i}).format(p)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let i="P";return this.years!==0&&(i+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(i+=this.months+this.quarters*3+"M"),this.weeks!==0&&(i+=this.weeks+"W"),this.days!==0&&(i+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(i+="T"),this.hours!==0&&(i+=this.hours+"H"),this.minutes!==0&&(i+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(i+=Jl(this.seconds+this.milliseconds/1e3,3)+"S"),i==="P"&&(i+="T0S"),i}toISOTime(i={}){if(!this.isValid)return null;const m=this.toMillis();return m<0||m>=864e5?null:(i={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...i,includeOffset:!1},je.fromMillis(m,{zone:"UTC"}).toISOTime(i))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ai(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const m=Ie.fromDurationLike(i),p={};for(const w of jn)(_n(m.values,w)||_n(this.values,w))&&(p[w]=m.get(w)+this.get(w));return ka(this,{values:p},!0)}minus(i){if(!this.isValid)return this;const m=Ie.fromDurationLike(i);return this.plus(m.negate())}mapUnits(i){if(!this.isValid)return this;const m={};for(const p of Object.keys(this.values))m[p]=Zr(i(this.values[p],p));return ka(this,{values:m},!0)}get(i){return this[Ie.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const m={...this.values,...rn(i,Ie.normalizeUnit)};return ka(this,{values:m})}reconfigure({locale:i,numberingSystem:m,conversionAccuracy:p,matrix:w}={}){const H={loc:this.loc.clone({locale:i,numberingSystem:m}),matrix:w,conversionAccuracy:p};return ka(this,H)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return ni(this.matrix,i),ka(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=li(this.normalize().shiftToAll().toObject());return ka(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(H=>Ie.normalizeUnit(H));const m={},p={},w=this.toObject();let O;for(const H of jn)if(i.indexOf(H)>=0){O=H;let L=0;for(const fe in p)L+=this.matrix[fe][H]*p[fe],p[fe]=0;Na(w[H])&&(L+=w[H]);const V=Math.trunc(L);m[H]=V,p[H]=(L*1e3-V*1e3)/1e3}else Na(w[H])&&(p[H]=w[H]);for(const H in p)p[H]!==0&&(m[O]+=H===O?p[H]:p[H]/this.matrix[O][H]);return ni(this.matrix,m),ka(this,{values:m},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const i={};for(const m of Object.keys(this.values))i[m]=this.values[m]===0?0:-this.values[m];return ka(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=li(this.values);return ka(this,{values:i},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(i){if(!this.isValid||!i.isValid||!this.loc.equals(i.loc))return!1;function m(p,w){return p===void 0||p===0?w===void 0||w===0:p===w}for(const p of jn)if(!m(this.values[p],i.values[p]))return!1;return!0}}const vl="Invalid Interval";function Ro(g,i){return!g||!g.isValid?bt.invalid("missing or invalid start"):!i||!i.isValid?bt.invalid("missing or invalid end"):i<g?bt.invalid("end before start",`The end of an interval must be after its start, but you had start=${g.toISO()} and end=${i.toISO()}`):null}class bt{constructor(i){this.s=i.start,this.e=i.end,this.invalid=i.invalid||null,this.isLuxonInterval=!0}static invalid(i,m=null){if(!i)throw new v("need to specify a reason the Interval is invalid");const p=i instanceof Sa?i:new Sa(i,m);if(pt.throwOnInvalid)throw new c(p);return new bt({invalid:p})}static fromDateTimes(i,m){const p=Ta(i),w=Ta(m),O=Ro(p,w);return O??new bt({start:p,end:w})}static after(i,m){const p=Ie.fromDurationLike(m),w=Ta(i);return bt.fromDateTimes(w,w.plus(p))}static before(i,m){const p=Ie.fromDurationLike(m),w=Ta(i);return bt.fromDateTimes(w.minus(p),w)}static fromISO(i,m){const[p,w]=(i||"").split("/",2);if(p&&w){let O,H;try{O=je.fromISO(p,m),H=O.isValid}catch{H=!1}let L,V;try{L=je.fromISO(w,m),V=L.isValid}catch{V=!1}if(H&&V)return bt.fromDateTimes(O,L);if(H){const fe=Ie.fromISO(w,m);if(fe.isValid)return bt.after(O,fe)}else if(V){const fe=Ie.fromISO(p,m);if(fe.isValid)return bt.before(L,fe)}}return bt.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static isInterval(i){return i&&i.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(i="milliseconds"){return this.isValid?this.toDuration(i).get(i):NaN}count(i="milliseconds",m){if(!this.isValid)return NaN;const p=this.start.startOf(i,m);let w;return m!=null&&m.useLocaleWeeks?w=this.end.reconfigure({locale:p.locale}):w=this.end,w=w.startOf(i,m),Math.floor(w.diff(p,i).get(i))+(w.valueOf()!==this.end.valueOf())}hasSame(i){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,i):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(i){return this.isValid?this.s>i:!1}isBefore(i){return this.isValid?this.e<=i:!1}contains(i){return this.isValid?this.s<=i&&this.e>i:!1}set({start:i,end:m}={}){return this.isValid?bt.fromDateTimes(i||this.s,m||this.e):this}splitAt(...i){if(!this.isValid)return[];const m=i.map(Ta).filter(H=>this.contains(H)).sort((H,L)=>H.toMillis()-L.toMillis()),p=[];let{s:w}=this,O=0;for(;w<this.e;){const H=m[O]||this.e,L=+H>+this.e?this.e:H;p.push(bt.fromDateTimes(w,L)),w=L,O+=1}return p}splitBy(i){const m=Ie.fromDurationLike(i);if(!this.isValid||!m.isValid||m.as("milliseconds")===0)return[];let{s:p}=this,w=1,O;const H=[];for(;p<this.e;){const L=this.start.plus(m.mapUnits(V=>V*w));O=+L>+this.e?this.e:L,H.push(bt.fromDateTimes(p,O)),p=O,w+=1}return H}divideEqually(i){return this.isValid?this.splitBy(this.length()/i).slice(0,i):[]}overlaps(i){return this.e>i.s&&this.s<i.e}abutsStart(i){return this.isValid?+this.e==+i.s:!1}abutsEnd(i){return this.isValid?+i.e==+this.s:!1}engulfs(i){return this.isValid?this.s<=i.s&&this.e>=i.e:!1}equals(i){return!this.isValid||!i.isValid?!1:this.s.equals(i.s)&&this.e.equals(i.e)}intersection(i){if(!this.isValid)return this;const m=this.s>i.s?this.s:i.s,p=this.e<i.e?this.e:i.e;return m>=p?null:bt.fromDateTimes(m,p)}union(i){if(!this.isValid)return this;const m=this.s<i.s?this.s:i.s,p=this.e>i.e?this.e:i.e;return bt.fromDateTimes(m,p)}static merge(i){const[m,p]=i.sort((w,O)=>w.s-O.s).reduce(([w,O],H)=>O?O.overlaps(H)||O.abutsStart(H)?[w,O.union(H)]:[w.concat([O]),H]:[w,H],[[],null]);return p&&m.push(p),m}static xor(i){let m=null,p=0;const w=[],O=i.map(V=>[{time:V.s,type:"s"},{time:V.e,type:"e"}]),H=Array.prototype.concat(...O),L=H.sort((V,fe)=>V.time-fe.time);for(const V of L)p+=V.type==="s"?1:-1,p===1?m=V.time:(m&&+m!=+V.time&&w.push(bt.fromDateTimes(m,V.time)),m=null);return bt.merge(w)}difference(...i){return bt.xor([this].concat(i)).map(m=>this.intersection(m)).filter(m=>m&&!m.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:vl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(i=T,m={}){return this.isValid?Zt.create(this.s.loc.clone(m),i).formatInterval(this):vl}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:vl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:vl}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:vl}toFormat(i,{separator:m=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${m}${this.e.toFormat(i)}`:vl}toDuration(i,m){return this.isValid?this.e.diff(this.s,i,m):Ie.invalid(this.invalidReason)}mapEndpoints(i){return bt.fromDateTimes(i(this.s),i(this.e))}}class gs{static hasDST(i=pt.defaultZone){const m=je.now().setZone(i).set({month:12});return!i.isUniversal&&m.offset!==m.set({month:6}).offset}static isValidIANAZone(i){return Te.isValidZone(i)}static normalizeZone(i){return wt(i,pt.defaultZone)}static getStartOfWeek({locale:i=null,locObj:m=null}={}){return(m||$e.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:m=null}={}){return(m||$e.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:m=null}={}){return(m||$e.create(i)).getWeekendDays().slice()}static months(i="long",{locale:m=null,numberingSystem:p=null,locObj:w=null,outputCalendar:O="gregory"}={}){return(w||$e.create(m,p,O)).months(i)}static monthsFormat(i="long",{locale:m=null,numberingSystem:p=null,locObj:w=null,outputCalendar:O="gregory"}={}){return(w||$e.create(m,p,O)).months(i,!0)}static weekdays(i="long",{locale:m=null,numberingSystem:p=null,locObj:w=null}={}){return(w||$e.create(m,p,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:m=null,numberingSystem:p=null,locObj:w=null}={}){return(w||$e.create(m,p,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return $e.create(i).meridiems()}static eras(i="short",{locale:m=null}={}){return $e.create(m,null,"gregory").eras(i)}static features(){return{relative:Fr(),localeWeek:bn()}}}function fa(g,i){const m=w=>w.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),p=m(i)-m(g);return Math.floor(Ie.fromMillis(p).as("days"))}function xs(g,i,m){const p=[["years",(V,fe)=>fe.year-V.year],["quarters",(V,fe)=>fe.quarter-V.quarter+(fe.year-V.year)*4],["months",(V,fe)=>fe.month-V.month+(fe.year-V.year)*12],["weeks",(V,fe)=>{const ve=fa(V,fe);return(ve-ve%7)/7}],["days",fa]],w={},O=g;let H,L;for(const[V,fe]of p)m.indexOf(V)>=0&&(H=V,w[V]=fe(g,i),L=O.plus(w),L>i?(w[V]--,g=O.plus(w),g>i&&(L=g,w[V]--,g=O.plus(w))):g=L);return[g,w,L,H]}function ku(g,i,m,p){let[w,O,H,L]=xs(g,i,m);const V=i-w,fe=m.filter(Le=>["hours","minutes","seconds","milliseconds"].indexOf(Le)>=0);fe.length===0&&(H<i&&(H=w.plus({[L]:1})),H!==w&&(O[L]=(O[L]||0)+V/(H-w)));const ve=Ie.fromObject(O,p);return fe.length>0?Ie.fromMillis(V,p).shiftTo(...fe).plus(ve):ve}const _u="missing Intl.DateTimeFormat.formatToParts support";function tt(g,i=m=>m){return{regex:g,deser:([m])=>i(so(m))}}const ar="[ ]",zu=new RegExp(ar,"g");function bl(g){return g.replace(/\./g,"\\.?").replace(zu,ar)}function nr(g){return g.replace(/\./g,"").replace(zu," ").toLowerCase()}function ta(g,i){return g===null?null:{regex:RegExp(g.map(bl).join("|")),deser:([m])=>g.findIndex(p=>nr(m)===nr(p))+i}}function lr(g,i){return{regex:g,deser:([,m,p])=>es(m,p),groups:i}}function ys(g){return{regex:g,deser:([i])=>i}}function Hn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Sl(g,i){const m=oa(i),p=oa(i,"{2}"),w=oa(i,"{3}"),O=oa(i,"{4}"),H=oa(i,"{6}"),L=oa(i,"{1,2}"),V=oa(i,"{1,3}"),fe=oa(i,"{1,6}"),ve=oa(i,"{1,9}"),Le=oa(i,"{2,4}"),Qe=oa(i,"{4,6}"),Ae=Qt=>({regex:RegExp(Hn(Qt.val)),deser:([En])=>En,literal:!0}),It=(Qt=>{if(g.literal)return Ae(Qt);switch(Qt.val){case"G":return ta(i.eras("short"),0);case"GG":return ta(i.eras("long"),0);case"y":return tt(fe);case"yy":return tt(Le,Kl);case"yyyy":return tt(O);case"yyyyy":return tt(Qe);case"yyyyyy":return tt(H);case"M":return tt(L);case"MM":return tt(p);case"MMM":return ta(i.months("short",!0),1);case"MMMM":return ta(i.months("long",!0),1);case"L":return tt(L);case"LL":return tt(p);case"LLL":return ta(i.months("short",!1),1);case"LLLL":return ta(i.months("long",!1),1);case"d":return tt(L);case"dd":return tt(p);case"o":return tt(V);case"ooo":return tt(w);case"HH":return tt(p);case"H":return tt(L);case"hh":return tt(p);case"h":return tt(L);case"mm":return tt(p);case"m":return tt(L);case"q":return tt(L);case"qq":return tt(p);case"s":return tt(L);case"ss":return tt(p);case"S":return tt(V);case"SSS":return tt(w);case"u":return ys(ve);case"uu":return ys(L);case"uuu":return tt(m);case"a":return ta(i.meridiems(),0);case"kkkk":return tt(O);case"kk":return tt(Le,Kl);case"W":return tt(L);case"WW":return tt(p);case"E":case"c":return tt(m);case"EEE":return ta(i.weekdays("short",!1),1);case"EEEE":return ta(i.weekdays("long",!1),1);case"ccc":return ta(i.weekdays("short",!0),1);case"cccc":return ta(i.weekdays("long",!0),1);case"Z":case"ZZ":return lr(new RegExp(`([+-]${L.source})(?::(${p.source}))?`),2);case"ZZZ":return lr(new RegExp(`([+-]${L.source})(${p.source})?`),2);case"z":return ys(/[a-z_+-/]{1,256}?/i);case" ":return ys(/[^\S\n\r]/);default:return Ae(Qt)}})(g)||{invalidReason:_u};return It.token=g,It}const si={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Uu(g,i,m){const{type:p,value:w}=g;if(p==="literal"){const V=/^\s+$/.test(w);return{literal:!V,val:V?" ":w}}const O=i[p];let H=p;p==="hour"&&(i.hour12!=null?H=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?H="hour12":H="hour24":H=m.hour12?"hour12":"hour24");let L=si[H];if(typeof L=="object"&&(L=L[O]),L)return{literal:!1,val:L}}function Ln(g){return[`^${g.map(m=>m.regex).reduce((m,p)=>`${m}(${p.source})`,"")}$`,g]}function qu(g,i,m){const p=g.match(i);if(p){const w={};let O=1;for(const H in m)if(_n(m,H)){const L=m[H],V=L.groups?L.groups+1:1;!L.literal&&L.token&&(w[L.token.val[0]]=L.deser(p.slice(O,O+V))),O+=V}return[p,w]}else return[p,{}]}function Hu(g){const i=O=>{switch(O){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let m=null,p;return Oe(g.z)||(m=Te.create(g.z)),Oe(g.Z)||(m||(m=new rt(g.Z)),p=g.Z),Oe(g.q)||(g.M=(g.q-1)*3+1),Oe(g.h)||(g.h<12&&g.a===1?g.h+=12:g.h===12&&g.a===0&&(g.h=0)),g.G===0&&g.y&&(g.y=-g.y),Oe(g.u)||(g.S=Pr(g.u)),[Object.keys(g).reduce((O,H)=>{const L=i(H);return L&&(O[L]=g[H]),O},{}),m,p]}let sr=null;function ko(){return sr||(sr=je.fromMillis(1555555555555)),sr}function _o(g,i){if(g.literal)return g;const m=Zt.macroTokenToFormatOpts(g.val),p=ja(m,i);return p==null||p.includes(void 0)?g:p}function Lu(g,i){return Array.prototype.concat(...g.map(m=>_o(m,i)))}class ri{constructor(i,m){if(this.locale=i,this.format=m,this.tokens=Lu(Zt.parseFormat(m),i),this.units=this.tokens.map(p=>Sl(p,i)),this.disqualifyingUnit=this.units.find(p=>p.invalidReason),!this.disqualifyingUnit){const[p,w]=Ln(this.units);this.regex=RegExp(p,"i"),this.handlers=w}}explainFromTokens(i){if(this.isValid){const[m,p]=qu(i,this.regex,this.handlers),[w,O,H]=p?Hu(p):[null,null,void 0];if(_n(p,"a")&&_n(p,"H"))throw new h("Can't include meridiem when specifying 24-hour format");return{input:i,tokens:this.tokens,regex:this.regex,rawMatches:m,matches:p,result:w,zone:O,specificOffset:H}}else return{input:i,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ii(g,i,m){return new ri(g,m).explainFromTokens(i)}function ui(g,i,m){const{result:p,zone:w,specificOffset:O,invalidReason:H}=ii(g,i,m);return[p,w,O,H]}function ja(g,i){if(!g)return null;const p=Zt.create(i,g).dtFormatter(ko()),w=p.formatToParts(),O=p.resolvedOptions();return w.map(H=>Uu(H,g,O))}const Nl="Invalid DateTime",pa=864e13;function Fa(g){return new Sa("unsupported zone",`the zone "${g.name}" is not supported`)}function ps(g){return g.weekData===null&&(g.weekData=Pt(g.c)),g.weekData}function wl(g){return g.localWeekData===null&&(g.localWeekData=Pt(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function Ga(g,i){const m={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new je({...m,...i,old:m})}function rr(g,i,m){let p=g-i*60*1e3;const w=m.offset(p);if(i===w)return[p,i];p-=(w-i)*60*1e3;const O=m.offset(p);return w===O?[p,w]:[g-Math.min(w,O)*60*1e3,Math.max(w,O)]}function Pa(g,i){g+=i*60*1e3;const m=new Date(g);return{year:m.getUTCFullYear(),month:m.getUTCMonth()+1,day:m.getUTCDate(),hour:m.getUTCHours(),minute:m.getUTCMinutes(),second:m.getUTCSeconds(),millisecond:m.getUTCMilliseconds()}}function vs(g,i,m){return rr(ea(g),i,m)}function bs(g,i){const m=g.o,p=g.c.year+Math.trunc(i.years),w=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,O={...g.c,year:p,month:w,day:Math.min(g.c.day,Zs(p,w))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},H=Ie.fromObject({years:i.years-Math.trunc(i.years),quarters:i.quarters-Math.trunc(i.quarters),months:i.months-Math.trunc(i.months),weeks:i.weeks-Math.trunc(i.weeks),days:i.days-Math.trunc(i.days),hours:i.hours,minutes:i.minutes,seconds:i.seconds,milliseconds:i.milliseconds}).as("milliseconds"),L=ea(O);let[V,fe]=rr(L,m,g.zone);return H!==0&&(V+=H,fe=g.zone.offset(V)),{ts:V,o:fe}}function _a(g,i,m,p,w,O){const{setZone:H,zone:L}=m;if(g&&Object.keys(g).length!==0||i){const V=i||L,fe=je.fromObject(g,{...m,zone:V,specificOffset:O});return H?fe:fe.setZone(L)}else return je.invalid(new Sa("unparsable",`the input "${w}" can't be parsed as ${p}`))}function ir(g,i,m=!0){return g.isValid?Zt.create($e.create("en-US"),{allowZ:m,forceSimple:!0}).formatDateTimeFromString(g,i):null}function aa(g,i,m){const p=g.c.year>9999||g.c.year<0;let w="";if(p&&g.c.year>=0&&(w+="+"),w+=ct(g.c.year,p?6:4),m==="year")return w;if(i){if(w+="-",w+=ct(g.c.month),m==="month")return w;w+="-"}else if(w+=ct(g.c.month),m==="month")return w;return w+=ct(g.c.day),w}function ur(g,i,m,p,w,O,H){let L=!m||g.c.millisecond!==0||g.c.second!==0,V="";switch(H){case"day":case"month":case"year":break;default:if(V+=ct(g.c.hour),H==="hour")break;if(i){if(V+=":",V+=ct(g.c.minute),H==="minute")break;L&&(V+=":",V+=ct(g.c.second))}else{if(V+=ct(g.c.minute),H==="minute")break;L&&(V+=ct(g.c.second))}if(H==="second")break;L&&(!p||g.c.millisecond!==0)&&(V+=".",V+=ct(g.c.millisecond,3))}return w&&(g.isOffsetFixed&&g.offset===0&&!O?V+="Z":g.o<0?(V+="-",V+=ct(Math.trunc(-g.o/60)),V+=":",V+=ct(Math.trunc(-g.o%60))):(V+="+",V+=ct(Math.trunc(g.o/60)),V+=":",V+=ct(Math.trunc(g.o%60)))),O&&(V+="["+g.zone.ianaName+"]"),V}const Za={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Bu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},cr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Wa=["year","month","day","hour","minute","second","millisecond"],ci=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Vu=["year","ordinal","hour","minute","second","millisecond"];function jl(g){const i={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[g.toLowerCase()];if(!i)throw new f(g);return i}function oi(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return jl(g)}}function Ea(g){if(dn===void 0&&(dn=pt.now()),g.type!=="iana")return g.offset(dn);const i=g.name;let m=ha.get(i);return m===void 0&&(m=g.offset(dn),ha.set(i,m)),m}function Bn(g,i){const m=wt(i.zone,pt.defaultZone);if(!m.isValid)return je.invalid(Fa(m));const p=$e.fromObject(i);let w,O;if(Oe(g.year))w=pt.now();else{for(const V of Wa)Oe(g[V])&&(g[V]=Za[V]);const H=Gs(g)||kn(g);if(H)return je.invalid(H);const L=Ea(m);[w,O]=vs(g,L,m)}return new je({ts:w,zone:m,loc:p,o:O})}function Vn(g,i,m){const p=Oe(m.round)?!0:m.round,w=Oe(m.rounding)?"trunc":m.rounding,O=(L,V)=>(L=Jl(L,p||m.calendary?0:2,m.calendary?"round":w),i.loc.clone(m).relFormatter(m).format(L,V)),H=L=>m.calendary?i.hasSame(g,L)?0:i.startOf(L).diff(g.startOf(L),L).get(L):i.diff(g,L).get(L);if(m.unit)return O(H(m.unit),m.unit);for(const L of m.units){const V=H(L);if(Math.abs(V)>=1)return O(V,L)}return O(g>i?-0:0,m.units[m.units.length-1])}function Ss(g){let i={},m;return g.length>0&&typeof g[g.length-1]=="object"?(i=g[g.length-1],m=Array.from(g).slice(0,g.length-1)):m=Array.from(g),[i,m]}let dn;const ha=new Map;class je{constructor(i){const m=i.zone||pt.defaultZone;let p=i.invalid||(Number.isNaN(i.ts)?new Sa("invalid input"):null)||(m.isValid?null:Fa(m));this.ts=Oe(i.ts)?pt.now():i.ts;let w=null,O=null;if(!p)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(m))[w,O]=[i.old.c,i.old.o];else{const L=Na(i.o)&&!i.old?i.o:m.offset(this.ts);w=Pa(this.ts,L),p=Number.isNaN(w.year)?new Sa("invalid input"):null,w=p?null:w,O=p?null:L}this._zone=m,this.loc=i.loc||$e.create(),this.invalid=p,this.weekData=null,this.localWeekData=null,this.c=w,this.o=O,this.isLuxonDateTime=!0}static now(){return new je({})}static local(){const[i,m]=Ss(arguments),[p,w,O,H,L,V,fe]=m;return Bn({year:p,month:w,day:O,hour:H,minute:L,second:V,millisecond:fe},i)}static utc(){const[i,m]=Ss(arguments),[p,w,O,H,L,V,fe]=m;return i.zone=rt.utcInstance,Bn({year:p,month:w,day:O,hour:H,minute:L,second:V,millisecond:fe},i)}static fromJSDate(i,m={}){const p=xu(i)?i.valueOf():NaN;if(Number.isNaN(p))return je.invalid("invalid input");const w=wt(m.zone,pt.defaultZone);return w.isValid?new je({ts:p,zone:w,loc:$e.fromObject(m)}):je.invalid(Fa(w))}static fromMillis(i,m={}){if(Na(i))return i<-pa||i>pa?je.invalid("Timestamp out of range"):new je({ts:i,zone:wt(m.zone,pt.defaultZone),loc:$e.fromObject(m)});throw new v(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,m={}){if(Na(i))return new je({ts:i*1e3,zone:wt(m.zone,pt.defaultZone),loc:$e.fromObject(m)});throw new v("fromSeconds requires a numerical input")}static fromObject(i,m={}){i=i||{};const p=wt(m.zone,pt.defaultZone);if(!p.isValid)return je.invalid(Fa(p));const w=$e.fromObject(m),O=rn(i,oi),{minDaysInFirstWeek:H,startOfWeek:L}=mu(O,w),V=pt.now(),fe=Oe(m.specificOffset)?p.offset(V):m.specificOffset,ve=!Oe(O.ordinal),Le=!Oe(O.year),Qe=!Oe(O.month)||!Oe(O.day),Ae=Le||Qe,Ct=O.weekYear||O.weekNumber;if((Ae||ve)&&Ct)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Qe&&ve)throw new h("Can't mix ordinal dates with month/day");const It=Ct||O.weekday&&!Ae;let Qt,En,fn=Pa(V,fe);It?(Qt=ci,En=Bu,fn=Pt(fn,H,L)):ve?(Qt=Vu,En=cr,fn=Ql(fn)):(Qt=Wa,En=Za);let or=!1;for(const Xa of Qt){const dr=O[Xa];Oe(dr)?or?O[Xa]=En[Xa]:O[Xa]=fn[Xa]:or=!0}const Yn=It?gu(O,H,L):ve?Xl(O):Gs(O),Qa=Yn||kn(O);if(Qa)return je.invalid(Qa);const Tn=It?An(O,H,L):ve?hu(O):O,[hn,di]=vs(Tn,fe,p),$n=new je({ts:hn,zone:p,o:di,loc:w});return O.weekday&&Ae&&i.weekday!==$n.weekday?je.invalid("mismatched weekday",`you can't specify both a weekday of ${O.weekday} and a date of ${$n.toISO()}`):$n.isValid?$n:je.invalid($n.invalid)}static fromISO(i,m={}){const[p,w]=Tu(i);return _a(p,w,m,"ISO 8601",i)}static fromRFC2822(i,m={}){const[p,w]=Mu(i);return _a(p,w,m,"RFC 2822",i)}static fromHTTP(i,m={}){const[p,w]=Cu(i);return _a(p,w,m,"HTTP",m)}static fromFormat(i,m,p={}){if(Oe(i)||Oe(m))throw new v("fromFormat requires an input string and a format");const{locale:w=null,numberingSystem:O=null}=p,H=$e.fromOpts({locale:w,numberingSystem:O,defaultToEN:!0}),[L,V,fe,ve]=ui(H,i,m);return ve?je.invalid(ve):_a(L,V,p,`format ${m}`,i,fe)}static fromString(i,m,p={}){return je.fromFormat(i,m,p)}static fromSQL(i,m={}){const[p,w]=Ru(i);return _a(p,w,m,"SQL",i)}static invalid(i,m=null){if(!i)throw new v("need to specify a reason the DateTime is invalid");const p=i instanceof Sa?i:new Sa(i,m);if(pt.throwOnInvalid)throw new r(p);return new je({invalid:p})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,m={}){const p=ja(i,$e.fromObject(m));return p?p.map(w=>w?w.val:null).join(""):null}static expandFormat(i,m={}){return Lu(Zt.parseFormat(i),$e.fromObject(m)).map(w=>w.val).join("")}static resetCache(){dn=void 0,ha.clear()}get(i){return this[i]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ps(this).weekYear:NaN}get weekNumber(){return this.isValid?ps(this).weekNumber:NaN}get weekday(){return this.isValid?ps(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?wl(this).weekday:NaN}get localWeekNumber(){return this.isValid?wl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?wl(this).weekYear:NaN}get ordinal(){return this.isValid?Ql(this.c).ordinal:NaN}get monthShort(){return this.isValid?gs.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?gs.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?gs.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?gs.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const i=864e5,m=6e4,p=ea(this.c),w=this.zone.offset(p-i),O=this.zone.offset(p+i),H=this.zone.offset(p-w*m),L=this.zone.offset(p-O*m);if(H===L)return[this];const V=p-H*m,fe=p-L*m,ve=Pa(V,H),Le=Pa(fe,L);return ve.hour===Le.hour&&ve.minute===Le.minute&&ve.second===Le.second&&ve.millisecond===Le.millisecond?[Ga(this,{ts:V}),Ga(this,{ts:fe})]:[this]}get isInLeapYear(){return dl(this.year)}get daysInMonth(){return Zs(this.year,this.month)}get daysInYear(){return this.isValid?sn(this.year):NaN}get weeksInWeekYear(){return this.isValid?fl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?fl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:m,numberingSystem:p,calendar:w}=Zt.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:m,numberingSystem:p,outputCalendar:w}}toUTC(i=0,m={}){return this.setZone(rt.instance(i),m)}toLocal(){return this.setZone(pt.defaultZone)}setZone(i,{keepLocalTime:m=!1,keepCalendarTime:p=!1}={}){if(i=wt(i,pt.defaultZone),i.equals(this.zone))return this;if(i.isValid){let w=this.ts;if(m||p){const O=i.offset(this.ts),H=this.toObject();[w]=vs(H,O,i)}return Ga(this,{ts:w,zone:i})}else return je.invalid(Fa(i))}reconfigure({locale:i,numberingSystem:m,outputCalendar:p}={}){const w=this.loc.clone({locale:i,numberingSystem:m,outputCalendar:p});return Ga(this,{loc:w})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const m=rn(i,oi),{minDaysInFirstWeek:p,startOfWeek:w}=mu(m,this.loc),O=!Oe(m.weekYear)||!Oe(m.weekNumber)||!Oe(m.weekday),H=!Oe(m.ordinal),L=!Oe(m.year),V=!Oe(m.month)||!Oe(m.day),fe=L||V,ve=m.weekYear||m.weekNumber;if((fe||H)&&ve)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(V&&H)throw new h("Can't mix ordinal dates with month/day");let Le;O?Le=An({...Pt(this.c,p,w),...m},p,w):Oe(m.ordinal)?(Le={...this.toObject(),...m},Oe(m.day)&&(Le.day=Math.min(Zs(Le.year,Le.month),Le.day))):Le=hu({...Ql(this.c),...m});const[Qe,Ae]=vs(Le,this.o,this.zone);return Ga(this,{ts:Qe,o:Ae})}plus(i){if(!this.isValid)return this;const m=Ie.fromDurationLike(i);return Ga(this,bs(this,m))}minus(i){if(!this.isValid)return this;const m=Ie.fromDurationLike(i).negate();return Ga(this,bs(this,m))}startOf(i,{useLocaleWeeks:m=!1}={}){if(!this.isValid)return this;const p={},w=Ie.normalizeUnit(i);switch(w){case"years":p.month=1;case"quarters":case"months":p.day=1;case"weeks":case"days":p.hour=0;case"hours":p.minute=0;case"minutes":p.second=0;case"seconds":p.millisecond=0;break}if(w==="weeks")if(m){const O=this.loc.getStartOfWeek(),{weekday:H}=this;H<O&&(p.weekNumber=this.weekNumber-1),p.weekday=O}else p.weekday=1;if(w==="quarters"){const O=Math.ceil(this.month/3);p.month=(O-1)*3+1}return this.set(p)}endOf(i,m){return this.isValid?this.plus({[i]:1}).startOf(i,m).minus(1):this}toFormat(i,m={}){return this.isValid?Zt.create(this.loc.redefaultToEN(m)).formatDateTimeFromString(this,i):Nl}toLocaleString(i=T,m={}){return this.isValid?Zt.create(this.loc.clone(m),i).formatDateTime(this):Nl}toLocaleParts(i={}){return this.isValid?Zt.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:m=!1,suppressMilliseconds:p=!1,includeOffset:w=!0,extendedZone:O=!1,precision:H="milliseconds"}={}){if(!this.isValid)return null;H=jl(H);const L=i==="extended";let V=aa(this,L,H);return Wa.indexOf(H)>=3&&(V+="T"),V+=ur(this,L,m,p,w,O,H),V}toISODate({format:i="extended",precision:m="day"}={}){return this.isValid?aa(this,i==="extended",jl(m)):null}toISOWeekDate(){return ir(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:m=!1,includeOffset:p=!0,includePrefix:w=!1,extendedZone:O=!1,format:H="extended",precision:L="milliseconds"}={}){return this.isValid?(L=jl(L),(w&&Wa.indexOf(L)>=3?"T":"")+ur(this,H==="extended",m,i,p,O,L)):null}toRFC2822(){return ir(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ir(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?aa(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:m=!1,includeOffsetSpace:p=!0}={}){let w="HH:mm:ss.SSS";return(m||i)&&(p&&(w+=" "),m?w+="z":i&&(w+="ZZ")),ir(this,w,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():Nl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(i={}){if(!this.isValid)return{};const m={...this.c};return i.includeConfig&&(m.outputCalendar=this.outputCalendar,m.numberingSystem=this.loc.numberingSystem,m.locale=this.loc.locale),m}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(i,m="milliseconds",p={}){if(!this.isValid||!i.isValid)return Ie.invalid("created by diffing an invalid DateTime");const w={locale:this.locale,numberingSystem:this.numberingSystem,...p},O=ol(m).map(Ie.normalizeUnit),H=i.valueOf()>this.valueOf(),L=H?this:i,V=H?i:this,fe=ku(L,V,O,w);return H?fe.negate():fe}diffNow(i="milliseconds",m={}){return this.diff(je.now(),i,m)}until(i){return this.isValid?bt.fromDateTimes(this,i):this}hasSame(i,m,p){if(!this.isValid)return!1;const w=i.valueOf(),O=this.setZone(i.zone,{keepLocalTime:!0});return O.startOf(m,p)<=w&&w<=O.endOf(m,p)}equals(i){return this.isValid&&i.isValid&&this.valueOf()===i.valueOf()&&this.zone.equals(i.zone)&&this.loc.equals(i.loc)}toRelative(i={}){if(!this.isValid)return null;const m=i.base||je.fromObject({},{zone:this.zone}),p=i.padding?this<m?-i.padding:i.padding:0;let w=["years","months","days","hours","minutes","seconds"],O=i.unit;return Array.isArray(i.unit)&&(w=i.unit,O=void 0),Vn(m,this.plus(p),{...i,numeric:"always",units:w,unit:O})}toRelativeCalendar(i={}){return this.isValid?Vn(i.base||je.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(je.isDateTime))throw new v("min requires all arguments be DateTimes");return yu(i,m=>m.valueOf(),Math.min)}static max(...i){if(!i.every(je.isDateTime))throw new v("max requires all arguments be DateTimes");return yu(i,m=>m.valueOf(),Math.max)}static fromFormatExplain(i,m,p={}){const{locale:w=null,numberingSystem:O=null}=p,H=$e.fromOpts({locale:w,numberingSystem:O,defaultToEN:!0});return ii(H,i,m)}static fromStringExplain(i,m,p={}){return je.fromFormatExplain(i,m,p)}static buildFormatParser(i,m={}){const{locale:p=null,numberingSystem:w=null}=m,O=$e.fromOpts({locale:p,numberingSystem:w,defaultToEN:!0});return new ri(O,i)}static fromFormatParser(i,m,p={}){if(Oe(i)||Oe(m))throw new v("fromFormatParser requires an input string and a format parser");const{locale:w=null,numberingSystem:O=null}=p,H=$e.fromOpts({locale:w,numberingSystem:O,defaultToEN:!0});if(!H.equals(m.locale))throw new v(`fromFormatParser called with a locale of ${H}, but the format parser was created for ${m.locale}`);const{result:L,zone:V,specificOffset:fe,invalidReason:ve}=m.explainFromTokens(i);return ve?je.invalid(ve):_a(L,V,p,`format ${m.format}`,i,fe)}static get DATE_SHORT(){return T}static get DATE_MED(){return j}static get DATE_MED_WITH_WEEKDAY(){return D}static get DATE_FULL(){return C}static get DATE_HUGE(){return M}static get TIME_SIMPLE(){return R}static get TIME_WITH_SECONDS(){return Q}static get TIME_WITH_SHORT_OFFSET(){return Y}static get TIME_WITH_LONG_OFFSET(){return G}static get TIME_24_SIMPLE(){return ee}static get TIME_24_WITH_SECONDS(){return de}static get TIME_24_WITH_SHORT_OFFSET(){return Z}static get TIME_24_WITH_LONG_OFFSET(){return P}static get DATETIME_SHORT(){return W}static get DATETIME_SHORT_WITH_SECONDS(){return ne}static get DATETIME_MED(){return z}static get DATETIME_MED_WITH_SECONDS(){return I}static get DATETIME_MED_WITH_WEEKDAY(){return _}static get DATETIME_FULL(){return ce}static get DATETIME_FULL_WITH_SECONDS(){return he}static get DATETIME_HUGE(){return q}static get DATETIME_HUGE_WITH_SECONDS(){return $}}function Ta(g){if(je.isDateTime(g))return g;if(g&&g.valueOf&&Na(g.valueOf()))return je.fromJSDate(g);if(g&&typeof g=="object")return je.fromObject(g);throw new v(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Ia="3.7.2";return Aa.DateTime=je,Aa.Duration=Ie,Aa.FixedOffsetZone=rt,Aa.IANAZone=Te,Aa.Info=gs,Aa.Interval=bt,Aa.InvalidZone=yt,Aa.Settings=pt,Aa.SystemZone=Se,Aa.VERSION=Ia,Aa.Zone=ie,Aa}var _g;function eh(){return _g||(_g=1,(function(l){var f,v,N,b,x,Rf,T,Fl;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const r=u2();var c;(function(C){C.Second="Second",C.Minute="Minute",C.Hour="Hour",C.Day="Day",C.Month="Month",C.Year="Year"})(c||(l.TimeUnit=c={}));var o;(function(C){C.Add="Add",C.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 D=class D{constructor(M,R){ut(this,T);ut(this,f);ut(this,v,null);ut(this,N,null);ut(this,b,{add:{[c.Year]:this.addYear.bind(this),[c.Month]:this.addMonth.bind(this),[c.Day]:this.addDay.bind(this),[c.Hour]:this.addHour.bind(this),[c.Minute]:this.addMinute.bind(this),[c.Second]:this.addSecond.bind(this)},subtract:{[c.Year]:this.subtractYear.bind(this),[c.Month]:this.subtractMonth.bind(this),[c.Day]:this.subtractDay.bind(this),[c.Hour]:this.subtractHour.bind(this),[c.Minute]:this.subtractMinute.bind(this),[c.Second]:this.subtractSecond.bind(this)}});const Q={zone:R};if(M?M instanceof D?(Ee(this,f,te(M,f)),Ee(this,v,te(M,v)),Ee(this,N,te(M,N))):M instanceof Date?Ee(this,f,r.DateTime.fromJSDate(M,Q)):typeof M=="number"?Ee(this,f,r.DateTime.fromMillis(M,Q)):(Ee(this,f,r.DateTime.fromISO(M,Q)),te(this,f).isValid||Ee(this,f,r.DateTime.fromRFC2822(M,Q)),te(this,f).isValid||Ee(this,f,r.DateTime.fromSQL(M,Q)),te(this,f).isValid||Ee(this,f,r.DateTime.fromFormat(M,"EEE, d MMM yyyy HH:mm:ss",Q))):Ee(this,f,r.DateTime.local()),!te(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${M}`);R&&R!==te(this,f).zoneName&&Ee(this,f,te(this,f).setZone(R))}get dstStart(){return te(this,v)}set dstStart(M){Ee(this,v,M)}get dstEnd(){return te(this,N)}set dstEnd(M){Ee(this,N,M)}addYear(){Ee(this,f,te(this,f).plus({years:1}))}addMonth(){Ee(this,f,te(this,f).plus({months:1}).startOf("month"))}addDay(){Ee(this,f,te(this,f).plus({days:1}).startOf("day"))}addHour(){Ee(this,f,te(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Ee(this,f,te(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Ee(this,f,te(this,f).plus({seconds:1}))}subtractYear(){Ee(this,f,te(this,f).minus({years:1}))}subtractMonth(){Ee(this,f,te(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Ee(this,f,te(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Ee(this,f,te(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Ee(this,f,te(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Ee(this,f,te(this,f).minus({seconds:1}))}addUnit(M){te(this,b).add[M]()}subtractUnit(M){te(this,b).subtract[M]()}invokeDateOperation(M,R){if(M===o.Add){this.addUnit(R);return}if(M===o.Subtract){this.subtractUnit(R);return}throw new Error(`Invalid verb: ${M}`)}getDate(){return te(this,f).day}getFullYear(){return te(this,f).year}getDay(){const M=te(this,f).weekday;return M===7?0:M}getMonth(){return te(this,f).month-1}getHours(){return te(this,f).hour}getMinutes(){return te(this,f).minute}getSeconds(){return te(this,f).second}getMilliseconds(){return te(this,f).millisecond}getUTCOffset(){return te(this,f).offset}setStartOfDay(){Ee(this,f,te(this,f).startOf("day"))}setEndOfDay(){Ee(this,f,te(this,f).endOf("day"))}getTime(){return te(this,f).valueOf()}getUTCDate(){return we(this,T,Fl).call(this).day}getUTCFullYear(){return we(this,T,Fl).call(this).year}getUTCDay(){const M=we(this,T,Fl).call(this).weekday;return M===7?0:M}getUTCMonth(){return we(this,T,Fl).call(this).month-1}getUTCHours(){return we(this,T,Fl).call(this).hour}getUTCMinutes(){return we(this,T,Fl).call(this).minute}getUTCSeconds(){return we(this,T,Fl).call(this).second}toISOString(){return te(this,f).toUTC().toISO()}toJSON(){return te(this,f).toJSON()}setDate(M){Ee(this,f,te(this,f).set({day:M}))}setFullYear(M){Ee(this,f,te(this,f).set({year:M}))}setDay(M){Ee(this,f,te(this,f).set({weekday:M}))}setMonth(M){Ee(this,f,te(this,f).set({month:M+1}))}setHours(M){Ee(this,f,te(this,f).set({hour:M}))}setMinutes(M){Ee(this,f,te(this,f).set({minute:M}))}setSeconds(M){Ee(this,f,te(this,f).set({second:M}))}setMilliseconds(M){Ee(this,f,te(this,f).set({millisecond:M}))}toString(){return this.toDate().toString()}toDate(){return te(this,f).toJSDate()}isLastDayOfMonth(){var Q;const{day:M,month:R}=te(this,f);if(R===2){const Y=we(Q=D,x,Rf).call(Q,te(this,f).year);return M===l.DAYS_IN_MONTH[R-1]-(Y?0:1)}return M===l.DAYS_IN_MONTH[R-1]}isLastWeekdayOfMonth(){var Y;const{day:M,month:R}=te(this,f);let Q;return R===2?Q=l.DAYS_IN_MONTH[R-1]-(we(Y=D,x,Rf).call(Y,te(this,f).year)?0:1):Q=l.DAYS_IN_MONTH[R-1],M>Q-7}applyDateOperation(M,R,Q){if(R===c.Month||R===c.Day){this.invokeDateOperation(M,R);return}const Y=this.getHours();this.invokeDateOperation(M,R);const G=this.getHours(),ee=G-Y;ee===2?Q!==24&&(this.dstStart=G):ee===0&&this.getMinutes()===0&&this.getSeconds()===0&&Q!==24&&(this.dstEnd=G)}};f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakMap,x=new WeakSet,Rf=function(M){return M%4===0&&M%100!==0||M%400===0},T=new WeakSet,Fl=function(){return te(this,f).toUTC()},ut(D,x);let h=D;l.CronDate=h,l.default=h})(Nf)),Nf}var zg;function c2(){if(zg)return Ki;zg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronMonth=void 0;const l=eh(),r=Ls(),c=1,o=12,h=Object.freeze([]);let f=class extends r.CronField{static get min(){return c}static get max(){return o}static get chars(){return h}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(N,b){super(N,b),this.validate()}get values(){return super.values}};return Ki.CronMonth=f,Ki}var eu={},Ug;function o2(){if(Ug)return eu;Ug=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.CronSecond=void 0;const l=Ls(),r=0,c=59,o=Object.freeze([]);let h=class extends l.CronField{static get min(){return r}static get max(){return c}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return eu.CronSecond=h,eu}var qg;function th(){return qg||(qg=1,(function(l){var r=As&&As.__createBinding||(Object.create?(function(o,h,f,v){v===void 0&&(v=f);var N=Object.getOwnPropertyDescriptor(h,f);(!N||("get"in N?!h.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return h[f]}}),Object.defineProperty(o,v,N)}):(function(o,h,f,v){v===void 0&&(v=f),o[v]=h[f]})),c=As&&As.__exportStar||function(o,h){for(var f in o)f!=="default"&&!Object.prototype.hasOwnProperty.call(h,f)&&r(h,o,f)};Object.defineProperty(l,"__esModule",{value:!0}),c(n2(),l),c(l2(),l),c(s2(),l),c(Ls(),l),c(r2(),l),c(i2(),l),c(c2(),l),c(o2(),l)})(As)),As}var Hg;function Xx(){var c,o,h,f,v,N,b,x,Ix,Qx;if(Hg)return Zi;Hg=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronFieldCollection=void 0;const l=th();let r=(x=class{constructor({second:D,minute:C,hour:M,dayOfMonth:R,month:Q,dayOfWeek:Y}){ut(this,c);ut(this,o);ut(this,h);ut(this,f);ut(this,v);ut(this,N);if(!D)throw new Error("Validation error, Field second is missing");if(!C)throw new Error("Validation error, Field minute is missing");if(!M)throw new Error("Validation error, Field hour is missing");if(!R)throw new Error("Validation error, Field dayOfMonth is missing");if(!Q)throw new Error("Validation error, Field month is missing");if(!Y)throw new Error("Validation error, Field dayOfWeek is missing");if(Q.values.length===1&&!R.hasLastChar&&!(parseInt(R.values[0],10)<=l.CronMonth.daysInMonth[Q.values[0]-1]))throw new Error("Invalid explicit day of month definition");Ee(this,c,D),Ee(this,o,C),Ee(this,h,M),Ee(this,v,Q),Ee(this,N,Y),Ee(this,f,R)}static from(D,C){return new x({second:this.resolveField(l.CronSecond,D.second,C.second),minute:this.resolveField(l.CronMinute,D.minute,C.minute),hour:this.resolveField(l.CronHour,D.hour,C.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,D.dayOfMonth,C.dayOfMonth),month:this.resolveField(l.CronMonth,D.month,C.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,D.dayOfWeek,C.dayOfWeek)})}static resolveField(D,C,M){return M?M instanceof l.CronField?M:new D(M):C}get second(){return te(this,c)}get minute(){return te(this,o)}get hour(){return te(this,h)}get dayOfMonth(){return te(this,f)}get month(){return te(this,v)}get dayOfWeek(){return te(this,N)}static compactField(D){if(D.length===0)return[];const C=[];let M;return D.forEach((R,Q,Y)=>{if(M===void 0){M={start:R,count:1};return}const G=Y[Q-1]||M.start,ee=Y[Q+1];if(R==="L"||R==="W"){C.push(M),C.push({start:R,count:1}),M=void 0;return}if(M.step===void 0&&ee!==void 0){const de=R-G,Z=ee-R;if(de<=Z){M={...M,count:2,end:R,step:de};return}M.step=1}R-(M.end??0)===M.step?(M.count++,M.end=R):(M.count===1?C.push({start:M.start,count:1}):M.count===2?(C.push({start:M.start,count:1}),C.push({start:M.end??G,count:1})):C.push(M),M={start:R,count:1})}),M&&C.push(M),C}stringifyField(D){var Q;let C=D.max,M=D.values;if(D instanceof l.CronDayOfWeek){C=6;const Y=te(this,N).values;M=Y[Y.length-1]===7?Y.slice(0,-1):Y}D instanceof l.CronDayOfMonth&&(C=te(this,v).values.length===1?l.CronMonth.daysInMonth[te(this,v).values[0]-1]:D.max);const R=x.compactField(M);if(R.length===1){const Y=we(Q=x,b,Ix).call(Q,D,R[0],C);if(Y)return Y}return R.map(Y=>{var ee;const G=Y.count===1?Y.start.toString():we(ee=x,b,Qx).call(ee,Y,C);return D instanceof l.CronDayOfWeek&&D.nthDay>0?`${G}#${D.nthDay}`:G}).join(",")}stringify(D=!1){const C=[];return D&&C.push(this.stringifyField(te(this,c))),C.push(this.stringifyField(te(this,o)),this.stringifyField(te(this,h)),this.stringifyField(te(this,f)),this.stringifyField(te(this,v)),this.stringifyField(te(this,N))),C.join(" ")}serialize(){return{second:te(this,c).serialize(),minute:te(this,o).serialize(),hour:te(this,h).serialize(),dayOfMonth:te(this,f).serialize(),month:te(this,v).serialize(),dayOfWeek:te(this,N).serialize()}}},c=new WeakMap,o=new WeakMap,h=new WeakMap,f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakSet,Ix=function(D,C,M){const R=C.step;return R?R===1&&C.start===D.min&&C.end&&C.end>=M?D.hasQuestionMarkChar?"?":"*":R!==1&&C.start===D.min&&C.end&&C.end>=M-R+1?`*/${R}`:null:null},Qx=function(D,C){const M=D.step;if(M===1)return`${D.start}-${D.end}`;const R=D.start===0?D.count-1:D.count;if(!M)throw new Error("Unexpected range step");if(!D.end)throw new Error("Unexpected range end");if(M*R>D.end){const Q=(G,ee)=>{if(typeof D.start!="number")throw new Error("Unexpected range start");return ee%M===0?D.start+ee:null};if(typeof D.start!="number")throw new Error("Unexpected range start");const Y={length:D.end-D.start+1};return Array.from(Y,Q).filter(G=>G!==null).join(",")}return D.end===C-M+1?`${D.start}/${M}`:`${D.start}-${D.end}/${M}`},ut(x,b),x);return Zi.CronFieldCollection=r,Zi}var wf={},Lg;function ly(){return Lg||(Lg=1,(function(l){var h,f,v,N,b,x,S,T,j,Gl,C,zs,Jx,Kx,ey,ty,Af,ay,ny,kr;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 r=eh();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 c=1e4,W=class W{constructor(z,I){ut(this,C);ut(this,h);ut(this,f);ut(this,v);ut(this,N);ut(this,b);ut(this,x);ut(this,S,null);ut(this,T,!1);Ee(this,h,I),Ee(this,f,I.tz),Ee(this,N,I.startDate?new r.CronDate(I.startDate,te(this,f)):null),Ee(this,b,I.endDate?new r.CronDate(I.endDate,te(this,f)):null);let _=I.currentDate??I.startDate;if(_){const ce=new r.CronDate(_,te(this,f));te(this,N)&&ce.getTime()<te(this,N).getTime()?_=te(this,N):te(this,b)&&ce.getTime()>te(this,b).getTime()&&(_=te(this,b))}Ee(this,v,new r.CronDate(_,te(this,f))),Ee(this,x,z)}get fields(){return te(this,x)}static fieldsToExpression(z,I){return new W(z,I||{})}next(){return we(this,C,kr).call(this)}prev(){return we(this,C,kr).call(this,!0)}hasNext(){const z=te(this,v);try{return we(this,C,kr).call(this),!0}catch{return!1}finally{Ee(this,v,z)}}hasPrev(){const z=te(this,v);try{return we(this,C,kr).call(this,!0),!0}catch{return!1}finally{Ee(this,v,z)}}take(z){const I=[];if(z>=0)for(let _=0;_<z;_++)try{I.push(this.next())}catch{return I}else for(let _=0;_>z;_--)try{I.push(this.prev())}catch{return I}return I}reset(z){Ee(this,v,new r.CronDate(z||te(this,h).currentDate))}stringify(z=!1){return te(this,x).stringify(z)}includesDate(z){const{second:I,minute:_,hour:ce,month:he}=te(this,x),q=new r.CronDate(z,te(this,f));return!(!I.values.includes(q.getSeconds())||!_.values.includes(q.getMinutes())||!ce.values.includes(q.getHours())||!he.values.includes(q.getMonth()+1)||!we(this,C,Af).call(this,q)||te(this,x).dayOfWeek.nthDay>0&&Math.ceil(q.getDate()/7)!==te(this,x).dayOfWeek.nthDay)}toString(){return te(this,h).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:we(this,C,kr).call(this),done:!this.hasNext()})}}};h=new WeakMap,f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakMap,x=new WeakMap,S=new WeakMap,T=new WeakMap,j=new WeakSet,Gl=function(z,I){return I.some(_=>_===z)},C=new WeakSet,zs=function(z,I){return z[I?z.length-1:0]},Jx=function(z){const I=`${z.getFullYear()}-${z.getMonth()+1}-${z.getDate()}`;if(te(this,S)===I)return te(this,T);const _=new r.CronDate(z);_.setStartOfDay();const ce=new r.CronDate(z);return ce.setEndOfDay(),Ee(this,S,I),Ee(this,T,_.getUTCOffset()!==ce.getUTCOffset()),te(this,T)},Kx=function(z,I,_){const ce=te(this,x).second.values,he=z.getSeconds(),q=te(this,x).second.findNearestValue(he,_);if(q!==null){z.setSeconds(q);return}z.applyDateOperation(I,r.TimeUnit.Minute,te(this,x).hour.values.length),z.setSeconds(we(this,C,zs).call(this,ce,_))},ey=function(z,I,_){const ce=te(this,x).minute.values,he=te(this,x).second.values,q=z.getMinutes(),$=te(this,x).minute.findNearestValue(q,_);if($!==null){z.setMinutes($),z.setSeconds(we(this,C,zs).call(this,he,_));return}z.applyDateOperation(I,r.TimeUnit.Hour,te(this,x).hour.values.length),z.setMinutes(we(this,C,zs).call(this,ce,_)),z.setSeconds(we(this,C,zs).call(this,he,_))},ty=function(z,I){const _=I.isLastWeekdayOfMonth();return z.some(ce=>{const he=parseInt(ce.toString().charAt(0),10)%7;if(Number.isNaN(he))throw new Error(`Invalid last weekday of the month expression: ${ce}`);return I.getDay()===he&&_})},Af=function(z){var ie,ge,Se;const I=te(this,x).dayOfMonth.isWildcard,_=!I,ce=te(this,x).dayOfWeek.isWildcard,he=!ce,q=we(ie=W,j,Gl).call(ie,z.getDate(),te(this,x).dayOfMonth.values)||te(this,x).dayOfMonth.hasLastChar&&z.isLastDayOfMonth(),$=we(ge=W,j,Gl).call(ge,z.getDay(),te(this,x).dayOfWeek.values)||te(this,x).dayOfWeek.hasLastChar&&we(Se=W,j,ty).call(Se,te(this,x).dayOfWeek.values,z);return!!(_&&he&&(q||$)||q&&!he||I&&!ce&&$)},ay=function(z,I,_){var De,A;const ce=te(this,x).hour.values,he=ce,q=z.getHours(),$=we(De=W,j,Gl).call(De,q,ce),ie=z.dstStart===q,ge=z.dstEnd===q;if(ie)return we(A=W,j,Gl).call(A,q-1,ce)?!0:(z.invokeDateOperation(I,r.TimeUnit.Hour),!1);if(ge&&!_)return z.dstEnd=null,z.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,he.length),!1;if($)return!0;z.dstStart=null;const Se=te(this,x).hour.findNearestValue(q,_);if(Se===null)return z.applyDateOperation(I,r.TimeUnit.Day,he.length),!1;if(we(this,C,Jx).call(this,z)){const se=_?q-Se:Se-q;for(let me=0;me<se;me++)z.applyDateOperation(I,r.TimeUnit.Hour,he.length)}else z.setHours(Se);return z.setMinutes(we(this,C,zs).call(this,te(this,x).minute.values,_)),z.setSeconds(we(this,C,zs).call(this,te(this,x).second.values,_)),!1},ny=function(z){if(!te(this,N)&&!te(this,b))return;const I=z.getTime();if(te(this,N)&&I<te(this,N).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(te(this,b)&&I>te(this,b).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},kr=function(z=!1){var q,$,ie;const I=z?r.DateMathOp.Subtract:r.DateMathOp.Add,_=new r.CronDate(te(this,v)),ce=_.getTime();let he=0;for(;++he<c;){if(we(this,C,ny).call(this,_),!we(this,C,Af).call(this,_)){_.applyDateOperation(I,r.TimeUnit.Day,te(this,x).hour.values.length);continue}if(!(te(this,x).dayOfWeek.nthDay<=0||Math.ceil(_.getDate()/7)===te(this,x).dayOfWeek.nthDay)){_.applyDateOperation(I,r.TimeUnit.Day,te(this,x).hour.values.length);continue}if(!we(q=W,j,Gl).call(q,_.getMonth()+1,te(this,x).month.values)){_.applyDateOperation(I,r.TimeUnit.Month,te(this,x).hour.values.length);continue}if(we(this,C,ay).call(this,_,I,z)){if(!we($=W,j,Gl).call($,_.getMinutes(),te(this,x).minute.values)){we(this,C,ey).call(this,_,I,z);continue}if(!we(ie=W,j,Gl).call(ie,_.getSeconds(),te(this,x).second.values)){we(this,C,Kx).call(this,_,I,z);continue}if(ce===_.getTime()){(I==="Add"||_.getMilliseconds()===0)&&_.applyDateOperation(I,r.TimeUnit.Second,te(this,x).hour.values.length);continue}break}}if(he>c)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return _.getMilliseconds()!==0&&_.setMilliseconds(0),Ee(this,v,_),_},ut(W,j);let o=W;l.CronExpression=o,l.default=o})(wf)),wf}var Lc={},Bg;function d2(){if(Bg)return Lc;Bg=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.seededRandom=c;function l(o){let h=2166136261;for(let f=0;f<o.length;f++)h^=o.charCodeAt(f),h=Math.imul(h,16777619);return()=>h>>>0}function r(o){return()=>{let h=o+=1831565813;return h=Math.imul(h^h>>>15,h|1),h^=h+Math.imul(h^h>>>7,h|61),((h^h>>>14)>>>0)/4294967296}}function c(o){const h=o?l(o)():Math.floor(Math.random()*1e10);return r(h)}return Lc}var Vg;function _f(){var x,S,sy,Us,ry,iy,uy,cy,oy,dy,fy,kf,hy,my;if(Vg)return Ba;Vg=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.CronExpressionParser=Ba.DayOfWeek=Ba.Months=Ba.CronUnit=Ba.PredefinedExpressions=void 0;const l=Xx(),r=ly(),c=d2(),o=th();var h;(function(P){P["@yearly"]="0 0 0 1 1 *",P["@annually"]="0 0 0 1 1 *",P["@monthly"]="0 0 0 1 * *",P["@weekly"]="0 0 0 * * 0",P["@daily"]="0 0 0 * * *",P["@hourly"]="0 0 * * * *",P["@minutely"]="0 * * * * *",P["@secondly"]="* * * * * *",P["@weekdays"]="0 0 0 * * 1-5",P["@weekends"]="0 0 0 * * 0,6"})(h||(Ba.PredefinedExpressions=h={}));var f;(function(P){P.Second="Second",P.Minute="Minute",P.Hour="Hour",P.DayOfMonth="DayOfMonth",P.Month="Month",P.DayOfWeek="DayOfWeek"})(f||(Ba.CronUnit=f={}));var v;(function(P){P[P.jan=1]="jan",P[P.feb=2]="feb",P[P.mar=3]="mar",P[P.apr=4]="apr",P[P.may=5]="may",P[P.jun=6]="jun",P[P.jul=7]="jul",P[P.aug=8]="aug",P[P.sep=9]="sep",P[P.oct=10]="oct",P[P.nov=11]="nov",P[P.dec=12]="dec"})(v||(Ba.Months=v={}));var N;(function(P){P[P.sun=0]="sun",P[P.mon=1]="mon",P[P.tue=2]="tue",P[P.wed=3]="wed",P[P.thu=4]="thu",P[P.fri=5]="fri",P[P.sat=6]="sat"})(N||(Ba.DayOfWeek=N={}));let b=(S=class{static parse(W,ne={}){var me,ye,Ce,Te,Ve,Nt,at,ia;const{strict:z=!1,hashSeed:I}=ne,_=(0,c.seededRandom)(I);W=h[W]||W;const ce=we(me=S,x,sy).call(me,W,z);if(!(ce.dayOfMonth==="*"||ce.dayOfWeek==="*"||!z))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const he=we(ye=S,x,Us).call(ye,f.Second,ce.second,o.CronSecond.constraints,_),q=we(Ce=S,x,Us).call(Ce,f.Minute,ce.minute,o.CronMinute.constraints,_),$=we(Te=S,x,Us).call(Te,f.Hour,ce.hour,o.CronHour.constraints,_),ie=we(Ve=S,x,Us).call(Ve,f.Month,ce.month,o.CronMonth.constraints,_),ge=we(Nt=S,x,Us).call(Nt,f.DayOfMonth,ce.dayOfMonth,o.CronDayOfMonth.constraints,_),{dayOfWeek:Se,nthDayOfWeek:De}=we(at=S,x,hy).call(at,ce.dayOfWeek),A=we(ia=S,x,Us).call(ia,f.DayOfWeek,Se,o.CronDayOfWeek.constraints,_),se=new l.CronFieldCollection({second:new o.CronSecond(he,{rawValue:ce.second}),minute:new o.CronMinute(q,{rawValue:ce.minute}),hour:new o.CronHour($,{rawValue:ce.hour}),dayOfMonth:new o.CronDayOfMonth(ge,{rawValue:ce.dayOfMonth}),month:new o.CronMonth(ie,{rawValue:ce.month}),dayOfWeek:new o.CronDayOfWeek(A,{rawValue:ce.dayOfWeek,nthDayOfWeek:De})});return new r.CronExpression(se,{...ne,expression:W})}},x=new WeakSet,sy=function(W,ne){if(ne&&!W.length)throw new Error("Invalid cron expression");W=W||"0 * * * * *";const z=W.trim().split(/\s+/);if(ne&&z.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(z.length>6)throw new Error("Invalid cron expression, too many fields");const I=["*","*","*","*","*","0"];z.length<I.length&&z.unshift(...I.slice(z.length));const[_,ce,he,q,$,ie]=z;return{second:_,minute:ce,hour:he,dayOfMonth:q,month:$,dayOfWeek:ie}},Us=function(W,ne,z,I){if((W===f.Month||W===f.DayOfWeek)&&(ne=ne.replace(/[a-z]{3}/gi,_=>{_=_.toLowerCase();const ce=v[_]||N[_];if(ce===void 0)throw new Error(`Validation error, cannot resolve alias "${_}"`);return ce.toString()})),!z.validChars.test(ne))throw new Error(`Invalid characters, got value: ${ne}`);return ne=we(this,x,ry).call(this,ne,z),ne=we(this,x,iy).call(this,ne,z,I),we(this,x,uy).call(this,W,ne,z)},ry=function(W,ne){return W.replace(/[*?]/g,ne.min+"-"+ne.max)},iy=function(W,ne,z){const I=z();return W.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(_,ce,he,q)=>{if(ce&&he&&q){const $=parseInt(ce,10),ie=parseInt(he,10),ge=parseInt(q,10);if($>ie)throw new Error(`Invalid range: ${$}-${ie}, min > max`);if(ge<=0)throw new Error(`Invalid step: ${ge}, must be positive`);const Se=Math.max($,ne.min),De=Math.floor(I*ge),A=[];for(let se=Math.floor(Se/ge)*ge+De;se<=ie;se+=ge)se>=Se&&A.push(se);return A.join(",")}else if(ce&&he){const $=parseInt(ce,10),ie=parseInt(he,10);if($>ie)throw new Error(`Invalid range: ${$}-${ie}, min > max`);return String(Math.floor(I*(ie-$+1))+$)}else if(q){const $=parseInt(q,10);if($<=0)throw new Error(`Invalid step: ${$}, must be positive`);const ie=Math.floor(I*$),ge=[];for(let Se=Math.floor(ne.min/$)*$+ie;Se<=ne.max;Se+=$)Se>=ne.min&&ge.push(Se);return ge.join(",")}else return String(Math.floor(I*(ne.max-ne.min+1)+ne.min))})},uy=function(W,ne,z){const I=[];function _(he,q){var $;if(Array.isArray(he))I.push(...he);else if(we($=S,x,my).call($,q,he))I.push(he);else{const ie=parseInt(he.toString(),10);if(!(ie>=q.min&&ie<=q.max))throw new Error(`Constraint error, got value ${he} expected range ${q.min}-${q.max}`);I.push(W===f.DayOfWeek?ie%7:he)}}return ne.split(",").forEach(he=>{var q;if(!(he.length>0))throw new Error("Invalid list value format");_(we(q=S,x,cy).call(q,W,he,z),z)}),I},cy=function(W,ne,z){var _,ce;const I=ne.split("/");if(I.length>2)throw new Error(`Invalid repeat: ${ne}`);return I.length===2?(isNaN(parseInt(I[0],10))||(I[0]=`${I[0]}-${z.max}`),we(_=S,x,kf).call(_,W,I[0],parseInt(I[1],10),z)):we(ce=S,x,kf).call(ce,W,ne,1,z)},oy=function(W,ne,z){if(!(!isNaN(W)&&!isNaN(ne)&&W>=z.min&&ne<=z.max))throw new Error(`Constraint error, got range ${W}-${ne} expected range ${z.min}-${z.max}`);if(W>ne)throw new Error(`Invalid range: ${W}-${ne}, min(${W}) > max(${ne})`)},dy=function(W){if(!(!isNaN(W)&&W>0))throw new Error(`Constraint error, cannot repeat at every ${W} time.`)},fy=function(W,ne,z,I){const _=[];W===f.DayOfWeek&&z%7===0&&_.push(0);for(let ce=ne;ce<=z;ce+=I)_.indexOf(ce)===-1&&_.push(ce);return _},kf=function(W,ne,z,I){const _=ne.split("-");if(_.length<=1)return isNaN(+ne)?ne:+ne;const[ce,he]=_.map(q=>parseInt(q,10));return we(this,x,oy).call(this,ce,he,I),we(this,x,dy).call(this,z),we(this,x,fy).call(this,W,ce,he,z)},hy=function(W){const ne=W.split("#");if(ne.length<=1)return{dayOfWeek:ne[0]};const z=+ne[ne.length-1],I=W.match(/([,-/])/);if(I!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${I==null?void 0:I[0]}\` special characters are incompatible`);if(!(ne.length<=2&&!isNaN(z)&&z>=1&&z<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:ne[0],nthDayOfWeek:z}},my=function(W,ne){return W.chars.some(z=>ne.toString().includes(z))},ut(S,x),S);return Ba.CronExpressionParser=b,Ba}var xn={};const f2={},h2=Object.freeze(Object.defineProperty({__proto__:null,default:f2},Symbol.toStringTag,{value:"Module"})),Yg=$p(h2);var $g;function m2(){var f,v,zf,gy;if($g)return xn;$g=1;var l=xn&&xn.__createBinding||(Object.create?(function(x,S,T,j){j===void 0&&(j=T);var D=Object.getOwnPropertyDescriptor(S,T);(!D||("get"in D?!S.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return S[T]}}),Object.defineProperty(x,j,D)}):(function(x,S,T,j){j===void 0&&(j=T),x[j]=S[T]})),r=xn&&xn.__setModuleDefault||(Object.create?(function(x,S){Object.defineProperty(x,"default",{enumerable:!0,value:S})}):function(x,S){x.default=S}),c=xn&&xn.__importStar||(function(){var x=function(S){return x=Object.getOwnPropertyNames||function(T){var j=[];for(var D in T)Object.prototype.hasOwnProperty.call(T,D)&&(j[j.length]=D);return j},x(S)};return function(S){if(S&&S.__esModule)return S;var T={};if(S!=null)for(var j=x(S),D=0;D<j.length;D++)j[D]!=="default"&&l(T,S,j[D]);return r(T,S),T}})();Object.defineProperty(xn,"__esModule",{value:!0}),xn.CronFileParser=void 0;const o=_f();let h=(v=class{static async parseFile(S){var D;const{readFile:T}=await Promise.resolve().then(()=>c(Yg)),j=await T(S,"utf8");return we(D=v,f,zf).call(D,j)}static parseFileSync(S){var D;const{readFileSync:T}=Yg,j=T(S,"utf8");return we(D=v,f,zf).call(D,j)}},f=new WeakSet,zf=function(S){var D;const T=S.split(`
|
|
386
|
+
`),j={variables:{},expressions:[],errors:{}};for(const C of T){const M=C.trim();if(M.length===0||M.startsWith("#"))continue;const R=M.match(/^(.*)=(.*)$/);if(R){const[,Q,Y]=R;j.variables[Q]=Y.replace(/["']/g,"");continue}try{const Q=we(D=v,f,gy).call(D,M);j.expressions.push(Q.interval)}catch(Q){j.errors[M]=Q}}return j},gy=function(S){const T=S.split(" ");return{interval:o.CronExpressionParser.parse(T.slice(0,5).join(" ")),command:T.slice(5,T.length)}},ut(v,f),v);return xn.CronFileParser=h,xn}var Fg;function g2(){return Fg||(Fg=1,(function(l){var r=Rs&&Rs.__createBinding||(Object.create?(function(x,S,T,j){j===void 0&&(j=T);var D=Object.getOwnPropertyDescriptor(S,T);(!D||("get"in D?!S.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return S[T]}}),Object.defineProperty(x,j,D)}):(function(x,S,T,j){j===void 0&&(j=T),x[j]=S[T]})),c=Rs&&Rs.__exportStar||function(x,S){for(var T in x)T!=="default"&&!Object.prototype.hasOwnProperty.call(S,T)&&r(S,x,T)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const o=_f();var h=eh();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return h.CronDate}});var f=Xx();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var v=ly();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return v.CronExpression}});var N=_f();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return N.CronExpressionParser}});var b=m2();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return b.CronFileParser}}),c(th(),l),l.default=o.CronExpressionParser})(Rs)),Rs}var x2=g2();const xy=6048e5,y2=864e5,p2=6e4,v2=36e5,Gg=Symbol.for("constructDateFrom");function Va(l,r){return typeof l=="function"?l(r):l&&typeof l=="object"&&Gg in l?l[Gg](r):l instanceof Date?new l.constructor(r):new Date(r)}function Lt(l,r){return Va(r||l,l)}function b2(l,r,c){return Va(l,+Lt(l)+r)}function Bc(l,r,c){return b2(l,r*v2)}let S2={};function lo(){return S2}function iu(l,r){var N,b,x,S;const c=lo(),o=(r==null?void 0:r.weekStartsOn)??((b=(N=r==null?void 0:r.locale)==null?void 0:N.options)==null?void 0:b.weekStartsOn)??c.weekStartsOn??((S=(x=c.locale)==null?void 0:x.options)==null?void 0:S.weekStartsOn)??0,h=Lt(l,r==null?void 0:r.in),f=h.getDay(),v=(f<o?7:0)+f-o;return h.setDate(h.getDate()-v),h.setHours(0,0,0,0),h}function Xc(l,r){return iu(l,{...r,weekStartsOn:1})}function yy(l,r){const c=Lt(l,r==null?void 0:r.in),o=c.getFullYear(),h=Va(c,0);h.setFullYear(o+1,0,4),h.setHours(0,0,0,0);const f=Xc(h),v=Va(c,0);v.setFullYear(o,0,4),v.setHours(0,0,0,0);const N=Xc(v);return c.getTime()>=f.getTime()?o+1:c.getTime()>=N.getTime()?o:o-1}function Pg(l){const r=Lt(l),c=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return c.setUTCFullYear(r.getFullYear()),+l-+c}function N2(l,...r){const c=Va.bind(null,r.find(o=>typeof o=="object"));return r.map(c)}function Zg(l,r){const c=Lt(l,r==null?void 0:r.in);return c.setHours(0,0,0,0),c}function w2(l,r,c){const[o,h]=N2(c==null?void 0:c.in,l,r),f=Zg(o),v=Zg(h),N=+f-Pg(f),b=+v-Pg(v);return Math.round((N-b)/y2)}function j2(l,r){const c=yy(l,r),o=Va(l,0);return o.setFullYear(c,0,4),o.setHours(0,0,0,0),Xc(o)}function E2(l,r){let c,o=r==null?void 0:r.in;return l.forEach(h=>{!o&&typeof h=="object"&&(o=Va.bind(null,h));const f=Lt(h,o);(!c||c<f||isNaN(+f))&&(c=f)}),Va(o,c||NaN)}function T2(l,r){let c,o=r==null?void 0:r.in;return l.forEach(h=>{!o&&typeof h=="object"&&(o=Va.bind(null,h));const f=Lt(h,o);(!c||c>f||isNaN(+f))&&(c=f)}),Va(o,c||NaN)}function M2(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function C2(l){return!(!M2(l)&&typeof l!="number"||isNaN(+Lt(l)))}function O2(l){return r=>{const o=(l?Math[l]:Math.trunc)(r);return o===0?0:o}}function D2(l,r){return+Lt(l)-+Lt(r)}function Wg(l,r,c){const o=D2(l,r)/p2;return O2(c==null?void 0:c.roundingMethod)(o)}function R2(l,r){const c=Lt(l,r==null?void 0:r.in);return c.setFullYear(c.getFullYear(),0,1),c.setHours(0,0,0,0),c}const A2={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"}},k2=(l,r,c)=>{let o;const h=A2[l];return typeof h=="string"?o=h:r===1?o=h.one:o=h.other.replace("{{count}}",r.toString()),c!=null&&c.addSuffix?c.comparison&&c.comparison>0?"in "+o:o+" ago":o};function jf(l){return(r={})=>{const c=r.width?String(r.width):l.defaultWidth;return l.formats[c]||l.formats[l.defaultWidth]}}const _2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},z2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},U2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},q2={date:jf({formats:_2,defaultWidth:"full"}),time:jf({formats:z2,defaultWidth:"full"}),dateTime:jf({formats:U2,defaultWidth:"full"})},H2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},L2=(l,r,c,o)=>H2[l];function tu(l){return(r,c)=>{const o=c!=null&&c.context?String(c.context):"standalone";let h;if(o==="formatting"&&l.formattingValues){const v=l.defaultFormattingWidth||l.defaultWidth,N=c!=null&&c.width?String(c.width):v;h=l.formattingValues[N]||l.formattingValues[v]}else{const v=l.defaultWidth,N=c!=null&&c.width?String(c.width):l.defaultWidth;h=l.values[N]||l.values[v]}const f=l.argumentCallback?l.argumentCallback(r):r;return h[f]}}const B2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},V2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Y2={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"]},$2={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"]},F2={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"}},G2={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"}},P2=(l,r)=>{const c=Number(l),o=c%100;if(o>20||o<10)switch(o%10){case 1:return c+"st";case 2:return c+"nd";case 3:return c+"rd"}return c+"th"},Z2={ordinalNumber:P2,era:tu({values:B2,defaultWidth:"wide"}),quarter:tu({values:V2,defaultWidth:"wide",argumentCallback:l=>l-1}),month:tu({values:Y2,defaultWidth:"wide"}),day:tu({values:$2,defaultWidth:"wide"}),dayPeriod:tu({values:F2,defaultWidth:"wide",formattingValues:G2,defaultFormattingWidth:"wide"})};function au(l){return(r,c={})=>{const o=c.width,h=o&&l.matchPatterns[o]||l.matchPatterns[l.defaultMatchWidth],f=r.match(h);if(!f)return null;const v=f[0],N=o&&l.parsePatterns[o]||l.parsePatterns[l.defaultParseWidth],b=Array.isArray(N)?I2(N,T=>T.test(v)):W2(N,T=>T.test(v));let x;x=l.valueCallback?l.valueCallback(b):b,x=c.valueCallback?c.valueCallback(x):x;const S=r.slice(v.length);return{value:x,rest:S}}}function W2(l,r){for(const c in l)if(Object.prototype.hasOwnProperty.call(l,c)&&r(l[c]))return c}function I2(l,r){for(let c=0;c<l.length;c++)if(r(l[c]))return c}function Q2(l){return(r,c={})=>{const o=r.match(l.matchPattern);if(!o)return null;const h=o[0],f=r.match(l.parsePattern);if(!f)return null;let v=l.valueCallback?l.valueCallback(f[0]):f[0];v=c.valueCallback?c.valueCallback(v):v;const N=r.slice(h.length);return{value:v,rest:N}}}const X2=/^(\d+)(th|st|nd|rd)?/i,J2=/\d+/i,K2={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},eN={any:[/^b/i,/^(a|c)/i]},tN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},aN={any:[/1/i,/2/i,/3/i,/4/i]},nN={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},lN={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]},sN={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},rN={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]},iN={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},uN={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}},cN={ordinalNumber:Q2({matchPattern:X2,parsePattern:J2,valueCallback:l=>parseInt(l,10)}),era:au({matchPatterns:K2,defaultMatchWidth:"wide",parsePatterns:eN,defaultParseWidth:"any"}),quarter:au({matchPatterns:tN,defaultMatchWidth:"wide",parsePatterns:aN,defaultParseWidth:"any",valueCallback:l=>l+1}),month:au({matchPatterns:nN,defaultMatchWidth:"wide",parsePatterns:lN,defaultParseWidth:"any"}),day:au({matchPatterns:sN,defaultMatchWidth:"wide",parsePatterns:rN,defaultParseWidth:"any"}),dayPeriod:au({matchPatterns:iN,defaultMatchWidth:"any",parsePatterns:uN,defaultParseWidth:"any"})},oN={code:"en-US",formatDistance:k2,formatLong:q2,formatRelative:L2,localize:Z2,match:cN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dN(l,r){const c=Lt(l,r==null?void 0:r.in);return w2(c,R2(c))+1}function fN(l,r){const c=Lt(l,r==null?void 0:r.in),o=+Xc(c)-+j2(c);return Math.round(o/xy)+1}function py(l,r){var S,T,j,D;const c=Lt(l,r==null?void 0:r.in),o=c.getFullYear(),h=lo(),f=(r==null?void 0:r.firstWeekContainsDate)??((T=(S=r==null?void 0:r.locale)==null?void 0:S.options)==null?void 0:T.firstWeekContainsDate)??h.firstWeekContainsDate??((D=(j=h.locale)==null?void 0:j.options)==null?void 0:D.firstWeekContainsDate)??1,v=Va((r==null?void 0:r.in)||l,0);v.setFullYear(o+1,0,f),v.setHours(0,0,0,0);const N=iu(v,r),b=Va((r==null?void 0:r.in)||l,0);b.setFullYear(o,0,f),b.setHours(0,0,0,0);const x=iu(b,r);return+c>=+N?o+1:+c>=+x?o:o-1}function hN(l,r){var N,b,x,S;const c=lo(),o=(r==null?void 0:r.firstWeekContainsDate)??((b=(N=r==null?void 0:r.locale)==null?void 0:N.options)==null?void 0:b.firstWeekContainsDate)??c.firstWeekContainsDate??((S=(x=c.locale)==null?void 0:x.options)==null?void 0:S.firstWeekContainsDate)??1,h=py(l,r),f=Va((r==null?void 0:r.in)||l,0);return f.setFullYear(h,0,o),f.setHours(0,0,0,0),iu(f,r)}function mN(l,r){const c=Lt(l,r==null?void 0:r.in),o=+iu(c,r)-+hN(c,r);return Math.round(o/xy)+1}function ft(l,r){const c=l<0?"-":"",o=Math.abs(l).toString().padStart(r,"0");return c+o}const $l={y(l,r){const c=l.getFullYear(),o=c>0?c:1-c;return ft(r==="yy"?o%100:o,r.length)},M(l,r){const c=l.getMonth();return r==="M"?String(c+1):ft(c+1,2)},d(l,r){return ft(l.getDate(),r.length)},a(l,r){const c=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h(l,r){return ft(l.getHours()%12||12,r.length)},H(l,r){return ft(l.getHours(),r.length)},m(l,r){return ft(l.getMinutes(),r.length)},s(l,r){return ft(l.getSeconds(),r.length)},S(l,r){const c=r.length,o=l.getMilliseconds(),h=Math.trunc(o*Math.pow(10,c-3));return ft(h,r.length)}},Ar={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ig={G:function(l,r,c){const o=l.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return c.era(o,{width:"abbreviated"});case"GGGGG":return c.era(o,{width:"narrow"});case"GGGG":default:return c.era(o,{width:"wide"})}},y:function(l,r,c){if(r==="yo"){const o=l.getFullYear(),h=o>0?o:1-o;return c.ordinalNumber(h,{unit:"year"})}return $l.y(l,r)},Y:function(l,r,c,o){const h=py(l,o),f=h>0?h:1-h;if(r==="YY"){const v=f%100;return ft(v,2)}return r==="Yo"?c.ordinalNumber(f,{unit:"year"}):ft(f,r.length)},R:function(l,r){const c=yy(l);return ft(c,r.length)},u:function(l,r){const c=l.getFullYear();return ft(c,r.length)},Q:function(l,r,c){const o=Math.ceil((l.getMonth()+1)/3);switch(r){case"Q":return String(o);case"QQ":return ft(o,2);case"Qo":return c.ordinalNumber(o,{unit:"quarter"});case"QQQ":return c.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return c.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return c.quarter(o,{width:"wide",context:"formatting"})}},q:function(l,r,c){const o=Math.ceil((l.getMonth()+1)/3);switch(r){case"q":return String(o);case"qq":return ft(o,2);case"qo":return c.ordinalNumber(o,{unit:"quarter"});case"qqq":return c.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return c.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return c.quarter(o,{width:"wide",context:"standalone"})}},M:function(l,r,c){const o=l.getMonth();switch(r){case"M":case"MM":return $l.M(l,r);case"Mo":return c.ordinalNumber(o+1,{unit:"month"});case"MMM":return c.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return c.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return c.month(o,{width:"wide",context:"formatting"})}},L:function(l,r,c){const o=l.getMonth();switch(r){case"L":return String(o+1);case"LL":return ft(o+1,2);case"Lo":return c.ordinalNumber(o+1,{unit:"month"});case"LLL":return c.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return c.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return c.month(o,{width:"wide",context:"standalone"})}},w:function(l,r,c,o){const h=mN(l,o);return r==="wo"?c.ordinalNumber(h,{unit:"week"}):ft(h,r.length)},I:function(l,r,c){const o=fN(l);return r==="Io"?c.ordinalNumber(o,{unit:"week"}):ft(o,r.length)},d:function(l,r,c){return r==="do"?c.ordinalNumber(l.getDate(),{unit:"date"}):$l.d(l,r)},D:function(l,r,c){const o=dN(l);return r==="Do"?c.ordinalNumber(o,{unit:"dayOfYear"}):ft(o,r.length)},E:function(l,r,c){const o=l.getDay();switch(r){case"E":case"EE":case"EEE":return c.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return c.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return c.day(o,{width:"short",context:"formatting"});case"EEEE":default:return c.day(o,{width:"wide",context:"formatting"})}},e:function(l,r,c,o){const h=l.getDay(),f=(h-o.weekStartsOn+8)%7||7;switch(r){case"e":return String(f);case"ee":return ft(f,2);case"eo":return c.ordinalNumber(f,{unit:"day"});case"eee":return c.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return c.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return c.day(h,{width:"short",context:"formatting"});case"eeee":default:return c.day(h,{width:"wide",context:"formatting"})}},c:function(l,r,c,o){const h=l.getDay(),f=(h-o.weekStartsOn+8)%7||7;switch(r){case"c":return String(f);case"cc":return ft(f,r.length);case"co":return c.ordinalNumber(f,{unit:"day"});case"ccc":return c.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return c.day(h,{width:"narrow",context:"standalone"});case"cccccc":return c.day(h,{width:"short",context:"standalone"});case"cccc":default:return c.day(h,{width:"wide",context:"standalone"})}},i:function(l,r,c){const o=l.getDay(),h=o===0?7:o;switch(r){case"i":return String(h);case"ii":return ft(h,r.length);case"io":return c.ordinalNumber(h,{unit:"day"});case"iii":return c.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return c.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return c.day(o,{width:"short",context:"formatting"});case"iiii":default:return c.day(o,{width:"wide",context:"formatting"})}},a:function(l,r,c){const h=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return c.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"aaa":return c.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return c.dayPeriod(h,{width:"narrow",context:"formatting"});case"aaaa":default:return c.dayPeriod(h,{width:"wide",context:"formatting"})}},b:function(l,r,c){const o=l.getHours();let h;switch(o===12?h=Ar.noon:o===0?h=Ar.midnight:h=o/12>=1?"pm":"am",r){case"b":case"bb":return c.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return c.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return c.dayPeriod(h,{width:"narrow",context:"formatting"});case"bbbb":default:return c.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(l,r,c){const o=l.getHours();let h;switch(o>=17?h=Ar.evening:o>=12?h=Ar.afternoon:o>=4?h=Ar.morning:h=Ar.night,r){case"B":case"BB":case"BBB":return c.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return c.dayPeriod(h,{width:"narrow",context:"formatting"});case"BBBB":default:return c.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(l,r,c){if(r==="ho"){let o=l.getHours()%12;return o===0&&(o=12),c.ordinalNumber(o,{unit:"hour"})}return $l.h(l,r)},H:function(l,r,c){return r==="Ho"?c.ordinalNumber(l.getHours(),{unit:"hour"}):$l.H(l,r)},K:function(l,r,c){const o=l.getHours()%12;return r==="Ko"?c.ordinalNumber(o,{unit:"hour"}):ft(o,r.length)},k:function(l,r,c){let o=l.getHours();return o===0&&(o=24),r==="ko"?c.ordinalNumber(o,{unit:"hour"}):ft(o,r.length)},m:function(l,r,c){return r==="mo"?c.ordinalNumber(l.getMinutes(),{unit:"minute"}):$l.m(l,r)},s:function(l,r,c){return r==="so"?c.ordinalNumber(l.getSeconds(),{unit:"second"}):$l.s(l,r)},S:function(l,r){return $l.S(l,r)},X:function(l,r,c){const o=l.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Xg(o);case"XXXX":case"XX":return qs(o);case"XXXXX":case"XXX":default:return qs(o,":")}},x:function(l,r,c){const o=l.getTimezoneOffset();switch(r){case"x":return Xg(o);case"xxxx":case"xx":return qs(o);case"xxxxx":case"xxx":default:return qs(o,":")}},O:function(l,r,c){const o=l.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Qg(o,":");case"OOOO":default:return"GMT"+qs(o,":")}},z:function(l,r,c){const o=l.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Qg(o,":");case"zzzz":default:return"GMT"+qs(o,":")}},t:function(l,r,c){const o=Math.trunc(+l/1e3);return ft(o,r.length)},T:function(l,r,c){return ft(+l,r.length)}};function Qg(l,r=""){const c=l>0?"-":"+",o=Math.abs(l),h=Math.trunc(o/60),f=o%60;return f===0?c+String(h):c+String(h)+r+ft(f,2)}function Xg(l,r){return l%60===0?(l>0?"-":"+")+ft(Math.abs(l)/60,2):qs(l,r)}function qs(l,r=""){const c=l>0?"-":"+",o=Math.abs(l),h=ft(Math.trunc(o/60),2),f=ft(o%60,2);return c+h+r+f}const Jg=(l,r)=>{switch(l){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},vy=(l,r)=>{switch(l){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},gN=(l,r)=>{const c=l.match(/(P+)(p+)?/)||[],o=c[1],h=c[2];if(!h)return Jg(l,r);let f;switch(o){case"P":f=r.dateTime({width:"short"});break;case"PP":f=r.dateTime({width:"medium"});break;case"PPP":f=r.dateTime({width:"long"});break;case"PPPP":default:f=r.dateTime({width:"full"});break}return f.replace("{{date}}",Jg(o,r)).replace("{{time}}",vy(h,r))},xN={p:vy,P:gN},yN=/^D+$/,pN=/^Y+$/,vN=["D","DD","YY","YYYY"];function bN(l){return yN.test(l)}function SN(l){return pN.test(l)}function NN(l,r,c){const o=wN(l,r,c);if(console.warn(o),vN.includes(l))throw new RangeError(o)}function wN(l,r,c){const o=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${r}\`) for formatting ${o} to the input \`${c}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const jN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,TN=/^'([^]*?)'?$/,MN=/''/g,CN=/[a-zA-Z]/;function ks(l,r,c){var S,T,j,D;const o=lo(),h=o.locale??oN,f=o.firstWeekContainsDate??((T=(S=o.locale)==null?void 0:S.options)==null?void 0:T.firstWeekContainsDate)??1,v=o.weekStartsOn??((D=(j=o.locale)==null?void 0:j.options)==null?void 0:D.weekStartsOn)??0,N=Lt(l,c==null?void 0:c.in);if(!C2(N))throw new RangeError("Invalid time value");let b=r.match(EN).map(C=>{const M=C[0];if(M==="p"||M==="P"){const R=xN[M];return R(C,h.formatLong)}return C}).join("").match(jN).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const M=C[0];if(M==="'")return{isToken:!1,value:ON(C)};if(Ig[M])return{isToken:!0,value:C};if(M.match(CN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:C}});h.localize.preprocessor&&(b=h.localize.preprocessor(N,b));const x={firstWeekContainsDate:f,weekStartsOn:v,locale:h};return b.map(C=>{if(!C.isToken)return C.value;const M=C.value;(SN(M)||bN(M))&&NN(M,r,String(l));const R=Ig[M[0]];return R(N,M,h.localize,x)}).join("")}function ON(l){const r=l.match(TN);return r?r[1].replace(MN,"'"):l}function DN(l,r){return+Lt(l)>+Lt(r)}function RN(l,r){return+Lt(l)<+Lt(r)}function AN(l,r){const c=Lt(l,r==null?void 0:r.in);return c.setMinutes(0,0,0),c}const Ef=_x,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"}],tl=160,Yc=14,kN=10,_N=7,Kg=4,by=({configs:l,currentProjectId:r,onEditJob:c,queueStatus:o,queueAnalytics:h})=>{const f=U.useMemo(()=>AN(new Date),[]),v=U.useMemo(()=>Bc(f,24),[f]),N=U.useMemo(()=>Bc(f,-24),[f]),b=v,x=U.useMemo(()=>{const ee=[];for(let de=0;de<=24;de++)ee.push(Bc(f,de));return ee},[f]),S=U.useMemo(()=>{const ee=[];return l.forEach(({projectId:de,config:Z})=>{var ne,z;const P={executor:Z.executorEnabled!==!1?Z.cronSchedule:null,reviewer:Z.reviewerEnabled?Z.reviewerSchedule:null,qa:Z.qa.enabled?Z.qa.schedule:null,audit:Z.audit.enabled?Z.audit.schedule:null,slicer:Z.roadmapScanner.enabled?Z.roadmapScanner.slicerSchedule:null,analytics:(ne=Z.analytics)!=null&&ne.enabled?(z=Z.analytics)==null?void 0:z.schedule:null},W=Z.cronScheduleOffset||0;Object.entries(P).forEach(([I,_])=>{if(_)try{const ce=x2.CronExpressionParser.parse(_,{currentDate:f,endDate:v});for(;ce.hasNext();){const he=ce.next(),q=new Date(he.getTime());q.setMinutes(q.getMinutes()+W),DN(q,f)&&RN(q,v)&&ee.push({projectId:de,jobType:I,time:q})}}catch(ce){console.error(`Failed to parse cron "${_}" for ${de}/${I}`,ce)}})}),ee},[l,f,v]),T=U.useMemo(()=>{const ee=new Set;return l.length===0||(l.every(de=>de.config.executorEnabled===!1)&&ee.add("executor"),l.every(de=>!de.config.reviewerEnabled)&&ee.add("reviewer"),l.every(de=>!de.config.qa.enabled)&&ee.add("qa"),l.every(de=>!de.config.audit.enabled)&&ee.add("audit"),l.every(de=>!de.config.roadmapScanner.enabled)&&ee.add("slicer"),l.every(de=>{var Z;return!((Z=de.config.analytics)!=null&&Z.enabled)})&&ee.add("analytics")),ee},[l]),j=U.useMemo(()=>{const ee=new Map;let de=0;return l.forEach(Z=>{Z.projectId===r||(ee.set(Z.projectId,de%Vc.length),de++)}),ee},[l,r]),D=ee=>Wg(ee,f),C=U.useMemo(()=>{const ee=[];for(let de=0;de<=24;de++)ee.push(Bc(N,de));return ee},[N]),M=ee=>{const de=T2([E2([ee,N]),b]);return Wg(de,N)},R=U.useMemo(()=>{const ee=(h==null?void 0:h.recentRuns)??[],de=new Map;for(const Z of ee){const P=Z.providerKey||"default",W=new Date(Z.startedAt*1e3),ne=Z.finishedAt?new Date(Z.finishedAt*1e3):new Date;ne<N||W>b||(de.has(P)||de.set(P,[]),de.get(P).push({id:Z.id,jobType:Z.jobType,status:Z.status,projectPath:Z.projectPath,startedAt:W,finishedAt:ne,throttledCount:Z.throttledCount}))}if(o!=null&&o.running){const Z=o.running.providerKey??"default";de.has(Z)||de.set(Z,[]),de.get(Z).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(de.entries()).sort(([Z],[P])=>Z.localeCompare(P)).map(([Z,P])=>({providerKey:Z,runs:P.sort((W,ne)=>W.startedAt.getTime()-ne.startedAt.getTime())}))},[b,N,h,o]),Q=ee=>ee.split(/[-_]/).map(de=>de.charAt(0).toUpperCase()+de.slice(1)).join(" "),Y=l.length>1,G=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:x.map((ee,de)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},de))});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."})]}),Y&&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(ee=>ee.projectId!==r).slice(0,5).map(ee=>{const de=j.get(ee.projectId)??0,Z=Vc[de],P=(ee.projectId.split("/").pop()??ee.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 ${Z.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:ee.projectId,children:P})]},ee.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+tl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:tl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:x.map((ee,de)=>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:de*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:ks(ee,"HH:mm")})},de))})]}),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."})}),Ef.map(ee=>{const de=T.has(ee.id),Z=S.filter(W=>W.jobType===ee.id);if(!Y)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${de?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:tl},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 ${ee.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:ee.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[G,Z.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:de?"Disabled":"No runs in this window"})}):Z.map((W,ne)=>s.jsx("button",{type:"button",onClick:()=>c==null?void 0:c(W.projectId,W.jobType),style:{left:D(W.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${ee.color.bg} ${ee.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${ee.label} at ${ks(W.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:ks(W.time,"HH:mm")})},ne))]})]},ee.id);const P=l.length*Yc+Kg*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${de?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:tl,height:P},className:"shrink-0 border-r border-slate-800/50 flex flex-col px-2 py-1",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[s.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${ee.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:ee.label})]}),l.map(W=>{const ne=W.projectId===r,z=(W.projectId.split("/").pop()??W.projectId).slice(0,14),I=j.get(W.projectId)??0,_=ne?ee.color.bg:Vc[I].bg;return s.jsxs("div",{style:{height:Yc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${_}`}),s.jsx("span",{className:`text-[9px] truncate ${ne?"text-slate-200 font-semibold":"text-slate-600"}`,title:W.projectId,children:ne?`${z} ★`:z})]},W.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:P},children:[G,l.map((W,ne)=>{const z=W.projectId===r,I=Z.filter(ie=>ie.projectId===W.projectId),_=Kg+ne*Yc,ce=z?kN:_N,he=Math.floor((Yc-ce)/2),q=j.get(W.projectId)??0,$=z?{bg:ee.color.bg,border:ee.color.border}:Vc[q];return s.jsxs(qe.Fragment,{children:[ne>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:_}}),I.map((ie,ge)=>s.jsx("button",{type:"button",onClick:()=>c==null?void 0:c(W.projectId,ie.jobType),style:{left:D(ie.time)-3,top:_+he,height:ce},className:`absolute w-6 rounded border ${$.bg} ${$.border} ${z?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${W.projectId} · ${ee.label} @ ${ks(ie.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:ks(ie.time,"HH:mm")})},ge))]},W.projectId)}),Z.length===0&&!de&&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"})})]})]},ee.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:tl+D(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"})]}),Y&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),R.length>0&&s.jsxs("div",{className:"border-t border-slate-800",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Recent Execution Runs"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Last 24h of real runs grouped by provider bucket."})]}),s.jsxs("div",{className:"text-[10px] uppercase tracking-[0.2em] text-slate-500",children:[(h==null?void 0:h.recentRuns.length)??0," recorded runs"]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar","data-testid":"provider-execution-timeline",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+tl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:tl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:C.map((ee,de)=>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:de*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:ks(ee,"HH:mm")})},de))})]}),s.jsx("div",{className:"relative",children:R.map(({providerKey:ee,runs:de})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${ee}`,children:[s.jsxs("div",{style:{width:tl},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:ee,children:Q(ee)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:ee})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:C.map((Z,P)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},P))}),de.map(Z=>{const P=Ef.find(q=>q.id===Z.jobType)??Ef[0],W=M(Z.startedAt),ne=M(Z.finishedAt),z=Math.max(ne-W,8),I=Z.status==="running",_=Z.status==="error"||Z.status==="failed"||Z.status==="errored",ce=I?"bg-green-500":_?"bg-red-500":P.color.bg,he=I?"border-green-400/60":_?"border-red-400/60":P.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ce} ${he} opacity-85 shadow-lg ${I?"animate-pulse":""}`,style:{left:W,width:z},title:`${ee} • ${P.label} • ${ks(Z.startedAt,"MMM d HH:mm")} • ${Z.status}`,"data-testid":"provider-execution-run",children:s.jsxs("div",{className:"h-full px-2 flex items-center justify-between gap-2 text-[10px] text-white/90 overflow-hidden whitespace-nowrap",children:[s.jsx("span",{className:"font-semibold uppercase tracking-wide",children:P.label}),s.jsx("span",{className:"text-white/70",children:Z.status}),Z.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",Z.throttledCount,"x"]})]})},`${ee}-${Z.id}-${Z.startedAt.getTime()}`)})]})]},ee))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:tl+M(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},Sy=({form:l,scheduleMode:r,selectedTemplateId:c,onFieldChange:o,onSwitchToTemplate:h,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:N,currentProjectId:b,onEditJob:x})=>s.jsxs(et,{className:"p-6 space-y-6",children:[N&&N.length>0&&s.jsx(by,{configs:N,currentProjectId:b,onEditJob:x}),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 ${r==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:h,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Custom"})]})]}),r==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Kf.map(S=>{const T=c===S.id;return s.jsxs("button",{type:"button",onClick:()=>v(S),className:`text-left p-4 rounded-lg border transition-colors ${T?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children:S.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:S.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",S.hints.executor],["Reviewer",S.hints.reviewer],["QA",S.hints.qa],["Audit",S.hints.audit]].map(([j,D])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:j}),s.jsx("span",{className:"text-xs text-slate-400",children:D})]},j))})]},S.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(nl,{label:"PRD Execution Schedule",value:l.cronSchedule,onChange:S=>o("cronSchedule",S)}),s.jsx(nl,{label:"PR Review Schedule",value:l.reviewerSchedule,onChange:S=>o("reviewerSchedule",S)}),s.jsx(nl,{label:"QA Schedule",value:l.qa.schedule,onChange:S=>o("qa",{...l.qa,schedule:S})}),s.jsx(nl,{label:"Audit Schedule",value:l.audit.schedule,onChange:S=>o("audit",{...l.audit,schedule:S})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(ra,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:S=>o("schedulingPriority",Number(S)),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(ga,{checked:l.globalQueueEnabled??!0,onChange:S=>o("globalQueueEnabled",S)})]})}),s.jsx(He,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:S=>{const T=Math.min(59,Math.max(0,Number(S.target.value||0)));o("cronScheduleOffset",T)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]}),zN=()=>{var At,ya,ua,an;const{addToast:l,selectedProjectId:r,globalModeLoading:c}=Jt(),[o,h]=U.useState("overview"),[f,v]=U.useState(!1),[N,b]=U.useState(!1),[x,S]=U.useState(null),[T,j]=U.useState(null),[D,C]=U.useState([]),[M,R]=U.useState(null),[Q,Y]=U.useState(null),[G,ee]=U.useState({form:{cronSchedule:"5 */3 * * *",reviewerSchedule:"25 */6 * * *",qa:{schedule:"45 2,14 * * *",enabled:!0},audit:{schedule:"50 3 * * 1",enabled:!0},analytics:{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{slicerSchedule:"35 */12 * * *",enabled:!0},merger:{schedule:"55 */4 * * *",enabled:!1},scheduleBundleId:null,schedulingPriority:3,cronScheduleOffset:0,globalQueueEnabled:!0},scheduleMode:"template",selectedTemplateId:"always-on",isDirty:!1,queueMode:"auto",globalMaxConcurrency:1,providerBuckets:[]}),[de,Z]=U.useState(""),[P,W]=U.useState("1"),[ne,z]=U.useState(!1),{data:I,loading:_,error:ce,refetch:he}=yn(Bx,[r],{enabled:!c}),{data:q,loading:$,refetch:ie}=yn(Jf,[r],{enabled:!c});U.useEffect(()=>{const le=setInterval(()=>{he()},3e4);return()=>clearInterval(le)},[he]),U.useEffect(()=>{c||Lx().then(C).catch(console.error)},[r,c]),U.useEffect(()=>{if(c)return;const le=()=>{vS().then(R).catch(()=>{}),bS(24).then(Y).catch(()=>{})};le();const pe=setInterval(le,3e4);return()=>clearInterval(pe)},[c,r]),U.useEffect(()=>{var le,pe,Re,Ue,Ge,Ke,kt,Mt,Gt,ca,$e,ba;if(q&&!G.isDirty){const yt=nu(q.scheduleBundleId,q.cronSchedule,q.reviewerSchedule,((le=q.qa)==null?void 0:le.schedule)||"45 2,14 * * *",((pe=q.audit)==null?void 0:pe.schedule)||"50 3 * * 1",((Re=q.roadmapScanner)==null?void 0:Re.slicerSchedule)||"35 */12 * * *",((Ue=q.merger)==null?void 0:Ue.schedule)??"55 */4 * * *"),wt=((Ge=q.queue)==null?void 0:Ge.providerBuckets)??{};ee({form:{cronSchedule:q.cronSchedule||"5 */3 * * *",reviewerSchedule:q.reviewerSchedule||"25 */6 * * *",qa:q.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:q.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:q.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((Ke=q.roadmapScanner)==null?void 0:Ke.enabled)??!0,slicerSchedule:((kt=q.roadmapScanner)==null?void 0:kt.slicerSchedule)||"35 */12 * * *"},merger:{enabled:((Mt=q.merger)==null?void 0:Mt.enabled)??!1,schedule:((Gt=q.merger)==null?void 0:Gt.schedule)||"55 */4 * * *"},scheduleBundleId:q.scheduleBundleId??null,schedulingPriority:q.schedulingPriority??3,cronScheduleOffset:q.cronScheduleOffset??0,globalQueueEnabled:((ca=q.queue)==null?void 0:ca.enabled)??!0},scheduleMode:yt?"template":"custom",selectedTemplateId:(yt==null?void 0:yt.id)??"",isDirty:!1,queueMode:(($e=q.queue)==null?void 0:$e.mode)??"auto",globalMaxConcurrency:((ba=q.queue)==null?void 0:ba.maxConcurrency)??1,providerBuckets:Object.entries(wt).map(([jt,Rn])=>({key:jt,maxConcurrency:Rn.maxConcurrency}))})}},[q,G.isDirty]);const ge=()=>{ie(),he()},Se=(le,pe)=>le instanceof Error?le.message:pe,De=async()=>{if(I){v(!0);try{I.paused?(await lu(),l({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await hS(),l({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),ge()}catch(le){l({title:"Action Failed",message:Se(le,"Failed to toggle schedule state"),type:"error"})}finally{v(!1)}}},A=async(le,pe)=>{if(!q)return;const Ue=Ux(le==="planner"?"slicer":le);if(Ue){S(le);try{await Ic(Ue.buildEnabledPatch(pe,q));let Ge="";try{await lu()}catch(Ke){Ge=Se(Ke,"Failed to reinstall cron schedules")}ge(),l(Ge?{title:"Job Saved (Cron Reinstall Failed)",message:Ge,type:"warning"}:{title:"Job Updated",message:`${le[0].toUpperCase()+le.slice(1)} ${pe?"enabled":"disabled"}.`,type:"success"})}catch(Ge){l({title:"Update Failed",message:Se(Ge,"Failed to update job configuration"),type:"error"})}finally{S(null)}}},se=async le=>{const pe=le==="planner"?"slicer":le;j(le);try{await fS(pe),l({title:"Job Triggered",message:`${le[0].toUpperCase()+le.slice(1)} job has been queued.`,type:"success"}),he()}catch(Re){l({title:"Trigger Failed",message:Se(Re,`Failed to trigger ${le} job`),type:"error"})}finally{j(null)}},me=(le,pe)=>{ee(Re=>({...Re,form:{...Re.form,[le]:pe},isDirty:!0}))},ye=()=>{var pe;if(!G.form)return;const le=nu(G.form.scheduleBundleId,G.form.cronSchedule,G.form.reviewerSchedule,G.form.qa.schedule,G.form.audit.schedule,G.form.roadmapScanner.slicerSchedule||"35 */12 * * *",((pe=q==null?void 0:q.merger)==null?void 0:pe.schedule)??"55 */4 * * *");ee(Re=>({...Re,scheduleMode:"template",selectedTemplateId:(le==null?void 0:le.id)??"always-on",form:{...Re.form,scheduleBundleId:(le==null?void 0:le.id)??null},isDirty:!0}))},Ce=()=>{ee(le=>({...le,scheduleMode:"custom",selectedTemplateId:"",form:{...le.form,scheduleBundleId:null},isDirty:!0}))},Te=le=>{ee(pe=>({...pe,selectedTemplateId:le.id,scheduleMode:"template",form:{...pe.form,cronSchedule:le.schedules.executor,reviewerSchedule:le.schedules.reviewer,scheduleBundleId:le.id,qa:{...pe.form.qa,schedule:le.schedules.qa},audit:{...pe.form.audit,schedule:le.schedules.audit},roadmapScanner:{...pe.form.roadmapScanner,slicerSchedule:le.schedules.slicer},merger:{...pe.form.merger,schedule:le.schedules.merger}},isDirty:!0}))},Ve=async()=>{var le,pe,Re,Ue;if(q){b(!0);try{await Ic({cronSchedule:G.form.cronSchedule,reviewerSchedule:G.form.reviewerSchedule,scheduleBundleId:G.scheduleMode==="template"?G.form.scheduleBundleId:null,cronScheduleOffset:G.form.cronScheduleOffset,schedulingPriority:G.form.schedulingPriority,qa:{...q.qa,schedule:G.form.qa.schedule},audit:{...q.audit,schedule:G.form.audit.schedule},analytics:{...q.analytics,schedule:((le=G.form.analytics)==null?void 0:le.schedule)||((pe=q.analytics)==null?void 0:pe.schedule)||"0 6 * * 1"},roadmapScanner:{...q.roadmapScanner,slicerSchedule:G.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},merger:{...q.merger,schedule:((Re=G.form.merger)==null?void 0:Re.schedule)||((Ue=q.merger)==null?void 0:Ue.schedule)||"55 */4 * * *"},queue:{...q.queue,enabled:G.form.globalQueueEnabled??!0,mode:G.queueMode,maxConcurrency:G.globalMaxConcurrency,providerBuckets:Object.fromEntries(G.providerBuckets.map(Ke=>[Ke.key,{maxConcurrency:Ke.maxConcurrency}]))},executorEnabled:q.executorEnabled,reviewerEnabled:q.reviewerEnabled});let Ge="";try{await lu()}catch(Ke){Ge=Se(Ke,"Failed to reinstall cron schedules")}ee(Ke=>({...Ke,isDirty:!1})),ge(),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:Se(Ge,"Failed to save schedules"),type:"error"})}finally{b(!1)}}},Nt=le=>{if(!le)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const pe=new Date(le),Re=a2(pe);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Re&&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:e2(pe)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",t2(pe),")"]})]})]})},at=le=>{if(!le||le.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const pe=[];return le.balancedDelayMinutes>0&&pe.push(`auto +${le.balancedDelayMinutes}m`),le.manualDelayMinutes>0&&pe.push(`manual +${le.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:[" ",pe.join(" - ")]})]})},ia=U.useMemo(()=>{var le,pe,Re,Ue,Ge,Ke,kt,Mt,Gt,ca,$e,ba,rt,yt,wt,jt,Rn,Bs;return!q||!I?[]:[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Zc,{className:"h-4 w-4"}),enabled:(q==null?void 0:q.executorEnabled)!==!1,schedule:I.executor.schedule,nextRun:I.executor.nextRun,delayInfo:I.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(no,{className:"h-4 w-4"}),enabled:(q==null?void 0:q.reviewerEnabled)??!1,schedule:I.reviewer.schedule,nextRun:I.reviewer.nextRun,delayInfo:I.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx(W1,{className:"h-4 w-4"}),enabled:((le=q==null?void 0:q.qa)==null?void 0:le.enabled)??!1,schedule:(pe=I.qa)==null?void 0:pe.schedule,nextRun:(Re=I.qa)==null?void 0:Re.nextRun,delayInfo:I.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(pg,{className:"h-4 w-4"}),enabled:((Ue=q==null?void 0:q.audit)==null?void 0:Ue.enabled)??!1,schedule:(Ge=I.audit)==null?void 0:Ge.schedule,nextRun:(Ke=I.audit)==null?void 0:Ke.nextRun,delayInfo:I.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(pg,{className:"h-4 w-4"}),enabled:((kt=q==null?void 0:q.roadmapScanner)==null?void 0:kt.enabled)??!1,schedule:((Mt=I.planner)==null?void 0:Mt.schedule)||((Gt=q.roadmapScanner)==null?void 0:Gt.slicerSchedule)||"35 */12 * * *",nextRun:(ca=I.planner)==null?void 0:ca.nextRun,delayInfo:I.planner},{id:"analytics",name:"Analytics",description:"Fetches Amplitude data, analyzes with AI, and creates board issues",icon:s.jsx(Qb,{className:"h-4 w-4"}),enabled:(($e=q==null?void 0:q.analytics)==null?void 0:$e.enabled)??!1,schedule:((ba=I.analytics)==null?void 0:ba.schedule)||((rt=q.analytics)==null?void 0:rt.schedule)||"0 6 * * 1",nextRun:(yt=I.analytics)==null?void 0:yt.nextRun,delayInfo:I.analytics},{id:"merger",name:"Merger",description:"Repo-wide PR merge orchestrator — merges eligible PRs in FIFO order",icon:s.jsx(bg,{className:"h-4 w-4"}),enabled:((wt=q==null?void 0:q.merger)==null?void 0:wt.enabled)??!1,schedule:((jt=I.merger)==null?void 0:jt.schedule)||((Rn=q.merger)==null?void 0:Rn.schedule)||"55 */4 * * *",nextRun:(Bs=I.merger)==null?void 0:Bs.nextRun,delayInfo:I.merger}]},[q,I]);if(_||$)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(ce||!I||!q)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(rl,{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:(ce==null?void 0:ce.message)||"Unknown error"}),s.jsx(Pe,{onClick:()=>{he(),ie()},children:"Retry"})]});const xa=I.paused,Dn=xa?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",pn=xa?"Paused":"Active",xe=nu(q.scheduleBundleId,q.cronSchedule,q.reviewerSchedule,((At=q.qa)==null?void 0:At.schedule)||"45 2,14 * * *",((ya=q.audit)==null?void 0:ya.schedule)||"50 3 * * 1",((ua=q.roadmapScanner)==null?void 0:ua.slicerSchedule)||"35 */12 * * *",((an=q.merger)==null?void 0:an.schedule)??"55 */4 * * *"),_e=(le,pe,Re)=>!xe||le==="analytics"||!_s(xe.schedules[le],pe)?Tg(Re):`${xe.label} - ${xe.hints[le]}`,Ot=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{className:`p-6 border-2 ${Dn}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Zc,{className:"h-8 w-8"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Automation Status"}),s.jsx("div",{className:"text-2xl font-bold",children:pn}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Pe,{variant:xa?"primary":"outline",size:"lg",onClick:De,loading:f,children:xa?s.jsxs(s.Fragment,{children:[s.jsx(zr,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(Ax,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:ia.map(le=>{var pe,Re,Ue,Ge,Ke,kt,Mt,Gt;return s.jsxs("div",{className:`p-4 rounded-lg border ${le.enabled?"border-slate-800":"border-slate-800 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[le.icon,s.jsx("h4",{className:"text-base font-semibold text-slate-200",children:le.name})]}),s.jsx(ga,{checked:le.enabled,disabled:x!==null,"aria-label":`Toggle ${le.name.toLowerCase()} automation`,onChange:ca=>A(le.id,ca)})]}),le.enabled?s.jsxs("div",{className:"space-y-3 mt-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Schedule"}),s.jsx("div",{className:"text-sm text-slate-200 font-medium",children:_e(le.id==="planner"?"slicer":le.id,le.id==="qa"?((pe=q==null?void 0:q.qa)==null?void 0:pe.schedule)||"":le.id==="audit"?((Re=q==null?void 0:q.audit)==null?void 0:Re.schedule)||"":le.id==="planner"?((Ue=q==null?void 0:q.roadmapScanner)==null?void 0:Ue.slicerSchedule)||"35 */12 * * *":le.id==="analytics"?((Ge=q==null?void 0:q.analytics)==null?void 0:Ge.schedule)||"0 6 * * 1":le.schedule,le.id==="qa"?((Ke=q==null?void 0:q.qa)==null?void 0:Ke.schedule)||"":le.id==="audit"?((kt=q==null?void 0:q.audit)==null?void 0:kt.schedule)||"":le.id==="planner"?((Mt=q==null?void 0:q.roadmapScanner)==null?void 0:Mt.slicerSchedule)||"35 */12 * * *":le.id==="analytics"?((Gt=q==null?void 0:q.analytics)==null?void 0:Gt.schedule)||"0 6 * * 1":le.schedule)})]}),at(le.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),Nt(le.nextRun)]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${le.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(Gc,{className:"h-4 w-4"}),s.jsx("span",{children:le.enabled?"Active":"Disabled"})]}),s.jsxs("button",{disabled:T!==null,onClick:()=>se(le.id),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium text-green-400 bg-green-500/10 hover:bg-green-500/20 border border-green-500/30 hover:border-green-500/50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[T===le.id?s.jsx("div",{className:"h-3 w-3 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(zr,{className:"h-3 w-3 fill-current"}),"Run now"]})]})]}):s.jsxs("div",{className:"text-slate-500 text-sm",children:[le.name," is disabled."]})]},le.id)})})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(by,{configs:D,currentProjectId:r??void 0,onEditJob:(le,pe)=>{},queueStatus:M,queueAnalytics:Q}),s.jsx(Sy,{form:G.form,scheduleMode:G.scheduleMode,selectedTemplateId:G.selectedTemplateId,onFieldChange:me,onSwitchToTemplate:ye,onSwitchToCustom:Ce,onApplyTemplate:Te}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Pe,{variant:"ghost",onClick:()=>{var le,pe,Re,Ue,Ge,Ke,kt,Mt,Gt,ca,$e,ba;if(q){const rt=nu(q.scheduleBundleId,q.cronSchedule,q.reviewerSchedule,((le=q.qa)==null?void 0:le.schedule)||"45 2,14 * * *",((pe=q.audit)==null?void 0:pe.schedule)||"50 3 * * 1",((Re=q.roadmapScanner)==null?void 0:Re.slicerSchedule)||"35 */12 * * *",((Ue=q.merger)==null?void 0:Ue.schedule)??"55 */4 * * *"),yt=((Ge=q.queue)==null?void 0:Ge.providerBuckets)??{};ee({form:{cronSchedule:q.cronSchedule||"5 */3 * * *",reviewerSchedule:q.reviewerSchedule||"25 */6 * * *",qa:q.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:q.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:q.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((Ke=q.roadmapScanner)==null?void 0:Ke.enabled)??!0,slicerSchedule:((kt=q.roadmapScanner)==null?void 0:kt.slicerSchedule)||"35 */12 * * *"},merger:{enabled:((Mt=q.merger)==null?void 0:Mt.enabled)??!1,schedule:((Gt=q.merger)==null?void 0:Gt.schedule)||"55 */4 * * *"},scheduleBundleId:q.scheduleBundleId??null,schedulingPriority:q.schedulingPriority??3,cronScheduleOffset:q.cronScheduleOffset??0,globalQueueEnabled:((ca=q.queue)==null?void 0:ca.enabled)??!0},scheduleMode:rt?"template":"custom",selectedTemplateId:(rt==null?void 0:rt.id)??"",isDirty:!1,queueMode:(($e=q.queue)==null?void 0:$e.mode)??"auto",globalMaxConcurrency:((ba=q.queue)==null?void 0:ba.maxConcurrency)??1,providerBuckets:Object.entries(yt).map(([wt,jt])=>({key:wt,maxConcurrency:jt.maxConcurrency}))}),z(!1),Z(""),W("1")}},disabled:!G.isDirty,children:"Reset"}),s.jsxs(Pe,{onClick:Ve,loading:N,disabled:!G.isDirty,children:[s.jsx(Gc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(et,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(Wf,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),I.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:I.entries.map((le,pe)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:le},pe))})]})},{id:"parallelism",label:"Parallelism",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(bg,{className:"h-5 w-5 text-indigo-400"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Buckets"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Control how jobs from different AI providers are dispatched concurrently."})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ra,{label:"Dispatch Mode",value:G.queueMode,onChange:le=>{ee(pe=>({...pe,queueMode:le,isDirty:!0}))},options:[{label:"Auto — detect providers, balance automatically",value:"auto"},{label:"Conservative — one job at a time globally",value:"conservative"},{label:"Provider-aware — per-bucket concurrency",value:"provider-aware"}],helperText:"Auto (recommended) detects providers and allows cross-provider parallelism with no config. Provider-aware lets you set explicit per-bucket limits."}),s.jsx(He,{label:"Global Max Concurrency",type:"number",min:"1",max:"20",value:String(G.globalMaxConcurrency),onChange:le=>{const pe=Math.min(20,Math.max(1,Number(le.target.value||1)));ee(Re=>({...Re,globalMaxConcurrency:pe,isDirty:!0}))},helperText:"Maximum concurrent jobs across all providers."})]}),G.queueMode==="provider-aware"&&s.jsxs("div",{className:"space-y-3 pt-2 border-t border-slate-800",children:[s.jsx("div",{className:"text-sm font-medium text-slate-300",children:"Configured Buckets"}),G.providerBuckets.length===0&&s.jsx("div",{className:"text-sm text-slate-500",children:"No buckets configured. Add a bucket below to set per-provider concurrency limits."}),G.providerBuckets.map((le,pe)=>{var Ue,Ge;const Re=((Ge=(Ue=Q==null?void 0:Q.byProviderBucket)==null?void 0:Ue[le.key])==null?void 0:Ge.running)??0;return s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-slate-800 bg-slate-950/50",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-sm font-mono text-slate-200 truncate",children:le.key}),Re>0&&s.jsxs("div",{className:"text-xs text-amber-400 mt-0.5",children:[Re," running"]})]}),s.jsx("div",{className:"w-28 shrink-0",children:s.jsx(He,{type:"number",min:"1",max:"10",value:String(le.maxConcurrency),"aria-label":`Max concurrency for ${le.key}`,onChange:Ke=>{const kt=Math.min(10,Math.max(1,Number(Ke.target.value||1)));ee(Mt=>{const Gt=[...Mt.providerBuckets];return Gt[pe]={...Gt[pe],maxConcurrency:kt},{...Mt,providerBuckets:Gt,isDirty:!0}})}})}),s.jsx("button",{type:"button","aria-label":`Remove bucket ${le.key}`,onClick:()=>{ee(Ke=>({...Ke,providerBuckets:Ke.providerBuckets.filter((kt,Mt)=>Mt!==pe),isDirty:!0}))},className:"p-1.5 rounded text-slate-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",children:s.jsx(Lr,{className:"h-4 w-4"})})]},le.key)}),ne?s.jsxs("div",{className:"flex items-end gap-3 p-3 rounded-lg border border-indigo-500/30 bg-indigo-950/20",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(He,{label:"Bucket Key",placeholder:"e.g. claude-native, codex",value:de,onChange:le=>Z(le.target.value),helperText:"Provider bucket key"})}),s.jsx("div",{className:"w-28 shrink-0",children:s.jsx(He,{label:"Max Concurrency",type:"number",min:"1",max:"10",value:P,onChange:le=>W(le.target.value)})}),s.jsxs("div",{className:"flex gap-2 pb-0.5",children:[s.jsx(Pe,{size:"sm",onClick:()=>{const le=de.trim();if(!le)return;const pe=Math.min(10,Math.max(1,Number(P||1)));ee(Re=>({...Re,providerBuckets:[...Re.providerBuckets.filter(Ue=>Ue.key!==le),{key:le,maxConcurrency:pe}],isDirty:!0})),Z(""),W("1"),z(!1)},disabled:!de.trim(),children:"Add"}),s.jsx(Pe,{size:"sm",variant:"ghost",onClick:()=>{z(!1),Z(""),W("1")},children:"Cancel"})]})]}):s.jsxs("button",{type:"button",onClick:()=>z(!0),className:"flex items-center gap-1.5 text-sm text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(Wl,{className:"h-4 w-4"}),"Add Bucket"]})]})]}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Pe,{variant:"ghost",onClick:()=>{var le;if(q){const pe=((le=q.queue)==null?void 0:le.providerBuckets)??{};ee(Re=>{var Ue,Ge;return{...Re,queueMode:((Ue=q.queue)==null?void 0:Ue.mode)??"auto",globalMaxConcurrency:((Ge=q.queue)==null?void 0:Ge.maxConcurrency)??1,providerBuckets:Object.entries(pe).map(([Ke,kt])=>({key:Ke,maxConcurrency:kt.maxConcurrency})),isDirty:!1}}),z(!1),Z(""),W("1")}},disabled:!G.isDirty,children:"Reset"}),s.jsxs(Pe,{onClick:Ve,loading:N,disabled:!G.isDirty,children:[s.jsx(Gc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})}];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"}),xe&&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:xe.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",I.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(Px,{tabs:Ot,activeTab:o,onChange:h})]})};function ex(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const UN=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Merge Completed",value:"merge_completed"},{label:"Merge Failed",value:"merge_failed"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],qN=(l,r)=>l.includes(r)?l.filter(c=>c!==r):[...l,r],tx=({webhook:l,onChange:r,onSave:c,onCancel:o,isNew:h})=>s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ra,{label:"Type",value:l.type,onChange:f=>{const v=f;r(v==="telegram"?{type:v,botToken:"",chatId:"",events:l.events}:{type:v,url:"",events:l.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),l.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(He,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:f=>r({...l,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(He,{label:"Chat ID",value:l.chatId||"",onChange:f=>r({...l,chatId:f.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(He,{label:"Webhook URL",type:"password",value:l.url||"",onChange:f=>r({...l,url:f.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:UN.map(f=>s.jsx("button",{type:"button",onClick:()=>r({...l,events:qN(l.events,f.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${l.events.includes(f.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:f.label},f.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Pe,{variant:"ghost",onClick:o,children:"Cancel"}),s.jsx(Pe,{onClick:c,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:h?"Add Webhook":"Save Changes"})]})]}),Ny=({notifications:l,onChange:r,globalWebhook:c,onSetGlobal:o,onUnsetGlobal:h})=>{const[f,v]=qe.useState(null),[N,b]=qe.useState(!1),[x,S]=qe.useState({type:"slack",url:"",events:[]}),T=()=>{r({webhooks:[...l.webhooks,x]}),S({type:"slack",url:"",events:[]}),b(!1)},j=(C,M)=>{const R=[...l.webhooks];R[C]=M,r({webhooks:R})},D=C=>{r({webhooks:l.webhooks.filter((M,R)=>R!==C)})};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((C,M)=>s.jsx("div",{children:f===M?s.jsx(tx,{webhook:C,onChange:R=>j(M,R),onSave:()=>v(null),onCancel:()=>v(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:C.type}),C.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",C.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:C.events.map(R=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:R.replace("_"," ")},R))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[o!==void 0&&(()=>{const R=c!=null&&ex(C)===ex(c);return s.jsx("button",{type:"button",onClick:()=>R?h==null?void 0:h():o(C),className:`p-2 transition-colors ${R?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":R?"Global channel (active)":"Set as global channel",title:R?"Global channel (active)":"Set as global channel",children:s.jsx(w1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>v(M),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${C.type} webhook`,title:`Edit ${C.type} webhook`,children:s.jsx(ao,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>D(M),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${C.type} webhook`,title:`Delete ${C.type} webhook`,children:s.jsx(Lr,{className:"h-4 w-4"})})]})]})},M))}),N?s.jsx(tx,{webhook:x,onChange:S,onSave:T,onCancel:()=>b(!1),isNew:!0}):s.jsxs(Pe,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Wl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},HN=({isOpen:l,onClose:r,title:c,children:o})=>(U.useEffect(()=>{const h=f=>{f.key==="Escape"&&r()};return l&&(document.addEventListener("keydown",h),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",h),document.body.style.overflow="unset"}},[l,r]),l?Rb.createPortal(s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:r,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:c}),s.jsx("button",{onClick:r,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:s.jsx(Br,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:o})]})]}),document.body):null),LN=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(c=>l.toUpperCase().includes(c)),BN=({value:l,isSensitive:r})=>{const[c,o]=qe.useState(!1);return r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:c?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>o(!c),className:"text-slate-500 hover:text-slate-300","aria-label":c?"Hide sensitive value":"Show sensitive value",title:c?"Hide sensitive value":"Show sensitive value",children:c?s.jsx(x1,{className:"h-4 w-4"}):s.jsx(p1,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},wy=({envVars:l,onChange:r,compact:c=!1})=>{const[o,h]=qe.useState(""),[f,v]=qe.useState(""),[N,b]=qe.useState(null),[x,S]=qe.useState(""),{addToast:T}=Jt(),j=()=>{if(o.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(o)){T({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...l,[o]:f}),h(""),v("")}},D=Y=>{const G={...l};delete G[Y],r(G)},C=Y=>{b(Y),S(l[Y]??"")},M=()=>{N&&(r({...l,[N]:x}),b(null),S(""))},R=()=>{b(null),S("")},Q=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[!c&&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:Q.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):Q.map(([Y,G])=>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:Y}),N===Y?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:x,onChange:ee=>S(ee.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:M,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${Y} value`,title:`Save ${Y} value`,children:s.jsx(Gc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:R,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${Y}`,title:`Cancel editing ${Y}`,children:s.jsx(Br,{className:"h-4 w-4"})})]}):s.jsx(BN,{value:G,isSensitive:LN(Y)})]}),N!==Y&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>C(Y),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${Y}`,title:`Edit ${Y}`,children:s.jsx(ao,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>D(Y),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${Y}`,title:`Delete ${Y}`,children:s.jsx(Lr,{className:"h-4 w-4"})})]})]},Y))}),s.jsxs("div",{className:`flex items-end gap-3 ${c?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!c&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:o,onChange:Y=>h(Y.target.value.toUpperCase()),placeholder:c?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!c&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:f,onChange:Y=>v(Y.target.value),placeholder:c?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Pe,{onClick:j,disabled:!o.trim(),size:c?"sm":"md",children:[s.jsx(Wl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function VN(l,r){var c;return!!(l!=null&&l.startsWith("glm-")||(c=r==null?void 0:r.model)!=null&&c.startsWith("glm-"))}function YN(l,r){var c,o;return VN(l,r)?!((o=(c=r==null?void 0:r.envVars)==null?void 0:c.ANTHROPIC_API_KEY)!=null&&o.trim()):!1}const ax={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},custom:{name:"",command:""}},$N=({isOpen:l,onClose:r,onSave:c,presetId:o,preset:h,isBuiltIn:f,existingIds:v})=>{const[N,b]=qe.useState(""),[x,S]=qe.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[T,j]=qe.useState(!1),[D,C]=qe.useState("custom"),[M,R]=qe.useState(null),Q=YN(o??N,x);qe.useEffect(()=>{l&&(o&&h?(b(o),S({name:h.name,command:h.command,subcommand:h.subcommand??"",promptFlag:h.promptFlag??"",autoApproveFlag:h.autoApproveFlag??"",workdirFlag:h.workdirFlag??"",modelFlag:h.modelFlag??"",model:h.model??"",envVars:h.envVars??{}}),o==="claude"||h.command==="claude"?C("claude"):o==="codex"||h.command==="codex"?C("codex"):C("custom")):(b(""),S({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),C("custom")),R(null),j(!!(h!=null&&h.envVars&&Object.keys(h.envVars).length>0)))},[l,o,h]);const Y=Z=>{if(C(Z),Z!=="custom"&&ax[Z]){const P=ax[Z];S(W=>({...W,...P,envVars:W.envVars})),!o&&!N&&b(Z)}},G=(Z,P)=>{S(W=>({...W,[Z]:P})),R(null)},ee=()=>{if(!x.name.trim())return R("Name is required"),!1;if(!x.command.trim())return R("Command is required"),!1;if(!o){if(!N.trim())return R("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(N))return R("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(v.includes(N))return R("A preset with this ID already exists"),!1}return!0},de=()=>{var P,W,ne,z,I,_;if(!ee())return;const Z={name:x.name.trim(),command:x.command.trim()};(P=x.subcommand)!=null&&P.trim()&&(Z.subcommand=x.subcommand.trim()),(W=x.promptFlag)!=null&&W.trim()&&(Z.promptFlag=x.promptFlag.trim()),(ne=x.autoApproveFlag)!=null&&ne.trim()&&(Z.autoApproveFlag=x.autoApproveFlag.trim()),(z=x.workdirFlag)!=null&&z.trim()&&(Z.workdirFlag=x.workdirFlag.trim()),(I=x.modelFlag)!=null&&I.trim()&&(Z.modelFlag=x.modelFlag.trim()),(_=x.model)!=null&&_.trim()&&(Z.model=x.model.trim()),x.envVars&&Object.keys(x.envVars).length>0&&(Z.envVars=x.envVars),c(o||N,Z),r()};return s.jsx(HN,{isOpen:l,onClose:r,title:o?`Edit Preset: ${h==null?void 0:h.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[M&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:M}),Q&&s.jsx("div",{className:"p-3 rounded-md bg-amber-500/10 border border-amber-500/20 text-amber-300 text-sm",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(ru,{className:"h-4 w-4 shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:"GLM presets require `ANTHROPIC_API_KEY`."}),s.jsx("div",{className:"text-amber-200/80",children:"Add `ANTHROPIC_API_KEY` in Environment Variables before using this preset."})]})]})}),!f&&s.jsx("div",{children:s.jsx(ra,{label:"Template",value:D,onChange:Y,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!o&&s.jsx(He,{label:"Preset ID",value:N,onChange:Z=>b(Z.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,"")),placeholder:"e.g., my-custom-provider",helperText:"Unique identifier for this preset (lowercase, numbers, hyphens, underscores)"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(He,{label:"Display Name",value:x.name,onChange:Z=>G("name",Z.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(He,{label:"Command",value:x.command,onChange:Z=>G("command",Z.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(He,{label:"Model",value:x.model??"",onChange:Z=>G("model",Z.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(He,{label:"Model Flag",value:x.modelFlag??"",onChange:Z=>G("modelFlag",Z.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>j(!T),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[T?s.jsx(l1,{className:"h-4 w-4"}):s.jsx(Cx,{className:"h-4 w-4"}),"Advanced Options"]}),T&&s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(He,{label:"Subcommand",value:x.subcommand??"",onChange:Z=>G("subcommand",Z.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(He,{label:"Prompt Flag",value:x.promptFlag??"",onChange:Z=>G("promptFlag",Z.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(He,{label:"Auto-Approve Flag",value:x.autoApproveFlag??"",onChange:Z=>G("autoApproveFlag",Z.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(He,{label:"Workdir Flag",value:x.workdirFlag??"",onChange:Z=>G("workdirFlag",Z.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),s.jsx(wy,{envVars:x.envVars??{},onChange:Z=>G("envVars",Z),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Pe,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Pe,{onClick:de,children:o?"Save Changes":"Add Preset"})]})]})})},Jc=({label:l,value:r,onChange:c,placeholder:o,helpText:h})=>{const[f,v]=qe.useState(""),N=()=>{f.trim()&&!r.includes(f.trim())&&(c([...r,f.trim()]),v(""))},b=S=>{c(r.filter(T=>T!==S))},x=S=>{S.key==="Enter"&&(S.preventDefault(),N())};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:r.map(S=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[S,s.jsx("button",{type:"button",onClick:()=>b(S),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${S}`,title:`Remove ${S}`,children:s.jsx(Br,{className:"h-3 w-3"})})]},S))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:S=>v(S.target.value),onKeyDown:x,placeholder:o,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),s.jsx(Pe,{onClick:N,disabled:!f.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(Wl,{className:"h-4 w-4"})})]}),h&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:h})]})},FN=({form:l,updateField:r,projectName:c,doctorChecks:o,doctorLoading:h})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{className:"p-6 space-y-6",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[s.jsx(He,{label:"Project Name",value:c,disabled:!0}),s.jsx(He,{label:"Default Branch",value:l.defaultBranch,onChange:f=>r("defaultBranch",f.target.value)}),s.jsx(He,{label:"PRD Directory",value:l.prdDir,onChange:f=>r("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(He,{label:"Branch Prefix",value:l.branchPrefix,onChange:f=>r("branchPrefix",f.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(ga,{label:"Enable PRD Executor",checked:l.executorEnabled,onChange:f=>r("executorEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(ga,{label:"Enable Automated Reviews",checked:l.reviewerEnabled,onChange:f=>r("reviewerEnabled",f)})})]}),s.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:s.jsx(Jc,{label:"Branch Patterns",value:l.branchPatterns,onChange:f=>r("branchPatterns",f),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})}),s.jsxs(et,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(Mx,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),h?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):o.map((f,v)=>{const N=f.status==="pass",b=f.status==="warn",x=N?"bg-green-500/10 text-green-400 border-green-500/20":b?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return s.jsxs("div",{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:f.name}),s.jsx("p",{className:"text-xs text-slate-500",children:f.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${x}`,children:f.status.toUpperCase()})]},`${f.name}-${v}`)})]})]}),nx=({presetId:l,preset:r,isBuiltIn:c,onEdit:o,onDelete:h,onReset:f})=>{var x,S,T;const v=r.envVars?Object.keys(r.envVars).length:0,b=(l.startsWith("glm-")||((x=r.model)==null?void 0:x.startsWith("glm-")))&&!((T=(S=r.envVars)==null?void 0:S.ANTHROPIC_API_KEY)!=null&&T.trim());return s.jsxs("div",{className:"flex flex-col p-4 rounded-lg border border-slate-800 bg-slate-950/40 hover:border-slate-700 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:r.name}),c&&s.jsx(_r,{variant:"info",className:"text-[10px]",children:"Built-in"}),b&&s.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] bg-amber-900/40 text-amber-400 border border-amber-800/50",title:"GLM presets require ANTHROPIC_API_KEY in env vars",children:[s.jsx(ru,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:o,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${r.name} preset`,title:"Edit preset",children:s.jsx(ao,{className:"h-4 w-4"})}),c?f&&s.jsx("button",{type:"button",onClick:f,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${r.name} to defaults`,title:"Reset to defaults",children:s.jsx(kx,{className:"h-4 w-4"})}):h&&s.jsx("button",{type:"button",onClick:h,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${r.name} preset`,title:"Delete preset",children:s.jsx(Lr,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Command:"}),s.jsxs("code",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-indigo-400 font-mono",children:[r.command,r.subcommand&&` ${r.subcommand}`]})]}),r.model&&s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Model:"}),s.jsx(_r,{variant:"neutral",className:"text-[10px] font-mono",children:r.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",l]}),v>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[v," env var",v!==1?"s":""]})]})]})},Uf={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},qf={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics",planner:"Planner",merger:"Merger"},Tf={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},lx=({override:l,onChange:r,onSave:c,onCancel:o,isNew:h,presetOptions:f})=>{const v=C=>{const M=l.days.includes(C)?l.days.filter(R=>R!==C):[...l.days,C].sort((R,Q)=>R-Q);r({...l,days:M})},N=()=>{r({...l,days:[1,2,3,4,5]})},b=()=>{r({...l,days:[0,6]})},x=()=>{r({...l,days:[0,1,2,3,4,5,6]})},S=()=>{r({...l,jobTypes:null})},T=C=>{const M=l.jobTypes??[],R=M.includes(C)?M.filter(Q=>Q!==C):[...M,C];r({...l,jobTypes:R.length===0?null:R})},j=l.jobTypes===null||l.jobTypes===void 0,D=l.label.trim().length>0&&l.presetId.trim().length>0&&l.days.length>0&&l.startTime.trim().length>0&&l.endTime.trim().length>0;return s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(He,{label:"Label",value:l.label,onChange:C=>r({...l,label:C.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(ra,{label:"Provider",value:l.presetId,onChange:C=>r({...l,presetId:C}),options:f})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Days"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Object.keys(Uf).map(C=>s.jsx("button",{type:"button",onClick:()=>v(C),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${l.days.includes(C)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:Uf[C]},C)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:N,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekdays"}),s.jsx("button",{type:"button",onClick:b,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekend"}),s.jsx("button",{type:"button",onClick:x,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"All"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Start Time"}),s.jsx("input",{type:"time",value:l.startTime,onChange:C=>r({...l,startTime:C.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"End Time"}),s.jsx("input",{type:"time",value:l.endTime,onChange:C=>r({...l,endTime:C.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Job Types"}),s.jsx("button",{type:"button",onClick:S,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:j?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(qf).filter(C=>C!=="planner").map(C=>{var R;const M=j||(((R=l.jobTypes)==null?void 0:R.includes(C))??!1);return s.jsx("button",{type:"button",onClick:()=>T(C),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${M?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled:j,children:qf[C]},C)})}),j&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"This override applies to all job types."})]}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(ga,{checked:l.enabled,onChange:C=>r({...l,enabled:C}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(Pe,{variant:"ghost",onClick:o,children:"Cancel"}),s.jsx(Pe,{onClick:c,disabled:!D,children:h?"Add Override":"Save Changes"})]})]})},GN=({overrides:l,onChange:r,presetOptions:c})=>{const[o,h]=qe.useState(null),[f,v]=qe.useState(!1),[N,b]=qe.useState(Tf),x=()=>{r([...l,N]),b({...Tf}),v(!1)},S=(R,Q)=>{const Y=[...l];Y[R]=Q,r(Y)},T=R=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(l.filter((Q,Y)=>Y!==R))},j=R=>{const Q=[...l];Q[R]={...Q[R],enabled:!Q[R].enabled},r(Q)},D=R=>R.length===7?"Every day":R.length===5&&R.every(Q=>Q>=1&&Q<=5)?"Weekdays":R.length===2&&R.includes(0)&&R.includes(6)?"Weekends":R.map(Q=>Uf[Q]).join(", "),C=R=>!R||R.length===0?"All Jobs":R.map(Q=>qf[Q]).join(", "),M=R=>{const Q=c.find(Y=>Y.value===R);return(Q==null?void 0:Q.label)||R};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"space-y-3",children:l.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No schedule overrides configured."}):l.map((R,Q)=>s.jsx("div",{children:o===Q?s.jsx(lx,{override:R,onChange:Y=>S(Q,Y),onSave:()=>h(null),onCancel:()=>h(null),presetOptions:c}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${R.enabled?"border-slate-800":"border-slate-800/50 opacity-60"}`,children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsx(ga,{checked:R.enabled,onChange:()=>j(Q)}),s.jsx("span",{className:"text-slate-100 font-medium",children:R.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:M(R.presetId)})," · ",D(R.days)," · ",R.startTime," - ",R.endTime," · ",C(R.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>h(Q),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${R.label}`,title:`Edit ${R.label}`,children:s.jsx(ao,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>T(Q),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${R.label}`,title:`Delete ${R.label}`,children:s.jsx(Lr,{className:"h-4 w-4"})})]})]})},Q))}),f?s.jsx(lx,{override:N,onChange:b,onSave:x,onCancel:()=>{v(!1),b({...Tf})},isNew:!0,presetOptions:c}):s.jsxs(Pe,{variant:"ghost",onClick:()=>v(!0),children:[s.jsx(Wl,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},Kc=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],PN={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},"claude-sonnet-4-6":{name:"Claude Sonnet 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-sonnet-4-6"},"claude-opus-4-6":{name:"Claude Opus 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-opus-4-6"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},"glm-47":{name:"GLM-4.7",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-4.7",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-4.7",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-4.7"}},"glm-5":{name:"GLM-5",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-5",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-5",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-5"}}},ZN=({form:l,updateField:r,jobProvidersChangedRef:c,getAllPresets:o,getPresetOptions:h,handleEditPreset:f,handleDeletePreset:v,handleResetPreset:N,handleAddPreset:b})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure AI provider presets with custom commands, models, and environment variables"})]}),s.jsxs(Pe,{onClick:b,children:[s.jsx(Wl,{className:"h-4 w-4 mr-2"}),"Add Provider"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[Kc.map(x=>{const T=o()[x];return T?s.jsx(nx,{presetId:x,preset:T,isBuiltIn:!0,onEdit:()=>f(x),onReset:()=>N(x)},x):null}),Object.entries(l.providerPresets).filter(([x])=>!Kc.includes(x)).map(([x,S])=>s.jsx(nx,{presetId:x,preset:S,isBuiltIn:!1,onEdit:()=>f(x),onDelete:()=>v(x)},x))]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Assignments"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Assign provider presets to specific job types. Jobs without an assignment use the global provider."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-indigo-500/30 bg-indigo-500/5 gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Global Provider"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Default preset for all jobs without a specific assignment"})]}),s.jsx("div",{className:"w-64",children:s.jsx(ra,{value:l.provider,onChange:x=>r("provider",x),options:h(l.providerPresets)})})]}),[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"},{key:"analytics",label:"Analytics"}].map(({key:x,label:S})=>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:S}),s.jsx("div",{className:"w-64",children:s.jsx(ra,{value:l.jobProviders[x]??"",onChange:T=>{const j={...l.jobProviders};T===""?delete j[x]:j[x]=T,c.current=!0,r("jobProviders",j)},options:[{label:"Use Global (default)",value:""},...h(l.providerPresets)]})})]},x))]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Rate Limit Fallback"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Preset to use when the active provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ra,{label:"Primary Fallback Preset",value:l.primaryFallbackPreset,onChange:x=>r("primaryFallbackPreset",x),options:[{label:"— None —",value:""},...Object.entries(o()).map(([x,S])=>({label:S.name,value:x}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(ra,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:x=>r("secondaryFallbackPreset",x),options:[{label:"— None —",value:""},...Object.entries(o()).map(([x,S])=>({label:S.name,value:x}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Schedule Overrides"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Temporarily switch providers based on day of week and time windows"})]}),s.jsx(GN,{overrides:l.providerScheduleOverrides,onChange:x=>r("providerScheduleOverrides",x),presetOptions:Object.entries(o()).map(([x,S])=>({label:S.name,value:x}))})]}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Provider Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Environment variables passed to all provider CLIs. Preset-level env vars take precedence."}),s.jsx(wy,{envVars:l.providerEnv,onChange:x=>r("providerEnv",x)})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Performance"}),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:l.minReviewScore,onChange:x=>r("minReviewScore",Number(x.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:l.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(He,{label:"Max Runtime (Executor)",type:"number",value:String(l.maxRuntime),onChange:x=>r("maxRuntime",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(He,{label:"Max Runtime (Reviewer)",type:"number",value:String(l.reviewerMaxRuntime),onChange:x=>r("reviewerMaxRuntime",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(He,{label:"Max Log Size",type:"number",value:String(l.maxLogSize),onChange:x=>r("maxLogSize",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"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(He,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(l.reviewerMaxRetries),onChange:x=>{const S=Math.min(10,Math.max(0,Number(x.target.value||0)));r("reviewerMaxRetries",S)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(He,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(l.reviewerRetryDelay),onChange:x=>{const S=Math.min(300,Math.max(0,Number(x.target.value||0)));r("reviewerRetryDelay",S)},helperText:"Wait time between retry attempts to let CI settle."}),s.jsx(He,{label:"Max PRs Per Run",type:"number",min:"0",max:"100",value:String(l.reviewerMaxPrsPerRun),onChange:x=>{const S=Math.min(100,Math.max(0,Number(x.target.value||0)));r("reviewerMaxPrsPerRun",S)},helperText:"Hard cap on how many PRs the reviewer processes per run. 0 = unlimited."})]})]})]}),WN=({form:l,updateField:r,handleRoadmapToggle:c})=>{var o,h;return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{id:"job-section-qa",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),s.jsx(ga,{checked:l.qa.enabled,onChange:f=>r("qa",{...l.qa,enabled:f})})]}),l.qa.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(nl,{label:"QA Schedule",value:l.qa.schedule,onChange:f=>r("qa",{...l.qa,schedule:f})}),s.jsx(He,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:f=>r("qa",{...l.qa,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(ra,{label:"Artifacts",value:l.qa.artifacts,onChange:f=>r("qa",{...l.qa,artifacts:f}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(He,{label:"Skip Label",value:l.qa.skipLabel,onChange:f=>r("qa",{...l.qa,skipLabel:f.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsx(Jc,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:f=>r("qa",{...l.qa,branchPatterns:f}),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(ga,{checked:l.qa.autoInstallPlaywright,onChange:f=>r("qa",{...l.qa,autoInstallPlaywright:f})})]})]})]})}),s.jsx("div",{id:"job-section-audit",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),s.jsx(ga,{checked:l.audit.enabled,onChange:f=>r("audit",{...l.audit,enabled:f})})]}),l.audit.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(nl,{label:"Audit Schedule",value:l.audit.schedule,onChange:f=>r("audit",{...l.audit,schedule:f})}),s.jsx(He,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:f=>r("audit",{...l.audit,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})]})]})}),s.jsx("div",{id:"job-section-analytics",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Analytics (Amplitude)"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Fetch Amplitude data, analyze with AI, and create board issues"})]}),s.jsx(ga,{checked:l.analytics.enabled,onChange:f=>r("analytics",{...l.analytics,enabled:f})})]}),l.analytics.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(He,{label:"Amplitude API Key",value:((o=l.providerEnv)==null?void 0:o.AMPLITUDE_API_KEY)??"",onChange:f=>r("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude project API key"}),s.jsx(He,{label:"Amplitude Secret Key",type:"password",value:((h=l.providerEnv)==null?void 0:h.AMPLITUDE_SECRET_KEY)??"",onChange:f=>r("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude secret key"}),s.jsx(nl,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:f=>r("analytics",{...l.analytics,schedule:f})}),s.jsx(He,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:f=>r("analytics",{...l.analytics,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for analytics job (default: 900 seconds)"}),s.jsx(He,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:f=>r("analytics",{...l.analytics,lookbackDays:Math.max(1,Math.min(90,Number(f.target.value||7)))}),helperText:"Number of days to look back in Amplitude (1-90)"}),s.jsx(ra,{label:"Target Column",value:l.analytics.targetColumn,onChange:f=>r("analytics",{...l.analytics,targetColumn:f}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}],helperText:"Board column for created issues"}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:"Analysis Prompt (optional)"}),s.jsx("textarea",{rows:4,value:l.analytics.analysisPrompt??"",onChange:f=>r("analytics",{...l.analytics,analysisPrompt:f.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-y"}),s.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:"Custom prompt for AI analysis. Leave empty to use default."})]})]})]})}),s.jsx("div",{id:"job-section-slicer",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"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(ga,{checked:l.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:c})]}),l.roadmapScanner.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(He,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:f=>r("roadmapScanner",{...l.roadmapScanner,roadmapPath:f.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(nl,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:f=>r("roadmapScanner",{...l.roadmapScanner,slicerSchedule:f})}),s.jsx(He,{label:"Planner Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:f=>r("roadmapScanner",{...l.roadmapScanner,slicerMaxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(ra,{label:"Planner Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:f=>r("roadmapScanner",{...l.roadmapScanner,priorityMode:f==="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(ra,{label:"Planner Issue Column",value:l.roadmapScanner.issueColumn||"Ready",onChange:f=>r("roadmapScanner",{...l.roadmapScanner,issueColumn:f==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})}),s.jsx("div",{id:"job-section-merger",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Merge Orchestrator"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Repo-wide PR merge coordinator — scans, rebases, and merges in FIFO order"})]}),s.jsx(ga,{checked:l.merger.enabled,onChange:f=>r("merger",{...l.merger,enabled:f})})]}),l.merger.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(nl,{label:"Merger Schedule",value:l.merger.schedule,onChange:f=>r("merger",{...l.merger,schedule:f})}),s.jsx(He,{label:"Max Runtime",type:"number",value:String(l.merger.maxRuntime),onChange:f=>r("merger",{...l.merger,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime (default: 1800 seconds)"}),s.jsx(ra,{label:"Merge Method",value:l.merger.mergeMethod,onChange:f=>r("merger",{...l.merger,mergeMethod:f}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}],helperText:"Git merge method for eligible PRs"}),s.jsx(He,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.merger.minReviewScore),onChange:f=>r("merger",{...l.merger,minReviewScore:Math.max(0,Math.min(100,Number(f.target.value||0)))}),helperText:"Minimum review score required (0-100)"}),s.jsx(He,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.merger.maxPrsPerRun),onChange:f=>r("merger",{...l.merger,maxPrsPerRun:Math.max(0,Number(f.target.value||0))}),helperText:"Maximum PRs to merge per run (0 = unlimited)"})]}),s.jsx(Jc,{label:"Branch Patterns",value:l.merger.branchPatterns,onChange:f=>r("merger",{...l.merger,branchPatterns:f}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter eligible PRs (empty = use top-level patterns)"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Rebase before merge"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rebase each PR against its base branch before merging"})]}),s.jsx(ga,{checked:l.merger.rebaseBeforeMerge,onChange:f=>r("merger",{...l.merger,rebaseBeforeMerge:f})})]})]})]})})]})},IN=({form:l,scheduleMode:r,selectedTemplateId:c,onFieldChange:o,onSwitchToTemplate:h,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:N,currentProjectId:b,onEditJob:x})=>s.jsx(Sy,{form:l,scheduleMode:r,selectedTemplateId:c,onFieldChange:o,onSwitchToTemplate:h,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:N,currentProjectId:b,onEditJob:x}),QN=({form:l,updateField:r})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(ga,{checked:l.boardProvider.enabled,onChange:c=>r("boardProvider",{...l.boardProvider,enabled:c})})]}),l.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(ra,{label:"Board Provider",value:l.boardProvider.provider,onChange:c=>r("boardProvider",{...l.boardProvider,provider:c}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),l.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(He,{label:"Project Number",type:"number",value:String(l.boardProvider.projectNumber||""),onChange:c=>r("boardProvider",{...l.boardProvider,projectNumber:c.target.value?Number(c.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(He,{label:"Repository",value:l.boardProvider.repo||"",onChange:c=>r("boardProvider",{...l.boardProvider,repo:c.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),l.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Ny,{notifications:l.notifications,onChange:c=>r("notifications",c)})]})]}),XN=({form:l,updateField:r})=>s.jsxs(et,{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(He,{label:"Templates Directory",value:l.templatesDir,onChange:c=>r("templatesDir",c.target.value),helperText:"Directory for custom template overrides"}),s.jsx(He,{label:"Max Retries",type:"number",min:"1",value:String(l.maxRetries),onChange:c=>{const o=Math.max(1,Number(c.target.value||1));r("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(Jc,{label:"PRD Priority",value:l.prdPriority,onChange:c=>r("prdPriority",c),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]});function JN(l,r,c,o){const{addToast:h}=Jt(),[f,v]=U.useState(!1),[N,b]=U.useState(null),[x,S]=U.useState(null),[T,j]=U.useState(null),D=U.useCallback(()=>({...PN,...l}),[l]),C=U.useCallback(Z=>{const P=D();return Object.entries(P).map(([W,ne])=>({label:ne.name,value:W}))},[D]),M=U.useCallback(Z=>{const P=[];r===Z&&P.push("Global Provider");const W={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[ne,z]of Object.entries(c))z===Z&&P.push(W[ne]??ne);return P},[r,c]),R=U.useCallback(()=>{b(null),S(null),v(!0)},[]),Q=U.useCallback(Z=>{const W=D()[Z];W&&(b(Z),S(W),v(!0))},[D]),Y=U.useCallback(async(Z,P)=>{const W=!N,ne={...l,[Z]:P};o("providerPresets",ne);try{await Ic({providerPresets:{[Z]:P}}),h({title:W?"Preset Added":"Preset Updated",message:W?`${P.name} has been added. You can now assign it to jobs.`:`${P.name} has been saved.`,type:"success"})}catch(z){h({title:"Save Failed",message:z instanceof Error?z.message:"Failed to save preset",type:"error"}),o("providerPresets",l)}},[N,l,o,h]),G=U.useCallback(Z=>{var ne,z;if(Kc.includes(Z)){h({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const P=M(Z);if(P.length>0){j({presetId:Z,presetName:((ne=D()[Z])==null?void 0:ne.name)??Z,references:P});return}const W={...l};delete W[Z],o("providerPresets",W),h({title:"Preset Deleted",message:`${((z=D()[Z])==null?void 0:z.name)??Z} has been removed.`,type:"success"})},[l,o,h,M,D]),ee=U.useCallback(Z=>{const P={...l};delete P[Z],o("providerPresets",P),h({title:"Preset Reset",message:`${Z} has been reset to built-in defaults.`,type:"success"})},[l,o,h]),de=U.useCallback(()=>{if(!T)return;const{presetId:Z}=T,P={...l};delete P[Z],o("providerPresets",P);const W={...c};for(const ne of Object.keys(W))W[ne]===Z&&delete W[ne];o("jobProviders",W),r===Z&&o("provider","claude"),j(null),h({title:"Preset Deleted",message:`${T.presetName} has been removed and all references cleared.`,type:"success"})},[T,l,c,r,o,h]);return{presetModalOpen:f,setPresetModalOpen:v,editingPresetId:N,editingPreset:x,deleteWarning:T,setDeleteWarning:j,getAllPresets:D,getPresetOptions:C,getPresetReferences:M,handleAddPreset:R,handleEditPreset:Q,handleSavePreset:Y,handleDeletePreset:G,handleResetPreset:ee,handleConfirmDelete:de}}const KN=["executor","reviewer","qa","audit","slicer","analytics"],Mf=l=>{var r,c,o,h,f,v,N;return{provider:l.provider,providerLabel:l.providerLabel??"",providerPresets:l.providerPresets??{},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,reviewerMaxPrsPerRun:l.reviewerMaxPrsPerRun??0,providerEnv:l.providerEnv||{},notifications:l.notifications||{webhooks:[]},prdPriority:l.prdPriority||[],roadmapScanner:{enabled:((r=l.roadmapScanner)==null?void 0:r.enabled)??!0,roadmapPath:((c=l.roadmapScanner)==null?void 0:c.roadmapPath)??"ROADMAP.md",autoScanInterval:((o=l.roadmapScanner)==null?void 0:o.autoScanInterval)??300,slicerSchedule:((h=l.roadmapScanner)==null?void 0:h.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((f=l.roadmapScanner)==null?void 0:f.slicerMaxRuntime)??600,priorityMode:((v=l.roadmapScanner)==null?void 0:v.priorityMode)??"roadmap-first",issueColumn:((N=l.roadmapScanner)==null?void 0:N.issueColumn)??"Draft"},templatesDir:l.templatesDir||".night-watch/templates",boardProvider:l.boardProvider||{enabled:!0,provider:"github"},jobProviders:l.jobProviders||{},fallbackOnRateLimit:l.fallbackOnRateLimit??!0,primaryFallbackModel:l.primaryFallbackModel??l.claudeModel??"sonnet",secondaryFallbackModel:l.secondaryFallbackModel??l.primaryFallbackModel??l.claudeModel??"sonnet",primaryFallbackPreset:l.primaryFallbackPreset??"",secondaryFallbackPreset:l.secondaryFallbackPreset??"",claudeModel:l.primaryFallbackModel??l.claudeModel??"sonnet",providerScheduleOverrides:l.providerScheduleOverrides??[],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},analytics:l.analytics||{enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},merger:l.merger??{enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0},queue:l.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}}}},sx=l=>{var c;const r=nu(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??"35 */12 * * *",((c=l.merger)==null?void 0:c.schedule)??"55 */4 * * *");return r?{mode:"template",selectedTemplateId:r.id}:{mode:"custom",selectedTemplateId:""}},ew=()=>{const{addToast:l,projectName:r,selectedProjectId:c,globalModeLoading:o,isGlobalMode:h,removeProjectFromList:f}=Jt(),[v,N]=qe.useState(!1),[b,x]=qe.useState(!1),[S,T]=qe.useState(!1),[j,D]=qe.useState(null),[C,M]=qe.useState([]),[R,Q]=qe.useState(void 0),Y=qe.useRef(!1),G=qe.useRef(!1),[ee,de]=qe.useState("template"),[Z,P]=qe.useState("always-on"),[W,ne]=qe.useState("general"),[z,I]=qe.useState(null),{data:_,loading:ce,error:he,refetch:q}=yn(Jf,[c],{enabled:!o}),{data:$,loading:ie,refetch:ge}=yn(rS,[c],{enabled:!o}),Se=$??[],De=(xe,_e)=>{D(Ot=>Ot&&{...Ot,[xe]:_e})},A=JN((j==null?void 0:j.providerPresets)??{},(j==null?void 0:j.provider)??"claude",(j==null?void 0:j.jobProviders)??{},De);qe.useEffect(()=>{Lx().then(M).catch(console.error),SS().then(xe=>Q(xe.webhook)).catch(()=>{})},[c]),qe.useEffect(()=>{const xe=new URLSearchParams(location.search),_e=xe.get("tab"),Ot=xe.get("mode");_e&&ne({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",analytics:"jobs",board:"integrations",notifications:"integrations"}[_e]??_e),Ot==="custom"?de("custom"):Ot==="template"&&de("template");const At=xe.get("jobType");At&&setTimeout(()=>{me("current",At)},300)},[location.search,_]);const se=qe.useCallback(xe=>{const _e=sx(xe);de(_e.mode),P(_e.selectedTemplateId)},[]);qe.useEffect(()=>{if(_)if(Y.current)Y.current=!1;else{const xe=Mf(_);D(xe),se(xe)}},[_,se]),qe.useEffect(()=>{j&&G.current&&(G.current=!1,Ve())},[j==null?void 0:j.jobProviders]),qe.useEffect(()=>{if(z){const xe=setTimeout(()=>I(null),2e3);return()=>clearTimeout(xe)}},[z]);const me=(xe,_e)=>{if(xe===r||xe==="current"){if(["qa","audit","slicer","analytics","merger"].includes(_e)){ne("jobs"),setTimeout(()=>{const At=document.getElementById(`job-section-${_e}`);At&&(At.scrollIntoView({behavior:"smooth",block:"center"}),I(`job-section-${_e}`))},50);return}ee!=="custom"&&Ce(),ne("schedules"),setTimeout(()=>{const ya={executor:"job-schedule-executor",reviewer:"job-schedule-reviewer"}[_e]||"",ua=document.getElementById(ya);ua&&(ua.scrollIntoView({behavior:"smooth",block:"center"}),I(ya))},50)}else l({title:"Project Switch Required",message:`To edit ${xe}, please switch to that project in the sidebar.`,type:"info"})},ye=()=>{if(de("template"),!j)return;const xe=sx(j);xe.mode==="template"&&(P(xe.selectedTemplateId),De("scheduleBundleId",xe.selectedTemplateId))},Ce=()=>{de("custom"),De("scheduleBundleId",null),P("")},Te=xe=>{P(xe.id),D(_e=>_e&&{..._e,cronSchedule:xe.schedules.executor,reviewerSchedule:xe.schedules.reviewer,scheduleBundleId:xe.id,qa:{..._e.qa,schedule:xe.schedules.qa},audit:{..._e.audit,schedule:xe.schedules.audit},roadmapScanner:{..._e.roadmapScanner,slicerSchedule:xe.schedules.slicer},merger:{..._e.merger,schedule:xe.schedules.merger},fallbackOnRateLimit:!0})},Ve=async()=>{var Ot,At,ya,ua,an,le,pe;if(!j)return;const xe=j.cronSchedule!==(_==null?void 0:_.cronSchedule)||j.reviewerSchedule!==(_==null?void 0:_.reviewerSchedule)||j.cronScheduleOffset!==((_==null?void 0:_.cronScheduleOffset)??0)||j.schedulingPriority!==((_==null?void 0:_.schedulingPriority)??3)||j.executorEnabled!==((_==null?void 0:_.executorEnabled)??!0)||j.reviewerEnabled!==((_==null?void 0:_.reviewerEnabled)??!0)||j.queue.enabled!==(((Ot=_==null?void 0:_.queue)==null?void 0:Ot.enabled)??!0)||j.qa.enabled!==((_==null?void 0:_.qa.enabled)??!0)||j.qa.schedule!==(_==null?void 0:_.qa.schedule)||j.audit.enabled!==((_==null?void 0:_.audit.enabled)??!0)||j.audit.schedule!==(_==null?void 0:_.audit.schedule)||j.analytics.enabled!==(((At=_==null?void 0:_.analytics)==null?void 0:At.enabled)??!1)||j.analytics.schedule!==(((ya=_==null?void 0:_.analytics)==null?void 0:ya.schedule)??"0 6 * * 1")||j.merger.enabled!==(((ua=_==null?void 0:_.merger)==null?void 0:ua.enabled)??!1)||j.merger.schedule!==(((an=_==null?void 0:_.merger)==null?void 0:an.schedule)??"55 */4 * * *")||j.roadmapScanner.enabled!==(((le=_==null?void 0:_.roadmapScanner)==null?void 0:le.enabled)??!0)||(j.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((pe=_==null?void 0:_.roadmapScanner)==null?void 0:pe.slicerSchedule)||"35 */12 * * *"),_e={};for(const Re of KN){const Ue=j.jobProviders[Re];typeof Ue=="string"&&Ue.trim().length>0?_e[Re]=Ue:_!=null&&_.jobProviders[Re]&&(_e[Re]=null)}N(!0);try{const Re=await Ic({provider:j.provider,providerLabel:j.providerLabel.trim(),providerPresets:Object.keys(j.providerPresets).length>0?j.providerPresets:void 0,defaultBranch:j.defaultBranch,prdDir:j.prdDir,branchPrefix:j.branchPrefix,branchPatterns:j.branchPatterns,executorEnabled:j.executorEnabled,reviewerEnabled:j.reviewerEnabled,minReviewScore:j.minReviewScore,maxRuntime:j.maxRuntime,reviewerMaxRuntime:j.reviewerMaxRuntime,maxLogSize:j.maxLogSize,cronSchedule:j.cronSchedule,reviewerSchedule:j.reviewerSchedule,scheduleBundleId:ee==="template"?j.scheduleBundleId:null,cronScheduleOffset:j.cronScheduleOffset,schedulingPriority:j.schedulingPriority,maxRetries:j.maxRetries,reviewerMaxRetries:j.reviewerMaxRetries,reviewerRetryDelay:j.reviewerRetryDelay,reviewerMaxPrsPerRun:j.reviewerMaxPrsPerRun,providerEnv:j.providerEnv,notifications:j.notifications,prdPriority:j.prdPriority,roadmapScanner:j.roadmapScanner,templatesDir:j.templatesDir,boardProvider:j.boardProvider,jobProviders:_e,fallbackOnRateLimit:j.fallbackOnRateLimit,primaryFallbackModel:j.primaryFallbackModel,secondaryFallbackModel:j.secondaryFallbackModel,primaryFallbackPreset:j.primaryFallbackPreset||void 0,secondaryFallbackPreset:j.secondaryFallbackPreset||void 0,claudeModel:j.primaryFallbackModel,providerScheduleOverrides:j.providerScheduleOverrides,qa:j.qa,audit:j.audit,analytics:j.analytics,merger:j.merger,queue:j.queue}),Ue=Mf(Re);D(Ue),se(Ue);let Ge="";if(xe)try{await lu()}catch(Ke){Ge=Ke instanceof Error?Ke.message:"failed to reinstall cron schedules"}l(Ge?{title:"Settings Saved (Cron Reinstall Failed)",message:Ge,type:"warning"}:{title:"Settings Saved",message:xe?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),Y.current=!0,q(),ge()}catch(Re){l({title:"Save Failed",message:Re instanceof Error?Re.message:"Failed to save configuration",type:"error"})}finally{N(!1)}},Nt=()=>{if(_){const xe=Mf(_);D(xe),se(xe),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},at=async xe=>{if(!(R!=null&&!window.confirm("Replace existing global channel?")))try{const _e=await Ng({webhook:xe});Q(_e.webhook)}catch(_e){l({title:"Failed to set global channel",message:_e instanceof Error?_e.message:"Unknown error",type:"error"})}},ia=async()=>{try{await Ng({webhook:null}),Q(null)}catch(xe){l({title:"Failed to unset global channel",message:xe instanceof Error?xe.message:"Unknown error",type:"error"})}},xa=async xe=>{try{const _e=await Fx(xe);De("roadmapScanner",_e.roadmapScanner);let Ot="";try{await lu()}catch(At){Ot=At instanceof Error?At.message:"Failed to reinstall cron schedules"}l(Ot?{title:"Planner Saved (Cron Reinstall Failed)",message:Ot,type:"warning"}:{title:xe?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${xe?"enabled":"disabled"}.`,type:"success"})}catch(_e){l({title:"Toggle Failed",message:_e instanceof Error?_e.message:"Failed to toggle roadmap scanner",type:"error"})}},Dn=async()=>{if(c){T(!0);try{await lS(c),f(c),x(!1),l({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(xe){l({title:"Remove Failed",message:xe instanceof Error?xe.message:"Failed to remove project",type:"error"})}finally{T(!1)}}};if(ce||!j)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(he)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(rl,{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:he.message}),s.jsx(Pe,{onClick:()=>q(),children:"Retry"})]});const pn=[{id:"general",label:"General",content:s.jsx(FN,{form:j,updateField:De,projectName:r,doctorChecks:Se,doctorLoading:ie})},{id:"ai-runtime",label:"AI & Runtime",content:s.jsx(ZN,{form:j,updateField:De,jobProvidersChangedRef:G,getAllPresets:A.getAllPresets,getPresetOptions:A.getPresetOptions,handleEditPreset:A.handleEditPreset,handleDeletePreset:A.handleDeletePreset,handleResetPreset:A.handleResetPreset,handleAddPreset:A.handleAddPreset})},{id:"jobs",label:"Jobs",content:s.jsx(WN,{form:j,updateField:De,handleRoadmapToggle:xa})},{id:"schedules",label:"Schedules",content:s.jsx(IN,{form:{cronSchedule:j.cronSchedule,reviewerSchedule:j.reviewerSchedule,qa:j.qa,audit:j.audit,analytics:j.analytics,roadmapScanner:{enabled:j.roadmapScanner.enabled,slicerSchedule:j.roadmapScanner.slicerSchedule||"35 */12 * * *"},scheduleBundleId:j.scheduleBundleId,schedulingPriority:j.schedulingPriority,cronScheduleOffset:j.cronScheduleOffset,globalQueueEnabled:j.queue.enabled},scheduleMode:ee,selectedTemplateId:Z,onFieldChange:(xe,_e)=>{xe==="globalQueueEnabled"?De("queue",{...j.queue,enabled:_e}):De(xe,_e)},onSwitchToTemplate:ye,onSwitchToCustom:Ce,onApplyTemplate:Te,allProjectConfigs:C,currentProjectId:c,onEditJob:me})},{id:"notifications",label:"Notifications",content:s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Ny,{notifications:j.notifications,onChange:xe=>De("notifications",xe),globalWebhook:R,onSetGlobal:at,onUnsetGlobal:ia})]})},{id:"integrations",label:"Integrations",content:s.jsx(QN,{form:j,updateField:De})},{id:"advanced",label:"Advanced",content:s.jsx(XN,{form:j,updateField:De})}];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(Px,{tabs:pn,activeTab:W,onChange:ne}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(Pe,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:Nt,children:[s.jsx(kx,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Pe,{onClick:Ve,loading:v,children:[s.jsx(B1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),h&&c&&s.jsxs("div",{className:"mt-10 rounded-lg border border-red-900/50 bg-red-950/20 p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-red-400 mb-2",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Remove this project from Night Watch. This will uninstall cron jobs and delete all project data from the database. Files on disk will not be touched."}),s.jsxs(Pe,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>x(!0),children:[s.jsx(Lr,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),b&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>!S&&x(!1),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(ru,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",r,"?"]})]}),s.jsx("p",{className:"text-sm text-slate-300 mb-6",children:"This will uninstall cron jobs and remove all Night Watch data for this project from the database. The project files on disk will not be deleted."}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Pe,{variant:"ghost",onClick:()=>x(!1),disabled:S,children:"Cancel"}),s.jsx(Pe,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:Dn,loading:S,children:"Remove"})]})]})]}),s.jsx($N,{isOpen:A.presetModalOpen,onClose:()=>{A.setPresetModalOpen(!1)},onSave:A.handleSavePreset,presetId:A.editingPresetId,preset:A.editingPreset,isBuiltIn:A.editingPresetId?Kc.includes(A.editingPresetId):!1,existingIds:Object.keys(A.getAllPresets())}),A.deleteWarning&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>A.setDeleteWarning(null),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(ru,{className:"h-6 w-6 text-amber-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:"Cannot Delete Preset"})]}),s.jsxs("p",{className:"text-sm text-slate-300 mb-4",children:[s.jsx("strong",{children:A.deleteWarning.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:A.deleteWarning.references.map(xe=>s.jsx("li",{children:xe},xe))}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:'Please remove these assignments before deleting the preset, or use "Force Delete" to remove the preset and clear all references.'}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Pe,{variant:"ghost",onClick:()=>A.setDeleteWarning(null),children:"Cancel"}),s.jsx(Pe,{variant:"secondary",onClick:A.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},tw=()=>(kS(),_S(),s.jsx(Sb,{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(OS,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(DS,{}),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(Xv,{children:[s.jsx(al,{path:"/",element:s.jsx($S,{})}),s.jsx(al,{path:"/prs",element:s.jsx(GS,{})}),s.jsx(al,{path:"/board",element:s.jsx(LS,{})}),s.jsx(al,{path:"/scheduling",element:s.jsx(zN,{})}),s.jsx(al,{path:"/logs",element:s.jsx(FS,{})}),s.jsx(al,{path:"/roadmap",element:s.jsx(PS,{})}),s.jsx(al,{path:"/settings",element:s.jsx(ew,{})}),s.jsx(al,{path:"*",element:s.jsx(Iv,{to:"/",replace:!0})})]})})})]}),s.jsx(AS,{})]})})),jy=document.getElementById("root");if(!jy)throw new Error("Could not find root element to mount to");const aw=Kp.createRoot(jy);aw.render(s.jsx(qe.StrictMode,{children:s.jsx(tw,{})}));
|