@jonit-dev/night-watch-cli 1.8.10-beta.1 → 1.8.10-beta.2
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 +2309 -1313
- package/dist/web/assets/index-BUgI2S1s.js +406 -0
- package/dist/web/assets/index-CkdLFBd7.js +406 -0
- package/dist/web/assets/index-RMfswANB.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/analytics.d.ts +0 -14
- package/dist/commands/analytics.d.ts.map +0 -1
- package/dist/commands/analytics.js +0 -69
- package/dist/commands/analytics.js.map +0 -1
- package/dist/commands/audit.d.ts +0 -19
- package/dist/commands/audit.d.ts.map +0 -1
- package/dist/commands/audit.js +0 -144
- package/dist/commands/audit.js.map +0 -1
- package/dist/commands/board.d.ts +0 -9
- package/dist/commands/board.d.ts.map +0 -1
- package/dist/commands/board.js +0 -702
- package/dist/commands/board.js.map +0 -1
- package/dist/commands/cancel.d.ts +0 -46
- package/dist/commands/cancel.d.ts.map +0 -1
- package/dist/commands/cancel.js +0 -239
- package/dist/commands/cancel.js.map +0 -1
- package/dist/commands/cron.d.ts +0 -8
- package/dist/commands/cron.d.ts.map +0 -1
- package/dist/commands/cron.js +0 -134
- package/dist/commands/cron.js.map +0 -1
- package/dist/commands/dashboard/tab-actions.d.ts +0 -10
- package/dist/commands/dashboard/tab-actions.d.ts.map +0 -1
- package/dist/commands/dashboard/tab-actions.js +0 -247
- package/dist/commands/dashboard/tab-actions.js.map +0 -1
- package/dist/commands/dashboard/tab-config.d.ts +0 -21
- package/dist/commands/dashboard/tab-config.d.ts.map +0 -1
- package/dist/commands/dashboard/tab-config.js +0 -873
- package/dist/commands/dashboard/tab-config.js.map +0 -1
- package/dist/commands/dashboard/tab-logs.d.ts +0 -10
- package/dist/commands/dashboard/tab-logs.d.ts.map +0 -1
- package/dist/commands/dashboard/tab-logs.js +0 -202
- package/dist/commands/dashboard/tab-logs.js.map +0 -1
- package/dist/commands/dashboard/tab-schedules.d.ts +0 -21
- package/dist/commands/dashboard/tab-schedules.d.ts.map +0 -1
- package/dist/commands/dashboard/tab-schedules.js +0 -320
- package/dist/commands/dashboard/tab-schedules.js.map +0 -1
- package/dist/commands/dashboard/tab-status.d.ts +0 -32
- package/dist/commands/dashboard/tab-status.d.ts.map +0 -1
- package/dist/commands/dashboard/tab-status.js +0 -424
- package/dist/commands/dashboard/tab-status.js.map +0 -1
- package/dist/commands/dashboard/types.d.ts +0 -42
- package/dist/commands/dashboard/types.d.ts.map +0 -1
- package/dist/commands/dashboard/types.js +0 -5
- package/dist/commands/dashboard/types.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -11
- package/dist/commands/dashboard.d.ts.map +0 -1
- package/dist/commands/dashboard.js +0 -242
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -16
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -195
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/history.d.ts +0 -7
- package/dist/commands/history.d.ts.map +0 -1
- package/dist/commands/history.js +0 -49
- package/dist/commands/history.js.map +0 -1
- package/dist/commands/init.d.ts +0 -45
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -777
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/install.d.ts +0 -65
- package/dist/commands/install.d.ts.map +0 -1
- package/dist/commands/install.js +0 -405
- package/dist/commands/install.js.map +0 -1
- package/dist/commands/logs.d.ts +0 -15
- package/dist/commands/logs.d.ts.map +0 -1
- package/dist/commands/logs.js +0 -155
- package/dist/commands/logs.js.map +0 -1
- package/dist/commands/merge.d.ts +0 -26
- package/dist/commands/merge.d.ts.map +0 -1
- package/dist/commands/merge.js +0 -159
- package/dist/commands/merge.js.map +0 -1
- package/dist/commands/notify.d.ts +0 -7
- package/dist/commands/notify.d.ts.map +0 -1
- package/dist/commands/notify.js +0 -43
- package/dist/commands/notify.js.map +0 -1
- package/dist/commands/plan.d.ts +0 -19
- package/dist/commands/plan.d.ts.map +0 -1
- package/dist/commands/plan.js +0 -88
- package/dist/commands/plan.js.map +0 -1
- package/dist/commands/prd-state.d.ts +0 -12
- package/dist/commands/prd-state.d.ts.map +0 -1
- package/dist/commands/prd-state.js +0 -47
- package/dist/commands/prd-state.js.map +0 -1
- package/dist/commands/prd.d.ts +0 -18
- package/dist/commands/prd.d.ts.map +0 -1
- package/dist/commands/prd.js +0 -363
- package/dist/commands/prd.js.map +0 -1
- package/dist/commands/prds.d.ts +0 -13
- package/dist/commands/prds.d.ts.map +0 -1
- package/dist/commands/prds.js +0 -194
- package/dist/commands/prds.js.map +0 -1
- package/dist/commands/prs.d.ts +0 -14
- package/dist/commands/prs.d.ts.map +0 -1
- package/dist/commands/prs.js +0 -104
- package/dist/commands/prs.js.map +0 -1
- package/dist/commands/qa.d.ts +0 -34
- package/dist/commands/qa.d.ts.map +0 -1
- package/dist/commands/qa.js +0 -214
- package/dist/commands/qa.js.map +0 -1
- package/dist/commands/queue.d.ts +0 -8
- package/dist/commands/queue.d.ts.map +0 -1
- package/dist/commands/queue.js +0 -376
- package/dist/commands/queue.js.map +0 -1
- package/dist/commands/resolve.d.ts +0 -26
- package/dist/commands/resolve.d.ts.map +0 -1
- package/dist/commands/resolve.js +0 -186
- package/dist/commands/resolve.js.map +0 -1
- package/dist/commands/retry.d.ts +0 -9
- package/dist/commands/retry.d.ts.map +0 -1
- package/dist/commands/retry.js +0 -71
- package/dist/commands/retry.js.map +0 -1
- package/dist/commands/review.d.ts +0 -82
- package/dist/commands/review.d.ts.map +0 -1
- package/dist/commands/review.js +0 -479
- package/dist/commands/review.js.map +0 -1
- package/dist/commands/run.d.ts +0 -73
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -509
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/serve.d.ts +0 -19
- package/dist/commands/serve.d.ts.map +0 -1
- package/dist/commands/serve.js +0 -142
- package/dist/commands/serve.js.map +0 -1
- package/dist/commands/shared/env-builder.d.ts +0 -49
- package/dist/commands/shared/env-builder.d.ts.map +0 -1
- package/dist/commands/shared/env-builder.js +0 -150
- package/dist/commands/shared/env-builder.js.map +0 -1
- package/dist/commands/slice.d.ts +0 -35
- package/dist/commands/slice.d.ts.map +0 -1
- package/dist/commands/slice.js +0 -316
- package/dist/commands/slice.js.map +0 -1
- package/dist/commands/state.d.ts +0 -8
- package/dist/commands/state.d.ts.map +0 -1
- package/dist/commands/state.js +0 -54
- package/dist/commands/state.js.map +0 -1
- package/dist/commands/status.d.ts +0 -14
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -297
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/summary.d.ts +0 -14
- package/dist/commands/summary.d.ts.map +0 -1
- package/dist/commands/summary.js +0 -193
- package/dist/commands/summary.js.map +0 -1
- package/dist/commands/uninstall.d.ts +0 -25
- package/dist/commands/uninstall.d.ts.map +0 -1
- package/dist/commands/uninstall.js +0 -134
- package/dist/commands/uninstall.js.map +0 -1
- package/dist/commands/update.d.ts +0 -22
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js +0 -90
- package/dist/commands/update.js.map +0 -1
- package/dist/web/assets/index-2JY0x_Ij.js +0 -381
- package/dist/web/assets/index-3h8pgmqL.css +0 -1
- package/dist/web/assets/index-B-wbyZq7.js +0 -386
- package/dist/web/assets/index-B1BnOpiO.css +0 -1
- package/dist/web/assets/index-B3CnV08_.js +0 -365
- package/dist/web/assets/index-B5QjuFh9.css +0 -1
- package/dist/web/assets/index-B8FW2ecQ.js +0 -370
- package/dist/web/assets/index-BFxPiKyy.js +0 -381
- package/dist/web/assets/index-BGqNh_Da.js +0 -365
- package/dist/web/assets/index-BIONU0qz.css +0 -1
- package/dist/web/assets/index-B_l_3wnA.js +0 -370
- package/dist/web/assets/index-Ba-4YvTQ.js +0 -365
- package/dist/web/assets/index-Bbb4-39N.js +0 -370
- package/dist/web/assets/index-BdgdShEN.js +0 -365
- package/dist/web/assets/index-BhiC4Z-G.js +0 -381
- package/dist/web/assets/index-BjhCFjZi.js +0 -381
- package/dist/web/assets/index-BlRxmrnQ.css +0 -1
- package/dist/web/assets/index-BqwbXsHS.js +0 -365
- package/dist/web/assets/index-BsC7RT48.css +0 -1
- package/dist/web/assets/index-Bvh8XI8_.js +0 -370
- package/dist/web/assets/index-C01r2ymn.js +0 -381
- package/dist/web/assets/index-C51Rbsmk.js +0 -381
- package/dist/web/assets/index-C7lMNxRE.js +0 -370
- package/dist/web/assets/index-CJLObgsn.js +0 -386
- package/dist/web/assets/index-CLuRf7Zt.js +0 -381
- package/dist/web/assets/index-CM3xFd3e.css +0 -1
- package/dist/web/assets/index-CNkBtDK7.js +0 -370
- package/dist/web/assets/index-CPQbZ1BL.css +0 -1
- package/dist/web/assets/index-CTy5dUDU.css +0 -1
- package/dist/web/assets/index-CU15COKs.js +0 -370
- package/dist/web/assets/index-CiRJZI4z.js +0 -386
- package/dist/web/assets/index-Cp7RYjoy.css +0 -1
- package/dist/web/assets/index-CvPkZOWT.js +0 -381
- package/dist/web/assets/index-CvUk-33B.css +0 -1
- package/dist/web/assets/index-Cvmj-oF6.css +0 -1
- package/dist/web/assets/index-CxE5iQVO.js +0 -381
- package/dist/web/assets/index-D7lZQpFV.js +0 -365
- package/dist/web/assets/index-DAyP4GOi.css +0 -1
- package/dist/web/assets/index-DCG0n8Kg.js +0 -386
- package/dist/web/assets/index-DEEI8cyF.css +0 -1
- package/dist/web/assets/index-DF99BowV.js +0 -381
- package/dist/web/assets/index-DGWsvFj6.css +0 -1
- package/dist/web/assets/index-DGpU39Cp.css +0 -1
- package/dist/web/assets/index-DI4kFgOi.js +0 -370
- package/dist/web/assets/index-DIyTcPw5.css +0 -1
- package/dist/web/assets/index-DTsfDC7m.js +0 -381
- package/dist/web/assets/index-DcgNAi4A.js +0 -386
- package/dist/web/assets/index-DgOAgkZy.css +0 -1
- package/dist/web/assets/index-DnHkqbOa.js +0 -386
- package/dist/web/assets/index-DnR7Idcf.css +0 -1
- package/dist/web/assets/index-DpVirMEe.css +0 -1
- package/dist/web/assets/index-DsYIWZ86.css +0 -1
- package/dist/web/assets/index-DtrDkci5.js +0 -381
- package/dist/web/assets/index-DyjIth5M.js +0 -386
- package/dist/web/assets/index-FwIKfHPL.css +0 -1
- package/dist/web/assets/index-IKrZymWk.css +0 -1
- package/dist/web/assets/index-MA6fM0ab.js +0 -381
- package/dist/web/assets/index-N_QxaSEg.css +0 -1
- package/dist/web/assets/index-OcU-0TCQ.css +0 -1
- package/dist/web/assets/index-OyhrmG-L.js +0 -381
- package/dist/web/assets/index-SQlBKu_s.js +0 -386
- package/dist/web/assets/index-Sv2B60J4.js +0 -370
- package/dist/web/assets/index-Vgyivb5u.js +0 -365
- package/dist/web/assets/index-ZABWMEZR.js +0 -381
- package/dist/web/assets/index-ZE5lOeJp.js +0 -386
- package/dist/web/assets/index-aCHmkAcJ.css +0 -1
- package/dist/web/assets/index-bFijnpuU.js +0 -381
- package/dist/web/assets/index-bUPZgSoZ.css +0 -1
- package/dist/web/assets/index-mz1VIYsP.css +0 -1
- package/dist/web/assets/index-oOp_MFeE.js +0 -376
- package/dist/web/assets/index-rfU713Zm.js +0 -386
- package/dist/web/assets/index-tuNH9gmb.js +0 -448
- package/dist/web/assets/index-viSwHyDD.js +0 -365
- package/dist/web/assets/index-yKEQysks.js +0 -365
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
var Bp=Object.defineProperty;var Q0=l=>{throw TypeError(l)};var Vp=(l,r,c)=>r in l?Bp(l,r,{enumerable:!0,configurable:!0,writable:!0,value:c}):l[r]=c;var X0=(l,r,c)=>Vp(l,typeof r!="symbol"?r+"":r,c),of=(l,r,c)=>r.has(l)||Q0("Cannot "+c);var te=(l,r,c)=>(of(l,r,"read from private field"),c?c.call(l):r.get(l)),rt=(l,r,c)=>r.has(l)?Q0("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(l):r.set(l,c),Ee=(l,r,c,o)=>(of(l,r,"write to private field"),o?o.call(l,c):r.set(l,c),c),we=(l,r,c)=>(of(l,r,"access private method"),c);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))o(h);new MutationObserver(h=>{for(const f of h)if(f.type==="childList")for(const v of f.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&o(v)}).observe(document,{childList:!0,subtree:!0});function c(h){const f={};return h.integrity&&(f.integrity=h.integrity),h.referrerPolicy&&(f.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?f.credentials="include":h.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(h){if(h.ep)return;h.ep=!0;const f=c(h);fetch(h.href,f)}})();function Hf(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function Yp(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var r=l.default;if(typeof r=="function"){var c=function o(){return this instanceof o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};c.prototype=r.prototype}else c={};return Object.defineProperty(c,"__esModule",{value:!0}),Object.keys(l).forEach(function(o){var h=Object.getOwnPropertyDescriptor(l,o);Object.defineProperty(c,o,h.get?h:{enumerable:!0,get:function(){return l[o]}})}),c}var df={exports:{}},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 J0;function $p(){if(J0)return Bi;J0=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(o,h,f){var v=null;if(f!==void 0&&(v=""+f),h.key!==void 0&&(v=""+h.key),"key"in h){f={};for(var N in h)N!=="key"&&(f[N]=h[N])}else f=h;return h=f.ref,{$$typeof:l,type:o,key:v,ref:h!==void 0?h:null,props:f}}return Bi.Fragment=r,Bi.jsx=c,Bi.jsxs=c,Bi}var K0;function Fp(){return K0||(K0=1,df.exports=$p()),df.exports}var s=Fp(),ff={exports:{}},Be={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var eg;function Gp(){if(eg)return Be;eg=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),v=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),j=Symbol.iterator;function D(A){return A===null||typeof A!="object"?null:(A=j&&A[j]||A["@@iterator"],typeof A=="function"?A:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,R={};function I(A,se,me){this.props=A,this.context=se,this.refs=R,this.updater=me||C}I.prototype.isReactComponent={},I.prototype.setState=function(A,se){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,se,"setState")},I.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Y(){}Y.prototype=I.prototype;function G(A,se,me){this.props=A,this.context=se,this.refs=R,this.updater=me||C}var ee=G.prototype=new Y;ee.constructor=G,M(ee,I.prototype),ee.isPureReactComponent=!0;var de=Array.isArray;function Z(){}var P={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function ne(A,se,me){var ye=me.ref;return{$$typeof:l,type:A,key:se,ref:ye!==void 0?ye:null,props:me}}function z(A,se){return ne(A.type,se,A.props)}function Q(A){return typeof A=="object"&&A!==null&&A.$$typeof===l}function _(A){var se={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(me){return se[me]})}var ce=/\/+/g;function he(A,se){return typeof A=="object"&&A!==null&&A.key!=null?_(""+A.key):se.toString(36)}function B(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(Z,Z):(A.status="pending",A.then(function(se){A.status==="pending"&&(A.status="fulfilled",A.value=se)},function(se){A.status==="pending"&&(A.status="rejected",A.reason=se)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function $(A,se,me,ye,Oe){var Te=typeof A;(Te==="undefined"||Te==="boolean")&&(A=null);var Ve=!1;if(A===null)Ve=!0;else switch(Te){case"bigint":case"string":case"number":Ve=!0;break;case"object":switch(A.$$typeof){case l:case r:Ve=!0;break;case S:return Ve=A._init,$(Ve(A._payload),se,me,ye,Oe)}}if(Ve)return Oe=Oe(A),Ve=ye===""?"."+he(A,0):ye,de(Oe)?(me="",Ve!=null&&(me=Ve.replace(ce,"$&/")+"/"),$(Oe,se,me,"",function(ua){return ua})):Oe!=null&&(Q(Oe)&&(Oe=z(Oe,me+(Oe.key==null||A&&A.key===Oe.key?"":(""+Oe.key).replace(ce,"$&/")+"/")+Ve)),se.push(Oe)),1;Ve=0;var St=ye===""?".":ye+":";if(de(A))for(var tt=0;tt<A.length;tt++)ye=A[tt],Te=St+he(ye,tt),Ve+=$(ye,se,me,Te,Oe);else if(tt=D(A),typeof tt=="function")for(A=tt.call(A),tt=0;!(ye=A.next()).done;)ye=ye.value,Te=St+he(ye,tt++),Ve+=$(ye,se,me,Te,Oe);else if(Te==="object"){if(typeof A.then=="function")return $(B(A),se,me,ye,Oe);throw se=String(A),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return Ve}function ie(A,se,me){if(A==null)return A;var ye=[],Oe=0;return $(A,ye,"","",function(Te){return se.call(me,Te,Oe++)}),ye}function ge(A){if(A._status===-1){var se=A._result;se=se(),se.then(function(me){(A._status===0||A._status===-1)&&(A._status=1,A._result=me)},function(me){(A._status===0||A._status===-1)&&(A._status=2,A._result=me)}),A._status===-1&&(A._status=0,A._result=se)}if(A._status===1)return A._result.default;throw A._result}var Se=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},Re={map:ie,forEach:function(A,se,me){ie(A,function(){se.apply(this,arguments)},me)},count:function(A){var se=0;return ie(A,function(){se++}),se},toArray:function(A){return ie(A,function(se){return se})||[]},only:function(A){if(!Q(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Be.Activity=T,Be.Children=Re,Be.Component=I,Be.Fragment=c,Be.Profiler=h,Be.PureComponent=G,Be.StrictMode=o,Be.Suspense=b,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Be.__COMPILER_RUNTIME={__proto__:null,c:function(A){return P.H.useMemoCache(A)}},Be.cache=function(A){return function(){return A.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(A,se,me){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ye=M({},A.props),Oe=A.key;if(se!=null)for(Te in se.key!==void 0&&(Oe=""+se.key),se)!W.call(se,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&se.ref===void 0||(ye[Te]=se[Te]);var Te=arguments.length-2;if(Te===1)ye.children=me;else if(1<Te){for(var Ve=Array(Te),St=0;St<Te;St++)Ve[St]=arguments[St+2];ye.children=Ve}return ne(A.type,Oe,ye)},Be.createContext=function(A){return A={$$typeof:v,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:f,_context:A},A},Be.createElement=function(A,se,me){var ye,Oe={},Te=null;if(se!=null)for(ye in se.key!==void 0&&(Te=""+se.key),se)W.call(se,ye)&&ye!=="key"&&ye!=="__self"&&ye!=="__source"&&(Oe[ye]=se[ye]);var Ve=arguments.length-2;if(Ve===1)Oe.children=me;else if(1<Ve){for(var St=Array(Ve),tt=0;tt<Ve;tt++)St[tt]=arguments[tt+2];Oe.children=St}if(A&&A.defaultProps)for(ye in Ve=A.defaultProps,Ve)Oe[ye]===void 0&&(Oe[ye]=Ve[ye]);return ne(A,Te,Oe)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(A){return{$$typeof:N,render:A}},Be.isValidElement=Q,Be.lazy=function(A){return{$$typeof:S,_payload:{_status:-1,_result:A},_init:ge}},Be.memo=function(A,se){return{$$typeof:x,type:A,compare:se===void 0?null:se}},Be.startTransition=function(A){var se=P.T,me={};P.T=me;try{var ye=A(),Oe=P.S;Oe!==null&&Oe(me,ye),typeof ye=="object"&&ye!==null&&typeof ye.then=="function"&&ye.then(Z,Se)}catch(Te){Se(Te)}finally{se!==null&&me.types!==null&&(se.types=me.types),P.T=se}},Be.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Be.use=function(A){return P.H.use(A)},Be.useActionState=function(A,se,me){return P.H.useActionState(A,se,me)},Be.useCallback=function(A,se){return P.H.useCallback(A,se)},Be.useContext=function(A){return P.H.useContext(A)},Be.useDebugValue=function(){},Be.useDeferredValue=function(A,se){return P.H.useDeferredValue(A,se)},Be.useEffect=function(A,se){return P.H.useEffect(A,se)},Be.useEffectEvent=function(A){return P.H.useEffectEvent(A)},Be.useId=function(){return P.H.useId()},Be.useImperativeHandle=function(A,se,me){return P.H.useImperativeHandle(A,se,me)},Be.useInsertionEffect=function(A,se){return P.H.useInsertionEffect(A,se)},Be.useLayoutEffect=function(A,se){return P.H.useLayoutEffect(A,se)},Be.useMemo=function(A,se){return P.H.useMemo(A,se)},Be.useOptimistic=function(A,se){return P.H.useOptimistic(A,se)},Be.useReducer=function(A,se,me){return P.H.useReducer(A,se,me)},Be.useRef=function(A){return P.H.useRef(A)},Be.useState=function(A){return P.H.useState(A)},Be.useSyncExternalStore=function(A,se,me){return P.H.useSyncExternalStore(A,se,me)},Be.useTransition=function(){return P.H.useTransition()},Be.version="19.2.4",Be}var tg;function Lf(){return tg||(tg=1,ff.exports=Gp()),ff.exports}var U=Lf();const qe=Hf(U);var hf={exports:{}},Vi={},mf={exports:{}},gf={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var ag;function Pp(){return ag||(ag=1,(function(l){function r($,ie){var ge=$.length;$.push(ie);e:for(;0<ge;){var Se=ge-1>>>1,Re=$[Se];if(0<h(Re,ie))$[Se]=ie,$[ge]=Re,ge=Se;else break e}}function c($){return $.length===0?null:$[0]}function o($){if($.length===0)return null;var ie=$[0],ge=$.pop();if(ge!==ie){$[0]=ge;e:for(var Se=0,Re=$.length,A=Re>>>1;Se<A;){var se=2*(Se+1)-1,me=$[se],ye=se+1,Oe=$[ye];if(0>h(me,ge))ye<Re&&0>h(Oe,me)?($[Se]=Oe,$[ye]=ge,Se=ye):($[Se]=me,$[se]=ge,Se=se);else if(ye<Re&&0>h(Oe,ge))$[Se]=Oe,$[ye]=ge,Se=ye;else break e}}return ie}function h($,ie){var ge=$.sortIndex-ie.sortIndex;return ge!==0?ge:$.id-ie.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var v=Date,N=v.now();l.unstable_now=function(){return v.now()-N}}var b=[],x=[],S=1,T=null,j=3,D=!1,C=!1,M=!1,R=!1,I=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function ee($){for(var ie=c(x);ie!==null;){if(ie.callback===null)o(x);else if(ie.startTime<=$)o(x),ie.sortIndex=ie.expirationTime,r(b,ie);else break;ie=c(x)}}function de($){if(M=!1,ee($),!C)if(c(b)!==null)C=!0,Z||(Z=!0,_());else{var ie=c(x);ie!==null&&B(de,ie.startTime-$)}}var Z=!1,P=-1,W=5,ne=-1;function z(){return R?!0:!(l.unstable_now()-ne<W)}function Q(){if(R=!1,Z){var $=l.unstable_now();ne=$;var ie=!0;try{e:{C=!1,M&&(M=!1,Y(P),P=-1),D=!0;var ge=j;try{t:{for(ee($),T=c(b);T!==null&&!(T.expirationTime>$&&z());){var Se=T.callback;if(typeof Se=="function"){T.callback=null,j=T.priorityLevel;var Re=Se(T.expirationTime<=$);if($=l.unstable_now(),typeof Re=="function"){T.callback=Re,ee($),ie=!0;break t}T===c(b)&&o(b),ee($)}else o(b);T=c(b)}if(T!==null)ie=!0;else{var A=c(x);A!==null&&B(de,A.startTime-$),ie=!1}}break e}finally{T=null,j=ge,D=!1}ie=void 0}}finally{ie?_():Z=!1}}}var _;if(typeof G=="function")_=function(){G(Q)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,he=ce.port2;ce.port1.onmessage=Q,_=function(){he.postMessage(null)}}else _=function(){I(Q,0)};function B($,ie){P=I(function(){$(l.unstable_now())},ie)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function($){$.callback=null},l.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<$?Math.floor(1e3/$):5},l.unstable_getCurrentPriorityLevel=function(){return j},l.unstable_next=function($){switch(j){case 1:case 2:case 3:var ie=3;break;default:ie=j}var ge=j;j=ie;try{return $()}finally{j=ge}},l.unstable_requestPaint=function(){R=!0},l.unstable_runWithPriority=function($,ie){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var ge=j;j=$;try{return ie()}finally{j=ge}},l.unstable_scheduleCallback=function($,ie,ge){var Se=l.unstable_now();switch(typeof ge=="object"&&ge!==null?(ge=ge.delay,ge=typeof ge=="number"&&0<ge?Se+ge:Se):ge=Se,$){case 1:var Re=-1;break;case 2:Re=250;break;case 5:Re=1073741823;break;case 4:Re=1e4;break;default:Re=5e3}return Re=ge+Re,$={id:S++,callback:ie,priorityLevel:$,startTime:ge,expirationTime:Re,sortIndex:-1},ge>Se?($.sortIndex=ge,r(x,$),c(b)===null&&$===c(x)&&(M?(Y(P),P=-1):M=!0,B(de,ge-Se))):($.sortIndex=Re,r(b,$),C||D||(C=!0,Z||(Z=!0,_()))),$},l.unstable_shouldYield=z,l.unstable_wrapCallback=function($){var ie=j;return function(){var ge=j;j=ie;try{return $.apply(this,arguments)}finally{j=ge}}}})(gf)),gf}var ng;function Zp(){return ng||(ng=1,mf.exports=Pp()),mf.exports}var xf={exports:{}},ma={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var lg;function Wp(){if(lg)return ma;lg=1;var l=Lf();function r(b){var x="https://react.dev/errors/"+b;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)x+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+b+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var o={d:{f:c,r:function(){throw Error(r(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},h=Symbol.for("react.portal");function f(b,x,S){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:T==null?null:""+T,children:b,containerInfo:x,implementation:S}}var v=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function N(b,x){if(b==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return ma.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ma.createPortal=function(b,x){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(r(299));return f(b,x,null,S)},ma.flushSync=function(b){var x=v.T,S=o.p;try{if(v.T=null,o.p=2,b)return b()}finally{v.T=x,o.p=S,o.d.f()}},ma.preconnect=function(b,x){typeof b=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(b,x))},ma.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},ma.preinit=function(b,x){if(typeof b=="string"&&x&&typeof x.as=="string"){var S=x.as,T=N(S,x.crossOrigin),j=typeof x.integrity=="string"?x.integrity:void 0,D=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;S==="style"?o.d.S(b,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:T,integrity:j,fetchPriority:D}):S==="script"&&o.d.X(b,{crossOrigin:T,integrity:j,fetchPriority:D,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},ma.preinitModule=function(b,x){if(typeof b=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var S=N(x.as,x.crossOrigin);o.d.M(b,{crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(b)},ma.preload=function(b,x){if(typeof b=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var S=x.as,T=N(S,x.crossOrigin);o.d.L(b,S,{crossOrigin:T,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},ma.preloadModule=function(b,x){if(typeof b=="string")if(x){var S=N(x.as,x.crossOrigin);o.d.m(b,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(b)},ma.requestFormReset=function(b){o.d.r(b)},ma.unstable_batchedUpdates=function(b,x){return b(x)},ma.useFormState=function(b,x,S){return v.H.useFormState(b,x,S)},ma.useFormStatus=function(){return v.H.useHostTransitionStatus()},ma.version="19.2.4",ma}var sg;function sx(){if(sg)return xf.exports;sg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),xf.exports=Wp(),xf.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var rg;function Ip(){if(rg)return Vi;rg=1;var l=Zp(),r=Lf(),c=sx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function v(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function N(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(f(e)!==e)throw Error(o(188))}function x(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,n=t;;){var u=a.return;if(u===null)break;var d=u.alternate;if(d===null){if(n=u.return,n!==null){a=n;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===a)return b(u),e;if(d===n)return b(u),t;d=d.sibling}throw Error(o(188))}if(a.return!==n.return)a=u,n=d;else{for(var y=!1,E=u.child;E;){if(E===a){y=!0,a=u,n=d;break}if(E===n){y=!0,n=u,a=d;break}E=E.sibling}if(!y){for(E=d.child;E;){if(E===a){y=!0,a=d,n=u;break}if(E===n){y=!0,n=d,a=u;break}E=E.sibling}if(!y)throw Error(o(189))}}if(a.alternate!==n)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,j=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),G=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function _(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Symbol.for("react.client.reference");function he(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case I:return"Profiler";case R:return"StrictMode";case de:return"Suspense";case Z:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case G:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:he(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}var B=Array.isArray,$=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},Se=[],Re=-1;function A(e){return{current:e}}function se(e){0>Re||(e.current=Se[Re],Se[Re]=null,Re--)}function me(e,t){Re++,Se[Re]=e.current,e.current=t}var ye=A(null),Oe=A(null),Te=A(null),Ve=A(null);function St(e,t){switch(me(Te,t),me(Oe,e),me(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?v0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=v0(t),e=b0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(ye),me(ye,e)}function tt(){se(ye),se(Oe),se(Te)}function ua(e){e.memoizedState!==null&&me(Ve,e);var t=ye.current,a=b0(t,e.type);t!==a&&(me(Oe,e),me(ye,a))}function xa(e){Oe.current===e&&(se(ye),se(Oe)),Ve.current===e&&(se(Ve),Ui._currentValue=ge)}var Dn,pn;function xe(e){if(Dn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Dn=t&&t[1]||"",pn=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Dn+e+pn}var ze=!1;function Tt(e,t){if(!e||ze)return"";ze=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ae){var K=ae}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(ae){K=ae}e.call(oe.prototype)}}else{try{throw Error()}catch(ae){K=ae}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ae){if(ae&&K&&typeof ae.stack=="string")return[ae.stack,K.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=n.DetermineComponentFrameRoot(),y=d[0],E=d[1];if(y&&E){var k=y.split(`
|
|
44
|
-
`),J=E.split(`
|
|
45
|
-
`);for(u=n=0;n<k.length&&!k[n].includes("DetermineComponentFrameRoot");)n++;for(;u<J.length&&!J[u].includes("DetermineComponentFrameRoot");)u++;if(n===k.length||u===J.length)for(n=k.length-1,u=J.length-1;1<=n&&0<=u&&k[n]!==J[u];)u--;for(;1<=n&&0<=u;n--,u--)if(k[n]!==J[u]){if(n!==1||u!==1)do if(n--,u--,0>u||k[n]!==J[u]){var re=`
|
|
46
|
-
`+k[n].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=n&&0<=u);break}}}finally{ze=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?xe(a):""}function Ot(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe("Lazy");case 13:return e.child!==t&&t!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return Tt(e.type,!1);case 11:return Tt(e.type.render,!1);case 1:return Tt(e.type,!0);case 31:return xe("Activity");default:return""}}function ya(e){try{var t="",a=null;do t+=Ot(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
-
Error generating stack: `+n.message+`
|
|
48
|
-
`+n.stack}}var ca=Object.prototype.hasOwnProperty,an=l.unstable_scheduleCallback,le=l.unstable_cancelCallback,pe=l.unstable_shouldYield,Me=l.unstable_requestPaint,Ae=l.unstable_now,Ke=l.unstable_getCurrentPriorityLevel,ft=l.unstable_ImmediatePriority,Dt=l.unstable_UserBlockingPriority,jt=l.unstable_NormalPriority,$t=l.unstable_LowPriority,Wt=l.unstable_IdlePriority,Ge=l.log,pa=l.unstable_setDisableYieldValue,ut=null,Rt=null;function Ft(e){if(typeof Ge=="function"&&pa(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(ut,e)}catch{}}var Kt=Math.clz32?Math.clz32:so,cu=Math.log,lo=Math.LN2;function so(e){return e>>>=0,e===0?32:31-(cu(e)/lo|0)|0}var rl=256,Ls=262144,oa=4194304;function vn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Wl(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var E=n&134217727;return E!==0?(n=E&~d,n!==0?u=vn(n):(y&=E,y!==0?u=vn(y):a||(a=E&~e,a!==0&&(u=vn(a))))):(E=n&~d,E!==0?u=vn(E):y!==0?u=vn(y):a||(a=n&~e,a!==0&&(u=vn(a)))),u===0?0:t!==0&&t!==u&&(t&d)===0&&(d=u&-u,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:u}function il(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 Lr(){var e=oa;return oa<<=1,(oa&62914560)===0&&(oa=4194304),e}function Bs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ul(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function du(e,t,a,n,u,d){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var E=e.entanglements,k=e.expirationTimes,J=e.hiddenUpdates;for(a=y&~a;0<a;){var re=31-Kt(a),oe=1<<re;E[re]=0,k[re]=-1;var K=J[re];if(K!==null)for(J[re]=null,re=0;re<K.length;re++){var ae=K[re];ae!==null&&(ae.lane&=-536870913)}a&=~oe}n!==0&&yt(e,n,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~t))}function yt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Kt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function Sa(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Kt(a),u=1<<n;u&t|e[n]&t&&(e[n]|=t),a&=~u}}function Br(e,t){var a=t&-t;return a=(a&42)!==0?1:Vs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Vs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function da(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ys(){var e=ie.p;return e!==0?e:(e=window.event,e===void 0?32:$0(e.type))}function Vr(e,t){var a=ie.p;try{return ie.p=e,t()}finally{ie.p=a}}var nn=Math.random().toString(36).slice(2),At="__reactFiber$"+nn,Gt="__reactProps$"+nn,Rn="__reactContainer$"+nn,Il="__reactEvents$"+nn,fu="__reactListeners$"+nn,hu="__reactHandles$"+nn,mu="__reactResources$"+nn,Ql="__reactMarker$"+nn;function $s(e){delete e[At],delete e[Gt],delete e[Il],delete e[fu],delete e[hu]}function An(e){var t=e[At];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Rn]||a[At]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=M0(e);e!==null;){if(a=e[At])return a;e=M0(e)}return t}e=a,a=e.parentNode}return null}function De(e){if(e=e[At]||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 Na(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ln(e){var t=e[mu];return t||(t=e[mu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ht(e){e[Ql]=!0}var gu=new Set,Yr={};function bn(e,t){cl(e,t),cl(e+"Capture",t)}function cl(e,t){for(Yr[e]=t,e=0;e<t.length;e++)gu.add(t[e])}var xu=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),yu={},kn={};function $r(e){return ca.call(kn,e)?!0:ca.call(yu,e)?!1:xu.test(e)?kn[e]=!0:(yu[e]=!0,!1)}function ea(e,t,a){if($r(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function 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 kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fr(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var u=n.get,d=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(y){a=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xl(e){if(!e._valueTracker){var t=Sn(e)?"checked":"value";e._valueTracker=Fr(e,t,""+e[t])}}function ol(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Sn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function sn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Gs=/[\n"\\]/g;function ta(e){return e.replace(Gs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ps(e,t,a,n,u,d,y,E){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kt(t)):e.value!==""+kt(t)&&(e.value=""+kt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Jl(e,y,kt(t)):a!=null?Jl(e,y,kt(a)):n!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+kt(E):e.removeAttribute("name")}function dl(e,t,a,n,u,d,y,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Xl(e);return}a=a!=null?""+kt(a):"",t=t!=null?""+kt(t):a,E||t===e.value||(e.value=t),e.defaultValue=t}n=n??u,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=E?e.checked:!!n,e.defaultChecked=!!n,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Xl(e)}function Jl(e,t,a){t==="number"&&sn(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function _n(e,t,a,n){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&n&&(e[a].defaultSelected=!0)}else{for(a=""+kt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,n&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Kl(e,t,a){if(t!=null&&(t=""+kt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+kt(a):""}function Gr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(B(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=kt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Xl(e)}function rn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var 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 u in t)n=t[u],t.hasOwnProperty(u)&&a[u]!==n&&ts(e,u,n)}else for(var d in t)t.hasOwnProperty(d)&&ts(e,d,t[d])}function Zs(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ro=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),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 $a(){}var Pr=null;function Ws(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zn=null,fl=null;function bu(e){var t=De(e);if(t&&(e=t.stateNode)){var a=e[Gt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ps(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="'+ta(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var u=n[Gt]||null;if(!u)throw Error(o(90));Ps(n,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&ol(n)}break e;case"textarea":Kl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&_n(e,!!a.multiple,t,!1)}}}var Zr=!1;function Wr(e,t,a){if(Zr)return e(t,a);Zr=!0;try{var n=e(t);return n}finally{if(Zr=!1,(zn!==null||fl!==null)&&(mc(),zn&&(t=zn,e=fl,fl=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[Gt]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ir=!1;if(un)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 Nn=null,Is=null,Qs=null;function Pt(){if(Qs)return Qs;var e,t=Is,a=t.length,n,u="value"in Nn?Nn.value:Nn.textContent,d=u.length;for(e=0;e<a&&t[e]===u[e];e++);var y=a-e;for(n=1;n<=y&&t[a-n]===u[d-n];n++);return Qs=u.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 cn(){return!0}function Un(){return!1}function _t(e){function t(a,n,u,d,y){this._reactName=a,this._targetInst=u,this.type=n,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?cn:Un,this.isPropagationStopped=Un,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=cn)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=cn)},persist:function(){},isPersistent:cn}),t}var wn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rs=_t(wn),is=T({},wn,{view:0,detail:0}),Qr=_t(is),Xs,us,cs,Js=T({},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=_t(Js),io=T({},Js,{dataTransfer:0}),uo=_t(io),co=T({},is,{relatedTarget:0}),Ks=_t(co),oo=T({},wn,{animationName:0,elapsedTime:0,pseudoElement:0}),hl=_t(oo),fo=T({},wn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ml=_t(fo),os=T({},wn,{data:0}),gl=_t(os),ho={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mo={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},go={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=go[e])?!!t[e]:!1}function ds(){return xo}var yo=T({},is,{key:function(e){if(e.key){var t=ho[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"?mo[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}}),po=_t(yo),vo=T({},Js,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nu=_t(vo),bo=T({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ds}),So=_t(bo),wu=T({},wn,{propertyName:0,elapsedTime:0,pseudoElement:0}),No=_t(wu),wo=T({},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}),jo=_t(wo),Eo=T({},wn,{newState:0,oldState:0}),To=_t(Eo),ju=[9,13,27,32],Xr=un&&"CompositionEvent"in window,fs=null;un&&"documentMode"in document&&(fs=document.documentMode);var Mo=un&&"TextEvent"in window&&!fs,Eu=un&&(!Xr||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 Co(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 Oo(e,t){if(xl)return e==="compositionend"||!Xr&&Cu(e,t)?(e=Pt(),Qs=Is=Nn=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 Do={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Do[e.type]:t==="textarea"}function Jr(e,t,a,n){zn?fl?fl.push(n):fl=[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 yl=null,hs=null;function wa(e){h0(e,0)}function on(e){var t=Na(e);if(ol(t))return e}function Ru(e,t){if(e==="change")return t}var jn=!1;if(un){var Kr;if(un){var ka="oninput"in document;if(!ka){var ei=document.createElement("div");ei.setAttribute("oninput","return;"),ka=typeof ei.oninput=="function"}Kr=ka}else Kr=!1;jn=Kr&&(!document.documentMode||9<document.documentMode)}function ti(){yl&&(yl.detachEvent("onpropertychange",ai),hs=yl=null)}function ai(e){if(e.propertyName==="value"&&on(hs)){var t=[];Jr(t,hs,e,Ws(e)),Wr(wa,t)}}function We(e,t,a){e==="focusin"?(ti(),yl=t,hs=a,yl.attachEvent("onpropertychange",ai)):e==="focusout"&&ti()}function pl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return on(hs)}function Ro(e,t){if(e==="click")return on(t)}function vt(e,t){if(e==="input"||e==="change")return on(t)}function ms(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fa=typeof Object.is=="function"?Object.is:ms;function gs(e,t){if(fa(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var u=a[n];if(!ca.call(t,u)||!fa(e[u],t[u]))return!1}return!0}function Au(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ku(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 et(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?et(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ao(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=sn(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=sn(e.document)}return t}function 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 _u=un&&"documentMode"in document&&11>=document.documentMode,vl=null,tr=null,aa=null,ar=!1;function xs(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ar||vl==null||vl!==sn(n)||(n=vl,"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}),aa&&gs(aa,n)||(aa=n,n=Sc(tr,"onSelect"),0<n.length&&(t=new rs("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=vl)))}function qn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var bl={animationend:qn("Animation","AnimationEnd"),animationiteration:qn("Animation","AnimationIteration"),animationstart:qn("Animation","AnimationStart"),transitionrun:qn("Transition","TransitionRun"),transitionstart:qn("Transition","TransitionStart"),transitioncancel:qn("Transition","TransitionCancel"),transitionend:qn("Transition","TransitionEnd")},ni={},zu={};un&&(zu=document.createElement("div").style,"AnimationEvent"in window||(delete bl.animationend.animation,delete bl.animationiteration.animation,delete bl.animationstart.animation),"TransitionEvent"in window||delete bl.transitionend.transition);function Hn(e){if(ni[e])return ni[e];if(!bl[e])return e;var t=bl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in zu)return ni[e]=t[a];return e}var Uu=Hn("animationend"),qu=Hn("animationiteration"),nr=Hn("animationstart"),ko=Hn("transitionrun"),_o=Hn("transitionstart"),Hu=Hn("transitioncancel"),li=Hn("transitionend"),si=new Map,ri="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ri.push("scrollEnd");function ja(e,t){si.set(e,t),bn(t,[e])}var Sl=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)},va=[],Fa=0,ys=0;function Nl(){for(var e=Fa,t=ys=Fa=0;t<e;){var a=va[t];va[t++]=null;var n=va[t];va[t++]=null;var u=va[t];va[t++]=null;var d=va[t];if(va[t++]=null,n!==null&&u!==null){var y=n.pending;y===null?u.next=u:(u.next=y.next,y.next=u),n.pending=u}d!==0&&ps(a,u,d)}}function Ga(e,t,a,n){va[Fa++]=e,va[Fa++]=t,va[Fa++]=a,va[Fa++]=n,ys|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function lr(e,t,a,n){return Ga(e,t,a,n),vs(e)}function Pa(e,t){return Ga(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 u=!1,d=e.return;d!==null;)d.childLanes|=a,n=d.alternate,n!==null&&(n.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&t!==null&&(u=31-Kt(a),e=d.hiddenUpdates,n=e[u],n===null?e[u]=[t]:n.push(t),t.lane=a|536870912),d):null}function vs(e){if(50<Oi)throw Oi=0,kd=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _a={};function 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 na(e,t,a,n){return new sr(e,t,a,n)}function rr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Za(e,t){var a=e.alternate;return a===null?(a=na(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Lu(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ir(e,t,a,n,u,d){var y=0;if(n=e,typeof e=="function")rr(e)&&(y=1);else if(typeof e=="string")y=Cp(e,a,ye.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=na(31,a,t,u),e.elementType=ne,e.lanes=d,e;case M:return Wa(a.children,u,d,t);case R:y=8,u|=24;break;case I:return e=na(12,a,t,u|2),e.elementType=I,e.lanes=d,e;case de:return e=na(13,a,t,u),e.elementType=de,e.lanes=d,e;case Z:return e=na(19,a,t,u),e.elementType=Z,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:y=10;break e;case Y:y=9;break e;case ee:y=11;break e;case P:y=14;break e;case W:y=16,n=null;break e}y=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=na(y,a,t,u),t.elementType=e,t.type=n,t.lanes=d,t}function Wa(e,t,a,n){return e=na(7,e,n,t),e.lanes=a,e}function ii(e,t,a){return e=na(6,e,null,t),e.lanes=a,e}function Bu(e){var t=na(18,null,null,0);return t.stateNode=e,t}function wl(e,t,a){return t=na(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ui=new WeakMap;function Ea(e,t){if(typeof e=="object"&&e!==null){var a=ui.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ya(t)},ui.set(e,t),t)}return{value:e,source:t,stack:ya(t)}}var Ln=[],Bn=0,bs=null,dn=0,ha=[],je=0,Ta=null,Ia=1,g="";function i(e,t){Ln[Bn++]=dn,Ln[Bn++]=bs,bs=e,dn=t}function m(e,t,a){ha[je++]=Ia,ha[je++]=g,ha[je++]=Ta,Ta=e;var n=Ia;e=g;var u=32-Kt(n)-1;n&=~(1<<u),a+=1;var d=32-Kt(t)+u;if(30<d){var y=u-u%5;d=(n&(1<<y)-1).toString(32),n>>=y,u-=y,Ia=1<<32-Kt(t)+u|a<<u|n,g=d+e}else Ia=1<<d|a<<u|n,g=e}function p(e){e.return!==null&&(i(e,1),m(e,1,0))}function w(e){for(;e===bs;)bs=Ln[--Bn],Ln[Bn]=null,dn=Ln[--Bn],Ln[Bn]=null;for(;e===Ta;)Ta=ha[--je],ha[je]=null,g=ha[--je],ha[je]=null,Ia=ha[--je],ha[je]=null}function O(e,t){ha[je++]=Ia,ha[je++]=g,ha[je++]=Ta,Ia=t.id,g=t.overflow,Ta=e}var q=null,H=null,V=!1,fe=null,ve=!1,Le=Error(o(519));function Ie(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fn(Ea(t,e)),Le}function ke(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[At]=e,t[Gt]=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<Ri.length;a++)Ze(Ri[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),dl(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),Gr(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||y0(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=$a),t=!0):t=!1,t||Ie(e,!0)}function Et(e){for(q=e.return;q;)switch(q.tag){case 5:case 31:case 13:ve=!1;return;case 27:case 3:ve=!0;return;default:q=q.return}}function It(e){if(e!==q)return!1;if(!V)return Et(e),V=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Wd(e.type,e.memoizedProps)),a=!a),a&&H&&Ie(e),Et(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));H=T0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));H=T0(e)}else t===27?(t=H,Ul(e.type)?(e=Kd,Kd=null,H=e):H=t):H=q?Ka(e.stateNode.nextSibling):null;return!0}function Qt(){H=q=null,V=!1}function En(){var e=fe;return e!==null&&(Da===null?Da=e:Da.push.apply(Da,e),fe=null),e}function fn(e){fe===null?fe=[e]:fe.push(e)}var ur=A(null),Vn=null,Qa=null;function Tn(e,t,a){me(ur,t._currentValue),t._currentValue=a}function hn(e){e._currentValue=ur.current,se(ur)}function ci(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Yn(e,t,a,n){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var y=u.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=u;for(var k=0;k<t.length;k++)if(E.context===t[k]){d.lanes|=a,E=d.alternate,E!==null&&(E.lanes|=a),ci(d.return,a,e),n||(y=null);break e}d=E.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(o(341));y.lanes|=a,d=y.alternate,d!==null&&(d.lanes|=a),ci(y,a,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function Xa(e,t,a,n){e=null;for(var u=t,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(o(387));if(y=y.memoizedProps,y!==null){var E=u.type;fa(u.pendingProps.value,y.value)||(e!==null?e.push(E):e=[E])}}else if(u===Ve.current){if(y=u.alternate,y===null)throw Error(o(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Ui):e=[Ui])}u=u.return}e!==null&&Yn(t,e,a,n),t.flags|=262144}function cr(e){for(e=e.firstContext;e!==null;){if(!fa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ss(e){Vn=e,Qa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function la(e){return ah(Vn,e)}function Vu(e,t){return Vn===null&&Ss(e),ah(e,t)}function ah(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Qa===null){if(e===null)throw Error(o(308));Qa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Qa=Qa.next=t;return a}var jy=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()})}},Ey=l.unstable_scheduleCallback,Ty=l.unstable_NormalPriority,Lt={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zo(){return{controller:new jy,data:new Map,refCount:0}}function oi(e){e.refCount--,e.refCount===0&&Ey(Ty,function(){e.controller.abort()})}var di=null,Uo=0,or=0,dr=null;function My(e,t){if(di===null){var a=di=[];Uo=0,or=Ld(),dr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Uo++,t.then(nh,nh),t}function nh(){if(--Uo===0&&di!==null){dr!==null&&(dr.status="fulfilled");var e=di;di=null,or=0,dr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Cy(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(n.status="rejected",n.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),n}var lh=$.S;$.S=function(e,t){Vm=Ae(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&My(e,t),lh!==null&&lh(e,t)};var Ns=A(null);function qo(){var e=Ns.current;return e!==null?e:xt.pooledCache}function Yu(e,t){t===null?me(Ns,Ns.current):me(Ns,t.pool)}function sh(){var e=qo();return e===null?null:{parent:Lt._currentValue,pool:e}}var fr=Error(o(460)),Ho=Error(o(474)),$u=Error(o(542)),Fu={then:function(){}};function rh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ih(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then($a,$a),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ch(e),e;default:if(typeof t.status=="string")t.then($a,$a);else{if(e=xt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=n}},function(n){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ch(e),e}throw js=t,fr}}function ws(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 uh(){if(js===null)throw Error(o(459));var e=js;return js=null,e}function ch(e){if(e===fr||e===$u)throw Error(o(483))}var hr=null,fi=0;function Gu(e){var t=fi;return fi+=1,hr===null&&(hr=[]),ih(hr,e,t)}function hi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Pu(e,t){throw t.$$typeof===j?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function oh(e){function t(F,L){if(e){var X=F.deletions;X===null?(F.deletions=[L],F.flags|=16):X.push(L)}}function a(F,L){if(!e)return null;for(;L!==null;)t(F,L),L=L.sibling;return null}function n(F){for(var L=new Map;F!==null;)F.key!==null?L.set(F.key,F):L.set(F.index,F),F=F.sibling;return L}function u(F,L){return F=Za(F,L),F.index=0,F.sibling=null,F}function d(F,L,X){return F.index=X,e?(X=F.alternate,X!==null?(X=X.index,X<L?(F.flags|=67108866,L):X):(F.flags|=67108866,L)):(F.flags|=1048576,L)}function y(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function E(F,L,X,ue){return L===null||L.tag!==6?(L=ii(X,F.mode,ue),L.return=F,L):(L=u(L,X),L.return=F,L)}function k(F,L,X,ue){var Ce=X.type;return Ce===M?re(F,L,X.props.children,ue,X.key):L!==null&&(L.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===W&&ws(Ce)===L.type)?(L=u(L,X.props),hi(L,X),L.return=F,L):(L=ir(X.type,X.key,X.props,null,F.mode,ue),hi(L,X),L.return=F,L)}function J(F,L,X,ue){return L===null||L.tag!==4||L.stateNode.containerInfo!==X.containerInfo||L.stateNode.implementation!==X.implementation?(L=wl(X,F.mode,ue),L.return=F,L):(L=u(L,X.children||[]),L.return=F,L)}function re(F,L,X,ue,Ce){return L===null||L.tag!==7?(L=Wa(X,F.mode,ue,Ce),L.return=F,L):(L=u(L,X),L.return=F,L)}function oe(F,L,X){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=ii(""+L,F.mode,X),L.return=F,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case D:return X=ir(L.type,L.key,L.props,null,F.mode,X),hi(X,L),X.return=F,X;case C:return L=wl(L,F.mode,X),L.return=F,L;case W:return L=ws(L),oe(F,L,X)}if(B(L)||_(L))return L=Wa(L,F.mode,X,null),L.return=F,L;if(typeof L.then=="function")return oe(F,Gu(L),X);if(L.$$typeof===G)return oe(F,Vu(F,L),X);Pu(F,L)}return null}function K(F,L,X,ue){var Ce=L!==null?L.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Ce!==null?null:E(F,L,""+X,ue);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case D:return X.key===Ce?k(F,L,X,ue):null;case C:return X.key===Ce?J(F,L,X,ue):null;case W:return X=ws(X),K(F,L,X,ue)}if(B(X)||_(X))return Ce!==null?null:re(F,L,X,ue,null);if(typeof X.then=="function")return K(F,L,Gu(X),ue);if(X.$$typeof===G)return K(F,L,Vu(F,X),ue);Pu(F,X)}return null}function ae(F,L,X,ue,Ce){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return F=F.get(X)||null,E(L,F,""+ue,Ce);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case D:return F=F.get(ue.key===null?X:ue.key)||null,k(L,F,ue,Ce);case C:return F=F.get(ue.key===null?X:ue.key)||null,J(L,F,ue,Ce);case W:return ue=ws(ue),ae(F,L,X,ue,Ce)}if(B(ue)||_(ue))return F=F.get(X)||null,re(L,F,ue,Ce,null);if(typeof ue.then=="function")return ae(F,L,X,Gu(ue),Ce);if(ue.$$typeof===G)return ae(F,L,X,Vu(L,ue),Ce);Pu(L,ue)}return null}function be(F,L,X,ue){for(var Ce=null,at=null,Ne=L,$e=L=0,Xe=null;Ne!==null&&$e<X.length;$e++){Ne.index>$e?(Xe=Ne,Ne=null):Xe=Ne.sibling;var nt=K(F,Ne,X[$e],ue);if(nt===null){Ne===null&&(Ne=Xe);break}e&&Ne&&nt.alternate===null&&t(F,Ne),L=d(nt,L,$e),at===null?Ce=nt:at.sibling=nt,at=nt,Ne=Xe}if($e===X.length)return a(F,Ne),V&&i(F,$e),Ce;if(Ne===null){for(;$e<X.length;$e++)Ne=oe(F,X[$e],ue),Ne!==null&&(L=d(Ne,L,$e),at===null?Ce=Ne:at.sibling=Ne,at=Ne);return V&&i(F,$e),Ce}for(Ne=n(Ne);$e<X.length;$e++)Xe=ae(Ne,F,$e,X[$e],ue),Xe!==null&&(e&&Xe.alternate!==null&&Ne.delete(Xe.key===null?$e:Xe.key),L=d(Xe,L,$e),at===null?Ce=Xe:at.sibling=Xe,at=Xe);return e&&Ne.forEach(function(Vl){return t(F,Vl)}),V&&i(F,$e),Ce}function _e(F,L,X,ue){if(X==null)throw Error(o(151));for(var Ce=null,at=null,Ne=L,$e=L=0,Xe=null,nt=X.next();Ne!==null&&!nt.done;$e++,nt=X.next()){Ne.index>$e?(Xe=Ne,Ne=null):Xe=Ne.sibling;var Vl=K(F,Ne,nt.value,ue);if(Vl===null){Ne===null&&(Ne=Xe);break}e&&Ne&&Vl.alternate===null&&t(F,Ne),L=d(Vl,L,$e),at===null?Ce=Vl:at.sibling=Vl,at=Vl,Ne=Xe}if(nt.done)return a(F,Ne),V&&i(F,$e),Ce;if(Ne===null){for(;!nt.done;$e++,nt=X.next())nt=oe(F,nt.value,ue),nt!==null&&(L=d(nt,L,$e),at===null?Ce=nt:at.sibling=nt,at=nt);return V&&i(F,$e),Ce}for(Ne=n(Ne);!nt.done;$e++,nt=X.next())nt=ae(Ne,F,$e,nt.value,ue),nt!==null&&(e&&nt.alternate!==null&&Ne.delete(nt.key===null?$e:nt.key),L=d(nt,L,$e),at===null?Ce=nt:at.sibling=nt,at=nt);return e&&Ne.forEach(function(Lp){return t(F,Lp)}),V&&i(F,$e),Ce}function gt(F,L,X,ue){if(typeof X=="object"&&X!==null&&X.type===M&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case D:e:{for(var Ce=X.key;L!==null;){if(L.key===Ce){if(Ce=X.type,Ce===M){if(L.tag===7){a(F,L.sibling),ue=u(L,X.props.children),ue.return=F,F=ue;break e}}else if(L.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===W&&ws(Ce)===L.type){a(F,L.sibling),ue=u(L,X.props),hi(ue,X),ue.return=F,F=ue;break e}a(F,L);break}else t(F,L);L=L.sibling}X.type===M?(ue=Wa(X.props.children,F.mode,ue,X.key),ue.return=F,F=ue):(ue=ir(X.type,X.key,X.props,null,F.mode,ue),hi(ue,X),ue.return=F,F=ue)}return y(F);case C:e:{for(Ce=X.key;L!==null;){if(L.key===Ce)if(L.tag===4&&L.stateNode.containerInfo===X.containerInfo&&L.stateNode.implementation===X.implementation){a(F,L.sibling),ue=u(L,X.children||[]),ue.return=F,F=ue;break e}else{a(F,L);break}else t(F,L);L=L.sibling}ue=wl(X,F.mode,ue),ue.return=F,F=ue}return y(F);case W:return X=ws(X),gt(F,L,X,ue)}if(B(X))return be(F,L,X,ue);if(_(X)){if(Ce=_(X),typeof Ce!="function")throw Error(o(150));return X=Ce.call(X),_e(F,L,X,ue)}if(typeof X.then=="function")return gt(F,L,Gu(X),ue);if(X.$$typeof===G)return gt(F,L,Vu(F,X),ue);Pu(F,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,L!==null&&L.tag===6?(a(F,L.sibling),ue=u(L,X),ue.return=F,F=ue):(a(F,L),ue=ii(X,F.mode,ue),ue.return=F,F=ue),y(F)):a(F,L)}return function(F,L,X,ue){try{fi=0;var Ce=gt(F,L,X,ue);return hr=null,Ce}catch(Ne){if(Ne===fr||Ne===$u)throw Ne;var at=na(29,Ne,null,F.mode);return at.lanes=ue,at.return=F,at}finally{}}}var Es=oh(!0),dh=oh(!1),jl=!1;function Lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function El(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Tl(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(st&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=vs(e),ps(e,null,a),t}return Ga(e,n,t,a),vs(e)}function mi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Sa(e,a)}}function Vo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?u=d=y:d=d.next=y,a=a.next}while(a!==null);d===null?u=d=t:d=d.next=t}else u=d=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Yo=!1;function gi(){if(Yo){var e=dr;if(e!==null)throw e}}function xi(e,t,a,n){Yo=!1;var u=e.updateQueue;jl=!1;var d=u.firstBaseUpdate,y=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var k=E,J=k.next;k.next=null,y===null?d=J:y.next=J,y=k;var re=e.alternate;re!==null&&(re=re.updateQueue,E=re.lastBaseUpdate,E!==y&&(E===null?re.firstBaseUpdate=J:E.next=J,re.lastBaseUpdate=k))}if(d!==null){var oe=u.baseState;y=0,re=J=k=null,E=d;do{var K=E.lane&-536870913,ae=K!==E.lane;if(ae?(Qe&K)===K:(n&K)===K){K!==0&&K===or&&(Yo=!0),re!==null&&(re=re.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var be=e,_e=E;K=t;var gt=a;switch(_e.tag){case 1:if(be=_e.payload,typeof be=="function"){oe=be.call(gt,oe,K);break e}oe=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=_e.payload,K=typeof be=="function"?be.call(gt,oe,K):be,K==null)break e;oe=T({},oe,K);break e;case 2:jl=!0}}K=E.callback,K!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=u.callbacks,ae===null?u.callbacks=[K]:ae.push(K))}else ae={lane:K,tag:E.tag,payload:E.payload,callback:E.callback,next:null},re===null?(J=re=ae,k=oe):re=re.next=ae,y|=K;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;ae=E,E=ae.next,ae.next=null,u.lastBaseUpdate=ae,u.shared.pending=null}}while(!0);re===null&&(k=oe),u.baseState=k,u.firstBaseUpdate=J,u.lastBaseUpdate=re,d===null&&(u.shared.lanes=0),Rl|=y,e.lanes=y,e.memoizedState=oe}}function fh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function hh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)fh(a[e],t)}var mr=A(null),Zu=A(0);function mh(e,t){e=Xn,me(Zu,e),me(mr,t),Xn=e|t.baseLanes}function $o(){me(Zu,Xn),me(mr,mr.current)}function Fo(){Xn=Zu.current,se(mr),se(Zu)}var za=A(null),Ja=null;function Ml(e){var t=e.alternate;me(zt,zt.current&1),me(za,e),Ja===null&&(t===null||mr.current!==null||t.memoizedState!==null)&&(Ja=e)}function Go(e){me(zt,zt.current),me(za,e),Ja===null&&(Ja=e)}function gh(e){e.tag===22?(me(zt,zt.current),me(za,e),Ja===null&&(Ja=e)):Cl()}function Cl(){me(zt,zt.current),me(za,za.current)}function Ua(e){se(za),Ja===e&&(Ja=null),se(zt)}var zt=A(0);function Wu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Xd(a)||Jd(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $n=0,Ye=null,ht=null,Bt=null,Iu=!1,gr=!1,Ts=!1,Qu=0,yi=0,xr=null,Oy=0;function Mt(){throw Error(o(321))}function Po(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!fa(e[a],t[a]))return!1;return!0}function Zo(e,t,a,n,u,d){return $n=d,Ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?Jh:ud,Ts=!1,d=a(n,u),Ts=!1,gr&&(d=yh(t,a,n,u)),xh(e),d}function xh(e){$.H=bi;var t=ht!==null&&ht.next!==null;if($n=0,Bt=ht=Ye=null,Iu=!1,yi=0,xr=null,t)throw Error(o(300));e===null||Vt||(e=e.dependencies,e!==null&&cr(e)&&(Vt=!0))}function yh(e,t,a,n){Ye=e;var u=0;do{if(gr&&(xr=null),yi=0,gr=!1,25<=u)throw Error(o(301));if(u+=1,Bt=ht=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}$.H=Kh,d=t(a,n)}while(gr);return d}function Dy(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?pi(t):t,e=e.useState()[0],(ht!==null?ht.memoizedState:null)!==e&&(Ye.flags|=1024),t}function Wo(){var e=Qu!==0;return Qu=0,e}function Io(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Qo(e){if(Iu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Iu=!1}$n=0,Bt=ht=Ye=null,gr=!1,yi=Qu=0,xr=null}function ba(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?Ye.memoizedState=Bt=e:Bt=Bt.next=e,Bt}function Ut(){if(ht===null){var e=Ye.alternate;e=e!==null?e.memoizedState:null}else e=ht.next;var t=Bt===null?Ye.memoizedState:Bt.next;if(t!==null)Bt=t,ht=e;else{if(e===null)throw Ye.alternate===null?Error(o(467)):Error(o(310));ht=e,e={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Bt===null?Ye.memoizedState=Bt=e:Bt=Bt.next=e}return Bt}function Xu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pi(e){var t=yi;return yi+=1,xr===null&&(xr=[]),e=ih(xr,e,t),t=Ye,(Bt===null?t.memoizedState:Bt.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?Jh:ud),e}function Ju(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pi(e);if(e.$$typeof===G)return la(e)}throw Error(o(438,String(e)))}function Xo(e){var t=null,a=Ye.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ye.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Xu(),Ye.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=z;return t.index++,a}function Fn(e,t){return typeof t=="function"?t(e):t}function Ku(e){var t=Ut();return Jo(t,ht,e)}function Jo(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var u=e.baseQueue,d=n.pending;if(d!==null){if(u!==null){var y=u.next;u.next=d.next,d.next=y}t.baseQueue=u=d,n.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var E=y=null,k=null,J=t,re=!1;do{var oe=J.lane&-536870913;if(oe!==J.lane?(Qe&oe)===oe:($n&oe)===oe){var K=J.revertLane;if(K===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),oe===or&&(re=!0);else if(($n&K)===K){J=J.next,K===or&&(re=!0);continue}else oe={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},k===null?(E=k=oe,y=d):k=k.next=oe,Ye.lanes|=K,Rl|=K;oe=J.action,Ts&&a(d,oe),d=J.hasEagerState?J.eagerState:a(d,oe)}else K={lane:oe,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},k===null?(E=k=K,y=d):k=k.next=K,Ye.lanes|=oe,Rl|=oe;J=J.next}while(J!==null&&J!==t);if(k===null?y=d:k.next=E,!fa(d,e.memoizedState)&&(Vt=!0,re&&(a=dr,a!==null)))throw a;e.memoizedState=d,e.baseState=y,e.baseQueue=k,n.lastRenderedState=d}return u===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Ko(e){var t=Ut(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,u=a.pending,d=t.memoizedState;if(u!==null){a.pending=null;var y=u=u.next;do d=e(d,y.action),y=y.next;while(y!==u);fa(d,t.memoizedState)||(Vt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,n]}function ph(e,t,a){var n=Ye,u=Ut(),d=V;if(d){if(a===void 0)throw Error(o(407));a=a()}else a=t();var y=!fa((ht||u).memoizedState,a);if(y&&(u.memoizedState=a,Vt=!0),u=u.queue,ad(Sh.bind(null,n,u,e),[e]),u.getSnapshot!==t||y||Bt!==null&&Bt.memoizedState.tag&1){if(n.flags|=2048,yr(9,{destroy:void 0},bh.bind(null,n,u,a,t),null),xt===null)throw Error(o(349));d||($n&127)!==0||vh(n,t,a)}return a}function vh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ye.updateQueue,t===null?(t=Xu(),Ye.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function bh(e,t,a,n){t.value=a,t.getSnapshot=n,Nh(t)&&wh(e)}function Sh(e,t,a){return a(function(){Nh(t)&&wh(e)})}function Nh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!fa(e,a)}catch{return!0}}function wh(e){var t=Pa(e,2);t!==null&&Ra(t,e,2)}function ed(e){var t=ba();if(typeof e=="function"){var a=e;if(e=a(),Ts){Ft(!0);try{a()}finally{Ft(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:e},t}function jh(e,t,a,n){return e.baseState=a,Jo(e,ht,typeof n=="function"?n:Fn)}function Ry(e,t,a,n,u){if(ac(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};$.T!==null?a(!0):d.isTransition=!1,n(d),a=t.pending,a===null?(d.next=t.pending=d,Eh(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Eh(e,t){var a=t.action,n=t.payload,u=e.state;if(t.isTransition){var d=$.T,y={};$.T=y;try{var E=a(u,n),k=$.S;k!==null&&k(y,E),Th(e,t,E)}catch(J){td(e,t,J)}finally{d!==null&&y.types!==null&&(d.types=y.types),$.T=d}}else try{d=a(u,n),Th(e,t,d)}catch(J){td(e,t,J)}}function Th(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Mh(e,t,n)},function(n){return td(e,t,n)}):Mh(e,t,a)}function Mh(e,t,a){t.status="fulfilled",t.value=a,Ch(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Eh(e,a)))}function td(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Ch(t),t=t.next;while(t!==n)}e.action=null}function Ch(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Oh(e,t){return t}function Dh(e,t){if(V){var a=xt.formState;if(a!==null){e:{var n=Ye;if(V){if(H){t:{for(var u=H,d=ve;u.nodeType!==8;){if(!d){u=null;break t}if(u=Ka(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){H=Ka(u.nextSibling),n=u.data==="F!";break e}}Ie(n)}n=!1}n&&(t=a[0])}}return a=ba(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oh,lastRenderedState:t},a.queue=n,a=Ih.bind(null,Ye,n),n.dispatch=a,n=ed(!1),d=id.bind(null,Ye,!1,n.queue),n=ba(),u={state:t,dispatch:null,action:e,pending:null},n.queue=u,a=Ry.bind(null,Ye,u,d,a),u.dispatch=a,n.memoizedState=e,[t,a,!1]}function Rh(e){var t=Ut();return Ah(t,ht,e)}function Ah(e,t,a){if(t=Jo(e,t,Oh)[0],e=Ku(Fn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=pi(t)}catch(y){throw y===fr?$u:y}else n=t;t=Ut();var u=t.queue,d=u.dispatch;return a!==t.memoizedState&&(Ye.flags|=2048,yr(9,{destroy:void 0},Ay.bind(null,u,a),null)),[n,d,e]}function Ay(e,t){e.action=t}function kh(e){var t=Ut(),a=ht;if(a!==null)return Ah(t,a,e);Ut(),t=t.memoizedState,a=Ut();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function yr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Ye.updateQueue,t===null&&(t=Xu(),Ye.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function _h(){return Ut().memoizedState}function ec(e,t,a,n){var u=ba();Ye.flags|=e,u.memoizedState=yr(1|t,{destroy:void 0},a,n===void 0?null:n)}function tc(e,t,a,n){var u=Ut();n=n===void 0?null:n;var d=u.memoizedState.inst;ht!==null&&n!==null&&Po(n,ht.memoizedState.deps)?u.memoizedState=yr(t,d,a,n):(Ye.flags|=e,u.memoizedState=yr(1|t,d,a,n))}function zh(e,t){ec(8390656,8,e,t)}function ad(e,t){tc(2048,8,e,t)}function ky(e){Ye.flags|=4;var t=Ye.updateQueue;if(t===null)t=Xu(),Ye.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Uh(e){var t=Ut().memoizedState;return ky({ref:t,nextImpl:e}),function(){if((st&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function qh(e,t){return tc(4,2,e,t)}function Hh(e,t){return tc(4,4,e,t)}function Lh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Bh(e,t,a){a=a!=null?a.concat([e]):null,tc(4,4,Lh.bind(null,t,e),a)}function nd(){}function Vh(e,t){var a=Ut();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Po(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Yh(e,t){var a=Ut();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Po(t,n[1]))return n[0];if(n=e(),Ts){Ft(!0);try{e()}finally{Ft(!1)}}return a.memoizedState=[n,t],n}function ld(e,t,a){return a===void 0||($n&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=$m(),Ye.lanes|=e,Rl|=e,a)}function $h(e,t,a,n){return fa(a,t)?a:mr.current!==null?(e=ld(e,a,n),fa(e,t)||(Vt=!0),e):($n&42)===0||($n&1073741824)!==0&&(Qe&261930)===0?(Vt=!0,e.memoizedState=a):(e=$m(),Ye.lanes|=e,Rl|=e,t)}function Fh(e,t,a,n,u){var d=ie.p;ie.p=d!==0&&8>d?d:8;var y=$.T,E={};$.T=E,id(e,!1,t,a);try{var k=u(),J=$.S;if(J!==null&&J(E,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var re=Cy(k,n);vi(e,t,re,La(e))}else vi(e,t,n,La(e))}catch(oe){vi(e,t,{then:function(){},status:"rejected",reason:oe},La())}finally{ie.p=d,y!==null&&E.types!==null&&(y.types=E.types),$.T=y}}function _y(){}function sd(e,t,a,n){if(e.tag!==5)throw Error(o(476));var u=Gh(e).queue;Fh(e,u,t,ge,a===null?_y:function(){return Ph(e),a(n)})}function Gh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:ge},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 Ph(e){var t=Gh(e);t.next===null&&(t=e.alternate.memoizedState),vi(e,t.next.queue,{},La())}function rd(){return la(Ui)}function Zh(){return Ut().memoizedState}function Wh(){return Ut().memoizedState}function zy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=La();e=El(a);var n=Tl(t,e,a);n!==null&&(Ra(n,t,a),mi(n,t,a)),t={cache:zo()},e.payload=t;return}t=t.return}}function Uy(e,t,a){var n=La();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ac(e)?Qh(t,a):(a=lr(e,t,a,n),a!==null&&(Ra(a,e,n),Xh(a,t,n)))}function Ih(e,t,a){var n=La();vi(e,t,a,n)}function vi(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ac(e))Qh(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,E=d(y,a);if(u.hasEagerState=!0,u.eagerState=E,fa(E,y))return Ga(e,t,u,0),xt===null&&Nl(),!1}catch{}finally{}if(a=lr(e,t,u,n),a!==null)return Ra(a,e,n),Xh(a,t,n),!0}return!1}function id(e,t,a,n){if(n={lane:2,revertLane:Ld(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ac(e)){if(t)throw Error(o(479))}else t=lr(e,a,n,2),t!==null&&Ra(t,e,2)}function ac(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function Qh(e,t){gr=Iu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Xh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Sa(e,a)}}var bi={readContext:la,use:Ju,useCallback:Mt,useContext:Mt,useEffect:Mt,useImperativeHandle:Mt,useLayoutEffect:Mt,useInsertionEffect:Mt,useMemo:Mt,useReducer:Mt,useRef:Mt,useState:Mt,useDebugValue:Mt,useDeferredValue:Mt,useTransition:Mt,useSyncExternalStore:Mt,useId:Mt,useHostTransitionStatus:Mt,useFormState:Mt,useActionState:Mt,useOptimistic:Mt,useMemoCache:Mt,useCacheRefresh:Mt};bi.useEffectEvent=Mt;var Jh={readContext:la,use:Ju,useCallback:function(e,t){return ba().memoizedState=[e,t===void 0?null:t],e},useContext:la,useEffect:zh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ec(4194308,4,Lh.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=ba();t=t===void 0?null:t;var n=e();if(Ts){Ft(!0);try{e()}finally{Ft(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ba();if(a!==void 0){var u=a(t);if(Ts){Ft(!0);try{a(t)}finally{Ft(!1)}}}else u=t;return n.memoizedState=n.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},n.queue=e,e=e.dispatch=Uy.bind(null,Ye,e),[n.memoizedState,e]},useRef:function(e){var t=ba();return e={current:e},t.memoizedState=e},useState:function(e){e=ed(e);var t=e.queue,a=Ih.bind(null,Ye,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:nd,useDeferredValue:function(e,t){var a=ba();return ld(a,e,t)},useTransition:function(){var e=ed(!1);return e=Fh.bind(null,Ye,e.queue,!0,!1),ba().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ye,u=ba();if(V){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),xt===null)throw Error(o(349));(Qe&127)!==0||vh(n,t,a)}u.memoizedState=a;var d={value:a,getSnapshot:t};return u.queue=d,zh(Sh.bind(null,n,d,e),[e]),n.flags|=2048,yr(9,{destroy:void 0},bh.bind(null,n,d,a,t),null),a},useId:function(){var e=ba(),t=xt.identifierPrefix;if(V){var a=g,n=Ia;a=(n&~(1<<32-Kt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Qu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Oy++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:rd,useFormState:Dh,useActionState:Dh,useOptimistic:function(e){var t=ba();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=id.bind(null,Ye,!0,a),a.dispatch=t,[e,t]},useMemoCache:Xo,useCacheRefresh:function(){return ba().memoizedState=zy.bind(null,Ye)},useEffectEvent:function(e){var t=ba(),a={impl:e};return t.memoizedState=a,function(){if((st&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},ud={readContext:la,use:Ju,useCallback:Vh,useContext:la,useEffect:ad,useImperativeHandle:Bh,useInsertionEffect:qh,useLayoutEffect:Hh,useMemo:Yh,useReducer:Ku,useRef:_h,useState:function(){return Ku(Fn)},useDebugValue:nd,useDeferredValue:function(e,t){var a=Ut();return $h(a,ht.memoizedState,e,t)},useTransition:function(){var e=Ku(Fn)[0],t=Ut().memoizedState;return[typeof e=="boolean"?e:pi(e),t]},useSyncExternalStore:ph,useId:Zh,useHostTransitionStatus:rd,useFormState:Rh,useActionState:Rh,useOptimistic:function(e,t){var a=Ut();return jh(a,ht,e,t)},useMemoCache:Xo,useCacheRefresh:Wh};ud.useEffectEvent=Uh;var Kh={readContext:la,use:Ju,useCallback:Vh,useContext:la,useEffect:ad,useImperativeHandle:Bh,useInsertionEffect:qh,useLayoutEffect:Hh,useMemo:Yh,useReducer:Ko,useRef:_h,useState:function(){return Ko(Fn)},useDebugValue:nd,useDeferredValue:function(e,t){var a=Ut();return ht===null?ld(a,e,t):$h(a,ht.memoizedState,e,t)},useTransition:function(){var e=Ko(Fn)[0],t=Ut().memoizedState;return[typeof e=="boolean"?e:pi(e),t]},useSyncExternalStore:ph,useId:Zh,useHostTransitionStatus:rd,useFormState:kh,useActionState:kh,useOptimistic:function(e,t){var a=Ut();return ht!==null?jh(a,ht,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Xo,useCacheRefresh:Wh};Kh.useEffectEvent=Uh;function cd(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:T({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var od={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=La(),u=El(n);u.payload=t,a!=null&&(u.callback=a),t=Tl(e,u,n),t!==null&&(Ra(t,e,n),mi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=La(),u=El(n);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=Tl(e,u,n),t!==null&&(Ra(t,e,n),mi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=La(),n=El(a);n.tag=2,t!=null&&(n.callback=t),t=Tl(e,n,a),t!==null&&(Ra(t,e,a),mi(t,e,a))}};function em(e,t,a,n,u,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,d,y):t.prototype&&t.prototype.isPureReactComponent?!gs(a,n)||!gs(u,d):!0}function tm(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&od.enqueueReplaceState(t,t.state,null)}function 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=T({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function am(e){Sl(e)}function nm(e){console.error(e)}function lm(e){Sl(e)}function nc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function sm(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function dd(e,t,a){return a=El(a),a.tag=3,a.payload={element:null},a.callback=function(){nc(e,t)},a}function rm(e){return e=El(e),e.tag=3,e}function im(e,t,a,n){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var d=n.value;e.payload=function(){return u(d)},e.callback=function(){sm(t,a,n)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){sm(t,a,n),typeof u!="function"&&(Al===null?Al=new Set([this]):Al.add(this));var E=n.stack;this.componentDidCatch(n.value,{componentStack:E!==null?E:""})})}function qy(e,t,a,n,u){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Xa(t,a,u,!0),a=za.current,a!==null){switch(a.tag){case 31:case 13:return Ja===null?gc():a.alternate===null&&Ct===0&&(Ct=3),a.flags&=-257,a.flags|=65536,a.lanes=u,n===Fu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Ud(e,n,u)),!1;case 22:return a.flags|=65536,n===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)),Ud(e,n,u)),!1}throw Error(o(435,a.tag))}return Ud(e,n,u),gc(),!1}if(V)return t=za.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,n!==Le&&(e=Error(o(422),{cause:n}),fn(Ea(e,a)))):(n!==Le&&(t=Error(o(423),{cause:n}),fn(Ea(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,n=Ea(n,a),u=dd(e.stateNode,n,u),Vo(e,u),Ct!==4&&(Ct=2)),!1;var d=Error(o(520),{cause:n});if(d=Ea(d,a),Ci===null?Ci=[d]:Ci.push(d),Ct!==4&&(Ct=2),t===null)return!0;n=Ea(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=dd(a.stateNode,n,e),Vo(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Al===null||!Al.has(d))))return a.flags|=65536,u&=-u,a.lanes|=u,u=rm(u),im(u,e,a,n),Vo(a,u),!1}a=a.return}while(a!==null);return!1}var fd=Error(o(461)),Vt=!1;function sa(e,t,a,n){t.child=e===null?dh(t,null,a,n):Es(t,e.child,a,n)}function um(e,t,a,n,u){a=a.render;var d=t.ref;if("ref"in n){var y={};for(var E in n)E!=="ref"&&(y[E]=n[E])}else y=n;return Ss(t),n=Zo(e,t,a,y,d,u),E=Wo(),e!==null&&!Vt?(Io(e,t,u),Gn(e,t,u)):(V&&E&&p(t),t.flags|=1,sa(e,t,n,u),t.child)}function cm(e,t,a,n,u){if(e===null){var d=a.type;return typeof d=="function"&&!rr(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,om(e,t,d,n,u)):(e=ir(a.type,null,n,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!bd(e,u)){var y=d.memoizedProps;if(a=a.compare,a=a!==null?a:gs,a(y,n)&&e.ref===t.ref)return Gn(e,t,u)}return t.flags|=1,e=Za(d,n),e.ref=t.ref,e.return=t,t.child=e}function om(e,t,a,n,u){if(e!==null){var d=e.memoizedProps;if(gs(d,n)&&e.ref===t.ref)if(Vt=!1,t.pendingProps=n=d,bd(e,u))(e.flags&131072)!==0&&(Vt=!0);else return t.lanes=e.lanes,Gn(e,t,u)}return hd(e,t,a,n,u)}function dm(e,t,a,n){var u=n.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(n=t.child=e.child,u=0;n!==null;)u=u|n.lanes|n.childLanes,n=n.sibling;n=u&~d}else n=0,t.child=null;return fm(e,t,d,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Yu(t,d!==null?d.cachePool:null),d!==null?mh(t,d):$o(),gh(t);else return n=t.lanes=536870912,fm(e,t,d!==null?d.baseLanes|a:a,a,n)}else d!==null?(Yu(t,d.cachePool),mh(t,d),Cl(),t.memoizedState=null):(e!==null&&Yu(t,null),$o(),Cl());return sa(e,t,u,a),t.child}function Si(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fm(e,t,a,n,u){var d=qo();return d=d===null?null:{parent:Lt._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&Yu(t,null),$o(),gh(t),e!==null&&Xa(e,t,n,!0),t.childLanes=u,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 hm(e,t,a){return Es(t,e.child,null,a),e=lc(t,t.pendingProps),e.flags|=2,Ua(t),t.memoizedState=null,e}function Hy(e,t,a){var n=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(V){if(n.mode==="hidden")return e=lc(t,n),t.lanes=536870912,Si(null,e);if(Go(t),(e=H)?(e=E0(e,ve),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:Ia,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Bu(e),a.return=t,t.child=a,q=t,H=null)):e=null,e===null)throw Ie(t);return t.lanes=536870912,null}return lc(t,n)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(Go(t),u)if(t.flags&256)t.flags&=-257,t=hm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Vt||Xa(e,t,a,!1),u=(a&e.childLanes)!==0,Vt||u){if(n=xt,n!==null&&(y=Br(n,a),y!==0&&y!==d.retryLane))throw d.retryLane=y,Pa(e,y),Ra(n,e,y),fd;gc(),t=hm(e,t,a)}else e=d.treeContext,H=Ka(y.nextSibling),q=t,V=!0,fe=null,ve=!1,e!==null&&O(t,e),t=lc(t,n),t.flags|=4096;return t}return e=Za(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function 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 hd(e,t,a,n,u){return Ss(t),a=Zo(e,t,a,n,void 0,u),n=Wo(),e!==null&&!Vt?(Io(e,t,u),Gn(e,t,u)):(V&&n&&p(t),t.flags|=1,sa(e,t,a,u),t.child)}function mm(e,t,a,n,u,d){return Ss(t),t.updateQueue=null,a=yh(t,n,a,u),xh(e),n=Wo(),e!==null&&!Vt?(Io(e,t,d),Gn(e,t,d)):(V&&n&&p(t),t.flags|=1,sa(e,t,a,d),t.child)}function gm(e,t,a,n,u){if(Ss(t),t.stateNode===null){var d=_a,y=a.contextType;typeof y=="object"&&y!==null&&(d=la(y)),d=new a(n,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=od,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=n,d.state=t.memoizedState,d.refs={},Lo(t),y=a.contextType,d.context=typeof y=="object"&&y!==null?la(y):_a,d.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(cd(t,a,y,n),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&od.enqueueReplaceState(d,d.state,null),xi(t,n,d,u),gi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,k=Ms(a,E);d.props=k;var J=d.context,re=a.contextType;y=_a,typeof re=="object"&&re!==null&&(y=la(re));var oe=a.getDerivedStateFromProps;re=typeof oe=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,re||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||J!==y)&&tm(t,d,n,y),jl=!1;var K=t.memoizedState;d.state=K,xi(t,n,d,u),gi(),J=t.memoizedState,E||K!==J||jl?(typeof oe=="function"&&(cd(t,a,oe,n),J=t.memoizedState),(k=jl||em(t,a,k,n,K,J,y))?(re||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=J),d.props=n,d.state=J,d.context=y,n=k):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{d=t.stateNode,Bo(e,t),y=t.memoizedProps,re=Ms(a,y),d.props=re,oe=t.pendingProps,K=d.context,J=a.contextType,k=_a,typeof J=="object"&&J!==null&&(k=la(J)),E=a.getDerivedStateFromProps,(J=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==oe||K!==k)&&tm(t,d,n,k),jl=!1,K=t.memoizedState,d.state=K,xi(t,n,d,u),gi();var ae=t.memoizedState;y!==oe||K!==ae||jl||e!==null&&e.dependencies!==null&&cr(e.dependencies)?(typeof E=="function"&&(cd(t,a,E,n),ae=t.memoizedState),(re=jl||em(t,a,re,n,K,ae,k)||e!==null&&e.dependencies!==null&&cr(e.dependencies))?(J||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(n,ae,k),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(n,ae,k)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=ae),d.props=n,d.state=ae,d.context=k,n=re):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=1024),n=!1)}return d=n,sc(e,t),n=(t.flags&128)!==0,d||n?(d=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&n?(t.child=Es(t,e.child,null,u),t.child=Es(t,null,a,u)):sa(e,t,a,u),t.memoizedState=d.state,e=t.child):e=Gn(e,t,u),e}function xm(e,t,a,n){return Qt(),t.flags|=256,sa(e,t,a,n),t.child}var md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gd(e){return{baseLanes:e,cachePool:sh()}}function xd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ha),e}function ym(e,t,a){var n=t.pendingProps,u=!1,d=(t.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(zt.current&2)!==0),y&&(u=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(V){if(u?Ml(t):Cl(),(e=H)?(e=E0(e,ve),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:Ia,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Bu(e),a.return=t,t.child=a,q=t,H=null)):e=null,e===null)throw Ie(t);return Jd(e)?t.lanes=32:t.lanes=536870912,null}var E=n.children;return n=n.fallback,u?(Cl(),u=t.mode,E=rc({mode:"hidden",children:E},u),n=Wa(n,u,a,null),E.return=t,n.return=t,E.sibling=n,t.child=E,n=t.child,n.memoizedState=gd(a),n.childLanes=xd(e,y,a),t.memoizedState=md,Si(null,n)):(Ml(t),yd(t,E))}var k=e.memoizedState;if(k!==null&&(E=k.dehydrated,E!==null)){if(d)t.flags&256?(Ml(t),t.flags&=-257,t=pd(e,t,a)):t.memoizedState!==null?(Cl(),t.child=e.child,t.flags|=128,t=null):(Cl(),E=n.fallback,u=t.mode,n=rc({mode:"visible",children:n.children},u),E=Wa(E,u,a,null),E.flags|=2,n.return=t,E.return=t,n.sibling=E,t.child=n,Es(t,e.child,null,a),n=t.child,n.memoizedState=gd(a),n.childLanes=xd(e,y,a),t.memoizedState=md,t=Si(null,n));else if(Ml(t),Jd(E)){if(y=E.nextSibling&&E.nextSibling.dataset,y)var J=y.dgst;y=J,n=Error(o(419)),n.stack="",n.digest=y,fn({value:n,source:null,stack:null}),t=pd(e,t,a)}else if(Vt||Xa(e,t,a,!1),y=(a&e.childLanes)!==0,Vt||y){if(y=xt,y!==null&&(n=Br(y,a),n!==0&&n!==k.retryLane))throw k.retryLane=n,Pa(e,n),Ra(y,e,n),fd;Xd(E)||gc(),t=pd(e,t,a)}else Xd(E)?(t.flags|=192,t.child=e.child,t=null):(e=k.treeContext,H=Ka(E.nextSibling),q=t,V=!0,fe=null,ve=!1,e!==null&&O(t,e),t=yd(t,n.children),t.flags|=4096);return t}return u?(Cl(),E=n.fallback,u=t.mode,k=e.child,J=k.sibling,n=Za(k,{mode:"hidden",children:n.children}),n.subtreeFlags=k.subtreeFlags&65011712,J!==null?E=Za(J,E):(E=Wa(E,u,a,null),E.flags|=2),E.return=t,n.return=t,n.sibling=E,t.child=n,Si(null,n),n=t.child,E=e.child.memoizedState,E===null?E=gd(a):(u=E.cachePool,u!==null?(k=Lt._currentValue,u=u.parent!==k?{parent:k,pool:k}:u):u=sh(),E={baseLanes:E.baseLanes|a,cachePool:u}),n.memoizedState=E,n.childLanes=xd(e,y,a),t.memoizedState=md,Si(e.child,n)):(Ml(t),a=e.child,e=a.sibling,a=Za(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function yd(e,t){return t=rc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rc(e,t){return e=na(22,e,null,t),e.lanes=0,e}function pd(e,t,a){return Es(t,e.child,null,a),e=yd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ci(e.return,t,a)}function vd(e,t,a,n,u,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:u,treeForkCount:d}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=n,y.tail=a,y.tailMode=u,y.treeForkCount=d)}function vm(e,t,a){var n=t.pendingProps,u=n.revealOrder,d=n.tail;n=n.children;var y=zt.current,E=(y&2)!==0;if(E?(y=y&1|2,t.flags|=128):y&=1,me(zt,y),sa(e,t,n,a),n=V?dn:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&pm(e,a,t);else if(e.tag===19)pm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&Wu(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),vd(t,!1,u,a,d,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Wu(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}vd(t,!0,a,null,d,n);break;case"together":vd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Gn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Rl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Xa(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Za(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Za(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function bd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&cr(e)))}function Ly(e,t,a){switch(t.tag){case 3:St(t,t.stateNode.containerInfo),Tn(t,Lt,e.memoizedState.cache),Qt();break;case 27:case 5:ua(t);break;case 4:St(t,t.stateNode.containerInfo);break;case 10:Tn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Go(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Ml(t),t.flags|=128,null):(a&t.child.childLanes)!==0?ym(e,t,a):(Ml(t),e=Gn(e,t,a),e!==null?e.sibling:null);Ml(t);break;case 19:var u=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Xa(e,t,a,!1),n=(a&t.childLanes)!==0),u){if(n)return vm(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),me(zt,zt.current),n)break;return null;case 22:return t.lanes=0,dm(e,t,a,t.pendingProps);case 24:Tn(t,Lt,e.memoizedState.cache)}return Gn(e,t,a)}function bm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Vt=!0;else{if(!bd(e,a)&&(t.flags&128)===0)return Vt=!1,Ly(e,t,a);Vt=(e.flags&131072)!==0}else Vt=!1,V&&(t.flags&1048576)!==0&&m(t,dn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=ws(t.elementType),t.type=e,typeof e=="function")rr(e)?(n=Ms(e,n),t.tag=1,t=gm(null,t,e,n,a)):(t.tag=0,t=hd(null,t,e,n,a));else{if(e!=null){var u=e.$$typeof;if(u===ee){t.tag=11,t=um(null,t,e,n,a);break e}else if(u===P){t.tag=14,t=cm(null,t,e,n,a);break e}}throw t=he(e)||e,Error(o(306,t,""))}}return t;case 0:return hd(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,u=Ms(n,t.pendingProps),gm(e,t,n,u,a);case 3:e:{if(St(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var d=t.memoizedState;u=d.element,Bo(e,t),xi(t,n,null,a);var y=t.memoizedState;if(n=y.cache,Tn(t,Lt,n),n!==d.cache&&Yn(t,[Lt],a,!0),gi(),n=y.element,d.isDehydrated)if(d={element:n,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=xm(e,t,n,a);break e}else if(n!==u){u=Ea(Error(o(424)),t),fn(u),t=xm(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(H=Ka(e.firstChild),q=t,V=!0,fe=null,ve=!0,a=dh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Qt(),n===u){t=Gn(e,t,a);break e}sa(e,t,n,a)}t=t.child}return t;case 26:return sc(e,t),e===null?(a=R0(t.type,null,t.pendingProps,null))?t.memoizedState=a:V||(a=t.type,e=t.pendingProps,n=Nc(Te.current).createElement(a),n[At]=t,n[Gt]=e,ra(n,a,e),Ht(n),t.stateNode=n):t.memoizedState=R0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ua(t),e===null&&V&&(n=t.stateNode=C0(t.type,t.pendingProps,Te.current),q=t,ve=!0,u=H,Ul(t.type)?(Kd=u,H=Ka(n.firstChild)):H=u),sa(e,t,t.pendingProps.children,a),sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((u=n=H)&&(n=gp(n,t.type,t.pendingProps,ve),n!==null?(t.stateNode=n,q=t,H=Ka(n.firstChild),ve=!1,u=!0):u=!1),u||Ie(t)),ua(t),u=t.type,d=t.pendingProps,y=e!==null?e.memoizedProps:null,n=d.children,Wd(u,d)?n=null:y!==null&&Wd(u,y)&&(t.flags|=32),t.memoizedState!==null&&(u=Zo(e,t,Dy,null,null,a),Ui._currentValue=u),sc(e,t),sa(e,t,n,a),t.child;case 6:return e===null&&V&&((e=a=H)&&(a=xp(a,t.pendingProps,ve),a!==null?(t.stateNode=a,q=t,H=null,e=!0):e=!1),e||Ie(t)),null;case 13:return ym(e,t,a);case 4:return St(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Es(t,null,n,a):sa(e,t,n,a),t.child;case 11:return um(e,t,t.type,t.pendingProps,a);case 7:return sa(e,t,t.pendingProps,a),t.child;case 8:return sa(e,t,t.pendingProps.children,a),t.child;case 12:return sa(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,Tn(t,t.type,n.value),sa(e,t,n.children,a),t.child;case 9:return u=t.type._context,n=t.pendingProps.children,Ss(t),u=la(u),n=n(u),t.flags|=1,sa(e,t,n,a),t.child;case 14:return cm(e,t,t.type,t.pendingProps,a);case 15:return om(e,t,t.type,t.pendingProps,a);case 19:return vm(e,t,a);case 31:return Hy(e,t,a);case 22:return dm(e,t,a,t.pendingProps);case 24:return Ss(t),n=la(Lt),e===null?(u=qo(),u===null&&(u=xt,d=zo(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=a),u=d),t.memoizedState={parent:n,cache:u},Lo(t),Tn(t,Lt,u)):((e.lanes&a)!==0&&(Bo(e,t),xi(t,null,null,a),gi()),u=e.memoizedState,d=t.memoizedState,u.parent!==n?(u={parent:n,cache:n},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Tn(t,Lt,n)):(n=d.cache,Tn(t,Lt,n),n!==u.cache&&Yn(t,[Lt],a,!0))),sa(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Pn(e){e.flags|=4}function Sd(e,t,a,n,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Zm())e.flags|=8192;else throw js=Fu,Ho}else e.flags&=-16777217}function Sm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!U0(t))if(Zm())e.flags|=8192;else throw js=Fu,Ho}function ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Lr():536870912,e.lanes|=t,Sr|=t)}function Ni(e,t){if(!V)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags&65011712,n|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags,n|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function By(e,t,a){var n=t.pendingProps;switch(w(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return 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),hn(Lt),tt(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(It(t)?Pn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,En())),bt(t),null;case 26:var u=t.type,d=t.memoizedState;return e===null?(Pn(t),d!==null?(bt(t),Sm(t,d)):(bt(t),Sd(t,u,null,n,a))):d?d!==e.memoizedState?(Pn(t),bt(t),Sm(t,d)):(bt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Pn(t),bt(t),Sd(t,u,e,n,a)),null;case 27:if(xa(t),a=Te.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Pn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return bt(t),null}e=ye.current,It(t)?ke(t):(e=C0(u,n,a),t.stateNode=e,Pn(t))}return bt(t),null;case 5:if(xa(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Pn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return bt(t),null}if(d=ye.current,It(t))ke(t);else{var y=Nc(Te.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof n.is=="string"?y.createElement("select",{is:n.is}):y.createElement("select"),n.multiple?d.multiple=!0:n.size&&(d.size=n.size);break;default:d=typeof n.is=="string"?y.createElement(u,{is:n.is}):y.createElement(u)}}d[At]=t,d[Gt]=n;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=d;e:switch(ra(d,u,n),u){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Pn(t)}}return bt(t),Sd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Pn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=Te.current,It(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=q,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[At]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||y0(e.nodeValue,a)),e||Ie(t,!0)}else e=Nc(e).createTextNode(n),e[At]=t,t.stateNode=e}return bt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=It(t),a!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[At]=t}else Qt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;bt(t),e=!1}else a=En(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ua(t),t):(Ua(t),null);if((t.flags&128)!==0)throw Error(o(558))}return bt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=It(t),n!==null&&n.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[At]=t}else Qt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;bt(t),u=!1}else u=En(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Ua(t),t):(Ua(t),null)}return Ua(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),d=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(d=n.memoizedState.cachePool.pool),d!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ic(t,t.updateQueue),bt(t),null);case 4:return tt(),e===null&&$d(t.stateNode.containerInfo),bt(t),null;case 10:return hn(t.type),bt(t),null;case 19:if(se(zt),n=t.memoizedState,n===null)return bt(t),null;if(u=(t.flags&128)!==0,d=n.rendering,d===null)if(u)Ni(n,!1);else{if(Ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Wu(e),d!==null){for(t.flags|=128,Ni(n,!1),e=d.updateQueue,t.updateQueue=e,ic(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Lu(a,e),a=a.sibling;return me(zt,zt.current&1|2),V&&i(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ae()>fc&&(t.flags|=128,u=!0,Ni(n,!1),t.lanes=4194304)}else{if(!u)if(e=Wu(d),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,ic(t,e),Ni(n,!0),n.tail===null&&n.tailMode==="hidden"&&!d.alternate&&!V)return bt(t),null}else 2*Ae()-n.renderingStartTime>fc&&a!==536870912&&(t.flags|=128,u=!0,Ni(n,!1),t.lanes=4194304);n.isBackwards?(d.sibling=t.child,t.child=d):(e=n.last,e!==null?e.sibling=d:t.child=d,n.last=d)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ae(),e.sibling=null,a=zt.current,me(zt,u?a&1|2:a&1),V&&i(t,n.treeForkCount),e):(bt(t),null);case 22:case 23:return Ua(t),Fo(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(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&&se(Ns),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),hn(Lt),bt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Vy(e,t){switch(w(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return hn(Lt),tt(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xa(t),null;case 31:if(t.memoizedState!==null){if(Ua(t),t.alternate===null)throw Error(o(340));Qt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ua(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Qt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(zt),null;case 4:return tt(),null;case 10:return hn(t.type),null;case 22:case 23:return Ua(t),Fo(),e!==null&&se(Ns),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return hn(Lt),null;case 25:return null;default:return null}}function Nm(e,t){switch(w(t),t.tag){case 3:hn(Lt),tt();break;case 26:case 27:case 5:xa(t);break;case 4:tt();break;case 31:t.memoizedState!==null&&Ua(t);break;case 13:Ua(t);break;case 19:se(zt);break;case 10:hn(t.type);break;case 22:case 23:Ua(t),Fo(),e!==null&&se(Ns);break;case 24:hn(Lt)}}function wi(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){n=void 0;var d=a.create,y=a.inst;n=d(),y.destroy=n}a=a.next}while(a!==u)}}catch(E){ot(t,t.return,E)}}function Ol(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var d=u.next;n=d;do{if((n.tag&e)===e){var y=n.inst,E=y.destroy;if(E!==void 0){y.destroy=void 0,u=t;var k=a,J=E;try{J()}catch(re){ot(u,k,re)}}}n=n.next}while(n!==d)}}catch(re){ot(t,t.return,re)}}function wm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{hh(t,a)}catch(n){ot(e,e.return,n)}}}function jm(e,t,a){a.props=Ms(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){ot(e,t,n)}}function ji(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(u){ot(e,t,u)}}function Mn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){ot(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){ot(e,t,u)}else a.current=null}function Em(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(u){ot(e,e.return,u)}}function Nd(e,t,a){try{var n=e.stateNode;cp(n,e.type,a,t),n[Gt]=t}catch(u){ot(e,e.return,u)}}function Tm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ul(e.type)||e.tag===4}function wd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ul(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function jd(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=$a));else if(n!==4&&(n===27&&Ul(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(jd(e,t,a),e=e.sibling;e!==null;)jd(e,t,a),e=e.sibling}function 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&&Ul(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 Mm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);ra(t,n,a),t[At]=e,t[Gt]=a}catch(d){ot(e,e.return,d)}}var Zn=!1,Yt=!1,Ed=!1,Cm=typeof WeakSet=="function"?WeakSet:Set,Xt=null;function Yy(e,t){if(e=e.containerInfo,Pd=Oc,e=Ao(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 u=n.anchorOffset,d=n.focusNode;n=n.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var y=0,E=-1,k=-1,J=0,re=0,oe=e,K=null;t:for(;;){for(var ae;oe!==a||u!==0&&oe.nodeType!==3||(E=y+u),oe!==d||n!==0&&oe.nodeType!==3||(k=y+n),oe.nodeType===3&&(y+=oe.nodeValue.length),(ae=oe.firstChild)!==null;)K=oe,oe=ae;for(;;){if(oe===e)break t;if(K===a&&++J===u&&(E=y),K===d&&++re===n&&(k=y),(ae=oe.nextSibling)!==null)break;oe=K,K=oe.parentNode}oe=ae}a=E===-1||k===-1?null:{start:E,end:k}}else a=null}a=a||{start:0,end:0}}else a=null;for(Zd={focusedElem:e,selectionRange:a},Oc=!1,Xt=t;Xt!==null;)if(t=Xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Xt=e;else for(;Xt!==null;){switch(t=Xt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,u=d.memoizedProps,d=d.memoizedState,n=a.stateNode;try{var be=Ms(a.type,u);e=n.getSnapshotBeforeUpdate(be,d),n.__reactInternalSnapshotBeforeUpdate=e}catch(_e){ot(a,a.return,_e)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Qd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Xt=e;break}Xt=t.return}}function Om(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:In(e,a),n&4&&wi(5,a);break;case 1:if(In(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){ot(a,a.return,y)}else{var u=Ms(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){ot(a,a.return,y)}}n&64&&wm(a),n&512&&ji(a,a.return);break;case 3:if(In(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{hh(e,t)}catch(y){ot(a,a.return,y)}}break;case 27:t===null&&n&4&&Mm(a);case 26:case 5:In(e,a),t===null&&n&4&&Em(a),n&512&&ji(a,a.return);break;case 12:In(e,a);break;case 31:In(e,a),n&4&&Am(e,a);break;case 13:In(e,a),n&4&&km(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Xy.bind(null,a),yp(e,a))));break;case 22:if(n=a.memoizedState!==null||Zn,!n){t=t!==null&&t.memoizedState!==null||Yt,u=Zn;var d=Yt;Zn=n,(Yt=t)&&!d?Qn(e,a,(a.subtreeFlags&8772)!==0):In(e,a),Zn=u,Yt=d}break;case 30:break;default:In(e,a)}}function Dm(e){var t=e.alternate;t!==null&&(e.alternate=null,Dm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&$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 Nt=null,Ma=!1;function Wn(e,t,a){for(a=a.child;a!==null;)Rm(e,t,a),a=a.sibling}function Rm(e,t,a){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(ut,a)}catch{}switch(a.tag){case 26:Yt||Mn(a,t),Wn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Yt||Mn(a,t);var n=Nt,u=Ma;Ul(a.type)&&(Nt=a.stateNode,Ma=!1),Wn(e,t,a),ki(a.stateNode),Nt=n,Ma=u;break;case 5:Yt||Mn(a,t);case 6:if(n=Nt,u=Ma,Nt=null,Wn(e,t,a),Nt=n,Ma=u,Nt!==null)if(Ma)try{(Nt.nodeType===9?Nt.body:Nt.nodeName==="HTML"?Nt.ownerDocument.body:Nt).removeChild(a.stateNode)}catch(d){ot(a,t,d)}else try{Nt.removeChild(a.stateNode)}catch(d){ot(a,t,d)}break;case 18:Nt!==null&&(Ma?(e=Nt,w0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Or(e)):w0(Nt,a.stateNode));break;case 4:n=Nt,u=Ma,Nt=a.stateNode.containerInfo,Ma=!0,Wn(e,t,a),Nt=n,Ma=u;break;case 0:case 11:case 14:case 15:Ol(2,a,t),Yt||Ol(4,a,t),Wn(e,t,a);break;case 1:Yt||(Mn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&jm(a,t,n)),Wn(e,t,a);break;case 21:Wn(e,t,a);break;case 22:Yt=(n=Yt)||a.memoizedState!==null,Wn(e,t,a),Yt=n;break;default:Wn(e,t,a)}}function Am(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Or(e)}catch(a){ot(t,t.return,a)}}}function km(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Or(e)}catch(a){ot(t,t.return,a)}}function $y(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Cm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Cm),t;default:throw Error(o(435,e.tag))}}function cc(e,t){var a=$y(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var u=Jy.bind(null,e,n);n.then(u,u)}})}function Ca(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var u=a[n],d=e,y=t,E=y;e:for(;E!==null;){switch(E.tag){case 27:if(Ul(E.type)){Nt=E.stateNode,Ma=!1;break e}break;case 5:Nt=E.stateNode,Ma=!1;break e;case 3:case 4:Nt=E.stateNode.containerInfo,Ma=!0;break e}E=E.return}if(Nt===null)throw Error(o(160));Rm(d,y,u),Nt=null,Ma=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_m(t,e),t=t.sibling}var mn=null;function _m(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ca(t,e),Oa(e),n&4&&(Ol(3,e,e.return),wi(3,e),Ol(5,e,e.return));break;case 1:Ca(t,e),Oa(e),n&512&&(Yt||a===null||Mn(a,a.return)),n&64&&Zn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var u=mn;if(Ca(t,e),Oa(e),n&512&&(Yt||a===null||Mn(a,a.return)),n&4){var d=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(n){case"title":d=u.getElementsByTagName("title")[0],(!d||d[Ql]||d[At]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(n),u.head.insertBefore(d,u.querySelector("head > title"))),ra(d,n,a),d[At]=e,Ht(d),n=d;break e;case"link":var y=_0("link","href",u).get(n+(a.href||""));if(y){for(var E=0;E<y.length;E++)if(d=y[E],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(E,1);break t}}d=u.createElement(n),ra(d,n,a),u.head.appendChild(d);break;case"meta":if(y=_0("meta","content",u).get(n+(a.content||""))){for(E=0;E<y.length;E++)if(d=y[E],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(E,1);break t}}d=u.createElement(n),ra(d,n,a),u.head.appendChild(d);break;default:throw Error(o(468,n))}d[At]=e,Ht(d),n=d}e.stateNode=n}else z0(u,e.type,e.stateNode);else e.stateNode=k0(u,n,e.memoizedProps);else d!==n?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,n===null?z0(u,e.type,e.stateNode):k0(u,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Nd(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ca(t,e),Oa(e),n&512&&(Yt||a===null||Mn(a,a.return)),a!==null&&n&4&&Nd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ca(t,e),Oa(e),n&512&&(Yt||a===null||Mn(a,a.return)),e.flags&32){u=e.stateNode;try{rn(u,"")}catch(be){ot(e,e.return,be)}}n&4&&e.stateNode!=null&&(u=e.memoizedProps,Nd(e,u,a!==null?a.memoizedProps:u)),n&1024&&(Ed=!0);break;case 6:if(Ca(t,e),Oa(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(be){ot(e,e.return,be)}}break;case 3:if(Ec=null,u=mn,mn=wc(t.containerInfo),Ca(t,e),mn=u,Oa(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Or(t.containerInfo)}catch(be){ot(e,e.return,be)}Ed&&(Ed=!1,zm(e));break;case 4:n=mn,mn=wc(e.stateNode.containerInfo),Ca(t,e),Oa(e),mn=n;break;case 12:Ca(t,e),Oa(e);break;case 31:Ca(t,e),Oa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 13:Ca(t,e),Oa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(dc=Ae()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 22:u=e.memoizedState!==null;var k=a!==null&&a.memoizedState!==null,J=Zn,re=Yt;if(Zn=J||u,Yt=re||k,Ca(t,e),Yt=re,Zn=J,Oa(e),n&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||k||Zn||Yt||Cs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){k=a=t;try{if(d=k.stateNode,u)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{E=k.stateNode;var oe=k.memoizedProps.style,K=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;E.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(be){ot(k,k.return,be)}}}else if(t.tag===6){if(a===null){k=t;try{k.stateNode.nodeValue=u?"":k.memoizedProps}catch(be){ot(k,k.return,be)}}}else if(t.tag===18){if(a===null){k=t;try{var ae=k.stateNode;u?j0(ae,!0):j0(k.stateNode,!1)}catch(be){ot(k,k.return,be)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,cc(e,a))));break;case 19:Ca(t,e),Oa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 30:break;case 21:break;default:Ca(t,e),Oa(e)}}function Oa(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Tm(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var u=a.stateNode,d=wd(e);uc(e,d,u);break;case 5:var y=a.stateNode;a.flags&32&&(rn(y,""),a.flags&=-33);var E=wd(e);uc(e,E,y);break;case 3:case 4:var k=a.stateNode.containerInfo,J=wd(e);jd(e,J,k);break;default:throw Error(o(161))}}catch(re){ot(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;zm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function In(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Om(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:Ol(4,t,t.return),Cs(t);break;case 1:Mn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&jm(t,t.return,a),Cs(t);break;case 27:ki(t.stateNode);case 26:case 5:Mn(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 Qn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,u=e,d=t,y=d.flags;switch(d.tag){case 0:case 11:case 15:Qn(u,d,a),wi(4,d);break;case 1:if(Qn(u,d,a),n=d,u=n.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(J){ot(n,n.return,J)}if(n=d,u=n.updateQueue,u!==null){var E=n.stateNode;try{var k=u.shared.hiddenCallbacks;if(k!==null)for(u.shared.hiddenCallbacks=null,u=0;u<k.length;u++)fh(k[u],E)}catch(J){ot(n,n.return,J)}}a&&y&64&&wm(d),ji(d,d.return);break;case 27:Mm(d);case 26:case 5:Qn(u,d,a),a&&n===null&&y&4&&Em(d),ji(d,d.return);break;case 12:Qn(u,d,a);break;case 31:Qn(u,d,a),a&&y&4&&Am(u,d);break;case 13:Qn(u,d,a),a&&y&4&&km(u,d);break;case 22:d.memoizedState===null&&Qn(u,d,a),ji(d,d.return);break;case 30:break;default:Qn(u,d,a)}t=t.sibling}}function Td(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&oi(a))}function Md(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oi(e))}function gn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Um(e,t,a,n),t=t.sibling}function Um(e,t,a,n){var u=t.flags;switch(t.tag){case 0:case 11:case 15:gn(e,t,a,n),u&2048&&wi(9,t);break;case 1:gn(e,t,a,n);break;case 3:gn(e,t,a,n),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oi(e)));break;case 12:if(u&2048){gn(e,t,a,n),e=t.stateNode;try{var d=t.memoizedProps,y=d.id,E=d.onPostCommit;typeof E=="function"&&E(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(k){ot(t,t.return,k)}}else gn(e,t,a,n);break;case 31:gn(e,t,a,n);break;case 13:gn(e,t,a,n);break;case 23:break;case 22:d=t.stateNode,y=t.alternate,t.memoizedState!==null?d._visibility&2?gn(e,t,a,n):Ei(e,t):d._visibility&2?gn(e,t,a,n):(d._visibility|=2,pr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Td(y,t);break;case 24:gn(e,t,a,n),u&2048&&Md(t.alternate,t);break;default:gn(e,t,a,n)}}function pr(e,t,a,n,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,y=t,E=a,k=n,J=y.flags;switch(y.tag){case 0:case 11:case 15:pr(d,y,E,k,u),wi(8,y);break;case 23:break;case 22:var re=y.stateNode;y.memoizedState!==null?re._visibility&2?pr(d,y,E,k,u):Ei(d,y):(re._visibility|=2,pr(d,y,E,k,u)),u&&J&2048&&Td(y.alternate,y);break;case 24:pr(d,y,E,k,u),u&&J&2048&&Md(y.alternate,y);break;default:pr(d,y,E,k,u)}t=t.sibling}}function Ei(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,u=n.flags;switch(n.tag){case 22:Ei(a,n),u&2048&&Td(n.alternate,n);break;case 24:Ei(a,n),u&2048&&Md(n.alternate,n);break;default:Ei(a,n)}t=t.sibling}}var Ti=8192;function vr(e,t,a){if(e.subtreeFlags&Ti)for(e=e.child;e!==null;)qm(e,t,a),e=e.sibling}function qm(e,t,a){switch(e.tag){case 26:vr(e,t,a),e.flags&Ti&&e.memoizedState!==null&&Op(a,mn,e.memoizedState,e.memoizedProps);break;case 5:vr(e,t,a);break;case 3:case 4:var n=mn;mn=wc(e.stateNode.containerInfo),vr(e,t,a),mn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ti,Ti=16777216,vr(e,t,a),Ti=n):vr(e,t,a));break;default:vr(e,t,a)}}function Hm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Mi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Xt=n,Bm(n,e)}Hm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lm(e),e=e.sibling}function Lm(e){switch(e.tag){case 0:case 11:case 15:Mi(e),e.flags&2048&&Ol(9,e,e.return);break;case 3:Mi(e);break;case 12:Mi(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)):Mi(e);break;default:Mi(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];Xt=n,Bm(n,e)}Hm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ol(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 Bm(e,t){for(;Xt!==null;){var a=Xt;switch(a.tag){case 0:case 11:case 15:Ol(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:oi(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Xt=n;else e:for(a=e;Xt!==null;){n=Xt;var u=n.sibling,d=n.return;if(Dm(n),n===a){Xt=null;break e}if(u!==null){u.return=d,Xt=u;break e}Xt=d}}}var Fy={getCacheForType:function(e){var t=la(Lt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return la(Lt).controller.signal}},Gy=typeof WeakMap=="function"?WeakMap:Map,st=0,xt=null,Pe=null,Qe=0,ct=0,qa=null,Dl=!1,br=!1,Cd=!1,Xn=0,Ct=0,Rl=0,Os=0,Od=0,Ha=0,Sr=0,Ci=null,Da=null,Dd=!1,dc=0,Vm=0,fc=1/0,hc=null,Al=null,Zt=0,kl=null,Nr=null,Jn=0,Rd=0,Ad=null,Ym=null,Oi=0,kd=null;function La(){return(st&2)!==0&&Qe!==0?Qe&-Qe:$.T!==null?Ld():Ys()}function $m(){if(Ha===0)if((Qe&536870912)===0||V){var e=Ls;Ls<<=1,(Ls&3932160)===0&&(Ls=262144),Ha=e}else Ha=536870912;return e=za.current,e!==null&&(e.flags|=32),Ha}function Ra(e,t,a){(e===xt&&(ct===2||ct===9)||e.cancelPendingCommit!==null)&&(wr(e,0),_l(e,Qe,Ha,!1)),ul(e,a),((st&2)===0||e!==xt)&&(e===xt&&((st&2)===0&&(Os|=a),Ct===4&&_l(e,Qe,Ha,!1)),Cn(e))}function Fm(e,t,a){if((st&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||il(e,t),u=n?Wy(e,t):zd(e,t,!0),d=n;do{if(u===0){br&&!n&&_l(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!Py(a)){u=zd(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var E=e;u=Ci;var k=E.current.memoizedState.isDehydrated;if(k&&(wr(E,y).flags|=256),y=zd(E,y,!1),y!==2){if(Cd&&!k){E.errorRecoveryDisabledLanes|=d,Os|=d,u=4;break e}d=Da,Da=u,d!==null&&(Da===null?Da=d:Da.push.apply(Da,d))}u=y}if(d=!1,u!==2)continue}}if(u===1){wr(e,0),_l(e,t,0,!0);break}e:{switch(n=e,d=u,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:_l(n,t,Ha,!Dl);break e;case 2:Da=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(u=dc+300-Ae(),10<u)){if(_l(n,t,Ha,!Dl),Wl(n,0,!0)!==0)break e;Jn=t,n.timeoutHandle=S0(Gm.bind(null,n,a,Da,hc,Dd,t,Ha,Os,Sr,Dl,d,"Throttled",-0,0),u);break e}Gm(n,a,Da,hc,Dd,t,Ha,Os,Sr,Dl,d,null,-0,0)}}break}while(!0);Cn(e)}function Gm(e,t,a,n,u,d,y,E,k,J,re,oe,K,ae){if(e.timeoutHandle=-1,oe=t.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$a},qm(t,d,oe);var be=(d&62914560)===d?dc-Ae():(d&4194048)===d?Vm-Ae():0;if(be=Dp(oe,be),be!==null){Jn=d,e.cancelPendingCommit=be(Km.bind(null,e,t,d,a,n,u,y,E,k,re,oe,null,K,ae)),_l(e,d,y,!J);return}}Km(e,t,d,a,n,u,y,E,k)}function Py(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var u=a[n],d=u.getSnapshot;u=u.value;try{if(!fa(d(),u))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _l(e,t,a,n){t&=~Od,t&=~Os,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var u=t;0<u;){var d=31-Kt(u),y=1<<d;n[d]=-1,u&=~y}a!==0&&yt(e,a,t)}function mc(){return(st&6)===0?(Di(0),!1):!0}function _d(){if(Pe!==null){if(ct===0)var e=Pe.return;else e=Pe,Qa=Vn=null,Qo(e),hr=null,fi=0,e=Pe;for(;e!==null;)Nm(e.alternate,e),e=e.return;Pe=null}}function wr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,fp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Jn=0,_d(),xt=e,Pe=a=Za(e.current,null),Qe=t,ct=0,qa=null,Dl=!1,br=il(e,t),Cd=!1,Sr=Ha=Od=Os=Rl=Ct=0,Da=Ci=null,Dd=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var u=31-Kt(n),d=1<<u;t|=e[u],n&=~d}return Xn=t,Nl(),a}function Pm(e,t){Ye=null,$.H=bi,t===fr||t===$u?(t=uh(),ct=3):t===Ho?(t=uh(),ct=4):ct=t===fd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qa=t,Pe===null&&(Ct=1,nc(e,Ea(t,e.current)))}function Zm(){var e=za.current;return e===null?!0:(Qe&4194048)===Qe?Ja===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===Ja:!1}function Wm(){var e=$.H;return $.H=bi,e===null?bi:e}function Im(){var e=$.A;return $.A=Fy,e}function gc(){Ct=4,Dl||(Qe&4194048)!==Qe&&za.current!==null||(br=!0),(Rl&134217727)===0&&(Os&134217727)===0||xt===null||_l(xt,Qe,Ha,!1)}function zd(e,t,a){var n=st;st|=2;var u=Wm(),d=Im();(xt!==e||Qe!==t)&&(hc=null,wr(e,t)),t=!1;var y=Ct;e:do try{if(ct!==0&&Pe!==null){var E=Pe,k=qa;switch(ct){case 8:_d(),y=6;break e;case 3:case 2:case 9:case 6:za.current===null&&(t=!0);var J=ct;if(ct=0,qa=null,jr(e,E,k,J),a&&br){y=0;break e}break;default:J=ct,ct=0,qa=null,jr(e,E,k,J)}}Zy(),y=Ct;break}catch(re){Pm(e,re)}while(!0);return t&&e.shellSuspendCounter++,Qa=Vn=null,st=n,$.H=u,$.A=d,Pe===null&&(xt=null,Qe=0,Nl()),y}function Zy(){for(;Pe!==null;)Qm(Pe)}function Wy(e,t){var a=st;st|=2;var n=Wm(),u=Im();xt!==e||Qe!==t?(hc=null,fc=Ae()+500,wr(e,t)):br=il(e,t);e:do try{if(ct!==0&&Pe!==null){t=Pe;var d=qa;t:switch(ct){case 1:ct=0,qa=null,jr(e,t,d,1);break;case 2:case 9:if(rh(d)){ct=0,qa=null,Xm(t);break}t=function(){ct!==2&&ct!==9||xt!==e||(ct=7),Cn(e)},d.then(t,t);break e;case 3:ct=7;break e;case 4:ct=5;break e;case 7:rh(d)?(ct=0,qa=null,Xm(t)):(ct=0,qa=null,jr(e,t,d,7));break;case 5:var y=null;switch(Pe.tag){case 26:y=Pe.memoizedState;case 5:case 27:var E=Pe;if(y?U0(y):E.stateNode.complete){ct=0,qa=null;var k=E.sibling;if(k!==null)Pe=k;else{var J=E.return;J!==null?(Pe=J,xc(J)):Pe=null}break t}}ct=0,qa=null,jr(e,t,d,5);break;case 6:ct=0,qa=null,jr(e,t,d,6);break;case 8:_d(),Ct=6;break e;default:throw Error(o(462))}}Iy();break}catch(re){Pm(e,re)}while(!0);return Qa=Vn=null,$.H=n,$.A=u,st=a,Pe!==null?0:(xt=null,Qe=0,Nl(),Ct)}function Iy(){for(;Pe!==null&&!pe();)Qm(Pe)}function Qm(e){var t=bm(e.alternate,e,Xn);e.memoizedProps=e.pendingProps,t===null?xc(e):Pe=t}function Xm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=mm(a,t,t.pendingProps,t.type,void 0,Qe);break;case 11:t=mm(a,t,t.pendingProps,t.type.render,t.ref,Qe);break;case 5:Qo(t);default:Nm(a,t),t=Pe=Lu(t,Xn),t=bm(a,t,Xn)}e.memoizedProps=e.pendingProps,t===null?xc(e):Pe=t}function jr(e,t,a,n){Qa=Vn=null,Qo(t),hr=null,fi=0;var u=t.return;try{if(qy(e,u,t,a,Qe)){Ct=1,nc(e,Ea(a,e.current)),Pe=null;return}}catch(d){if(u!==null)throw Pe=u,d;Ct=1,nc(e,Ea(a,e.current)),Pe=null;return}t.flags&32768?(V||n===1?e=!0:br||(Qe&536870912)!==0?e=!1:(Dl=e=!0,(n===2||n===9||n===3||n===6)&&(n=za.current,n!==null&&n.tag===13&&(n.flags|=16384))),Jm(t,e)):xc(t)}function xc(e){var t=e;do{if((t.flags&32768)!==0){Jm(t,Dl);return}e=t.return;var a=By(t.alternate,t,Xn);if(a!==null){Pe=a;return}if(t=t.sibling,t!==null){Pe=t;return}Pe=t=e}while(t!==null);Ct===0&&(Ct=5)}function Jm(e,t){do{var a=Vy(e.alternate,e);if(a!==null){a.flags&=32767,Pe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Pe=e;return}Pe=e=a}while(e!==null);Ct=6,Pe=null}function Km(e,t,a,n,u,d,y,E,k){e.cancelPendingCommit=null;do yc();while(Zt!==0);if((st&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=ys,du(e,a,d,y,E,k),e===xt&&(Pe=xt=null,Qe=0),Nr=t,kl=e,Jn=a,Rd=d,Ad=u,Ym=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ky(jt,function(){return l0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=$.T,$.T=null,u=ie.p,ie.p=2,y=st,st|=4;try{Yy(e,t,a)}finally{st=y,ie.p=u,$.T=n}}Zt=1,e0(),t0(),a0()}}function e0(){if(Zt===1){Zt=0;var e=kl,t=Nr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=$.T,$.T=null;var n=ie.p;ie.p=2;var u=st;st|=4;try{_m(t,e);var d=Zd,y=Ao(e.containerInfo),E=d.focusedElem,k=d.selectionRange;if(y!==E&&E&&E.ownerDocument&&et(E.ownerDocument.documentElement,E)){if(k!==null&&er(E)){var J=k.start,re=k.end;if(re===void 0&&(re=J),"selectionStart"in E)E.selectionStart=J,E.selectionEnd=Math.min(re,E.value.length);else{var oe=E.ownerDocument||document,K=oe&&oe.defaultView||window;if(K.getSelection){var ae=K.getSelection(),be=E.textContent.length,_e=Math.min(k.start,be),gt=k.end===void 0?_e:Math.min(k.end,be);!ae.extend&&_e>gt&&(y=gt,gt=_e,_e=y);var F=ku(E,_e),L=ku(E,gt);if(F&&L&&(ae.rangeCount!==1||ae.anchorNode!==F.node||ae.anchorOffset!==F.offset||ae.focusNode!==L.node||ae.focusOffset!==L.offset)){var X=oe.createRange();X.setStart(F.node,F.offset),ae.removeAllRanges(),_e>gt?(ae.addRange(X),ae.extend(L.node,L.offset)):(X.setEnd(L.node,L.offset),ae.addRange(X))}}}}for(oe=[],ae=E;ae=ae.parentNode;)ae.nodeType===1&&oe.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<oe.length;E++){var ue=oe[E];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Oc=!!Pd,Zd=Pd=null}finally{st=u,ie.p=n,$.T=a}}e.current=t,Zt=2}}function t0(){if(Zt===2){Zt=0;var e=kl,t=Nr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=$.T,$.T=null;var n=ie.p;ie.p=2;var u=st;st|=4;try{Om(e,t.alternate,t)}finally{st=u,ie.p=n,$.T=a}}Zt=3}}function a0(){if(Zt===4||Zt===3){Zt=0,Me();var e=kl,t=Nr,a=Jn,n=Ym;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Zt=5:(Zt=0,Nr=kl=null,n0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Al=null),da(a),t=t.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(ut,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=$.T,u=ie.p,ie.p=2,$.T=null;try{for(var d=e.onRecoverableError,y=0;y<n.length;y++){var E=n[y];d(E.value,{componentStack:E.stack})}}finally{$.T=t,ie.p=u}}(Jn&3)!==0&&yc(),Cn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===kd?Oi++:(Oi=0,kd=e):Oi=0,Di(0)}}function n0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oi(t)))}function yc(){return e0(),t0(),a0(),l0()}function l0(){if(Zt!==5)return!1;var e=kl,t=Rd;Rd=0;var a=da(Jn),n=$.T,u=ie.p;try{ie.p=32>a?32:a,$.T=null,a=Ad,Ad=null;var d=kl,y=Jn;if(Zt=0,Nr=kl=null,Jn=0,(st&6)!==0)throw Error(o(331));var E=st;if(st|=4,Lm(d.current),Um(d,d.current,y,a),st=E,Di(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(ut,d)}catch{}return!0}finally{ie.p=u,$.T=n,n0(e,t)}}function s0(e,t,a){t=Ea(a,t),t=dd(e.stateNode,t,2),e=Tl(e,t,2),e!==null&&(ul(e,2),Cn(e))}function ot(e,t,a){if(e.tag===3)s0(e,e,a);else for(;t!==null;){if(t.tag===3){s0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Al===null||!Al.has(n))){e=Ea(a,e),a=rm(2),n=Tl(t,a,2),n!==null&&(im(a,n,t,e),ul(n,2),Cn(n));break}}t=t.return}}function Ud(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Gy;var u=new Set;n.set(t,u)}else u=n.get(t),u===void 0&&(u=new Set,n.set(t,u));u.has(a)||(Cd=!0,u.add(a),e=Qy.bind(null,e,t,a),t.then(e,e))}function Qy(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,xt===e&&(Qe&a)===a&&(Ct===4||Ct===3&&(Qe&62914560)===Qe&&300>Ae()-dc?(st&2)===0&&wr(e,0):Od|=a,Sr===Qe&&(Sr=0)),Cn(e)}function r0(e,t){t===0&&(t=Lr()),e=Pa(e,t),e!==null&&(ul(e,t),Cn(e))}function Xy(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),r0(e,a)}function Jy(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),r0(e,a)}function Ky(e,t){return an(e,t)}var pc=null,Er=null,qd=!1,vc=!1,Hd=!1,zl=0;function Cn(e){e!==Er&&e.next===null&&(Er===null?pc=Er=e:Er=Er.next=e),vc=!0,qd||(qd=!0,tp())}function Di(e,t){if(!Hd&&vc){Hd=!0;do for(var a=!1,n=pc;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var d=0;else{var y=n.suspendedLanes,E=n.pingedLanes;d=(1<<31-Kt(42|e)+1)-1,d&=u&~(y&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,o0(n,d))}else d=Qe,d=Wl(n,n===xt?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(d&3)===0||il(n,d)||(a=!0,o0(n,d));n=n.next}while(a);Hd=!1}}function ep(){i0()}function i0(){vc=qd=!1;var e=0;zl!==0&&dp()&&(e=zl);for(var t=Ae(),a=null,n=pc;n!==null;){var u=n.next,d=u0(n,t);d===0?(n.next=null,a===null?pc=u:a.next=u,u===null&&(Er=a)):(a=n,(e!==0||(d&3)!==0)&&(vc=!0)),n=u}Zt!==0&&Zt!==5||Di(e),zl!==0&&(zl=0)}function u0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-Kt(d),E=1<<y,k=u[y];k===-1?((E&a)===0||(E&n)!==0)&&(u[y]=ou(E,t)):k<=t&&(e.expiredLanes|=E),d&=~E}if(t=xt,a=Qe,a=Wl(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(ct===2||ct===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&le(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||il(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&le(n),da(a)){case 2:case 8:a=Dt;break;case 32:a=jt;break;case 268435456:a=Wt;break;default:a=jt}return n=c0.bind(null,e),a=an(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&le(n),e.callbackPriority=2,e.callbackNode=null,2}function c0(e,t){if(Zt!==0&&Zt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(yc()&&e.callbackNode!==a)return null;var n=Qe;return n=Wl(e,e===xt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Fm(e,n,t),u0(e,Ae()),e.callbackNode!=null&&e.callbackNode===a?c0.bind(null,e):null)}function o0(e,t){if(yc())return null;Fm(e,t,!0)}function tp(){hp(function(){(st&6)!==0?an(ft,ep):i0()})}function Ld(){if(zl===0){var e=or;e===0&&(e=rl,rl<<=1,(rl&261888)===0&&(rl=256)),zl=e}return zl}function d0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:as(""+e)}function f0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function ap(e,t,a,n,u){if(t==="submit"&&a&&a.stateNode===u){var d=d0((u[Gt]||null).action),y=n.submitter;y&&(t=(t=y[Gt]||null)?d0(t.formAction):y.getAttribute("formAction"),t!==null&&(d=t,y=null));var E=new rs("action","action",null,n,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(zl!==0){var k=y?f0(u,y):new FormData(u);sd(a,{pending:!0,data:k,method:u.method,action:d},null,k)}}else typeof d=="function"&&(E.preventDefault(),k=y?f0(u,y):new FormData(u),sd(a,{pending:!0,data:k,method:u.method,action:d},d,k))},currentTarget:u}]})}}for(var Bd=0;Bd<ri.length;Bd++){var Vd=ri[Bd],np=Vd.toLowerCase(),lp=Vd[0].toUpperCase()+Vd.slice(1);ja(np,"on"+lp)}ja(Uu,"onAnimationEnd"),ja(qu,"onAnimationIteration"),ja(nr,"onAnimationStart"),ja("dblclick","onDoubleClick"),ja("focusin","onFocus"),ja("focusout","onBlur"),ja(ko,"onTransitionRun"),ja(_o,"onTransitionStart"),ja(Hu,"onTransitionCancel"),ja(li,"onTransitionEnd"),cl("onMouseEnter",["mouseout","mouseover"]),cl("onMouseLeave",["mouseout","mouseover"]),cl("onPointerEnter",["pointerout","pointerover"]),cl("onPointerLeave",["pointerout","pointerover"]),bn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bn("onBeforeInput",["compositionend","keypress","textInput","paste"]),bn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ri="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),sp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ri));function h0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],u=n.event;n=n.listeners;e:{var d=void 0;if(t)for(var y=n.length-1;0<=y;y--){var E=n[y],k=E.instance,J=E.currentTarget;if(E=E.listener,k!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=J;try{d(u)}catch(re){Sl(re)}u.currentTarget=null,d=k}else for(y=0;y<n.length;y++){if(E=n[y],k=E.instance,J=E.currentTarget,E=E.listener,k!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=J;try{d(u)}catch(re){Sl(re)}u.currentTarget=null,d=k}}}}function Ze(e,t){var a=t[Il];a===void 0&&(a=t[Il]=new Set);var n=e+"__bubble";a.has(n)||(m0(t,e,2,!1),a.add(n))}function Yd(e,t,a){var n=0;t&&(n|=4),m0(a,e,n,t)}var bc="_reactListening"+Math.random().toString(36).slice(2);function $d(e){if(!e[bc]){e[bc]=!0,gu.forEach(function(a){a!=="selectionchange"&&(sp.has(a)||Yd(a,!1,e),Yd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bc]||(t[bc]=!0,Yd("selectionchange",!1,t))}}function m0(e,t,a,n){switch($0(t)){case 2:var u=kp;break;case 8:u=_p;break;default:u=lf}a=u.bind(null,t,a,e),u=void 0,!Ir||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),n?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function Fd(e,t,a,n,u){var d=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var y=n.tag;if(y===3||y===4){var E=n.stateNode.containerInfo;if(E===u)break;if(y===4)for(y=n.return;y!==null;){var k=y.tag;if((k===3||k===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;E!==null;){if(y=An(E),y===null)return;if(k=y.tag,k===5||k===6||k===26||k===27){n=d=y;continue e}E=E.parentNode}}n=n.return}Wr(function(){var J=d,re=Ws(a),oe=[];e:{var K=si.get(e);if(K!==void 0){var ae=rs,be=e;switch(e){case"keypress":if(ss(a)===0)break e;case"keydown":case"keyup":ae=po;break;case"focusin":be="focus",ae=Ks;break;case"focusout":be="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=uo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=So;break;case Uu:case qu:case nr:ae=hl;break;case li:ae=No;break;case"scroll":case"scrollend":ae=Qr;break;case"wheel":ae=jo;break;case"copy":case"cut":case"paste":ae=ml;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=Nu;break;case"toggle":case"beforetoggle":ae=To}var _e=(t&4)!==0,gt=!_e&&(e==="scroll"||e==="scrollend"),F=_e?K!==null?K+"Capture":null:K;_e=[];for(var L=J,X;L!==null;){var ue=L;if(X=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||X===null||F===null||(ue=ns(L,F),ue!=null&&_e.push(Ai(L,ue,X))),gt)break;L=L.return}0<_e.length&&(K=new ae(K,be,null,a,re),oe.push({event:K,listeners:_e}))}}if((t&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",K&&a!==Pr&&(be=a.relatedTarget||a.fromElement)&&(An(be)||be[Rn]))break e;if((ae||K)&&(K=re.window===re?re:(K=re.ownerDocument)?K.defaultView||K.parentWindow:window,ae?(be=a.relatedTarget||a.toElement,ae=J,be=be?An(be):null,be!==null&&(gt=f(be),_e=be.tag,be!==gt||_e!==5&&_e!==27&&_e!==6)&&(be=null)):(ae=null,be=J),ae!==be)){if(_e=Su,ue="onMouseLeave",F="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(_e=Nu,ue="onPointerLeave",F="onPointerEnter",L="pointer"),gt=ae==null?K:Na(ae),X=be==null?K:Na(be),K=new _e(ue,L+"leave",ae,a,re),K.target=gt,K.relatedTarget=X,ue=null,An(re)===J&&(_e=new _e(F,L+"enter",be,a,re),_e.target=X,_e.relatedTarget=gt,ue=_e),gt=ue,ae&&be)t:{for(_e=rp,F=ae,L=be,X=0,ue=F;ue;ue=_e(ue))X++;ue=0;for(var Ce=L;Ce;Ce=_e(Ce))ue++;for(;0<X-ue;)F=_e(F),X--;for(;0<ue-X;)L=_e(L),ue--;for(;X--;){if(F===L||L!==null&&F===L.alternate){_e=F;break t}F=_e(F),L=_e(L)}_e=null}else _e=null;ae!==null&&g0(oe,K,ae,_e,!1),be!==null&>!==null&&g0(oe,gt,be,_e,!0)}}e:{if(K=J?Na(J):window,ae=K.nodeName&&K.nodeName.toLowerCase(),ae==="select"||ae==="input"&&K.type==="file")var at=Ru;else if(Du(K))if(jn)at=vt;else{at=pl;var Ne=We}else ae=K.nodeName,!ae||ae.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?J&&Zs(J.elementType)&&(at=Ru):at=Ro;if(at&&(at=at(e,J))){Jr(oe,at,a,re);break e}Ne&&Ne(e,K,J),e==="focusout"&&J&&K.type==="number"&&J.memoizedProps.value!=null&&Jl(K,"number",K.value)}switch(Ne=J?Na(J):window,e){case"focusin":(Du(Ne)||Ne.contentEditable==="true")&&(vl=Ne,tr=J,aa=null);break;case"focusout":aa=tr=vl=null;break;case"mousedown":ar=!0;break;case"contextmenu":case"mouseup":case"dragend":ar=!1,xs(oe,a,re);break;case"selectionchange":if(_u)break;case"keydown":case"keyup":xs(oe,a,re)}var $e;if(Xr)e:{switch(e){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else xl?Cu(e,a)&&(Xe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Xe="onCompositionStart");Xe&&(Eu&&a.locale!=="ko"&&(xl||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&xl&&($e=Pt()):(Nn=re,Is="value"in Nn?Nn.value:Nn.textContent,xl=!0)),Ne=Sc(J,Xe),0<Ne.length&&(Xe=new gl(Xe,e,null,a,re),oe.push({event:Xe,listeners:Ne}),$e?Xe.data=$e:($e=Ou(a),$e!==null&&(Xe.data=$e)))),($e=Mo?Co(e,a):Oo(e,a))&&(Xe=Sc(J,"onBeforeInput"),0<Xe.length&&(Ne=new gl("onBeforeInput","beforeinput",null,a,re),oe.push({event:Ne,listeners:Xe}),Ne.data=$e)),ap(oe,e,J,a,re)}h0(oe,t)})}function Ai(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Sc(e,t){for(var a=t+"Capture",n=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=ns(e,a),u!=null&&n.unshift(Ai(e,u,d)),u=ns(e,t),u!=null&&n.push(Ai(e,u,d))),e.tag===3)return n;e=e.return}return[]}function rp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function g0(e,t,a,n,u){for(var d=t._reactName,y=[];a!==null&&a!==n;){var E=a,k=E.alternate,J=E.stateNode;if(E=E.tag,k!==null&&k===n)break;E!==5&&E!==26&&E!==27||J===null||(k=J,u?(J=ns(a,d),J!=null&&y.unshift(Ai(a,J,k))):u||(J=ns(a,d),J!=null&&y.push(Ai(a,J,k)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var ip=/\r\n?/g,up=/\u0000|\uFFFD/g;function x0(e){return(typeof e=="string"?e:""+e).replace(ip,`
|
|
49
|
-
`).replace(up,"")}function y0(e,t){return t=x0(t),x0(e)===t}function mt(e,t,a,n,u,d){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||rn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&rn(e,""+n);break;case"className":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,d);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 d=="function"&&(a==="formAction"?(t!=="input"&&mt(e,t,"name",u.name,u,null),mt(e,t,"formEncType",u.formEncType,u,null),mt(e,t,"formMethod",u.formMethod,u,null),mt(e,t,"formTarget",u.formTarget,u,null)):(mt(e,t,"encType",u.encType,u,null),mt(e,t,"method",u.method,u,null),mt(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=as(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=$a);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(u.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=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),ea(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":ea(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ro.get(a)||a,ea(e,a,n))}}function Gd(e,t,a,n,u,d){switch(a){case"style":pu(e,n,d);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?rn(e,n):(typeof n=="number"||typeof n=="bigint")&&rn(e,""+n);break;case"onScroll":n!=null&&Ze("scroll",e);break;case"onScrollEnd":n!=null&&Ze("scrollend",e);break;case"onClick":n!=null&&(e.onclick=$a);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),d=e[Gt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,u),typeof n=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,u);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):ea(e,a,n)}}}function ra(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,u=!1,d;for(d in a)if(a.hasOwnProperty(d)){var y=a[d];if(y!=null)switch(d){case"src":n=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:mt(e,t,d,y,a,null)}}u&&mt(e,t,"srcSet",a.srcSet,a,null),n&&mt(e,t,"src",a.src,a,null);return;case"input":Ze("invalid",e);var E=d=y=u=null,k=null,J=null;for(n in a)if(a.hasOwnProperty(n)){var re=a[n];if(re!=null)switch(n){case"name":u=re;break;case"type":y=re;break;case"checked":k=re;break;case"defaultChecked":J=re;break;case"value":d=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(o(137,t));break;default:mt(e,t,n,re,a,null)}}dl(e,d,E,k,J,y,u,!1);return;case"select":Ze("invalid",e),n=y=d=null;for(u in a)if(a.hasOwnProperty(u)&&(E=a[u],E!=null))switch(u){case"value":d=E;break;case"defaultValue":y=E;break;case"multiple":n=E;default:mt(e,t,u,E,a,null)}t=d,a=y,e.multiple=!!n,t!=null?_n(e,!!n,t,!1):a!=null&&_n(e,!!n,a,!0);return;case"textarea":Ze("invalid",e),d=u=n=null;for(y in a)if(a.hasOwnProperty(y)&&(E=a[y],E!=null))switch(y){case"value":n=E;break;case"defaultValue":u=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(o(91));break;default:mt(e,t,y,E,a,null)}Gr(e,n,u,d);return;case"option":for(k in a)if(a.hasOwnProperty(k)&&(n=a[k],n!=null))switch(k){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:mt(e,t,k,n,a,null)}return;case"dialog":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<Ri.length;n++)Ze(Ri[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(J in a)if(a.hasOwnProperty(J)&&(n=a[J],n!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:mt(e,t,J,n,a,null)}return;default:if(Zs(t)){for(re in a)a.hasOwnProperty(re)&&(n=a[re],n!==void 0&&Gd(e,t,re,n,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(n=a[E],n!=null&&mt(e,t,E,n,a,null))}function cp(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,y=null,E=null,k=null,J=null,re=null;for(ae in a){var oe=a[ae];if(a.hasOwnProperty(ae)&&oe!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":k=oe;default:n.hasOwnProperty(ae)||mt(e,t,ae,null,n,oe)}}for(var K in n){var ae=n[K];if(oe=a[K],n.hasOwnProperty(K)&&(ae!=null||oe!=null))switch(K){case"type":d=ae;break;case"name":u=ae;break;case"checked":J=ae;break;case"defaultChecked":re=ae;break;case"value":y=ae;break;case"defaultValue":E=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,t));break;default:ae!==oe&&mt(e,t,K,ae,n,oe)}}Ps(e,y,E,k,J,re,d,u);return;case"select":ae=y=E=K=null;for(d in a)if(k=a[d],a.hasOwnProperty(d)&&k!=null)switch(d){case"value":break;case"multiple":ae=k;default:n.hasOwnProperty(d)||mt(e,t,d,null,n,k)}for(u in n)if(d=n[u],k=a[u],n.hasOwnProperty(u)&&(d!=null||k!=null))switch(u){case"value":K=d;break;case"defaultValue":E=d;break;case"multiple":y=d;default:d!==k&&mt(e,t,u,d,n,k)}t=E,a=y,n=ae,K!=null?_n(e,!!a,K,!1):!!n!=!!a&&(t!=null?_n(e,!!a,t,!0):_n(e,!!a,a?[]:"",!1));return;case"textarea":ae=K=null;for(E in a)if(u=a[E],a.hasOwnProperty(E)&&u!=null&&!n.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:mt(e,t,E,null,n,u)}for(y in n)if(u=n[y],d=a[y],n.hasOwnProperty(y)&&(u!=null||d!=null))switch(y){case"value":K=u;break;case"defaultValue":ae=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==d&&mt(e,t,y,u,n,d)}Kl(e,K,ae);return;case"option":for(var be in a)if(K=a[be],a.hasOwnProperty(be)&&K!=null&&!n.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:mt(e,t,be,null,n,K)}for(k in n)if(K=n[k],ae=a[k],n.hasOwnProperty(k)&&K!==ae&&(K!=null||ae!=null))switch(k){case"selected":e.selected=K&&typeof K!="function"&&typeof K!="symbol";break;default:mt(e,t,k,K,n,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var _e in a)K=a[_e],a.hasOwnProperty(_e)&&K!=null&&!n.hasOwnProperty(_e)&&mt(e,t,_e,null,n,K);for(J in n)if(K=n[J],ae=a[J],n.hasOwnProperty(J)&&K!==ae&&(K!=null||ae!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(o(137,t));break;default:mt(e,t,J,K,n,ae)}return;default:if(Zs(t)){for(var gt in a)K=a[gt],a.hasOwnProperty(gt)&&K!==void 0&&!n.hasOwnProperty(gt)&&Gd(e,t,gt,void 0,n,K);for(re in n)K=n[re],ae=a[re],!n.hasOwnProperty(re)||K===ae||K===void 0&&ae===void 0||Gd(e,t,re,K,n,ae);return}}for(var F in a)K=a[F],a.hasOwnProperty(F)&&K!=null&&!n.hasOwnProperty(F)&&mt(e,t,F,null,n,K);for(oe in n)K=n[oe],ae=a[oe],!n.hasOwnProperty(oe)||K===ae||K==null&&ae==null||mt(e,t,oe,K,n,ae)}function p0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function op(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var u=a[n],d=u.transferSize,y=u.initiatorType,E=u.duration;if(d&&E&&p0(y)){for(y=0,E=u.responseEnd,n+=1;n<a.length;n++){var k=a[n],J=k.startTime;if(J>E)break;var re=k.transferSize,oe=k.initiatorType;re&&p0(oe)&&(k=k.responseEnd,y+=re*(k<E?1:(E-J)/(k-J)))}if(--n,t+=8*(d+y)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Pd=null,Zd=null;function Nc(e){return e.nodeType===9?e:e.ownerDocument}function v0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function b0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Wd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Id=null;function dp(){var e=window.event;return e&&e.type==="popstate"?e===Id?!1:(Id=e,!0):(Id=null,!1)}var S0=typeof setTimeout=="function"?setTimeout:void 0,fp=typeof clearTimeout=="function"?clearTimeout:void 0,N0=typeof Promise=="function"?Promise:void 0,hp=typeof queueMicrotask=="function"?queueMicrotask:typeof N0<"u"?function(e){return N0.resolve(null).then(e).catch(mp)}:S0;function mp(e){setTimeout(function(){throw e})}function Ul(e){return e==="head"}function w0(e,t){var a=t,n=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(u),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 d=a.firstChild;d;){var y=d.nextSibling,E=d.nodeName;d[Ql]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=y}}else a==="body"&&ki(e.ownerDocument.body);a=u}while(a);Or(t)}function j0(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Qd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Qd(a),$s(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function gp(e,t,a,n){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Ql])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Ka(e.nextSibling),e===null)break}return null}function xp(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ka(e.nextSibling),e===null))return null;return e}function E0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ka(e.nextSibling),e===null))return null;return e}function Xd(e){return e.data==="$?"||e.data==="$~"}function Jd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function yp(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Ka(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Kd=null;function T0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ka(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function M0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function C0(e,t,a){switch(t=Nc(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ki(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);$s(e)}var en=new Map,O0=new Set;function wc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Kn=ie.d;ie.d={f:pp,r:vp,D:bp,C:Sp,L:Np,m:wp,X:Ep,S:jp,M:Tp};function pp(){var e=Kn.f(),t=mc();return e||t}function vp(e){var t=De(e);t!==null&&t.tag===5&&t.type==="form"?Ph(t):Kn.r(e)}var Tr=typeof document>"u"?null:document;function D0(e,t,a){var n=Tr;if(n&&typeof t=="string"&&t){var u=ta(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),O0.has(u)||(O0.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),ra(t,"link",e),Ht(t),n.head.appendChild(t)))}}function bp(e){Kn.D(e),D0("dns-prefetch",e,null)}function Sp(e,t){Kn.C(e,t),D0("preconnect",e,t)}function Np(e,t,a){Kn.L(e,t,a);var n=Tr;if(n&&e&&t){var u='link[rel="preload"][as="'+ta(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+ta(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+ta(a.imageSizes)+'"]')):u+='[href="'+ta(e)+'"]';var d=u;switch(t){case"style":d=Mr(e);break;case"script":d=Cr(e)}en.has(d)||(e=T({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),en.set(d,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(_i(d))||t==="script"&&n.querySelector(zi(d))||(t=n.createElement("link"),ra(t,"link",e),Ht(t),n.head.appendChild(t)))}}function wp(e,t){Kn.m(e,t);var a=Tr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+ta(n)+'"][href="'+ta(e)+'"]',d=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Cr(e)}if(!en.has(d)&&(e=T({rel:"modulepreload",href:e},t),en.set(d,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(zi(d)))return}n=a.createElement("link"),ra(n,"link",e),Ht(n),a.head.appendChild(n)}}}function jp(e,t,a){Kn.S(e,t,a);var n=Tr;if(n&&e){var u=ln(n).hoistableStyles,d=Mr(e);t=t||"default";var y=u.get(d);if(!y){var E={loading:0,preload:null};if(y=n.querySelector(_i(d)))E.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},a),(a=en.get(d))&&ef(e,a);var k=y=n.createElement("link");Ht(k),ra(k,"link",e),k._p=new Promise(function(J,re){k.onload=J,k.onerror=re}),k.addEventListener("load",function(){E.loading|=1}),k.addEventListener("error",function(){E.loading|=2}),E.loading|=4,jc(y,t,n)}y={type:"stylesheet",instance:y,count:1,state:E},u.set(d,y)}}}function Ep(e,t){Kn.X(e,t);var a=Tr;if(a&&e){var n=ln(a).hoistableScripts,u=Cr(e),d=n.get(u);d||(d=a.querySelector(zi(u)),d||(e=T({src:e,async:!0},t),(t=en.get(u))&&tf(e,t),d=a.createElement("script"),Ht(d),ra(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function Tp(e,t){Kn.M(e,t);var a=Tr;if(a&&e){var n=ln(a).hoistableScripts,u=Cr(e),d=n.get(u);d||(d=a.querySelector(zi(u)),d||(e=T({src:e,async:!0,type:"module"},t),(t=en.get(u))&&tf(e,t),d=a.createElement("script"),Ht(d),ra(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function R0(e,t,a,n){var u=(u=Te.current)?wc(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Mr(a.href),a=ln(u).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Mr(a.href);var d=ln(u).hoistableStyles,y=d.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=u.querySelector(_i(e)))&&!d._p&&(y.instance=d,y.state.loading=5),en.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},en.set(e,a),d||Mp(u,e,a,y.state))),t&&n===null)throw Error(o(528,""));return y}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Cr(a),a=ln(u).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Mr(e){return'href="'+ta(e)+'"'}function _i(e){return'link[rel="stylesheet"]['+e+"]"}function A0(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Mp(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}),ra(t,"link",a),Ht(t),e.head.appendChild(t))}function Cr(e){return'[src="'+ta(e)+'"]'}function zi(e){return"script[async]"+e}function k0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+ta(a.href)+'"]');if(n)return t.instance=n,Ht(n),n;var u=T({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ht(n),ra(n,"style",u),jc(n,a.precedence,e),t.instance=n;case"stylesheet":u=Mr(a.href);var d=e.querySelector(_i(u));if(d)return t.state.loading|=4,t.instance=d,Ht(d),d;n=A0(a),(u=en.get(u))&&ef(n,u),d=(e.ownerDocument||e).createElement("link"),Ht(d);var y=d;return y._p=new Promise(function(E,k){y.onload=E,y.onerror=k}),ra(d,"link",n),t.state.loading|=4,jc(d,a.precedence,e),t.instance=d;case"script":return d=Cr(a.src),(u=e.querySelector(zi(d)))?(t.instance=u,Ht(u),u):(n=a,(u=en.get(d))&&(n=T({},a),tf(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),Ht(u),ra(u,"link",n),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,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]'),u=n.length?n[n.length-1]:null,d=u,y=0;y<n.length;y++){var E=n[y];if(E.dataset.precedence===t)d=E;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function ef(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function tf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ec=null;function _0(e,t,a){if(Ec===null){var n=new Map,u=Ec=new Map;u.set(a,n)}else u=Ec,n=u.get(a),n||(n=new Map,u.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var d=a[u];if(!(d[Ql]||d[At]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(t)||"";y=e+y;var E=n.get(y);E?E.push(d):n.set(y,[d])}}return n}function z0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Cp(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function U0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Op(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Mr(n.href),d=t.querySelector(_i(u));if(d){t=d._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=d,Ht(d);return}d=t.ownerDocument||t,n=A0(n),(u=en.get(u))&&ef(n,u),d=d.createElement("link"),Ht(d);var y=d;y._p=new Promise(function(E,k){y.onload=E,y.onerror=k}),ra(d,"link",n),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Tc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var af=0;function Dp(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 d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&af===0&&(af=62500*op());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>af?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function 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(Rp,e),Mc=null,Tc.call(e))}function Rp(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 u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var y=u[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),n=y)}n&&a.set(null,n)}u=t.instance,y=u.getAttribute("data-precedence"),d=a.get(y)||n,d===n&&a.set(null,u),a.set(y,u),this.count++,n=Tc.bind(this),u.addEventListener("load",n),u.addEventListener("error",n),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Ui={$$typeof:G,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function Ap(e,t,a,n,u,d,y,E,k){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Bs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bs(0),this.hiddenUpdates=Bs(null),this.identifierPrefix=n,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function q0(e,t,a,n,u,d,y,E,k,J,re,oe){return e=new Ap(e,t,a,y,k,J,re,oe,E),t=1,d===!0&&(t|=24),d=na(3,null,null,t),e.current=d,d.stateNode=e,t=zo(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:n,isDehydrated:a,cache:t},Lo(d),e}function H0(e){return e?(e=_a,e):_a}function L0(e,t,a,n,u,d){u=H0(u),n.context===null?n.context=u:n.pendingContext=u,n=El(t),n.payload={element:a},d=d===void 0?null:d,d!==null&&(n.callback=d),a=Tl(e,n,t),a!==null&&(Ra(a,e,t),mi(a,e,t))}function B0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function nf(e,t){B0(e,t),(e=e.alternate)&&B0(e,t)}function V0(e){if(e.tag===13||e.tag===31){var t=Pa(e,67108864);t!==null&&Ra(t,e,67108864),nf(e,67108864)}}function Y0(e){if(e.tag===13||e.tag===31){var t=La();t=Vs(t);var a=Pa(e,t);a!==null&&Ra(a,e,t),nf(e,t)}}var Oc=!0;function kp(e,t,a,n){var u=$.T;$.T=null;var d=ie.p;try{ie.p=2,lf(e,t,a,n)}finally{ie.p=d,$.T=u}}function _p(e,t,a,n){var u=$.T;$.T=null;var d=ie.p;try{ie.p=8,lf(e,t,a,n)}finally{ie.p=d,$.T=u}}function lf(e,t,a,n){if(Oc){var u=sf(n);if(u===null)Fd(e,t,n,Dc,a),F0(e,n);else if(Up(u,e,t,a,n))n.stopPropagation();else if(F0(e,n),t&4&&-1<zp.indexOf(e)){for(;u!==null;){var d=De(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=vn(d.pendingLanes);if(y!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;y;){var k=1<<31-Kt(y);E.entanglements[1]|=k,y&=~k}Cn(d),(st&6)===0&&(fc=Ae()+500,Di(0))}}break;case 31:case 13:E=Pa(d,2),E!==null&&Ra(E,d,2),mc(),nf(d,2)}if(d=sf(n),d===null&&Fd(e,t,n,Dc,a),d===u)break;u=d}u!==null&&n.stopPropagation()}else Fd(e,t,n,null,a)}}function sf(e){return e=Ws(e),rf(e)}var Dc=null;function rf(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 $0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ke()){case ft:return 2;case Dt:return 8;case jt:case $t:return 32;case Wt:return 268435456;default:return 32}default:return 32}}var uf=!1,ql=null,Hl=null,Ll=null,qi=new Map,Hi=new Map,Bl=[],zp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function F0(e,t){switch(e){case"focusin":case"focusout":ql=null;break;case"dragenter":case"dragleave":Hl=null;break;case"mouseover":case"mouseout":Ll=null;break;case"pointerover":case"pointerout":qi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hi.delete(t.pointerId)}}function Li(e,t,a,n,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:d,targetContainers:[u]},t!==null&&(t=De(t),t!==null&&V0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Up(e,t,a,n,u){switch(t){case"focusin":return ql=Li(ql,e,t,a,n,u),!0;case"dragenter":return Hl=Li(Hl,e,t,a,n,u),!0;case"mouseover":return Ll=Li(Ll,e,t,a,n,u),!0;case"pointerover":var d=u.pointerId;return qi.set(d,Li(qi.get(d)||null,e,t,a,n,u)),!0;case"gotpointercapture":return d=u.pointerId,Hi.set(d,Li(Hi.get(d)||null,e,t,a,n,u)),!0}return!1}function G0(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,Vr(e.priority,function(){Y0(a)});return}}else if(t===31){if(t=N(a),t!==null){e.blockedOn=t,Vr(e.priority,function(){Y0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=sf(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Pr=n,a.target.dispatchEvent(n),Pr=null}else return t=De(a),t!==null&&V0(t),e.blockedOn=a,!1;t.shift()}return!0}function P0(e,t,a){Rc(e)&&a.delete(t)}function qp(){uf=!1,ql!==null&&Rc(ql)&&(ql=null),Hl!==null&&Rc(Hl)&&(Hl=null),Ll!==null&&Rc(Ll)&&(Ll=null),qi.forEach(P0),Hi.forEach(P0)}function Ac(e,t){e.blockedOn===t&&(e.blockedOn=null,uf||(uf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,qp)))}var kc=null;function Z0(e){kc!==e&&(kc=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){kc===e&&(kc=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],u=e[t+2];if(typeof n!="function"){if(rf(n||a)===null)continue;break}var d=De(a);d!==null&&(e.splice(t,3),t-=3,sd(d,{pending:!0,data:u,method:a.method,action:n},n,u))}}))}function Or(e){function t(k){return Ac(k,e)}ql!==null&&Ac(ql,e),Hl!==null&&Ac(Hl,e),Ll!==null&&Ac(Ll,e),qi.forEach(t),Hi.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);)G0(a),a.blockedOn===null&&Bl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var u=a[n],d=a[n+1],y=u[Gt]||null;if(typeof d=="function")y||Z0(a);else if(y){var E=null;if(d&&d.hasAttribute("formAction")){if(u=d,y=d[Gt]||null)E=y.formAction;else if(rf(u)!==null)continue}else E=y.action;typeof E=="function"?a[n+1]=E:(a.splice(n,3),n-=3),Z0(a)}}}function W0(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function cf(e){this._internalRoot=e}_c.prototype.render=cf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=La();L0(a,n,e,t,null,null)},_c.prototype.unmount=cf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;L0(e.current,2,null,e,null,null),mc(),t[Rn]=null}};function _c(e){this._internalRoot=e}_c.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&&G0(e)}};var I0=r.version;if(I0!=="19.2.4")throw Error(o(527,I0,"19.2.4"));ie.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=x(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Hp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zc.isDisabled&&zc.supportsFiber)try{ut=zc.inject(Hp),Rt=zc}catch{}}return Vi.createRoot=function(e,t){if(!h(e))throw Error(o(299));var a=!1,n="",u=am,d=nm,y=lm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=q0(e,1,!1,null,null,a,n,null,u,d,y,W0),e[Rn]=t.current,$d(e),new cf(t)},Vi.hydrateRoot=function(e,t,a){if(!h(e))throw Error(o(299));var n=!1,u="",d=am,y=nm,E=lm,k=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(k=a.formState)),t=q0(e,1,!0,t,a??null,n,u,k,d,y,E,W0),t.context=H0(null),a=t.current,n=La(),n=Vs(n),u=El(n),u.callback=null,Tl(a,u,n),a=n,t.current.lanes=a,ul(t,a),Cn(t),e[Rn]=t.current,$d(e),new _c(t)},Vi.version="19.2.4",Vi}var ig;function Qp(){if(ig)return hf.exports;ig=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),hf.exports=Ip(),hf.exports}var Xp=Qp();const Jp=Hf(Xp);/**
|
|
50
|
-
* react-router v7.13.0
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Remix Software Inc.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
-
*
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/var ug="popstate";function Kp(l={}){function r(h,f){let{pathname:v="/",search:N="",hash:b=""}=qs(h.location.hash.substring(1));return!v.startsWith("/")&&!v.startsWith(".")&&(v="/"+v),Cf("",{pathname:v,search:N,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function c(h,f){let v=h.document.querySelector("base"),N="";if(v&&v.getAttribute("href")){let b=h.location.href,x=b.indexOf("#");N=x===-1?b:b.slice(0,x)}return N+"#"+(typeof f=="string"?f:nu(f))}function o(h,f){tn(h.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return tv(r,c,o,l)}function wt(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function tn(l,r){if(!l){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function ev(){return Math.random().toString(36).substring(2,10)}function cg(l,r){return{usr:l.state,key:l.key,idx:r}}function Cf(l,r,c=null,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?qs(r):r,state:c,key:r&&r.key||o||ev()}}function nu({pathname:l="/",search:r="",hash:c=""}){return r&&r!=="?"&&(l+=r.charAt(0)==="?"?r:"?"+r),c&&c!=="#"&&(l+=c.charAt(0)==="#"?c:"#"+c),l}function qs(l){let r={};if(l){let c=l.indexOf("#");c>=0&&(r.hash=l.substring(c),l=l.substring(0,c));let o=l.indexOf("?");o>=0&&(r.search=l.substring(o),l=l.substring(0,o)),l&&(r.pathname=l)}return r}function tv(l,r,c,o={}){let{window:h=document.defaultView,v5Compat:f=!1}=o,v=h.history,N="POP",b=null,x=S();x==null&&(x=0,v.replaceState({...v.state,idx:x},""));function S(){return(v.state||{idx:null}).idx}function T(){N="POP";let R=S(),I=R==null?null:R-x;x=R,b&&b({action:N,location:M.location,delta:I})}function j(R,I){N="PUSH";let Y=Cf(M.location,R,I);c&&c(Y,R),x=S()+1;let G=cg(Y,x),ee=M.createHref(Y);try{v.pushState(G,"",ee)}catch(de){if(de instanceof DOMException&&de.name==="DataCloneError")throw de;h.location.assign(ee)}f&&b&&b({action:N,location:M.location,delta:1})}function D(R,I){N="REPLACE";let Y=Cf(M.location,R,I);c&&c(Y,R),x=S();let G=cg(Y,x),ee=M.createHref(Y);v.replaceState(G,"",ee),f&&b&&b({action:N,location:M.location,delta:0})}function C(R){return av(R)}let M={get action(){return N},get location(){return l(h,v)},listen(R){if(b)throw new Error("A history only accepts one active listener");return h.addEventListener(ug,T),b=R,()=>{h.removeEventListener(ug,T),b=null}},createHref(R){return r(h,R)},createURL:C,encodeLocation(R){let I=C(R);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:j,replace:D,go(R){return v.go(R)}};return M}function av(l,r=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),wt(c,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:nu(l);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=c+o),new URL(o,c)}function rx(l,r,c="/"){return nv(l,r,c,!1)}function nv(l,r,c,o){let h=typeof r=="string"?qs(r):r,f=ll(h.pathname||"/",c);if(f==null)return null;let v=ix(l);lv(v);let N=null;for(let b=0;N==null&&b<v.length;++b){let x=gv(f);N=hv(v[b],x,o)}return N}function ix(l,r=[],c=[],o="",h=!1){let f=(v,N,b=h,x)=>{let S={relativePath:x===void 0?v.path||"":x,caseSensitive:v.caseSensitive===!0,childrenIndex:N,route:v};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(o)&&b)return;wt(S.relativePath.startsWith(o),`Absolute route path "${S.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(o.length)}let T=nl([o,S.relativePath]),j=c.concat(S);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 "${T}".`),ix(v.children,r,j,T,b)),!(v.path==null&&!v.index)&&r.push({path:T,score:dv(T,v.index),routesMeta:j})};return l.forEach((v,N)=>{var b;if(v.path===""||!((b=v.path)!=null&&b.includes("?")))f(v,N);else for(let x of ux(v.path))f(v,N,!0,x)}),r}function ux(l){let r=l.split("/");if(r.length===0)return[];let[c,...o]=r,h=c.endsWith("?"),f=c.replace(/\?$/,"");if(o.length===0)return h?[f,""]:[f];let v=ux(o.join("/")),N=[];return N.push(...v.map(b=>b===""?f:[f,b].join("/"))),h&&N.push(...v),N.map(b=>l.startsWith("/")&&b===""?"/":b)}function lv(l){l.sort((r,c)=>r.score!==c.score?c.score-r.score:fv(r.routesMeta.map(o=>o.childrenIndex),c.routesMeta.map(o=>o.childrenIndex)))}var sv=/^:[\w-]+$/,rv=3,iv=2,uv=1,cv=10,ov=-2,og=l=>l==="*";function dv(l,r){let c=l.split("/"),o=c.length;return c.some(og)&&(o+=ov),r&&(o+=iv),c.filter(h=>!og(h)).reduce((h,f)=>h+(sv.test(f)?rv:f===""?uv:cv),o)}function fv(l,r){return l.length===r.length&&l.slice(0,-1).every((o,h)=>o===r[h])?l[l.length-1]-r[r.length-1]:0}function hv(l,r,c=!1){let{routesMeta:o}=l,h={},f="/",v=[];for(let N=0;N<o.length;++N){let b=o[N],x=N===o.length-1,S=f==="/"?r:r.slice(f.length)||"/",T=Gc({path:b.relativePath,caseSensitive:b.caseSensitive,end:x},S),j=b.route;if(!T&&x&&c&&!o[o.length-1].route.index&&(T=Gc({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},S)),!T)return null;Object.assign(h,T.params),v.push({params:h,pathname:nl([f,T.pathname]),pathnameBase:vv(nl([f,T.pathnameBase])),route:j}),T.pathnameBase!=="/"&&(f=nl([f,T.pathnameBase]))}return v}function Gc(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[c,o]=mv(l.path,l.caseSensitive,l.end),h=r.match(c);if(!h)return null;let f=h[0],v=f.replace(/(.)\/+$/,"$1"),N=h.slice(1);return{params:o.reduce((x,{paramName:S,isOptional:T},j)=>{if(S==="*"){let C=N[j]||"";v=f.slice(0,f.length-C.length).replace(/(.)\/+$/,"$1")}const D=N[j];return T&&!D?x[S]=void 0:x[S]=(D||"").replace(/%2F/g,"/"),x},{}),pathname:f,pathnameBase:v,pattern:l}}function mv(l,r=!1,c=!0){tn(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let o=[],h="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(v,N,b)=>(o.push({paramName:N,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(o.push({paramName:"*"}),h+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?h+="\\/*$":l!==""&&l!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,r?void 0:"i"),o]}function gv(l){try{return l.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return tn(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),l}}function ll(l,r){if(r==="/")return l;if(!l.toLowerCase().startsWith(r.toLowerCase()))return null;let c=r.endsWith("/")?r.length-1:r.length,o=l.charAt(c);return o&&o!=="/"?null:l.slice(c)||"/"}var xv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function yv(l,r="/"){let{pathname:c,search:o="",hash:h=""}=typeof l=="string"?qs(l):l,f;return c?(c=c.replace(/\/\/+/g,"/"),c.startsWith("/")?f=dg(c.substring(1),"/"):f=dg(c,r)):f=r,{pathname:f,search:bv(o),hash:Sv(h)}}function dg(l,r){let c=r.replace(/\/+$/,"").split("/");return l.split("/").forEach(h=>{h===".."?c.length>1&&c.pop():h!=="."&&c.push(h)}),c.length>1?c.join("/"):"/"}function yf(l,r,c,o){return`Cannot include a '${l}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pv(l){return l.filter((r,c)=>c===0||r.route.path&&r.route.path.length>0)}function Bf(l){let r=pv(l);return r.map((c,o)=>o===r.length-1?c.pathname:c.pathnameBase)}function Vf(l,r,c,o=!1){let h;typeof l=="string"?h=qs(l):(h={...l},wt(!h.pathname||!h.pathname.includes("?"),yf("?","pathname","search",h)),wt(!h.pathname||!h.pathname.includes("#"),yf("#","pathname","hash",h)),wt(!h.search||!h.search.includes("#"),yf("#","search","hash",h)));let f=l===""||h.pathname==="",v=f?"/":h.pathname,N;if(v==null)N=c;else{let T=r.length-1;if(!o&&v.startsWith("..")){let j=v.split("/");for(;j[0]==="..";)j.shift(),T-=1;h.pathname=j.join("/")}N=T>=0?r[T]:"/"}let b=yv(h,N),x=v&&v!=="/"&&v.endsWith("/"),S=(f||v===".")&&c.endsWith("/");return!b.pathname.endsWith("/")&&(x||S)&&(b.pathname+="/"),b}var nl=l=>l.join("/").replace(/\/\/+/g,"/"),vv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),bv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Sv=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,Nv=class{constructor(l,r,c,o=!1){this.status=l,this.statusText=r||"",this.internal=o,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function wv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function jv(l){return l.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var cx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ox(l,r){let c=l;if(typeof c!="string"||!xv.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let o=c,h=!1;if(cx)try{let f=new URL(window.location.href),v=c.startsWith("//")?new URL(f.protocol+c):new URL(c),N=ll(v.pathname,r);v.origin===f.origin&&N!=null?c=N+v.search+v.hash:h=!0}catch{tn(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:h,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var dx=["POST","PUT","PATCH","DELETE"];new Set(dx);var Ev=["GET",...dx];new Set(Ev);var zr=U.createContext(null);zr.displayName="DataRouter";var Kc=U.createContext(null);Kc.displayName="DataRouterState";var Tv=U.createContext(!1),fx=U.createContext({isTransitioning:!1});fx.displayName="ViewTransition";var Mv=U.createContext(new Map);Mv.displayName="Fetchers";var Cv=U.createContext(null);Cv.displayName="Await";var Ya=U.createContext(null);Ya.displayName="Navigation";var ru=U.createContext(null);ru.displayName="Location";var On=U.createContext({outlet:null,matches:[],isDataRoute:!1});On.displayName="Route";var Yf=U.createContext(null);Yf.displayName="RouteError";var hx="REACT_ROUTER_ERROR",Ov="REDIRECT",Dv="ROUTE_ERROR_RESPONSE";function Rv(l){if(l.startsWith(`${hx}:${Ov}:{`))try{let r=JSON.parse(l.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function Av(l){if(l.startsWith(`${hx}:${Dv}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Nv(r.status,r.statusText,r.data)}catch{}}function kv(l,{relative:r}={}){wt(Ur(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:o}=U.useContext(Ya),{hash:h,pathname:f,search:v}=iu(l,{relative:r}),N=f;return c!=="/"&&(N=f==="/"?c:nl([c,f])),o.createHref({pathname:N,search:v,hash:h})}function Ur(){return U.useContext(ru)!=null}function Pl(){return wt(Ur(),"useLocation() may be used only in the context of a <Router> component."),U.useContext(ru).location}var mx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gx(l){U.useContext(Ya).static||U.useLayoutEffect(l)}function $f(){let{isDataRoute:l}=U.useContext(On);return l?Pv():_v()}function _v(){wt(Ur(),"useNavigate() may be used only in the context of a <Router> component.");let l=U.useContext(zr),{basename:r,navigator:c}=U.useContext(Ya),{matches:o}=U.useContext(On),{pathname:h}=Pl(),f=JSON.stringify(Bf(o)),v=U.useRef(!1);return gx(()=>{v.current=!0}),U.useCallback((b,x={})=>{if(tn(v.current,mx),!v.current)return;if(typeof b=="number"){c.go(b);return}let S=Vf(b,JSON.parse(f),h,x.relative==="path");l==null&&r!=="/"&&(S.pathname=S.pathname==="/"?r:nl([r,S.pathname])),(x.replace?c.replace:c.push)(S,x.state,x)},[r,c,f,h,l])}U.createContext(null);function iu(l,{relative:r}={}){let{matches:c}=U.useContext(On),{pathname:o}=Pl(),h=JSON.stringify(Bf(c));return U.useMemo(()=>Vf(l,JSON.parse(h),o,r==="path"),[l,h,o,r])}function zv(l,r){return xx(l,r)}function xx(l,r,c,o,h){var Y;wt(Ur(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=U.useContext(Ya),{matches:v}=U.useContext(On),N=v[v.length-1],b=N?N.params:{},x=N?N.pathname:"/",S=N?N.pathnameBase:"/",T=N&&N.route;{let G=T&&T.path||"";px(x,!T||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${G}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
-
|
|
60
|
-
Please change the parent <Route path="${G}"> to <Route path="${G==="/"?"*":`${G}/*`}">.`)}let j=Pl(),D;if(r){let G=typeof r=="string"?qs(r):r;wt(S==="/"||((Y=G.pathname)==null?void 0:Y.startsWith(S)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${S}" but pathname "${G.pathname}" was given in the \`location\` prop.`),D=G}else D=j;let C=D.pathname||"/",M=C;if(S!=="/"){let G=S.replace(/^\//,"").split("/");M="/"+C.replace(/^\//,"").split("/").slice(G.length).join("/")}let R=rx(l,{pathname:M});tn(T||R!=null,`No routes matched location "${D.pathname}${D.search}${D.hash}" `),tn(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${D.pathname}${D.search}${D.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let I=Bv(R&&R.map(G=>Object.assign({},G,{params:Object.assign({},b,G.params),pathname:nl([S,f.encodeLocation?f.encodeLocation(G.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?S:nl([S,f.encodeLocation?f.encodeLocation(G.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathnameBase])})),v,c,o,h);return r&&I?U.createElement(ru.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},I):I}function Uv(){let l=Gv(),r=wv(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),c=l instanceof Error?l.stack:null,o="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},v=null;return console.error("Error handled by React Router default ErrorBoundary:",l),v=U.createElement(U.Fragment,null,U.createElement("p",null,"💿 Hey developer 👋"),U.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",U.createElement("code",{style:f},"ErrorBoundary")," or"," ",U.createElement("code",{style:f},"errorElement")," prop on your route.")),U.createElement(U.Fragment,null,U.createElement("h2",null,"Unexpected Application Error!"),U.createElement("h3",{style:{fontStyle:"italic"}},r),c?U.createElement("pre",{style:h},c):null,v)}var qv=U.createElement(Uv,null),yx=class extends U.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,r){return r.location!==l.location||r.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:r.error,location:r.location,revalidation:l.revalidation||r.revalidation}}componentDidCatch(l,r){this.props.onError?this.props.onError(l,r):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const c=Av(l.digest);c&&(l=c)}let r=l!==void 0?U.createElement(On.Provider,{value:this.props.routeContext},U.createElement(Yf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?U.createElement(Hv,{error:l},r):r}};yx.contextType=Tv;var pf=new WeakMap;function Hv({children:l,error:r}){let{basename:c}=U.useContext(Ya);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=Rv(r.digest);if(o){let h=pf.get(r);if(h)throw h;let f=ox(o.location,c);if(cx&&!pf.get(r))if(f.isExternal||o.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:o.replace}));throw pf.set(r,v),v}return U.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return l}function Lv({routeContext:l,match:r,children:c}){let o=U.useContext(zr);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),U.createElement(On.Provider,{value:l},c)}function Bv(l,r=[],c=null,o=null,h=null){if(l==null){if(!c)return null;if(c.errors)l=c.matches;else if(r.length===0&&!c.initialized&&c.matches.length>0)l=c.matches;else return null}let f=l,v=c==null?void 0:c.errors;if(v!=null){let S=f.findIndex(T=>T.route.id&&(v==null?void 0:v[T.route.id])!==void 0);wt(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(v).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let N=!1,b=-1;if(c)for(let S=0;S<f.length;S++){let T=f[S];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(b=S),T.route.id){let{loaderData:j,errors:D}=c,C=T.route.loader&&!j.hasOwnProperty(T.route.id)&&(!D||D[T.route.id]===void 0);if(T.route.lazy||C){N=!0,b>=0?f=f.slice(0,b+1):f=[f[0]];break}}}let x=c&&o?(S,T)=>{var j,D;o(S,{location:c.location,params:((D=(j=c.matches)==null?void 0:j[0])==null?void 0:D.params)??{},unstable_pattern:jv(c.matches),errorInfo:T})}:void 0;return f.reduceRight((S,T,j)=>{let D,C=!1,M=null,R=null;c&&(D=v&&T.route.id?v[T.route.id]:void 0,M=T.route.errorElement||qv,N&&(b<0&&j===0?(px("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,R=null):b===j&&(C=!0,R=T.route.hydrateFallbackElement||null)));let I=r.concat(f.slice(0,j+1)),Y=()=>{let G;return D?G=M:C?G=R:T.route.Component?G=U.createElement(T.route.Component,null):T.route.element?G=T.route.element:G=S,U.createElement(Lv,{match:T,routeContext:{outlet:S,matches:I,isDataRoute:c!=null},children:G})};return c&&(T.route.ErrorBoundary||T.route.errorElement||j===0)?U.createElement(yx,{location:c.location,revalidation:c.revalidation,component:M,error:D,children:Y(),routeContext:{outlet:null,matches:I,isDataRoute:!0},onError:x}):Y()},null)}function Ff(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vv(l){let r=U.useContext(zr);return wt(r,Ff(l)),r}function Yv(l){let r=U.useContext(Kc);return wt(r,Ff(l)),r}function $v(l){let r=U.useContext(On);return wt(r,Ff(l)),r}function Gf(l){let r=$v(l),c=r.matches[r.matches.length-1];return wt(c.route.id,`${l} can only be used on routes that contain a unique "id"`),c.route.id}function Fv(){return Gf("useRouteId")}function Gv(){var o;let l=U.useContext(Yf),r=Yv("useRouteError"),c=Gf("useRouteError");return l!==void 0?l:(o=r.errors)==null?void 0:o[c]}function Pv(){let{router:l}=Vv("useNavigate"),r=Gf("useNavigate"),c=U.useRef(!1);return gx(()=>{c.current=!0}),U.useCallback(async(h,f={})=>{tn(c.current,mx),c.current&&(typeof h=="number"?await l.navigate(h):await l.navigate(h,{fromRouteId:r,...f}))},[l,r])}var fg={};function px(l,r,c){!r&&!fg[l]&&(fg[l]=!0,tn(!1,c))}U.memo(Zv);function Zv({routes:l,future:r,state:c,onError:o}){return xx(l,void 0,c,o,r)}function Wv({to:l,replace:r,state:c,relative:o}){wt(Ur(),"<Navigate> may be used only in the context of a <Router> component.");let{static:h}=U.useContext(Ya);tn(!h,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=U.useContext(On),{pathname:v}=Pl(),N=$f(),b=Vf(l,Bf(f),v,o==="path"),x=JSON.stringify(b);return U.useEffect(()=>{N(JSON.parse(x),{replace:r,state:c,relative:o})},[N,x,o,r,c]),null}function 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 Iv({basename:l="/",children:r=null,location:c,navigationType:o="POP",navigator:h,static:f=!1,unstable_useTransitions:v}){wt(!Ur(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let N=l.replace(/^\/*/,"/"),b=U.useMemo(()=>({basename:N,navigator:h,static:f,unstable_useTransitions:v,future:{}}),[N,h,f,v]);typeof c=="string"&&(c=qs(c));let{pathname:x="/",search:S="",hash:T="",state:j=null,key:D="default"}=c,C=U.useMemo(()=>{let M=ll(x,N);return M==null?null:{location:{pathname:M,search:S,hash:T,state:j,key:D},navigationType:o}},[N,x,S,T,j,D,o]);return tn(C!=null,`<Router basename="${N}"> is not able to match the URL "${x}${S}${T}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:U.createElement(Ya.Provider,{value:b},U.createElement(ru.Provider,{children:r,value:C}))}function Qv({children:l,location:r}){return zv(Of(l),r)}function Of(l,r=[]){let c=[];return U.Children.forEach(l,(o,h)=>{if(!U.isValidElement(o))return;let f=[...r,h];if(o.type===U.Fragment){c.push.apply(c,Of(o.props.children,f));return}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=Of(o.props.children,f)),c.push(v)}),c}var Yc="get",$c="application/x-www-form-urlencoded";function eo(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function Xv(l){return eo(l)&&l.tagName.toLowerCase()==="button"}function Jv(l){return eo(l)&&l.tagName.toLowerCase()==="form"}function Kv(l){return eo(l)&&l.tagName.toLowerCase()==="input"}function eb(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function tb(l,r){return l.button===0&&(!r||r==="_self")&&!eb(l)}var Uc=null;function ab(){if(Uc===null)try{new FormData(document.createElement("form"),0),Uc=!1}catch{Uc=!0}return Uc}var nb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vf(l){return l!=null&&!nb.has(l)?(tn(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${$c}"`),null):l}function lb(l,r){let c,o,h,f,v;if(Jv(l)){let N=l.getAttribute("action");o=N?ll(N,r):null,c=l.getAttribute("method")||Yc,h=vf(l.getAttribute("enctype"))||$c,f=new FormData(l)}else if(Xv(l)||Kv(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?ll(b,r):null,c=l.getAttribute("formmethod")||N.getAttribute("method")||Yc,h=vf(l.getAttribute("formenctype"))||vf(N.getAttribute("enctype"))||$c,f=new FormData(N,l),!ab()){let{name:x,type:S,value:T}=l;if(S==="image"){let j=x?`${x}.`:"";f.append(`${j}x`,"0"),f.append(`${j}y`,"0")}else x&&f.append(x,T)}}else{if(eo(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=Yc,o=null,h=$c,v=l}return f&&h==="text/plain"&&(v=f,f=void 0),{action:o,method:c.toLowerCase(),encType:h,formData:f,body:v}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Pf(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function sb(l,r,c,o){let h=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return c?h.pathname.endsWith("/")?h.pathname=`${h.pathname}_.${o}`:h.pathname=`${h.pathname}.${o}`:h.pathname==="/"?h.pathname=`_root.${o}`:r&&ll(h.pathname,r)==="/"?h.pathname=`${r.replace(/\/$/,"")}/_root.${o}`:h.pathname=`${h.pathname.replace(/\/$/,"")}.${o}`,h}async function rb(l,r){if(l.id in r)return r[l.id];try{let c=await import(l.module);return r[l.id]=c,c}catch(c){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ib(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 ub(l,r,c){let o=await Promise.all(l.map(async h=>{let f=r.routes[h.route.id];if(f){let v=await rb(f,c);return v.links?v.links():[]}return[]}));return fb(o.flat(1).filter(ib).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function hg(l,r,c,o,h,f){let v=(b,x)=>c[x]?b.route.id!==c[x].route.id:!0,N=(b,x)=>{var S;return c[x].pathname!==b.pathname||((S=c[x].route.path)==null?void 0:S.endsWith("*"))&&c[x].params["*"]!==b.params["*"]};return f==="assets"?r.filter((b,x)=>v(b,x)||N(b,x)):f==="data"?r.filter((b,x)=>{var T;let S=o.routes[b.route.id];if(!S||!S.hasLoader)return!1;if(v(b,x)||N(b,x))return!0;if(b.route.shouldRevalidate){let j=b.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:((T=c[0])==null?void 0:T.params)||{},nextUrl:new URL(l,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof j=="boolean")return j}return!0}):[]}function cb(l,r,{includeHydrateFallback:c}={}){return ob(l.map(o=>{let h=r.routes[o.route.id];if(!h)return[];let f=[h.module];return h.clientActionModule&&(f=f.concat(h.clientActionModule)),h.clientLoaderModule&&(f=f.concat(h.clientLoaderModule)),c&&h.hydrateFallbackModule&&(f=f.concat(h.hydrateFallbackModule)),h.imports&&(f=f.concat(h.imports)),f}).flat(1))}function ob(l){return[...new Set(l)]}function db(l){let r={},c=Object.keys(l).sort();for(let o of c)r[o]=l[o];return r}function fb(l,r){let c=new Set;return new Set(r),l.reduce((o,h)=>{let f=JSON.stringify(db(h));return c.has(f)||(c.add(f),o.push({key:f,link:h})),o},[])}function vx(){let l=U.useContext(zr);return Pf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function hb(){let l=U.useContext(Kc);return Pf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Zf=U.createContext(void 0);Zf.displayName="FrameworkContext";function bx(){let l=U.useContext(Zf);return Pf(l,"You must render this element inside a <HydratedRouter> element"),l}function mb(l,r){let c=U.useContext(Zf),[o,h]=U.useState(!1),[f,v]=U.useState(!1),{onFocus:N,onBlur:b,onMouseEnter:x,onMouseLeave:S,onTouchStart:T}=r,j=U.useRef(null);U.useEffect(()=>{if(l==="render"&&v(!0),l==="viewport"){let M=I=>{I.forEach(Y=>{v(Y.isIntersecting)})},R=new IntersectionObserver(M,{threshold:.5});return j.current&&R.observe(j.current),()=>{R.disconnect()}}},[l]),U.useEffect(()=>{if(o){let M=setTimeout(()=>{v(!0)},100);return()=>{clearTimeout(M)}}},[o]);let D=()=>{h(!0)},C=()=>{h(!1),v(!1)};return c?l!=="intent"?[f,j,{}]:[f,j,{onFocus:Yi(N,D),onBlur:Yi(b,C),onMouseEnter:Yi(x,D),onMouseLeave:Yi(S,C),onTouchStart:Yi(T,D)}]:[!1,j,{}]}function Yi(l,r){return c=>{l&&l(c),c.defaultPrevented||r(c)}}function gb({page:l,...r}){let{router:c}=vx(),o=U.useMemo(()=>rx(c.routes,l,c.basename),[c.routes,l,c.basename]);return o?U.createElement(yb,{page:l,matches:o,...r}):null}function xb(l){let{manifest:r,routeModules:c}=bx(),[o,h]=U.useState([]);return U.useEffect(()=>{let f=!1;return ub(l,r,c).then(v=>{f||h(v)}),()=>{f=!0}},[l,r,c]),o}function yb({page:l,matches:r,...c}){let o=Pl(),{future:h,manifest:f,routeModules:v}=bx(),{basename:N}=vx(),{loaderData:b,matches:x}=hb(),S=U.useMemo(()=>hg(l,r,x,f,o,"data"),[l,r,x,f,o]),T=U.useMemo(()=>hg(l,r,x,f,o,"assets"),[l,r,x,f,o]),j=U.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let M=new Set,R=!1;if(r.forEach(Y=>{var ee;let G=f.routes[Y.route.id];!G||!G.hasLoader||(!S.some(de=>de.route.id===Y.route.id)&&Y.route.id in b&&((ee=v[Y.route.id])!=null&&ee.shouldRevalidate)||G.hasClientLoader?R=!0:M.add(Y.route.id))}),M.size===0)return[];let I=sb(l,N,h.unstable_trailingSlashAwareDataRequests,"data");return R&&M.size>0&&I.searchParams.set("_routes",r.filter(Y=>M.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[I.pathname+I.search]},[N,h.unstable_trailingSlashAwareDataRequests,b,o,f,S,r,l,v]),D=U.useMemo(()=>cb(T,f),[T,f]),C=xb(T);return U.createElement(U.Fragment,null,j.map(M=>U.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...c})),D.map(M=>U.createElement("link",{key:M,rel:"modulepreload",href:M,...c})),C.map(({key:M,link:R})=>U.createElement("link",{key:M,nonce:c.nonce,...R,crossOrigin:R.crossOrigin??c.crossOrigin})))}function pb(...l){return r=>{l.forEach(c=>{typeof c=="function"?c(r):c!=null&&(c.current=r)})}}var vb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vb&&(window.__reactRouterVersion="7.13.0")}catch{}function bb({basename:l,children:r,unstable_useTransitions:c,window:o}){let h=U.useRef();h.current==null&&(h.current=Kp({window:o,v5Compat:!0}));let f=h.current,[v,N]=U.useState({action:f.action,location:f.location}),b=U.useCallback(x=>{c===!1?N(x):U.startTransition(()=>N(x))},[c]);return U.useLayoutEffect(()=>f.listen(b),[f,b]),U.createElement(Iv,{basename:l,children:r,location:v.location,navigationType:v.action,navigator:f,unstable_useTransitions:c})}var Sx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nx=U.forwardRef(function({onClick:r,discover:c="render",prefetch:o="none",relative:h,reloadDocument:f,replace:v,state:N,target:b,to:x,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:j,...D},C){let{basename:M,unstable_useTransitions:R}=U.useContext(Ya),I=typeof x=="string"&&Sx.test(x),Y=ox(x,M);x=Y.to;let G=kv(x,{relative:h}),[ee,de,Z]=mb(o,D),P=wb(x,{replace:v,state:N,target:b,preventScrollReset:S,relative:h,viewTransition:T,unstable_defaultShouldRevalidate:j,unstable_useTransitions:R});function W(z){r&&r(z),z.defaultPrevented||P(z)}let ne=U.createElement("a",{...D,...Z,href:Y.absoluteURL||G,onClick:Y.isExternal||f?r:W,ref:pb(C,de),target:b,"data-discover":!I&&c==="render"?"true":void 0});return ee&&!I?U.createElement(U.Fragment,null,ne,U.createElement(gb,{page:G})):ne});Nx.displayName="Link";var wx=U.forwardRef(function({"aria-current":r="page",caseSensitive:c=!1,className:o="",end:h=!1,style:f,to:v,viewTransition:N,children:b,...x},S){let T=iu(v,{relative:x.relative}),j=Pl(),D=U.useContext(Kc),{navigator:C,basename:M}=U.useContext(Ya),R=D!=null&&Cb(T)&&N===!0,I=C.encodeLocation?C.encodeLocation(T).pathname:T.pathname,Y=j.pathname,G=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;c||(Y=Y.toLowerCase(),G=G?G.toLowerCase():null,I=I.toLowerCase()),G&&M&&(G=ll(G,M)||G);const ee=I!=="/"&&I.endsWith("/")?I.length-1:I.length;let de=Y===I||!h&&Y.startsWith(I)&&Y.charAt(ee)==="/",Z=G!=null&&(G===I||!h&&G.startsWith(I)&&G.charAt(I.length)==="/"),P={isActive:de,isPending:Z,isTransitioning:R},W=de?r:void 0,ne;typeof o=="function"?ne=o(P):ne=[o,de?"active":null,Z?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let z=typeof f=="function"?f(P):f;return U.createElement(Nx,{...x,"aria-current":W,className:ne,ref:S,style:z,to:v,viewTransition:N},typeof b=="function"?b(P):b)});wx.displayName="NavLink";var Sb=U.forwardRef(({discover:l="render",fetcherKey:r,navigate:c,reloadDocument:o,replace:h,state:f,method:v=Yc,action:N,onSubmit:b,relative:x,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:j,...D},C)=>{let{unstable_useTransitions:M}=U.useContext(Ya),R=Tb(),I=Mb(N,{relative:x}),Y=v.toLowerCase()==="get"?"get":"post",G=typeof N=="string"&&Sx.test(N),ee=de=>{if(b&&b(de),de.defaultPrevented)return;de.preventDefault();let Z=de.nativeEvent.submitter,P=(Z==null?void 0:Z.getAttribute("formmethod"))||v,W=()=>R(Z||de.currentTarget,{fetcherKey:r,method:P,navigate:c,replace:h,state:f,relative:x,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:j});M&&c!==!1?U.startTransition(()=>W()):W()};return U.createElement("form",{ref:C,method:Y,action:I,onSubmit:o?b:ee,...D,"data-discover":!G&&l==="render"?"true":void 0})});Sb.displayName="Form";function Nb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jx(l){let r=U.useContext(zr);return wt(r,Nb(l)),r}function wb(l,{target:r,replace:c,state:o,preventScrollReset:h,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:N,unstable_useTransitions:b}={}){let x=$f(),S=Pl(),T=iu(l,{relative:f});return U.useCallback(j=>{if(tb(j,r)){j.preventDefault();let D=c!==void 0?c:nu(S)===nu(T),C=()=>x(l,{replace:D,state:o,preventScrollReset:h,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:N});b?U.startTransition(()=>C()):C()}},[S,x,T,c,o,r,l,h,f,v,N,b])}var jb=0,Eb=()=>`__${String(++jb)}__`;function Tb(){let{router:l}=jx("useSubmit"),{basename:r}=U.useContext(Ya),c=Fv(),o=l.fetch,h=l.navigate;return U.useCallback(async(f,v={})=>{let{action:N,method:b,encType:x,formData:S,body:T}=lb(f,r);if(v.navigate===!1){let j=v.fetcherKey||Eb();await o(j,c,v.action||N,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:S,body:T,formMethod:v.method||b,formEncType:v.encType||x,flushSync:v.flushSync})}else await h(v.action||N,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:S,body:T,formMethod:v.method||b,formEncType:v.encType||x,replace:v.replace,state:v.state,fromRouteId:c,flushSync:v.flushSync,viewTransition:v.viewTransition})},[o,h,r,c])}function Mb(l,{relative:r}={}){let{basename:c}=U.useContext(Ya),o=U.useContext(On);wt(o,"useFormAction must be used inside a RouteContext");let[h]=o.matches.slice(-1),f={...iu(l||".",{relative:r})},v=Pl();if(l==null){f.search=v.search;let N=new URLSearchParams(f.search),b=N.getAll("index");if(b.some(S=>S==="")){N.delete("index"),b.filter(T=>T).forEach(T=>N.append("index",T));let S=N.toString();f.search=S?`?${S}`:""}}return(!l||l===".")&&h.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(f.pathname=f.pathname==="/"?c:nl([c,f.pathname])),nu(f)}function Cb(l,{relative:r}={}){let c=U.useContext(fx);wt(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=jx("useViewTransitionState"),h=iu(l,{relative:r});if(!c.isTransitioning)return!1;let f=ll(c.currentLocation.pathname,o)||c.currentLocation.pathname,v=ll(c.nextLocation.pathname,o)||c.nextLocation.pathname;return Gc(h.pathname,v)!=null||Gc(h.pathname,f)!=null}var Ob=sx();const Db=Hf(Ob);/**
|
|
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 Ex=(...l)=>l.filter((r,c,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===c).join(" ").trim();/**
|
|
66
|
-
* @license lucide-react v0.564.0 - ISC
|
|
67
|
-
*
|
|
68
|
-
* This source code is licensed under the ISC license.
|
|
69
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const Rb=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 Ab=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,c,o)=>o?o.toUpperCase():c.toLowerCase());/**
|
|
76
|
-
* @license lucide-react v0.564.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const mg=l=>{const r=Ab(l);return r.charAt(0).toUpperCase()+r.slice(1)};/**
|
|
81
|
-
* @license lucide-react v0.564.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the ISC license.
|
|
84
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/var kb={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 _b=l=>{for(const r in l)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};/**
|
|
91
|
-
* @license lucide-react v0.564.0 - ISC
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the ISC license.
|
|
94
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const zb=U.forwardRef(({color:l="currentColor",size:r=24,strokeWidth:c=2,absoluteStrokeWidth:o,className:h="",children:f,iconNode:v,...N},b)=>U.createElement("svg",{ref:b,...kb,width:r,height:r,stroke:l,strokeWidth:o?Number(c)*24/Number(r):c,className:Ex("lucide",h),...!f&&!_b(N)&&{"aria-hidden":"true"},...N},[...v.map(([x,S])=>U.createElement(x,S)),...Array.isArray(f)?f:[f]]));/**
|
|
96
|
-
* @license lucide-react v0.564.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const Ue=(l,r)=>{const c=U.forwardRef(({className:o,...h},f)=>U.createElement(zb,{ref:f,iconNode:r,className:Ex(`lucide-${Rb(mg(l))}`,`lucide-${l}`,o),...h}));return c.displayName=mg(l),c};/**
|
|
101
|
-
* @license lucide-react v0.564.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const Ub=[["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"}]],Tx=Ue("activity",Ub);/**
|
|
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 qb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Hb=Ue("arrow-down",qb);/**
|
|
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 Lb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],gg=Ue("arrow-right",Lb);/**
|
|
116
|
-
* @license lucide-react v0.564.0 - ISC
|
|
117
|
-
*
|
|
118
|
-
* This source code is licensed under the ISC license.
|
|
119
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const Bb=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Vb=Ue("arrow-up-down",Bb);/**
|
|
121
|
-
* @license lucide-react v0.564.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const Yb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],$b=Ue("arrow-up",Yb);/**
|
|
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 Fb=[["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"}]],Gb=Ue("bell",Fb);/**
|
|
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 Pb=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],xg=Ue("briefcase",Pb);/**
|
|
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 Zb=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Wf=Ue("calendar",Zb);/**
|
|
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 Wb=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Ib=Ue("chart-no-axes-column",Wb);/**
|
|
146
|
-
* @license lucide-react v0.564.0 - ISC
|
|
147
|
-
*
|
|
148
|
-
* This source code is licensed under the ISC license.
|
|
149
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const Qb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Fc=Ue("check",Qb);/**
|
|
151
|
-
* @license lucide-react v0.564.0 - ISC
|
|
152
|
-
*
|
|
153
|
-
* This source code is licensed under the ISC license.
|
|
154
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const Xb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Mx=Ue("chevron-down",Xb);/**
|
|
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 Jb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Kb=Ue("chevron-left",Jb);/**
|
|
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 e1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],t1=Ue("chevron-right",e1);/**
|
|
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 a1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],n1=Ue("chevron-up",a1);/**
|
|
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 l1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],s1=Ue("chevrons-up-down",l1);/**
|
|
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 r1=[["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"}]],sl=Ue("circle-alert",r1);/**
|
|
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 i1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]],yg=Ue("circle-arrow-down",i1);/**
|
|
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 u1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],uu=Ue("circle-check-big",u1);/**
|
|
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 c1=[["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"}]],o1=Ue("circle-x",c1);/**
|
|
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 d1=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],pg=Ue("clipboard-list",d1);/**
|
|
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 f1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Pc=Ue("clock",f1);/**
|
|
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 h1=[["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"}]],Cx=Ue("external-link",h1);/**
|
|
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 m1=[["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"}]],g1=Ue("eye-off",m1);/**
|
|
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 x1=[["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"}]],y1=Ue("eye",x1);/**
|
|
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 p1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Df=Ue("file-text",p1);/**
|
|
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 v1=[["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"}]],b1=Ue("git-pull-request",v1);/**
|
|
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 S1=[["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"}]],N1=Ue("globe",S1);/**
|
|
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 w1=[["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"}]],j1=Ue("house",w1);/**
|
|
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 E1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],T1=Ue("info",E1);/**
|
|
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 M1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],C1=Ue("kanban",M1);/**
|
|
251
|
-
* @license lucide-react v0.564.0 - ISC
|
|
252
|
-
*
|
|
253
|
-
* This source code is licensed under the ISC license.
|
|
254
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/const O1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ox=Ue("loader-circle",O1);/**
|
|
256
|
-
* @license lucide-react v0.564.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/const D1=[["path",{d:"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"}]],Dx=Ue("map",D1);/**
|
|
261
|
-
* @license lucide-react v0.564.0 - ISC
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the ISC license.
|
|
264
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/const R1=[["path",{d:"M5 12h14",key:"1ays0h"}]],A1=Ue("minus",R1);/**
|
|
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 k1=[["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"}]],Rx=Ue("pause",k1);/**
|
|
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 _1=[["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"}]],to=Ue("pen",_1);/**
|
|
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 z1=[["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=Ue("play",z1);/**
|
|
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 U1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Zl=Ue("plus",U1);/**
|
|
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 q1=[["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"}]],Ax=Ue("rotate-ccw",q1);/**
|
|
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 H1=[["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"}]],L1=Ue("save",H1);/**
|
|
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 B1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ao=Ue("search",B1);/**
|
|
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 V1=[["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"}]],Y1=Ue("settings",V1);/**
|
|
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 $1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],vg=Ue("square",$1);/**
|
|
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 F1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],G1=Ue("terminal",F1);/**
|
|
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 P1=[["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"}]],Z1=Ue("test-tube-diagonal",P1);/**
|
|
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 W1=[["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"}]],qr=Ue("trash-2",W1);/**
|
|
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 I1=[["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"}]],lu=Ue("triangle-alert",I1);/**
|
|
331
|
-
* @license lucide-react v0.564.0 - ISC
|
|
332
|
-
*
|
|
333
|
-
* This source code is licensed under the ISC license.
|
|
334
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
-
*/const Q1=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],X1=Ue("wifi",Q1);/**
|
|
336
|
-
* @license lucide-react v0.564.0 - ISC
|
|
337
|
-
*
|
|
338
|
-
* This source code is licensed under the ISC license.
|
|
339
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/const J1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hr=Ue("x",J1);/**
|
|
341
|
-
* @license lucide-react v0.564.0 - ISC
|
|
342
|
-
*
|
|
343
|
-
* This source code is licensed under the ISC license.
|
|
344
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
-
*/const K1=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],eS=Ue("zap",K1),kx=[{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"}}],_x=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"},triggerEndpoint:"/api/actions/run",scheduleTemplateKey:"executor",getEnabled:l=>l.executorEnabled??!0,getSchedule:l=>l.cronSchedule??"5 */2 * * *",settingsSection:"general",buildEnabledPatch:l=>({executorEnabled:l})},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"},triggerEndpoint:"/api/actions/review",scheduleTemplateKey:"reviewer",getEnabled:l=>l.reviewerEnabled??!0,getSchedule:l=>l.reviewerSchedule??"25 */3 * * *",settingsSection:"general",buildEnabledPatch:l=>({reviewerEnabled:l})},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"},triggerEndpoint:"/api/actions/qa",scheduleTemplateKey:"qa",getEnabled:l=>{var r;return((r=l.qa)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.qa)==null?void 0:r.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(l,r)=>({qa:{...r.qa??{},enabled:l}})},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"},triggerEndpoint:"/api/actions/audit",scheduleTemplateKey:"audit",getEnabled:l=>{var r;return((r=l.audit)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.audit)==null?void 0:r.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({audit:{...r.audit??{},enabled:l}})},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"},triggerEndpoint:"/api/actions/planner",scheduleTemplateKey:"slicer",getEnabled:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({roadmapScanner:{...r.roadmapScanner??{},enabled:l}})},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"},triggerEndpoint:"/api/actions/analytics",scheduleTemplateKey:"analytics",getEnabled:l=>{var r;return((r=l.analytics)==null?void 0:r.enabled)??!1},getSchedule:l=>{var r;return((r=l.analytics)==null?void 0:r.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({analytics:{...r.analytics??{},enabled:l}})}];function zx(l){return _x.find(r=>r.id===l)}const If="";let Qf=!1,Zc=null;function tS(l){Qf=l}function bg(l){Zc=l}function aS(){return Qf}function Xf(l){return encodeURIComponent(l.replace(/\//g,"~"))}function pt(l){return Qf&&Zc?l.replace("/api/",`/api/projects/${Xf(Zc)}/`):l}function nS(){return lt("/api/mode")}function Ux(){return lt("/api/projects")}function lS(l){const r=Xf(l);return lt(`/api/projects/${r}`,{method:"DELETE"})}async function lt(l,r){const c=`${If}${l}`,o=await fetch(c,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!o.ok){const h=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(h.error||`HTTP ${o.status}: ${o.statusText}`)}return o.json()}function bf(){return lt(pt("/api/status"))}function qx(){return lt(pt("/api/prs"))}function sS(l,r){const c=`?lines=${encodeURIComponent(r)}`;return lt(pt(`/api/logs/${encodeURIComponent(l)}${c}`))}function Jf(){return lt(pt("/api/config"))}async function Hx(){if(aS()){const r=(await Ux()).filter(o=>o.valid);return(await Promise.all(r.map(async o=>{try{const h=await lt(`/api/projects/${Xf(o.name)}/config`);return{projectId:o.name,config:h}}catch(h){return console.error(`Failed to fetch config for project ${o.name}`,h),null}}))).filter(o=>o!==null)}else{const l=await Jf();return[{projectId:Zc||"current",config:l}]}}function Wc(l){return lt(pt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function rS(){return lt(pt("/api/doctor"))}function Lx(){return lt(pt("/api/schedule-info"))}function iS(){return lt(pt("/api/actions/run"),{method:"POST"})}function Bx(){return lt(pt("/api/actions/review"),{method:"POST"})}function uS(){return lt(pt("/api/actions/qa"),{method:"POST"})}function cS(){return lt(pt("/api/actions/audit"),{method:"POST"})}function oS(){return lt(pt("/api/actions/analytics"),{method:"POST"})}function dS(){return lt(pt("/api/actions/planner"),{method:"POST"})}function fS(l){const r=zx(l);return r?lt(pt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${l}`))}function au(){return lt(pt("/api/actions/install-cron"),{method:"POST"})}function hS(){return lt(pt("/api/actions/uninstall-cron"),{method:"POST"})}function mS(l="all"){return lt(pt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Gl=["Draft","Ready","In Progress","Review","Done"];function Vx(){return lt(pt("/api/board/status"))}function gS(l){return lt(pt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function Yx(l,r){return lt(pt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function xS(l){const r=`${If}${pt(`/api/board/issues/${l}`)}`,c=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!c.ok){const o=await c.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error||`HTTP ${c.status}: ${c.statusText}`)}}function yS(){return lt(pt("/api/actions/clear-lock"),{method:"POST"})}function pS(l,r=[],c){const o=(c==null?void 0:c.enabled)??!0,h=U.useRef(l);h.current=l,U.useEffect(()=>{if(!o)return;const f=`${If}${pt("/api/status/events")}`,v=new EventSource(f);return v.addEventListener("status_changed",N=>{try{const b=JSON.parse(N.data);h.current(b)}catch{}}),()=>{v.close()}},[o,...r])}function vS(){return lt("/api/queue/status")}function bS(l){const r=`?window=${encodeURIComponent(l)}`;return lt(`/api/queue/analytics${r}`)}function SS(){return lt("/api/global-notifications")}function Sg(l){return lt("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function NS(){return lt(pt("/api/roadmap"))}function wS(){return lt(pt("/api/roadmap/scan"),{method:"POST"})}function $x(l){return lt(pt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function yn(l,r=[],c){const o=(c==null?void 0:c.enabled)??!0,[h,f]=U.useState(null),[v,N]=U.useState(!0),[b,x]=U.useState(null),S=U.useRef(l);S.current=l;const T=U.useRef(()=>{(async()=>{x(null);try{const D=await S.current();f(D)}catch(D){x(D instanceof Error?D:new Error("Unknown error"))}})()});return U.useEffect(()=>{if(!o)return;let j=!1;return N(!0),x(null),(async()=>{try{const C=await S.current();j||f(C)}catch(C){j||x(C instanceof Error?C:new Error("Unknown error"))}finally{j||N(!1)}})(),()=>{j=!0}},[...r,o]),{data:h,loading:v,error:b,refetch:T.current}}const Ng=l=>{let r;const c=new Set,o=(x,S)=>{const T=typeof x=="function"?x(r):x;if(!Object.is(T,r)){const j=r;r=S??(typeof T!="object"||T===null)?T:Object.assign({},r,T),c.forEach(D=>D(r,j))}},h=()=>r,N={setState:o,getState:h,getInitialState:()=>b,subscribe:x=>(c.add(x),()=>c.delete(x))},b=r=l(o,h,N);return N},jS=l=>l?Ng(l):Ng,ES=l=>l;function TS(l,r=ES){const c=qe.useSyncExternalStore(l.subscribe,()=>r(l.getState()),()=>r(l.getInitialState()));return qe.useDebugValue(c),c}const wg=l=>{const r=jS(l),c=o=>TS(r,o);return Object.assign(c,r),c},MS=l=>l?wg(l):wg,CS=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Jt=MS((l,r)=>({projectName:"Night Watch",setProjectName:c=>l({projectName:c}),toasts:[],addToast:c=>{const o=Math.random().toString(36).substring(7);l(h=>({toasts:[...h.toasts,{...c,id:o}]})),setTimeout(()=>{l(h=>({toasts:h.toasts.filter(f=>f.id!==o)}))},5e3)},removeToast:c=>l(o=>({toasts:o.toasts.filter(h=>h.id!==c)})),status:null,setStatus:c=>l(o=>!o.status||new Date(c.timestamp)>new Date(o.status.timestamp)?{status:c}:o),globalModeLoading:!0,setGlobalModeLoading:c=>l({globalModeLoading:c}),isGlobalMode:!1,setGlobalMode:c=>{tS(c),l({isGlobalMode:c})},projects:[],setProjects:c=>l({projects:c}),selectedProjectId:CS,selectProject:c=>{bg(c),c?localStorage.setItem("nw-selected-project",c):localStorage.removeItem("nw-selected-project"),l(o=>{const h=o.projects.find(f=>f.name===c);return{selectedProjectId:c,...h?{projectName:h.name}:{}}})},removeProjectFromList:c=>{l(o=>{var N;const h=o.projects.filter(b=>b.name!==c),f=o.selectedProjectId===c,v=f?((N=h[0])==null?void 0:N.name)??null:o.selectedProjectId;return f&&(bg(v),v?localStorage.setItem("nw-selected-project",v):localStorage.removeItem("nw-selected-project")),{projects:h,selectedProjectId:v,...f&&h[0]?{projectName:h[0].name}:{}}})},getJobStates:()=>{const{status:c}=r(),o=c==null?void 0:c.config;return _x.map(h=>({id:h.id,label:h.label,processName:h.processName,color:h.color,enabled:o?h.getEnabled(o):!0,schedule:o?h.getSchedule(o):"",triggerEndpoint:h.triggerEndpoint}))}})),OS=()=>{const[l,r]=U.useState(!1),{projectName:c,isGlobalMode:o,projects:h,selectedProjectId:f,selectProject:v,globalModeLoading:N}=Jt(),{data:b}=yn(qx,[f],{enabled:!N}),x=(b==null?void 0:b.length)??0,S=U.useMemo(()=>[{icon:j1,label:"Dashboard",path:"/",section:"Overview"},{icon:G1,label:"Logs",path:"/logs"},{icon:C1,label:"Board",path:"/board",section:"Work"},{icon:b1,label:"Pull Requests",path:"/prs",badge:x},{icon:Dx,label:"Roadmap",path:"/roadmap"},{icon:Wf,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:Y1,label:"Settings",path:"/settings",section:"Config"}],[x]);return s.jsxs("aside",{className:`
|
|
346
|
-
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
347
|
-
${l?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
348
|
-
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
349
|
-
`,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${l?"items-center justify-center flex":""}`,children:l?s.jsx("div",{className:"relative group",children:s.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:o?"Projects":"Workspace"}),o?s.jsxs("div",{className:"relative",children:[s.jsx(xg,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),s.jsx("select",{value:f||"",onChange:T=>v(T.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:h.filter(T=>T.valid).map(T=>s.jsx("option",{value:T.name,children:T.name},T.name))}),s.jsx(s1,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):s.jsxs("div",{className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 px-3.5 text-sm font-medium shadow-sm flex items-center",children:[s.jsx(xg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:c})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:S.map(T=>s.jsxs(qe.Fragment,{children:[T.section&&!l&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:T.section}),s.jsx("li",{children:s.jsx(wx,{to:T.path,className:({isActive:j})=>`
|
|
350
|
-
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
351
|
-
${j?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
|
|
352
|
-
${l?"justify-center":""}
|
|
353
|
-
`,children:({isActive:j})=>s.jsxs(s.Fragment,{children:[s.jsx(T.icon,{className:`h-5 w-5 transition-colors ${j?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${l?"":"mr-3.5"}`}),!l&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:T.label}),T.badge&&(l?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${j?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:T.badge})),j&&!l&&s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),l&&s.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:T.label})]})})})]},T.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>r(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(t1,{className:"h-5 w-5"}):s.jsx(Kb,{className:"h-5 w-5"})})})]})},DS=()=>{const{projectName:l}=Jt();return s.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[s.jsxs("div",{className:"flex items-center space-x-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),s.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:l})]}),s.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),s.jsxs("div",{className:"flex items-center space-x-2 text-xs font-medium px-3 py-1.5 rounded-full border transition-colors bg-emerald-500/5 text-emerald-400 border-emerald-500/20 shadow-[0_0_10px_-4px_rgba(16,185,129,0.3)]",children:[s.jsx(X1,{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(ao,{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(Gb,{className:"h-5 w-5"}),s.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]})}),s.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-600 ring-2 ring-white/10 flex items-center justify-center text-white font-bold text-xs shadow-lg",children:"AD"})]})]})},RS=({toast:l,onDismiss:r})=>{const c={success:s.jsx(uu,{className:"h-5 w-5 text-green-400"}),error:s.jsx(sl,{className:"h-5 w-5 text-red-400"}),info:s.jsx(T1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(lu,{className:"h-5 w-5 text-amber-400"})},o={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
|
|
354
|
-
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
355
|
-
bg-slate-900 border border-slate-800 border-l-4 ${o[l.type]}
|
|
356
|
-
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
357
|
-
animate-in slide-in-from-right-full fade-in duration-300
|
|
358
|
-
`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:c[l.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:l.title}),l.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:l.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>r(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Hr,{className:"h-5 w-5"})]})})]})})})},AS=()=>{const{toasts:l,removeToast:r}=Jt();return s.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:l.map(c=>s.jsx(RS,{toast:c,onDismiss:r},c.id))})};function kS(){const{setGlobalMode:l,setGlobalModeLoading:r,setProjects:c,selectProject:o,selectedProjectId:h}=Jt();U.useEffect(()=>{r(!0),nS().then(async({globalMode:f})=>{if(l(f),!f)return;const v=await Ux();c(v);const N=v.filter(b=>b.valid);h&&N.some(b=>b.name===h)?o(h):N.length>0&&o(N[0].name)}).catch(()=>{l(!1)}).finally(()=>{r(!1)})},[])}function jg(l){if(!(l!=null&&l.timestamp))return Number.NEGATIVE_INFINITY;const r=new Date(l.timestamp).getTime();return Number.isNaN(r)?Number.NEGATIVE_INFINITY:r}function qc(l,r){return l?r?jg(l)>=jg(r)?l:r:l:r}function _S(){const{setStatus:l,setProjectName:r,selectedProjectId:c,globalModeLoading:o,status:h}=Jt(),f=U.useRef(null);f.current=Jt.getState().status,pS(v=>{qc(v,f.current)===v&&l(v)},[c,o],{enabled:!o}),U.useEffect(()=>{if(o)return;bf().then(N=>{qc(N,f.current)===N&&l(N)}).catch(()=>{});const v=setInterval(()=>{bf().then(N=>{qc(N,f.current)===N&&l(N)}).catch(()=>{})},3e4);return()=>clearInterval(v)},[c,o,l]),U.useEffect(()=>{const v=()=>{bf().then(N=>{qc(N,f.current)===N&&l(N)}).catch(()=>{})};return window.addEventListener("focus",v),()=>window.removeEventListener("focus",v)},[c,l]),U.useEffect(()=>{h!=null&&h.projectName&&r(h.projectName)},[h==null?void 0:h.projectName,r])}const Je=({children:l,className:r="",onClick:c})=>s.jsxs("div",{className:`
|
|
359
|
-
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
360
|
-
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
361
|
-
transition-all duration-300
|
|
362
|
-
${c?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
363
|
-
${r}
|
|
364
|
-
`,onClick:c,children:[c&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:l})]}),Fe=({children:l,variant:r="primary",size:c="md",loading:o=!1,className:h="",disabled:f,...v})=>{const N="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",b={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},x={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${N} ${b[r]} ${x[c]} ${h}`,disabled:f||o,...v,children:[o&&s.jsx(Ox,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},Ar=({children:l,variant:r="default",className:c=""})=>{const o={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${o[r]} ${c}`,children:l})},Fx={Draft:{dot:"bg-slate-500",badge:"neutral"},Ready:{dot:"bg-green-500",badge:"success"},"In Progress":{dot:"bg-blue-500",badge:"info"},Review:{dot:"bg-amber-500",badge:"warning"},Done:{dot:"bg-slate-600",badge:"neutral"}},zS=({defaultColumn:l,onClose:r,onCreated:c})=>{const[o,h]=U.useState(""),[f,v]=U.useState(""),[N,b]=U.useState(l),[x,S]=U.useState(!1),[T,j]=U.useState(null),{addToast:D}=Jt(),C=async M=>{if(M.preventDefault(),!!o.trim()){S(!0),j(null);try{await gS({title:o.trim(),body:f,column:N}),D({title:"Issue created",message:`"${o.trim()}" added to ${N}`,type:"success"}),c(),r()}catch(R){j(R instanceof Error?R.message:"Failed to create issue")}finally{S(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(Hr,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:C,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:o,onChange:M=>h(M.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:N,onChange:M=>b(M.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Gl.map(M=>s.jsx("option",{value:M,children:M},M))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:f,onChange:M=>v(M.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),T&&s.jsx("p",{className:"text-sm text-red-400",children:T}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Fe,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Fe,{type:"submit",disabled:x||!o.trim(),children:x?"Creating...":"Create Issue"})]})]})]})]})},US=({issue:l,onClose:r,onMoved:c,onClosed:o})=>{const[h,f]=U.useState(!1),[v,N]=U.useState(!1),[b,x]=U.useState(!1),{addToast:S}=Jt(),T=async C=>{if(C!==l.column){f(!0);try{await Yx(l.number,C),S({title:"Issue moved",message:`#${l.number} moved to ${C}`,type:"success"}),c(),r()}catch(M){S({title:"Move failed",message:M instanceof Error?M.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},j=async()=>{x(!1),N(!0);try{await xS(l.number),S({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),o(),r()}catch(C){S({title:"Close failed",message:C instanceof Error?C.message:"Failed to close issue",type:"error"})}finally{N(!1)}},D=l.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",l.number]}),s.jsx(Ar,{variant:Fx[D].badge,children:D})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:l.title}),l.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",l.assignees.join(", ")]})]}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:s.jsx(Hr,{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:"}),Gl.filter(C=>C!==l.column).map(C=>s.jsx("button",{onClick:()=>T(C),disabled:h,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:C},C))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[l.url&&!l.url.startsWith("local://")&&s.jsxs("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(Cx,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>x(!0),disabled:v,className:"text-xs px-2.5 py-1 rounded-md bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20 transition-colors disabled:opacity-50",children:v?"Closing...":"Close Issue"})]})]}),b&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>x(!1)}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border border-white/10 rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-100 mb-2",children:"Close issue?"}),s.jsxs("p",{className:"text-sm text-slate-400 mb-4",children:["Close issue #",l.number,': "',l.title,'"?']}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx(Fe,{variant:"ghost",onClick:()=>x(!1),children:"Cancel"}),s.jsx(Fe,{onClick:j,children:"Confirm"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:l.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},qS=({issue:l,onClick:r,onDragStart:c})=>{const[o,h]=U.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(l.number)),f.dataTransfer.effectAllowed="move",h(!0),c(l)},onDragEnd:()=>h(!1),children:s.jsxs(Je,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${o?"opacity-30":""}`,onClick:r,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",l.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:l.title}),l.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:l.assignees.join(", ")})]})})},HS=({name:l,issues:r,draggingIssue:c,onIssueClick:o,onNewIssue:h,onMoveIssue:f,onDragStart:v})=>{const N=Fx[l],[b,x]=U.useState(!1),S=c!==null&&c.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${b&&S?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:T=>{S&&(T.preventDefault(),T.dataTransfer.dropEffect="move",x(!0))},onDragLeave:()=>x(!1),onDrop:T=>{T.preventDefault(),x(!1),c&&c.column!==l&&f(c,l)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${N.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:l}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:r.length})]}),s.jsx("button",{onClick:()=>h(l),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${l}`,children:s.jsx(Zl,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:r.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${b&&S?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:b&&S?"Drop here":"No issues"})}):r.map(T=>s.jsx(qS,{issue:T,onClick:()=>o(T),onDragStart:v},T.id))})]})},LS=()=>{const[l,r]=U.useState(null),[c,o]=U.useState(null),[h,f]=U.useState(null),[v,N]=U.useState(null),b=U.useRef(!1),{addToast:x,selectedProjectId:S,globalModeLoading:T}=Jt(),{data:j,loading:D,error:C,refetch:M}=yn(Vx,[S],{enabled:!T});U.useEffect(()=>{const Y=setInterval(()=>{b.current||M()},3e4);return()=>clearInterval(Y)},[M]);const R=U.useCallback(async(Y,G)=>{f(null);const ee=v??(j==null?void 0:j.columns);if(!ee)return;const de=ee,Z={};for(const W of Gl)Z[W]=(ee[W]??[]).filter(ne=>ne.number!==Y.number);const P={...Y,column:G};Z[G]=[...Z[G]??[],P],N(Z),r(W=>(W==null?void 0:W.number)===Y.number?P:W),b.current=!0;try{await Yx(Y.number,G),M(),setTimeout(()=>{N(null),b.current=!1},800)}catch(W){N(de),r(ne=>(ne==null?void 0:ne.number)===Y.number?Y:ne),b.current=!1,x({title:"Move failed",message:W instanceof Error?W.message:"Failed to move issue",type:"error"})}},[x,M,v,j]);if(T||D)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(C&&C.message.includes("Board not configured"))return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-4xl",children:"📋"}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),s.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",s.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(C)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),s.jsx("div",{className:"text-sm text-slate-500",children:C.message}),s.jsx(Fe,{onClick:()=>M(),children:"Retry"})]});if(!j)return null;const I=v??j.columns;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),s.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[Gl.reduce((Y,G)=>{var ee;return Y+(((ee=I[G])==null?void 0:ee.length)??0)},0)," issues across ",Gl.length," columns"]})]}),s.jsxs(Fe,{onClick:()=>o("Ready"),children:[s.jsx(Zl,{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:`${Gl.length*236}px`},children:Gl.map(Y=>s.jsx(HS,{name:Y,issues:I[Y]??[],draggingIssue:h,onIssueClick:r,onNewIssue:o,onMoveIssue:R,onDragStart:f},Y))})}),l&&s.jsx(US,{issue:l,onClose:()=>r(null),onMoved:()=>M(),onClosed:()=>M()}),c&&s.jsx(zS,{defaultColumn:c,onClose:()=>o(null),onCreated:()=>M()})]})},BS=[{name:"executor",displayName:"Executor",processName:"executor",triggerId:"executor",cancelType:"run",runningLabel:"Running",idleLabel:"Idle"},{name:"reviewer",displayName:"Reviewer",processName:"reviewer",triggerId:"reviewer",cancelType:"review",runningLabel:"Running",idleLabel:"Idle"},{name:"qa",displayName:"QA",processName:"qa",triggerId:"qa",runningLabel:"Running",idleLabel:"Idle"},{name:"auditor",displayName:"Auditor",processName:"audit",triggerId:"audit",runningLabel:"Running",idleLabel:"Idle"},{name:"planner",displayName:"Planner",processName:"planner",triggerId:"planner",runningLabel:"Writing PRDs",idleLabel:"Idle"},{name:"analytics",displayName:"Analytics",processName:"analytics",triggerId:"analytics",runningLabel:"Running",idleLabel:"Idle"}],VS=({processes:l,activePrd:r,onCancelProcess:c,onForceClear:o,onViewLog:h,cancellingProcess:f,clearingLock:v,onTriggerJob:N,triggeringJob:b})=>{const x=T=>l.find(j=>j.name===T),S=(T,j)=>T.length<=j?T:T.slice(0,j-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:BS.map(T=>{const j=x(T.processName),D=(j==null?void 0:j.running)??!1,C=j==null?void 0:j.pid,M=f===T.cancelType,R=D&&T.cancelType,I=!D&&T.name==="executor"&&r,Y=D?C?`PID: ${C}`:T.runningLabel:T.idleLabel,G=D&&T.name==="executor"&&r?S(r,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${D?"bg-green-950/30 border-green-800/50":"bg-slate-950/50 border-slate-800"}`,children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${D?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:`text-sm font-medium ${D?"text-slate-200":"text-slate-400"}`,children:T.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:G?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Df,{className:"h-3 w-3 flex-shrink-0"}),G]}):Y})]}),s.jsxs("div",{className:"flex-shrink-0",children:[R&&s.jsx("button",{onClick:()=>T.cancelType&&c(T.cancelType),disabled:M,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(vg,{className:"h-3.5 w-3.5"})}),I&&s.jsx("button",{onClick:o,disabled:v,className:"p-1 text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 rounded transition-colors disabled:opacity-50",title:"Force clear stale state",children:s.jsx(vg,{className:"h-3.5 w-3.5"})}),!R&&!I&&D&&s.jsx("button",{onClick:h,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Df,{className:"h-3.5 w-3.5"})}),!D&&!I&&s.jsx("button",{onClick:()=>N(T.triggerId),disabled:b!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${T.displayName}`,children:b===T.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(kr,{className:"h-3.5 w-3.5"})})]})]},T.name)})})},YS={Draft:"text-slate-400 bg-slate-500/10 ring-slate-500/20",Ready:"text-green-400 bg-green-500/10 ring-green-500/20","In Progress":"text-blue-400 bg-blue-500/10 ring-blue-500/20",Review:"text-amber-400 bg-amber-500/10 ring-amber-500/20",Done:"text-slate-500 bg-slate-600/10 ring-slate-600/20"},$S=()=>{var z,Q;const l=$f(),[r,c]=U.useState(null),[o,h]=U.useState(!1),[f,v]=U.useState(null),{setProjectName:N,addToast:b,selectedProjectId:x,globalModeLoading:S,status:T}=Jt(),{data:j}=yn(Lx,[x],{enabled:!S}),{data:D,loading:C}=yn(()=>Vx().catch(()=>null),[x],{enabled:!S}),M=T;if(qe.useEffect(()=>{M!=null&&M.projectName&&N(M.projectName)},[M,N]),S)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!M)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const R=M.prs.length,I=M.prs.filter(_=>_.reviewScore!==null&&_.reviewScore<70).length,Y=((z=D==null?void 0:D.columns.Ready)==null?void 0:z.length)??0,G=((Q=D==null?void 0:D.columns["In Progress"])==null?void 0:Q.length)??0;M.processes.find(_=>_.name==="executor"),M.processes.find(_=>_.name==="reviewer"),M.processes.find(_=>_.name==="qa"),M.processes.find(_=>_.name==="audit"),M.processes.find(_=>_.name==="planner"),M.processes.find(_=>_.name==="analytics");const ee=async _=>{c(_);try{const ce=await mS(_),he=ce.results.every(B=>B.success);b({title:he?"Process Cancelled":"Cancel Failed",message:ce.results.map(B=>B.message).join("; "),type:he?"success":"error"})}catch(ce){b({title:"Cancel Failed",message:ce instanceof Error?ce.message:"Failed to cancel process",type:"error"})}finally{c(null)}},de=async()=>{h(!0);try{await yS(),b({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(_){b({title:"Clear Failed",message:_ instanceof Error?_.message:"Failed to clear lock",type:"error"})}finally{h(!1)}},Z=async _=>{v(_);try{await{executor:iS,reviewer:Bx,qa:uS,audit:cS,planner:dS,analytics:oS}[_](),b({title:"Job Triggered",message:`${_[0].toUpperCase()+_.slice(1)} job has been queued.`,type:"success"})}catch(ce){b({title:"Trigger Failed",message:ce instanceof Error?ce.message:`Failed to trigger ${_}`,type:"error"})}finally{v(null)}},P=_=>{if(!_)return"Not scheduled";try{const ce=new Date(_),he=new Date,B=ce.getTime()-he.getTime(),$=Math.floor(B/6e4);return $<0?"Running now...":$<60?`in ${$} min`:$<1440?`in ${Math.floor($/60)} hr${$>=120?"s":""}`:`in ${Math.floor($/1440)} day${$>=2880?"s":""}`}catch{return"Unknown"}},ne=(()=>{var he,B,$;if(j!=null&&j.paused)return null;const _=[{agent:"Executor",nextRun:(j==null?void 0:j.executor.nextRun)??null},{agent:"Reviewer",nextRun:(j==null?void 0:j.reviewer.nextRun)??null},{agent:"QA",nextRun:((he=j==null?void 0:j.qa)==null?void 0:he.nextRun)??null},{agent:"Auditor",nextRun:((B=j==null?void 0:j.audit)==null?void 0:B.nextRun)??null},{agent:"Planner",nextRun:(($=j==null?void 0:j.planner)==null?void 0:$.nextRun)??null}];let ce=null;for(const ie of _)ie.nextRun&&(!ce||new Date(ie.nextRun)<new Date(ce.nextRun))&&(ce=ie);return ce?{agent:ce.agent,time:P(ce.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(Je,{className:"p-5",onClick:()=>l("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:Y})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(uu,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(Je,{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(Tx,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(Je,{className:"p-5",onClick:()=>l("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:R})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Pc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${I>0?"text-red-400 font-medium":"text-slate-500"}`,children:I>0?`${I} need work`:"All passing"})]}),s.jsxs(Je,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:j!=null&&j.paused?"Paused":M.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${j!=null&&j.paused?"bg-amber-500/10 text-amber-400":M.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(Wf,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:j!=null&&j.paused?"All schedules paused":M.crontab.installed?`${M.crontab.entries.length} entr${M.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(Je,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>l("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(VS,{processes:M.processes,activePrd:M.activePrd,onCancelProcess:ee,onForceClear:de,onViewLog:()=>l("/logs"),cancellingProcess:r,clearingLock:o,onTriggerJob:Z,triggeringJob:f})]}),ne&&s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[s.jsx("span",{children:"Next automation:"}),s.jsx("span",{className:"text-slate-200 font-medium",children:ne.agent}),s.jsx("span",{children:ne.time})]}),s.jsxs("button",{onClick:()=>l("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(gg,{className:"ml-1 h-3 w-3"})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),s.jsxs("button",{onClick:()=>l("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(gg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(Je,{className:"p-4",children:C?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):D?s.jsx("div",{className:"flex flex-wrap gap-3",children:Gl.map(_=>{var he;const ce=((he=D.columns[_])==null?void 0:he.length)??0;return s.jsxs("button",{onClick:()=>l("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${YS[_]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:_}),s.jsx("span",{className:"text-xs font-bold",children:ce})]},_)})}):s.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",s.jsx("code",{className:"font-mono bg-slate-800 px-1.5 py-0.5 rounded text-indigo-300 text-xs",children:"night-watch board setup"})," to enable."]})})]})]})},FS=()=>{const[l,r]=U.useState(!0),[c,o]=U.useState(""),[h,f]=U.useState("executor"),v=U.useRef(null),{selectedProjectId:N,globalModeLoading:b}=Jt(),x=Jt(Y=>Y.status),{data:S,loading:T,error:j,refetch:D}=yn(()=>sS(h,500),[h,N],{enabled:!b}),C=(S==null?void 0:S.lines)||[];U.useEffect(()=>{l&&v.current&&(v.current.scrollTop=v.current.scrollHeight)},[C,l]),U.useEffect(()=>{if(!l)return;const Y=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(Y)},[l,h,D]);const M=C.filter(Y=>Y.toLowerCase().includes(c.toLowerCase())),R=Y=>{f(Y),o("")},I=Y=>{if(!(x!=null&&x.processes))return!1;const G=x.processes.find(ee=>ee.name===Y);return(G==null?void 0:G.running)??!1};return j?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(sl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),s.jsx("div",{className:"text-sm text-slate-500",children:j.message}),s.jsx(Fe,{onClick:()=>D(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:c,onChange:Y=>o(Y.target.value)}),s.jsx(ao,{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:kx.map(({processName:Y,label:G})=>s.jsx("button",{onClick:()=>R(Y),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h===Y?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:G}),I(Y)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},Y))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Fe,{size:"sm",variant:"ghost",onClick:()=>D(),children:[s.jsx(yg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Fe,{size:"sm",variant:"ghost",onClick:()=>r(!l),children:[l?s.jsx(Rx,{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: ",h,".log"]}),s.jsxs("span",{children:[M.length," lines"]})]}),s.jsxs("div",{ref:v,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[T?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):M.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:c?"No logs match your filter":"No logs yet — logs will appear after the first run"}):M.map((Y,G)=>{const ee=Y.includes("[ERROR]"),de=Y.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${ee?"text-red-400":de?"text-amber-400":"text-slate-300"}`,children:[s.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:G+1}),Y]},G)}),l&&s.jsx("div",{className:"h-4"})," "]}),!l&&s.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>r(!0),children:[s.jsx(yg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},GS=()=>{const[l,r]=U.useState(null),[c,o]=U.useState(!1),[h,f]=U.useState("all"),[v,N]=U.useState("number"),[b,x]=U.useState("desc"),{addToast:S,selectedProjectId:T,globalModeLoading:j}=Jt(),{data:D,loading:C,error:M,refetch:R}=yn(qx,[T],{enabled:!j}),I=D??[],Y=z=>{switch(z){case"pass":return s.jsx(uu,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(o1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Ox,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(sl,{className:"h-4 w-4 text-slate-500"})}},G=z=>{switch(z){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},ee=z=>z===null?"No review decision yet":z===100?"PR has been approved":z===0?"Changes have been requested":`Review score: ${z}`,de=U.useMemo(()=>I.filter(z=>{switch(h){case"needs-work":return z.ciStatus==="fail"||z.reviewScore===0;case"pending":return z.ciStatus==="pending"||z.ciStatus==="unknown"||z.reviewScore===null;case"passed":return z.ciStatus==="pass"&&z.reviewScore===100;case"all":default:return!0}}),[I,h]),Z=U.useMemo(()=>[...de].sort((Q,_)=>{let ce=0;switch(v){case"number":ce=Q.number-_.number;break;case"title":ce=Q.title.localeCompare(_.title);break;case"branch":ce=Q.branch.localeCompare(_.branch);break;case"ciStatus":{const he={fail:0,pending:1,unknown:2,pass:3};ce=(he[Q.ciStatus]??2)-(he[_.ciStatus]??2);break}case"reviewScore":{const he=Q.reviewScore??-1,B=_.reviewScore??-1;ce=he-B;break}}return b==="asc"?ce:-ce}),[de,v,b]),P=z=>{v===z?x(b==="asc"?"desc":"asc"):(N(z),x("desc"))},W=z=>v!==z?s.jsx(Vb,{className:"h-3 w-3 text-slate-600"}):b==="asc"?s.jsx($b,{className:"h-3 w-3 text-indigo-400"}):s.jsx(Hb,{className:"h-3 w-3 text-indigo-400"});if(C)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(M)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(sl,{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(Fe,{onClick:()=>R(),children:"Retry"})]});const ne=async()=>{o(!0);try{const z=await Bx();S({title:"Reviewer Started",message:z.pid?`Started with PID ${z.pid}`:"Reviewer started",type:"success"})}catch(z){S({title:"Reviewer Failed",message:z instanceof Error?z.message:"Failed to start reviewer",type:"error"})}finally{o(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),s.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),s.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),s.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),s.jsxs(Fe,{size:"sm",onClick:ne,disabled:c,children:[s.jsx(ao,{className:"h-4 w-4 mr-2"}),c?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),W("number")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),W("branch")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),W("ciStatus")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),W("reviewScore")]})}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-800",children:[Z.map(z=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(l===z.number?null:z.number),children:[s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center",children:[s.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",z.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:z.title})]})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:z.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:G(z.ciStatus),children:[Y(z.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:z.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:z.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:ee(z.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${z.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${z.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:z.reviewScore})]}):s.jsx("span",{className:"text-slate-600 text-sm",title:"No review decision yet",children:"—"})}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("a",{href:z.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:Q=>Q.stopPropagation(),children:s.jsx(Cx,{className:"h-4 w-4"})})})]},z.number)),Z.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:I.length===0?"No open PRs found.":`No PRs match the "${h}" filter.`})})]})]})}),l&&s.jsx(Je,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const z=I.find(Q=>Q.number===l);return z?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:z.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:z.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:G(z.ciStatus),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),s.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[Y(z.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:z.ciStatus})]})]}),z.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:ee(z.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:z.reviewScore})]})]})]}):null})()})]})},ga=qe.forwardRef(({className:l="",label:r,checked:c,onChange:o,...h},f)=>{const v=N=>{o&&o(N.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${l}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:f,checked:c,onChange:v,...h}),s.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),r&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:r})]})});ga.displayName="Switch";const PS=()=>{const{addToast:l,selectedProjectId:r,globalModeLoading:c}=Jt(),[o,h]=U.useState(!1),[f,v]=U.useState(!1),{data:N,loading:b,error:x,refetch:S}=yn(NS,[r],{enabled:!c});U.useEffect(()=>{if(!(N!=null&&N.enabled))return;const Y=setInterval(()=>{S()},1e4);return()=>clearInterval(Y)},[N==null?void 0:N.enabled,S]);const T=async Y=>{v(!0);try{await $x(Y),l({title:Y?"Scanner Enabled":"Scanner Disabled",message:Y?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:Y?"success":"info"}),S()}catch(G){l({title:"Toggle Failed",message:G instanceof Error?G.message:"Failed to toggle scanner",type:"error"})}finally{v(!1)}},j=async()=>{h(!0);try{const Y=await wS();Y.created.length>0?l({title:"Scan Complete",message:`Created ${Y.created.length} PRD(s): ${Y.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),Y.errors.length>0&&l({title:"Scan Errors",message:Y.errors.join("; "),type:"warning"}),S()}catch(Y){l({title:"Scan Failed",message:Y instanceof Error?Y.message:"Failed to scan roadmap",type:"error"})}finally{h(!1)}};if(b)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(x)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(sl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:x.message}),s.jsx(Fe,{onClick:()=>S(),children:"Retry"})]});if(!N)return null;if(N.status==="no-roadmap")return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),s.jsx(Je,{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(Dx,{className:"h-10 w-10 text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),s.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",s.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const D=N.totalItems>0?Math.round(N.processedItems/N.totalItems*100):0,C=WS(N.status),M=IS(N.items),R=N.lastScan?QS(N.lastScan):"Never",I=N.autoScanInterval?Math.round(N.autoScanInterval/60):5;return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(ga,{label:N.enabled?"Enabled":"Disabled",checked:N.enabled,onChange:T,disabled:f}),s.jsxs(Fe,{onClick:j,loading:o,disabled:!N.enabled||N.status==="complete",children:[s.jsx(kr,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(Je,{className:`p-6 border-2 ${C.borderColor}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(C.icon,{className:`h-8 w-8 ${C.textColor}`}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),s.jsx("div",{className:`text-2xl font-bold ${C.textColor}`,children:C.label})]})]}),s.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[s.jsxs("div",{children:["Last scan: ",s.jsx("span",{className:"text-slate-300",children:R})]}),N.enabled&&N.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",I," min"]})]}),N.enabled&&N.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(Je,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[N.processedItems," / ",N.totalItems," items (",D,"%)"]})]}),s.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${D===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${D}%`}})})]}),Object.entries(M).map(([Y,G])=>s.jsxs(Je,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:Y}),s.jsx("div",{className:"space-y-2",children:G.map(ee=>s.jsx(ZS,{item:ee},ee.hash))})]},Y))]})};function ZS({item:l}){const r=l.checked,c=l.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${r?"bg-slate-950/30 border-slate-800/50":c?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[r?s.jsx(A1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):c?s.jsx(uu,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Df,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${r?"line-through text-slate-600":"text-slate-200"}`,children:l.title}),l.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:l.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:r?s.jsx(Ar,{variant:"neutral",children:"Skipped"}):c?s.jsx(Ar,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(Ar,{variant:"warning",children:"Pending"})})]})}function WS(l){switch(l){case"complete":return{label:"Complete",icon:uu,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Pc,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:sl,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:sl,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function IS(l){const r={};for(const c of l){const o=c.section||"General";r[o]||(r[o]=[]),r[o].push(c)}return r}function QS(l){try{const r=new Date(l),o=new Date().getTime()-r.getTime(),h=Math.floor(o/6e4);if(h<1)return"Just now";if(h<60)return`${h} min ago`;const f=Math.floor(h/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const He=qe.forwardRef(({className:l="",label:r,error:c,helperText:o,rightIcon:h,...f},v)=>{const N=qe.useId(),b=f.id??N,x=c?`${b}-error`:void 0,S=!c&&o?`${b}-help`:void 0,T=[x,S].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:v,id:b,"aria-describedby":T,"aria-invalid":c?!0:f["aria-invalid"],className:`
|
|
365
|
-
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
366
|
-
px-3 py-2 text-sm text-slate-200
|
|
367
|
-
placeholder:text-slate-600
|
|
368
|
-
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
369
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
370
|
-
transition-all duration-200
|
|
371
|
-
${c?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
372
|
-
${h?"pr-10":""}
|
|
373
|
-
${l}
|
|
374
|
-
`,...f}),h&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:h})]}),c?s.jsx("p",{id:x,className:"mt-1.5 text-xs text-red-400",children:c}):o?s.jsx("p",{id:S,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});He.displayName="Input";const ia=qe.forwardRef(({className:l="",label:r,error:c,helperText:o,options:h,value:f,onChange:v,children:N,...b},x)=>{const S=qe.useId(),T=b.id??S,j=c?`${T}-error`:void 0,D=!c&&o?`${T}-help`:void 0,C=[j,D].filter(Boolean).join(" ")||void 0,M=R=>{v&&v(R.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:T,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:x,id:T,"aria-describedby":C,"aria-invalid":c?!0:b["aria-invalid"],className:`
|
|
375
|
-
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
376
|
-
px-3 py-2 pr-10 text-sm text-slate-200
|
|
377
|
-
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
378
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
379
|
-
transition-all duration-200
|
|
380
|
-
${c?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
381
|
-
${l}
|
|
382
|
-
`,value:f,onChange:M,...b,children:h?h.map(R=>s.jsx("option",{value:R.value,children:R.label},R.value)):N}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Mx,{className:"h-4 w-4"})})]}),c?s.jsx("p",{id:j,className:"mt-1.5 text-xs text-red-400",children:c}):o?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});ia.displayName="Select";const Gx=({tabs:l,activeTab:r,onChange:c,className:o=""})=>{var b,x;const[h,f]=qe.useState((b=l[0])==null?void 0:b.id),v=r||h,N=S=>{c?c(S):f(S)};return s.jsxs("div",{className:`flex flex-col ${o}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:l.map(S=>s.jsx("button",{onClick:()=>N(S.id),className:`
|
|
383
|
-
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
384
|
-
${v===S.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
385
|
-
`,children:S.label},S.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(x=l.find(S=>S.id===v))==null?void 0:x.content})]})},Ic=[{label:"Balanced (recommended)",value:"5 */2 * * *",description:"Every 2 hours at minute 5"},{label:"Every 6 hours (very safe)",value:"10 */6 * * *",description:"Every 6 hours at minute 10"},{label:"Every 4 hours",value:"10 */4 * * *",description:"Every 4 hours at minute 10"},{label:"Twice daily",value:"20 2,14 * * *",description:"At 02:20 and 14:20 UTC"},{label:"Daily",value:"30 3 * * *",description:"Once per day at 03:30 UTC"},{label:"Weekdays only",value:"30 9 * * 1-5",description:"At 09:30 UTC, Monday to Friday"},{label:"Weekly (Monday)",value:"40 3 * * 1",description:"At 03:40 UTC every Monday"},{label:"Custom",value:"__custom__",description:"Enter your own cron expression"}],Kf=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *",merger:"55 */4 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am",merger:"Every 4h at :55"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *",merger:"55 */4 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35",merger:"Every 4h at :55"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1",merger:"55 */4 * * 1-5"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am",merger:"Every 4h at :55 weekdays"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1",merger:"55 */8 * * *"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am",merger:"Every 8h at :55"}}];function _r(l){return l?l.trim().replace(/\s+/g," "):""}function ks(l,r){return _r(l)===_r(r)}function XS(l){if(l)return Kf.find(r=>r.id===l)}function Px(l,r,c,o,h,f,v){return ks(l.schedules.executor,r)&&ks(l.schedules.reviewer,c)&&ks(l.schedules.qa,o)&&ks(l.schedules.audit,h)&&ks(l.schedules.slicer,f)&&ks(l.schedules.merger,v)}function JS(l,r,c,o,h,f){return Kf.find(v=>Px(v,l,r,c,o,h,f))}function tu(l,r,c,o,h,f,v){const N=XS(l);return N&&Px(N,r,c,o,h,f,v)?N:JS(r,c,o,h,f,v)}function Eg(l){const r=_r(l),c=r.split(/\s+/);if(c.length!==5)return r;const[o,h,f,v,N]=c,b=/^\d+$/.test(o),x=Ic.find(S=>_r(S.value)===r);if(x)return x.label;if(o==="*/30"&&h==="*")return"Every 30 minutes";if(o==="0"&&h==="*")return"Every hour";if(o.startsWith("*/"))return`Every ${parseInt(o.replace("*/",""),10)} minutes`;if(b&&h.startsWith("*/")&&f==="*"&&v==="*"&&N==="*"){const S=parseInt(h.replace("*/",""),10);return o==="0"?`Every ${S} hours`:`Every ${S} hours at :${o.padStart(2,"0")}`}if(o==="0"&&h.startsWith("*/"))return`Every ${parseInt(h.replace("*/",""),10)} hours`;if(o==="0"&&h.includes("-")){const[S,T]=h.split("-");return`Every hour from ${$i(S)} to ${$i(T)}`}if(b&&h.includes("-")&&f==="*"&&v==="*"&&N==="*"){const[S,T]=h.split("-");return`Every hour from ${Fi(S,o)} to ${Fi(T,o)}`}if(o==="0"&&h.includes(",")){const S=h.split(",").map($i);return S.length<=3?`At ${S.join(" and ")}`:`At ${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}if(b&&h.includes(",")&&f==="*"&&v==="*"&&(N==="*"||N==="1-5")){const S=h.split(",").map(j=>Fi(j,o)),T=N==="1-5"?"Weekdays at ":"At ";return S.length<=3?`${T}${S.join(" and ")}`:`${T}${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}return o==="0"&&h!=="*"&&f==="*"&&v==="*"&&N==="*"?`Daily at ${$i(h)}`:b&&h!=="*"&&f==="*"&&v==="*"&&N==="*"?`Daily at ${Fi(h,o)}`:o==="0"&&h!=="*"&&f==="*"&&v==="*"&&N==="1-5"?`Weekdays at ${$i(h)}`:b&&h!=="*"&&f==="*"&&v==="*"&&N==="1-5"?`Weekdays at ${Fi(h,o)}`:r}function $i(l){const r=parseInt(l,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function Fi(l,r){const c=r.padStart(2,"0"),o=parseInt(l,10);return Number.isNaN(o)?`${l}:${c}`:o===0?`12:${c} AM`:o<12?`${o}:${c} AM`:o===12?`12:${c} PM`:`${o-12}:${c} PM`}function KS(l){const r=_r(l),c=Ic.find(o=>_r(o.value)===r);return(c==null?void 0:c.value)??"__custom__"}function e2(l){const r=new Date,c=l.getTime()-r.getTime(),o=Math.floor(c/6e4),h=Math.floor(o/60),f=Math.floor(h/24);return o<1?"less than a minute":o<60?`in ${o} minute${o>1?"s":""}`:h<24?`in ${h} hour${h>1?"s":""}`:`in ${f} day${f>1?"s":""}`}function t2(l){const r={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",r)}function a2(l){const r=new Date,c=l.getTime()-r.getTime(),o=Math.floor(c/6e4);return o>=0&&o<30}const al=({label:l,value:r,onChange:c,helperText:o,placeholder:h="5 */3 * * *"})=>{const f=KS(r),v=f==="__custom__",N=S=>{S!=="__custom__"&&c(S)},b=S=>{c(S.target.value)},x=Ic.find(S=>S.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(ia,{label:l,value:f,onChange:N,options:Ic.map(S=>({label:S.label,value:S.value})),helperText:v?void 0:(x==null?void 0:x.description)||o}),v&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(He,{label:"Cron Expression",value:r,onChange:b,placeholder:h}),s.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[s.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",s.jsx("br",{}),s.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})};var Ds={},Ba={},Gi={},Rs={},Sf={},Tg;function n2(){return Tg||(Tg=1,Object.defineProperty(Sf,"__esModule",{value:!0})),Sf}var Pi={},Zi={},Mg;function Hs(){var r,c,o,h,f,Zx,N;if(Mg)return Zi;Mg=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronField=void 0;let l=(N=class{constructor(x,S={rawValue:""}){rt(this,f);rt(this,r,!1);rt(this,c,!1);rt(this,o,!1);rt(this,h,[]);X0(this,"options",{rawValue:""});if(!Array.isArray(x))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(x.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...S,rawValue:S.rawValue??""},Ee(this,h,x.sort(N.sorter)),Ee(this,o,this.options.wildcard!==void 0?this.options.wildcard:we(this,f,Zx).call(this)),Ee(this,r,this.options.rawValue.includes("L")||x.includes("L")),Ee(this,c,this.options.rawValue.includes("?")||x.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return te(this,r)}get hasQuestionMarkChar(){return te(this,c)}get isWildcard(){return te(this,o)}get values(){return te(this,h)}static sorter(x,S){const T=typeof x=="number",j=typeof S=="number";return T&&j?x-S:!T&&!j?x.localeCompare(S):T?-1:1}static findNearestValueInList(x,S,T=!1){if(T){for(let j=x.length-1;j>=0;j--)if(x[j]<S)return x[j];return null}for(let j=0;j<x.length;j++)if(x[j]>S)return x[j];return null}findNearestValue(x,S=!1){return this.constructor.findNearestValueInList(this.values,x,S)}serialize(){return{wildcard:te(this,o),values:te(this,h)}}validate(){let x;const S=this.chars.length>0?` or chars ${this.chars.join("")}`:"",T=M=>R=>new RegExp(`^\\d{0,2}${R}$`).test(M),j=M=>(x=M,typeof M=="number"?M>=this.min&&M<=this.max:this.chars.some(T(M)));if(!te(this,h).every(j))throw new Error(`${this.constructor.name} Validation error, got value ${x} expected range ${this.min}-${this.max}${S}`);const C=te(this,h).find((M,R)=>te(this,h).indexOf(M)!==R);if(C)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${C}`)}},r=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,f=new WeakSet,Zx=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(x,S)=>S+this.min).every(x=>te(this,h).includes(x))},N);return Zi.CronField=l,Zi}var Cg;function l2(){if(Cg)return Pi;Cg=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.CronDayOfMonth=void 0;const l=Hs(),r=1,c=31,o=Object.freeze(["L"]);let h=class extends l.CronField{static get min(){return r}static get max(){return c}static get chars(){return o}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Pi.CronDayOfMonth=h,Pi}var Wi={},Og;function s2(){if(Og)return Wi;Og=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronDayOfWeek=void 0;const l=Hs(),r=0,c=7,o=Object.freeze(["L"]);let h=class extends l.CronField{static get min(){return r}static get max(){return c}static get chars(){return o}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Wi.CronDayOfWeek=h,Wi}var Ii={},Dg;function r2(){if(Dg)return Ii;Dg=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronHour=void 0;const l=Hs(),r=0,c=23,o=Object.freeze([]);let h=class extends l.CronField{static get min(){return r}static get max(){return c}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Ii.CronHour=h,Ii}var Qi={},Rg;function i2(){if(Rg)return Qi;Rg=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronMinute=void 0;const l=Hs(),r=0,c=59,o=Object.freeze([]);let h=class extends l.CronField{static get min(){return r}static get max(){return c}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Qi.CronMinute=h,Qi}var Xi={},Nf={},Aa={},Ag;function u2(){if(Ag)return Aa;Ag=1,Object.defineProperty(Aa,"__esModule",{value:!0});class l extends Error{}class r extends l{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class c extends l{constructor(i){super(`Invalid Interval: ${i.toMessage()}`)}}class o extends l{constructor(i){super(`Invalid Duration: ${i.toMessage()}`)}}class h extends l{}class f extends l{constructor(i){super(`Invalid unit ${i}`)}}class v extends l{}class N extends l{constructor(){super("Zone is an abstract class")}}const b="numeric",x="short",S="long",T={year:b,month:b,day:b},j={year:b,month:x,day:b},D={year:b,month:x,day:b,weekday:x},C={year:b,month:S,day:b},M={year:b,month:S,day:b,weekday:S},R={hour:b,minute:b},I={hour:b,minute:b,second:b},Y={hour:b,minute:b,second:b,timeZoneName:x},G={hour:b,minute:b,second:b,timeZoneName:S},ee={hour:b,minute:b,hourCycle:"h23"},de={hour:b,minute:b,second:b,hourCycle:"h23"},Z={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:x},P={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:S},W={year:b,month:b,day:b,hour:b,minute:b},ne={year:b,month:b,day:b,hour:b,minute:b,second:b},z={year:b,month:x,day:b,hour:b,minute:b},Q={year:b,month:x,day:b,hour:b,minute:b,second:b},_={year:b,month:x,day:b,weekday:x,hour:b,minute:b},ce={year:b,month:S,day:b,hour:b,minute:b,timeZoneName:x},he={year:b,month:S,day:b,hour:b,minute:b,second:b,timeZoneName:x},B={year:b,month:S,day:b,weekday:S,hour:b,minute:b,timeZoneName:S},$={year:b,month:S,day:b,weekday:S,hour:b,minute:b,second:b,timeZoneName:S};class ie{get type(){throw new N}get name(){throw new N}get ianaName(){return this.name}get isUniversal(){throw new N}offsetName(i,m){throw new N}formatOffset(i,m){throw new N}offset(i){throw new N}equals(i){throw new N}get isValid(){throw new N}}let ge=null;class Se extends ie{static get instance(){return ge===null&&(ge=new Se),ge}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:m,locale:p}){return _n(i,m,p)}formatOffset(i,m){return es(this.offset(i),m)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const Re=new Map;function A(g){let i=Re.get(g);return i===void 0&&(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Re.set(g,i)),i}const se={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function me(g,i){const m=g.format(i).replace(/\u200E/g,""),p=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(m),[,w,O,q,H,V,fe,ve]=p;return[q,w,O,H,V,fe,ve]}function ye(g,i){const m=g.formatToParts(i),p=[];for(let w=0;w<m.length;w++){const{type:O,value:q}=m[w],H=se[O];O==="era"?p[H]=q:De(H)||(p[H]=parseInt(q,10))}return p}const Oe=new Map;class Te extends ie{static create(i){let m=Oe.get(i);return m===void 0&&Oe.set(i,m=new Te(i)),m}static resetCache(){Oe.clear(),Re.clear()}static isValidSpecifier(i){return this.isValidZone(i)}static isValidZone(i){if(!i)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:i}).format(),!0}catch{return!1}}constructor(i){super(),this.zoneName=i,this.valid=Te.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(i,{format:m,locale:p}){return _n(i,m,p,this.name)}formatOffset(i,m){return es(this.offset(i),m)}offset(i){if(!this.valid)return NaN;const m=new Date(i);if(isNaN(m))return NaN;const p=A(this.name);let[w,O,q,H,V,fe,ve]=p.formatToParts?ye(p,m):me(p,m);H==="BC"&&(w=-Math.abs(w)+1);const Ie=ta({year:w,month:O,day:q,hour:V===24?0:V,minute:fe,second:ve,millisecond:0});let ke=+m;const Et=ke%1e3;return ke-=Et>=0?Et:1e3+Et,(Ie-ke)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let Ve={};function St(g,i={}){const m=JSON.stringify([g,i]);let p=Ve[m];return p||(p=new Intl.ListFormat(g,i),Ve[m]=p),p}const tt=new Map;function ua(g,i={}){const m=JSON.stringify([g,i]);let p=tt.get(m);return p===void 0&&(p=new Intl.DateTimeFormat(g,i),tt.set(m,p)),p}const xa=new Map;function Dn(g,i={}){const m=JSON.stringify([g,i]);let p=xa.get(m);return p===void 0&&(p=new Intl.NumberFormat(g,i),xa.set(m,p)),p}const pn=new Map;function xe(g,i={}){const{base:m,...p}=i,w=JSON.stringify([g,p]);let O=pn.get(w);return O===void 0&&(O=new Intl.RelativeTimeFormat(g,i),pn.set(w,O)),O}let ze=null;function Tt(){return ze||(ze=new Intl.DateTimeFormat().resolvedOptions().locale,ze)}const Ot=new Map;function ya(g){let i=Ot.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),Ot.set(g,i)),i}const ca=new Map;function an(g){let i=ca.get(g);if(!i){const m=new Intl.Locale(g);i="getWeekInfo"in m?m.getWeekInfo():m.weekInfo,"minimalDays"in i||(i={...Wt,...i}),ca.set(g,i)}return i}function le(g){const i=g.indexOf("-x-");i!==-1&&(g=g.substring(0,i));const m=g.indexOf("-u-");if(m===-1)return[g];{let p,w;try{p=ua(g).resolvedOptions(),w=g}catch{const V=g.substring(0,m);p=ua(V).resolvedOptions(),w=V}const{numberingSystem:O,calendar:q}=p;return[w,O,q]}}function pe(g,i,m){return(m||i)&&(g.includes("-u-")||(g+="-u"),m&&(g+=`-ca-${m}`),i&&(g+=`-nu-${i}`)),g}function Me(g){const i=[];for(let m=1;m<=12;m++){const p=je.utc(2009,m,1);i.push(g(p))}return i}function Ae(g){const i=[];for(let m=1;m<=7;m++){const p=je.utc(2016,11,13+m);i.push(g(p))}return i}function Ke(g,i,m,p){const w=g.listingMode();return w==="error"?null:w==="en"?m(i):p(i)}function ft(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||ya(g.locale).numberingSystem==="latn"}class Dt{constructor(i,m,p){this.padTo=p.padTo||0,this.floor=p.floor||!1;const{padTo:w,floor:O,...q}=p;if(!m||Object.keys(q).length>0){const H={useGrouping:!1,...p};p.padTo>0&&(H.minimumIntegerDigits=p.padTo),this.inf=Dn(i,H)}}format(i){if(this.inf){const m=this.floor?Math.floor(i):i;return this.inf.format(m)}else{const m=this.floor?Math.floor(i):Xl(i,3);return it(m,this.padTo)}}}class jt{constructor(i,m,p){this.opts=p,this.originalZone=void 0;let w;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const q=-1*(i.offset/60),H=q>=0?`Etc/GMT+${q}`:`Etc/GMT${q}`;i.offset!==0&&Te.create(H).valid?(w=H,this.dt=i):(w="UTC",this.dt=i.offset===0?i:i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone)}else i.zone.type==="system"?this.dt=i:i.zone.type==="iana"?(this.dt=i,w=i.zone.name):(w="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const O={...this.opts};O.timeZone=O.timeZone||w,this.dtf=ua(m,O)}format(){return this.originalZone?this.formatToParts().map(({value:i})=>i).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const i=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?i.map(m=>{if(m.type==="timeZoneName"){const p=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...m,value:p}}else return m}):i}resolvedOptions(){return this.dtf.resolvedOptions()}}class $t{constructor(i,m,p){this.opts={style:"long",...p},!m&&Yr()&&(this.rtf=xe(i,p))}format(i,m){return this.rtf?this.rtf.format(i,m):Nn(m,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,m){return this.rtf?this.rtf.formatToParts(i,m):[]}}const Wt={firstDay:1,minimalDays:4,weekend:[6,7]};class Ge{static fromOpts(i){return Ge.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,m,p,w,O=!1){const q=i||yt.defaultLocale,H=q||(O?"en-US":Tt()),V=m||yt.defaultNumberingSystem,fe=p||yt.defaultOutputCalendar,ve=$r(w)||yt.defaultWeekSettings;return new Ge(H,V,fe,ve,q)}static resetCache(){ze=null,tt.clear(),xa.clear(),pn.clear(),Ot.clear(),ca.clear()}static fromObject({locale:i,numberingSystem:m,outputCalendar:p,weekSettings:w}={}){return Ge.create(i,m,p,w)}constructor(i,m,p,w,O){const[q,H,V]=le(i);this.locale=q,this.numberingSystem=m||H||null,this.outputCalendar=p||V||null,this.weekSettings=w,this.intl=pe(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=O,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=ft(this)),this.fastNumbersCached}listingMode(){const i=this.isEnglish(),m=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return i&&m?"en":"intl"}clone(i){return!i||Object.getOwnPropertyNames(i).length===0?this:Ge.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,$r(i.weekSettings)||this.weekSettings,i.defaultToEN||!1)}redefaultToEN(i={}){return this.clone({...i,defaultToEN:!0})}redefaultToSystem(i={}){return this.clone({...i,defaultToEN:!1})}months(i,m=!1){return Ke(this,i,vu,()=>{const p=this.intl==="ja"||this.intl.startsWith("ja-");m&=!p;const w=m?{month:i,day:"numeric"}:{month:i},O=m?"format":"standalone";if(!this.monthsCache[O][i]){const q=p?H=>this.dtFormatter(H,w).format():H=>this.extract(H,w,"month");this.monthsCache[O][i]=Me(q)}return this.monthsCache[O][i]})}weekdays(i,m=!1){return Ke(this,i,Ws,()=>{const p=m?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},w=m?"format":"standalone";return this.weekdaysCache[w][i]||(this.weekdaysCache[w][i]=Ae(O=>this.extract(O,p,"weekday"))),this.weekdaysCache[w][i]})}meridiems(){return Ke(this,void 0,()=>zn,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[je.utc(2016,11,13,9),je.utc(2016,11,13,19)].map(m=>this.extract(m,i,"dayperiod"))}return this.meridiemCache})}eras(i){return Ke(this,i,Wr,()=>{const m={era:i};return this.eraCache[i]||(this.eraCache[i]=[je.utc(-40,1,1),je.utc(2017,1,1)].map(p=>this.extract(p,m,"era"))),this.eraCache[i]})}extract(i,m,p){const w=this.dtFormatter(i,m),O=w.formatToParts(),q=O.find(H=>H.type.toLowerCase()===p);return q?q.value:null}numberFormatter(i={}){return new Dt(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,m={}){return new jt(i,this.intl,m)}relFormatter(i={}){return new $t(this.intl,this.isEnglish(),i)}listFormatter(i={}){return St(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||ya(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:bn()?an(this.locale):Wt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(i){return this.locale===i.locale&&this.numberingSystem===i.numberingSystem&&this.outputCalendar===i.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let pa=null;class ut extends ie{static get utcInstance(){return pa===null&&(pa=new ut(0)),pa}static instance(i){return i===0?ut.utcInstance:new ut(i)}static parseSpecifier(i){if(i){const m=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(m)return new ut(Kl(m[1],m[2]))}return null}constructor(i){super(),this.fixed=i}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(i,m){return es(this.fixed,m)}get isUniversal(){return!0}offset(){return this.fixed}equals(i){return i.type==="fixed"&&i.fixed===this.fixed}get isValid(){return!0}}class Rt extends ie{constructor(i){super(),this.zoneName=i}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ft(g,i){if(De(g)||g===null)return i;if(g instanceof ie)return g;if(Ht(g)){const m=g.toLowerCase();return m==="default"?i:m==="local"||m==="system"?Se.instance:m==="utc"||m==="gmt"?ut.utcInstance:ut.parseSpecifier(m)||Te.create(g)}else return Na(g)?ut.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new Rt(g)}const Kt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},cu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},lo=Kt.hanidec.replace(/[\[|\]]/g,"").split("");function so(g){let i=parseInt(g,10);if(isNaN(i)){i="";for(let m=0;m<g.length;m++){const p=g.charCodeAt(m);if(g[m].search(Kt.hanidec)!==-1)i+=lo.indexOf(g[m]);else for(const w in cu){const[O,q]=cu[w];p>=O&&p<=q&&(i+=p-O)}}return parseInt(i,10)}else return i}const rl=new Map;function Ls(){rl.clear()}function oa({numberingSystem:g},i=""){const m=g||"latn";let p=rl.get(m);p===void 0&&(p=new Map,rl.set(m,p));let w=p.get(i);return w===void 0&&(w=new RegExp(`${Kt[m]}${i}`),p.set(i,w)),w}let vn=()=>Date.now(),Wl="system",il=null,ou=null,Lr=null,Bs=60,ul,du=null;class yt{static get now(){return vn}static set now(i){vn=i}static set defaultZone(i){Wl=i}static get defaultZone(){return Ft(Wl,Se.instance)}static get defaultLocale(){return il}static set defaultLocale(i){il=i}static get defaultNumberingSystem(){return ou}static set defaultNumberingSystem(i){ou=i}static get defaultOutputCalendar(){return Lr}static set defaultOutputCalendar(i){Lr=i}static get defaultWeekSettings(){return du}static set defaultWeekSettings(i){du=$r(i)}static get twoDigitCutoffYear(){return Bs}static set twoDigitCutoffYear(i){Bs=i%100}static get throwOnInvalid(){return ul}static set throwOnInvalid(i){ul=i}static resetCaches(){Ge.resetCache(),Te.resetCache(),je.resetCache(),Ls()}}class Sa{constructor(i,m){this.reason=i,this.explanation=m}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Br=[0,31,59,90,120,151,181,212,243,273,304,334],Vs=[0,31,60,91,121,152,182,213,244,274,305,335];function da(g,i){return new Sa("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function Ys(g,i,m){const p=new Date(Date.UTC(g,i-1,m));g<100&&g>=0&&p.setUTCFullYear(p.getUTCFullYear()-1900);const w=p.getUTCDay();return w===0?7:w}function Vr(g,i,m){return m+(ol(g)?Vs:Br)[i-1]}function nn(g,i){const m=ol(g)?Vs:Br,p=m.findIndex(O=>O<i),w=i-m[p];return{month:p+1,day:w}}function At(g,i){return(g-i+7)%7+1}function Gt(g,i=4,m=1){const{year:p,month:w,day:O}=g,q=Vr(p,w,O),H=At(Ys(p,w,O),m);let V=Math.floor((q-H+14-i)/7),fe;return V<1?(fe=p-1,V=dl(fe,i,m)):V>dl(p,i,m)?(fe=p+1,V=1):fe=p,{weekYear:fe,weekNumber:V,weekday:H,...ts(g)}}function Rn(g,i=4,m=1){const{weekYear:p,weekNumber:w,weekday:O}=g,q=At(Ys(p,1,i),m),H=sn(p);let V=w*7+O-q-7+i,fe;V<1?(fe=p-1,V+=sn(fe)):V>H?(fe=p+1,V-=sn(p)):fe=p;const{month:ve,day:Le}=nn(fe,V);return{year:fe,month:ve,day:Le,...ts(g)}}function Il(g){const{year:i,month:m,day:p}=g,w=Vr(i,m,p);return{year:i,ordinal:w,...ts(g)}}function fu(g){const{year:i,ordinal:m}=g,{month:p,day:w}=nn(i,m);return{year:i,month:p,day:w,...ts(g)}}function hu(g,i){if(!De(g.localWeekday)||!De(g.localWeekNumber)||!De(g.localWeekYear)){if(!De(g.weekday)||!De(g.weekNumber)||!De(g.weekYear))throw new h("Cannot mix locale-based week fields with ISO-based week fields");return De(g.localWeekday)||(g.weekday=g.localWeekday),De(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),De(g.localWeekYear)||(g.weekYear=g.localWeekYear),delete g.localWeekday,delete g.localWeekNumber,delete g.localWeekYear,{minDaysInFirstWeek:i.getMinDaysInFirstWeek(),startOfWeek:i.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function mu(g,i=4,m=1){const p=ln(g.weekYear),w=ea(g.weekNumber,1,dl(g.weekYear,i,m)),O=ea(g.weekday,1,7);return p?w?O?!1:da("weekday",g.weekday):da("week",g.weekNumber):da("weekYear",g.weekYear)}function Ql(g){const i=ln(g.year),m=ea(g.ordinal,1,sn(g.year));return i?m?!1:da("ordinal",g.ordinal):da("year",g.year)}function $s(g){const i=ln(g.year),m=ea(g.month,1,12),p=ea(g.day,1,Gs(g.year,g.month));return i?m?p?!1:da("day",g.day):da("month",g.month):da("year",g.year)}function An(g){const{hour:i,minute:m,second:p,millisecond:w}=g,O=ea(i,0,23)||i===24&&m===0&&p===0&&w===0,q=ea(m,0,59),H=ea(p,0,59),V=ea(w,0,999);return O?q?H?V?!1:da("millisecond",w):da("second",p):da("minute",m):da("hour",i)}function De(g){return typeof g>"u"}function Na(g){return typeof g=="number"}function ln(g){return typeof g=="number"&&g%1===0}function Ht(g){return typeof g=="string"}function gu(g){return Object.prototype.toString.call(g)==="[object Date]"}function Yr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function bn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function cl(g){return Array.isArray(g)?g:[g]}function xu(g,i,m){if(g.length!==0)return g.reduce((p,w)=>{const O=[i(w),w];return p&&m(p[0],O[0])===p[0]?p:O},null)[1]}function yu(g,i){return i.reduce((m,p)=>(m[p]=g[p],m),{})}function kn(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function $r(g){if(g==null)return null;if(typeof g!="object")throw new v("Week settings must be an object");if(!ea(g.firstDay,1,7)||!ea(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!ea(i,1,7)))throw new v("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function ea(g,i,m){return ln(g)&&g>=i&&g<=m}function Fs(g,i){return g-i*Math.floor(g/i)}function it(g,i=2){const m=g<0;let p;return m?p="-"+(""+-g).padStart(i,"0"):p=(""+g).padStart(i,"0"),p}function kt(g){if(!(De(g)||g===null||g===""))return parseInt(g,10)}function Sn(g){if(!(De(g)||g===null||g===""))return parseFloat(g)}function Fr(g){if(!(De(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function Xl(g,i,m="round"){const p=10**i;switch(m){case"expand":return g>0?Math.ceil(g*p)/p:Math.floor(g*p)/p;case"trunc":return Math.trunc(g*p)/p;case"round":return Math.round(g*p)/p;case"floor":return Math.floor(g*p)/p;case"ceil":return Math.ceil(g*p)/p;default:throw new RangeError(`Value rounding ${m} is out of range`)}}function ol(g){return g%4===0&&(g%100!==0||g%400===0)}function sn(g){return ol(g)?366:365}function Gs(g,i){const m=Fs(i-1,12)+1,p=g+(i-m)/12;return m===2?ol(p)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][m-1]}function ta(g){let i=Date.UTC(g.year,g.month-1,g.day,g.hour,g.minute,g.second,g.millisecond);return g.year<100&&g.year>=0&&(i=new Date(i),i.setUTCFullYear(g.year,g.month-1,g.day)),+i}function Ps(g,i,m){return-At(Ys(g,1,i),m)+i-1}function dl(g,i=4,m=1){const p=Ps(g,i,m),w=Ps(g+1,i,m);return(sn(g)-p+w)/7}function Jl(g){return g>99?g:g>yt.twoDigitCutoffYear?1900+g:2e3+g}function _n(g,i,m,p=null){const w=new Date(g),O={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};p&&(O.timeZone=p);const q={timeZoneName:i,...O},H=new Intl.DateTimeFormat(m,q).formatToParts(w).find(V=>V.type.toLowerCase()==="timezonename");return H?H.value:null}function Kl(g,i){let m=parseInt(g,10);Number.isNaN(m)&&(m=0);const p=parseInt(i,10)||0,w=m<0||Object.is(m,-0)?-p:p;return m*60+w}function Gr(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new v(`Invalid unit value ${g}`);return i}function rn(g,i){const m={};for(const p in g)if(kn(g,p)){const w=g[p];if(w==null)continue;m[i(p)]=Gr(w)}return m}function es(g,i){const m=Math.trunc(Math.abs(g/60)),p=Math.trunc(Math.abs(g%60)),w=g>=0?"+":"-";switch(i){case"short":return`${w}${it(m,2)}:${it(p,2)}`;case"narrow":return`${w}${m}${p>0?`:${p}`:""}`;case"techie":return`${w}${it(m,2)}${it(p,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function ts(g){return yu(g,["hour","minute","second","millisecond"])}const pu=["January","February","March","April","May","June","July","August","September","October","November","December"],Zs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ro=["J","F","M","A","M","J","J","A","S","O","N","D"];function vu(g){switch(g){case"narrow":return[...ro];case"short":return[...Zs];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"],$a=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Pr=["M","T","W","T","F","S","S"];function Ws(g){switch(g){case"narrow":return[...Pr];case"short":return[...$a];case"long":return[...as];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const zn=["AM","PM"],fl=["Before Christ","Anno Domini"],bu=["BC","AD"],Zr=["B","A"];function Wr(g){switch(g){case"narrow":return[...Zr];case"short":return[...bu];case"long":return[...fl];default:return null}}function ns(g){return zn[g.hour<12?0:1]}function un(g,i){return Ws(i)[g.weekday-1]}function Ir(g,i){return vu(i)[g.month-1]}function ls(g,i){return Wr(i)[g.year<0?0:1]}function Nn(g,i,m="always",p=!1){const w={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},O=["hours","minutes","seconds"].indexOf(g)===-1;if(m==="auto"&&O){const Le=g==="days";switch(i){case 1:return Le?"tomorrow":`next ${w[g][0]}`;case-1:return Le?"yesterday":`last ${w[g][0]}`;case 0:return Le?"today":`this ${w[g][0]}`}}const q=Object.is(i,-0)||i<0,H=Math.abs(i),V=H===1,fe=w[g],ve=p?V?fe[1]:fe[2]||fe[1]:V?w[g][0]:g;return q?`${H} ${ve} ago`:`in ${H} ${ve}`}function Is(g,i){let m="";for(const p of g)p.literal?m+=p.val:m+=i(p.val);return m}const Qs={D:T,DD:j,DDD:C,DDDD:M,t:R,tt:I,ttt:Y,tttt:G,T:ee,TT:de,TTT:Z,TTTT:P,f:W,ff:z,fff:ce,ffff:B,F:ne,FF:Q,FFF:he,FFFF:$};class Pt{static create(i,m={}){return new Pt(i,m)}static parseFormat(i){let m=null,p="",w=!1;const O=[];for(let q=0;q<i.length;q++){const H=i.charAt(q);H==="'"?((p.length>0||w)&&O.push({literal:w||/^\s+$/.test(p),val:p===""?"'":p}),m=null,p="",w=!w):w||H===m?p+=H:(p.length>0&&O.push({literal:/^\s+$/.test(p),val:p}),p=H,m=H)}return p.length>0&&O.push({literal:w||/^\s+$/.test(p),val:p}),O}static macroTokenToFormatOpts(i){return Qs[i]}constructor(i,m){this.opts=m,this.loc=i,this.systemLoc=null}formatWithSystemDefault(i,m){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(i,{...this.opts,...m}).format()}dtFormatter(i,m={}){return this.loc.dtFormatter(i,{...this.opts,...m})}formatDateTime(i,m){return this.dtFormatter(i,m).format()}formatDateTimeParts(i,m){return this.dtFormatter(i,m).formatToParts()}formatInterval(i,m){return this.dtFormatter(i.start,m).dtf.formatRange(i.start.toJSDate(),i.end.toJSDate())}resolvedOptions(i,m){return this.dtFormatter(i,m).resolvedOptions()}num(i,m=0,p=void 0){if(this.opts.forceSimple)return it(i,m);const w={...this.opts};return m>0&&(w.padTo=m),p&&(w.signDisplay=p),this.loc.numberFormatter(w).format(i)}formatDateTimeFromString(i,m){const p=this.loc.listingMode()==="en",w=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",O=(ke,Et)=>this.loc.extract(i,ke,Et),q=ke=>i.isOffsetFixed&&i.offset===0&&ke.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,ke.format):"",H=()=>p?ns(i):O({hour:"numeric",hourCycle:"h12"},"dayperiod"),V=(ke,Et)=>p?Ir(i,ke):O(Et?{month:ke}:{month:ke,day:"numeric"},"month"),fe=(ke,Et)=>p?un(i,ke):O(Et?{weekday:ke}:{weekday:ke,month:"long",day:"numeric"},"weekday"),ve=ke=>{const Et=Pt.macroTokenToFormatOpts(ke);return Et?this.formatWithSystemDefault(i,Et):ke},Le=ke=>p?ls(i,ke):O({era:ke},"era"),Ie=ke=>{switch(ke){case"S":return this.num(i.millisecond);case"u":case"SSS":return this.num(i.millisecond,3);case"s":return this.num(i.second);case"ss":return this.num(i.second,2);case"uu":return this.num(Math.floor(i.millisecond/10),2);case"uuu":return this.num(Math.floor(i.millisecond/100));case"m":return this.num(i.minute);case"mm":return this.num(i.minute,2);case"h":return this.num(i.hour%12===0?12:i.hour%12);case"hh":return this.num(i.hour%12===0?12:i.hour%12,2);case"H":return this.num(i.hour);case"HH":return this.num(i.hour,2);case"Z":return q({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return q({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return q({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return i.zone.offsetName(i.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return i.zone.offsetName(i.ts,{format:"long",locale:this.loc.locale});case"z":return i.zoneName;case"a":return H();case"d":return w?O({day:"numeric"},"day"):this.num(i.day);case"dd":return w?O({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return fe("short",!0);case"cccc":return fe("long",!0);case"ccccc":return fe("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return fe("short",!1);case"EEEE":return fe("long",!1);case"EEEEE":return fe("narrow",!1);case"L":return w?O({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return w?O({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return V("short",!0);case"LLLL":return V("long",!0);case"LLLLL":return V("narrow",!0);case"M":return w?O({month:"numeric"},"month"):this.num(i.month);case"MM":return w?O({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return V("short",!1);case"MMMM":return V("long",!1);case"MMMMM":return V("narrow",!1);case"y":return w?O({year:"numeric"},"year"):this.num(i.year);case"yy":return w?O({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return w?O({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return w?O({year:"numeric"},"year"):this.num(i.year,6);case"G":return Le("short");case"GG":return Le("long");case"GGGGG":return Le("narrow");case"kk":return this.num(i.weekYear.toString().slice(-2),2);case"kkkk":return this.num(i.weekYear,4);case"W":return this.num(i.weekNumber);case"WW":return this.num(i.weekNumber,2);case"n":return this.num(i.localWeekNumber);case"nn":return this.num(i.localWeekNumber,2);case"ii":return this.num(i.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(i.localWeekYear,4);case"o":return this.num(i.ordinal);case"ooo":return this.num(i.ordinal,3);case"q":return this.num(i.quarter);case"qq":return this.num(i.quarter,2);case"X":return this.num(Math.floor(i.ts/1e3));case"x":return this.num(i.ts);default:return ve(ke)}};return Is(Pt.parseFormat(m),Ie)}formatDurationFromString(i,m){const p=this.opts.signMode==="negativeLargestOnly"?-1:1,w=ve=>{switch(ve[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},O=(ve,Le)=>Ie=>{const ke=w(Ie);if(ke){const Et=Le.isNegativeDuration&&ke!==Le.largestUnit?p:1;let It;return this.opts.signMode==="negativeLargestOnly"&&ke!==Le.largestUnit?It="never":this.opts.signMode==="all"?It="always":It="auto",this.num(ve.get(ke)*Et,Ie.length,It)}else return Ie},q=Pt.parseFormat(m),H=q.reduce((ve,{literal:Le,val:Ie})=>Le?ve:ve.concat(Ie),[]),V=i.shiftTo(...H.map(w).filter(ve=>ve)),fe={isNegativeDuration:V<0,largestUnit:Object.keys(V.values)[0]};return Is(q,O(V,fe))}}const ss=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function cn(...g){const i=g.reduce((m,p)=>m+p.source,"");return RegExp(`^${i}$`)}function Un(...g){return i=>g.reduce(([m,p,w],O)=>{const[q,H,V]=O(i,w);return[{...m,...q},H||p,V]},[{},null,1]).slice(0,2)}function _t(g,...i){if(g==null)return[null,null];for(const[m,p]of i){const w=m.exec(g);if(w)return p(w)}return[null,null]}function wn(...g){return(i,m)=>{const p={};let w;for(w=0;w<g.length;w++)p[g[w]]=kt(i[m+w]);return[p,null,m+w]}}const rs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,is=`(?:${rs.source}?(?:\\[(${ss.source})\\])?)?`,Qr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Xs=RegExp(`${Qr.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})/,io=wn("weekYear","weekNumber","weekDay"),uo=wn("year","ordinal"),co=/(\d{4})-(\d\d)-(\d\d)/,Ks=RegExp(`${Qr.source} ?(?:${rs.source}|(${ss.source}))?`),oo=RegExp(`(?: ${Ks.source})?`);function hl(g,i,m){const p=g[i];return De(p)?m:kt(p)}function fo(g,i){return[{year:hl(g,i),month:hl(g,i+1,1),day:hl(g,i+2,1)},null,i+3]}function ml(g,i){return[{hours:hl(g,i,0),minutes:hl(g,i+1,0),seconds:hl(g,i+2,0),milliseconds:Fr(g[i+3])},null,i+4]}function os(g,i){const m=!g[i]&&!g[i+1],p=Kl(g[i+1],g[i+2]),w=m?null:ut.instance(p);return[{},w,i+3]}function gl(g,i){const m=g[i]?Te.create(g[i]):null;return[{},m,i+1]}const ho=RegExp(`^T?${Qr.source}$`),mo=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function go(g){const[i,m,p,w,O,q,H,V,fe]=g,ve=i[0]==="-",Le=V&&V[0]==="-",Ie=(ke,Et=!1)=>ke!==void 0&&(Et||ke&&ve)?-ke:ke;return[{years:Ie(Sn(m)),months:Ie(Sn(p)),weeks:Ie(Sn(w)),days:Ie(Sn(O)),hours:Ie(Sn(q)),minutes:Ie(Sn(H)),seconds:Ie(Sn(V),V==="-0"),milliseconds:Ie(Fr(fe),Le)}]}const xo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ds(g,i,m,p,w,O,q){const H={year:i.length===2?Jl(kt(i)):kt(i),month:Zs.indexOf(m)+1,day:kt(p),hour:kt(w),minute:kt(O)};return q&&(H.second=kt(q)),g&&(H.weekday=g.length>3?as.indexOf(g)+1:$a.indexOf(g)+1),H}const yo=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function po(g){const[,i,m,p,w,O,q,H,V,fe,ve,Le]=g,Ie=ds(i,w,p,m,O,q,H);let ke;return V?ke=xo[V]:fe?ke=0:ke=Kl(ve,Le),[Ie,new ut(ke)]}function vo(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Nu=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,bo=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,So=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function wu(g){const[,i,m,p,w,O,q,H]=g;return[ds(i,w,p,m,O,q,H),ut.utcInstance]}function No(g){const[,i,m,p,w,O,q,H]=g;return[ds(i,H,m,p,w,O,q),ut.utcInstance]}const wo=cn(cs,us),jo=cn(Js,us),Eo=cn(Su,us),To=cn(Xs),ju=Un(fo,ml,os,gl),Xr=Un(io,ml,os,gl),fs=Un(uo,ml,os,gl),Mo=Un(ml,os,gl);function Eu(g){return _t(g,[wo,ju],[jo,Xr],[Eo,fs],[To,Mo])}function Tu(g){return _t(vo(g),[yo,po])}function Mu(g){return _t(g,[Nu,wu],[bo,wu],[So,No])}function Cu(g){return _t(g,[mo,go])}const Ou=Un(ml);function xl(g){return _t(g,[ho,Ou])}const Co=cn(co,oo),Oo=cn(Ks),Do=Un(ml,os,gl);function Du(g){return _t(g,[Co,ju],[Oo,Do])}const Jr="Invalid Duration",yl={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},...yl},wa=146097/400,on=146097/4800,Ru={years:{quarters:4,months:12,weeks:wa/7,days:wa,hours:wa*24,minutes:wa*24*60,seconds:wa*24*60*60,milliseconds:wa*24*60*60*1e3},quarters:{months:3,weeks:wa/28,days:wa/4,hours:wa*24/4,minutes:wa*24*60/4,seconds:wa*24*60*60/4,milliseconds:wa*24*60*60*1e3/4},months:{weeks:on/7,days:on,hours:on*24,minutes:on*24*60,seconds:on*24*60*60,milliseconds:on*24*60*60*1e3},...yl},jn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Kr=jn.slice(0).reverse();function ka(g,i,m=!1){const p={values:m?i.values:{...g.values,...i.values||{}},loc:g.loc.clone(i.loc),conversionAccuracy:i.conversionAccuracy||g.conversionAccuracy,matrix:i.matrix||g.matrix};return new We(p)}function ei(g,i){var m;let p=(m=i.milliseconds)!=null?m:0;for(const w of Kr.slice(1))i[w]&&(p+=i[w]*g[w].milliseconds);return p}function ti(g,i){const m=ei(g,i)<0?-1:1;jn.reduceRight((p,w)=>{if(De(i[w]))return p;if(p){const O=i[p]*m,q=g[w][p],H=Math.floor(O/q);i[w]+=H*m,i[p]-=H*q*m}return w},null),jn.reduce((p,w)=>{if(De(i[w]))return p;if(p){const O=i[p]%1;i[p]-=O,i[w]+=O*g[p][w]}return w},null)}function ai(g){const i={};for(const[m,p]of Object.entries(g))p!==0&&(i[m]=p);return i}class We{constructor(i){const m=i.conversionAccuracy==="longterm"||!1;let p=m?Ru:hs;i.matrix&&(p=i.matrix),this.values=i.values,this.loc=i.loc||Ge.create(),this.conversionAccuracy=m?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=p,this.isLuxonDuration=!0}static fromMillis(i,m){return We.fromObject({milliseconds:i},m)}static fromObject(i,m={}){if(i==null||typeof i!="object")throw new v(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new We({values:rn(i,We.normalizeUnit),loc:Ge.fromObject(m),conversionAccuracy:m.conversionAccuracy,matrix:m.matrix})}static fromDurationLike(i){if(Na(i))return We.fromMillis(i);if(We.isDuration(i))return i;if(typeof i=="object")return We.fromObject(i);throw new v(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,m){const[p]=Cu(i);return p?We.fromObject(p,m):We.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,m){const[p]=xl(i);return p?We.fromObject(p,m):We.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,m=null){if(!i)throw new v("need to specify a reason the Duration is invalid");const p=i instanceof Sa?i:new Sa(i,m);if(yt.throwOnInvalid)throw new o(p);return new We({invalid:p})}static normalizeUnit(i){const m={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[i&&i.toLowerCase()];if(!m)throw new f(i);return m}static isDuration(i){return i&&i.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(i,m={}){const p={...m,floor:m.round!==!1&&m.floor!==!1};return this.isValid?Pt.create(this.loc,p).formatDurationFromString(this,i):Jr}toHuman(i={}){if(!this.isValid)return Jr;const m=i.showZeros!==!1,p=jn.map(w=>{const O=this.values[w];return De(O)||O===0&&!m?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:w.slice(0,-1)}).format(O)}).filter(w=>w);return this.loc.listFormatter({type:"conjunction",style:i.listStyle||"narrow",...i}).format(p)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let i="P";return this.years!==0&&(i+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(i+=this.months+this.quarters*3+"M"),this.weeks!==0&&(i+=this.weeks+"W"),this.days!==0&&(i+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(i+="T"),this.hours!==0&&(i+=this.hours+"H"),this.minutes!==0&&(i+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(i+=Xl(this.seconds+this.milliseconds/1e3,3)+"S"),i==="P"&&(i+="T0S"),i}toISOTime(i={}){if(!this.isValid)return null;const m=this.toMillis();return m<0||m>=864e5?null:(i={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...i,includeOffset:!1},je.fromMillis(m,{zone:"UTC"}).toISOTime(i))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ei(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const m=We.fromDurationLike(i),p={};for(const w of jn)(kn(m.values,w)||kn(this.values,w))&&(p[w]=m.get(w)+this.get(w));return ka(this,{values:p},!0)}minus(i){if(!this.isValid)return this;const m=We.fromDurationLike(i);return this.plus(m.negate())}mapUnits(i){if(!this.isValid)return this;const m={};for(const p of Object.keys(this.values))m[p]=Gr(i(this.values[p],p));return ka(this,{values:m},!0)}get(i){return this[We.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const m={...this.values,...rn(i,We.normalizeUnit)};return ka(this,{values:m})}reconfigure({locale:i,numberingSystem:m,conversionAccuracy:p,matrix:w}={}){const q={loc:this.loc.clone({locale:i,numberingSystem:m}),matrix:w,conversionAccuracy:p};return ka(this,q)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return ti(this.matrix,i),ka(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=ai(this.normalize().shiftToAll().toObject());return ka(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(q=>We.normalizeUnit(q));const m={},p={},w=this.toObject();let O;for(const q of jn)if(i.indexOf(q)>=0){O=q;let H=0;for(const fe in p)H+=this.matrix[fe][q]*p[fe],p[fe]=0;Na(w[q])&&(H+=w[q]);const V=Math.trunc(H);m[q]=V,p[q]=(H*1e3-V*1e3)/1e3}else Na(w[q])&&(p[q]=w[q]);for(const q in p)p[q]!==0&&(m[O]+=q===O?p[q]:p[q]/this.matrix[O][q]);return ti(this.matrix,m),ka(this,{values:m},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const i={};for(const m of Object.keys(this.values))i[m]=this.values[m]===0?0:-this.values[m];return ka(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=ai(this.values);return ka(this,{values:i},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(i){if(!this.isValid||!i.isValid||!this.loc.equals(i.loc))return!1;function m(p,w){return p===void 0||p===0?w===void 0||w===0:p===w}for(const p of jn)if(!m(this.values[p],i.values[p]))return!1;return!0}}const pl="Invalid Interval";function Ro(g,i){return!g||!g.isValid?vt.invalid("missing or invalid start"):!i||!i.isValid?vt.invalid("missing or invalid end"):i<g?vt.invalid("end before start",`The end of an interval must be after its start, but you had start=${g.toISO()} and end=${i.toISO()}`):null}class vt{constructor(i){this.s=i.start,this.e=i.end,this.invalid=i.invalid||null,this.isLuxonInterval=!0}static invalid(i,m=null){if(!i)throw new v("need to specify a reason the Interval is invalid");const p=i instanceof Sa?i:new Sa(i,m);if(yt.throwOnInvalid)throw new c(p);return new vt({invalid:p})}static fromDateTimes(i,m){const p=Ta(i),w=Ta(m),O=Ro(p,w);return O??new vt({start:p,end:w})}static after(i,m){const p=We.fromDurationLike(m),w=Ta(i);return vt.fromDateTimes(w,w.plus(p))}static before(i,m){const p=We.fromDurationLike(m),w=Ta(i);return vt.fromDateTimes(w.minus(p),w)}static fromISO(i,m){const[p,w]=(i||"").split("/",2);if(p&&w){let O,q;try{O=je.fromISO(p,m),q=O.isValid}catch{q=!1}let H,V;try{H=je.fromISO(w,m),V=H.isValid}catch{V=!1}if(q&&V)return vt.fromDateTimes(O,H);if(q){const fe=We.fromISO(w,m);if(fe.isValid)return vt.after(O,fe)}else if(V){const fe=We.fromISO(p,m);if(fe.isValid)return vt.before(H,fe)}}return vt.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static isInterval(i){return i&&i.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(i="milliseconds"){return this.isValid?this.toDuration(i).get(i):NaN}count(i="milliseconds",m){if(!this.isValid)return NaN;const p=this.start.startOf(i,m);let w;return m!=null&&m.useLocaleWeeks?w=this.end.reconfigure({locale:p.locale}):w=this.end,w=w.startOf(i,m),Math.floor(w.diff(p,i).get(i))+(w.valueOf()!==this.end.valueOf())}hasSame(i){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,i):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(i){return this.isValid?this.s>i:!1}isBefore(i){return this.isValid?this.e<=i:!1}contains(i){return this.isValid?this.s<=i&&this.e>i:!1}set({start:i,end:m}={}){return this.isValid?vt.fromDateTimes(i||this.s,m||this.e):this}splitAt(...i){if(!this.isValid)return[];const m=i.map(Ta).filter(q=>this.contains(q)).sort((q,H)=>q.toMillis()-H.toMillis()),p=[];let{s:w}=this,O=0;for(;w<this.e;){const q=m[O]||this.e,H=+q>+this.e?this.e:q;p.push(vt.fromDateTimes(w,H)),w=H,O+=1}return p}splitBy(i){const m=We.fromDurationLike(i);if(!this.isValid||!m.isValid||m.as("milliseconds")===0)return[];let{s:p}=this,w=1,O;const q=[];for(;p<this.e;){const H=this.start.plus(m.mapUnits(V=>V*w));O=+H>+this.e?this.e:H,q.push(vt.fromDateTimes(p,O)),p=O,w+=1}return q}divideEqually(i){return this.isValid?this.splitBy(this.length()/i).slice(0,i):[]}overlaps(i){return this.e>i.s&&this.s<i.e}abutsStart(i){return this.isValid?+this.e==+i.s:!1}abutsEnd(i){return this.isValid?+i.e==+this.s:!1}engulfs(i){return this.isValid?this.s<=i.s&&this.e>=i.e:!1}equals(i){return!this.isValid||!i.isValid?!1:this.s.equals(i.s)&&this.e.equals(i.e)}intersection(i){if(!this.isValid)return this;const m=this.s>i.s?this.s:i.s,p=this.e<i.e?this.e:i.e;return m>=p?null:vt.fromDateTimes(m,p)}union(i){if(!this.isValid)return this;const m=this.s<i.s?this.s:i.s,p=this.e>i.e?this.e:i.e;return vt.fromDateTimes(m,p)}static merge(i){const[m,p]=i.sort((w,O)=>w.s-O.s).reduce(([w,O],q)=>O?O.overlaps(q)||O.abutsStart(q)?[w,O.union(q)]:[w.concat([O]),q]:[w,q],[[],null]);return p&&m.push(p),m}static xor(i){let m=null,p=0;const w=[],O=i.map(V=>[{time:V.s,type:"s"},{time:V.e,type:"e"}]),q=Array.prototype.concat(...O),H=q.sort((V,fe)=>V.time-fe.time);for(const V of H)p+=V.type==="s"?1:-1,p===1?m=V.time:(m&&+m!=+V.time&&w.push(vt.fromDateTimes(m,V.time)),m=null);return vt.merge(w)}difference(...i){return vt.xor([this].concat(i)).map(m=>this.intersection(m)).filter(m=>m&&!m.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:pl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(i=T,m={}){return this.isValid?Pt.create(this.s.loc.clone(m),i).formatInterval(this):pl}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:pl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:pl}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:pl}toFormat(i,{separator:m=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${m}${this.e.toFormat(i)}`:pl}toDuration(i,m){return this.isValid?this.e.diff(this.s,i,m):We.invalid(this.invalidReason)}mapEndpoints(i){return vt.fromDateTimes(i(this.s),i(this.e))}}class ms{static hasDST(i=yt.defaultZone){const m=je.now().setZone(i).set({month:12});return!i.isUniversal&&m.offset!==m.set({month:6}).offset}static isValidIANAZone(i){return Te.isValidZone(i)}static normalizeZone(i){return Ft(i,yt.defaultZone)}static getStartOfWeek({locale:i=null,locObj:m=null}={}){return(m||Ge.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:m=null}={}){return(m||Ge.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:m=null}={}){return(m||Ge.create(i)).getWeekendDays().slice()}static months(i="long",{locale:m=null,numberingSystem:p=null,locObj:w=null,outputCalendar:O="gregory"}={}){return(w||Ge.create(m,p,O)).months(i)}static monthsFormat(i="long",{locale:m=null,numberingSystem:p=null,locObj:w=null,outputCalendar:O="gregory"}={}){return(w||Ge.create(m,p,O)).months(i,!0)}static weekdays(i="long",{locale:m=null,numberingSystem:p=null,locObj:w=null}={}){return(w||Ge.create(m,p,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:m=null,numberingSystem:p=null,locObj:w=null}={}){return(w||Ge.create(m,p,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return Ge.create(i).meridiems()}static eras(i="short",{locale:m=null}={}){return Ge.create(m,null,"gregory").eras(i)}static features(){return{relative:Yr(),localeWeek:bn()}}}function fa(g,i){const m=w=>w.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),p=m(i)-m(g);return Math.floor(We.fromMillis(p).as("days"))}function gs(g,i,m){const p=[["years",(V,fe)=>fe.year-V.year],["quarters",(V,fe)=>fe.quarter-V.quarter+(fe.year-V.year)*4],["months",(V,fe)=>fe.month-V.month+(fe.year-V.year)*12],["weeks",(V,fe)=>{const ve=fa(V,fe);return(ve-ve%7)/7}],["days",fa]],w={},O=g;let q,H;for(const[V,fe]of p)m.indexOf(V)>=0&&(q=V,w[V]=fe(g,i),H=O.plus(w),H>i?(w[V]--,g=O.plus(w),g>i&&(H=g,w[V]--,g=O.plus(w))):g=H);return[g,w,H,q]}function Au(g,i,m,p){let[w,O,q,H]=gs(g,i,m);const V=i-w,fe=m.filter(Le=>["hours","minutes","seconds","milliseconds"].indexOf(Le)>=0);fe.length===0&&(q<i&&(q=w.plus({[H]:1})),q!==w&&(O[H]=(O[H]||0)+V/(q-w)));const ve=We.fromObject(O,p);return fe.length>0?We.fromMillis(V,p).shiftTo(...fe).plus(ve):ve}const ku="missing Intl.DateTimeFormat.formatToParts support";function et(g,i=m=>m){return{regex:g,deser:([m])=>i(so(m))}}const er="[ ]",_u=new RegExp(er,"g");function vl(g){return g.replace(/\./g,"\\.?").replace(_u,er)}function tr(g){return g.replace(/\./g,"").replace(_u," ").toLowerCase()}function aa(g,i){return g===null?null:{regex:RegExp(g.map(vl).join("|")),deser:([m])=>g.findIndex(p=>tr(m)===tr(p))+i}}function ar(g,i){return{regex:g,deser:([,m,p])=>Kl(m,p),groups:i}}function xs(g){return{regex:g,deser:([i])=>i}}function qn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function bl(g,i){const m=oa(i),p=oa(i,"{2}"),w=oa(i,"{3}"),O=oa(i,"{4}"),q=oa(i,"{6}"),H=oa(i,"{1,2}"),V=oa(i,"{1,3}"),fe=oa(i,"{1,6}"),ve=oa(i,"{1,9}"),Le=oa(i,"{2,4}"),Ie=oa(i,"{4,6}"),ke=Qt=>({regex:RegExp(qn(Qt.val)),deser:([En])=>En,literal:!0}),It=(Qt=>{if(g.literal)return ke(Qt);switch(Qt.val){case"G":return aa(i.eras("short"),0);case"GG":return aa(i.eras("long"),0);case"y":return et(fe);case"yy":return et(Le,Jl);case"yyyy":return et(O);case"yyyyy":return et(Ie);case"yyyyyy":return et(q);case"M":return et(H);case"MM":return et(p);case"MMM":return aa(i.months("short",!0),1);case"MMMM":return aa(i.months("long",!0),1);case"L":return et(H);case"LL":return et(p);case"LLL":return aa(i.months("short",!1),1);case"LLLL":return aa(i.months("long",!1),1);case"d":return et(H);case"dd":return et(p);case"o":return et(V);case"ooo":return et(w);case"HH":return et(p);case"H":return et(H);case"hh":return et(p);case"h":return et(H);case"mm":return et(p);case"m":return et(H);case"q":return et(H);case"qq":return et(p);case"s":return et(H);case"ss":return et(p);case"S":return et(V);case"SSS":return et(w);case"u":return xs(ve);case"uu":return xs(H);case"uuu":return et(m);case"a":return aa(i.meridiems(),0);case"kkkk":return et(O);case"kk":return et(Le,Jl);case"W":return et(H);case"WW":return et(p);case"E":case"c":return et(m);case"EEE":return aa(i.weekdays("short",!1),1);case"EEEE":return aa(i.weekdays("long",!1),1);case"ccc":return aa(i.weekdays("short",!0),1);case"cccc":return aa(i.weekdays("long",!0),1);case"Z":case"ZZ":return ar(new RegExp(`([+-]${H.source})(?::(${p.source}))?`),2);case"ZZZ":return ar(new RegExp(`([+-]${H.source})(${p.source})?`),2);case"z":return xs(/[a-z_+-/]{1,256}?/i);case" ":return xs(/[^\S\n\r]/);default:return ke(Qt)}})(g)||{invalidReason:ku};return It.token=g,It}const ni={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function zu(g,i,m){const{type:p,value:w}=g;if(p==="literal"){const V=/^\s+$/.test(w);return{literal:!V,val:V?" ":w}}const O=i[p];let q=p;p==="hour"&&(i.hour12!=null?q=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?q="hour12":q="hour24":q=m.hour12?"hour12":"hour24");let H=ni[q];if(typeof H=="object"&&(H=H[O]),H)return{literal:!1,val:H}}function Hn(g){return[`^${g.map(m=>m.regex).reduce((m,p)=>`${m}(${p.source})`,"")}$`,g]}function Uu(g,i,m){const p=g.match(i);if(p){const w={};let O=1;for(const q in m)if(kn(m,q)){const H=m[q],V=H.groups?H.groups+1:1;!H.literal&&H.token&&(w[H.token.val[0]]=H.deser(p.slice(O,O+V))),O+=V}return[p,w]}else return[p,{}]}function qu(g){const i=O=>{switch(O){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let m=null,p;return De(g.z)||(m=Te.create(g.z)),De(g.Z)||(m||(m=new ut(g.Z)),p=g.Z),De(g.q)||(g.M=(g.q-1)*3+1),De(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),De(g.u)||(g.S=Fr(g.u)),[Object.keys(g).reduce((O,q)=>{const H=i(q);return H&&(O[H]=g[q]),O},{}),m,p]}let nr=null;function ko(){return nr||(nr=je.fromMillis(1555555555555)),nr}function _o(g,i){if(g.literal)return g;const m=Pt.macroTokenToFormatOpts(g.val),p=ja(m,i);return p==null||p.includes(void 0)?g:p}function Hu(g,i){return Array.prototype.concat(...g.map(m=>_o(m,i)))}class li{constructor(i,m){if(this.locale=i,this.format=m,this.tokens=Hu(Pt.parseFormat(m),i),this.units=this.tokens.map(p=>bl(p,i)),this.disqualifyingUnit=this.units.find(p=>p.invalidReason),!this.disqualifyingUnit){const[p,w]=Hn(this.units);this.regex=RegExp(p,"i"),this.handlers=w}}explainFromTokens(i){if(this.isValid){const[m,p]=Uu(i,this.regex,this.handlers),[w,O,q]=p?qu(p):[null,null,void 0];if(kn(p,"a")&&kn(p,"H"))throw new h("Can't include meridiem when specifying 24-hour format");return{input:i,tokens:this.tokens,regex:this.regex,rawMatches:m,matches:p,result:w,zone:O,specificOffset:q}}else return{input:i,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function si(g,i,m){return new li(g,m).explainFromTokens(i)}function ri(g,i,m){const{result:p,zone:w,specificOffset:O,invalidReason:q}=si(g,i,m);return[p,w,O,q]}function ja(g,i){if(!g)return null;const p=Pt.create(i,g).dtFormatter(ko()),w=p.formatToParts(),O=p.resolvedOptions();return w.map(q=>zu(q,g,O))}const Sl="Invalid DateTime",va=864e13;function Fa(g){return new Sa("unsupported zone",`the zone "${g.name}" is not supported`)}function ys(g){return g.weekData===null&&(g.weekData=Gt(g.c)),g.weekData}function Nl(g){return g.localWeekData===null&&(g.localWeekData=Gt(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function Ga(g,i){const m={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new je({...m,...i,old:m})}function lr(g,i,m){let p=g-i*60*1e3;const w=m.offset(p);if(i===w)return[p,i];p-=(w-i)*60*1e3;const O=m.offset(p);return w===O?[p,w]:[g-Math.min(w,O)*60*1e3,Math.max(w,O)]}function Pa(g,i){g+=i*60*1e3;const m=new Date(g);return{year:m.getUTCFullYear(),month:m.getUTCMonth()+1,day:m.getUTCDate(),hour:m.getUTCHours(),minute:m.getUTCMinutes(),second:m.getUTCSeconds(),millisecond:m.getUTCMilliseconds()}}function ps(g,i,m){return lr(ta(g),i,m)}function vs(g,i){const m=g.o,p=g.c.year+Math.trunc(i.years),w=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,O={...g.c,year:p,month:w,day:Math.min(g.c.day,Gs(p,w))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},q=We.fromObject({years:i.years-Math.trunc(i.years),quarters:i.quarters-Math.trunc(i.quarters),months:i.months-Math.trunc(i.months),weeks:i.weeks-Math.trunc(i.weeks),days:i.days-Math.trunc(i.days),hours:i.hours,minutes:i.minutes,seconds:i.seconds,milliseconds:i.milliseconds}).as("milliseconds"),H=ta(O);let[V,fe]=lr(H,m,g.zone);return q!==0&&(V+=q,fe=g.zone.offset(V)),{ts:V,o:fe}}function _a(g,i,m,p,w,O){const{setZone:q,zone:H}=m;if(g&&Object.keys(g).length!==0||i){const V=i||H,fe=je.fromObject(g,{...m,zone:V,specificOffset:O});return q?fe:fe.setZone(H)}else return je.invalid(new Sa("unparsable",`the input "${w}" can't be parsed as ${p}`))}function sr(g,i,m=!0){return g.isValid?Pt.create(Ge.create("en-US"),{allowZ:m,forceSimple:!0}).formatDateTimeFromString(g,i):null}function na(g,i,m){const p=g.c.year>9999||g.c.year<0;let w="";if(p&&g.c.year>=0&&(w+="+"),w+=it(g.c.year,p?6:4),m==="year")return w;if(i){if(w+="-",w+=it(g.c.month),m==="month")return w;w+="-"}else if(w+=it(g.c.month),m==="month")return w;return w+=it(g.c.day),w}function rr(g,i,m,p,w,O,q){let H=!m||g.c.millisecond!==0||g.c.second!==0,V="";switch(q){case"day":case"month":case"year":break;default:if(V+=it(g.c.hour),q==="hour")break;if(i){if(V+=":",V+=it(g.c.minute),q==="minute")break;H&&(V+=":",V+=it(g.c.second))}else{if(V+=it(g.c.minute),q==="minute")break;H&&(V+=it(g.c.second))}if(q==="second")break;H&&(!p||g.c.millisecond!==0)&&(V+=".",V+=it(g.c.millisecond,3))}return w&&(g.isOffsetFixed&&g.offset===0&&!O?V+="Z":g.o<0?(V+="-",V+=it(Math.trunc(-g.o/60)),V+=":",V+=it(Math.trunc(-g.o%60))):(V+="+",V+=it(Math.trunc(g.o/60)),V+=":",V+=it(Math.trunc(g.o%60)))),O&&(V+="["+g.zone.ianaName+"]"),V}const Za={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Lu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ir={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Wa=["year","month","day","hour","minute","second","millisecond"],ii=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Bu=["year","ordinal","hour","minute","second","millisecond"];function wl(g){const i={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[g.toLowerCase()];if(!i)throw new f(g);return i}function ui(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return wl(g)}}function Ea(g){if(dn===void 0&&(dn=yt.now()),g.type!=="iana")return g.offset(dn);const i=g.name;let m=ha.get(i);return m===void 0&&(m=g.offset(dn),ha.set(i,m)),m}function Ln(g,i){const m=Ft(i.zone,yt.defaultZone);if(!m.isValid)return je.invalid(Fa(m));const p=Ge.fromObject(i);let w,O;if(De(g.year))w=yt.now();else{for(const V of Wa)De(g[V])&&(g[V]=Za[V]);const q=$s(g)||An(g);if(q)return je.invalid(q);const H=Ea(m);[w,O]=ps(g,H,m)}return new je({ts:w,zone:m,loc:p,o:O})}function Bn(g,i,m){const p=De(m.round)?!0:m.round,w=De(m.rounding)?"trunc":m.rounding,O=(H,V)=>(H=Xl(H,p||m.calendary?0:2,m.calendary?"round":w),i.loc.clone(m).relFormatter(m).format(H,V)),q=H=>m.calendary?i.hasSame(g,H)?0:i.startOf(H).diff(g.startOf(H),H).get(H):i.diff(g,H).get(H);if(m.unit)return O(q(m.unit),m.unit);for(const H of m.units){const V=q(H);if(Math.abs(V)>=1)return O(V,H)}return O(g>i?-0:0,m.units[m.units.length-1])}function bs(g){let i={},m;return g.length>0&&typeof g[g.length-1]=="object"?(i=g[g.length-1],m=Array.from(g).slice(0,g.length-1)):m=Array.from(g),[i,m]}let dn;const ha=new Map;class je{constructor(i){const m=i.zone||yt.defaultZone;let p=i.invalid||(Number.isNaN(i.ts)?new Sa("invalid input"):null)||(m.isValid?null:Fa(m));this.ts=De(i.ts)?yt.now():i.ts;let w=null,O=null;if(!p)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(m))[w,O]=[i.old.c,i.old.o];else{const H=Na(i.o)&&!i.old?i.o:m.offset(this.ts);w=Pa(this.ts,H),p=Number.isNaN(w.year)?new Sa("invalid input"):null,w=p?null:w,O=p?null:H}this._zone=m,this.loc=i.loc||Ge.create(),this.invalid=p,this.weekData=null,this.localWeekData=null,this.c=w,this.o=O,this.isLuxonDateTime=!0}static now(){return new je({})}static local(){const[i,m]=bs(arguments),[p,w,O,q,H,V,fe]=m;return Ln({year:p,month:w,day:O,hour:q,minute:H,second:V,millisecond:fe},i)}static utc(){const[i,m]=bs(arguments),[p,w,O,q,H,V,fe]=m;return i.zone=ut.utcInstance,Ln({year:p,month:w,day:O,hour:q,minute:H,second:V,millisecond:fe},i)}static fromJSDate(i,m={}){const p=gu(i)?i.valueOf():NaN;if(Number.isNaN(p))return je.invalid("invalid input");const w=Ft(m.zone,yt.defaultZone);return w.isValid?new je({ts:p,zone:w,loc:Ge.fromObject(m)}):je.invalid(Fa(w))}static fromMillis(i,m={}){if(Na(i))return i<-va||i>va?je.invalid("Timestamp out of range"):new je({ts:i,zone:Ft(m.zone,yt.defaultZone),loc:Ge.fromObject(m)});throw new v(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,m={}){if(Na(i))return new je({ts:i*1e3,zone:Ft(m.zone,yt.defaultZone),loc:Ge.fromObject(m)});throw new v("fromSeconds requires a numerical input")}static fromObject(i,m={}){i=i||{};const p=Ft(m.zone,yt.defaultZone);if(!p.isValid)return je.invalid(Fa(p));const w=Ge.fromObject(m),O=rn(i,ui),{minDaysInFirstWeek:q,startOfWeek:H}=hu(O,w),V=yt.now(),fe=De(m.specificOffset)?p.offset(V):m.specificOffset,ve=!De(O.ordinal),Le=!De(O.year),Ie=!De(O.month)||!De(O.day),ke=Le||Ie,Et=O.weekYear||O.weekNumber;if((ke||ve)&&Et)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Ie&&ve)throw new h("Can't mix ordinal dates with month/day");const It=Et||O.weekday&&!ke;let Qt,En,fn=Pa(V,fe);It?(Qt=ii,En=Lu,fn=Gt(fn,q,H)):ve?(Qt=Bu,En=ir,fn=Il(fn)):(Qt=Wa,En=Za);let ur=!1;for(const Xa of Qt){const cr=O[Xa];De(cr)?ur?O[Xa]=En[Xa]:O[Xa]=fn[Xa]:ur=!0}const Vn=It?mu(O,q,H):ve?Ql(O):$s(O),Qa=Vn||An(O);if(Qa)return je.invalid(Qa);const Tn=It?Rn(O,q,H):ve?fu(O):O,[hn,ci]=ps(Tn,fe,p),Yn=new je({ts:hn,zone:p,o:ci,loc:w});return O.weekday&&ke&&i.weekday!==Yn.weekday?je.invalid("mismatched weekday",`you can't specify both a weekday of ${O.weekday} and a date of ${Yn.toISO()}`):Yn.isValid?Yn:je.invalid(Yn.invalid)}static fromISO(i,m={}){const[p,w]=Eu(i);return _a(p,w,m,"ISO 8601",i)}static fromRFC2822(i,m={}){const[p,w]=Tu(i);return _a(p,w,m,"RFC 2822",i)}static fromHTTP(i,m={}){const[p,w]=Mu(i);return _a(p,w,m,"HTTP",m)}static fromFormat(i,m,p={}){if(De(i)||De(m))throw new v("fromFormat requires an input string and a format");const{locale:w=null,numberingSystem:O=null}=p,q=Ge.fromOpts({locale:w,numberingSystem:O,defaultToEN:!0}),[H,V,fe,ve]=ri(q,i,m);return ve?je.invalid(ve):_a(H,V,p,`format ${m}`,i,fe)}static fromString(i,m,p={}){return je.fromFormat(i,m,p)}static fromSQL(i,m={}){const[p,w]=Du(i);return _a(p,w,m,"SQL",i)}static invalid(i,m=null){if(!i)throw new v("need to specify a reason the DateTime is invalid");const p=i instanceof Sa?i:new Sa(i,m);if(yt.throwOnInvalid)throw new r(p);return new je({invalid:p})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,m={}){const p=ja(i,Ge.fromObject(m));return p?p.map(w=>w?w.val:null).join(""):null}static expandFormat(i,m={}){return Hu(Pt.parseFormat(i),Ge.fromObject(m)).map(w=>w.val).join("")}static resetCache(){dn=void 0,ha.clear()}get(i){return this[i]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ys(this).weekYear:NaN}get weekNumber(){return this.isValid?ys(this).weekNumber:NaN}get weekday(){return this.isValid?ys(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?Il(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 i=864e5,m=6e4,p=ta(this.c),w=this.zone.offset(p-i),O=this.zone.offset(p+i),q=this.zone.offset(p-w*m),H=this.zone.offset(p-O*m);if(q===H)return[this];const V=p-q*m,fe=p-H*m,ve=Pa(V,q),Le=Pa(fe,H);return ve.hour===Le.hour&&ve.minute===Le.minute&&ve.second===Le.second&&ve.millisecond===Le.millisecond?[Ga(this,{ts:V}),Ga(this,{ts:fe})]:[this]}get isInLeapYear(){return ol(this.year)}get daysInMonth(){return Gs(this.year,this.month)}get daysInYear(){return this.isValid?sn(this.year):NaN}get weeksInWeekYear(){return this.isValid?dl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?dl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:m,numberingSystem:p,calendar:w}=Pt.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:m,numberingSystem:p,outputCalendar:w}}toUTC(i=0,m={}){return this.setZone(ut.instance(i),m)}toLocal(){return this.setZone(yt.defaultZone)}setZone(i,{keepLocalTime:m=!1,keepCalendarTime:p=!1}={}){if(i=Ft(i,yt.defaultZone),i.equals(this.zone))return this;if(i.isValid){let w=this.ts;if(m||p){const O=i.offset(this.ts),q=this.toObject();[w]=ps(q,O,i)}return Ga(this,{ts:w,zone:i})}else return je.invalid(Fa(i))}reconfigure({locale:i,numberingSystem:m,outputCalendar:p}={}){const w=this.loc.clone({locale:i,numberingSystem:m,outputCalendar:p});return Ga(this,{loc:w})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const m=rn(i,ui),{minDaysInFirstWeek:p,startOfWeek:w}=hu(m,this.loc),O=!De(m.weekYear)||!De(m.weekNumber)||!De(m.weekday),q=!De(m.ordinal),H=!De(m.year),V=!De(m.month)||!De(m.day),fe=H||V,ve=m.weekYear||m.weekNumber;if((fe||q)&&ve)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(V&&q)throw new h("Can't mix ordinal dates with month/day");let Le;O?Le=Rn({...Gt(this.c,p,w),...m},p,w):De(m.ordinal)?(Le={...this.toObject(),...m},De(m.day)&&(Le.day=Math.min(Gs(Le.year,Le.month),Le.day))):Le=fu({...Il(this.c),...m});const[Ie,ke]=ps(Le,this.o,this.zone);return Ga(this,{ts:Ie,o:ke})}plus(i){if(!this.isValid)return this;const m=We.fromDurationLike(i);return Ga(this,vs(this,m))}minus(i){if(!this.isValid)return this;const m=We.fromDurationLike(i).negate();return Ga(this,vs(this,m))}startOf(i,{useLocaleWeeks:m=!1}={}){if(!this.isValid)return this;const p={},w=We.normalizeUnit(i);switch(w){case"years":p.month=1;case"quarters":case"months":p.day=1;case"weeks":case"days":p.hour=0;case"hours":p.minute=0;case"minutes":p.second=0;case"seconds":p.millisecond=0;break}if(w==="weeks")if(m){const O=this.loc.getStartOfWeek(),{weekday:q}=this;q<O&&(p.weekNumber=this.weekNumber-1),p.weekday=O}else p.weekday=1;if(w==="quarters"){const O=Math.ceil(this.month/3);p.month=(O-1)*3+1}return this.set(p)}endOf(i,m){return this.isValid?this.plus({[i]:1}).startOf(i,m).minus(1):this}toFormat(i,m={}){return this.isValid?Pt.create(this.loc.redefaultToEN(m)).formatDateTimeFromString(this,i):Sl}toLocaleString(i=T,m={}){return this.isValid?Pt.create(this.loc.clone(m),i).formatDateTime(this):Sl}toLocaleParts(i={}){return this.isValid?Pt.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:m=!1,suppressMilliseconds:p=!1,includeOffset:w=!0,extendedZone:O=!1,precision:q="milliseconds"}={}){if(!this.isValid)return null;q=wl(q);const H=i==="extended";let V=na(this,H,q);return Wa.indexOf(q)>=3&&(V+="T"),V+=rr(this,H,m,p,w,O,q),V}toISODate({format:i="extended",precision:m="day"}={}){return this.isValid?na(this,i==="extended",wl(m)):null}toISOWeekDate(){return sr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:m=!1,includeOffset:p=!0,includePrefix:w=!1,extendedZone:O=!1,format:q="extended",precision:H="milliseconds"}={}){return this.isValid?(H=wl(H),(w&&Wa.indexOf(H)>=3?"T":"")+rr(this,q==="extended",m,i,p,O,H)):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?na(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:m=!1,includeOffsetSpace:p=!0}={}){let w="HH:mm:ss.SSS";return(m||i)&&(p&&(w+=" "),m?w+="z":i&&(w+="ZZ")),sr(this,w,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():Sl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(i={}){if(!this.isValid)return{};const m={...this.c};return i.includeConfig&&(m.outputCalendar=this.outputCalendar,m.numberingSystem=this.loc.numberingSystem,m.locale=this.loc.locale),m}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(i,m="milliseconds",p={}){if(!this.isValid||!i.isValid)return We.invalid("created by diffing an invalid DateTime");const w={locale:this.locale,numberingSystem:this.numberingSystem,...p},O=cl(m).map(We.normalizeUnit),q=i.valueOf()>this.valueOf(),H=q?this:i,V=q?i:this,fe=Au(H,V,O,w);return q?fe.negate():fe}diffNow(i="milliseconds",m={}){return this.diff(je.now(),i,m)}until(i){return this.isValid?vt.fromDateTimes(this,i):this}hasSame(i,m,p){if(!this.isValid)return!1;const w=i.valueOf(),O=this.setZone(i.zone,{keepLocalTime:!0});return O.startOf(m,p)<=w&&w<=O.endOf(m,p)}equals(i){return this.isValid&&i.isValid&&this.valueOf()===i.valueOf()&&this.zone.equals(i.zone)&&this.loc.equals(i.loc)}toRelative(i={}){if(!this.isValid)return null;const m=i.base||je.fromObject({},{zone:this.zone}),p=i.padding?this<m?-i.padding:i.padding:0;let w=["years","months","days","hours","minutes","seconds"],O=i.unit;return Array.isArray(i.unit)&&(w=i.unit,O=void 0),Bn(m,this.plus(p),{...i,numeric:"always",units:w,unit:O})}toRelativeCalendar(i={}){return this.isValid?Bn(i.base||je.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(je.isDateTime))throw new v("min requires all arguments be DateTimes");return xu(i,m=>m.valueOf(),Math.min)}static max(...i){if(!i.every(je.isDateTime))throw new v("max requires all arguments be DateTimes");return xu(i,m=>m.valueOf(),Math.max)}static fromFormatExplain(i,m,p={}){const{locale:w=null,numberingSystem:O=null}=p,q=Ge.fromOpts({locale:w,numberingSystem:O,defaultToEN:!0});return si(q,i,m)}static fromStringExplain(i,m,p={}){return je.fromFormatExplain(i,m,p)}static buildFormatParser(i,m={}){const{locale:p=null,numberingSystem:w=null}=m,O=Ge.fromOpts({locale:p,numberingSystem:w,defaultToEN:!0});return new li(O,i)}static fromFormatParser(i,m,p={}){if(De(i)||De(m))throw new v("fromFormatParser requires an input string and a format parser");const{locale:w=null,numberingSystem:O=null}=p,q=Ge.fromOpts({locale:w,numberingSystem:O,defaultToEN:!0});if(!q.equals(m.locale))throw new v(`fromFormatParser called with a locale of ${q}, but the format parser was created for ${m.locale}`);const{result:H,zone:V,specificOffset:fe,invalidReason:ve}=m.explainFromTokens(i);return ve?je.invalid(ve):_a(H,V,p,`format ${m.format}`,i,fe)}static get DATE_SHORT(){return T}static get DATE_MED(){return j}static get DATE_MED_WITH_WEEKDAY(){return D}static get DATE_FULL(){return C}static get DATE_HUGE(){return M}static get TIME_SIMPLE(){return R}static get TIME_WITH_SECONDS(){return I}static get TIME_WITH_SHORT_OFFSET(){return Y}static get TIME_WITH_LONG_OFFSET(){return G}static get TIME_24_SIMPLE(){return ee}static get TIME_24_WITH_SECONDS(){return de}static get TIME_24_WITH_SHORT_OFFSET(){return Z}static get TIME_24_WITH_LONG_OFFSET(){return P}static get DATETIME_SHORT(){return W}static get DATETIME_SHORT_WITH_SECONDS(){return ne}static get DATETIME_MED(){return z}static get DATETIME_MED_WITH_SECONDS(){return Q}static get DATETIME_MED_WITH_WEEKDAY(){return _}static get DATETIME_FULL(){return ce}static get DATETIME_FULL_WITH_SECONDS(){return he}static get DATETIME_HUGE(){return B}static get DATETIME_HUGE_WITH_SECONDS(){return $}}function Ta(g){if(je.isDateTime(g))return g;if(g&&g.valueOf&&Na(g.valueOf()))return je.fromJSDate(g);if(g&&typeof g=="object")return je.fromObject(g);throw new v(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Ia="3.7.2";return Aa.DateTime=je,Aa.Duration=We,Aa.FixedOffsetZone=ut,Aa.IANAZone=Te,Aa.Info=ms,Aa.Interval=vt,Aa.InvalidZone=Rt,Aa.Settings=yt,Aa.SystemZone=Se,Aa.VERSION=Ia,Aa.Zone=ie,Aa}var kg;function eh(){return kg||(kg=1,(function(l){var f,v,N,b,x,Rf,T,$l;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const r=u2();var c;(function(C){C.Second="Second",C.Minute="Minute",C.Hour="Hour",C.Day="Day",C.Month="Month",C.Year="Year"})(c||(l.TimeUnit=c={}));var o;(function(C){C.Add="Add",C.Subtract="Subtract"})(o||(l.DateMathOp=o={})),l.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const D=class D{constructor(M,R){rt(this,T);rt(this,f);rt(this,v,null);rt(this,N,null);rt(this,b,{add:{[c.Year]:this.addYear.bind(this),[c.Month]:this.addMonth.bind(this),[c.Day]:this.addDay.bind(this),[c.Hour]:this.addHour.bind(this),[c.Minute]:this.addMinute.bind(this),[c.Second]:this.addSecond.bind(this)},subtract:{[c.Year]:this.subtractYear.bind(this),[c.Month]:this.subtractMonth.bind(this),[c.Day]:this.subtractDay.bind(this),[c.Hour]:this.subtractHour.bind(this),[c.Minute]:this.subtractMinute.bind(this),[c.Second]:this.subtractSecond.bind(this)}});const I={zone:R};if(M?M instanceof D?(Ee(this,f,te(M,f)),Ee(this,v,te(M,v)),Ee(this,N,te(M,N))):M instanceof Date?Ee(this,f,r.DateTime.fromJSDate(M,I)):typeof M=="number"?Ee(this,f,r.DateTime.fromMillis(M,I)):(Ee(this,f,r.DateTime.fromISO(M,I)),te(this,f).isValid||Ee(this,f,r.DateTime.fromRFC2822(M,I)),te(this,f).isValid||Ee(this,f,r.DateTime.fromSQL(M,I)),te(this,f).isValid||Ee(this,f,r.DateTime.fromFormat(M,"EEE, d MMM yyyy HH:mm:ss",I))):Ee(this,f,r.DateTime.local()),!te(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${M}`);R&&R!==te(this,f).zoneName&&Ee(this,f,te(this,f).setZone(R))}get dstStart(){return te(this,v)}set dstStart(M){Ee(this,v,M)}get dstEnd(){return te(this,N)}set dstEnd(M){Ee(this,N,M)}addYear(){Ee(this,f,te(this,f).plus({years:1}))}addMonth(){Ee(this,f,te(this,f).plus({months:1}).startOf("month"))}addDay(){Ee(this,f,te(this,f).plus({days:1}).startOf("day"))}addHour(){Ee(this,f,te(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Ee(this,f,te(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Ee(this,f,te(this,f).plus({seconds:1}))}subtractYear(){Ee(this,f,te(this,f).minus({years:1}))}subtractMonth(){Ee(this,f,te(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Ee(this,f,te(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Ee(this,f,te(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Ee(this,f,te(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Ee(this,f,te(this,f).minus({seconds:1}))}addUnit(M){te(this,b).add[M]()}subtractUnit(M){te(this,b).subtract[M]()}invokeDateOperation(M,R){if(M===o.Add){this.addUnit(R);return}if(M===o.Subtract){this.subtractUnit(R);return}throw new Error(`Invalid verb: ${M}`)}getDate(){return te(this,f).day}getFullYear(){return te(this,f).year}getDay(){const M=te(this,f).weekday;return M===7?0:M}getMonth(){return te(this,f).month-1}getHours(){return te(this,f).hour}getMinutes(){return te(this,f).minute}getSeconds(){return te(this,f).second}getMilliseconds(){return te(this,f).millisecond}getUTCOffset(){return te(this,f).offset}setStartOfDay(){Ee(this,f,te(this,f).startOf("day"))}setEndOfDay(){Ee(this,f,te(this,f).endOf("day"))}getTime(){return te(this,f).valueOf()}getUTCDate(){return we(this,T,$l).call(this).day}getUTCFullYear(){return we(this,T,$l).call(this).year}getUTCDay(){const M=we(this,T,$l).call(this).weekday;return M===7?0:M}getUTCMonth(){return we(this,T,$l).call(this).month-1}getUTCHours(){return we(this,T,$l).call(this).hour}getUTCMinutes(){return we(this,T,$l).call(this).minute}getUTCSeconds(){return we(this,T,$l).call(this).second}toISOString(){return te(this,f).toUTC().toISO()}toJSON(){return te(this,f).toJSON()}setDate(M){Ee(this,f,te(this,f).set({day:M}))}setFullYear(M){Ee(this,f,te(this,f).set({year:M}))}setDay(M){Ee(this,f,te(this,f).set({weekday:M}))}setMonth(M){Ee(this,f,te(this,f).set({month:M+1}))}setHours(M){Ee(this,f,te(this,f).set({hour:M}))}setMinutes(M){Ee(this,f,te(this,f).set({minute:M}))}setSeconds(M){Ee(this,f,te(this,f).set({second:M}))}setMilliseconds(M){Ee(this,f,te(this,f).set({millisecond:M}))}toString(){return this.toDate().toString()}toDate(){return te(this,f).toJSDate()}isLastDayOfMonth(){var I;const{day:M,month:R}=te(this,f);if(R===2){const Y=we(I=D,x,Rf).call(I,te(this,f).year);return M===l.DAYS_IN_MONTH[R-1]-(Y?0:1)}return M===l.DAYS_IN_MONTH[R-1]}isLastWeekdayOfMonth(){var Y;const{day:M,month:R}=te(this,f);let I;return R===2?I=l.DAYS_IN_MONTH[R-1]-(we(Y=D,x,Rf).call(Y,te(this,f).year)?0:1):I=l.DAYS_IN_MONTH[R-1],M>I-7}applyDateOperation(M,R,I){if(R===c.Month||R===c.Day){this.invokeDateOperation(M,R);return}const Y=this.getHours();this.invokeDateOperation(M,R);const G=this.getHours(),ee=G-Y;ee===2?I!==24&&(this.dstStart=G):ee===0&&this.getMinutes()===0&&this.getSeconds()===0&&I!==24&&(this.dstEnd=G)}};f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakMap,x=new WeakSet,Rf=function(M){return M%4===0&&M%100!==0||M%400===0},T=new WeakSet,$l=function(){return te(this,f).toUTC()},rt(D,x);let h=D;l.CronDate=h,l.default=h})(Nf)),Nf}var _g;function c2(){if(_g)return Xi;_g=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronMonth=void 0;const l=eh(),r=Hs(),c=1,o=12,h=Object.freeze([]);let f=class extends r.CronField{static get min(){return c}static get max(){return o}static get chars(){return h}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(N,b){super(N,b),this.validate()}get values(){return super.values}};return Xi.CronMonth=f,Xi}var Ji={},zg;function o2(){if(zg)return Ji;zg=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronSecond=void 0;const l=Hs(),r=0,c=59,o=Object.freeze([]);let h=class extends l.CronField{static get min(){return r}static get max(){return c}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Ji.CronSecond=h,Ji}var Ug;function th(){return Ug||(Ug=1,(function(l){var r=Rs&&Rs.__createBinding||(Object.create?(function(o,h,f,v){v===void 0&&(v=f);var N=Object.getOwnPropertyDescriptor(h,f);(!N||("get"in N?!h.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return h[f]}}),Object.defineProperty(o,v,N)}):(function(o,h,f,v){v===void 0&&(v=f),o[v]=h[f]})),c=Rs&&Rs.__exportStar||function(o,h){for(var f in o)f!=="default"&&!Object.prototype.hasOwnProperty.call(h,f)&&r(h,o,f)};Object.defineProperty(l,"__esModule",{value:!0}),c(n2(),l),c(l2(),l),c(s2(),l),c(Hs(),l),c(r2(),l),c(i2(),l),c(c2(),l),c(o2(),l)})(Rs)),Rs}var qg;function Qx(){var c,o,h,f,v,N,b,x,Wx,Ix;if(qg)return Gi;qg=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.CronFieldCollection=void 0;const l=th();let r=(x=class{constructor({second:D,minute:C,hour:M,dayOfMonth:R,month:I,dayOfWeek:Y}){rt(this,c);rt(this,o);rt(this,h);rt(this,f);rt(this,v);rt(this,N);if(!D)throw new Error("Validation error, Field second is missing");if(!C)throw new Error("Validation error, Field minute is missing");if(!M)throw new Error("Validation error, Field hour is missing");if(!R)throw new Error("Validation error, Field dayOfMonth is missing");if(!I)throw new Error("Validation error, Field month is missing");if(!Y)throw new Error("Validation error, Field dayOfWeek is missing");if(I.values.length===1&&!R.hasLastChar&&!(parseInt(R.values[0],10)<=l.CronMonth.daysInMonth[I.values[0]-1]))throw new Error("Invalid explicit day of month definition");Ee(this,c,D),Ee(this,o,C),Ee(this,h,M),Ee(this,v,I),Ee(this,N,Y),Ee(this,f,R)}static from(D,C){return new x({second:this.resolveField(l.CronSecond,D.second,C.second),minute:this.resolveField(l.CronMinute,D.minute,C.minute),hour:this.resolveField(l.CronHour,D.hour,C.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,D.dayOfMonth,C.dayOfMonth),month:this.resolveField(l.CronMonth,D.month,C.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,D.dayOfWeek,C.dayOfWeek)})}static resolveField(D,C,M){return M?M instanceof l.CronField?M:new D(M):C}get second(){return te(this,c)}get minute(){return te(this,o)}get hour(){return te(this,h)}get dayOfMonth(){return te(this,f)}get month(){return te(this,v)}get dayOfWeek(){return te(this,N)}static compactField(D){if(D.length===0)return[];const C=[];let M;return D.forEach((R,I,Y)=>{if(M===void 0){M={start:R,count:1};return}const G=Y[I-1]||M.start,ee=Y[I+1];if(R==="L"||R==="W"){C.push(M),C.push({start:R,count:1}),M=void 0;return}if(M.step===void 0&&ee!==void 0){const de=R-G,Z=ee-R;if(de<=Z){M={...M,count:2,end:R,step:de};return}M.step=1}R-(M.end??0)===M.step?(M.count++,M.end=R):(M.count===1?C.push({start:M.start,count:1}):M.count===2?(C.push({start:M.start,count:1}),C.push({start:M.end??G,count:1})):C.push(M),M={start:R,count:1})}),M&&C.push(M),C}stringifyField(D){var I;let C=D.max,M=D.values;if(D instanceof l.CronDayOfWeek){C=6;const Y=te(this,N).values;M=Y[Y.length-1]===7?Y.slice(0,-1):Y}D instanceof l.CronDayOfMonth&&(C=te(this,v).values.length===1?l.CronMonth.daysInMonth[te(this,v).values[0]-1]:D.max);const R=x.compactField(M);if(R.length===1){const Y=we(I=x,b,Wx).call(I,D,R[0],C);if(Y)return Y}return R.map(Y=>{var ee;const G=Y.count===1?Y.start.toString():we(ee=x,b,Ix).call(ee,Y,C);return D instanceof l.CronDayOfWeek&&D.nthDay>0?`${G}#${D.nthDay}`:G}).join(",")}stringify(D=!1){const C=[];return D&&C.push(this.stringifyField(te(this,c))),C.push(this.stringifyField(te(this,o)),this.stringifyField(te(this,h)),this.stringifyField(te(this,f)),this.stringifyField(te(this,v)),this.stringifyField(te(this,N))),C.join(" ")}serialize(){return{second:te(this,c).serialize(),minute:te(this,o).serialize(),hour:te(this,h).serialize(),dayOfMonth:te(this,f).serialize(),month:te(this,v).serialize(),dayOfWeek:te(this,N).serialize()}}},c=new WeakMap,o=new WeakMap,h=new WeakMap,f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakSet,Wx=function(D,C,M){const R=C.step;return R?R===1&&C.start===D.min&&C.end&&C.end>=M?D.hasQuestionMarkChar?"?":"*":R!==1&&C.start===D.min&&C.end&&C.end>=M-R+1?`*/${R}`:null:null},Ix=function(D,C){const M=D.step;if(M===1)return`${D.start}-${D.end}`;const R=D.start===0?D.count-1:D.count;if(!M)throw new Error("Unexpected range step");if(!D.end)throw new Error("Unexpected range end");if(M*R>D.end){const I=(G,ee)=>{if(typeof D.start!="number")throw new Error("Unexpected range start");return ee%M===0?D.start+ee:null};if(typeof D.start!="number")throw new Error("Unexpected range start");const Y={length:D.end-D.start+1};return Array.from(Y,I).filter(G=>G!==null).join(",")}return D.end===C-M+1?`${D.start}/${M}`:`${D.start}-${D.end}/${M}`},rt(x,b),x);return Gi.CronFieldCollection=r,Gi}var wf={},Hg;function ny(){return Hg||(Hg=1,(function(l){var h,f,v,N,b,x,S,T,j,Fl,C,_s,Xx,Jx,Kx,ey,Af,ty,ay,Rr;Object.defineProperty(l,"__esModule",{value:!0}),l.CronExpression=l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const r=eh();l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const c=1e4,W=class W{constructor(z,Q){rt(this,C);rt(this,h);rt(this,f);rt(this,v);rt(this,N);rt(this,b);rt(this,x);rt(this,S,null);rt(this,T,!1);Ee(this,h,Q),Ee(this,f,Q.tz),Ee(this,N,Q.startDate?new r.CronDate(Q.startDate,te(this,f)):null),Ee(this,b,Q.endDate?new r.CronDate(Q.endDate,te(this,f)):null);let _=Q.currentDate??Q.startDate;if(_){const ce=new r.CronDate(_,te(this,f));te(this,N)&&ce.getTime()<te(this,N).getTime()?_=te(this,N):te(this,b)&&ce.getTime()>te(this,b).getTime()&&(_=te(this,b))}Ee(this,v,new r.CronDate(_,te(this,f))),Ee(this,x,z)}get fields(){return te(this,x)}static fieldsToExpression(z,Q){return new W(z,Q||{})}next(){return we(this,C,Rr).call(this)}prev(){return we(this,C,Rr).call(this,!0)}hasNext(){const z=te(this,v);try{return we(this,C,Rr).call(this),!0}catch{return!1}finally{Ee(this,v,z)}}hasPrev(){const z=te(this,v);try{return we(this,C,Rr).call(this,!0),!0}catch{return!1}finally{Ee(this,v,z)}}take(z){const Q=[];if(z>=0)for(let _=0;_<z;_++)try{Q.push(this.next())}catch{return Q}else for(let _=0;_>z;_--)try{Q.push(this.prev())}catch{return Q}return Q}reset(z){Ee(this,v,new r.CronDate(z||te(this,h).currentDate))}stringify(z=!1){return te(this,x).stringify(z)}includesDate(z){const{second:Q,minute:_,hour:ce,month:he}=te(this,x),B=new r.CronDate(z,te(this,f));return!(!Q.values.includes(B.getSeconds())||!_.values.includes(B.getMinutes())||!ce.values.includes(B.getHours())||!he.values.includes(B.getMonth()+1)||!we(this,C,Af).call(this,B)||te(this,x).dayOfWeek.nthDay>0&&Math.ceil(B.getDate()/7)!==te(this,x).dayOfWeek.nthDay)}toString(){return te(this,h).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:we(this,C,Rr).call(this),done:!this.hasNext()})}}};h=new WeakMap,f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakMap,x=new WeakMap,S=new WeakMap,T=new WeakMap,j=new WeakSet,Fl=function(z,Q){return Q.some(_=>_===z)},C=new WeakSet,_s=function(z,Q){return z[Q?z.length-1:0]},Xx=function(z){const Q=`${z.getFullYear()}-${z.getMonth()+1}-${z.getDate()}`;if(te(this,S)===Q)return te(this,T);const _=new r.CronDate(z);_.setStartOfDay();const ce=new r.CronDate(z);return ce.setEndOfDay(),Ee(this,S,Q),Ee(this,T,_.getUTCOffset()!==ce.getUTCOffset()),te(this,T)},Jx=function(z,Q,_){const ce=te(this,x).second.values,he=z.getSeconds(),B=te(this,x).second.findNearestValue(he,_);if(B!==null){z.setSeconds(B);return}z.applyDateOperation(Q,r.TimeUnit.Minute,te(this,x).hour.values.length),z.setSeconds(we(this,C,_s).call(this,ce,_))},Kx=function(z,Q,_){const ce=te(this,x).minute.values,he=te(this,x).second.values,B=z.getMinutes(),$=te(this,x).minute.findNearestValue(B,_);if($!==null){z.setMinutes($),z.setSeconds(we(this,C,_s).call(this,he,_));return}z.applyDateOperation(Q,r.TimeUnit.Hour,te(this,x).hour.values.length),z.setMinutes(we(this,C,_s).call(this,ce,_)),z.setSeconds(we(this,C,_s).call(this,he,_))},ey=function(z,Q){const _=Q.isLastWeekdayOfMonth();return z.some(ce=>{const he=parseInt(ce.toString().charAt(0),10)%7;if(Number.isNaN(he))throw new Error(`Invalid last weekday of the month expression: ${ce}`);return Q.getDay()===he&&_})},Af=function(z){var ie,ge,Se;const Q=te(this,x).dayOfMonth.isWildcard,_=!Q,ce=te(this,x).dayOfWeek.isWildcard,he=!ce,B=we(ie=W,j,Fl).call(ie,z.getDate(),te(this,x).dayOfMonth.values)||te(this,x).dayOfMonth.hasLastChar&&z.isLastDayOfMonth(),$=we(ge=W,j,Fl).call(ge,z.getDay(),te(this,x).dayOfWeek.values)||te(this,x).dayOfWeek.hasLastChar&&we(Se=W,j,ey).call(Se,te(this,x).dayOfWeek.values,z);return!!(_&&he&&(B||$)||B&&!he||Q&&!ce&&$)},ty=function(z,Q,_){var Re,A;const ce=te(this,x).hour.values,he=ce,B=z.getHours(),$=we(Re=W,j,Fl).call(Re,B,ce),ie=z.dstStart===B,ge=z.dstEnd===B;if(ie)return we(A=W,j,Fl).call(A,B-1,ce)?!0:(z.invokeDateOperation(Q,r.TimeUnit.Hour),!1);if(ge&&!_)return z.dstEnd=null,z.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,he.length),!1;if($)return!0;z.dstStart=null;const Se=te(this,x).hour.findNearestValue(B,_);if(Se===null)return z.applyDateOperation(Q,r.TimeUnit.Day,he.length),!1;if(we(this,C,Xx).call(this,z)){const se=_?B-Se:Se-B;for(let me=0;me<se;me++)z.applyDateOperation(Q,r.TimeUnit.Hour,he.length)}else z.setHours(Se);return z.setMinutes(we(this,C,_s).call(this,te(this,x).minute.values,_)),z.setSeconds(we(this,C,_s).call(this,te(this,x).second.values,_)),!1},ay=function(z){if(!te(this,N)&&!te(this,b))return;const Q=z.getTime();if(te(this,N)&&Q<te(this,N).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(te(this,b)&&Q>te(this,b).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Rr=function(z=!1){var B,$,ie;const Q=z?r.DateMathOp.Subtract:r.DateMathOp.Add,_=new r.CronDate(te(this,v)),ce=_.getTime();let he=0;for(;++he<c;){if(we(this,C,ay).call(this,_),!we(this,C,Af).call(this,_)){_.applyDateOperation(Q,r.TimeUnit.Day,te(this,x).hour.values.length);continue}if(!(te(this,x).dayOfWeek.nthDay<=0||Math.ceil(_.getDate()/7)===te(this,x).dayOfWeek.nthDay)){_.applyDateOperation(Q,r.TimeUnit.Day,te(this,x).hour.values.length);continue}if(!we(B=W,j,Fl).call(B,_.getMonth()+1,te(this,x).month.values)){_.applyDateOperation(Q,r.TimeUnit.Month,te(this,x).hour.values.length);continue}if(we(this,C,ty).call(this,_,Q,z)){if(!we($=W,j,Fl).call($,_.getMinutes(),te(this,x).minute.values)){we(this,C,Kx).call(this,_,Q,z);continue}if(!we(ie=W,j,Fl).call(ie,_.getSeconds(),te(this,x).second.values)){we(this,C,Jx).call(this,_,Q,z);continue}if(ce===_.getTime()){(Q==="Add"||_.getMilliseconds()===0)&&_.applyDateOperation(Q,r.TimeUnit.Second,te(this,x).hour.values.length);continue}break}}if(he>c)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return _.getMilliseconds()!==0&&_.setMilliseconds(0),Ee(this,v,_),_},rt(W,j);let o=W;l.CronExpression=o,l.default=o})(wf)),wf}var Hc={},Lg;function d2(){if(Lg)return Hc;Lg=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.seededRandom=c;function l(o){let h=2166136261;for(let f=0;f<o.length;f++)h^=o.charCodeAt(f),h=Math.imul(h,16777619);return()=>h>>>0}function r(o){return()=>{let h=o+=1831565813;return h=Math.imul(h^h>>>15,h|1),h^=h+Math.imul(h^h>>>7,h|61),((h^h>>>14)>>>0)/4294967296}}function c(o){const h=o?l(o)():Math.floor(Math.random()*1e10);return r(h)}return Hc}var Bg;function _f(){var x,S,ly,zs,sy,ry,iy,uy,cy,oy,dy,kf,fy,hy;if(Bg)return Ba;Bg=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.CronExpressionParser=Ba.DayOfWeek=Ba.Months=Ba.CronUnit=Ba.PredefinedExpressions=void 0;const l=Qx(),r=ny(),c=d2(),o=th();var h;(function(P){P["@yearly"]="0 0 0 1 1 *",P["@annually"]="0 0 0 1 1 *",P["@monthly"]="0 0 0 1 * *",P["@weekly"]="0 0 0 * * 0",P["@daily"]="0 0 0 * * *",P["@hourly"]="0 0 * * * *",P["@minutely"]="0 * * * * *",P["@secondly"]="* * * * * *",P["@weekdays"]="0 0 0 * * 1-5",P["@weekends"]="0 0 0 * * 0,6"})(h||(Ba.PredefinedExpressions=h={}));var f;(function(P){P.Second="Second",P.Minute="Minute",P.Hour="Hour",P.DayOfMonth="DayOfMonth",P.Month="Month",P.DayOfWeek="DayOfWeek"})(f||(Ba.CronUnit=f={}));var v;(function(P){P[P.jan=1]="jan",P[P.feb=2]="feb",P[P.mar=3]="mar",P[P.apr=4]="apr",P[P.may=5]="may",P[P.jun=6]="jun",P[P.jul=7]="jul",P[P.aug=8]="aug",P[P.sep=9]="sep",P[P.oct=10]="oct",P[P.nov=11]="nov",P[P.dec=12]="dec"})(v||(Ba.Months=v={}));var N;(function(P){P[P.sun=0]="sun",P[P.mon=1]="mon",P[P.tue=2]="tue",P[P.wed=3]="wed",P[P.thu=4]="thu",P[P.fri=5]="fri",P[P.sat=6]="sat"})(N||(Ba.DayOfWeek=N={}));let b=(S=class{static parse(W,ne={}){var me,ye,Oe,Te,Ve,St,tt,ua;const{strict:z=!1,hashSeed:Q}=ne,_=(0,c.seededRandom)(Q);W=h[W]||W;const ce=we(me=S,x,ly).call(me,W,z);if(!(ce.dayOfMonth==="*"||ce.dayOfWeek==="*"||!z))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const he=we(ye=S,x,zs).call(ye,f.Second,ce.second,o.CronSecond.constraints,_),B=we(Oe=S,x,zs).call(Oe,f.Minute,ce.minute,o.CronMinute.constraints,_),$=we(Te=S,x,zs).call(Te,f.Hour,ce.hour,o.CronHour.constraints,_),ie=we(Ve=S,x,zs).call(Ve,f.Month,ce.month,o.CronMonth.constraints,_),ge=we(St=S,x,zs).call(St,f.DayOfMonth,ce.dayOfMonth,o.CronDayOfMonth.constraints,_),{dayOfWeek:Se,nthDayOfWeek:Re}=we(tt=S,x,fy).call(tt,ce.dayOfWeek),A=we(ua=S,x,zs).call(ua,f.DayOfWeek,Se,o.CronDayOfWeek.constraints,_),se=new l.CronFieldCollection({second:new o.CronSecond(he,{rawValue:ce.second}),minute:new o.CronMinute(B,{rawValue:ce.minute}),hour:new o.CronHour($,{rawValue:ce.hour}),dayOfMonth:new o.CronDayOfMonth(ge,{rawValue:ce.dayOfMonth}),month:new o.CronMonth(ie,{rawValue:ce.month}),dayOfWeek:new o.CronDayOfWeek(A,{rawValue:ce.dayOfWeek,nthDayOfWeek:Re})});return new r.CronExpression(se,{...ne,expression:W})}},x=new WeakSet,ly=function(W,ne){if(ne&&!W.length)throw new Error("Invalid cron expression");W=W||"0 * * * * *";const z=W.trim().split(/\s+/);if(ne&&z.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(z.length>6)throw new Error("Invalid cron expression, too many fields");const Q=["*","*","*","*","*","0"];z.length<Q.length&&z.unshift(...Q.slice(z.length));const[_,ce,he,B,$,ie]=z;return{second:_,minute:ce,hour:he,dayOfMonth:B,month:$,dayOfWeek:ie}},zs=function(W,ne,z,Q){if((W===f.Month||W===f.DayOfWeek)&&(ne=ne.replace(/[a-z]{3}/gi,_=>{_=_.toLowerCase();const ce=v[_]||N[_];if(ce===void 0)throw new Error(`Validation error, cannot resolve alias "${_}"`);return ce.toString()})),!z.validChars.test(ne))throw new Error(`Invalid characters, got value: ${ne}`);return ne=we(this,x,sy).call(this,ne,z),ne=we(this,x,ry).call(this,ne,z,Q),we(this,x,iy).call(this,W,ne,z)},sy=function(W,ne){return W.replace(/[*?]/g,ne.min+"-"+ne.max)},ry=function(W,ne,z){const Q=z();return W.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(_,ce,he,B)=>{if(ce&&he&&B){const $=parseInt(ce,10),ie=parseInt(he,10),ge=parseInt(B,10);if($>ie)throw new Error(`Invalid range: ${$}-${ie}, min > max`);if(ge<=0)throw new Error(`Invalid step: ${ge}, must be positive`);const Se=Math.max($,ne.min),Re=Math.floor(Q*ge),A=[];for(let se=Math.floor(Se/ge)*ge+Re;se<=ie;se+=ge)se>=Se&&A.push(se);return A.join(",")}else if(ce&&he){const $=parseInt(ce,10),ie=parseInt(he,10);if($>ie)throw new Error(`Invalid range: ${$}-${ie}, min > max`);return String(Math.floor(Q*(ie-$+1))+$)}else if(B){const $=parseInt(B,10);if($<=0)throw new Error(`Invalid step: ${$}, must be positive`);const ie=Math.floor(Q*$),ge=[];for(let Se=Math.floor(ne.min/$)*$+ie;Se<=ne.max;Se+=$)Se>=ne.min&&ge.push(Se);return ge.join(",")}else return String(Math.floor(Q*(ne.max-ne.min+1)+ne.min))})},iy=function(W,ne,z){const Q=[];function _(he,B){var $;if(Array.isArray(he))Q.push(...he);else if(we($=S,x,hy).call($,B,he))Q.push(he);else{const ie=parseInt(he.toString(),10);if(!(ie>=B.min&&ie<=B.max))throw new Error(`Constraint error, got value ${he} expected range ${B.min}-${B.max}`);Q.push(W===f.DayOfWeek?ie%7:he)}}return ne.split(",").forEach(he=>{var B;if(!(he.length>0))throw new Error("Invalid list value format");_(we(B=S,x,uy).call(B,W,he,z),z)}),Q},uy=function(W,ne,z){var _,ce;const Q=ne.split("/");if(Q.length>2)throw new Error(`Invalid repeat: ${ne}`);return Q.length===2?(isNaN(parseInt(Q[0],10))||(Q[0]=`${Q[0]}-${z.max}`),we(_=S,x,kf).call(_,W,Q[0],parseInt(Q[1],10),z)):we(ce=S,x,kf).call(ce,W,ne,1,z)},cy=function(W,ne,z){if(!(!isNaN(W)&&!isNaN(ne)&&W>=z.min&&ne<=z.max))throw new Error(`Constraint error, got range ${W}-${ne} expected range ${z.min}-${z.max}`);if(W>ne)throw new Error(`Invalid range: ${W}-${ne}, min(${W}) > max(${ne})`)},oy=function(W){if(!(!isNaN(W)&&W>0))throw new Error(`Constraint error, cannot repeat at every ${W} time.`)},dy=function(W,ne,z,Q){const _=[];W===f.DayOfWeek&&z%7===0&&_.push(0);for(let ce=ne;ce<=z;ce+=Q)_.indexOf(ce)===-1&&_.push(ce);return _},kf=function(W,ne,z,Q){const _=ne.split("-");if(_.length<=1)return isNaN(+ne)?ne:+ne;const[ce,he]=_.map(B=>parseInt(B,10));return we(this,x,cy).call(this,ce,he,Q),we(this,x,oy).call(this,z),we(this,x,dy).call(this,W,ce,he,z)},fy=function(W){const ne=W.split("#");if(ne.length<=1)return{dayOfWeek:ne[0]};const z=+ne[ne.length-1],Q=W.match(/([,-/])/);if(Q!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${Q==null?void 0:Q[0]}\` special characters are incompatible`);if(!(ne.length<=2&&!isNaN(z)&&z>=1&&z<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:ne[0],nthDayOfWeek:z}},hy=function(W,ne){return W.chars.some(z=>ne.toString().includes(z))},rt(S,x),S);return Ba.CronExpressionParser=b,Ba}var xn={};const f2={},h2=Object.freeze(Object.defineProperty({__proto__:null,default:f2},Symbol.toStringTag,{value:"Module"})),Vg=Yp(h2);var Yg;function m2(){var f,v,zf,my;if(Yg)return xn;Yg=1;var l=xn&&xn.__createBinding||(Object.create?(function(x,S,T,j){j===void 0&&(j=T);var D=Object.getOwnPropertyDescriptor(S,T);(!D||("get"in D?!S.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return S[T]}}),Object.defineProperty(x,j,D)}):(function(x,S,T,j){j===void 0&&(j=T),x[j]=S[T]})),r=xn&&xn.__setModuleDefault||(Object.create?(function(x,S){Object.defineProperty(x,"default",{enumerable:!0,value:S})}):function(x,S){x.default=S}),c=xn&&xn.__importStar||(function(){var x=function(S){return x=Object.getOwnPropertyNames||function(T){var j=[];for(var D in T)Object.prototype.hasOwnProperty.call(T,D)&&(j[j.length]=D);return j},x(S)};return function(S){if(S&&S.__esModule)return S;var T={};if(S!=null)for(var j=x(S),D=0;D<j.length;D++)j[D]!=="default"&&l(T,S,j[D]);return r(T,S),T}})();Object.defineProperty(xn,"__esModule",{value:!0}),xn.CronFileParser=void 0;const o=_f();let h=(v=class{static async parseFile(S){var D;const{readFile:T}=await Promise.resolve().then(()=>c(Vg)),j=await T(S,"utf8");return we(D=v,f,zf).call(D,j)}static parseFileSync(S){var D;const{readFileSync:T}=Vg,j=T(S,"utf8");return we(D=v,f,zf).call(D,j)}},f=new WeakSet,zf=function(S){var D;const T=S.split(`
|
|
386
|
-
`),j={variables:{},expressions:[],errors:{}};for(const C of T){const M=C.trim();if(M.length===0||M.startsWith("#"))continue;const R=M.match(/^(.*)=(.*)$/);if(R){const[,I,Y]=R;j.variables[I]=Y.replace(/["']/g,"");continue}try{const I=we(D=v,f,my).call(D,M);j.expressions.push(I.interval)}catch(I){j.errors[M]=I}}return j},my=function(S){const T=S.split(" ");return{interval:o.CronExpressionParser.parse(T.slice(0,5).join(" ")),command:T.slice(5,T.length)}},rt(v,f),v);return xn.CronFileParser=h,xn}var $g;function g2(){return $g||($g=1,(function(l){var r=Ds&&Ds.__createBinding||(Object.create?(function(x,S,T,j){j===void 0&&(j=T);var D=Object.getOwnPropertyDescriptor(S,T);(!D||("get"in D?!S.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return S[T]}}),Object.defineProperty(x,j,D)}):(function(x,S,T,j){j===void 0&&(j=T),x[j]=S[T]})),c=Ds&&Ds.__exportStar||function(x,S){for(var T in x)T!=="default"&&!Object.prototype.hasOwnProperty.call(S,T)&&r(S,x,T)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const o=_f();var h=eh();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return h.CronDate}});var f=Qx();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var v=ny();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return v.CronExpression}});var N=_f();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return N.CronExpressionParser}});var b=m2();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return b.CronFileParser}}),c(th(),l),l.default=o.CronExpressionParser})(Ds)),Ds}var x2=g2();const gy=6048e5,y2=864e5,p2=6e4,v2=36e5,Fg=Symbol.for("constructDateFrom");function Va(l,r){return typeof l=="function"?l(r):l&&typeof l=="object"&&Fg in l?l[Fg](r):l instanceof Date?new l.constructor(r):new Date(r)}function qt(l,r){return Va(r||l,l)}function b2(l,r,c){return Va(l,+qt(l)+r)}function Lc(l,r,c){return b2(l,r*v2)}let S2={};function no(){return S2}function su(l,r){var N,b,x,S;const c=no(),o=(r==null?void 0:r.weekStartsOn)??((b=(N=r==null?void 0:r.locale)==null?void 0:N.options)==null?void 0:b.weekStartsOn)??c.weekStartsOn??((S=(x=c.locale)==null?void 0:x.options)==null?void 0:S.weekStartsOn)??0,h=qt(l,r==null?void 0:r.in),f=h.getDay(),v=(f<o?7:0)+f-o;return h.setDate(h.getDate()-v),h.setHours(0,0,0,0),h}function Qc(l,r){return su(l,{...r,weekStartsOn:1})}function xy(l,r){const c=qt(l,r==null?void 0:r.in),o=c.getFullYear(),h=Va(c,0);h.setFullYear(o+1,0,4),h.setHours(0,0,0,0);const f=Qc(h),v=Va(c,0);v.setFullYear(o,0,4),v.setHours(0,0,0,0);const N=Qc(v);return c.getTime()>=f.getTime()?o+1:c.getTime()>=N.getTime()?o:o-1}function Gg(l){const r=qt(l),c=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return c.setUTCFullYear(r.getFullYear()),+l-+c}function N2(l,...r){const c=Va.bind(null,r.find(o=>typeof o=="object"));return r.map(c)}function Pg(l,r){const c=qt(l,r==null?void 0:r.in);return c.setHours(0,0,0,0),c}function w2(l,r,c){const[o,h]=N2(c==null?void 0:c.in,l,r),f=Pg(o),v=Pg(h),N=+f-Gg(f),b=+v-Gg(v);return Math.round((N-b)/y2)}function j2(l,r){const c=xy(l,r),o=Va(l,0);return o.setFullYear(c,0,4),o.setHours(0,0,0,0),Qc(o)}function E2(l,r){let c,o=r==null?void 0:r.in;return l.forEach(h=>{!o&&typeof h=="object"&&(o=Va.bind(null,h));const f=qt(h,o);(!c||c<f||isNaN(+f))&&(c=f)}),Va(o,c||NaN)}function T2(l,r){let c,o=r==null?void 0:r.in;return l.forEach(h=>{!o&&typeof h=="object"&&(o=Va.bind(null,h));const f=qt(h,o);(!c||c>f||isNaN(+f))&&(c=f)}),Va(o,c||NaN)}function M2(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function C2(l){return!(!M2(l)&&typeof l!="number"||isNaN(+qt(l)))}function O2(l){return r=>{const o=(l?Math[l]:Math.trunc)(r);return o===0?0:o}}function D2(l,r){return+qt(l)-+qt(r)}function Zg(l,r,c){const o=D2(l,r)/p2;return O2(c==null?void 0:c.roundingMethod)(o)}function R2(l,r){const c=qt(l,r==null?void 0:r.in);return c.setFullYear(c.getFullYear(),0,1),c.setHours(0,0,0,0),c}const A2={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},k2=(l,r,c)=>{let o;const h=A2[l];return typeof h=="string"?o=h:r===1?o=h.one:o=h.other.replace("{{count}}",r.toString()),c!=null&&c.addSuffix?c.comparison&&c.comparison>0?"in "+o:o+" ago":o};function jf(l){return(r={})=>{const c=r.width?String(r.width):l.defaultWidth;return l.formats[c]||l.formats[l.defaultWidth]}}const _2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},z2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},U2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},q2={date:jf({formats:_2,defaultWidth:"full"}),time:jf({formats:z2,defaultWidth:"full"}),dateTime:jf({formats:U2,defaultWidth:"full"})},H2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},L2=(l,r,c,o)=>H2[l];function Ki(l){return(r,c)=>{const o=c!=null&&c.context?String(c.context):"standalone";let h;if(o==="formatting"&&l.formattingValues){const v=l.defaultFormattingWidth||l.defaultWidth,N=c!=null&&c.width?String(c.width):v;h=l.formattingValues[N]||l.formattingValues[v]}else{const v=l.defaultWidth,N=c!=null&&c.width?String(c.width):l.defaultWidth;h=l.values[N]||l.values[v]}const f=l.argumentCallback?l.argumentCallback(r):r;return h[f]}}const B2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},V2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Y2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},F2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},G2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},P2=(l,r)=>{const c=Number(l),o=c%100;if(o>20||o<10)switch(o%10){case 1:return c+"st";case 2:return c+"nd";case 3:return c+"rd"}return c+"th"},Z2={ordinalNumber:P2,era:Ki({values:B2,defaultWidth:"wide"}),quarter:Ki({values:V2,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Ki({values:Y2,defaultWidth:"wide"}),day:Ki({values:$2,defaultWidth:"wide"}),dayPeriod:Ki({values:F2,defaultWidth:"wide",formattingValues:G2,defaultFormattingWidth:"wide"})};function eu(l){return(r,c={})=>{const o=c.width,h=o&&l.matchPatterns[o]||l.matchPatterns[l.defaultMatchWidth],f=r.match(h);if(!f)return null;const v=f[0],N=o&&l.parsePatterns[o]||l.parsePatterns[l.defaultParseWidth],b=Array.isArray(N)?I2(N,T=>T.test(v)):W2(N,T=>T.test(v));let x;x=l.valueCallback?l.valueCallback(b):b,x=c.valueCallback?c.valueCallback(x):x;const S=r.slice(v.length);return{value:x,rest:S}}}function W2(l,r){for(const c in l)if(Object.prototype.hasOwnProperty.call(l,c)&&r(l[c]))return c}function I2(l,r){for(let c=0;c<l.length;c++)if(r(l[c]))return c}function Q2(l){return(r,c={})=>{const o=r.match(l.matchPattern);if(!o)return null;const h=o[0],f=r.match(l.parsePattern);if(!f)return null;let v=l.valueCallback?l.valueCallback(f[0]):f[0];v=c.valueCallback?c.valueCallback(v):v;const N=r.slice(h.length);return{value:v,rest:N}}}const X2=/^(\d+)(th|st|nd|rd)?/i,J2=/\d+/i,K2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},eN={any:[/^b/i,/^(a|c)/i]},tN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},aN={any:[/1/i,/2/i,/3/i,/4/i]},nN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},lN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},sN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},rN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},iN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},uN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},cN={ordinalNumber:Q2({matchPattern:X2,parsePattern:J2,valueCallback:l=>parseInt(l,10)}),era:eu({matchPatterns:K2,defaultMatchWidth:"wide",parsePatterns:eN,defaultParseWidth:"any"}),quarter:eu({matchPatterns:tN,defaultMatchWidth:"wide",parsePatterns:aN,defaultParseWidth:"any",valueCallback:l=>l+1}),month:eu({matchPatterns:nN,defaultMatchWidth:"wide",parsePatterns:lN,defaultParseWidth:"any"}),day:eu({matchPatterns:sN,defaultMatchWidth:"wide",parsePatterns:rN,defaultParseWidth:"any"}),dayPeriod:eu({matchPatterns:iN,defaultMatchWidth:"any",parsePatterns:uN,defaultParseWidth:"any"})},oN={code:"en-US",formatDistance:k2,formatLong:q2,formatRelative:L2,localize:Z2,match:cN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dN(l,r){const c=qt(l,r==null?void 0:r.in);return w2(c,R2(c))+1}function fN(l,r){const c=qt(l,r==null?void 0:r.in),o=+Qc(c)-+j2(c);return Math.round(o/gy)+1}function yy(l,r){var S,T,j,D;const c=qt(l,r==null?void 0:r.in),o=c.getFullYear(),h=no(),f=(r==null?void 0:r.firstWeekContainsDate)??((T=(S=r==null?void 0:r.locale)==null?void 0:S.options)==null?void 0:T.firstWeekContainsDate)??h.firstWeekContainsDate??((D=(j=h.locale)==null?void 0:j.options)==null?void 0:D.firstWeekContainsDate)??1,v=Va((r==null?void 0:r.in)||l,0);v.setFullYear(o+1,0,f),v.setHours(0,0,0,0);const N=su(v,r),b=Va((r==null?void 0:r.in)||l,0);b.setFullYear(o,0,f),b.setHours(0,0,0,0);const x=su(b,r);return+c>=+N?o+1:+c>=+x?o:o-1}function hN(l,r){var N,b,x,S;const c=no(),o=(r==null?void 0:r.firstWeekContainsDate)??((b=(N=r==null?void 0:r.locale)==null?void 0:N.options)==null?void 0:b.firstWeekContainsDate)??c.firstWeekContainsDate??((S=(x=c.locale)==null?void 0:x.options)==null?void 0:S.firstWeekContainsDate)??1,h=yy(l,r),f=Va((r==null?void 0:r.in)||l,0);return f.setFullYear(h,0,o),f.setHours(0,0,0,0),su(f,r)}function mN(l,r){const c=qt(l,r==null?void 0:r.in),o=+su(c,r)-+hN(c,r);return Math.round(o/gy)+1}function dt(l,r){const c=l<0?"-":"",o=Math.abs(l).toString().padStart(r,"0");return c+o}const Yl={y(l,r){const c=l.getFullYear(),o=c>0?c:1-c;return dt(r==="yy"?o%100:o,r.length)},M(l,r){const c=l.getMonth();return r==="M"?String(c+1):dt(c+1,2)},d(l,r){return dt(l.getDate(),r.length)},a(l,r){const c=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h(l,r){return dt(l.getHours()%12||12,r.length)},H(l,r){return dt(l.getHours(),r.length)},m(l,r){return dt(l.getMinutes(),r.length)},s(l,r){return dt(l.getSeconds(),r.length)},S(l,r){const c=r.length,o=l.getMilliseconds(),h=Math.trunc(o*Math.pow(10,c-3));return dt(h,r.length)}},Dr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Wg={G:function(l,r,c){const o=l.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return c.era(o,{width:"abbreviated"});case"GGGGG":return c.era(o,{width:"narrow"});case"GGGG":default:return c.era(o,{width:"wide"})}},y:function(l,r,c){if(r==="yo"){const o=l.getFullYear(),h=o>0?o:1-o;return c.ordinalNumber(h,{unit:"year"})}return Yl.y(l,r)},Y:function(l,r,c,o){const h=yy(l,o),f=h>0?h:1-h;if(r==="YY"){const v=f%100;return dt(v,2)}return r==="Yo"?c.ordinalNumber(f,{unit:"year"}):dt(f,r.length)},R:function(l,r){const c=xy(l);return dt(c,r.length)},u:function(l,r){const c=l.getFullYear();return dt(c,r.length)},Q:function(l,r,c){const o=Math.ceil((l.getMonth()+1)/3);switch(r){case"Q":return String(o);case"QQ":return dt(o,2);case"Qo":return c.ordinalNumber(o,{unit:"quarter"});case"QQQ":return c.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return c.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return c.quarter(o,{width:"wide",context:"formatting"})}},q:function(l,r,c){const o=Math.ceil((l.getMonth()+1)/3);switch(r){case"q":return String(o);case"qq":return dt(o,2);case"qo":return c.ordinalNumber(o,{unit:"quarter"});case"qqq":return c.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return c.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return c.quarter(o,{width:"wide",context:"standalone"})}},M:function(l,r,c){const o=l.getMonth();switch(r){case"M":case"MM":return Yl.M(l,r);case"Mo":return c.ordinalNumber(o+1,{unit:"month"});case"MMM":return c.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return c.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return c.month(o,{width:"wide",context:"formatting"})}},L:function(l,r,c){const o=l.getMonth();switch(r){case"L":return String(o+1);case"LL":return dt(o+1,2);case"Lo":return c.ordinalNumber(o+1,{unit:"month"});case"LLL":return c.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return c.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return c.month(o,{width:"wide",context:"standalone"})}},w:function(l,r,c,o){const h=mN(l,o);return r==="wo"?c.ordinalNumber(h,{unit:"week"}):dt(h,r.length)},I:function(l,r,c){const o=fN(l);return r==="Io"?c.ordinalNumber(o,{unit:"week"}):dt(o,r.length)},d:function(l,r,c){return r==="do"?c.ordinalNumber(l.getDate(),{unit:"date"}):Yl.d(l,r)},D:function(l,r,c){const o=dN(l);return r==="Do"?c.ordinalNumber(o,{unit:"dayOfYear"}):dt(o,r.length)},E:function(l,r,c){const o=l.getDay();switch(r){case"E":case"EE":case"EEE":return c.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return c.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return c.day(o,{width:"short",context:"formatting"});case"EEEE":default:return c.day(o,{width:"wide",context:"formatting"})}},e:function(l,r,c,o){const h=l.getDay(),f=(h-o.weekStartsOn+8)%7||7;switch(r){case"e":return String(f);case"ee":return dt(f,2);case"eo":return c.ordinalNumber(f,{unit:"day"});case"eee":return c.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return c.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return c.day(h,{width:"short",context:"formatting"});case"eeee":default:return c.day(h,{width:"wide",context:"formatting"})}},c:function(l,r,c,o){const h=l.getDay(),f=(h-o.weekStartsOn+8)%7||7;switch(r){case"c":return String(f);case"cc":return dt(f,r.length);case"co":return c.ordinalNumber(f,{unit:"day"});case"ccc":return c.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return c.day(h,{width:"narrow",context:"standalone"});case"cccccc":return c.day(h,{width:"short",context:"standalone"});case"cccc":default:return c.day(h,{width:"wide",context:"standalone"})}},i:function(l,r,c){const o=l.getDay(),h=o===0?7:o;switch(r){case"i":return String(h);case"ii":return dt(h,r.length);case"io":return c.ordinalNumber(h,{unit:"day"});case"iii":return c.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return c.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return c.day(o,{width:"short",context:"formatting"});case"iiii":default:return c.day(o,{width:"wide",context:"formatting"})}},a:function(l,r,c){const h=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return c.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"aaa":return c.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return c.dayPeriod(h,{width:"narrow",context:"formatting"});case"aaaa":default:return c.dayPeriod(h,{width:"wide",context:"formatting"})}},b:function(l,r,c){const o=l.getHours();let h;switch(o===12?h=Dr.noon:o===0?h=Dr.midnight:h=o/12>=1?"pm":"am",r){case"b":case"bb":return c.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return c.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return c.dayPeriod(h,{width:"narrow",context:"formatting"});case"bbbb":default:return c.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(l,r,c){const o=l.getHours();let h;switch(o>=17?h=Dr.evening:o>=12?h=Dr.afternoon:o>=4?h=Dr.morning:h=Dr.night,r){case"B":case"BB":case"BBB":return c.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return c.dayPeriod(h,{width:"narrow",context:"formatting"});case"BBBB":default:return c.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(l,r,c){if(r==="ho"){let o=l.getHours()%12;return o===0&&(o=12),c.ordinalNumber(o,{unit:"hour"})}return Yl.h(l,r)},H:function(l,r,c){return r==="Ho"?c.ordinalNumber(l.getHours(),{unit:"hour"}):Yl.H(l,r)},K:function(l,r,c){const o=l.getHours()%12;return r==="Ko"?c.ordinalNumber(o,{unit:"hour"}):dt(o,r.length)},k:function(l,r,c){let o=l.getHours();return o===0&&(o=24),r==="ko"?c.ordinalNumber(o,{unit:"hour"}):dt(o,r.length)},m:function(l,r,c){return r==="mo"?c.ordinalNumber(l.getMinutes(),{unit:"minute"}):Yl.m(l,r)},s:function(l,r,c){return r==="so"?c.ordinalNumber(l.getSeconds(),{unit:"second"}):Yl.s(l,r)},S:function(l,r){return Yl.S(l,r)},X:function(l,r,c){const o=l.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Qg(o);case"XXXX":case"XX":return Us(o);case"XXXXX":case"XXX":default:return Us(o,":")}},x:function(l,r,c){const o=l.getTimezoneOffset();switch(r){case"x":return Qg(o);case"xxxx":case"xx":return Us(o);case"xxxxx":case"xxx":default:return Us(o,":")}},O:function(l,r,c){const o=l.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Ig(o,":");case"OOOO":default:return"GMT"+Us(o,":")}},z:function(l,r,c){const o=l.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Ig(o,":");case"zzzz":default:return"GMT"+Us(o,":")}},t:function(l,r,c){const o=Math.trunc(+l/1e3);return dt(o,r.length)},T:function(l,r,c){return dt(+l,r.length)}};function Ig(l,r=""){const c=l>0?"-":"+",o=Math.abs(l),h=Math.trunc(o/60),f=o%60;return f===0?c+String(h):c+String(h)+r+dt(f,2)}function Qg(l,r){return l%60===0?(l>0?"-":"+")+dt(Math.abs(l)/60,2):Us(l,r)}function Us(l,r=""){const c=l>0?"-":"+",o=Math.abs(l),h=dt(Math.trunc(o/60),2),f=dt(o%60,2);return c+h+r+f}const Xg=(l,r)=>{switch(l){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},py=(l,r)=>{switch(l){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},gN=(l,r)=>{const c=l.match(/(P+)(p+)?/)||[],o=c[1],h=c[2];if(!h)return Xg(l,r);let f;switch(o){case"P":f=r.dateTime({width:"short"});break;case"PP":f=r.dateTime({width:"medium"});break;case"PPP":f=r.dateTime({width:"long"});break;case"PPPP":default:f=r.dateTime({width:"full"});break}return f.replace("{{date}}",Xg(o,r)).replace("{{time}}",py(h,r))},xN={p:py,P:gN},yN=/^D+$/,pN=/^Y+$/,vN=["D","DD","YY","YYYY"];function bN(l){return yN.test(l)}function SN(l){return pN.test(l)}function NN(l,r,c){const o=wN(l,r,c);if(console.warn(o),vN.includes(l))throw new RangeError(o)}function wN(l,r,c){const o=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${r}\`) for formatting ${o} to the input \`${c}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const jN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,TN=/^'([^]*?)'?$/,MN=/''/g,CN=/[a-zA-Z]/;function As(l,r,c){var S,T,j,D;const o=no(),h=o.locale??oN,f=o.firstWeekContainsDate??((T=(S=o.locale)==null?void 0:S.options)==null?void 0:T.firstWeekContainsDate)??1,v=o.weekStartsOn??((D=(j=o.locale)==null?void 0:j.options)==null?void 0:D.weekStartsOn)??0,N=qt(l,c==null?void 0:c.in);if(!C2(N))throw new RangeError("Invalid time value");let b=r.match(EN).map(C=>{const M=C[0];if(M==="p"||M==="P"){const R=xN[M];return R(C,h.formatLong)}return C}).join("").match(jN).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const M=C[0];if(M==="'")return{isToken:!1,value:ON(C)};if(Wg[M])return{isToken:!0,value:C};if(M.match(CN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:C}});h.localize.preprocessor&&(b=h.localize.preprocessor(N,b));const x={firstWeekContainsDate:f,weekStartsOn:v,locale:h};return b.map(C=>{if(!C.isToken)return C.value;const M=C.value;(SN(M)||bN(M))&&NN(M,r,String(l));const R=Wg[M[0]];return R(N,M,h.localize,x)}).join("")}function ON(l){const r=l.match(TN);return r?r[1].replace(MN,"'"):l}function DN(l,r){return+qt(l)>+qt(r)}function RN(l,r){return+qt(l)<+qt(r)}function AN(l,r){const c=qt(l,r==null?void 0:r.in);return c.setMinutes(0,0,0),c}const Ef=kx,Bc=[{bg:"bg-indigo-400",border:"border-indigo-400/60"},{bg:"bg-cyan-400",border:"border-cyan-400/60"},{bg:"bg-rose-400",border:"border-rose-400/60"},{bg:"bg-violet-400",border:"border-violet-400/60"},{bg:"bg-amber-400",border:"border-amber-400/60"}],el=160,Vc=14,kN=10,_N=7,Jg=4,vy=({configs:l,currentProjectId:r,onEditJob:c,queueStatus:o,queueAnalytics:h})=>{const f=U.useMemo(()=>AN(new Date),[]),v=U.useMemo(()=>Lc(f,24),[f]),N=U.useMemo(()=>Lc(f,-24),[f]),b=v,x=U.useMemo(()=>{const ee=[];for(let de=0;de<=24;de++)ee.push(Lc(f,de));return ee},[f]),S=U.useMemo(()=>{const ee=[];return l.forEach(({projectId:de,config:Z})=>{var ne,z;const P={executor:Z.executorEnabled!==!1?Z.cronSchedule:null,reviewer:Z.reviewerEnabled?Z.reviewerSchedule:null,qa:Z.qa.enabled?Z.qa.schedule:null,audit:Z.audit.enabled?Z.audit.schedule:null,slicer:Z.roadmapScanner.enabled?Z.roadmapScanner.slicerSchedule:null,analytics:(ne=Z.analytics)!=null&&ne.enabled?(z=Z.analytics)==null?void 0:z.schedule:null},W=Z.cronScheduleOffset||0;Object.entries(P).forEach(([Q,_])=>{if(_)try{const ce=x2.CronExpressionParser.parse(_,{currentDate:f,endDate:v});for(;ce.hasNext();){const he=ce.next(),B=new Date(he.getTime());B.setMinutes(B.getMinutes()+W),DN(B,f)&&RN(B,v)&&ee.push({projectId:de,jobType:Q,time:B})}}catch(ce){console.error(`Failed to parse cron "${_}" for ${de}/${Q}`,ce)}})}),ee},[l,f,v]),T=U.useMemo(()=>{const ee=new Set;return l.length===0||(l.every(de=>de.config.executorEnabled===!1)&&ee.add("executor"),l.every(de=>!de.config.reviewerEnabled)&&ee.add("reviewer"),l.every(de=>!de.config.qa.enabled)&&ee.add("qa"),l.every(de=>!de.config.audit.enabled)&&ee.add("audit"),l.every(de=>!de.config.roadmapScanner.enabled)&&ee.add("slicer"),l.every(de=>{var Z;return!((Z=de.config.analytics)!=null&&Z.enabled)})&&ee.add("analytics")),ee},[l]),j=U.useMemo(()=>{const ee=new Map;let de=0;return l.forEach(Z=>{Z.projectId===r||(ee.set(Z.projectId,de%Bc.length),de++)}),ee},[l,r]),D=ee=>Zg(ee,f),C=U.useMemo(()=>{const ee=[];for(let de=0;de<=24;de++)ee.push(Lc(N,de));return ee},[N]),M=ee=>{const de=T2([E2([ee,N]),b]);return Zg(de,N)},R=U.useMemo(()=>{const ee=(h==null?void 0:h.recentRuns)??[],de=new Map;for(const Z of ee){const P=Z.providerKey||"default",W=new Date(Z.startedAt*1e3),ne=Z.finishedAt?new Date(Z.finishedAt*1e3):new Date;ne<N||W>b||(de.has(P)||de.set(P,[]),de.get(P).push({id:Z.id,jobType:Z.jobType,status:Z.status,projectPath:Z.projectPath,startedAt:W,finishedAt:ne,throttledCount:Z.throttledCount}))}if(o!=null&&o.running){const Z=o.running.providerKey??"default";de.has(Z)||de.set(Z,[]),de.get(Z).push({id:o.running.id,jobType:o.running.jobType,status:"running",projectPath:o.running.projectPath,startedAt:new Date((o.running.dispatchedAt??o.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(de.entries()).sort(([Z],[P])=>Z.localeCompare(P)).map(([Z,P])=>({providerKey:Z,runs:P.sort((W,ne)=>W.startedAt.getTime()-ne.startedAt.getTime())}))},[b,N,h,o]),I=ee=>ee.split(/[-_]/).map(de=>de.charAt(0).toUpperCase()+de.slice(1)).join(" "),Y=l.length>1,G=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:x.map((ee,de)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},de))});return s.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-slate-800 bg-slate-950/50 flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Execution Timeline (Next 24h)"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Upcoming scheduled runs across projects. Aligned columns = overlap."})]}),Y&&s.jsxs("div",{className:"flex flex-wrap gap-2 justify-end max-w-sm",children:[s.jsxs("div",{className:"flex items-center gap-1 mr-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-400 shrink-0"}),s.jsx("span",{className:"text-[10px] text-slate-400 font-semibold",children:"current"})]}),l.filter(ee=>ee.projectId!==r).slice(0,5).map(ee=>{const de=j.get(ee.projectId)??0,Z=Bc[de],P=(ee.projectId.split("/").pop()??ee.projectId).slice(0,14);return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${Z.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:ee.projectId,children:P})]},ee.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+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:x.map((ee,de)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:de*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:As(ee,"HH:mm")})},de))})]}),s.jsxs("div",{className:"relative",children:[l.length===0&&s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("p",{className:"text-sm text-slate-500 italic",children:"No project data available for timeline."})}),Ef.map(ee=>{const de=T.has(ee.id),Z=S.filter(W=>W.jobType===ee.id);if(!Y)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${de?"opacity-40":""}`,children:[s.jsxs("div",{style:{width: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,Z.length===0?s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-600 italic",children:de?"Disabled":"No runs in this window"})}):Z.map((W,ne)=>s.jsx("button",{type:"button",onClick:()=>c==null?void 0:c(W.projectId,W.jobType),style:{left:D(W.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${ee.color.bg} ${ee.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${ee.label} at ${As(W.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-10",children:As(W.time,"HH:mm")})},ne))]})]},ee.id);const P=l.length*Vc+Jg*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${de?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:el,height:P},className:"shrink-0 border-r border-slate-800/50 flex flex-col px-2 py-1",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[s.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${ee.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:ee.label})]}),l.map(W=>{const ne=W.projectId===r,z=(W.projectId.split("/").pop()??W.projectId).slice(0,14),Q=j.get(W.projectId)??0,_=ne?ee.color.bg:Bc[Q].bg;return s.jsxs("div",{style:{height:Vc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${_}`}),s.jsx("span",{className:`text-[9px] truncate ${ne?"text-slate-200 font-semibold":"text-slate-600"}`,title:W.projectId,children:ne?`${z} ★`:z})]},W.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:P},children:[G,l.map((W,ne)=>{const z=W.projectId===r,Q=Z.filter(ie=>ie.projectId===W.projectId),_=Jg+ne*Vc,ce=z?kN:_N,he=Math.floor((Vc-ce)/2),B=j.get(W.projectId)??0,$=z?{bg:ee.color.bg,border:ee.color.border}:Bc[B];return s.jsxs(qe.Fragment,{children:[ne>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:_}}),Q.map((ie,ge)=>s.jsx("button",{type:"button",onClick:()=>c==null?void 0:c(W.projectId,ie.jobType),style:{left:D(ie.time)-3,top:_+he,height:ce},className:`absolute w-6 rounded border ${$.bg} ${$.border} ${z?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${W.projectId} · ${ee.label} @ ${As(ie.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-20",children:As(ie.time,"HH:mm")})},ge))]},W.projectId)}),Z.length===0&&!de&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-700 italic",children:"No runs in this window"})})]})]},ee.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left: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"})]}),Y&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),R.length>0&&s.jsxs("div",{className:"border-t border-slate-800",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Recent Execution Runs"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Last 24h of real runs grouped by provider bucket."})]}),s.jsxs("div",{className:"text-[10px] uppercase tracking-[0.2em] text-slate-500",children:[(h==null?void 0:h.recentRuns.length)??0," recorded runs"]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar","data-testid":"provider-execution-timeline",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+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:C.map((ee,de)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:de*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:As(ee,"HH:mm")})},de))})]}),s.jsx("div",{className:"relative",children:R.map(({providerKey:ee,runs:de})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${ee}`,children:[s.jsxs("div",{style:{width: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:I(ee)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:ee})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:C.map((Z,P)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},P))}),de.map(Z=>{const P=Ef.find(B=>B.id===Z.jobType)??Ef[0],W=M(Z.startedAt),ne=M(Z.finishedAt),z=Math.max(ne-W,8),Q=Z.status==="running",_=Z.status==="error"||Z.status==="failed"||Z.status==="errored",ce=Q?"bg-green-500":_?"bg-red-500":P.color.bg,he=Q?"border-green-400/60":_?"border-red-400/60":P.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ce} ${he} opacity-85 shadow-lg ${Q?"animate-pulse":""}`,style:{left:W,width:z},title:`${ee} • ${P.label} • ${As(Z.startedAt,"MMM d HH:mm")} • ${Z.status}`,"data-testid":"provider-execution-run",children:s.jsxs("div",{className:"h-full px-2 flex items-center justify-between gap-2 text-[10px] text-white/90 overflow-hidden whitespace-nowrap",children:[s.jsx("span",{className:"font-semibold uppercase tracking-wide",children:P.label}),s.jsx("span",{className:"text-white/70",children:Z.status}),Z.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",Z.throttledCount,"x"]})]})},`${ee}-${Z.id}-${Z.startedAt.getTime()}`)})]})]},ee))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left: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"})})]})})]})]})},by=({form:l,scheduleMode:r,selectedTemplateId:c,onFieldChange:o,onSwitchToTemplate:h,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:N,currentProjectId:b,onEditJob:x})=>s.jsxs(Je,{className:"p-6 space-y-6",children:[N&&N.length>0&&s.jsx(vy,{configs:N,currentProjectId:b,onEditJob:x}),s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:h,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Custom"})]})]}),r==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Kf.map(S=>{const T=c===S.id;return s.jsxs("button",{type:"button",onClick:()=>v(S),className:`text-left p-4 rounded-lg border transition-colors ${T?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children:S.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:S.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",S.hints.executor],["Reviewer",S.hints.reviewer],["QA",S.hints.qa],["Audit",S.hints.audit]].map(([j,D])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:j}),s.jsx("span",{className:"text-xs text-slate-400",children:D})]},j))})]},S.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(al,{label:"PRD Execution Schedule",value:l.cronSchedule,onChange:S=>o("cronSchedule",S)}),s.jsx(al,{label:"PR Review Schedule",value:l.reviewerSchedule,onChange:S=>o("reviewerSchedule",S)}),s.jsx(al,{label:"QA Schedule",value:l.qa.schedule,onChange:S=>o("qa",{...l.qa,schedule:S})}),s.jsx(al,{label:"Audit Schedule",value:l.audit.schedule,onChange:S=>o("audit",{...l.audit,schedule:S})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(ia,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:S=>o("schedulingPriority",Number(S)),options:[{label:"1 - Lowest",value:"1"},{label:"2 - Low",value:"2"},{label:"3 - Balanced",value:"3"},{label:"4 - High",value:"4"},{label:"5 - Highest",value:"5"}],helperText:"Higher-priority projects get earlier balanced start slots and win queue tie-breakers first."}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),s.jsx(ga,{checked:l.globalQueueEnabled??!0,onChange:S=>o("globalQueueEnabled",S)})]})}),s.jsx(He,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:S=>{const T=Math.min(59,Math.max(0,Number(S.target.value||0)));o("cronScheduleOffset",T)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]}),zN=()=>{var Ot,ya,ca,an;const{addToast:l,selectedProjectId:r,globalModeLoading:c}=Jt(),[o,h]=U.useState("overview"),[f,v]=U.useState(!1),[N,b]=U.useState(!1),[x,S]=U.useState(null),[T,j]=U.useState(null),[D,C]=U.useState([]),[M,R]=U.useState(null),[I,Y]=U.useState(null),[G,ee]=U.useState({form:{cronSchedule:"5 */3 * * *",reviewerSchedule:"25 */6 * * *",qa:{schedule:"45 2,14 * * *",enabled:!0},audit:{schedule:"50 3 * * 1",enabled:!0},analytics:{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{slicerSchedule:"35 */12 * * *",enabled:!0},scheduleBundleId:null,schedulingPriority:3,cronScheduleOffset:0,globalQueueEnabled:!0},scheduleMode:"template",selectedTemplateId:"always-on",isDirty:!1,queueMode:"auto",globalMaxConcurrency:1,providerBuckets:[]}),[de,Z]=U.useState(""),[P,W]=U.useState("1"),[ne,z]=U.useState(!1),{data:Q,loading:_,error:ce,refetch:he}=yn(Lx,[r],{enabled:!c}),{data:B,loading:$,refetch:ie}=yn(Jf,[r],{enabled:!c});U.useEffect(()=>{const le=setInterval(()=>{he()},3e4);return()=>clearInterval(le)},[he]),U.useEffect(()=>{c||Hx().then(C).catch(console.error)},[r,c]),U.useEffect(()=>{if(c)return;const le=()=>{vS().then(R).catch(()=>{}),bS(24).then(Y).catch(()=>{})};le();const pe=setInterval(le,3e4);return()=>clearInterval(pe)},[c,r]),U.useEffect(()=>{var le,pe,Me,Ae,Ke,ft,Dt,jt,$t,Wt;if(B&&!G.isDirty){const pa=tu(B.scheduleBundleId,B.cronSchedule,B.reviewerSchedule,((le=B.qa)==null?void 0:le.schedule)||"45 2,14 * * *",((pe=B.audit)==null?void 0:pe.schedule)||"50 3 * * 1",((Me=B.roadmapScanner)==null?void 0:Me.slicerSchedule)||"35 */12 * * *",((Ae=B.merger)==null?void 0:Ae.schedule)??"55 */4 * * *"),ut=((Ke=B.queue)==null?void 0:Ke.providerBuckets)??{};ee({form:{cronSchedule:B.cronSchedule||"5 */3 * * *",reviewerSchedule:B.reviewerSchedule||"25 */6 * * *",qa:B.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:B.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:B.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((ft=B.roadmapScanner)==null?void 0:ft.enabled)??!0,slicerSchedule:((Dt=B.roadmapScanner)==null?void 0:Dt.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:B.scheduleBundleId??null,schedulingPriority:B.schedulingPriority??3,cronScheduleOffset:B.cronScheduleOffset??0,globalQueueEnabled:((jt=B.queue)==null?void 0:jt.enabled)??!0},scheduleMode:pa?"template":"custom",selectedTemplateId:(pa==null?void 0:pa.id)??"",isDirty:!1,queueMode:(($t=B.queue)==null?void 0:$t.mode)??"auto",globalMaxConcurrency:((Wt=B.queue)==null?void 0:Wt.maxConcurrency)??1,providerBuckets:Object.entries(ut).map(([Rt,Ft])=>({key:Rt,maxConcurrency:Ft.maxConcurrency}))})}},[B,G.isDirty]);const ge=()=>{ie(),he()},Se=(le,pe)=>le instanceof Error?le.message:pe,Re=async()=>{if(Q){v(!0);try{Q.paused?(await au(),l({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await hS(),l({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),ge()}catch(le){l({title:"Action Failed",message:Se(le,"Failed to toggle schedule state"),type:"error"})}finally{v(!1)}}},A=async(le,pe)=>{if(!B)return;const Ae=zx(le==="planner"?"slicer":le);if(Ae){S(le);try{await Wc(Ae.buildEnabledPatch(pe,B));let Ke="";try{await au()}catch(ft){Ke=Se(ft,"Failed to reinstall cron schedules")}ge(),l(Ke?{title:"Job Saved (Cron Reinstall Failed)",message:Ke,type:"warning"}:{title:"Job Updated",message:`${le[0].toUpperCase()+le.slice(1)} ${pe?"enabled":"disabled"}.`,type:"success"})}catch(Ke){l({title:"Update Failed",message:Se(Ke,"Failed to update job configuration"),type:"error"})}finally{S(null)}}},se=async le=>{const pe=le==="planner"?"slicer":le;j(le);try{await fS(pe),l({title:"Job Triggered",message:`${le[0].toUpperCase()+le.slice(1)} job has been queued.`,type:"success"}),he()}catch(Me){l({title:"Trigger Failed",message:Se(Me,`Failed to trigger ${le} job`),type:"error"})}finally{j(null)}},me=(le,pe)=>{ee(Me=>({...Me,form:{...Me.form,[le]:pe},isDirty:!0}))},ye=()=>{var pe;if(!G.form)return;const le=tu(G.form.scheduleBundleId,G.form.cronSchedule,G.form.reviewerSchedule,G.form.qa.schedule,G.form.audit.schedule,G.form.roadmapScanner.slicerSchedule||"35 */12 * * *",((pe=B==null?void 0:B.merger)==null?void 0:pe.schedule)??"55 */4 * * *");ee(Me=>({...Me,scheduleMode:"template",selectedTemplateId:(le==null?void 0:le.id)??"always-on",form:{...Me.form,scheduleBundleId:(le==null?void 0:le.id)??null},isDirty:!0}))},Oe=()=>{ee(le=>({...le,scheduleMode:"custom",selectedTemplateId:"",form:{...le.form,scheduleBundleId:null},isDirty:!0}))},Te=le=>{ee(pe=>({...pe,selectedTemplateId:le.id,scheduleMode:"template",form:{...pe.form,cronSchedule:le.schedules.executor,reviewerSchedule:le.schedules.reviewer,scheduleBundleId:le.id,qa:{...pe.form.qa,schedule:le.schedules.qa},audit:{...pe.form.audit,schedule:le.schedules.audit},roadmapScanner:{...pe.form.roadmapScanner,slicerSchedule:le.schedules.slicer}},isDirty:!0}))},Ve=async()=>{var le,pe;if(B){b(!0);try{await Wc({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:{...B.qa,schedule:G.form.qa.schedule},audit:{...B.audit,schedule:G.form.audit.schedule},analytics:{...B.analytics,schedule:((le=G.form.analytics)==null?void 0:le.schedule)||((pe=B.analytics)==null?void 0:pe.schedule)||"0 6 * * 1"},roadmapScanner:{...B.roadmapScanner,slicerSchedule:G.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},queue:{...B.queue,enabled:G.form.globalQueueEnabled??!0,mode:G.queueMode,maxConcurrency:G.globalMaxConcurrency,providerBuckets:Object.fromEntries(G.providerBuckets.map(Ae=>[Ae.key,{maxConcurrency:Ae.maxConcurrency}]))},executorEnabled:B.executorEnabled,reviewerEnabled:B.reviewerEnabled});let Me="";try{await au()}catch(Ae){Me=Se(Ae,"Failed to reinstall cron schedules")}ee(Ae=>({...Ae,isDirty:!1})),ge(),l(Me?{title:"Schedules Saved (Cron Reinstall Failed)",message:Me,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(Me){l({title:"Save Failed",message:Se(Me,"Failed to save schedules"),type:"error"})}finally{b(!1)}}},St=le=>{if(!le)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const pe=new Date(le),Me=a2(pe);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Me&&s.jsxs("span",{className:"relative flex h-3 w-3",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-slate-200 font-medium",children:e2(pe)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",t2(pe),")"]})]})]})},tt=le=>{if(!le||le.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const pe=[];return le.balancedDelayMinutes>0&&pe.push(`auto +${le.balancedDelayMinutes}m`),le.manualDelayMinutes>0&&pe.push(`manual +${le.manualDelayMinutes}m`),s.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Delayed after cron fire:",s.jsxs("span",{className:"text-slate-300",children:[" ",pe.join(" - ")]})]})},ua=U.useMemo(()=>{var le,pe,Me,Ae,Ke,ft,Dt,jt,$t,Wt,Ge,pa,ut,Rt;return!B||!Q?[]:[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Pc,{className:"h-4 w-4"}),enabled:(B==null?void 0:B.executorEnabled)!==!1,schedule:Q.executor.schedule,nextRun:Q.executor.nextRun,delayInfo:Q.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(ao,{className:"h-4 w-4"}),enabled:(B==null?void 0:B.reviewerEnabled)??!1,schedule:Q.reviewer.schedule,nextRun:Q.reviewer.nextRun,delayInfo:Q.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx(Z1,{className:"h-4 w-4"}),enabled:((le=B==null?void 0:B.qa)==null?void 0:le.enabled)??!1,schedule:(pe=Q.qa)==null?void 0:pe.schedule,nextRun:(Me=Q.qa)==null?void 0:Me.nextRun,delayInfo:Q.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(pg,{className:"h-4 w-4"}),enabled:((Ae=B==null?void 0:B.audit)==null?void 0:Ae.enabled)??!1,schedule:(Ke=Q.audit)==null?void 0:Ke.schedule,nextRun:(ft=Q.audit)==null?void 0:ft.nextRun,delayInfo:Q.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(pg,{className:"h-4 w-4"}),enabled:((Dt=B==null?void 0:B.roadmapScanner)==null?void 0:Dt.enabled)??!1,schedule:((jt=Q.planner)==null?void 0:jt.schedule)||(($t=B.roadmapScanner)==null?void 0:$t.slicerSchedule)||"35 */12 * * *",nextRun:(Wt=Q.planner)==null?void 0:Wt.nextRun,delayInfo:Q.planner},{id:"analytics",name:"Analytics",description:"Fetches Amplitude data, analyzes with AI, and creates board issues",icon:s.jsx(Ib,{className:"h-4 w-4"}),enabled:((Ge=B==null?void 0:B.analytics)==null?void 0:Ge.enabled)??!1,schedule:((pa=Q.analytics)==null?void 0:pa.schedule)||((ut=B.analytics)==null?void 0:ut.schedule)||"0 6 * * 1",nextRun:(Rt=Q.analytics)==null?void 0:Rt.nextRun,delayInfo:Q.analytics}]},[B,Q]);if(_||$)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(ce||!Q||!B)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(sl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),s.jsx("div",{className:"text-sm text-slate-500",children:(ce==null?void 0:ce.message)||"Unknown error"}),s.jsx(Fe,{onClick:()=>{he(),ie()},children:"Retry"})]});const xa=Q.paused,Dn=xa?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",pn=xa?"Paused":"Active",xe=tu(B.scheduleBundleId,B.cronSchedule,B.reviewerSchedule,((Ot=B.qa)==null?void 0:Ot.schedule)||"45 2,14 * * *",((ya=B.audit)==null?void 0:ya.schedule)||"50 3 * * 1",((ca=B.roadmapScanner)==null?void 0:ca.slicerSchedule)||"35 */12 * * *",((an=B.merger)==null?void 0:an.schedule)??"55 */4 * * *"),ze=(le,pe,Me)=>!xe||le==="analytics"||!ks(xe.schedules[le],pe)?Eg(Me):`${xe.label} - ${xe.hints[le]}`,Tt=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Je,{className:`p-6 border-2 ${Dn}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Pc,{className:"h-8 w-8"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Automation Status"}),s.jsx("div",{className:"text-2xl font-bold",children:pn}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Fe,{variant:xa?"primary":"outline",size:"lg",onClick:Re,loading:f,children:xa?s.jsxs(s.Fragment,{children:[s.jsx(kr,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(Rx,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(Je,{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:ua.map(le=>{var pe,Me,Ae,Ke,ft,Dt,jt,$t;return s.jsxs("div",{className:`p-4 rounded-lg border ${le.enabled?"border-slate-800":"border-slate-800 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[le.icon,s.jsx("h4",{className:"text-base font-semibold text-slate-200",children:le.name})]}),s.jsx(ga,{checked:le.enabled,disabled:x!==null,"aria-label":`Toggle ${le.name.toLowerCase()} automation`,onChange:Wt=>A(le.id,Wt)})]}),le.enabled?s.jsxs("div",{className:"space-y-3 mt-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Schedule"}),s.jsx("div",{className:"text-sm text-slate-200 font-medium",children:ze(le.id==="planner"?"slicer":le.id,le.id==="qa"?((pe=B==null?void 0:B.qa)==null?void 0:pe.schedule)||"":le.id==="audit"?((Me=B==null?void 0:B.audit)==null?void 0:Me.schedule)||"":le.id==="planner"?((Ae=B==null?void 0:B.roadmapScanner)==null?void 0:Ae.slicerSchedule)||"35 */12 * * *":le.id==="analytics"?((Ke=B==null?void 0:B.analytics)==null?void 0:Ke.schedule)||"0 6 * * 1":le.schedule,le.id==="qa"?((ft=B==null?void 0:B.qa)==null?void 0:ft.schedule)||"":le.id==="audit"?((Dt=B==null?void 0:B.audit)==null?void 0:Dt.schedule)||"":le.id==="planner"?((jt=B==null?void 0:B.roadmapScanner)==null?void 0:jt.slicerSchedule)||"35 */12 * * *":le.id==="analytics"?(($t=B==null?void 0:B.analytics)==null?void 0:$t.schedule)||"0 6 * * 1":le.schedule)})]}),tt(le.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),St(le.nextRun)]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${le.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(Fc,{className:"h-4 w-4"}),s.jsx("span",{children:le.enabled?"Active":"Disabled"})]}),s.jsxs("button",{disabled:T!==null,onClick:()=>se(le.id),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium text-green-400 bg-green-500/10 hover:bg-green-500/20 border border-green-500/30 hover:border-green-500/50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[T===le.id?s.jsx("div",{className:"h-3 w-3 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(kr,{className:"h-3 w-3 fill-current"}),"Run now"]})]})]}):s.jsxs("div",{className:"text-slate-500 text-sm",children:[le.name," is disabled."]})]},le.id)})})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(vy,{configs:D,currentProjectId:r??void 0,onEditJob:(le,pe)=>{},queueStatus:M,queueAnalytics:I}),s.jsx(by,{form:G.form,scheduleMode:G.scheduleMode,selectedTemplateId:G.selectedTemplateId,onFieldChange:me,onSwitchToTemplate:ye,onSwitchToCustom:Oe,onApplyTemplate:Te}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Fe,{variant:"ghost",onClick:()=>{var le,pe,Me,Ae,Ke,ft,Dt,jt,$t;if(B){const Wt=tu(B.scheduleBundleId,B.cronSchedule,B.reviewerSchedule,((le=B.qa)==null?void 0:le.schedule)||"45 2,14 * * *",((pe=B.audit)==null?void 0:pe.schedule)||"50 3 * * 1",((Me=B.roadmapScanner)==null?void 0:Me.slicerSchedule)||"35 */12 * * *",((Ae=B.merger)==null?void 0:Ae.schedule)??"55 */4 * * *"),Ge=((Ke=B.queue)==null?void 0:Ke.providerBuckets)??{};ee({form:{cronSchedule:B.cronSchedule||"5 */3 * * *",reviewerSchedule:B.reviewerSchedule||"25 */6 * * *",qa:B.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:B.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:B.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((ft=B.roadmapScanner)==null?void 0:ft.enabled)??!0,slicerSchedule:((Dt=B.roadmapScanner)==null?void 0:Dt.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:B.scheduleBundleId??null,schedulingPriority:B.schedulingPriority??3,cronScheduleOffset:B.cronScheduleOffset??0,globalQueueEnabled:((jt=B.queue)==null?void 0:jt.enabled)??!0},scheduleMode:Wt?"template":"custom",selectedTemplateId:(Wt==null?void 0:Wt.id)??"",isDirty:!1,queueMode:(($t=B.queue)==null?void 0:$t.mode)??"auto",providerBuckets:Object.entries(Ge).map(([pa,ut])=>({key:pa,maxConcurrency:ut.maxConcurrency}))}),z(!1),Z(""),W("1")}},disabled:!G.isDirty,children:"Reset"}),s.jsxs(Fe,{onClick:Ve,loading:N,disabled:!G.isDirty,children:[s.jsx(Fc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(Je,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(Wf,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),Q.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:Q.entries.map((le,pe)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:le},pe))})]})},{id:"parallelism",label:"Parallelism",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(eS,{className:"h-5 w-5 text-indigo-400"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Buckets"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Control how jobs from different AI providers are dispatched concurrently."})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ia,{label:"Dispatch Mode",value:G.queueMode,onChange:le=>{ee(pe=>({...pe,queueMode:le,isDirty:!0}))},options:[{label:"Auto — detect providers, balance automatically",value:"auto"},{label:"Conservative — one job at a time globally",value:"conservative"},{label:"Provider-aware — per-bucket concurrency",value:"provider-aware"}],helperText:"Auto (recommended) detects providers and allows cross-provider parallelism with no config. Provider-aware lets you set explicit per-bucket limits."}),s.jsx(He,{label:"Global Max Concurrency",type:"number",min:"1",max:"20",value:String(G.globalMaxConcurrency),onChange:le=>{const pe=Math.min(20,Math.max(1,Number(le.target.value||1)));ee(Me=>({...Me,globalMaxConcurrency:pe,isDirty:!0}))},helperText:"Maximum concurrent jobs across all providers."})]}),G.queueMode==="provider-aware"&&s.jsxs("div",{className:"space-y-3 pt-2 border-t border-slate-800",children:[s.jsx("div",{className:"text-sm font-medium text-slate-300",children:"Configured Buckets"}),G.providerBuckets.length===0&&s.jsx("div",{className:"text-sm text-slate-500",children:"No buckets configured. Add a bucket below to set per-provider concurrency limits."}),G.providerBuckets.map((le,pe)=>{var Ae,Ke;const Me=((Ke=(Ae=I==null?void 0:I.byProviderBucket)==null?void 0:Ae[le.key])==null?void 0:Ke.running)??0;return s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-slate-800 bg-slate-950/50",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-sm font-mono text-slate-200 truncate",children:le.key}),Me>0&&s.jsxs("div",{className:"text-xs text-amber-400 mt-0.5",children:[Me," running"]})]}),s.jsx("div",{className:"w-28 shrink-0",children:s.jsx(He,{type:"number",min:"1",max:"10",value:String(le.maxConcurrency),"aria-label":`Max concurrency for ${le.key}`,onChange:ft=>{const Dt=Math.min(10,Math.max(1,Number(ft.target.value||1)));ee(jt=>{const $t=[...jt.providerBuckets];return $t[pe]={...$t[pe],maxConcurrency:Dt},{...jt,providerBuckets:$t,isDirty:!0}})}})}),s.jsx("button",{type:"button","aria-label":`Remove bucket ${le.key}`,onClick:()=>{ee(ft=>({...ft,providerBuckets:ft.providerBuckets.filter((Dt,jt)=>jt!==pe),isDirty:!0}))},className:"p-1.5 rounded text-slate-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",children:s.jsx(qr,{className:"h-4 w-4"})})]},le.key)}),ne?s.jsxs("div",{className:"flex items-end gap-3 p-3 rounded-lg border border-indigo-500/30 bg-indigo-950/20",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(He,{label:"Bucket Key",placeholder:"e.g. claude-native, codex",value:de,onChange:le=>Z(le.target.value),helperText:"Provider bucket key"})}),s.jsx("div",{className:"w-28 shrink-0",children:s.jsx(He,{label:"Max Concurrency",type:"number",min:"1",max:"10",value:P,onChange:le=>W(le.target.value)})}),s.jsxs("div",{className:"flex gap-2 pb-0.5",children:[s.jsx(Fe,{size:"sm",onClick:()=>{const le=de.trim();if(!le)return;const pe=Math.min(10,Math.max(1,Number(P||1)));ee(Me=>({...Me,providerBuckets:[...Me.providerBuckets.filter(Ae=>Ae.key!==le),{key:le,maxConcurrency:pe}],isDirty:!0})),Z(""),W("1"),z(!1)},disabled:!de.trim(),children:"Add"}),s.jsx(Fe,{size:"sm",variant:"ghost",onClick:()=>{z(!1),Z(""),W("1")},children:"Cancel"})]})]}):s.jsxs("button",{type:"button",onClick:()=>z(!0),className:"flex items-center gap-1.5 text-sm text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(Zl,{className:"h-4 w-4"}),"Add Bucket"]})]})]}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Fe,{variant:"ghost",onClick:()=>{var le;if(B){const pe=((le=B.queue)==null?void 0:le.providerBuckets)??{};ee(Me=>{var Ae,Ke;return{...Me,queueMode:((Ae=B.queue)==null?void 0:Ae.mode)??"auto",globalMaxConcurrency:((Ke=B.queue)==null?void 0:Ke.maxConcurrency)??1,providerBuckets:Object.entries(pe).map(([ft,Dt])=>({key:ft,maxConcurrency:Dt.maxConcurrency})),isDirty:!1}}),z(!1),Z(""),W("1")}},disabled:!G.isDirty,children:"Reset"}),s.jsxs(Fe,{onClick:Ve,loading:N,disabled:!G.isDirty,children:[s.jsx(Fc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})}];return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"}),xe&&s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Schedule Bundle"}),s.jsx("div",{className:"text-sm font-medium text-indigo-300",children:xe.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",Q.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(Gx,{tabs:Tt,activeTab:o,onChange:h})]})};function Kg(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const UN=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Merge Completed",value:"merge_completed"},{label:"Merge Failed",value:"merge_failed"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],qN=(l,r)=>l.includes(r)?l.filter(c=>c!==r):[...l,r],ex=({webhook:l,onChange:r,onSave:c,onCancel:o,isNew:h})=>s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ia,{label:"Type",value:l.type,onChange:f=>{const v=f;r(v==="telegram"?{type:v,botToken:"",chatId:"",events:l.events}:{type:v,url:"",events:l.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),l.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(He,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:f=>r({...l,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(He,{label:"Chat ID",value:l.chatId||"",onChange:f=>r({...l,chatId:f.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(He,{label:"Webhook URL",type:"password",value:l.url||"",onChange:f=>r({...l,url:f.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:UN.map(f=>s.jsx("button",{type:"button",onClick:()=>r({...l,events:qN(l.events,f.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${l.events.includes(f.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:f.label},f.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Fe,{variant:"ghost",onClick:o,children:"Cancel"}),s.jsx(Fe,{onClick:c,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:h?"Add Webhook":"Save Changes"})]})]}),Sy=({notifications:l,onChange:r,globalWebhook:c,onSetGlobal:o,onUnsetGlobal:h})=>{const[f,v]=qe.useState(null),[N,b]=qe.useState(!1),[x,S]=qe.useState({type:"slack",url:"",events:[]}),T=()=>{r({webhooks:[...l.webhooks,x]}),S({type:"slack",url:"",events:[]}),b(!1)},j=(C,M)=>{const R=[...l.webhooks];R[C]=M,r({webhooks:R})},D=C=>{r({webhooks:l.webhooks.filter((M,R)=>R!==C)})};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:l.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):l.webhooks.map((C,M)=>s.jsx("div",{children:f===M?s.jsx(ex,{webhook:C,onChange:R=>j(M,R),onSave:()=>v(null),onCancel:()=>v(null)}):s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:C.type}),C.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",C.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:C.events.map(R=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:R.replace("_"," ")},R))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[o!==void 0&&(()=>{const R=c!=null&&Kg(C)===Kg(c);return s.jsx("button",{type:"button",onClick:()=>R?h==null?void 0:h():o(C),className:`p-2 transition-colors ${R?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":R?"Global channel (active)":"Set as global channel",title:R?"Global channel (active)":"Set as global channel",children:s.jsx(N1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>v(M),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${C.type} webhook`,title:`Edit ${C.type} webhook`,children:s.jsx(to,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>D(M),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${C.type} webhook`,title:`Delete ${C.type} webhook`,children:s.jsx(qr,{className:"h-4 w-4"})})]})]})},M))}),N?s.jsx(ex,{webhook:x,onChange:S,onSave:T,onCancel:()=>b(!1),isNew:!0}):s.jsxs(Fe,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Zl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},HN=({isOpen:l,onClose:r,title:c,children:o})=>(U.useEffect(()=>{const h=f=>{f.key==="Escape"&&r()};return l&&(document.addEventListener("keydown",h),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",h),document.body.style.overflow="unset"}},[l,r]),l?Db.createPortal(s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:r,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:c}),s.jsx("button",{onClick:r,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:s.jsx(Hr,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:o})]})]}),document.body):null),LN=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(c=>l.toUpperCase().includes(c)),BN=({value:l,isSensitive:r})=>{const[c,o]=qe.useState(!1);return r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:c?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>o(!c),className:"text-slate-500 hover:text-slate-300","aria-label":c?"Hide sensitive value":"Show sensitive value",title:c?"Hide sensitive value":"Show sensitive value",children:c?s.jsx(g1,{className:"h-4 w-4"}):s.jsx(y1,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},Ny=({envVars:l,onChange:r,compact:c=!1})=>{const[o,h]=qe.useState(""),[f,v]=qe.useState(""),[N,b]=qe.useState(null),[x,S]=qe.useState(""),{addToast:T}=Jt(),j=()=>{if(o.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(o)){T({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...l,[o]:f}),h(""),v("")}},D=Y=>{const G={...l};delete G[Y],r(G)},C=Y=>{b(Y),S(l[Y]??"")},M=()=>{N&&(r({...l,[N]:x}),b(null),S(""))},R=()=>{b(null),S("")},I=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[!c&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:I.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):I.map(([Y,G])=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:Y}),N===Y?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:x,onChange:ee=>S(ee.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),s.jsx("button",{type:"button",onClick:M,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${Y} value`,title:`Save ${Y} value`,children:s.jsx(Fc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:R,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${Y}`,title:`Cancel editing ${Y}`,children:s.jsx(Hr,{className:"h-4 w-4"})})]}):s.jsx(BN,{value:G,isSensitive:LN(Y)})]}),N!==Y&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>C(Y),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${Y}`,title:`Edit ${Y}`,children:s.jsx(to,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>D(Y),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${Y}`,title:`Delete ${Y}`,children:s.jsx(qr,{className:"h-4 w-4"})})]})]},Y))}),s.jsxs("div",{className:`flex items-end gap-3 ${c?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!c&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:o,onChange:Y=>h(Y.target.value.toUpperCase()),placeholder:c?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!c&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:f,onChange:Y=>v(Y.target.value),placeholder:c?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Fe,{onClick:j,disabled:!o.trim(),size:c?"sm":"md",children:[s.jsx(Zl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function VN(l,r){var c;return!!(l!=null&&l.startsWith("glm-")||(c=r==null?void 0:r.model)!=null&&c.startsWith("glm-"))}function YN(l,r){var c,o;return VN(l,r)?!((o=(c=r==null?void 0:r.envVars)==null?void 0:c.ANTHROPIC_API_KEY)!=null&&o.trim()):!1}const tx={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},custom:{name:"",command:""}},$N=({isOpen:l,onClose:r,onSave:c,presetId:o,preset:h,isBuiltIn:f,existingIds:v})=>{const[N,b]=qe.useState(""),[x,S]=qe.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[T,j]=qe.useState(!1),[D,C]=qe.useState("custom"),[M,R]=qe.useState(null),I=YN(o??N,x);qe.useEffect(()=>{l&&(o&&h?(b(o),S({name:h.name,command:h.command,subcommand:h.subcommand??"",promptFlag:h.promptFlag??"",autoApproveFlag:h.autoApproveFlag??"",workdirFlag:h.workdirFlag??"",modelFlag:h.modelFlag??"",model:h.model??"",envVars:h.envVars??{}}),o==="claude"||h.command==="claude"?C("claude"):o==="codex"||h.command==="codex"?C("codex"):C("custom")):(b(""),S({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),C("custom")),R(null),j(!!(h!=null&&h.envVars&&Object.keys(h.envVars).length>0)))},[l,o,h]);const Y=Z=>{if(C(Z),Z!=="custom"&&tx[Z]){const P=tx[Z];S(W=>({...W,...P,envVars:W.envVars})),!o&&!N&&b(Z)}},G=(Z,P)=>{S(W=>({...W,[Z]:P})),R(null)},ee=()=>{if(!x.name.trim())return R("Name is required"),!1;if(!x.command.trim())return R("Command is required"),!1;if(!o){if(!N.trim())return R("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(N))return R("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(v.includes(N))return R("A preset with this ID already exists"),!1}return!0},de=()=>{var P,W,ne,z,Q,_;if(!ee())return;const Z={name:x.name.trim(),command:x.command.trim()};(P=x.subcommand)!=null&&P.trim()&&(Z.subcommand=x.subcommand.trim()),(W=x.promptFlag)!=null&&W.trim()&&(Z.promptFlag=x.promptFlag.trim()),(ne=x.autoApproveFlag)!=null&&ne.trim()&&(Z.autoApproveFlag=x.autoApproveFlag.trim()),(z=x.workdirFlag)!=null&&z.trim()&&(Z.workdirFlag=x.workdirFlag.trim()),(Q=x.modelFlag)!=null&&Q.trim()&&(Z.modelFlag=x.modelFlag.trim()),(_=x.model)!=null&&_.trim()&&(Z.model=x.model.trim()),x.envVars&&Object.keys(x.envVars).length>0&&(Z.envVars=x.envVars),c(o||N,Z),r()};return s.jsx(HN,{isOpen:l,onClose:r,title:o?`Edit Preset: ${h==null?void 0:h.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[M&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:M}),I&&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(lu,{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:Y,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!o&&s.jsx(He,{label:"Preset ID",value:N,onChange:Z=>b(Z.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,"")),placeholder:"e.g., my-custom-provider",helperText:"Unique identifier for this preset (lowercase, numbers, hyphens, underscores)"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(He,{label:"Display Name",value:x.name,onChange:Z=>G("name",Z.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(He,{label:"Command",value:x.command,onChange:Z=>G("command",Z.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(He,{label:"Model",value:x.model??"",onChange:Z=>G("model",Z.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(He,{label:"Model Flag",value:x.modelFlag??"",onChange:Z=>G("modelFlag",Z.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>j(!T),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[T?s.jsx(n1,{className:"h-4 w-4"}):s.jsx(Mx,{className:"h-4 w-4"}),"Advanced Options"]}),T&&s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(He,{label:"Subcommand",value:x.subcommand??"",onChange:Z=>G("subcommand",Z.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(He,{label:"Prompt Flag",value:x.promptFlag??"",onChange:Z=>G("promptFlag",Z.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(He,{label:"Auto-Approve Flag",value:x.autoApproveFlag??"",onChange:Z=>G("autoApproveFlag",Z.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(He,{label:"Workdir Flag",value:x.workdirFlag??"",onChange:Z=>G("workdirFlag",Z.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),s.jsx(Ny,{envVars:x.envVars??{},onChange:Z=>G("envVars",Z),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Fe,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Fe,{onClick:de,children:o?"Save Changes":"Add Preset"})]})]})})},Xc=({label:l,value:r,onChange:c,placeholder:o,helpText:h})=>{const[f,v]=qe.useState(""),N=()=>{f.trim()&&!r.includes(f.trim())&&(c([...r,f.trim()]),v(""))},b=S=>{c(r.filter(T=>T!==S))},x=S=>{S.key==="Enter"&&(S.preventDefault(),N())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:l}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:r.map(S=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[S,s.jsx("button",{type:"button",onClick:()=>b(S),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${S}`,title:`Remove ${S}`,children:s.jsx(Hr,{className:"h-3 w-3"})})]},S))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:S=>v(S.target.value),onKeyDown:x,placeholder:o,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),s.jsx(Fe,{onClick:N,disabled:!f.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(Zl,{className:"h-4 w-4"})})]}),h&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:h})]})},FN=({form:l,updateField:r,projectName:c,doctorChecks:o,doctorLoading:h})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(Je,{className:"p-6 space-y-6",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[s.jsx(He,{label:"Project Name",value:c,disabled:!0}),s.jsx(He,{label:"Default Branch",value:l.defaultBranch,onChange:f=>r("defaultBranch",f.target.value)}),s.jsx(He,{label:"PRD Directory",value:l.prdDir,onChange:f=>r("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(He,{label:"Branch Prefix",value:l.branchPrefix,onChange:f=>r("branchPrefix",f.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(ga,{label:"Enable PRD Executor",checked:l.executorEnabled,onChange:f=>r("executorEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(ga,{label:"Enable Automated Reviews",checked:l.reviewerEnabled,onChange:f=>r("reviewerEnabled",f)})})]}),s.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:s.jsx(Xc,{label:"Branch Patterns",value:l.branchPatterns,onChange:f=>r("branchPatterns",f),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})}),s.jsxs(Je,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(Tx,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),h?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):o.map((f,v)=>{const N=f.status==="pass",b=f.status==="warn",x=N?"bg-green-500/10 text-green-400 border-green-500/20":b?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return s.jsxs("div",{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:f.name}),s.jsx("p",{className:"text-xs text-slate-500",children:f.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${x}`,children:f.status.toUpperCase()})]},`${f.name}-${v}`)})]})]}),ax=({presetId:l,preset:r,isBuiltIn:c,onEdit:o,onDelete:h,onReset:f})=>{var x,S,T;const v=r.envVars?Object.keys(r.envVars).length:0,b=(l.startsWith("glm-")||((x=r.model)==null?void 0:x.startsWith("glm-")))&&!((T=(S=r.envVars)==null?void 0:S.ANTHROPIC_API_KEY)!=null&&T.trim());return s.jsxs("div",{className:"flex flex-col p-4 rounded-lg border border-slate-800 bg-slate-950/40 hover:border-slate-700 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:r.name}),c&&s.jsx(Ar,{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(lu,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:o,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${r.name} preset`,title:"Edit preset",children:s.jsx(to,{className:"h-4 w-4"})}),c?f&&s.jsx("button",{type:"button",onClick:f,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${r.name} to defaults`,title:"Reset to defaults",children:s.jsx(Ax,{className:"h-4 w-4"})}):h&&s.jsx("button",{type:"button",onClick:h,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${r.name} preset`,title:"Delete preset",children:s.jsx(qr,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Command:"}),s.jsxs("code",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-indigo-400 font-mono",children:[r.command,r.subcommand&&` ${r.subcommand}`]})]}),r.model&&s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Model:"}),s.jsx(Ar,{variant:"neutral",className:"text-[10px] font-mono",children:r.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",l]}),v>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[v," env var",v!==1?"s":""]})]})]})},Uf={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},qf={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics",planner:"Planner",merger:"Merger"},Tf={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},nx=({override:l,onChange:r,onSave:c,onCancel:o,isNew:h,presetOptions:f})=>{const v=C=>{const M=l.days.includes(C)?l.days.filter(R=>R!==C):[...l.days,C].sort((R,I)=>R-I);r({...l,days:M})},N=()=>{r({...l,days:[1,2,3,4,5]})},b=()=>{r({...l,days:[0,6]})},x=()=>{r({...l,days:[0,1,2,3,4,5,6]})},S=()=>{r({...l,jobTypes:null})},T=C=>{const M=l.jobTypes??[],R=M.includes(C)?M.filter(I=>I!==C):[...M,C];r({...l,jobTypes:R.length===0?null:R})},j=l.jobTypes===null||l.jobTypes===void 0,D=l.label.trim().length>0&&l.presetId.trim().length>0&&l.days.length>0&&l.startTime.trim().length>0&&l.endTime.trim().length>0;return s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(He,{label:"Label",value:l.label,onChange:C=>r({...l,label:C.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(ia,{label:"Provider",value:l.presetId,onChange:C=>r({...l,presetId:C}),options:f,placeholder:"Select a provider preset"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Days"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Object.keys(Uf).map(C=>s.jsx("button",{type:"button",onClick:()=>v(C),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${l.days.includes(C)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:Uf[C]},C)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:N,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekdays"}),s.jsx("button",{type:"button",onClick:b,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekend"}),s.jsx("button",{type:"button",onClick:x,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"All"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Start Time"}),s.jsx("input",{type:"time",value:l.startTime,onChange:C=>r({...l,startTime:C.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"End Time"}),s.jsx("input",{type:"time",value:l.endTime,onChange:C=>r({...l,endTime:C.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Job Types"}),s.jsx("button",{type:"button",onClick:S,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:j?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(qf).filter(C=>C!=="planner").map(C=>{var R;const M=j||(((R=l.jobTypes)==null?void 0:R.includes(C))??!1);return s.jsx("button",{type:"button",onClick:()=>T(C),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${M?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled:j,children:qf[C]},C)})}),j&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"This override applies to all job types."})]}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(ga,{checked:l.enabled,onChange:C=>r({...l,enabled:C}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(Fe,{variant:"ghost",onClick:o,children:"Cancel"}),s.jsx(Fe,{onClick:c,disabled:!D,children:h?"Add Override":"Save Changes"})]})]})},GN=({overrides:l,onChange:r,presetOptions:c})=>{const[o,h]=qe.useState(null),[f,v]=qe.useState(!1),[N,b]=qe.useState(Tf),x=()=>{r([...l,N]),b({...Tf}),v(!1)},S=(R,I)=>{const Y=[...l];Y[R]=I,r(Y)},T=R=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(l.filter((I,Y)=>Y!==R))},j=R=>{const I=[...l];I[R]={...I[R],enabled:!I[R].enabled},r(I)},D=R=>R.length===7?"Every day":R.length===5&&R.every(I=>I>=1&&I<=5)?"Weekdays":R.length===2&&R.includes(0)&&R.includes(6)?"Weekends":R.map(I=>Uf[I]).join(", "),C=R=>!R||R.length===0?"All Jobs":R.map(I=>qf[I]).join(", "),M=R=>{const I=c.find(Y=>Y.value===R);return(I==null?void 0:I.label)||R};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"space-y-3",children:l.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No schedule overrides configured."}):l.map((R,I)=>s.jsx("div",{children:o===I?s.jsx(nx,{override:R,onChange:Y=>S(I,Y),onSave:()=>h(null),onCancel:()=>h(null),presetOptions:c}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${R.enabled?"border-slate-800":"border-slate-800/50 opacity-60"}`,children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsx(ga,{checked:R.enabled,onChange:()=>j(I)}),s.jsx("span",{className:"text-slate-100 font-medium",children:R.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:M(R.presetId)})," · ",D(R.days)," · ",R.startTime," - ",R.endTime," · ",C(R.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>h(I),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${R.label}`,title:`Edit ${R.label}`,children:s.jsx(to,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>T(I),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${R.label}`,title:`Delete ${R.label}`,children:s.jsx(qr,{className:"h-4 w-4"})})]})]})},I))}),f?s.jsx(nx,{override:N,onChange:b,onSave:x,onCancel:()=>{v(!1),b({...Tf})},isNew:!0,presetOptions:c}):s.jsxs(Fe,{variant:"ghost",onClick:()=>v(!0),children:[s.jsx(Zl,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},Jc=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],PN={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},"claude-sonnet-4-6":{name:"Claude Sonnet 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-sonnet-4-6"},"claude-opus-4-6":{name:"Claude Opus 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-opus-4-6"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},"glm-47":{name:"GLM-4.7",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-4.7",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-4.7",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-4.7"}},"glm-5":{name:"GLM-5",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-5",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-5",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-5"}}},ZN=({form:l,updateField:r,jobProvidersChangedRef:c,getAllPresets:o,getPresetOptions:h,handleEditPreset:f,handleDeletePreset:v,handleResetPreset:N,handleAddPreset:b})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Je,{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(Fe,{onClick:b,children:[s.jsx(Zl,{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:[Jc.map(x=>{const T=o()[x];return T?s.jsx(ax,{presetId:x,preset:T,isBuiltIn:!0,onEdit:()=>f(x),onReset:()=>N(x)},x):null}),Object.entries(l.providerPresets).filter(([x])=>!Jc.includes(x)).map(([x,S])=>s.jsx(ax,{presetId:x,preset:S,isBuiltIn:!1,onEdit:()=>f(x),onDelete:()=>v(x)},x))]})]}),s.jsxs(Je,{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:x=>r("provider",x),options:h(l.providerPresets)})})]}),[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"},{key:"analytics",label:"Analytics"}].map(({key:x,label:S})=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:S}),s.jsx("div",{className:"w-64",children:s.jsx(ia,{value:l.jobProviders[x]??"",onChange:T=>{const j={...l.jobProviders};T===""?delete j[x]:j[x]=T,c.current=!0,r("jobProviders",j)},options:[{label:"Use Global (default)",value:""},...h(l.providerPresets)]})})]},x))]})]}),s.jsxs(Je,{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:x=>r("primaryFallbackPreset",x),options:[{label:"— None —",value:""},...Object.entries(o()).map(([x,S])=>({label:S.name,value:x}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(ia,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:x=>r("secondaryFallbackPreset",x),options:[{label:"— None —",value:""},...Object.entries(o()).map(([x,S])=>({label:S.name,value:x}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Schedule Overrides"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Temporarily switch providers based on day of week and time windows"})]}),s.jsx(GN,{overrides:l.providerScheduleOverrides,onChange:x=>r("providerScheduleOverrides",x),presetOptions:Object.entries(o()).map(([x,S])=>({label:S.name,value:x}))})]}),s.jsxs(Je,{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(Ny,{envVars:l.providerEnv,onChange:x=>r("providerEnv",x)})]}),s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Performance"}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("input",{type:"range",min:"0",max:"100",value:l.minReviewScore,onChange:x=>r("minReviewScore",Number(x.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),s.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:l.minReviewScore})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(He,{label:"Max Runtime (Executor)",type:"number",value:String(l.maxRuntime),onChange:x=>r("maxRuntime",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(He,{label:"Max Runtime (Reviewer)",type:"number",value:String(l.reviewerMaxRuntime),onChange:x=>r("reviewerMaxRuntime",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(He,{label:"Max Log Size",type:"number",value:String(l.maxLogSize),onChange:x=>r("maxLogSize",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automatic retry behavior for the PR reviewer when fixes do not fully resolve issues."})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(He,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(l.reviewerMaxRetries),onChange:x=>{const S=Math.min(10,Math.max(0,Number(x.target.value||0)));r("reviewerMaxRetries",S)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(He,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(l.reviewerRetryDelay),onChange:x=>{const S=Math.min(300,Math.max(0,Number(x.target.value||0)));r("reviewerRetryDelay",S)},helperText:"Wait time between retry attempts to let CI settle."}),s.jsx(He,{label:"Max PRs Per Run",type:"number",min:"0",max:"100",value:String(l.reviewerMaxPrsPerRun),onChange:x=>{const S=Math.min(100,Math.max(0,Number(x.target.value||0)));r("reviewerMaxPrsPerRun",S)},helperText:"Hard cap on how many PRs the reviewer processes per run. 0 = unlimited."})]})]})]}),WN=({form:l,updateField:r,handleRoadmapToggle:c})=>{var o,h;return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{id:"job-section-qa",children:s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),s.jsx(ga,{checked:l.qa.enabled,onChange:f=>r("qa",{...l.qa,enabled:f})})]}),l.qa.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(al,{label:"QA Schedule",value:l.qa.schedule,onChange:f=>r("qa",{...l.qa,schedule:f})}),s.jsx(He,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:f=>r("qa",{...l.qa,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(ia,{label:"Artifacts",value:l.qa.artifacts,onChange:f=>r("qa",{...l.qa,artifacts:f}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(He,{label:"Skip Label",value:l.qa.skipLabel,onChange:f=>r("qa",{...l.qa,skipLabel:f.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsx(Xc,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:f=>r("qa",{...l.qa,branchPatterns:f}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA (defaults to top-level branchPatterns if empty)"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Automatically install Playwright browsers if missing during QA run"})]}),s.jsx(ga,{checked:l.qa.autoInstallPlaywright,onChange:f=>r("qa",{...l.qa,autoInstallPlaywright:f})})]})]})]})}),s.jsx("div",{id:"job-section-audit",children:s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),s.jsx(ga,{checked:l.audit.enabled,onChange:f=>r("audit",{...l.audit,enabled:f})})]}),l.audit.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(al,{label:"Audit Schedule",value:l.audit.schedule,onChange:f=>r("audit",{...l.audit,schedule:f})}),s.jsx(He,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:f=>r("audit",{...l.audit,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})]})]})}),s.jsx("div",{id:"job-section-analytics",children:s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Analytics (Amplitude)"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Fetch Amplitude data, analyze with AI, and create board issues"})]}),s.jsx(ga,{checked:l.analytics.enabled,onChange:f=>r("analytics",{...l.analytics,enabled:f})})]}),l.analytics.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(He,{label:"Amplitude API Key",value:((o=l.providerEnv)==null?void 0:o.AMPLITUDE_API_KEY)??"",onChange:f=>r("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude project API key"}),s.jsx(He,{label:"Amplitude Secret Key",type:"password",value:((h=l.providerEnv)==null?void 0:h.AMPLITUDE_SECRET_KEY)??"",onChange:f=>r("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude secret key"}),s.jsx(al,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:f=>r("analytics",{...l.analytics,schedule:f})}),s.jsx(He,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:f=>r("analytics",{...l.analytics,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for analytics job (default: 900 seconds)"}),s.jsx(He,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:f=>r("analytics",{...l.analytics,lookbackDays:Math.max(1,Math.min(90,Number(f.target.value||7)))}),helperText:"Number of days to look back in Amplitude (1-90)"}),s.jsx(ia,{label:"Target Column",value:l.analytics.targetColumn,onChange:f=>r("analytics",{...l.analytics,targetColumn:f}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}],helperText:"Board column for created issues"}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:"Analysis Prompt (optional)"}),s.jsx("textarea",{rows:4,value:l.analytics.analysisPrompt??"",onChange:f=>r("analytics",{...l.analytics,analysisPrompt:f.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-y"}),s.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:"Custom prompt for AI analysis. Leave empty to use default."})]})]})]})}),s.jsx("div",{id:"job-section-slicer",children:s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Generate one PRD per run using ROADMAP.md first, then audit findings when roadmap work is exhausted"})]}),s.jsx(ga,{checked:l.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:c})]}),l.roadmapScanner.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(He,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:f=>r("roadmapScanner",{...l.roadmapScanner,roadmapPath:f.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(al,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:f=>r("roadmapScanner",{...l.roadmapScanner,slicerSchedule:f})}),s.jsx(He,{label:"Planner Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:f=>r("roadmapScanner",{...l.roadmapScanner,slicerMaxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(ia,{label:"Planner Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:f=>r("roadmapScanner",{...l.roadmapScanner,priorityMode:f==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}],helperText:"Choose whether planner consumes roadmap items or audit findings first."}),s.jsx(ia,{label:"Planner Issue Column",value:l.roadmapScanner.issueColumn||"Ready",onChange:f=>r("roadmapScanner",{...l.roadmapScanner,issueColumn:f==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})}),s.jsx("div",{id:"job-section-merger",children:s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Merge Orchestrator"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Repo-wide PR merge coordinator — scans, rebases, and merges in FIFO order"})]}),s.jsx(ga,{checked:l.merger.enabled,onChange:f=>r("merger",{...l.merger,enabled:f})})]}),l.merger.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(al,{label:"Merger Schedule",value:l.merger.schedule,onChange:f=>r("merger",{...l.merger,schedule:f})}),s.jsx(He,{label:"Max Runtime",type:"number",value:String(l.merger.maxRuntime),onChange:f=>r("merger",{...l.merger,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime (default: 1800 seconds)"}),s.jsx(ia,{label:"Merge Method",value:l.merger.mergeMethod,onChange:f=>r("merger",{...l.merger,mergeMethod:f}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}],helperText:"Git merge method for eligible PRs"}),s.jsx(He,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.merger.minReviewScore),onChange:f=>r("merger",{...l.merger,minReviewScore:Math.max(0,Math.min(100,Number(f.target.value||0)))}),helperText:"Minimum review score required (0-100)"}),s.jsx(He,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.merger.maxPrsPerRun),onChange:f=>r("merger",{...l.merger,maxPrsPerRun:Math.max(0,Number(f.target.value||0))}),helperText:"Maximum PRs to merge per run (0 = unlimited)"})]}),s.jsx(Xc,{label:"Branch Patterns",value:l.merger.branchPatterns,onChange:f=>r("merger",{...l.merger,branchPatterns:f}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter eligible PRs (empty = use top-level patterns)"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Rebase before merge"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rebase each PR against its base branch before merging"})]}),s.jsx(ga,{checked:l.merger.rebaseBeforeMerge,onChange:f=>r("merger",{...l.merger,rebaseBeforeMerge:f})})]})]})]})})]})},IN=({form:l,scheduleMode:r,selectedTemplateId:c,onFieldChange:o,onSwitchToTemplate:h,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:N,currentProjectId:b,onEditJob:x})=>s.jsx(by,{form:l,scheduleMode:r,selectedTemplateId:c,onFieldChange:o,onSwitchToTemplate:h,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:N,currentProjectId:b,onEditJob:x}),QN=({form:l,updateField:r})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(ga,{checked:l.boardProvider.enabled,onChange:c=>r("boardProvider",{...l.boardProvider,enabled:c})})]}),l.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(ia,{label:"Board Provider",value:l.boardProvider.provider,onChange:c=>r("boardProvider",{...l.boardProvider,provider:c}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),l.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(He,{label:"Project Number",type:"number",value:String(l.boardProvider.projectNumber||""),onChange:c=>r("boardProvider",{...l.boardProvider,projectNumber:c.target.value?Number(c.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(He,{label:"Repository",value:l.boardProvider.repo||"",onChange:c=>r("boardProvider",{...l.boardProvider,repo:c.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),l.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]}),s.jsxs(Je,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Sy,{notifications:l.notifications,onChange:c=>r("notifications",c)})]})]}),XN=({form:l,updateField:r})=>s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(He,{label:"Templates Directory",value:l.templatesDir,onChange:c=>r("templatesDir",c.target.value),helperText:"Directory for custom template overrides"}),s.jsx(He,{label:"Max Retries",type:"number",min:"1",value:String(l.maxRetries),onChange:c=>{const o=Math.max(1,Number(c.target.value||1));r("maxRetries",o)},helperText:"Retry attempts for rate-limited API calls"})]}),s.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:s.jsx(Xc,{label:"PRD Priority",value:l.prdPriority,onChange:c=>r("prdPriority",c),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]});function JN(l,r,c,o){const{addToast:h}=Jt(),[f,v]=U.useState(!1),[N,b]=U.useState(null),[x,S]=U.useState(null),[T,j]=U.useState(null),D=U.useCallback(()=>({...PN,...l}),[l]),C=U.useCallback(Z=>{const P=D();return Object.entries(P).map(([W,ne])=>({label:ne.name,value:W}))},[D]),M=U.useCallback(Z=>{const P=[];r===Z&&P.push("Global Provider");const W={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[ne,z]of Object.entries(c))z===Z&&P.push(W[ne]??ne);return P},[r,c]),R=U.useCallback(()=>{b(null),S(null),v(!0)},[]),I=U.useCallback(Z=>{const W=D()[Z];W&&(b(Z),S(W),v(!0))},[D]),Y=U.useCallback(async(Z,P)=>{const W=!N,ne={...l,[Z]:P};o("providerPresets",ne);try{await Wc({providerPresets:{[Z]:P}}),h({title:W?"Preset Added":"Preset Updated",message:W?`${P.name} has been added. You can now assign it to jobs.`:`${P.name} has been saved.`,type:"success"})}catch(z){h({title:"Save Failed",message:z instanceof Error?z.message:"Failed to save preset",type:"error"}),o("providerPresets",l)}},[N,l,o,h]),G=U.useCallback(Z=>{var ne,z;if(Jc.includes(Z)){h({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const P=M(Z);if(P.length>0){j({presetId:Z,presetName:((ne=D()[Z])==null?void 0:ne.name)??Z,references:P});return}const W={...l};delete W[Z],o("providerPresets",W),h({title:"Preset Deleted",message:`${((z=D()[Z])==null?void 0:z.name)??Z} has been removed.`,type:"success"})},[l,o,h,M,D]),ee=U.useCallback(Z=>{const P={...l};delete P[Z],o("providerPresets",P),h({title:"Preset Reset",message:`${Z} has been reset to built-in defaults.`,type:"success"})},[l,o,h]),de=U.useCallback(()=>{if(!T)return;const{presetId:Z}=T,P={...l};delete P[Z],o("providerPresets",P);const W={...c};for(const ne of Object.keys(W))W[ne]===Z&&delete W[ne];o("jobProviders",W),r===Z&&o("provider","claude"),j(null),h({title:"Preset Deleted",message:`${T.presetName} has been removed and all references cleared.`,type:"success"})},[T,l,c,r,o,h]);return{presetModalOpen:f,setPresetModalOpen:v,editingPresetId:N,editingPreset:x,deleteWarning:T,setDeleteWarning:j,getAllPresets:D,getPresetOptions:C,getPresetReferences:M,handleAddPreset:R,handleEditPreset:I,handleSavePreset:Y,handleDeletePreset:G,handleResetPreset:ee,handleConfirmDelete:de}}const KN=["executor","reviewer","qa","audit","slicer","analytics"],Mf=l=>{var r,c,o,h,f,v,N;return{provider:l.provider,providerLabel:l.providerLabel??"",providerPresets:l.providerPresets??{},defaultBranch:l.defaultBranch,prdDir:l.prdDir||"docs/prds",branchPrefix:l.branchPrefix,branchPatterns:l.branchPatterns||[],executorEnabled:l.executorEnabled??!0,reviewerEnabled:l.reviewerEnabled,minReviewScore:l.minReviewScore,maxRuntime:l.maxRuntime,reviewerMaxRuntime:l.reviewerMaxRuntime,maxLogSize:l.maxLogSize,cronSchedule:l.cronSchedule||"5 */3 * * *",reviewerSchedule:l.reviewerSchedule||"25 */6 * * *",scheduleBundleId:l.scheduleBundleId??null,cronScheduleOffset:l.cronScheduleOffset??0,schedulingPriority:l.schedulingPriority??3,maxRetries:l.maxRetries??3,reviewerMaxRetries:l.reviewerMaxRetries??2,reviewerRetryDelay:l.reviewerRetryDelay??30,reviewerMaxPrsPerRun:l.reviewerMaxPrsPerRun??0,providerEnv:l.providerEnv||{},notifications:l.notifications||{webhooks:[]},prdPriority:l.prdPriority||[],roadmapScanner:{enabled:((r=l.roadmapScanner)==null?void 0:r.enabled)??!0,roadmapPath:((c=l.roadmapScanner)==null?void 0:c.roadmapPath)??"ROADMAP.md",autoScanInterval:((o=l.roadmapScanner)==null?void 0:o.autoScanInterval)??300,slicerSchedule:((h=l.roadmapScanner)==null?void 0:h.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((f=l.roadmapScanner)==null?void 0:f.slicerMaxRuntime)??600,priorityMode:((v=l.roadmapScanner)==null?void 0:v.priorityMode)??"roadmap-first",issueColumn:((N=l.roadmapScanner)==null?void 0:N.issueColumn)??"Draft"},templatesDir:l.templatesDir||".night-watch/templates",boardProvider:l.boardProvider||{enabled:!0,provider:"github"},jobProviders:l.jobProviders||{},fallbackOnRateLimit:l.fallbackOnRateLimit??!0,primaryFallbackModel:l.primaryFallbackModel??l.claudeModel??"sonnet",secondaryFallbackModel:l.secondaryFallbackModel??l.primaryFallbackModel??l.claudeModel??"sonnet",primaryFallbackPreset:l.primaryFallbackPreset??"",secondaryFallbackPreset:l.secondaryFallbackPreset??"",claudeModel:l.primaryFallbackModel??l.claudeModel??"sonnet",providerScheduleOverrides:l.providerScheduleOverrides??[],qa:l.qa||{enabled:!0,schedule:"45 2,14 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},audit:l.audit||{enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800},analytics:l.analytics||{enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},merger:l.merger??{enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0},queue:l.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}}}},lx=l=>{var c;const r=tu(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??"35 */12 * * *",((c=l.merger)==null?void 0:c.schedule)??"55 */4 * * *");return r?{mode:"template",selectedTemplateId:r.id}:{mode:"custom",selectedTemplateId:""}},ew=()=>{const{addToast:l,projectName:r,selectedProjectId:c,globalModeLoading:o,isGlobalMode:h,removeProjectFromList:f}=Jt(),[v,N]=qe.useState(!1),[b,x]=qe.useState(!1),[S,T]=qe.useState(!1),[j,D]=qe.useState(null),[C,M]=qe.useState([]),[R,I]=qe.useState(void 0),Y=qe.useRef(!1),G=qe.useRef(!1),[ee,de]=qe.useState("template"),[Z,P]=qe.useState("always-on"),[W,ne]=qe.useState("general"),[z,Q]=qe.useState(null),{data:_,loading:ce,error:he,refetch:B}=yn(Jf,[c],{enabled:!o}),{data:$,loading:ie,refetch:ge}=yn(rS,[c],{enabled:!o}),Se=$??[],Re=(xe,ze)=>{D(Tt=>Tt&&{...Tt,[xe]:ze})},A=JN((j==null?void 0:j.providerPresets)??{},(j==null?void 0:j.provider)??"claude",(j==null?void 0:j.jobProviders)??{},Re);qe.useEffect(()=>{Hx().then(M).catch(console.error),SS().then(xe=>I(xe.webhook)).catch(()=>{})},[c]),qe.useEffect(()=>{const xe=new URLSearchParams(location.search),ze=xe.get("tab"),Tt=xe.get("mode");ze&&ne({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",analytics:"jobs",board:"integrations",notifications:"integrations"}[ze]??ze),Tt==="custom"?de("custom"):Tt==="template"&&de("template");const Ot=xe.get("jobType");Ot&&setTimeout(()=>{me("current",Ot)},300)},[location.search,_]);const se=qe.useCallback(xe=>{const ze=lx(xe);de(ze.mode),P(ze.selectedTemplateId)},[]);qe.useEffect(()=>{if(_)if(Y.current)Y.current=!1;else{const xe=Mf(_);D(xe),se(xe)}},[_,se]),qe.useEffect(()=>{j&&G.current&&(G.current=!1,Ve())},[j==null?void 0:j.jobProviders]),qe.useEffect(()=>{if(z){const xe=setTimeout(()=>Q(null),2e3);return()=>clearTimeout(xe)}},[z]);const me=(xe,ze)=>{if(xe===r||xe==="current"){if(["qa","audit","slicer","analytics","merger"].includes(ze)){ne("jobs"),setTimeout(()=>{const Ot=document.getElementById(`job-section-${ze}`);Ot&&(Ot.scrollIntoView({behavior:"smooth",block:"center"}),Q(`job-section-${ze}`))},50);return}ee!=="custom"&&Oe(),ne("schedules"),setTimeout(()=>{const ya={executor:"job-schedule-executor",reviewer:"job-schedule-reviewer"}[ze]||"",ca=document.getElementById(ya);ca&&(ca.scrollIntoView({behavior:"smooth",block:"center"}),Q(ya))},50)}else l({title:"Project Switch Required",message:`To edit ${xe}, please switch to that project in the sidebar.`,type:"info"})},ye=()=>{if(de("template"),!j)return;const xe=lx(j);xe.mode==="template"&&(P(xe.selectedTemplateId),Re("scheduleBundleId",xe.selectedTemplateId))},Oe=()=>{de("custom"),Re("scheduleBundleId",null),P("")},Te=xe=>{P(xe.id),D(ze=>ze&&{...ze,cronSchedule:xe.schedules.executor,reviewerSchedule:xe.schedules.reviewer,scheduleBundleId:xe.id,qa:{...ze.qa,schedule:xe.schedules.qa},audit:{...ze.audit,schedule:xe.schedules.audit},roadmapScanner:{...ze.roadmapScanner,slicerSchedule:xe.schedules.slicer},merger:{...ze.merger,schedule:xe.schedules.merger},fallbackOnRateLimit:!0})},Ve=async()=>{var Tt,Ot,ya,ca,an,le,pe;if(!j)return;const xe=j.cronSchedule!==(_==null?void 0:_.cronSchedule)||j.reviewerSchedule!==(_==null?void 0:_.reviewerSchedule)||j.cronScheduleOffset!==((_==null?void 0:_.cronScheduleOffset)??0)||j.schedulingPriority!==((_==null?void 0:_.schedulingPriority)??3)||j.executorEnabled!==((_==null?void 0:_.executorEnabled)??!0)||j.reviewerEnabled!==((_==null?void 0:_.reviewerEnabled)??!0)||j.queue.enabled!==(((Tt=_==null?void 0:_.queue)==null?void 0:Tt.enabled)??!0)||j.qa.enabled!==((_==null?void 0:_.qa.enabled)??!0)||j.qa.schedule!==(_==null?void 0:_.qa.schedule)||j.audit.enabled!==((_==null?void 0:_.audit.enabled)??!0)||j.audit.schedule!==(_==null?void 0:_.audit.schedule)||j.analytics.enabled!==(((Ot=_==null?void 0:_.analytics)==null?void 0:Ot.enabled)??!1)||j.analytics.schedule!==(((ya=_==null?void 0:_.analytics)==null?void 0:ya.schedule)??"0 6 * * 1")||j.merger.enabled!==(((ca=_==null?void 0:_.merger)==null?void 0:ca.enabled)??!1)||j.merger.schedule!==(((an=_==null?void 0:_.merger)==null?void 0:an.schedule)??"55 */4 * * *")||j.roadmapScanner.enabled!==(((le=_==null?void 0:_.roadmapScanner)==null?void 0:le.enabled)??!0)||(j.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((pe=_==null?void 0:_.roadmapScanner)==null?void 0:pe.slicerSchedule)||"35 */12 * * *"),ze={};for(const Me of KN){const Ae=j.jobProviders[Me];typeof Ae=="string"&&Ae.trim().length>0?ze[Me]=Ae:_!=null&&_.jobProviders[Me]&&(ze[Me]=null)}N(!0);try{const Me=await Wc({provider:j.provider,providerLabel:j.providerLabel.trim(),providerPresets:Object.keys(j.providerPresets).length>0?j.providerPresets:void 0,defaultBranch:j.defaultBranch,prdDir:j.prdDir,branchPrefix:j.branchPrefix,branchPatterns:j.branchPatterns,executorEnabled:j.executorEnabled,reviewerEnabled:j.reviewerEnabled,minReviewScore:j.minReviewScore,maxRuntime:j.maxRuntime,reviewerMaxRuntime:j.reviewerMaxRuntime,maxLogSize:j.maxLogSize,cronSchedule:j.cronSchedule,reviewerSchedule:j.reviewerSchedule,scheduleBundleId:ee==="template"?j.scheduleBundleId:null,cronScheduleOffset:j.cronScheduleOffset,schedulingPriority:j.schedulingPriority,maxRetries:j.maxRetries,reviewerMaxRetries:j.reviewerMaxRetries,reviewerRetryDelay:j.reviewerRetryDelay,reviewerMaxPrsPerRun:j.reviewerMaxPrsPerRun,providerEnv:j.providerEnv,notifications:j.notifications,prdPriority:j.prdPriority,roadmapScanner:j.roadmapScanner,templatesDir:j.templatesDir,boardProvider:j.boardProvider,jobProviders:ze,fallbackOnRateLimit:j.fallbackOnRateLimit,primaryFallbackModel:j.primaryFallbackModel,secondaryFallbackModel:j.secondaryFallbackModel,primaryFallbackPreset:j.primaryFallbackPreset||void 0,secondaryFallbackPreset:j.secondaryFallbackPreset||void 0,claudeModel:j.primaryFallbackModel,providerScheduleOverrides:j.providerScheduleOverrides,qa:j.qa,audit:j.audit,analytics:j.analytics,merger:j.merger,queue:j.queue}),Ae=Mf(Me);D(Ae),se(Ae);let Ke="";if(xe)try{await au()}catch(ft){Ke=ft instanceof Error?ft.message:"failed to reinstall cron schedules"}l(Ke?{title:"Settings Saved (Cron Reinstall Failed)",message:Ke,type:"warning"}:{title:"Settings Saved",message:xe?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),Y.current=!0,B(),ge()}catch(Me){l({title:"Save Failed",message:Me instanceof Error?Me.message:"Failed to save configuration",type:"error"})}finally{N(!1)}},St=()=>{if(_){const xe=Mf(_);D(xe),se(xe),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},tt=async xe=>{if(!(R!=null&&!window.confirm("Replace existing global channel?")))try{const ze=await Sg({webhook:xe});I(ze.webhook)}catch(ze){l({title:"Failed to set global channel",message:ze instanceof Error?ze.message:"Unknown error",type:"error"})}},ua=async()=>{try{await Sg({webhook:null}),I(null)}catch(xe){l({title:"Failed to unset global channel",message:xe instanceof Error?xe.message:"Unknown error",type:"error"})}},xa=async xe=>{try{const ze=await $x(xe);Re("roadmapScanner",ze.roadmapScanner);let Tt="";try{await au()}catch(Ot){Tt=Ot instanceof Error?Ot.message:"Failed to reinstall cron schedules"}l(Tt?{title:"Planner Saved (Cron Reinstall Failed)",message:Tt,type:"warning"}:{title:xe?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${xe?"enabled":"disabled"}.`,type:"success"})}catch(ze){l({title:"Toggle Failed",message:ze instanceof Error?ze.message:"Failed to toggle roadmap scanner",type:"error"})}},Dn=async()=>{if(c){T(!0);try{await lS(c),f(c),x(!1),l({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(xe){l({title:"Remove Failed",message:xe instanceof Error?xe.message:"Failed to remove project",type:"error"})}finally{T(!1)}}};if(ce||!j)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(he)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(sl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),s.jsx("div",{className:"text-sm text-slate-500",children:he.message}),s.jsx(Fe,{onClick:()=>B(),children:"Retry"})]});const pn=[{id:"general",label:"General",content:s.jsx(FN,{form:j,updateField:Re,projectName:r,doctorChecks:Se,doctorLoading:ie})},{id:"ai-runtime",label:"AI & Runtime",content:s.jsx(ZN,{form:j,updateField:Re,jobProvidersChangedRef:G,getAllPresets:A.getAllPresets,getPresetOptions:A.getPresetOptions,handleEditPreset:A.handleEditPreset,handleDeletePreset:A.handleDeletePreset,handleResetPreset:A.handleResetPreset,handleAddPreset:A.handleAddPreset})},{id:"jobs",label:"Jobs",content:s.jsx(WN,{form:j,updateField:Re,handleRoadmapToggle:xa})},{id:"schedules",label:"Schedules",content:s.jsx(IN,{form:{cronSchedule:j.cronSchedule,reviewerSchedule:j.reviewerSchedule,qa:j.qa,audit:j.audit,analytics:j.analytics,roadmapScanner:{enabled:j.roadmapScanner.enabled,slicerSchedule:j.roadmapScanner.slicerSchedule||"35 */12 * * *"},scheduleBundleId:j.scheduleBundleId,schedulingPriority:j.schedulingPriority,cronScheduleOffset:j.cronScheduleOffset,globalQueueEnabled:j.queue.enabled},scheduleMode:ee,selectedTemplateId:Z,onFieldChange:(xe,ze)=>{xe==="globalQueueEnabled"?Re("queue",{...j.queue,enabled:ze}):Re(xe,ze)},onSwitchToTemplate:ye,onSwitchToCustom:Oe,onApplyTemplate:Te,allProjectConfigs:C,currentProjectId:c,onEditJob:me})},{id:"notifications",label:"Notifications",content:s.jsxs(Je,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Sy,{notifications:j.notifications,onChange:xe=>Re("notifications",xe),globalWebhook:R,onSetGlobal:tt,onUnsetGlobal:ua})]})},{id:"integrations",label:"Integrations",content:s.jsx(QN,{form:j,updateField:Re})},{id:"advanced",label:"Advanced",content:s.jsx(XN,{form:j,updateField:Re})}];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(Gx,{tabs:pn,activeTab:W,onChange:ne}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(Fe,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:St,children:[s.jsx(Ax,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Fe,{onClick:Ve,loading:v,children:[s.jsx(L1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),h&&c&&s.jsxs("div",{className:"mt-10 rounded-lg border border-red-900/50 bg-red-950/20 p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-red-400 mb-2",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Remove this project from Night Watch. This will uninstall cron jobs and delete all project data from the database. Files on disk will not be touched."}),s.jsxs(Fe,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>x(!0),children:[s.jsx(qr,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),b&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>!S&&x(!1),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(lu,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",r,"?"]})]}),s.jsx("p",{className:"text-sm text-slate-300 mb-6",children:"This will uninstall cron jobs and remove all Night Watch data for this project from the database. The project files on disk will not be deleted."}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Fe,{variant:"ghost",onClick:()=>x(!1),disabled:S,children:"Cancel"}),s.jsx(Fe,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:Dn,loading:S,children:"Remove"})]})]})]}),s.jsx($N,{isOpen:A.presetModalOpen,onClose:()=>{A.setPresetModalOpen(!1)},onSave:A.handleSavePreset,presetId:A.editingPresetId,preset:A.editingPreset,isBuiltIn:A.editingPresetId?Jc.includes(A.editingPresetId):!1,existingIds:Object.keys(A.getAllPresets())}),A.deleteWarning&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>A.setDeleteWarning(null),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(lu,{className:"h-6 w-6 text-amber-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:"Cannot Delete Preset"})]}),s.jsxs("p",{className:"text-sm text-slate-300 mb-4",children:[s.jsx("strong",{children:A.deleteWarning.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:A.deleteWarning.references.map(xe=>s.jsx("li",{children:xe},xe))}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:'Please remove these assignments before deleting the preset, or use "Force Delete" to remove the preset and clear all references.'}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Fe,{variant:"ghost",onClick:()=>A.setDeleteWarning(null),children:"Cancel"}),s.jsx(Fe,{variant:"secondary",onClick:A.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},tw=()=>(kS(),_S(),s.jsx(bb,{children:s.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[s.jsx("div",{className:"absolute top-0 left-0 w-full h-96 bg-indigo-900/10 rounded-full blur-[120px] -translate-y-1/2 pointer-events-none z-0"}),s.jsx(OS,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(DS,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:s.jsx("div",{className:"max-w-7xl mx-auto w-full",children:s.jsxs(Qv,{children:[s.jsx(tl,{path:"/",element:s.jsx($S,{})}),s.jsx(tl,{path:"/prs",element:s.jsx(GS,{})}),s.jsx(tl,{path:"/board",element:s.jsx(LS,{})}),s.jsx(tl,{path:"/scheduling",element:s.jsx(zN,{})}),s.jsx(tl,{path:"/logs",element:s.jsx(FS,{})}),s.jsx(tl,{path:"/roadmap",element:s.jsx(PS,{})}),s.jsx(tl,{path:"/settings",element:s.jsx(ew,{})}),s.jsx(tl,{path:"*",element:s.jsx(Wv,{to:"/",replace:!0})})]})})})]}),s.jsx(AS,{})]})})),wy=document.getElementById("root");if(!wy)throw new Error("Could not find root element to mount to");const aw=Jp.createRoot(wy);aw.render(s.jsx(qe.StrictMode,{children:s.jsx(tw,{})}));
|