@jonit-dev/night-watch-cli 1.8.2 → 1.8.4-beta.0
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 +1017 -553
- package/dist/commands/board.d.ts.map +1 -1
- package/dist/commands/board.js +20 -0
- package/dist/commands/board.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +8 -12
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +96 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/scripts/publish.sh +94 -26
- package/dist/templates/prd-executor.md +1 -0
- package/dist/templates/skills/_codex-block.md +58 -0
- package/dist/templates/skills/nw-add-issue.md +39 -0
- package/dist/templates/skills/nw-board-sync.md +47 -0
- package/dist/templates/skills/nw-create-prd.md +61 -0
- package/dist/templates/skills/nw-review.md +39 -0
- package/dist/templates/skills/nw-run.md +39 -0
- package/dist/templates/skills/nw-slice.md +33 -0
- package/dist/templates/skills/skills/_codex-block.md +58 -0
- package/dist/templates/skills/skills/nw-add-issue.md +39 -0
- package/dist/templates/skills/skills/nw-board-sync.md +47 -0
- package/dist/templates/skills/skills/nw-create-prd.md +61 -0
- package/dist/templates/skills/skills/nw-review.md +39 -0
- package/dist/templates/skills/skills/nw-run.md +39 -0
- package/dist/templates/skills/skills/nw-slice.md +33 -0
- package/dist/web/assets/index-BFxPiKyy.js +381 -0
- package/dist/web/assets/index-Cp7RYjoy.css +1 -0
- package/dist/web/assets/index-DTsfDC7m.js +381 -0
- package/dist/web/assets/index-ZABWMEZR.js +381 -0
- package/dist/web/index.html +2 -2
- package/package.json +12 -3
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
var Lp=Object.defineProperty;var Z0=l=>{throw TypeError(l)};var Hp=(l,u,d)=>u in l?Lp(l,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[u]=d;var P0=(l,u,d)=>Hp(l,typeof u!="symbol"?u+"":u,d),sf=(l,u,d)=>u.has(l)||Z0("Cannot "+d);var K=(l,u,d)=>(sf(l,u,"read from private field"),d?d.call(l):u.get(l)),st=(l,u,d)=>u.has(l)?Z0("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(l):u.set(l,d),Te=(l,u,d,o)=>(sf(l,u,"write to private field"),o?o.call(l,d):u.set(l,d),d),Ne=(l,u,d)=>(sf(l,u,"access private method"),d);(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))o(m);new MutationObserver(m=>{for(const f of m)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 d(m){const f={};return m.integrity&&(f.integrity=m.integrity),m.referrerPolicy&&(f.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?f.credentials="include":m.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(m){if(m.ep)return;m.ep=!0;const f=d(m);fetch(m.href,f)}})();function Af(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function qp(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var u=l.default;if(typeof u=="function"){var d=function o(){return this instanceof o?Reflect.construct(u,arguments,this.constructor):u.apply(this,arguments)};d.prototype=u.prototype}else d={};return Object.defineProperty(d,"__esModule",{value:!0}),Object.keys(l).forEach(function(o){var m=Object.getOwnPropertyDescriptor(l,o);Object.defineProperty(d,o,m.get?m:{enumerable:!0,get:function(){return l[o]}})}),d}var rf={exports:{}},Bi={};/**
|
|
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 Q0;function Vp(){if(Q0)return Bi;Q0=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function d(o,m,f){var v=null;if(f!==void 0&&(v=""+f),m.key!==void 0&&(v=""+m.key),"key"in m){f={};for(var N in m)N!=="key"&&(f[N]=m[N])}else f=m;return m=f.ref,{$$typeof:l,type:o,key:v,ref:m!==void 0?m:null,props:f}}return Bi.Fragment=u,Bi.jsx=d,Bi.jsxs=d,Bi}var W0;function Bp(){return W0||(W0=1,rf.exports=Vp()),rf.exports}var s=Bp(),uf={exports:{}},He={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var I0;function Yp(){if(I0)return He;I0=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),v=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),S=Symbol.iterator;function D(_){return _===null||typeof _!="object"?null:(_=S&&_[S]||_["@@iterator"],typeof _=="function"?_:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,Y={};function X(_,re,ge){this.props=_,this.context=re,this.refs=Y,this.updater=ge||A}X.prototype.isReactComponent={},X.prototype.setState=function(_,re){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,re,"setState")},X.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function Q(){}Q.prototype=X.prototype;function G(_,re,ge){this.props=_,this.context=re,this.refs=Y,this.updater=ge||A}var ee=G.prototype=new Q;ee.constructor=G,M(ee,X.prototype),ee.isPureReactComponent=!0;var le=Array.isArray;function te(){}var W={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function R(_,re,ge){var pe=ge.ref;return{$$typeof:l,type:_,key:re,ref:pe!==void 0?pe:null,props:ge}}function U(_,re){return R(_.type,re,_.props)}function ne(_){return typeof _=="object"&&_!==null&&_.$$typeof===l}function F(_){var re={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(ge){return re[ge]})}var ce=/\/+/g;function ye(_,re){return typeof _=="object"&&_!==null&&_.key!=null?F(""+_.key):re.toString(36)}function me(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(te,te):(_.status="pending",_.then(function(re){_.status==="pending"&&(_.status="fulfilled",_.value=re)},function(re){_.status==="pending"&&(_.status="rejected",_.reason=re)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function B(_,re,ge,pe,De){var Ee=typeof _;(Ee==="undefined"||Ee==="boolean")&&(_=null);var Ue=!1;if(_===null)Ue=!0;else switch(Ee){case"bigint":case"string":case"number":Ue=!0;break;case"object":switch(_.$$typeof){case l:case u:Ue=!0;break;case w:return Ue=_._init,B(Ue(_._payload),re,ge,pe,De)}}if(Ue)return De=De(_),Ue=pe===""?"."+ye(_,0):pe,le(De)?(ge="",Ue!=null&&(ge=Ue.replace(ce,"$&/")+"/"),B(De,re,ge,"",function(Ft){return Ft})):De!=null&&(ne(De)&&(De=U(De,ge+(De.key==null||_&&_.key===De.key?"":(""+De.key).replace(ce,"$&/")+"/")+Ue)),re.push(De)),1;Ue=0;var ke=pe===""?".":pe+":";if(le(_))for(var et=0;et<_.length;et++)pe=_[et],Ee=ke+ye(pe,et),Ue+=B(pe,re,ge,Ee,De);else if(et=D(_),typeof et=="function")for(_=et.call(_),et=0;!(pe=_.next()).done;)pe=pe.value,Ee=ke+ye(pe,et++),Ue+=B(pe,re,ge,Ee,De);else if(Ee==="object"){if(typeof _.then=="function")return B(me(_),re,ge,pe,De);throw re=String(_),Error("Objects are not valid as a React child (found: "+(re==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":re)+"). If you meant to render a collection of children, use an array instead.")}return Ue}function ue(_,re,ge){if(_==null)return _;var pe=[],De=0;return B(_,pe,"","",function(Ee){return re.call(ge,Ee,De++)}),pe}function se(_){if(_._status===-1){var re=_._result;re=re(),re.then(function(ge){(_._status===0||_._status===-1)&&(_._status=1,_._result=ge)},function(ge){(_._status===0||_._status===-1)&&(_._status=2,_._result=ge)}),_._status===-1&&(_._status=0,_._result=re)}if(_._status===1)return _._result.default;throw _._result}var Me=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var re=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(re))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},qe={map:ue,forEach:function(_,re,ge){ue(_,function(){re.apply(this,arguments)},ge)},count:function(_){var re=0;return ue(_,function(){re++}),re},toArray:function(_){return ue(_,function(re){return re})||[]},only:function(_){if(!ne(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return He.Activity=E,He.Children=qe,He.Component=X,He.Fragment=d,He.Profiler=m,He.PureComponent=G,He.StrictMode=o,He.Suspense=b,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,He.__COMPILER_RUNTIME={__proto__:null,c:function(_){return W.H.useMemoCache(_)}},He.cache=function(_){return function(){return _.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(_,re,ge){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var pe=M({},_.props),De=_.key;if(re!=null)for(Ee in re.key!==void 0&&(De=""+re.key),re)!J.call(re,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&re.ref===void 0||(pe[Ee]=re[Ee]);var Ee=arguments.length-2;if(Ee===1)pe.children=ge;else if(1<Ee){for(var Ue=Array(Ee),ke=0;ke<Ee;ke++)Ue[ke]=arguments[ke+2];pe.children=Ue}return R(_.type,De,pe)},He.createContext=function(_){return _={$$typeof:v,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},He.createElement=function(_,re,ge){var pe,De={},Ee=null;if(re!=null)for(pe in re.key!==void 0&&(Ee=""+re.key),re)J.call(re,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(De[pe]=re[pe]);var Ue=arguments.length-2;if(Ue===1)De.children=ge;else if(1<Ue){for(var ke=Array(Ue),et=0;et<Ue;et++)ke[et]=arguments[et+2];De.children=ke}if(_&&_.defaultProps)for(pe in Ue=_.defaultProps,Ue)De[pe]===void 0&&(De[pe]=Ue[pe]);return R(_,Ee,De)},He.createRef=function(){return{current:null}},He.forwardRef=function(_){return{$$typeof:N,render:_}},He.isValidElement=ne,He.lazy=function(_){return{$$typeof:w,_payload:{_status:-1,_result:_},_init:se}},He.memo=function(_,re){return{$$typeof:y,type:_,compare:re===void 0?null:re}},He.startTransition=function(_){var re=W.T,ge={};W.T=ge;try{var pe=_(),De=W.S;De!==null&&De(ge,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(te,Me)}catch(Ee){Me(Ee)}finally{re!==null&&ge.types!==null&&(re.types=ge.types),W.T=re}},He.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},He.use=function(_){return W.H.use(_)},He.useActionState=function(_,re,ge){return W.H.useActionState(_,re,ge)},He.useCallback=function(_,re){return W.H.useCallback(_,re)},He.useContext=function(_){return W.H.useContext(_)},He.useDebugValue=function(){},He.useDeferredValue=function(_,re){return W.H.useDeferredValue(_,re)},He.useEffect=function(_,re){return W.H.useEffect(_,re)},He.useEffectEvent=function(_){return W.H.useEffectEvent(_)},He.useId=function(){return W.H.useId()},He.useImperativeHandle=function(_,re,ge){return W.H.useImperativeHandle(_,re,ge)},He.useInsertionEffect=function(_,re){return W.H.useInsertionEffect(_,re)},He.useLayoutEffect=function(_,re){return W.H.useLayoutEffect(_,re)},He.useMemo=function(_,re){return W.H.useMemo(_,re)},He.useOptimistic=function(_,re){return W.H.useOptimistic(_,re)},He.useReducer=function(_,re,ge){return W.H.useReducer(_,re,ge)},He.useRef=function(_){return W.H.useRef(_)},He.useState=function(_){return W.H.useState(_)},He.useSyncExternalStore=function(_,re,ge){return W.H.useSyncExternalStore(_,re,ge)},He.useTransition=function(){return W.H.useTransition()},He.version="19.2.4",He}var X0;function _f(){return X0||(X0=1,uf.exports=Yp()),uf.exports}var V=_f();const ze=Af(V);var cf={exports:{}},Yi={},of={exports:{}},df={};/**
|
|
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 J0;function $p(){return J0||(J0=1,(function(l){function u(B,ue){var se=B.length;B.push(ue);e:for(;0<se;){var Me=se-1>>>1,qe=B[Me];if(0<m(qe,ue))B[Me]=ue,B[se]=qe,se=Me;else break e}}function d(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var ue=B[0],se=B.pop();if(se!==ue){B[0]=se;e:for(var Me=0,qe=B.length,_=qe>>>1;Me<_;){var re=2*(Me+1)-1,ge=B[re],pe=re+1,De=B[pe];if(0>m(ge,se))pe<qe&&0>m(De,ge)?(B[Me]=De,B[pe]=se,Me=pe):(B[Me]=ge,B[re]=se,Me=re);else if(pe<qe&&0>m(De,se))B[Me]=De,B[pe]=se,Me=pe;else break e}}return ue}function m(B,ue){var se=B.sortIndex-ue.sortIndex;return se!==0?se:B.id-ue.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=[],y=[],w=1,E=null,S=3,D=!1,A=!1,M=!1,Y=!1,X=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function ee(B){for(var ue=d(y);ue!==null;){if(ue.callback===null)o(y);else if(ue.startTime<=B)o(y),ue.sortIndex=ue.expirationTime,u(b,ue);else break;ue=d(y)}}function le(B){if(M=!1,ee(B),!A)if(d(b)!==null)A=!0,te||(te=!0,F());else{var ue=d(y);ue!==null&&me(le,ue.startTime-B)}}var te=!1,W=-1,J=5,R=-1;function U(){return Y?!0:!(l.unstable_now()-R<J)}function ne(){if(Y=!1,te){var B=l.unstable_now();R=B;var ue=!0;try{e:{A=!1,M&&(M=!1,Q(W),W=-1),D=!0;var se=S;try{t:{for(ee(B),E=d(b);E!==null&&!(E.expirationTime>B&&U());){var Me=E.callback;if(typeof Me=="function"){E.callback=null,S=E.priorityLevel;var qe=Me(E.expirationTime<=B);if(B=l.unstable_now(),typeof qe=="function"){E.callback=qe,ee(B),ue=!0;break t}E===d(b)&&o(b),ee(B)}else o(b);E=d(b)}if(E!==null)ue=!0;else{var _=d(y);_!==null&&me(le,_.startTime-B),ue=!1}}break e}finally{E=null,S=se,D=!1}ue=void 0}}finally{ue?F():te=!1}}}var F;if(typeof G=="function")F=function(){G(ne)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,ye=ce.port2;ce.port1.onmessage=ne,F=function(){ye.postMessage(null)}}else F=function(){X(ne,0)};function me(B,ue){W=X(function(){B(l.unstable_now())},ue)}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(B){B.callback=null},l.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<B?Math.floor(1e3/B):5},l.unstable_getCurrentPriorityLevel=function(){return S},l.unstable_next=function(B){switch(S){case 1:case 2:case 3:var ue=3;break;default:ue=S}var se=S;S=ue;try{return B()}finally{S=se}},l.unstable_requestPaint=function(){Y=!0},l.unstable_runWithPriority=function(B,ue){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var se=S;S=B;try{return ue()}finally{S=se}},l.unstable_scheduleCallback=function(B,ue,se){var Me=l.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?Me+se:Me):se=Me,B){case 1:var qe=-1;break;case 2:qe=250;break;case 5:qe=1073741823;break;case 4:qe=1e4;break;default:qe=5e3}return qe=se+qe,B={id:w++,callback:ue,priorityLevel:B,startTime:se,expirationTime:qe,sortIndex:-1},se>Me?(B.sortIndex=se,u(y,B),d(b)===null&&B===d(y)&&(M?(Q(W),W=-1):M=!0,me(le,se-Me))):(B.sortIndex=qe,u(b,B),A||D||(A=!0,te||(te=!0,F()))),B},l.unstable_shouldYield=U,l.unstable_wrapCallback=function(B){var ue=S;return function(){var se=S;S=ue;try{return B.apply(this,arguments)}finally{S=se}}}})(df)),df}var K0;function Fp(){return K0||(K0=1,of.exports=$p()),of.exports}var ff={exports:{}},aa={};/**
|
|
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 eg;function Gp(){if(eg)return aa;eg=1;var l=_f();function u(b){var y="https://react.dev/errors/"+b;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)y+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+b+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var o={d:{f:d,r:function(){throw Error(u(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},m=Symbol.for("react.portal");function f(b,y,w){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:E==null?null:""+E,children:b,containerInfo:y,implementation:w}}var v=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function N(b,y){if(b==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return aa.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,aa.createPortal=function(b,y){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(u(299));return f(b,y,null,w)},aa.flushSync=function(b){var y=v.T,w=o.p;try{if(v.T=null,o.p=2,b)return b()}finally{v.T=y,o.p=w,o.d.f()}},aa.preconnect=function(b,y){typeof b=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,o.d.C(b,y))},aa.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},aa.preinit=function(b,y){if(typeof b=="string"&&y&&typeof y.as=="string"){var w=y.as,E=N(w,y.crossOrigin),S=typeof y.integrity=="string"?y.integrity:void 0,D=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;w==="style"?o.d.S(b,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:E,integrity:S,fetchPriority:D}):w==="script"&&o.d.X(b,{crossOrigin:E,integrity:S,fetchPriority:D,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},aa.preinitModule=function(b,y){if(typeof b=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var w=N(y.as,y.crossOrigin);o.d.M(b,{crossOrigin:w,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&o.d.M(b)},aa.preload=function(b,y){if(typeof b=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var w=y.as,E=N(w,y.crossOrigin);o.d.L(b,w,{crossOrigin:E,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},aa.preloadModule=function(b,y){if(typeof b=="string")if(y){var w=N(y.as,y.crossOrigin);o.d.m(b,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:w,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else o.d.m(b)},aa.requestFormReset=function(b){o.d.r(b)},aa.unstable_batchedUpdates=function(b,y){return b(y)},aa.useFormState=function(b,y,w){return v.H.useFormState(b,y,w)},aa.useFormStatus=function(){return v.H.useHostTransitionStatus()},aa.version="19.2.4",aa}var tg;function ny(){if(tg)return ff.exports;tg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),ff.exports=Gp(),ff.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var ag;function Zp(){if(ag)return Yi;ag=1;var l=Fp(),u=_f(),d=ny();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function 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 y(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 i=a.return;if(i===null)break;var c=i.alternate;if(c===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===a)return b(i),e;if(c===n)return b(i),t;c=c.sibling}throw Error(o(188))}if(a.return!==n.return)a=i,n=c;else{for(var x=!1,T=i.child;T;){if(T===a){x=!0,a=i,n=c;break}if(T===n){x=!0,n=i,a=c;break}T=T.sibling}if(!x){for(T=c.child;T;){if(T===a){x=!0,a=c,n=i;break}if(T===n){x=!0,n=c,a=i;break}T=T.sibling}if(!x)throw Error(o(189))}}if(a.alternate!==n)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var E=Object.assign,S=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),G=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Symbol.for("react.client.reference");function ye(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 X:return"Profiler";case Y:return"StrictMode";case le:return"Suspense";case te:return"SuspenseList";case R:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case G:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var me=Array.isArray,B=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},Me=[],qe=-1;function _(e){return{current:e}}function re(e){0>qe||(e.current=Me[qe],Me[qe]=null,qe--)}function ge(e,t){qe++,Me[qe]=e.current,e.current=t}var pe=_(null),De=_(null),Ee=_(null),Ue=_(null);function ke(e,t){switch(ge(Ee,t),ge(De,e),ge(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?g0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=g0(t),e=y0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}re(pe),ge(pe,e)}function et(){re(pe),re(De),re(Ee)}function Ft(e){e.memoizedState!==null&&ge(Ue,e);var t=pe.current,a=y0(t,e.type);t!==a&&(ge(De,e),ge(pe,a))}function Na(e){De.current===e&&(re(pe),re(De)),Ue.current===e&&(re(Ue),Li._currentValue=se)}var Qa,Wa;function ua(e){if(Qa===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Qa=t&&t[1]||"",Wa=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Qa+e+Wa}var ca=!1;function Ia(e,t){if(!e||ca)return"";ca=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ae){var I=ae}Reflect.construct(e,[],de)}else{try{de.call()}catch(ae){I=ae}e.call(de.prototype)}}else{try{throw Error()}catch(ae){I=ae}(de=e())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(ae){if(ae&&I&&typeof ae.stack=="string")return[ae.stack,I.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),x=c[0],T=c[1];if(x&&T){var O=x.split(`
|
|
44
|
+
`),P=T.split(`
|
|
45
|
+
`);for(i=n=0;n<O.length&&!O[n].includes("DetermineComponentFrameRoot");)n++;for(;i<P.length&&!P[i].includes("DetermineComponentFrameRoot");)i++;if(n===O.length||i===P.length)for(n=O.length-1,i=P.length-1;1<=n&&0<=i&&O[n]!==P[i];)i--;for(;1<=n&&0<=i;n--,i--)if(O[n]!==P[i]){if(n!==1||i!==1)do if(n--,i--,0>i||O[n]!==P[i]){var ie=`
|
|
46
|
+
`+O[n].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),ie}while(1<=n&&0<=i);break}}}finally{ca=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ua(a):""}function hn(e,t){switch(e.tag){case 26:case 27:case 5:return ua(e.type);case 16:return ua("Lazy");case 13:return e.child!==t&&t!==null?ua("Suspense Fallback"):ua("Suspense");case 19:return ua("SuspenseList");case 0:case 15:return Ia(e.type,!1);case 11:return Ia(e.type.render,!1);case 1:return Ia(e.type,!0);case 31:return ua("Activity");default:return""}}function la(e){try{var t="",a=null;do t+=hn(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var ka=Object.prototype.hasOwnProperty,mn=l.unstable_scheduleCallback,gn=l.unstable_cancelCallback,sl=l.unstable_shouldYield,rl=l.unstable_requestPaint,At=l.unstable_now,Xa=l.unstable_getCurrentPriorityLevel,On=l.unstable_ImmediatePriority,Dn=l.unstable_UserBlockingPriority,L=l.unstable_NormalPriority,fe=l.unstable_LowPriority,ve=l.unstable_IdlePriority,xe=l.log,Ye=l.unstable_setDisableYieldValue,$e=null,dt=null;function Xe(e){if(typeof xe=="function"&&Ye(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode($e,e)}catch{}}var gt=Math.clz32?Math.clz32:to,yn=Math.log,Hs=Math.LN2;function to(e){return e>>>=0,e===0?32:31-(yn(e)/Hs|0)|0}var il=256,qs=262144,Jt=4194304;function xn(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 Ql(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,c=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var T=n&134217727;return T!==0?(n=T&~c,n!==0?i=xn(n):(x&=T,x!==0?i=xn(x):a||(a=T&~e,a!==0&&(i=xn(a))))):(T=n&~c,T!==0?i=xn(T):x!==0?i=xn(x):a||(a=n&~e,a!==0&&(i=xn(a)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:i}function ul(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ou(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vr(){var e=Jt;return Jt<<=1,(Jt&62914560)===0&&(Jt=4194304),e}function Vs(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 du(e,t,a,n,i,c){var x=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var T=e.entanglements,O=e.expirationTimes,P=e.hiddenUpdates;for(a=x&~a;0<a;){var ie=31-gt(a),de=1<<ie;T[ie]=0,O[ie]=-1;var I=P[ie];if(I!==null)for(P[ie]=null,ie=0;ie<I.length;ie++){var ae=I[ie];ae!==null&&(ae.lane&=-536870913)}a&=~de}n!==0&&xt(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(x&~t))}function xt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-gt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function oa(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-gt(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function Br(e,t){var a=t&-t;return a=(a&42)!==0?1:Bs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Bs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Kt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ys(){var e=ue.p;return e!==0?e:(e=window.event,e===void 0?32:q0(e.type))}function Yr(e,t){var a=ue.p;try{return ue.p=e,t()}finally{ue.p=a}}var Ja=Math.random().toString(36).slice(2),Tt="__reactFiber$"+Ja,Ht="__reactProps$"+Ja,Rn="__reactContainer$"+Ja,Wl="__reactEvents$"+Ja,fu="__reactListeners$"+Ja,hu="__reactHandles$"+Ja,mu="__reactResources$"+Ja,Il="__reactMarker$"+Ja;function $s(e){delete e[Tt],delete e[Ht],delete e[Wl],delete e[fu],delete e[hu]}function An(e){var t=e[Tt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Rn]||a[Tt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=N0(e);e!==null;){if(a=e[Tt])return a;e=N0(e)}return t}e=a,a=e.parentNode}return null}function Oe(e){if(e=e[Tt]||e[Rn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function da(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Ka(e){var t=e[mu];return t||(t=e[mu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[Il]=!0}var gu=new Set,$r={};function pn(e,t){ol(e,t),ol(e+"Capture",t)}function ol(e,t){for($r[e]=t,e=0;e<t.length;e++)gu.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]*$"),xu={},_n={};function Fr(e){return ka.call(_n,e)?!0:ka.call(xu,e)?!1:yu.test(e)?_n[e]=!0:(xu[e]=!0,!1)}function Gt(e,t,a){if(Fr(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 Fs(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 it(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 Mt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gr(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(x){a=""+x,c.call(this,x)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xl(e){if(!e._valueTracker){var t=vn(e)?"checked":"value";e._valueTracker=Gr(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=vn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function en(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 Gs=/[\n"\\]/g;function Zt(e){return e.replace(Gs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zs(e,t,a,n,i,c,x,T){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mt(t)):e.value!==""+Mt(t)&&(e.value=""+Mt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Jl(e,x,Mt(t)):a!=null?Jl(e,x,Mt(a)):n!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+Mt(T):e.removeAttribute("name")}function fl(e,t,a,n,i,c,x,T){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Xl(e);return}a=a!=null?""+Mt(a):"",t=t!=null?""+Mt(t):a,T||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=T?e.checked:!!n,e.defaultChecked=!!n,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Xl(e)}function Jl(e,t,a){t==="number"&&en(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function kn(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Mt(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Kl(e,t,a){if(t!=null&&(t=""+Mt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Mt(a):""}function Zr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(me(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Mt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Xl(e)}function tn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var es=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 ts(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||es.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function pu(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var i in t)n=t[i],t.hasOwnProperty(i)&&a[i]!==n&&ts(e,i,n)}else for(var c in t)t.hasOwnProperty(c)&&ts(e,c,t[c])}function Ps(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 ao=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),vu=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function as(e){return vu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function za(){}var Pr=null;function Qs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zn=null,hl=null;function bu(e){var t=Oe(e);if(t&&(e=t.stateNode)){var a=e[Ht]||null;e:switch(e=t.stateNode,t.type){case"input":if(Zs(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Zt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[Ht]||null;if(!i)throw Error(o(90));Zs(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&dl(n)}break e;case"textarea":Kl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&kn(e,!!a.multiple,t,!1)}}}var Qr=!1;function Wr(e,t,a){if(Qr)return e(t,a);Qr=!0;try{var n=e(t);return n}finally{if(Qr=!1,(zn!==null||hl!==null)&&(mc(),zn&&(t=zn,e=hl,hl=zn=null,bu(t),e)))for(t=0;t<e.length;t++)bu(e[t])}}function ns(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Ht]||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 an=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ir=!1;if(an)try{var ls={};Object.defineProperty(ls,"passive",{get:function(){Ir=!0}}),window.addEventListener("test",ls,ls),window.removeEventListener("test",ls,ls)}catch{Ir=!1}var bn=null,Ws=null,Is=null;function qt(){if(Is)return Is;var e,t=Ws,a=t.length,n,i="value"in bn?bn.value:bn.textContent,c=i.length;for(e=0;e<a&&t[e]===i[e];e++);var x=a-e;for(n=1;n<=x&&t[a-n]===i[c-n];n++);return Is=i.slice(e,1<n?1-n:void 0)}function ss(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 nn(){return!0}function Un(){return!1}function Ct(e){function t(a,n,i,c,x){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=c,this.target=x,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(a=e[T],this[T]=a?a(c):c[T]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?nn:Un,this.isPropagationStopped=Un,this}return E(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rs=Ct(Sn),is=E({},Sn,{view:0,detail:0}),Xr=Ct(is),Xs,us,cs,Js=E({},is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ds,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!==cs&&(cs&&e.type==="mousemove"?(Xs=e.screenX-cs.screenX,us=e.screenY-cs.screenY):us=Xs=0,cs=e),Xs)},movementY:function(e){return"movementY"in e?e.movementY:us}}),Su=Ct(Js),no=E({},Js,{dataTransfer:0}),lo=Ct(no),so=E({},is,{relatedTarget:0}),Ks=Ct(so),ro=E({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0}),ml=Ct(ro),io=E({},Sn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gl=Ct(io),os=E({},Sn,{data:0}),yl=Ct(os),uo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},co={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"},oo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=oo[e])?!!t[e]:!1}function ds(){return fo}var ho=E({},is,{key:function(e){if(e.key){var t=uo[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ss(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?co[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ds,charCode:function(e){return e.type==="keypress"?ss(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ss(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mo=Ct(ho),go=E({},Js,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wu=Ct(go),yo=E({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ds}),xo=Ct(yo),Nu=E({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0}),po=Ct(Nu),vo=E({},Js,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),bo=Ct(vo),So=E({},Sn,{newState:0,oldState:0}),wo=Ct(So),ju=[9,13,27,32],Jr=an&&"CompositionEvent"in window,fs=null;an&&"documentMode"in document&&(fs=document.documentMode);var No=an&&"TextEvent"in window&&!fs,Eu=an&&(!Jr||fs&&8<fs&&11>=fs),Tu=" ",Mu=!1;function Cu(e,t){switch(e){case"keyup":return ju.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ou(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xl=!1;function jo(e,t){switch(e){case"compositionend":return Ou(t);case"keypress":return t.which!==32?null:(Mu=!0,Tu);case"textInput":return e=t.data,e===Tu&&Mu?null:e;default:return null}}function Eo(e,t){if(xl)return e==="compositionend"||!Jr&&Cu(e,t)?(e=qt(),Is=Ws=bn=null,xl=!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 Eu&&t.locale!=="ko"?null:t.data;default:return null}}var To={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!To[e.type]:t==="textarea"}function Kr(e,t,a,n){zn?hl?hl.push(n):hl=[n]:zn=n,t=Sc(t,"onChange"),0<t.length&&(a=new rs("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var pl=null,hs=null;function fa(e){c0(e,0)}function ln(e){var t=da(e);if(dl(t))return e}function Ru(e,t){if(e==="change")return t}var wn=!1;if(an){var ei;if(an){var ja="oninput"in document;if(!ja){var ti=document.createElement("div");ti.setAttribute("oninput","return;"),ja=typeof ti.oninput=="function"}ei=ja}else ei=!1;wn=ei&&(!document.documentMode||9<document.documentMode)}function ai(){pl&&(pl.detachEvent("onpropertychange",ni),hs=pl=null)}function ni(e){if(e.propertyName==="value"&&ln(hs)){var t=[];Kr(t,hs,e,Qs(e)),Wr(fa,t)}}function Pe(e,t,a){e==="focusin"?(ai(),pl=t,hs=a,pl.attachEvent("onpropertychange",ni)):e==="focusout"&&ai()}function vl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ln(hs)}function Mo(e,t){if(e==="click")return ln(t)}function vt(e,t){if(e==="input"||e==="change")return ln(t)}function ms(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ea=typeof Object.is=="function"?Object.is:ms;function gs(e,t){if(ea(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var i=a[n];if(!ka.call(t,i)||!ea(e[i],t[i]))return!1}return!0}function Au(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _u(e,t){var a=Au(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=Au(a)}}function Je(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Je(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Co(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=en(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=en(e.document)}return t}function er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var ku=an&&"documentMode"in document&&11>=document.documentMode,bl=null,tr=null,Pt=null,ar=!1;function ys(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ar||bl==null||bl!==en(n)||(n=bl,"selectionStart"in n&&er(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}),Pt&&gs(Pt,n)||(Pt=n,n=Sc(tr,"onSelect"),0<n.length&&(t=new rs("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=bl)))}function Ln(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Sl={animationend:Ln("Animation","AnimationEnd"),animationiteration:Ln("Animation","AnimationIteration"),animationstart:Ln("Animation","AnimationStart"),transitionrun:Ln("Transition","TransitionRun"),transitionstart:Ln("Transition","TransitionStart"),transitioncancel:Ln("Transition","TransitionCancel"),transitionend:Ln("Transition","TransitionEnd")},li={},zu={};an&&(zu=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 Hn(e){if(li[e])return li[e];if(!Sl[e])return e;var t=Sl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in zu)return li[e]=t[a];return e}var Uu=Hn("animationend"),Lu=Hn("animationiteration"),nr=Hn("animationstart"),Oo=Hn("transitionrun"),Do=Hn("transitionstart"),Hu=Hn("transitioncancel"),si=Hn("transitionend"),ri=new Map,ii="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(" ");ii.push("scrollEnd");function ha(e,t){ri.set(e,t),pn(t,[e])}var wl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},sa=[],Ua=0,xs=0;function Nl(){for(var e=Ua,t=xs=Ua=0;t<e;){var a=sa[t];sa[t++]=null;var n=sa[t];sa[t++]=null;var i=sa[t];sa[t++]=null;var c=sa[t];if(sa[t++]=null,n!==null&&i!==null){var x=n.pending;x===null?i.next=i:(i.next=x.next,x.next=i),n.pending=i}c!==0&&ps(a,i,c)}}function La(e,t,a,n){sa[Ua++]=e,sa[Ua++]=t,sa[Ua++]=a,sa[Ua++]=n,xs|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function lr(e,t,a,n){return La(e,t,a,n),vs(e)}function Ha(e,t){return La(e,null,null,t),vs(e)}function ps(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!1,c=e.return;c!==null;)c.childLanes|=a,n=c.alternate,n!==null&&(n.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-gt(a),e=c.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),c):null}function vs(e){if(50<Di)throw Di=0,Od=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ea={};function sr(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(e,t,a,n){return new sr(e,t,a,n)}function rr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qa(e,t){var a=e.alternate;return a===null?(a=Qt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function qu(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ir(e,t,a,n,i,c){var x=0;if(n=e,typeof e=="function")rr(e)&&(x=1);else if(typeof e=="string")x=Ep(e,a,pe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=Qt(31,a,t,i),e.elementType=R,e.lanes=c,e;case M:return Va(a.children,i,c,t);case Y:x=8,i|=24;break;case X:return e=Qt(12,a,t,i|2),e.elementType=X,e.lanes=c,e;case le:return e=Qt(13,a,t,i),e.elementType=le,e.lanes=c,e;case te:return e=Qt(19,a,t,i),e.elementType=te,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:x=10;break e;case Q:x=9;break e;case ee:x=11;break e;case W:x=14;break e;case J:x=16,n=null;break e}x=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=Qt(x,a,t,i),t.elementType=e,t.type=n,t.lanes=c,t}function Va(e,t,a,n){return e=Qt(7,e,n,t),e.lanes=a,e}function ui(e,t,a){return e=Qt(6,e,null,t),e.lanes=a,e}function Vu(e){var t=Qt(18,null,null,0);return t.stateNode=e,t}function jl(e,t,a){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ci=new WeakMap;function ma(e,t){if(typeof e=="object"&&e!==null){var a=ci.get(e);return a!==void 0?a:(t={value:e,source:t,stack:la(t)},ci.set(e,t),t)}return{value:e,source:t,stack:la(t)}}var qn=[],Vn=0,bs=null,sn=0,ta=[],je=0,ga=null,Ba=1,g="";function r(e,t){qn[Vn++]=sn,qn[Vn++]=bs,bs=e,sn=t}function h(e,t,a){ta[je++]=Ba,ta[je++]=g,ta[je++]=ga,ga=e;var n=Ba;e=g;var i=32-gt(n)-1;n&=~(1<<i),a+=1;var c=32-gt(t)+i;if(30<c){var x=i-i%5;c=(n&(1<<x)-1).toString(32),n>>=x,i-=x,Ba=1<<32-gt(t)+i|a<<i|n,g=c+e}else Ba=1<<c|a<<i|n,g=e}function p(e){e.return!==null&&(r(e,1),h(e,1,0))}function j(e){for(;e===bs;)bs=qn[--Vn],qn[Vn]=null,sn=qn[--Vn],qn[Vn]=null;for(;e===ga;)ga=ta[--je],ta[je]=null,g=ta[--je],ta[je]=null,Ba=ta[--je],ta[je]=null}function C(e,t){ta[je++]=Ba,ta[je++]=g,ta[je++]=ga,Ba=t.id,g=t.overflow,ga=e}var k=null,z=null,q=!1,he=null,be=!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 rn(ma(t,e)),Le}function Re(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Tt]=e,t[Ht]=n,a){case"dialog":Ze("cancel",t),Ze("close",t);break;case"iframe":case"object":case"embed":Ze("load",t);break;case"video":case"audio":for(a=0;a<Ai.length;a++)Ze(Ai[a],t);break;case"source":Ze("error",t);break;case"img":case"image":case"link":Ze("error",t),Ze("load",t);break;case"details":Ze("toggle",t);break;case"input":Ze("invalid",t),fl(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ze("invalid",t);break;case"textarea":Ze("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||h0(t.textContent,a)?(n.popover!=null&&(Ze("beforetoggle",t),Ze("toggle",t)),n.onScroll!=null&&Ze("scroll",t),n.onScrollEnd!=null&&Ze("scrollend",t),n.onClick!=null&&(t.onclick=za),t=!0):t=!1,t||Qe(e,!0)}function Nt(e){for(k=e.return;k;)switch(k.tag){case 5:case 31:case 13:be=!1;return;case 27:case 3:be=!0;return;default:k=k.return}}function Bt(e){if(e!==k)return!1;if(!q)return Nt(e),q=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Fd(e.type,e.memoizedProps)),a=!a),a&&z&&Qe(e),Nt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));z=w0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));z=w0(e)}else t===27?(t=z,Ll(e.type)?(e=Wd,Wd=null,z=e):z=t):z=k?Ga(e.stateNode.nextSibling):null;return!0}function Yt(){z=k=null,q=!1}function Nn(){var e=he;return e!==null&&(va===null?va=e:va.push.apply(va,e),he=null),e}function rn(e){he===null?he=[e]:he.push(e)}var ur=_(null),Bn=null,Ya=null;function jn(e,t,a){ge(ur,t._currentValue),t._currentValue=a}function un(e){e._currentValue=ur.current,re(ur)}function oi(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 Yn(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var x=i.child;c=c.firstContext;e:for(;c!==null;){var T=c;c=i;for(var O=0;O<t.length;O++)if(T.context===t[O]){c.lanes|=a,T=c.alternate,T!==null&&(T.lanes|=a),oi(c.return,a,e),n||(x=null);break e}c=T.next}}else if(i.tag===18){if(x=i.return,x===null)throw Error(o(341));x.lanes|=a,c=x.alternate,c!==null&&(c.lanes|=a),oi(x,a,e),x=null}else x=i.child;if(x!==null)x.return=i;else for(x=i;x!==null;){if(x===e){x=null;break}if(i=x.sibling,i!==null){i.return=x.return,x=i;break}x=x.return}i=x}}function $a(e,t,a,n){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var x=i.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var T=i.type;ea(i.pendingProps.value,x.value)||(e!==null?e.push(T):e=[T])}}else if(i===Ue.current){if(x=i.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Li):e=[Li])}i=i.return}e!==null&&Yn(t,e,a,n),t.flags|=262144}function cr(e){for(e=e.firstContext;e!==null;){if(!ea(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ss(e){Bn=e,Ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Wt(e){return Jf(Bn,e)}function Bu(e,t){return Bn===null&&Ss(e),Jf(e,t)}function Jf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ya===null){if(e===null)throw Error(o(308));Ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ya=Ya.next=t;return a}var Sx=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()})}},wx=l.unstable_scheduleCallback,Nx=l.unstable_NormalPriority,kt={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ro(){return{controller:new Sx,data:new Map,refCount:0}}function di(e){e.refCount--,e.refCount===0&&wx(Nx,function(){e.controller.abort()})}var fi=null,Ao=0,or=0,dr=null;function jx(e,t){if(fi===null){var a=fi=[];Ao=0,or=zd(),dr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Ao++,t.then(Kf,Kf),t}function Kf(){if(--Ao===0&&fi!==null){dr!==null&&(dr.status="fulfilled");var e=fi;fi=null,or=0,dr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ex(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),n}var eh=B.S;B.S=function(e,t){Lm=At(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&jx(e,t),eh!==null&&eh(e,t)};var ws=_(null);function _o(){var e=ws.current;return e!==null?e:yt.pooledCache}function Yu(e,t){t===null?ge(ws,ws.current):ge(ws,t.pool)}function th(){var e=_o();return e===null?null:{parent:kt._currentValue,pool:e}}var fr=Error(o(460)),ko=Error(o(474)),$u=Error(o(542)),Fu={then:function(){}};function ah(e){return e=e.status,e==="fulfilled"||e==="rejected"}function nh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(za,za),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sh(e),e;default:if(typeof t.status=="string")t.then(za,za);else{if(e=yt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sh(e),e}throw js=t,fr}}function Ns(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(js=a,fr):a}}var js=null;function lh(){if(js===null)throw Error(o(459));var e=js;return js=null,e}function sh(e){if(e===fr||e===$u)throw Error(o(483))}var hr=null,hi=0;function Gu(e){var t=hi;return hi+=1,hr===null&&(hr=[]),nh(hr,e,t)}function mi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zu(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function rh(e){function t($,H){if(e){var Z=$.deletions;Z===null?($.deletions=[H],$.flags|=16):Z.push(H)}}function a($,H){if(!e)return null;for(;H!==null;)t($,H),H=H.sibling;return null}function n($){for(var H=new Map;$!==null;)$.key!==null?H.set($.key,$):H.set($.index,$),$=$.sibling;return H}function i($,H){return $=qa($,H),$.index=0,$.sibling=null,$}function c($,H,Z){return $.index=Z,e?(Z=$.alternate,Z!==null?(Z=Z.index,Z<H?($.flags|=67108866,H):Z):($.flags|=67108866,H)):($.flags|=1048576,H)}function x($){return e&&$.alternate===null&&($.flags|=67108866),$}function T($,H,Z,oe){return H===null||H.tag!==6?(H=ui(Z,$.mode,oe),H.return=$,H):(H=i(H,Z),H.return=$,H)}function O($,H,Z,oe){var Ce=Z.type;return Ce===M?ie($,H,Z.props.children,oe,Z.key):H!==null&&(H.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&Ns(Ce)===H.type)?(H=i(H,Z.props),mi(H,Z),H.return=$,H):(H=ir(Z.type,Z.key,Z.props,null,$.mode,oe),mi(H,Z),H.return=$,H)}function P($,H,Z,oe){return H===null||H.tag!==4||H.stateNode.containerInfo!==Z.containerInfo||H.stateNode.implementation!==Z.implementation?(H=jl(Z,$.mode,oe),H.return=$,H):(H=i(H,Z.children||[]),H.return=$,H)}function ie($,H,Z,oe,Ce){return H===null||H.tag!==7?(H=Va(Z,$.mode,oe,Ce),H.return=$,H):(H=i(H,Z),H.return=$,H)}function de($,H,Z){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=ui(""+H,$.mode,Z),H.return=$,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case D:return Z=ir(H.type,H.key,H.props,null,$.mode,Z),mi(Z,H),Z.return=$,Z;case A:return H=jl(H,$.mode,Z),H.return=$,H;case J:return H=Ns(H),de($,H,Z)}if(me(H)||F(H))return H=Va(H,$.mode,Z,null),H.return=$,H;if(typeof H.then=="function")return de($,Gu(H),Z);if(H.$$typeof===G)return de($,Bu($,H),Z);Zu($,H)}return null}function I($,H,Z,oe){var Ce=H!==null?H.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Ce!==null?null:T($,H,""+Z,oe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case D:return Z.key===Ce?O($,H,Z,oe):null;case A:return Z.key===Ce?P($,H,Z,oe):null;case J:return Z=Ns(Z),I($,H,Z,oe)}if(me(Z)||F(Z))return Ce!==null?null:ie($,H,Z,oe,null);if(typeof Z.then=="function")return I($,H,Gu(Z),oe);if(Z.$$typeof===G)return I($,H,Bu($,Z),oe);Zu($,Z)}return null}function ae($,H,Z,oe,Ce){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return $=$.get(Z)||null,T(H,$,""+oe,Ce);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case D:return $=$.get(oe.key===null?Z:oe.key)||null,O(H,$,oe,Ce);case A:return $=$.get(oe.key===null?Z:oe.key)||null,P(H,$,oe,Ce);case J:return oe=Ns(oe),ae($,H,Z,oe,Ce)}if(me(oe)||F(oe))return $=$.get(Z)||null,ie(H,$,oe,Ce,null);if(typeof oe.then=="function")return ae($,H,Z,Gu(oe),Ce);if(oe.$$typeof===G)return ae($,H,Z,Bu(H,oe),Ce);Zu(H,oe)}return null}function Se($,H,Z,oe){for(var Ce=null,tt=null,we=H,Be=H=0,Ie=null;we!==null&&Be<Z.length;Be++){we.index>Be?(Ie=we,we=null):Ie=we.sibling;var at=I($,we,Z[Be],oe);if(at===null){we===null&&(we=Ie);break}e&&we&&at.alternate===null&&t($,we),H=c(at,H,Be),tt===null?Ce=at:tt.sibling=at,tt=at,we=Ie}if(Be===Z.length)return a($,we),q&&r($,Be),Ce;if(we===null){for(;Be<Z.length;Be++)we=de($,Z[Be],oe),we!==null&&(H=c(we,H,Be),tt===null?Ce=we:tt.sibling=we,tt=we);return q&&r($,Be),Ce}for(we=n(we);Be<Z.length;Be++)Ie=ae(we,$,Be,Z[Be],oe),Ie!==null&&(e&&Ie.alternate!==null&&we.delete(Ie.key===null?Be:Ie.key),H=c(Ie,H,Be),tt===null?Ce=Ie:tt.sibling=Ie,tt=Ie);return e&&we.forEach(function(Yl){return t($,Yl)}),q&&r($,Be),Ce}function Ae($,H,Z,oe){if(Z==null)throw Error(o(151));for(var Ce=null,tt=null,we=H,Be=H=0,Ie=null,at=Z.next();we!==null&&!at.done;Be++,at=Z.next()){we.index>Be?(Ie=we,we=null):Ie=we.sibling;var Yl=I($,we,at.value,oe);if(Yl===null){we===null&&(we=Ie);break}e&&we&&Yl.alternate===null&&t($,we),H=c(Yl,H,Be),tt===null?Ce=Yl:tt.sibling=Yl,tt=Yl,we=Ie}if(at.done)return a($,we),q&&r($,Be),Ce;if(we===null){for(;!at.done;Be++,at=Z.next())at=de($,at.value,oe),at!==null&&(H=c(at,H,Be),tt===null?Ce=at:tt.sibling=at,tt=at);return q&&r($,Be),Ce}for(we=n(we);!at.done;Be++,at=Z.next())at=ae(we,$,Be,at.value,oe),at!==null&&(e&&at.alternate!==null&&we.delete(at.key===null?Be:at.key),H=c(at,H,Be),tt===null?Ce=at:tt.sibling=at,tt=at);return e&&we.forEach(function(Up){return t($,Up)}),q&&r($,Be),Ce}function mt($,H,Z,oe){if(typeof Z=="object"&&Z!==null&&Z.type===M&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case D:e:{for(var Ce=Z.key;H!==null;){if(H.key===Ce){if(Ce=Z.type,Ce===M){if(H.tag===7){a($,H.sibling),oe=i(H,Z.props.children),oe.return=$,$=oe;break e}}else if(H.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&Ns(Ce)===H.type){a($,H.sibling),oe=i(H,Z.props),mi(oe,Z),oe.return=$,$=oe;break e}a($,H);break}else t($,H);H=H.sibling}Z.type===M?(oe=Va(Z.props.children,$.mode,oe,Z.key),oe.return=$,$=oe):(oe=ir(Z.type,Z.key,Z.props,null,$.mode,oe),mi(oe,Z),oe.return=$,$=oe)}return x($);case A:e:{for(Ce=Z.key;H!==null;){if(H.key===Ce)if(H.tag===4&&H.stateNode.containerInfo===Z.containerInfo&&H.stateNode.implementation===Z.implementation){a($,H.sibling),oe=i(H,Z.children||[]),oe.return=$,$=oe;break e}else{a($,H);break}else t($,H);H=H.sibling}oe=jl(Z,$.mode,oe),oe.return=$,$=oe}return x($);case J:return Z=Ns(Z),mt($,H,Z,oe)}if(me(Z))return Se($,H,Z,oe);if(F(Z)){if(Ce=F(Z),typeof Ce!="function")throw Error(o(150));return Z=Ce.call(Z),Ae($,H,Z,oe)}if(typeof Z.then=="function")return mt($,H,Gu(Z),oe);if(Z.$$typeof===G)return mt($,H,Bu($,Z),oe);Zu($,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,H!==null&&H.tag===6?(a($,H.sibling),oe=i(H,Z),oe.return=$,$=oe):(a($,H),oe=ui(Z,$.mode,oe),oe.return=$,$=oe),x($)):a($,H)}return function($,H,Z,oe){try{hi=0;var Ce=mt($,H,Z,oe);return hr=null,Ce}catch(we){if(we===fr||we===$u)throw we;var tt=Qt(29,we,null,$.mode);return tt.lanes=oe,tt.return=$,tt}finally{}}}var Es=rh(!0),ih=rh(!1),El=!1;function zo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uo(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,(lt&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=vs(e),ps(e,null,a),t}return La(e,n,t,a),vs(e)}function gi(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,oa(e,a)}}function Lo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?i=c=x:c=c.next=x,a=a.next}while(a!==null);c===null?i=c=t:c=c.next=t}else i=c=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Ho=!1;function yi(){if(Ho){var e=dr;if(e!==null)throw e}}function xi(e,t,a,n){Ho=!1;var i=e.updateQueue;El=!1;var c=i.firstBaseUpdate,x=i.lastBaseUpdate,T=i.shared.pending;if(T!==null){i.shared.pending=null;var O=T,P=O.next;O.next=null,x===null?c=P:x.next=P,x=O;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,T=ie.lastBaseUpdate,T!==x&&(T===null?ie.firstBaseUpdate=P:T.next=P,ie.lastBaseUpdate=O))}if(c!==null){var de=i.baseState;x=0,ie=P=O=null,T=c;do{var I=T.lane&-536870913,ae=I!==T.lane;if(ae?(We&I)===I:(n&I)===I){I!==0&&I===or&&(Ho=!0),ie!==null&&(ie=ie.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var Se=e,Ae=T;I=t;var mt=a;switch(Ae.tag){case 1:if(Se=Ae.payload,typeof Se=="function"){de=Se.call(mt,de,I);break e}de=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ae.payload,I=typeof Se=="function"?Se.call(mt,de,I):Se,I==null)break e;de=E({},de,I);break e;case 2:El=!0}}I=T.callback,I!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=i.callbacks,ae===null?i.callbacks=[I]:ae.push(I))}else ae={lane:I,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ie===null?(P=ie=ae,O=de):ie=ie.next=ae,x|=I;if(T=T.next,T===null){if(T=i.shared.pending,T===null)break;ae=T,T=ae.next,ae.next=null,i.lastBaseUpdate=ae,i.shared.pending=null}}while(!0);ie===null&&(O=de),i.baseState=O,i.firstBaseUpdate=P,i.lastBaseUpdate=ie,c===null&&(i.shared.lanes=0),Al|=x,e.lanes=x,e.memoizedState=de}}function uh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function ch(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)uh(a[e],t)}var mr=_(null),Pu=_(0);function oh(e,t){e=Xn,ge(Pu,e),ge(mr,t),Xn=e|t.baseLanes}function qo(){ge(Pu,Xn),ge(mr,mr.current)}function Vo(){Xn=Pu.current,re(mr),re(Pu)}var Ta=_(null),Fa=null;function Cl(e){var t=e.alternate;ge(Ot,Ot.current&1),ge(Ta,e),Fa===null&&(t===null||mr.current!==null||t.memoizedState!==null)&&(Fa=e)}function Bo(e){ge(Ot,Ot.current),ge(Ta,e),Fa===null&&(Fa=e)}function dh(e){e.tag===22?(ge(Ot,Ot.current),ge(Ta,e),Fa===null&&(Fa=e)):Ol()}function Ol(){ge(Ot,Ot.current),ge(Ta,Ta.current)}function Ma(e){re(Ta),Fa===e&&(Fa=null),re(Ot)}var Ot=_(0);function Qu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Pd(a)||Qd(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $n=0,Ve=null,ft=null,zt=null,Wu=!1,gr=!1,Ts=!1,Iu=0,pi=0,yr=null,Tx=0;function jt(){throw Error(o(321))}function Yo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ea(e[a],t[a]))return!1;return!0}function $o(e,t,a,n,i,c){return $n=c,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?Qh:ld,Ts=!1,c=a(n,i),Ts=!1,gr&&(c=hh(t,a,n,i)),fh(e),c}function fh(e){B.H=Si;var t=ft!==null&&ft.next!==null;if($n=0,zt=ft=Ve=null,Wu=!1,pi=0,yr=null,t)throw Error(o(300));e===null||Ut||(e=e.dependencies,e!==null&&cr(e)&&(Ut=!0))}function hh(e,t,a,n){Ve=e;var i=0;do{if(gr&&(yr=null),pi=0,gr=!1,25<=i)throw Error(o(301));if(i+=1,zt=ft=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}B.H=Wh,c=t(a,n)}while(gr);return c}function Mx(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?vi(t):t,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(Ve.flags|=1024),t}function Fo(){var e=Iu!==0;return Iu=0,e}function Go(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Zo(e){if(Wu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wu=!1}$n=0,zt=ft=Ve=null,gr=!1,pi=Iu=0,yr=null}function ra(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?Ve.memoizedState=zt=e:zt=zt.next=e,zt}function Dt(){if(ft===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=zt===null?Ve.memoizedState:zt.next;if(t!==null)zt=t,ft=e;else{if(e===null)throw Ve.alternate===null?Error(o(467)):Error(o(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},zt===null?Ve.memoizedState=zt=e:zt=zt.next=e}return zt}function Xu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vi(e){var t=pi;return pi+=1,yr===null&&(yr=[]),e=nh(yr,e,t),t=Ve,(zt===null?t.memoizedState:zt.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?Qh:ld),e}function Ju(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return vi(e);if(e.$$typeof===G)return Wt(e)}throw Error(o(438,String(e)))}function Po(e){var t=null,a=Ve.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ve.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Xu(),Ve.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=U;return t.index++,a}function Fn(e,t){return typeof t=="function"?t(e):t}function Ku(e){var t=Dt();return Qo(t,ft,e)}function Qo(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var i=e.baseQueue,c=n.pending;if(c!==null){if(i!==null){var x=i.next;i.next=c.next,c.next=x}t.baseQueue=i=c,n.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var T=x=null,O=null,P=t,ie=!1;do{var de=P.lane&-536870913;if(de!==P.lane?(We&de)===de:($n&de)===de){var I=P.revertLane;if(I===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),de===or&&(ie=!0);else if(($n&I)===I){P=P.next,I===or&&(ie=!0);continue}else de={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},O===null?(T=O=de,x=c):O=O.next=de,Ve.lanes|=I,Al|=I;de=P.action,Ts&&a(c,de),c=P.hasEagerState?P.eagerState:a(c,de)}else I={lane:de,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},O===null?(T=O=I,x=c):O=O.next=I,Ve.lanes|=de,Al|=de;P=P.next}while(P!==null&&P!==t);if(O===null?x=c:O.next=T,!ea(c,e.memoizedState)&&(Ut=!0,ie&&(a=dr,a!==null)))throw a;e.memoizedState=c,e.baseState=x,e.baseQueue=O,n.lastRenderedState=c}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Wo(e){var t=Dt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,c=t.memoizedState;if(i!==null){a.pending=null;var x=i=i.next;do c=e(c,x.action),x=x.next;while(x!==i);ea(c,t.memoizedState)||(Ut=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function mh(e,t,a){var n=Ve,i=Dt(),c=q;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var x=!ea((ft||i).memoizedState,a);if(x&&(i.memoizedState=a,Ut=!0),i=i.queue,Jo(xh.bind(null,n,i,e),[e]),i.getSnapshot!==t||x||zt!==null&&zt.memoizedState.tag&1){if(n.flags|=2048,xr(9,{destroy:void 0},yh.bind(null,n,i,a,t),null),yt===null)throw Error(o(349));c||($n&127)!==0||gh(n,t,a)}return a}function gh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ve.updateQueue,t===null?(t=Xu(),Ve.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function yh(e,t,a,n){t.value=a,t.getSnapshot=n,ph(t)&&vh(e)}function xh(e,t,a){return a(function(){ph(t)&&vh(e)})}function ph(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ea(e,a)}catch{return!0}}function vh(e){var t=Ha(e,2);t!==null&&ba(t,e,2)}function Io(e){var t=ra();if(typeof e=="function"){var a=e;if(e=a(),Ts){Xe(!0);try{a()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:e},t}function bh(e,t,a,n){return e.baseState=a,Qo(e,ft,typeof n=="function"?n:Fn)}function Cx(e,t,a,n,i){if(ac(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){c.listeners.push(x)}};B.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,Sh(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Sh(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=B.T,x={};B.T=x;try{var T=a(i,n),O=B.S;O!==null&&O(x,T),wh(e,t,T)}catch(P){Xo(e,t,P)}finally{c!==null&&x.types!==null&&(c.types=x.types),B.T=c}}else try{c=a(i,n),wh(e,t,c)}catch(P){Xo(e,t,P)}}function wh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Nh(e,t,n)},function(n){return Xo(e,t,n)}):Nh(e,t,a)}function Nh(e,t,a){t.status="fulfilled",t.value=a,jh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Sh(e,a)))}function Xo(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,jh(t),t=t.next;while(t!==n)}e.action=null}function jh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Eh(e,t){return t}function Th(e,t){if(q){var a=yt.formState;if(a!==null){e:{var n=Ve;if(q){if(z){t:{for(var i=z,c=be;i.nodeType!==8;){if(!c){i=null;break t}if(i=Ga(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){z=Ga(i.nextSibling),n=i.data==="F!";break e}}Qe(n)}n=!1}n&&(t=a[0])}}return a=ra(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eh,lastRenderedState:t},a.queue=n,a=Gh.bind(null,Ve,n),n.dispatch=a,n=Io(!1),c=nd.bind(null,Ve,!1,n.queue),n=ra(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=Cx.bind(null,Ve,i,c,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function Mh(e){var t=Dt();return Ch(t,ft,e)}function Ch(e,t,a){if(t=Qo(e,t,Eh)[0],e=Ku(Fn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=vi(t)}catch(x){throw x===fr?$u:x}else n=t;t=Dt();var i=t.queue,c=i.dispatch;return a!==t.memoizedState&&(Ve.flags|=2048,xr(9,{destroy:void 0},Ox.bind(null,i,a),null)),[n,c,e]}function Ox(e,t){e.action=t}function Oh(e){var t=Dt(),a=ft;if(a!==null)return Ch(t,a,e);Dt(),t=t.memoizedState,a=Dt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function xr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Ve.updateQueue,t===null&&(t=Xu(),Ve.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function Dh(){return Dt().memoizedState}function ec(e,t,a,n){var i=ra();Ve.flags|=e,i.memoizedState=xr(1|t,{destroy:void 0},a,n===void 0?null:n)}function tc(e,t,a,n){var i=Dt();n=n===void 0?null:n;var c=i.memoizedState.inst;ft!==null&&n!==null&&Yo(n,ft.memoizedState.deps)?i.memoizedState=xr(t,c,a,n):(Ve.flags|=e,i.memoizedState=xr(1|t,c,a,n))}function Rh(e,t){ec(8390656,8,e,t)}function Jo(e,t){tc(2048,8,e,t)}function Dx(e){Ve.flags|=4;var t=Ve.updateQueue;if(t===null)t=Xu(),Ve.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Ah(e){var t=Dt().memoizedState;return Dx({ref:t,nextImpl:e}),function(){if((lt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function _h(e,t){return tc(4,2,e,t)}function kh(e,t){return tc(4,4,e,t)}function zh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Uh(e,t,a){a=a!=null?a.concat([e]):null,tc(4,4,zh.bind(null,t,e),a)}function Ko(){}function Lh(e,t){var a=Dt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Yo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Hh(e,t){var a=Dt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Yo(t,n[1]))return n[0];if(n=e(),Ts){Xe(!0);try{e()}finally{Xe(!1)}}return a.memoizedState=[n,t],n}function ed(e,t,a){return a===void 0||($n&1073741824)!==0&&(We&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=qm(),Ve.lanes|=e,Al|=e,a)}function qh(e,t,a,n){return ea(a,t)?a:mr.current!==null?(e=ed(e,a,n),ea(e,t)||(Ut=!0),e):($n&42)===0||($n&1073741824)!==0&&(We&261930)===0?(Ut=!0,e.memoizedState=a):(e=qm(),Ve.lanes|=e,Al|=e,t)}function Vh(e,t,a,n,i){var c=ue.p;ue.p=c!==0&&8>c?c:8;var x=B.T,T={};B.T=T,nd(e,!1,t,a);try{var O=i(),P=B.S;if(P!==null&&P(T,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var ie=Ex(O,n);bi(e,t,ie,Da(e))}else bi(e,t,n,Da(e))}catch(de){bi(e,t,{then:function(){},status:"rejected",reason:de},Da())}finally{ue.p=c,x!==null&&T.types!==null&&(x.types=T.types),B.T=x}}function Rx(){}function td(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=Bh(e).queue;Vh(e,i,t,se,a===null?Rx:function(){return Yh(e),a(n)})}function Bh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:se},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yh(e){var t=Bh(e);t.next===null&&(t=e.alternate.memoizedState),bi(e,t.next.queue,{},Da())}function ad(){return Wt(Li)}function $h(){return Dt().memoizedState}function Fh(){return Dt().memoizedState}function Ax(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Da();e=Tl(a);var n=Ml(t,e,a);n!==null&&(ba(n,t,a),gi(n,t,a)),t={cache:Ro()},e.payload=t;return}t=t.return}}function _x(e,t,a){var n=Da();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ac(e)?Zh(t,a):(a=lr(e,t,a,n),a!==null&&(ba(a,e,n),Ph(a,t,n)))}function Gh(e,t,a){var n=Da();bi(e,t,a,n)}function bi(e,t,a,n){var i={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ac(e))Zh(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var x=t.lastRenderedState,T=c(x,a);if(i.hasEagerState=!0,i.eagerState=T,ea(T,x))return La(e,t,i,0),yt===null&&Nl(),!1}catch{}finally{}if(a=lr(e,t,i,n),a!==null)return ba(a,e,n),Ph(a,t,n),!0}return!1}function nd(e,t,a,n){if(n={lane:2,revertLane:zd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ac(e)){if(t)throw Error(o(479))}else t=lr(e,a,n,2),t!==null&&ba(t,e,2)}function ac(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Zh(e,t){gr=Wu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Ph(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,oa(e,a)}}var Si={readContext:Wt,use:Ju,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};Si.useEffectEvent=jt;var Qh={readContext:Wt,use:Ju,useCallback:function(e,t){return ra().memoizedState=[e,t===void 0?null:t],e},useContext:Wt,useEffect:Rh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ec(4194308,4,zh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ec(4194308,4,e,t)},useInsertionEffect:function(e,t){ec(4,2,e,t)},useMemo:function(e,t){var a=ra();t=t===void 0?null:t;var n=e();if(Ts){Xe(!0);try{e()}finally{Xe(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ra();if(a!==void 0){var i=a(t);if(Ts){Xe(!0);try{a(t)}finally{Xe(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=_x.bind(null,Ve,e),[n.memoizedState,e]},useRef:function(e){var t=ra();return e={current:e},t.memoizedState=e},useState:function(e){e=Io(e);var t=e.queue,a=Gh.bind(null,Ve,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Ko,useDeferredValue:function(e,t){var a=ra();return ed(a,e,t)},useTransition:function(){var e=Io(!1);return e=Vh.bind(null,Ve,e.queue,!0,!1),ra().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ve,i=ra();if(q){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),yt===null)throw Error(o(349));(We&127)!==0||gh(n,t,a)}i.memoizedState=a;var c={value:a,getSnapshot:t};return i.queue=c,Rh(xh.bind(null,n,c,e),[e]),n.flags|=2048,xr(9,{destroy:void 0},yh.bind(null,n,c,a,t),null),a},useId:function(){var e=ra(),t=yt.identifierPrefix;if(q){var a=g,n=Ba;a=(n&~(1<<32-gt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Iu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Tx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ad,useFormState:Th,useActionState:Th,useOptimistic:function(e){var t=ra();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=nd.bind(null,Ve,!0,a),a.dispatch=t,[e,t]},useMemoCache:Po,useCacheRefresh:function(){return ra().memoizedState=Ax.bind(null,Ve)},useEffectEvent:function(e){var t=ra(),a={impl:e};return t.memoizedState=a,function(){if((lt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},ld={readContext:Wt,use:Ju,useCallback:Lh,useContext:Wt,useEffect:Jo,useImperativeHandle:Uh,useInsertionEffect:_h,useLayoutEffect:kh,useMemo:Hh,useReducer:Ku,useRef:Dh,useState:function(){return Ku(Fn)},useDebugValue:Ko,useDeferredValue:function(e,t){var a=Dt();return qh(a,ft.memoizedState,e,t)},useTransition:function(){var e=Ku(Fn)[0],t=Dt().memoizedState;return[typeof e=="boolean"?e:vi(e),t]},useSyncExternalStore:mh,useId:$h,useHostTransitionStatus:ad,useFormState:Mh,useActionState:Mh,useOptimistic:function(e,t){var a=Dt();return bh(a,ft,e,t)},useMemoCache:Po,useCacheRefresh:Fh};ld.useEffectEvent=Ah;var Wh={readContext:Wt,use:Ju,useCallback:Lh,useContext:Wt,useEffect:Jo,useImperativeHandle:Uh,useInsertionEffect:_h,useLayoutEffect:kh,useMemo:Hh,useReducer:Wo,useRef:Dh,useState:function(){return Wo(Fn)},useDebugValue:Ko,useDeferredValue:function(e,t){var a=Dt();return ft===null?ed(a,e,t):qh(a,ft.memoizedState,e,t)},useTransition:function(){var e=Wo(Fn)[0],t=Dt().memoizedState;return[typeof e=="boolean"?e:vi(e),t]},useSyncExternalStore:mh,useId:$h,useHostTransitionStatus:ad,useFormState:Oh,useActionState:Oh,useOptimistic:function(e,t){var a=Dt();return ft!==null?bh(a,ft,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Po,useCacheRefresh:Fh};Wh.useEffectEvent=Ah;function sd(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:E({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var rd={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Da(),i=Tl(n);i.payload=t,a!=null&&(i.callback=a),t=Ml(e,i,n),t!==null&&(ba(t,e,n),gi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Da(),i=Tl(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=Ml(e,i,n),t!==null&&(ba(t,e,n),gi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Da(),n=Tl(a);n.tag=2,t!=null&&(n.callback=t),t=Ml(e,n,a),t!==null&&(ba(t,e,a),gi(t,e,a))}};function Ih(e,t,a,n,i,c,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,x):t.prototype&&t.prototype.isPureReactComponent?!gs(a,n)||!gs(i,c):!0}function Xh(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&&rd.enqueueReplaceState(t,t.state,null)}function Ms(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=E({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Jh(e){wl(e)}function Kh(e){console.error(e)}function em(e){wl(e)}function nc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function tm(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function id(e,t,a){return a=Tl(a),a.tag=3,a.payload={element:null},a.callback=function(){nc(e,t)},a}function am(e){return e=Tl(e),e.tag=3,e}function nm(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var c=n.value;e.payload=function(){return i(c)},e.callback=function(){tm(t,a,n)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){tm(t,a,n),typeof i!="function"&&(_l===null?_l=new Set([this]):_l.add(this));var T=n.stack;this.componentDidCatch(n.value,{componentStack:T!==null?T:""})})}function kx(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&$a(t,a,i,!0),a=Ta.current,a!==null){switch(a.tag){case 31:case 13:return Fa===null?gc():a.alternate===null&&Et===0&&(Et=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===Fu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Ad(e,n,i)),!1;case 22:return a.flags|=65536,n===Fu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Ad(e,n,i)),!1}throw Error(o(435,a.tag))}return Ad(e,n,i),gc(),!1}if(q)return t=Ta.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Le&&(e=Error(o(422),{cause:n}),rn(ma(e,a)))):(n!==Le&&(t=Error(o(423),{cause:n}),rn(ma(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=ma(n,a),i=id(e.stateNode,n,i),Lo(e,i),Et!==4&&(Et=2)),!1;var c=Error(o(520),{cause:n});if(c=ma(c,a),Oi===null?Oi=[c]:Oi.push(c),Et!==4&&(Et=2),t===null)return!0;n=ma(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=id(a.stateNode,n,e),Lo(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(_l===null||!_l.has(c))))return a.flags|=65536,i&=-i,a.lanes|=i,i=am(i),nm(i,e,a,n),Lo(a,i),!1}a=a.return}while(a!==null);return!1}var ud=Error(o(461)),Ut=!1;function It(e,t,a,n){t.child=e===null?ih(t,null,a,n):Es(t,e.child,a,n)}function lm(e,t,a,n,i){a=a.render;var c=t.ref;if("ref"in n){var x={};for(var T in n)T!=="ref"&&(x[T]=n[T])}else x=n;return Ss(t),n=$o(e,t,a,x,c,i),T=Fo(),e!==null&&!Ut?(Go(e,t,i),Gn(e,t,i)):(q&&T&&p(t),t.flags|=1,It(e,t,n,i),t.child)}function sm(e,t,a,n,i){if(e===null){var c=a.type;return typeof c=="function"&&!rr(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,rm(e,t,c,n,i)):(e=ir(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!yd(e,i)){var x=c.memoizedProps;if(a=a.compare,a=a!==null?a:gs,a(x,n)&&e.ref===t.ref)return Gn(e,t,i)}return t.flags|=1,e=qa(c,n),e.ref=t.ref,e.return=t,t.child=e}function rm(e,t,a,n,i){if(e!==null){var c=e.memoizedProps;if(gs(c,n)&&e.ref===t.ref)if(Ut=!1,t.pendingProps=n=c,yd(e,i))(e.flags&131072)!==0&&(Ut=!0);else return t.lanes=e.lanes,Gn(e,t,i)}return cd(e,t,a,n,i)}function im(e,t,a,n){var i=n.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(n=t.child=e.child,i=0;n!==null;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~c}else n=0,t.child=null;return um(e,t,c,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Yu(t,c!==null?c.cachePool:null),c!==null?oh(t,c):qo(),dh(t);else return n=t.lanes=536870912,um(e,t,c!==null?c.baseLanes|a:a,a,n)}else c!==null?(Yu(t,c.cachePool),oh(t,c),Ol(),t.memoizedState=null):(e!==null&&Yu(t,null),qo(),Ol());return It(e,t,i,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 um(e,t,a,n,i){var c=_o();return c=c===null?null:{parent:kt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Yu(t,null),qo(),dh(t),e!==null&&$a(e,t,n,!0),t.childLanes=i,null}function lc(e,t){return t=rc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cm(e,t,a){return Es(t,e.child,null,a),e=lc(t,t.pendingProps),e.flags|=2,Ma(t),t.memoizedState=null,e}function zx(e,t,a){var n=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(q){if(n.mode==="hidden")return e=lc(t,n),t.lanes=536870912,wi(null,e);if(Bo(t),(e=z)?(e=S0(e,be),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ga!==null?{id:Ba,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Vu(e),a.return=t,t.child=a,k=t,z=null)):e=null,e===null)throw Qe(t);return t.lanes=536870912,null}return lc(t,n)}var c=e.memoizedState;if(c!==null){var x=c.dehydrated;if(Bo(t),i)if(t.flags&256)t.flags&=-257,t=cm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ut||$a(e,t,a,!1),i=(a&e.childLanes)!==0,Ut||i){if(n=yt,n!==null&&(x=Br(n,a),x!==0&&x!==c.retryLane))throw c.retryLane=x,Ha(e,x),ba(n,e,x),ud;gc(),t=cm(e,t,a)}else e=c.treeContext,z=Ga(x.nextSibling),k=t,q=!0,he=null,be=!1,e!==null&&C(t,e),t=lc(t,n),t.flags|=4096;return t}return e=qa(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function sc(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function cd(e,t,a,n,i){return Ss(t),a=$o(e,t,a,n,void 0,i),n=Fo(),e!==null&&!Ut?(Go(e,t,i),Gn(e,t,i)):(q&&n&&p(t),t.flags|=1,It(e,t,a,i),t.child)}function om(e,t,a,n,i,c){return Ss(t),t.updateQueue=null,a=hh(t,n,a,i),fh(e),n=Fo(),e!==null&&!Ut?(Go(e,t,c),Gn(e,t,c)):(q&&n&&p(t),t.flags|=1,It(e,t,a,c),t.child)}function dm(e,t,a,n,i){if(Ss(t),t.stateNode===null){var c=Ea,x=a.contextType;typeof x=="object"&&x!==null&&(c=Wt(x)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=rd,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},zo(t),x=a.contextType,c.context=typeof x=="object"&&x!==null?Wt(x):Ea,c.state=t.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(sd(t,a,x,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(x=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),x!==c.state&&rd.enqueueReplaceState(c,c.state,null),xi(t,n,c,i),yi(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var T=t.memoizedProps,O=Ms(a,T);c.props=O;var P=c.context,ie=a.contextType;x=Ea,typeof ie=="object"&&ie!==null&&(x=Wt(ie));var de=a.getDerivedStateFromProps;ie=typeof de=="function"||typeof c.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,ie||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(T||P!==x)&&Xh(t,c,n,x),El=!1;var I=t.memoizedState;c.state=I,xi(t,n,c,i),yi(),P=t.memoizedState,T||I!==P||El?(typeof de=="function"&&(sd(t,a,de,n),P=t.memoizedState),(O=El||Ih(t,a,O,n,I,P,x))?(ie||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=P),c.props=n,c.state=P,c.context=x,n=O):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,Uo(e,t),x=t.memoizedProps,ie=Ms(a,x),c.props=ie,de=t.pendingProps,I=c.context,P=a.contextType,O=Ea,typeof P=="object"&&P!==null&&(O=Wt(P)),T=a.getDerivedStateFromProps,(P=typeof T=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(x!==de||I!==O)&&Xh(t,c,n,O),El=!1,I=t.memoizedState,c.state=I,xi(t,n,c,i),yi();var ae=t.memoizedState;x!==de||I!==ae||El||e!==null&&e.dependencies!==null&&cr(e.dependencies)?(typeof T=="function"&&(sd(t,a,T,n),ae=t.memoizedState),(ie=El||Ih(t,a,ie,n,I,ae,O)||e!==null&&e.dependencies!==null&&cr(e.dependencies))?(P||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,ae,O),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,ae,O)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=ae),c.props=n,c.state=ae,c.context=O,n=ie):(typeof c.componentDidUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,sc(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=Es(t,e.child,null,i),t.child=Es(t,null,a,i)):It(e,t,a,i),t.memoizedState=c.state,e=t.child):e=Gn(e,t,i),e}function fm(e,t,a,n){return Yt(),t.flags|=256,It(e,t,a,n),t.child}var od={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dd(e){return{baseLanes:e,cachePool:th()}}function fd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Oa),e}function hm(e,t,a){var n=t.pendingProps,i=!1,c=(t.flags&128)!==0,x;if((x=c)||(x=e!==null&&e.memoizedState===null?!1:(Ot.current&2)!==0),x&&(i=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(q){if(i?Cl(t):Ol(),(e=z)?(e=S0(e,be),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ga!==null?{id:Ba,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Vu(e),a.return=t,t.child=a,k=t,z=null)):e=null,e===null)throw Qe(t);return Qd(e)?t.lanes=32:t.lanes=536870912,null}var T=n.children;return n=n.fallback,i?(Ol(),i=t.mode,T=rc({mode:"hidden",children:T},i),n=Va(n,i,a,null),T.return=t,n.return=t,T.sibling=n,t.child=T,n=t.child,n.memoizedState=dd(a),n.childLanes=fd(e,x,a),t.memoizedState=od,wi(null,n)):(Cl(t),hd(t,T))}var O=e.memoizedState;if(O!==null&&(T=O.dehydrated,T!==null)){if(c)t.flags&256?(Cl(t),t.flags&=-257,t=md(e,t,a)):t.memoizedState!==null?(Ol(),t.child=e.child,t.flags|=128,t=null):(Ol(),T=n.fallback,i=t.mode,n=rc({mode:"visible",children:n.children},i),T=Va(T,i,a,null),T.flags|=2,n.return=t,T.return=t,n.sibling=T,t.child=n,Es(t,e.child,null,a),n=t.child,n.memoizedState=dd(a),n.childLanes=fd(e,x,a),t.memoizedState=od,t=wi(null,n));else if(Cl(t),Qd(T)){if(x=T.nextSibling&&T.nextSibling.dataset,x)var P=x.dgst;x=P,n=Error(o(419)),n.stack="",n.digest=x,rn({value:n,source:null,stack:null}),t=md(e,t,a)}else if(Ut||$a(e,t,a,!1),x=(a&e.childLanes)!==0,Ut||x){if(x=yt,x!==null&&(n=Br(x,a),n!==0&&n!==O.retryLane))throw O.retryLane=n,Ha(e,n),ba(x,e,n),ud;Pd(T)||gc(),t=md(e,t,a)}else Pd(T)?(t.flags|=192,t.child=e.child,t=null):(e=O.treeContext,z=Ga(T.nextSibling),k=t,q=!0,he=null,be=!1,e!==null&&C(t,e),t=hd(t,n.children),t.flags|=4096);return t}return i?(Ol(),T=n.fallback,i=t.mode,O=e.child,P=O.sibling,n=qa(O,{mode:"hidden",children:n.children}),n.subtreeFlags=O.subtreeFlags&65011712,P!==null?T=qa(P,T):(T=Va(T,i,a,null),T.flags|=2),T.return=t,n.return=t,n.sibling=T,t.child=n,wi(null,n),n=t.child,T=e.child.memoizedState,T===null?T=dd(a):(i=T.cachePool,i!==null?(O=kt._currentValue,i=i.parent!==O?{parent:O,pool:O}:i):i=th(),T={baseLanes:T.baseLanes|a,cachePool:i}),n.memoizedState=T,n.childLanes=fd(e,x,a),t.memoizedState=od,wi(e.child,n)):(Cl(t),a=e.child,e=a.sibling,a=qa(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=a,t.memoizedState=null,a)}function hd(e,t){return t=rc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rc(e,t){return e=Qt(22,e,null,t),e.lanes=0,e}function md(e,t,a){return Es(t,e.child,null,a),e=hd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),oi(e.return,t,a)}function gd(e,t,a,n,i,c){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,treeForkCount:c}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=n,x.tail=a,x.tailMode=i,x.treeForkCount=c)}function gm(e,t,a){var n=t.pendingProps,i=n.revealOrder,c=n.tail;n=n.children;var x=Ot.current,T=(x&2)!==0;if(T?(x=x&1|2,t.flags|=128):x&=1,ge(Ot,x),It(e,t,n,a),n=q?sn:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mm(e,a,t);else if(e.tag===19)mm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&Qu(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),gd(t,!1,i,a,c,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Qu(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}gd(t,!0,a,null,c,n);break;case"together":gd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Gn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Al|=t.lanes,(a&t.childLanes)===0)if(e!==null){if($a(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=qa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=qa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function yd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&cr(e)))}function Ux(e,t,a){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),jn(t,kt,e.memoizedState.cache),Yt();break;case 27:case 5:Ft(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:jn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Bo(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?hm(e,t,a):(Cl(t),e=Gn(e,t,a),e!==null?e.sibling:null);Cl(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||($a(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return gm(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ge(Ot,Ot.current),n)break;return null;case 22:return t.lanes=0,im(e,t,a,t.pendingProps);case 24:jn(t,kt,e.memoizedState.cache)}return Gn(e,t,a)}function ym(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ut=!0;else{if(!yd(e,a)&&(t.flags&128)===0)return Ut=!1,Ux(e,t,a);Ut=(e.flags&131072)!==0}else Ut=!1,q&&(t.flags&1048576)!==0&&h(t,sn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Ns(t.elementType),t.type=e,typeof e=="function")rr(e)?(n=Ms(e,n),t.tag=1,t=dm(null,t,e,n,a)):(t.tag=0,t=cd(null,t,e,n,a));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=lm(null,t,e,n,a);break e}else if(i===W){t.tag=14,t=sm(null,t,e,n,a);break e}}throw t=ye(e)||e,Error(o(306,t,""))}}return t;case 0:return cd(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=Ms(n,t.pendingProps),dm(e,t,n,i,a);case 3:e:{if(ke(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var c=t.memoizedState;i=c.element,Uo(e,t),xi(t,n,null,a);var x=t.memoizedState;if(n=x.cache,jn(t,kt,n),n!==c.cache&&Yn(t,[kt],a,!0),yi(),n=x.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=fm(e,t,n,a);break e}else if(n!==i){i=ma(Error(o(424)),t),rn(i),t=fm(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(z=Ga(e.firstChild),k=t,q=!0,he=null,be=!0,a=ih(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Yt(),n===i){t=Gn(e,t,a);break e}It(e,t,n,a)}t=t.child}return t;case 26:return sc(e,t),e===null?(a=M0(t.type,null,t.pendingProps,null))?t.memoizedState=a:q||(a=t.type,e=t.pendingProps,n=wc(Ee.current).createElement(a),n[Tt]=t,n[Ht]=e,Xt(n,a,e),_t(n),t.stateNode=n):t.memoizedState=M0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ft(t),e===null&&q&&(n=t.stateNode=j0(t.type,t.pendingProps,Ee.current),k=t,be=!0,i=z,Ll(t.type)?(Wd=i,z=Ga(n.firstChild)):z=i),It(e,t,t.pendingProps.children,a),sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&q&&((i=n=z)&&(n=fp(n,t.type,t.pendingProps,be),n!==null?(t.stateNode=n,k=t,z=Ga(n.firstChild),be=!1,i=!0):i=!1),i||Qe(t)),Ft(t),i=t.type,c=t.pendingProps,x=e!==null?e.memoizedProps:null,n=c.children,Fd(i,c)?n=null:x!==null&&Fd(i,x)&&(t.flags|=32),t.memoizedState!==null&&(i=$o(e,t,Mx,null,null,a),Li._currentValue=i),sc(e,t),It(e,t,n,a),t.child;case 6:return e===null&&q&&((e=a=z)&&(a=hp(a,t.pendingProps,be),a!==null?(t.stateNode=a,k=t,z=null,e=!0):e=!1),e||Qe(t)),null;case 13:return hm(e,t,a);case 4:return ke(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Es(t,null,n,a):It(e,t,n,a),t.child;case 11:return lm(e,t,t.type,t.pendingProps,a);case 7:return It(e,t,t.pendingProps,a),t.child;case 8:return It(e,t,t.pendingProps.children,a),t.child;case 12:return It(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,jn(t,t.type,n.value),It(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,Ss(t),i=Wt(i),n=n(i),t.flags|=1,It(e,t,n,a),t.child;case 14:return sm(e,t,t.type,t.pendingProps,a);case 15:return rm(e,t,t.type,t.pendingProps,a);case 19:return gm(e,t,a);case 31:return zx(e,t,a);case 22:return im(e,t,a,t.pendingProps);case 24:return Ss(t),n=Wt(kt),e===null?(i=_o(),i===null&&(i=yt,c=Ro(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=a),i=c),t.memoizedState={parent:n,cache:i},zo(t),jn(t,kt,i)):((e.lanes&a)!==0&&(Uo(e,t),xi(t,null,null,a),yi()),i=e.memoizedState,c=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),jn(t,kt,n)):(n=c.cache,jn(t,kt,n),n!==i.cache&&Yn(t,[kt],a,!0))),It(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 xd(e,t,a,n,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if($m())e.flags|=8192;else throw js=Fu,ko}else e.flags&=-16777217}function xm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!A0(t))if($m())e.flags|=8192;else throw js=Fu,ko}function ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Vr():536870912,e.lanes|=t,Sr|=t)}function Ni(e,t){if(!q)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Lx(e,t,a){var n=t.pendingProps;switch(j(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(t),null;case 1:return bt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),un(kt),et(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Bt(t)?Zn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nn())),bt(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(Zn(t),c!==null?(bt(t),xm(t,c)):(bt(t),xd(t,i,null,n,a))):c?c!==e.memoizedState?(Zn(t),bt(t),xm(t,c)):(bt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Zn(t),bt(t),xd(t,i,e,n,a)),null;case 27:if(Na(t),a=Ee.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Zn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return bt(t),null}e=pe.current,Bt(t)?Re(t):(e=j0(i,n,a),t.stateNode=e,Zn(t))}return bt(t),null;case 5:if(Na(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Zn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return bt(t),null}if(c=pe.current,Bt(t))Re(t);else{var x=wc(Ee.current);switch(c){case 1:c=x.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=x.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=x.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=x.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=x.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof n.is=="string"?x.createElement("select",{is:n.is}):x.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?x.createElement(i,{is:n.is}):x.createElement(i)}}c[Tt]=t,c[Ht]=n;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)c.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=c;e:switch(Xt(c,i,n),i){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Zn(t)}}return bt(t),xd(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=Ee.current,Bt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=k,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||h0(e.nodeValue,a)),e||Qe(t,!0)}else e=wc(e).createTextNode(n),e[Tt]=t,t.stateNode=e}return bt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Bt(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[Tt]=t}else Yt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;bt(t),e=!1}else a=Nn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ma(t),t):(Ma(t),null);if((t.flags&128)!==0)throw Error(o(558))}return bt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Bt(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[Tt]=t}else Yt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;bt(t),i=!1}else i=Nn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Ma(t),t):(Ma(t),null)}return Ma(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==i&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ic(t,t.updateQueue),bt(t),null);case 4:return et(),e===null&&qd(t.stateNode.containerInfo),bt(t),null;case 10:return un(t.type),bt(t),null;case 19:if(re(Ot),n=t.memoizedState,n===null)return bt(t),null;if(i=(t.flags&128)!==0,c=n.rendering,c===null)if(i)Ni(n,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Qu(e),c!==null){for(t.flags|=128,Ni(n,!1),e=c.updateQueue,t.updateQueue=e,ic(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)qu(a,e),a=a.sibling;return ge(Ot,Ot.current&1|2),q&&r(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&At()>fc&&(t.flags|=128,i=!0,Ni(n,!1),t.lanes=4194304)}else{if(!i)if(e=Qu(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,ic(t,e),Ni(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!q)return bt(t),null}else 2*At()-n.renderingStartTime>fc&&a!==536870912&&(t.flags|=128,i=!0,Ni(n,!1),t.lanes=4194304);n.isBackwards?(c.sibling=t.child,t.child=c):(e=n.last,e!==null?e.sibling=c:t.child=c,n.last=c)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=At(),e.sibling=null,a=Ot.current,ge(Ot,i?a&1|2:a&1),q&&r(t,n.treeForkCount),e):(bt(t),null);case 22:case 23:return Ma(t),Vo(),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&&(bt(t),t.subtreeFlags&6&&(t.flags|=8192)):bt(t),a=t.updateQueue,a!==null&&ic(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&re(ws),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),un(kt),bt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Hx(e,t){switch(j(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return un(kt),et(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Na(t),null;case 31:if(t.memoizedState!==null){if(Ma(t),t.alternate===null)throw Error(o(340));Yt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ma(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Yt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return re(Ot),null;case 4:return et(),null;case 10:return un(t.type),null;case 22:case 23:return Ma(t),Vo(),e!==null&&re(ws),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return un(kt),null;case 25:return null;default:return null}}function pm(e,t){switch(j(t),t.tag){case 3:un(kt),et();break;case 26:case 27:case 5:Na(t);break;case 4:et();break;case 31:t.memoizedState!==null&&Ma(t);break;case 13:Ma(t);break;case 19:re(Ot);break;case 10:un(t.type);break;case 22:case 23:Ma(t),Vo(),e!==null&&re(ws);break;case 24:un(kt)}}function ji(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){n=void 0;var c=a.create,x=a.inst;n=c(),x.destroy=n}a=a.next}while(a!==i)}}catch(T){ct(t,t.return,T)}}function Dl(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var c=i.next;n=c;do{if((n.tag&e)===e){var x=n.inst,T=x.destroy;if(T!==void 0){x.destroy=void 0,i=t;var O=a,P=T;try{P()}catch(ie){ct(i,O,ie)}}}n=n.next}while(n!==c)}}catch(ie){ct(t,t.return,ie)}}function vm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ch(t,a)}catch(n){ct(e,e.return,n)}}}function bm(e,t,a){a.props=Ms(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){ct(e,t,n)}}function Ei(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(i){ct(e,t,i)}}function En(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){ct(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){ct(e,t,i)}else a.current=null}function Sm(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(i){ct(e,e.return,i)}}function pd(e,t,a){try{var n=e.stateNode;rp(n,e.type,a,t),n[Ht]=t}catch(i){ct(e,e.return,i)}}function wm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ll(e.type)||e.tag===4}function vd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wm(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&&Ll(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 bd(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=za));else if(n!==4&&(n===27&&Ll(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(bd(e,t,a),e=e.sibling;e!==null;)bd(e,t,a),e=e.sibling}function uc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&Ll(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(uc(e,t,a),e=e.sibling;e!==null;)uc(e,t,a),e=e.sibling}function Nm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Xt(t,n,a),t[Tt]=e,t[Ht]=a}catch(c){ct(e,e.return,c)}}var Pn=!1,Lt=!1,Sd=!1,jm=typeof WeakSet=="function"?WeakSet:Set,$t=null;function qx(e,t){if(e=e.containerInfo,Yd=Oc,e=Co(e),er(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var i=n.anchorOffset,c=n.focusNode;n=n.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var x=0,T=-1,O=-1,P=0,ie=0,de=e,I=null;t:for(;;){for(var ae;de!==a||i!==0&&de.nodeType!==3||(T=x+i),de!==c||n!==0&&de.nodeType!==3||(O=x+n),de.nodeType===3&&(x+=de.nodeValue.length),(ae=de.firstChild)!==null;)I=de,de=ae;for(;;){if(de===e)break t;if(I===a&&++P===i&&(T=x),I===c&&++ie===n&&(O=x),(ae=de.nextSibling)!==null)break;de=I,I=de.parentNode}de=ae}a=T===-1||O===-1?null:{start:T,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for($d={focusedElem:e,selectionRange:a},Oc=!1,$t=t;$t!==null;)if(t=$t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$t=e;else for(;$t!==null;){switch(t=$t,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)i=e[a],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,i=c.memoizedProps,c=c.memoizedState,n=a.stateNode;try{var Se=Ms(a.type,i);e=n.getSnapshotBeforeUpdate(Se,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){ct(a,a.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Zd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Zd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,$t=e;break}$t=t.return}}function Em(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Wn(e,a),n&4&&ji(5,a);break;case 1:if(Wn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(x){ct(a,a.return,x)}else{var i=Ms(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){ct(a,a.return,x)}}n&64&&vm(a),n&512&&Ei(a,a.return);break;case 3:if(Wn(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{ch(e,t)}catch(x){ct(a,a.return,x)}}break;case 27:t===null&&n&4&&Nm(a);case 26:case 5:Wn(e,a),t===null&&n&4&&Sm(a),n&512&&Ei(a,a.return);break;case 12:Wn(e,a);break;case 31:Wn(e,a),n&4&&Cm(e,a);break;case 13:Wn(e,a),n&4&&Om(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Qx.bind(null,a),mp(e,a))));break;case 22:if(n=a.memoizedState!==null||Pn,!n){t=t!==null&&t.memoizedState!==null||Lt,i=Pn;var c=Lt;Pn=n,(Lt=t)&&!c?In(e,a,(a.subtreeFlags&8772)!==0):Wn(e,a),Pn=i,Lt=c}break;case 30:break;default:Wn(e,a)}}function Tm(e){var t=e.alternate;t!==null&&(e.alternate=null,Tm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&$s(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 St=null,ya=!1;function Qn(e,t,a){for(a=a.child;a!==null;)Mm(e,t,a),a=a.sibling}function Mm(e,t,a){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount($e,a)}catch{}switch(a.tag){case 26:Lt||En(a,t),Qn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Lt||En(a,t);var n=St,i=ya;Ll(a.type)&&(St=a.stateNode,ya=!1),Qn(e,t,a),ki(a.stateNode),St=n,ya=i;break;case 5:Lt||En(a,t);case 6:if(n=St,i=ya,St=null,Qn(e,t,a),St=n,ya=i,St!==null)if(ya)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(a.stateNode)}catch(c){ct(a,t,c)}else try{St.removeChild(a.stateNode)}catch(c){ct(a,t,c)}break;case 18:St!==null&&(ya?(e=St,v0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Or(e)):v0(St,a.stateNode));break;case 4:n=St,i=ya,St=a.stateNode.containerInfo,ya=!0,Qn(e,t,a),St=n,ya=i;break;case 0:case 11:case 14:case 15:Dl(2,a,t),Lt||Dl(4,a,t),Qn(e,t,a);break;case 1:Lt||(En(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&bm(a,t,n)),Qn(e,t,a);break;case 21:Qn(e,t,a);break;case 22:Lt=(n=Lt)||a.memoizedState!==null,Qn(e,t,a),Lt=n;break;default:Qn(e,t,a)}}function Cm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Or(e)}catch(a){ct(t,t.return,a)}}}function Om(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Or(e)}catch(a){ct(t,t.return,a)}}function Vx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new jm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new jm),t;default:throw Error(o(435,e.tag))}}function cc(e,t){var a=Vx(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var i=Wx.bind(null,e,n);n.then(i,i)}})}function xa(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],c=e,x=t,T=x;e:for(;T!==null;){switch(T.tag){case 27:if(Ll(T.type)){St=T.stateNode,ya=!1;break e}break;case 5:St=T.stateNode,ya=!1;break e;case 3:case 4:St=T.stateNode.containerInfo,ya=!0;break e}T=T.return}if(St===null)throw Error(o(160));Mm(c,x,i),St=null,ya=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Dm(t,e),t=t.sibling}var cn=null;function Dm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xa(t,e),pa(e),n&4&&(Dl(3,e,e.return),ji(3,e),Dl(5,e,e.return));break;case 1:xa(t,e),pa(e),n&512&&(Lt||a===null||En(a,a.return)),n&64&&Pn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var i=cn;if(xa(t,e),pa(e),n&512&&(Lt||a===null||En(a,a.return)),n&4){var c=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,i=i.ownerDocument||i;t:switch(n){case"title":c=i.getElementsByTagName("title")[0],(!c||c[Il]||c[Tt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(n),i.head.insertBefore(c,i.querySelector("head > title"))),Xt(c,n,a),c[Tt]=e,_t(c),n=c;break e;case"link":var x=D0("link","href",i).get(n+(a.href||""));if(x){for(var T=0;T<x.length;T++)if(c=x[T],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){x.splice(T,1);break t}}c=i.createElement(n),Xt(c,n,a),i.head.appendChild(c);break;case"meta":if(x=D0("meta","content",i).get(n+(a.content||""))){for(T=0;T<x.length;T++)if(c=x[T],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){x.splice(T,1);break t}}c=i.createElement(n),Xt(c,n,a),i.head.appendChild(c);break;default:throw Error(o(468,n))}c[Tt]=e,_t(c),n=c}e.stateNode=n}else R0(i,e.type,e.stateNode);else e.stateNode=O0(i,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?R0(i,e.type,e.stateNode):O0(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&pd(e,e.memoizedProps,a.memoizedProps)}break;case 27:xa(t,e),pa(e),n&512&&(Lt||a===null||En(a,a.return)),a!==null&&n&4&&pd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(xa(t,e),pa(e),n&512&&(Lt||a===null||En(a,a.return)),e.flags&32){i=e.stateNode;try{tn(i,"")}catch(Se){ct(e,e.return,Se)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,pd(e,i,a!==null?a.memoizedProps:i)),n&1024&&(Sd=!0);break;case 6:if(xa(t,e),pa(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(Se){ct(e,e.return,Se)}}break;case 3:if(Ec=null,i=cn,cn=Nc(t.containerInfo),xa(t,e),cn=i,pa(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Or(t.containerInfo)}catch(Se){ct(e,e.return,Se)}Sd&&(Sd=!1,Rm(e));break;case 4:n=cn,cn=Nc(e.stateNode.containerInfo),xa(t,e),pa(e),cn=n;break;case 12:xa(t,e),pa(e);break;case 31:xa(t,e),pa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 13:xa(t,e),pa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(dc=At()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 22:i=e.memoizedState!==null;var O=a!==null&&a.memoizedState!==null,P=Pn,ie=Lt;if(Pn=P||i,Lt=ie||O,xa(t,e),Lt=ie,Pn=P,pa(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||O||Pn||Lt||Cs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){O=a=t;try{if(c=O.stateNode,i)x=c.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{T=O.stateNode;var de=O.memoizedProps.style,I=de!=null&&de.hasOwnProperty("display")?de.display:null;T.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(Se){ct(O,O.return,Se)}}}else if(t.tag===6){if(a===null){O=t;try{O.stateNode.nodeValue=i?"":O.memoizedProps}catch(Se){ct(O,O.return,Se)}}}else if(t.tag===18){if(a===null){O=t;try{var ae=O.stateNode;i?b0(ae,!0):b0(O.stateNode,!1)}catch(Se){ct(O,O.return,Se)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,cc(e,a))));break;case 19:xa(t,e),pa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 30:break;case 21:break;default:xa(t,e),pa(e)}}function pa(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(wm(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,c=vd(e);uc(e,c,i);break;case 5:var x=a.stateNode;a.flags&32&&(tn(x,""),a.flags&=-33);var T=vd(e);uc(e,T,x);break;case 3:case 4:var O=a.stateNode.containerInfo,P=vd(e);bd(e,P,O);break;default:throw Error(o(161))}}catch(ie){ct(e,e.return,ie)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Rm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Em(e,t.alternate,t),t=t.sibling}function Cs(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),Cs(t);break;case 1:En(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&bm(t,t.return,a),Cs(t);break;case 27:ki(t.stateNode);case 26:case 5:En(t,t.return),Cs(t);break;case 22:t.memoizedState===null&&Cs(t);break;case 30:Cs(t);break;default:Cs(t)}e=e.sibling}}function In(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,c=t,x=c.flags;switch(c.tag){case 0:case 11:case 15:In(i,c,a),ji(4,c);break;case 1:if(In(i,c,a),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(P){ct(n,n.return,P)}if(n=c,i=n.updateQueue,i!==null){var T=n.stateNode;try{var O=i.shared.hiddenCallbacks;if(O!==null)for(i.shared.hiddenCallbacks=null,i=0;i<O.length;i++)uh(O[i],T)}catch(P){ct(n,n.return,P)}}a&&x&64&&vm(c),Ei(c,c.return);break;case 27:Nm(c);case 26:case 5:In(i,c,a),a&&n===null&&x&4&&Sm(c),Ei(c,c.return);break;case 12:In(i,c,a);break;case 31:In(i,c,a),a&&x&4&&Cm(i,c);break;case 13:In(i,c,a),a&&x&4&&Om(i,c);break;case 22:c.memoizedState===null&&In(i,c,a),Ei(c,c.return);break;case 30:break;default:In(i,c,a)}t=t.sibling}}function wd(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&di(a))}function Nd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&di(e))}function on(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Am(e,t,a,n),t=t.sibling}function Am(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:on(e,t,a,n),i&2048&&ji(9,t);break;case 1:on(e,t,a,n);break;case 3:on(e,t,a,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&di(e)));break;case 12:if(i&2048){on(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,x=c.id,T=c.onPostCommit;typeof T=="function"&&T(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){ct(t,t.return,O)}}else on(e,t,a,n);break;case 31:on(e,t,a,n);break;case 13:on(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,x=t.alternate,t.memoizedState!==null?c._visibility&2?on(e,t,a,n):Ti(e,t):c._visibility&2?on(e,t,a,n):(c._visibility|=2,pr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&wd(x,t);break;case 24:on(e,t,a,n),i&2048&&Nd(t.alternate,t);break;default:on(e,t,a,n)}}function pr(e,t,a,n,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,x=t,T=a,O=n,P=x.flags;switch(x.tag){case 0:case 11:case 15:pr(c,x,T,O,i),ji(8,x);break;case 23:break;case 22:var ie=x.stateNode;x.memoizedState!==null?ie._visibility&2?pr(c,x,T,O,i):Ti(c,x):(ie._visibility|=2,pr(c,x,T,O,i)),i&&P&2048&&wd(x.alternate,x);break;case 24:pr(c,x,T,O,i),i&&P&2048&&Nd(x.alternate,x);break;default:pr(c,x,T,O,i)}t=t.sibling}}function Ti(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,i=n.flags;switch(n.tag){case 22:Ti(a,n),i&2048&&wd(n.alternate,n);break;case 24:Ti(a,n),i&2048&&Nd(n.alternate,n);break;default:Ti(a,n)}t=t.sibling}}var Mi=8192;function vr(e,t,a){if(e.subtreeFlags&Mi)for(e=e.child;e!==null;)_m(e,t,a),e=e.sibling}function _m(e,t,a){switch(e.tag){case 26:vr(e,t,a),e.flags&Mi&&e.memoizedState!==null&&Tp(a,cn,e.memoizedState,e.memoizedProps);break;case 5:vr(e,t,a);break;case 3:case 4:var n=cn;cn=Nc(e.stateNode.containerInfo),vr(e,t,a),cn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Mi,Mi=16777216,vr(e,t,a),Mi=n):vr(e,t,a));break;default:vr(e,t,a)}}function km(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ci(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];$t=n,Um(n,e)}km(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zm(e),e=e.sibling}function zm(e){switch(e.tag){case 0:case 11:case 15:Ci(e),e.flags&2048&&Dl(9,e,e.return);break;case 3:Ci(e);break;case 12:Ci(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,oc(e)):Ci(e);break;default:Ci(e)}}function oc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];$t=n,Um(n,e)}km(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Dl(8,t,t.return),oc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,oc(t));break;default:oc(t)}e=e.sibling}}function Um(e,t){for(;$t!==null;){var a=$t;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:di(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,$t=n;else e:for(a=e;$t!==null;){n=$t;var i=n.sibling,c=n.return;if(Tm(n),n===a){$t=null;break e}if(i!==null){i.return=c,$t=i;break e}$t=c}}}var Bx={getCacheForType:function(e){var t=Wt(kt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Wt(kt).controller.signal}},Yx=typeof WeakMap=="function"?WeakMap:Map,lt=0,yt=null,Ge=null,We=0,ut=0,Ca=null,Rl=!1,br=!1,jd=!1,Xn=0,Et=0,Al=0,Os=0,Ed=0,Oa=0,Sr=0,Oi=null,va=null,Td=!1,dc=0,Lm=0,fc=1/0,hc=null,_l=null,Vt=0,kl=null,wr=null,Jn=0,Md=0,Cd=null,Hm=null,Di=0,Od=null;function Da(){return(lt&2)!==0&&We!==0?We&-We:B.T!==null?zd():Ys()}function qm(){if(Oa===0)if((We&536870912)===0||q){var e=qs;qs<<=1,(qs&3932160)===0&&(qs=262144),Oa=e}else Oa=536870912;return e=Ta.current,e!==null&&(e.flags|=32),Oa}function ba(e,t,a){(e===yt&&(ut===2||ut===9)||e.cancelPendingCommit!==null)&&(Nr(e,0),zl(e,We,Oa,!1)),cl(e,a),((lt&2)===0||e!==yt)&&(e===yt&&((lt&2)===0&&(Os|=a),Et===4&&zl(e,We,Oa,!1)),Tn(e))}function Vm(e,t,a){if((lt&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ul(e,t),i=n?Gx(e,t):Rd(e,t,!0),c=n;do{if(i===0){br&&!n&&zl(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!$x(a)){i=Rd(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var T=e;i=Oi;var O=T.current.memoizedState.isDehydrated;if(O&&(Nr(T,x).flags|=256),x=Rd(T,x,!1),x!==2){if(jd&&!O){T.errorRecoveryDisabledLanes|=c,Os|=c,i=4;break e}c=va,va=i,c!==null&&(va===null?va=c:va.push.apply(va,c))}i=x}if(c=!1,i!==2)continue}}if(i===1){Nr(e,0),zl(e,t,0,!0);break}e:{switch(n=e,c=i,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:zl(n,t,Oa,!Rl);break e;case 2:va=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=dc+300-At(),10<i)){if(zl(n,t,Oa,!Rl),Ql(n,0,!0)!==0)break e;Jn=t,n.timeoutHandle=x0(Bm.bind(null,n,a,va,hc,Td,t,Oa,Os,Sr,Rl,c,"Throttled",-0,0),i);break e}Bm(n,a,va,hc,Td,t,Oa,Os,Sr,Rl,c,null,-0,0)}}break}while(!0);Tn(e)}function Bm(e,t,a,n,i,c,x,T,O,P,ie,de,I,ae){if(e.timeoutHandle=-1,de=t.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:za},_m(t,c,de);var Se=(c&62914560)===c?dc-At():(c&4194048)===c?Lm-At():0;if(Se=Mp(de,Se),Se!==null){Jn=c,e.cancelPendingCommit=Se(Wm.bind(null,e,t,c,a,n,i,x,T,O,ie,de,null,I,ae)),zl(e,c,x,!P);return}}Wm(e,t,c,a,n,i,x,T,O)}function $x(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var i=a[n],c=i.getSnapshot;i=i.value;try{if(!ea(c(),i))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function zl(e,t,a,n){t&=~Ed,t&=~Os,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var c=31-gt(i),x=1<<c;n[c]=-1,i&=~x}a!==0&&xt(e,a,t)}function mc(){return(lt&6)===0?(Ri(0),!1):!0}function Dd(){if(Ge!==null){if(ut===0)var e=Ge.return;else e=Ge,Ya=Bn=null,Zo(e),hr=null,hi=0,e=Ge;for(;e!==null;)pm(e.alternate,e),e=e.return;Ge=null}}function Nr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,cp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Jn=0,Dd(),yt=e,Ge=a=qa(e.current,null),We=t,ut=0,Ca=null,Rl=!1,br=ul(e,t),jd=!1,Sr=Oa=Ed=Os=Al=Et=0,va=Oi=null,Td=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-gt(n),c=1<<i;t|=e[i],n&=~c}return Xn=t,Nl(),a}function Ym(e,t){Ve=null,B.H=Si,t===fr||t===$u?(t=lh(),ut=3):t===ko?(t=lh(),ut=4):ut=t===ud?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ca=t,Ge===null&&(Et=1,nc(e,ma(t,e.current)))}function $m(){var e=Ta.current;return e===null?!0:(We&4194048)===We?Fa===null:(We&62914560)===We||(We&536870912)!==0?e===Fa:!1}function Fm(){var e=B.H;return B.H=Si,e===null?Si:e}function Gm(){var e=B.A;return B.A=Bx,e}function gc(){Et=4,Rl||(We&4194048)!==We&&Ta.current!==null||(br=!0),(Al&134217727)===0&&(Os&134217727)===0||yt===null||zl(yt,We,Oa,!1)}function Rd(e,t,a){var n=lt;lt|=2;var i=Fm(),c=Gm();(yt!==e||We!==t)&&(hc=null,Nr(e,t)),t=!1;var x=Et;e:do try{if(ut!==0&&Ge!==null){var T=Ge,O=Ca;switch(ut){case 8:Dd(),x=6;break e;case 3:case 2:case 9:case 6:Ta.current===null&&(t=!0);var P=ut;if(ut=0,Ca=null,jr(e,T,O,P),a&&br){x=0;break e}break;default:P=ut,ut=0,Ca=null,jr(e,T,O,P)}}Fx(),x=Et;break}catch(ie){Ym(e,ie)}while(!0);return t&&e.shellSuspendCounter++,Ya=Bn=null,lt=n,B.H=i,B.A=c,Ge===null&&(yt=null,We=0,Nl()),x}function Fx(){for(;Ge!==null;)Zm(Ge)}function Gx(e,t){var a=lt;lt|=2;var n=Fm(),i=Gm();yt!==e||We!==t?(hc=null,fc=At()+500,Nr(e,t)):br=ul(e,t);e:do try{if(ut!==0&&Ge!==null){t=Ge;var c=Ca;t:switch(ut){case 1:ut=0,Ca=null,jr(e,t,c,1);break;case 2:case 9:if(ah(c)){ut=0,Ca=null,Pm(t);break}t=function(){ut!==2&&ut!==9||yt!==e||(ut=7),Tn(e)},c.then(t,t);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:ah(c)?(ut=0,Ca=null,Pm(t)):(ut=0,Ca=null,jr(e,t,c,7));break;case 5:var x=null;switch(Ge.tag){case 26:x=Ge.memoizedState;case 5:case 27:var T=Ge;if(x?A0(x):T.stateNode.complete){ut=0,Ca=null;var O=T.sibling;if(O!==null)Ge=O;else{var P=T.return;P!==null?(Ge=P,yc(P)):Ge=null}break t}}ut=0,Ca=null,jr(e,t,c,5);break;case 6:ut=0,Ca=null,jr(e,t,c,6);break;case 8:Dd(),Et=6;break e;default:throw Error(o(462))}}Zx();break}catch(ie){Ym(e,ie)}while(!0);return Ya=Bn=null,B.H=n,B.A=i,lt=a,Ge!==null?0:(yt=null,We=0,Nl(),Et)}function Zx(){for(;Ge!==null&&!sl();)Zm(Ge)}function Zm(e){var t=ym(e.alternate,e,Xn);e.memoizedProps=e.pendingProps,t===null?yc(e):Ge=t}function Pm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=om(a,t,t.pendingProps,t.type,void 0,We);break;case 11:t=om(a,t,t.pendingProps,t.type.render,t.ref,We);break;case 5:Zo(t);default:pm(a,t),t=Ge=qu(t,Xn),t=ym(a,t,Xn)}e.memoizedProps=e.pendingProps,t===null?yc(e):Ge=t}function jr(e,t,a,n){Ya=Bn=null,Zo(t),hr=null,hi=0;var i=t.return;try{if(kx(e,i,t,a,We)){Et=1,nc(e,ma(a,e.current)),Ge=null;return}}catch(c){if(i!==null)throw Ge=i,c;Et=1,nc(e,ma(a,e.current)),Ge=null;return}t.flags&32768?(q||n===1?e=!0:br||(We&536870912)!==0?e=!1:(Rl=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ta.current,n!==null&&n.tag===13&&(n.flags|=16384))),Qm(t,e)):yc(t)}function yc(e){var t=e;do{if((t.flags&32768)!==0){Qm(t,Rl);return}e=t.return;var a=Lx(t.alternate,t,Xn);if(a!==null){Ge=a;return}if(t=t.sibling,t!==null){Ge=t;return}Ge=t=e}while(t!==null);Et===0&&(Et=5)}function Qm(e,t){do{var a=Hx(e.alternate,e);if(a!==null){a.flags&=32767,Ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ge=e;return}Ge=e=a}while(e!==null);Et=6,Ge=null}function Wm(e,t,a,n,i,c,x,T,O){e.cancelPendingCommit=null;do xc();while(Vt!==0);if((lt&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=xs,du(e,a,c,x,T,O),e===yt&&(Ge=yt=null,We=0),wr=t,kl=e,Jn=a,Md=c,Cd=i,Hm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ix(L,function(){return e0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=B.T,B.T=null,i=ue.p,ue.p=2,x=lt,lt|=4;try{qx(e,t,a)}finally{lt=x,ue.p=i,B.T=n}}Vt=1,Im(),Xm(),Jm()}}function Im(){if(Vt===1){Vt=0;var e=kl,t=wr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var n=ue.p;ue.p=2;var i=lt;lt|=4;try{Dm(t,e);var c=$d,x=Co(e.containerInfo),T=c.focusedElem,O=c.selectionRange;if(x!==T&&T&&T.ownerDocument&&Je(T.ownerDocument.documentElement,T)){if(O!==null&&er(T)){var P=O.start,ie=O.end;if(ie===void 0&&(ie=P),"selectionStart"in T)T.selectionStart=P,T.selectionEnd=Math.min(ie,T.value.length);else{var de=T.ownerDocument||document,I=de&&de.defaultView||window;if(I.getSelection){var ae=I.getSelection(),Se=T.textContent.length,Ae=Math.min(O.start,Se),mt=O.end===void 0?Ae:Math.min(O.end,Se);!ae.extend&&Ae>mt&&(x=mt,mt=Ae,Ae=x);var $=_u(T,Ae),H=_u(T,mt);if($&&H&&(ae.rangeCount!==1||ae.anchorNode!==$.node||ae.anchorOffset!==$.offset||ae.focusNode!==H.node||ae.focusOffset!==H.offset)){var Z=de.createRange();Z.setStart($.node,$.offset),ae.removeAllRanges(),Ae>mt?(ae.addRange(Z),ae.extend(H.node,H.offset)):(Z.setEnd(H.node,H.offset),ae.addRange(Z))}}}}for(de=[],ae=T;ae=ae.parentNode;)ae.nodeType===1&&de.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<de.length;T++){var oe=de[T];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}Oc=!!Yd,$d=Yd=null}finally{lt=i,ue.p=n,B.T=a}}e.current=t,Vt=2}}function Xm(){if(Vt===2){Vt=0;var e=kl,t=wr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var n=ue.p;ue.p=2;var i=lt;lt|=4;try{Em(e,t.alternate,t)}finally{lt=i,ue.p=n,B.T=a}}Vt=3}}function Jm(){if(Vt===4||Vt===3){Vt=0,rl();var e=kl,t=wr,a=Jn,n=Hm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Vt=5:(Vt=0,wr=kl=null,Km(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(_l=null),Kt(a),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot($e,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=B.T,i=ue.p,ue.p=2,B.T=null;try{for(var c=e.onRecoverableError,x=0;x<n.length;x++){var T=n[x];c(T.value,{componentStack:T.stack})}}finally{B.T=t,ue.p=i}}(Jn&3)!==0&&xc(),Tn(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===Od?Di++:(Di=0,Od=e):Di=0,Ri(0)}}function Km(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,di(t)))}function xc(){return Im(),Xm(),Jm(),e0()}function e0(){if(Vt!==5)return!1;var e=kl,t=Md;Md=0;var a=Kt(Jn),n=B.T,i=ue.p;try{ue.p=32>a?32:a,B.T=null,a=Cd,Cd=null;var c=kl,x=Jn;if(Vt=0,wr=kl=null,Jn=0,(lt&6)!==0)throw Error(o(331));var T=lt;if(lt|=4,zm(c.current),Am(c,c.current,x,a),lt=T,Ri(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot($e,c)}catch{}return!0}finally{ue.p=i,B.T=n,Km(e,t)}}function t0(e,t,a){t=ma(a,t),t=id(e.stateNode,t,2),e=Ml(e,t,2),e!==null&&(cl(e,2),Tn(e))}function ct(e,t,a){if(e.tag===3)t0(e,e,a);else for(;t!==null;){if(t.tag===3){t0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(_l===null||!_l.has(n))){e=ma(a,e),a=am(2),n=Ml(t,a,2),n!==null&&(nm(a,n,t,e),cl(n,2),Tn(n));break}}t=t.return}}function Ad(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Yx;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(a)||(jd=!0,i.add(a),e=Px.bind(null,e,t,a),t.then(e,e))}function Px(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,yt===e&&(We&a)===a&&(Et===4||Et===3&&(We&62914560)===We&&300>At()-dc?(lt&2)===0&&Nr(e,0):Ed|=a,Sr===We&&(Sr=0)),Tn(e)}function a0(e,t){t===0&&(t=Vr()),e=Ha(e,t),e!==null&&(cl(e,t),Tn(e))}function Qx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),a0(e,a)}function Wx(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),a0(e,a)}function Ix(e,t){return mn(e,t)}var pc=null,Er=null,_d=!1,vc=!1,kd=!1,Ul=0;function Tn(e){e!==Er&&e.next===null&&(Er===null?pc=Er=e:Er=Er.next=e),vc=!0,_d||(_d=!0,Jx())}function Ri(e,t){if(!kd&&vc){kd=!0;do for(var a=!1,n=pc;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var c=0;else{var x=n.suspendedLanes,T=n.pingedLanes;c=(1<<31-gt(42|e)+1)-1,c&=i&~(x&~T),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,r0(n,c))}else c=We,c=Ql(n,n===yt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||ul(n,c)||(a=!0,r0(n,c));n=n.next}while(a);kd=!1}}function Xx(){n0()}function n0(){vc=_d=!1;var e=0;Ul!==0&&up()&&(e=Ul);for(var t=At(),a=null,n=pc;n!==null;){var i=n.next,c=l0(n,t);c===0?(n.next=null,a===null?pc=i:a.next=i,i===null&&(Er=a)):(a=n,(e!==0||(c&3)!==0)&&(vc=!0)),n=i}Vt!==0&&Vt!==5||Ri(e),Ul!==0&&(Ul=0)}function l0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var x=31-gt(c),T=1<<x,O=i[x];O===-1?((T&a)===0||(T&n)!==0)&&(i[x]=ou(T,t)):O<=t&&(e.expiredLanes|=T),c&=~T}if(t=yt,a=We,a=Ql(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(ut===2||ut===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&gn(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&&gn(n),Kt(a)){case 2:case 8:a=Dn;break;case 32:a=L;break;case 268435456:a=ve;break;default:a=L}return n=s0.bind(null,e),a=mn(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&gn(n),e.callbackPriority=2,e.callbackNode=null,2}function s0(e,t){if(Vt!==0&&Vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(xc()&&e.callbackNode!==a)return null;var n=We;return n=Ql(e,e===yt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Vm(e,n,t),l0(e,At()),e.callbackNode!=null&&e.callbackNode===a?s0.bind(null,e):null)}function r0(e,t){if(xc())return null;Vm(e,t,!0)}function Jx(){op(function(){(lt&6)!==0?mn(On,Xx):n0()})}function zd(){if(Ul===0){var e=or;e===0&&(e=il,il<<=1,(il&261888)===0&&(il=256)),Ul=e}return Ul}function i0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:as(""+e)}function u0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Kx(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var c=i0((i[Ht]||null).action),x=n.submitter;x&&(t=(t=x[Ht]||null)?i0(t.formAction):x.getAttribute("formAction"),t!==null&&(c=t,x=null));var T=new rs("action","action",null,n,i);e.push({event:T,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ul!==0){var O=x?u0(i,x):new FormData(i);td(a,{pending:!0,data:O,method:i.method,action:c},null,O)}}else typeof c=="function"&&(T.preventDefault(),O=x?u0(i,x):new FormData(i),td(a,{pending:!0,data:O,method:i.method,action:c},c,O))},currentTarget:i}]})}}for(var Ud=0;Ud<ii.length;Ud++){var Ld=ii[Ud],ep=Ld.toLowerCase(),tp=Ld[0].toUpperCase()+Ld.slice(1);ha(ep,"on"+tp)}ha(Uu,"onAnimationEnd"),ha(Lu,"onAnimationIteration"),ha(nr,"onAnimationStart"),ha("dblclick","onDoubleClick"),ha("focusin","onFocus"),ha("focusout","onBlur"),ha(Oo,"onTransitionRun"),ha(Do,"onTransitionStart"),ha(Hu,"onTransitionCancel"),ha(si,"onTransitionEnd"),ol("onMouseEnter",["mouseout","mouseover"]),ol("onMouseLeave",["mouseout","mouseover"]),ol("onPointerEnter",["pointerout","pointerover"]),ol("onPointerLeave",["pointerout","pointerover"]),pn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),pn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),pn("onBeforeInput",["compositionend","keypress","textInput","paste"]),pn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),pn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),pn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ai="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(" "),ap=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ai));function c0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var c=void 0;if(t)for(var x=n.length-1;0<=x;x--){var T=n[x],O=T.instance,P=T.currentTarget;if(T=T.listener,O!==c&&i.isPropagationStopped())break e;c=T,i.currentTarget=P;try{c(i)}catch(ie){wl(ie)}i.currentTarget=null,c=O}else for(x=0;x<n.length;x++){if(T=n[x],O=T.instance,P=T.currentTarget,T=T.listener,O!==c&&i.isPropagationStopped())break e;c=T,i.currentTarget=P;try{c(i)}catch(ie){wl(ie)}i.currentTarget=null,c=O}}}}function Ze(e,t){var a=t[Wl];a===void 0&&(a=t[Wl]=new Set);var n=e+"__bubble";a.has(n)||(o0(t,e,2,!1),a.add(n))}function Hd(e,t,a){var n=0;t&&(n|=4),o0(a,e,n,t)}var bc="_reactListening"+Math.random().toString(36).slice(2);function qd(e){if(!e[bc]){e[bc]=!0,gu.forEach(function(a){a!=="selectionchange"&&(ap.has(a)||Hd(a,!1,e),Hd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bc]||(t[bc]=!0,Hd("selectionchange",!1,t))}}function o0(e,t,a,n){switch(q0(t)){case 2:var i=Dp;break;case 8:i=Rp;break;default:i=ef}a=i.bind(null,t,a,e),i=void 0,!Ir||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function Vd(e,t,a,n,i){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var x=n.tag;if(x===3||x===4){var T=n.stateNode.containerInfo;if(T===i)break;if(x===4)for(x=n.return;x!==null;){var O=x.tag;if((O===3||O===4)&&x.stateNode.containerInfo===i)return;x=x.return}for(;T!==null;){if(x=An(T),x===null)return;if(O=x.tag,O===5||O===6||O===26||O===27){n=c=x;continue e}T=T.parentNode}}n=n.return}Wr(function(){var P=c,ie=Qs(a),de=[];e:{var I=ri.get(e);if(I!==void 0){var ae=rs,Se=e;switch(e){case"keypress":if(ss(a)===0)break e;case"keydown":case"keyup":ae=mo;break;case"focusin":Se="focus",ae=Ks;break;case"focusout":Se="blur",ae=Ks;break;case"beforeblur":case"afterblur":ae=Ks;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=Su;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=lo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=xo;break;case Uu:case Lu:case nr:ae=ml;break;case si:ae=po;break;case"scroll":case"scrollend":ae=Xr;break;case"wheel":ae=bo;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=wo}var Ae=(t&4)!==0,mt=!Ae&&(e==="scroll"||e==="scrollend"),$=Ae?I!==null?I+"Capture":null:I;Ae=[];for(var H=P,Z;H!==null;){var oe=H;if(Z=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Z===null||$===null||(oe=ns(H,$),oe!=null&&Ae.push(_i(H,oe,Z))),mt)break;H=H.return}0<Ae.length&&(I=new ae(I,Se,null,a,ie),de.push({event:I,listeners:Ae}))}}if((t&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",I&&a!==Pr&&(Se=a.relatedTarget||a.fromElement)&&(An(Se)||Se[Rn]))break e;if((ae||I)&&(I=ie.window===ie?ie:(I=ie.ownerDocument)?I.defaultView||I.parentWindow:window,ae?(Se=a.relatedTarget||a.toElement,ae=P,Se=Se?An(Se):null,Se!==null&&(mt=f(Se),Ae=Se.tag,Se!==mt||Ae!==5&&Ae!==27&&Ae!==6)&&(Se=null)):(ae=null,Se=P),ae!==Se)){if(Ae=Su,oe="onMouseLeave",$="onMouseEnter",H="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=wu,oe="onPointerLeave",$="onPointerEnter",H="pointer"),mt=ae==null?I:da(ae),Z=Se==null?I:da(Se),I=new Ae(oe,H+"leave",ae,a,ie),I.target=mt,I.relatedTarget=Z,oe=null,An(ie)===P&&(Ae=new Ae($,H+"enter",Se,a,ie),Ae.target=Z,Ae.relatedTarget=mt,oe=Ae),mt=oe,ae&&Se)t:{for(Ae=np,$=ae,H=Se,Z=0,oe=$;oe;oe=Ae(oe))Z++;oe=0;for(var Ce=H;Ce;Ce=Ae(Ce))oe++;for(;0<Z-oe;)$=Ae($),Z--;for(;0<oe-Z;)H=Ae(H),oe--;for(;Z--;){if($===H||H!==null&&$===H.alternate){Ae=$;break t}$=Ae($),H=Ae(H)}Ae=null}else Ae=null;ae!==null&&d0(de,I,ae,Ae,!1),Se!==null&&mt!==null&&d0(de,mt,Se,Ae,!0)}}e:{if(I=P?da(P):window,ae=I.nodeName&&I.nodeName.toLowerCase(),ae==="select"||ae==="input"&&I.type==="file")var tt=Ru;else if(Du(I))if(wn)tt=vt;else{tt=vl;var we=Pe}else ae=I.nodeName,!ae||ae.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?P&&Ps(P.elementType)&&(tt=Ru):tt=Mo;if(tt&&(tt=tt(e,P))){Kr(de,tt,a,ie);break e}we&&we(e,I,P),e==="focusout"&&P&&I.type==="number"&&P.memoizedProps.value!=null&&Jl(I,"number",I.value)}switch(we=P?da(P):window,e){case"focusin":(Du(we)||we.contentEditable==="true")&&(bl=we,tr=P,Pt=null);break;case"focusout":Pt=tr=bl=null;break;case"mousedown":ar=!0;break;case"contextmenu":case"mouseup":case"dragend":ar=!1,ys(de,a,ie);break;case"selectionchange":if(ku)break;case"keydown":case"keyup":ys(de,a,ie)}var Be;if(Jr)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else xl?Cu(e,a)&&(Ie="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ie="onCompositionStart");Ie&&(Eu&&a.locale!=="ko"&&(xl||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&xl&&(Be=qt()):(bn=ie,Ws="value"in bn?bn.value:bn.textContent,xl=!0)),we=Sc(P,Ie),0<we.length&&(Ie=new yl(Ie,e,null,a,ie),de.push({event:Ie,listeners:we}),Be?Ie.data=Be:(Be=Ou(a),Be!==null&&(Ie.data=Be)))),(Be=No?jo(e,a):Eo(e,a))&&(Ie=Sc(P,"onBeforeInput"),0<Ie.length&&(we=new yl("onBeforeInput","beforeinput",null,a,ie),de.push({event:we,listeners:Ie}),we.data=Be)),Kx(de,e,P,a,ie)}c0(de,t)})}function _i(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Sc(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=ns(e,a),i!=null&&n.unshift(_i(e,i,c)),i=ns(e,t),i!=null&&n.push(_i(e,i,c))),e.tag===3)return n;e=e.return}return[]}function np(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function d0(e,t,a,n,i){for(var c=t._reactName,x=[];a!==null&&a!==n;){var T=a,O=T.alternate,P=T.stateNode;if(T=T.tag,O!==null&&O===n)break;T!==5&&T!==26&&T!==27||P===null||(O=P,i?(P=ns(a,c),P!=null&&x.unshift(_i(a,P,O))):i||(P=ns(a,c),P!=null&&x.push(_i(a,P,O)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var lp=/\r\n?/g,sp=/\u0000|\uFFFD/g;function f0(e){return(typeof e=="string"?e:""+e).replace(lp,`
|
|
49
|
+
`).replace(sp,"")}function h0(e,t){return t=f0(t),f0(e)===t}function ht(e,t,a,n,i,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||tn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&tn(e,""+n);break;case"className":Fs(e,"class",n);break;case"tabIndex":Fs(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Fs(e,a,n);break;case"style":pu(e,n,c);break;case"data":if(t!=="object"){Fs(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=as(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(a==="formAction"?(t!=="input"&&ht(e,t,"name",i.name,i,null),ht(e,t,"formEncType",i.formEncType,i,null),ht(e,t,"formMethod",i.formMethod,i,null),ht(e,t,"formTarget",i.formTarget,i,null)):(ht(e,t,"encType",i.encType,i,null),ht(e,t,"method",i.method,i,null),ht(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=as(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=za);break;case"onScroll":n!=null&&Ze("scroll",e);break;case"onScrollEnd":n!=null&&Ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=as(""+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":Ze("beforetoggle",e),Ze("toggle",e),Gt(e,"popover",n);break;case"xlinkActuate":it(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":it(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":it(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":it(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":it(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":it(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":it(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":it(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":it(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Gt(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ao.get(a)||a,Gt(e,a,n))}}function Bd(e,t,a,n,i,c){switch(a){case"style":pu(e,n,c);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?tn(e,n):(typeof n=="number"||typeof n=="bigint")&&tn(e,""+n);break;case"onScroll":n!=null&&Ze("scroll",e);break;case"onScrollEnd":n!=null&&Ze("scrollend",e);break;case"onClick":n!=null&&(e.onclick=za);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$r.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),c=e[Ht]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,i),typeof n=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,i);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Gt(e,a,n)}}}function Xt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",e),Ze("load",e);var n=!1,i=!1,c;for(c in a)if(a.hasOwnProperty(c)){var x=a[c];if(x!=null)switch(c){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ht(e,t,c,x,a,null)}}i&&ht(e,t,"srcSet",a.srcSet,a,null),n&&ht(e,t,"src",a.src,a,null);return;case"input":Ze("invalid",e);var T=c=x=i=null,O=null,P=null;for(n in a)if(a.hasOwnProperty(n)){var ie=a[n];if(ie!=null)switch(n){case"name":i=ie;break;case"type":x=ie;break;case"checked":O=ie;break;case"defaultChecked":P=ie;break;case"value":c=ie;break;case"defaultValue":T=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(o(137,t));break;default:ht(e,t,n,ie,a,null)}}fl(e,c,T,O,P,x,i,!1);return;case"select":Ze("invalid",e),n=x=c=null;for(i in a)if(a.hasOwnProperty(i)&&(T=a[i],T!=null))switch(i){case"value":c=T;break;case"defaultValue":x=T;break;case"multiple":n=T;default:ht(e,t,i,T,a,null)}t=c,a=x,e.multiple=!!n,t!=null?kn(e,!!n,t,!1):a!=null&&kn(e,!!n,a,!0);return;case"textarea":Ze("invalid",e),c=i=n=null;for(x in a)if(a.hasOwnProperty(x)&&(T=a[x],T!=null))switch(x){case"value":n=T;break;case"defaultValue":i=T;break;case"children":c=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(o(91));break;default:ht(e,t,x,T,a,null)}Zr(e,n,i,c);return;case"option":for(O in a)if(a.hasOwnProperty(O)&&(n=a[O],n!=null))switch(O){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:ht(e,t,O,n,a,null)}return;case"dialog":Ze("beforetoggle",e),Ze("toggle",e),Ze("cancel",e),Ze("close",e);break;case"iframe":case"object":Ze("load",e);break;case"video":case"audio":for(n=0;n<Ai.length;n++)Ze(Ai[n],e);break;case"image":Ze("error",e),Ze("load",e);break;case"details":Ze("toggle",e);break;case"embed":case"source":case"link":Ze("error",e),Ze("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(P in a)if(a.hasOwnProperty(P)&&(n=a[P],n!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ht(e,t,P,n,a,null)}return;default:if(Ps(t)){for(ie in a)a.hasOwnProperty(ie)&&(n=a[ie],n!==void 0&&Bd(e,t,ie,n,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(n=a[T],n!=null&&ht(e,t,T,n,a,null))}function rp(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,c=null,x=null,T=null,O=null,P=null,ie=null;for(ae in a){var de=a[ae];if(a.hasOwnProperty(ae)&&de!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":O=de;default:n.hasOwnProperty(ae)||ht(e,t,ae,null,n,de)}}for(var I in n){var ae=n[I];if(de=a[I],n.hasOwnProperty(I)&&(ae!=null||de!=null))switch(I){case"type":c=ae;break;case"name":i=ae;break;case"checked":P=ae;break;case"defaultChecked":ie=ae;break;case"value":x=ae;break;case"defaultValue":T=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,t));break;default:ae!==de&&ht(e,t,I,ae,n,de)}}Zs(e,x,T,O,P,ie,c,i);return;case"select":ae=x=T=I=null;for(c in a)if(O=a[c],a.hasOwnProperty(c)&&O!=null)switch(c){case"value":break;case"multiple":ae=O;default:n.hasOwnProperty(c)||ht(e,t,c,null,n,O)}for(i in n)if(c=n[i],O=a[i],n.hasOwnProperty(i)&&(c!=null||O!=null))switch(i){case"value":I=c;break;case"defaultValue":T=c;break;case"multiple":x=c;default:c!==O&&ht(e,t,i,c,n,O)}t=T,a=x,n=ae,I!=null?kn(e,!!a,I,!1):!!n!=!!a&&(t!=null?kn(e,!!a,t,!0):kn(e,!!a,a?[]:"",!1));return;case"textarea":ae=I=null;for(T in a)if(i=a[T],a.hasOwnProperty(T)&&i!=null&&!n.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:ht(e,t,T,null,n,i)}for(x in n)if(i=n[x],c=a[x],n.hasOwnProperty(x)&&(i!=null||c!=null))switch(x){case"value":I=i;break;case"defaultValue":ae=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==c&&ht(e,t,x,i,n,c)}Kl(e,I,ae);return;case"option":for(var Se in a)if(I=a[Se],a.hasOwnProperty(Se)&&I!=null&&!n.hasOwnProperty(Se))switch(Se){case"selected":e.selected=!1;break;default:ht(e,t,Se,null,n,I)}for(O in n)if(I=n[O],ae=a[O],n.hasOwnProperty(O)&&I!==ae&&(I!=null||ae!=null))switch(O){case"selected":e.selected=I&&typeof I!="function"&&typeof I!="symbol";break;default:ht(e,t,O,I,n,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in a)I=a[Ae],a.hasOwnProperty(Ae)&&I!=null&&!n.hasOwnProperty(Ae)&&ht(e,t,Ae,null,n,I);for(P in n)if(I=n[P],ae=a[P],n.hasOwnProperty(P)&&I!==ae&&(I!=null||ae!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(137,t));break;default:ht(e,t,P,I,n,ae)}return;default:if(Ps(t)){for(var mt in a)I=a[mt],a.hasOwnProperty(mt)&&I!==void 0&&!n.hasOwnProperty(mt)&&Bd(e,t,mt,void 0,n,I);for(ie in n)I=n[ie],ae=a[ie],!n.hasOwnProperty(ie)||I===ae||I===void 0&&ae===void 0||Bd(e,t,ie,I,n,ae);return}}for(var $ in a)I=a[$],a.hasOwnProperty($)&&I!=null&&!n.hasOwnProperty($)&&ht(e,t,$,null,n,I);for(de in n)I=n[de],ae=a[de],!n.hasOwnProperty(de)||I===ae||I==null&&ae==null||ht(e,t,de,I,n,ae)}function m0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ip(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var i=a[n],c=i.transferSize,x=i.initiatorType,T=i.duration;if(c&&T&&m0(x)){for(x=0,T=i.responseEnd,n+=1;n<a.length;n++){var O=a[n],P=O.startTime;if(P>T)break;var ie=O.transferSize,de=O.initiatorType;ie&&m0(de)&&(O=O.responseEnd,x+=ie*(O<T?1:(T-P)/(O-P)))}if(--n,t+=8*(c+x)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Yd=null,$d=null;function wc(e){return e.nodeType===9?e:e.ownerDocument}function g0(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 y0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Fd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gd=null;function up(){var e=window.event;return e&&e.type==="popstate"?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var x0=typeof setTimeout=="function"?setTimeout:void 0,cp=typeof clearTimeout=="function"?clearTimeout:void 0,p0=typeof Promise=="function"?Promise:void 0,op=typeof queueMicrotask=="function"?queueMicrotask:typeof p0<"u"?function(e){return p0.resolve(null).then(e).catch(dp)}:x0;function dp(e){setTimeout(function(){throw e})}function Ll(e){return e==="head"}function v0(e,t){var a=t,n=0;do{var i=a.nextSibling;if(e.removeChild(a),i&&i.nodeType===8)if(a=i.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(i),Or(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")ki(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ki(a);for(var c=a.firstChild;c;){var x=c.nextSibling,T=c.nodeName;c[Il]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=x}}else a==="body"&&ki(e.ownerDocument.body);a=i}while(a);Or(t)}function b0(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Zd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Zd(a),$s(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function fp(e,t,a,n){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Il])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Ga(e.nextSibling),e===null)break}return null}function hp(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ga(e.nextSibling),e===null))return null;return e}function S0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ga(e.nextSibling),e===null))return null;return e}function Pd(e){return e.data==="$?"||e.data==="$~"}function Qd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function mp(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 Ga(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Wd=null;function w0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ga(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function N0(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 j0(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 ki(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);$s(e)}var Za=new Map,E0=new Set;function Nc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Kn=ue.d;ue.d={f:gp,r:yp,D:xp,C:pp,L:vp,m:bp,X:wp,S:Sp,M:Np};function gp(){var e=Kn.f(),t=mc();return e||t}function yp(e){var t=Oe(e);t!==null&&t.tag===5&&t.type==="form"?Yh(t):Kn.r(e)}var Tr=typeof document>"u"?null:document;function T0(e,t,a){var n=Tr;if(n&&typeof t=="string"&&t){var i=Zt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),E0.has(i)||(E0.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),Xt(t,"link",e),_t(t),n.head.appendChild(t)))}}function xp(e){Kn.D(e),T0("dns-prefetch",e,null)}function pp(e,t){Kn.C(e,t),T0("preconnect",e,t)}function vp(e,t,a){Kn.L(e,t,a);var n=Tr;if(n&&e&&t){var i='link[rel="preload"][as="'+Zt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+Zt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+Zt(a.imageSizes)+'"]')):i+='[href="'+Zt(e)+'"]';var c=i;switch(t){case"style":c=Mr(e);break;case"script":c=Cr(e)}Za.has(c)||(e=E({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Za.set(c,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(zi(c))||t==="script"&&n.querySelector(Ui(c))||(t=n.createElement("link"),Xt(t,"link",e),_t(t),n.head.appendChild(t)))}}function bp(e,t){Kn.m(e,t);var a=Tr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Zt(n)+'"][href="'+Zt(e)+'"]',c=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Cr(e)}if(!Za.has(c)&&(e=E({rel:"modulepreload",href:e},t),Za.set(c,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ui(c)))return}n=a.createElement("link"),Xt(n,"link",e),_t(n),a.head.appendChild(n)}}}function Sp(e,t,a){Kn.S(e,t,a);var n=Tr;if(n&&e){var i=Ka(n).hoistableStyles,c=Mr(e);t=t||"default";var x=i.get(c);if(!x){var T={loading:0,preload:null};if(x=n.querySelector(zi(c)))T.loading=5;else{e=E({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Za.get(c))&&Id(e,a);var O=x=n.createElement("link");_t(O),Xt(O,"link",e),O._p=new Promise(function(P,ie){O.onload=P,O.onerror=ie}),O.addEventListener("load",function(){T.loading|=1}),O.addEventListener("error",function(){T.loading|=2}),T.loading|=4,jc(x,t,n)}x={type:"stylesheet",instance:x,count:1,state:T},i.set(c,x)}}}function wp(e,t){Kn.X(e,t);var a=Tr;if(a&&e){var n=Ka(a).hoistableScripts,i=Cr(e),c=n.get(i);c||(c=a.querySelector(Ui(i)),c||(e=E({src:e,async:!0},t),(t=Za.get(i))&&Xd(e,t),c=a.createElement("script"),_t(c),Xt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function Np(e,t){Kn.M(e,t);var a=Tr;if(a&&e){var n=Ka(a).hoistableScripts,i=Cr(e),c=n.get(i);c||(c=a.querySelector(Ui(i)),c||(e=E({src:e,async:!0,type:"module"},t),(t=Za.get(i))&&Xd(e,t),c=a.createElement("script"),_t(c),Xt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function M0(e,t,a,n){var i=(i=Ee.current)?Nc(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Mr(a.href),a=Ka(i).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Mr(a.href);var c=Ka(i).hoistableStyles,x=c.get(e);if(x||(i=i.ownerDocument||i,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,x),(c=i.querySelector(zi(e)))&&!c._p&&(x.instance=c,x.state.loading=5),Za.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},Za.set(e,a),c||jp(i,e,a,x.state))),t&&n===null)throw Error(o(528,""));return x}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=Cr(a),a=Ka(i).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Mr(e){return'href="'+Zt(e)+'"'}function zi(e){return'link[rel="stylesheet"]['+e+"]"}function C0(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function jp(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}),Xt(t,"link",a),_t(t),e.head.appendChild(t))}function Cr(e){return'[src="'+Zt(e)+'"]'}function Ui(e){return"script[async]"+e}function O0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Zt(a.href)+'"]');if(n)return t.instance=n,_t(n),n;var i=E({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),_t(n),Xt(n,"style",i),jc(n,a.precedence,e),t.instance=n;case"stylesheet":i=Mr(a.href);var c=e.querySelector(zi(i));if(c)return t.state.loading|=4,t.instance=c,_t(c),c;n=C0(a),(i=Za.get(i))&&Id(n,i),c=(e.ownerDocument||e).createElement("link"),_t(c);var x=c;return x._p=new Promise(function(T,O){x.onload=T,x.onerror=O}),Xt(c,"link",n),t.state.loading|=4,jc(c,a.precedence,e),t.instance=c;case"script":return c=Cr(a.src),(i=e.querySelector(Ui(c)))?(t.instance=i,_t(i),i):(n=a,(i=Za.get(c))&&(n=E({},a),Xd(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),_t(i),Xt(i,"link",n),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,jc(n,a.precedence,e));return t.instance}function jc(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,c=i,x=0;x<n.length;x++){var T=n[x];if(T.dataset.precedence===t)c=T;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Id(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ec=null;function D0(e,t,a){if(Ec===null){var n=new Map,i=Ec=new Map;i.set(a,n)}else i=Ec,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var c=a[i];if(!(c[Il]||c[Tt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var x=c.getAttribute(t)||"";x=e+x;var T=n.get(x);T?T.push(c):n.set(x,[c])}}return n}function R0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Ep(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function A0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Tp(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var i=Mr(n.href),c=t.querySelector(zi(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Tc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,_t(c);return}c=t.ownerDocument||t,n=C0(n),(i=Za.get(i))&&Id(n,i),c=c.createElement("link"),_t(c);var x=c;x._p=new Promise(function(T,O){x.onload=T,x.onerror=O}),Xt(c,"link",n),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Tc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Jd=0;function Mp(e,t){return e.stylesheets&&e.count===0&&Cc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Jd===0&&(Jd=62500*ip());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Jd?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function Tc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mc=null;function Cc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mc=new Map,t.forEach(Cp,e),Mc=null,Tc.call(e))}function Cp(e,t){if(!(t.state.loading&4)){var a=Mc.get(e);if(a)var n=a.get(null);else{a=new Map,Mc.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var x=i[c];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),n=x)}n&&a.set(null,n)}i=t.instance,x=i.getAttribute("data-precedence"),c=a.get(x)||n,c===n&&a.set(null,i),a.set(x,i),this.count++,n=Tc.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Li={$$typeof:G,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Op(e,t,a,n,i,c,x,T,O){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Vs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vs(0),this.hiddenUpdates=Vs(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function _0(e,t,a,n,i,c,x,T,O,P,ie,de){return e=new Op(e,t,a,x,O,P,ie,de,T),t=1,c===!0&&(t|=24),c=Qt(3,null,null,t),e.current=c,c.stateNode=e,t=Ro(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},zo(c),e}function k0(e){return e?(e=Ea,e):Ea}function z0(e,t,a,n,i,c){i=k0(i),n.context===null?n.context=i:n.pendingContext=i,n=Tl(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=Ml(e,n,t),a!==null&&(ba(a,e,t),gi(a,e,t))}function U0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Kd(e,t){U0(e,t),(e=e.alternate)&&U0(e,t)}function L0(e){if(e.tag===13||e.tag===31){var t=Ha(e,67108864);t!==null&&ba(t,e,67108864),Kd(e,67108864)}}function H0(e){if(e.tag===13||e.tag===31){var t=Da();t=Bs(t);var a=Ha(e,t);a!==null&&ba(a,e,t),Kd(e,t)}}var Oc=!0;function Dp(e,t,a,n){var i=B.T;B.T=null;var c=ue.p;try{ue.p=2,ef(e,t,a,n)}finally{ue.p=c,B.T=i}}function Rp(e,t,a,n){var i=B.T;B.T=null;var c=ue.p;try{ue.p=8,ef(e,t,a,n)}finally{ue.p=c,B.T=i}}function ef(e,t,a,n){if(Oc){var i=tf(n);if(i===null)Vd(e,t,n,Dc,a),V0(e,n);else if(_p(i,e,t,a,n))n.stopPropagation();else if(V0(e,n),t&4&&-1<Ap.indexOf(e)){for(;i!==null;){var c=Oe(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var x=xn(c.pendingLanes);if(x!==0){var T=c;for(T.pendingLanes|=2,T.entangledLanes|=2;x;){var O=1<<31-gt(x);T.entanglements[1]|=O,x&=~O}Tn(c),(lt&6)===0&&(fc=At()+500,Ri(0))}}break;case 31:case 13:T=Ha(c,2),T!==null&&ba(T,c,2),mc(),Kd(c,2)}if(c=tf(n),c===null&&Vd(e,t,n,Dc,a),c===i)break;i=c}i!==null&&n.stopPropagation()}else Vd(e,t,n,null,a)}}function tf(e){return e=Qs(e),af(e)}var Dc=null;function af(e){if(Dc=null,e=An(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 Dc=e,null}function q0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Xa()){case On:return 2;case Dn:return 8;case L:case fe:return 32;case ve:return 268435456;default:return 32}default:return 32}}var nf=!1,Hl=null,ql=null,Vl=null,Hi=new Map,qi=new Map,Bl=[],Ap="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function V0(e,t){switch(e){case"focusin":case"focusout":Hl=null;break;case"dragenter":case"dragleave":ql=null;break;case"mouseover":case"mouseout":Vl=null;break;case"pointerover":case"pointerout":Hi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qi.delete(t.pointerId)}}function Vi(e,t,a,n,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:c,targetContainers:[i]},t!==null&&(t=Oe(t),t!==null&&L0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function _p(e,t,a,n,i){switch(t){case"focusin":return Hl=Vi(Hl,e,t,a,n,i),!0;case"dragenter":return ql=Vi(ql,e,t,a,n,i),!0;case"mouseover":return Vl=Vi(Vl,e,t,a,n,i),!0;case"pointerover":var c=i.pointerId;return Hi.set(c,Vi(Hi.get(c)||null,e,t,a,n,i)),!0;case"gotpointercapture":return c=i.pointerId,qi.set(c,Vi(qi.get(c)||null,e,t,a,n,i)),!0}return!1}function B0(e){var t=An(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,Yr(e.priority,function(){H0(a)});return}}else if(t===31){if(t=N(a),t!==null){e.blockedOn=t,Yr(e.priority,function(){H0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=tf(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Pr=n,a.target.dispatchEvent(n),Pr=null}else return t=Oe(a),t!==null&&L0(t),e.blockedOn=a,!1;t.shift()}return!0}function Y0(e,t,a){Rc(e)&&a.delete(t)}function kp(){nf=!1,Hl!==null&&Rc(Hl)&&(Hl=null),ql!==null&&Rc(ql)&&(ql=null),Vl!==null&&Rc(Vl)&&(Vl=null),Hi.forEach(Y0),qi.forEach(Y0)}function Ac(e,t){e.blockedOn===t&&(e.blockedOn=null,nf||(nf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,kp)))}var _c=null;function $0(e){_c!==e&&(_c=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){_c===e&&(_c=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(af(n||a)===null)continue;break}var c=Oe(a);c!==null&&(e.splice(t,3),t-=3,td(c,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function Or(e){function t(O){return Ac(O,e)}Hl!==null&&Ac(Hl,e),ql!==null&&Ac(ql,e),Vl!==null&&Ac(Vl,e),Hi.forEach(t),qi.forEach(t);for(var a=0;a<Bl.length;a++){var n=Bl[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Bl.length&&(a=Bl[0],a.blockedOn===null);)B0(a),a.blockedOn===null&&Bl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],c=a[n+1],x=i[Ht]||null;if(typeof c=="function")x||$0(a);else if(x){var T=null;if(c&&c.hasAttribute("formAction")){if(i=c,x=c[Ht]||null)T=x.formAction;else if(af(i)!==null)continue}else T=x.action;typeof T=="function"?a[n+1]=T:(a.splice(n,3),n-=3),$0(a)}}}function F0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(x){return i=x})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function lf(e){this._internalRoot=e}kc.prototype.render=lf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Da();z0(a,n,e,t,null,null)},kc.prototype.unmount=lf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;z0(e.current,2,null,e,null,null),mc(),t[Rn]=null}};function kc(e){this._internalRoot=e}kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ys();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Bl.length&&t!==0&&t<Bl[a].priority;a++);Bl.splice(a,0,e),a===0&&B0(e)}};var G0=u.version;if(G0!=="19.2.4")throw Error(o(527,G0,"19.2.4"));ue.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=y(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zc.isDisabled&&zc.supportsFiber)try{$e=zc.inject(zp),dt=zc}catch{}}return Yi.createRoot=function(e,t){if(!m(e))throw Error(o(299));var a=!1,n="",i=Jh,c=Kh,x=em;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=_0(e,1,!1,null,null,a,n,null,i,c,x,F0),e[Rn]=t.current,qd(e),new lf(t)},Yi.hydrateRoot=function(e,t,a){if(!m(e))throw Error(o(299));var n=!1,i="",c=Jh,x=Kh,T=em,O=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.formState!==void 0&&(O=a.formState)),t=_0(e,1,!0,t,a??null,n,i,O,c,x,T,F0),t.context=k0(null),a=t.current,n=Da(),n=Bs(n),i=Tl(n),i.callback=null,Ml(a,i,n),a=n,t.current.lanes=a,cl(t,a),Tn(t),e[Rn]=t.current,qd(e),new kc(t)},Yi.version="19.2.4",Yi}var ng;function Pp(){if(ng)return cf.exports;ng=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),cf.exports=Zp(),cf.exports}var Qp=Pp();const Wp=Af(Qp);/**
|
|
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 lg="popstate";function Ip(l={}){function u(m,f){let{pathname:v="/",search:N="",hash:b=""}=Us(m.location.hash.substring(1));return!v.startsWith("/")&&!v.startsWith(".")&&(v="/"+v),Nf("",{pathname:v,search:N,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function d(m,f){let v=m.document.querySelector("base"),N="";if(v&&v.getAttribute("href")){let b=m.location.href,y=b.indexOf("#");N=y===-1?b:b.slice(0,y)}return N+"#"+(typeof f=="string"?f:lu(f))}function o(m,f){Pa(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return Jp(u,d,o,l)}function wt(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function Pa(l,u){if(!l){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Xp(){return Math.random().toString(36).substring(2,10)}function sg(l,u){return{usr:l.state,key:l.key,idx:u}}function Nf(l,u,d=null,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof u=="string"?Us(u):u,state:d,key:u&&u.key||o||Xp()}}function lu({pathname:l="/",search:u="",hash:d=""}){return u&&u!=="?"&&(l+=u.charAt(0)==="?"?u:"?"+u),d&&d!=="#"&&(l+=d.charAt(0)==="#"?d:"#"+d),l}function Us(l){let u={};if(l){let d=l.indexOf("#");d>=0&&(u.hash=l.substring(d),l=l.substring(0,d));let o=l.indexOf("?");o>=0&&(u.search=l.substring(o),l=l.substring(0,o)),l&&(u.pathname=l)}return u}function Jp(l,u,d,o={}){let{window:m=document.defaultView,v5Compat:f=!1}=o,v=m.history,N="POP",b=null,y=w();y==null&&(y=0,v.replaceState({...v.state,idx:y},""));function w(){return(v.state||{idx:null}).idx}function E(){N="POP";let Y=w(),X=Y==null?null:Y-y;y=Y,b&&b({action:N,location:M.location,delta:X})}function S(Y,X){N="PUSH";let Q=Nf(M.location,Y,X);d&&d(Q,Y),y=w()+1;let G=sg(Q,y),ee=M.createHref(Q);try{v.pushState(G,"",ee)}catch(le){if(le instanceof DOMException&&le.name==="DataCloneError")throw le;m.location.assign(ee)}f&&b&&b({action:N,location:M.location,delta:1})}function D(Y,X){N="REPLACE";let Q=Nf(M.location,Y,X);d&&d(Q,Y),y=w();let G=sg(Q,y),ee=M.createHref(Q);v.replaceState(G,"",ee),f&&b&&b({action:N,location:M.location,delta:0})}function A(Y){return Kp(Y)}let M={get action(){return N},get location(){return l(m,v)},listen(Y){if(b)throw new Error("A history only accepts one active listener");return m.addEventListener(lg,E),b=Y,()=>{m.removeEventListener(lg,E),b=null}},createHref(Y){return u(m,Y)},createURL:A,encodeLocation(Y){let X=A(Y);return{pathname:X.pathname,search:X.search,hash:X.hash}},push:S,replace:D,go(Y){return v.go(Y)}};return M}function Kp(l,u=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),wt(d,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:lu(l);return o=o.replace(/ $/,"%20"),!u&&o.startsWith("//")&&(o=d+o),new URL(o,d)}function ly(l,u,d="/"){return ev(l,u,d,!1)}function ev(l,u,d,o){let m=typeof u=="string"?Us(u):u,f=nl(m.pathname||"/",d);if(f==null)return null;let v=sy(l);tv(v);let N=null;for(let b=0;N==null&&b<v.length;++b){let y=fv(f);N=ov(v[b],y,o)}return N}function sy(l,u=[],d=[],o="",m=!1){let f=(v,N,b=m,y)=>{let w={relativePath:y===void 0?v.path||"":y,caseSensitive:v.caseSensitive===!0,childrenIndex:N,route:v};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(o)&&b)return;wt(w.relativePath.startsWith(o),`Absolute route path "${w.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(o.length)}let E=al([o,w.relativePath]),S=d.concat(w);v.children&&v.children.length>0&&(wt(v.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),sy(v.children,u,S,E,b)),!(v.path==null&&!v.index)&&u.push({path:E,score:uv(E,v.index),routesMeta:S})};return l.forEach((v,N)=>{var b;if(v.path===""||!((b=v.path)!=null&&b.includes("?")))f(v,N);else for(let y of ry(v.path))f(v,N,!0,y)}),u}function ry(l){let u=l.split("/");if(u.length===0)return[];let[d,...o]=u,m=d.endsWith("?"),f=d.replace(/\?$/,"");if(o.length===0)return m?[f,""]:[f];let v=ry(o.join("/")),N=[];return N.push(...v.map(b=>b===""?f:[f,b].join("/"))),m&&N.push(...v),N.map(b=>l.startsWith("/")&&b===""?"/":b)}function tv(l){l.sort((u,d)=>u.score!==d.score?d.score-u.score:cv(u.routesMeta.map(o=>o.childrenIndex),d.routesMeta.map(o=>o.childrenIndex)))}var av=/^:[\w-]+$/,nv=3,lv=2,sv=1,rv=10,iv=-2,rg=l=>l==="*";function uv(l,u){let d=l.split("/"),o=d.length;return d.some(rg)&&(o+=iv),u&&(o+=lv),d.filter(m=>!rg(m)).reduce((m,f)=>m+(av.test(f)?nv:f===""?sv:rv),o)}function cv(l,u){return l.length===u.length&&l.slice(0,-1).every((o,m)=>o===u[m])?l[l.length-1]-u[u.length-1]:0}function ov(l,u,d=!1){let{routesMeta:o}=l,m={},f="/",v=[];for(let N=0;N<o.length;++N){let b=o[N],y=N===o.length-1,w=f==="/"?u:u.slice(f.length)||"/",E=Fc({path:b.relativePath,caseSensitive:b.caseSensitive,end:y},w),S=b.route;if(!E&&y&&d&&!o[o.length-1].route.index&&(E=Fc({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},w)),!E)return null;Object.assign(m,E.params),v.push({params:m,pathname:al([f,E.pathname]),pathnameBase:yv(al([f,E.pathnameBase])),route:S}),E.pathnameBase!=="/"&&(f=al([f,E.pathnameBase]))}return v}function Fc(l,u){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[d,o]=dv(l.path,l.caseSensitive,l.end),m=u.match(d);if(!m)return null;let f=m[0],v=f.replace(/(.)\/+$/,"$1"),N=m.slice(1);return{params:o.reduce((y,{paramName:w,isOptional:E},S)=>{if(w==="*"){let A=N[S]||"";v=f.slice(0,f.length-A.length).replace(/(.)\/+$/,"$1")}const D=N[S];return E&&!D?y[w]=void 0:y[w]=(D||"").replace(/%2F/g,"/"),y},{}),pathname:f,pathnameBase:v,pattern:l}}function dv(l,u=!1,d=!0){Pa(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=[],m="^"+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:"*"}),m+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?m+="\\/*$":l!==""&&l!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,u?void 0:"i"),o]}function fv(l){try{return l.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Pa(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),l}}function nl(l,u){if(u==="/")return l;if(!l.toLowerCase().startsWith(u.toLowerCase()))return null;let d=u.endsWith("/")?u.length-1:u.length,o=l.charAt(d);return o&&o!=="/"?null:l.slice(d)||"/"}var hv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function mv(l,u="/"){let{pathname:d,search:o="",hash:m=""}=typeof l=="string"?Us(l):l,f;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?f=ig(d.substring(1),"/"):f=ig(d,u)):f=u,{pathname:f,search:xv(o),hash:pv(m)}}function ig(l,u){let d=u.replace(/\/+$/,"").split("/");return l.split("/").forEach(m=>{m===".."?d.length>1&&d.pop():m!=="."&&d.push(m)}),d.length>1?d.join("/"):"/"}function hf(l,u,d,o){return`Cannot include a '${l}' character in a manually specified \`to.${u}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function gv(l){return l.filter((u,d)=>d===0||u.route.path&&u.route.path.length>0)}function kf(l){let u=gv(l);return u.map((d,o)=>o===u.length-1?d.pathname:d.pathnameBase)}function zf(l,u,d,o=!1){let m;typeof l=="string"?m=Us(l):(m={...l},wt(!m.pathname||!m.pathname.includes("?"),hf("?","pathname","search",m)),wt(!m.pathname||!m.pathname.includes("#"),hf("#","pathname","hash",m)),wt(!m.search||!m.search.includes("#"),hf("#","search","hash",m)));let f=l===""||m.pathname==="",v=f?"/":m.pathname,N;if(v==null)N=d;else{let E=u.length-1;if(!o&&v.startsWith("..")){let S=v.split("/");for(;S[0]==="..";)S.shift(),E-=1;m.pathname=S.join("/")}N=E>=0?u[E]:"/"}let b=mv(m,N),y=v&&v!=="/"&&v.endsWith("/"),w=(f||v===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(y||w)&&(b.pathname+="/"),b}var al=l=>l.join("/").replace(/\/\/+/g,"/"),yv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),xv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,pv=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,vv=class{constructor(l,u,d,o=!1){this.status=l,this.statusText=u||"",this.internal=o,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function bv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Sv(l){return l.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var iy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function uy(l,u){let d=l;if(typeof d!="string"||!hv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let o=d,m=!1;if(iy)try{let f=new URL(window.location.href),v=d.startsWith("//")?new URL(f.protocol+d):new URL(d),N=nl(v.pathname,u);v.origin===f.origin&&N!=null?d=N+v.search+v.hash:m=!0}catch{Pa(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:m,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var cy=["POST","PUT","PATCH","DELETE"];new Set(cy);var wv=["GET",...cy];new Set(wv);var Ur=V.createContext(null);Ur.displayName="DataRouter";var Ic=V.createContext(null);Ic.displayName="DataRouterState";var Nv=V.createContext(!1),oy=V.createContext({isTransitioning:!1});oy.displayName="ViewTransition";var jv=V.createContext(new Map);jv.displayName="Fetchers";var Ev=V.createContext(null);Ev.displayName="Await";var _a=V.createContext(null);_a.displayName="Navigation";var iu=V.createContext(null);iu.displayName="Location";var Cn=V.createContext({outlet:null,matches:[],isDataRoute:!1});Cn.displayName="Route";var Uf=V.createContext(null);Uf.displayName="RouteError";var dy="REACT_ROUTER_ERROR",Tv="REDIRECT",Mv="ROUTE_ERROR_RESPONSE";function Cv(l){if(l.startsWith(`${dy}:${Tv}:{`))try{let u=JSON.parse(l.slice(28));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.location=="string"&&typeof u.reloadDocument=="boolean"&&typeof u.replace=="boolean")return u}catch{}}function Ov(l){if(l.startsWith(`${dy}:${Mv}:{`))try{let u=JSON.parse(l.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new vv(u.status,u.statusText,u.data)}catch{}}function Dv(l,{relative:u}={}){wt(Lr(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:o}=V.useContext(_a),{hash:m,pathname:f,search:v}=uu(l,{relative:u}),N=f;return d!=="/"&&(N=f==="/"?d:al([d,f])),o.createHref({pathname:N,search:v,hash:m})}function Lr(){return V.useContext(iu)!=null}function Pl(){return wt(Lr(),"useLocation() may be used only in the context of a <Router> component."),V.useContext(iu).location}var fy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function hy(l){V.useContext(_a).static||V.useLayoutEffect(l)}function Lf(){let{isDataRoute:l}=V.useContext(Cn);return l?$v():Rv()}function Rv(){wt(Lr(),"useNavigate() may be used only in the context of a <Router> component.");let l=V.useContext(Ur),{basename:u,navigator:d}=V.useContext(_a),{matches:o}=V.useContext(Cn),{pathname:m}=Pl(),f=JSON.stringify(kf(o)),v=V.useRef(!1);return hy(()=>{v.current=!0}),V.useCallback((b,y={})=>{if(Pa(v.current,fy),!v.current)return;if(typeof b=="number"){d.go(b);return}let w=zf(b,JSON.parse(f),m,y.relative==="path");l==null&&u!=="/"&&(w.pathname=w.pathname==="/"?u:al([u,w.pathname])),(y.replace?d.replace:d.push)(w,y.state,y)},[u,d,f,m,l])}V.createContext(null);function uu(l,{relative:u}={}){let{matches:d}=V.useContext(Cn),{pathname:o}=Pl(),m=JSON.stringify(kf(d));return V.useMemo(()=>zf(l,JSON.parse(m),o,u==="path"),[l,m,o,u])}function Av(l,u){return my(l,u)}function my(l,u,d,o,m){var Q;wt(Lr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=V.useContext(_a),{matches:v}=V.useContext(Cn),N=v[v.length-1],b=N?N.params:{},y=N?N.pathname:"/",w=N?N.pathnameBase:"/",E=N&&N.route;{let G=E&&E.path||"";yy(y,!E||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (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 S=Pl(),D;if(u){let G=typeof u=="string"?Us(u):u;wt(w==="/"||((Q=G.pathname)==null?void 0:Q.startsWith(w)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${w}" but pathname "${G.pathname}" was given in the \`location\` prop.`),D=G}else D=S;let A=D.pathname||"/",M=A;if(w!=="/"){let G=w.replace(/^\//,"").split("/");M="/"+A.replace(/^\//,"").split("/").slice(G.length).join("/")}let Y=ly(l,{pathname:M});Pa(E||Y!=null,`No routes matched location "${D.pathname}${D.search}${D.hash}" `),Pa(Y==null||Y[Y.length-1].route.element!==void 0||Y[Y.length-1].route.Component!==void 0||Y[Y.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 X=Lv(Y&&Y.map(G=>Object.assign({},G,{params:Object.assign({},b,G.params),pathname:al([w,f.encodeLocation?f.encodeLocation(G.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?w:al([w,f.encodeLocation?f.encodeLocation(G.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathnameBase])})),v,d,o,m);return u&&X?V.createElement(iu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},X):X}function _v(){let l=Yv(),u=bv(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),d=l instanceof Error?l.stack:null,o="rgba(200,200,200, 0.5)",m={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=V.createElement(V.Fragment,null,V.createElement("p",null,"💿 Hey developer 👋"),V.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",V.createElement("code",{style:f},"ErrorBoundary")," or"," ",V.createElement("code",{style:f},"errorElement")," prop on your route.")),V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},u),d?V.createElement("pre",{style:m},d):null,v)}var kv=V.createElement(_v,null),gy=class extends V.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,u){return u.location!==l.location||u.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:u.error,location:u.location,revalidation:l.revalidation||u.revalidation}}componentDidCatch(l,u){this.props.onError?this.props.onError(l,u):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const d=Ov(l.digest);d&&(l=d)}let u=l!==void 0?V.createElement(Cn.Provider,{value:this.props.routeContext},V.createElement(Uf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?V.createElement(zv,{error:l},u):u}};gy.contextType=Nv;var mf=new WeakMap;function zv({children:l,error:u}){let{basename:d}=V.useContext(_a);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let o=Cv(u.digest);if(o){let m=mf.get(u);if(m)throw m;let f=uy(o.location,d);if(iy&&!mf.get(u))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 mf.set(u,v),v}return V.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return l}function Uv({routeContext:l,match:u,children:d}){let o=V.useContext(Ur);return o&&o.static&&o.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=u.route.id),V.createElement(Cn.Provider,{value:l},d)}function Lv(l,u=[],d=null,o=null,m=null){if(l==null){if(!d)return null;if(d.errors)l=d.matches;else if(u.length===0&&!d.initialized&&d.matches.length>0)l=d.matches;else return null}let f=l,v=d==null?void 0:d.errors;if(v!=null){let w=f.findIndex(E=>E.route.id&&(v==null?void 0:v[E.route.id])!==void 0);wt(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(v).join(",")}`),f=f.slice(0,Math.min(f.length,w+1))}let N=!1,b=-1;if(d)for(let w=0;w<f.length;w++){let E=f[w];if((E.route.HydrateFallback||E.route.hydrateFallbackElement)&&(b=w),E.route.id){let{loaderData:S,errors:D}=d,A=E.route.loader&&!S.hasOwnProperty(E.route.id)&&(!D||D[E.route.id]===void 0);if(E.route.lazy||A){N=!0,b>=0?f=f.slice(0,b+1):f=[f[0]];break}}}let y=d&&o?(w,E)=>{var S,D;o(w,{location:d.location,params:((D=(S=d.matches)==null?void 0:S[0])==null?void 0:D.params)??{},unstable_pattern:Sv(d.matches),errorInfo:E})}:void 0;return f.reduceRight((w,E,S)=>{let D,A=!1,M=null,Y=null;d&&(D=v&&E.route.id?v[E.route.id]:void 0,M=E.route.errorElement||kv,N&&(b<0&&S===0?(yy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,Y=null):b===S&&(A=!0,Y=E.route.hydrateFallbackElement||null)));let X=u.concat(f.slice(0,S+1)),Q=()=>{let G;return D?G=M:A?G=Y:E.route.Component?G=V.createElement(E.route.Component,null):E.route.element?G=E.route.element:G=w,V.createElement(Uv,{match:E,routeContext:{outlet:w,matches:X,isDataRoute:d!=null},children:G})};return d&&(E.route.ErrorBoundary||E.route.errorElement||S===0)?V.createElement(gy,{location:d.location,revalidation:d.revalidation,component:M,error:D,children:Q(),routeContext:{outlet:null,matches:X,isDataRoute:!0},onError:y}):Q()},null)}function Hf(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hv(l){let u=V.useContext(Ur);return wt(u,Hf(l)),u}function qv(l){let u=V.useContext(Ic);return wt(u,Hf(l)),u}function Vv(l){let u=V.useContext(Cn);return wt(u,Hf(l)),u}function qf(l){let u=Vv(l),d=u.matches[u.matches.length-1];return wt(d.route.id,`${l} can only be used on routes that contain a unique "id"`),d.route.id}function Bv(){return qf("useRouteId")}function Yv(){var o;let l=V.useContext(Uf),u=qv("useRouteError"),d=qf("useRouteError");return l!==void 0?l:(o=u.errors)==null?void 0:o[d]}function $v(){let{router:l}=Hv("useNavigate"),u=qf("useNavigate"),d=V.useRef(!1);return hy(()=>{d.current=!0}),V.useCallback(async(m,f={})=>{Pa(d.current,fy),d.current&&(typeof m=="number"?await l.navigate(m):await l.navigate(m,{fromRouteId:u,...f}))},[l,u])}var ug={};function yy(l,u,d){!u&&!ug[l]&&(ug[l]=!0,Pa(!1,d))}V.memo(Fv);function Fv({routes:l,future:u,state:d,onError:o}){return my(l,void 0,d,o,u)}function Gv({to:l,replace:u,state:d,relative:o}){wt(Lr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=V.useContext(_a);Pa(!m,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=V.useContext(Cn),{pathname:v}=Pl(),N=Lf(),b=zf(l,kf(f),v,o==="path"),y=JSON.stringify(b);return V.useEffect(()=>{N(JSON.parse(y),{replace:u,state:d,relative:o})},[N,y,o,u,d]),null}function tl(l){wt(!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 Zv({basename:l="/",children:u=null,location:d,navigationType:o="POP",navigator:m,static:f=!1,unstable_useTransitions:v}){wt(!Lr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let N=l.replace(/^\/*/,"/"),b=V.useMemo(()=>({basename:N,navigator:m,static:f,unstable_useTransitions:v,future:{}}),[N,m,f,v]);typeof d=="string"&&(d=Us(d));let{pathname:y="/",search:w="",hash:E="",state:S=null,key:D="default"}=d,A=V.useMemo(()=>{let M=nl(y,N);return M==null?null:{location:{pathname:M,search:w,hash:E,state:S,key:D},navigationType:o}},[N,y,w,E,S,D,o]);return Pa(A!=null,`<Router basename="${N}"> is not able to match the URL "${y}${w}${E}" because it does not start with the basename, so the <Router> won't render anything.`),A==null?null:V.createElement(_a.Provider,{value:b},V.createElement(iu.Provider,{children:u,value:A}))}function Pv({children:l,location:u}){return Av(jf(l),u)}function jf(l,u=[]){let d=[];return V.Children.forEach(l,(o,m)=>{if(!V.isValidElement(o))return;let f=[...u,m];if(o.type===V.Fragment){d.push.apply(d,jf(o.props.children,f));return}wt(o.type===tl,`[${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>`),wt(!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=jf(o.props.children,f)),d.push(v)}),d}var Yc="get",$c="application/x-www-form-urlencoded";function Xc(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function Qv(l){return Xc(l)&&l.tagName.toLowerCase()==="button"}function Wv(l){return Xc(l)&&l.tagName.toLowerCase()==="form"}function Iv(l){return Xc(l)&&l.tagName.toLowerCase()==="input"}function Xv(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Jv(l,u){return l.button===0&&(!u||u==="_self")&&!Xv(l)}var Uc=null;function Kv(){if(Uc===null)try{new FormData(document.createElement("form"),0),Uc=!1}catch{Uc=!0}return Uc}var eb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gf(l){return l!=null&&!eb.has(l)?(Pa(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${$c}"`),null):l}function tb(l,u){let d,o,m,f,v;if(Wv(l)){let N=l.getAttribute("action");o=N?nl(N,u):null,d=l.getAttribute("method")||Yc,m=gf(l.getAttribute("enctype"))||$c,f=new FormData(l)}else if(Qv(l)||Iv(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?nl(b,u):null,d=l.getAttribute("formmethod")||N.getAttribute("method")||Yc,m=gf(l.getAttribute("formenctype"))||gf(N.getAttribute("enctype"))||$c,f=new FormData(N,l),!Kv()){let{name:y,type:w,value:E}=l;if(w==="image"){let S=y?`${y}.`:"";f.append(`${S}x`,"0"),f.append(`${S}y`,"0")}else y&&f.append(y,E)}}else{if(Xc(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Yc,o=null,m=$c,v=l}return f&&m==="text/plain"&&(v=f,f=void 0),{action:o,method:d.toLowerCase(),encType:m,formData:f,body:v}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Vf(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function ab(l,u,d,o){let m=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return d?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${o}`:m.pathname=`${m.pathname}.${o}`:m.pathname==="/"?m.pathname=`_root.${o}`:u&&nl(m.pathname,u)==="/"?m.pathname=`${u.replace(/\/$/,"")}/_root.${o}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${o}`,m}async function nb(l,u){if(l.id in u)return u[l.id];try{let d=await import(l.module);return u[l.id]=d,d}catch(d){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function lb(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 sb(l,u,d){let o=await Promise.all(l.map(async m=>{let f=u.routes[m.route.id];if(f){let v=await nb(f,d);return v.links?v.links():[]}return[]}));return cb(o.flat(1).filter(lb).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function cg(l,u,d,o,m,f){let v=(b,y)=>d[y]?b.route.id!==d[y].route.id:!0,N=(b,y)=>{var w;return d[y].pathname!==b.pathname||((w=d[y].route.path)==null?void 0:w.endsWith("*"))&&d[y].params["*"]!==b.params["*"]};return f==="assets"?u.filter((b,y)=>v(b,y)||N(b,y)):f==="data"?u.filter((b,y)=>{var E;let w=o.routes[b.route.id];if(!w||!w.hasLoader)return!1;if(v(b,y)||N(b,y))return!0;if(b.route.shouldRevalidate){let S=b.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((E=d[0])==null?void 0:E.params)||{},nextUrl:new URL(l,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function rb(l,u,{includeHydrateFallback:d}={}){return ib(l.map(o=>{let m=u.routes[o.route.id];if(!m)return[];let f=[m.module];return m.clientActionModule&&(f=f.concat(m.clientActionModule)),m.clientLoaderModule&&(f=f.concat(m.clientLoaderModule)),d&&m.hydrateFallbackModule&&(f=f.concat(m.hydrateFallbackModule)),m.imports&&(f=f.concat(m.imports)),f}).flat(1))}function ib(l){return[...new Set(l)]}function ub(l){let u={},d=Object.keys(l).sort();for(let o of d)u[o]=l[o];return u}function cb(l,u){let d=new Set;return new Set(u),l.reduce((o,m)=>{let f=JSON.stringify(ub(m));return d.has(f)||(d.add(f),o.push({key:f,link:m})),o},[])}function xy(){let l=V.useContext(Ur);return Vf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function ob(){let l=V.useContext(Ic);return Vf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Bf=V.createContext(void 0);Bf.displayName="FrameworkContext";function py(){let l=V.useContext(Bf);return Vf(l,"You must render this element inside a <HydratedRouter> element"),l}function db(l,u){let d=V.useContext(Bf),[o,m]=V.useState(!1),[f,v]=V.useState(!1),{onFocus:N,onBlur:b,onMouseEnter:y,onMouseLeave:w,onTouchStart:E}=u,S=V.useRef(null);V.useEffect(()=>{if(l==="render"&&v(!0),l==="viewport"){let M=X=>{X.forEach(Q=>{v(Q.isIntersecting)})},Y=new IntersectionObserver(M,{threshold:.5});return S.current&&Y.observe(S.current),()=>{Y.disconnect()}}},[l]),V.useEffect(()=>{if(o){let M=setTimeout(()=>{v(!0)},100);return()=>{clearTimeout(M)}}},[o]);let D=()=>{m(!0)},A=()=>{m(!1),v(!1)};return d?l!=="intent"?[f,S,{}]:[f,S,{onFocus:$i(N,D),onBlur:$i(b,A),onMouseEnter:$i(y,D),onMouseLeave:$i(w,A),onTouchStart:$i(E,D)}]:[!1,S,{}]}function $i(l,u){return d=>{l&&l(d),d.defaultPrevented||u(d)}}function fb({page:l,...u}){let{router:d}=xy(),o=V.useMemo(()=>ly(d.routes,l,d.basename),[d.routes,l,d.basename]);return o?V.createElement(mb,{page:l,matches:o,...u}):null}function hb(l){let{manifest:u,routeModules:d}=py(),[o,m]=V.useState([]);return V.useEffect(()=>{let f=!1;return sb(l,u,d).then(v=>{f||m(v)}),()=>{f=!0}},[l,u,d]),o}function mb({page:l,matches:u,...d}){let o=Pl(),{future:m,manifest:f,routeModules:v}=py(),{basename:N}=xy(),{loaderData:b,matches:y}=ob(),w=V.useMemo(()=>cg(l,u,y,f,o,"data"),[l,u,y,f,o]),E=V.useMemo(()=>cg(l,u,y,f,o,"assets"),[l,u,y,f,o]),S=V.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let M=new Set,Y=!1;if(u.forEach(Q=>{var ee;let G=f.routes[Q.route.id];!G||!G.hasLoader||(!w.some(le=>le.route.id===Q.route.id)&&Q.route.id in b&&((ee=v[Q.route.id])!=null&&ee.shouldRevalidate)||G.hasClientLoader?Y=!0:M.add(Q.route.id))}),M.size===0)return[];let X=ab(l,N,m.unstable_trailingSlashAwareDataRequests,"data");return Y&&M.size>0&&X.searchParams.set("_routes",u.filter(Q=>M.has(Q.route.id)).map(Q=>Q.route.id).join(",")),[X.pathname+X.search]},[N,m.unstable_trailingSlashAwareDataRequests,b,o,f,w,u,l,v]),D=V.useMemo(()=>rb(E,f),[E,f]),A=hb(E);return V.createElement(V.Fragment,null,S.map(M=>V.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...d})),D.map(M=>V.createElement("link",{key:M,rel:"modulepreload",href:M,...d})),A.map(({key:M,link:Y})=>V.createElement("link",{key:M,nonce:d.nonce,...Y,crossOrigin:Y.crossOrigin??d.crossOrigin})))}function gb(...l){return u=>{l.forEach(d=>{typeof d=="function"?d(u):d!=null&&(d.current=u)})}}var yb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{yb&&(window.__reactRouterVersion="7.13.0")}catch{}function xb({basename:l,children:u,unstable_useTransitions:d,window:o}){let m=V.useRef();m.current==null&&(m.current=Ip({window:o,v5Compat:!0}));let f=m.current,[v,N]=V.useState({action:f.action,location:f.location}),b=V.useCallback(y=>{d===!1?N(y):V.startTransition(()=>N(y))},[d]);return V.useLayoutEffect(()=>f.listen(b),[f,b]),V.createElement(Zv,{basename:l,children:u,location:v.location,navigationType:v.action,navigator:f,unstable_useTransitions:d})}var vy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,by=V.forwardRef(function({onClick:u,discover:d="render",prefetch:o="none",relative:m,reloadDocument:f,replace:v,state:N,target:b,to:y,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:S,...D},A){let{basename:M,unstable_useTransitions:Y}=V.useContext(_a),X=typeof y=="string"&&vy.test(y),Q=uy(y,M);y=Q.to;let G=Dv(y,{relative:m}),[ee,le,te]=db(o,D),W=bb(y,{replace:v,state:N,target:b,preventScrollReset:w,relative:m,viewTransition:E,unstable_defaultShouldRevalidate:S,unstable_useTransitions:Y});function J(U){u&&u(U),U.defaultPrevented||W(U)}let R=V.createElement("a",{...D,...te,href:Q.absoluteURL||G,onClick:Q.isExternal||f?u:J,ref:gb(A,le),target:b,"data-discover":!X&&d==="render"?"true":void 0});return ee&&!X?V.createElement(V.Fragment,null,R,V.createElement(fb,{page:G})):R});by.displayName="Link";var Sy=V.forwardRef(function({"aria-current":u="page",caseSensitive:d=!1,className:o="",end:m=!1,style:f,to:v,viewTransition:N,children:b,...y},w){let E=uu(v,{relative:y.relative}),S=Pl(),D=V.useContext(Ic),{navigator:A,basename:M}=V.useContext(_a),Y=D!=null&&Eb(E)&&N===!0,X=A.encodeLocation?A.encodeLocation(E).pathname:E.pathname,Q=S.pathname,G=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;d||(Q=Q.toLowerCase(),G=G?G.toLowerCase():null,X=X.toLowerCase()),G&&M&&(G=nl(G,M)||G);const ee=X!=="/"&&X.endsWith("/")?X.length-1:X.length;let le=Q===X||!m&&Q.startsWith(X)&&Q.charAt(ee)==="/",te=G!=null&&(G===X||!m&&G.startsWith(X)&&G.charAt(X.length)==="/"),W={isActive:le,isPending:te,isTransitioning:Y},J=le?u:void 0,R;typeof o=="function"?R=o(W):R=[o,le?"active":null,te?"pending":null,Y?"transitioning":null].filter(Boolean).join(" ");let U=typeof f=="function"?f(W):f;return V.createElement(by,{...y,"aria-current":J,className:R,ref:w,style:U,to:v,viewTransition:N},typeof b=="function"?b(W):b)});Sy.displayName="NavLink";var pb=V.forwardRef(({discover:l="render",fetcherKey:u,navigate:d,reloadDocument:o,replace:m,state:f,method:v=Yc,action:N,onSubmit:b,relative:y,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:S,...D},A)=>{let{unstable_useTransitions:M}=V.useContext(_a),Y=Nb(),X=jb(N,{relative:y}),Q=v.toLowerCase()==="get"?"get":"post",G=typeof N=="string"&&vy.test(N),ee=le=>{if(b&&b(le),le.defaultPrevented)return;le.preventDefault();let te=le.nativeEvent.submitter,W=(te==null?void 0:te.getAttribute("formmethod"))||v,J=()=>Y(te||le.currentTarget,{fetcherKey:u,method:W,navigate:d,replace:m,state:f,relative:y,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:S});M&&d!==!1?V.startTransition(()=>J()):J()};return V.createElement("form",{ref:A,method:Q,action:X,onSubmit:o?b:ee,...D,"data-discover":!G&&l==="render"?"true":void 0})});pb.displayName="Form";function vb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wy(l){let u=V.useContext(Ur);return wt(u,vb(l)),u}function bb(l,{target:u,replace:d,state:o,preventScrollReset:m,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:N,unstable_useTransitions:b}={}){let y=Lf(),w=Pl(),E=uu(l,{relative:f});return V.useCallback(S=>{if(Jv(S,u)){S.preventDefault();let D=d!==void 0?d:lu(w)===lu(E),A=()=>y(l,{replace:D,state:o,preventScrollReset:m,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:N});b?V.startTransition(()=>A()):A()}},[w,y,E,d,o,u,l,m,f,v,N,b])}var Sb=0,wb=()=>`__${String(++Sb)}__`;function Nb(){let{router:l}=wy("useSubmit"),{basename:u}=V.useContext(_a),d=Bv(),o=l.fetch,m=l.navigate;return V.useCallback(async(f,v={})=>{let{action:N,method:b,encType:y,formData:w,body:E}=tb(f,u);if(v.navigate===!1){let S=v.fetcherKey||wb();await o(S,d,v.action||N,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:w,body:E,formMethod:v.method||b,formEncType:v.encType||y,flushSync:v.flushSync})}else await m(v.action||N,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:w,body:E,formMethod:v.method||b,formEncType:v.encType||y,replace:v.replace,state:v.state,fromRouteId:d,flushSync:v.flushSync,viewTransition:v.viewTransition})},[o,m,u,d])}function jb(l,{relative:u}={}){let{basename:d}=V.useContext(_a),o=V.useContext(Cn);wt(o,"useFormAction must be used inside a RouteContext");let[m]=o.matches.slice(-1),f={...uu(l||".",{relative:u})},v=Pl();if(l==null){f.search=v.search;let N=new URLSearchParams(f.search),b=N.getAll("index");if(b.some(w=>w==="")){N.delete("index"),b.filter(E=>E).forEach(E=>N.append("index",E));let w=N.toString();f.search=w?`?${w}`:""}}return(!l||l===".")&&m.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(f.pathname=f.pathname==="/"?d:al([d,f.pathname])),lu(f)}function Eb(l,{relative:u}={}){let d=V.useContext(oy);wt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=wy("useViewTransitionState"),m=uu(l,{relative:u});if(!d.isTransitioning)return!1;let f=nl(d.currentLocation.pathname,o)||d.currentLocation.pathname,v=nl(d.nextLocation.pathname,o)||d.nextLocation.pathname;return Fc(m.pathname,v)!=null||Fc(m.pathname,f)!=null}var Tb=ny();const Mb=Af(Tb);/**
|
|
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 Ny=(...l)=>l.filter((u,d,o)=>!!u&&u.trim()!==""&&o.indexOf(u)===d).join(" ").trim();/**
|
|
66
|
+
* @license lucide-react v0.564.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const Cb=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 Ob=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(u,d,o)=>o?o.toUpperCase():d.toLowerCase());/**
|
|
76
|
+
* @license lucide-react v0.564.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const og=l=>{const u=Ob(l);return u.charAt(0).toUpperCase()+u.slice(1)};/**
|
|
81
|
+
* @license lucide-react v0.564.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/var Db={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 Rb=l=>{for(const u in l)if(u.startsWith("aria-")||u==="role"||u==="title")return!0;return!1};/**
|
|
91
|
+
* @license lucide-react v0.564.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const Ab=V.forwardRef(({color:l="currentColor",size:u=24,strokeWidth:d=2,absoluteStrokeWidth:o,className:m="",children:f,iconNode:v,...N},b)=>V.createElement("svg",{ref:b,...Db,width:u,height:u,stroke:l,strokeWidth:o?Number(d)*24/Number(u):d,className:Ny("lucide",m),...!f&&!Rb(N)&&{"aria-hidden":"true"},...N},[...v.map(([y,w])=>V.createElement(y,w)),...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 _e=(l,u)=>{const d=V.forwardRef(({className:o,...m},f)=>V.createElement(Ab,{ref:f,iconNode:u,className:Ny(`lucide-${Cb(og(l))}`,`lucide-${l}`,o),...m}));return d.displayName=og(l),d};/**
|
|
101
|
+
* @license lucide-react v0.564.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const _b=[["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"}]],jy=_e("activity",_b);/**
|
|
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 kb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],zb=_e("arrow-down",kb);/**
|
|
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 Ub=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],dg=_e("arrow-right",Ub);/**
|
|
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 Lb=[["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"}]],Hb=_e("arrow-up-down",Lb);/**
|
|
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 qb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Vb=_e("arrow-up",qb);/**
|
|
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 Bb=[["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"}]],Yb=_e("bell",Bb);/**
|
|
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 $b=[["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"}]],fg=_e("briefcase",$b);/**
|
|
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 Fb=[["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"}]],Yf=_e("calendar",Fb);/**
|
|
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 Gb=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Zb=_e("chart-no-axes-column",Gb);/**
|
|
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 Pb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ef=_e("check",Pb);/**
|
|
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 Qb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ey=_e("chevron-down",Qb);/**
|
|
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 Wb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ib=_e("chevron-left",Wb);/**
|
|
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 Xb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Jb=_e("chevron-right",Xb);/**
|
|
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 Kb=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],e1=_e("chevron-up",Kb);/**
|
|
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 t1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],a1=_e("chevrons-up-down",t1);/**
|
|
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 n1=[["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"}]],ll=_e("circle-alert",n1);/**
|
|
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 l1=[["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"}]],hg=_e("circle-arrow-down",l1);/**
|
|
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 s1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],cu=_e("circle-check-big",s1);/**
|
|
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 r1=[["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"}]],i1=_e("circle-x",r1);/**
|
|
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 u1=[["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"}]],mg=_e("clipboard-list",u1);/**
|
|
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 c1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Gc=_e("clock",c1);/**
|
|
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 o1=[["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"}]],Ty=_e("external-link",o1);/**
|
|
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 d1=[["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"}]],f1=_e("eye-off",d1);/**
|
|
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 h1=[["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"}]],m1=_e("eye",h1);/**
|
|
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 g1=[["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"}]],Tf=_e("file-text",g1);/**
|
|
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 y1=[["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"}]],x1=_e("git-pull-request",y1);/**
|
|
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 p1=[["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"}]],v1=_e("globe",p1);/**
|
|
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 b1=[["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"}]],S1=_e("house",b1);/**
|
|
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 w1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],N1=_e("info",w1);/**
|
|
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 j1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],E1=_e("kanban",j1);/**
|
|
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 T1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],My=_e("loader-circle",T1);/**
|
|
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 M1=[["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"}]],Cy=_e("map",M1);/**
|
|
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 C1=[["path",{d:"M5 12h14",key:"1ays0h"}]],O1=_e("minus",C1);/**
|
|
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 D1=[["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"}]],Oy=_e("pause",D1);/**
|
|
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 R1=[["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"}]],$f=_e("pen",R1);/**
|
|
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 A1=[["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"}]],kr=_e("play",A1);/**
|
|
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 _1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Hr=_e("plus",_1);/**
|
|
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 k1=[["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"}]],Dy=_e("rotate-ccw",k1);/**
|
|
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 z1=[["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"}]],U1=_e("save",z1);/**
|
|
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 L1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Jc=_e("search",L1);/**
|
|
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 H1=[["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"}]],q1=_e("settings",H1);/**
|
|
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 V1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],gg=_e("square",V1);/**
|
|
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 B1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Y1=_e("terminal",B1);/**
|
|
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 $1=[["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"}]],F1=_e("test-tube-diagonal",$1);/**
|
|
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 G1=[["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"}]],Kc=_e("trash-2",G1);/**
|
|
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 Z1=[["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"}]],su=_e("triangle-alert",Z1);/**
|
|
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 P1=[["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"}]],Q1=_e("wifi",P1);/**
|
|
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 W1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],qr=_e("x",W1),Ry=[{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"}}],Ay=[{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 u;return((u=l.qa)==null?void 0:u.enabled)??!0},getSchedule:l=>{var u;return((u=l.qa)==null?void 0:u.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(l,u)=>({qa:{...u.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 u;return((u=l.audit)==null?void 0:u.enabled)??!0},getSchedule:l=>{var u;return((u=l.audit)==null?void 0:u.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,u)=>({audit:{...u.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 u;return((u=l.roadmapScanner)==null?void 0:u.enabled)??!0},getSchedule:l=>{var u;return((u=l.roadmapScanner)==null?void 0:u.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,u)=>({roadmapScanner:{...u.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 u;return((u=l.analytics)==null?void 0:u.enabled)??!1},getSchedule:l=>{var u;return((u=l.analytics)==null?void 0:u.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,u)=>({analytics:{...u.analytics??{},enabled:l}})}];function _y(l){return Ay.find(u=>u.id===l)}const Ff="";let Gf=!1,Zc=null;function I1(l){Gf=l}function yg(l){Zc=l}function X1(){return Gf}function Zf(l){return encodeURIComponent(l.replace(/\//g,"~"))}function pt(l){return Gf&&Zc?l.replace("/api/",`/api/projects/${Zf(Zc)}/`):l}function J1(){return nt("/api/mode")}function ky(){return nt("/api/projects")}function K1(l){const u=Zf(l);return nt(`/api/projects/${u}`,{method:"DELETE"})}async function nt(l,u){const d=`${Ff}${l}`,o=await fetch(d,{headers:{"Content-Type":"application/json",...u==null?void 0:u.headers},...u});if(!o.ok){const m=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${o.status}: ${o.statusText}`)}return o.json()}function yf(){return nt(pt("/api/status"))}function zy(){return nt(pt("/api/prs"))}function eS(l,u){const d=`?lines=${encodeURIComponent(u)}`;return nt(pt(`/api/logs/${encodeURIComponent(l)}${d}`))}function Pf(){return nt(pt("/api/config"))}async function Uy(){if(X1()){const u=(await ky()).filter(o=>o.valid);return(await Promise.all(u.map(async o=>{try{const m=await nt(`/api/projects/${Zf(o.name)}/config`);return{projectId:o.name,config:m}}catch(m){return console.error(`Failed to fetch config for project ${o.name}`,m),null}}))).filter(o=>o!==null)}else{const l=await Pf();return[{projectId:Zc||"current",config:l}]}}function Pc(l){return nt(pt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function tS(){return nt(pt("/api/doctor"))}function Ly(){return nt(pt("/api/schedule-info"))}function aS(){return nt(pt("/api/actions/run"),{method:"POST"})}function Hy(){return nt(pt("/api/actions/review"),{method:"POST"})}function nS(){return nt(pt("/api/actions/qa"),{method:"POST"})}function lS(){return nt(pt("/api/actions/audit"),{method:"POST"})}function sS(){return nt(pt("/api/actions/analytics"),{method:"POST"})}function rS(){return nt(pt("/api/actions/planner"),{method:"POST"})}function iS(l){const u=_y(l);return u?nt(pt(u.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${l}`))}function nu(){return nt(pt("/api/actions/install-cron"),{method:"POST"})}function uS(){return nt(pt("/api/actions/uninstall-cron"),{method:"POST"})}function cS(l="all"){return nt(pt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Zl=["Draft","Ready","In Progress","Review","Done"];function qy(){return nt(pt("/api/board/status"))}function oS(l){return nt(pt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function Vy(l,u){return nt(pt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:u})})}async function dS(l){const u=`${Ff}${pt(`/api/board/issues/${l}`)}`,d=await fetch(u,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const o=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error||`HTTP ${d.status}: ${d.statusText}`)}}function fS(){return nt(pt("/api/actions/clear-lock"),{method:"POST"})}function hS(l,u=[],d){const o=(d==null?void 0:d.enabled)??!0,m=V.useRef(l);m.current=l,V.useEffect(()=>{if(!o)return;const f=`${Ff}${pt("/api/status/events")}`,v=new EventSource(f);return v.addEventListener("status_changed",N=>{try{const b=JSON.parse(N.data);m.current(b)}catch{}}),()=>{v.close()}},[o,...u])}function mS(){return nt("/api/queue/status")}function gS(l){const u=`?window=${encodeURIComponent(l)}`;return nt(`/api/queue/analytics${u}`)}function yS(){return nt("/api/global-notifications")}function xg(l){return nt("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function xS(){return nt(pt("/api/roadmap"))}function pS(){return nt(pt("/api/roadmap/scan"),{method:"POST"})}function By(l){return nt(pt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function fn(l,u=[],d){const o=(d==null?void 0:d.enabled)??!0,[m,f]=V.useState(null),[v,N]=V.useState(!0),[b,y]=V.useState(null),w=V.useRef(l);w.current=l;const E=V.useRef(()=>{(async()=>{y(null);try{const D=await w.current();f(D)}catch(D){y(D instanceof Error?D:new Error("Unknown error"))}})()});return E.current=E.current.bind(E),V.useEffect(()=>{if(!o)return;let S=!1;return N(!0),y(null),(async()=>{try{const A=await w.current();S||f(A)}catch(A){S||y(A instanceof Error?A:new Error("Unknown error"))}finally{S||N(!1)}})(),()=>{S=!0}},[...u,o]),{data:m,loading:v,error:b,refetch:E.current}}const pg=l=>{let u;const d=new Set,o=(y,w)=>{const E=typeof y=="function"?y(u):y;if(!Object.is(E,u)){const S=u;u=w??(typeof E!="object"||E===null)?E:Object.assign({},u,E),d.forEach(D=>D(u,S))}},m=()=>u,N={setState:o,getState:m,getInitialState:()=>b,subscribe:y=>(d.add(y),()=>d.delete(y))},b=u=l(o,m,N);return N},vS=l=>l?pg(l):pg,bS=l=>l;function SS(l,u=bS){const d=ze.useSyncExternalStore(l.subscribe,()=>u(l.getState()),()=>u(l.getInitialState()));return ze.useDebugValue(d),d}const vg=l=>{const u=vS(l),d=o=>SS(u,o);return Object.assign(d,u),d},wS=l=>l?vg(l):vg,NS=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,na=wS((l,u)=>({projectName:"Night Watch",setProjectName:d=>l({projectName:d}),toasts:[],addToast:d=>{const o=Math.random().toString(36).substring(7);l(m=>({toasts:[...m.toasts,{...d,id:o}]})),setTimeout(()=>{l(m=>({toasts:m.toasts.filter(f=>f.id!==o)}))},5e3)},removeToast:d=>l(o=>({toasts:o.toasts.filter(m=>m.id!==d)})),status:null,setStatus:d=>l(o=>!o.status||new Date(d.timestamp)>new Date(o.status.timestamp)?{status:d}:o),globalModeLoading:!0,setGlobalModeLoading:d=>l({globalModeLoading:d}),isGlobalMode:!1,setGlobalMode:d=>{I1(d),l({isGlobalMode:d})},projects:[],setProjects:d=>l({projects:d}),selectedProjectId:NS,selectProject:d=>{yg(d),d?localStorage.setItem("nw-selected-project",d):localStorage.removeItem("nw-selected-project"),l(o=>{const m=o.projects.find(f=>f.name===d);return{selectedProjectId:d,...m?{projectName:m.name}:{}}})},removeProjectFromList:d=>{l(o=>{var N;const m=o.projects.filter(b=>b.name!==d),f=o.selectedProjectId===d,v=f?((N=m[0])==null?void 0:N.name)??null:o.selectedProjectId;return f&&(yg(v),v?localStorage.setItem("nw-selected-project",v):localStorage.removeItem("nw-selected-project")),{projects:m,selectedProjectId:v,...f&&m[0]?{projectName:m[0].name}:{}}})},getJobStates:()=>{const{status:d}=u(),o=d==null?void 0:d.config;return Ay.map(m=>({id:m.id,label:m.label,processName:m.processName,color:m.color,enabled:o?m.getEnabled(o):!0,schedule:o?m.getSchedule(o):"",triggerEndpoint:m.triggerEndpoint}))}})),jS=()=>{const[l,u]=V.useState(!1),{projectName:d,isGlobalMode:o,projects:m,selectedProjectId:f,selectProject:v,globalModeLoading:N}=na(),{data:b}=fn(zy,[f],{enabled:!N}),y=(b==null?void 0:b.length)??0,w=V.useMemo(()=>[{icon:S1,label:"Dashboard",path:"/",section:"Overview"},{icon:Y1,label:"Logs",path:"/logs"},{icon:E1,label:"Board",path:"/board",section:"Work"},{icon:x1,label:"Pull Requests",path:"/prs",badge:y},{icon:Cy,label:"Roadmap",path:"/roadmap"},{icon:Yf,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:q1,label:"Settings",path:"/settings",section:"Config"}],[y]);return s.jsxs("aside",{className:`
|
|
341
|
+
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
342
|
+
${l?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
343
|
+
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
344
|
+
`,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${l?"items-center justify-center flex":""}`,children:l?s.jsx("div",{className:"relative group",children:s.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:o?"Projects":"Workspace"}),o?s.jsxs("div",{className:"relative",children:[s.jsx(fg,{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:E=>v(E.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:m.filter(E=>E.valid).map(E=>s.jsx("option",{value:E.name,children:E.name},E.name))}),s.jsx(a1,{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(fg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:d})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:w.map(E=>s.jsxs(ze.Fragment,{children:[E.section&&!l&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:E.section}),s.jsx("li",{children:s.jsx(Sy,{to:E.path,className:({isActive:S})=>`
|
|
345
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
346
|
+
${S?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
|
|
347
|
+
${l?"justify-center":""}
|
|
348
|
+
`,children:({isActive:S})=>s.jsxs(s.Fragment,{children:[s.jsx(E.icon,{className:`h-5 w-5 transition-colors ${S?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${l?"":"mr-3.5"}`}),!l&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:E.label}),E.badge&&(l?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${S?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:E.badge})),S&&!l&&s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),l&&s.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:E.label})]})})})]},E.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>u(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(Jb,{className:"h-5 w-5"}):s.jsx(Ib,{className:"h-5 w-5"})})})]})},ES=()=>{const{projectName:l}=na();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(Q1,{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(Jc,{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(Yb,{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"})]})]})},TS=({toast:l,onDismiss:u})=>{const d={success:s.jsx(cu,{className:"h-5 w-5 text-green-400"}),error:s.jsx(ll,{className:"h-5 w-5 text-red-400"}),info:s.jsx(N1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(su,{className:"h-5 w-5 text-amber-400"})},o={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
|
|
349
|
+
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
350
|
+
bg-slate-900 border border-slate-800 border-l-4 ${o[l.type]}
|
|
351
|
+
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
352
|
+
animate-in slide-in-from-right-full fade-in duration-300
|
|
353
|
+
`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:d[l.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:l.title}),l.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:l.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>u(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(qr,{className:"h-5 w-5"})]})})]})})})},MS=()=>{const{toasts:l,removeToast:u}=na();return s.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:l.map(d=>s.jsx(TS,{toast:d,onDismiss:u},d.id))})};function CS(){const{setGlobalMode:l,setGlobalModeLoading:u,setProjects:d,selectProject:o,selectedProjectId:m}=na();V.useEffect(()=>{u(!0),J1().then(async({globalMode:f})=>{if(l(f),!f)return;const v=await ky();d(v);const N=v.filter(b=>b.valid);m&&N.some(b=>b.name===m)?o(m):N.length>0&&o(N[0].name)}).catch(()=>{l(!1)}).finally(()=>{u(!1)})},[])}function bg(l){if(!(l!=null&&l.timestamp))return Number.NEGATIVE_INFINITY;const u=new Date(l.timestamp).getTime();return Number.isNaN(u)?Number.NEGATIVE_INFINITY:u}function Lc(l,u){return l?u?bg(l)>=bg(u)?l:u:l:u}function OS(){const{setStatus:l,setProjectName:u,selectedProjectId:d,globalModeLoading:o,status:m}=na(),f=V.useRef(null);f.current=na.getState().status,hS(v=>{Lc(v,f.current)===v&&l(v)},[d,o],{enabled:!o}),V.useEffect(()=>{if(o)return;yf().then(N=>{Lc(N,f.current)===N&&l(N)}).catch(()=>{});const v=setInterval(()=>{yf().then(N=>{Lc(N,f.current)===N&&l(N)}).catch(()=>{})},3e4);return()=>clearInterval(v)},[d,o,l]),V.useEffect(()=>{const v=()=>{yf().then(N=>{Lc(N,f.current)===N&&l(N)}).catch(()=>{})};return window.addEventListener("focus",v),()=>window.removeEventListener("focus",v)},[d,l]),V.useEffect(()=>{m!=null&&m.projectName&&u(m.projectName)},[m==null?void 0:m.projectName,u])}const Ke=({children:l,className:u="",onClick:d})=>s.jsxs("div",{className:`
|
|
354
|
+
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
355
|
+
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
356
|
+
transition-all duration-300
|
|
357
|
+
${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
358
|
+
${u}
|
|
359
|
+
`,onClick:d,children:[d&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:l})]}),rt=({children:l,variant:u="primary",size:d="md",loading:o=!1,className:m="",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"},y={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[u]} ${y[d]} ${m}`,disabled:f||o,...v,children:[o&&s.jsx(My,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},_r=({children:l,variant:u="default",className:d=""})=>{const o={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${o[u]} ${d}`,children:l})},Yy={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"}},DS=({defaultColumn:l,onClose:u,onCreated:d})=>{const[o,m]=V.useState(""),[f,v]=V.useState(""),[N,b]=V.useState(l),[y,w]=V.useState(!1),[E,S]=V.useState(null),{addToast:D}=na(),A=async M=>{if(M.preventDefault(),!!o.trim()){w(!0),S(null);try{await oS({title:o.trim(),body:f,column:N}),D({title:"Issue created",message:`"${o.trim()}" added to ${N}`,type:"success"}),d(),u()}catch(Y){S(Y instanceof Error?Y.message:"Failed to create issue")}finally{w(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:u}),s.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),s.jsx("button",{onClick:u,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(qr,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:A,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=>m(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:Zl.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"})]}),E&&s.jsx("p",{className:"text-sm text-red-400",children:E}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(rt,{variant:"ghost",type:"button",onClick:u,children:"Cancel"}),s.jsx(rt,{type:"submit",disabled:y||!o.trim(),children:y?"Creating...":"Create Issue"})]})]})]})]})},RS=({issue:l,onClose:u,onMoved:d,onClosed:o})=>{const[m,f]=V.useState(!1),[v,N]=V.useState(!1),{addToast:b}=na(),y=async S=>{if(S!==l.column){f(!0);try{await Vy(l.number,S),b({title:"Issue moved",message:`#${l.number} moved to ${S}`,type:"success"}),d(),u()}catch(D){b({title:"Move failed",message:D instanceof Error?D.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},w=async()=>{if(confirm(`Close issue #${l.number}: "${l.title}"?`)){N(!0);try{await dS(l.number),b({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),o(),u()}catch(S){b({title:"Close failed",message:S instanceof Error?S.message:"Failed to close issue",type:"error"})}finally{N(!1)}}},E=l.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:u}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",l.number]}),s.jsx(_r,{variant:Yy[E].badge,children:E})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:l.title}),l.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",l.assignees.join(", ")]})]}),s.jsx("button",{onClick:u,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:s.jsx(qr,{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:"}),Zl.filter(S=>S!==l.column).map(S=>s.jsx("button",{onClick:()=>y(S),disabled:m,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:S},S))]}),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(Ty,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:w,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"})]})]}),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."})})]})]})},AS=({issue:l,onClick:u,onDragStart:d})=>{const[o,m]=V.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(l.number)),f.dataTransfer.effectAllowed="move",m(!0),d(l)},onDragEnd:()=>m(!1),children:s.jsxs(Ke,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${o?"opacity-30":""}`,onClick:u,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",l.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:l.title}),l.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:l.assignees.join(", ")})]})})},_S=({name:l,issues:u,draggingIssue:d,onIssueClick:o,onNewIssue:m,onMoveIssue:f,onDragStart:v})=>{const N=Yy[l],[b,y]=V.useState(!1),w=d!==null&&d.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${b&&w?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:E=>{w&&(E.preventDefault(),E.dataTransfer.dropEffect="move",y(!0))},onDragLeave:()=>y(!1),onDrop:E=>{E.preventDefault(),y(!1),d&&d.column!==l&&f(d,l)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${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:u.length})]}),s.jsx("button",{onClick:()=>m(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(Hr,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:u.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${b&&w?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:b&&w?"Drop here":"No issues"})}):u.map(E=>s.jsx(AS,{issue:E,onClick:()=>o(E),onDragStart:v},E.id))})]})},kS=()=>{const[l,u]=V.useState(null),[d,o]=V.useState(null),[m,f]=V.useState(null),[v,N]=V.useState(null),b=V.useRef(!1),{addToast:y,selectedProjectId:w,globalModeLoading:E}=na(),{data:S,loading:D,error:A,refetch:M}=fn(qy,[w],{enabled:!E});V.useEffect(()=>{const Q=setInterval(()=>{b.current||M()},3e4);return()=>clearInterval(Q)},[M]);const Y=V.useCallback(async(Q,G)=>{f(null);const ee=v??(S==null?void 0:S.columns);if(!ee)return;const le=ee,te={};for(const J of Zl)te[J]=(ee[J]??[]).filter(R=>R.number!==Q.number);const W={...Q,column:G};te[G]=[...te[G]??[],W],N(te),u(J=>(J==null?void 0:J.number)===Q.number?W:J),b.current=!0;try{await Vy(Q.number,G),M(),setTimeout(()=>{N(null),b.current=!1},800)}catch(J){N(le),u(R=>(R==null?void 0:R.number)===Q.number?Q:R),b.current=!1,y({title:"Move failed",message:J instanceof Error?J.message:"Failed to move issue",type:"error"})}},[y,M,v,S]);if(E||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(A&&A.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(A)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:A.message}),s.jsx(rt,{onClick:()=>M(),children:"Retry"})]});if(!S)return null;const X=v??S.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:[Zl.reduce((Q,G)=>{var ee;return Q+(((ee=X[G])==null?void 0:ee.length)??0)},0)," issues across ",Zl.length," columns"]})]}),s.jsxs(rt,{onClick:()=>o("Ready"),children:[s.jsx(Hr,{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:`${Zl.length*236}px`},children:Zl.map(Q=>s.jsx(_S,{name:Q,issues:X[Q]??[],draggingIssue:m,onIssueClick:u,onNewIssue:o,onMoveIssue:Y,onDragStart:f},Q))})}),l&&s.jsx(RS,{issue:l,onClose:()=>u(null),onMoved:()=>M(),onClosed:()=>M()}),d&&s.jsx(DS,{defaultColumn:d,onClose:()=>o(null),onCreated:()=>M()})]})},zS=[{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"}],US=({processes:l,activePrd:u,onCancelProcess:d,onForceClear:o,onViewLog:m,cancellingProcess:f,clearingLock:v,onTriggerJob:N,triggeringJob:b})=>{const y=E=>l.find(S=>S.name===E),w=(E,S)=>E.length<=S?E:E.slice(0,S-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:zS.map(E=>{const S=y(E.processName),D=(S==null?void 0:S.running)??!1,A=S==null?void 0:S.pid,M=f===E.cancelType,Y=D&&E.cancelType,X=!D&&E.name==="executor"&&u,Q=D?A?`PID: ${A}`:E.runningLabel:E.idleLabel,G=D&&E.name==="executor"&&u?w(u,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:E.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(Tf,{className:"h-3 w-3 flex-shrink-0"}),G]}):Q})]}),s.jsxs("div",{className:"flex-shrink-0",children:[Y&&s.jsx("button",{onClick:()=>E.cancelType&&d(E.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(gg,{className:"h-3.5 w-3.5"})}),X&&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(gg,{className:"h-3.5 w-3.5"})}),!Y&&!X&&D&&s.jsx("button",{onClick:m,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Tf,{className:"h-3.5 w-3.5"})}),!D&&!X&&s.jsx("button",{onClick:()=>N(E.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 ${E.displayName}`,children:b===E.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(kr,{className:"h-3.5 w-3.5"})})]})]},E.name)})})},LS={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"},HS=()=>{var U,ne;const l=Lf(),[u,d]=V.useState(null),[o,m]=V.useState(!1),[f,v]=V.useState(null),{setProjectName:N,addToast:b,selectedProjectId:y,globalModeLoading:w,status:E}=na(),{data:S}=fn(Ly,[y],{enabled:!w}),{data:D,loading:A}=fn(()=>qy().catch(()=>null),[y],{enabled:!w}),M=E;if(ze.useEffect(()=>{M!=null&&M.projectName&&N(M.projectName)},[M,N]),w)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 Y=M.prs.length,X=M.prs.filter(F=>F.reviewScore!==null&&F.reviewScore<70).length,Q=((U=D==null?void 0:D.columns.Ready)==null?void 0:U.length)??0,G=((ne=D==null?void 0:D.columns["In Progress"])==null?void 0:ne.length)??0;M.processes.find(F=>F.name==="executor"),M.processes.find(F=>F.name==="reviewer"),M.processes.find(F=>F.name==="qa"),M.processes.find(F=>F.name==="audit"),M.processes.find(F=>F.name==="planner"),M.processes.find(F=>F.name==="analytics");const ee=async F=>{d(F);try{const ce=await cS(F),ye=ce.results.every(me=>me.success);b({title:ye?"Process Cancelled":"Cancel Failed",message:ce.results.map(me=>me.message).join("; "),type:ye?"success":"error"})}catch(ce){b({title:"Cancel Failed",message:ce instanceof Error?ce.message:"Failed to cancel process",type:"error"})}finally{d(null)}},le=async()=>{m(!0);try{await fS(),b({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(F){b({title:"Clear Failed",message:F instanceof Error?F.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},te=async F=>{v(F);try{await{executor:aS,reviewer:Hy,qa:nS,audit:lS,planner:rS,analytics:sS}[F](),b({title:"Job Triggered",message:`${F[0].toUpperCase()+F.slice(1)} job has been queued.`,type:"success"})}catch(ce){b({title:"Trigger Failed",message:ce instanceof Error?ce.message:`Failed to trigger ${F}`,type:"error"})}finally{v(null)}},W=F=>{if(!F)return"Not scheduled";try{const ce=new Date(F),ye=new Date,me=ce.getTime()-ye.getTime(),B=Math.floor(me/6e4);return B<0?"Running now...":B<60?`in ${B} min`:B<1440?`in ${Math.floor(B/60)} hr${B>=120?"s":""}`:`in ${Math.floor(B/1440)} day${B>=2880?"s":""}`}catch{return"Unknown"}},R=(()=>{var ye,me,B;if(S!=null&&S.paused)return null;const F=[{agent:"Executor",nextRun:(S==null?void 0:S.executor.nextRun)??null},{agent:"Reviewer",nextRun:(S==null?void 0:S.reviewer.nextRun)??null},{agent:"QA",nextRun:((ye=S==null?void 0:S.qa)==null?void 0:ye.nextRun)??null},{agent:"Auditor",nextRun:((me=S==null?void 0:S.audit)==null?void 0:me.nextRun)??null},{agent:"Planner",nextRun:((B=S==null?void 0:S.planner)==null?void 0:B.nextRun)??null}];let ce=null;for(const ue of F)ue.nextRun&&(!ce||new Date(ue.nextRun)<new Date(ce.nextRun))&&(ce=ue);return ce?{agent:ce.agent,time:W(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(Ke,{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:Q})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(cu,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(Ke,{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(jy,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(Ke,{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:Y})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Gc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${X>0?"text-red-400 font-medium":"text-slate-500"}`,children:X>0?`${X} need work`:"All passing"})]}),s.jsxs(Ke,{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:S!=null&&S.paused?"Paused":M.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${S!=null&&S.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(Yf,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:S!=null&&S.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(Ke,{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(US,{processes:M.processes,activePrd:M.activePrd,onCancelProcess:ee,onForceClear:le,onViewLog:()=>l("/logs"),cancellingProcess:u,clearingLock:o,onTriggerJob:te,triggeringJob:f})]}),R&&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:R.agent}),s.jsx("span",{children:R.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(dg,{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(dg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(Ke,{className:"p-4",children:A?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:Zl.map(F=>{var ye;const ce=((ye=D.columns[F])==null?void 0:ye.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 ${LS[F]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:F}),s.jsx("span",{className:"text-xs font-bold",children:ce})]},F)})}):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."]})})]})]})},qS=()=>{const[l,u]=V.useState(!0),[d,o]=V.useState(""),[m,f]=V.useState("executor"),v=V.useRef(null),{selectedProjectId:N,globalModeLoading:b}=na(),y=na(Q=>Q.status),{data:w,loading:E,error:S,refetch:D}=fn(()=>eS(m,500),[m,N],{enabled:!b}),A=(w==null?void 0:w.lines)||[];V.useEffect(()=>{l&&v.current&&(v.current.scrollTop=v.current.scrollHeight)},[A,l]),V.useEffect(()=>{if(!l)return;const Q=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(Q)},[l,m,D]);const M=A.filter(Q=>Q.toLowerCase().includes(d.toLowerCase())),Y=Q=>{f(Q),o("")},X=Q=>{if(!(y!=null&&y.processes))return!1;const G=y.processes.find(ee=>ee.name===Q);return(G==null?void 0:G.running)??!1};return S?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(ll,{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:S.message}),s.jsx(rt,{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:d,onChange:Q=>o(Q.target.value)}),s.jsx(Jc,{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:Ry.map(({processName:Q,label:G})=>s.jsx("button",{onClick:()=>Y(Q),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m===Q?"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}),X(Q)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},Q))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(rt,{size:"sm",variant:"ghost",onClick:()=>D(),children:[s.jsx(hg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(rt,{size:"sm",variant:"ghost",onClick:()=>u(!l),children:[l?s.jsx(Oy,{className:"h-4 w-4 mr-2"}):s.jsx(kr,{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: ",m,".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:[E?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):M.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):M.map((Q,G)=>{const ee=Q.includes("[ERROR]"),le=Q.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${ee?"text-red-400":le?"text-amber-400":"text-slate-300"}`,children:[s.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:G+1}),Q]},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:()=>u(!0),children:[s.jsx(hg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},VS=()=>{const[l,u]=V.useState(null),[d,o]=V.useState(!1),[m,f]=V.useState("all"),[v,N]=V.useState("number"),[b,y]=V.useState("desc"),{addToast:w,selectedProjectId:E,globalModeLoading:S}=na(),{data:D,loading:A,error:M,refetch:Y}=fn(zy,[E],{enabled:!S}),X=D??[],Q=U=>{switch(U){case"pass":return s.jsx(cu,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(i1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(My,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(ll,{className:"h-4 w-4 text-slate-500"})}},G=U=>{switch(U){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=U=>U===null?"No review decision yet":U===100?"PR has been approved":U===0?"Changes have been requested":`Review score: ${U}`,le=V.useMemo(()=>X.filter(U=>{switch(m){case"needs-work":return U.ciStatus==="fail"||U.reviewScore===0;case"pending":return U.ciStatus==="pending"||U.ciStatus==="unknown"||U.reviewScore===null;case"passed":return U.ciStatus==="pass"&&U.reviewScore===100;case"all":default:return!0}}),[X,m]),te=V.useMemo(()=>[...le].sort((ne,F)=>{let ce=0;switch(v){case"number":ce=ne.number-F.number;break;case"title":ce=ne.title.localeCompare(F.title);break;case"branch":ce=ne.branch.localeCompare(F.branch);break;case"ciStatus":{const ye={fail:0,pending:1,unknown:2,pass:3};ce=(ye[ne.ciStatus]??2)-(ye[F.ciStatus]??2);break}case"reviewScore":{const ye=ne.reviewScore??-1,me=F.reviewScore??-1;ce=ye-me;break}}return b==="asc"?ce:-ce}),[le,v,b]),W=U=>{v===U?y(b==="asc"?"desc":"asc"):(N(U),y("desc"))},J=U=>v!==U?s.jsx(Hb,{className:"h-3 w-3 text-slate-600"}):b==="asc"?s.jsx(Vb,{className:"h-3 w-3 text-indigo-400"}):s.jsx(zb,{className:"h-3 w-3 text-indigo-400"});if(A)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(ll,{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(rt,{onClick:()=>Y(),children:"Retry"})]});const R=async()=>{o(!0);try{const U=await Hy();w({title:"Reviewer Started",message:U.pid?`Started with PID ${U.pid}`:"Reviewer started",type:"success"})}catch(U){w({title:"Reviewer Failed",message:U instanceof Error?U.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 ${m==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),s.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),s.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),s.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),s.jsxs(rt,{size:"sm",onClick:R,disabled:d,children:[s.jsx(Jc,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>W("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),J("number")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>W("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),J("branch")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>W("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),J("ciStatus")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>W("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),J("reviewScore")]})}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-800",children:[te.map(U=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>u(l===U.number?null:U.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:["#",U.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:U.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:U.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:G(U.ciStatus),children:[Q(U.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:U.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:U.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:ee(U.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${U.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${U.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${U.reviewScore>=70?"text-green-500":"text-red-500"}`,children:U.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:U.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:ne=>ne.stopPropagation(),children:s.jsx(Ty,{className:"h-4 w-4"})})})]},U.number)),te.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:X.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),l&&s.jsx(Ke,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const U=X.find(ne=>ne.number===l);return U?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:U.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:U.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:G(U.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:[Q(U.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:U.ciStatus})]})]}),U.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:ee(U.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${U.reviewScore>=70?"text-green-500":"text-red-500"}`,children:U.reviewScore})]})]})]}):null})()})]})},wa=ze.forwardRef(({className:l="",label:u,checked:d,onChange:o,...m},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:d,onChange:v,...m}),s.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),u&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:u})]})});wa.displayName="Switch";const BS=()=>{const{addToast:l,selectedProjectId:u,globalModeLoading:d}=na(),[o,m]=V.useState(!1),[f,v]=V.useState(!1),{data:N,loading:b,error:y,refetch:w}=fn(xS,[u],{enabled:!d});V.useEffect(()=>{if(!(N!=null&&N.enabled))return;const Q=setInterval(()=>{w()},1e4);return()=>clearInterval(Q)},[N==null?void 0:N.enabled,w]);const E=async Q=>{v(!0);try{await By(Q),l({title:Q?"Scanner Enabled":"Scanner Disabled",message:Q?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:Q?"success":"info"}),w()}catch(G){l({title:"Toggle Failed",message:G instanceof Error?G.message:"Failed to toggle scanner",type:"error"})}finally{v(!1)}},S=async()=>{m(!0);try{const Q=await pS();Q.created.length>0?l({title:"Scan Complete",message:`Created ${Q.created.length} PRD(s): ${Q.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),Q.errors.length>0&&l({title:"Scan Errors",message:Q.errors.join("; "),type:"warning"}),w()}catch(Q){l({title:"Scan Failed",message:Q instanceof Error?Q.message:"Failed to scan roadmap",type:"error"})}finally{m(!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(y)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(ll,{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:y.message}),s.jsx(rt,{onClick:()=>w(),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(Ke,{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(Cy,{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,A=$S(N.status),M=FS(N.items),Y=N.lastScan?GS(N.lastScan):"Never",X=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(wa,{label:N.enabled?"Enabled":"Disabled",checked:N.enabled,onChange:E,disabled:f}),s.jsxs(rt,{onClick:S,loading:o,disabled:!N.enabled||N.status==="complete",children:[s.jsx(kr,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(Ke,{className:`p-6 border-2 ${A.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(A.icon,{className:`h-8 w-8 ${A.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 ${A.textColor}`,children:A.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:Y})]}),N.enabled&&N.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",X," min"]})]}),N.enabled&&N.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(Ke,{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(([Q,G])=>s.jsxs(Ke,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:Q}),s.jsx("div",{className:"space-y-2",children:G.map(ee=>s.jsx(YS,{item:ee},ee.hash))})]},Q))]})};function YS({item:l}){const u=l.checked,d=l.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${u?"bg-slate-950/30 border-slate-800/50":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[u?s.jsx(O1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(cu,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Tf,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${u?"line-through text-slate-600":"text-slate-200"}`,children:l.title}),l.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:l.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:u?s.jsx(_r,{variant:"neutral",children:"Skipped"}):d?s.jsx(_r,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(_r,{variant:"warning",children:"Pending"})})]})}function $S(l){switch(l){case"complete":return{label:"Complete",icon:cu,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Gc,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:kr,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:ll,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:ll,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function FS(l){const u={};for(const d of l){const o=d.section||"General";u[o]||(u[o]=[]),u[o].push(d)}return u}function GS(l){try{const u=new Date(l),o=new Date().getTime()-u.getTime(),m=Math.floor(o/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const f=Math.floor(m/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const $y=({tabs:l,activeTab:u,onChange:d,className:o=""})=>{var b,y;const[m,f]=ze.useState((b=l[0])==null?void 0:b.id),v=u||m,N=w=>{d?d(w):f(w)};return s.jsxs("div",{className:`flex flex-col ${o}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:l.map(w=>s.jsx("button",{onClick:()=>N(w.id),className:`
|
|
360
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
361
|
+
${v===w.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
362
|
+
`,children:w.label},w.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(y=l.find(w=>w.id===v))==null?void 0:y.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"}],Qf=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am"}}];function zr(l){return l?l.trim().replace(/\s+/g," "):""}function Rr(l,u){return zr(l)===zr(u)}function ZS(l){if(l)return Qf.find(u=>u.id===l)}function Fy(l,u,d,o,m,f){return Rr(l.schedules.executor,u)&&Rr(l.schedules.reviewer,d)&&Rr(l.schedules.qa,o)&&Rr(l.schedules.audit,m)&&Rr(l.schedules.slicer,f)}function PS(l,u,d,o,m){return Qf.find(f=>Fy(f,l,u,d,o,m))}function au(l,u,d,o,m,f){const v=ZS(l);return v&&Fy(v,u,d,o,m,f)?v:PS(u,d,o,m,f)}function Sg(l){const u=zr(l),d=u.split(/\s+/);if(d.length!==5)return u;const[o,m,f,v,N]=d,b=/^\d+$/.test(o),y=Qc.find(w=>zr(w.value)===u);if(y)return y.label;if(o==="*/30"&&m==="*")return"Every 30 minutes";if(o==="0"&&m==="*")return"Every hour";if(o.startsWith("*/"))return`Every ${parseInt(o.replace("*/",""),10)} minutes`;if(b&&m.startsWith("*/")&&f==="*"&&v==="*"&&N==="*"){const w=parseInt(m.replace("*/",""),10);return o==="0"?`Every ${w} hours`:`Every ${w} hours at :${o.padStart(2,"0")}`}if(o==="0"&&m.startsWith("*/"))return`Every ${parseInt(m.replace("*/",""),10)} hours`;if(o==="0"&&m.includes("-")){const[w,E]=m.split("-");return`Every hour from ${Fi(w)} to ${Fi(E)}`}if(b&&m.includes("-")&&f==="*"&&v==="*"&&N==="*"){const[w,E]=m.split("-");return`Every hour from ${Gi(w,o)} to ${Gi(E,o)}`}if(o==="0"&&m.includes(",")){const w=m.split(",").map(Fi);return w.length<=3?`At ${w.join(" and ")}`:`At ${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}if(b&&m.includes(",")&&f==="*"&&v==="*"&&(N==="*"||N==="1-5")){const w=m.split(",").map(S=>Gi(S,o)),E=N==="1-5"?"Weekdays at ":"At ";return w.length<=3?`${E}${w.join(" and ")}`:`${E}${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}return o==="0"&&m!=="*"&&f==="*"&&v==="*"&&N==="*"?`Daily at ${Fi(m)}`:b&&m!=="*"&&f==="*"&&v==="*"&&N==="*"?`Daily at ${Gi(m,o)}`:o==="0"&&m!=="*"&&f==="*"&&v==="*"&&N==="1-5"?`Weekdays at ${Fi(m)}`:b&&m!=="*"&&f==="*"&&v==="*"&&N==="1-5"?`Weekdays at ${Gi(m,o)}`:u}function Fi(l){const u=parseInt(l,10);return u===0?"12 AM":u<12?`${u} AM`:u===12?"12 PM":`${u-12} PM`}function Gi(l,u){const d=u.padStart(2,"0"),o=parseInt(l,10);return Number.isNaN(o)?`${l}:${d}`:o===0?`12:${d} AM`:o<12?`${o}:${d} AM`:o===12?`12:${d} PM`:`${o-12}:${d} PM`}function QS(l){const u=zr(l),d=Qc.find(o=>zr(o.value)===u);return(d==null?void 0:d.value)??"__custom__"}function WS(l){const u=new Date,d=l.getTime()-u.getTime(),o=Math.floor(d/6e4),m=Math.floor(o/60),f=Math.floor(m/24);return o<1?"less than a minute":o<60?`in ${o} minute${o>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${f} day${f>1?"s":""}`}function IS(l){const u={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",u)}function XS(l){const u=new Date,d=l.getTime()-u.getTime(),o=Math.floor(d/6e4);return o>=0&&o<30}const Fe=ze.forwardRef(({className:l="",label:u,error:d,helperText:o,rightIcon:m,...f},v)=>{const N=ze.useId(),b=f.id??N,y=d?`${b}-error`:void 0,w=!d&&o?`${b}-help`:void 0,E=[y,w].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[u&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:v,id:b,"aria-describedby":E,"aria-invalid":d?!0:f["aria-invalid"],className:`
|
|
363
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
364
|
+
px-3 py-2 text-sm text-slate-200
|
|
365
|
+
placeholder:text-slate-600
|
|
366
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
367
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
368
|
+
transition-all duration-200
|
|
369
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
370
|
+
${m?"pr-10":""}
|
|
371
|
+
${l}
|
|
372
|
+
`,...f}),m&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:m})]}),d?s.jsx("p",{id:y,className:"mt-1.5 text-xs text-red-400",children:d}):o?s.jsx("p",{id:w,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});Fe.displayName="Input";const ia=ze.forwardRef(({className:l="",label:u,error:d,helperText:o,options:m,value:f,onChange:v,children:N,...b},y)=>{const w=ze.useId(),E=b.id??w,S=d?`${E}-error`:void 0,D=!d&&o?`${E}-help`:void 0,A=[S,D].filter(Boolean).join(" ")||void 0,M=Y=>{v&&v(Y.target.value)};return s.jsxs("div",{className:"w-full",children:[u&&s.jsx("label",{htmlFor:E,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:y,id:E,"aria-describedby":A,"aria-invalid":d?!0:b["aria-invalid"],className:`
|
|
373
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
374
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
375
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
376
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
377
|
+
transition-all duration-200
|
|
378
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
379
|
+
${l}
|
|
380
|
+
`,value:f,onChange:M,...b,children:m?m.map(Y=>s.jsx("option",{value:Y.value,children:Y.label},Y.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(Ey,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:S,className:"mt-1.5 text-xs text-red-400",children:d}):o?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});ia.displayName="Select";const Mn=({label:l,value:u,onChange:d,helperText:o,placeholder:m="5 */3 * * *"})=>{const f=QS(u),v=f==="__custom__",N=w=>{w!=="__custom__"&&d(w)},b=w=>{d(w.target.value)},y=Qc.find(w=>w.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(ia,{label:l,value:f,onChange:N,options:Qc.map(w=>({label:w.label,value:w.value})),helperText:v?void 0:(y==null?void 0:y.description)||o}),v&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(Fe,{label:"Cron Expression",value:u,onChange:b,placeholder:m}),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 Ds={},Ra={},Zi={},Rs={},xf={},wg;function JS(){return wg||(wg=1,Object.defineProperty(xf,"__esModule",{value:!0})),xf}var Pi={},Qi={},Ng;function Ls(){var u,d,o,m,f,Gy,N;if(Ng)return Qi;Ng=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronField=void 0;let l=(N=class{constructor(y,w={rawValue:""}){st(this,f);st(this,u,!1);st(this,d,!1);st(this,o,!1);st(this,m,[]);P0(this,"options",{rawValue:""});if(!Array.isArray(y))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(y.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...w,rawValue:w.rawValue??""},Te(this,m,y.sort(N.sorter)),Te(this,o,this.options.wildcard!==void 0?this.options.wildcard:Ne(this,f,Gy).call(this)),Te(this,u,this.options.rawValue.includes("L")||y.includes("L")),Te(this,d,this.options.rawValue.includes("?")||y.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 K(this,u)}get hasQuestionMarkChar(){return K(this,d)}get isWildcard(){return K(this,o)}get values(){return K(this,m)}static sorter(y,w){const E=typeof y=="number",S=typeof w=="number";return E&&S?y-w:!E&&!S?y.localeCompare(w):E?-1:1}static findNearestValueInList(y,w,E=!1){if(E){for(let S=y.length-1;S>=0;S--)if(y[S]<w)return y[S];return null}for(let S=0;S<y.length;S++)if(y[S]>w)return y[S];return null}findNearestValue(y,w=!1){return this.constructor.findNearestValueInList(this.values,y,w)}serialize(){return{wildcard:K(this,o),values:K(this,m)}}validate(){let y;const w=this.chars.length>0?` or chars ${this.chars.join("")}`:"",E=M=>Y=>new RegExp(`^\\d{0,2}${Y}$`).test(M),S=M=>(y=M,typeof M=="number"?M>=this.min&&M<=this.max:this.chars.some(E(M)));if(!K(this,m).every(S))throw new Error(`${this.constructor.name} Validation error, got value ${y} expected range ${this.min}-${this.max}${w}`);const A=K(this,m).find((M,Y)=>K(this,m).indexOf(M)!==Y);if(A)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${A}`)}},u=new WeakMap,d=new WeakMap,o=new WeakMap,m=new WeakMap,f=new WeakSet,Gy=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(y,w)=>w+this.min).every(y=>K(this,m).includes(y))},N);return Qi.CronField=l,Qi}var jg;function KS(){if(jg)return Pi;jg=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.CronDayOfMonth=void 0;const l=Ls(),u=1,d=31,o=Object.freeze(["L"]);let m=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Pi.CronDayOfMonth=m,Pi}var Wi={},Eg;function e2(){if(Eg)return Wi;Eg=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronDayOfWeek=void 0;const l=Ls(),u=0,d=7,o=Object.freeze(["L"]);let m=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Wi.CronDayOfWeek=m,Wi}var Ii={},Tg;function t2(){if(Tg)return Ii;Tg=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronHour=void 0;const l=Ls(),u=0,d=23,o=Object.freeze([]);let m=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Ii.CronHour=m,Ii}var Xi={},Mg;function a2(){if(Mg)return Xi;Mg=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronMinute=void 0;const l=Ls(),u=0,d=59,o=Object.freeze([]);let m=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Xi.CronMinute=m,Xi}var Ji={},pf={},Sa={},Cg;function n2(){if(Cg)return Sa;Cg=1,Object.defineProperty(Sa,"__esModule",{value:!0});class l extends Error{}class u extends l{constructor(r){super(`Invalid DateTime: ${r.toMessage()}`)}}class d extends l{constructor(r){super(`Invalid Interval: ${r.toMessage()}`)}}class o extends l{constructor(r){super(`Invalid Duration: ${r.toMessage()}`)}}class m extends l{}class f extends l{constructor(r){super(`Invalid unit ${r}`)}}class v extends l{}class N extends l{constructor(){super("Zone is an abstract class")}}const b="numeric",y="short",w="long",E={year:b,month:b,day:b},S={year:b,month:y,day:b},D={year:b,month:y,day:b,weekday:y},A={year:b,month:w,day:b},M={year:b,month:w,day:b,weekday:w},Y={hour:b,minute:b},X={hour:b,minute:b,second:b},Q={hour:b,minute:b,second:b,timeZoneName:y},G={hour:b,minute:b,second:b,timeZoneName:w},ee={hour:b,minute:b,hourCycle:"h23"},le={hour:b,minute:b,second:b,hourCycle:"h23"},te={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:y},W={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:w},J={year:b,month:b,day:b,hour:b,minute:b},R={year:b,month:b,day:b,hour:b,minute:b,second:b},U={year:b,month:y,day:b,hour:b,minute:b},ne={year:b,month:y,day:b,hour:b,minute:b,second:b},F={year:b,month:y,day:b,weekday:y,hour:b,minute:b},ce={year:b,month:w,day:b,hour:b,minute:b,timeZoneName:y},ye={year:b,month:w,day:b,hour:b,minute:b,second:b,timeZoneName:y},me={year:b,month:w,day:b,weekday:w,hour:b,minute:b,timeZoneName:w},B={year:b,month:w,day:b,weekday:w,hour:b,minute:b,second:b,timeZoneName:w};class ue{get type(){throw new N}get name(){throw new N}get ianaName(){return this.name}get isUniversal(){throw new N}offsetName(r,h){throw new N}formatOffset(r,h){throw new N}offset(r){throw new N}equals(r){throw new N}get isValid(){throw new N}}let se=null;class Me extends ue{static get instance(){return se===null&&(se=new Me),se}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(r,{format:h,locale:p}){return kn(r,h,p)}formatOffset(r,h){return es(this.offset(r),h)}offset(r){return-new Date(r).getTimezoneOffset()}equals(r){return r.type==="system"}get isValid(){return!0}}const qe=new Map;function _(g){let r=qe.get(g);return r===void 0&&(r=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"}),qe.set(g,r)),r}const re={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ge(g,r){const h=g.format(r).replace(/\u200E/g,""),p=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(h),[,j,C,k,z,q,he,be]=p;return[k,j,C,z,q,he,be]}function pe(g,r){const h=g.formatToParts(r),p=[];for(let j=0;j<h.length;j++){const{type:C,value:k}=h[j],z=re[C];C==="era"?p[z]=k:Oe(z)||(p[z]=parseInt(k,10))}return p}const De=new Map;class Ee extends ue{static create(r){let h=De.get(r);return h===void 0&&De.set(r,h=new Ee(r)),h}static resetCache(){De.clear(),qe.clear()}static isValidSpecifier(r){return this.isValidZone(r)}static isValidZone(r){if(!r)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:r}).format(),!0}catch{return!1}}constructor(r){super(),this.zoneName=r,this.valid=Ee.isValidZone(r)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(r,{format:h,locale:p}){return kn(r,h,p,this.name)}formatOffset(r,h){return es(this.offset(r),h)}offset(r){if(!this.valid)return NaN;const h=new Date(r);if(isNaN(h))return NaN;const p=_(this.name);let[j,C,k,z,q,he,be]=p.formatToParts?pe(p,h):ge(p,h);z==="BC"&&(j=-Math.abs(j)+1);const Qe=Zt({year:j,month:C,day:k,hour:q===24?0:q,minute:he,second:be,millisecond:0});let Re=+h;const Nt=Re%1e3;return Re-=Nt>=0?Nt:1e3+Nt,(Qe-Re)/(60*1e3)}equals(r){return r.type==="iana"&&r.name===this.name}get isValid(){return this.valid}}let Ue={};function ke(g,r={}){const h=JSON.stringify([g,r]);let p=Ue[h];return p||(p=new Intl.ListFormat(g,r),Ue[h]=p),p}const et=new Map;function Ft(g,r={}){const h=JSON.stringify([g,r]);let p=et.get(h);return p===void 0&&(p=new Intl.DateTimeFormat(g,r),et.set(h,p)),p}const Na=new Map;function Qa(g,r={}){const h=JSON.stringify([g,r]);let p=Na.get(h);return p===void 0&&(p=new Intl.NumberFormat(g,r),Na.set(h,p)),p}const Wa=new Map;function ua(g,r={}){const{base:h,...p}=r,j=JSON.stringify([g,p]);let C=Wa.get(j);return C===void 0&&(C=new Intl.RelativeTimeFormat(g,r),Wa.set(j,C)),C}let ca=null;function Ia(){return ca||(ca=new Intl.DateTimeFormat().resolvedOptions().locale,ca)}const hn=new Map;function la(g){let r=hn.get(g);return r===void 0&&(r=new Intl.DateTimeFormat(g).resolvedOptions(),hn.set(g,r)),r}const ka=new Map;function mn(g){let r=ka.get(g);if(!r){const h=new Intl.Locale(g);r="getWeekInfo"in h?h.getWeekInfo():h.weekInfo,"minimalDays"in r||(r={...ve,...r}),ka.set(g,r)}return r}function gn(g){const r=g.indexOf("-x-");r!==-1&&(g=g.substring(0,r));const h=g.indexOf("-u-");if(h===-1)return[g];{let p,j;try{p=Ft(g).resolvedOptions(),j=g}catch{const q=g.substring(0,h);p=Ft(q).resolvedOptions(),j=q}const{numberingSystem:C,calendar:k}=p;return[j,C,k]}}function sl(g,r,h){return(h||r)&&(g.includes("-u-")||(g+="-u"),h&&(g+=`-ca-${h}`),r&&(g+=`-nu-${r}`)),g}function rl(g){const r=[];for(let h=1;h<=12;h++){const p=je.utc(2009,h,1);r.push(g(p))}return r}function At(g){const r=[];for(let h=1;h<=7;h++){const p=je.utc(2016,11,13+h);r.push(g(p))}return r}function Xa(g,r,h,p){const j=g.listingMode();return j==="error"?null:j==="en"?h(r):p(r)}function On(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||la(g.locale).numberingSystem==="latn"}class Dn{constructor(r,h,p){this.padTo=p.padTo||0,this.floor=p.floor||!1;const{padTo:j,floor:C,...k}=p;if(!h||Object.keys(k).length>0){const z={useGrouping:!1,...p};p.padTo>0&&(z.minimumIntegerDigits=p.padTo),this.inf=Qa(r,z)}}format(r){if(this.inf){const h=this.floor?Math.floor(r):r;return this.inf.format(h)}else{const h=this.floor?Math.floor(r):Xl(r,3);return it(h,this.padTo)}}}class L{constructor(r,h,p){this.opts=p,this.originalZone=void 0;let j;if(this.opts.timeZone)this.dt=r;else if(r.zone.type==="fixed"){const k=-1*(r.offset/60),z=k>=0?`Etc/GMT+${k}`:`Etc/GMT${k}`;r.offset!==0&&Ee.create(z).valid?(j=z,this.dt=r):(j="UTC",this.dt=r.offset===0?r:r.setZone("UTC").plus({minutes:r.offset}),this.originalZone=r.zone)}else r.zone.type==="system"?this.dt=r:r.zone.type==="iana"?(this.dt=r,j=r.zone.name):(j="UTC",this.dt=r.setZone("UTC").plus({minutes:r.offset}),this.originalZone=r.zone);const C={...this.opts};C.timeZone=C.timeZone||j,this.dtf=Ft(h,C)}format(){return this.originalZone?this.formatToParts().map(({value:r})=>r).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const r=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?r.map(h=>{if(h.type==="timeZoneName"){const p=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...h,value:p}}else return h}):r}resolvedOptions(){return this.dtf.resolvedOptions()}}class fe{constructor(r,h,p){this.opts={style:"long",...p},!h&&$r()&&(this.rtf=ua(r,p))}format(r,h){return this.rtf?this.rtf.format(r,h):bn(h,r,this.opts.numeric,this.opts.style!=="long")}formatToParts(r,h){return this.rtf?this.rtf.formatToParts(r,h):[]}}const ve={firstDay:1,minimalDays:4,weekend:[6,7]};class xe{static fromOpts(r){return xe.create(r.locale,r.numberingSystem,r.outputCalendar,r.weekSettings,r.defaultToEN)}static create(r,h,p,j,C=!1){const k=r||xt.defaultLocale,z=k||(C?"en-US":Ia()),q=h||xt.defaultNumberingSystem,he=p||xt.defaultOutputCalendar,be=Fr(j)||xt.defaultWeekSettings;return new xe(z,q,he,be,k)}static resetCache(){ca=null,et.clear(),Na.clear(),Wa.clear(),hn.clear(),ka.clear()}static fromObject({locale:r,numberingSystem:h,outputCalendar:p,weekSettings:j}={}){return xe.create(r,h,p,j)}constructor(r,h,p,j,C){const[k,z,q]=gn(r);this.locale=k,this.numberingSystem=h||z||null,this.outputCalendar=p||q||null,this.weekSettings=j,this.intl=sl(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=C,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=On(this)),this.fastNumbersCached}listingMode(){const r=this.isEnglish(),h=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return r&&h?"en":"intl"}clone(r){return!r||Object.getOwnPropertyNames(r).length===0?this:xe.create(r.locale||this.specifiedLocale,r.numberingSystem||this.numberingSystem,r.outputCalendar||this.outputCalendar,Fr(r.weekSettings)||this.weekSettings,r.defaultToEN||!1)}redefaultToEN(r={}){return this.clone({...r,defaultToEN:!0})}redefaultToSystem(r={}){return this.clone({...r,defaultToEN:!1})}months(r,h=!1){return Xa(this,r,vu,()=>{const p=this.intl==="ja"||this.intl.startsWith("ja-");h&=!p;const j=h?{month:r,day:"numeric"}:{month:r},C=h?"format":"standalone";if(!this.monthsCache[C][r]){const k=p?z=>this.dtFormatter(z,j).format():z=>this.extract(z,j,"month");this.monthsCache[C][r]=rl(k)}return this.monthsCache[C][r]})}weekdays(r,h=!1){return Xa(this,r,Qs,()=>{const p=h?{weekday:r,year:"numeric",month:"long",day:"numeric"}:{weekday:r},j=h?"format":"standalone";return this.weekdaysCache[j][r]||(this.weekdaysCache[j][r]=At(C=>this.extract(C,p,"weekday"))),this.weekdaysCache[j][r]})}meridiems(){return Xa(this,void 0,()=>zn,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[je.utc(2016,11,13,9),je.utc(2016,11,13,19)].map(h=>this.extract(h,r,"dayperiod"))}return this.meridiemCache})}eras(r){return Xa(this,r,Wr,()=>{const h={era:r};return this.eraCache[r]||(this.eraCache[r]=[je.utc(-40,1,1),je.utc(2017,1,1)].map(p=>this.extract(p,h,"era"))),this.eraCache[r]})}extract(r,h,p){const j=this.dtFormatter(r,h),C=j.formatToParts(),k=C.find(z=>z.type.toLowerCase()===p);return k?k.value:null}numberFormatter(r={}){return new Dn(this.intl,r.forceSimple||this.fastNumbers,r)}dtFormatter(r,h={}){return new L(r,this.intl,h)}relFormatter(r={}){return new fe(this.intl,this.isEnglish(),r)}listFormatter(r={}){return ke(this.intl,r)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||la(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:pn()?mn(this.locale):ve}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(r){return this.locale===r.locale&&this.numberingSystem===r.numberingSystem&&this.outputCalendar===r.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Ye=null;class $e extends ue{static get utcInstance(){return Ye===null&&(Ye=new $e(0)),Ye}static instance(r){return r===0?$e.utcInstance:new $e(r)}static parseSpecifier(r){if(r){const h=r.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(h)return new $e(Kl(h[1],h[2]))}return null}constructor(r){super(),this.fixed=r}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${es(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${es(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(r,h){return es(this.fixed,h)}get isUniversal(){return!0}offset(){return this.fixed}equals(r){return r.type==="fixed"&&r.fixed===this.fixed}get isValid(){return!0}}class dt extends ue{constructor(r){super(),this.zoneName=r}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Xe(g,r){if(Oe(g)||g===null)return r;if(g instanceof ue)return g;if(_t(g)){const h=g.toLowerCase();return h==="default"?r:h==="local"||h==="system"?Me.instance:h==="utc"||h==="gmt"?$e.utcInstance:$e.parseSpecifier(h)||Ee.create(g)}else return da(g)?$e.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new dt(g)}const gt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},yn={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]},Hs=gt.hanidec.replace(/[\[|\]]/g,"").split("");function to(g){let r=parseInt(g,10);if(isNaN(r)){r="";for(let h=0;h<g.length;h++){const p=g.charCodeAt(h);if(g[h].search(gt.hanidec)!==-1)r+=Hs.indexOf(g[h]);else for(const j in yn){const[C,k]=yn[j];p>=C&&p<=k&&(r+=p-C)}}return parseInt(r,10)}else return r}const il=new Map;function qs(){il.clear()}function Jt({numberingSystem:g},r=""){const h=g||"latn";let p=il.get(h);p===void 0&&(p=new Map,il.set(h,p));let j=p.get(r);return j===void 0&&(j=new RegExp(`${gt[h]}${r}`),p.set(r,j)),j}let xn=()=>Date.now(),Ql="system",ul=null,ou=null,Vr=null,Vs=60,cl,du=null;class xt{static get now(){return xn}static set now(r){xn=r}static set defaultZone(r){Ql=r}static get defaultZone(){return Xe(Ql,Me.instance)}static get defaultLocale(){return ul}static set defaultLocale(r){ul=r}static get defaultNumberingSystem(){return ou}static set defaultNumberingSystem(r){ou=r}static get defaultOutputCalendar(){return Vr}static set defaultOutputCalendar(r){Vr=r}static get defaultWeekSettings(){return du}static set defaultWeekSettings(r){du=Fr(r)}static get twoDigitCutoffYear(){return Vs}static set twoDigitCutoffYear(r){Vs=r%100}static get throwOnInvalid(){return cl}static set throwOnInvalid(r){cl=r}static resetCaches(){xe.resetCache(),Ee.resetCache(),je.resetCache(),qs()}}class oa{constructor(r,h){this.reason=r,this.explanation=h}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Br=[0,31,59,90,120,151,181,212,243,273,304,334],Bs=[0,31,60,91,121,152,182,213,244,274,305,335];function Kt(g,r){return new oa("unit out of range",`you specified ${r} (of type ${typeof r}) as a ${g}, which is invalid`)}function Ys(g,r,h){const p=new Date(Date.UTC(g,r-1,h));g<100&&g>=0&&p.setUTCFullYear(p.getUTCFullYear()-1900);const j=p.getUTCDay();return j===0?7:j}function Yr(g,r,h){return h+(dl(g)?Bs:Br)[r-1]}function Ja(g,r){const h=dl(g)?Bs:Br,p=h.findIndex(C=>C<r),j=r-h[p];return{month:p+1,day:j}}function Tt(g,r){return(g-r+7)%7+1}function Ht(g,r=4,h=1){const{year:p,month:j,day:C}=g,k=Yr(p,j,C),z=Tt(Ys(p,j,C),h);let q=Math.floor((k-z+14-r)/7),he;return q<1?(he=p-1,q=fl(he,r,h)):q>fl(p,r,h)?(he=p+1,q=1):he=p,{weekYear:he,weekNumber:q,weekday:z,...ts(g)}}function Rn(g,r=4,h=1){const{weekYear:p,weekNumber:j,weekday:C}=g,k=Tt(Ys(p,1,r),h),z=en(p);let q=j*7+C-k-7+r,he;q<1?(he=p-1,q+=en(he)):q>z?(he=p+1,q-=en(p)):he=p;const{month:be,day:Le}=Ja(he,q);return{year:he,month:be,day:Le,...ts(g)}}function Wl(g){const{year:r,month:h,day:p}=g,j=Yr(r,h,p);return{year:r,ordinal:j,...ts(g)}}function fu(g){const{year:r,ordinal:h}=g,{month:p,day:j}=Ja(r,h);return{year:r,month:p,day:j,...ts(g)}}function hu(g,r){if(!Oe(g.localWeekday)||!Oe(g.localWeekNumber)||!Oe(g.localWeekYear)){if(!Oe(g.weekday)||!Oe(g.weekNumber)||!Oe(g.weekYear))throw new m("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:r.getMinDaysInFirstWeek(),startOfWeek:r.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function mu(g,r=4,h=1){const p=Ka(g.weekYear),j=Gt(g.weekNumber,1,fl(g.weekYear,r,h)),C=Gt(g.weekday,1,7);return p?j?C?!1:Kt("weekday",g.weekday):Kt("week",g.weekNumber):Kt("weekYear",g.weekYear)}function Il(g){const r=Ka(g.year),h=Gt(g.ordinal,1,en(g.year));return r?h?!1:Kt("ordinal",g.ordinal):Kt("year",g.year)}function $s(g){const r=Ka(g.year),h=Gt(g.month,1,12),p=Gt(g.day,1,Gs(g.year,g.month));return r?h?p?!1:Kt("day",g.day):Kt("month",g.month):Kt("year",g.year)}function An(g){const{hour:r,minute:h,second:p,millisecond:j}=g,C=Gt(r,0,23)||r===24&&h===0&&p===0&&j===0,k=Gt(h,0,59),z=Gt(p,0,59),q=Gt(j,0,999);return C?k?z?q?!1:Kt("millisecond",j):Kt("second",p):Kt("minute",h):Kt("hour",r)}function Oe(g){return typeof g>"u"}function da(g){return typeof g=="number"}function Ka(g){return typeof g=="number"&&g%1===0}function _t(g){return typeof g=="string"}function gu(g){return Object.prototype.toString.call(g)==="[object Date]"}function $r(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function pn(){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,r,h){if(g.length!==0)return g.reduce((p,j)=>{const C=[r(j),j];return p&&h(p[0],C[0])===p[0]?p:C},null)[1]}function xu(g,r){return r.reduce((h,p)=>(h[p]=g[p],h),{})}function _n(g,r){return Object.prototype.hasOwnProperty.call(g,r)}function Fr(g){if(g==null)return null;if(typeof g!="object")throw new v("Week settings must be an object");if(!Gt(g.firstDay,1,7)||!Gt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(r=>!Gt(r,1,7)))throw new v("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Gt(g,r,h){return Ka(g)&&g>=r&&g<=h}function Fs(g,r){return g-r*Math.floor(g/r)}function it(g,r=2){const h=g<0;let p;return h?p="-"+(""+-g).padStart(r,"0"):p=(""+g).padStart(r,"0"),p}function Mt(g){if(!(Oe(g)||g===null||g===""))return parseInt(g,10)}function vn(g){if(!(Oe(g)||g===null||g===""))return parseFloat(g)}function Gr(g){if(!(Oe(g)||g===null||g==="")){const r=parseFloat("0."+g)*1e3;return Math.floor(r)}}function Xl(g,r,h="round"){const p=10**r;switch(h){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 ${h} is out of range`)}}function dl(g){return g%4===0&&(g%100!==0||g%400===0)}function en(g){return dl(g)?366:365}function Gs(g,r){const h=Fs(r-1,12)+1,p=g+(r-h)/12;return h===2?dl(p)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][h-1]}function Zt(g){let r=Date.UTC(g.year,g.month-1,g.day,g.hour,g.minute,g.second,g.millisecond);return g.year<100&&g.year>=0&&(r=new Date(r),r.setUTCFullYear(g.year,g.month-1,g.day)),+r}function Zs(g,r,h){return-Tt(Ys(g,1,r),h)+r-1}function fl(g,r=4,h=1){const p=Zs(g,r,h),j=Zs(g+1,r,h);return(en(g)-p+j)/7}function Jl(g){return g>99?g:g>xt.twoDigitCutoffYear?1900+g:2e3+g}function kn(g,r,h,p=null){const j=new Date(g),C={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};p&&(C.timeZone=p);const k={timeZoneName:r,...C},z=new Intl.DateTimeFormat(h,k).formatToParts(j).find(q=>q.type.toLowerCase()==="timezonename");return z?z.value:null}function Kl(g,r){let h=parseInt(g,10);Number.isNaN(h)&&(h=0);const p=parseInt(r,10)||0,j=h<0||Object.is(h,-0)?-p:p;return h*60+j}function Zr(g){const r=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(r))throw new v(`Invalid unit value ${g}`);return r}function tn(g,r){const h={};for(const p in g)if(_n(g,p)){const j=g[p];if(j==null)continue;h[r(p)]=Zr(j)}return h}function es(g,r){const h=Math.trunc(Math.abs(g/60)),p=Math.trunc(Math.abs(g%60)),j=g>=0?"+":"-";switch(r){case"short":return`${j}${it(h,2)}:${it(p,2)}`;case"narrow":return`${j}${h}${p>0?`:${p}`:""}`;case"techie":return`${j}${it(h,2)}${it(p,2)}`;default:throw new RangeError(`Value format ${r} is out of range for property format`)}}function ts(g){return xu(g,["hour","minute","second","millisecond"])}const pu=["January","February","March","April","May","June","July","August","September","October","November","December"],Ps=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ao=["J","F","M","A","M","J","J","A","S","O","N","D"];function vu(g){switch(g){case"narrow":return[...ao];case"short":return[...Ps];case"long":return[...pu];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const as=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],za=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Pr=["M","T","W","T","F","S","S"];function Qs(g){switch(g){case"narrow":return[...Pr];case"short":return[...za];case"long":return[...as];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const zn=["AM","PM"],hl=["Before Christ","Anno Domini"],bu=["BC","AD"],Qr=["B","A"];function Wr(g){switch(g){case"narrow":return[...Qr];case"short":return[...bu];case"long":return[...hl];default:return null}}function ns(g){return zn[g.hour<12?0:1]}function an(g,r){return Qs(r)[g.weekday-1]}function Ir(g,r){return vu(r)[g.month-1]}function ls(g,r){return Wr(r)[g.year<0?0:1]}function bn(g,r,h="always",p=!1){const j={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},C=["hours","minutes","seconds"].indexOf(g)===-1;if(h==="auto"&&C){const Le=g==="days";switch(r){case 1:return Le?"tomorrow":`next ${j[g][0]}`;case-1:return Le?"yesterday":`last ${j[g][0]}`;case 0:return Le?"today":`this ${j[g][0]}`}}const k=Object.is(r,-0)||r<0,z=Math.abs(r),q=z===1,he=j[g],be=p?q?he[1]:he[2]||he[1]:q?j[g][0]:g;return k?`${z} ${be} ago`:`in ${z} ${be}`}function Ws(g,r){let h="";for(const p of g)p.literal?h+=p.val:h+=r(p.val);return h}const Is={D:E,DD:S,DDD:A,DDDD:M,t:Y,tt:X,ttt:Q,tttt:G,T:ee,TT:le,TTT:te,TTTT:W,f:J,ff:U,fff:ce,ffff:me,F:R,FF:ne,FFF:ye,FFFF:B};class qt{static create(r,h={}){return new qt(r,h)}static parseFormat(r){let h=null,p="",j=!1;const C=[];for(let k=0;k<r.length;k++){const z=r.charAt(k);z==="'"?((p.length>0||j)&&C.push({literal:j||/^\s+$/.test(p),val:p===""?"'":p}),h=null,p="",j=!j):j||z===h?p+=z:(p.length>0&&C.push({literal:/^\s+$/.test(p),val:p}),p=z,h=z)}return p.length>0&&C.push({literal:j||/^\s+$/.test(p),val:p}),C}static macroTokenToFormatOpts(r){return Is[r]}constructor(r,h){this.opts=h,this.loc=r,this.systemLoc=null}formatWithSystemDefault(r,h){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(r,{...this.opts,...h}).format()}dtFormatter(r,h={}){return this.loc.dtFormatter(r,{...this.opts,...h})}formatDateTime(r,h){return this.dtFormatter(r,h).format()}formatDateTimeParts(r,h){return this.dtFormatter(r,h).formatToParts()}formatInterval(r,h){return this.dtFormatter(r.start,h).dtf.formatRange(r.start.toJSDate(),r.end.toJSDate())}resolvedOptions(r,h){return this.dtFormatter(r,h).resolvedOptions()}num(r,h=0,p=void 0){if(this.opts.forceSimple)return it(r,h);const j={...this.opts};return h>0&&(j.padTo=h),p&&(j.signDisplay=p),this.loc.numberFormatter(j).format(r)}formatDateTimeFromString(r,h){const p=this.loc.listingMode()==="en",j=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",C=(Re,Nt)=>this.loc.extract(r,Re,Nt),k=Re=>r.isOffsetFixed&&r.offset===0&&Re.allowZ?"Z":r.isValid?r.zone.formatOffset(r.ts,Re.format):"",z=()=>p?ns(r):C({hour:"numeric",hourCycle:"h12"},"dayperiod"),q=(Re,Nt)=>p?Ir(r,Re):C(Nt?{month:Re}:{month:Re,day:"numeric"},"month"),he=(Re,Nt)=>p?an(r,Re):C(Nt?{weekday:Re}:{weekday:Re,month:"long",day:"numeric"},"weekday"),be=Re=>{const Nt=qt.macroTokenToFormatOpts(Re);return Nt?this.formatWithSystemDefault(r,Nt):Re},Le=Re=>p?ls(r,Re):C({era:Re},"era"),Qe=Re=>{switch(Re){case"S":return this.num(r.millisecond);case"u":case"SSS":return this.num(r.millisecond,3);case"s":return this.num(r.second);case"ss":return this.num(r.second,2);case"uu":return this.num(Math.floor(r.millisecond/10),2);case"uuu":return this.num(Math.floor(r.millisecond/100));case"m":return this.num(r.minute);case"mm":return this.num(r.minute,2);case"h":return this.num(r.hour%12===0?12:r.hour%12);case"hh":return this.num(r.hour%12===0?12:r.hour%12,2);case"H":return this.num(r.hour);case"HH":return this.num(r.hour,2);case"Z":return k({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return k({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return k({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return r.zone.offsetName(r.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return r.zone.offsetName(r.ts,{format:"long",locale:this.loc.locale});case"z":return r.zoneName;case"a":return z();case"d":return j?C({day:"numeric"},"day"):this.num(r.day);case"dd":return j?C({day:"2-digit"},"day"):this.num(r.day,2);case"c":return this.num(r.weekday);case"ccc":return he("short",!0);case"cccc":return he("long",!0);case"ccccc":return he("narrow",!0);case"E":return this.num(r.weekday);case"EEE":return he("short",!1);case"EEEE":return he("long",!1);case"EEEEE":return he("narrow",!1);case"L":return j?C({month:"numeric",day:"numeric"},"month"):this.num(r.month);case"LL":return j?C({month:"2-digit",day:"numeric"},"month"):this.num(r.month,2);case"LLL":return q("short",!0);case"LLLL":return q("long",!0);case"LLLLL":return q("narrow",!0);case"M":return j?C({month:"numeric"},"month"):this.num(r.month);case"MM":return j?C({month:"2-digit"},"month"):this.num(r.month,2);case"MMM":return q("short",!1);case"MMMM":return q("long",!1);case"MMMMM":return q("narrow",!1);case"y":return j?C({year:"numeric"},"year"):this.num(r.year);case"yy":return j?C({year:"2-digit"},"year"):this.num(r.year.toString().slice(-2),2);case"yyyy":return j?C({year:"numeric"},"year"):this.num(r.year,4);case"yyyyyy":return j?C({year:"numeric"},"year"):this.num(r.year,6);case"G":return Le("short");case"GG":return Le("long");case"GGGGG":return Le("narrow");case"kk":return this.num(r.weekYear.toString().slice(-2),2);case"kkkk":return this.num(r.weekYear,4);case"W":return this.num(r.weekNumber);case"WW":return this.num(r.weekNumber,2);case"n":return this.num(r.localWeekNumber);case"nn":return this.num(r.localWeekNumber,2);case"ii":return this.num(r.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(r.localWeekYear,4);case"o":return this.num(r.ordinal);case"ooo":return this.num(r.ordinal,3);case"q":return this.num(r.quarter);case"qq":return this.num(r.quarter,2);case"X":return this.num(Math.floor(r.ts/1e3));case"x":return this.num(r.ts);default:return be(Re)}};return Ws(qt.parseFormat(h),Qe)}formatDurationFromString(r,h){const p=this.opts.signMode==="negativeLargestOnly"?-1:1,j=be=>{switch(be[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},C=(be,Le)=>Qe=>{const Re=j(Qe);if(Re){const Nt=Le.isNegativeDuration&&Re!==Le.largestUnit?p:1;let Bt;return this.opts.signMode==="negativeLargestOnly"&&Re!==Le.largestUnit?Bt="never":this.opts.signMode==="all"?Bt="always":Bt="auto",this.num(be.get(Re)*Nt,Qe.length,Bt)}else return Qe},k=qt.parseFormat(h),z=k.reduce((be,{literal:Le,val:Qe})=>Le?be:be.concat(Qe),[]),q=r.shiftTo(...z.map(j).filter(be=>be)),he={isNegativeDuration:q<0,largestUnit:Object.keys(q.values)[0]};return Ws(k,C(q,he))}}const ss=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function nn(...g){const r=g.reduce((h,p)=>h+p.source,"");return RegExp(`^${r}$`)}function Un(...g){return r=>g.reduce(([h,p,j],C)=>{const[k,z,q]=C(r,j);return[{...h,...k},z||p,q]},[{},null,1]).slice(0,2)}function Ct(g,...r){if(g==null)return[null,null];for(const[h,p]of r){const j=h.exec(g);if(j)return p(j)}return[null,null]}function Sn(...g){return(r,h)=>{const p={};let j;for(j=0;j<g.length;j++)p[g[j]]=Mt(r[h+j]);return[p,null,h+j]}}const rs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,is=`(?:${rs.source}?(?:\\[(${ss.source})\\])?)?`,Xr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Xs=RegExp(`${Xr.source}${is}`),us=RegExp(`(?:[Tt]${Xs.source})?`),cs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Js=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Su=/(\d{4})-?(\d{3})/,no=Sn("weekYear","weekNumber","weekDay"),lo=Sn("year","ordinal"),so=/(\d{4})-(\d\d)-(\d\d)/,Ks=RegExp(`${Xr.source} ?(?:${rs.source}|(${ss.source}))?`),ro=RegExp(`(?: ${Ks.source})?`);function ml(g,r,h){const p=g[r];return Oe(p)?h:Mt(p)}function io(g,r){return[{year:ml(g,r),month:ml(g,r+1,1),day:ml(g,r+2,1)},null,r+3]}function gl(g,r){return[{hours:ml(g,r,0),minutes:ml(g,r+1,0),seconds:ml(g,r+2,0),milliseconds:Gr(g[r+3])},null,r+4]}function os(g,r){const h=!g[r]&&!g[r+1],p=Kl(g[r+1],g[r+2]),j=h?null:$e.instance(p);return[{},j,r+3]}function yl(g,r){const h=g[r]?Ee.create(g[r]):null;return[{},h,r+1]}const uo=RegExp(`^T?${Xr.source}$`),co=/^-?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 oo(g){const[r,h,p,j,C,k,z,q,he]=g,be=r[0]==="-",Le=q&&q[0]==="-",Qe=(Re,Nt=!1)=>Re!==void 0&&(Nt||Re&&be)?-Re:Re;return[{years:Qe(vn(h)),months:Qe(vn(p)),weeks:Qe(vn(j)),days:Qe(vn(C)),hours:Qe(vn(k)),minutes:Qe(vn(z)),seconds:Qe(vn(q),q==="-0"),milliseconds:Qe(Gr(he),Le)}]}const fo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ds(g,r,h,p,j,C,k){const z={year:r.length===2?Jl(Mt(r)):Mt(r),month:Ps.indexOf(h)+1,day:Mt(p),hour:Mt(j),minute:Mt(C)};return k&&(z.second=Mt(k)),g&&(z.weekday=g.length>3?as.indexOf(g)+1:za.indexOf(g)+1),z}const ho=/^(?:(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 mo(g){const[,r,h,p,j,C,k,z,q,he,be,Le]=g,Qe=ds(r,j,p,h,C,k,z);let Re;return q?Re=fo[q]:he?Re=0:Re=Kl(be,Le),[Qe,new $e(Re)]}function go(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$/,yo=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,xo=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Nu(g){const[,r,h,p,j,C,k,z]=g;return[ds(r,j,p,h,C,k,z),$e.utcInstance]}function po(g){const[,r,h,p,j,C,k,z]=g;return[ds(r,z,h,p,j,C,k),$e.utcInstance]}const vo=nn(cs,us),bo=nn(Js,us),So=nn(Su,us),wo=nn(Xs),ju=Un(io,gl,os,yl),Jr=Un(no,gl,os,yl),fs=Un(lo,gl,os,yl),No=Un(gl,os,yl);function Eu(g){return Ct(g,[vo,ju],[bo,Jr],[So,fs],[wo,No])}function Tu(g){return Ct(go(g),[ho,mo])}function Mu(g){return Ct(g,[wu,Nu],[yo,Nu],[xo,po])}function Cu(g){return Ct(g,[co,oo])}const Ou=Un(gl);function xl(g){return Ct(g,[uo,Ou])}const jo=nn(so,ro),Eo=nn(Ks),To=Un(gl,os,yl);function Du(g){return Ct(g,[jo,ju],[Eo,To])}const Kr="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}},hs={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},fa=146097/400,ln=146097/4800,Ru={years:{quarters:4,months:12,weeks:fa/7,days:fa,hours:fa*24,minutes:fa*24*60,seconds:fa*24*60*60,milliseconds:fa*24*60*60*1e3},quarters:{months:3,weeks:fa/28,days:fa/4,hours:fa*24/4,minutes:fa*24*60/4,seconds:fa*24*60*60/4,milliseconds:fa*24*60*60*1e3/4},months:{weeks:ln/7,days:ln,hours:ln*24,minutes:ln*24*60,seconds:ln*24*60*60,milliseconds:ln*24*60*60*1e3},...pl},wn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ei=wn.slice(0).reverse();function ja(g,r,h=!1){const p={values:h?r.values:{...g.values,...r.values||{}},loc:g.loc.clone(r.loc),conversionAccuracy:r.conversionAccuracy||g.conversionAccuracy,matrix:r.matrix||g.matrix};return new Pe(p)}function ti(g,r){var h;let p=(h=r.milliseconds)!=null?h:0;for(const j of ei.slice(1))r[j]&&(p+=r[j]*g[j].milliseconds);return p}function ai(g,r){const h=ti(g,r)<0?-1:1;wn.reduceRight((p,j)=>{if(Oe(r[j]))return p;if(p){const C=r[p]*h,k=g[j][p],z=Math.floor(C/k);r[j]+=z*h,r[p]-=z*k*h}return j},null),wn.reduce((p,j)=>{if(Oe(r[j]))return p;if(p){const C=r[p]%1;r[p]-=C,r[j]+=C*g[p][j]}return j},null)}function ni(g){const r={};for(const[h,p]of Object.entries(g))p!==0&&(r[h]=p);return r}class Pe{constructor(r){const h=r.conversionAccuracy==="longterm"||!1;let p=h?Ru:hs;r.matrix&&(p=r.matrix),this.values=r.values,this.loc=r.loc||xe.create(),this.conversionAccuracy=h?"longterm":"casual",this.invalid=r.invalid||null,this.matrix=p,this.isLuxonDuration=!0}static fromMillis(r,h){return Pe.fromObject({milliseconds:r},h)}static fromObject(r,h={}){if(r==null||typeof r!="object")throw new v(`Duration.fromObject: argument expected to be an object, got ${r===null?"null":typeof r}`);return new Pe({values:tn(r,Pe.normalizeUnit),loc:xe.fromObject(h),conversionAccuracy:h.conversionAccuracy,matrix:h.matrix})}static fromDurationLike(r){if(da(r))return Pe.fromMillis(r);if(Pe.isDuration(r))return r;if(typeof r=="object")return Pe.fromObject(r);throw new v(`Unknown duration argument ${r} of type ${typeof r}`)}static fromISO(r,h){const[p]=Cu(r);return p?Pe.fromObject(p,h):Pe.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static fromISOTime(r,h){const[p]=xl(r);return p?Pe.fromObject(p,h):Pe.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the Duration is invalid");const p=r instanceof oa?r:new oa(r,h);if(xt.throwOnInvalid)throw new o(p);return new Pe({invalid:p})}static normalizeUnit(r){const h={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[r&&r.toLowerCase()];if(!h)throw new f(r);return h}static isDuration(r){return r&&r.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(r,h={}){const p={...h,floor:h.round!==!1&&h.floor!==!1};return this.isValid?qt.create(this.loc,p).formatDurationFromString(this,r):Kr}toHuman(r={}){if(!this.isValid)return Kr;const h=r.showZeros!==!1,p=wn.map(j=>{const C=this.values[j];return Oe(C)||C===0&&!h?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...r,unit:j.slice(0,-1)}).format(C)}).filter(j=>j);return this.loc.listFormatter({type:"conjunction",style:r.listStyle||"narrow",...r}).format(p)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let r="P";return this.years!==0&&(r+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(r+=this.months+this.quarters*3+"M"),this.weeks!==0&&(r+=this.weeks+"W"),this.days!==0&&(r+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(r+="T"),this.hours!==0&&(r+=this.hours+"H"),this.minutes!==0&&(r+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(r+=Xl(this.seconds+this.milliseconds/1e3,3)+"S"),r==="P"&&(r+="T0S"),r}toISOTime(r={}){if(!this.isValid)return null;const h=this.toMillis();return h<0||h>=864e5?null:(r={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...r,includeOffset:!1},je.fromMillis(h,{zone:"UTC"}).toISOTime(r))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ti(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(r){if(!this.isValid)return this;const h=Pe.fromDurationLike(r),p={};for(const j of wn)(_n(h.values,j)||_n(this.values,j))&&(p[j]=h.get(j)+this.get(j));return ja(this,{values:p},!0)}minus(r){if(!this.isValid)return this;const h=Pe.fromDurationLike(r);return this.plus(h.negate())}mapUnits(r){if(!this.isValid)return this;const h={};for(const p of Object.keys(this.values))h[p]=Zr(r(this.values[p],p));return ja(this,{values:h},!0)}get(r){return this[Pe.normalizeUnit(r)]}set(r){if(!this.isValid)return this;const h={...this.values,...tn(r,Pe.normalizeUnit)};return ja(this,{values:h})}reconfigure({locale:r,numberingSystem:h,conversionAccuracy:p,matrix:j}={}){const k={loc:this.loc.clone({locale:r,numberingSystem:h}),matrix:j,conversionAccuracy:p};return ja(this,k)}as(r){return this.isValid?this.shiftTo(r).get(r):NaN}normalize(){if(!this.isValid)return this;const r=this.toObject();return ai(this.matrix,r),ja(this,{values:r},!0)}rescale(){if(!this.isValid)return this;const r=ni(this.normalize().shiftToAll().toObject());return ja(this,{values:r},!0)}shiftTo(...r){if(!this.isValid)return this;if(r.length===0)return this;r=r.map(k=>Pe.normalizeUnit(k));const h={},p={},j=this.toObject();let C;for(const k of wn)if(r.indexOf(k)>=0){C=k;let z=0;for(const he in p)z+=this.matrix[he][k]*p[he],p[he]=0;da(j[k])&&(z+=j[k]);const q=Math.trunc(z);h[k]=q,p[k]=(z*1e3-q*1e3)/1e3}else da(j[k])&&(p[k]=j[k]);for(const k in p)p[k]!==0&&(h[C]+=k===C?p[k]:p[k]/this.matrix[C][k]);return ai(this.matrix,h),ja(this,{values:h},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const r={};for(const h of Object.keys(this.values))r[h]=this.values[h]===0?0:-this.values[h];return ja(this,{values:r},!0)}removeZeros(){if(!this.isValid)return this;const r=ni(this.values);return ja(this,{values:r},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(r){if(!this.isValid||!r.isValid||!this.loc.equals(r.loc))return!1;function h(p,j){return p===void 0||p===0?j===void 0||j===0:p===j}for(const p of wn)if(!h(this.values[p],r.values[p]))return!1;return!0}}const vl="Invalid Interval";function Mo(g,r){return!g||!g.isValid?vt.invalid("missing or invalid start"):!r||!r.isValid?vt.invalid("missing or invalid end"):r<g?vt.invalid("end before start",`The end of an interval must be after its start, but you had start=${g.toISO()} and end=${r.toISO()}`):null}class vt{constructor(r){this.s=r.start,this.e=r.end,this.invalid=r.invalid||null,this.isLuxonInterval=!0}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the Interval is invalid");const p=r instanceof oa?r:new oa(r,h);if(xt.throwOnInvalid)throw new d(p);return new vt({invalid:p})}static fromDateTimes(r,h){const p=ga(r),j=ga(h),C=Mo(p,j);return C??new vt({start:p,end:j})}static after(r,h){const p=Pe.fromDurationLike(h),j=ga(r);return vt.fromDateTimes(j,j.plus(p))}static before(r,h){const p=Pe.fromDurationLike(h),j=ga(r);return vt.fromDateTimes(j.minus(p),j)}static fromISO(r,h){const[p,j]=(r||"").split("/",2);if(p&&j){let C,k;try{C=je.fromISO(p,h),k=C.isValid}catch{k=!1}let z,q;try{z=je.fromISO(j,h),q=z.isValid}catch{q=!1}if(k&&q)return vt.fromDateTimes(C,z);if(k){const he=Pe.fromISO(j,h);if(he.isValid)return vt.after(C,he)}else if(q){const he=Pe.fromISO(p,h);if(he.isValid)return vt.before(z,he)}}return vt.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static isInterval(r){return r&&r.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(r="milliseconds"){return this.isValid?this.toDuration(r).get(r):NaN}count(r="milliseconds",h){if(!this.isValid)return NaN;const p=this.start.startOf(r,h);let j;return h!=null&&h.useLocaleWeeks?j=this.end.reconfigure({locale:p.locale}):j=this.end,j=j.startOf(r,h),Math.floor(j.diff(p,r).get(r))+(j.valueOf()!==this.end.valueOf())}hasSame(r){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,r):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(r){return this.isValid?this.s>r:!1}isBefore(r){return this.isValid?this.e<=r:!1}contains(r){return this.isValid?this.s<=r&&this.e>r:!1}set({start:r,end:h}={}){return this.isValid?vt.fromDateTimes(r||this.s,h||this.e):this}splitAt(...r){if(!this.isValid)return[];const h=r.map(ga).filter(k=>this.contains(k)).sort((k,z)=>k.toMillis()-z.toMillis()),p=[];let{s:j}=this,C=0;for(;j<this.e;){const k=h[C]||this.e,z=+k>+this.e?this.e:k;p.push(vt.fromDateTimes(j,z)),j=z,C+=1}return p}splitBy(r){const h=Pe.fromDurationLike(r);if(!this.isValid||!h.isValid||h.as("milliseconds")===0)return[];let{s:p}=this,j=1,C;const k=[];for(;p<this.e;){const z=this.start.plus(h.mapUnits(q=>q*j));C=+z>+this.e?this.e:z,k.push(vt.fromDateTimes(p,C)),p=C,j+=1}return k}divideEqually(r){return this.isValid?this.splitBy(this.length()/r).slice(0,r):[]}overlaps(r){return this.e>r.s&&this.s<r.e}abutsStart(r){return this.isValid?+this.e==+r.s:!1}abutsEnd(r){return this.isValid?+r.e==+this.s:!1}engulfs(r){return this.isValid?this.s<=r.s&&this.e>=r.e:!1}equals(r){return!this.isValid||!r.isValid?!1:this.s.equals(r.s)&&this.e.equals(r.e)}intersection(r){if(!this.isValid)return this;const h=this.s>r.s?this.s:r.s,p=this.e<r.e?this.e:r.e;return h>=p?null:vt.fromDateTimes(h,p)}union(r){if(!this.isValid)return this;const h=this.s<r.s?this.s:r.s,p=this.e>r.e?this.e:r.e;return vt.fromDateTimes(h,p)}static merge(r){const[h,p]=r.sort((j,C)=>j.s-C.s).reduce(([j,C],k)=>C?C.overlaps(k)||C.abutsStart(k)?[j,C.union(k)]:[j.concat([C]),k]:[j,k],[[],null]);return p&&h.push(p),h}static xor(r){let h=null,p=0;const j=[],C=r.map(q=>[{time:q.s,type:"s"},{time:q.e,type:"e"}]),k=Array.prototype.concat(...C),z=k.sort((q,he)=>q.time-he.time);for(const q of z)p+=q.type==="s"?1:-1,p===1?h=q.time:(h&&+h!=+q.time&&j.push(vt.fromDateTimes(h,q.time)),h=null);return vt.merge(j)}difference(...r){return vt.xor([this].concat(r)).map(h=>this.intersection(h)).filter(h=>h&&!h.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(r=E,h={}){return this.isValid?qt.create(this.s.loc.clone(h),r).formatInterval(this):vl}toISO(r){return this.isValid?`${this.s.toISO(r)}/${this.e.toISO(r)}`:vl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:vl}toISOTime(r){return this.isValid?`${this.s.toISOTime(r)}/${this.e.toISOTime(r)}`:vl}toFormat(r,{separator:h=" – "}={}){return this.isValid?`${this.s.toFormat(r)}${h}${this.e.toFormat(r)}`:vl}toDuration(r,h){return this.isValid?this.e.diff(this.s,r,h):Pe.invalid(this.invalidReason)}mapEndpoints(r){return vt.fromDateTimes(r(this.s),r(this.e))}}class ms{static hasDST(r=xt.defaultZone){const h=je.now().setZone(r).set({month:12});return!r.isUniversal&&h.offset!==h.set({month:6}).offset}static isValidIANAZone(r){return Ee.isValidZone(r)}static normalizeZone(r){return Xe(r,xt.defaultZone)}static getStartOfWeek({locale:r=null,locObj:h=null}={}){return(h||xe.create(r)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:r=null,locObj:h=null}={}){return(h||xe.create(r)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:r=null,locObj:h=null}={}){return(h||xe.create(r)).getWeekendDays().slice()}static months(r="long",{locale:h=null,numberingSystem:p=null,locObj:j=null,outputCalendar:C="gregory"}={}){return(j||xe.create(h,p,C)).months(r)}static monthsFormat(r="long",{locale:h=null,numberingSystem:p=null,locObj:j=null,outputCalendar:C="gregory"}={}){return(j||xe.create(h,p,C)).months(r,!0)}static weekdays(r="long",{locale:h=null,numberingSystem:p=null,locObj:j=null}={}){return(j||xe.create(h,p,null)).weekdays(r)}static weekdaysFormat(r="long",{locale:h=null,numberingSystem:p=null,locObj:j=null}={}){return(j||xe.create(h,p,null)).weekdays(r,!0)}static meridiems({locale:r=null}={}){return xe.create(r).meridiems()}static eras(r="short",{locale:h=null}={}){return xe.create(h,null,"gregory").eras(r)}static features(){return{relative:$r(),localeWeek:pn()}}}function ea(g,r){const h=j=>j.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),p=h(r)-h(g);return Math.floor(Pe.fromMillis(p).as("days"))}function gs(g,r,h){const p=[["years",(q,he)=>he.year-q.year],["quarters",(q,he)=>he.quarter-q.quarter+(he.year-q.year)*4],["months",(q,he)=>he.month-q.month+(he.year-q.year)*12],["weeks",(q,he)=>{const be=ea(q,he);return(be-be%7)/7}],["days",ea]],j={},C=g;let k,z;for(const[q,he]of p)h.indexOf(q)>=0&&(k=q,j[q]=he(g,r),z=C.plus(j),z>r?(j[q]--,g=C.plus(j),g>r&&(z=g,j[q]--,g=C.plus(j))):g=z);return[g,j,z,k]}function Au(g,r,h,p){let[j,C,k,z]=gs(g,r,h);const q=r-j,he=h.filter(Le=>["hours","minutes","seconds","milliseconds"].indexOf(Le)>=0);he.length===0&&(k<r&&(k=j.plus({[z]:1})),k!==j&&(C[z]=(C[z]||0)+q/(k-j)));const be=Pe.fromObject(C,p);return he.length>0?Pe.fromMillis(q,p).shiftTo(...he).plus(be):be}const _u="missing Intl.DateTimeFormat.formatToParts support";function Je(g,r=h=>h){return{regex:g,deser:([h])=>r(to(h))}}const er="[ ]",ku=new RegExp(er,"g");function bl(g){return g.replace(/\./g,"\\.?").replace(ku,er)}function tr(g){return g.replace(/\./g,"").replace(ku," ").toLowerCase()}function Pt(g,r){return g===null?null:{regex:RegExp(g.map(bl).join("|")),deser:([h])=>g.findIndex(p=>tr(h)===tr(p))+r}}function ar(g,r){return{regex:g,deser:([,h,p])=>Kl(h,p),groups:r}}function ys(g){return{regex:g,deser:([r])=>r}}function Ln(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Sl(g,r){const h=Jt(r),p=Jt(r,"{2}"),j=Jt(r,"{3}"),C=Jt(r,"{4}"),k=Jt(r,"{6}"),z=Jt(r,"{1,2}"),q=Jt(r,"{1,3}"),he=Jt(r,"{1,6}"),be=Jt(r,"{1,9}"),Le=Jt(r,"{2,4}"),Qe=Jt(r,"{4,6}"),Re=Yt=>({regex:RegExp(Ln(Yt.val)),deser:([Nn])=>Nn,literal:!0}),Bt=(Yt=>{if(g.literal)return Re(Yt);switch(Yt.val){case"G":return Pt(r.eras("short"),0);case"GG":return Pt(r.eras("long"),0);case"y":return Je(he);case"yy":return Je(Le,Jl);case"yyyy":return Je(C);case"yyyyy":return Je(Qe);case"yyyyyy":return Je(k);case"M":return Je(z);case"MM":return Je(p);case"MMM":return Pt(r.months("short",!0),1);case"MMMM":return Pt(r.months("long",!0),1);case"L":return Je(z);case"LL":return Je(p);case"LLL":return Pt(r.months("short",!1),1);case"LLLL":return Pt(r.months("long",!1),1);case"d":return Je(z);case"dd":return Je(p);case"o":return Je(q);case"ooo":return Je(j);case"HH":return Je(p);case"H":return Je(z);case"hh":return Je(p);case"h":return Je(z);case"mm":return Je(p);case"m":return Je(z);case"q":return Je(z);case"qq":return Je(p);case"s":return Je(z);case"ss":return Je(p);case"S":return Je(q);case"SSS":return Je(j);case"u":return ys(be);case"uu":return ys(z);case"uuu":return Je(h);case"a":return Pt(r.meridiems(),0);case"kkkk":return Je(C);case"kk":return Je(Le,Jl);case"W":return Je(z);case"WW":return Je(p);case"E":case"c":return Je(h);case"EEE":return Pt(r.weekdays("short",!1),1);case"EEEE":return Pt(r.weekdays("long",!1),1);case"ccc":return Pt(r.weekdays("short",!0),1);case"cccc":return Pt(r.weekdays("long",!0),1);case"Z":case"ZZ":return ar(new RegExp(`([+-]${z.source})(?::(${p.source}))?`),2);case"ZZZ":return ar(new RegExp(`([+-]${z.source})(${p.source})?`),2);case"z":return ys(/[a-z_+-/]{1,256}?/i);case" ":return ys(/[^\S\n\r]/);default:return Re(Yt)}})(g)||{invalidReason:_u};return Bt.token=g,Bt}const li={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function zu(g,r,h){const{type:p,value:j}=g;if(p==="literal"){const q=/^\s+$/.test(j);return{literal:!q,val:q?" ":j}}const C=r[p];let k=p;p==="hour"&&(r.hour12!=null?k=r.hour12?"hour12":"hour24":r.hourCycle!=null?r.hourCycle==="h11"||r.hourCycle==="h12"?k="hour12":k="hour24":k=h.hour12?"hour12":"hour24");let z=li[k];if(typeof z=="object"&&(z=z[C]),z)return{literal:!1,val:z}}function Hn(g){return[`^${g.map(h=>h.regex).reduce((h,p)=>`${h}(${p.source})`,"")}$`,g]}function Uu(g,r,h){const p=g.match(r);if(p){const j={};let C=1;for(const k in h)if(_n(h,k)){const z=h[k],q=z.groups?z.groups+1:1;!z.literal&&z.token&&(j[z.token.val[0]]=z.deser(p.slice(C,C+q))),C+=q}return[p,j]}else return[p,{}]}function Lu(g){const r=C=>{switch(C){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let h=null,p;return Oe(g.z)||(h=Ee.create(g.z)),Oe(g.Z)||(h||(h=new $e(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=Gr(g.u)),[Object.keys(g).reduce((C,k)=>{const z=r(k);return z&&(C[z]=g[k]),C},{}),h,p]}let nr=null;function Oo(){return nr||(nr=je.fromMillis(1555555555555)),nr}function Do(g,r){if(g.literal)return g;const h=qt.macroTokenToFormatOpts(g.val),p=ha(h,r);return p==null||p.includes(void 0)?g:p}function Hu(g,r){return Array.prototype.concat(...g.map(h=>Do(h,r)))}class si{constructor(r,h){if(this.locale=r,this.format=h,this.tokens=Hu(qt.parseFormat(h),r),this.units=this.tokens.map(p=>Sl(p,r)),this.disqualifyingUnit=this.units.find(p=>p.invalidReason),!this.disqualifyingUnit){const[p,j]=Hn(this.units);this.regex=RegExp(p,"i"),this.handlers=j}}explainFromTokens(r){if(this.isValid){const[h,p]=Uu(r,this.regex,this.handlers),[j,C,k]=p?Lu(p):[null,null,void 0];if(_n(p,"a")&&_n(p,"H"))throw new m("Can't include meridiem when specifying 24-hour format");return{input:r,tokens:this.tokens,regex:this.regex,rawMatches:h,matches:p,result:j,zone:C,specificOffset:k}}else return{input:r,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ri(g,r,h){return new si(g,h).explainFromTokens(r)}function ii(g,r,h){const{result:p,zone:j,specificOffset:C,invalidReason:k}=ri(g,r,h);return[p,j,C,k]}function ha(g,r){if(!g)return null;const p=qt.create(r,g).dtFormatter(Oo()),j=p.formatToParts(),C=p.resolvedOptions();return j.map(k=>zu(k,g,C))}const wl="Invalid DateTime",sa=864e13;function Ua(g){return new oa("unsupported zone",`the zone "${g.name}" is not supported`)}function xs(g){return g.weekData===null&&(g.weekData=Ht(g.c)),g.weekData}function Nl(g){return g.localWeekData===null&&(g.localWeekData=Ht(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function La(g,r){const h={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new je({...h,...r,old:h})}function lr(g,r,h){let p=g-r*60*1e3;const j=h.offset(p);if(r===j)return[p,r];p-=(j-r)*60*1e3;const C=h.offset(p);return j===C?[p,j]:[g-Math.min(j,C)*60*1e3,Math.max(j,C)]}function Ha(g,r){g+=r*60*1e3;const h=new Date(g);return{year:h.getUTCFullYear(),month:h.getUTCMonth()+1,day:h.getUTCDate(),hour:h.getUTCHours(),minute:h.getUTCMinutes(),second:h.getUTCSeconds(),millisecond:h.getUTCMilliseconds()}}function ps(g,r,h){return lr(Zt(g),r,h)}function vs(g,r){const h=g.o,p=g.c.year+Math.trunc(r.years),j=g.c.month+Math.trunc(r.months)+Math.trunc(r.quarters)*3,C={...g.c,year:p,month:j,day:Math.min(g.c.day,Gs(p,j))+Math.trunc(r.days)+Math.trunc(r.weeks)*7},k=Pe.fromObject({years:r.years-Math.trunc(r.years),quarters:r.quarters-Math.trunc(r.quarters),months:r.months-Math.trunc(r.months),weeks:r.weeks-Math.trunc(r.weeks),days:r.days-Math.trunc(r.days),hours:r.hours,minutes:r.minutes,seconds:r.seconds,milliseconds:r.milliseconds}).as("milliseconds"),z=Zt(C);let[q,he]=lr(z,h,g.zone);return k!==0&&(q+=k,he=g.zone.offset(q)),{ts:q,o:he}}function Ea(g,r,h,p,j,C){const{setZone:k,zone:z}=h;if(g&&Object.keys(g).length!==0||r){const q=r||z,he=je.fromObject(g,{...h,zone:q,specificOffset:C});return k?he:he.setZone(z)}else return je.invalid(new oa("unparsable",`the input "${j}" can't be parsed as ${p}`))}function sr(g,r,h=!0){return g.isValid?qt.create(xe.create("en-US"),{allowZ:h,forceSimple:!0}).formatDateTimeFromString(g,r):null}function Qt(g,r,h){const p=g.c.year>9999||g.c.year<0;let j="";if(p&&g.c.year>=0&&(j+="+"),j+=it(g.c.year,p?6:4),h==="year")return j;if(r){if(j+="-",j+=it(g.c.month),h==="month")return j;j+="-"}else if(j+=it(g.c.month),h==="month")return j;return j+=it(g.c.day),j}function rr(g,r,h,p,j,C,k){let z=!h||g.c.millisecond!==0||g.c.second!==0,q="";switch(k){case"day":case"month":case"year":break;default:if(q+=it(g.c.hour),k==="hour")break;if(r){if(q+=":",q+=it(g.c.minute),k==="minute")break;z&&(q+=":",q+=it(g.c.second))}else{if(q+=it(g.c.minute),k==="minute")break;z&&(q+=it(g.c.second))}if(k==="second")break;z&&(!p||g.c.millisecond!==0)&&(q+=".",q+=it(g.c.millisecond,3))}return j&&(g.isOffsetFixed&&g.offset===0&&!C?q+="Z":g.o<0?(q+="-",q+=it(Math.trunc(-g.o/60)),q+=":",q+=it(Math.trunc(-g.o%60))):(q+="+",q+=it(Math.trunc(g.o/60)),q+=":",q+=it(Math.trunc(g.o%60)))),C&&(q+="["+g.zone.ianaName+"]"),q}const qa={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},qu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ir={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Va=["year","month","day","hour","minute","second","millisecond"],ui=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Vu=["year","ordinal","hour","minute","second","millisecond"];function jl(g){const r={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[g.toLowerCase()];if(!r)throw new f(g);return r}function ci(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 ma(g){if(sn===void 0&&(sn=xt.now()),g.type!=="iana")return g.offset(sn);const r=g.name;let h=ta.get(r);return h===void 0&&(h=g.offset(sn),ta.set(r,h)),h}function qn(g,r){const h=Xe(r.zone,xt.defaultZone);if(!h.isValid)return je.invalid(Ua(h));const p=xe.fromObject(r);let j,C;if(Oe(g.year))j=xt.now();else{for(const q of Va)Oe(g[q])&&(g[q]=qa[q]);const k=$s(g)||An(g);if(k)return je.invalid(k);const z=ma(h);[j,C]=ps(g,z,h)}return new je({ts:j,zone:h,loc:p,o:C})}function Vn(g,r,h){const p=Oe(h.round)?!0:h.round,j=Oe(h.rounding)?"trunc":h.rounding,C=(z,q)=>(z=Xl(z,p||h.calendary?0:2,h.calendary?"round":j),r.loc.clone(h).relFormatter(h).format(z,q)),k=z=>h.calendary?r.hasSame(g,z)?0:r.startOf(z).diff(g.startOf(z),z).get(z):r.diff(g,z).get(z);if(h.unit)return C(k(h.unit),h.unit);for(const z of h.units){const q=k(z);if(Math.abs(q)>=1)return C(q,z)}return C(g>r?-0:0,h.units[h.units.length-1])}function bs(g){let r={},h;return g.length>0&&typeof g[g.length-1]=="object"?(r=g[g.length-1],h=Array.from(g).slice(0,g.length-1)):h=Array.from(g),[r,h]}let sn;const ta=new Map;class je{constructor(r){const h=r.zone||xt.defaultZone;let p=r.invalid||(Number.isNaN(r.ts)?new oa("invalid input"):null)||(h.isValid?null:Ua(h));this.ts=Oe(r.ts)?xt.now():r.ts;let j=null,C=null;if(!p)if(r.old&&r.old.ts===this.ts&&r.old.zone.equals(h))[j,C]=[r.old.c,r.old.o];else{const z=da(r.o)&&!r.old?r.o:h.offset(this.ts);j=Ha(this.ts,z),p=Number.isNaN(j.year)?new oa("invalid input"):null,j=p?null:j,C=p?null:z}this._zone=h,this.loc=r.loc||xe.create(),this.invalid=p,this.weekData=null,this.localWeekData=null,this.c=j,this.o=C,this.isLuxonDateTime=!0}static now(){return new je({})}static local(){const[r,h]=bs(arguments),[p,j,C,k,z,q,he]=h;return qn({year:p,month:j,day:C,hour:k,minute:z,second:q,millisecond:he},r)}static utc(){const[r,h]=bs(arguments),[p,j,C,k,z,q,he]=h;return r.zone=$e.utcInstance,qn({year:p,month:j,day:C,hour:k,minute:z,second:q,millisecond:he},r)}static fromJSDate(r,h={}){const p=gu(r)?r.valueOf():NaN;if(Number.isNaN(p))return je.invalid("invalid input");const j=Xe(h.zone,xt.defaultZone);return j.isValid?new je({ts:p,zone:j,loc:xe.fromObject(h)}):je.invalid(Ua(j))}static fromMillis(r,h={}){if(da(r))return r<-sa||r>sa?je.invalid("Timestamp out of range"):new je({ts:r,zone:Xe(h.zone,xt.defaultZone),loc:xe.fromObject(h)});throw new v(`fromMillis requires a numerical input, but received a ${typeof r} with value ${r}`)}static fromSeconds(r,h={}){if(da(r))return new je({ts:r*1e3,zone:Xe(h.zone,xt.defaultZone),loc:xe.fromObject(h)});throw new v("fromSeconds requires a numerical input")}static fromObject(r,h={}){r=r||{};const p=Xe(h.zone,xt.defaultZone);if(!p.isValid)return je.invalid(Ua(p));const j=xe.fromObject(h),C=tn(r,ci),{minDaysInFirstWeek:k,startOfWeek:z}=hu(C,j),q=xt.now(),he=Oe(h.specificOffset)?p.offset(q):h.specificOffset,be=!Oe(C.ordinal),Le=!Oe(C.year),Qe=!Oe(C.month)||!Oe(C.day),Re=Le||Qe,Nt=C.weekYear||C.weekNumber;if((Re||be)&&Nt)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Qe&&be)throw new m("Can't mix ordinal dates with month/day");const Bt=Nt||C.weekday&&!Re;let Yt,Nn,rn=Ha(q,he);Bt?(Yt=ui,Nn=qu,rn=Ht(rn,k,z)):be?(Yt=Vu,Nn=ir,rn=Wl(rn)):(Yt=Va,Nn=qa);let ur=!1;for(const $a of Yt){const cr=C[$a];Oe(cr)?ur?C[$a]=Nn[$a]:C[$a]=rn[$a]:ur=!0}const Bn=Bt?mu(C,k,z):be?Il(C):$s(C),Ya=Bn||An(C);if(Ya)return je.invalid(Ya);const jn=Bt?Rn(C,k,z):be?fu(C):C,[un,oi]=ps(jn,he,p),Yn=new je({ts:un,zone:p,o:oi,loc:j});return C.weekday&&Re&&r.weekday!==Yn.weekday?je.invalid("mismatched weekday",`you can't specify both a weekday of ${C.weekday} and a date of ${Yn.toISO()}`):Yn.isValid?Yn:je.invalid(Yn.invalid)}static fromISO(r,h={}){const[p,j]=Eu(r);return Ea(p,j,h,"ISO 8601",r)}static fromRFC2822(r,h={}){const[p,j]=Tu(r);return Ea(p,j,h,"RFC 2822",r)}static fromHTTP(r,h={}){const[p,j]=Mu(r);return Ea(p,j,h,"HTTP",h)}static fromFormat(r,h,p={}){if(Oe(r)||Oe(h))throw new v("fromFormat requires an input string and a format");const{locale:j=null,numberingSystem:C=null}=p,k=xe.fromOpts({locale:j,numberingSystem:C,defaultToEN:!0}),[z,q,he,be]=ii(k,r,h);return be?je.invalid(be):Ea(z,q,p,`format ${h}`,r,he)}static fromString(r,h,p={}){return je.fromFormat(r,h,p)}static fromSQL(r,h={}){const[p,j]=Du(r);return Ea(p,j,h,"SQL",r)}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the DateTime is invalid");const p=r instanceof oa?r:new oa(r,h);if(xt.throwOnInvalid)throw new u(p);return new je({invalid:p})}static isDateTime(r){return r&&r.isLuxonDateTime||!1}static parseFormatForOpts(r,h={}){const p=ha(r,xe.fromObject(h));return p?p.map(j=>j?j.val:null).join(""):null}static expandFormat(r,h={}){return Hu(qt.parseFormat(r),xe.fromObject(h)).map(j=>j.val).join("")}static resetCache(){sn=void 0,ta.clear()}get(r){return this[r]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?xs(this).weekYear:NaN}get weekNumber(){return this.isValid?xs(this).weekNumber:NaN}get weekday(){return this.isValid?xs(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Nl(this).weekday:NaN}get localWeekNumber(){return this.isValid?Nl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Nl(this).weekYear:NaN}get ordinal(){return this.isValid?Wl(this.c).ordinal:NaN}get monthShort(){return this.isValid?ms.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ms.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ms.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ms.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const r=864e5,h=6e4,p=Zt(this.c),j=this.zone.offset(p-r),C=this.zone.offset(p+r),k=this.zone.offset(p-j*h),z=this.zone.offset(p-C*h);if(k===z)return[this];const q=p-k*h,he=p-z*h,be=Ha(q,k),Le=Ha(he,z);return be.hour===Le.hour&&be.minute===Le.minute&&be.second===Le.second&&be.millisecond===Le.millisecond?[La(this,{ts:q}),La(this,{ts:he})]:[this]}get isInLeapYear(){return dl(this.year)}get daysInMonth(){return Gs(this.year,this.month)}get daysInYear(){return this.isValid?en(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(r={}){const{locale:h,numberingSystem:p,calendar:j}=qt.create(this.loc.clone(r),r).resolvedOptions(this);return{locale:h,numberingSystem:p,outputCalendar:j}}toUTC(r=0,h={}){return this.setZone($e.instance(r),h)}toLocal(){return this.setZone(xt.defaultZone)}setZone(r,{keepLocalTime:h=!1,keepCalendarTime:p=!1}={}){if(r=Xe(r,xt.defaultZone),r.equals(this.zone))return this;if(r.isValid){let j=this.ts;if(h||p){const C=r.offset(this.ts),k=this.toObject();[j]=ps(k,C,r)}return La(this,{ts:j,zone:r})}else return je.invalid(Ua(r))}reconfigure({locale:r,numberingSystem:h,outputCalendar:p}={}){const j=this.loc.clone({locale:r,numberingSystem:h,outputCalendar:p});return La(this,{loc:j})}setLocale(r){return this.reconfigure({locale:r})}set(r){if(!this.isValid)return this;const h=tn(r,ci),{minDaysInFirstWeek:p,startOfWeek:j}=hu(h,this.loc),C=!Oe(h.weekYear)||!Oe(h.weekNumber)||!Oe(h.weekday),k=!Oe(h.ordinal),z=!Oe(h.year),q=!Oe(h.month)||!Oe(h.day),he=z||q,be=h.weekYear||h.weekNumber;if((he||k)&&be)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(q&&k)throw new m("Can't mix ordinal dates with month/day");let Le;C?Le=Rn({...Ht(this.c,p,j),...h},p,j):Oe(h.ordinal)?(Le={...this.toObject(),...h},Oe(h.day)&&(Le.day=Math.min(Gs(Le.year,Le.month),Le.day))):Le=fu({...Wl(this.c),...h});const[Qe,Re]=ps(Le,this.o,this.zone);return La(this,{ts:Qe,o:Re})}plus(r){if(!this.isValid)return this;const h=Pe.fromDurationLike(r);return La(this,vs(this,h))}minus(r){if(!this.isValid)return this;const h=Pe.fromDurationLike(r).negate();return La(this,vs(this,h))}startOf(r,{useLocaleWeeks:h=!1}={}){if(!this.isValid)return this;const p={},j=Pe.normalizeUnit(r);switch(j){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(j==="weeks")if(h){const C=this.loc.getStartOfWeek(),{weekday:k}=this;k<C&&(p.weekNumber=this.weekNumber-1),p.weekday=C}else p.weekday=1;if(j==="quarters"){const C=Math.ceil(this.month/3);p.month=(C-1)*3+1}return this.set(p)}endOf(r,h){return this.isValid?this.plus({[r]:1}).startOf(r,h).minus(1):this}toFormat(r,h={}){return this.isValid?qt.create(this.loc.redefaultToEN(h)).formatDateTimeFromString(this,r):wl}toLocaleString(r=E,h={}){return this.isValid?qt.create(this.loc.clone(h),r).formatDateTime(this):wl}toLocaleParts(r={}){return this.isValid?qt.create(this.loc.clone(r),r).formatDateTimeParts(this):[]}toISO({format:r="extended",suppressSeconds:h=!1,suppressMilliseconds:p=!1,includeOffset:j=!0,extendedZone:C=!1,precision:k="milliseconds"}={}){if(!this.isValid)return null;k=jl(k);const z=r==="extended";let q=Qt(this,z,k);return Va.indexOf(k)>=3&&(q+="T"),q+=rr(this,z,h,p,j,C,k),q}toISODate({format:r="extended",precision:h="day"}={}){return this.isValid?Qt(this,r==="extended",jl(h)):null}toISOWeekDate(){return sr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:r=!1,suppressSeconds:h=!1,includeOffset:p=!0,includePrefix:j=!1,extendedZone:C=!1,format:k="extended",precision:z="milliseconds"}={}){return this.isValid?(z=jl(z),(j&&Va.indexOf(z)>=3?"T":"")+rr(this,k==="extended",h,r,p,C,z)):null}toRFC2822(){return sr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return sr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Qt(this,!0):null}toSQLTime({includeOffset:r=!0,includeZone:h=!1,includeOffsetSpace:p=!0}={}){let j="HH:mm:ss.SSS";return(h||r)&&(p&&(j+=" "),h?j+="z":r&&(j+="ZZ")),sr(this,j,!0)}toSQL(r={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(r)}`:null}toString(){return this.isValid?this.toISO():wl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(r={}){if(!this.isValid)return{};const h={...this.c};return r.includeConfig&&(h.outputCalendar=this.outputCalendar,h.numberingSystem=this.loc.numberingSystem,h.locale=this.loc.locale),h}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(r,h="milliseconds",p={}){if(!this.isValid||!r.isValid)return Pe.invalid("created by diffing an invalid DateTime");const j={locale:this.locale,numberingSystem:this.numberingSystem,...p},C=ol(h).map(Pe.normalizeUnit),k=r.valueOf()>this.valueOf(),z=k?this:r,q=k?r:this,he=Au(z,q,C,j);return k?he.negate():he}diffNow(r="milliseconds",h={}){return this.diff(je.now(),r,h)}until(r){return this.isValid?vt.fromDateTimes(this,r):this}hasSame(r,h,p){if(!this.isValid)return!1;const j=r.valueOf(),C=this.setZone(r.zone,{keepLocalTime:!0});return C.startOf(h,p)<=j&&j<=C.endOf(h,p)}equals(r){return this.isValid&&r.isValid&&this.valueOf()===r.valueOf()&&this.zone.equals(r.zone)&&this.loc.equals(r.loc)}toRelative(r={}){if(!this.isValid)return null;const h=r.base||je.fromObject({},{zone:this.zone}),p=r.padding?this<h?-r.padding:r.padding:0;let j=["years","months","days","hours","minutes","seconds"],C=r.unit;return Array.isArray(r.unit)&&(j=r.unit,C=void 0),Vn(h,this.plus(p),{...r,numeric:"always",units:j,unit:C})}toRelativeCalendar(r={}){return this.isValid?Vn(r.base||je.fromObject({},{zone:this.zone}),this,{...r,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...r){if(!r.every(je.isDateTime))throw new v("min requires all arguments be DateTimes");return yu(r,h=>h.valueOf(),Math.min)}static max(...r){if(!r.every(je.isDateTime))throw new v("max requires all arguments be DateTimes");return yu(r,h=>h.valueOf(),Math.max)}static fromFormatExplain(r,h,p={}){const{locale:j=null,numberingSystem:C=null}=p,k=xe.fromOpts({locale:j,numberingSystem:C,defaultToEN:!0});return ri(k,r,h)}static fromStringExplain(r,h,p={}){return je.fromFormatExplain(r,h,p)}static buildFormatParser(r,h={}){const{locale:p=null,numberingSystem:j=null}=h,C=xe.fromOpts({locale:p,numberingSystem:j,defaultToEN:!0});return new si(C,r)}static fromFormatParser(r,h,p={}){if(Oe(r)||Oe(h))throw new v("fromFormatParser requires an input string and a format parser");const{locale:j=null,numberingSystem:C=null}=p,k=xe.fromOpts({locale:j,numberingSystem:C,defaultToEN:!0});if(!k.equals(h.locale))throw new v(`fromFormatParser called with a locale of ${k}, but the format parser was created for ${h.locale}`);const{result:z,zone:q,specificOffset:he,invalidReason:be}=h.explainFromTokens(r);return be?je.invalid(be):Ea(z,q,p,`format ${h.format}`,r,he)}static get DATE_SHORT(){return E}static get DATE_MED(){return S}static get DATE_MED_WITH_WEEKDAY(){return D}static get DATE_FULL(){return A}static get DATE_HUGE(){return M}static get TIME_SIMPLE(){return Y}static get TIME_WITH_SECONDS(){return X}static get TIME_WITH_SHORT_OFFSET(){return Q}static get TIME_WITH_LONG_OFFSET(){return G}static get TIME_24_SIMPLE(){return ee}static get TIME_24_WITH_SECONDS(){return le}static get TIME_24_WITH_SHORT_OFFSET(){return te}static get TIME_24_WITH_LONG_OFFSET(){return W}static get DATETIME_SHORT(){return J}static get DATETIME_SHORT_WITH_SECONDS(){return R}static get DATETIME_MED(){return U}static get DATETIME_MED_WITH_SECONDS(){return ne}static get DATETIME_MED_WITH_WEEKDAY(){return F}static get DATETIME_FULL(){return ce}static get DATETIME_FULL_WITH_SECONDS(){return ye}static get DATETIME_HUGE(){return me}static get DATETIME_HUGE_WITH_SECONDS(){return B}}function ga(g){if(je.isDateTime(g))return g;if(g&&g.valueOf&&da(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 Ba="3.7.2";return Sa.DateTime=je,Sa.Duration=Pe,Sa.FixedOffsetZone=$e,Sa.IANAZone=Ee,Sa.Info=ms,Sa.Interval=vt,Sa.InvalidZone=dt,Sa.Settings=xt,Sa.SystemZone=Me,Sa.VERSION=Ba,Sa.Zone=ue,Sa}var Og;function Wf(){return Og||(Og=1,(function(l){var f,v,N,b,y,Mf,E,Fl;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const u=n2();var d;(function(A){A.Second="Second",A.Minute="Minute",A.Hour="Hour",A.Day="Day",A.Month="Month",A.Year="Year"})(d||(l.TimeUnit=d={}));var o;(function(A){A.Add="Add",A.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,Y){st(this,E);st(this,f);st(this,v,null);st(this,N,null);st(this,b,{add:{[d.Year]:this.addYear.bind(this),[d.Month]:this.addMonth.bind(this),[d.Day]:this.addDay.bind(this),[d.Hour]:this.addHour.bind(this),[d.Minute]:this.addMinute.bind(this),[d.Second]:this.addSecond.bind(this)},subtract:{[d.Year]:this.subtractYear.bind(this),[d.Month]:this.subtractMonth.bind(this),[d.Day]:this.subtractDay.bind(this),[d.Hour]:this.subtractHour.bind(this),[d.Minute]:this.subtractMinute.bind(this),[d.Second]:this.subtractSecond.bind(this)}});const X={zone:Y};if(M?M instanceof D?(Te(this,f,K(M,f)),Te(this,v,K(M,v)),Te(this,N,K(M,N))):M instanceof Date?Te(this,f,u.DateTime.fromJSDate(M,X)):typeof M=="number"?Te(this,f,u.DateTime.fromMillis(M,X)):(Te(this,f,u.DateTime.fromISO(M,X)),K(this,f).isValid||Te(this,f,u.DateTime.fromRFC2822(M,X)),K(this,f).isValid||Te(this,f,u.DateTime.fromSQL(M,X)),K(this,f).isValid||Te(this,f,u.DateTime.fromFormat(M,"EEE, d MMM yyyy HH:mm:ss",X))):Te(this,f,u.DateTime.local()),!K(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${M}`);Y&&Y!==K(this,f).zoneName&&Te(this,f,K(this,f).setZone(Y))}get dstStart(){return K(this,v)}set dstStart(M){Te(this,v,M)}get dstEnd(){return K(this,N)}set dstEnd(M){Te(this,N,M)}addYear(){Te(this,f,K(this,f).plus({years:1}))}addMonth(){Te(this,f,K(this,f).plus({months:1}).startOf("month"))}addDay(){Te(this,f,K(this,f).plus({days:1}).startOf("day"))}addHour(){Te(this,f,K(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Te(this,f,K(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Te(this,f,K(this,f).plus({seconds:1}))}subtractYear(){Te(this,f,K(this,f).minus({years:1}))}subtractMonth(){Te(this,f,K(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Te(this,f,K(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Te(this,f,K(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Te(this,f,K(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Te(this,f,K(this,f).minus({seconds:1}))}addUnit(M){K(this,b).add[M]()}subtractUnit(M){K(this,b).subtract[M]()}invokeDateOperation(M,Y){if(M===o.Add){this.addUnit(Y);return}if(M===o.Subtract){this.subtractUnit(Y);return}throw new Error(`Invalid verb: ${M}`)}getDate(){return K(this,f).day}getFullYear(){return K(this,f).year}getDay(){const M=K(this,f).weekday;return M===7?0:M}getMonth(){return K(this,f).month-1}getHours(){return K(this,f).hour}getMinutes(){return K(this,f).minute}getSeconds(){return K(this,f).second}getMilliseconds(){return K(this,f).millisecond}getUTCOffset(){return K(this,f).offset}setStartOfDay(){Te(this,f,K(this,f).startOf("day"))}setEndOfDay(){Te(this,f,K(this,f).endOf("day"))}getTime(){return K(this,f).valueOf()}getUTCDate(){return Ne(this,E,Fl).call(this).day}getUTCFullYear(){return Ne(this,E,Fl).call(this).year}getUTCDay(){const M=Ne(this,E,Fl).call(this).weekday;return M===7?0:M}getUTCMonth(){return Ne(this,E,Fl).call(this).month-1}getUTCHours(){return Ne(this,E,Fl).call(this).hour}getUTCMinutes(){return Ne(this,E,Fl).call(this).minute}getUTCSeconds(){return Ne(this,E,Fl).call(this).second}toISOString(){return K(this,f).toUTC().toISO()}toJSON(){return K(this,f).toJSON()}setDate(M){Te(this,f,K(this,f).set({day:M}))}setFullYear(M){Te(this,f,K(this,f).set({year:M}))}setDay(M){Te(this,f,K(this,f).set({weekday:M}))}setMonth(M){Te(this,f,K(this,f).set({month:M+1}))}setHours(M){Te(this,f,K(this,f).set({hour:M}))}setMinutes(M){Te(this,f,K(this,f).set({minute:M}))}setSeconds(M){Te(this,f,K(this,f).set({second:M}))}setMilliseconds(M){Te(this,f,K(this,f).set({millisecond:M}))}toString(){return this.toDate().toString()}toDate(){return K(this,f).toJSDate()}isLastDayOfMonth(){var X;const{day:M,month:Y}=K(this,f);if(Y===2){const Q=Ne(X=D,y,Mf).call(X,K(this,f).year);return M===l.DAYS_IN_MONTH[Y-1]-(Q?0:1)}return M===l.DAYS_IN_MONTH[Y-1]}isLastWeekdayOfMonth(){var Q;const{day:M,month:Y}=K(this,f);let X;return Y===2?X=l.DAYS_IN_MONTH[Y-1]-(Ne(Q=D,y,Mf).call(Q,K(this,f).year)?0:1):X=l.DAYS_IN_MONTH[Y-1],M>X-7}applyDateOperation(M,Y,X){if(Y===d.Month||Y===d.Day){this.invokeDateOperation(M,Y);return}const Q=this.getHours();this.invokeDateOperation(M,Y);const G=this.getHours(),ee=G-Q;ee===2?X!==24&&(this.dstStart=G):ee===0&&this.getMinutes()===0&&this.getSeconds()===0&&X!==24&&(this.dstEnd=G)}};f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakMap,y=new WeakSet,Mf=function(M){return M%4===0&&M%100!==0||M%400===0},E=new WeakSet,Fl=function(){return K(this,f).toUTC()},st(D,y);let m=D;l.CronDate=m,l.default=m})(pf)),pf}var Dg;function l2(){if(Dg)return Ji;Dg=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronMonth=void 0;const l=Wf(),u=Ls(),d=1,o=12,m=Object.freeze([]);let f=class extends u.CronField{static get min(){return d}static get max(){return o}static get chars(){return m}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(N,b){super(N,b),this.validate()}get values(){return super.values}};return Ji.CronMonth=f,Ji}var Ki={},Rg;function s2(){if(Rg)return Ki;Rg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronSecond=void 0;const l=Ls(),u=0,d=59,o=Object.freeze([]);let m=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Ki.CronSecond=m,Ki}var Ag;function If(){return Ag||(Ag=1,(function(l){var u=Rs&&Rs.__createBinding||(Object.create?(function(o,m,f,v){v===void 0&&(v=f);var N=Object.getOwnPropertyDescriptor(m,f);(!N||("get"in N?!m.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return m[f]}}),Object.defineProperty(o,v,N)}):(function(o,m,f,v){v===void 0&&(v=f),o[v]=m[f]})),d=Rs&&Rs.__exportStar||function(o,m){for(var f in o)f!=="default"&&!Object.prototype.hasOwnProperty.call(m,f)&&u(m,o,f)};Object.defineProperty(l,"__esModule",{value:!0}),d(JS(),l),d(KS(),l),d(e2(),l),d(Ls(),l),d(t2(),l),d(a2(),l),d(l2(),l),d(s2(),l)})(Rs)),Rs}var _g;function Qy(){var d,o,m,f,v,N,b,y,Zy,Py;if(_g)return Zi;_g=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronFieldCollection=void 0;const l=If();let u=(y=class{constructor({second:D,minute:A,hour:M,dayOfMonth:Y,month:X,dayOfWeek:Q}){st(this,d);st(this,o);st(this,m);st(this,f);st(this,v);st(this,N);if(!D)throw new Error("Validation error, Field second is missing");if(!A)throw new Error("Validation error, Field minute is missing");if(!M)throw new Error("Validation error, Field hour is missing");if(!Y)throw new Error("Validation error, Field dayOfMonth is missing");if(!X)throw new Error("Validation error, Field month is missing");if(!Q)throw new Error("Validation error, Field dayOfWeek is missing");if(X.values.length===1&&!Y.hasLastChar&&!(parseInt(Y.values[0],10)<=l.CronMonth.daysInMonth[X.values[0]-1]))throw new Error("Invalid explicit day of month definition");Te(this,d,D),Te(this,o,A),Te(this,m,M),Te(this,v,X),Te(this,N,Q),Te(this,f,Y)}static from(D,A){return new y({second:this.resolveField(l.CronSecond,D.second,A.second),minute:this.resolveField(l.CronMinute,D.minute,A.minute),hour:this.resolveField(l.CronHour,D.hour,A.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,D.dayOfMonth,A.dayOfMonth),month:this.resolveField(l.CronMonth,D.month,A.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,D.dayOfWeek,A.dayOfWeek)})}static resolveField(D,A,M){return M?M instanceof l.CronField?M:new D(M):A}get second(){return K(this,d)}get minute(){return K(this,o)}get hour(){return K(this,m)}get dayOfMonth(){return K(this,f)}get month(){return K(this,v)}get dayOfWeek(){return K(this,N)}static compactField(D){if(D.length===0)return[];const A=[];let M;return D.forEach((Y,X,Q)=>{if(M===void 0){M={start:Y,count:1};return}const G=Q[X-1]||M.start,ee=Q[X+1];if(Y==="L"||Y==="W"){A.push(M),A.push({start:Y,count:1}),M=void 0;return}if(M.step===void 0&&ee!==void 0){const le=Y-G,te=ee-Y;if(le<=te){M={...M,count:2,end:Y,step:le};return}M.step=1}Y-(M.end??0)===M.step?(M.count++,M.end=Y):(M.count===1?A.push({start:M.start,count:1}):M.count===2?(A.push({start:M.start,count:1}),A.push({start:M.end??G,count:1})):A.push(M),M={start:Y,count:1})}),M&&A.push(M),A}stringifyField(D){var X;let A=D.max,M=D.values;if(D instanceof l.CronDayOfWeek){A=6;const Q=K(this,N).values;M=Q[Q.length-1]===7?Q.slice(0,-1):Q}D instanceof l.CronDayOfMonth&&(A=K(this,v).values.length===1?l.CronMonth.daysInMonth[K(this,v).values[0]-1]:D.max);const Y=y.compactField(M);if(Y.length===1){const Q=Ne(X=y,b,Zy).call(X,D,Y[0],A);if(Q)return Q}return Y.map(Q=>{var ee;const G=Q.count===1?Q.start.toString():Ne(ee=y,b,Py).call(ee,Q,A);return D instanceof l.CronDayOfWeek&&D.nthDay>0?`${G}#${D.nthDay}`:G}).join(",")}stringify(D=!1){const A=[];return D&&A.push(this.stringifyField(K(this,d))),A.push(this.stringifyField(K(this,o)),this.stringifyField(K(this,m)),this.stringifyField(K(this,f)),this.stringifyField(K(this,v)),this.stringifyField(K(this,N))),A.join(" ")}serialize(){return{second:K(this,d).serialize(),minute:K(this,o).serialize(),hour:K(this,m).serialize(),dayOfMonth:K(this,f).serialize(),month:K(this,v).serialize(),dayOfWeek:K(this,N).serialize()}}},d=new WeakMap,o=new WeakMap,m=new WeakMap,f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakSet,Zy=function(D,A,M){const Y=A.step;return Y?Y===1&&A.start===D.min&&A.end&&A.end>=M?D.hasQuestionMarkChar?"?":"*":Y!==1&&A.start===D.min&&A.end&&A.end>=M-Y+1?`*/${Y}`:null:null},Py=function(D,A){const M=D.step;if(M===1)return`${D.start}-${D.end}`;const Y=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*Y>D.end){const X=(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 Q={length:D.end-D.start+1};return Array.from(Q,X).filter(G=>G!==null).join(",")}return D.end===A-M+1?`${D.start}/${M}`:`${D.start}-${D.end}/${M}`},st(y,b),y);return Zi.CronFieldCollection=u,Zi}var vf={},kg;function tx(){return kg||(kg=1,(function(l){var m,f,v,N,b,y,w,E,S,Gl,A,_s,Wy,Iy,Xy,Jy,Cf,Ky,ex,Ar;Object.defineProperty(l,"__esModule",{value:!0}),l.CronExpression=l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const u=Wf();l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const d=1e4,J=class J{constructor(U,ne){st(this,A);st(this,m);st(this,f);st(this,v);st(this,N);st(this,b);st(this,y);st(this,w,null);st(this,E,!1);Te(this,m,ne),Te(this,f,ne.tz),Te(this,N,ne.startDate?new u.CronDate(ne.startDate,K(this,f)):null),Te(this,b,ne.endDate?new u.CronDate(ne.endDate,K(this,f)):null);let F=ne.currentDate??ne.startDate;if(F){const ce=new u.CronDate(F,K(this,f));K(this,N)&&ce.getTime()<K(this,N).getTime()?F=K(this,N):K(this,b)&&ce.getTime()>K(this,b).getTime()&&(F=K(this,b))}Te(this,v,new u.CronDate(F,K(this,f))),Te(this,y,U)}get fields(){return K(this,y)}static fieldsToExpression(U,ne){return new J(U,ne||{})}next(){return Ne(this,A,Ar).call(this)}prev(){return Ne(this,A,Ar).call(this,!0)}hasNext(){const U=K(this,v);try{return Ne(this,A,Ar).call(this),!0}catch{return!1}finally{Te(this,v,U)}}hasPrev(){const U=K(this,v);try{return Ne(this,A,Ar).call(this,!0),!0}catch{return!1}finally{Te(this,v,U)}}take(U){const ne=[];if(U>=0)for(let F=0;F<U;F++)try{ne.push(this.next())}catch{return ne}else for(let F=0;F>U;F--)try{ne.push(this.prev())}catch{return ne}return ne}reset(U){Te(this,v,new u.CronDate(U||K(this,m).currentDate))}stringify(U=!1){return K(this,y).stringify(U)}includesDate(U){const{second:ne,minute:F,hour:ce,month:ye}=K(this,y),me=new u.CronDate(U,K(this,f));return!(!ne.values.includes(me.getSeconds())||!F.values.includes(me.getMinutes())||!ce.values.includes(me.getHours())||!ye.values.includes(me.getMonth()+1)||!Ne(this,A,Cf).call(this,me)||K(this,y).dayOfWeek.nthDay>0&&Math.ceil(me.getDate()/7)!==K(this,y).dayOfWeek.nthDay)}toString(){return K(this,m).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ne(this,A,Ar).call(this),done:!this.hasNext()})}}};m=new WeakMap,f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakMap,y=new WeakMap,w=new WeakMap,E=new WeakMap,S=new WeakSet,Gl=function(U,ne){return ne.some(F=>F===U)},A=new WeakSet,_s=function(U,ne){return U[ne?U.length-1:0]},Wy=function(U){const ne=`${U.getFullYear()}-${U.getMonth()+1}-${U.getDate()}`;if(K(this,w)===ne)return K(this,E);const F=new u.CronDate(U);F.setStartOfDay();const ce=new u.CronDate(U);return ce.setEndOfDay(),Te(this,w,ne),Te(this,E,F.getUTCOffset()!==ce.getUTCOffset()),K(this,E)},Iy=function(U,ne,F){const ce=K(this,y).second.values,ye=U.getSeconds(),me=K(this,y).second.findNearestValue(ye,F);if(me!==null){U.setSeconds(me);return}U.applyDateOperation(ne,u.TimeUnit.Minute,K(this,y).hour.values.length),U.setSeconds(Ne(this,A,_s).call(this,ce,F))},Xy=function(U,ne,F){const ce=K(this,y).minute.values,ye=K(this,y).second.values,me=U.getMinutes(),B=K(this,y).minute.findNearestValue(me,F);if(B!==null){U.setMinutes(B),U.setSeconds(Ne(this,A,_s).call(this,ye,F));return}U.applyDateOperation(ne,u.TimeUnit.Hour,K(this,y).hour.values.length),U.setMinutes(Ne(this,A,_s).call(this,ce,F)),U.setSeconds(Ne(this,A,_s).call(this,ye,F))},Jy=function(U,ne){const F=ne.isLastWeekdayOfMonth();return U.some(ce=>{const ye=parseInt(ce.toString().charAt(0),10)%7;if(Number.isNaN(ye))throw new Error(`Invalid last weekday of the month expression: ${ce}`);return ne.getDay()===ye&&F})},Cf=function(U){var ue,se,Me;const ne=K(this,y).dayOfMonth.isWildcard,F=!ne,ce=K(this,y).dayOfWeek.isWildcard,ye=!ce,me=Ne(ue=J,S,Gl).call(ue,U.getDate(),K(this,y).dayOfMonth.values)||K(this,y).dayOfMonth.hasLastChar&&U.isLastDayOfMonth(),B=Ne(se=J,S,Gl).call(se,U.getDay(),K(this,y).dayOfWeek.values)||K(this,y).dayOfWeek.hasLastChar&&Ne(Me=J,S,Jy).call(Me,K(this,y).dayOfWeek.values,U);return!!(F&&ye&&(me||B)||me&&!ye||ne&&!ce&&B)},Ky=function(U,ne,F){var qe,_;const ce=K(this,y).hour.values,ye=ce,me=U.getHours(),B=Ne(qe=J,S,Gl).call(qe,me,ce),ue=U.dstStart===me,se=U.dstEnd===me;if(ue)return Ne(_=J,S,Gl).call(_,me-1,ce)?!0:(U.invokeDateOperation(ne,u.TimeUnit.Hour),!1);if(se&&!F)return U.dstEnd=null,U.applyDateOperation(u.DateMathOp.Add,u.TimeUnit.Hour,ye.length),!1;if(B)return!0;U.dstStart=null;const Me=K(this,y).hour.findNearestValue(me,F);if(Me===null)return U.applyDateOperation(ne,u.TimeUnit.Day,ye.length),!1;if(Ne(this,A,Wy).call(this,U)){const re=F?me-Me:Me-me;for(let ge=0;ge<re;ge++)U.applyDateOperation(ne,u.TimeUnit.Hour,ye.length)}else U.setHours(Me);return U.setMinutes(Ne(this,A,_s).call(this,K(this,y).minute.values,F)),U.setSeconds(Ne(this,A,_s).call(this,K(this,y).second.values,F)),!1},ex=function(U){if(!K(this,N)&&!K(this,b))return;const ne=U.getTime();if(K(this,N)&&ne<K(this,N).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(K(this,b)&&ne>K(this,b).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Ar=function(U=!1){var me,B,ue;const ne=U?u.DateMathOp.Subtract:u.DateMathOp.Add,F=new u.CronDate(K(this,v)),ce=F.getTime();let ye=0;for(;++ye<d;){if(Ne(this,A,ex).call(this,F),!Ne(this,A,Cf).call(this,F)){F.applyDateOperation(ne,u.TimeUnit.Day,K(this,y).hour.values.length);continue}if(!(K(this,y).dayOfWeek.nthDay<=0||Math.ceil(F.getDate()/7)===K(this,y).dayOfWeek.nthDay)){F.applyDateOperation(ne,u.TimeUnit.Day,K(this,y).hour.values.length);continue}if(!Ne(me=J,S,Gl).call(me,F.getMonth()+1,K(this,y).month.values)){F.applyDateOperation(ne,u.TimeUnit.Month,K(this,y).hour.values.length);continue}if(Ne(this,A,Ky).call(this,F,ne,U)){if(!Ne(B=J,S,Gl).call(B,F.getMinutes(),K(this,y).minute.values)){Ne(this,A,Xy).call(this,F,ne,U);continue}if(!Ne(ue=J,S,Gl).call(ue,F.getSeconds(),K(this,y).second.values)){Ne(this,A,Iy).call(this,F,ne,U);continue}if(ce===F.getTime()){(ne==="Add"||F.getMilliseconds()===0)&&F.applyDateOperation(ne,u.TimeUnit.Second,K(this,y).hour.values.length);continue}break}}if(ye>d)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return F.getMilliseconds()!==0&&F.setMilliseconds(0),Te(this,v,F),F},st(J,S);let o=J;l.CronExpression=o,l.default=o})(vf)),vf}var Hc={},zg;function r2(){if(zg)return Hc;zg=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.seededRandom=d;function l(o){let m=2166136261;for(let f=0;f<o.length;f++)m^=o.charCodeAt(f),m=Math.imul(m,16777619);return()=>m>>>0}function u(o){return()=>{let m=o+=1831565813;return m=Math.imul(m^m>>>15,m|1),m^=m+Math.imul(m^m>>>7,m|61),((m^m>>>14)>>>0)/4294967296}}function d(o){const m=o?l(o)():Math.floor(Math.random()*1e10);return u(m)}return Hc}var Ug;function Df(){var y,w,ax,ks,nx,lx,sx,rx,ix,ux,cx,Of,ox,dx;if(Ug)return Ra;Ug=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.CronExpressionParser=Ra.DayOfWeek=Ra.Months=Ra.CronUnit=Ra.PredefinedExpressions=void 0;const l=Qy(),u=tx(),d=r2(),o=If();var m;(function(W){W["@yearly"]="0 0 0 1 1 *",W["@annually"]="0 0 0 1 1 *",W["@monthly"]="0 0 0 1 * *",W["@weekly"]="0 0 0 * * 0",W["@daily"]="0 0 0 * * *",W["@hourly"]="0 0 * * * *",W["@minutely"]="0 * * * * *",W["@secondly"]="* * * * * *",W["@weekdays"]="0 0 0 * * 1-5",W["@weekends"]="0 0 0 * * 0,6"})(m||(Ra.PredefinedExpressions=m={}));var f;(function(W){W.Second="Second",W.Minute="Minute",W.Hour="Hour",W.DayOfMonth="DayOfMonth",W.Month="Month",W.DayOfWeek="DayOfWeek"})(f||(Ra.CronUnit=f={}));var v;(function(W){W[W.jan=1]="jan",W[W.feb=2]="feb",W[W.mar=3]="mar",W[W.apr=4]="apr",W[W.may=5]="may",W[W.jun=6]="jun",W[W.jul=7]="jul",W[W.aug=8]="aug",W[W.sep=9]="sep",W[W.oct=10]="oct",W[W.nov=11]="nov",W[W.dec=12]="dec"})(v||(Ra.Months=v={}));var N;(function(W){W[W.sun=0]="sun",W[W.mon=1]="mon",W[W.tue=2]="tue",W[W.wed=3]="wed",W[W.thu=4]="thu",W[W.fri=5]="fri",W[W.sat=6]="sat"})(N||(Ra.DayOfWeek=N={}));let b=(w=class{static parse(J,R={}){var ge,pe,De,Ee,Ue,ke,et,Ft;const{strict:U=!1,hashSeed:ne}=R,F=(0,d.seededRandom)(ne);J=m[J]||J;const ce=Ne(ge=w,y,ax).call(ge,J,U);if(!(ce.dayOfMonth==="*"||ce.dayOfWeek==="*"||!U))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ye=Ne(pe=w,y,ks).call(pe,f.Second,ce.second,o.CronSecond.constraints,F),me=Ne(De=w,y,ks).call(De,f.Minute,ce.minute,o.CronMinute.constraints,F),B=Ne(Ee=w,y,ks).call(Ee,f.Hour,ce.hour,o.CronHour.constraints,F),ue=Ne(Ue=w,y,ks).call(Ue,f.Month,ce.month,o.CronMonth.constraints,F),se=Ne(ke=w,y,ks).call(ke,f.DayOfMonth,ce.dayOfMonth,o.CronDayOfMonth.constraints,F),{dayOfWeek:Me,nthDayOfWeek:qe}=Ne(et=w,y,ox).call(et,ce.dayOfWeek),_=Ne(Ft=w,y,ks).call(Ft,f.DayOfWeek,Me,o.CronDayOfWeek.constraints,F),re=new l.CronFieldCollection({second:new o.CronSecond(ye,{rawValue:ce.second}),minute:new o.CronMinute(me,{rawValue:ce.minute}),hour:new o.CronHour(B,{rawValue:ce.hour}),dayOfMonth:new o.CronDayOfMonth(se,{rawValue:ce.dayOfMonth}),month:new o.CronMonth(ue,{rawValue:ce.month}),dayOfWeek:new o.CronDayOfWeek(_,{rawValue:ce.dayOfWeek,nthDayOfWeek:qe})});return new u.CronExpression(re,{...R,expression:J})}},y=new WeakSet,ax=function(J,R){if(R&&!J.length)throw new Error("Invalid cron expression");J=J||"0 * * * * *";const U=J.trim().split(/\s+/);if(R&&U.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(U.length>6)throw new Error("Invalid cron expression, too many fields");const ne=["*","*","*","*","*","0"];U.length<ne.length&&U.unshift(...ne.slice(U.length));const[F,ce,ye,me,B,ue]=U;return{second:F,minute:ce,hour:ye,dayOfMonth:me,month:B,dayOfWeek:ue}},ks=function(J,R,U,ne){if((J===f.Month||J===f.DayOfWeek)&&(R=R.replace(/[a-z]{3}/gi,F=>{F=F.toLowerCase();const ce=v[F]||N[F];if(ce===void 0)throw new Error(`Validation error, cannot resolve alias "${F}"`);return ce.toString()})),!U.validChars.test(R))throw new Error(`Invalid characters, got value: ${R}`);return R=Ne(this,y,nx).call(this,R,U),R=Ne(this,y,lx).call(this,R,U,ne),Ne(this,y,sx).call(this,J,R,U)},nx=function(J,R){return J.replace(/[*?]/g,R.min+"-"+R.max)},lx=function(J,R,U){const ne=U();return J.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(F,ce,ye,me)=>{if(ce&&ye&&me){const B=parseInt(ce,10),ue=parseInt(ye,10),se=parseInt(me,10);if(B>ue)throw new Error(`Invalid range: ${B}-${ue}, min > max`);if(se<=0)throw new Error(`Invalid step: ${se}, must be positive`);const Me=Math.max(B,R.min),qe=Math.floor(ne*se),_=[];for(let re=Math.floor(Me/se)*se+qe;re<=ue;re+=se)re>=Me&&_.push(re);return _.join(",")}else if(ce&&ye){const B=parseInt(ce,10),ue=parseInt(ye,10);if(B>ue)throw new Error(`Invalid range: ${B}-${ue}, min > max`);return String(Math.floor(ne*(ue-B+1))+B)}else if(me){const B=parseInt(me,10);if(B<=0)throw new Error(`Invalid step: ${B}, must be positive`);const ue=Math.floor(ne*B),se=[];for(let Me=Math.floor(R.min/B)*B+ue;Me<=R.max;Me+=B)Me>=R.min&&se.push(Me);return se.join(",")}else return String(Math.floor(ne*(R.max-R.min+1)+R.min))})},sx=function(J,R,U){const ne=[];function F(ye,me){var B;if(Array.isArray(ye))ne.push(...ye);else if(Ne(B=w,y,dx).call(B,me,ye))ne.push(ye);else{const ue=parseInt(ye.toString(),10);if(!(ue>=me.min&&ue<=me.max))throw new Error(`Constraint error, got value ${ye} expected range ${me.min}-${me.max}`);ne.push(J===f.DayOfWeek?ue%7:ye)}}return R.split(",").forEach(ye=>{var me;if(!(ye.length>0))throw new Error("Invalid list value format");F(Ne(me=w,y,rx).call(me,J,ye,U),U)}),ne},rx=function(J,R,U){var F,ce;const ne=R.split("/");if(ne.length>2)throw new Error(`Invalid repeat: ${R}`);return ne.length===2?(isNaN(parseInt(ne[0],10))||(ne[0]=`${ne[0]}-${U.max}`),Ne(F=w,y,Of).call(F,J,ne[0],parseInt(ne[1],10),U)):Ne(ce=w,y,Of).call(ce,J,R,1,U)},ix=function(J,R,U){if(!(!isNaN(J)&&!isNaN(R)&&J>=U.min&&R<=U.max))throw new Error(`Constraint error, got range ${J}-${R} expected range ${U.min}-${U.max}`);if(J>R)throw new Error(`Invalid range: ${J}-${R}, min(${J}) > max(${R})`)},ux=function(J){if(!(!isNaN(J)&&J>0))throw new Error(`Constraint error, cannot repeat at every ${J} time.`)},cx=function(J,R,U,ne){const F=[];J===f.DayOfWeek&&U%7===0&&F.push(0);for(let ce=R;ce<=U;ce+=ne)F.indexOf(ce)===-1&&F.push(ce);return F},Of=function(J,R,U,ne){const F=R.split("-");if(F.length<=1)return isNaN(+R)?R:+R;const[ce,ye]=F.map(me=>parseInt(me,10));return Ne(this,y,ix).call(this,ce,ye,ne),Ne(this,y,ux).call(this,U),Ne(this,y,cx).call(this,J,ce,ye,U)},ox=function(J){const R=J.split("#");if(R.length<=1)return{dayOfWeek:R[0]};const U=+R[R.length-1],ne=J.match(/([,-/])/);if(ne!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ne==null?void 0:ne[0]}\` special characters are incompatible`);if(!(R.length<=2&&!isNaN(U)&&U>=1&&U<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:R[0],nthDayOfWeek:U}},dx=function(J,R){return J.chars.some(U=>R.toString().includes(U))},st(w,y),w);return Ra.CronExpressionParser=b,Ra}var dn={};const i2={},u2=Object.freeze(Object.defineProperty({__proto__:null,default:i2},Symbol.toStringTag,{value:"Module"})),Lg=qp(u2);var Hg;function c2(){var f,v,Rf,fx;if(Hg)return dn;Hg=1;var l=dn&&dn.__createBinding||(Object.create?(function(y,w,E,S){S===void 0&&(S=E);var D=Object.getOwnPropertyDescriptor(w,E);(!D||("get"in D?!w.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(y,S,D)}):(function(y,w,E,S){S===void 0&&(S=E),y[S]=w[E]})),u=dn&&dn.__setModuleDefault||(Object.create?(function(y,w){Object.defineProperty(y,"default",{enumerable:!0,value:w})}):function(y,w){y.default=w}),d=dn&&dn.__importStar||(function(){var y=function(w){return y=Object.getOwnPropertyNames||function(E){var S=[];for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(S[S.length]=D);return S},y(w)};return function(w){if(w&&w.__esModule)return w;var E={};if(w!=null)for(var S=y(w),D=0;D<S.length;D++)S[D]!=="default"&&l(E,w,S[D]);return u(E,w),E}})();Object.defineProperty(dn,"__esModule",{value:!0}),dn.CronFileParser=void 0;const o=Df();let m=(v=class{static async parseFile(w){var D;const{readFile:E}=await Promise.resolve().then(()=>d(Lg)),S=await E(w,"utf8");return Ne(D=v,f,Rf).call(D,S)}static parseFileSync(w){var D;const{readFileSync:E}=Lg,S=E(w,"utf8");return Ne(D=v,f,Rf).call(D,S)}},f=new WeakSet,Rf=function(w){var D;const E=w.split(`
|
|
381
|
+
`),S={variables:{},expressions:[],errors:{}};for(const A of E){const M=A.trim();if(M.length===0||M.startsWith("#"))continue;const Y=M.match(/^(.*)=(.*)$/);if(Y){const[,X,Q]=Y;S.variables[X]=Q.replace(/["']/g,"");continue}try{const X=Ne(D=v,f,fx).call(D,M);S.expressions.push(X.interval)}catch(X){S.errors[M]=X}}return S},fx=function(w){const E=w.split(" ");return{interval:o.CronExpressionParser.parse(E.slice(0,5).join(" ")),command:E.slice(5,E.length)}},st(v,f),v);return dn.CronFileParser=m,dn}var qg;function o2(){return qg||(qg=1,(function(l){var u=Ds&&Ds.__createBinding||(Object.create?(function(y,w,E,S){S===void 0&&(S=E);var D=Object.getOwnPropertyDescriptor(w,E);(!D||("get"in D?!w.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(y,S,D)}):(function(y,w,E,S){S===void 0&&(S=E),y[S]=w[E]})),d=Ds&&Ds.__exportStar||function(y,w){for(var E in y)E!=="default"&&!Object.prototype.hasOwnProperty.call(w,E)&&u(w,y,E)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const o=Df();var m=Wf();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return m.CronDate}});var f=Qy();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var v=tx();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return v.CronExpression}});var N=Df();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return N.CronExpressionParser}});var b=c2();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return b.CronFileParser}}),d(If(),l),l.default=o.CronExpressionParser})(Ds)),Ds}var d2=o2();const hx=6048e5,f2=864e5,h2=6e4,m2=36e5,Vg=Symbol.for("constructDateFrom");function Aa(l,u){return typeof l=="function"?l(u):l&&typeof l=="object"&&Vg in l?l[Vg](u):l instanceof Date?new l.constructor(u):new Date(u)}function Rt(l,u){return Aa(u||l,l)}function g2(l,u,d){return Aa(l,+Rt(l)+u)}function qc(l,u,d){return g2(l,u*m2)}let y2={};function eo(){return y2}function ru(l,u){var N,b,y,w;const d=eo(),o=(u==null?void 0:u.weekStartsOn)??((b=(N=u==null?void 0:u.locale)==null?void 0:N.options)==null?void 0:b.weekStartsOn)??d.weekStartsOn??((w=(y=d.locale)==null?void 0:y.options)==null?void 0:w.weekStartsOn)??0,m=Rt(l,u==null?void 0:u.in),f=m.getDay(),v=(f<o?7:0)+f-o;return m.setDate(m.getDate()-v),m.setHours(0,0,0,0),m}function Wc(l,u){return ru(l,{...u,weekStartsOn:1})}function mx(l,u){const d=Rt(l,u==null?void 0:u.in),o=d.getFullYear(),m=Aa(d,0);m.setFullYear(o+1,0,4),m.setHours(0,0,0,0);const f=Wc(m),v=Aa(d,0);v.setFullYear(o,0,4),v.setHours(0,0,0,0);const N=Wc(v);return d.getTime()>=f.getTime()?o+1:d.getTime()>=N.getTime()?o:o-1}function Bg(l){const u=Rt(l),d=new Date(Date.UTC(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours(),u.getMinutes(),u.getSeconds(),u.getMilliseconds()));return d.setUTCFullYear(u.getFullYear()),+l-+d}function x2(l,...u){const d=Aa.bind(null,u.find(o=>typeof o=="object"));return u.map(d)}function Yg(l,u){const d=Rt(l,u==null?void 0:u.in);return d.setHours(0,0,0,0),d}function p2(l,u,d){const[o,m]=x2(d==null?void 0:d.in,l,u),f=Yg(o),v=Yg(m),N=+f-Bg(f),b=+v-Bg(v);return Math.round((N-b)/f2)}function v2(l,u){const d=mx(l,u),o=Aa(l,0);return o.setFullYear(d,0,4),o.setHours(0,0,0,0),Wc(o)}function b2(l,u){let d,o=u==null?void 0:u.in;return l.forEach(m=>{!o&&typeof m=="object"&&(o=Aa.bind(null,m));const f=Rt(m,o);(!d||d<f||isNaN(+f))&&(d=f)}),Aa(o,d||NaN)}function S2(l,u){let d,o=u==null?void 0:u.in;return l.forEach(m=>{!o&&typeof m=="object"&&(o=Aa.bind(null,m));const f=Rt(m,o);(!d||d>f||isNaN(+f))&&(d=f)}),Aa(o,d||NaN)}function w2(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function N2(l){return!(!w2(l)&&typeof l!="number"||isNaN(+Rt(l)))}function j2(l){return u=>{const o=(l?Math[l]:Math.trunc)(u);return o===0?0:o}}function E2(l,u){return+Rt(l)-+Rt(u)}function $g(l,u,d){const o=E2(l,u)/h2;return j2(d==null?void 0:d.roundingMethod)(o)}function T2(l,u){const d=Rt(l,u==null?void 0:u.in);return d.setFullYear(d.getFullYear(),0,1),d.setHours(0,0,0,0),d}const M2={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"}},C2=(l,u,d)=>{let o;const m=M2[l];return typeof m=="string"?o=m:u===1?o=m.one:o=m.other.replace("{{count}}",u.toString()),d!=null&&d.addSuffix?d.comparison&&d.comparison>0?"in "+o:o+" ago":o};function bf(l){return(u={})=>{const d=u.width?String(u.width):l.defaultWidth;return l.formats[d]||l.formats[l.defaultWidth]}}const O2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},D2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},R2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},A2={date:bf({formats:O2,defaultWidth:"full"}),time:bf({formats:D2,defaultWidth:"full"}),dateTime:bf({formats:R2,defaultWidth:"full"})},_2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},k2=(l,u,d,o)=>_2[l];function eu(l){return(u,d)=>{const o=d!=null&&d.context?String(d.context):"standalone";let m;if(o==="formatting"&&l.formattingValues){const v=l.defaultFormattingWidth||l.defaultWidth,N=d!=null&&d.width?String(d.width):v;m=l.formattingValues[N]||l.formattingValues[v]}else{const v=l.defaultWidth,N=d!=null&&d.width?String(d.width):l.defaultWidth;m=l.values[N]||l.values[v]}const f=l.argumentCallback?l.argumentCallback(u):u;return m[f]}}const z2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},U2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},L2={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"]},H2={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"]},q2={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"}},V2={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"}},B2=(l,u)=>{const d=Number(l),o=d%100;if(o>20||o<10)switch(o%10){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd"}return d+"th"},Y2={ordinalNumber:B2,era:eu({values:z2,defaultWidth:"wide"}),quarter:eu({values:U2,defaultWidth:"wide",argumentCallback:l=>l-1}),month:eu({values:L2,defaultWidth:"wide"}),day:eu({values:H2,defaultWidth:"wide"}),dayPeriod:eu({values:q2,defaultWidth:"wide",formattingValues:V2,defaultFormattingWidth:"wide"})};function tu(l){return(u,d={})=>{const o=d.width,m=o&&l.matchPatterns[o]||l.matchPatterns[l.defaultMatchWidth],f=u.match(m);if(!f)return null;const v=f[0],N=o&&l.parsePatterns[o]||l.parsePatterns[l.defaultParseWidth],b=Array.isArray(N)?F2(N,E=>E.test(v)):$2(N,E=>E.test(v));let y;y=l.valueCallback?l.valueCallback(b):b,y=d.valueCallback?d.valueCallback(y):y;const w=u.slice(v.length);return{value:y,rest:w}}}function $2(l,u){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&u(l[d]))return d}function F2(l,u){for(let d=0;d<l.length;d++)if(u(l[d]))return d}function G2(l){return(u,d={})=>{const o=u.match(l.matchPattern);if(!o)return null;const m=o[0],f=u.match(l.parsePattern);if(!f)return null;let v=l.valueCallback?l.valueCallback(f[0]):f[0];v=d.valueCallback?d.valueCallback(v):v;const N=u.slice(m.length);return{value:v,rest:N}}}const Z2=/^(\d+)(th|st|nd|rd)?/i,P2=/\d+/i,Q2={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},W2={any:[/^b/i,/^(a|c)/i]},I2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},X2={any:[/1/i,/2/i,/3/i,/4/i]},J2={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},K2={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]},ew={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},tw={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]},aw={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},nw={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}},lw={ordinalNumber:G2({matchPattern:Z2,parsePattern:P2,valueCallback:l=>parseInt(l,10)}),era:tu({matchPatterns:Q2,defaultMatchWidth:"wide",parsePatterns:W2,defaultParseWidth:"any"}),quarter:tu({matchPatterns:I2,defaultMatchWidth:"wide",parsePatterns:X2,defaultParseWidth:"any",valueCallback:l=>l+1}),month:tu({matchPatterns:J2,defaultMatchWidth:"wide",parsePatterns:K2,defaultParseWidth:"any"}),day:tu({matchPatterns:ew,defaultMatchWidth:"wide",parsePatterns:tw,defaultParseWidth:"any"}),dayPeriod:tu({matchPatterns:aw,defaultMatchWidth:"any",parsePatterns:nw,defaultParseWidth:"any"})},sw={code:"en-US",formatDistance:C2,formatLong:A2,formatRelative:k2,localize:Y2,match:lw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function rw(l,u){const d=Rt(l,u==null?void 0:u.in);return p2(d,T2(d))+1}function iw(l,u){const d=Rt(l,u==null?void 0:u.in),o=+Wc(d)-+v2(d);return Math.round(o/hx)+1}function gx(l,u){var w,E,S,D;const d=Rt(l,u==null?void 0:u.in),o=d.getFullYear(),m=eo(),f=(u==null?void 0:u.firstWeekContainsDate)??((E=(w=u==null?void 0:u.locale)==null?void 0:w.options)==null?void 0:E.firstWeekContainsDate)??m.firstWeekContainsDate??((D=(S=m.locale)==null?void 0:S.options)==null?void 0:D.firstWeekContainsDate)??1,v=Aa((u==null?void 0:u.in)||l,0);v.setFullYear(o+1,0,f),v.setHours(0,0,0,0);const N=ru(v,u),b=Aa((u==null?void 0:u.in)||l,0);b.setFullYear(o,0,f),b.setHours(0,0,0,0);const y=ru(b,u);return+d>=+N?o+1:+d>=+y?o:o-1}function uw(l,u){var N,b,y,w;const d=eo(),o=(u==null?void 0:u.firstWeekContainsDate)??((b=(N=u==null?void 0:u.locale)==null?void 0:N.options)==null?void 0:b.firstWeekContainsDate)??d.firstWeekContainsDate??((w=(y=d.locale)==null?void 0:y.options)==null?void 0:w.firstWeekContainsDate)??1,m=gx(l,u),f=Aa((u==null?void 0:u.in)||l,0);return f.setFullYear(m,0,o),f.setHours(0,0,0,0),ru(f,u)}function cw(l,u){const d=Rt(l,u==null?void 0:u.in),o=+ru(d,u)-+uw(d,u);return Math.round(o/hx)+1}function ot(l,u){const d=l<0?"-":"",o=Math.abs(l).toString().padStart(u,"0");return d+o}const $l={y(l,u){const d=l.getFullYear(),o=d>0?d:1-d;return ot(u==="yy"?o%100:o,u.length)},M(l,u){const d=l.getMonth();return u==="M"?String(d+1):ot(d+1,2)},d(l,u){return ot(l.getDate(),u.length)},a(l,u){const d=l.getHours()/12>=1?"pm":"am";switch(u){case"a":case"aa":return d.toUpperCase();case"aaa":return d;case"aaaaa":return d[0];case"aaaa":default:return d==="am"?"a.m.":"p.m."}},h(l,u){return ot(l.getHours()%12||12,u.length)},H(l,u){return ot(l.getHours(),u.length)},m(l,u){return ot(l.getMinutes(),u.length)},s(l,u){return ot(l.getSeconds(),u.length)},S(l,u){const d=u.length,o=l.getMilliseconds(),m=Math.trunc(o*Math.pow(10,d-3));return ot(m,u.length)}},Dr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fg={G:function(l,u,d){const o=l.getFullYear()>0?1:0;switch(u){case"G":case"GG":case"GGG":return d.era(o,{width:"abbreviated"});case"GGGGG":return d.era(o,{width:"narrow"});case"GGGG":default:return d.era(o,{width:"wide"})}},y:function(l,u,d){if(u==="yo"){const o=l.getFullYear(),m=o>0?o:1-o;return d.ordinalNumber(m,{unit:"year"})}return $l.y(l,u)},Y:function(l,u,d,o){const m=gx(l,o),f=m>0?m:1-m;if(u==="YY"){const v=f%100;return ot(v,2)}return u==="Yo"?d.ordinalNumber(f,{unit:"year"}):ot(f,u.length)},R:function(l,u){const d=mx(l);return ot(d,u.length)},u:function(l,u){const d=l.getFullYear();return ot(d,u.length)},Q:function(l,u,d){const o=Math.ceil((l.getMonth()+1)/3);switch(u){case"Q":return String(o);case"QQ":return ot(o,2);case"Qo":return d.ordinalNumber(o,{unit:"quarter"});case"QQQ":return d.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return d.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return d.quarter(o,{width:"wide",context:"formatting"})}},q:function(l,u,d){const o=Math.ceil((l.getMonth()+1)/3);switch(u){case"q":return String(o);case"qq":return ot(o,2);case"qo":return d.ordinalNumber(o,{unit:"quarter"});case"qqq":return d.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return d.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return d.quarter(o,{width:"wide",context:"standalone"})}},M:function(l,u,d){const o=l.getMonth();switch(u){case"M":case"MM":return $l.M(l,u);case"Mo":return d.ordinalNumber(o+1,{unit:"month"});case"MMM":return d.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return d.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return d.month(o,{width:"wide",context:"formatting"})}},L:function(l,u,d){const o=l.getMonth();switch(u){case"L":return String(o+1);case"LL":return ot(o+1,2);case"Lo":return d.ordinalNumber(o+1,{unit:"month"});case"LLL":return d.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return d.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return d.month(o,{width:"wide",context:"standalone"})}},w:function(l,u,d,o){const m=cw(l,o);return u==="wo"?d.ordinalNumber(m,{unit:"week"}):ot(m,u.length)},I:function(l,u,d){const o=iw(l);return u==="Io"?d.ordinalNumber(o,{unit:"week"}):ot(o,u.length)},d:function(l,u,d){return u==="do"?d.ordinalNumber(l.getDate(),{unit:"date"}):$l.d(l,u)},D:function(l,u,d){const o=rw(l);return u==="Do"?d.ordinalNumber(o,{unit:"dayOfYear"}):ot(o,u.length)},E:function(l,u,d){const o=l.getDay();switch(u){case"E":case"EE":case"EEE":return d.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return d.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return d.day(o,{width:"short",context:"formatting"});case"EEEE":default:return d.day(o,{width:"wide",context:"formatting"})}},e:function(l,u,d,o){const m=l.getDay(),f=(m-o.weekStartsOn+8)%7||7;switch(u){case"e":return String(f);case"ee":return ot(f,2);case"eo":return d.ordinalNumber(f,{unit:"day"});case"eee":return d.day(m,{width:"abbreviated",context:"formatting"});case"eeeee":return d.day(m,{width:"narrow",context:"formatting"});case"eeeeee":return d.day(m,{width:"short",context:"formatting"});case"eeee":default:return d.day(m,{width:"wide",context:"formatting"})}},c:function(l,u,d,o){const m=l.getDay(),f=(m-o.weekStartsOn+8)%7||7;switch(u){case"c":return String(f);case"cc":return ot(f,u.length);case"co":return d.ordinalNumber(f,{unit:"day"});case"ccc":return d.day(m,{width:"abbreviated",context:"standalone"});case"ccccc":return d.day(m,{width:"narrow",context:"standalone"});case"cccccc":return d.day(m,{width:"short",context:"standalone"});case"cccc":default:return d.day(m,{width:"wide",context:"standalone"})}},i:function(l,u,d){const o=l.getDay(),m=o===0?7:o;switch(u){case"i":return String(m);case"ii":return ot(m,u.length);case"io":return d.ordinalNumber(m,{unit:"day"});case"iii":return d.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return d.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return d.day(o,{width:"short",context:"formatting"});case"iiii":default:return d.day(o,{width:"wide",context:"formatting"})}},a:function(l,u,d){const m=l.getHours()/12>=1?"pm":"am";switch(u){case"a":case"aa":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"aaa":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return d.dayPeriod(m,{width:"narrow",context:"formatting"});case"aaaa":default:return d.dayPeriod(m,{width:"wide",context:"formatting"})}},b:function(l,u,d){const o=l.getHours();let m;switch(o===12?m=Dr.noon:o===0?m=Dr.midnight:m=o/12>=1?"pm":"am",u){case"b":case"bb":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"bbb":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return d.dayPeriod(m,{width:"narrow",context:"formatting"});case"bbbb":default:return d.dayPeriod(m,{width:"wide",context:"formatting"})}},B:function(l,u,d){const o=l.getHours();let m;switch(o>=17?m=Dr.evening:o>=12?m=Dr.afternoon:o>=4?m=Dr.morning:m=Dr.night,u){case"B":case"BB":case"BBB":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"BBBBB":return d.dayPeriod(m,{width:"narrow",context:"formatting"});case"BBBB":default:return d.dayPeriod(m,{width:"wide",context:"formatting"})}},h:function(l,u,d){if(u==="ho"){let o=l.getHours()%12;return o===0&&(o=12),d.ordinalNumber(o,{unit:"hour"})}return $l.h(l,u)},H:function(l,u,d){return u==="Ho"?d.ordinalNumber(l.getHours(),{unit:"hour"}):$l.H(l,u)},K:function(l,u,d){const o=l.getHours()%12;return u==="Ko"?d.ordinalNumber(o,{unit:"hour"}):ot(o,u.length)},k:function(l,u,d){let o=l.getHours();return o===0&&(o=24),u==="ko"?d.ordinalNumber(o,{unit:"hour"}):ot(o,u.length)},m:function(l,u,d){return u==="mo"?d.ordinalNumber(l.getMinutes(),{unit:"minute"}):$l.m(l,u)},s:function(l,u,d){return u==="so"?d.ordinalNumber(l.getSeconds(),{unit:"second"}):$l.s(l,u)},S:function(l,u){return $l.S(l,u)},X:function(l,u,d){const o=l.getTimezoneOffset();if(o===0)return"Z";switch(u){case"X":return Zg(o);case"XXXX":case"XX":return zs(o);case"XXXXX":case"XXX":default:return zs(o,":")}},x:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"x":return Zg(o);case"xxxx":case"xx":return zs(o);case"xxxxx":case"xxx":default:return zs(o,":")}},O:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"O":case"OO":case"OOO":return"GMT"+Gg(o,":");case"OOOO":default:return"GMT"+zs(o,":")}},z:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"z":case"zz":case"zzz":return"GMT"+Gg(o,":");case"zzzz":default:return"GMT"+zs(o,":")}},t:function(l,u,d){const o=Math.trunc(+l/1e3);return ot(o,u.length)},T:function(l,u,d){return ot(+l,u.length)}};function Gg(l,u=""){const d=l>0?"-":"+",o=Math.abs(l),m=Math.trunc(o/60),f=o%60;return f===0?d+String(m):d+String(m)+u+ot(f,2)}function Zg(l,u){return l%60===0?(l>0?"-":"+")+ot(Math.abs(l)/60,2):zs(l,u)}function zs(l,u=""){const d=l>0?"-":"+",o=Math.abs(l),m=ot(Math.trunc(o/60),2),f=ot(o%60,2);return d+m+u+f}const Pg=(l,u)=>{switch(l){case"P":return u.date({width:"short"});case"PP":return u.date({width:"medium"});case"PPP":return u.date({width:"long"});case"PPPP":default:return u.date({width:"full"})}},yx=(l,u)=>{switch(l){case"p":return u.time({width:"short"});case"pp":return u.time({width:"medium"});case"ppp":return u.time({width:"long"});case"pppp":default:return u.time({width:"full"})}},ow=(l,u)=>{const d=l.match(/(P+)(p+)?/)||[],o=d[1],m=d[2];if(!m)return Pg(l,u);let f;switch(o){case"P":f=u.dateTime({width:"short"});break;case"PP":f=u.dateTime({width:"medium"});break;case"PPP":f=u.dateTime({width:"long"});break;case"PPPP":default:f=u.dateTime({width:"full"});break}return f.replace("{{date}}",Pg(o,u)).replace("{{time}}",yx(m,u))},dw={p:yx,P:ow},fw=/^D+$/,hw=/^Y+$/,mw=["D","DD","YY","YYYY"];function gw(l){return fw.test(l)}function yw(l){return hw.test(l)}function xw(l,u,d){const o=pw(l,u,d);if(console.warn(o),mw.includes(l))throw new RangeError(o)}function pw(l,u,d){const o=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${u}\`) for formatting ${o} to the input \`${d}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const vw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Sw=/^'([^]*?)'?$/,ww=/''/g,Nw=/[a-zA-Z]/;function As(l,u,d){var w,E,S,D;const o=eo(),m=o.locale??sw,f=o.firstWeekContainsDate??((E=(w=o.locale)==null?void 0:w.options)==null?void 0:E.firstWeekContainsDate)??1,v=o.weekStartsOn??((D=(S=o.locale)==null?void 0:S.options)==null?void 0:D.weekStartsOn)??0,N=Rt(l,d==null?void 0:d.in);if(!N2(N))throw new RangeError("Invalid time value");let b=u.match(bw).map(A=>{const M=A[0];if(M==="p"||M==="P"){const Y=dw[M];return Y(A,m.formatLong)}return A}).join("").match(vw).map(A=>{if(A==="''")return{isToken:!1,value:"'"};const M=A[0];if(M==="'")return{isToken:!1,value:jw(A)};if(Fg[M])return{isToken:!0,value:A};if(M.match(Nw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:A}});m.localize.preprocessor&&(b=m.localize.preprocessor(N,b));const y={firstWeekContainsDate:f,weekStartsOn:v,locale:m};return b.map(A=>{if(!A.isToken)return A.value;const M=A.value;(yw(M)||gw(M))&&xw(M,u,String(l));const Y=Fg[M[0]];return Y(N,M,m.localize,y)}).join("")}function jw(l){const u=l.match(Sw);return u?u[1].replace(ww,"'"):l}function Ew(l,u){return+Rt(l)>+Rt(u)}function Tw(l,u){return+Rt(l)<+Rt(u)}function Mw(l,u){const d=Rt(l,u==null?void 0:u.in);return d.setMinutes(0,0,0),d}const Sf=Ry,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"}],el=160,Bc=14,Cw=10,Ow=7,Qg=4,xx=({configs:l,currentProjectId:u,onEditJob:d,queueStatus:o,queueAnalytics:m})=>{const f=V.useMemo(()=>Mw(new Date),[]),v=V.useMemo(()=>qc(f,24),[f]),N=V.useMemo(()=>qc(f,-24),[f]),b=v,y=V.useMemo(()=>{const ee=[];for(let le=0;le<=24;le++)ee.push(qc(f,le));return ee},[f]),w=V.useMemo(()=>{const ee=[];return l.forEach(({projectId:le,config:te})=>{var R,U;const W={executor:te.executorEnabled!==!1?te.cronSchedule:null,reviewer:te.reviewerEnabled?te.reviewerSchedule:null,qa:te.qa.enabled?te.qa.schedule:null,audit:te.audit.enabled?te.audit.schedule:null,slicer:te.roadmapScanner.enabled?te.roadmapScanner.slicerSchedule:null,analytics:(R=te.analytics)!=null&&R.enabled?(U=te.analytics)==null?void 0:U.schedule:null},J=te.cronScheduleOffset||0;Object.entries(W).forEach(([ne,F])=>{if(F)try{const ce=d2.CronExpressionParser.parse(F,{currentDate:f,endDate:v});for(;ce.hasNext();){const ye=ce.next(),me=new Date(ye.getTime());me.setMinutes(me.getMinutes()+J),Ew(me,f)&&Tw(me,v)&&ee.push({projectId:le,jobType:ne,time:me})}}catch(ce){console.error(`Failed to parse cron "${F}" for ${le}/${ne}`,ce)}})}),ee},[l,f,v]),E=V.useMemo(()=>{const ee=new Set;return l.length===0||(l.every(le=>le.config.executorEnabled===!1)&&ee.add("executor"),l.every(le=>!le.config.reviewerEnabled)&&ee.add("reviewer"),l.every(le=>!le.config.qa.enabled)&&ee.add("qa"),l.every(le=>!le.config.audit.enabled)&&ee.add("audit"),l.every(le=>!le.config.roadmapScanner.enabled)&&ee.add("slicer"),l.every(le=>{var te;return!((te=le.config.analytics)!=null&&te.enabled)})&&ee.add("analytics")),ee},[l]),S=V.useMemo(()=>{const ee=new Map;let le=0;return l.forEach(te=>{te.projectId===u||(ee.set(te.projectId,le%Vc.length),le++)}),ee},[l,u]),D=ee=>$g(ee,f),A=V.useMemo(()=>{const ee=[];for(let le=0;le<=24;le++)ee.push(qc(N,le));return ee},[N]),M=ee=>{const le=S2([b2([ee,N]),b]);return $g(le,N)},Y=V.useMemo(()=>{const ee=(m==null?void 0:m.recentRuns)??[],le=new Map;for(const te of ee){const W=te.providerKey||"default",J=new Date(te.startedAt*1e3),R=te.finishedAt?new Date(te.finishedAt*1e3):new Date;R<N||J>b||(le.has(W)||le.set(W,[]),le.get(W).push({id:te.id,jobType:te.jobType,status:te.status,projectPath:te.projectPath,startedAt:J,finishedAt:R,throttledCount:te.throttledCount}))}if(o!=null&&o.running){const te=o.running.providerKey??"default";le.has(te)||le.set(te,[]),le.get(te).push({id:o.running.id,jobType:o.running.jobType,status:"running",projectPath:o.running.projectPath,startedAt:new Date((o.running.dispatchedAt??o.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(le.entries()).sort(([te],[W])=>te.localeCompare(W)).map(([te,W])=>({providerKey:te,runs:W.sort((J,R)=>J.startedAt.getTime()-R.startedAt.getTime())}))},[b,N,m,o]),X=ee=>ee.split(/[-_]/).map(le=>le.charAt(0).toUpperCase()+le.slice(1)).join(" "),Q=l.length>1,G=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:y.map((ee,le)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},le))});return s.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-slate-800 bg-slate-950/50 flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Execution Timeline (Next 24h)"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Upcoming scheduled runs across projects. Aligned columns = overlap."})]}),Q&&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!==u).slice(0,5).map(ee=>{const le=S.get(ee.projectId)??0,te=Vc[le],W=(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 ${te.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:ee.projectId,children:W})]},ee.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+el},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:el},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:y.map((ee,le)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:le*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:As(ee,"HH:mm")})},le))})]}),s.jsxs("div",{className:"relative",children:[l.length===0&&s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("p",{className:"text-sm text-slate-500 italic",children:"No project data available for timeline."})}),Sf.map(ee=>{const le=E.has(ee.id),te=w.filter(J=>J.jobType===ee.id);if(!Q)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${le?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:el},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,te.length===0?s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-600 italic",children:le?"Disabled":"No runs in this window"})}):te.map((J,R)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(J.projectId,J.jobType),style:{left:D(J.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 ${As(J.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-10",children:As(J.time,"HH:mm")})},R))]})]},ee.id);const W=l.length*Bc+Qg*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${le?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:el,height:W},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(J=>{const R=J.projectId===u,U=(J.projectId.split("/").pop()??J.projectId).slice(0,14),ne=S.get(J.projectId)??0,F=R?ee.color.bg:Vc[ne].bg;return s.jsxs("div",{style:{height:Bc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${F}`}),s.jsx("span",{className:`text-[9px] truncate ${R?"text-slate-200 font-semibold":"text-slate-600"}`,title:J.projectId,children:R?`${U} ★`:U})]},J.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:W},children:[G,l.map((J,R)=>{const U=J.projectId===u,ne=te.filter(ue=>ue.projectId===J.projectId),F=Qg+R*Bc,ce=U?Cw:Ow,ye=Math.floor((Bc-ce)/2),me=S.get(J.projectId)??0,B=U?{bg:ee.color.bg,border:ee.color.border}:Vc[me];return s.jsxs(ze.Fragment,{children:[R>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:F}}),ne.map((ue,se)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(J.projectId,ue.jobType),style:{left:D(ue.time)-3,top:F+ye,height:ce},className:`absolute w-6 rounded border ${B.bg} ${B.border} ${U?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${J.projectId} · ${ee.label} @ ${As(ue.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:As(ue.time,"HH:mm")})},se))]},J.projectId)}),te.length===0&&!le&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-700 italic",children:"No runs in this window"})})]})]},ee.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:el+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"})]}),Q&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),Y.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:[(m==null?void 0:m.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+el},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:el},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:A.map((ee,le)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:le*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:As(ee,"HH:mm")})},le))})]}),s.jsx("div",{className:"relative",children:Y.map(({providerKey:ee,runs:le})=>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:el},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:X(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:A.map((te,W)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},W))}),le.map(te=>{const W=Sf.find(me=>me.id===te.jobType)??Sf[0],J=M(te.startedAt),R=M(te.finishedAt),U=Math.max(R-J,8),ne=te.status==="running",F=te.status==="error"||te.status==="failed"||te.status==="errored",ce=ne?"bg-green-500":F?"bg-red-500":W.color.bg,ye=ne?"border-green-400/60":F?"border-red-400/60":W.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ce} ${ye} opacity-85 shadow-lg ${ne?"animate-pulse":""}`,style:{left:J,width:U},title:`${ee} • ${W.label} • ${As(te.startedAt,"MMM d HH:mm")} • ${te.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:W.label}),s.jsx("span",{className:"text-white/70",children:te.status}),te.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",te.throttledCount,"x"]})]})},`${ee}-${te.id}-${te.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:el+M(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},px=({form:l,scheduleMode:u,selectedTemplateId:d,onFieldChange:o,onSwitchToTemplate:m,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:N,currentProjectId:b,onEditJob:y})=>{var w;return s.jsxs(Ke,{className:"p-6 space-y-6",children:[N&&N.length>0&&s.jsx(xx,{configs:N,currentProjectId:b,onEditJob:y}),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 ${u==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:m,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${u==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Custom"})]})]}),u==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Qf.map(E=>{const S=d===E.id;return s.jsxs("button",{type:"button",onClick:()=>v(E),className:`text-left p-4 rounded-lg border transition-colors ${S?"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:E.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:E.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",E.hints.executor],["Reviewer",E.hints.reviewer],["QA",E.hints.qa],["Audit",E.hints.audit],["Slicer",E.hints.slicer]].map(([D,A])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:D}),s.jsx("span",{className:"text-xs text-slate-400",children:A})]},D))})]},E.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Mn,{label:"PRD Execution Schedule",value:l.cronSchedule,onChange:E=>o("cronSchedule",E)}),s.jsx(Mn,{label:"PR Review Schedule",value:l.reviewerSchedule,onChange:E=>o("reviewerSchedule",E)}),s.jsx(Mn,{label:"QA Schedule",value:l.qa.schedule,onChange:E=>o("qa",{...l.qa,schedule:E})}),s.jsx(Mn,{label:"Audit Schedule",value:l.audit.schedule,onChange:E=>o("audit",{...l.audit,schedule:E})}),((w=l.analytics)==null?void 0:w.enabled)&&s.jsx(Mn,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:E=>o("analytics",{...l.analytics,schedule:E})}),l.roadmapScanner.enabled&&s.jsx(Mn,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:E=>o("roadmapScanner",{...l.roadmapScanner,slicerSchedule:E})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(ia,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:E=>o("schedulingPriority",Number(E)),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(wa,{checked:l.globalQueueEnabled??!0,onChange:E=>o("globalQueueEnabled",E)})]})}),s.jsx(Fe,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:E=>{const S=Math.min(59,Math.max(0,Number(E.target.value||0)));o("cronScheduleOffset",S)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]})},Dw=()=>{var Na,Qa,Wa,ua,ca,Ia,hn,la,ka,mn,gn,sl,rl,At,Xa,On,Dn;const{addToast:l,selectedProjectId:u,globalModeLoading:d}=na(),[o,m]=V.useState("overview"),[f,v]=V.useState(!1),[N,b]=V.useState(!1),[y,w]=V.useState(null),[E,S]=V.useState(null),[D,A]=V.useState([]),[M,Y]=V.useState(null),[X,Q]=V.useState(null),[G,ee]=V.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},scheduleBundleId:null,schedulingPriority:3,cronScheduleOffset:0,globalQueueEnabled:!0},scheduleMode:"template",selectedTemplateId:"always-on",isDirty:!1}),{data:le,loading:te,error:W,refetch:J}=fn(Ly,[u],{enabled:!d}),{data:R,loading:U,refetch:ne}=fn(Pf,[u],{enabled:!d});V.useEffect(()=>{const L=setInterval(()=>{J()},3e4);return()=>clearInterval(L)},[J]),V.useEffect(()=>{d||Uy().then(A).catch(console.error)},[u,d]),V.useEffect(()=>{if(d)return;const L=()=>{mS().then(Y).catch(()=>{}),gS(24).then(Q).catch(()=>{})};L();const fe=setInterval(L,3e4);return()=>clearInterval(fe)},[d,u]),V.useEffect(()=>{var L,fe,ve,xe,Ye,$e;if(R&&!G.isDirty){const Xe=au(R.scheduleBundleId,R.cronSchedule,R.reviewerSchedule,((L=R.qa)==null?void 0:L.schedule)||"45 2,14 * * *",((fe=R.audit)==null?void 0:fe.schedule)||"50 3 * * 1",((ve=R.roadmapScanner)==null?void 0:ve.slicerSchedule)||"35 */12 * * *");ee({form:{cronSchedule:R.cronSchedule||"5 */3 * * *",reviewerSchedule:R.reviewerSchedule||"25 */6 * * *",qa:R.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:R.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:R.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((xe=R.roadmapScanner)==null?void 0:xe.enabled)??!0,slicerSchedule:((Ye=R.roadmapScanner)==null?void 0:Ye.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:R.scheduleBundleId??null,schedulingPriority:R.schedulingPriority??3,cronScheduleOffset:R.cronScheduleOffset??0,globalQueueEnabled:(($e=R.queue)==null?void 0:$e.enabled)??!0},scheduleMode:Xe?"template":"custom",selectedTemplateId:(Xe==null?void 0:Xe.id)??"",isDirty:!1})}},[R,G.isDirty]);const F=()=>{ne(),J()},ce=(L,fe)=>L instanceof Error?L.message:fe,ye=async()=>{if(le){v(!0);try{le.paused?(await nu(),l({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await uS(),l({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),F()}catch(L){l({title:"Action Failed",message:ce(L,"Failed to toggle schedule state"),type:"error"})}finally{v(!1)}}},me=async(L,fe)=>{if(!R)return;const xe=_y(L==="planner"?"slicer":L);if(xe){w(L);try{await Pc(xe.buildEnabledPatch(fe,R));let Ye="";try{await nu()}catch($e){Ye=ce($e,"Failed to reinstall cron schedules")}F(),l(Ye?{title:"Job Saved (Cron Reinstall Failed)",message:Ye,type:"warning"}:{title:"Job Updated",message:`${L[0].toUpperCase()+L.slice(1)} ${fe?"enabled":"disabled"}.`,type:"success"})}catch(Ye){l({title:"Update Failed",message:ce(Ye,"Failed to update job configuration"),type:"error"})}finally{w(null)}}},B=async L=>{const fe=L==="planner"?"slicer":L;S(L);try{await iS(fe),l({title:"Job Triggered",message:`${L[0].toUpperCase()+L.slice(1)} job has been queued.`,type:"success"}),J()}catch(ve){l({title:"Trigger Failed",message:ce(ve,`Failed to trigger ${L} job`),type:"error"})}finally{S(null)}},ue=(L,fe)=>{ee(ve=>({...ve,form:{...ve.form,[L]:fe},isDirty:!0}))},se=()=>{if(!G.form)return;const L=au(G.form.scheduleBundleId,G.form.cronSchedule,G.form.reviewerSchedule,G.form.qa.schedule,G.form.audit.schedule,G.form.roadmapScanner.slicerSchedule||"35 */12 * * *");ee(fe=>({...fe,scheduleMode:"template",selectedTemplateId:(L==null?void 0:L.id)??"always-on",form:{...fe.form,scheduleBundleId:(L==null?void 0:L.id)??null},isDirty:!0}))},Me=()=>{ee(L=>({...L,scheduleMode:"custom",selectedTemplateId:"",form:{...L.form,scheduleBundleId:null},isDirty:!0}))},qe=L=>{ee(fe=>({...fe,selectedTemplateId:L.id,scheduleMode:"template",form:{...fe.form,cronSchedule:L.schedules.executor,reviewerSchedule:L.schedules.reviewer,scheduleBundleId:L.id,qa:{...fe.form.qa,schedule:L.schedules.qa},audit:{...fe.form.audit,schedule:L.schedules.audit},roadmapScanner:{...fe.form.roadmapScanner,slicerSchedule:L.schedules.slicer}},isDirty:!0}))},_=async()=>{var L,fe;if(R){b(!0);try{await Pc({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:{...R.qa,schedule:G.form.qa.schedule},audit:{...R.audit,schedule:G.form.audit.schedule},analytics:{...R.analytics,schedule:((L=G.form.analytics)==null?void 0:L.schedule)||((fe=R.analytics)==null?void 0:fe.schedule)||"0 6 * * 1"},roadmapScanner:{...R.roadmapScanner,slicerSchedule:G.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},queue:{...R.queue,enabled:G.form.globalQueueEnabled??!0},executorEnabled:R.executorEnabled,reviewerEnabled:R.reviewerEnabled});let ve="";try{await nu()}catch(xe){ve=ce(xe,"Failed to reinstall cron schedules")}ee(xe=>({...xe,isDirty:!1})),F(),l(ve?{title:"Schedules Saved (Cron Reinstall Failed)",message:ve,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(ve){l({title:"Save Failed",message:ce(ve,"Failed to save schedules"),type:"error"})}finally{b(!1)}}},re=L=>{if(!L)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const fe=new Date(L),ve=XS(fe);return s.jsxs("div",{className:"flex items-center space-x-2",children:[ve&&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:WS(fe)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",IS(fe),")"]})]})]})},ge=L=>{if(!L||L.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const fe=[];return L.balancedDelayMinutes>0&&fe.push(`auto +${L.balancedDelayMinutes}m`),L.manualDelayMinutes>0&&fe.push(`manual +${L.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:[" ",fe.join(" - ")]})]})};if(te||U)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(W||!le||!R)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(ll,{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:(W==null?void 0:W.message)||"Unknown error"}),s.jsx(rt,{onClick:()=>{J(),ne()},children:"Retry"})]});const pe=le.paused,De=pe?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",Ee=pe?"Paused":"Active",Ue=au(R.scheduleBundleId,R.cronSchedule,R.reviewerSchedule,((Na=R.qa)==null?void 0:Na.schedule)||"45 2,14 * * *",((Qa=R.audit)==null?void 0:Qa.schedule)||"50 3 * * 1",((Wa=R.roadmapScanner)==null?void 0:Wa.slicerSchedule)||"35 */12 * * *"),ke=(L,fe,ve)=>!Ue||L==="analytics"||!Rr(Ue.schedules[L],fe)?Sg(ve):`${Ue.label} - ${Ue.hints[L]}`,et=[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Gc,{className:"h-4 w-4"}),enabled:(R==null?void 0:R.executorEnabled)!==!1,schedule:le.executor.schedule,nextRun:le.executor.nextRun,delayInfo:le.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(Jc,{className:"h-4 w-4"}),enabled:(R==null?void 0:R.reviewerEnabled)??!1,schedule:le.reviewer.schedule,nextRun:le.reviewer.nextRun,delayInfo:le.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx(F1,{className:"h-4 w-4"}),enabled:((ua=R==null?void 0:R.qa)==null?void 0:ua.enabled)??!1,schedule:(ca=le.qa)==null?void 0:ca.schedule,nextRun:(Ia=le.qa)==null?void 0:Ia.nextRun,delayInfo:le.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(mg,{className:"h-4 w-4"}),enabled:((hn=R==null?void 0:R.audit)==null?void 0:hn.enabled)??!1,schedule:(la=le.audit)==null?void 0:la.schedule,nextRun:(ka=le.audit)==null?void 0:ka.nextRun,delayInfo:le.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(mg,{className:"h-4 w-4"}),enabled:((mn=R==null?void 0:R.roadmapScanner)==null?void 0:mn.enabled)??!1,schedule:((gn=le.planner)==null?void 0:gn.schedule)||((sl=R.roadmapScanner)==null?void 0:sl.slicerSchedule)||"35 */12 * * *",nextRun:(rl=le.planner)==null?void 0:rl.nextRun,delayInfo:le.planner},{id:"analytics",name:"Analytics",description:"Fetches Amplitude data, analyzes with AI, and creates board issues",icon:s.jsx(Zb,{className:"h-4 w-4"}),enabled:((At=R==null?void 0:R.analytics)==null?void 0:At.enabled)??!1,schedule:((Xa=le.analytics)==null?void 0:Xa.schedule)||((On=R.analytics)==null?void 0:On.schedule)||"0 6 * * 1",nextRun:(Dn=le.analytics)==null?void 0:Dn.nextRun,delayInfo:le.analytics}],Ft=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Ke,{className:`p-6 border-2 ${De}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Gc,{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:Ee}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(rt,{variant:pe?"primary":"outline",size:"lg",onClick:ye,loading:f,children:pe?s.jsxs(s.Fragment,{children:[s.jsx(kr,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(Oy,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(Ke,{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:et.map(L=>{var fe,ve,xe,Ye,$e,dt,Xe,gt;return s.jsxs("div",{className:`p-4 rounded-lg border ${L.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:[L.icon,s.jsx("h4",{className:"text-base font-semibold text-slate-200",children:L.name})]}),s.jsx(wa,{checked:L.enabled,disabled:y!==null,"aria-label":`Toggle ${L.name.toLowerCase()} automation`,onChange:yn=>me(L.id,yn)})]}),L.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:ke(L.id==="planner"?"slicer":L.id,L.id==="qa"?((fe=R==null?void 0:R.qa)==null?void 0:fe.schedule)||"":L.id==="audit"?((ve=R==null?void 0:R.audit)==null?void 0:ve.schedule)||"":L.id==="planner"?((xe=R==null?void 0:R.roadmapScanner)==null?void 0:xe.slicerSchedule)||"35 */12 * * *":L.id==="analytics"?((Ye=R==null?void 0:R.analytics)==null?void 0:Ye.schedule)||"0 6 * * 1":L.schedule,L.id==="qa"?(($e=R==null?void 0:R.qa)==null?void 0:$e.schedule)||"":L.id==="audit"?((dt=R==null?void 0:R.audit)==null?void 0:dt.schedule)||"":L.id==="planner"?((Xe=R==null?void 0:R.roadmapScanner)==null?void 0:Xe.slicerSchedule)||"35 */12 * * *":L.id==="analytics"?((gt=R==null?void 0:R.analytics)==null?void 0:gt.schedule)||"0 6 * * 1":L.schedule)})]}),ge(L.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),re(L.nextRun)]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${L.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(Ef,{className:"h-4 w-4"}),s.jsx("span",{children:L.enabled?"Active":"Disabled"})]}),s.jsxs("button",{disabled:E!==null,onClick:()=>B(L.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:[E===L.id?s.jsx("div",{className:"h-3 w-3 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(kr,{className:"h-3 w-3 fill-current"}),"Run now"]})]})]}):s.jsxs("div",{className:"text-slate-500 text-sm",children:[L.name," is disabled."]})]},L.id)})})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(xx,{configs:D,currentProjectId:u??void 0,onEditJob:(L,fe)=>{},queueStatus:M,queueAnalytics:X}),s.jsx(px,{form:G.form,scheduleMode:G.scheduleMode,selectedTemplateId:G.selectedTemplateId,onFieldChange:ue,onSwitchToTemplate:se,onSwitchToCustom:Me,onApplyTemplate:qe}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(rt,{variant:"ghost",onClick:()=>{var L,fe,ve,xe,Ye,$e;if(R){const dt=au(R.scheduleBundleId,R.cronSchedule,R.reviewerSchedule,((L=R.qa)==null?void 0:L.schedule)||"45 2,14 * * *",((fe=R.audit)==null?void 0:fe.schedule)||"50 3 * * 1",((ve=R.roadmapScanner)==null?void 0:ve.slicerSchedule)||"35 */12 * * *");ee({form:{cronSchedule:R.cronSchedule||"5 */3 * * *",reviewerSchedule:R.reviewerSchedule||"25 */6 * * *",qa:R.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:R.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:R.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((xe=R.roadmapScanner)==null?void 0:xe.enabled)??!0,slicerSchedule:((Ye=R.roadmapScanner)==null?void 0:Ye.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:R.scheduleBundleId??null,schedulingPriority:R.schedulingPriority??3,cronScheduleOffset:R.cronScheduleOffset??0,globalQueueEnabled:(($e=R.queue)==null?void 0:$e.enabled)??!0},scheduleMode:dt?"template":"custom",selectedTemplateId:(dt==null?void 0:dt.id)??"",isDirty:!1})}},disabled:!G.isDirty,children:"Reset"}),s.jsxs(rt,{onClick:_,loading:N,disabled:!G.isDirty,children:[s.jsx(Ef,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(Ke,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(Yf,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),le.entries.length===0?s.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):s.jsx("div",{className:"space-y-2",children:le.entries.map((L,fe)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:L},fe))})]})}];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"}),Ue&&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:Ue.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",le.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx($y,{tabs:Ft,activeTab:o,onChange:m})]})};function Wg(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const Rw=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],Aw=(l,u)=>l.includes(u)?l.filter(d=>d!==u):[...l,u],Ig=({webhook:l,onChange:u,onSave:d,onCancel:o,isNew:m})=>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(ia,{label:"Type",value:l.type,onChange:f=>{const v=f;u(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(Fe,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:f=>u({...l,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Fe,{label:"Chat ID",value:l.chatId||"",onChange:f=>u({...l,chatId:f.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Fe,{label:"Webhook URL",type:"password",value:l.url||"",onChange:f=>u({...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:Rw.map(f=>s.jsx("button",{type:"button",onClick:()=>u({...l,events:Aw(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(rt,{variant:"ghost",onClick:o,children:"Cancel"}),s.jsx(rt,{onClick:d,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:m?"Add Webhook":"Save Changes"})]})]}),Xg=({notifications:l,onChange:u,globalWebhook:d,onSetGlobal:o,onUnsetGlobal:m})=>{const[f,v]=ze.useState(null),[N,b]=ze.useState(!1),[y,w]=ze.useState({type:"slack",url:"",events:[]}),E=()=>{u({webhooks:[...l.webhooks,y]}),w({type:"slack",url:"",events:[]}),b(!1)},S=(A,M)=>{const Y=[...l.webhooks];Y[A]=M,u({webhooks:Y})},D=A=>{u({webhooks:l.webhooks.filter((M,Y)=>Y!==A)})};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((A,M)=>s.jsx("div",{children:f===M?s.jsx(Ig,{webhook:A,onChange:Y=>S(M,Y),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:A.type}),A.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",A.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:A.events.map(Y=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:Y.replace("_"," ")},Y))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[o!==void 0&&(()=>{const Y=d!=null&&Wg(A)===Wg(d);return s.jsx("button",{type:"button",onClick:()=>Y?m==null?void 0:m():o(A),className:`p-2 transition-colors ${Y?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":Y?"Global channel (active)":"Set as global channel",title:Y?"Global channel (active)":"Set as global channel",children:s.jsx(v1,{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 ${A.type} webhook`,title:`Edit ${A.type} webhook`,children:s.jsx($f,{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 ${A.type} webhook`,title:`Delete ${A.type} webhook`,children:s.jsx(Kc,{className:"h-4 w-4"})})]})]})},M))}),N?s.jsx(Ig,{webhook:y,onChange:w,onSave:E,onCancel:()=>b(!1),isNew:!0}):s.jsxs(rt,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Hr,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},Xf=({label:l,value:u,onChange:d,placeholder:o,helpText:m})=>{const[f,v]=ze.useState(""),N=()=>{f.trim()&&!u.includes(f.trim())&&(d([...u,f.trim()]),v(""))},b=w=>{d(u.filter(E=>E!==w))},y=w=>{w.key==="Enter"&&(w.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:u.map(w=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[w,s.jsx("button",{type:"button",onClick:()=>b(w),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${w}`,title:`Remove ${w}`,children:s.jsx(qr,{className:"h-3 w-3"})})]},w))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:w=>v(w.target.value),onKeyDown:y,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(rt,{onClick:N,disabled:!f.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(Hr,{className:"h-4 w-4"})})]}),m&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},_w=({isOpen:l,onClose:u,title:d,children:o})=>(V.useEffect(()=>{const m=f=>{f.key==="Escape"&&u()};return l&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[l,u]),l?Mb.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:u,"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:d}),s.jsx("button",{onClick:u,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:s.jsx(qr,{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),kw=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>l.toUpperCase().includes(d)),zw=({value:l,isSensitive:u})=>{const[d,o]=ze.useState(!1);return u?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>o(!d),className:"text-slate-500 hover:text-slate-300","aria-label":d?"Hide sensitive value":"Show sensitive value",title:d?"Hide sensitive value":"Show sensitive value",children:d?s.jsx(f1,{className:"h-4 w-4"}):s.jsx(m1,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},vx=({envVars:l,onChange:u,compact:d=!1})=>{const[o,m]=ze.useState(""),[f,v]=ze.useState(""),[N,b]=ze.useState(null),[y,w]=ze.useState(""),E=()=>{if(o.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(o)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}u({...l,[o]:f}),m(""),v("")}},S=X=>{const Q={...l};delete Q[X],u(Q)},D=X=>{b(X),w(l[X]??"")},A=()=>{N&&(u({...l,[N]:y}),b(null),w(""))},M=()=>{b(null),w("")},Y=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[!d&&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:Y.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):Y.map(([X,Q])=>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:X}),N===X?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:y,onChange:G=>w(G.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),s.jsx("button",{type:"button",onClick:A,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${X} value`,title:`Save ${X} value`,children:s.jsx(Ef,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:M,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${X}`,title:`Cancel editing ${X}`,children:s.jsx(qr,{className:"h-4 w-4"})})]}):s.jsx(zw,{value:Q,isSensitive:kw(X)})]}),N!==X&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>D(X),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${X}`,title:`Edit ${X}`,children:s.jsx($f,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>S(X),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${X}`,title:`Delete ${X}`,children:s.jsx(Kc,{className:"h-4 w-4"})})]})]},X))}),s.jsxs("div",{className:`flex items-end gap-3 ${d?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:o,onChange:X=>m(X.target.value.toUpperCase()),placeholder:d?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:f,onChange:X=>v(X.target.value),placeholder:d?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(rt,{onClick:E,disabled:!o.trim(),size:d?"sm":"md",children:[s.jsx(Hr,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function Uw(l,u){var d;return!!(l!=null&&l.startsWith("glm-")||(d=u==null?void 0:u.model)!=null&&d.startsWith("glm-"))}function Lw(l,u){var d,o;return Uw(l,u)?!((o=(d=u==null?void 0:u.envVars)==null?void 0:d.ANTHROPIC_API_KEY)!=null&&o.trim()):!1}const Jg={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:""}},Hw=({isOpen:l,onClose:u,onSave:d,presetId:o,preset:m,isBuiltIn:f,existingIds:v})=>{const[N,b]=ze.useState(""),[y,w]=ze.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[E,S]=ze.useState(!1),[D,A]=ze.useState("custom"),[M,Y]=ze.useState(null),X=Lw(o??N,y);ze.useEffect(()=>{l&&(o&&m?(b(o),w({name:m.name,command:m.command,subcommand:m.subcommand??"",promptFlag:m.promptFlag??"",autoApproveFlag:m.autoApproveFlag??"",workdirFlag:m.workdirFlag??"",modelFlag:m.modelFlag??"",model:m.model??"",envVars:m.envVars??{}}),o==="claude"||m.command==="claude"?A("claude"):o==="codex"||m.command==="codex"?A("codex"):A("custom")):(b(""),w({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),A("custom")),Y(null),S(!!(m!=null&&m.envVars&&Object.keys(m.envVars).length>0)))},[l,o,m]);const Q=te=>{if(A(te),te!=="custom"&&Jg[te]){const W=Jg[te];w(J=>({...J,...W,envVars:J.envVars})),!o&&!N&&b(te)}},G=(te,W)=>{w(J=>({...J,[te]:W})),Y(null)},ee=()=>{if(!y.name.trim())return Y("Name is required"),!1;if(!y.command.trim())return Y("Command is required"),!1;if(!o){if(!N.trim())return Y("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(N))return Y("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(v.includes(N))return Y("A preset with this ID already exists"),!1}return!0},le=()=>{var W,J,R,U,ne,F;if(!ee())return;const te={name:y.name.trim(),command:y.command.trim()};(W=y.subcommand)!=null&&W.trim()&&(te.subcommand=y.subcommand.trim()),(J=y.promptFlag)!=null&&J.trim()&&(te.promptFlag=y.promptFlag.trim()),(R=y.autoApproveFlag)!=null&&R.trim()&&(te.autoApproveFlag=y.autoApproveFlag.trim()),(U=y.workdirFlag)!=null&&U.trim()&&(te.workdirFlag=y.workdirFlag.trim()),(ne=y.modelFlag)!=null&&ne.trim()&&(te.modelFlag=y.modelFlag.trim()),(F=y.model)!=null&&F.trim()&&(te.model=y.model.trim()),y.envVars&&Object.keys(y.envVars).length>0&&(te.envVars=y.envVars),d(o||N,te),u()};return s.jsx(_w,{isOpen:l,onClose:u,title:o?`Edit Preset: ${m==null?void 0:m.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}),X&&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(su,{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(ia,{label:"Template",value:D,onChange:Q,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(Fe,{label:"Preset ID",value:N,onChange:te=>b(te.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(Fe,{label:"Display Name",value:y.name,onChange:te=>G("name",te.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Fe,{label:"Command",value:y.command,onChange:te=>G("command",te.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(Fe,{label:"Model",value:y.model??"",onChange:te=>G("model",te.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Fe,{label:"Model Flag",value:y.modelFlag??"",onChange:te=>G("modelFlag",te.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:()=>S(!E),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[E?s.jsx(e1,{className:"h-4 w-4"}):s.jsx(Ey,{className:"h-4 w-4"}),"Advanced Options"]}),E&&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(Fe,{label:"Subcommand",value:y.subcommand??"",onChange:te=>G("subcommand",te.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Fe,{label:"Prompt Flag",value:y.promptFlag??"",onChange:te=>G("promptFlag",te.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(Fe,{label:"Auto-Approve Flag",value:y.autoApproveFlag??"",onChange:te=>G("autoApproveFlag",te.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(Fe,{label:"Workdir Flag",value:y.workdirFlag??"",onChange:te=>G("workdirFlag",te.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(vx,{envVars:y.envVars??{},onChange:te=>G("envVars",te),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(rt,{variant:"ghost",onClick:u,children:"Cancel"}),s.jsx(rt,{onClick:le,children:o?"Save Changes":"Add Preset"})]})]})})},qw=({form:l,updateField:u,projectName:d,doctorChecks:o,doctorLoading:m})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(Ke,{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(Fe,{label:"Project Name",value:d,disabled:!0}),s.jsx(Fe,{label:"Default Branch",value:l.defaultBranch,onChange:f=>u("defaultBranch",f.target.value)}),s.jsx(Fe,{label:"PRD Directory",value:l.prdDir,onChange:f=>u("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Fe,{label:"Branch Prefix",value:l.branchPrefix,onChange:f=>u("branchPrefix",f.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(wa,{label:"Enable PRD Executor",checked:l.executorEnabled,onChange:f=>u("executorEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(wa,{label:"Enable Automated Reviews",checked:l.reviewerEnabled,onChange:f=>u("reviewerEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(wa,{label:"Auto-merge approved PRs",checked:l.autoMerge,onChange:f=>u("autoMerge",f)})}),l.autoMerge&&s.jsx(ia,{label:"Merge Method",value:l.autoMergeMethod,onChange:f=>u("autoMergeMethod",f),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]})]}),s.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:s.jsx(Xf,{label:"Branch Patterns",value:l.branchPatterns,onChange:f=>u("branchPatterns",f),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})}),s.jsxs(Ke,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(jy,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),m?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",y=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 ${y}`,children:f.status.toUpperCase()})]},`${f.name}-${v}`)})]})]}),Kg=({presetId:l,preset:u,isBuiltIn:d,onEdit:o,onDelete:m,onReset:f})=>{var y,w,E;const v=u.envVars?Object.keys(u.envVars).length:0,b=(l.startsWith("glm-")||((y=u.model)==null?void 0:y.startsWith("glm-")))&&!((E=(w=u.envVars)==null?void 0:w.ANTHROPIC_API_KEY)!=null&&E.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:u.name}),d&&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(su,{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 ${u.name} preset`,title:"Edit preset",children:s.jsx($f,{className:"h-4 w-4"})}),d?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 ${u.name} to defaults`,title:"Reset to defaults",children:s.jsx(Dy,{className:"h-4 w-4"})}):m&&s.jsx("button",{type:"button",onClick:m,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${u.name} preset`,title:"Delete preset",children:s.jsx(Kc,{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:[u.command,u.subcommand&&` ${u.subcommand}`]})]}),u.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:u.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":""]})]})]})},ey=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],Vw=({form:l,updateField:u,jobProvidersChangedRef:d,getAllPresets:o,getPresetOptions:m,handleEditPreset:f,handleDeletePreset:v,handleResetPreset:N,handleAddPreset:b})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Ke,{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(rt,{onClick:b,children:[s.jsx(Hr,{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:[ey.map(y=>{const E=o()[y];return E?s.jsx(Kg,{presetId:y,preset:E,isBuiltIn:!0,onEdit:()=>f(y),onReset:()=>N(y)},y):null}),Object.entries(l.providerPresets).filter(([y])=>!ey.includes(y)).map(([y,w])=>s.jsx(Kg,{presetId:y,preset:w,isBuiltIn:!1,onEdit:()=>f(y),onDelete:()=>v(y)},y))]})]}),s.jsxs(Ke,{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(ia,{value:l.provider,onChange:y=>u("provider",y),options:m(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:y,label:w})=>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:w}),s.jsx("div",{className:"w-64",children:s.jsx(ia,{value:l.jobProviders[y]??"",onChange:E=>{const S={...l.jobProviders};E===""?delete S[y]:S[y]=E,d.current=!0,u("jobProviders",S)},options:[{label:"Use Global (default)",value:""},...m(l.providerPresets)]})})]},y))]})]}),s.jsxs(Ke,{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(ia,{label:"Primary Fallback Preset",value:l.primaryFallbackPreset,onChange:y=>u("primaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(o()).map(([y,w])=>({label:w.name,value:y}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(ia,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:y=>u("secondaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(o()).map(([y,w])=>({label:w.name,value:y}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs(Ke,{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(vx,{envVars:l.providerEnv,onChange:y=>u("providerEnv",y)})]}),s.jsxs(Ke,{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:y=>u("minReviewScore",Number(y.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(Fe,{label:"Max Runtime (Executor)",type:"number",value:String(l.maxRuntime),onChange:y=>u("maxRuntime",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Fe,{label:"Max Runtime (Reviewer)",type:"number",value:String(l.reviewerMaxRuntime),onChange:y=>u("reviewerMaxRuntime",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Fe,{label:"Max Log Size",type:"number",value:String(l.maxLogSize),onChange:y=>u("maxLogSize",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(Ke,{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(Fe,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(l.reviewerMaxRetries),onChange:y=>{const w=Math.min(10,Math.max(0,Number(y.target.value||0)));u("reviewerMaxRetries",w)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(Fe,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(l.reviewerRetryDelay),onChange:y=>{const w=Math.min(300,Math.max(0,Number(y.target.value||0)));u("reviewerRetryDelay",w)},helperText:"Wait time between retry attempts to let CI settle."}),s.jsx(Fe,{label:"Max PRs Per Run",type:"number",min:"0",max:"100",value:String(l.reviewerMaxPrsPerRun),onChange:y=>{const w=Math.min(100,Math.max(0,Number(y.target.value||0)));u("reviewerMaxPrsPerRun",w)},helperText:"Hard cap on how many PRs the reviewer processes per run. 0 = unlimited."})]})]})]}),Bw=({form:l,updateField:u,handleRoadmapToggle:d})=>{var o,m;return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{id:"job-section-qa",children:s.jsxs(Ke,{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(wa,{checked:l.qa.enabled,onChange:f=>u("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(Mn,{label:"QA Schedule",value:l.qa.schedule,onChange:f=>u("qa",{...l.qa,schedule:f})}),s.jsx(Fe,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:f=>u("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(ia,{label:"Artifacts",value:l.qa.artifacts,onChange:f=>u("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(Fe,{label:"Skip Label",value:l.qa.skipLabel,onChange:f=>u("qa",{...l.qa,skipLabel:f.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsx(Xf,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:f=>u("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(wa,{checked:l.qa.autoInstallPlaywright,onChange:f=>u("qa",{...l.qa,autoInstallPlaywright:f})})]})]})]})}),s.jsx("div",{id:"job-section-audit",children:s.jsxs(Ke,{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(wa,{checked:l.audit.enabled,onChange:f=>u("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(Mn,{label:"Audit Schedule",value:l.audit.schedule,onChange:f=>u("audit",{...l.audit,schedule:f})}),s.jsx(Fe,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:f=>u("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(Ke,{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(wa,{checked:l.analytics.enabled,onChange:f=>u("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(Fe,{label:"Amplitude API Key",value:((o=l.providerEnv)==null?void 0:o.AMPLITUDE_API_KEY)??"",onChange:f=>u("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude project API key"}),s.jsx(Fe,{label:"Amplitude Secret Key",type:"password",value:((m=l.providerEnv)==null?void 0:m.AMPLITUDE_SECRET_KEY)??"",onChange:f=>u("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude secret key"}),s.jsx(Mn,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:f=>u("analytics",{...l.analytics,schedule:f})}),s.jsx(Fe,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:f=>u("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(Fe,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:f=>u("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(ia,{label:"Target Column",value:l.analytics.targetColumn,onChange:f=>u("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=>u("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(Ke,{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(wa,{checked:l.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:d})]}),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(Fe,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:f=>u("roadmapScanner",{...l.roadmapScanner,roadmapPath:f.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(Mn,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:f=>u("roadmapScanner",{...l.roadmapScanner,slicerSchedule:f})}),s.jsx(Fe,{label:"Planner Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:f=>u("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(ia,{label:"Planner Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:f=>u("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(ia,{label:"Planner Issue Column",value:l.roadmapScanner.issueColumn||"Draft",onChange:f=>u("roadmapScanner",{...l.roadmapScanner,issueColumn:f==="Ready"?"Ready":"Draft"}),options:[{label:"Draft (default)",value:"Draft"},{label:"Ready",value:"Ready"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})})]})},ty=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],Yw=["executor","reviewer","qa","audit","slicer","analytics"],wf=l=>{var u,d,o,m,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:((u=l.roadmapScanner)==null?void 0:u.enabled)??!0,roadmapPath:((d=l.roadmapScanner)==null?void 0:d.roadmapPath)??"ROADMAP.md",autoScanInterval:((o=l.roadmapScanner)==null?void 0:o.autoScanInterval)??300,slicerSchedule:((m=l.roadmapScanner)==null?void 0:m.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||{},autoMerge:l.autoMerge??!1,autoMergeMethod:l.autoMergeMethod??"squash",fallbackOnRateLimit:l.fallbackOnRateLimit??!0,primaryFallbackModel:l.primaryFallbackModel??l.claudeModel??"sonnet",secondaryFallbackModel:l.secondaryFallbackModel??l.primaryFallbackModel??l.claudeModel??"sonnet",primaryFallbackPreset:l.primaryFallbackPreset??"",secondaryFallbackPreset:l.secondaryFallbackPreset??"",claudeModel:l.primaryFallbackModel??l.claudeModel??"sonnet",qa:l.qa||{enabled:!0,schedule:"45 2,14 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},audit:l.audit||{enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800},analytics:l.analytics||{enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},queue:l.queue||{enabled:!0,maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10}}}},ay=l=>{const u=au(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??"35 */12 * * *");return u?{mode:"template",selectedTemplateId:u.id}:{mode:"custom",selectedTemplateId:""}},$w=()=>{const{addToast:l,projectName:u,selectedProjectId:d,globalModeLoading:o,isGlobalMode:m,removeProjectFromList:f}=na(),[v,N]=ze.useState(!1),[b,y]=ze.useState(!1),[w,E]=ze.useState(!1),[S,D]=ze.useState(null),[A,M]=ze.useState([]),[Y,X]=ze.useState(void 0),Q=ze.useRef(!1),G=ze.useRef(!1),[ee,le]=ze.useState("template"),[te,W]=ze.useState("always-on"),[J,R]=ze.useState("general"),[U,ne]=ze.useState(!1),[F,ce]=ze.useState(null),[ye,me]=ze.useState(null),[B,ue]=ze.useState(null),{data:se,loading:Me,error:qe,refetch:_}=fn(Pf,[d],{enabled:!o}),{data:re,loading:ge,refetch:pe}=fn(tS,[d],{enabled:!o}),De=re??[];ze.useEffect(()=>{Uy().then(M).catch(console.error),yS().then(L=>X(L.webhook)).catch(()=>{})},[d]),ze.useEffect(()=>{const L=new URLSearchParams(location.search),fe=L.get("tab"),ve=L.get("mode");fe&&R({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",analytics:"jobs",board:"integrations",notifications:"integrations"}[fe]??fe),ve==="custom"?le("custom"):ve==="template"&&le("template");const xe=L.get("jobType");xe&&setTimeout(()=>{Ue("current",xe)},300)},[location.search,se]);const Ee=ze.useCallback(L=>{const fe=ay(L);le(fe.mode),W(fe.selectedTemplateId)},[]);ze.useEffect(()=>{if(se)if(Q.current)Q.current=!1;else{const L=wf(se);D(L),Ee(L)}},[se,Ee]),ze.useEffect(()=>{S&&G.current&&(G.current=!1,Qa())},[S==null?void 0:S.jobProviders]);const Ue=(L,fe)=>{if(L===u||L==="current"){if(["qa","audit","slicer","analytics"].includes(fe)){R("jobs"),setTimeout(()=>{const xe=document.getElementById(`job-section-${fe}`);xe&&(xe.scrollIntoView({behavior:"smooth",block:"center"}),xe.classList.add("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900","rounded-lg"),setTimeout(()=>xe.classList.remove("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900"),2e3))},50);return}ee!=="custom"&&Ft(),R("schedules"),setTimeout(()=>{const xe={executor:"job-schedule-executor",reviewer:"job-schedule-reviewer"},Ye=document.getElementById(xe[fe]||"");Ye&&(Ye.scrollIntoView({behavior:"smooth",block:"center"}),Ye.classList.add("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900","rounded-lg"),setTimeout(()=>Ye.classList.remove("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900"),2e3))},50)}else l({title:"Project Switch Required",message:`To edit ${L}, please switch to that project in the sidebar.`,type:"info"})},ke=(L,fe)=>{D(ve=>ve&&{...ve,[L]:fe})},et=()=>{if(le("template"),!S)return;const L=ay(S);L.mode==="template"&&(W(L.selectedTemplateId),ke("scheduleBundleId",L.selectedTemplateId))},Ft=()=>{le("custom"),ke("scheduleBundleId",null),W("")},Na=L=>{W(L.id),D(fe=>fe&&{...fe,cronSchedule:L.schedules.executor,reviewerSchedule:L.schedules.reviewer,scheduleBundleId:L.id,qa:{...fe.qa,schedule:L.schedules.qa},audit:{...fe.audit,schedule:L.schedules.audit},roadmapScanner:{...fe.roadmapScanner,slicerSchedule:L.schedules.slicer},fallbackOnRateLimit:!0})},Qa=async()=>{var ve,xe,Ye,$e,dt;if(!S)return;const L=S.cronSchedule!==(se==null?void 0:se.cronSchedule)||S.reviewerSchedule!==(se==null?void 0:se.reviewerSchedule)||S.cronScheduleOffset!==((se==null?void 0:se.cronScheduleOffset)??0)||S.schedulingPriority!==((se==null?void 0:se.schedulingPriority)??3)||S.executorEnabled!==((se==null?void 0:se.executorEnabled)??!0)||S.reviewerEnabled!==((se==null?void 0:se.reviewerEnabled)??!0)||S.queue.enabled!==(((ve=se==null?void 0:se.queue)==null?void 0:ve.enabled)??!0)||S.qa.enabled!==((se==null?void 0:se.qa.enabled)??!0)||S.qa.schedule!==(se==null?void 0:se.qa.schedule)||S.audit.enabled!==((se==null?void 0:se.audit.enabled)??!0)||S.audit.schedule!==(se==null?void 0:se.audit.schedule)||S.analytics.enabled!==(((xe=se==null?void 0:se.analytics)==null?void 0:xe.enabled)??!1)||S.analytics.schedule!==(((Ye=se==null?void 0:se.analytics)==null?void 0:Ye.schedule)??"0 6 * * 1")||S.roadmapScanner.enabled!==((($e=se==null?void 0:se.roadmapScanner)==null?void 0:$e.enabled)??!0)||(S.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((dt=se==null?void 0:se.roadmapScanner)==null?void 0:dt.slicerSchedule)||"35 */12 * * *"),fe={};for(const Xe of Yw){const gt=S.jobProviders[Xe];typeof gt=="string"&>.trim().length>0?fe[Xe]=gt:se!=null&&se.jobProviders[Xe]&&(fe[Xe]=null)}N(!0);try{const Xe=await Pc({provider:S.provider,providerLabel:S.providerLabel.trim(),providerPresets:Object.keys(S.providerPresets).length>0?S.providerPresets:void 0,defaultBranch:S.defaultBranch,prdDir:S.prdDir,branchPrefix:S.branchPrefix,branchPatterns:S.branchPatterns,executorEnabled:S.executorEnabled,reviewerEnabled:S.reviewerEnabled,minReviewScore:S.minReviewScore,maxRuntime:S.maxRuntime,reviewerMaxRuntime:S.reviewerMaxRuntime,maxLogSize:S.maxLogSize,cronSchedule:S.cronSchedule,reviewerSchedule:S.reviewerSchedule,scheduleBundleId:ee==="template"?S.scheduleBundleId:null,cronScheduleOffset:S.cronScheduleOffset,schedulingPriority:S.schedulingPriority,maxRetries:S.maxRetries,reviewerMaxRetries:S.reviewerMaxRetries,reviewerRetryDelay:S.reviewerRetryDelay,reviewerMaxPrsPerRun:S.reviewerMaxPrsPerRun,providerEnv:S.providerEnv,notifications:S.notifications,prdPriority:S.prdPriority,roadmapScanner:S.roadmapScanner,templatesDir:S.templatesDir,boardProvider:S.boardProvider,jobProviders:fe,autoMerge:S.autoMerge,autoMergeMethod:S.autoMergeMethod,fallbackOnRateLimit:S.fallbackOnRateLimit,primaryFallbackModel:S.primaryFallbackModel,secondaryFallbackModel:S.secondaryFallbackModel,primaryFallbackPreset:S.primaryFallbackPreset||void 0,secondaryFallbackPreset:S.secondaryFallbackPreset||void 0,claudeModel:S.primaryFallbackModel,qa:S.qa,audit:S.audit,analytics:S.analytics,queue:S.queue}),gt=wf(Xe);D(gt),Ee(gt);let yn="";if(L)try{await nu()}catch(Hs){yn=Hs instanceof Error?Hs.message:"failed to reinstall cron schedules"}l(yn?{title:"Settings Saved (Cron Reinstall Failed)",message:yn,type:"warning"}:{title:"Settings Saved",message:L?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),Q.current=!0,_(),pe()}catch(Xe){l({title:"Save Failed",message:Xe instanceof Error?Xe.message:"Failed to save configuration",type:"error"})}finally{N(!1)}},Wa=()=>{if(se){const L=wf(se);D(L),Ee(L),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},ua=async L=>{if(!(Y!=null&&!window.confirm("Replace existing global channel?")))try{const fe=await xg({webhook:L});X(fe.webhook)}catch(fe){l({title:"Failed to set global channel",message:fe instanceof Error?fe.message:"Unknown error",type:"error"})}},ca=async()=>{try{await xg({webhook:null}),X(null)}catch(L){l({title:"Failed to unset global channel",message:L instanceof Error?L.message:"Unknown error",type:"error"})}},Ia=async L=>{try{const fe=await By(L);ke("roadmapScanner",fe.roadmapScanner);let ve="";try{await nu()}catch(xe){ve=xe instanceof Error?xe.message:"Failed to reinstall cron schedules"}l(ve?{title:"Planner Saved (Cron Reinstall Failed)",message:ve,type:"warning"}:{title:L?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${L?"enabled":"disabled"}.`,type:"success"})}catch(fe){l({title:"Toggle Failed",message:fe instanceof Error?fe.message:"Failed to toggle roadmap scanner",type:"error"})}},hn=async()=>{if(d){E(!0);try{await K1(d),f(d),y(!1),l({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(L){l({title:"Remove Failed",message:L instanceof Error?L.message:"Failed to remove project",type:"error"})}finally{E(!1)}}},la=()=>({...{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"}}},...S==null?void 0:S.providerPresets}),ka=L=>{const fe=la();return Object.entries(fe).map(([ve,xe])=>({label:xe.name,value:ve}))},mn=(L,fe)=>{const ve=[];fe.provider===L&&ve.push("Global Provider");const xe={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[Ye,$e]of Object.entries(fe.jobProviders))$e===L&&ve.push(xe[Ye]??Ye);return ve},gn=()=>{ce(null),me(null),ne(!0)},sl=L=>{const ve=la()[L];ve&&(ce(L),me(ve),ne(!0))},rl=async(L,fe)=>{if(!S)return;const ve=!F,xe={...S.providerPresets,[L]:fe};ke("providerPresets",xe);try{await Pc({providerPresets:{[L]:fe}}),l({title:ve?"Preset Added":"Preset Updated",message:ve?`${fe.name} has been added. You can now assign it to jobs.`:`${fe.name} has been saved.`,type:"success"})}catch(Ye){l({title:"Save Failed",message:Ye instanceof Error?Ye.message:"Failed to save preset",type:"error"}),ke("providerPresets",S.providerPresets)}},At=L=>{var xe,Ye;if(!S)return;if(ty.includes(L)){l({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const fe=mn(L,S);if(fe.length>0){ue({presetId:L,presetName:((xe=la()[L])==null?void 0:xe.name)??L,references:fe});return}const ve={...S.providerPresets};delete ve[L],ke("providerPresets",ve),l({title:"Preset Deleted",message:`${((Ye=la()[L])==null?void 0:Ye.name)??L} has been removed.`,type:"success"})},Xa=L=>{if(!S)return;const fe={...S.providerPresets};delete fe[L],ke("providerPresets",fe),l({title:"Preset Reset",message:`${L} has been reset to built-in defaults.`,type:"success"})},On=()=>{if(!B||!S)return;const{presetId:L}=B,fe={...S.providerPresets};delete fe[L],ke("providerPresets",fe);const ve={...S.jobProviders};for(const xe of Object.keys(ve))ve[xe]===L&&delete ve[xe];ke("jobProviders",ve),S.provider===L&&ke("provider","claude"),ue(null),l({title:"Preset Deleted",message:`${B.presetName} has been removed and all references cleared.`,type:"success"})};if(Me||!S)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(qe)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(ll,{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:qe.message}),s.jsx(rt,{onClick:()=>_(),children:"Retry"})]});const Dn=[{id:"general",label:"General",content:s.jsx(qw,{form:S,updateField:ke,projectName:u,doctorChecks:De,doctorLoading:ge})},{id:"ai-runtime",label:"AI & Runtime",content:s.jsx(Vw,{form:S,updateField:ke,jobProvidersChangedRef:G,getAllPresets:la,getPresetOptions:ka,handleEditPreset:sl,handleDeletePreset:At,handleResetPreset:Xa,handleAddPreset:gn})},{id:"jobs",label:"Jobs",content:s.jsx(Bw,{form:S,updateField:ke,handleRoadmapToggle:Ia})},{id:"schedules",label:"Schedules",content:s.jsx(px,{form:{cronSchedule:S.cronSchedule,reviewerSchedule:S.reviewerSchedule,qa:S.qa,audit:S.audit,analytics:S.analytics,roadmapScanner:{enabled:S.roadmapScanner.enabled,slicerSchedule:S.roadmapScanner.slicerSchedule||"35 */12 * * *"},scheduleBundleId:S.scheduleBundleId,schedulingPriority:S.schedulingPriority,cronScheduleOffset:S.cronScheduleOffset,globalQueueEnabled:S.queue.enabled},scheduleMode:ee,selectedTemplateId:te,onFieldChange:(L,fe)=>{L==="globalQueueEnabled"?ke("queue",{...S.queue,enabled:fe}):ke(L,fe)},onSwitchToTemplate:et,onSwitchToCustom:Ft,onApplyTemplate:Na,allProjectConfigs:A,currentProjectId:d,onEditJob:Ue})},{id:"notifications",label:"Notifications",content:s.jsxs(Ke,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Xg,{notifications:S.notifications,onChange:L=>ke("notifications",L),globalWebhook:Y,onSetGlobal:ua,onUnsetGlobal:ca})]})},{id:"roadmap",label:"Planner",content:s.jsx(Ke,{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(wa,{checked:S.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:Ia})]})})},{id:"integrations",label:"Integrations",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Ke,{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(wa,{checked:S.boardProvider.enabled,onChange:L=>ke("boardProvider",{...S.boardProvider,enabled:L})})]}),S.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(ia,{label:"Board Provider",value:S.boardProvider.provider,onChange:L=>ke("boardProvider",{...S.boardProvider,provider:L}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),S.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(Fe,{label:"Project Number",type:"number",value:String(S.boardProvider.projectNumber||""),onChange:L=>ke("boardProvider",{...S.boardProvider,projectNumber:L.target.value?Number(L.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(Fe,{label:"Repository",value:S.boardProvider.repo||"",onChange:L=>ke("boardProvider",{...S.boardProvider,repo:L.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),S.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(Ke,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Xg,{notifications:S.notifications,onChange:L=>ke("notifications",L)})]})]})},{id:"advanced",label:"Advanced",content:s.jsxs(Ke,{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(Fe,{label:"Templates Directory",value:S.templatesDir,onChange:L=>ke("templatesDir",L.target.value),helperText:"Directory for custom template overrides"}),s.jsx(Fe,{label:"Max Retries",type:"number",min:"1",value:String(S.maxRetries),onChange:L=>{const fe=Math.max(1,Number(L.target.value||1));ke("maxRetries",fe)},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(Xf,{label:"PRD Priority",value:S.prdPriority,onChange:L=>ke("prdPriority",L),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),s.jsx($y,{tabs:Dn,activeTab:J,onChange:R}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(rt,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:Wa,children:[s.jsx(Dy,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(rt,{onClick:Qa,loading:v,children:[s.jsx(U1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),m&&d&&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(rt,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>y(!0),children:[s.jsx(Kc,{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:()=>!w&&y(!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(su,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",u,"?"]})]}),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(rt,{variant:"ghost",onClick:()=>y(!1),disabled:w,children:"Cancel"}),s.jsx(rt,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:hn,loading:w,children:"Remove"})]})]})]}),s.jsx(Hw,{isOpen:U,onClose:()=>{ne(!1),ce(null),me(null)},onSave:rl,presetId:F,preset:ye,isBuiltIn:F?ty.includes(F):!1,existingIds:Object.keys(la())}),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:()=>ue(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(su,{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:B.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:B.references.map(L=>s.jsx("li",{children:L},L))}),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(rt,{variant:"ghost",onClick:()=>ue(null),children:"Cancel"}),s.jsx(rt,{variant:"secondary",onClick:On,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},Fw=()=>(CS(),OS(),s.jsx(xb,{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(jS,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(ES,{}),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(Pv,{children:[s.jsx(tl,{path:"/",element:s.jsx(HS,{})}),s.jsx(tl,{path:"/prs",element:s.jsx(VS,{})}),s.jsx(tl,{path:"/board",element:s.jsx(kS,{})}),s.jsx(tl,{path:"/scheduling",element:s.jsx(Dw,{})}),s.jsx(tl,{path:"/logs",element:s.jsx(qS,{})}),s.jsx(tl,{path:"/roadmap",element:s.jsx(BS,{})}),s.jsx(tl,{path:"/settings",element:s.jsx($w,{})}),s.jsx(tl,{path:"*",element:s.jsx(Gv,{to:"/",replace:!0})})]})})})]}),s.jsx(MS,{})]})})),bx=document.getElementById("root");if(!bx)throw new Error("Could not find root element to mount to");const Gw=Wp.createRoot(bx);Gw.render(s.jsx(ze.StrictMode,{children:s.jsx(Fw,{})}));
|