@jonit-dev/night-watch-cli 1.8.10-beta.0 → 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 +2399 -1364
- package/dist/scripts/night-watch-helpers.sh +26 -0
- package/dist/scripts/night-watch-pr-reviewer-cron.sh +6 -8
- package/dist/scripts/night-watch-qa-cron.sh +3 -3
- 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 -363
- 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 Up=Object.defineProperty;var P0=l=>{throw TypeError(l)};var Hp=(l,i,o)=>i in l?Up(l,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):l[i]=o;var Q0=(l,i,o)=>Hp(l,typeof i!="symbol"?i+"":i,o),uf=(l,i,o)=>i.has(l)||P0("Cannot "+o);var ee=(l,i,o)=>(uf(l,i,"read from private field"),o?o.call(l):i.get(l)),rt=(l,i,o)=>i.has(l)?P0("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(l):i.set(l,o),Ee=(l,i,o,c)=>(uf(l,i,"write to private field"),c?c.call(l,o):i.set(l,o),o),Ne=(l,i,o)=>(uf(l,i,"access private method"),o);(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))c(m);new MutationObserver(m=>{for(const f of m)if(f.type==="childList")for(const v of f.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&c(v)}).observe(document,{childList:!0,subtree:!0});function o(m){const f={};return m.integrity&&(f.integrity=m.integrity),m.referrerPolicy&&(f.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?f.credentials="include":m.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(m){if(m.ep)return;m.ep=!0;const f=o(m);fetch(m.href,f)}})();function kf(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function qp(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var i=l.default;if(typeof i=="function"){var o=function c(){return this instanceof c?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};o.prototype=i.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(l).forEach(function(c){var m=Object.getOwnPropertyDescriptor(l,c);Object.defineProperty(o,c,m.get?m:{enumerable:!0,get:function(){return l[c]}})}),o}var cf={exports:{}},Li={};/**
|
|
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 W0;function Lp(){if(W0)return Li;W0=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(c,m,f){var v=null;if(f!==void 0&&(v=""+f),m.key!==void 0&&(v=""+m.key),"key"in m){f={};for(var S in m)S!=="key"&&(f[S]=m[S])}else f=m;return m=f.ref,{$$typeof:l,type:c,key:v,ref:m!==void 0?m:null,props:f}}return Li.Fragment=i,Li.jsx=o,Li.jsxs=o,Li}var I0;function Bp(){return I0||(I0=1,cf.exports=Lp()),cf.exports}var s=Bp(),of={exports:{}},qe={};/**
|
|
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 X0;function Vp(){if(X0)return qe;X0=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),v=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),M=Symbol.iterator;function O(D){return D===null||typeof D!="object"?null:(D=M&&D[M]||D["@@iterator"],typeof D=="function"?D:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,V={};function ne(D,se,me){this.props=D,this.context=se,this.refs=V,this.updater=me||A}ne.prototype.isReactComponent={},ne.prototype.setState=function(D,se){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,se,"setState")},ne.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function Y(){}Y.prototype=ne.prototype;function G(D,se,me){this.props=D,this.context=se,this.refs=V,this.updater=me||A}var K=G.prototype=new Y;K.constructor=G,T(K,ne.prototype),K.isPureReactComponent=!0;var de=Array.isArray;function P(){}var Z={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function ae(D,se,me){var pe=me.ref;return{$$typeof:l,type:D,key:se,ref:pe!==void 0?pe:null,props:me}}function k(D,se){return ae(D.type,se,D.props)}function W(D){return typeof D=="object"&&D!==null&&D.$$typeof===l}function _(D){var se={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(me){return se[me]})}var ce=/\/+/g;function he(D,se){return typeof D=="object"&&D!==null&&D.key!=null?_(""+D.key):se.toString(36)}function B(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(P,P):(D.status="pending",D.then(function(se){D.status==="pending"&&(D.status="fulfilled",D.value=se)},function(se){D.status==="pending"&&(D.status="rejected",D.reason=se)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function $(D,se,me,pe,Ce){var Me=typeof D;(Me==="undefined"||Me==="boolean")&&(D=null);var Le=!1;if(D===null)Le=!0;else switch(Me){case"bigint":case"string":case"number":Le=!0;break;case"object":switch(D.$$typeof){case l:case i:Le=!0;break;case w:return Le=D._init,$(Le(D._payload),se,me,pe,Ce)}}if(Le)return Ce=Ce(D),Le=pe===""?"."+he(D,0):pe,de(Ce)?(me="",Le!=null&&(me=Le.replace(ce,"$&/")+"/"),$(Ce,se,me,"",function(sa){return sa})):Ce!=null&&(W(Ce)&&(Ce=k(Ce,me+(Ce.key==null||D&&D.key===Ce.key?"":(""+Ce.key).replace(ce,"$&/")+"/")+Le)),se.push(Ce)),1;Le=0;var St=pe===""?".":pe+":";if(de(D))for(var tt=0;tt<D.length;tt++)pe=D[tt],Me=St+he(pe,tt),Le+=$(pe,se,me,Me,Ce);else if(tt=O(D),typeof tt=="function")for(D=tt.call(D),tt=0;!(pe=D.next()).done;)pe=pe.value,Me=St+he(pe,tt++),Le+=$(pe,se,me,Me,Ce);else if(Me==="object"){if(typeof D.then=="function")return $(B(D),se,me,pe,Ce);throw se=String(D),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return Le}function ie(D,se,me){if(D==null)return D;var pe=[],Ce=0;return $(D,pe,"","",function(Me){return se.call(me,Me,Ce++)}),pe}function ge(D){if(D._status===-1){var se=D._result;se=se(),se.then(function(me){(D._status===0||D._status===-1)&&(D._status=1,D._result=me)},function(me){(D._status===0||D._status===-1)&&(D._status=2,D._result=me)}),D._status===-1&&(D._status=0,D._result=se)}if(D._status===1)return D._result.default;throw D._result}var Se=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},De={map:ie,forEach:function(D,se,me){ie(D,function(){se.apply(this,arguments)},me)},count:function(D){var se=0;return ie(D,function(){se++}),se},toArray:function(D){return ie(D,function(se){return se})||[]},only:function(D){if(!W(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return qe.Activity=j,qe.Children=De,qe.Component=ne,qe.Fragment=o,qe.Profiler=m,qe.PureComponent=G,qe.StrictMode=c,qe.Suspense=b,qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,qe.__COMPILER_RUNTIME={__proto__:null,c:function(D){return Z.H.useMemoCache(D)}},qe.cache=function(D){return function(){return D.apply(null,arguments)}},qe.cacheSignal=function(){return null},qe.cloneElement=function(D,se,me){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var pe=T({},D.props),Ce=D.key;if(se!=null)for(Me in se.key!==void 0&&(Ce=""+se.key),se)!Q.call(se,Me)||Me==="key"||Me==="__self"||Me==="__source"||Me==="ref"&&se.ref===void 0||(pe[Me]=se[Me]);var Me=arguments.length-2;if(Me===1)pe.children=me;else if(1<Me){for(var Le=Array(Me),St=0;St<Me;St++)Le[St]=arguments[St+2];pe.children=Le}return ae(D.type,Ce,pe)},qe.createContext=function(D){return D={$$typeof:v,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:f,_context:D},D},qe.createElement=function(D,se,me){var pe,Ce={},Me=null;if(se!=null)for(pe in se.key!==void 0&&(Me=""+se.key),se)Q.call(se,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(Ce[pe]=se[pe]);var Le=arguments.length-2;if(Le===1)Ce.children=me;else if(1<Le){for(var St=Array(Le),tt=0;tt<Le;tt++)St[tt]=arguments[tt+2];Ce.children=St}if(D&&D.defaultProps)for(pe in Le=D.defaultProps,Le)Ce[pe]===void 0&&(Ce[pe]=Le[pe]);return ae(D,Me,Ce)},qe.createRef=function(){return{current:null}},qe.forwardRef=function(D){return{$$typeof:S,render:D}},qe.isValidElement=W,qe.lazy=function(D){return{$$typeof:w,_payload:{_status:-1,_result:D},_init:ge}},qe.memo=function(D,se){return{$$typeof:y,type:D,compare:se===void 0?null:se}},qe.startTransition=function(D){var se=Z.T,me={};Z.T=me;try{var pe=D(),Ce=Z.S;Ce!==null&&Ce(me,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(P,Se)}catch(Me){Se(Me)}finally{se!==null&&me.types!==null&&(se.types=me.types),Z.T=se}},qe.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},qe.use=function(D){return Z.H.use(D)},qe.useActionState=function(D,se,me){return Z.H.useActionState(D,se,me)},qe.useCallback=function(D,se){return Z.H.useCallback(D,se)},qe.useContext=function(D){return Z.H.useContext(D)},qe.useDebugValue=function(){},qe.useDeferredValue=function(D,se){return Z.H.useDeferredValue(D,se)},qe.useEffect=function(D,se){return Z.H.useEffect(D,se)},qe.useEffectEvent=function(D){return Z.H.useEffectEvent(D)},qe.useId=function(){return Z.H.useId()},qe.useImperativeHandle=function(D,se,me){return Z.H.useImperativeHandle(D,se,me)},qe.useInsertionEffect=function(D,se){return Z.H.useInsertionEffect(D,se)},qe.useLayoutEffect=function(D,se){return Z.H.useLayoutEffect(D,se)},qe.useMemo=function(D,se){return Z.H.useMemo(D,se)},qe.useOptimistic=function(D,se){return Z.H.useOptimistic(D,se)},qe.useReducer=function(D,se,me){return Z.H.useReducer(D,se,me)},qe.useRef=function(D){return Z.H.useRef(D)},qe.useState=function(D){return Z.H.useState(D)},qe.useSyncExternalStore=function(D,se,me){return Z.H.useSyncExternalStore(D,se,me)},qe.useTransition=function(){return Z.H.useTransition()},qe.version="19.2.4",qe}var J0;function _f(){return J0||(J0=1,of.exports=Vp()),of.exports}var z=_f();const He=kf(z);var df={exports:{}},Bi={},ff={exports:{}},hf={};/**
|
|
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 K0;function Yp(){return K0||(K0=1,(function(l){function i($,ie){var ge=$.length;$.push(ie);e:for(;0<ge;){var Se=ge-1>>>1,De=$[Se];if(0<m(De,ie))$[Se]=ie,$[ge]=De,ge=Se;else break e}}function o($){return $.length===0?null:$[0]}function c($){if($.length===0)return null;var ie=$[0],ge=$.pop();if(ge!==ie){$[0]=ge;e:for(var Se=0,De=$.length,D=De>>>1;Se<D;){var se=2*(Se+1)-1,me=$[se],pe=se+1,Ce=$[pe];if(0>m(me,ge))pe<De&&0>m(Ce,me)?($[Se]=Ce,$[pe]=ge,Se=pe):($[Se]=me,$[se]=ge,Se=se);else if(pe<De&&0>m(Ce,ge))$[Se]=Ce,$[pe]=ge,Se=pe;else break e}}return ie}function m($,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,S=v.now();l.unstable_now=function(){return v.now()-S}}var b=[],y=[],w=1,j=null,M=3,O=!1,A=!1,T=!1,V=!1,ne=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function K($){for(var ie=o(y);ie!==null;){if(ie.callback===null)c(y);else if(ie.startTime<=$)c(y),ie.sortIndex=ie.expirationTime,i(b,ie);else break;ie=o(y)}}function de($){if(T=!1,K($),!A)if(o(b)!==null)A=!0,P||(P=!0,_());else{var ie=o(y);ie!==null&&B(de,ie.startTime-$)}}var P=!1,Z=-1,Q=5,ae=-1;function k(){return V?!0:!(l.unstable_now()-ae<Q)}function W(){if(V=!1,P){var $=l.unstable_now();ae=$;var ie=!0;try{e:{A=!1,T&&(T=!1,Y(Z),Z=-1),O=!0;var ge=M;try{t:{for(K($),j=o(b);j!==null&&!(j.expirationTime>$&&k());){var Se=j.callback;if(typeof Se=="function"){j.callback=null,M=j.priorityLevel;var De=Se(j.expirationTime<=$);if($=l.unstable_now(),typeof De=="function"){j.callback=De,K($),ie=!0;break t}j===o(b)&&c(b),K($)}else c(b);j=o(b)}if(j!==null)ie=!0;else{var D=o(y);D!==null&&B(de,D.startTime-$),ie=!1}}break e}finally{j=null,M=ge,O=!1}ie=void 0}}finally{ie?_():P=!1}}}var _;if(typeof G=="function")_=function(){G(W)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,he=ce.port2;ce.port1.onmessage=W,_=function(){he.postMessage(null)}}else _=function(){ne(W,0)};function B($,ie){Z=ne(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"):Q=0<$?Math.floor(1e3/$):5},l.unstable_getCurrentPriorityLevel=function(){return M},l.unstable_next=function($){switch(M){case 1:case 2:case 3:var ie=3;break;default:ie=M}var ge=M;M=ie;try{return $()}finally{M=ge}},l.unstable_requestPaint=function(){V=!0},l.unstable_runWithPriority=function($,ie){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var ge=M;M=$;try{return ie()}finally{M=ge}},l.unstable_scheduleCallback=function($,ie,ge){var Se=l.unstable_now();switch(typeof ge=="object"&&ge!==null?(ge=ge.delay,ge=typeof ge=="number"&&0<ge?Se+ge:Se):ge=Se,$){case 1:var De=-1;break;case 2:De=250;break;case 5:De=1073741823;break;case 4:De=1e4;break;default:De=5e3}return De=ge+De,$={id:w++,callback:ie,priorityLevel:$,startTime:ge,expirationTime:De,sortIndex:-1},ge>Se?($.sortIndex=ge,i(y,$),o(b)===null&&$===o(y)&&(T?(Y(Z),Z=-1):T=!0,B(de,ge-Se))):($.sortIndex=De,i(b,$),A||O||(A=!0,P||(P=!0,_()))),$},l.unstable_shouldYield=k,l.unstable_wrapCallback=function($){var ie=M;return function(){var ge=M;M=ie;try{return $.apply(this,arguments)}finally{M=ge}}}})(hf)),hf}var eg;function $p(){return eg||(eg=1,ff.exports=Yp()),ff.exports}var mf={exports:{}},fa={};/**
|
|
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 tg;function Fp(){if(tg)return fa;tg=1;var l=_f();function i(b){var y="https://react.dev/errors/"+b;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)y+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+b+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var c={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},m=Symbol.for("react.portal");function f(b,y,w){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:j==null?null:""+j,children:b,containerInfo:y,implementation:w}}var v=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function S(b,y){if(b==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return fa.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,fa.createPortal=function(b,y){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(i(299));return f(b,y,null,w)},fa.flushSync=function(b){var y=v.T,w=c.p;try{if(v.T=null,c.p=2,b)return b()}finally{v.T=y,c.p=w,c.d.f()}},fa.preconnect=function(b,y){typeof b=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,c.d.C(b,y))},fa.prefetchDNS=function(b){typeof b=="string"&&c.d.D(b)},fa.preinit=function(b,y){if(typeof b=="string"&&y&&typeof y.as=="string"){var w=y.as,j=S(w,y.crossOrigin),M=typeof y.integrity=="string"?y.integrity:void 0,O=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;w==="style"?c.d.S(b,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:j,integrity:M,fetchPriority:O}):w==="script"&&c.d.X(b,{crossOrigin:j,integrity:M,fetchPriority:O,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},fa.preinitModule=function(b,y){if(typeof b=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var w=S(y.as,y.crossOrigin);c.d.M(b,{crossOrigin:w,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&c.d.M(b)},fa.preload=function(b,y){if(typeof b=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var w=y.as,j=S(w,y.crossOrigin);c.d.L(b,w,{crossOrigin:j,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},fa.preloadModule=function(b,y){if(typeof b=="string")if(y){var w=S(y.as,y.crossOrigin);c.d.m(b,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:w,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else c.d.m(b)},fa.requestFormReset=function(b){c.d.r(b)},fa.unstable_batchedUpdates=function(b,y){return b(y)},fa.useFormState=function(b,y,w){return v.H.useFormState(b,y,w)},fa.useFormStatus=function(){return v.H.useHostTransitionStatus()},fa.version="19.2.4",fa}var ag;function ty(){if(ag)return mf.exports;ag=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(i){console.error(i)}}return l(),mf.exports=Fp(),mf.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 ng;function Gp(){if(ng)return Bi;ng=1;var l=$p(),i=_f(),o=ty();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function v(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function S(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(c(188))}function y(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(c(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(c(188))}if(a.return!==n.return)a=u,n=d;else{for(var x=!1,E=u.child;E;){if(E===a){x=!0,a=u,n=d;break}if(E===n){x=!0,n=u,a=d;break}E=E.sibling}if(!x){for(E=d.child;E;){if(E===a){x=!0,a=d,n=u;break}if(E===n){x=!0,n=d,a=u;break}E=E.sibling}if(!x)throw Error(c(189))}}if(a.alternate!==n)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:t}function w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var j=Object.assign,M=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),G=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function _(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||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 T:return"Fragment";case ne:return"Profiler";case V:return"StrictMode";case de:return"Suspense";case P:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case G:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case K:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:he(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}var B=Array.isArray,$=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},Se=[],De=-1;function D(e){return{current:e}}function se(e){0>De||(e.current=Se[De],Se[De]=null,De--)}function me(e,t){De++,Se[De]=e.current,e.current=t}var pe=D(null),Ce=D(null),Me=D(null),Le=D(null);function St(e,t){switch(me(Me,t),me(Ce,e),me(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?y0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=y0(t),e=x0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(pe),me(pe,e)}function tt(){se(pe),se(Ce),se(Me)}function sa(e){e.memoizedState!==null&&me(Le,e);var t=pe.current,a=x0(t,e.type);t!==a&&(me(Ce,e),me(pe,a))}function ma(e){Ce.current===e&&(se(pe),se(Ce)),Le.current===e&&(se(Le),zi._currentValue=ge)}var Rn,xn;function xe(e){if(Rn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Rn=t&&t[1]||"",xn=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Rn+e+xn}var ke=!1;function Mt(e,t){if(!e||ke)return"";ke=!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(te){var J=te}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(te){J=te}e.call(oe.prototype)}}else{try{throw Error()}catch(te){J=te}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(te){if(te&&J&&typeof te.stack=="string")return[te.stack,J.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(),x=d[0],E=d[1];if(x&&E){var R=x.split(`
|
|
44
|
-
`),X=E.split(`
|
|
45
|
-
`);for(u=n=0;n<R.length&&!R[n].includes("DetermineComponentFrameRoot");)n++;for(;u<X.length&&!X[u].includes("DetermineComponentFrameRoot");)u++;if(n===R.length||u===X.length)for(n=R.length-1,u=X.length-1;1<=n&&0<=u&&R[n]!==X[u];)u--;for(;1<=n&&0<=u;n--,u--)if(R[n]!==X[u]){if(n!==1||u!==1)do if(n--,u--,0>u||R[n]!==X[u]){var re=`
|
|
46
|
-
`+R[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{ke=!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 Mt(e.type,!1);case 11:return Mt(e.type.render,!1);case 1:return Mt(e.type,!0);case 31:return xe("Activity");default:return""}}function ga(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 ra=Object.prototype.hasOwnProperty,le=l.unstable_scheduleCallback,ye=l.unstable_cancelCallback,_e=l.unstable_shouldYield,Ge=l.unstable_requestPaint,Be=l.unstable_now,mt=l.unstable_getCurrentPriorityLevel,Dt=l.unstable_ImmediatePriority,Rt=l.unstable_UserBlockingPriority,wt=l.unstable_NormalPriority,tn=l.unstable_LowPriority,ya=l.unstable_IdlePriority,Fe=l.log,pn=l.unstable_setDisableYieldValue,gt=null,ia=null;function It(e){if(typeof Fe=="function"&&pn(e),ia&&typeof ia.setStrictMode=="function")try{ia.setStrictMode(gt,e)}catch{}}var Xt=Math.clz32?Math.clz32:no,cu=Math.log,ao=Math.LN2;function no(e){return e>>>=0,e===0?32:31-(cu(e)/ao|0)|0}var rl=256,qs=262144,ua=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 Pl(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,d=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var E=n&134217727;return E!==0?(n=E&~d,n!==0?u=vn(n):(x&=E,x!==0?u=vn(x):a||(a=E&~e,a!==0&&(u=vn(a))))):(E=n&~d,E!==0?u=vn(E):x!==0?u=vn(x):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 qr(){var e=ua;return ua<<=1,(ua&62914560)===0&&(ua=4194304),e}function Ls(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 x=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var E=e.entanglements,R=e.expirationTimes,X=e.hiddenUpdates;for(a=x&~a;0<a;){var re=31-Xt(a),oe=1<<re;E[re]=0,R[re]=-1;var J=X[re];if(J!==null)for(X[re]=null,re=0;re<J.length;re++){var te=J[re];te!==null&&(te.lane&=-536870913)}a&=~oe}n!==0&&xt(e,n,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(x&~t))}function xt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Xt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function va(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Xt(a),u=1<<n;u&t|e[n]&t&&(e[n]|=t),a&=~u}}function Lr(e,t){var a=t&-t;return a=(a&42)!==0?1:Bs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Bs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ca(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vs(){var e=ie.p;return e!==0?e:(e=window.event,e===void 0?32:B0(e.type))}function Br(e,t){var a=ie.p;try{return ie.p=e,t()}finally{ie.p=a}}var an=Math.random().toString(36).slice(2),At="__reactFiber$"+an,$t="__reactProps$"+an,An="__reactContainer$"+an,Ql="__reactEvents$"+an,fu="__reactListeners$"+an,hu="__reactHandles$"+an,mu="__reactResources$"+an,Wl="__reactMarker$"+an;function Ys(e){delete e[At],delete e[$t],delete e[Ql],delete e[fu],delete e[hu]}function kn(e){var t=e[At];if(t)return t;for(var a=e.parentNode;a;){if(t=a[An]||a[At]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=j0(e);e!==null;){if(a=e[At])return a;e=j0(e)}return t}e=a,a=e.parentNode}return null}function Oe(e){if(e=e[At]||e[An]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ba(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function nn(e){var t=e[mu];return t||(t=e[mu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function qt(e){e[Wl]=!0}var gu=new Set,Vr={};function bn(e,t){cl(e,t),cl(e+"Capture",t)}function cl(e,t){for(Vr[e]=t,e=0;e<t.length;e++)gu.add(t[e])}var yu=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),xu={},_n={};function Yr(e){return ra.call(_n,e)?!0:ra.call(xu,e)?!1:yu.test(e)?_n[e]=!0:(xu[e]=!0,!1)}function Jt(e,t,a){if(Yr(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 $s(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 $r(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(x){a=""+x,d.call(this,x)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Il(e){if(!e._valueTracker){var t=Sn(e)?"checked":"value";e._valueTracker=$r(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 ln(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 Fs=/[\n"\\]/g;function Kt(e){return e.replace(Fs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gs(e,t,a,n,u,d,x,E){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kt(t)):e.value!==""+kt(t)&&(e.value=""+kt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Xl(e,x,kt(t)):a!=null?Xl(e,x,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,x,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)){Il(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,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Il(e)}function Xl(e,t,a){t==="number"&&ln(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function zn(e,t,a,n){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&n&&(e[a].defaultSelected=!0)}else{for(a=""+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 Jl(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 Fr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(c(92));if(B(n)){if(1<n.length)throw Error(c(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),Il(e)}function sn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Kl=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 es(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||Kl.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(c(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&&es(e,u,n)}else for(var d in t)t.hasOwnProperty(d)&&es(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 lo=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 ts(e){return vu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ya(){}var Gr=null;function Ps(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Un=null,fl=null;function bu(e){var t=Oe(e);if(t&&(e=t.stateNode)){var a=e[$t]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gs(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Kt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var u=n[$t]||null;if(!u)throw Error(c(90));Gs(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":Jl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&zn(e,!!a.multiple,t,!1)}}}var Zr=!1;function Pr(e,t,a){if(Zr)return e(t,a);Zr=!0;try{var n=e(t);return n}finally{if(Zr=!1,(Un!==null||fl!==null)&&(mc(),Un&&(t=Un,e=fl,fl=Un=null,bu(t),e)))for(t=0;t<e.length;t++)bu(e[t])}}function as(e,t){var a=e.stateNode;if(a===null)return null;var n=a[$t]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(c(231,t,typeof a));return a}var rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qr=!1;if(rn)try{var ns={};Object.defineProperty(ns,"passive",{get:function(){Qr=!0}}),window.addEventListener("test",ns,ns),window.removeEventListener("test",ns,ns)}catch{Qr=!1}var wn=null,Qs=null,Ws=null;function Ft(){if(Ws)return Ws;var e,t=Qs,a=t.length,n,u="value"in wn?wn.value:wn.textContent,d=u.length;for(e=0;e<a&&t[e]===u[e];e++);var x=a-e;for(n=1;n<=x&&t[a-n]===u[d-n];n++);return Ws=u.slice(e,1<n?1-n:void 0)}function ls(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 un(){return!0}function Hn(){return!1}function _t(e){function t(a,n,u,d,x){this._reactName=a,this._targetInst=u,this.type=n,this.nativeEvent=d,this.target=x,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)?un:Hn,this.isPropagationStopped=Hn,this}return j(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=un)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ss=_t(Nn),rs=j({},Nn,{view:0,detail:0}),Wr=_t(rs),Is,is,us,Xs=j({},rs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:os,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!==us&&(us&&e.type==="mousemove"?(Is=e.screenX-us.screenX,is=e.screenY-us.screenY):is=Is=0,us=e),Is)},movementY:function(e){return"movementY"in e?e.movementY:is}}),Su=_t(Xs),so=j({},Xs,{dataTransfer:0}),ro=_t(so),io=j({},rs,{relatedTarget:0}),Js=_t(io),uo=j({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0}),hl=_t(uo),co=j({},Nn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ml=_t(co),cs=j({},Nn,{data:0}),gl=_t(cs),oo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fo={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"},ho={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ho[e])?!!t[e]:!1}function os(){return mo}var go=j({},rs,{key:function(e){if(e.key){var t=oo[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ls(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:os,charCode:function(e){return e.type==="keypress"?ls(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ls(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yo=_t(go),xo=j({},Xs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wu=_t(xo),po=j({},rs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:os}),vo=_t(po),Nu=j({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0}),bo=_t(Nu),So=j({},Xs,{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}),wo=_t(So),No=j({},Nn,{newState:0,oldState:0}),jo=_t(No),ju=[9,13,27,32],Ir=rn&&"CompositionEvent"in window,ds=null;rn&&"documentMode"in document&&(ds=document.documentMode);var Eo=rn&&"TextEvent"in window&&!ds,Eu=rn&&(!Ir||ds&&8<ds&&11>=ds),Mu=" ",Tu=!1;function Cu(e,t){switch(e){case"keyup":return ju.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ou(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yl=!1;function Mo(e,t){switch(e){case"compositionend":return Ou(t);case"keypress":return t.which!==32?null:(Tu=!0,Mu);case"textInput":return e=t.data,e===Mu&&Tu?null:e;default:return null}}function To(e,t){if(yl)return e==="compositionend"||!Ir&&Cu(e,t)?(e=Ft(),Ws=Qs=wn=null,yl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Eu&&t.locale!=="ko"?null:t.data;default:return null}}var Co={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"?!!Co[e.type]:t==="textarea"}function Xr(e,t,a,n){Un?fl?fl.push(n):fl=[n]:Un=n,t=Sc(t,"onChange"),0<t.length&&(a=new ss("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var xl=null,fs=null;function Sa(e){o0(e,0)}function cn(e){var t=ba(e);if(ol(t))return e}function Ru(e,t){if(e==="change")return t}var jn=!1;if(rn){var Jr;if(rn){var Ra="oninput"in document;if(!Ra){var Kr=document.createElement("div");Kr.setAttribute("oninput","return;"),Ra=typeof Kr.oninput=="function"}Jr=Ra}else Jr=!1;jn=Jr&&(!document.documentMode||9<document.documentMode)}function ei(){xl&&(xl.detachEvent("onpropertychange",ti),fs=xl=null)}function ti(e){if(e.propertyName==="value"&&cn(fs)){var t=[];Xr(t,fs,e,Ps(e)),Pr(Sa,t)}}function We(e,t,a){e==="focusin"?(ei(),xl=t,fs=a,xl.attachEvent("onpropertychange",ti)):e==="focusout"&&ei()}function pl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return cn(fs)}function Oo(e,t){if(e==="click")return cn(t)}function vt(e,t){if(e==="input"||e==="change")return cn(t)}function hs(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oa=typeof Object.is=="function"?Object.is:hs;function ms(e,t){if(oa(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(!ra.call(t,u)||!oa(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 Ke(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ke(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Do(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ln(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=ln(e.document)}return t}function Ks(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var _u=rn&&"documentMode"in document&&11>=document.documentMode,vl=null,er=null,ea=null,tr=!1;function gs(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;tr||vl==null||vl!==ln(n)||(n=vl,"selectionStart"in n&&Ks(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ea&&ms(ea,n)||(ea=n,n=Sc(er,"onSelect"),0<n.length&&(t=new ss("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")},ai={},zu={};rn&&(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 Ln(e){if(ai[e])return ai[e];if(!bl[e])return e;var t=bl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in zu)return ai[e]=t[a];return e}var Uu=Ln("animationend"),Hu=Ln("animationiteration"),ar=Ln("animationstart"),Ro=Ln("transitionrun"),Ao=Ln("transitionstart"),qu=Ln("transitioncancel"),ni=Ln("transitionend"),li=new Map,si="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(" ");si.push("scrollEnd");function wa(e,t){li.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)},xa=[],$a=0,ys=0;function wl(){for(var e=$a,t=ys=$a=0;t<e;){var a=xa[t];xa[t++]=null;var n=xa[t];xa[t++]=null;var u=xa[t];xa[t++]=null;var d=xa[t];if(xa[t++]=null,n!==null&&u!==null){var x=n.pending;x===null?u.next=u:(u.next=x.next,x.next=u),n.pending=u}d!==0&&xs(a,u,d)}}function Fa(e,t,a,n){xa[$a++]=e,xa[$a++]=t,xa[$a++]=a,xa[$a++]=n,ys|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function nr(e,t,a,n){return Fa(e,t,a,n),ps(e)}function Ga(e,t){return Fa(e,null,null,t),ps(e)}function xs(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-Xt(a),e=d.hiddenUpdates,n=e[u],n===null?e[u]=[t]:n.push(t),t.lane=a|536870912),d):null}function ps(e){if(50<Ci)throw Ci=0,Rd=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Aa={};function lr(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 ta(e,t,a,n){return new lr(e,t,a,n)}function sr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Za(e,t){var a=e.alternate;return a===null?(a=ta(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 rr(e,t,a,n,u,d){var x=0;if(n=e,typeof e=="function")sr(e)&&(x=1);else if(typeof e=="string")x=jp(e,a,pe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=ta(31,a,t,u),e.elementType=ae,e.lanes=d,e;case T:return Pa(a.children,u,d,t);case V:x=8,u|=24;break;case ne:return e=ta(12,a,t,u|2),e.elementType=ne,e.lanes=d,e;case de:return e=ta(13,a,t,u),e.elementType=de,e.lanes=d,e;case P:return e=ta(19,a,t,u),e.elementType=P,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:x=10;break e;case Y:x=9;break e;case K:x=11;break e;case Z:x=14;break e;case Q:x=16,n=null;break e}x=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=ta(x,a,t,u),t.elementType=e,t.type=n,t.lanes=d,t}function Pa(e,t,a,n){return e=ta(7,e,n,t),e.lanes=a,e}function ri(e,t,a){return e=ta(6,e,null,t),e.lanes=a,e}function Bu(e){var t=ta(18,null,null,0);return t.stateNode=e,t}function Nl(e,t,a){return t=ta(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ii=new WeakMap;function Na(e,t){if(typeof e=="object"&&e!==null){var a=ii.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ga(t)},ii.set(e,t),t)}return{value:e,source:t,stack:ga(t)}}var Bn=[],Vn=0,vs=null,on=0,da=[],je=0,ja=null,Qa=1,g="";function r(e,t){Bn[Vn++]=on,Bn[Vn++]=vs,vs=e,on=t}function h(e,t,a){da[je++]=Qa,da[je++]=g,da[je++]=ja,ja=e;var n=Qa;e=g;var u=32-Xt(n)-1;n&=~(1<<u),a+=1;var d=32-Xt(t)+u;if(30<d){var x=u-u%5;d=(n&(1<<x)-1).toString(32),n>>=x,u-=x,Qa=1<<32-Xt(t)+u|a<<u|n,g=d+e}else Qa=1<<d|a<<u|n,g=e}function p(e){e.return!==null&&(r(e,1),h(e,1,0))}function N(e){for(;e===vs;)vs=Bn[--Vn],Bn[Vn]=null,on=Bn[--Vn],Bn[Vn]=null;for(;e===ja;)ja=da[--je],da[je]=null,g=da[--je],da[je]=null,Qa=da[--je],da[je]=null}function C(e,t){da[je++]=Qa,da[je++]=g,da[je++]=ja,Qa=t.id,g=t.overflow,ja=e}var U=null,H=null,L=!1,fe=null,ve=!1,Ue=Error(c(519));function Ie(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dn(Na(t,e)),Ue}function Re(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[At]=e,t[$t]=n,a){case"dialog":Pe("cancel",t),Pe("close",t);break;case"iframe":case"object":case"embed":Pe("load",t);break;case"video":case"audio":for(a=0;a<Di.length;a++)Pe(Di[a],t);break;case"source":Pe("error",t);break;case"img":case"image":case"link":Pe("error",t),Pe("load",t);break;case"details":Pe("toggle",t);break;case"input":Pe("invalid",t),dl(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Pe("invalid",t);break;case"textarea":Pe("invalid",t),Fr(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||m0(t.textContent,a)?(n.popover!=null&&(Pe("beforetoggle",t),Pe("toggle",t)),n.onScroll!=null&&Pe("scroll",t),n.onScrollEnd!=null&&Pe("scrollend",t),n.onClick!=null&&(t.onclick=Ya),t=!0):t=!1,t||Ie(e,!0)}function Et(e){for(U=e.return;U;)switch(U.tag){case 5:case 31:case 13:ve=!1;return;case 27:case 3:ve=!0;return;default:U=U.return}}function Zt(e){if(e!==U)return!1;if(!L)return Et(e),L=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Zd(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(c(317));H=N0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));H=N0(e)}else t===27?(t=H,Ul(e.type)?(e=Xd,Xd=null,H=e):H=t):H=U?Ja(e.stateNode.nextSibling):null;return!0}function Pt(){H=U=null,L=!1}function En(){var e=fe;return e!==null&&(Ca===null?Ca=e:Ca.push.apply(Ca,e),fe=null),e}function dn(e){fe===null?fe=[e]:fe.push(e)}var ir=D(null),Yn=null,Wa=null;function Mn(e,t,a){me(ir,t._currentValue),t._currentValue=a}function fn(e){e._currentValue=ir.current,se(ir)}function ui(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function $n(e,t,a,n){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var x=u.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=u;for(var R=0;R<t.length;R++)if(E.context===t[R]){d.lanes|=a,E=d.alternate,E!==null&&(E.lanes|=a),ui(d.return,a,e),n||(x=null);break e}d=E.next}}else if(u.tag===18){if(x=u.return,x===null)throw Error(c(341));x.lanes|=a,d=x.alternate,d!==null&&(d.lanes|=a),ui(x,a,e),x=null}else x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===e){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}}function Ia(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 x=u.alternate;if(x===null)throw Error(c(387));if(x=x.memoizedProps,x!==null){var E=u.type;oa(u.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(u===Le.current){if(x=u.alternate,x===null)throw Error(c(387));x.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(zi):e=[zi])}u=u.return}e!==null&&$n(t,e,a,n),t.flags|=262144}function ur(e){for(e=e.firstContext;e!==null;){if(!oa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function bs(e){Yn=e,Wa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function aa(e){return Kf(Yn,e)}function Vu(e,t){return Yn===null&&bs(e),Kf(e,t)}function Kf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Wa===null){if(e===null)throw Error(c(308));Wa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wa=Wa.next=t;return a}var bx=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()})}},Sx=l.unstable_scheduleCallback,wx=l.unstable_NormalPriority,Lt={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ko(){return{controller:new bx,data:new Map,refCount:0}}function ci(e){e.refCount--,e.refCount===0&&Sx(wx,function(){e.controller.abort()})}var oi=null,_o=0,cr=0,or=null;function Nx(e,t){if(oi===null){var a=oi=[];_o=0,cr=Hd(),or={status:"pending",value:void 0,then:function(n){a.push(n)}}}return _o++,t.then(eh,eh),t}function eh(){if(--_o===0&&oi!==null){or!==null&&(or.status="fulfilled");var e=oi;oi=null,cr=0,or=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function jx(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 th=$.S;$.S=function(e,t){qm=Be(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Nx(e,t),th!==null&&th(e,t)};var Ss=D(null);function zo(){var e=Ss.current;return e!==null?e:yt.pooledCache}function Yu(e,t){t===null?me(Ss,Ss.current):me(Ss,t.pool)}function ah(){var e=zo();return e===null?null:{parent:Lt._currentValue,pool:e}}var dr=Error(c(460)),Uo=Error(c(474)),$u=Error(c(542)),Fu={then:function(){}};function nh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function lh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ya,Ya),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rh(e),e;default:if(typeof t.status=="string")t.then(Ya,Ya);else{if(e=yt,e!==null&&100<e.shellSuspendCounter)throw Error(c(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,rh(e),e}throw Ns=t,dr}}function ws(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ns=a,dr):a}}var Ns=null;function sh(){if(Ns===null)throw Error(c(459));var e=Ns;return Ns=null,e}function rh(e){if(e===dr||e===$u)throw Error(c(483))}var fr=null,di=0;function Gu(e){var t=di;return di+=1,fr===null&&(fr=[]),lh(fr,e,t)}function fi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zu(e,t){throw t.$$typeof===M?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ih(e){function t(F,q){if(e){var I=F.deletions;I===null?(F.deletions=[q],F.flags|=16):I.push(q)}}function a(F,q){if(!e)return null;for(;q!==null;)t(F,q),q=q.sibling;return null}function n(F){for(var q=new Map;F!==null;)F.key!==null?q.set(F.key,F):q.set(F.index,F),F=F.sibling;return q}function u(F,q){return F=Za(F,q),F.index=0,F.sibling=null,F}function d(F,q,I){return F.index=I,e?(I=F.alternate,I!==null?(I=I.index,I<q?(F.flags|=67108866,q):I):(F.flags|=67108866,q)):(F.flags|=1048576,q)}function x(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function E(F,q,I,ue){return q===null||q.tag!==6?(q=ri(I,F.mode,ue),q.return=F,q):(q=u(q,I),q.return=F,q)}function R(F,q,I,ue){var Te=I.type;return Te===T?re(F,q,I.props.children,ue,I.key):q!==null&&(q.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Q&&ws(Te)===q.type)?(q=u(q,I.props),fi(q,I),q.return=F,q):(q=rr(I.type,I.key,I.props,null,F.mode,ue),fi(q,I),q.return=F,q)}function X(F,q,I,ue){return q===null||q.tag!==4||q.stateNode.containerInfo!==I.containerInfo||q.stateNode.implementation!==I.implementation?(q=Nl(I,F.mode,ue),q.return=F,q):(q=u(q,I.children||[]),q.return=F,q)}function re(F,q,I,ue,Te){return q===null||q.tag!==7?(q=Pa(I,F.mode,ue,Te),q.return=F,q):(q=u(q,I),q.return=F,q)}function oe(F,q,I){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=ri(""+q,F.mode,I),q.return=F,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case O:return I=rr(q.type,q.key,q.props,null,F.mode,I),fi(I,q),I.return=F,I;case A:return q=Nl(q,F.mode,I),q.return=F,q;case Q:return q=ws(q),oe(F,q,I)}if(B(q)||_(q))return q=Pa(q,F.mode,I,null),q.return=F,q;if(typeof q.then=="function")return oe(F,Gu(q),I);if(q.$$typeof===G)return oe(F,Vu(F,q),I);Zu(F,q)}return null}function J(F,q,I,ue){var Te=q!==null?q.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return Te!==null?null:E(F,q,""+I,ue);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case O:return I.key===Te?R(F,q,I,ue):null;case A:return I.key===Te?X(F,q,I,ue):null;case Q:return I=ws(I),J(F,q,I,ue)}if(B(I)||_(I))return Te!==null?null:re(F,q,I,ue,null);if(typeof I.then=="function")return J(F,q,Gu(I),ue);if(I.$$typeof===G)return J(F,q,Vu(F,I),ue);Zu(F,I)}return null}function te(F,q,I,ue,Te){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return F=F.get(I)||null,E(q,F,""+ue,Te);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case O:return F=F.get(ue.key===null?I:ue.key)||null,R(q,F,ue,Te);case A:return F=F.get(ue.key===null?I:ue.key)||null,X(q,F,ue,Te);case Q:return ue=ws(ue),te(F,q,I,ue,Te)}if(B(ue)||_(ue))return F=F.get(I)||null,re(q,F,ue,Te,null);if(typeof ue.then=="function")return te(F,q,I,Gu(ue),Te);if(ue.$$typeof===G)return te(F,q,I,Vu(q,ue),Te);Zu(q,ue)}return null}function be(F,q,I,ue){for(var Te=null,at=null,we=q,$e=q=0,Je=null;we!==null&&$e<I.length;$e++){we.index>$e?(Je=we,we=null):Je=we.sibling;var nt=J(F,we,I[$e],ue);if(nt===null){we===null&&(we=Je);break}e&&we&&nt.alternate===null&&t(F,we),q=d(nt,q,$e),at===null?Te=nt:at.sibling=nt,at=nt,we=Je}if($e===I.length)return a(F,we),L&&r(F,$e),Te;if(we===null){for(;$e<I.length;$e++)we=oe(F,I[$e],ue),we!==null&&(q=d(we,q,$e),at===null?Te=we:at.sibling=we,at=we);return L&&r(F,$e),Te}for(we=n(we);$e<I.length;$e++)Je=te(we,F,$e,I[$e],ue),Je!==null&&(e&&Je.alternate!==null&&we.delete(Je.key===null?$e:Je.key),q=d(Je,q,$e),at===null?Te=Je:at.sibling=Je,at=Je);return e&&we.forEach(function(Vl){return t(F,Vl)}),L&&r(F,$e),Te}function Ae(F,q,I,ue){if(I==null)throw Error(c(151));for(var Te=null,at=null,we=q,$e=q=0,Je=null,nt=I.next();we!==null&&!nt.done;$e++,nt=I.next()){we.index>$e?(Je=we,we=null):Je=we.sibling;var Vl=J(F,we,nt.value,ue);if(Vl===null){we===null&&(we=Je);break}e&&we&&Vl.alternate===null&&t(F,we),q=d(Vl,q,$e),at===null?Te=Vl:at.sibling=Vl,at=Vl,we=Je}if(nt.done)return a(F,we),L&&r(F,$e),Te;if(we===null){for(;!nt.done;$e++,nt=I.next())nt=oe(F,nt.value,ue),nt!==null&&(q=d(nt,q,$e),at===null?Te=nt:at.sibling=nt,at=nt);return L&&r(F,$e),Te}for(we=n(we);!nt.done;$e++,nt=I.next())nt=te(we,F,$e,nt.value,ue),nt!==null&&(e&&nt.alternate!==null&&we.delete(nt.key===null?$e:nt.key),q=d(nt,q,$e),at===null?Te=nt:at.sibling=nt,at=nt);return e&&we.forEach(function(zp){return t(F,zp)}),L&&r(F,$e),Te}function ht(F,q,I,ue){if(typeof I=="object"&&I!==null&&I.type===T&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case O:e:{for(var Te=I.key;q!==null;){if(q.key===Te){if(Te=I.type,Te===T){if(q.tag===7){a(F,q.sibling),ue=u(q,I.props.children),ue.return=F,F=ue;break e}}else if(q.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Q&&ws(Te)===q.type){a(F,q.sibling),ue=u(q,I.props),fi(ue,I),ue.return=F,F=ue;break e}a(F,q);break}else t(F,q);q=q.sibling}I.type===T?(ue=Pa(I.props.children,F.mode,ue,I.key),ue.return=F,F=ue):(ue=rr(I.type,I.key,I.props,null,F.mode,ue),fi(ue,I),ue.return=F,F=ue)}return x(F);case A:e:{for(Te=I.key;q!==null;){if(q.key===Te)if(q.tag===4&&q.stateNode.containerInfo===I.containerInfo&&q.stateNode.implementation===I.implementation){a(F,q.sibling),ue=u(q,I.children||[]),ue.return=F,F=ue;break e}else{a(F,q);break}else t(F,q);q=q.sibling}ue=Nl(I,F.mode,ue),ue.return=F,F=ue}return x(F);case Q:return I=ws(I),ht(F,q,I,ue)}if(B(I))return be(F,q,I,ue);if(_(I)){if(Te=_(I),typeof Te!="function")throw Error(c(150));return I=Te.call(I),Ae(F,q,I,ue)}if(typeof I.then=="function")return ht(F,q,Gu(I),ue);if(I.$$typeof===G)return ht(F,q,Vu(F,I),ue);Zu(F,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,q!==null&&q.tag===6?(a(F,q.sibling),ue=u(q,I),ue.return=F,F=ue):(a(F,q),ue=ri(I,F.mode,ue),ue.return=F,F=ue),x(F)):a(F,q)}return function(F,q,I,ue){try{di=0;var Te=ht(F,q,I,ue);return fr=null,Te}catch(we){if(we===dr||we===$u)throw we;var at=ta(29,we,null,F.mode);return at.lanes=ue,at.return=F,at}finally{}}}var js=ih(!0),uh=ih(!1),jl=!1;function Ho(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qo(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 Ml(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=ps(e),xs(e,null,a),t}return Fa(e,n,t,a),ps(e)}function hi(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,va(e,a)}}function Lo(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 x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?u=d=x:d=d.next=x,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 Bo=!1;function mi(){if(Bo){var e=or;if(e!==null)throw e}}function gi(e,t,a,n){Bo=!1;var u=e.updateQueue;jl=!1;var d=u.firstBaseUpdate,x=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var R=E,X=R.next;R.next=null,x===null?d=X:x.next=X,x=R;var re=e.alternate;re!==null&&(re=re.updateQueue,E=re.lastBaseUpdate,E!==x&&(E===null?re.firstBaseUpdate=X:E.next=X,re.lastBaseUpdate=R))}if(d!==null){var oe=u.baseState;x=0,re=X=R=null,E=d;do{var J=E.lane&-536870913,te=J!==E.lane;if(te?(Xe&J)===J:(n&J)===J){J!==0&&J===cr&&(Bo=!0),re!==null&&(re=re.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var be=e,Ae=E;J=t;var ht=a;switch(Ae.tag){case 1:if(be=Ae.payload,typeof be=="function"){oe=be.call(ht,oe,J);break e}oe=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Ae.payload,J=typeof be=="function"?be.call(ht,oe,J):be,J==null)break e;oe=j({},oe,J);break e;case 2:jl=!0}}J=E.callback,J!==null&&(e.flags|=64,te&&(e.flags|=8192),te=u.callbacks,te===null?u.callbacks=[J]:te.push(J))}else te={lane:J,tag:E.tag,payload:E.payload,callback:E.callback,next:null},re===null?(X=re=te,R=oe):re=re.next=te,x|=J;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;te=E,E=te.next,te.next=null,u.lastBaseUpdate=te,u.shared.pending=null}}while(!0);re===null&&(R=oe),u.baseState=R,u.firstBaseUpdate=X,u.lastBaseUpdate=re,d===null&&(u.shared.lanes=0),Rl|=x,e.lanes=x,e.memoizedState=oe}}function ch(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function oh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ch(a[e],t)}var hr=D(null),Pu=D(0);function dh(e,t){e=Jn,me(Pu,e),me(hr,t),Jn=e|t.baseLanes}function Vo(){me(Pu,Jn),me(hr,hr.current)}function Yo(){Jn=Pu.current,se(hr),se(Pu)}var ka=D(null),Xa=null;function Tl(e){var t=e.alternate;me(zt,zt.current&1),me(ka,e),Xa===null&&(t===null||hr.current!==null||t.memoizedState!==null)&&(Xa=e)}function $o(e){me(zt,zt.current),me(ka,e),Xa===null&&(Xa=e)}function fh(e){e.tag===22?(me(zt,zt.current),me(ka,e),Xa===null&&(Xa=e)):Cl()}function Cl(){me(zt,zt.current),me(ka,ka.current)}function _a(e){se(ka),Xa===e&&(Xa=null),se(zt)}var zt=D(0);function Qu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Wd(a)||Id(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fn=0,Ve=null,dt=null,Bt=null,Wu=!1,mr=!1,Es=!1,Iu=0,yi=0,gr=null,Ex=0;function Tt(){throw Error(c(321))}function Fo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!oa(e[a],t[a]))return!1;return!0}function Go(e,t,a,n,u,d){return Fn=d,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?Wh:rd,Es=!1,d=a(n,u),Es=!1,mr&&(d=mh(t,a,n,u)),hh(e),d}function hh(e){$.H=vi;var t=dt!==null&&dt.next!==null;if(Fn=0,Bt=dt=Ve=null,Wu=!1,yi=0,gr=null,t)throw Error(c(300));e===null||Vt||(e=e.dependencies,e!==null&&ur(e)&&(Vt=!0))}function mh(e,t,a,n){Ve=e;var u=0;do{if(mr&&(gr=null),yi=0,mr=!1,25<=u)throw Error(c(301));if(u+=1,Bt=dt=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=Ih,d=t(a,n)}while(mr);return d}function Mx(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?xi(t):t,e=e.useState()[0],(dt!==null?dt.memoizedState:null)!==e&&(Ve.flags|=1024),t}function Zo(){var e=Iu!==0;return Iu=0,e}function Po(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Qo(e){if(Wu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wu=!1}Fn=0,Bt=dt=Ve=null,mr=!1,yi=Iu=0,gr=null}function pa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?Ve.memoizedState=Bt=e:Bt=Bt.next=e,Bt}function Ut(){if(dt===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=dt.next;var t=Bt===null?Ve.memoizedState:Bt.next;if(t!==null)Bt=t,dt=e;else{if(e===null)throw Ve.alternate===null?Error(c(467)):Error(c(310));dt=e,e={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Bt===null?Ve.memoizedState=Bt=e:Bt=Bt.next=e}return Bt}function Xu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xi(e){var t=yi;return yi+=1,gr===null&&(gr=[]),e=lh(gr,e,t),t=Ve,(Bt===null?t.memoizedState:Bt.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?Wh:rd),e}function Ju(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xi(e);if(e.$$typeof===G)return aa(e)}throw Error(c(438,String(e)))}function Wo(e){var t=null,a=Ve.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ve.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Xu(),Ve.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=k;return t.index++,a}function Gn(e,t){return typeof t=="function"?t(e):t}function Ku(e){var t=Ut();return Io(t,dt,e)}function Io(e,t,a){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=a;var u=e.baseQueue,d=n.pending;if(d!==null){if(u!==null){var x=u.next;u.next=d.next,d.next=x}t.baseQueue=u=d,n.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var E=x=null,R=null,X=t,re=!1;do{var oe=X.lane&-536870913;if(oe!==X.lane?(Xe&oe)===oe:(Fn&oe)===oe){var J=X.revertLane;if(J===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),oe===cr&&(re=!0);else if((Fn&J)===J){X=X.next,J===cr&&(re=!0);continue}else oe={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},R===null?(E=R=oe,x=d):R=R.next=oe,Ve.lanes|=J,Rl|=J;oe=X.action,Es&&a(d,oe),d=X.hasEagerState?X.eagerState:a(d,oe)}else J={lane:oe,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},R===null?(E=R=J,x=d):R=R.next=J,Ve.lanes|=oe,Rl|=oe;X=X.next}while(X!==null&&X!==t);if(R===null?x=d:R.next=E,!oa(d,e.memoizedState)&&(Vt=!0,re&&(a=or,a!==null)))throw a;e.memoizedState=d,e.baseState=x,e.baseQueue=R,n.lastRenderedState=d}return u===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Xo(e){var t=Ut(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var n=a.dispatch,u=a.pending,d=t.memoizedState;if(u!==null){a.pending=null;var x=u=u.next;do d=e(d,x.action),x=x.next;while(x!==u);oa(d,t.memoizedState)||(Vt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,n]}function gh(e,t,a){var n=Ve,u=Ut(),d=L;if(d){if(a===void 0)throw Error(c(407));a=a()}else a=t();var x=!oa((dt||u).memoizedState,a);if(x&&(u.memoizedState=a,Vt=!0),u=u.queue,ed(ph.bind(null,n,u,e),[e]),u.getSnapshot!==t||x||Bt!==null&&Bt.memoizedState.tag&1){if(n.flags|=2048,yr(9,{destroy:void 0},xh.bind(null,n,u,a,t),null),yt===null)throw Error(c(349));d||(Fn&127)!==0||yh(n,t,a)}return a}function yh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ve.updateQueue,t===null?(t=Xu(),Ve.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function xh(e,t,a,n){t.value=a,t.getSnapshot=n,vh(t)&&bh(e)}function ph(e,t,a){return a(function(){vh(t)&&bh(e)})}function vh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!oa(e,a)}catch{return!0}}function bh(e){var t=Ga(e,2);t!==null&&Oa(t,e,2)}function Jo(e){var t=pa();if(typeof e=="function"){var a=e;if(e=a(),Es){It(!0);try{a()}finally{It(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:e},t}function Sh(e,t,a,n){return e.baseState=a,Io(e,dt,typeof n=="function"?n:Gn)}function Tx(e,t,a,n,u){if(ac(e))throw Error(c(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(x){d.listeners.push(x)}};$.T!==null?a(!0):d.isTransition=!1,n(d),a=t.pending,a===null?(d.next=t.pending=d,wh(t,d)):(d.next=a.next,t.pending=a.next=d)}}function wh(e,t){var a=t.action,n=t.payload,u=e.state;if(t.isTransition){var d=$.T,x={};$.T=x;try{var E=a(u,n),R=$.S;R!==null&&R(x,E),Nh(e,t,E)}catch(X){Ko(e,t,X)}finally{d!==null&&x.types!==null&&(d.types=x.types),$.T=d}}else try{d=a(u,n),Nh(e,t,d)}catch(X){Ko(e,t,X)}}function Nh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){jh(e,t,n)},function(n){return Ko(e,t,n)}):jh(e,t,a)}function jh(e,t,a){t.status="fulfilled",t.value=a,Eh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,wh(e,a)))}function Ko(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Eh(t),t=t.next;while(t!==n)}e.action=null}function Eh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Mh(e,t){return t}function Th(e,t){if(L){var a=yt.formState;if(a!==null){e:{var n=Ve;if(L){if(H){t:{for(var u=H,d=ve;u.nodeType!==8;){if(!d){u=null;break t}if(u=Ja(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){H=Ja(u.nextSibling),n=u.data==="F!";break e}}Ie(n)}n=!1}n&&(t=a[0])}}return a=pa(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mh,lastRenderedState:t},a.queue=n,a=Zh.bind(null,Ve,n),n.dispatch=a,n=Jo(!1),d=sd.bind(null,Ve,!1,n.queue),n=pa(),u={state:t,dispatch:null,action:e,pending:null},n.queue=u,a=Tx.bind(null,Ve,u,d,a),u.dispatch=a,n.memoizedState=e,[t,a,!1]}function Ch(e){var t=Ut();return Oh(t,dt,e)}function Oh(e,t,a){if(t=Io(e,t,Mh)[0],e=Ku(Gn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=xi(t)}catch(x){throw x===dr?$u:x}else n=t;t=Ut();var u=t.queue,d=u.dispatch;return a!==t.memoizedState&&(Ve.flags|=2048,yr(9,{destroy:void 0},Cx.bind(null,u,a),null)),[n,d,e]}function Cx(e,t){e.action=t}function Dh(e){var t=Ut(),a=dt;if(a!==null)return Oh(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=Ve.updateQueue,t===null&&(t=Xu(),Ve.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function Rh(){return Ut().memoizedState}function ec(e,t,a,n){var u=pa();Ve.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;dt!==null&&n!==null&&Fo(n,dt.memoizedState.deps)?u.memoizedState=yr(t,d,a,n):(Ve.flags|=e,u.memoizedState=yr(1|t,d,a,n))}function Ah(e,t){ec(8390656,8,e,t)}function ed(e,t){tc(2048,8,e,t)}function Ox(e){Ve.flags|=4;var t=Ve.updateQueue;if(t===null)t=Xu(),Ve.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function kh(e){var t=Ut().memoizedState;return Ox({ref:t,nextImpl:e}),function(){if((st&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function _h(e,t){return tc(4,2,e,t)}function zh(e,t){return tc(4,4,e,t)}function Uh(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 Hh(e,t,a){a=a!=null?a.concat([e]):null,tc(4,4,Uh.bind(null,t,e),a)}function td(){}function qh(e,t){var a=Ut();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Fo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Lh(e,t){var a=Ut();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Fo(t,n[1]))return n[0];if(n=e(),Es){It(!0);try{e()}finally{It(!1)}}return a.memoizedState=[n,t],n}function ad(e,t,a){return a===void 0||(Fn&1073741824)!==0&&(Xe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Bm(),Ve.lanes|=e,Rl|=e,a)}function Bh(e,t,a,n){return oa(a,t)?a:hr.current!==null?(e=ad(e,a,n),oa(e,t)||(Vt=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(Xe&261930)===0?(Vt=!0,e.memoizedState=a):(e=Bm(),Ve.lanes|=e,Rl|=e,t)}function Vh(e,t,a,n,u){var d=ie.p;ie.p=d!==0&&8>d?d:8;var x=$.T,E={};$.T=E,sd(e,!1,t,a);try{var R=u(),X=$.S;if(X!==null&&X(E,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var re=jx(R,n);pi(e,t,re,Ha(e))}else pi(e,t,n,Ha(e))}catch(oe){pi(e,t,{then:function(){},status:"rejected",reason:oe},Ha())}finally{ie.p=d,x!==null&&E.types!==null&&(x.types=E.types),$.T=x}}function Dx(){}function nd(e,t,a,n){if(e.tag!==5)throw Error(c(476));var u=Yh(e).queue;Vh(e,u,t,ge,a===null?Dx:function(){return $h(e),a(n)})}function Yh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:ge},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $h(e){var t=Yh(e);t.next===null&&(t=e.alternate.memoizedState),pi(e,t.next.queue,{},Ha())}function ld(){return aa(zi)}function Fh(){return Ut().memoizedState}function Gh(){return Ut().memoizedState}function Rx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ha();e=El(a);var n=Ml(t,e,a);n!==null&&(Oa(n,t,a),hi(n,t,a)),t={cache:ko()},e.payload=t;return}t=t.return}}function Ax(e,t,a){var n=Ha();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ac(e)?Ph(t,a):(a=nr(e,t,a,n),a!==null&&(Oa(a,e,n),Qh(a,t,n)))}function Zh(e,t,a){var n=Ha();pi(e,t,a,n)}function pi(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ac(e))Ph(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var x=t.lastRenderedState,E=d(x,a);if(u.hasEagerState=!0,u.eagerState=E,oa(E,x))return Fa(e,t,u,0),yt===null&&wl(),!1}catch{}finally{}if(a=nr(e,t,u,n),a!==null)return Oa(a,e,n),Qh(a,t,n),!0}return!1}function sd(e,t,a,n){if(n={lane:2,revertLane:Hd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ac(e)){if(t)throw Error(c(479))}else t=nr(e,a,n,2),t!==null&&Oa(t,e,2)}function ac(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Ph(e,t){mr=Wu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Qh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,va(e,a)}}var vi={readContext:aa,use:Ju,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useLayoutEffect:Tt,useInsertionEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useSyncExternalStore:Tt,useId:Tt,useHostTransitionStatus:Tt,useFormState:Tt,useActionState:Tt,useOptimistic:Tt,useMemoCache:Tt,useCacheRefresh:Tt};vi.useEffectEvent=Tt;var Wh={readContext:aa,use:Ju,useCallback:function(e,t){return pa().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:Ah,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ec(4194308,4,Uh.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=pa();t=t===void 0?null:t;var n=e();if(Es){It(!0);try{e()}finally{It(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=pa();if(a!==void 0){var u=a(t);if(Es){It(!0);try{a(t)}finally{It(!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=Ax.bind(null,Ve,e),[n.memoizedState,e]},useRef:function(e){var t=pa();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,a=Zh.bind(null,Ve,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:td,useDeferredValue:function(e,t){var a=pa();return ad(a,e,t)},useTransition:function(){var e=Jo(!1);return e=Vh.bind(null,Ve,e.queue,!0,!1),pa().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ve,u=pa();if(L){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),yt===null)throw Error(c(349));(Xe&127)!==0||yh(n,t,a)}u.memoizedState=a;var d={value:a,getSnapshot:t};return u.queue=d,Ah(ph.bind(null,n,d,e),[e]),n.flags|=2048,yr(9,{destroy:void 0},xh.bind(null,n,d,a,t),null),a},useId:function(){var e=pa(),t=yt.identifierPrefix;if(L){var a=g,n=Qa;a=(n&~(1<<32-Xt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Iu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ex++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ld,useFormState:Th,useActionState:Th,useOptimistic:function(e){var t=pa();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=sd.bind(null,Ve,!0,a),a.dispatch=t,[e,t]},useMemoCache:Wo,useCacheRefresh:function(){return pa().memoizedState=Rx.bind(null,Ve)},useEffectEvent:function(e){var t=pa(),a={impl:e};return t.memoizedState=a,function(){if((st&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},rd={readContext:aa,use:Ju,useCallback:qh,useContext:aa,useEffect:ed,useImperativeHandle:Hh,useInsertionEffect:_h,useLayoutEffect:zh,useMemo:Lh,useReducer:Ku,useRef:Rh,useState:function(){return Ku(Gn)},useDebugValue:td,useDeferredValue:function(e,t){var a=Ut();return Bh(a,dt.memoizedState,e,t)},useTransition:function(){var e=Ku(Gn)[0],t=Ut().memoizedState;return[typeof e=="boolean"?e:xi(e),t]},useSyncExternalStore:gh,useId:Fh,useHostTransitionStatus:ld,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var a=Ut();return Sh(a,dt,e,t)},useMemoCache:Wo,useCacheRefresh:Gh};rd.useEffectEvent=kh;var Ih={readContext:aa,use:Ju,useCallback:qh,useContext:aa,useEffect:ed,useImperativeHandle:Hh,useInsertionEffect:_h,useLayoutEffect:zh,useMemo:Lh,useReducer:Xo,useRef:Rh,useState:function(){return Xo(Gn)},useDebugValue:td,useDeferredValue:function(e,t){var a=Ut();return dt===null?ad(a,e,t):Bh(a,dt.memoizedState,e,t)},useTransition:function(){var e=Xo(Gn)[0],t=Ut().memoizedState;return[typeof e=="boolean"?e:xi(e),t]},useSyncExternalStore:gh,useId:Fh,useHostTransitionStatus:ld,useFormState:Dh,useActionState:Dh,useOptimistic:function(e,t){var a=Ut();return dt!==null?Sh(a,dt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Wo,useCacheRefresh:Gh};Ih.useEffectEvent=kh;function id(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:j({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ud={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ha(),u=El(n);u.payload=t,a!=null&&(u.callback=a),t=Ml(e,u,n),t!==null&&(Oa(t,e,n),hi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ha(),u=El(n);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=Ml(e,u,n),t!==null&&(Oa(t,e,n),hi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ha(),n=El(a);n.tag=2,t!=null&&(n.callback=t),t=Ml(e,n,a),t!==null&&(Oa(t,e,a),hi(t,e,a))}};function Xh(e,t,a,n,u,d,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,d,x):t.prototype&&t.prototype.isPureReactComponent?!ms(a,n)||!ms(u,d):!0}function Jh(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&&ud.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=j({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function Kh(e){Sl(e)}function em(e){console.error(e)}function tm(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 am(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 cd(e,t,a){return a=El(a),a.tag=3,a.payload={element:null},a.callback=function(){nc(e,t)},a}function nm(e){return e=El(e),e.tag=3,e}function lm(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(){am(t,a,n)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){am(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 kx(e,t,a,n,u){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Ia(t,a,u,!0),a=ka.current,a!==null){switch(a.tag){case 31:case 13:return Xa===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),_d(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)),_d(e,n,u)),!1}throw Error(c(435,a.tag))}return _d(e,n,u),gc(),!1}if(L)return t=ka.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,n!==Ue&&(e=Error(c(422),{cause:n}),dn(Na(e,a)))):(n!==Ue&&(t=Error(c(423),{cause:n}),dn(Na(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,n=Na(n,a),u=cd(e.stateNode,n,u),Lo(e,u),Ct!==4&&(Ct=2)),!1;var d=Error(c(520),{cause:n});if(d=Na(d,a),Ti===null?Ti=[d]:Ti.push(d),Ct!==4&&(Ct=2),t===null)return!0;n=Na(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=cd(a.stateNode,n,e),Lo(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=nm(u),lm(u,e,a,n),Lo(a,u),!1}a=a.return}while(a!==null);return!1}var od=Error(c(461)),Vt=!1;function na(e,t,a,n){t.child=e===null?uh(t,null,a,n):js(t,e.child,a,n)}function sm(e,t,a,n,u){a=a.render;var d=t.ref;if("ref"in n){var x={};for(var E in n)E!=="ref"&&(x[E]=n[E])}else x=n;return bs(t),n=Go(e,t,a,x,d,u),E=Zo(),e!==null&&!Vt?(Po(e,t,u),Zn(e,t,u)):(L&&E&&p(t),t.flags|=1,na(e,t,n,u),t.child)}function rm(e,t,a,n,u){if(e===null){var d=a.type;return typeof d=="function"&&!sr(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,im(e,t,d,n,u)):(e=rr(a.type,null,n,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!pd(e,u)){var x=d.memoizedProps;if(a=a.compare,a=a!==null?a:ms,a(x,n)&&e.ref===t.ref)return Zn(e,t,u)}return t.flags|=1,e=Za(d,n),e.ref=t.ref,e.return=t,t.child=e}function im(e,t,a,n,u){if(e!==null){var d=e.memoizedProps;if(ms(d,n)&&e.ref===t.ref)if(Vt=!1,t.pendingProps=n=d,pd(e,u))(e.flags&131072)!==0&&(Vt=!0);else return t.lanes=e.lanes,Zn(e,t,u)}return dd(e,t,a,n,u)}function um(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 cm(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?dh(t,d):Vo(),fh(t);else return n=t.lanes=536870912,cm(e,t,d!==null?d.baseLanes|a:a,a,n)}else d!==null?(Yu(t,d.cachePool),dh(t,d),Cl(),t.memoizedState=null):(e!==null&&Yu(t,null),Vo(),Cl());return na(e,t,u,a),t.child}function bi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cm(e,t,a,n,u){var d=zo();return d=d===null?null:{parent:Lt._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&Yu(t,null),Vo(),fh(t),e!==null&&Ia(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 om(e,t,a){return js(t,e.child,null,a),e=lc(t,t.pendingProps),e.flags|=2,_a(t),t.memoizedState=null,e}function _x(e,t,a){var n=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(L){if(n.mode==="hidden")return e=lc(t,n),t.lanes=536870912,bi(null,e);if($o(t),(e=H)?(e=w0(e,ve),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Qa,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Bu(e),a.return=t,t.child=a,U=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 x=d.dehydrated;if($o(t),u)if(t.flags&256)t.flags&=-257,t=om(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Vt||Ia(e,t,a,!1),u=(a&e.childLanes)!==0,Vt||u){if(n=yt,n!==null&&(x=Lr(n,a),x!==0&&x!==d.retryLane))throw d.retryLane=x,Ga(e,x),Oa(n,e,x),od;gc(),t=om(e,t,a)}else e=d.treeContext,H=Ja(x.nextSibling),U=t,L=!0,fe=null,ve=!1,e!==null&&C(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(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function dd(e,t,a,n,u){return bs(t),a=Go(e,t,a,n,void 0,u),n=Zo(),e!==null&&!Vt?(Po(e,t,u),Zn(e,t,u)):(L&&n&&p(t),t.flags|=1,na(e,t,a,u),t.child)}function dm(e,t,a,n,u,d){return bs(t),t.updateQueue=null,a=mh(t,n,a,u),hh(e),n=Zo(),e!==null&&!Vt?(Po(e,t,d),Zn(e,t,d)):(L&&n&&p(t),t.flags|=1,na(e,t,a,d),t.child)}function fm(e,t,a,n,u){if(bs(t),t.stateNode===null){var d=Aa,x=a.contextType;typeof x=="object"&&x!==null&&(d=aa(x)),d=new a(n,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=ud,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=n,d.state=t.memoizedState,d.refs={},Ho(t),x=a.contextType,d.context=typeof x=="object"&&x!==null?aa(x):Aa,d.state=t.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(id(t,a,x,n),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(x=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),x!==d.state&&ud.enqueueReplaceState(d,d.state,null),gi(t,n,d,u),mi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,R=Ms(a,E);d.props=R;var X=d.context,re=a.contextType;x=Aa,typeof re=="object"&&re!==null&&(x=aa(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||X!==x)&&Jh(t,d,n,x),jl=!1;var J=t.memoizedState;d.state=J,gi(t,n,d,u),mi(),X=t.memoizedState,E||J!==X||jl?(typeof oe=="function"&&(id(t,a,oe,n),X=t.memoizedState),(R=jl||Xh(t,a,R,n,J,X,x))?(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=X),d.props=n,d.state=X,d.context=x,n=R):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{d=t.stateNode,qo(e,t),x=t.memoizedProps,re=Ms(a,x),d.props=re,oe=t.pendingProps,J=d.context,X=a.contextType,R=Aa,typeof X=="object"&&X!==null&&(R=aa(X)),E=a.getDerivedStateFromProps,(X=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x!==oe||J!==R)&&Jh(t,d,n,R),jl=!1,J=t.memoizedState,d.state=J,gi(t,n,d,u),mi();var te=t.memoizedState;x!==oe||J!==te||jl||e!==null&&e.dependencies!==null&&ur(e.dependencies)?(typeof E=="function"&&(id(t,a,E,n),te=t.memoizedState),(re=jl||Xh(t,a,re,n,J,te,R)||e!==null&&e.dependencies!==null&&ur(e.dependencies))?(X||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(n,te,R),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(n,te,R)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&J===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=te),d.props=n,d.state=te,d.context=R,n=re):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&J===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=js(t,e.child,null,u),t.child=js(t,null,a,u)):na(e,t,a,u),t.memoizedState=d.state,e=t.child):e=Zn(e,t,u),e}function hm(e,t,a,n){return Pt(),t.flags|=256,na(e,t,a,n),t.child}var fd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hd(e){return{baseLanes:e,cachePool:ah()}}function md(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ua),e}function mm(e,t,a){var n=t.pendingProps,u=!1,d=(t.flags&128)!==0,x;if((x=d)||(x=e!==null&&e.memoizedState===null?!1:(zt.current&2)!==0),x&&(u=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(L){if(u?Tl(t):Cl(),(e=H)?(e=w0(e,ve),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Qa,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Bu(e),a.return=t,t.child=a,U=t,H=null)):e=null,e===null)throw Ie(t);return Id(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=Pa(n,u,a,null),E.return=t,n.return=t,E.sibling=n,t.child=E,n=t.child,n.memoizedState=hd(a),n.childLanes=md(e,x,a),t.memoizedState=fd,bi(null,n)):(Tl(t),gd(t,E))}var R=e.memoizedState;if(R!==null&&(E=R.dehydrated,E!==null)){if(d)t.flags&256?(Tl(t),t.flags&=-257,t=yd(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=Pa(E,u,a,null),E.flags|=2,n.return=t,E.return=t,n.sibling=E,t.child=n,js(t,e.child,null,a),n=t.child,n.memoizedState=hd(a),n.childLanes=md(e,x,a),t.memoizedState=fd,t=bi(null,n));else if(Tl(t),Id(E)){if(x=E.nextSibling&&E.nextSibling.dataset,x)var X=x.dgst;x=X,n=Error(c(419)),n.stack="",n.digest=x,dn({value:n,source:null,stack:null}),t=yd(e,t,a)}else if(Vt||Ia(e,t,a,!1),x=(a&e.childLanes)!==0,Vt||x){if(x=yt,x!==null&&(n=Lr(x,a),n!==0&&n!==R.retryLane))throw R.retryLane=n,Ga(e,n),Oa(x,e,n),od;Wd(E)||gc(),t=yd(e,t,a)}else Wd(E)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,H=Ja(E.nextSibling),U=t,L=!0,fe=null,ve=!1,e!==null&&C(t,e),t=gd(t,n.children),t.flags|=4096);return t}return u?(Cl(),E=n.fallback,u=t.mode,R=e.child,X=R.sibling,n=Za(R,{mode:"hidden",children:n.children}),n.subtreeFlags=R.subtreeFlags&65011712,X!==null?E=Za(X,E):(E=Pa(E,u,a,null),E.flags|=2),E.return=t,n.return=t,n.sibling=E,t.child=n,bi(null,n),n=t.child,E=e.child.memoizedState,E===null?E=hd(a):(u=E.cachePool,u!==null?(R=Lt._currentValue,u=u.parent!==R?{parent:R,pool:R}:u):u=ah(),E={baseLanes:E.baseLanes|a,cachePool:u}),n.memoizedState=E,n.childLanes=md(e,x,a),t.memoizedState=fd,bi(e.child,n)):(Tl(t),a=e.child,e=a.sibling,a=Za(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=a,t.memoizedState=null,a)}function gd(e,t){return t=rc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rc(e,t){return e=ta(22,e,null,t),e.lanes=0,e}function yd(e,t,a){return js(t,e.child,null,a),e=gd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ui(e.return,t,a)}function xd(e,t,a,n,u,d){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:u,treeForkCount:d}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=n,x.tail=a,x.tailMode=u,x.treeForkCount=d)}function ym(e,t,a){var n=t.pendingProps,u=n.revealOrder,d=n.tail;n=n.children;var x=zt.current,E=(x&2)!==0;if(E?(x=x&1|2,t.flags|=128):x&=1,me(zt,x),na(e,t,n,a),n=L?on:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gm(e,a,t);else if(e.tag===19)gm(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&&Qu(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),xd(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&&Qu(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}xd(t,!0,a,null,d,n);break;case"together":xd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Zn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Rl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ia(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(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 pd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ur(e)))}function zx(e,t,a){switch(t.tag){case 3:St(t,t.stateNode.containerInfo),Mn(t,Lt,e.memoizedState.cache),Pt();break;case 27:case 5:sa(t);break;case 4:St(t,t.stateNode.containerInfo);break;case 10:Mn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,$o(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Tl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?mm(e,t,a):(Tl(t),e=Zn(e,t,a),e!==null?e.sibling:null);Tl(t);break;case 19:var u=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Ia(e,t,a,!1),n=(a&t.childLanes)!==0),u){if(n)return ym(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,um(e,t,a,t.pendingProps);case 24:Mn(t,Lt,e.memoizedState.cache)}return Zn(e,t,a)}function xm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Vt=!0;else{if(!pd(e,a)&&(t.flags&128)===0)return Vt=!1,zx(e,t,a);Vt=(e.flags&131072)!==0}else Vt=!1,L&&(t.flags&1048576)!==0&&h(t,on,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")sr(e)?(n=Ms(e,n),t.tag=1,t=fm(null,t,e,n,a)):(t.tag=0,t=dd(null,t,e,n,a));else{if(e!=null){var u=e.$$typeof;if(u===K){t.tag=11,t=sm(null,t,e,n,a);break e}else if(u===Z){t.tag=14,t=rm(null,t,e,n,a);break e}}throw t=he(e)||e,Error(c(306,t,""))}}return t;case 0:return dd(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,u=Ms(n,t.pendingProps),fm(e,t,n,u,a);case 3:e:{if(St(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var d=t.memoizedState;u=d.element,qo(e,t),gi(t,n,null,a);var x=t.memoizedState;if(n=x.cache,Mn(t,Lt,n),n!==d.cache&&$n(t,[Lt],a,!0),mi(),n=x.element,d.isDehydrated)if(d={element:n,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=hm(e,t,n,a);break e}else if(n!==u){u=Na(Error(c(424)),t),dn(u),t=hm(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=Ja(e.firstChild),U=t,L=!0,fe=null,ve=!0,a=uh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Pt(),n===u){t=Zn(e,t,a);break e}na(e,t,n,a)}t=t.child}return t;case 26:return sc(e,t),e===null?(a=C0(t.type,null,t.pendingProps,null))?t.memoizedState=a:L||(a=t.type,e=t.pendingProps,n=wc(Me.current).createElement(a),n[At]=t,n[$t]=e,la(n,a,e),qt(n),t.stateNode=n):t.memoizedState=C0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return sa(t),e===null&&L&&(n=t.stateNode=E0(t.type,t.pendingProps,Me.current),U=t,ve=!0,u=H,Ul(t.type)?(Xd=u,H=Ja(n.firstChild)):H=u),na(e,t,t.pendingProps.children,a),sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&L&&((u=n=H)&&(n=dp(n,t.type,t.pendingProps,ve),n!==null?(t.stateNode=n,U=t,H=Ja(n.firstChild),ve=!1,u=!0):u=!1),u||Ie(t)),sa(t),u=t.type,d=t.pendingProps,x=e!==null?e.memoizedProps:null,n=d.children,Zd(u,d)?n=null:x!==null&&Zd(u,x)&&(t.flags|=32),t.memoizedState!==null&&(u=Go(e,t,Mx,null,null,a),zi._currentValue=u),sc(e,t),na(e,t,n,a),t.child;case 6:return e===null&&L&&((e=a=H)&&(a=fp(a,t.pendingProps,ve),a!==null?(t.stateNode=a,U=t,H=null,e=!0):e=!1),e||Ie(t)),null;case 13:return mm(e,t,a);case 4:return St(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=js(t,null,n,a):na(e,t,n,a),t.child;case 11:return sm(e,t,t.type,t.pendingProps,a);case 7:return na(e,t,t.pendingProps,a),t.child;case 8:return na(e,t,t.pendingProps.children,a),t.child;case 12:return na(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,Mn(t,t.type,n.value),na(e,t,n.children,a),t.child;case 9:return u=t.type._context,n=t.pendingProps.children,bs(t),u=aa(u),n=n(u),t.flags|=1,na(e,t,n,a),t.child;case 14:return rm(e,t,t.type,t.pendingProps,a);case 15:return im(e,t,t.type,t.pendingProps,a);case 19:return ym(e,t,a);case 31:return _x(e,t,a);case 22:return um(e,t,a,t.pendingProps);case 24:return bs(t),n=aa(Lt),e===null?(u=zo(),u===null&&(u=yt,d=ko(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=a),u=d),t.memoizedState={parent:n,cache:u},Ho(t),Mn(t,Lt,u)):((e.lanes&a)!==0&&(qo(e,t),gi(t,null,null,a),mi()),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),Mn(t,Lt,n)):(n=d.cache,Mn(t,Lt,n),n!==u.cache&&$n(t,[Lt],a,!0))),na(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Pn(e){e.flags|=4}function vd(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(Fm())e.flags|=8192;else throw Ns=Fu,Uo}else e.flags&=-16777217}function pm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!k0(t))if(Fm())e.flags|=8192;else throw Ns=Fu,Uo}function ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?qr():536870912,e.lanes|=t,br|=t)}function Si(e,t){if(!L)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 Ux(e,t,a){var n=t.pendingProps;switch(N(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),fn(Lt),tt(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Zt(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),pm(t,d)):(bt(t),vd(t,u,null,n,a))):d?d!==e.memoizedState?(Pn(t),bt(t),pm(t,d)):(bt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Pn(t),bt(t),vd(t,u,e,n,a)),null;case 27:if(ma(t),a=Me.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Pn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return bt(t),null}e=pe.current,Zt(t)?Re(t):(e=E0(u,n,a),t.stateNode=e,Pn(t))}return bt(t),null;case 5:if(ma(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Pn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return bt(t),null}if(d=pe.current,Zt(t))Re(t);else{var x=wc(Me.current);switch(d){case 1:d=x.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=x.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=x.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof n.is=="string"?x.createElement("select",{is:n.is}):x.createElement("select"),n.multiple?d.multiple=!0:n.size&&(d.size=n.size);break;default:d=typeof n.is=="string"?x.createElement(u,{is:n.is}):x.createElement(u)}}d[At]=t,d[$t]=n;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)d.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=d;e:switch(la(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),vd(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(c(166));if(e=Me.current,Zt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=U,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[At]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||m0(e.nodeValue,a)),e||Ie(t,!0)}else e=wc(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=Zt(t),a!==null){if(e===null){if(!n)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[At]=t}else Pt(),(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?(_a(t),t):(_a(t),null);if((t.flags&128)!==0)throw Error(c(558))}return bt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Zt(t),n!==null&&n.dehydrated!==null){if(e===null){if(!u)throw Error(c(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(c(317));u[At]=t}else Pt(),(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?(_a(t),t):(_a(t),null)}return _a(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&&Vd(t.stateNode.containerInfo),bt(t),null;case 10:return fn(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)Si(n,!1);else{if(Ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Qu(e),d!==null){for(t.flags|=128,Si(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),L&&r(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Be()>fc&&(t.flags|=128,u=!0,Si(n,!1),t.lanes=4194304)}else{if(!u)if(e=Qu(d),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,ic(t,e),Si(n,!0),n.tail===null&&n.tailMode==="hidden"&&!d.alternate&&!L)return bt(t),null}else 2*Be()-n.renderingStartTime>fc&&a!==536870912&&(t.flags|=128,u=!0,Si(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=Be(),e.sibling=null,a=zt.current,me(zt,u?a&1|2:a&1),L&&r(t,n.treeForkCount),e):(bt(t),null);case 22:case 23:return _a(t),Yo(),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(Ss),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),fn(Lt),bt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Hx(e,t){switch(N(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fn(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 ma(t),null;case 31:if(t.memoizedState!==null){if(_a(t),t.alternate===null)throw Error(c(340));Pt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(_a(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Pt()}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 fn(t.type),null;case 22:case 23:return _a(t),Yo(),e!==null&&se(Ss),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return fn(Lt),null;case 25:return null;default:return null}}function vm(e,t){switch(N(t),t.tag){case 3:fn(Lt),tt();break;case 26:case 27:case 5:ma(t);break;case 4:tt();break;case 31:t.memoizedState!==null&&_a(t);break;case 13:_a(t);break;case 19:se(zt);break;case 10:fn(t.type);break;case 22:case 23:_a(t),Yo(),e!==null&&se(Ss);break;case 24:fn(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,x=a.inst;n=d(),x.destroy=n}a=a.next}while(a!==u)}}catch(E){ct(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 x=n.inst,E=x.destroy;if(E!==void 0){x.destroy=void 0,u=t;var R=a,X=E;try{X()}catch(re){ct(u,R,re)}}}n=n.next}while(n!==d)}}catch(re){ct(t,t.return,re)}}function bm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{oh(t,a)}catch(n){ct(e,e.return,n)}}}function Sm(e,t,a){a.props=Ms(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){ct(e,t,n)}}function Ni(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){ct(e,t,u)}}function Tn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){ct(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){ct(e,t,u)}else a.current=null}function wm(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){ct(e,e.return,u)}}function bd(e,t,a){try{var n=e.stateNode;sp(n,e.type,a,t),n[$t]=t}catch(u){ct(e,e.return,u)}}function Nm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ul(e.type)||e.tag===4}function Sd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nm(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 wd(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=Ya));else if(n!==4&&(n===27&&Ul(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(wd(e,t,a),e=e.sibling;e!==null;)wd(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 jm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);la(t,n,a),t[At]=e,t[$t]=a}catch(d){ct(e,e.return,d)}}var Qn=!1,Yt=!1,Nd=!1,Em=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function qx(e,t){if(e=e.containerInfo,Fd=Oc,e=Do(e),Ks(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var u=n.anchorOffset,d=n.focusNode;n=n.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var x=0,E=-1,R=-1,X=0,re=0,oe=e,J=null;t:for(;;){for(var te;oe!==a||u!==0&&oe.nodeType!==3||(E=x+u),oe!==d||n!==0&&oe.nodeType!==3||(R=x+n),oe.nodeType===3&&(x+=oe.nodeValue.length),(te=oe.firstChild)!==null;)J=oe,oe=te;for(;;){if(oe===e)break t;if(J===a&&++X===u&&(E=x),J===d&&++re===n&&(R=x),(te=oe.nextSibling)!==null)break;oe=J,J=oe.parentNode}oe=te}a=E===-1||R===-1?null:{start:E,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Gd={focusedElem:e,selectionRange:a},Oc=!1,Qt=t;Qt!==null;)if(t=Qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qt=e;else for(;Qt!==null;){switch(t=Qt,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(Ae){ct(a,a.return,Ae)}}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(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Qt=e;break}Qt=t.return}}function Mm(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(x){ct(a,a.return,x)}else{var u=Ms(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){ct(a,a.return,x)}}n&64&&bm(a),n&512&&Ni(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{oh(e,t)}catch(x){ct(a,a.return,x)}}break;case 27:t===null&&n&4&&jm(a);case 26:case 5:In(e,a),t===null&&n&4&&wm(a),n&512&&Ni(a,a.return);break;case 12:In(e,a);break;case 31:In(e,a),n&4&&Om(e,a);break;case 13:In(e,a),n&4&&Dm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Px.bind(null,a),hp(e,a))));break;case 22:if(n=a.memoizedState!==null||Qn,!n){t=t!==null&&t.memoizedState!==null||Yt,u=Qn;var d=Yt;Qn=n,(Yt=t)&&!d?Xn(e,a,(a.subtreeFlags&8772)!==0):In(e,a),Qn=u,Yt=d}break;case 30:break;default:In(e,a)}}function Tm(e){var t=e.alternate;t!==null&&(e.alternate=null,Tm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ys(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,Ea=!1;function Wn(e,t,a){for(a=a.child;a!==null;)Cm(e,t,a),a=a.sibling}function Cm(e,t,a){if(ia&&typeof ia.onCommitFiberUnmount=="function")try{ia.onCommitFiberUnmount(gt,a)}catch{}switch(a.tag){case 26:Yt||Tn(a,t),Wn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Yt||Tn(a,t);var n=Nt,u=Ea;Ul(a.type)&&(Nt=a.stateNode,Ea=!1),Wn(e,t,a),Ai(a.stateNode),Nt=n,Ea=u;break;case 5:Yt||Tn(a,t);case 6:if(n=Nt,u=Ea,Nt=null,Wn(e,t,a),Nt=n,Ea=u,Nt!==null)if(Ea)try{(Nt.nodeType===9?Nt.body:Nt.nodeName==="HTML"?Nt.ownerDocument.body:Nt).removeChild(a.stateNode)}catch(d){ct(a,t,d)}else try{Nt.removeChild(a.stateNode)}catch(d){ct(a,t,d)}break;case 18:Nt!==null&&(Ea?(e=Nt,b0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Cr(e)):b0(Nt,a.stateNode));break;case 4:n=Nt,u=Ea,Nt=a.stateNode.containerInfo,Ea=!0,Wn(e,t,a),Nt=n,Ea=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||(Tn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Sm(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 Om(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Cr(e)}catch(a){ct(t,t.return,a)}}}function Dm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Cr(e)}catch(a){ct(t,t.return,a)}}function Lx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Em),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Em),t;default:throw Error(c(435,e.tag))}}function cc(e,t){var a=Lx(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var u=Qx.bind(null,e,n);n.then(u,u)}})}function Ma(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var u=a[n],d=e,x=t,E=x;e:for(;E!==null;){switch(E.tag){case 27:if(Ul(E.type)){Nt=E.stateNode,Ea=!1;break e}break;case 5:Nt=E.stateNode,Ea=!1;break e;case 3:case 4:Nt=E.stateNode.containerInfo,Ea=!0;break e}E=E.return}if(Nt===null)throw Error(c(160));Cm(d,x,u),Nt=null,Ea=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Rm(t,e),t=t.sibling}var hn=null;function Rm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ma(t,e),Ta(e),n&4&&(Ol(3,e,e.return),wi(3,e),Ol(5,e,e.return));break;case 1:Ma(t,e),Ta(e),n&512&&(Yt||a===null||Tn(a,a.return)),n&64&&Qn&&(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=hn;if(Ma(t,e),Ta(e),n&512&&(Yt||a===null||Tn(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[Wl]||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"))),la(d,n,a),d[At]=e,qt(d),n=d;break e;case"link":var x=R0("link","href",u).get(n+(a.href||""));if(x){for(var E=0;E<x.length;E++)if(d=x[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)){x.splice(E,1);break t}}d=u.createElement(n),la(d,n,a),u.head.appendChild(d);break;case"meta":if(x=R0("meta","content",u).get(n+(a.content||""))){for(E=0;E<x.length;E++)if(d=x[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)){x.splice(E,1);break t}}d=u.createElement(n),la(d,n,a),u.head.appendChild(d);break;default:throw Error(c(468,n))}d[At]=e,qt(d),n=d}e.stateNode=n}else A0(u,e.type,e.stateNode);else e.stateNode=D0(u,n,e.memoizedProps);else d!==n?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,n===null?A0(u,e.type,e.stateNode):D0(u,n,e.memoizedProps)):n===null&&e.stateNode!==null&&bd(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ma(t,e),Ta(e),n&512&&(Yt||a===null||Tn(a,a.return)),a!==null&&n&4&&bd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ma(t,e),Ta(e),n&512&&(Yt||a===null||Tn(a,a.return)),e.flags&32){u=e.stateNode;try{sn(u,"")}catch(be){ct(e,e.return,be)}}n&4&&e.stateNode!=null&&(u=e.memoizedProps,bd(e,u,a!==null?a.memoizedProps:u)),n&1024&&(Nd=!0);break;case 6:if(Ma(t,e),Ta(e),n&4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(be){ct(e,e.return,be)}}break;case 3:if(Ec=null,u=hn,hn=Nc(t.containerInfo),Ma(t,e),hn=u,Ta(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Cr(t.containerInfo)}catch(be){ct(e,e.return,be)}Nd&&(Nd=!1,Am(e));break;case 4:n=hn,hn=Nc(e.stateNode.containerInfo),Ma(t,e),Ta(e),hn=n;break;case 12:Ma(t,e),Ta(e);break;case 31:Ma(t,e),Ta(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 13:Ma(t,e),Ta(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(dc=Be()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 22:u=e.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,X=Qn,re=Yt;if(Qn=X||u,Yt=re||R,Ma(t,e),Yt=re,Qn=X,Ta(e),n&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||R||Qn||Yt||Ts(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){R=a=t;try{if(d=R.stateNode,u)x=d.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=R.stateNode;var oe=R.memoizedProps.style,J=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;E.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(be){ct(R,R.return,be)}}}else if(t.tag===6){if(a===null){R=t;try{R.stateNode.nodeValue=u?"":R.memoizedProps}catch(be){ct(R,R.return,be)}}}else if(t.tag===18){if(a===null){R=t;try{var te=R.stateNode;u?S0(te,!0):S0(R.stateNode,!1)}catch(be){ct(R,R.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:Ma(t,e),Ta(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 30:break;case 21:break;default:Ma(t,e),Ta(e)}}function Ta(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Nm(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var u=a.stateNode,d=Sd(e);uc(e,d,u);break;case 5:var x=a.stateNode;a.flags&32&&(sn(x,""),a.flags&=-33);var E=Sd(e);uc(e,E,x);break;case 3:case 4:var R=a.stateNode.containerInfo,X=Sd(e);wd(e,X,R);break;default:throw Error(c(161))}}catch(re){ct(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Am(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Am(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;)Mm(e,t.alternate,t),t=t.sibling}function Ts(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),Ts(t);break;case 1:Tn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Sm(t,t.return,a),Ts(t);break;case 27:Ai(t.stateNode);case 26:case 5:Tn(t,t.return),Ts(t);break;case 22:t.memoizedState===null&&Ts(t);break;case 30:Ts(t);break;default:Ts(t)}e=e.sibling}}function Xn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,u=e,d=t,x=d.flags;switch(d.tag){case 0:case 11:case 15:Xn(u,d,a),wi(4,d);break;case 1:if(Xn(u,d,a),n=d,u=n.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(X){ct(n,n.return,X)}if(n=d,u=n.updateQueue,u!==null){var E=n.stateNode;try{var R=u.shared.hiddenCallbacks;if(R!==null)for(u.shared.hiddenCallbacks=null,u=0;u<R.length;u++)ch(R[u],E)}catch(X){ct(n,n.return,X)}}a&&x&64&&bm(d),Ni(d,d.return);break;case 27:jm(d);case 26:case 5:Xn(u,d,a),a&&n===null&&x&4&&wm(d),Ni(d,d.return);break;case 12:Xn(u,d,a);break;case 31:Xn(u,d,a),a&&x&4&&Om(u,d);break;case 13:Xn(u,d,a),a&&x&4&&Dm(u,d);break;case 22:d.memoizedState===null&&Xn(u,d,a),Ni(d,d.return);break;case 30:break;default:Xn(u,d,a)}t=t.sibling}}function jd(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&&ci(a))}function Ed(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ci(e))}function mn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)km(e,t,a,n),t=t.sibling}function km(e,t,a,n){var u=t.flags;switch(t.tag){case 0:case 11:case 15:mn(e,t,a,n),u&2048&&wi(9,t);break;case 1:mn(e,t,a,n);break;case 3:mn(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&&ci(e)));break;case 12:if(u&2048){mn(e,t,a,n),e=t.stateNode;try{var d=t.memoizedProps,x=d.id,E=d.onPostCommit;typeof E=="function"&&E(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){ct(t,t.return,R)}}else mn(e,t,a,n);break;case 31:mn(e,t,a,n);break;case 13:mn(e,t,a,n);break;case 23:break;case 22:d=t.stateNode,x=t.alternate,t.memoizedState!==null?d._visibility&2?mn(e,t,a,n):ji(e,t):d._visibility&2?mn(e,t,a,n):(d._visibility|=2,xr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),u&2048&&jd(x,t);break;case 24:mn(e,t,a,n),u&2048&&Ed(t.alternate,t);break;default:mn(e,t,a,n)}}function xr(e,t,a,n,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,x=t,E=a,R=n,X=x.flags;switch(x.tag){case 0:case 11:case 15:xr(d,x,E,R,u),wi(8,x);break;case 23:break;case 22:var re=x.stateNode;x.memoizedState!==null?re._visibility&2?xr(d,x,E,R,u):ji(d,x):(re._visibility|=2,xr(d,x,E,R,u)),u&&X&2048&&jd(x.alternate,x);break;case 24:xr(d,x,E,R,u),u&&X&2048&&Ed(x.alternate,x);break;default:xr(d,x,E,R,u)}t=t.sibling}}function ji(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:ji(a,n),u&2048&&jd(n.alternate,n);break;case 24:ji(a,n),u&2048&&Ed(n.alternate,n);break;default:ji(a,n)}t=t.sibling}}var Ei=8192;function pr(e,t,a){if(e.subtreeFlags&Ei)for(e=e.child;e!==null;)_m(e,t,a),e=e.sibling}function _m(e,t,a){switch(e.tag){case 26:pr(e,t,a),e.flags&Ei&&e.memoizedState!==null&&Ep(a,hn,e.memoizedState,e.memoizedProps);break;case 5:pr(e,t,a);break;case 3:case 4:var n=hn;hn=Nc(e.stateNode.containerInfo),pr(e,t,a),hn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ei,Ei=16777216,pr(e,t,a),Ei=n):pr(e,t,a));break;default:pr(e,t,a)}}function zm(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];Qt=n,Hm(n,e)}zm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Um(e),e=e.sibling}function Um(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];Qt=n,Hm(n,e)}zm(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 Hm(e,t){for(;Qt!==null;){var a=Qt;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:ci(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Qt=n;else e:for(a=e;Qt!==null;){n=Qt;var u=n.sibling,d=n.return;if(Tm(n),n===a){Qt=null;break e}if(u!==null){u.return=d,Qt=u;break e}Qt=d}}}var Bx={getCacheForType:function(e){var t=aa(Lt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return aa(Lt).controller.signal}},Vx=typeof WeakMap=="function"?WeakMap:Map,st=0,yt=null,Ze=null,Xe=0,ut=0,za=null,Dl=!1,vr=!1,Md=!1,Jn=0,Ct=0,Rl=0,Cs=0,Td=0,Ua=0,br=0,Ti=null,Ca=null,Cd=!1,dc=0,qm=0,fc=1/0,hc=null,Al=null,Gt=0,kl=null,Sr=null,Kn=0,Od=0,Dd=null,Lm=null,Ci=0,Rd=null;function Ha(){return(st&2)!==0&&Xe!==0?Xe&-Xe:$.T!==null?Hd():Vs()}function Bm(){if(Ua===0)if((Xe&536870912)===0||L){var e=qs;qs<<=1,(qs&3932160)===0&&(qs=262144),Ua=e}else Ua=536870912;return e=ka.current,e!==null&&(e.flags|=32),Ua}function Oa(e,t,a){(e===yt&&(ut===2||ut===9)||e.cancelPendingCommit!==null)&&(wr(e,0),_l(e,Xe,Ua,!1)),ul(e,a),((st&2)===0||e!==yt)&&(e===yt&&((st&2)===0&&(Cs|=a),Ct===4&&_l(e,Xe,Ua,!1)),Cn(e))}function Vm(e,t,a){if((st&6)!==0)throw Error(c(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||il(e,t),u=n?Fx(e,t):kd(e,t,!0),d=n;do{if(u===0){vr&&!n&&_l(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!Yx(a)){u=kd(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var E=e;u=Ti;var R=E.current.memoizedState.isDehydrated;if(R&&(wr(E,x).flags|=256),x=kd(E,x,!1),x!==2){if(Md&&!R){E.errorRecoveryDisabledLanes|=d,Cs|=d,u=4;break e}d=Ca,Ca=u,d!==null&&(Ca===null?Ca=d:Ca.push.apply(Ca,d))}u=x}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(c(345));case 4:if((t&4194048)!==t)break;case 6:_l(n,t,Ua,!Dl);break e;case 2:Ca=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=dc+300-Be(),10<u)){if(_l(n,t,Ua,!Dl),Pl(n,0,!0)!==0)break e;Kn=t,n.timeoutHandle=p0(Ym.bind(null,n,a,Ca,hc,Cd,t,Ua,Cs,br,Dl,d,"Throttled",-0,0),u);break e}Ym(n,a,Ca,hc,Cd,t,Ua,Cs,br,Dl,d,null,-0,0)}}break}while(!0);Cn(e)}function Ym(e,t,a,n,u,d,x,E,R,X,re,oe,J,te){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:Ya},_m(t,d,oe);var be=(d&62914560)===d?dc-Be():(d&4194048)===d?qm-Be():0;if(be=Mp(oe,be),be!==null){Kn=d,e.cancelPendingCommit=be(Im.bind(null,e,t,d,a,n,u,x,E,R,re,oe,null,J,te)),_l(e,d,x,!X);return}}Im(e,t,d,a,n,u,x,E,R)}function Yx(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(!oa(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&=~Td,t&=~Cs,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var u=t;0<u;){var d=31-Xt(u),x=1<<d;n[d]=-1,u&=~x}a!==0&&xt(e,a,t)}function mc(){return(st&6)===0?(Oi(0),!1):!0}function Ad(){if(Ze!==null){if(ut===0)var e=Ze.return;else e=Ze,Wa=Yn=null,Qo(e),fr=null,di=0,e=Ze;for(;e!==null;)vm(e.alternate,e),e=e.return;Ze=null}}function wr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,up(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Kn=0,Ad(),yt=e,Ze=a=Za(e.current,null),Xe=t,ut=0,za=null,Dl=!1,vr=il(e,t),Md=!1,br=Ua=Td=Cs=Rl=Ct=0,Ca=Ti=null,Cd=!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-Xt(n),d=1<<u;t|=e[u],n&=~d}return Jn=t,wl(),a}function $m(e,t){Ve=null,$.H=vi,t===dr||t===$u?(t=sh(),ut=3):t===Uo?(t=sh(),ut=4):ut=t===od?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,za=t,Ze===null&&(Ct=1,nc(e,Na(t,e.current)))}function Fm(){var e=ka.current;return e===null?!0:(Xe&4194048)===Xe?Xa===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?e===Xa:!1}function Gm(){var e=$.H;return $.H=vi,e===null?vi:e}function Zm(){var e=$.A;return $.A=Bx,e}function gc(){Ct=4,Dl||(Xe&4194048)!==Xe&&ka.current!==null||(vr=!0),(Rl&134217727)===0&&(Cs&134217727)===0||yt===null||_l(yt,Xe,Ua,!1)}function kd(e,t,a){var n=st;st|=2;var u=Gm(),d=Zm();(yt!==e||Xe!==t)&&(hc=null,wr(e,t)),t=!1;var x=Ct;e:do try{if(ut!==0&&Ze!==null){var E=Ze,R=za;switch(ut){case 8:Ad(),x=6;break e;case 3:case 2:case 9:case 6:ka.current===null&&(t=!0);var X=ut;if(ut=0,za=null,Nr(e,E,R,X),a&&vr){x=0;break e}break;default:X=ut,ut=0,za=null,Nr(e,E,R,X)}}$x(),x=Ct;break}catch(re){$m(e,re)}while(!0);return t&&e.shellSuspendCounter++,Wa=Yn=null,st=n,$.H=u,$.A=d,Ze===null&&(yt=null,Xe=0,wl()),x}function $x(){for(;Ze!==null;)Pm(Ze)}function Fx(e,t){var a=st;st|=2;var n=Gm(),u=Zm();yt!==e||Xe!==t?(hc=null,fc=Be()+500,wr(e,t)):vr=il(e,t);e:do try{if(ut!==0&&Ze!==null){t=Ze;var d=za;t:switch(ut){case 1:ut=0,za=null,Nr(e,t,d,1);break;case 2:case 9:if(nh(d)){ut=0,za=null,Qm(t);break}t=function(){ut!==2&&ut!==9||yt!==e||(ut=7),Cn(e)},d.then(t,t);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:nh(d)?(ut=0,za=null,Qm(t)):(ut=0,za=null,Nr(e,t,d,7));break;case 5:var x=null;switch(Ze.tag){case 26:x=Ze.memoizedState;case 5:case 27:var E=Ze;if(x?k0(x):E.stateNode.complete){ut=0,za=null;var R=E.sibling;if(R!==null)Ze=R;else{var X=E.return;X!==null?(Ze=X,yc(X)):Ze=null}break t}}ut=0,za=null,Nr(e,t,d,5);break;case 6:ut=0,za=null,Nr(e,t,d,6);break;case 8:Ad(),Ct=6;break e;default:throw Error(c(462))}}Gx();break}catch(re){$m(e,re)}while(!0);return Wa=Yn=null,$.H=n,$.A=u,st=a,Ze!==null?0:(yt=null,Xe=0,wl(),Ct)}function Gx(){for(;Ze!==null&&!_e();)Pm(Ze)}function Pm(e){var t=xm(e.alternate,e,Jn);e.memoizedProps=e.pendingProps,t===null?yc(e):Ze=t}function Qm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=dm(a,t,t.pendingProps,t.type,void 0,Xe);break;case 11:t=dm(a,t,t.pendingProps,t.type.render,t.ref,Xe);break;case 5:Qo(t);default:vm(a,t),t=Ze=Lu(t,Jn),t=xm(a,t,Jn)}e.memoizedProps=e.pendingProps,t===null?yc(e):Ze=t}function Nr(e,t,a,n){Wa=Yn=null,Qo(t),fr=null,di=0;var u=t.return;try{if(kx(e,u,t,a,Xe)){Ct=1,nc(e,Na(a,e.current)),Ze=null;return}}catch(d){if(u!==null)throw Ze=u,d;Ct=1,nc(e,Na(a,e.current)),Ze=null;return}t.flags&32768?(L||n===1?e=!0:vr||(Xe&536870912)!==0?e=!1:(Dl=e=!0,(n===2||n===9||n===3||n===6)&&(n=ka.current,n!==null&&n.tag===13&&(n.flags|=16384))),Wm(t,e)):yc(t)}function yc(e){var t=e;do{if((t.flags&32768)!==0){Wm(t,Dl);return}e=t.return;var a=Ux(t.alternate,t,Jn);if(a!==null){Ze=a;return}if(t=t.sibling,t!==null){Ze=t;return}Ze=t=e}while(t!==null);Ct===0&&(Ct=5)}function Wm(e,t){do{var a=Hx(e.alternate,e);if(a!==null){a.flags&=32767,Ze=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ze=e;return}Ze=e=a}while(e!==null);Ct=6,Ze=null}function Im(e,t,a,n,u,d,x,E,R){e.cancelPendingCommit=null;do xc();while(Gt!==0);if((st&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(d=t.lanes|t.childLanes,d|=ys,du(e,a,d,x,E,R),e===yt&&(Ze=yt=null,Xe=0),Sr=t,kl=e,Kn=a,Od=d,Dd=u,Lm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wx(wt,function(){return t0(),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,x=st,st|=4;try{qx(e,t,a)}finally{st=x,ie.p=u,$.T=n}}Gt=1,Xm(),Jm(),Km()}}function Xm(){if(Gt===1){Gt=0;var e=kl,t=Sr,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{Rm(t,e);var d=Gd,x=Do(e.containerInfo),E=d.focusedElem,R=d.selectionRange;if(x!==E&&E&&E.ownerDocument&&Ke(E.ownerDocument.documentElement,E)){if(R!==null&&Ks(E)){var X=R.start,re=R.end;if(re===void 0&&(re=X),"selectionStart"in E)E.selectionStart=X,E.selectionEnd=Math.min(re,E.value.length);else{var oe=E.ownerDocument||document,J=oe&&oe.defaultView||window;if(J.getSelection){var te=J.getSelection(),be=E.textContent.length,Ae=Math.min(R.start,be),ht=R.end===void 0?Ae:Math.min(R.end,be);!te.extend&&Ae>ht&&(x=ht,ht=Ae,Ae=x);var F=ku(E,Ae),q=ku(E,ht);if(F&&q&&(te.rangeCount!==1||te.anchorNode!==F.node||te.anchorOffset!==F.offset||te.focusNode!==q.node||te.focusOffset!==q.offset)){var I=oe.createRange();I.setStart(F.node,F.offset),te.removeAllRanges(),Ae>ht?(te.addRange(I),te.extend(q.node,q.offset)):(I.setEnd(q.node,q.offset),te.addRange(I))}}}}for(oe=[],te=E;te=te.parentNode;)te.nodeType===1&&oe.push({element:te,left:te.scrollLeft,top:te.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=!!Fd,Gd=Fd=null}finally{st=u,ie.p=n,$.T=a}}e.current=t,Gt=2}}function Jm(){if(Gt===2){Gt=0;var e=kl,t=Sr,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{Mm(e,t.alternate,t)}finally{st=u,ie.p=n,$.T=a}}Gt=3}}function Km(){if(Gt===4||Gt===3){Gt=0,Ge();var e=kl,t=Sr,a=Kn,n=Lm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Gt=5:(Gt=0,Sr=kl=null,e0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Al=null),ca(a),t=t.stateNode,ia&&typeof ia.onCommitFiberRoot=="function")try{ia.onCommitFiberRoot(gt,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,x=0;x<n.length;x++){var E=n[x];d(E.value,{componentStack:E.stack})}}finally{$.T=t,ie.p=u}}(Kn&3)!==0&&xc(),Cn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===Rd?Ci++:(Ci=0,Rd=e):Ci=0,Oi(0)}}function e0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ci(t)))}function xc(){return Xm(),Jm(),Km(),t0()}function t0(){if(Gt!==5)return!1;var e=kl,t=Od;Od=0;var a=ca(Kn),n=$.T,u=ie.p;try{ie.p=32>a?32:a,$.T=null,a=Dd,Dd=null;var d=kl,x=Kn;if(Gt=0,Sr=kl=null,Kn=0,(st&6)!==0)throw Error(c(331));var E=st;if(st|=4,Um(d.current),km(d,d.current,x,a),st=E,Oi(0,!1),ia&&typeof ia.onPostCommitFiberRoot=="function")try{ia.onPostCommitFiberRoot(gt,d)}catch{}return!0}finally{ie.p=u,$.T=n,e0(e,t)}}function a0(e,t,a){t=Na(a,t),t=cd(e.stateNode,t,2),e=Ml(e,t,2),e!==null&&(ul(e,2),Cn(e))}function ct(e,t,a){if(e.tag===3)a0(e,e,a);else for(;t!==null;){if(t.tag===3){a0(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=Na(a,e),a=nm(2),n=Ml(t,a,2),n!==null&&(lm(a,n,t,e),ul(n,2),Cn(n));break}}t=t.return}}function _d(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Vx;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)||(Md=!0,u.add(a),e=Zx.bind(null,e,t,a),t.then(e,e))}function Zx(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,yt===e&&(Xe&a)===a&&(Ct===4||Ct===3&&(Xe&62914560)===Xe&&300>Be()-dc?(st&2)===0&&wr(e,0):Td|=a,br===Xe&&(br=0)),Cn(e)}function n0(e,t){t===0&&(t=qr()),e=Ga(e,t),e!==null&&(ul(e,t),Cn(e))}function Px(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),n0(e,a)}function Qx(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(c(314))}n!==null&&n.delete(t),n0(e,a)}function Wx(e,t){return le(e,t)}var pc=null,jr=null,zd=!1,vc=!1,Ud=!1,zl=0;function Cn(e){e!==jr&&e.next===null&&(jr===null?pc=jr=e:jr=jr.next=e),vc=!0,zd||(zd=!0,Xx())}function Oi(e,t){if(!Ud&&vc){Ud=!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 x=n.suspendedLanes,E=n.pingedLanes;d=(1<<31-Xt(42|e)+1)-1,d&=u&~(x&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,i0(n,d))}else d=Xe,d=Pl(n,n===yt?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(d&3)===0||il(n,d)||(a=!0,i0(n,d));n=n.next}while(a);Ud=!1}}function Ix(){l0()}function l0(){vc=zd=!1;var e=0;zl!==0&&ip()&&(e=zl);for(var t=Be(),a=null,n=pc;n!==null;){var u=n.next,d=s0(n,t);d===0?(n.next=null,a===null?pc=u:a.next=u,u===null&&(jr=a)):(a=n,(e!==0||(d&3)!==0)&&(vc=!0)),n=u}Gt!==0&&Gt!==5||Oi(e),zl!==0&&(zl=0)}function s0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var x=31-Xt(d),E=1<<x,R=u[x];R===-1?((E&a)===0||(E&n)!==0)&&(u[x]=ou(E,t)):R<=t&&(e.expiredLanes|=E),d&=~E}if(t=yt,a=Xe,a=Pl(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(ut===2||ut===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&ye(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&&ye(n),ca(a)){case 2:case 8:a=Rt;break;case 32:a=wt;break;case 268435456:a=ya;break;default:a=wt}return n=r0.bind(null,e),a=le(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&ye(n),e.callbackPriority=2,e.callbackNode=null,2}function r0(e,t){if(Gt!==0&&Gt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(xc()&&e.callbackNode!==a)return null;var n=Xe;return n=Pl(e,e===yt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Vm(e,n,t),s0(e,Be()),e.callbackNode!=null&&e.callbackNode===a?r0.bind(null,e):null)}function i0(e,t){if(xc())return null;Vm(e,t,!0)}function Xx(){cp(function(){(st&6)!==0?le(Dt,Ix):l0()})}function Hd(){if(zl===0){var e=cr;e===0&&(e=rl,rl<<=1,(rl&261888)===0&&(rl=256)),zl=e}return zl}function u0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ts(""+e)}function c0(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 Jx(e,t,a,n,u){if(t==="submit"&&a&&a.stateNode===u){var d=u0((u[$t]||null).action),x=n.submitter;x&&(t=(t=x[$t]||null)?u0(t.formAction):x.getAttribute("formAction"),t!==null&&(d=t,x=null));var E=new ss("action","action",null,n,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(zl!==0){var R=x?c0(u,x):new FormData(u);nd(a,{pending:!0,data:R,method:u.method,action:d},null,R)}}else typeof d=="function"&&(E.preventDefault(),R=x?c0(u,x):new FormData(u),nd(a,{pending:!0,data:R,method:u.method,action:d},d,R))},currentTarget:u}]})}}for(var qd=0;qd<si.length;qd++){var Ld=si[qd],Kx=Ld.toLowerCase(),ep=Ld[0].toUpperCase()+Ld.slice(1);wa(Kx,"on"+ep)}wa(Uu,"onAnimationEnd"),wa(Hu,"onAnimationIteration"),wa(ar,"onAnimationStart"),wa("dblclick","onDoubleClick"),wa("focusin","onFocus"),wa("focusout","onBlur"),wa(Ro,"onTransitionRun"),wa(Ao,"onTransitionStart"),wa(qu,"onTransitionCancel"),wa(ni,"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 Di="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(" "),tp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Di));function o0(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 x=n.length-1;0<=x;x--){var E=n[x],R=E.instance,X=E.currentTarget;if(E=E.listener,R!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=X;try{d(u)}catch(re){Sl(re)}u.currentTarget=null,d=R}else for(x=0;x<n.length;x++){if(E=n[x],R=E.instance,X=E.currentTarget,E=E.listener,R!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=X;try{d(u)}catch(re){Sl(re)}u.currentTarget=null,d=R}}}}function Pe(e,t){var a=t[Ql];a===void 0&&(a=t[Ql]=new Set);var n=e+"__bubble";a.has(n)||(d0(t,e,2,!1),a.add(n))}function Bd(e,t,a){var n=0;t&&(n|=4),d0(a,e,n,t)}var bc="_reactListening"+Math.random().toString(36).slice(2);function Vd(e){if(!e[bc]){e[bc]=!0,gu.forEach(function(a){a!=="selectionchange"&&(tp.has(a)||Bd(a,!1,e),Bd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bc]||(t[bc]=!0,Bd("selectionchange",!1,t))}}function d0(e,t,a,n){switch(B0(t)){case 2:var u=Op;break;case 8:u=Dp;break;default:u=af}a=u.bind(null,t,a,e),u=void 0,!Qr||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 Yd(e,t,a,n,u){var d=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var x=n.tag;if(x===3||x===4){var E=n.stateNode.containerInfo;if(E===u)break;if(x===4)for(x=n.return;x!==null;){var R=x.tag;if((R===3||R===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;E!==null;){if(x=kn(E),x===null)return;if(R=x.tag,R===5||R===6||R===26||R===27){n=d=x;continue e}E=E.parentNode}}n=n.return}Pr(function(){var X=d,re=Ps(a),oe=[];e:{var J=li.get(e);if(J!==void 0){var te=ss,be=e;switch(e){case"keypress":if(ls(a)===0)break e;case"keydown":case"keyup":te=yo;break;case"focusin":be="focus",te=Js;break;case"focusout":be="blur",te=Js;break;case"beforeblur":case"afterblur":te=Js;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":te=Su;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=ro;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=vo;break;case Uu:case Hu:case ar:te=hl;break;case ni:te=bo;break;case"scroll":case"scrollend":te=Wr;break;case"wheel":te=wo;break;case"copy":case"cut":case"paste":te=ml;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=wu;break;case"toggle":case"beforetoggle":te=jo}var Ae=(t&4)!==0,ht=!Ae&&(e==="scroll"||e==="scrollend"),F=Ae?J!==null?J+"Capture":null:J;Ae=[];for(var q=X,I;q!==null;){var ue=q;if(I=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||I===null||F===null||(ue=as(q,F),ue!=null&&Ae.push(Ri(q,ue,I))),ht)break;q=q.return}0<Ae.length&&(J=new te(J,be,null,a,re),oe.push({event:J,listeners:Ae}))}}if((t&7)===0){e:{if(J=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",J&&a!==Gr&&(be=a.relatedTarget||a.fromElement)&&(kn(be)||be[An]))break e;if((te||J)&&(J=re.window===re?re:(J=re.ownerDocument)?J.defaultView||J.parentWindow:window,te?(be=a.relatedTarget||a.toElement,te=X,be=be?kn(be):null,be!==null&&(ht=f(be),Ae=be.tag,be!==ht||Ae!==5&&Ae!==27&&Ae!==6)&&(be=null)):(te=null,be=X),te!==be)){if(Ae=Su,ue="onMouseLeave",F="onMouseEnter",q="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=wu,ue="onPointerLeave",F="onPointerEnter",q="pointer"),ht=te==null?J:ba(te),I=be==null?J:ba(be),J=new Ae(ue,q+"leave",te,a,re),J.target=ht,J.relatedTarget=I,ue=null,kn(re)===X&&(Ae=new Ae(F,q+"enter",be,a,re),Ae.target=I,Ae.relatedTarget=ht,ue=Ae),ht=ue,te&&be)t:{for(Ae=ap,F=te,q=be,I=0,ue=F;ue;ue=Ae(ue))I++;ue=0;for(var Te=q;Te;Te=Ae(Te))ue++;for(;0<I-ue;)F=Ae(F),I--;for(;0<ue-I;)q=Ae(q),ue--;for(;I--;){if(F===q||q!==null&&F===q.alternate){Ae=F;break t}F=Ae(F),q=Ae(q)}Ae=null}else Ae=null;te!==null&&f0(oe,J,te,Ae,!1),be!==null&&ht!==null&&f0(oe,ht,be,Ae,!0)}}e:{if(J=X?ba(X):window,te=J.nodeName&&J.nodeName.toLowerCase(),te==="select"||te==="input"&&J.type==="file")var at=Ru;else if(Du(J))if(jn)at=vt;else{at=pl;var we=We}else te=J.nodeName,!te||te.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?X&&Zs(X.elementType)&&(at=Ru):at=Oo;if(at&&(at=at(e,X))){Xr(oe,at,a,re);break e}we&&we(e,J,X),e==="focusout"&&X&&J.type==="number"&&X.memoizedProps.value!=null&&Xl(J,"number",J.value)}switch(we=X?ba(X):window,e){case"focusin":(Du(we)||we.contentEditable==="true")&&(vl=we,er=X,ea=null);break;case"focusout":ea=er=vl=null;break;case"mousedown":tr=!0;break;case"contextmenu":case"mouseup":case"dragend":tr=!1,gs(oe,a,re);break;case"selectionchange":if(_u)break;case"keydown":case"keyup":gs(oe,a,re)}var $e;if(Ir)e:{switch(e){case"compositionstart":var Je="onCompositionStart";break e;case"compositionend":Je="onCompositionEnd";break e;case"compositionupdate":Je="onCompositionUpdate";break e}Je=void 0}else yl?Cu(e,a)&&(Je="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Je="onCompositionStart");Je&&(Eu&&a.locale!=="ko"&&(yl||Je!=="onCompositionStart"?Je==="onCompositionEnd"&&yl&&($e=Ft()):(wn=re,Qs="value"in wn?wn.value:wn.textContent,yl=!0)),we=Sc(X,Je),0<we.length&&(Je=new gl(Je,e,null,a,re),oe.push({event:Je,listeners:we}),$e?Je.data=$e:($e=Ou(a),$e!==null&&(Je.data=$e)))),($e=Eo?Mo(e,a):To(e,a))&&(Je=Sc(X,"onBeforeInput"),0<Je.length&&(we=new gl("onBeforeInput","beforeinput",null,a,re),oe.push({event:we,listeners:Je}),we.data=$e)),Jx(oe,e,X,a,re)}o0(oe,t)})}function Ri(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=as(e,a),u!=null&&n.unshift(Ri(e,u,d)),u=as(e,t),u!=null&&n.push(Ri(e,u,d))),e.tag===3)return n;e=e.return}return[]}function ap(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function f0(e,t,a,n,u){for(var d=t._reactName,x=[];a!==null&&a!==n;){var E=a,R=E.alternate,X=E.stateNode;if(E=E.tag,R!==null&&R===n)break;E!==5&&E!==26&&E!==27||X===null||(R=X,u?(X=as(a,d),X!=null&&x.unshift(Ri(a,X,R))):u||(X=as(a,d),X!=null&&x.push(Ri(a,X,R)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var np=/\r\n?/g,lp=/\u0000|\uFFFD/g;function h0(e){return(typeof e=="string"?e:""+e).replace(np,`
|
|
49
|
-
`).replace(lp,"")}function m0(e,t){return t=h0(t),h0(e)===t}function ft(e,t,a,n,u,d){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||sn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&sn(e,""+n);break;case"className":$s(e,"class",n);break;case"tabIndex":$s(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":$s(e,a,n);break;case"style":pu(e,n,d);break;case"data":if(t!=="object"){$s(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=ts(""+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"&&ft(e,t,"name",u.name,u,null),ft(e,t,"formEncType",u.formEncType,u,null),ft(e,t,"formMethod",u.formMethod,u,null),ft(e,t,"formTarget",u.formTarget,u,null)):(ft(e,t,"encType",u.encType,u,null),ft(e,t,"method",u.method,u,null),ft(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ts(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Ya);break;case"onScroll":n!=null&&Pe("scroll",e);break;case"onScrollEnd":n!=null&&Pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(c(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=ts(""+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":Pe("beforetoggle",e),Pe("toggle",e),Jt(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":Jt(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=lo.get(a)||a,Jt(e,a,n))}}function $d(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(c(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"children":typeof n=="string"?sn(e,n):(typeof n=="number"||typeof n=="bigint")&&sn(e,""+n);break;case"onScroll":n!=null&&Pe("scroll",e);break;case"onScrollEnd":n!=null&&Pe("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vr.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[$t]||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,""):Jt(e,a,n)}}}function la(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pe("error",e),Pe("load",e);var n=!1,u=!1,d;for(d in a)if(a.hasOwnProperty(d)){var x=a[d];if(x!=null)switch(d){case"src":n=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:ft(e,t,d,x,a,null)}}u&&ft(e,t,"srcSet",a.srcSet,a,null),n&&ft(e,t,"src",a.src,a,null);return;case"input":Pe("invalid",e);var E=d=x=u=null,R=null,X=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":x=re;break;case"checked":R=re;break;case"defaultChecked":X=re;break;case"value":d=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(c(137,t));break;default:ft(e,t,n,re,a,null)}}dl(e,d,E,R,X,x,u,!1);return;case"select":Pe("invalid",e),n=x=d=null;for(u in a)if(a.hasOwnProperty(u)&&(E=a[u],E!=null))switch(u){case"value":d=E;break;case"defaultValue":x=E;break;case"multiple":n=E;default:ft(e,t,u,E,a,null)}t=d,a=x,e.multiple=!!n,t!=null?zn(e,!!n,t,!1):a!=null&&zn(e,!!n,a,!0);return;case"textarea":Pe("invalid",e),d=u=n=null;for(x in a)if(a.hasOwnProperty(x)&&(E=a[x],E!=null))switch(x){case"value":n=E;break;case"defaultValue":u=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(c(91));break;default:ft(e,t,x,E,a,null)}Fr(e,n,u,d);return;case"option":for(R in a)if(a.hasOwnProperty(R)&&(n=a[R],n!=null))switch(R){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:ft(e,t,R,n,a,null)}return;case"dialog":Pe("beforetoggle",e),Pe("toggle",e),Pe("cancel",e),Pe("close",e);break;case"iframe":case"object":Pe("load",e);break;case"video":case"audio":for(n=0;n<Di.length;n++)Pe(Di[n],e);break;case"image":Pe("error",e),Pe("load",e);break;case"details":Pe("toggle",e);break;case"embed":case"source":case"link":Pe("error",e),Pe("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(X in a)if(a.hasOwnProperty(X)&&(n=a[X],n!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:ft(e,t,X,n,a,null)}return;default:if(Zs(t)){for(re in a)a.hasOwnProperty(re)&&(n=a[re],n!==void 0&&$d(e,t,re,n,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(n=a[E],n!=null&&ft(e,t,E,n,a,null))}function sp(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,x=null,E=null,R=null,X=null,re=null;for(te in a){var oe=a[te];if(a.hasOwnProperty(te)&&oe!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":R=oe;default:n.hasOwnProperty(te)||ft(e,t,te,null,n,oe)}}for(var J in n){var te=n[J];if(oe=a[J],n.hasOwnProperty(J)&&(te!=null||oe!=null))switch(J){case"type":d=te;break;case"name":u=te;break;case"checked":X=te;break;case"defaultChecked":re=te;break;case"value":x=te;break;case"defaultValue":E=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(c(137,t));break;default:te!==oe&&ft(e,t,J,te,n,oe)}}Gs(e,x,E,R,X,re,d,u);return;case"select":te=x=E=J=null;for(d in a)if(R=a[d],a.hasOwnProperty(d)&&R!=null)switch(d){case"value":break;case"multiple":te=R;default:n.hasOwnProperty(d)||ft(e,t,d,null,n,R)}for(u in n)if(d=n[u],R=a[u],n.hasOwnProperty(u)&&(d!=null||R!=null))switch(u){case"value":J=d;break;case"defaultValue":E=d;break;case"multiple":x=d;default:d!==R&&ft(e,t,u,d,n,R)}t=E,a=x,n=te,J!=null?zn(e,!!a,J,!1):!!n!=!!a&&(t!=null?zn(e,!!a,t,!0):zn(e,!!a,a?[]:"",!1));return;case"textarea":te=J=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:ft(e,t,E,null,n,u)}for(x in n)if(u=n[x],d=a[x],n.hasOwnProperty(x)&&(u!=null||d!=null))switch(x){case"value":J=u;break;case"defaultValue":te=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==d&&ft(e,t,x,u,n,d)}Jl(e,J,te);return;case"option":for(var be in a)if(J=a[be],a.hasOwnProperty(be)&&J!=null&&!n.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:ft(e,t,be,null,n,J)}for(R in n)if(J=n[R],te=a[R],n.hasOwnProperty(R)&&J!==te&&(J!=null||te!=null))switch(R){case"selected":e.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:ft(e,t,R,J,n,te)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in a)J=a[Ae],a.hasOwnProperty(Ae)&&J!=null&&!n.hasOwnProperty(Ae)&&ft(e,t,Ae,null,n,J);for(X in n)if(J=n[X],te=a[X],n.hasOwnProperty(X)&&J!==te&&(J!=null||te!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(c(137,t));break;default:ft(e,t,X,J,n,te)}return;default:if(Zs(t)){for(var ht in a)J=a[ht],a.hasOwnProperty(ht)&&J!==void 0&&!n.hasOwnProperty(ht)&&$d(e,t,ht,void 0,n,J);for(re in n)J=n[re],te=a[re],!n.hasOwnProperty(re)||J===te||J===void 0&&te===void 0||$d(e,t,re,J,n,te);return}}for(var F in a)J=a[F],a.hasOwnProperty(F)&&J!=null&&!n.hasOwnProperty(F)&&ft(e,t,F,null,n,J);for(oe in n)J=n[oe],te=a[oe],!n.hasOwnProperty(oe)||J===te||J==null&&te==null||ft(e,t,oe,J,n,te)}function g0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rp(){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,x=u.initiatorType,E=u.duration;if(d&&E&&g0(x)){for(x=0,E=u.responseEnd,n+=1;n<a.length;n++){var R=a[n],X=R.startTime;if(X>E)break;var re=R.transferSize,oe=R.initiatorType;re&&g0(oe)&&(R=R.responseEnd,x+=re*(R<E?1:(E-X)/(R-X)))}if(--n,t+=8*(d+x)/(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 Fd=null,Gd=null;function wc(e){return e.nodeType===9?e:e.ownerDocument}function y0(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 x0(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 Zd(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 Pd=null;function ip(){var e=window.event;return e&&e.type==="popstate"?e===Pd?!1:(Pd=e,!0):(Pd=null,!1)}var p0=typeof setTimeout=="function"?setTimeout:void 0,up=typeof clearTimeout=="function"?clearTimeout:void 0,v0=typeof Promise=="function"?Promise:void 0,cp=typeof queueMicrotask=="function"?queueMicrotask:typeof v0<"u"?function(e){return v0.resolve(null).then(e).catch(op)}:p0;function op(e){setTimeout(function(){throw e})}function Ul(e){return e==="head"}function b0(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),Cr(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Ai(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ai(a);for(var d=a.firstChild;d;){var x=d.nextSibling,E=d.nodeName;d[Wl]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=x}}else a==="body"&&Ai(e.ownerDocument.body);a=u}while(a);Cr(t)}function S0(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),Ys(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function dp(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[Wl])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=Ja(e.nextSibling),e===null)break}return null}function fp(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ja(e.nextSibling),e===null))return null;return e}function w0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ja(e.nextSibling),e===null))return null;return e}function Wd(e){return e.data==="$?"||e.data==="$~"}function Id(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function hp(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 Ja(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 Xd=null;function N0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ja(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function j0(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 E0(e,t,a){switch(t=wc(a),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Ai(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ys(e)}var Ka=new Map,M0=new Set;function Nc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var el=ie.d;ie.d={f:mp,r:gp,D:yp,C:xp,L:pp,m:vp,X:Sp,S:bp,M:wp};function mp(){var e=el.f(),t=mc();return e||t}function gp(e){var t=Oe(e);t!==null&&t.tag===5&&t.type==="form"?$h(t):el.r(e)}var Er=typeof document>"u"?null:document;function T0(e,t,a){var n=Er;if(n&&typeof t=="string"&&t){var u=Kt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),M0.has(u)||(M0.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),la(t,"link",e),qt(t),n.head.appendChild(t)))}}function yp(e){el.D(e),T0("dns-prefetch",e,null)}function xp(e,t){el.C(e,t),T0("preconnect",e,t)}function pp(e,t,a){el.L(e,t,a);var n=Er;if(n&&e&&t){var u='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Kt(a.imageSizes)+'"]')):u+='[href="'+Kt(e)+'"]';var d=u;switch(t){case"style":d=Mr(e);break;case"script":d=Tr(e)}Ka.has(d)||(e=j({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ka.set(d,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(ki(d))||t==="script"&&n.querySelector(_i(d))||(t=n.createElement("link"),la(t,"link",e),qt(t),n.head.appendChild(t)))}}function vp(e,t){el.m(e,t);var a=Er;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Kt(n)+'"][href="'+Kt(e)+'"]',d=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Tr(e)}if(!Ka.has(d)&&(e=j({rel:"modulepreload",href:e},t),Ka.set(d,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(_i(d)))return}n=a.createElement("link"),la(n,"link",e),qt(n),a.head.appendChild(n)}}}function bp(e,t,a){el.S(e,t,a);var n=Er;if(n&&e){var u=nn(n).hoistableStyles,d=Mr(e);t=t||"default";var x=u.get(d);if(!x){var E={loading:0,preload:null};if(x=n.querySelector(ki(d)))E.loading=5;else{e=j({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ka.get(d))&&Jd(e,a);var R=x=n.createElement("link");qt(R),la(R,"link",e),R._p=new Promise(function(X,re){R.onload=X,R.onerror=re}),R.addEventListener("load",function(){E.loading|=1}),R.addEventListener("error",function(){E.loading|=2}),E.loading|=4,jc(x,t,n)}x={type:"stylesheet",instance:x,count:1,state:E},u.set(d,x)}}}function Sp(e,t){el.X(e,t);var a=Er;if(a&&e){var n=nn(a).hoistableScripts,u=Tr(e),d=n.get(u);d||(d=a.querySelector(_i(u)),d||(e=j({src:e,async:!0},t),(t=Ka.get(u))&&Kd(e,t),d=a.createElement("script"),qt(d),la(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function wp(e,t){el.M(e,t);var a=Er;if(a&&e){var n=nn(a).hoistableScripts,u=Tr(e),d=n.get(u);d||(d=a.querySelector(_i(u)),d||(e=j({src:e,async:!0,type:"module"},t),(t=Ka.get(u))&&Kd(e,t),d=a.createElement("script"),qt(d),la(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function C0(e,t,a,n){var u=(u=Me.current)?Nc(u):null;if(!u)throw Error(c(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=nn(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=nn(u).hoistableStyles,x=d.get(e);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,x),(d=u.querySelector(ki(e)))&&!d._p&&(x.instance=d,x.state.loading=5),Ka.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},Ka.set(e,a),d||Np(u,e,a,x.state))),t&&n===null)throw Error(c(528,""));return x}if(t&&n!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Tr(a),a=nn(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(c(444,e))}}function Mr(e){return'href="'+Kt(e)+'"'}function ki(e){return'link[rel="stylesheet"]['+e+"]"}function O0(e){return j({},e,{"data-precedence":e.precedence,precedence:null})}function Np(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}),la(t,"link",a),qt(t),e.head.appendChild(t))}function Tr(e){return'[src="'+Kt(e)+'"]'}function _i(e){return"script[async]"+e}function D0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Kt(a.href)+'"]');if(n)return t.instance=n,qt(n),n;var u=j({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),qt(n),la(n,"style",u),jc(n,a.precedence,e),t.instance=n;case"stylesheet":u=Mr(a.href);var d=e.querySelector(ki(u));if(d)return t.state.loading|=4,t.instance=d,qt(d),d;n=O0(a),(u=Ka.get(u))&&Jd(n,u),d=(e.ownerDocument||e).createElement("link"),qt(d);var x=d;return x._p=new Promise(function(E,R){x.onload=E,x.onerror=R}),la(d,"link",n),t.state.loading|=4,jc(d,a.precedence,e),t.instance=d;case"script":return d=Tr(a.src),(u=e.querySelector(_i(d)))?(t.instance=u,qt(u),u):(n=a,(u=Ka.get(d))&&(n=j({},a),Kd(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),qt(u),la(u,"link",n),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(c(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,x=0;x<n.length;x++){var E=n[x];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 Jd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Kd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ec=null;function R0(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[Wl]||d[At]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var x=d.getAttribute(t)||"";x=e+x;var E=n.get(x);E?E.push(d):n.set(x,[d])}}return n}function A0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function jp(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 k0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ep(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(ki(u));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Mc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,qt(d);return}d=t.ownerDocument||t,n=O0(n),(u=Ka.get(u))&&Jd(n,u),d=d.createElement("link"),qt(d);var x=d;x._p=new Promise(function(E,R){x.onload=E,x.onerror=R}),la(d,"link",n),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Mc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var ef=0;function Mp(e,t){return e.stylesheets&&e.count===0&&Cc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&ef===0&&(ef=62500*rp());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>ef?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function Mc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Tc=null;function Cc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Tc=new Map,t.forEach(Tp,e),Tc=null,Mc.call(e))}function Tp(e,t){if(!(t.state.loading&4)){var a=Tc.get(e);if(a)var n=a.get(null);else{a=new Map,Tc.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var x=u[d];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),n=x)}n&&a.set(null,n)}u=t.instance,x=u.getAttribute("data-precedence"),d=a.get(x)||n,d===n&&a.set(null,u),a.set(x,u),this.count++,n=Mc.bind(this),u.addEventListener("load",n),u.addEventListener("error",n),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var zi={$$typeof:G,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function Cp(e,t,a,n,u,d,x,E,R){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ls(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ls(0),this.hiddenUpdates=Ls(null),this.identifierPrefix=n,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function _0(e,t,a,n,u,d,x,E,R,X,re,oe){return e=new Cp(e,t,a,x,R,X,re,oe,E),t=1,d===!0&&(t|=24),d=ta(3,null,null,t),e.current=d,d.stateNode=e,t=ko(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:n,isDehydrated:a,cache:t},Ho(d),e}function z0(e){return e?(e=Aa,e):Aa}function U0(e,t,a,n,u,d){u=z0(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=Ml(e,n,t),a!==null&&(Oa(a,e,t),hi(a,e,t))}function H0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function tf(e,t){H0(e,t),(e=e.alternate)&&H0(e,t)}function q0(e){if(e.tag===13||e.tag===31){var t=Ga(e,67108864);t!==null&&Oa(t,e,67108864),tf(e,67108864)}}function L0(e){if(e.tag===13||e.tag===31){var t=Ha();t=Bs(t);var a=Ga(e,t);a!==null&&Oa(a,e,t),tf(e,t)}}var Oc=!0;function Op(e,t,a,n){var u=$.T;$.T=null;var d=ie.p;try{ie.p=2,af(e,t,a,n)}finally{ie.p=d,$.T=u}}function Dp(e,t,a,n){var u=$.T;$.T=null;var d=ie.p;try{ie.p=8,af(e,t,a,n)}finally{ie.p=d,$.T=u}}function af(e,t,a,n){if(Oc){var u=nf(n);if(u===null)Yd(e,t,n,Dc,a),V0(e,n);else if(Ap(u,e,t,a,n))n.stopPropagation();else if(V0(e,n),t&4&&-1<Rp.indexOf(e)){for(;u!==null;){var d=Oe(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var x=vn(d.pendingLanes);if(x!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var R=1<<31-Xt(x);E.entanglements[1]|=R,x&=~R}Cn(d),(st&6)===0&&(fc=Be()+500,Oi(0))}}break;case 31:case 13:E=Ga(d,2),E!==null&&Oa(E,d,2),mc(),tf(d,2)}if(d=nf(n),d===null&&Yd(e,t,n,Dc,a),d===u)break;u=d}u!==null&&n.stopPropagation()}else Yd(e,t,n,null,a)}}function nf(e){return e=Ps(e),lf(e)}var Dc=null;function lf(e){if(Dc=null,e=kn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=v(t),e!==null)return e;e=null}else if(a===31){if(e=S(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 B0(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(mt()){case Dt:return 2;case Rt:return 8;case wt:case tn:return 32;case ya:return 268435456;default:return 32}default:return 32}}var sf=!1,Hl=null,ql=null,Ll=null,Ui=new Map,Hi=new Map,Bl=[],Rp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function V0(e,t){switch(e){case"focusin":case"focusout":Hl=null;break;case"dragenter":case"dragleave":ql=null;break;case"mouseover":case"mouseout":Ll=null;break;case"pointerover":case"pointerout":Ui.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hi.delete(t.pointerId)}}function qi(e,t,a,n,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:d,targetContainers:[u]},t!==null&&(t=Oe(t),t!==null&&q0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Ap(e,t,a,n,u){switch(t){case"focusin":return Hl=qi(Hl,e,t,a,n,u),!0;case"dragenter":return ql=qi(ql,e,t,a,n,u),!0;case"mouseover":return Ll=qi(Ll,e,t,a,n,u),!0;case"pointerover":var d=u.pointerId;return Ui.set(d,qi(Ui.get(d)||null,e,t,a,n,u)),!0;case"gotpointercapture":return d=u.pointerId,Hi.set(d,qi(Hi.get(d)||null,e,t,a,n,u)),!0}return!1}function Y0(e){var t=kn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=v(a),t!==null){e.blockedOn=t,Br(e.priority,function(){L0(a)});return}}else if(t===31){if(t=S(a),t!==null){e.blockedOn=t,Br(e.priority,function(){L0(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=nf(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Gr=n,a.target.dispatchEvent(n),Gr=null}else return t=Oe(a),t!==null&&q0(t),e.blockedOn=a,!1;t.shift()}return!0}function $0(e,t,a){Rc(e)&&a.delete(t)}function kp(){sf=!1,Hl!==null&&Rc(Hl)&&(Hl=null),ql!==null&&Rc(ql)&&(ql=null),Ll!==null&&Rc(Ll)&&(Ll=null),Ui.forEach($0),Hi.forEach($0)}function Ac(e,t){e.blockedOn===t&&(e.blockedOn=null,sf||(sf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,kp)))}var kc=null;function F0(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(lf(n||a)===null)continue;break}var d=Oe(a);d!==null&&(e.splice(t,3),t-=3,nd(d,{pending:!0,data:u,method:a.method,action:n},n,u))}}))}function Cr(e){function t(R){return Ac(R,e)}Hl!==null&&Ac(Hl,e),ql!==null&&Ac(ql,e),Ll!==null&&Ac(Ll,e),Ui.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);)Y0(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],x=u[$t]||null;if(typeof d=="function")x||F0(a);else if(x){var E=null;if(d&&d.hasAttribute("formAction")){if(u=d,x=d[$t]||null)E=x.formAction;else if(lf(u)!==null)continue}else E=x.action;typeof E=="function"?a[n+1]=E:(a.splice(n,3),n-=3),F0(a)}}}function G0(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(x){return u=x})},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 rf(e){this._internalRoot=e}_c.prototype.render=rf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=Ha();U0(a,n,e,t,null,null)},_c.prototype.unmount=rf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;U0(e.current,2,null,e,null,null),mc(),t[An]=null}};function _c(e){this._internalRoot=e}_c.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vs();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&&Y0(e)}};var Z0=i.version;if(Z0!=="19.2.4")throw Error(c(527,Z0,"19.2.4"));ie.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=y(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var _p={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{gt=zc.inject(_p),ia=zc}catch{}}return Bi.createRoot=function(e,t){if(!m(e))throw Error(c(299));var a=!1,n="",u=Kh,d=em,x=tm;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&&(x=t.onRecoverableError)),t=_0(e,1,!1,null,null,a,n,null,u,d,x,G0),e[An]=t.current,Vd(e),new rf(t)},Bi.hydrateRoot=function(e,t,a){if(!m(e))throw Error(c(299));var n=!1,u="",d=Kh,x=em,E=tm,R=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&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),t=_0(e,1,!0,t,a??null,n,u,R,d,x,E,G0),t.context=z0(null),a=t.current,n=Ha(),n=Bs(n),u=El(n),u.callback=null,Ml(a,u,n),a=n,t.current.lanes=a,ul(t,a),Cn(t),e[An]=t.current,Vd(e),new _c(t)},Bi.version="19.2.4",Bi}var lg;function Zp(){if(lg)return df.exports;lg=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(i){console.error(i)}}return l(),df.exports=Gp(),df.exports}var Pp=Zp();const Qp=kf(Pp);/**
|
|
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 sg="popstate";function Wp(l={}){function i(m,f){let{pathname:v="/",search:S="",hash:b=""}=zs(m.location.hash.substring(1));return!v.startsWith("/")&&!v.startsWith(".")&&(v="/"+v),Ef("",{pathname:v,search:S,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function o(m,f){let v=m.document.querySelector("base"),S="";if(v&&v.getAttribute("href")){let b=m.location.href,y=b.indexOf("#");S=y===-1?b:b.slice(0,y)}return S+"#"+(typeof f=="string"?f:au(f))}function c(m,f){en(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return Xp(i,o,c,l)}function jt(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function en(l,i){if(!l){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function Ip(){return Math.random().toString(36).substring(2,10)}function rg(l,i){return{usr:l.state,key:l.key,idx:i}}function Ef(l,i,o=null,c){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof i=="string"?zs(i):i,state:o,key:i&&i.key||c||Ip()}}function au({pathname:l="/",search:i="",hash:o=""}){return i&&i!=="?"&&(l+=i.charAt(0)==="?"?i:"?"+i),o&&o!=="#"&&(l+=o.charAt(0)==="#"?o:"#"+o),l}function zs(l){let i={};if(l){let o=l.indexOf("#");o>=0&&(i.hash=l.substring(o),l=l.substring(0,o));let c=l.indexOf("?");c>=0&&(i.search=l.substring(c),l=l.substring(0,c)),l&&(i.pathname=l)}return i}function Xp(l,i,o,c={}){let{window:m=document.defaultView,v5Compat:f=!1}=c,v=m.history,S="POP",b=null,y=w();y==null&&(y=0,v.replaceState({...v.state,idx:y},""));function w(){return(v.state||{idx:null}).idx}function j(){S="POP";let V=w(),ne=V==null?null:V-y;y=V,b&&b({action:S,location:T.location,delta:ne})}function M(V,ne){S="PUSH";let Y=Ef(T.location,V,ne);o&&o(Y,V),y=w()+1;let G=rg(Y,y),K=T.createHref(Y);try{v.pushState(G,"",K)}catch(de){if(de instanceof DOMException&&de.name==="DataCloneError")throw de;m.location.assign(K)}f&&b&&b({action:S,location:T.location,delta:1})}function O(V,ne){S="REPLACE";let Y=Ef(T.location,V,ne);o&&o(Y,V),y=w();let G=rg(Y,y),K=T.createHref(Y);v.replaceState(G,"",K),f&&b&&b({action:S,location:T.location,delta:0})}function A(V){return Jp(V)}let T={get action(){return S},get location(){return l(m,v)},listen(V){if(b)throw new Error("A history only accepts one active listener");return m.addEventListener(sg,j),b=V,()=>{m.removeEventListener(sg,j),b=null}},createHref(V){return i(m,V)},createURL:A,encodeLocation(V){let ne=A(V);return{pathname:ne.pathname,search:ne.search,hash:ne.hash}},push:M,replace:O,go(V){return v.go(V)}};return T}function Jp(l,i=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),jt(o,"No window.location.(origin|href) available to create URL");let c=typeof l=="string"?l:au(l);return c=c.replace(/ $/,"%20"),!i&&c.startsWith("//")&&(c=o+c),new URL(c,o)}function ay(l,i,o="/"){return Kp(l,i,o,!1)}function Kp(l,i,o,c){let m=typeof i=="string"?zs(i):i,f=ll(m.pathname||"/",o);if(f==null)return null;let v=ny(l);ev(v);let S=null;for(let b=0;S==null&&b<v.length;++b){let y=dv(f);S=cv(v[b],y,c)}return S}function ny(l,i=[],o=[],c="",m=!1){let f=(v,S,b=m,y)=>{let w={relativePath:y===void 0?v.path||"":y,caseSensitive:v.caseSensitive===!0,childrenIndex:S,route:v};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(c)&&b)return;jt(w.relativePath.startsWith(c),`Absolute route path "${w.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(c.length)}let j=nl([c,w.relativePath]),M=o.concat(w);v.children&&v.children.length>0&&(jt(v.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${j}".`),ny(v.children,i,M,j,b)),!(v.path==null&&!v.index)&&i.push({path:j,score:iv(j,v.index),routesMeta:M})};return l.forEach((v,S)=>{var b;if(v.path===""||!((b=v.path)!=null&&b.includes("?")))f(v,S);else for(let y of ly(v.path))f(v,S,!0,y)}),i}function ly(l){let i=l.split("/");if(i.length===0)return[];let[o,...c]=i,m=o.endsWith("?"),f=o.replace(/\?$/,"");if(c.length===0)return m?[f,""]:[f];let v=ly(c.join("/")),S=[];return S.push(...v.map(b=>b===""?f:[f,b].join("/"))),m&&S.push(...v),S.map(b=>l.startsWith("/")&&b===""?"/":b)}function ev(l){l.sort((i,o)=>i.score!==o.score?o.score-i.score:uv(i.routesMeta.map(c=>c.childrenIndex),o.routesMeta.map(c=>c.childrenIndex)))}var tv=/^:[\w-]+$/,av=3,nv=2,lv=1,sv=10,rv=-2,ig=l=>l==="*";function iv(l,i){let o=l.split("/"),c=o.length;return o.some(ig)&&(c+=rv),i&&(c+=nv),o.filter(m=>!ig(m)).reduce((m,f)=>m+(tv.test(f)?av:f===""?lv:sv),c)}function uv(l,i){return l.length===i.length&&l.slice(0,-1).every((c,m)=>c===i[m])?l[l.length-1]-i[i.length-1]:0}function cv(l,i,o=!1){let{routesMeta:c}=l,m={},f="/",v=[];for(let S=0;S<c.length;++S){let b=c[S],y=S===c.length-1,w=f==="/"?i:i.slice(f.length)||"/",j=Gc({path:b.relativePath,caseSensitive:b.caseSensitive,end:y},w),M=b.route;if(!j&&y&&o&&!c[c.length-1].route.index&&(j=Gc({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},w)),!j)return null;Object.assign(m,j.params),v.push({params:m,pathname:nl([f,j.pathname]),pathnameBase:gv(nl([f,j.pathnameBase])),route:M}),j.pathnameBase!=="/"&&(f=nl([f,j.pathnameBase]))}return v}function Gc(l,i){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[o,c]=ov(l.path,l.caseSensitive,l.end),m=i.match(o);if(!m)return null;let f=m[0],v=f.replace(/(.)\/+$/,"$1"),S=m.slice(1);return{params:c.reduce((y,{paramName:w,isOptional:j},M)=>{if(w==="*"){let A=S[M]||"";v=f.slice(0,f.length-A.length).replace(/(.)\/+$/,"$1")}const O=S[M];return j&&!O?y[w]=void 0:y[w]=(O||"").replace(/%2F/g,"/"),y},{}),pathname:f,pathnameBase:v,pattern:l}}function ov(l,i=!1,o=!0){en(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 c=[],m="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(v,S,b)=>(c.push({paramName:S,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(c.push({paramName:"*"}),m+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?m+="\\/*$":l!==""&&l!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,i?void 0:"i"),c]}function dv(l){try{return l.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return en(!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 (${i}).`),l}}function ll(l,i){if(i==="/")return l;if(!l.toLowerCase().startsWith(i.toLowerCase()))return null;let o=i.endsWith("/")?i.length-1:i.length,c=l.charAt(o);return c&&c!=="/"?null:l.slice(o)||"/"}var fv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function hv(l,i="/"){let{pathname:o,search:c="",hash:m=""}=typeof l=="string"?zs(l):l,f;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?f=ug(o.substring(1),"/"):f=ug(o,i)):f=i,{pathname:f,search:yv(c),hash:xv(m)}}function ug(l,i){let o=i.replace(/\/+$/,"").split("/");return l.split("/").forEach(m=>{m===".."?o.length>1&&o.pop():m!=="."&&o.push(m)}),o.length>1?o.join("/"):"/"}function gf(l,i,o,c){return`Cannot include a '${l}' character in a manually specified \`to.${i}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mv(l){return l.filter((i,o)=>o===0||i.route.path&&i.route.path.length>0)}function zf(l){let i=mv(l);return i.map((o,c)=>c===i.length-1?o.pathname:o.pathnameBase)}function Uf(l,i,o,c=!1){let m;typeof l=="string"?m=zs(l):(m={...l},jt(!m.pathname||!m.pathname.includes("?"),gf("?","pathname","search",m)),jt(!m.pathname||!m.pathname.includes("#"),gf("#","pathname","hash",m)),jt(!m.search||!m.search.includes("#"),gf("#","search","hash",m)));let f=l===""||m.pathname==="",v=f?"/":m.pathname,S;if(v==null)S=o;else{let j=i.length-1;if(!c&&v.startsWith("..")){let M=v.split("/");for(;M[0]==="..";)M.shift(),j-=1;m.pathname=M.join("/")}S=j>=0?i[j]:"/"}let b=hv(m,S),y=v&&v!=="/"&&v.endsWith("/"),w=(f||v===".")&&o.endsWith("/");return!b.pathname.endsWith("/")&&(y||w)&&(b.pathname+="/"),b}var nl=l=>l.join("/").replace(/\/\/+/g,"/"),gv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),yv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,xv=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,pv=class{constructor(l,i,o,c=!1){this.status=l,this.statusText=i||"",this.internal=c,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function vv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function bv(l){return l.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var sy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ry(l,i){let o=l;if(typeof o!="string"||!fv.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let c=o,m=!1;if(sy)try{let f=new URL(window.location.href),v=o.startsWith("//")?new URL(f.protocol+o):new URL(o),S=ll(v.pathname,i);v.origin===f.origin&&S!=null?o=S+v.search+v.hash:m=!0}catch{en(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:m,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var iy=["POST","PUT","PATCH","DELETE"];new Set(iy);var Sv=["GET",...iy];new Set(Sv);var zr=z.createContext(null);zr.displayName="DataRouter";var Jc=z.createContext(null);Jc.displayName="DataRouterState";var wv=z.createContext(!1),uy=z.createContext({isTransitioning:!1});uy.displayName="ViewTransition";var Nv=z.createContext(new Map);Nv.displayName="Fetchers";var jv=z.createContext(null);jv.displayName="Await";var Va=z.createContext(null);Va.displayName="Navigation";var su=z.createContext(null);su.displayName="Location";var Dn=z.createContext({outlet:null,matches:[],isDataRoute:!1});Dn.displayName="Route";var Hf=z.createContext(null);Hf.displayName="RouteError";var cy="REACT_ROUTER_ERROR",Ev="REDIRECT",Mv="ROUTE_ERROR_RESPONSE";function Tv(l){if(l.startsWith(`${cy}:${Ev}:{`))try{let i=JSON.parse(l.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function Cv(l){if(l.startsWith(`${cy}:${Mv}:{`))try{let i=JSON.parse(l.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new pv(i.status,i.statusText,i.data)}catch{}}function Ov(l,{relative:i}={}){jt(Ur(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:c}=z.useContext(Va),{hash:m,pathname:f,search:v}=ru(l,{relative:i}),S=f;return o!=="/"&&(S=f==="/"?o:nl([o,f])),c.createHref({pathname:S,search:v,hash:m})}function Ur(){return z.useContext(su)!=null}function Zl(){return jt(Ur(),"useLocation() may be used only in the context of a <Router> component."),z.useContext(su).location}var oy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dy(l){z.useContext(Va).static||z.useLayoutEffect(l)}function qf(){let{isDataRoute:l}=z.useContext(Dn);return l?Yv():Dv()}function Dv(){jt(Ur(),"useNavigate() may be used only in the context of a <Router> component.");let l=z.useContext(zr),{basename:i,navigator:o}=z.useContext(Va),{matches:c}=z.useContext(Dn),{pathname:m}=Zl(),f=JSON.stringify(zf(c)),v=z.useRef(!1);return dy(()=>{v.current=!0}),z.useCallback((b,y={})=>{if(en(v.current,oy),!v.current)return;if(typeof b=="number"){o.go(b);return}let w=Uf(b,JSON.parse(f),m,y.relative==="path");l==null&&i!=="/"&&(w.pathname=w.pathname==="/"?i:nl([i,w.pathname])),(y.replace?o.replace:o.push)(w,y.state,y)},[i,o,f,m,l])}z.createContext(null);function ru(l,{relative:i}={}){let{matches:o}=z.useContext(Dn),{pathname:c}=Zl(),m=JSON.stringify(zf(o));return z.useMemo(()=>Uf(l,JSON.parse(m),c,i==="path"),[l,m,c,i])}function Rv(l,i){return fy(l,i)}function fy(l,i,o,c,m){var Y;jt(Ur(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=z.useContext(Va),{matches:v}=z.useContext(Dn),S=v[v.length-1],b=S?S.params:{},y=S?S.pathname:"/",w=S?S.pathnameBase:"/",j=S&&S.route;{let G=j&&j.path||"";my(y,!j||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${G}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
-
|
|
60
|
-
Please change the parent <Route path="${G}"> to <Route path="${G==="/"?"*":`${G}/*`}">.`)}let M=Zl(),O;if(i){let G=typeof i=="string"?zs(i):i;jt(w==="/"||((Y=G.pathname)==null?void 0:Y.startsWith(w)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${w}" but pathname "${G.pathname}" was given in the \`location\` prop.`),O=G}else O=M;let A=O.pathname||"/",T=A;if(w!=="/"){let G=w.replace(/^\//,"").split("/");T="/"+A.replace(/^\//,"").split("/").slice(G.length).join("/")}let V=ay(l,{pathname:T});en(j||V!=null,`No routes matched location "${O.pathname}${O.search}${O.hash}" `),en(V==null||V[V.length-1].route.element!==void 0||V[V.length-1].route.Component!==void 0||V[V.length-1].route.lazy!==void 0,`Matched leaf route at location "${O.pathname}${O.search}${O.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let ne=Uv(V&&V.map(G=>Object.assign({},G,{params:Object.assign({},b,G.params),pathname:nl([w,f.encodeLocation?f.encodeLocation(G.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?w:nl([w,f.encodeLocation?f.encodeLocation(G.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathnameBase])})),v,o,c,m);return i&&ne?z.createElement(su.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...O},navigationType:"POP"}},ne):ne}function Av(){let l=Vv(),i=vv(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),o=l instanceof Error?l.stack:null,c="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:c},f={padding:"2px 4px",backgroundColor:c},v=null;return console.error("Error handled by React Router default ErrorBoundary:",l),v=z.createElement(z.Fragment,null,z.createElement("p",null,"💿 Hey developer 👋"),z.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",z.createElement("code",{style:f},"ErrorBoundary")," or"," ",z.createElement("code",{style:f},"errorElement")," prop on your route.")),z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},i),o?z.createElement("pre",{style:m},o):null,v)}var kv=z.createElement(Av,null),hy=class extends z.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,i){return i.location!==l.location||i.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:i.error,location:i.location,revalidation:l.revalidation||i.revalidation}}componentDidCatch(l,i){this.props.onError?this.props.onError(l,i):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 o=Cv(l.digest);o&&(l=o)}let i=l!==void 0?z.createElement(Dn.Provider,{value:this.props.routeContext},z.createElement(Hf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?z.createElement(_v,{error:l},i):i}};hy.contextType=wv;var yf=new WeakMap;function _v({children:l,error:i}){let{basename:o}=z.useContext(Va);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let c=Tv(i.digest);if(c){let m=yf.get(i);if(m)throw m;let f=ry(c.location,o);if(sy&&!yf.get(i))if(f.isExternal||c.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:c.replace}));throw yf.set(i,v),v}return z.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return l}function zv({routeContext:l,match:i,children:o}){let c=z.useContext(zr);return c&&c.static&&c.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=i.route.id),z.createElement(Dn.Provider,{value:l},o)}function Uv(l,i=[],o=null,c=null,m=null){if(l==null){if(!o)return null;if(o.errors)l=o.matches;else if(i.length===0&&!o.initialized&&o.matches.length>0)l=o.matches;else return null}let f=l,v=o==null?void 0:o.errors;if(v!=null){let w=f.findIndex(j=>j.route.id&&(v==null?void 0:v[j.route.id])!==void 0);jt(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(v).join(",")}`),f=f.slice(0,Math.min(f.length,w+1))}let S=!1,b=-1;if(o)for(let w=0;w<f.length;w++){let j=f[w];if((j.route.HydrateFallback||j.route.hydrateFallbackElement)&&(b=w),j.route.id){let{loaderData:M,errors:O}=o,A=j.route.loader&&!M.hasOwnProperty(j.route.id)&&(!O||O[j.route.id]===void 0);if(j.route.lazy||A){S=!0,b>=0?f=f.slice(0,b+1):f=[f[0]];break}}}let y=o&&c?(w,j)=>{var M,O;c(w,{location:o.location,params:((O=(M=o.matches)==null?void 0:M[0])==null?void 0:O.params)??{},unstable_pattern:bv(o.matches),errorInfo:j})}:void 0;return f.reduceRight((w,j,M)=>{let O,A=!1,T=null,V=null;o&&(O=v&&j.route.id?v[j.route.id]:void 0,T=j.route.errorElement||kv,S&&(b<0&&M===0?(my("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,V=null):b===M&&(A=!0,V=j.route.hydrateFallbackElement||null)));let ne=i.concat(f.slice(0,M+1)),Y=()=>{let G;return O?G=T:A?G=V:j.route.Component?G=z.createElement(j.route.Component,null):j.route.element?G=j.route.element:G=w,z.createElement(zv,{match:j,routeContext:{outlet:w,matches:ne,isDataRoute:o!=null},children:G})};return o&&(j.route.ErrorBoundary||j.route.errorElement||M===0)?z.createElement(hy,{location:o.location,revalidation:o.revalidation,component:T,error:O,children:Y(),routeContext:{outlet:null,matches:ne,isDataRoute:!0},onError:y}):Y()},null)}function Lf(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hv(l){let i=z.useContext(zr);return jt(i,Lf(l)),i}function qv(l){let i=z.useContext(Jc);return jt(i,Lf(l)),i}function Lv(l){let i=z.useContext(Dn);return jt(i,Lf(l)),i}function Bf(l){let i=Lv(l),o=i.matches[i.matches.length-1];return jt(o.route.id,`${l} can only be used on routes that contain a unique "id"`),o.route.id}function Bv(){return Bf("useRouteId")}function Vv(){var c;let l=z.useContext(Hf),i=qv("useRouteError"),o=Bf("useRouteError");return l!==void 0?l:(c=i.errors)==null?void 0:c[o]}function Yv(){let{router:l}=Hv("useNavigate"),i=Bf("useNavigate"),o=z.useRef(!1);return dy(()=>{o.current=!0}),z.useCallback(async(m,f={})=>{en(o.current,oy),o.current&&(typeof m=="number"?await l.navigate(m):await l.navigate(m,{fromRouteId:i,...f}))},[l,i])}var cg={};function my(l,i,o){!i&&!cg[l]&&(cg[l]=!0,en(!1,o))}z.memo($v);function $v({routes:l,future:i,state:o,onError:c}){return fy(l,void 0,o,c,i)}function Fv({to:l,replace:i,state:o,relative:c}){jt(Ur(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=z.useContext(Va);en(!m,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=z.useContext(Dn),{pathname:v}=Zl(),S=qf(),b=Uf(l,zf(f),v,c==="path"),y=JSON.stringify(b);return z.useEffect(()=>{S(JSON.parse(y),{replace:i,state:o,relative:c})},[S,y,c,i,o]),null}function al(l){jt(!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 Gv({basename:l="/",children:i=null,location:o,navigationType:c="POP",navigator:m,static:f=!1,unstable_useTransitions:v}){jt(!Ur(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let S=l.replace(/^\/*/,"/"),b=z.useMemo(()=>({basename:S,navigator:m,static:f,unstable_useTransitions:v,future:{}}),[S,m,f,v]);typeof o=="string"&&(o=zs(o));let{pathname:y="/",search:w="",hash:j="",state:M=null,key:O="default"}=o,A=z.useMemo(()=>{let T=ll(y,S);return T==null?null:{location:{pathname:T,search:w,hash:j,state:M,key:O},navigationType:c}},[S,y,w,j,M,O,c]);return en(A!=null,`<Router basename="${S}"> is not able to match the URL "${y}${w}${j}" because it does not start with the basename, so the <Router> won't render anything.`),A==null?null:z.createElement(Va.Provider,{value:b},z.createElement(su.Provider,{children:i,value:A}))}function Zv({children:l,location:i}){return Rv(Mf(l),i)}function Mf(l,i=[]){let o=[];return z.Children.forEach(l,(c,m)=>{if(!z.isValidElement(c))return;let f=[...i,m];if(c.type===z.Fragment){o.push.apply(o,Mf(c.props.children,f));return}jt(c.type===al,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),jt(!c.props.index||!c.props.children,"An index route cannot have child routes.");let v={id:c.props.id||f.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(v.children=Mf(c.props.children,f)),o.push(v)}),o}var Yc="get",$c="application/x-www-form-urlencoded";function Kc(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function Pv(l){return Kc(l)&&l.tagName.toLowerCase()==="button"}function Qv(l){return Kc(l)&&l.tagName.toLowerCase()==="form"}function Wv(l){return Kc(l)&&l.tagName.toLowerCase()==="input"}function Iv(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Xv(l,i){return l.button===0&&(!i||i==="_self")&&!Iv(l)}var Uc=null;function Jv(){if(Uc===null)try{new FormData(document.createElement("form"),0),Uc=!1}catch{Uc=!0}return Uc}var Kv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xf(l){return l!=null&&!Kv.has(l)?(en(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${$c}"`),null):l}function eb(l,i){let o,c,m,f,v;if(Qv(l)){let S=l.getAttribute("action");c=S?ll(S,i):null,o=l.getAttribute("method")||Yc,m=xf(l.getAttribute("enctype"))||$c,f=new FormData(l)}else if(Pv(l)||Wv(l)&&(l.type==="submit"||l.type==="image")){let S=l.form;if(S==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=l.getAttribute("formaction")||S.getAttribute("action");if(c=b?ll(b,i):null,o=l.getAttribute("formmethod")||S.getAttribute("method")||Yc,m=xf(l.getAttribute("formenctype"))||xf(S.getAttribute("enctype"))||$c,f=new FormData(S,l),!Jv()){let{name:y,type:w,value:j}=l;if(w==="image"){let M=y?`${y}.`:"";f.append(`${M}x`,"0"),f.append(`${M}y`,"0")}else y&&f.append(y,j)}}else{if(Kc(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Yc,c=null,m=$c,v=l}return f&&m==="text/plain"&&(v=f,f=void 0),{action:c,method:o.toLowerCase(),encType:m,formData:f,body:v}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Vf(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function tb(l,i,o,c){let m=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return o?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${c}`:m.pathname=`${m.pathname}.${c}`:m.pathname==="/"?m.pathname=`_root.${c}`:i&&ll(m.pathname,i)==="/"?m.pathname=`${i.replace(/\/$/,"")}/_root.${c}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${c}`,m}async function ab(l,i){if(l.id in i)return i[l.id];try{let o=await import(l.module);return i[l.id]=o,o}catch(o){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function nb(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 lb(l,i,o){let c=await Promise.all(l.map(async m=>{let f=i.routes[m.route.id];if(f){let v=await ab(f,o);return v.links?v.links():[]}return[]}));return ub(c.flat(1).filter(nb).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function og(l,i,o,c,m,f){let v=(b,y)=>o[y]?b.route.id!==o[y].route.id:!0,S=(b,y)=>{var w;return o[y].pathname!==b.pathname||((w=o[y].route.path)==null?void 0:w.endsWith("*"))&&o[y].params["*"]!==b.params["*"]};return f==="assets"?i.filter((b,y)=>v(b,y)||S(b,y)):f==="data"?i.filter((b,y)=>{var j;let w=c.routes[b.route.id];if(!w||!w.hasLoader)return!1;if(v(b,y)||S(b,y))return!0;if(b.route.shouldRevalidate){let M=b.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((j=o[0])==null?void 0:j.params)||{},nextUrl:new URL(l,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof M=="boolean")return M}return!0}):[]}function sb(l,i,{includeHydrateFallback:o}={}){return rb(l.map(c=>{let m=i.routes[c.route.id];if(!m)return[];let f=[m.module];return m.clientActionModule&&(f=f.concat(m.clientActionModule)),m.clientLoaderModule&&(f=f.concat(m.clientLoaderModule)),o&&m.hydrateFallbackModule&&(f=f.concat(m.hydrateFallbackModule)),m.imports&&(f=f.concat(m.imports)),f}).flat(1))}function rb(l){return[...new Set(l)]}function ib(l){let i={},o=Object.keys(l).sort();for(let c of o)i[c]=l[c];return i}function ub(l,i){let o=new Set;return new Set(i),l.reduce((c,m)=>{let f=JSON.stringify(ib(m));return o.has(f)||(o.add(f),c.push({key:f,link:m})),c},[])}function gy(){let l=z.useContext(zr);return Vf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function cb(){let l=z.useContext(Jc);return Vf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Yf=z.createContext(void 0);Yf.displayName="FrameworkContext";function yy(){let l=z.useContext(Yf);return Vf(l,"You must render this element inside a <HydratedRouter> element"),l}function ob(l,i){let o=z.useContext(Yf),[c,m]=z.useState(!1),[f,v]=z.useState(!1),{onFocus:S,onBlur:b,onMouseEnter:y,onMouseLeave:w,onTouchStart:j}=i,M=z.useRef(null);z.useEffect(()=>{if(l==="render"&&v(!0),l==="viewport"){let T=ne=>{ne.forEach(Y=>{v(Y.isIntersecting)})},V=new IntersectionObserver(T,{threshold:.5});return M.current&&V.observe(M.current),()=>{V.disconnect()}}},[l]),z.useEffect(()=>{if(c){let T=setTimeout(()=>{v(!0)},100);return()=>{clearTimeout(T)}}},[c]);let O=()=>{m(!0)},A=()=>{m(!1),v(!1)};return o?l!=="intent"?[f,M,{}]:[f,M,{onFocus:Vi(S,O),onBlur:Vi(b,A),onMouseEnter:Vi(y,O),onMouseLeave:Vi(w,A),onTouchStart:Vi(j,O)}]:[!1,M,{}]}function Vi(l,i){return o=>{l&&l(o),o.defaultPrevented||i(o)}}function db({page:l,...i}){let{router:o}=gy(),c=z.useMemo(()=>ay(o.routes,l,o.basename),[o.routes,l,o.basename]);return c?z.createElement(hb,{page:l,matches:c,...i}):null}function fb(l){let{manifest:i,routeModules:o}=yy(),[c,m]=z.useState([]);return z.useEffect(()=>{let f=!1;return lb(l,i,o).then(v=>{f||m(v)}),()=>{f=!0}},[l,i,o]),c}function hb({page:l,matches:i,...o}){let c=Zl(),{future:m,manifest:f,routeModules:v}=yy(),{basename:S}=gy(),{loaderData:b,matches:y}=cb(),w=z.useMemo(()=>og(l,i,y,f,c,"data"),[l,i,y,f,c]),j=z.useMemo(()=>og(l,i,y,f,c,"assets"),[l,i,y,f,c]),M=z.useMemo(()=>{if(l===c.pathname+c.search+c.hash)return[];let T=new Set,V=!1;if(i.forEach(Y=>{var K;let G=f.routes[Y.route.id];!G||!G.hasLoader||(!w.some(de=>de.route.id===Y.route.id)&&Y.route.id in b&&((K=v[Y.route.id])!=null&&K.shouldRevalidate)||G.hasClientLoader?V=!0:T.add(Y.route.id))}),T.size===0)return[];let ne=tb(l,S,m.unstable_trailingSlashAwareDataRequests,"data");return V&&T.size>0&&ne.searchParams.set("_routes",i.filter(Y=>T.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[ne.pathname+ne.search]},[S,m.unstable_trailingSlashAwareDataRequests,b,c,f,w,i,l,v]),O=z.useMemo(()=>sb(j,f),[j,f]),A=fb(j);return z.createElement(z.Fragment,null,M.map(T=>z.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...o})),O.map(T=>z.createElement("link",{key:T,rel:"modulepreload",href:T,...o})),A.map(({key:T,link:V})=>z.createElement("link",{key:T,nonce:o.nonce,...V,crossOrigin:V.crossOrigin??o.crossOrigin})))}function mb(...l){return i=>{l.forEach(o=>{typeof o=="function"?o(i):o!=null&&(o.current=i)})}}var gb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{gb&&(window.__reactRouterVersion="7.13.0")}catch{}function yb({basename:l,children:i,unstable_useTransitions:o,window:c}){let m=z.useRef();m.current==null&&(m.current=Wp({window:c,v5Compat:!0}));let f=m.current,[v,S]=z.useState({action:f.action,location:f.location}),b=z.useCallback(y=>{o===!1?S(y):z.startTransition(()=>S(y))},[o]);return z.useLayoutEffect(()=>f.listen(b),[f,b]),z.createElement(Gv,{basename:l,children:i,location:v.location,navigationType:v.action,navigator:f,unstable_useTransitions:o})}var xy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,py=z.forwardRef(function({onClick:i,discover:o="render",prefetch:c="none",relative:m,reloadDocument:f,replace:v,state:S,target:b,to:y,preventScrollReset:w,viewTransition:j,unstable_defaultShouldRevalidate:M,...O},A){let{basename:T,unstable_useTransitions:V}=z.useContext(Va),ne=typeof y=="string"&&xy.test(y),Y=ry(y,T);y=Y.to;let G=Ov(y,{relative:m}),[K,de,P]=ob(c,O),Z=vb(y,{replace:v,state:S,target:b,preventScrollReset:w,relative:m,viewTransition:j,unstable_defaultShouldRevalidate:M,unstable_useTransitions:V});function Q(k){i&&i(k),k.defaultPrevented||Z(k)}let ae=z.createElement("a",{...O,...P,href:Y.absoluteURL||G,onClick:Y.isExternal||f?i:Q,ref:mb(A,de),target:b,"data-discover":!ne&&o==="render"?"true":void 0});return K&&!ne?z.createElement(z.Fragment,null,ae,z.createElement(db,{page:G})):ae});py.displayName="Link";var vy=z.forwardRef(function({"aria-current":i="page",caseSensitive:o=!1,className:c="",end:m=!1,style:f,to:v,viewTransition:S,children:b,...y},w){let j=ru(v,{relative:y.relative}),M=Zl(),O=z.useContext(Jc),{navigator:A,basename:T}=z.useContext(Va),V=O!=null&&jb(j)&&S===!0,ne=A.encodeLocation?A.encodeLocation(j).pathname:j.pathname,Y=M.pathname,G=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;o||(Y=Y.toLowerCase(),G=G?G.toLowerCase():null,ne=ne.toLowerCase()),G&&T&&(G=ll(G,T)||G);const K=ne!=="/"&&ne.endsWith("/")?ne.length-1:ne.length;let de=Y===ne||!m&&Y.startsWith(ne)&&Y.charAt(K)==="/",P=G!=null&&(G===ne||!m&&G.startsWith(ne)&&G.charAt(ne.length)==="/"),Z={isActive:de,isPending:P,isTransitioning:V},Q=de?i:void 0,ae;typeof c=="function"?ae=c(Z):ae=[c,de?"active":null,P?"pending":null,V?"transitioning":null].filter(Boolean).join(" ");let k=typeof f=="function"?f(Z):f;return z.createElement(py,{...y,"aria-current":Q,className:ae,ref:w,style:k,to:v,viewTransition:S},typeof b=="function"?b(Z):b)});vy.displayName="NavLink";var xb=z.forwardRef(({discover:l="render",fetcherKey:i,navigate:o,reloadDocument:c,replace:m,state:f,method:v=Yc,action:S,onSubmit:b,relative:y,preventScrollReset:w,viewTransition:j,unstable_defaultShouldRevalidate:M,...O},A)=>{let{unstable_useTransitions:T}=z.useContext(Va),V=wb(),ne=Nb(S,{relative:y}),Y=v.toLowerCase()==="get"?"get":"post",G=typeof S=="string"&&xy.test(S),K=de=>{if(b&&b(de),de.defaultPrevented)return;de.preventDefault();let P=de.nativeEvent.submitter,Z=(P==null?void 0:P.getAttribute("formmethod"))||v,Q=()=>V(P||de.currentTarget,{fetcherKey:i,method:Z,navigate:o,replace:m,state:f,relative:y,preventScrollReset:w,viewTransition:j,unstable_defaultShouldRevalidate:M});T&&o!==!1?z.startTransition(()=>Q()):Q()};return z.createElement("form",{ref:A,method:Y,action:ne,onSubmit:c?b:K,...O,"data-discover":!G&&l==="render"?"true":void 0})});xb.displayName="Form";function pb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function by(l){let i=z.useContext(zr);return jt(i,pb(l)),i}function vb(l,{target:i,replace:o,state:c,preventScrollReset:m,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:S,unstable_useTransitions:b}={}){let y=qf(),w=Zl(),j=ru(l,{relative:f});return z.useCallback(M=>{if(Xv(M,i)){M.preventDefault();let O=o!==void 0?o:au(w)===au(j),A=()=>y(l,{replace:O,state:c,preventScrollReset:m,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:S});b?z.startTransition(()=>A()):A()}},[w,y,j,o,c,i,l,m,f,v,S,b])}var bb=0,Sb=()=>`__${String(++bb)}__`;function wb(){let{router:l}=by("useSubmit"),{basename:i}=z.useContext(Va),o=Bv(),c=l.fetch,m=l.navigate;return z.useCallback(async(f,v={})=>{let{action:S,method:b,encType:y,formData:w,body:j}=eb(f,i);if(v.navigate===!1){let M=v.fetcherKey||Sb();await c(M,o,v.action||S,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:w,body:j,formMethod:v.method||b,formEncType:v.encType||y,flushSync:v.flushSync})}else await m(v.action||S,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:w,body:j,formMethod:v.method||b,formEncType:v.encType||y,replace:v.replace,state:v.state,fromRouteId:o,flushSync:v.flushSync,viewTransition:v.viewTransition})},[c,m,i,o])}function Nb(l,{relative:i}={}){let{basename:o}=z.useContext(Va),c=z.useContext(Dn);jt(c,"useFormAction must be used inside a RouteContext");let[m]=c.matches.slice(-1),f={...ru(l||".",{relative:i})},v=Zl();if(l==null){f.search=v.search;let S=new URLSearchParams(f.search),b=S.getAll("index");if(b.some(w=>w==="")){S.delete("index"),b.filter(j=>j).forEach(j=>S.append("index",j));let w=S.toString();f.search=w?`?${w}`:""}}return(!l||l===".")&&m.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(f.pathname=f.pathname==="/"?o:nl([o,f.pathname])),au(f)}function jb(l,{relative:i}={}){let o=z.useContext(uy);jt(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=by("useViewTransitionState"),m=ru(l,{relative:i});if(!o.isTransitioning)return!1;let f=ll(o.currentLocation.pathname,c)||o.currentLocation.pathname,v=ll(o.nextLocation.pathname,c)||o.nextLocation.pathname;return Gc(m.pathname,v)!=null||Gc(m.pathname,f)!=null}var Eb=ty();const Mb=kf(Eb);/**
|
|
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 Sy=(...l)=>l.filter((i,o,c)=>!!i&&i.trim()!==""&&c.indexOf(i)===o).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 Tb=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 Cb=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,o,c)=>c?c.toUpperCase():o.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 dg=l=>{const i=Cb(l);return i.charAt(0).toUpperCase()+i.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 Ob={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 Db=l=>{for(const i in l)if(i.startsWith("aria-")||i==="role"||i==="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 Rb=z.forwardRef(({color:l="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:m="",children:f,iconNode:v,...S},b)=>z.createElement("svg",{ref:b,...Ob,width:i,height:i,stroke:l,strokeWidth:c?Number(o)*24/Number(i):o,className:Sy("lucide",m),...!f&&!Db(S)&&{"aria-hidden":"true"},...S},[...v.map(([y,w])=>z.createElement(y,w)),...Array.isArray(f)?f:[f]]));/**
|
|
96
|
-
* @license lucide-react v0.564.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const ze=(l,i)=>{const o=z.forwardRef(({className:c,...m},f)=>z.createElement(Rb,{ref:f,iconNode:i,className:Sy(`lucide-${Tb(dg(l))}`,`lucide-${l}`,c),...m}));return o.displayName=dg(l),o};/**
|
|
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 Ab=[["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"}]],wy=ze("activity",Ab);/**
|
|
106
|
-
* @license lucide-react v0.564.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const kb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],_b=ze("arrow-down",kb);/**
|
|
111
|
-
* @license lucide-react v0.564.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const zb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],fg=ze("arrow-right",zb);/**
|
|
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 Ub=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Hb=ze("arrow-up-down",Ub);/**
|
|
121
|
-
* @license lucide-react v0.564.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const qb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Lb=ze("arrow-up",qb);/**
|
|
126
|
-
* @license lucide-react v0.564.0 - ISC
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the ISC license.
|
|
129
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const Bb=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Vb=ze("bell",Bb);/**
|
|
131
|
-
* @license lucide-react v0.564.0 - ISC
|
|
132
|
-
*
|
|
133
|
-
* This source code is licensed under the ISC license.
|
|
134
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const Yb=[["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"}]],hg=ze("briefcase",Yb);/**
|
|
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 $b=[["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"}]],$f=ze("calendar",$b);/**
|
|
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 Fb=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Gb=ze("chart-no-axes-column",Fb);/**
|
|
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 Zb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Fc=ze("check",Zb);/**
|
|
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 Pb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ny=ze("chevron-down",Pb);/**
|
|
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 Qb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Wb=ze("chevron-left",Qb);/**
|
|
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 Ib=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Xb=ze("chevron-right",Ib);/**
|
|
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 Jb=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Kb=ze("chevron-up",Jb);/**
|
|
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 e1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],t1=ze("chevrons-up-down",e1);/**
|
|
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 a1=[["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=ze("circle-alert",a1);/**
|
|
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 n1=[["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"}]],mg=ze("circle-arrow-down",n1);/**
|
|
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 l1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],iu=ze("circle-check-big",l1);/**
|
|
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 s1=[["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"}]],r1=ze("circle-x",s1);/**
|
|
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 i1=[["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"}]],gg=ze("clipboard-list",i1);/**
|
|
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 u1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Zc=ze("clock",u1);/**
|
|
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 c1=[["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"}]],jy=ze("external-link",c1);/**
|
|
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 o1=[["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"}]],d1=ze("eye-off",o1);/**
|
|
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 f1=[["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"}]],h1=ze("eye",f1);/**
|
|
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 m1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Tf=ze("file-text",m1);/**
|
|
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 g1=[["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"}]],y1=ze("git-pull-request",g1);/**
|
|
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 x1=[["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"}]],p1=ze("globe",x1);/**
|
|
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 v1=[["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"}]],b1=ze("house",v1);/**
|
|
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 S1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],w1=ze("info",S1);/**
|
|
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 N1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],j1=ze("kanban",N1);/**
|
|
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 E1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ey=ze("loader-circle",E1);/**
|
|
256
|
-
* @license lucide-react v0.564.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/const M1=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],My=ze("map",M1);/**
|
|
261
|
-
* @license lucide-react v0.564.0 - ISC
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the ISC license.
|
|
264
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/const T1=[["path",{d:"M5 12h14",key:"1ays0h"}]],C1=ze("minus",T1);/**
|
|
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 O1=[["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"}]],Ty=ze("pause",O1);/**
|
|
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 D1=[["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"}]],Ff=ze("pen",D1);/**
|
|
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 R1=[["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=ze("play",R1);/**
|
|
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 A1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Us=ze("plus",A1);/**
|
|
286
|
-
* @license lucide-react v0.564.0 - ISC
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the ISC license.
|
|
289
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/const k1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Cy=ze("rotate-ccw",k1);/**
|
|
291
|
-
* @license lucide-react v0.564.0 - ISC
|
|
292
|
-
*
|
|
293
|
-
* This source code is licensed under the ISC license.
|
|
294
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/const _1=[["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"}]],z1=ze("save",_1);/**
|
|
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 U1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],eo=ze("search",U1);/**
|
|
301
|
-
* @license lucide-react v0.564.0 - ISC
|
|
302
|
-
*
|
|
303
|
-
* This source code is licensed under the ISC license.
|
|
304
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
-
*/const H1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],q1=ze("settings",H1);/**
|
|
306
|
-
* @license lucide-react v0.564.0 - ISC
|
|
307
|
-
*
|
|
308
|
-
* This source code is licensed under the ISC license.
|
|
309
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
-
*/const L1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],yg=ze("square",L1);/**
|
|
311
|
-
* @license lucide-react v0.564.0 - ISC
|
|
312
|
-
*
|
|
313
|
-
* This source code is licensed under the ISC license.
|
|
314
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
-
*/const B1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],V1=ze("terminal",B1);/**
|
|
316
|
-
* @license lucide-react v0.564.0 - ISC
|
|
317
|
-
*
|
|
318
|
-
* This source code is licensed under the ISC license.
|
|
319
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
-
*/const Y1=[["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"}]],$1=ze("test-tube-diagonal",Y1);/**
|
|
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 F1=[["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"}]],uu=ze("trash-2",F1);/**
|
|
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 G1=[["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"}]],nu=ze("triangle-alert",G1);/**
|
|
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 Z1=[["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"}]],P1=ze("wifi",Z1);/**
|
|
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 Q1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hr=ze("x",Q1);/**
|
|
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 W1=[["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"}]],I1=ze("zap",W1),Oy=[{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"}}],Dy=[{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 i;return((i=l.qa)==null?void 0:i.enabled)??!0},getSchedule:l=>{var i;return((i=l.qa)==null?void 0:i.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(l,i)=>({qa:{...i.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 i;return((i=l.audit)==null?void 0:i.enabled)??!0},getSchedule:l=>{var i;return((i=l.audit)==null?void 0:i.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,i)=>({audit:{...i.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 i;return((i=l.roadmapScanner)==null?void 0:i.enabled)??!0},getSchedule:l=>{var i;return((i=l.roadmapScanner)==null?void 0:i.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,i)=>({roadmapScanner:{...i.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 i;return((i=l.analytics)==null?void 0:i.enabled)??!1},getSchedule:l=>{var i;return((i=l.analytics)==null?void 0:i.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,i)=>({analytics:{...i.analytics??{},enabled:l}})}];function Ry(l){return Dy.find(i=>i.id===l)}const Gf="";let Zf=!1,Pc=null;function X1(l){Zf=l}function xg(l){Pc=l}function J1(){return Zf}function Pf(l){return encodeURIComponent(l.replace(/\//g,"~"))}function pt(l){return Zf&&Pc?l.replace("/api/",`/api/projects/${Pf(Pc)}/`):l}function K1(){return lt("/api/mode")}function Ay(){return lt("/api/projects")}function eS(l){const i=Pf(l);return lt(`/api/projects/${i}`,{method:"DELETE"})}async function lt(l,i){const o=`${Gf}${l}`,c=await fetch(o,{headers:{"Content-Type":"application/json",...i==null?void 0:i.headers},...i});if(!c.ok){const m=await c.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${c.status}: ${c.statusText}`)}return c.json()}function pf(){return lt(pt("/api/status"))}function ky(){return lt(pt("/api/prs"))}function tS(l,i){const o=`?lines=${encodeURIComponent(i)}`;return lt(pt(`/api/logs/${encodeURIComponent(l)}${o}`))}function Qf(){return lt(pt("/api/config"))}async function _y(){if(J1()){const i=(await Ay()).filter(c=>c.valid);return(await Promise.all(i.map(async c=>{try{const m=await lt(`/api/projects/${Pf(c.name)}/config`);return{projectId:c.name,config:m}}catch(m){return console.error(`Failed to fetch config for project ${c.name}`,m),null}}))).filter(c=>c!==null)}else{const l=await Qf();return[{projectId:Pc||"current",config:l}]}}function Qc(l){return lt(pt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function aS(){return lt(pt("/api/doctor"))}function zy(){return lt(pt("/api/schedule-info"))}function nS(){return lt(pt("/api/actions/run"),{method:"POST"})}function Uy(){return lt(pt("/api/actions/review"),{method:"POST"})}function lS(){return lt(pt("/api/actions/qa"),{method:"POST"})}function sS(){return lt(pt("/api/actions/audit"),{method:"POST"})}function rS(){return lt(pt("/api/actions/analytics"),{method:"POST"})}function iS(){return lt(pt("/api/actions/planner"),{method:"POST"})}function uS(l){const i=Ry(l);return i?lt(pt(i.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${l}`))}function tu(){return lt(pt("/api/actions/install-cron"),{method:"POST"})}function cS(){return lt(pt("/api/actions/uninstall-cron"),{method:"POST"})}function oS(l="all"){return lt(pt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Gl=["Draft","Ready","In Progress","Review","Done"];function Hy(){return lt(pt("/api/board/status"))}function dS(l){return lt(pt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function qy(l,i){return lt(pt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:i})})}async function fS(l){const i=`${Gf}${pt(`/api/board/issues/${l}`)}`,o=await fetch(i,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!o.ok){const c=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||`HTTP ${o.status}: ${o.statusText}`)}}function hS(){return lt(pt("/api/actions/clear-lock"),{method:"POST"})}function mS(l,i=[],o){const c=(o==null?void 0:o.enabled)??!0,m=z.useRef(l);m.current=l,z.useEffect(()=>{if(!c)return;const f=`${Gf}${pt("/api/status/events")}`,v=new EventSource(f);return v.addEventListener("status_changed",S=>{try{const b=JSON.parse(S.data);m.current(b)}catch{}}),()=>{v.close()}},[c,...i])}function gS(){return lt("/api/queue/status")}function yS(l){const i=`?window=${encodeURIComponent(l)}`;return lt(`/api/queue/analytics${i}`)}function xS(){return lt("/api/global-notifications")}function pg(l){return lt("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function pS(){return lt(pt("/api/roadmap"))}function vS(){return lt(pt("/api/roadmap/scan"),{method:"POST"})}function Ly(l){return lt(pt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function yn(l,i=[],o){const c=(o==null?void 0:o.enabled)??!0,[m,f]=z.useState(null),[v,S]=z.useState(!0),[b,y]=z.useState(null),w=z.useRef(l);w.current=l;const j=z.useRef(()=>{(async()=>{y(null);try{const O=await w.current();f(O)}catch(O){y(O instanceof Error?O:new Error("Unknown error"))}})()});return z.useEffect(()=>{if(!c)return;let M=!1;return S(!0),y(null),(async()=>{try{const A=await w.current();M||f(A)}catch(A){M||y(A instanceof Error?A:new Error("Unknown error"))}finally{M||S(!1)}})(),()=>{M=!0}},[...i,c]),{data:m,loading:v,error:b,refetch:j.current}}const vg=l=>{let i;const o=new Set,c=(y,w)=>{const j=typeof y=="function"?y(i):y;if(!Object.is(j,i)){const M=i;i=w??(typeof j!="object"||j===null)?j:Object.assign({},i,j),o.forEach(O=>O(i,M))}},m=()=>i,S={setState:c,getState:m,getInitialState:()=>b,subscribe:y=>(o.add(y),()=>o.delete(y))},b=i=l(c,m,S);return S},bS=l=>l?vg(l):vg,SS=l=>l;function wS(l,i=SS){const o=He.useSyncExternalStore(l.subscribe,()=>i(l.getState()),()=>i(l.getInitialState()));return He.useDebugValue(o),o}const bg=l=>{const i=bS(l),o=c=>wS(i,c);return Object.assign(o,i),o},NS=l=>l?bg(l):bg,jS=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Wt=NS((l,i)=>({projectName:"Night Watch",setProjectName:o=>l({projectName:o}),toasts:[],addToast:o=>{const c=Math.random().toString(36).substring(7);l(m=>({toasts:[...m.toasts,{...o,id:c}]})),setTimeout(()=>{l(m=>({toasts:m.toasts.filter(f=>f.id!==c)}))},5e3)},removeToast:o=>l(c=>({toasts:c.toasts.filter(m=>m.id!==o)})),status:null,setStatus:o=>l(c=>!c.status||new Date(o.timestamp)>new Date(c.status.timestamp)?{status:o}:c),globalModeLoading:!0,setGlobalModeLoading:o=>l({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{X1(o),l({isGlobalMode:o})},projects:[],setProjects:o=>l({projects:o}),selectedProjectId:jS,selectProject:o=>{xg(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),l(c=>{const m=c.projects.find(f=>f.name===o);return{selectedProjectId:o,...m?{projectName:m.name}:{}}})},removeProjectFromList:o=>{l(c=>{var S;const m=c.projects.filter(b=>b.name!==o),f=c.selectedProjectId===o,v=f?((S=m[0])==null?void 0:S.name)??null:c.selectedProjectId;return f&&(xg(v),v?localStorage.setItem("nw-selected-project",v):localStorage.removeItem("nw-selected-project")),{projects:m,selectedProjectId:v,...f&&m[0]?{projectName:m[0].name}:{}}})},getJobStates:()=>{const{status:o}=i(),c=o==null?void 0:o.config;return Dy.map(m=>({id:m.id,label:m.label,processName:m.processName,color:m.color,enabled:c?m.getEnabled(c):!0,schedule:c?m.getSchedule(c):"",triggerEndpoint:m.triggerEndpoint}))}})),ES=()=>{const[l,i]=z.useState(!1),{projectName:o,isGlobalMode:c,projects:m,selectedProjectId:f,selectProject:v,globalModeLoading:S}=Wt(),{data:b}=yn(ky,[f],{enabled:!S}),y=(b==null?void 0:b.length)??0,w=z.useMemo(()=>[{icon:b1,label:"Dashboard",path:"/",section:"Overview"},{icon:V1,label:"Logs",path:"/logs"},{icon:j1,label:"Board",path:"/board",section:"Work"},{icon:y1,label:"Pull Requests",path:"/prs",badge:y},{icon:My,label:"Roadmap",path:"/roadmap"},{icon:$f,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:q1,label:"Settings",path:"/settings",section:"Config"}],[y]);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:c?"Projects":"Workspace"}),c?s.jsxs("div",{className:"relative",children:[s.jsx(hg,{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:j=>v(j.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:m.filter(j=>j.valid).map(j=>s.jsx("option",{value:j.name,children:j.name},j.name))}),s.jsx(t1,{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(hg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:o})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:w.map(j=>s.jsxs(He.Fragment,{children:[j.section&&!l&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:j.section}),s.jsx("li",{children:s.jsx(vy,{to:j.path,className:({isActive:M})=>`
|
|
350
|
-
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
351
|
-
${M?"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:M})=>s.jsxs(s.Fragment,{children:[s.jsx(j.icon,{className:`h-5 w-5 transition-colors ${M?"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:j.label}),j.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 ${M?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:j.badge})),M&&!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:j.label})]})})})]},j.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>i(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(Xb,{className:"h-5 w-5"}):s.jsx(Wb,{className:"h-5 w-5"})})})]})},MS=()=>{const{projectName:l}=Wt();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(P1,{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(eo,{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(Vb,{className:"h-5 w-5"}),s.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]})}),s.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-600 ring-2 ring-white/10 flex items-center justify-center text-white font-bold text-xs shadow-lg",children:"AD"})]})]})},TS=({toast:l,onDismiss:i})=>{const o={success:s.jsx(iu,{className:"h-5 w-5 text-green-400"}),error:s.jsx(sl,{className:"h-5 w-5 text-red-400"}),info:s.jsx(w1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(nu,{className:"h-5 w-5 text-amber-400"})},c={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 ${c[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:o[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:()=>i(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Hr,{className:"h-5 w-5"})]})})]})})})},CS=()=>{const{toasts:l,removeToast:i}=Wt();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(o=>s.jsx(TS,{toast:o,onDismiss:i},o.id))})};function OS(){const{setGlobalMode:l,setGlobalModeLoading:i,setProjects:o,selectProject:c,selectedProjectId:m}=Wt();z.useEffect(()=>{i(!0),K1().then(async({globalMode:f})=>{if(l(f),!f)return;const v=await Ay();o(v);const S=v.filter(b=>b.valid);m&&S.some(b=>b.name===m)?c(m):S.length>0&&c(S[0].name)}).catch(()=>{l(!1)}).finally(()=>{i(!1)})},[])}function Sg(l){if(!(l!=null&&l.timestamp))return Number.NEGATIVE_INFINITY;const i=new Date(l.timestamp).getTime();return Number.isNaN(i)?Number.NEGATIVE_INFINITY:i}function Hc(l,i){return l?i?Sg(l)>=Sg(i)?l:i:l:i}function DS(){const{setStatus:l,setProjectName:i,selectedProjectId:o,globalModeLoading:c,status:m}=Wt(),f=z.useRef(null);f.current=Wt.getState().status,mS(v=>{Hc(v,f.current)===v&&l(v)},[o,c],{enabled:!c}),z.useEffect(()=>{if(c)return;pf().then(S=>{Hc(S,f.current)===S&&l(S)}).catch(()=>{});const v=setInterval(()=>{pf().then(S=>{Hc(S,f.current)===S&&l(S)}).catch(()=>{})},3e4);return()=>clearInterval(v)},[o,c,l]),z.useEffect(()=>{const v=()=>{pf().then(S=>{Hc(S,f.current)===S&&l(S)}).catch(()=>{})};return window.addEventListener("focus",v),()=>window.removeEventListener("focus",v)},[o,l]),z.useEffect(()=>{m!=null&&m.projectName&&i(m.projectName)},[m==null?void 0:m.projectName,i])}const et=({children:l,className:i="",onClick:o})=>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
|
-
${o?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
363
|
-
${i}
|
|
364
|
-
`,onClick:o,children:[o&&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})]}),Qe=({children:l,variant:i="primary",size:o="md",loading:c=!1,className:m="",disabled:f,...v})=>{const S="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",b={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},y={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${S} ${b[i]} ${y[o]} ${m}`,disabled:f||c,...v,children:[c&&s.jsx(Ey,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},Ar=({children:l,variant:i="default",className:o=""})=>{const c={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 ${c[i]} ${o}`,children:l})},By={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"}},RS=({defaultColumn:l,onClose:i,onCreated:o})=>{const[c,m]=z.useState(""),[f,v]=z.useState(""),[S,b]=z.useState(l),[y,w]=z.useState(!1),[j,M]=z.useState(null),{addToast:O}=Wt(),A=async T=>{if(T.preventDefault(),!!c.trim()){w(!0),M(null);try{await dS({title:c.trim(),body:f,column:S}),O({title:"Issue created",message:`"${c.trim()}" added to ${S}`,type:"success"}),o(),i()}catch(V){M(V instanceof Error?V.message:"Failed to create issue")}finally{w(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:i}),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:i,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:A,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:c,onChange:T=>m(T.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:S,onChange:T=>b(T.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Gl.map(T=>s.jsx("option",{value:T,children:T},T))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:f,onChange:T=>v(T.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),j&&s.jsx("p",{className:"text-sm text-red-400",children:j}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Qe,{variant:"ghost",type:"button",onClick:i,children:"Cancel"}),s.jsx(Qe,{type:"submit",disabled:y||!c.trim(),children:y?"Creating...":"Create Issue"})]})]})]})]})},AS=({issue:l,onClose:i,onMoved:o,onClosed:c})=>{const[m,f]=z.useState(!1),[v,S]=z.useState(!1),[b,y]=z.useState(!1),{addToast:w}=Wt(),j=async A=>{if(A!==l.column){f(!0);try{await qy(l.number,A),w({title:"Issue moved",message:`#${l.number} moved to ${A}`,type:"success"}),o(),i()}catch(T){w({title:"Move failed",message:T instanceof Error?T.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},M=async()=>{y(!1),S(!0);try{await fS(l.number),w({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),c(),i()}catch(A){w({title:"Close failed",message:A instanceof Error?A.message:"Failed to close issue",type:"error"})}finally{S(!1)}},O=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:i}),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:By[O].badge,children:O})]}),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:i,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(A=>A!==l.column).map(A=>s.jsx("button",{onClick:()=>j(A),disabled:m,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:A},A))]}),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(jy,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>y(!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:()=>y(!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(Qe,{variant:"ghost",onClick:()=>y(!1),children:"Cancel"}),s.jsx(Qe,{onClick:M,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."})})]})]})},kS=({issue:l,onClick:i,onDragStart:o})=>{const[c,m]=z.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(l.number)),f.dataTransfer.effectAllowed="move",m(!0),o(l)},onDragEnd:()=>m(!1),children:s.jsxs(et,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${c?"opacity-30":""}`,onClick:i,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",l.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:l.title}),l.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:l.assignees.join(", ")})]})})},_S=({name:l,issues:i,draggingIssue:o,onIssueClick:c,onNewIssue:m,onMoveIssue:f,onDragStart:v})=>{const S=By[l],[b,y]=z.useState(!1),w=o!==null&&o.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${b&&w?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:j=>{w&&(j.preventDefault(),j.dataTransfer.dropEffect="move",y(!0))},onDragLeave:()=>y(!1),onDrop:j=>{j.preventDefault(),y(!1),o&&o.column!==l&&f(o,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 ${S.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:i.length})]}),s.jsx("button",{onClick:()=>m(l),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${l}`,children:s.jsx(Us,{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:i.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${b&&w?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:b&&w?"Drop here":"No issues"})}):i.map(j=>s.jsx(kS,{issue:j,onClick:()=>c(j),onDragStart:v},j.id))})]})},zS=()=>{const[l,i]=z.useState(null),[o,c]=z.useState(null),[m,f]=z.useState(null),[v,S]=z.useState(null),b=z.useRef(!1),{addToast:y,selectedProjectId:w,globalModeLoading:j}=Wt(),{data:M,loading:O,error:A,refetch:T}=yn(Hy,[w],{enabled:!j});z.useEffect(()=>{const Y=setInterval(()=>{b.current||T()},3e4);return()=>clearInterval(Y)},[T]);const V=z.useCallback(async(Y,G)=>{f(null);const K=v??(M==null?void 0:M.columns);if(!K)return;const de=K,P={};for(const Q of Gl)P[Q]=(K[Q]??[]).filter(ae=>ae.number!==Y.number);const Z={...Y,column:G};P[G]=[...P[G]??[],Z],S(P),i(Q=>(Q==null?void 0:Q.number)===Y.number?Z:Q),b.current=!0;try{await qy(Y.number,G),T(),setTimeout(()=>{S(null),b.current=!1},800)}catch(Q){S(de),i(ae=>(ae==null?void 0:ae.number)===Y.number?Y:ae),b.current=!1,y({title:"Move failed",message:Q instanceof Error?Q.message:"Failed to move issue",type:"error"})}},[y,T,v,M]);if(j||O)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(A&&A.message.includes("Board not configured"))return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-4xl",children:"📋"}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),s.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",s.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(A)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),s.jsx("div",{className:"text-sm text-slate-500",children:A.message}),s.jsx(Qe,{onClick:()=>T(),children:"Retry"})]});if(!M)return null;const ne=v??M.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 K;return Y+(((K=ne[G])==null?void 0:K.length)??0)},0)," issues across ",Gl.length," columns"]})]}),s.jsxs(Qe,{onClick:()=>c("Ready"),children:[s.jsx(Us,{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(_S,{name:Y,issues:ne[Y]??[],draggingIssue:m,onIssueClick:i,onNewIssue:c,onMoveIssue:V,onDragStart:f},Y))})}),l&&s.jsx(AS,{issue:l,onClose:()=>i(null),onMoved:()=>T(),onClosed:()=>T()}),o&&s.jsx(RS,{defaultColumn:o,onClose:()=>c(null),onCreated:()=>T()})]})},US=[{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"}],HS=({processes:l,activePrd:i,onCancelProcess:o,onForceClear:c,onViewLog:m,cancellingProcess:f,clearingLock:v,onTriggerJob:S,triggeringJob:b})=>{const y=j=>l.find(M=>M.name===j),w=(j,M)=>j.length<=M?j:j.slice(0,M-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:US.map(j=>{const M=y(j.processName),O=(M==null?void 0:M.running)??!1,A=M==null?void 0:M.pid,T=f===j.cancelType,V=O&&j.cancelType,ne=!O&&j.name==="executor"&&i,Y=O?A?`PID: ${A}`:j.runningLabel:j.idleLabel,G=O&&j.name==="executor"&&i?w(i,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${O?"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 ${O?"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 ${O?"text-slate-200":"text-slate-400"}`,children:j.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:G?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Tf,{className:"h-3 w-3 flex-shrink-0"}),G]}):Y})]}),s.jsxs("div",{className:"flex-shrink-0",children:[V&&s.jsx("button",{onClick:()=>j.cancelType&&o(j.cancelType),disabled:T,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(yg,{className:"h-3.5 w-3.5"})}),ne&&s.jsx("button",{onClick:c,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(yg,{className:"h-3.5 w-3.5"})}),!V&&!ne&&O&&s.jsx("button",{onClick:m,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Tf,{className:"h-3.5 w-3.5"})}),!O&&!ne&&s.jsx("button",{onClick:()=>S(j.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 ${j.displayName}`,children:b===j.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"})})]})]},j.name)})})},qS={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"},LS=()=>{var k,W;const l=qf(),[i,o]=z.useState(null),[c,m]=z.useState(!1),[f,v]=z.useState(null),{setProjectName:S,addToast:b,selectedProjectId:y,globalModeLoading:w,status:j}=Wt(),{data:M}=yn(zy,[y],{enabled:!w}),{data:O,loading:A}=yn(()=>Hy().catch(()=>null),[y],{enabled:!w}),T=j;if(He.useEffect(()=>{T!=null&&T.projectName&&S(T.projectName)},[T,S]),w)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!T)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const V=T.prs.length,ne=T.prs.filter(_=>_.reviewScore!==null&&_.reviewScore<70).length,Y=((k=O==null?void 0:O.columns.Ready)==null?void 0:k.length)??0,G=((W=O==null?void 0:O.columns["In Progress"])==null?void 0:W.length)??0;T.processes.find(_=>_.name==="executor"),T.processes.find(_=>_.name==="reviewer"),T.processes.find(_=>_.name==="qa"),T.processes.find(_=>_.name==="audit"),T.processes.find(_=>_.name==="planner"),T.processes.find(_=>_.name==="analytics");const K=async _=>{o(_);try{const ce=await oS(_),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{o(null)}},de=async()=>{m(!0);try{await hS(),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{m(!1)}},P=async _=>{v(_);try{await{executor:nS,reviewer:Uy,qa:lS,audit:sS,planner:iS,analytics:rS}[_](),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)}},Z=_=>{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"}},ae=(()=>{var he,B,$;if(M!=null&&M.paused)return null;const _=[{agent:"Executor",nextRun:(M==null?void 0:M.executor.nextRun)??null},{agent:"Reviewer",nextRun:(M==null?void 0:M.reviewer.nextRun)??null},{agent:"QA",nextRun:((he=M==null?void 0:M.qa)==null?void 0:he.nextRun)??null},{agent:"Auditor",nextRun:((B=M==null?void 0:M.audit)==null?void 0:B.nextRun)??null},{agent:"Planner",nextRun:(($=M==null?void 0:M.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:Z(ce.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(et,{className:"p-5",onClick:()=>l("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:Y})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(iu,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(et,{className:"p-5",onClick:()=>l("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:G})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(wy,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(et,{className:"p-5",onClick:()=>l("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:V})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Zc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${ne>0?"text-red-400 font-medium":"text-slate-500"}`,children:ne>0?`${ne} need work`:"All passing"})]}),s.jsxs(et,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:M!=null&&M.paused?"Paused":T.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${M!=null&&M.paused?"bg-amber-500/10 text-amber-400":T.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx($f,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:M!=null&&M.paused?"All schedules paused":T.crontab.installed?`${T.crontab.entries.length} entr${T.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(et,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>l("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(HS,{processes:T.processes,activePrd:T.activePrd,onCancelProcess:K,onForceClear:de,onViewLog:()=>l("/logs"),cancellingProcess:i,clearingLock:c,onTriggerJob:P,triggeringJob:f})]}),ae&&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:ae.agent}),s.jsx("span",{children:ae.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(fg,{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(fg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(et,{className:"p-4",children:A?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):O?s.jsx("div",{className:"flex flex-wrap gap-3",children:Gl.map(_=>{var he;const ce=((he=O.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 ${qS[_]}`,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."]})})]})]})},BS=()=>{const[l,i]=z.useState(!0),[o,c]=z.useState(""),[m,f]=z.useState("executor"),v=z.useRef(null),{selectedProjectId:S,globalModeLoading:b}=Wt(),y=Wt(Y=>Y.status),{data:w,loading:j,error:M,refetch:O}=yn(()=>tS(m,500),[m,S],{enabled:!b}),A=(w==null?void 0:w.lines)||[];z.useEffect(()=>{l&&v.current&&(v.current.scrollTop=v.current.scrollHeight)},[A,l]),z.useEffect(()=>{if(!l)return;const Y=window.setInterval(()=>{O()},3e3);return()=>window.clearInterval(Y)},[l,m,O]);const T=A.filter(Y=>Y.toLowerCase().includes(o.toLowerCase())),V=Y=>{f(Y),c("")},ne=Y=>{if(!(y!=null&&y.processes))return!1;const G=y.processes.find(K=>K.name===Y);return(G==null?void 0:G.running)??!1};return M?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:M.message}),s.jsx(Qe,{onClick:()=>O(),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:o,onChange:Y=>c(Y.target.value)}),s.jsx(eo,{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:Oy.map(({processName:Y,label:G})=>s.jsx("button",{onClick:()=>V(Y),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m===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}),ne(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(Qe,{size:"sm",variant:"ghost",onClick:()=>O(),children:[s.jsx(mg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Qe,{size:"sm",variant:"ghost",onClick:()=>i(!l),children:[l?s.jsx(Ty,{className:"h-4 w-4 mr-2"}):s.jsx(kr,{className:"h-4 w-4 mr-2"}),l?"Pause":"Resume"]})]})]}),s.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[s.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[s.jsxs("span",{children:["File: ",m,".log"]}),s.jsxs("span",{children:[T.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:[j?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):T.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:o?"No logs match your filter":"No logs yet — logs will appear after the first run"}):T.map((Y,G)=>{const K=Y.includes("[ERROR]"),de=Y.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${K?"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:()=>i(!0),children:[s.jsx(mg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},VS=()=>{const[l,i]=z.useState(null),[o,c]=z.useState(!1),[m,f]=z.useState("all"),[v,S]=z.useState("number"),[b,y]=z.useState("desc"),{addToast:w,selectedProjectId:j,globalModeLoading:M}=Wt(),{data:O,loading:A,error:T,refetch:V}=yn(ky,[j],{enabled:!M}),ne=O??[],Y=k=>{switch(k){case"pass":return s.jsx(iu,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(r1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Ey,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(sl,{className:"h-4 w-4 text-slate-500"})}},G=k=>{switch(k){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"}},K=k=>k===null?"No review decision yet":k===100?"PR has been approved":k===0?"Changes have been requested":`Review score: ${k}`,de=z.useMemo(()=>ne.filter(k=>{switch(m){case"needs-work":return k.ciStatus==="fail"||k.reviewScore===0;case"pending":return k.ciStatus==="pending"||k.ciStatus==="unknown"||k.reviewScore===null;case"passed":return k.ciStatus==="pass"&&k.reviewScore===100;case"all":default:return!0}}),[ne,m]),P=z.useMemo(()=>[...de].sort((W,_)=>{let ce=0;switch(v){case"number":ce=W.number-_.number;break;case"title":ce=W.title.localeCompare(_.title);break;case"branch":ce=W.branch.localeCompare(_.branch);break;case"ciStatus":{const he={fail:0,pending:1,unknown:2,pass:3};ce=(he[W.ciStatus]??2)-(he[_.ciStatus]??2);break}case"reviewScore":{const he=W.reviewScore??-1,B=_.reviewScore??-1;ce=he-B;break}}return b==="asc"?ce:-ce}),[de,v,b]),Z=k=>{v===k?y(b==="asc"?"desc":"asc"):(S(k),y("desc"))},Q=k=>v!==k?s.jsx(Hb,{className:"h-3 w-3 text-slate-600"}):b==="asc"?s.jsx(Lb,{className:"h-3 w-3 text-indigo-400"}):s.jsx(_b,{className:"h-3 w-3 text-indigo-400"});if(A)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(T)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:T.message}),s.jsx(Qe,{onClick:()=>V(),children:"Retry"})]});const ae=async()=>{c(!0);try{const k=await Uy();w({title:"Reviewer Started",message:k.pid?`Started with PID ${k.pid}`:"Reviewer started",type:"success"})}catch(k){w({title:"Reviewer Failed",message:k instanceof Error?k.message:"Failed to start reviewer",type:"error"})}finally{c(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),s.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),s.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),s.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),s.jsxs(Qe,{size:"sm",onClick:ae,disabled:o,children:[s.jsx(eo,{className:"h-4 w-4 mr-2"}),o?"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:()=>Z("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),Q("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:()=>Z("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),Q("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:()=>Z("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),Q("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:()=>Z("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),Q("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:[P.map(k=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>i(l===k.number?null:k.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:["#",k.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:k.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:k.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:G(k.ciStatus),children:[Y(k.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:k.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:k.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:K(k.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${k.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${k.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${k.reviewScore>=70?"text-green-500":"text-red-500"}`,children:k.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:k.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:W=>W.stopPropagation(),children:s.jsx(jy,{className:"h-4 w-4"})})})]},k.number)),P.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:ne.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),l&&s.jsx(et,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const k=ne.find(W=>W.number===l);return k?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:k.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:k.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:G(k.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(k.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:k.ciStatus})]})]}),k.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:K(k.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${k.reviewScore>=70?"text-green-500":"text-red-500"}`,children:k.reviewScore})]})]})]}):null})()})]})},La=He.forwardRef(({className:l="",label:i,checked:o,onChange:c,...m},f)=>{const v=S=>{c&&c(S.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:o,onChange:v,...m}),s.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),i&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:i})]})});La.displayName="Switch";const YS=()=>{const{addToast:l,selectedProjectId:i,globalModeLoading:o}=Wt(),[c,m]=z.useState(!1),[f,v]=z.useState(!1),{data:S,loading:b,error:y,refetch:w}=yn(pS,[i],{enabled:!o});z.useEffect(()=>{if(!(S!=null&&S.enabled))return;const Y=setInterval(()=>{w()},1e4);return()=>clearInterval(Y)},[S==null?void 0:S.enabled,w]);const j=async Y=>{v(!0);try{await Ly(Y),l({title:Y?"Scanner Enabled":"Scanner Disabled",message:Y?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:Y?"success":"info"}),w()}catch(G){l({title:"Toggle Failed",message:G instanceof Error?G.message:"Failed to toggle scanner",type:"error"})}finally{v(!1)}},M=async()=>{m(!0);try{const Y=await vS();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"}),w()}catch(Y){l({title:"Scan Failed",message:Y instanceof Error?Y.message:"Failed to scan roadmap",type:"error"})}finally{m(!1)}};if(b)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(y)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(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:y.message}),s.jsx(Qe,{onClick:()=>w(),children:"Retry"})]});if(!S)return null;if(S.status==="no-roadmap")return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),s.jsx(et,{className:"p-12",children:s.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[s.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:s.jsx(My,{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 O=S.totalItems>0?Math.round(S.processedItems/S.totalItems*100):0,A=FS(S.status),T=GS(S.items),V=S.lastScan?ZS(S.lastScan):"Never",ne=S.autoScanInterval?Math.round(S.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(La,{label:S.enabled?"Enabled":"Disabled",checked:S.enabled,onChange:j,disabled:f}),s.jsxs(Qe,{onClick:M,loading:c,disabled:!S.enabled||S.status==="complete",children:[s.jsx(kr,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(et,{className:`p-6 border-2 ${A.borderColor}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(A.icon,{className:`h-8 w-8 ${A.textColor}`}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),s.jsx("div",{className:`text-2xl font-bold ${A.textColor}`,children:A.label})]})]}),s.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[s.jsxs("div",{children:["Last scan: ",s.jsx("span",{className:"text-slate-300",children:V})]}),S.enabled&&S.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",ne," min"]})]}),S.enabled&&S.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(et,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[S.processedItems," / ",S.totalItems," items (",O,"%)"]})]}),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 ${O===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${O}%`}})})]}),Object.entries(T).map(([Y,G])=>s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:Y}),s.jsx("div",{className:"space-y-2",children:G.map(K=>s.jsx($S,{item:K},K.hash))})]},Y))]})};function $S({item:l}){const i=l.checked,o=l.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${i?"bg-slate-950/30 border-slate-800/50":o?"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:[i?s.jsx(C1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):o?s.jsx(iu,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Tf,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${i?"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:i?s.jsx(Ar,{variant:"neutral",children:"Skipped"}):o?s.jsx(Ar,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(Ar,{variant:"warning",children:"Pending"})})]})}function FS(l){switch(l){case"complete":return{label:"Complete",icon:iu,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Zc,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon: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 GS(l){const i={};for(const o of l){const c=o.section||"General";i[c]||(i[c]=[]),i[c].push(o)}return i}function ZS(l){try{const i=new Date(l),c=new Date().getTime()-i.getTime(),m=Math.floor(c/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const f=Math.floor(m/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const Ye=He.forwardRef(({className:l="",label:i,error:o,helperText:c,rightIcon:m,...f},v)=>{const S=He.useId(),b=f.id??S,y=o?`${b}-error`:void 0,w=!o&&c?`${b}-help`:void 0,j=[y,w].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[i&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:i}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:v,id:b,"aria-describedby":j,"aria-invalid":o?!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
|
-
${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
372
|
-
${m?"pr-10":""}
|
|
373
|
-
${l}
|
|
374
|
-
`,...f}),m&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:m})]}),o?s.jsx("p",{id:y,className:"mt-1.5 text-xs text-red-400",children:o}):c?s.jsx("p",{id:w,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});Ye.displayName="Input";const ha=He.forwardRef(({className:l="",label:i,error:o,helperText:c,options:m,value:f,onChange:v,children:S,...b},y)=>{const w=He.useId(),j=b.id??w,M=o?`${j}-error`:void 0,O=!o&&c?`${j}-help`:void 0,A=[M,O].filter(Boolean).join(" ")||void 0,T=V=>{v&&v(V.target.value)};return s.jsxs("div",{className:"w-full",children:[i&&s.jsx("label",{htmlFor:j,className:"block text-sm font-medium text-slate-400 mb-1.5",children:i}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:y,id:j,"aria-describedby":A,"aria-invalid":o?!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
|
-
${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
381
|
-
${l}
|
|
382
|
-
`,value:f,onChange:T,...b,children:m?m.map(V=>s.jsx("option",{value:V.value,children:V.label},V.value)):S}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Ny,{className:"h-4 w-4"})})]}),o?s.jsx("p",{id:M,className:"mt-1.5 text-xs text-red-400",children:o}):c?s.jsx("p",{id:O,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});ha.displayName="Select";const Vy=({tabs:l,activeTab:i,onChange:o,className:c=""})=>{var b,y;const[m,f]=He.useState((b=l[0])==null?void 0:b.id),v=i||m,S=w=>{o?o(w):f(w)};return s.jsxs("div",{className:`flex flex-col ${c}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:l.map(w=>s.jsx("button",{onClick:()=>S(w.id),className:`
|
|
383
|
-
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
384
|
-
${v===w.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
385
|
-
`,children:w.label},w.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(y=l.find(w=>w.id===v))==null?void 0:y.content})]})},Wc=[{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"}],Wf=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am"}}];function _r(l){return l?l.trim().replace(/\s+/g," "):""}function Dr(l,i){return _r(l)===_r(i)}function PS(l){if(l)return Wf.find(i=>i.id===l)}function Yy(l,i,o,c,m,f){return Dr(l.schedules.executor,i)&&Dr(l.schedules.reviewer,o)&&Dr(l.schedules.qa,c)&&Dr(l.schedules.audit,m)&&Dr(l.schedules.slicer,f)}function QS(l,i,o,c,m){return Wf.find(f=>Yy(f,l,i,o,c,m))}function eu(l,i,o,c,m,f){const v=PS(l);return v&&Yy(v,i,o,c,m,f)?v:QS(i,o,c,m,f)}function wg(l){const i=_r(l),o=i.split(/\s+/);if(o.length!==5)return i;const[c,m,f,v,S]=o,b=/^\d+$/.test(c),y=Wc.find(w=>_r(w.value)===i);if(y)return y.label;if(c==="*/30"&&m==="*")return"Every 30 minutes";if(c==="0"&&m==="*")return"Every hour";if(c.startsWith("*/"))return`Every ${parseInt(c.replace("*/",""),10)} minutes`;if(b&&m.startsWith("*/")&&f==="*"&&v==="*"&&S==="*"){const w=parseInt(m.replace("*/",""),10);return c==="0"?`Every ${w} hours`:`Every ${w} hours at :${c.padStart(2,"0")}`}if(c==="0"&&m.startsWith("*/"))return`Every ${parseInt(m.replace("*/",""),10)} hours`;if(c==="0"&&m.includes("-")){const[w,j]=m.split("-");return`Every hour from ${Yi(w)} to ${Yi(j)}`}if(b&&m.includes("-")&&f==="*"&&v==="*"&&S==="*"){const[w,j]=m.split("-");return`Every hour from ${$i(w,c)} to ${$i(j,c)}`}if(c==="0"&&m.includes(",")){const w=m.split(",").map(Yi);return w.length<=3?`At ${w.join(" and ")}`:`At ${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}if(b&&m.includes(",")&&f==="*"&&v==="*"&&(S==="*"||S==="1-5")){const w=m.split(",").map(M=>$i(M,c)),j=S==="1-5"?"Weekdays at ":"At ";return w.length<=3?`${j}${w.join(" and ")}`:`${j}${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}return c==="0"&&m!=="*"&&f==="*"&&v==="*"&&S==="*"?`Daily at ${Yi(m)}`:b&&m!=="*"&&f==="*"&&v==="*"&&S==="*"?`Daily at ${$i(m,c)}`:c==="0"&&m!=="*"&&f==="*"&&v==="*"&&S==="1-5"?`Weekdays at ${Yi(m)}`:b&&m!=="*"&&f==="*"&&v==="*"&&S==="1-5"?`Weekdays at ${$i(m,c)}`:i}function Yi(l){const i=parseInt(l,10);return i===0?"12 AM":i<12?`${i} AM`:i===12?"12 PM":`${i-12} PM`}function $i(l,i){const o=i.padStart(2,"0"),c=parseInt(l,10);return Number.isNaN(c)?`${l}:${o}`:c===0?`12:${o} AM`:c<12?`${c}:${o} AM`:c===12?`12:${o} PM`:`${c-12}:${o} PM`}function WS(l){const i=_r(l),o=Wc.find(c=>_r(c.value)===i);return(o==null?void 0:o.value)??"__custom__"}function IS(l){const i=new Date,o=l.getTime()-i.getTime(),c=Math.floor(o/6e4),m=Math.floor(c/60),f=Math.floor(m/24);return c<1?"less than a minute":c<60?`in ${c} minute${c>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${f} day${f>1?"s":""}`}function XS(l){const i={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",i)}function JS(l){const i=new Date,o=l.getTime()-i.getTime(),c=Math.floor(o/6e4);return c>=0&&c<30}const On=({label:l,value:i,onChange:o,helperText:c,placeholder:m="5 */3 * * *"})=>{const f=WS(i),v=f==="__custom__",S=w=>{w!=="__custom__"&&o(w)},b=w=>{o(w.target.value)},y=Wc.find(w=>w.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(ha,{label:l,value:f,onChange:S,options:Wc.map(w=>({label:w.label,value:w.value})),helperText:v?void 0:(y==null?void 0:y.description)||c}),v&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(Ye,{label:"Cron Expression",value:i,onChange:b,placeholder:m}),s.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[s.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",s.jsx("br",{}),s.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})};var Os={},qa={},Fi={},Ds={},vf={},Ng;function KS(){return Ng||(Ng=1,Object.defineProperty(vf,"__esModule",{value:!0})),vf}var Gi={},Zi={},jg;function Hs(){var i,o,c,m,f,$y,S;if(jg)return Zi;jg=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronField=void 0;let l=(S=class{constructor(y,w={rawValue:""}){rt(this,f);rt(this,i,!1);rt(this,o,!1);rt(this,c,!1);rt(this,m,[]);Q0(this,"options",{rawValue:""});if(!Array.isArray(y))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(y.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...w,rawValue:w.rawValue??""},Ee(this,m,y.sort(S.sorter)),Ee(this,c,this.options.wildcard!==void 0?this.options.wildcard:Ne(this,f,$y).call(this)),Ee(this,i,this.options.rawValue.includes("L")||y.includes("L")),Ee(this,o,this.options.rawValue.includes("?")||y.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return ee(this,i)}get hasQuestionMarkChar(){return ee(this,o)}get isWildcard(){return ee(this,c)}get values(){return ee(this,m)}static sorter(y,w){const j=typeof y=="number",M=typeof w=="number";return j&&M?y-w:!j&&!M?y.localeCompare(w):j?-1:1}static findNearestValueInList(y,w,j=!1){if(j){for(let M=y.length-1;M>=0;M--)if(y[M]<w)return y[M];return null}for(let M=0;M<y.length;M++)if(y[M]>w)return y[M];return null}findNearestValue(y,w=!1){return this.constructor.findNearestValueInList(this.values,y,w)}serialize(){return{wildcard:ee(this,c),values:ee(this,m)}}validate(){let y;const w=this.chars.length>0?` or chars ${this.chars.join("")}`:"",j=T=>V=>new RegExp(`^\\d{0,2}${V}$`).test(T),M=T=>(y=T,typeof T=="number"?T>=this.min&&T<=this.max:this.chars.some(j(T)));if(!ee(this,m).every(M))throw new Error(`${this.constructor.name} Validation error, got value ${y} expected range ${this.min}-${this.max}${w}`);const A=ee(this,m).find((T,V)=>ee(this,m).indexOf(T)!==V);if(A)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${A}`)}},i=new WeakMap,o=new WeakMap,c=new WeakMap,m=new WeakMap,f=new WeakSet,$y=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(y,w)=>w+this.min).every(y=>ee(this,m).includes(y))},S);return Zi.CronField=l,Zi}var Eg;function e2(){if(Eg)return Gi;Eg=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.CronDayOfMonth=void 0;const l=Hs(),i=1,o=31,c=Object.freeze(["L"]);let m=class extends l.CronField{static get min(){return i}static get max(){return o}static get chars(){return c}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,S){super(v,S),this.validate()}get values(){return super.values}};return Gi.CronDayOfMonth=m,Gi}var Pi={},Mg;function t2(){if(Mg)return Pi;Mg=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.CronDayOfWeek=void 0;const l=Hs(),i=0,o=7,c=Object.freeze(["L"]);let m=class extends l.CronField{static get min(){return i}static get max(){return o}static get chars(){return c}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,S){super(v,S),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Pi.CronDayOfWeek=m,Pi}var Qi={},Tg;function a2(){if(Tg)return Qi;Tg=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronHour=void 0;const l=Hs(),i=0,o=23,c=Object.freeze([]);let m=class extends l.CronField{static get min(){return i}static get max(){return o}static get chars(){return c}constructor(v,S){super(v,S),this.validate()}get values(){return super.values}};return Qi.CronHour=m,Qi}var Wi={},Cg;function n2(){if(Cg)return Wi;Cg=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronMinute=void 0;const l=Hs(),i=0,o=59,c=Object.freeze([]);let m=class extends l.CronField{static get min(){return i}static get max(){return o}static get chars(){return c}constructor(v,S){super(v,S),this.validate()}get values(){return super.values}};return Wi.CronMinute=m,Wi}var Ii={},bf={},Da={},Og;function l2(){if(Og)return Da;Og=1,Object.defineProperty(Da,"__esModule",{value:!0});class l extends Error{}class i extends l{constructor(r){super(`Invalid DateTime: ${r.toMessage()}`)}}class o extends l{constructor(r){super(`Invalid Interval: ${r.toMessage()}`)}}class c extends l{constructor(r){super(`Invalid Duration: ${r.toMessage()}`)}}class m extends l{}class f extends l{constructor(r){super(`Invalid unit ${r}`)}}class v extends l{}class S extends l{constructor(){super("Zone is an abstract class")}}const b="numeric",y="short",w="long",j={year:b,month:b,day:b},M={year:b,month:y,day:b},O={year:b,month:y,day:b,weekday:y},A={year:b,month:w,day:b},T={year:b,month:w,day:b,weekday:w},V={hour:b,minute:b},ne={hour:b,minute:b,second:b},Y={hour:b,minute:b,second:b,timeZoneName:y},G={hour:b,minute:b,second:b,timeZoneName:w},K={hour:b,minute:b,hourCycle:"h23"},de={hour:b,minute:b,second:b,hourCycle:"h23"},P={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:y},Z={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:w},Q={year:b,month:b,day:b,hour:b,minute:b},ae={year:b,month:b,day:b,hour:b,minute:b,second:b},k={year:b,month:y,day:b,hour:b,minute:b},W={year:b,month:y,day:b,hour:b,minute:b,second:b},_={year:b,month:y,day:b,weekday:y,hour:b,minute:b},ce={year:b,month:w,day:b,hour:b,minute:b,timeZoneName:y},he={year:b,month:w,day:b,hour:b,minute:b,second:b,timeZoneName:y},B={year:b,month:w,day:b,weekday:w,hour:b,minute:b,timeZoneName:w},$={year:b,month:w,day:b,weekday:w,hour:b,minute:b,second:b,timeZoneName:w};class ie{get type(){throw new S}get name(){throw new S}get ianaName(){return this.name}get isUniversal(){throw new S}offsetName(r,h){throw new S}formatOffset(r,h){throw new S}offset(r){throw new S}equals(r){throw new S}get isValid(){throw new S}}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(r,{format:h,locale:p}){return zn(r,h,p)}formatOffset(r,h){return Kl(this.offset(r),h)}offset(r){return-new Date(r).getTimezoneOffset()}equals(r){return r.type==="system"}get isValid(){return!0}}const De=new Map;function D(g){let r=De.get(g);return r===void 0&&(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),De.set(g,r)),r}const se={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function me(g,r){const h=g.format(r).replace(/\u200E/g,""),p=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(h),[,N,C,U,H,L,fe,ve]=p;return[U,N,C,H,L,fe,ve]}function pe(g,r){const h=g.formatToParts(r),p=[];for(let N=0;N<h.length;N++){const{type:C,value:U}=h[N],H=se[C];C==="era"?p[H]=U:Oe(H)||(p[H]=parseInt(U,10))}return p}const Ce=new Map;class Me extends ie{static create(r){let h=Ce.get(r);return h===void 0&&Ce.set(r,h=new Me(r)),h}static resetCache(){Ce.clear(),De.clear()}static isValidSpecifier(r){return this.isValidZone(r)}static isValidZone(r){if(!r)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:r}).format(),!0}catch{return!1}}constructor(r){super(),this.zoneName=r,this.valid=Me.isValidZone(r)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(r,{format:h,locale:p}){return zn(r,h,p,this.name)}formatOffset(r,h){return Kl(this.offset(r),h)}offset(r){if(!this.valid)return NaN;const h=new Date(r);if(isNaN(h))return NaN;const p=D(this.name);let[N,C,U,H,L,fe,ve]=p.formatToParts?pe(p,h):me(p,h);H==="BC"&&(N=-Math.abs(N)+1);const Ie=Kt({year:N,month:C,day:U,hour:L===24?0:L,minute:fe,second:ve,millisecond:0});let Re=+h;const Et=Re%1e3;return Re-=Et>=0?Et:1e3+Et,(Ie-Re)/(60*1e3)}equals(r){return r.type==="iana"&&r.name===this.name}get isValid(){return this.valid}}let Le={};function St(g,r={}){const h=JSON.stringify([g,r]);let p=Le[h];return p||(p=new Intl.ListFormat(g,r),Le[h]=p),p}const tt=new Map;function sa(g,r={}){const h=JSON.stringify([g,r]);let p=tt.get(h);return p===void 0&&(p=new Intl.DateTimeFormat(g,r),tt.set(h,p)),p}const ma=new Map;function Rn(g,r={}){const h=JSON.stringify([g,r]);let p=ma.get(h);return p===void 0&&(p=new Intl.NumberFormat(g,r),ma.set(h,p)),p}const xn=new Map;function xe(g,r={}){const{base:h,...p}=r,N=JSON.stringify([g,p]);let C=xn.get(N);return C===void 0&&(C=new Intl.RelativeTimeFormat(g,r),xn.set(N,C)),C}let ke=null;function Mt(){return ke||(ke=new Intl.DateTimeFormat().resolvedOptions().locale,ke)}const Ot=new Map;function ga(g){let r=Ot.get(g);return r===void 0&&(r=new Intl.DateTimeFormat(g).resolvedOptions(),Ot.set(g,r)),r}const ra=new Map;function le(g){let r=ra.get(g);if(!r){const h=new Intl.Locale(g);r="getWeekInfo"in h?h.getWeekInfo():h.weekInfo,"minimalDays"in r||(r={...ya,...r}),ra.set(g,r)}return r}function ye(g){const r=g.indexOf("-x-");r!==-1&&(g=g.substring(0,r));const h=g.indexOf("-u-");if(h===-1)return[g];{let p,N;try{p=sa(g).resolvedOptions(),N=g}catch{const L=g.substring(0,h);p=sa(L).resolvedOptions(),N=L}const{numberingSystem:C,calendar:U}=p;return[N,C,U]}}function _e(g,r,h){return(h||r)&&(g.includes("-u-")||(g+="-u"),h&&(g+=`-ca-${h}`),r&&(g+=`-nu-${r}`)),g}function Ge(g){const r=[];for(let h=1;h<=12;h++){const p=je.utc(2009,h,1);r.push(g(p))}return r}function Be(g){const r=[];for(let h=1;h<=7;h++){const p=je.utc(2016,11,13+h);r.push(g(p))}return r}function mt(g,r,h,p){const N=g.listingMode();return N==="error"?null:N==="en"?h(r):p(r)}function Dt(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||ga(g.locale).numberingSystem==="latn"}class Rt{constructor(r,h,p){this.padTo=p.padTo||0,this.floor=p.floor||!1;const{padTo:N,floor:C,...U}=p;if(!h||Object.keys(U).length>0){const H={useGrouping:!1,...p};p.padTo>0&&(H.minimumIntegerDigits=p.padTo),this.inf=Rn(r,H)}}format(r){if(this.inf){const h=this.floor?Math.floor(r):r;return this.inf.format(h)}else{const h=this.floor?Math.floor(r):Il(r,3);return it(h,this.padTo)}}}class wt{constructor(r,h,p){this.opts=p,this.originalZone=void 0;let N;if(this.opts.timeZone)this.dt=r;else if(r.zone.type==="fixed"){const U=-1*(r.offset/60),H=U>=0?`Etc/GMT+${U}`:`Etc/GMT${U}`;r.offset!==0&&Me.create(H).valid?(N=H,this.dt=r):(N="UTC",this.dt=r.offset===0?r:r.setZone("UTC").plus({minutes:r.offset}),this.originalZone=r.zone)}else r.zone.type==="system"?this.dt=r:r.zone.type==="iana"?(this.dt=r,N=r.zone.name):(N="UTC",this.dt=r.setZone("UTC").plus({minutes:r.offset}),this.originalZone=r.zone);const C={...this.opts};C.timeZone=C.timeZone||N,this.dtf=sa(h,C)}format(){return this.originalZone?this.formatToParts().map(({value:r})=>r).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const r=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?r.map(h=>{if(h.type==="timeZoneName"){const p=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...h,value:p}}else return h}):r}resolvedOptions(){return this.dtf.resolvedOptions()}}class tn{constructor(r,h,p){this.opts={style:"long",...p},!h&&Vr()&&(this.rtf=xe(r,p))}format(r,h){return this.rtf?this.rtf.format(r,h):wn(h,r,this.opts.numeric,this.opts.style!=="long")}formatToParts(r,h){return this.rtf?this.rtf.formatToParts(r,h):[]}}const ya={firstDay:1,minimalDays:4,weekend:[6,7]};class Fe{static fromOpts(r){return Fe.create(r.locale,r.numberingSystem,r.outputCalendar,r.weekSettings,r.defaultToEN)}static create(r,h,p,N,C=!1){const U=r||xt.defaultLocale,H=U||(C?"en-US":Mt()),L=h||xt.defaultNumberingSystem,fe=p||xt.defaultOutputCalendar,ve=Yr(N)||xt.defaultWeekSettings;return new Fe(H,L,fe,ve,U)}static resetCache(){ke=null,tt.clear(),ma.clear(),xn.clear(),Ot.clear(),ra.clear()}static fromObject({locale:r,numberingSystem:h,outputCalendar:p,weekSettings:N}={}){return Fe.create(r,h,p,N)}constructor(r,h,p,N,C){const[U,H,L]=ye(r);this.locale=U,this.numberingSystem=h||H||null,this.outputCalendar=p||L||null,this.weekSettings=N,this.intl=_e(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=C,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Dt(this)),this.fastNumbersCached}listingMode(){const r=this.isEnglish(),h=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return r&&h?"en":"intl"}clone(r){return!r||Object.getOwnPropertyNames(r).length===0?this:Fe.create(r.locale||this.specifiedLocale,r.numberingSystem||this.numberingSystem,r.outputCalendar||this.outputCalendar,Yr(r.weekSettings)||this.weekSettings,r.defaultToEN||!1)}redefaultToEN(r={}){return this.clone({...r,defaultToEN:!0})}redefaultToSystem(r={}){return this.clone({...r,defaultToEN:!1})}months(r,h=!1){return mt(this,r,vu,()=>{const p=this.intl==="ja"||this.intl.startsWith("ja-");h&=!p;const N=h?{month:r,day:"numeric"}:{month:r},C=h?"format":"standalone";if(!this.monthsCache[C][r]){const U=p?H=>this.dtFormatter(H,N).format():H=>this.extract(H,N,"month");this.monthsCache[C][r]=Ge(U)}return this.monthsCache[C][r]})}weekdays(r,h=!1){return mt(this,r,Ps,()=>{const p=h?{weekday:r,year:"numeric",month:"long",day:"numeric"}:{weekday:r},N=h?"format":"standalone";return this.weekdaysCache[N][r]||(this.weekdaysCache[N][r]=Be(C=>this.extract(C,p,"weekday"))),this.weekdaysCache[N][r]})}meridiems(){return mt(this,void 0,()=>Un,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[je.utc(2016,11,13,9),je.utc(2016,11,13,19)].map(h=>this.extract(h,r,"dayperiod"))}return this.meridiemCache})}eras(r){return mt(this,r,Pr,()=>{const h={era:r};return this.eraCache[r]||(this.eraCache[r]=[je.utc(-40,1,1),je.utc(2017,1,1)].map(p=>this.extract(p,h,"era"))),this.eraCache[r]})}extract(r,h,p){const N=this.dtFormatter(r,h),C=N.formatToParts(),U=C.find(H=>H.type.toLowerCase()===p);return U?U.value:null}numberFormatter(r={}){return new Rt(this.intl,r.forceSimple||this.fastNumbers,r)}dtFormatter(r,h={}){return new wt(r,this.intl,h)}relFormatter(r={}){return new tn(this.intl,this.isEnglish(),r)}listFormatter(r={}){return St(this.intl,r)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||ga(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:bn()?le(this.locale):ya}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(r){return this.locale===r.locale&&this.numberingSystem===r.numberingSystem&&this.outputCalendar===r.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let pn=null;class gt extends ie{static get utcInstance(){return pn===null&&(pn=new gt(0)),pn}static instance(r){return r===0?gt.utcInstance:new gt(r)}static parseSpecifier(r){if(r){const h=r.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(h)return new gt(Jl(h[1],h[2]))}return null}constructor(r){super(),this.fixed=r}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Kl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Kl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(r,h){return Kl(this.fixed,h)}get isUniversal(){return!0}offset(){return this.fixed}equals(r){return r.type==="fixed"&&r.fixed===this.fixed}get isValid(){return!0}}class ia extends ie{constructor(r){super(),this.zoneName=r}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function It(g,r){if(Oe(g)||g===null)return r;if(g instanceof ie)return g;if(qt(g)){const h=g.toLowerCase();return h==="default"?r:h==="local"||h==="system"?Se.instance:h==="utc"||h==="gmt"?gt.utcInstance:gt.parseSpecifier(h)||Me.create(g)}else return ba(g)?gt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new ia(g)}const Xt={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]},ao=Xt.hanidec.replace(/[\[|\]]/g,"").split("");function no(g){let r=parseInt(g,10);if(isNaN(r)){r="";for(let h=0;h<g.length;h++){const p=g.charCodeAt(h);if(g[h].search(Xt.hanidec)!==-1)r+=ao.indexOf(g[h]);else for(const N in cu){const[C,U]=cu[N];p>=C&&p<=U&&(r+=p-C)}}return parseInt(r,10)}else return r}const rl=new Map;function qs(){rl.clear()}function ua({numberingSystem:g},r=""){const h=g||"latn";let p=rl.get(h);p===void 0&&(p=new Map,rl.set(h,p));let N=p.get(r);return N===void 0&&(N=new RegExp(`${Xt[h]}${r}`),p.set(r,N)),N}let vn=()=>Date.now(),Pl="system",il=null,ou=null,qr=null,Ls=60,ul,du=null;class xt{static get now(){return vn}static set now(r){vn=r}static set defaultZone(r){Pl=r}static get defaultZone(){return It(Pl,Se.instance)}static get defaultLocale(){return il}static set defaultLocale(r){il=r}static get defaultNumberingSystem(){return ou}static set defaultNumberingSystem(r){ou=r}static get defaultOutputCalendar(){return qr}static set defaultOutputCalendar(r){qr=r}static get defaultWeekSettings(){return du}static set defaultWeekSettings(r){du=Yr(r)}static get twoDigitCutoffYear(){return Ls}static set twoDigitCutoffYear(r){Ls=r%100}static get throwOnInvalid(){return ul}static set throwOnInvalid(r){ul=r}static resetCaches(){Fe.resetCache(),Me.resetCache(),je.resetCache(),qs()}}class va{constructor(r,h){this.reason=r,this.explanation=h}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Lr=[0,31,59,90,120,151,181,212,243,273,304,334],Bs=[0,31,60,91,121,152,182,213,244,274,305,335];function ca(g,r){return new va("unit out of range",`you specified ${r} (of type ${typeof r}) as a ${g}, which is invalid`)}function Vs(g,r,h){const p=new Date(Date.UTC(g,r-1,h));g<100&&g>=0&&p.setUTCFullYear(p.getUTCFullYear()-1900);const N=p.getUTCDay();return N===0?7:N}function Br(g,r,h){return h+(ol(g)?Bs:Lr)[r-1]}function an(g,r){const h=ol(g)?Bs:Lr,p=h.findIndex(C=>C<r),N=r-h[p];return{month:p+1,day:N}}function At(g,r){return(g-r+7)%7+1}function $t(g,r=4,h=1){const{year:p,month:N,day:C}=g,U=Br(p,N,C),H=At(Vs(p,N,C),h);let L=Math.floor((U-H+14-r)/7),fe;return L<1?(fe=p-1,L=dl(fe,r,h)):L>dl(p,r,h)?(fe=p+1,L=1):fe=p,{weekYear:fe,weekNumber:L,weekday:H,...es(g)}}function An(g,r=4,h=1){const{weekYear:p,weekNumber:N,weekday:C}=g,U=At(Vs(p,1,r),h),H=ln(p);let L=N*7+C-U-7+r,fe;L<1?(fe=p-1,L+=ln(fe)):L>H?(fe=p+1,L-=ln(p)):fe=p;const{month:ve,day:Ue}=an(fe,L);return{year:fe,month:ve,day:Ue,...es(g)}}function Ql(g){const{year:r,month:h,day:p}=g,N=Br(r,h,p);return{year:r,ordinal:N,...es(g)}}function fu(g){const{year:r,ordinal:h}=g,{month:p,day:N}=an(r,h);return{year:r,month:p,day:N,...es(g)}}function hu(g,r){if(!Oe(g.localWeekday)||!Oe(g.localWeekNumber)||!Oe(g.localWeekYear)){if(!Oe(g.weekday)||!Oe(g.weekNumber)||!Oe(g.weekYear))throw new m("Cannot mix locale-based week fields with ISO-based week fields");return Oe(g.localWeekday)||(g.weekday=g.localWeekday),Oe(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),Oe(g.localWeekYear)||(g.weekYear=g.localWeekYear),delete g.localWeekday,delete g.localWeekNumber,delete g.localWeekYear,{minDaysInFirstWeek:r.getMinDaysInFirstWeek(),startOfWeek:r.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function mu(g,r=4,h=1){const p=nn(g.weekYear),N=Jt(g.weekNumber,1,dl(g.weekYear,r,h)),C=Jt(g.weekday,1,7);return p?N?C?!1:ca("weekday",g.weekday):ca("week",g.weekNumber):ca("weekYear",g.weekYear)}function Wl(g){const r=nn(g.year),h=Jt(g.ordinal,1,ln(g.year));return r?h?!1:ca("ordinal",g.ordinal):ca("year",g.year)}function Ys(g){const r=nn(g.year),h=Jt(g.month,1,12),p=Jt(g.day,1,Fs(g.year,g.month));return r?h?p?!1:ca("day",g.day):ca("month",g.month):ca("year",g.year)}function kn(g){const{hour:r,minute:h,second:p,millisecond:N}=g,C=Jt(r,0,23)||r===24&&h===0&&p===0&&N===0,U=Jt(h,0,59),H=Jt(p,0,59),L=Jt(N,0,999);return C?U?H?L?!1:ca("millisecond",N):ca("second",p):ca("minute",h):ca("hour",r)}function Oe(g){return typeof g>"u"}function ba(g){return typeof g=="number"}function nn(g){return typeof g=="number"&&g%1===0}function qt(g){return typeof g=="string"}function gu(g){return Object.prototype.toString.call(g)==="[object Date]"}function Vr(){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 yu(g,r,h){if(g.length!==0)return g.reduce((p,N)=>{const C=[r(N),N];return p&&h(p[0],C[0])===p[0]?p:C},null)[1]}function xu(g,r){return r.reduce((h,p)=>(h[p]=g[p],h),{})}function _n(g,r){return Object.prototype.hasOwnProperty.call(g,r)}function Yr(g){if(g==null)return null;if(typeof g!="object")throw new v("Week settings must be an object");if(!Jt(g.firstDay,1,7)||!Jt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(r=>!Jt(r,1,7)))throw new v("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Jt(g,r,h){return nn(g)&&g>=r&&g<=h}function $s(g,r){return g-r*Math.floor(g/r)}function it(g,r=2){const h=g<0;let p;return h?p="-"+(""+-g).padStart(r,"0"):p=(""+g).padStart(r,"0"),p}function kt(g){if(!(Oe(g)||g===null||g===""))return parseInt(g,10)}function Sn(g){if(!(Oe(g)||g===null||g===""))return parseFloat(g)}function $r(g){if(!(Oe(g)||g===null||g==="")){const r=parseFloat("0."+g)*1e3;return Math.floor(r)}}function Il(g,r,h="round"){const p=10**r;switch(h){case"expand":return g>0?Math.ceil(g*p)/p:Math.floor(g*p)/p;case"trunc":return Math.trunc(g*p)/p;case"round":return Math.round(g*p)/p;case"floor":return Math.floor(g*p)/p;case"ceil":return Math.ceil(g*p)/p;default:throw new RangeError(`Value rounding ${h} is out of range`)}}function ol(g){return g%4===0&&(g%100!==0||g%400===0)}function ln(g){return ol(g)?366:365}function Fs(g,r){const h=$s(r-1,12)+1,p=g+(r-h)/12;return h===2?ol(p)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][h-1]}function Kt(g){let r=Date.UTC(g.year,g.month-1,g.day,g.hour,g.minute,g.second,g.millisecond);return g.year<100&&g.year>=0&&(r=new Date(r),r.setUTCFullYear(g.year,g.month-1,g.day)),+r}function Gs(g,r,h){return-At(Vs(g,1,r),h)+r-1}function dl(g,r=4,h=1){const p=Gs(g,r,h),N=Gs(g+1,r,h);return(ln(g)-p+N)/7}function Xl(g){return g>99?g:g>xt.twoDigitCutoffYear?1900+g:2e3+g}function zn(g,r,h,p=null){const N=new Date(g),C={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};p&&(C.timeZone=p);const U={timeZoneName:r,...C},H=new Intl.DateTimeFormat(h,U).formatToParts(N).find(L=>L.type.toLowerCase()==="timezonename");return H?H.value:null}function Jl(g,r){let h=parseInt(g,10);Number.isNaN(h)&&(h=0);const p=parseInt(r,10)||0,N=h<0||Object.is(h,-0)?-p:p;return h*60+N}function Fr(g){const r=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(r))throw new v(`Invalid unit value ${g}`);return r}function sn(g,r){const h={};for(const p in g)if(_n(g,p)){const N=g[p];if(N==null)continue;h[r(p)]=Fr(N)}return h}function Kl(g,r){const h=Math.trunc(Math.abs(g/60)),p=Math.trunc(Math.abs(g%60)),N=g>=0?"+":"-";switch(r){case"short":return`${N}${it(h,2)}:${it(p,2)}`;case"narrow":return`${N}${h}${p>0?`:${p}`:""}`;case"techie":return`${N}${it(h,2)}${it(p,2)}`;default:throw new RangeError(`Value format ${r} is out of range for property format`)}}function es(g){return xu(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"],lo=["J","F","M","A","M","J","J","A","S","O","N","D"];function vu(g){switch(g){case"narrow":return[...lo];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 ts=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ya=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Gr=["M","T","W","T","F","S","S"];function Ps(g){switch(g){case"narrow":return[...Gr];case"short":return[...Ya];case"long":return[...ts];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Un=["AM","PM"],fl=["Before Christ","Anno Domini"],bu=["BC","AD"],Zr=["B","A"];function Pr(g){switch(g){case"narrow":return[...Zr];case"short":return[...bu];case"long":return[...fl];default:return null}}function as(g){return Un[g.hour<12?0:1]}function rn(g,r){return Ps(r)[g.weekday-1]}function Qr(g,r){return vu(r)[g.month-1]}function ns(g,r){return Pr(r)[g.year<0?0:1]}function wn(g,r,h="always",p=!1){const N={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},C=["hours","minutes","seconds"].indexOf(g)===-1;if(h==="auto"&&C){const Ue=g==="days";switch(r){case 1:return Ue?"tomorrow":`next ${N[g][0]}`;case-1:return Ue?"yesterday":`last ${N[g][0]}`;case 0:return Ue?"today":`this ${N[g][0]}`}}const U=Object.is(r,-0)||r<0,H=Math.abs(r),L=H===1,fe=N[g],ve=p?L?fe[1]:fe[2]||fe[1]:L?N[g][0]:g;return U?`${H} ${ve} ago`:`in ${H} ${ve}`}function Qs(g,r){let h="";for(const p of g)p.literal?h+=p.val:h+=r(p.val);return h}const Ws={D:j,DD:M,DDD:A,DDDD:T,t:V,tt:ne,ttt:Y,tttt:G,T:K,TT:de,TTT:P,TTTT:Z,f:Q,ff:k,fff:ce,ffff:B,F:ae,FF:W,FFF:he,FFFF:$};class Ft{static create(r,h={}){return new Ft(r,h)}static parseFormat(r){let h=null,p="",N=!1;const C=[];for(let U=0;U<r.length;U++){const H=r.charAt(U);H==="'"?((p.length>0||N)&&C.push({literal:N||/^\s+$/.test(p),val:p===""?"'":p}),h=null,p="",N=!N):N||H===h?p+=H:(p.length>0&&C.push({literal:/^\s+$/.test(p),val:p}),p=H,h=H)}return p.length>0&&C.push({literal:N||/^\s+$/.test(p),val:p}),C}static macroTokenToFormatOpts(r){return Ws[r]}constructor(r,h){this.opts=h,this.loc=r,this.systemLoc=null}formatWithSystemDefault(r,h){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(r,{...this.opts,...h}).format()}dtFormatter(r,h={}){return this.loc.dtFormatter(r,{...this.opts,...h})}formatDateTime(r,h){return this.dtFormatter(r,h).format()}formatDateTimeParts(r,h){return this.dtFormatter(r,h).formatToParts()}formatInterval(r,h){return this.dtFormatter(r.start,h).dtf.formatRange(r.start.toJSDate(),r.end.toJSDate())}resolvedOptions(r,h){return this.dtFormatter(r,h).resolvedOptions()}num(r,h=0,p=void 0){if(this.opts.forceSimple)return it(r,h);const N={...this.opts};return h>0&&(N.padTo=h),p&&(N.signDisplay=p),this.loc.numberFormatter(N).format(r)}formatDateTimeFromString(r,h){const p=this.loc.listingMode()==="en",N=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",C=(Re,Et)=>this.loc.extract(r,Re,Et),U=Re=>r.isOffsetFixed&&r.offset===0&&Re.allowZ?"Z":r.isValid?r.zone.formatOffset(r.ts,Re.format):"",H=()=>p?as(r):C({hour:"numeric",hourCycle:"h12"},"dayperiod"),L=(Re,Et)=>p?Qr(r,Re):C(Et?{month:Re}:{month:Re,day:"numeric"},"month"),fe=(Re,Et)=>p?rn(r,Re):C(Et?{weekday:Re}:{weekday:Re,month:"long",day:"numeric"},"weekday"),ve=Re=>{const Et=Ft.macroTokenToFormatOpts(Re);return Et?this.formatWithSystemDefault(r,Et):Re},Ue=Re=>p?ns(r,Re):C({era:Re},"era"),Ie=Re=>{switch(Re){case"S":return this.num(r.millisecond);case"u":case"SSS":return this.num(r.millisecond,3);case"s":return this.num(r.second);case"ss":return this.num(r.second,2);case"uu":return this.num(Math.floor(r.millisecond/10),2);case"uuu":return this.num(Math.floor(r.millisecond/100));case"m":return this.num(r.minute);case"mm":return this.num(r.minute,2);case"h":return this.num(r.hour%12===0?12:r.hour%12);case"hh":return this.num(r.hour%12===0?12:r.hour%12,2);case"H":return this.num(r.hour);case"HH":return this.num(r.hour,2);case"Z":return U({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return U({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return U({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return r.zone.offsetName(r.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return r.zone.offsetName(r.ts,{format:"long",locale:this.loc.locale});case"z":return r.zoneName;case"a":return H();case"d":return N?C({day:"numeric"},"day"):this.num(r.day);case"dd":return N?C({day:"2-digit"},"day"):this.num(r.day,2);case"c":return this.num(r.weekday);case"ccc":return fe("short",!0);case"cccc":return fe("long",!0);case"ccccc":return fe("narrow",!0);case"E":return this.num(r.weekday);case"EEE":return fe("short",!1);case"EEEE":return fe("long",!1);case"EEEEE":return fe("narrow",!1);case"L":return N?C({month:"numeric",day:"numeric"},"month"):this.num(r.month);case"LL":return N?C({month:"2-digit",day:"numeric"},"month"):this.num(r.month,2);case"LLL":return L("short",!0);case"LLLL":return L("long",!0);case"LLLLL":return L("narrow",!0);case"M":return N?C({month:"numeric"},"month"):this.num(r.month);case"MM":return N?C({month:"2-digit"},"month"):this.num(r.month,2);case"MMM":return L("short",!1);case"MMMM":return L("long",!1);case"MMMMM":return L("narrow",!1);case"y":return N?C({year:"numeric"},"year"):this.num(r.year);case"yy":return N?C({year:"2-digit"},"year"):this.num(r.year.toString().slice(-2),2);case"yyyy":return N?C({year:"numeric"},"year"):this.num(r.year,4);case"yyyyyy":return N?C({year:"numeric"},"year"):this.num(r.year,6);case"G":return Ue("short");case"GG":return Ue("long");case"GGGGG":return Ue("narrow");case"kk":return this.num(r.weekYear.toString().slice(-2),2);case"kkkk":return this.num(r.weekYear,4);case"W":return this.num(r.weekNumber);case"WW":return this.num(r.weekNumber,2);case"n":return this.num(r.localWeekNumber);case"nn":return this.num(r.localWeekNumber,2);case"ii":return this.num(r.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(r.localWeekYear,4);case"o":return this.num(r.ordinal);case"ooo":return this.num(r.ordinal,3);case"q":return this.num(r.quarter);case"qq":return this.num(r.quarter,2);case"X":return this.num(Math.floor(r.ts/1e3));case"x":return this.num(r.ts);default:return ve(Re)}};return Qs(Ft.parseFormat(h),Ie)}formatDurationFromString(r,h){const p=this.opts.signMode==="negativeLargestOnly"?-1:1,N=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}},C=(ve,Ue)=>Ie=>{const Re=N(Ie);if(Re){const Et=Ue.isNegativeDuration&&Re!==Ue.largestUnit?p:1;let Zt;return this.opts.signMode==="negativeLargestOnly"&&Re!==Ue.largestUnit?Zt="never":this.opts.signMode==="all"?Zt="always":Zt="auto",this.num(ve.get(Re)*Et,Ie.length,Zt)}else return Ie},U=Ft.parseFormat(h),H=U.reduce((ve,{literal:Ue,val:Ie})=>Ue?ve:ve.concat(Ie),[]),L=r.shiftTo(...H.map(N).filter(ve=>ve)),fe={isNegativeDuration:L<0,largestUnit:Object.keys(L.values)[0]};return Qs(U,C(L,fe))}}const ls=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function un(...g){const r=g.reduce((h,p)=>h+p.source,"");return RegExp(`^${r}$`)}function Hn(...g){return r=>g.reduce(([h,p,N],C)=>{const[U,H,L]=C(r,N);return[{...h,...U},H||p,L]},[{},null,1]).slice(0,2)}function _t(g,...r){if(g==null)return[null,null];for(const[h,p]of r){const N=h.exec(g);if(N)return p(N)}return[null,null]}function Nn(...g){return(r,h)=>{const p={};let N;for(N=0;N<g.length;N++)p[g[N]]=kt(r[h+N]);return[p,null,h+N]}}const ss=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,rs=`(?:${ss.source}?(?:\\[(${ls.source})\\])?)?`,Wr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Is=RegExp(`${Wr.source}${rs}`),is=RegExp(`(?:[Tt]${Is.source})?`),us=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Xs=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Su=/(\d{4})-?(\d{3})/,so=Nn("weekYear","weekNumber","weekDay"),ro=Nn("year","ordinal"),io=/(\d{4})-(\d\d)-(\d\d)/,Js=RegExp(`${Wr.source} ?(?:${ss.source}|(${ls.source}))?`),uo=RegExp(`(?: ${Js.source})?`);function hl(g,r,h){const p=g[r];return Oe(p)?h:kt(p)}function co(g,r){return[{year:hl(g,r),month:hl(g,r+1,1),day:hl(g,r+2,1)},null,r+3]}function ml(g,r){return[{hours:hl(g,r,0),minutes:hl(g,r+1,0),seconds:hl(g,r+2,0),milliseconds:$r(g[r+3])},null,r+4]}function cs(g,r){const h=!g[r]&&!g[r+1],p=Jl(g[r+1],g[r+2]),N=h?null:gt.instance(p);return[{},N,r+3]}function gl(g,r){const h=g[r]?Me.create(g[r]):null;return[{},h,r+1]}const oo=RegExp(`^T?${Wr.source}$`),fo=/^-?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 ho(g){const[r,h,p,N,C,U,H,L,fe]=g,ve=r[0]==="-",Ue=L&&L[0]==="-",Ie=(Re,Et=!1)=>Re!==void 0&&(Et||Re&&ve)?-Re:Re;return[{years:Ie(Sn(h)),months:Ie(Sn(p)),weeks:Ie(Sn(N)),days:Ie(Sn(C)),hours:Ie(Sn(U)),minutes:Ie(Sn(H)),seconds:Ie(Sn(L),L==="-0"),milliseconds:Ie($r(fe),Ue)}]}const mo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function os(g,r,h,p,N,C,U){const H={year:r.length===2?Xl(kt(r)):kt(r),month:Zs.indexOf(h)+1,day:kt(p),hour:kt(N),minute:kt(C)};return U&&(H.second=kt(U)),g&&(H.weekday=g.length>3?ts.indexOf(g)+1:Ya.indexOf(g)+1),H}const go=/^(?:(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 yo(g){const[,r,h,p,N,C,U,H,L,fe,ve,Ue]=g,Ie=os(r,N,p,h,C,U,H);let Re;return L?Re=mo[L]:fe?Re=0:Re=Jl(ve,Ue),[Ie,new gt(Re)]}function xo(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const wu=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,po=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,vo=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Nu(g){const[,r,h,p,N,C,U,H]=g;return[os(r,N,p,h,C,U,H),gt.utcInstance]}function bo(g){const[,r,h,p,N,C,U,H]=g;return[os(r,H,h,p,N,C,U),gt.utcInstance]}const So=un(us,is),wo=un(Xs,is),No=un(Su,is),jo=un(Is),ju=Hn(co,ml,cs,gl),Ir=Hn(so,ml,cs,gl),ds=Hn(ro,ml,cs,gl),Eo=Hn(ml,cs,gl);function Eu(g){return _t(g,[So,ju],[wo,Ir],[No,ds],[jo,Eo])}function Mu(g){return _t(xo(g),[go,yo])}function Tu(g){return _t(g,[wu,Nu],[po,Nu],[vo,bo])}function Cu(g){return _t(g,[fo,ho])}const Ou=Hn(ml);function yl(g){return _t(g,[oo,Ou])}const Mo=un(io,uo),To=un(Js),Co=Hn(ml,cs,gl);function Du(g){return _t(g,[Mo,ju],[To,Co])}const Xr="Invalid Duration",xl={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}},fs={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},...xl},Sa=146097/400,cn=146097/4800,Ru={years:{quarters:4,months:12,weeks:Sa/7,days:Sa,hours:Sa*24,minutes:Sa*24*60,seconds:Sa*24*60*60,milliseconds:Sa*24*60*60*1e3},quarters:{months:3,weeks:Sa/28,days:Sa/4,hours:Sa*24/4,minutes:Sa*24*60/4,seconds:Sa*24*60*60/4,milliseconds:Sa*24*60*60*1e3/4},months:{weeks:cn/7,days:cn,hours:cn*24,minutes:cn*24*60,seconds:cn*24*60*60,milliseconds:cn*24*60*60*1e3},...xl},jn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Jr=jn.slice(0).reverse();function Ra(g,r,h=!1){const p={values:h?r.values:{...g.values,...r.values||{}},loc:g.loc.clone(r.loc),conversionAccuracy:r.conversionAccuracy||g.conversionAccuracy,matrix:r.matrix||g.matrix};return new We(p)}function Kr(g,r){var h;let p=(h=r.milliseconds)!=null?h:0;for(const N of Jr.slice(1))r[N]&&(p+=r[N]*g[N].milliseconds);return p}function ei(g,r){const h=Kr(g,r)<0?-1:1;jn.reduceRight((p,N)=>{if(Oe(r[N]))return p;if(p){const C=r[p]*h,U=g[N][p],H=Math.floor(C/U);r[N]+=H*h,r[p]-=H*U*h}return N},null),jn.reduce((p,N)=>{if(Oe(r[N]))return p;if(p){const C=r[p]%1;r[p]-=C,r[N]+=C*g[p][N]}return N},null)}function ti(g){const r={};for(const[h,p]of Object.entries(g))p!==0&&(r[h]=p);return r}class We{constructor(r){const h=r.conversionAccuracy==="longterm"||!1;let p=h?Ru:fs;r.matrix&&(p=r.matrix),this.values=r.values,this.loc=r.loc||Fe.create(),this.conversionAccuracy=h?"longterm":"casual",this.invalid=r.invalid||null,this.matrix=p,this.isLuxonDuration=!0}static fromMillis(r,h){return We.fromObject({milliseconds:r},h)}static fromObject(r,h={}){if(r==null||typeof r!="object")throw new v(`Duration.fromObject: argument expected to be an object, got ${r===null?"null":typeof r}`);return new We({values:sn(r,We.normalizeUnit),loc:Fe.fromObject(h),conversionAccuracy:h.conversionAccuracy,matrix:h.matrix})}static fromDurationLike(r){if(ba(r))return We.fromMillis(r);if(We.isDuration(r))return r;if(typeof r=="object")return We.fromObject(r);throw new v(`Unknown duration argument ${r} of type ${typeof r}`)}static fromISO(r,h){const[p]=Cu(r);return p?We.fromObject(p,h):We.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static fromISOTime(r,h){const[p]=yl(r);return p?We.fromObject(p,h):We.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the Duration is invalid");const p=r instanceof va?r:new va(r,h);if(xt.throwOnInvalid)throw new c(p);return new We({invalid:p})}static normalizeUnit(r){const h={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[r&&r.toLowerCase()];if(!h)throw new f(r);return h}static isDuration(r){return r&&r.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(r,h={}){const p={...h,floor:h.round!==!1&&h.floor!==!1};return this.isValid?Ft.create(this.loc,p).formatDurationFromString(this,r):Xr}toHuman(r={}){if(!this.isValid)return Xr;const h=r.showZeros!==!1,p=jn.map(N=>{const C=this.values[N];return Oe(C)||C===0&&!h?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...r,unit:N.slice(0,-1)}).format(C)}).filter(N=>N);return this.loc.listFormatter({type:"conjunction",style:r.listStyle||"narrow",...r}).format(p)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let r="P";return this.years!==0&&(r+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(r+=this.months+this.quarters*3+"M"),this.weeks!==0&&(r+=this.weeks+"W"),this.days!==0&&(r+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(r+="T"),this.hours!==0&&(r+=this.hours+"H"),this.minutes!==0&&(r+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(r+=Il(this.seconds+this.milliseconds/1e3,3)+"S"),r==="P"&&(r+="T0S"),r}toISOTime(r={}){if(!this.isValid)return null;const h=this.toMillis();return h<0||h>=864e5?null:(r={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...r,includeOffset:!1},je.fromMillis(h,{zone:"UTC"}).toISOTime(r))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Kr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(r){if(!this.isValid)return this;const h=We.fromDurationLike(r),p={};for(const N of jn)(_n(h.values,N)||_n(this.values,N))&&(p[N]=h.get(N)+this.get(N));return Ra(this,{values:p},!0)}minus(r){if(!this.isValid)return this;const h=We.fromDurationLike(r);return this.plus(h.negate())}mapUnits(r){if(!this.isValid)return this;const h={};for(const p of Object.keys(this.values))h[p]=Fr(r(this.values[p],p));return Ra(this,{values:h},!0)}get(r){return this[We.normalizeUnit(r)]}set(r){if(!this.isValid)return this;const h={...this.values,...sn(r,We.normalizeUnit)};return Ra(this,{values:h})}reconfigure({locale:r,numberingSystem:h,conversionAccuracy:p,matrix:N}={}){const U={loc:this.loc.clone({locale:r,numberingSystem:h}),matrix:N,conversionAccuracy:p};return Ra(this,U)}as(r){return this.isValid?this.shiftTo(r).get(r):NaN}normalize(){if(!this.isValid)return this;const r=this.toObject();return ei(this.matrix,r),Ra(this,{values:r},!0)}rescale(){if(!this.isValid)return this;const r=ti(this.normalize().shiftToAll().toObject());return Ra(this,{values:r},!0)}shiftTo(...r){if(!this.isValid)return this;if(r.length===0)return this;r=r.map(U=>We.normalizeUnit(U));const h={},p={},N=this.toObject();let C;for(const U of jn)if(r.indexOf(U)>=0){C=U;let H=0;for(const fe in p)H+=this.matrix[fe][U]*p[fe],p[fe]=0;ba(N[U])&&(H+=N[U]);const L=Math.trunc(H);h[U]=L,p[U]=(H*1e3-L*1e3)/1e3}else ba(N[U])&&(p[U]=N[U]);for(const U in p)p[U]!==0&&(h[C]+=U===C?p[U]:p[U]/this.matrix[C][U]);return ei(this.matrix,h),Ra(this,{values:h},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const r={};for(const h of Object.keys(this.values))r[h]=this.values[h]===0?0:-this.values[h];return Ra(this,{values:r},!0)}removeZeros(){if(!this.isValid)return this;const r=ti(this.values);return Ra(this,{values:r},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(r){if(!this.isValid||!r.isValid||!this.loc.equals(r.loc))return!1;function h(p,N){return p===void 0||p===0?N===void 0||N===0:p===N}for(const p of jn)if(!h(this.values[p],r.values[p]))return!1;return!0}}const pl="Invalid Interval";function Oo(g,r){return!g||!g.isValid?vt.invalid("missing or invalid start"):!r||!r.isValid?vt.invalid("missing or invalid end"):r<g?vt.invalid("end before start",`The end of an interval must be after its start, but you had start=${g.toISO()} and end=${r.toISO()}`):null}class vt{constructor(r){this.s=r.start,this.e=r.end,this.invalid=r.invalid||null,this.isLuxonInterval=!0}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the Interval is invalid");const p=r instanceof va?r:new va(r,h);if(xt.throwOnInvalid)throw new o(p);return new vt({invalid:p})}static fromDateTimes(r,h){const p=ja(r),N=ja(h),C=Oo(p,N);return C??new vt({start:p,end:N})}static after(r,h){const p=We.fromDurationLike(h),N=ja(r);return vt.fromDateTimes(N,N.plus(p))}static before(r,h){const p=We.fromDurationLike(h),N=ja(r);return vt.fromDateTimes(N.minus(p),N)}static fromISO(r,h){const[p,N]=(r||"").split("/",2);if(p&&N){let C,U;try{C=je.fromISO(p,h),U=C.isValid}catch{U=!1}let H,L;try{H=je.fromISO(N,h),L=H.isValid}catch{L=!1}if(U&&L)return vt.fromDateTimes(C,H);if(U){const fe=We.fromISO(N,h);if(fe.isValid)return vt.after(C,fe)}else if(L){const fe=We.fromISO(p,h);if(fe.isValid)return vt.before(H,fe)}}return vt.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static isInterval(r){return r&&r.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(r="milliseconds"){return this.isValid?this.toDuration(r).get(r):NaN}count(r="milliseconds",h){if(!this.isValid)return NaN;const p=this.start.startOf(r,h);let N;return h!=null&&h.useLocaleWeeks?N=this.end.reconfigure({locale:p.locale}):N=this.end,N=N.startOf(r,h),Math.floor(N.diff(p,r).get(r))+(N.valueOf()!==this.end.valueOf())}hasSame(r){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,r):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(r){return this.isValid?this.s>r:!1}isBefore(r){return this.isValid?this.e<=r:!1}contains(r){return this.isValid?this.s<=r&&this.e>r:!1}set({start:r,end:h}={}){return this.isValid?vt.fromDateTimes(r||this.s,h||this.e):this}splitAt(...r){if(!this.isValid)return[];const h=r.map(ja).filter(U=>this.contains(U)).sort((U,H)=>U.toMillis()-H.toMillis()),p=[];let{s:N}=this,C=0;for(;N<this.e;){const U=h[C]||this.e,H=+U>+this.e?this.e:U;p.push(vt.fromDateTimes(N,H)),N=H,C+=1}return p}splitBy(r){const h=We.fromDurationLike(r);if(!this.isValid||!h.isValid||h.as("milliseconds")===0)return[];let{s:p}=this,N=1,C;const U=[];for(;p<this.e;){const H=this.start.plus(h.mapUnits(L=>L*N));C=+H>+this.e?this.e:H,U.push(vt.fromDateTimes(p,C)),p=C,N+=1}return U}divideEqually(r){return this.isValid?this.splitBy(this.length()/r).slice(0,r):[]}overlaps(r){return this.e>r.s&&this.s<r.e}abutsStart(r){return this.isValid?+this.e==+r.s:!1}abutsEnd(r){return this.isValid?+r.e==+this.s:!1}engulfs(r){return this.isValid?this.s<=r.s&&this.e>=r.e:!1}equals(r){return!this.isValid||!r.isValid?!1:this.s.equals(r.s)&&this.e.equals(r.e)}intersection(r){if(!this.isValid)return this;const h=this.s>r.s?this.s:r.s,p=this.e<r.e?this.e:r.e;return h>=p?null:vt.fromDateTimes(h,p)}union(r){if(!this.isValid)return this;const h=this.s<r.s?this.s:r.s,p=this.e>r.e?this.e:r.e;return vt.fromDateTimes(h,p)}static merge(r){const[h,p]=r.sort((N,C)=>N.s-C.s).reduce(([N,C],U)=>C?C.overlaps(U)||C.abutsStart(U)?[N,C.union(U)]:[N.concat([C]),U]:[N,U],[[],null]);return p&&h.push(p),h}static xor(r){let h=null,p=0;const N=[],C=r.map(L=>[{time:L.s,type:"s"},{time:L.e,type:"e"}]),U=Array.prototype.concat(...C),H=U.sort((L,fe)=>L.time-fe.time);for(const L of H)p+=L.type==="s"?1:-1,p===1?h=L.time:(h&&+h!=+L.time&&N.push(vt.fromDateTimes(h,L.time)),h=null);return vt.merge(N)}difference(...r){return vt.xor([this].concat(r)).map(h=>this.intersection(h)).filter(h=>h&&!h.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`: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(r=j,h={}){return this.isValid?Ft.create(this.s.loc.clone(h),r).formatInterval(this):pl}toISO(r){return this.isValid?`${this.s.toISO(r)}/${this.e.toISO(r)}`:pl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:pl}toISOTime(r){return this.isValid?`${this.s.toISOTime(r)}/${this.e.toISOTime(r)}`:pl}toFormat(r,{separator:h=" – "}={}){return this.isValid?`${this.s.toFormat(r)}${h}${this.e.toFormat(r)}`:pl}toDuration(r,h){return this.isValid?this.e.diff(this.s,r,h):We.invalid(this.invalidReason)}mapEndpoints(r){return vt.fromDateTimes(r(this.s),r(this.e))}}class hs{static hasDST(r=xt.defaultZone){const h=je.now().setZone(r).set({month:12});return!r.isUniversal&&h.offset!==h.set({month:6}).offset}static isValidIANAZone(r){return Me.isValidZone(r)}static normalizeZone(r){return It(r,xt.defaultZone)}static getStartOfWeek({locale:r=null,locObj:h=null}={}){return(h||Fe.create(r)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:r=null,locObj:h=null}={}){return(h||Fe.create(r)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:r=null,locObj:h=null}={}){return(h||Fe.create(r)).getWeekendDays().slice()}static months(r="long",{locale:h=null,numberingSystem:p=null,locObj:N=null,outputCalendar:C="gregory"}={}){return(N||Fe.create(h,p,C)).months(r)}static monthsFormat(r="long",{locale:h=null,numberingSystem:p=null,locObj:N=null,outputCalendar:C="gregory"}={}){return(N||Fe.create(h,p,C)).months(r,!0)}static weekdays(r="long",{locale:h=null,numberingSystem:p=null,locObj:N=null}={}){return(N||Fe.create(h,p,null)).weekdays(r)}static weekdaysFormat(r="long",{locale:h=null,numberingSystem:p=null,locObj:N=null}={}){return(N||Fe.create(h,p,null)).weekdays(r,!0)}static meridiems({locale:r=null}={}){return Fe.create(r).meridiems()}static eras(r="short",{locale:h=null}={}){return Fe.create(h,null,"gregory").eras(r)}static features(){return{relative:Vr(),localeWeek:bn()}}}function oa(g,r){const h=N=>N.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),p=h(r)-h(g);return Math.floor(We.fromMillis(p).as("days"))}function ms(g,r,h){const p=[["years",(L,fe)=>fe.year-L.year],["quarters",(L,fe)=>fe.quarter-L.quarter+(fe.year-L.year)*4],["months",(L,fe)=>fe.month-L.month+(fe.year-L.year)*12],["weeks",(L,fe)=>{const ve=oa(L,fe);return(ve-ve%7)/7}],["days",oa]],N={},C=g;let U,H;for(const[L,fe]of p)h.indexOf(L)>=0&&(U=L,N[L]=fe(g,r),H=C.plus(N),H>r?(N[L]--,g=C.plus(N),g>r&&(H=g,N[L]--,g=C.plus(N))):g=H);return[g,N,H,U]}function Au(g,r,h,p){let[N,C,U,H]=ms(g,r,h);const L=r-N,fe=h.filter(Ue=>["hours","minutes","seconds","milliseconds"].indexOf(Ue)>=0);fe.length===0&&(U<r&&(U=N.plus({[H]:1})),U!==N&&(C[H]=(C[H]||0)+L/(U-N)));const ve=We.fromObject(C,p);return fe.length>0?We.fromMillis(L,p).shiftTo(...fe).plus(ve):ve}const ku="missing Intl.DateTimeFormat.formatToParts support";function Ke(g,r=h=>h){return{regex:g,deser:([h])=>r(no(h))}}const Ks="[ ]",_u=new RegExp(Ks,"g");function vl(g){return g.replace(/\./g,"\\.?").replace(_u,Ks)}function er(g){return g.replace(/\./g,"").replace(_u," ").toLowerCase()}function ea(g,r){return g===null?null:{regex:RegExp(g.map(vl).join("|")),deser:([h])=>g.findIndex(p=>er(h)===er(p))+r}}function tr(g,r){return{regex:g,deser:([,h,p])=>Jl(h,p),groups:r}}function gs(g){return{regex:g,deser:([r])=>r}}function qn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function bl(g,r){const h=ua(r),p=ua(r,"{2}"),N=ua(r,"{3}"),C=ua(r,"{4}"),U=ua(r,"{6}"),H=ua(r,"{1,2}"),L=ua(r,"{1,3}"),fe=ua(r,"{1,6}"),ve=ua(r,"{1,9}"),Ue=ua(r,"{2,4}"),Ie=ua(r,"{4,6}"),Re=Pt=>({regex:RegExp(qn(Pt.val)),deser:([En])=>En,literal:!0}),Zt=(Pt=>{if(g.literal)return Re(Pt);switch(Pt.val){case"G":return ea(r.eras("short"),0);case"GG":return ea(r.eras("long"),0);case"y":return Ke(fe);case"yy":return Ke(Ue,Xl);case"yyyy":return Ke(C);case"yyyyy":return Ke(Ie);case"yyyyyy":return Ke(U);case"M":return Ke(H);case"MM":return Ke(p);case"MMM":return ea(r.months("short",!0),1);case"MMMM":return ea(r.months("long",!0),1);case"L":return Ke(H);case"LL":return Ke(p);case"LLL":return ea(r.months("short",!1),1);case"LLLL":return ea(r.months("long",!1),1);case"d":return Ke(H);case"dd":return Ke(p);case"o":return Ke(L);case"ooo":return Ke(N);case"HH":return Ke(p);case"H":return Ke(H);case"hh":return Ke(p);case"h":return Ke(H);case"mm":return Ke(p);case"m":return Ke(H);case"q":return Ke(H);case"qq":return Ke(p);case"s":return Ke(H);case"ss":return Ke(p);case"S":return Ke(L);case"SSS":return Ke(N);case"u":return gs(ve);case"uu":return gs(H);case"uuu":return Ke(h);case"a":return ea(r.meridiems(),0);case"kkkk":return Ke(C);case"kk":return Ke(Ue,Xl);case"W":return Ke(H);case"WW":return Ke(p);case"E":case"c":return Ke(h);case"EEE":return ea(r.weekdays("short",!1),1);case"EEEE":return ea(r.weekdays("long",!1),1);case"ccc":return ea(r.weekdays("short",!0),1);case"cccc":return ea(r.weekdays("long",!0),1);case"Z":case"ZZ":return tr(new RegExp(`([+-]${H.source})(?::(${p.source}))?`),2);case"ZZZ":return tr(new RegExp(`([+-]${H.source})(${p.source})?`),2);case"z":return gs(/[a-z_+-/]{1,256}?/i);case" ":return gs(/[^\S\n\r]/);default:return Re(Pt)}})(g)||{invalidReason:ku};return Zt.token=g,Zt}const ai={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function zu(g,r,h){const{type:p,value:N}=g;if(p==="literal"){const L=/^\s+$/.test(N);return{literal:!L,val:L?" ":N}}const C=r[p];let U=p;p==="hour"&&(r.hour12!=null?U=r.hour12?"hour12":"hour24":r.hourCycle!=null?r.hourCycle==="h11"||r.hourCycle==="h12"?U="hour12":U="hour24":U=h.hour12?"hour12":"hour24");let H=ai[U];if(typeof H=="object"&&(H=H[C]),H)return{literal:!1,val:H}}function Ln(g){return[`^${g.map(h=>h.regex).reduce((h,p)=>`${h}(${p.source})`,"")}$`,g]}function Uu(g,r,h){const p=g.match(r);if(p){const N={};let C=1;for(const U in h)if(_n(h,U)){const H=h[U],L=H.groups?H.groups+1:1;!H.literal&&H.token&&(N[H.token.val[0]]=H.deser(p.slice(C,C+L))),C+=L}return[p,N]}else return[p,{}]}function Hu(g){const r=C=>{switch(C){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let h=null,p;return Oe(g.z)||(h=Me.create(g.z)),Oe(g.Z)||(h||(h=new gt(g.Z)),p=g.Z),Oe(g.q)||(g.M=(g.q-1)*3+1),Oe(g.h)||(g.h<12&&g.a===1?g.h+=12:g.h===12&&g.a===0&&(g.h=0)),g.G===0&&g.y&&(g.y=-g.y),Oe(g.u)||(g.S=$r(g.u)),[Object.keys(g).reduce((C,U)=>{const H=r(U);return H&&(C[H]=g[U]),C},{}),h,p]}let ar=null;function Ro(){return ar||(ar=je.fromMillis(1555555555555)),ar}function Ao(g,r){if(g.literal)return g;const h=Ft.macroTokenToFormatOpts(g.val),p=wa(h,r);return p==null||p.includes(void 0)?g:p}function qu(g,r){return Array.prototype.concat(...g.map(h=>Ao(h,r)))}class ni{constructor(r,h){if(this.locale=r,this.format=h,this.tokens=qu(Ft.parseFormat(h),r),this.units=this.tokens.map(p=>bl(p,r)),this.disqualifyingUnit=this.units.find(p=>p.invalidReason),!this.disqualifyingUnit){const[p,N]=Ln(this.units);this.regex=RegExp(p,"i"),this.handlers=N}}explainFromTokens(r){if(this.isValid){const[h,p]=Uu(r,this.regex,this.handlers),[N,C,U]=p?Hu(p):[null,null,void 0];if(_n(p,"a")&&_n(p,"H"))throw new m("Can't include meridiem when specifying 24-hour format");return{input:r,tokens:this.tokens,regex:this.regex,rawMatches:h,matches:p,result:N,zone:C,specificOffset:U}}else return{input:r,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function li(g,r,h){return new ni(g,h).explainFromTokens(r)}function si(g,r,h){const{result:p,zone:N,specificOffset:C,invalidReason:U}=li(g,r,h);return[p,N,C,U]}function wa(g,r){if(!g)return null;const p=Ft.create(r,g).dtFormatter(Ro()),N=p.formatToParts(),C=p.resolvedOptions();return N.map(U=>zu(U,g,C))}const Sl="Invalid DateTime",xa=864e13;function $a(g){return new va("unsupported zone",`the zone "${g.name}" is not supported`)}function ys(g){return g.weekData===null&&(g.weekData=$t(g.c)),g.weekData}function wl(g){return g.localWeekData===null&&(g.localWeekData=$t(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function Fa(g,r){const h={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new je({...h,...r,old:h})}function nr(g,r,h){let p=g-r*60*1e3;const N=h.offset(p);if(r===N)return[p,r];p-=(N-r)*60*1e3;const C=h.offset(p);return N===C?[p,N]:[g-Math.min(N,C)*60*1e3,Math.max(N,C)]}function Ga(g,r){g+=r*60*1e3;const h=new Date(g);return{year:h.getUTCFullYear(),month:h.getUTCMonth()+1,day:h.getUTCDate(),hour:h.getUTCHours(),minute:h.getUTCMinutes(),second:h.getUTCSeconds(),millisecond:h.getUTCMilliseconds()}}function xs(g,r,h){return nr(Kt(g),r,h)}function ps(g,r){const h=g.o,p=g.c.year+Math.trunc(r.years),N=g.c.month+Math.trunc(r.months)+Math.trunc(r.quarters)*3,C={...g.c,year:p,month:N,day:Math.min(g.c.day,Fs(p,N))+Math.trunc(r.days)+Math.trunc(r.weeks)*7},U=We.fromObject({years:r.years-Math.trunc(r.years),quarters:r.quarters-Math.trunc(r.quarters),months:r.months-Math.trunc(r.months),weeks:r.weeks-Math.trunc(r.weeks),days:r.days-Math.trunc(r.days),hours:r.hours,minutes:r.minutes,seconds:r.seconds,milliseconds:r.milliseconds}).as("milliseconds"),H=Kt(C);let[L,fe]=nr(H,h,g.zone);return U!==0&&(L+=U,fe=g.zone.offset(L)),{ts:L,o:fe}}function Aa(g,r,h,p,N,C){const{setZone:U,zone:H}=h;if(g&&Object.keys(g).length!==0||r){const L=r||H,fe=je.fromObject(g,{...h,zone:L,specificOffset:C});return U?fe:fe.setZone(H)}else return je.invalid(new va("unparsable",`the input "${N}" can't be parsed as ${p}`))}function lr(g,r,h=!0){return g.isValid?Ft.create(Fe.create("en-US"),{allowZ:h,forceSimple:!0}).formatDateTimeFromString(g,r):null}function ta(g,r,h){const p=g.c.year>9999||g.c.year<0;let N="";if(p&&g.c.year>=0&&(N+="+"),N+=it(g.c.year,p?6:4),h==="year")return N;if(r){if(N+="-",N+=it(g.c.month),h==="month")return N;N+="-"}else if(N+=it(g.c.month),h==="month")return N;return N+=it(g.c.day),N}function sr(g,r,h,p,N,C,U){let H=!h||g.c.millisecond!==0||g.c.second!==0,L="";switch(U){case"day":case"month":case"year":break;default:if(L+=it(g.c.hour),U==="hour")break;if(r){if(L+=":",L+=it(g.c.minute),U==="minute")break;H&&(L+=":",L+=it(g.c.second))}else{if(L+=it(g.c.minute),U==="minute")break;H&&(L+=it(g.c.second))}if(U==="second")break;H&&(!p||g.c.millisecond!==0)&&(L+=".",L+=it(g.c.millisecond,3))}return N&&(g.isOffsetFixed&&g.offset===0&&!C?L+="Z":g.o<0?(L+="-",L+=it(Math.trunc(-g.o/60)),L+=":",L+=it(Math.trunc(-g.o%60))):(L+="+",L+=it(Math.trunc(g.o/60)),L+=":",L+=it(Math.trunc(g.o%60)))),C&&(L+="["+g.zone.ianaName+"]"),L}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},rr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Pa=["year","month","day","hour","minute","second","millisecond"],ri=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Bu=["year","ordinal","hour","minute","second","millisecond"];function Nl(g){const r={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[g.toLowerCase()];if(!r)throw new f(g);return r}function ii(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Nl(g)}}function Na(g){if(on===void 0&&(on=xt.now()),g.type!=="iana")return g.offset(on);const r=g.name;let h=da.get(r);return h===void 0&&(h=g.offset(on),da.set(r,h)),h}function Bn(g,r){const h=It(r.zone,xt.defaultZone);if(!h.isValid)return je.invalid($a(h));const p=Fe.fromObject(r);let N,C;if(Oe(g.year))N=xt.now();else{for(const L of Pa)Oe(g[L])&&(g[L]=Za[L]);const U=Ys(g)||kn(g);if(U)return je.invalid(U);const H=Na(h);[N,C]=xs(g,H,h)}return new je({ts:N,zone:h,loc:p,o:C})}function Vn(g,r,h){const p=Oe(h.round)?!0:h.round,N=Oe(h.rounding)?"trunc":h.rounding,C=(H,L)=>(H=Il(H,p||h.calendary?0:2,h.calendary?"round":N),r.loc.clone(h).relFormatter(h).format(H,L)),U=H=>h.calendary?r.hasSame(g,H)?0:r.startOf(H).diff(g.startOf(H),H).get(H):r.diff(g,H).get(H);if(h.unit)return C(U(h.unit),h.unit);for(const H of h.units){const L=U(H);if(Math.abs(L)>=1)return C(L,H)}return C(g>r?-0:0,h.units[h.units.length-1])}function vs(g){let r={},h;return g.length>0&&typeof g[g.length-1]=="object"?(r=g[g.length-1],h=Array.from(g).slice(0,g.length-1)):h=Array.from(g),[r,h]}let on;const da=new Map;class je{constructor(r){const h=r.zone||xt.defaultZone;let p=r.invalid||(Number.isNaN(r.ts)?new va("invalid input"):null)||(h.isValid?null:$a(h));this.ts=Oe(r.ts)?xt.now():r.ts;let N=null,C=null;if(!p)if(r.old&&r.old.ts===this.ts&&r.old.zone.equals(h))[N,C]=[r.old.c,r.old.o];else{const H=ba(r.o)&&!r.old?r.o:h.offset(this.ts);N=Ga(this.ts,H),p=Number.isNaN(N.year)?new va("invalid input"):null,N=p?null:N,C=p?null:H}this._zone=h,this.loc=r.loc||Fe.create(),this.invalid=p,this.weekData=null,this.localWeekData=null,this.c=N,this.o=C,this.isLuxonDateTime=!0}static now(){return new je({})}static local(){const[r,h]=vs(arguments),[p,N,C,U,H,L,fe]=h;return Bn({year:p,month:N,day:C,hour:U,minute:H,second:L,millisecond:fe},r)}static utc(){const[r,h]=vs(arguments),[p,N,C,U,H,L,fe]=h;return r.zone=gt.utcInstance,Bn({year:p,month:N,day:C,hour:U,minute:H,second:L,millisecond:fe},r)}static fromJSDate(r,h={}){const p=gu(r)?r.valueOf():NaN;if(Number.isNaN(p))return je.invalid("invalid input");const N=It(h.zone,xt.defaultZone);return N.isValid?new je({ts:p,zone:N,loc:Fe.fromObject(h)}):je.invalid($a(N))}static fromMillis(r,h={}){if(ba(r))return r<-xa||r>xa?je.invalid("Timestamp out of range"):new je({ts:r,zone:It(h.zone,xt.defaultZone),loc:Fe.fromObject(h)});throw new v(`fromMillis requires a numerical input, but received a ${typeof r} with value ${r}`)}static fromSeconds(r,h={}){if(ba(r))return new je({ts:r*1e3,zone:It(h.zone,xt.defaultZone),loc:Fe.fromObject(h)});throw new v("fromSeconds requires a numerical input")}static fromObject(r,h={}){r=r||{};const p=It(h.zone,xt.defaultZone);if(!p.isValid)return je.invalid($a(p));const N=Fe.fromObject(h),C=sn(r,ii),{minDaysInFirstWeek:U,startOfWeek:H}=hu(C,N),L=xt.now(),fe=Oe(h.specificOffset)?p.offset(L):h.specificOffset,ve=!Oe(C.ordinal),Ue=!Oe(C.year),Ie=!Oe(C.month)||!Oe(C.day),Re=Ue||Ie,Et=C.weekYear||C.weekNumber;if((Re||ve)&&Et)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Ie&&ve)throw new m("Can't mix ordinal dates with month/day");const Zt=Et||C.weekday&&!Re;let Pt,En,dn=Ga(L,fe);Zt?(Pt=ri,En=Lu,dn=$t(dn,U,H)):ve?(Pt=Bu,En=rr,dn=Ql(dn)):(Pt=Pa,En=Za);let ir=!1;for(const Ia of Pt){const ur=C[Ia];Oe(ur)?ir?C[Ia]=En[Ia]:C[Ia]=dn[Ia]:ir=!0}const Yn=Zt?mu(C,U,H):ve?Wl(C):Ys(C),Wa=Yn||kn(C);if(Wa)return je.invalid(Wa);const Mn=Zt?An(C,U,H):ve?fu(C):C,[fn,ui]=xs(Mn,fe,p),$n=new je({ts:fn,zone:p,o:ui,loc:N});return C.weekday&&Re&&r.weekday!==$n.weekday?je.invalid("mismatched weekday",`you can't specify both a weekday of ${C.weekday} and a date of ${$n.toISO()}`):$n.isValid?$n:je.invalid($n.invalid)}static fromISO(r,h={}){const[p,N]=Eu(r);return Aa(p,N,h,"ISO 8601",r)}static fromRFC2822(r,h={}){const[p,N]=Mu(r);return Aa(p,N,h,"RFC 2822",r)}static fromHTTP(r,h={}){const[p,N]=Tu(r);return Aa(p,N,h,"HTTP",h)}static fromFormat(r,h,p={}){if(Oe(r)||Oe(h))throw new v("fromFormat requires an input string and a format");const{locale:N=null,numberingSystem:C=null}=p,U=Fe.fromOpts({locale:N,numberingSystem:C,defaultToEN:!0}),[H,L,fe,ve]=si(U,r,h);return ve?je.invalid(ve):Aa(H,L,p,`format ${h}`,r,fe)}static fromString(r,h,p={}){return je.fromFormat(r,h,p)}static fromSQL(r,h={}){const[p,N]=Du(r);return Aa(p,N,h,"SQL",r)}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the DateTime is invalid");const p=r instanceof va?r:new va(r,h);if(xt.throwOnInvalid)throw new i(p);return new je({invalid:p})}static isDateTime(r){return r&&r.isLuxonDateTime||!1}static parseFormatForOpts(r,h={}){const p=wa(r,Fe.fromObject(h));return p?p.map(N=>N?N.val:null).join(""):null}static expandFormat(r,h={}){return qu(Ft.parseFormat(r),Fe.fromObject(h)).map(N=>N.val).join("")}static resetCache(){on=void 0,da.clear()}get(r){return this[r]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?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?wl(this).weekday:NaN}get localWeekNumber(){return this.isValid?wl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?wl(this).weekYear:NaN}get ordinal(){return this.isValid?Ql(this.c).ordinal:NaN}get monthShort(){return this.isValid?hs.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?hs.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?hs.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?hs.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const r=864e5,h=6e4,p=Kt(this.c),N=this.zone.offset(p-r),C=this.zone.offset(p+r),U=this.zone.offset(p-N*h),H=this.zone.offset(p-C*h);if(U===H)return[this];const L=p-U*h,fe=p-H*h,ve=Ga(L,U),Ue=Ga(fe,H);return ve.hour===Ue.hour&&ve.minute===Ue.minute&&ve.second===Ue.second&&ve.millisecond===Ue.millisecond?[Fa(this,{ts:L}),Fa(this,{ts:fe})]:[this]}get isInLeapYear(){return ol(this.year)}get daysInMonth(){return Fs(this.year,this.month)}get daysInYear(){return this.isValid?ln(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(r={}){const{locale:h,numberingSystem:p,calendar:N}=Ft.create(this.loc.clone(r),r).resolvedOptions(this);return{locale:h,numberingSystem:p,outputCalendar:N}}toUTC(r=0,h={}){return this.setZone(gt.instance(r),h)}toLocal(){return this.setZone(xt.defaultZone)}setZone(r,{keepLocalTime:h=!1,keepCalendarTime:p=!1}={}){if(r=It(r,xt.defaultZone),r.equals(this.zone))return this;if(r.isValid){let N=this.ts;if(h||p){const C=r.offset(this.ts),U=this.toObject();[N]=xs(U,C,r)}return Fa(this,{ts:N,zone:r})}else return je.invalid($a(r))}reconfigure({locale:r,numberingSystem:h,outputCalendar:p}={}){const N=this.loc.clone({locale:r,numberingSystem:h,outputCalendar:p});return Fa(this,{loc:N})}setLocale(r){return this.reconfigure({locale:r})}set(r){if(!this.isValid)return this;const h=sn(r,ii),{minDaysInFirstWeek:p,startOfWeek:N}=hu(h,this.loc),C=!Oe(h.weekYear)||!Oe(h.weekNumber)||!Oe(h.weekday),U=!Oe(h.ordinal),H=!Oe(h.year),L=!Oe(h.month)||!Oe(h.day),fe=H||L,ve=h.weekYear||h.weekNumber;if((fe||U)&&ve)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(L&&U)throw new m("Can't mix ordinal dates with month/day");let Ue;C?Ue=An({...$t(this.c,p,N),...h},p,N):Oe(h.ordinal)?(Ue={...this.toObject(),...h},Oe(h.day)&&(Ue.day=Math.min(Fs(Ue.year,Ue.month),Ue.day))):Ue=fu({...Ql(this.c),...h});const[Ie,Re]=xs(Ue,this.o,this.zone);return Fa(this,{ts:Ie,o:Re})}plus(r){if(!this.isValid)return this;const h=We.fromDurationLike(r);return Fa(this,ps(this,h))}minus(r){if(!this.isValid)return this;const h=We.fromDurationLike(r).negate();return Fa(this,ps(this,h))}startOf(r,{useLocaleWeeks:h=!1}={}){if(!this.isValid)return this;const p={},N=We.normalizeUnit(r);switch(N){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(N==="weeks")if(h){const C=this.loc.getStartOfWeek(),{weekday:U}=this;U<C&&(p.weekNumber=this.weekNumber-1),p.weekday=C}else p.weekday=1;if(N==="quarters"){const C=Math.ceil(this.month/3);p.month=(C-1)*3+1}return this.set(p)}endOf(r,h){return this.isValid?this.plus({[r]:1}).startOf(r,h).minus(1):this}toFormat(r,h={}){return this.isValid?Ft.create(this.loc.redefaultToEN(h)).formatDateTimeFromString(this,r):Sl}toLocaleString(r=j,h={}){return this.isValid?Ft.create(this.loc.clone(h),r).formatDateTime(this):Sl}toLocaleParts(r={}){return this.isValid?Ft.create(this.loc.clone(r),r).formatDateTimeParts(this):[]}toISO({format:r="extended",suppressSeconds:h=!1,suppressMilliseconds:p=!1,includeOffset:N=!0,extendedZone:C=!1,precision:U="milliseconds"}={}){if(!this.isValid)return null;U=Nl(U);const H=r==="extended";let L=ta(this,H,U);return Pa.indexOf(U)>=3&&(L+="T"),L+=sr(this,H,h,p,N,C,U),L}toISODate({format:r="extended",precision:h="day"}={}){return this.isValid?ta(this,r==="extended",Nl(h)):null}toISOWeekDate(){return lr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:r=!1,suppressSeconds:h=!1,includeOffset:p=!0,includePrefix:N=!1,extendedZone:C=!1,format:U="extended",precision:H="milliseconds"}={}){return this.isValid?(H=Nl(H),(N&&Pa.indexOf(H)>=3?"T":"")+sr(this,U==="extended",h,r,p,C,H)):null}toRFC2822(){return lr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return lr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ta(this,!0):null}toSQLTime({includeOffset:r=!0,includeZone:h=!1,includeOffsetSpace:p=!0}={}){let N="HH:mm:ss.SSS";return(h||r)&&(p&&(N+=" "),h?N+="z":r&&(N+="ZZ")),lr(this,N,!0)}toSQL(r={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(r)}`: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(r={}){if(!this.isValid)return{};const h={...this.c};return r.includeConfig&&(h.outputCalendar=this.outputCalendar,h.numberingSystem=this.loc.numberingSystem,h.locale=this.loc.locale),h}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(r,h="milliseconds",p={}){if(!this.isValid||!r.isValid)return We.invalid("created by diffing an invalid DateTime");const N={locale:this.locale,numberingSystem:this.numberingSystem,...p},C=cl(h).map(We.normalizeUnit),U=r.valueOf()>this.valueOf(),H=U?this:r,L=U?r:this,fe=Au(H,L,C,N);return U?fe.negate():fe}diffNow(r="milliseconds",h={}){return this.diff(je.now(),r,h)}until(r){return this.isValid?vt.fromDateTimes(this,r):this}hasSame(r,h,p){if(!this.isValid)return!1;const N=r.valueOf(),C=this.setZone(r.zone,{keepLocalTime:!0});return C.startOf(h,p)<=N&&N<=C.endOf(h,p)}equals(r){return this.isValid&&r.isValid&&this.valueOf()===r.valueOf()&&this.zone.equals(r.zone)&&this.loc.equals(r.loc)}toRelative(r={}){if(!this.isValid)return null;const h=r.base||je.fromObject({},{zone:this.zone}),p=r.padding?this<h?-r.padding:r.padding:0;let N=["years","months","days","hours","minutes","seconds"],C=r.unit;return Array.isArray(r.unit)&&(N=r.unit,C=void 0),Vn(h,this.plus(p),{...r,numeric:"always",units:N,unit:C})}toRelativeCalendar(r={}){return this.isValid?Vn(r.base||je.fromObject({},{zone:this.zone}),this,{...r,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...r){if(!r.every(je.isDateTime))throw new v("min requires all arguments be DateTimes");return yu(r,h=>h.valueOf(),Math.min)}static max(...r){if(!r.every(je.isDateTime))throw new v("max requires all arguments be DateTimes");return yu(r,h=>h.valueOf(),Math.max)}static fromFormatExplain(r,h,p={}){const{locale:N=null,numberingSystem:C=null}=p,U=Fe.fromOpts({locale:N,numberingSystem:C,defaultToEN:!0});return li(U,r,h)}static fromStringExplain(r,h,p={}){return je.fromFormatExplain(r,h,p)}static buildFormatParser(r,h={}){const{locale:p=null,numberingSystem:N=null}=h,C=Fe.fromOpts({locale:p,numberingSystem:N,defaultToEN:!0});return new ni(C,r)}static fromFormatParser(r,h,p={}){if(Oe(r)||Oe(h))throw new v("fromFormatParser requires an input string and a format parser");const{locale:N=null,numberingSystem:C=null}=p,U=Fe.fromOpts({locale:N,numberingSystem:C,defaultToEN:!0});if(!U.equals(h.locale))throw new v(`fromFormatParser called with a locale of ${U}, but the format parser was created for ${h.locale}`);const{result:H,zone:L,specificOffset:fe,invalidReason:ve}=h.explainFromTokens(r);return ve?je.invalid(ve):Aa(H,L,p,`format ${h.format}`,r,fe)}static get DATE_SHORT(){return j}static get DATE_MED(){return M}static get DATE_MED_WITH_WEEKDAY(){return O}static get DATE_FULL(){return A}static get DATE_HUGE(){return T}static get TIME_SIMPLE(){return V}static get TIME_WITH_SECONDS(){return ne}static get TIME_WITH_SHORT_OFFSET(){return Y}static get TIME_WITH_LONG_OFFSET(){return G}static get TIME_24_SIMPLE(){return K}static get TIME_24_WITH_SECONDS(){return de}static get TIME_24_WITH_SHORT_OFFSET(){return P}static get TIME_24_WITH_LONG_OFFSET(){return Z}static get DATETIME_SHORT(){return Q}static get DATETIME_SHORT_WITH_SECONDS(){return ae}static get DATETIME_MED(){return k}static get DATETIME_MED_WITH_SECONDS(){return W}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 ja(g){if(je.isDateTime(g))return g;if(g&&g.valueOf&&ba(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 Qa="3.7.2";return Da.DateTime=je,Da.Duration=We,Da.FixedOffsetZone=gt,Da.IANAZone=Me,Da.Info=hs,Da.Interval=vt,Da.InvalidZone=ia,Da.Settings=xt,Da.SystemZone=Se,Da.VERSION=Qa,Da.Zone=ie,Da}var Dg;function If(){return Dg||(Dg=1,(function(l){var f,v,S,b,y,Cf,j,$l;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const i=l2();var o;(function(A){A.Second="Second",A.Minute="Minute",A.Hour="Hour",A.Day="Day",A.Month="Month",A.Year="Year"})(o||(l.TimeUnit=o={}));var c;(function(A){A.Add="Add",A.Subtract="Subtract"})(c||(l.DateMathOp=c={})),l.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const O=class O{constructor(T,V){rt(this,j);rt(this,f);rt(this,v,null);rt(this,S,null);rt(this,b,{add:{[o.Year]:this.addYear.bind(this),[o.Month]:this.addMonth.bind(this),[o.Day]:this.addDay.bind(this),[o.Hour]:this.addHour.bind(this),[o.Minute]:this.addMinute.bind(this),[o.Second]:this.addSecond.bind(this)},subtract:{[o.Year]:this.subtractYear.bind(this),[o.Month]:this.subtractMonth.bind(this),[o.Day]:this.subtractDay.bind(this),[o.Hour]:this.subtractHour.bind(this),[o.Minute]:this.subtractMinute.bind(this),[o.Second]:this.subtractSecond.bind(this)}});const ne={zone:V};if(T?T instanceof O?(Ee(this,f,ee(T,f)),Ee(this,v,ee(T,v)),Ee(this,S,ee(T,S))):T instanceof Date?Ee(this,f,i.DateTime.fromJSDate(T,ne)):typeof T=="number"?Ee(this,f,i.DateTime.fromMillis(T,ne)):(Ee(this,f,i.DateTime.fromISO(T,ne)),ee(this,f).isValid||Ee(this,f,i.DateTime.fromRFC2822(T,ne)),ee(this,f).isValid||Ee(this,f,i.DateTime.fromSQL(T,ne)),ee(this,f).isValid||Ee(this,f,i.DateTime.fromFormat(T,"EEE, d MMM yyyy HH:mm:ss",ne))):Ee(this,f,i.DateTime.local()),!ee(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${T}`);V&&V!==ee(this,f).zoneName&&Ee(this,f,ee(this,f).setZone(V))}get dstStart(){return ee(this,v)}set dstStart(T){Ee(this,v,T)}get dstEnd(){return ee(this,S)}set dstEnd(T){Ee(this,S,T)}addYear(){Ee(this,f,ee(this,f).plus({years:1}))}addMonth(){Ee(this,f,ee(this,f).plus({months:1}).startOf("month"))}addDay(){Ee(this,f,ee(this,f).plus({days:1}).startOf("day"))}addHour(){Ee(this,f,ee(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Ee(this,f,ee(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Ee(this,f,ee(this,f).plus({seconds:1}))}subtractYear(){Ee(this,f,ee(this,f).minus({years:1}))}subtractMonth(){Ee(this,f,ee(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Ee(this,f,ee(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Ee(this,f,ee(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Ee(this,f,ee(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Ee(this,f,ee(this,f).minus({seconds:1}))}addUnit(T){ee(this,b).add[T]()}subtractUnit(T){ee(this,b).subtract[T]()}invokeDateOperation(T,V){if(T===c.Add){this.addUnit(V);return}if(T===c.Subtract){this.subtractUnit(V);return}throw new Error(`Invalid verb: ${T}`)}getDate(){return ee(this,f).day}getFullYear(){return ee(this,f).year}getDay(){const T=ee(this,f).weekday;return T===7?0:T}getMonth(){return ee(this,f).month-1}getHours(){return ee(this,f).hour}getMinutes(){return ee(this,f).minute}getSeconds(){return ee(this,f).second}getMilliseconds(){return ee(this,f).millisecond}getUTCOffset(){return ee(this,f).offset}setStartOfDay(){Ee(this,f,ee(this,f).startOf("day"))}setEndOfDay(){Ee(this,f,ee(this,f).endOf("day"))}getTime(){return ee(this,f).valueOf()}getUTCDate(){return Ne(this,j,$l).call(this).day}getUTCFullYear(){return Ne(this,j,$l).call(this).year}getUTCDay(){const T=Ne(this,j,$l).call(this).weekday;return T===7?0:T}getUTCMonth(){return Ne(this,j,$l).call(this).month-1}getUTCHours(){return Ne(this,j,$l).call(this).hour}getUTCMinutes(){return Ne(this,j,$l).call(this).minute}getUTCSeconds(){return Ne(this,j,$l).call(this).second}toISOString(){return ee(this,f).toUTC().toISO()}toJSON(){return ee(this,f).toJSON()}setDate(T){Ee(this,f,ee(this,f).set({day:T}))}setFullYear(T){Ee(this,f,ee(this,f).set({year:T}))}setDay(T){Ee(this,f,ee(this,f).set({weekday:T}))}setMonth(T){Ee(this,f,ee(this,f).set({month:T+1}))}setHours(T){Ee(this,f,ee(this,f).set({hour:T}))}setMinutes(T){Ee(this,f,ee(this,f).set({minute:T}))}setSeconds(T){Ee(this,f,ee(this,f).set({second:T}))}setMilliseconds(T){Ee(this,f,ee(this,f).set({millisecond:T}))}toString(){return this.toDate().toString()}toDate(){return ee(this,f).toJSDate()}isLastDayOfMonth(){var ne;const{day:T,month:V}=ee(this,f);if(V===2){const Y=Ne(ne=O,y,Cf).call(ne,ee(this,f).year);return T===l.DAYS_IN_MONTH[V-1]-(Y?0:1)}return T===l.DAYS_IN_MONTH[V-1]}isLastWeekdayOfMonth(){var Y;const{day:T,month:V}=ee(this,f);let ne;return V===2?ne=l.DAYS_IN_MONTH[V-1]-(Ne(Y=O,y,Cf).call(Y,ee(this,f).year)?0:1):ne=l.DAYS_IN_MONTH[V-1],T>ne-7}applyDateOperation(T,V,ne){if(V===o.Month||V===o.Day){this.invokeDateOperation(T,V);return}const Y=this.getHours();this.invokeDateOperation(T,V);const G=this.getHours(),K=G-Y;K===2?ne!==24&&(this.dstStart=G):K===0&&this.getMinutes()===0&&this.getSeconds()===0&&ne!==24&&(this.dstEnd=G)}};f=new WeakMap,v=new WeakMap,S=new WeakMap,b=new WeakMap,y=new WeakSet,Cf=function(T){return T%4===0&&T%100!==0||T%400===0},j=new WeakSet,$l=function(){return ee(this,f).toUTC()},rt(O,y);let m=O;l.CronDate=m,l.default=m})(bf)),bf}var Rg;function s2(){if(Rg)return Ii;Rg=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronMonth=void 0;const l=If(),i=Hs(),o=1,c=12,m=Object.freeze([]);let f=class extends i.CronField{static get min(){return o}static get max(){return c}static get chars(){return m}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(S,b){super(S,b),this.validate()}get values(){return super.values}};return Ii.CronMonth=f,Ii}var Xi={},Ag;function r2(){if(Ag)return Xi;Ag=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronSecond=void 0;const l=Hs(),i=0,o=59,c=Object.freeze([]);let m=class extends l.CronField{static get min(){return i}static get max(){return o}static get chars(){return c}constructor(v,S){super(v,S),this.validate()}get values(){return super.values}};return Xi.CronSecond=m,Xi}var kg;function Xf(){return kg||(kg=1,(function(l){var i=Ds&&Ds.__createBinding||(Object.create?(function(c,m,f,v){v===void 0&&(v=f);var S=Object.getOwnPropertyDescriptor(m,f);(!S||("get"in S?!m.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return m[f]}}),Object.defineProperty(c,v,S)}):(function(c,m,f,v){v===void 0&&(v=f),c[v]=m[f]})),o=Ds&&Ds.__exportStar||function(c,m){for(var f in c)f!=="default"&&!Object.prototype.hasOwnProperty.call(m,f)&&i(m,c,f)};Object.defineProperty(l,"__esModule",{value:!0}),o(KS(),l),o(e2(),l),o(t2(),l),o(Hs(),l),o(a2(),l),o(n2(),l),o(s2(),l),o(r2(),l)})(Ds)),Ds}var _g;function Zy(){var o,c,m,f,v,S,b,y,Fy,Gy;if(_g)return Fi;_g=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.CronFieldCollection=void 0;const l=Xf();let i=(y=class{constructor({second:O,minute:A,hour:T,dayOfMonth:V,month:ne,dayOfWeek:Y}){rt(this,o);rt(this,c);rt(this,m);rt(this,f);rt(this,v);rt(this,S);if(!O)throw new Error("Validation error, Field second is missing");if(!A)throw new Error("Validation error, Field minute is missing");if(!T)throw new Error("Validation error, Field hour is missing");if(!V)throw new Error("Validation error, Field dayOfMonth is missing");if(!ne)throw new Error("Validation error, Field month is missing");if(!Y)throw new Error("Validation error, Field dayOfWeek is missing");if(ne.values.length===1&&!V.hasLastChar&&!(parseInt(V.values[0],10)<=l.CronMonth.daysInMonth[ne.values[0]-1]))throw new Error("Invalid explicit day of month definition");Ee(this,o,O),Ee(this,c,A),Ee(this,m,T),Ee(this,v,ne),Ee(this,S,Y),Ee(this,f,V)}static from(O,A){return new y({second:this.resolveField(l.CronSecond,O.second,A.second),minute:this.resolveField(l.CronMinute,O.minute,A.minute),hour:this.resolveField(l.CronHour,O.hour,A.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,O.dayOfMonth,A.dayOfMonth),month:this.resolveField(l.CronMonth,O.month,A.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,O.dayOfWeek,A.dayOfWeek)})}static resolveField(O,A,T){return T?T instanceof l.CronField?T:new O(T):A}get second(){return ee(this,o)}get minute(){return ee(this,c)}get hour(){return ee(this,m)}get dayOfMonth(){return ee(this,f)}get month(){return ee(this,v)}get dayOfWeek(){return ee(this,S)}static compactField(O){if(O.length===0)return[];const A=[];let T;return O.forEach((V,ne,Y)=>{if(T===void 0){T={start:V,count:1};return}const G=Y[ne-1]||T.start,K=Y[ne+1];if(V==="L"||V==="W"){A.push(T),A.push({start:V,count:1}),T=void 0;return}if(T.step===void 0&&K!==void 0){const de=V-G,P=K-V;if(de<=P){T={...T,count:2,end:V,step:de};return}T.step=1}V-(T.end??0)===T.step?(T.count++,T.end=V):(T.count===1?A.push({start:T.start,count:1}):T.count===2?(A.push({start:T.start,count:1}),A.push({start:T.end??G,count:1})):A.push(T),T={start:V,count:1})}),T&&A.push(T),A}stringifyField(O){var ne;let A=O.max,T=O.values;if(O instanceof l.CronDayOfWeek){A=6;const Y=ee(this,S).values;T=Y[Y.length-1]===7?Y.slice(0,-1):Y}O instanceof l.CronDayOfMonth&&(A=ee(this,v).values.length===1?l.CronMonth.daysInMonth[ee(this,v).values[0]-1]:O.max);const V=y.compactField(T);if(V.length===1){const Y=Ne(ne=y,b,Fy).call(ne,O,V[0],A);if(Y)return Y}return V.map(Y=>{var K;const G=Y.count===1?Y.start.toString():Ne(K=y,b,Gy).call(K,Y,A);return O instanceof l.CronDayOfWeek&&O.nthDay>0?`${G}#${O.nthDay}`:G}).join(",")}stringify(O=!1){const A=[];return O&&A.push(this.stringifyField(ee(this,o))),A.push(this.stringifyField(ee(this,c)),this.stringifyField(ee(this,m)),this.stringifyField(ee(this,f)),this.stringifyField(ee(this,v)),this.stringifyField(ee(this,S))),A.join(" ")}serialize(){return{second:ee(this,o).serialize(),minute:ee(this,c).serialize(),hour:ee(this,m).serialize(),dayOfMonth:ee(this,f).serialize(),month:ee(this,v).serialize(),dayOfWeek:ee(this,S).serialize()}}},o=new WeakMap,c=new WeakMap,m=new WeakMap,f=new WeakMap,v=new WeakMap,S=new WeakMap,b=new WeakSet,Fy=function(O,A,T){const V=A.step;return V?V===1&&A.start===O.min&&A.end&&A.end>=T?O.hasQuestionMarkChar?"?":"*":V!==1&&A.start===O.min&&A.end&&A.end>=T-V+1?`*/${V}`:null:null},Gy=function(O,A){const T=O.step;if(T===1)return`${O.start}-${O.end}`;const V=O.start===0?O.count-1:O.count;if(!T)throw new Error("Unexpected range step");if(!O.end)throw new Error("Unexpected range end");if(T*V>O.end){const ne=(G,K)=>{if(typeof O.start!="number")throw new Error("Unexpected range start");return K%T===0?O.start+K:null};if(typeof O.start!="number")throw new Error("Unexpected range start");const Y={length:O.end-O.start+1};return Array.from(Y,ne).filter(G=>G!==null).join(",")}return O.end===A-T+1?`${O.start}/${T}`:`${O.start}-${O.end}/${T}`},rt(y,b),y);return Fi.CronFieldCollection=i,Fi}var Sf={},zg;function Ky(){return zg||(zg=1,(function(l){var m,f,v,S,b,y,w,j,M,Fl,A,As,Py,Qy,Wy,Iy,Of,Xy,Jy,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 i=If();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 o=1e4,Q=class Q{constructor(k,W){rt(this,A);rt(this,m);rt(this,f);rt(this,v);rt(this,S);rt(this,b);rt(this,y);rt(this,w,null);rt(this,j,!1);Ee(this,m,W),Ee(this,f,W.tz),Ee(this,S,W.startDate?new i.CronDate(W.startDate,ee(this,f)):null),Ee(this,b,W.endDate?new i.CronDate(W.endDate,ee(this,f)):null);let _=W.currentDate??W.startDate;if(_){const ce=new i.CronDate(_,ee(this,f));ee(this,S)&&ce.getTime()<ee(this,S).getTime()?_=ee(this,S):ee(this,b)&&ce.getTime()>ee(this,b).getTime()&&(_=ee(this,b))}Ee(this,v,new i.CronDate(_,ee(this,f))),Ee(this,y,k)}get fields(){return ee(this,y)}static fieldsToExpression(k,W){return new Q(k,W||{})}next(){return Ne(this,A,Rr).call(this)}prev(){return Ne(this,A,Rr).call(this,!0)}hasNext(){const k=ee(this,v);try{return Ne(this,A,Rr).call(this),!0}catch{return!1}finally{Ee(this,v,k)}}hasPrev(){const k=ee(this,v);try{return Ne(this,A,Rr).call(this,!0),!0}catch{return!1}finally{Ee(this,v,k)}}take(k){const W=[];if(k>=0)for(let _=0;_<k;_++)try{W.push(this.next())}catch{return W}else for(let _=0;_>k;_--)try{W.push(this.prev())}catch{return W}return W}reset(k){Ee(this,v,new i.CronDate(k||ee(this,m).currentDate))}stringify(k=!1){return ee(this,y).stringify(k)}includesDate(k){const{second:W,minute:_,hour:ce,month:he}=ee(this,y),B=new i.CronDate(k,ee(this,f));return!(!W.values.includes(B.getSeconds())||!_.values.includes(B.getMinutes())||!ce.values.includes(B.getHours())||!he.values.includes(B.getMonth()+1)||!Ne(this,A,Of).call(this,B)||ee(this,y).dayOfWeek.nthDay>0&&Math.ceil(B.getDate()/7)!==ee(this,y).dayOfWeek.nthDay)}toString(){return ee(this,m).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ne(this,A,Rr).call(this),done:!this.hasNext()})}}};m=new WeakMap,f=new WeakMap,v=new WeakMap,S=new WeakMap,b=new WeakMap,y=new WeakMap,w=new WeakMap,j=new WeakMap,M=new WeakSet,Fl=function(k,W){return W.some(_=>_===k)},A=new WeakSet,As=function(k,W){return k[W?k.length-1:0]},Py=function(k){const W=`${k.getFullYear()}-${k.getMonth()+1}-${k.getDate()}`;if(ee(this,w)===W)return ee(this,j);const _=new i.CronDate(k);_.setStartOfDay();const ce=new i.CronDate(k);return ce.setEndOfDay(),Ee(this,w,W),Ee(this,j,_.getUTCOffset()!==ce.getUTCOffset()),ee(this,j)},Qy=function(k,W,_){const ce=ee(this,y).second.values,he=k.getSeconds(),B=ee(this,y).second.findNearestValue(he,_);if(B!==null){k.setSeconds(B);return}k.applyDateOperation(W,i.TimeUnit.Minute,ee(this,y).hour.values.length),k.setSeconds(Ne(this,A,As).call(this,ce,_))},Wy=function(k,W,_){const ce=ee(this,y).minute.values,he=ee(this,y).second.values,B=k.getMinutes(),$=ee(this,y).minute.findNearestValue(B,_);if($!==null){k.setMinutes($),k.setSeconds(Ne(this,A,As).call(this,he,_));return}k.applyDateOperation(W,i.TimeUnit.Hour,ee(this,y).hour.values.length),k.setMinutes(Ne(this,A,As).call(this,ce,_)),k.setSeconds(Ne(this,A,As).call(this,he,_))},Iy=function(k,W){const _=W.isLastWeekdayOfMonth();return k.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 W.getDay()===he&&_})},Of=function(k){var ie,ge,Se;const W=ee(this,y).dayOfMonth.isWildcard,_=!W,ce=ee(this,y).dayOfWeek.isWildcard,he=!ce,B=Ne(ie=Q,M,Fl).call(ie,k.getDate(),ee(this,y).dayOfMonth.values)||ee(this,y).dayOfMonth.hasLastChar&&k.isLastDayOfMonth(),$=Ne(ge=Q,M,Fl).call(ge,k.getDay(),ee(this,y).dayOfWeek.values)||ee(this,y).dayOfWeek.hasLastChar&&Ne(Se=Q,M,Iy).call(Se,ee(this,y).dayOfWeek.values,k);return!!(_&&he&&(B||$)||B&&!he||W&&!ce&&$)},Xy=function(k,W,_){var De,D;const ce=ee(this,y).hour.values,he=ce,B=k.getHours(),$=Ne(De=Q,M,Fl).call(De,B,ce),ie=k.dstStart===B,ge=k.dstEnd===B;if(ie)return Ne(D=Q,M,Fl).call(D,B-1,ce)?!0:(k.invokeDateOperation(W,i.TimeUnit.Hour),!1);if(ge&&!_)return k.dstEnd=null,k.applyDateOperation(i.DateMathOp.Add,i.TimeUnit.Hour,he.length),!1;if($)return!0;k.dstStart=null;const Se=ee(this,y).hour.findNearestValue(B,_);if(Se===null)return k.applyDateOperation(W,i.TimeUnit.Day,he.length),!1;if(Ne(this,A,Py).call(this,k)){const se=_?B-Se:Se-B;for(let me=0;me<se;me++)k.applyDateOperation(W,i.TimeUnit.Hour,he.length)}else k.setHours(Se);return k.setMinutes(Ne(this,A,As).call(this,ee(this,y).minute.values,_)),k.setSeconds(Ne(this,A,As).call(this,ee(this,y).second.values,_)),!1},Jy=function(k){if(!ee(this,S)&&!ee(this,b))return;const W=k.getTime();if(ee(this,S)&&W<ee(this,S).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(ee(this,b)&&W>ee(this,b).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Rr=function(k=!1){var B,$,ie;const W=k?i.DateMathOp.Subtract:i.DateMathOp.Add,_=new i.CronDate(ee(this,v)),ce=_.getTime();let he=0;for(;++he<o;){if(Ne(this,A,Jy).call(this,_),!Ne(this,A,Of).call(this,_)){_.applyDateOperation(W,i.TimeUnit.Day,ee(this,y).hour.values.length);continue}if(!(ee(this,y).dayOfWeek.nthDay<=0||Math.ceil(_.getDate()/7)===ee(this,y).dayOfWeek.nthDay)){_.applyDateOperation(W,i.TimeUnit.Day,ee(this,y).hour.values.length);continue}if(!Ne(B=Q,M,Fl).call(B,_.getMonth()+1,ee(this,y).month.values)){_.applyDateOperation(W,i.TimeUnit.Month,ee(this,y).hour.values.length);continue}if(Ne(this,A,Xy).call(this,_,W,k)){if(!Ne($=Q,M,Fl).call($,_.getMinutes(),ee(this,y).minute.values)){Ne(this,A,Wy).call(this,_,W,k);continue}if(!Ne(ie=Q,M,Fl).call(ie,_.getSeconds(),ee(this,y).second.values)){Ne(this,A,Qy).call(this,_,W,k);continue}if(ce===_.getTime()){(W==="Add"||_.getMilliseconds()===0)&&_.applyDateOperation(W,i.TimeUnit.Second,ee(this,y).hour.values.length);continue}break}}if(he>o)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return _.getMilliseconds()!==0&&_.setMilliseconds(0),Ee(this,v,_),_},rt(Q,M);let c=Q;l.CronExpression=c,l.default=c})(Sf)),Sf}var qc={},Ug;function i2(){if(Ug)return qc;Ug=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.seededRandom=o;function l(c){let m=2166136261;for(let f=0;f<c.length;f++)m^=c.charCodeAt(f),m=Math.imul(m,16777619);return()=>m>>>0}function i(c){return()=>{let m=c+=1831565813;return m=Math.imul(m^m>>>15,m|1),m^=m+Math.imul(m^m>>>7,m|61),((m^m>>>14)>>>0)/4294967296}}function o(c){const m=c?l(c)():Math.floor(Math.random()*1e10);return i(m)}return qc}var Hg;function Rf(){var y,w,ex,ks,tx,ax,nx,lx,sx,rx,ix,Df,ux,cx;if(Hg)return qa;Hg=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.CronExpressionParser=qa.DayOfWeek=qa.Months=qa.CronUnit=qa.PredefinedExpressions=void 0;const l=Zy(),i=Ky(),o=i2(),c=Xf();var m;(function(Z){Z["@yearly"]="0 0 0 1 1 *",Z["@annually"]="0 0 0 1 1 *",Z["@monthly"]="0 0 0 1 * *",Z["@weekly"]="0 0 0 * * 0",Z["@daily"]="0 0 0 * * *",Z["@hourly"]="0 0 * * * *",Z["@minutely"]="0 * * * * *",Z["@secondly"]="* * * * * *",Z["@weekdays"]="0 0 0 * * 1-5",Z["@weekends"]="0 0 0 * * 0,6"})(m||(qa.PredefinedExpressions=m={}));var f;(function(Z){Z.Second="Second",Z.Minute="Minute",Z.Hour="Hour",Z.DayOfMonth="DayOfMonth",Z.Month="Month",Z.DayOfWeek="DayOfWeek"})(f||(qa.CronUnit=f={}));var v;(function(Z){Z[Z.jan=1]="jan",Z[Z.feb=2]="feb",Z[Z.mar=3]="mar",Z[Z.apr=4]="apr",Z[Z.may=5]="may",Z[Z.jun=6]="jun",Z[Z.jul=7]="jul",Z[Z.aug=8]="aug",Z[Z.sep=9]="sep",Z[Z.oct=10]="oct",Z[Z.nov=11]="nov",Z[Z.dec=12]="dec"})(v||(qa.Months=v={}));var S;(function(Z){Z[Z.sun=0]="sun",Z[Z.mon=1]="mon",Z[Z.tue=2]="tue",Z[Z.wed=3]="wed",Z[Z.thu=4]="thu",Z[Z.fri=5]="fri",Z[Z.sat=6]="sat"})(S||(qa.DayOfWeek=S={}));let b=(w=class{static parse(Q,ae={}){var me,pe,Ce,Me,Le,St,tt,sa;const{strict:k=!1,hashSeed:W}=ae,_=(0,o.seededRandom)(W);Q=m[Q]||Q;const ce=Ne(me=w,y,ex).call(me,Q,k);if(!(ce.dayOfMonth==="*"||ce.dayOfWeek==="*"||!k))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const he=Ne(pe=w,y,ks).call(pe,f.Second,ce.second,c.CronSecond.constraints,_),B=Ne(Ce=w,y,ks).call(Ce,f.Minute,ce.minute,c.CronMinute.constraints,_),$=Ne(Me=w,y,ks).call(Me,f.Hour,ce.hour,c.CronHour.constraints,_),ie=Ne(Le=w,y,ks).call(Le,f.Month,ce.month,c.CronMonth.constraints,_),ge=Ne(St=w,y,ks).call(St,f.DayOfMonth,ce.dayOfMonth,c.CronDayOfMonth.constraints,_),{dayOfWeek:Se,nthDayOfWeek:De}=Ne(tt=w,y,ux).call(tt,ce.dayOfWeek),D=Ne(sa=w,y,ks).call(sa,f.DayOfWeek,Se,c.CronDayOfWeek.constraints,_),se=new l.CronFieldCollection({second:new c.CronSecond(he,{rawValue:ce.second}),minute:new c.CronMinute(B,{rawValue:ce.minute}),hour:new c.CronHour($,{rawValue:ce.hour}),dayOfMonth:new c.CronDayOfMonth(ge,{rawValue:ce.dayOfMonth}),month:new c.CronMonth(ie,{rawValue:ce.month}),dayOfWeek:new c.CronDayOfWeek(D,{rawValue:ce.dayOfWeek,nthDayOfWeek:De})});return new i.CronExpression(se,{...ae,expression:Q})}},y=new WeakSet,ex=function(Q,ae){if(ae&&!Q.length)throw new Error("Invalid cron expression");Q=Q||"0 * * * * *";const k=Q.trim().split(/\s+/);if(ae&&k.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(k.length>6)throw new Error("Invalid cron expression, too many fields");const W=["*","*","*","*","*","0"];k.length<W.length&&k.unshift(...W.slice(k.length));const[_,ce,he,B,$,ie]=k;return{second:_,minute:ce,hour:he,dayOfMonth:B,month:$,dayOfWeek:ie}},ks=function(Q,ae,k,W){if((Q===f.Month||Q===f.DayOfWeek)&&(ae=ae.replace(/[a-z]{3}/gi,_=>{_=_.toLowerCase();const ce=v[_]||S[_];if(ce===void 0)throw new Error(`Validation error, cannot resolve alias "${_}"`);return ce.toString()})),!k.validChars.test(ae))throw new Error(`Invalid characters, got value: ${ae}`);return ae=Ne(this,y,tx).call(this,ae,k),ae=Ne(this,y,ax).call(this,ae,k,W),Ne(this,y,nx).call(this,Q,ae,k)},tx=function(Q,ae){return Q.replace(/[*?]/g,ae.min+"-"+ae.max)},ax=function(Q,ae,k){const W=k();return Q.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($,ae.min),De=Math.floor(W*ge),D=[];for(let se=Math.floor(Se/ge)*ge+De;se<=ie;se+=ge)se>=Se&&D.push(se);return D.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(W*(ie-$+1))+$)}else if(B){const $=parseInt(B,10);if($<=0)throw new Error(`Invalid step: ${$}, must be positive`);const ie=Math.floor(W*$),ge=[];for(let Se=Math.floor(ae.min/$)*$+ie;Se<=ae.max;Se+=$)Se>=ae.min&&ge.push(Se);return ge.join(",")}else return String(Math.floor(W*(ae.max-ae.min+1)+ae.min))})},nx=function(Q,ae,k){const W=[];function _(he,B){var $;if(Array.isArray(he))W.push(...he);else if(Ne($=w,y,cx).call($,B,he))W.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}`);W.push(Q===f.DayOfWeek?ie%7:he)}}return ae.split(",").forEach(he=>{var B;if(!(he.length>0))throw new Error("Invalid list value format");_(Ne(B=w,y,lx).call(B,Q,he,k),k)}),W},lx=function(Q,ae,k){var _,ce;const W=ae.split("/");if(W.length>2)throw new Error(`Invalid repeat: ${ae}`);return W.length===2?(isNaN(parseInt(W[0],10))||(W[0]=`${W[0]}-${k.max}`),Ne(_=w,y,Df).call(_,Q,W[0],parseInt(W[1],10),k)):Ne(ce=w,y,Df).call(ce,Q,ae,1,k)},sx=function(Q,ae,k){if(!(!isNaN(Q)&&!isNaN(ae)&&Q>=k.min&&ae<=k.max))throw new Error(`Constraint error, got range ${Q}-${ae} expected range ${k.min}-${k.max}`);if(Q>ae)throw new Error(`Invalid range: ${Q}-${ae}, min(${Q}) > max(${ae})`)},rx=function(Q){if(!(!isNaN(Q)&&Q>0))throw new Error(`Constraint error, cannot repeat at every ${Q} time.`)},ix=function(Q,ae,k,W){const _=[];Q===f.DayOfWeek&&k%7===0&&_.push(0);for(let ce=ae;ce<=k;ce+=W)_.indexOf(ce)===-1&&_.push(ce);return _},Df=function(Q,ae,k,W){const _=ae.split("-");if(_.length<=1)return isNaN(+ae)?ae:+ae;const[ce,he]=_.map(B=>parseInt(B,10));return Ne(this,y,sx).call(this,ce,he,W),Ne(this,y,rx).call(this,k),Ne(this,y,ix).call(this,Q,ce,he,k)},ux=function(Q){const ae=Q.split("#");if(ae.length<=1)return{dayOfWeek:ae[0]};const k=+ae[ae.length-1],W=Q.match(/([,-/])/);if(W!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${W==null?void 0:W[0]}\` special characters are incompatible`);if(!(ae.length<=2&&!isNaN(k)&&k>=1&&k<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:ae[0],nthDayOfWeek:k}},cx=function(Q,ae){return Q.chars.some(k=>ae.toString().includes(k))},rt(w,y),w);return qa.CronExpressionParser=b,qa}var gn={};const u2={},c2=Object.freeze(Object.defineProperty({__proto__:null,default:u2},Symbol.toStringTag,{value:"Module"})),qg=qp(c2);var Lg;function o2(){var f,v,Af,ox;if(Lg)return gn;Lg=1;var l=gn&&gn.__createBinding||(Object.create?(function(y,w,j,M){M===void 0&&(M=j);var O=Object.getOwnPropertyDescriptor(w,j);(!O||("get"in O?!w.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return w[j]}}),Object.defineProperty(y,M,O)}):(function(y,w,j,M){M===void 0&&(M=j),y[M]=w[j]})),i=gn&&gn.__setModuleDefault||(Object.create?(function(y,w){Object.defineProperty(y,"default",{enumerable:!0,value:w})}):function(y,w){y.default=w}),o=gn&&gn.__importStar||(function(){var y=function(w){return y=Object.getOwnPropertyNames||function(j){var M=[];for(var O in j)Object.prototype.hasOwnProperty.call(j,O)&&(M[M.length]=O);return M},y(w)};return function(w){if(w&&w.__esModule)return w;var j={};if(w!=null)for(var M=y(w),O=0;O<M.length;O++)M[O]!=="default"&&l(j,w,M[O]);return i(j,w),j}})();Object.defineProperty(gn,"__esModule",{value:!0}),gn.CronFileParser=void 0;const c=Rf();let m=(v=class{static async parseFile(w){var O;const{readFile:j}=await Promise.resolve().then(()=>o(qg)),M=await j(w,"utf8");return Ne(O=v,f,Af).call(O,M)}static parseFileSync(w){var O;const{readFileSync:j}=qg,M=j(w,"utf8");return Ne(O=v,f,Af).call(O,M)}},f=new WeakSet,Af=function(w){var O;const j=w.split(`
|
|
386
|
-
`),M={variables:{},expressions:[],errors:{}};for(const A of j){const T=A.trim();if(T.length===0||T.startsWith("#"))continue;const V=T.match(/^(.*)=(.*)$/);if(V){const[,ne,Y]=V;M.variables[ne]=Y.replace(/["']/g,"");continue}try{const ne=Ne(O=v,f,ox).call(O,T);M.expressions.push(ne.interval)}catch(ne){M.errors[T]=ne}}return M},ox=function(w){const j=w.split(" ");return{interval:c.CronExpressionParser.parse(j.slice(0,5).join(" ")),command:j.slice(5,j.length)}},rt(v,f),v);return gn.CronFileParser=m,gn}var Bg;function d2(){return Bg||(Bg=1,(function(l){var i=Os&&Os.__createBinding||(Object.create?(function(y,w,j,M){M===void 0&&(M=j);var O=Object.getOwnPropertyDescriptor(w,j);(!O||("get"in O?!w.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return w[j]}}),Object.defineProperty(y,M,O)}):(function(y,w,j,M){M===void 0&&(M=j),y[M]=w[j]})),o=Os&&Os.__exportStar||function(y,w){for(var j in y)j!=="default"&&!Object.prototype.hasOwnProperty.call(w,j)&&i(w,y,j)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const c=Rf();var m=If();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return m.CronDate}});var f=Zy();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var v=Ky();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return v.CronExpression}});var S=Rf();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return S.CronExpressionParser}});var b=o2();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return b.CronFileParser}}),o(Xf(),l),l.default=c.CronExpressionParser})(Os)),Os}var f2=d2();const dx=6048e5,h2=864e5,m2=6e4,g2=36e5,Vg=Symbol.for("constructDateFrom");function Ba(l,i){return typeof l=="function"?l(i):l&&typeof l=="object"&&Vg in l?l[Vg](i):l instanceof Date?new l.constructor(i):new Date(i)}function Ht(l,i){return Ba(i||l,l)}function y2(l,i,o){return Ba(l,+Ht(l)+i)}function Lc(l,i,o){return y2(l,i*g2)}let x2={};function to(){return x2}function lu(l,i){var S,b,y,w;const o=to(),c=(i==null?void 0:i.weekStartsOn)??((b=(S=i==null?void 0:i.locale)==null?void 0:S.options)==null?void 0:b.weekStartsOn)??o.weekStartsOn??((w=(y=o.locale)==null?void 0:y.options)==null?void 0:w.weekStartsOn)??0,m=Ht(l,i==null?void 0:i.in),f=m.getDay(),v=(f<c?7:0)+f-c;return m.setDate(m.getDate()-v),m.setHours(0,0,0,0),m}function Ic(l,i){return lu(l,{...i,weekStartsOn:1})}function fx(l,i){const o=Ht(l,i==null?void 0:i.in),c=o.getFullYear(),m=Ba(o,0);m.setFullYear(c+1,0,4),m.setHours(0,0,0,0);const f=Ic(m),v=Ba(o,0);v.setFullYear(c,0,4),v.setHours(0,0,0,0);const S=Ic(v);return o.getTime()>=f.getTime()?c+1:o.getTime()>=S.getTime()?c:c-1}function Yg(l){const i=Ht(l),o=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return o.setUTCFullYear(i.getFullYear()),+l-+o}function p2(l,...i){const o=Ba.bind(null,i.find(c=>typeof c=="object"));return i.map(o)}function $g(l,i){const o=Ht(l,i==null?void 0:i.in);return o.setHours(0,0,0,0),o}function v2(l,i,o){const[c,m]=p2(o==null?void 0:o.in,l,i),f=$g(c),v=$g(m),S=+f-Yg(f),b=+v-Yg(v);return Math.round((S-b)/h2)}function b2(l,i){const o=fx(l,i),c=Ba(l,0);return c.setFullYear(o,0,4),c.setHours(0,0,0,0),Ic(c)}function S2(l,i){let o,c=i==null?void 0:i.in;return l.forEach(m=>{!c&&typeof m=="object"&&(c=Ba.bind(null,m));const f=Ht(m,c);(!o||o<f||isNaN(+f))&&(o=f)}),Ba(c,o||NaN)}function w2(l,i){let o,c=i==null?void 0:i.in;return l.forEach(m=>{!c&&typeof m=="object"&&(c=Ba.bind(null,m));const f=Ht(m,c);(!o||o>f||isNaN(+f))&&(o=f)}),Ba(c,o||NaN)}function N2(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function j2(l){return!(!N2(l)&&typeof l!="number"||isNaN(+Ht(l)))}function E2(l){return i=>{const c=(l?Math[l]:Math.trunc)(i);return c===0?0:c}}function M2(l,i){return+Ht(l)-+Ht(i)}function Fg(l,i,o){const c=M2(l,i)/m2;return E2(o==null?void 0:o.roundingMethod)(c)}function T2(l,i){const o=Ht(l,i==null?void 0:i.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}const C2={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"}},O2=(l,i,o)=>{let c;const m=C2[l];return typeof m=="string"?c=m:i===1?c=m.one:c=m.other.replace("{{count}}",i.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+c:c+" ago":c};function wf(l){return(i={})=>{const o=i.width?String(i.width):l.defaultWidth;return l.formats[o]||l.formats[l.defaultWidth]}}const D2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},R2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},A2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},k2={date:wf({formats:D2,defaultWidth:"full"}),time:wf({formats:R2,defaultWidth:"full"}),dateTime:wf({formats:A2,defaultWidth:"full"})},_2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},z2=(l,i,o,c)=>_2[l];function Ji(l){return(i,o)=>{const c=o!=null&&o.context?String(o.context):"standalone";let m;if(c==="formatting"&&l.formattingValues){const v=l.defaultFormattingWidth||l.defaultWidth,S=o!=null&&o.width?String(o.width):v;m=l.formattingValues[S]||l.formattingValues[v]}else{const v=l.defaultWidth,S=o!=null&&o.width?String(o.width):l.defaultWidth;m=l.values[S]||l.values[v]}const f=l.argumentCallback?l.argumentCallback(i):i;return m[f]}}const U2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},H2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},q2={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"]},L2={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"]},B2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},V2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Y2=(l,i)=>{const o=Number(l),c=o%100;if(c>20||c<10)switch(c%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},$2={ordinalNumber:Y2,era:Ji({values:U2,defaultWidth:"wide"}),quarter:Ji({values:H2,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Ji({values:q2,defaultWidth:"wide"}),day:Ji({values:L2,defaultWidth:"wide"}),dayPeriod:Ji({values:B2,defaultWidth:"wide",formattingValues:V2,defaultFormattingWidth:"wide"})};function Ki(l){return(i,o={})=>{const c=o.width,m=c&&l.matchPatterns[c]||l.matchPatterns[l.defaultMatchWidth],f=i.match(m);if(!f)return null;const v=f[0],S=c&&l.parsePatterns[c]||l.parsePatterns[l.defaultParseWidth],b=Array.isArray(S)?G2(S,j=>j.test(v)):F2(S,j=>j.test(v));let y;y=l.valueCallback?l.valueCallback(b):b,y=o.valueCallback?o.valueCallback(y):y;const w=i.slice(v.length);return{value:y,rest:w}}}function F2(l,i){for(const o in l)if(Object.prototype.hasOwnProperty.call(l,o)&&i(l[o]))return o}function G2(l,i){for(let o=0;o<l.length;o++)if(i(l[o]))return o}function Z2(l){return(i,o={})=>{const c=i.match(l.matchPattern);if(!c)return null;const m=c[0],f=i.match(l.parsePattern);if(!f)return null;let v=l.valueCallback?l.valueCallback(f[0]):f[0];v=o.valueCallback?o.valueCallback(v):v;const S=i.slice(m.length);return{value:v,rest:S}}}const P2=/^(\d+)(th|st|nd|rd)?/i,Q2=/\d+/i,W2={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},I2={any:[/^b/i,/^(a|c)/i]},X2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},J2={any:[/1/i,/2/i,/3/i,/4/i]},K2={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},ew={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]},tw={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},aw={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]},nw={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},lw={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}},sw={ordinalNumber:Z2({matchPattern:P2,parsePattern:Q2,valueCallback:l=>parseInt(l,10)}),era:Ki({matchPatterns:W2,defaultMatchWidth:"wide",parsePatterns:I2,defaultParseWidth:"any"}),quarter:Ki({matchPatterns:X2,defaultMatchWidth:"wide",parsePatterns:J2,defaultParseWidth:"any",valueCallback:l=>l+1}),month:Ki({matchPatterns:K2,defaultMatchWidth:"wide",parsePatterns:ew,defaultParseWidth:"any"}),day:Ki({matchPatterns:tw,defaultMatchWidth:"wide",parsePatterns:aw,defaultParseWidth:"any"}),dayPeriod:Ki({matchPatterns:nw,defaultMatchWidth:"any",parsePatterns:lw,defaultParseWidth:"any"})},rw={code:"en-US",formatDistance:O2,formatLong:k2,formatRelative:z2,localize:$2,match:sw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function iw(l,i){const o=Ht(l,i==null?void 0:i.in);return v2(o,T2(o))+1}function uw(l,i){const o=Ht(l,i==null?void 0:i.in),c=+Ic(o)-+b2(o);return Math.round(c/dx)+1}function hx(l,i){var w,j,M,O;const o=Ht(l,i==null?void 0:i.in),c=o.getFullYear(),m=to(),f=(i==null?void 0:i.firstWeekContainsDate)??((j=(w=i==null?void 0:i.locale)==null?void 0:w.options)==null?void 0:j.firstWeekContainsDate)??m.firstWeekContainsDate??((O=(M=m.locale)==null?void 0:M.options)==null?void 0:O.firstWeekContainsDate)??1,v=Ba((i==null?void 0:i.in)||l,0);v.setFullYear(c+1,0,f),v.setHours(0,0,0,0);const S=lu(v,i),b=Ba((i==null?void 0:i.in)||l,0);b.setFullYear(c,0,f),b.setHours(0,0,0,0);const y=lu(b,i);return+o>=+S?c+1:+o>=+y?c:c-1}function cw(l,i){var S,b,y,w;const o=to(),c=(i==null?void 0:i.firstWeekContainsDate)??((b=(S=i==null?void 0:i.locale)==null?void 0:S.options)==null?void 0:b.firstWeekContainsDate)??o.firstWeekContainsDate??((w=(y=o.locale)==null?void 0:y.options)==null?void 0:w.firstWeekContainsDate)??1,m=hx(l,i),f=Ba((i==null?void 0:i.in)||l,0);return f.setFullYear(m,0,c),f.setHours(0,0,0,0),lu(f,i)}function ow(l,i){const o=Ht(l,i==null?void 0:i.in),c=+lu(o,i)-+cw(o,i);return Math.round(c/dx)+1}function ot(l,i){const o=l<0?"-":"",c=Math.abs(l).toString().padStart(i,"0");return o+c}const Yl={y(l,i){const o=l.getFullYear(),c=o>0?o:1-o;return ot(i==="yy"?c%100:c,i.length)},M(l,i){const o=l.getMonth();return i==="M"?String(o+1):ot(o+1,2)},d(l,i){return ot(l.getDate(),i.length)},a(l,i){const o=l.getHours()/12>=1?"pm":"am";switch(i){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(l,i){return ot(l.getHours()%12||12,i.length)},H(l,i){return ot(l.getHours(),i.length)},m(l,i){return ot(l.getMinutes(),i.length)},s(l,i){return ot(l.getSeconds(),i.length)},S(l,i){const o=i.length,c=l.getMilliseconds(),m=Math.trunc(c*Math.pow(10,o-3));return ot(m,i.length)}},Or={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Gg={G:function(l,i,o){const c=l.getFullYear()>0?1:0;switch(i){case"G":case"GG":case"GGG":return o.era(c,{width:"abbreviated"});case"GGGGG":return o.era(c,{width:"narrow"});case"GGGG":default:return o.era(c,{width:"wide"})}},y:function(l,i,o){if(i==="yo"){const c=l.getFullYear(),m=c>0?c:1-c;return o.ordinalNumber(m,{unit:"year"})}return Yl.y(l,i)},Y:function(l,i,o,c){const m=hx(l,c),f=m>0?m:1-m;if(i==="YY"){const v=f%100;return ot(v,2)}return i==="Yo"?o.ordinalNumber(f,{unit:"year"}):ot(f,i.length)},R:function(l,i){const o=fx(l);return ot(o,i.length)},u:function(l,i){const o=l.getFullYear();return ot(o,i.length)},Q:function(l,i,o){const c=Math.ceil((l.getMonth()+1)/3);switch(i){case"Q":return String(c);case"QQ":return ot(c,2);case"Qo":return o.ordinalNumber(c,{unit:"quarter"});case"QQQ":return o.quarter(c,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(c,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(c,{width:"wide",context:"formatting"})}},q:function(l,i,o){const c=Math.ceil((l.getMonth()+1)/3);switch(i){case"q":return String(c);case"qq":return ot(c,2);case"qo":return o.ordinalNumber(c,{unit:"quarter"});case"qqq":return o.quarter(c,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(c,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(c,{width:"wide",context:"standalone"})}},M:function(l,i,o){const c=l.getMonth();switch(i){case"M":case"MM":return Yl.M(l,i);case"Mo":return o.ordinalNumber(c+1,{unit:"month"});case"MMM":return o.month(c,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(c,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(c,{width:"wide",context:"formatting"})}},L:function(l,i,o){const c=l.getMonth();switch(i){case"L":return String(c+1);case"LL":return ot(c+1,2);case"Lo":return o.ordinalNumber(c+1,{unit:"month"});case"LLL":return o.month(c,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(c,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(c,{width:"wide",context:"standalone"})}},w:function(l,i,o,c){const m=ow(l,c);return i==="wo"?o.ordinalNumber(m,{unit:"week"}):ot(m,i.length)},I:function(l,i,o){const c=uw(l);return i==="Io"?o.ordinalNumber(c,{unit:"week"}):ot(c,i.length)},d:function(l,i,o){return i==="do"?o.ordinalNumber(l.getDate(),{unit:"date"}):Yl.d(l,i)},D:function(l,i,o){const c=iw(l);return i==="Do"?o.ordinalNumber(c,{unit:"dayOfYear"}):ot(c,i.length)},E:function(l,i,o){const c=l.getDay();switch(i){case"E":case"EE":case"EEE":return o.day(c,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(c,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(c,{width:"short",context:"formatting"});case"EEEE":default:return o.day(c,{width:"wide",context:"formatting"})}},e:function(l,i,o,c){const m=l.getDay(),f=(m-c.weekStartsOn+8)%7||7;switch(i){case"e":return String(f);case"ee":return ot(f,2);case"eo":return o.ordinalNumber(f,{unit:"day"});case"eee":return o.day(m,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(m,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(m,{width:"short",context:"formatting"});case"eeee":default:return o.day(m,{width:"wide",context:"formatting"})}},c:function(l,i,o,c){const m=l.getDay(),f=(m-c.weekStartsOn+8)%7||7;switch(i){case"c":return String(f);case"cc":return ot(f,i.length);case"co":return o.ordinalNumber(f,{unit:"day"});case"ccc":return o.day(m,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(m,{width:"narrow",context:"standalone"});case"cccccc":return o.day(m,{width:"short",context:"standalone"});case"cccc":default:return o.day(m,{width:"wide",context:"standalone"})}},i:function(l,i,o){const c=l.getDay(),m=c===0?7:c;switch(i){case"i":return String(m);case"ii":return ot(m,i.length);case"io":return o.ordinalNumber(m,{unit:"day"});case"iii":return o.day(c,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(c,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(c,{width:"short",context:"formatting"});case"iiii":default:return o.day(c,{width:"wide",context:"formatting"})}},a:function(l,i,o){const m=l.getHours()/12>=1?"pm":"am";switch(i){case"a":case"aa":return o.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(m,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(m,{width:"wide",context:"formatting"})}},b:function(l,i,o){const c=l.getHours();let m;switch(c===12?m=Or.noon:c===0?m=Or.midnight:m=c/12>=1?"pm":"am",i){case"b":case"bb":return o.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(m,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(m,{width:"wide",context:"formatting"})}},B:function(l,i,o){const c=l.getHours();let m;switch(c>=17?m=Or.evening:c>=12?m=Or.afternoon:c>=4?m=Or.morning:m=Or.night,i){case"B":case"BB":case"BBB":return o.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(m,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(m,{width:"wide",context:"formatting"})}},h:function(l,i,o){if(i==="ho"){let c=l.getHours()%12;return c===0&&(c=12),o.ordinalNumber(c,{unit:"hour"})}return Yl.h(l,i)},H:function(l,i,o){return i==="Ho"?o.ordinalNumber(l.getHours(),{unit:"hour"}):Yl.H(l,i)},K:function(l,i,o){const c=l.getHours()%12;return i==="Ko"?o.ordinalNumber(c,{unit:"hour"}):ot(c,i.length)},k:function(l,i,o){let c=l.getHours();return c===0&&(c=24),i==="ko"?o.ordinalNumber(c,{unit:"hour"}):ot(c,i.length)},m:function(l,i,o){return i==="mo"?o.ordinalNumber(l.getMinutes(),{unit:"minute"}):Yl.m(l,i)},s:function(l,i,o){return i==="so"?o.ordinalNumber(l.getSeconds(),{unit:"second"}):Yl.s(l,i)},S:function(l,i){return Yl.S(l,i)},X:function(l,i,o){const c=l.getTimezoneOffset();if(c===0)return"Z";switch(i){case"X":return Pg(c);case"XXXX":case"XX":return _s(c);case"XXXXX":case"XXX":default:return _s(c,":")}},x:function(l,i,o){const c=l.getTimezoneOffset();switch(i){case"x":return Pg(c);case"xxxx":case"xx":return _s(c);case"xxxxx":case"xxx":default:return _s(c,":")}},O:function(l,i,o){const c=l.getTimezoneOffset();switch(i){case"O":case"OO":case"OOO":return"GMT"+Zg(c,":");case"OOOO":default:return"GMT"+_s(c,":")}},z:function(l,i,o){const c=l.getTimezoneOffset();switch(i){case"z":case"zz":case"zzz":return"GMT"+Zg(c,":");case"zzzz":default:return"GMT"+_s(c,":")}},t:function(l,i,o){const c=Math.trunc(+l/1e3);return ot(c,i.length)},T:function(l,i,o){return ot(+l,i.length)}};function Zg(l,i=""){const o=l>0?"-":"+",c=Math.abs(l),m=Math.trunc(c/60),f=c%60;return f===0?o+String(m):o+String(m)+i+ot(f,2)}function Pg(l,i){return l%60===0?(l>0?"-":"+")+ot(Math.abs(l)/60,2):_s(l,i)}function _s(l,i=""){const o=l>0?"-":"+",c=Math.abs(l),m=ot(Math.trunc(c/60),2),f=ot(c%60,2);return o+m+i+f}const Qg=(l,i)=>{switch(l){case"P":return i.date({width:"short"});case"PP":return i.date({width:"medium"});case"PPP":return i.date({width:"long"});case"PPPP":default:return i.date({width:"full"})}},mx=(l,i)=>{switch(l){case"p":return i.time({width:"short"});case"pp":return i.time({width:"medium"});case"ppp":return i.time({width:"long"});case"pppp":default:return i.time({width:"full"})}},dw=(l,i)=>{const o=l.match(/(P+)(p+)?/)||[],c=o[1],m=o[2];if(!m)return Qg(l,i);let f;switch(c){case"P":f=i.dateTime({width:"short"});break;case"PP":f=i.dateTime({width:"medium"});break;case"PPP":f=i.dateTime({width:"long"});break;case"PPPP":default:f=i.dateTime({width:"full"});break}return f.replace("{{date}}",Qg(c,i)).replace("{{time}}",mx(m,i))},fw={p:mx,P:dw},hw=/^D+$/,mw=/^Y+$/,gw=["D","DD","YY","YYYY"];function yw(l){return hw.test(l)}function xw(l){return mw.test(l)}function pw(l,i,o){const c=vw(l,i,o);if(console.warn(c),gw.includes(l))throw new RangeError(c)}function vw(l,i,o){const c=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${i}\`) for formatting ${c} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const bw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ww=/^'([^]*?)'?$/,Nw=/''/g,jw=/[a-zA-Z]/;function Rs(l,i,o){var w,j,M,O;const c=to(),m=c.locale??rw,f=c.firstWeekContainsDate??((j=(w=c.locale)==null?void 0:w.options)==null?void 0:j.firstWeekContainsDate)??1,v=c.weekStartsOn??((O=(M=c.locale)==null?void 0:M.options)==null?void 0:O.weekStartsOn)??0,S=Ht(l,o==null?void 0:o.in);if(!j2(S))throw new RangeError("Invalid time value");let b=i.match(Sw).map(A=>{const T=A[0];if(T==="p"||T==="P"){const V=fw[T];return V(A,m.formatLong)}return A}).join("").match(bw).map(A=>{if(A==="''")return{isToken:!1,value:"'"};const T=A[0];if(T==="'")return{isToken:!1,value:Ew(A)};if(Gg[T])return{isToken:!0,value:A};if(T.match(jw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:A}});m.localize.preprocessor&&(b=m.localize.preprocessor(S,b));const y={firstWeekContainsDate:f,weekStartsOn:v,locale:m};return b.map(A=>{if(!A.isToken)return A.value;const T=A.value;(xw(T)||yw(T))&&pw(T,i,String(l));const V=Gg[T[0]];return V(S,T,m.localize,y)}).join("")}function Ew(l){const i=l.match(ww);return i?i[1].replace(Nw,"'"):l}function Mw(l,i){return+Ht(l)>+Ht(i)}function Tw(l,i){return+Ht(l)<+Ht(i)}function Cw(l,i){const o=Ht(l,i==null?void 0:i.in);return o.setMinutes(0,0,0),o}const Nf=Oy,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"}],tl=160,Vc=14,Ow=10,Dw=7,Wg=4,gx=({configs:l,currentProjectId:i,onEditJob:o,queueStatus:c,queueAnalytics:m})=>{const f=z.useMemo(()=>Cw(new Date),[]),v=z.useMemo(()=>Lc(f,24),[f]),S=z.useMemo(()=>Lc(f,-24),[f]),b=v,y=z.useMemo(()=>{const K=[];for(let de=0;de<=24;de++)K.push(Lc(f,de));return K},[f]),w=z.useMemo(()=>{const K=[];return l.forEach(({projectId:de,config:P})=>{var ae,k;const Z={executor:P.executorEnabled!==!1?P.cronSchedule:null,reviewer:P.reviewerEnabled?P.reviewerSchedule:null,qa:P.qa.enabled?P.qa.schedule:null,audit:P.audit.enabled?P.audit.schedule:null,slicer:P.roadmapScanner.enabled?P.roadmapScanner.slicerSchedule:null,analytics:(ae=P.analytics)!=null&&ae.enabled?(k=P.analytics)==null?void 0:k.schedule:null},Q=P.cronScheduleOffset||0;Object.entries(Z).forEach(([W,_])=>{if(_)try{const ce=f2.CronExpressionParser.parse(_,{currentDate:f,endDate:v});for(;ce.hasNext();){const he=ce.next(),B=new Date(he.getTime());B.setMinutes(B.getMinutes()+Q),Mw(B,f)&&Tw(B,v)&&K.push({projectId:de,jobType:W,time:B})}}catch(ce){console.error(`Failed to parse cron "${_}" for ${de}/${W}`,ce)}})}),K},[l,f,v]),j=z.useMemo(()=>{const K=new Set;return l.length===0||(l.every(de=>de.config.executorEnabled===!1)&&K.add("executor"),l.every(de=>!de.config.reviewerEnabled)&&K.add("reviewer"),l.every(de=>!de.config.qa.enabled)&&K.add("qa"),l.every(de=>!de.config.audit.enabled)&&K.add("audit"),l.every(de=>!de.config.roadmapScanner.enabled)&&K.add("slicer"),l.every(de=>{var P;return!((P=de.config.analytics)!=null&&P.enabled)})&&K.add("analytics")),K},[l]),M=z.useMemo(()=>{const K=new Map;let de=0;return l.forEach(P=>{P.projectId===i||(K.set(P.projectId,de%Bc.length),de++)}),K},[l,i]),O=K=>Fg(K,f),A=z.useMemo(()=>{const K=[];for(let de=0;de<=24;de++)K.push(Lc(S,de));return K},[S]),T=K=>{const de=w2([S2([K,S]),b]);return Fg(de,S)},V=z.useMemo(()=>{const K=(m==null?void 0:m.recentRuns)??[],de=new Map;for(const P of K){const Z=P.providerKey||"default",Q=new Date(P.startedAt*1e3),ae=P.finishedAt?new Date(P.finishedAt*1e3):new Date;ae<S||Q>b||(de.has(Z)||de.set(Z,[]),de.get(Z).push({id:P.id,jobType:P.jobType,status:P.status,projectPath:P.projectPath,startedAt:Q,finishedAt:ae,throttledCount:P.throttledCount}))}if(c!=null&&c.running){const P=c.running.providerKey??"default";de.has(P)||de.set(P,[]),de.get(P).push({id:c.running.id,jobType:c.running.jobType,status:"running",projectPath:c.running.projectPath,startedAt:new Date((c.running.dispatchedAt??c.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(de.entries()).sort(([P],[Z])=>P.localeCompare(Z)).map(([P,Z])=>({providerKey:P,runs:Z.sort((Q,ae)=>Q.startedAt.getTime()-ae.startedAt.getTime())}))},[b,S,m,c]),ne=K=>K.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:y.map((K,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(K=>K.projectId!==i).slice(0,5).map(K=>{const de=M.get(K.projectId)??0,P=Bc[de],Z=(K.projectId.split("/").pop()??K.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 ${P.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:K.projectId,children:Z})]},K.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+tl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:tl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:y.map((K,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:Rs(K,"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."})}),Nf.map(K=>{const de=j.has(K.id),P=w.filter(Q=>Q.jobType===K.id);if(!Y)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${de?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:tl},className:"shrink-0 p-3 border-r border-slate-800/50 flex items-center gap-2",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${K.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:K.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[G,P.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"})}):P.map((Q,ae)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(Q.projectId,Q.jobType),style:{left:O(Q.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${K.color.bg} ${K.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${K.label} at ${Rs(Q.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:Rs(Q.time,"HH:mm")})},ae))]})]},K.id);const Z=l.length*Vc+Wg*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${de?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:tl,height:Z},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 ${K.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:K.label})]}),l.map(Q=>{const ae=Q.projectId===i,k=(Q.projectId.split("/").pop()??Q.projectId).slice(0,14),W=M.get(Q.projectId)??0,_=ae?K.color.bg:Bc[W].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 ${ae?"text-slate-200 font-semibold":"text-slate-600"}`,title:Q.projectId,children:ae?`${k} ★`:k})]},Q.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:Z},children:[G,l.map((Q,ae)=>{const k=Q.projectId===i,W=P.filter(ie=>ie.projectId===Q.projectId),_=Wg+ae*Vc,ce=k?Ow:Dw,he=Math.floor((Vc-ce)/2),B=M.get(Q.projectId)??0,$=k?{bg:K.color.bg,border:K.color.border}:Bc[B];return s.jsxs(He.Fragment,{children:[ae>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:_}}),W.map((ie,ge)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(Q.projectId,ie.jobType),style:{left:O(ie.time)-3,top:_+he,height:ce},className:`absolute w-6 rounded border ${$.bg} ${$.border} ${k?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${Q.projectId} · ${K.label} @ ${Rs(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:Rs(ie.time,"HH:mm")})},ge))]},Q.projectId)}),P.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"})})]})]},K.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:tl+O(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"})})]}),V.length>0&&s.jsxs("div",{className:"border-t border-slate-800",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Recent Execution Runs"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Last 24h of real runs grouped by provider bucket."})]}),s.jsxs("div",{className:"text-[10px] uppercase tracking-[0.2em] text-slate-500",children:[(m==null?void 0:m.recentRuns.length)??0," recorded runs"]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar","data-testid":"provider-execution-timeline",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+tl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:tl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:A.map((K,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:Rs(K,"HH:mm")})},de))})]}),s.jsx("div",{className:"relative",children:V.map(({providerKey:K,runs:de})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${K}`,children:[s.jsxs("div",{style:{width:tl},className:"shrink-0 p-3 border-r border-slate-800/50 flex flex-col justify-center",children:[s.jsx("span",{className:"text-xs font-semibold text-slate-300 truncate",title:K,children:ne(K)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:K})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:A.map((P,Z)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},Z))}),de.map(P=>{const Z=Nf.find(B=>B.id===P.jobType)??Nf[0],Q=T(P.startedAt),ae=T(P.finishedAt),k=Math.max(ae-Q,8),W=P.status==="running",_=P.status==="error"||P.status==="failed"||P.status==="errored",ce=W?"bg-green-500":_?"bg-red-500":Z.color.bg,he=W?"border-green-400/60":_?"border-red-400/60":Z.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 ${W?"animate-pulse":""}`,style:{left:Q,width:k},title:`${K} • ${Z.label} • ${Rs(P.startedAt,"MMM d HH:mm")} • ${P.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:Z.label}),s.jsx("span",{className:"text-white/70",children:P.status}),P.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",P.throttledCount,"x"]})]})},`${K}-${P.id}-${P.startedAt.getTime()}`)})]})]},K))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:tl+T(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},yx=({form:l,scheduleMode:i,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:m,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:S,currentProjectId:b,onEditJob:y})=>{var w;return s.jsxs(et,{className:"p-6 space-y-6",children:[S&&S.length>0&&s.jsx(gx,{configs:S,currentProjectId:b,onEditJob:y}),s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${i==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:m,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${i==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Custom"})]})]}),i==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Wf.map(j=>{const M=o===j.id;return s.jsxs("button",{type:"button",onClick:()=>v(j),className:`text-left p-4 rounded-lg border transition-colors ${M?"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:j.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:j.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",j.hints.executor],["Reviewer",j.hints.reviewer],["QA",j.hints.qa],["Audit",j.hints.audit],["Slicer",j.hints.slicer]].map(([O,A])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:O}),s.jsx("span",{className:"text-xs text-slate-400",children:A})]},O))})]},j.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(On,{label:"PRD Execution Schedule",value:l.cronSchedule,onChange:j=>c("cronSchedule",j)}),s.jsx(On,{label:"PR Review Schedule",value:l.reviewerSchedule,onChange:j=>c("reviewerSchedule",j)}),s.jsx(On,{label:"QA Schedule",value:l.qa.schedule,onChange:j=>c("qa",{...l.qa,schedule:j})}),s.jsx(On,{label:"Audit Schedule",value:l.audit.schedule,onChange:j=>c("audit",{...l.audit,schedule:j})}),((w=l.analytics)==null?void 0:w.enabled)&&s.jsx(On,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:j=>c("analytics",{...l.analytics,schedule:j})}),l.roadmapScanner.enabled&&s.jsx(On,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:j=>c("roadmapScanner",{...l.roadmapScanner,slicerSchedule:j})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(ha,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:j=>c("schedulingPriority",Number(j)),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(La,{checked:l.globalQueueEnabled??!0,onChange:j=>c("globalQueueEnabled",j)})]})}),s.jsx(Ye,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:j=>{const M=Math.min(59,Math.max(0,Number(j.target.value||0)));c("cronScheduleOffset",M)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]})},Rw=()=>{var Ot,ga,ra;const{addToast:l,selectedProjectId:i,globalModeLoading:o}=Wt(),[c,m]=z.useState("overview"),[f,v]=z.useState(!1),[S,b]=z.useState(!1),[y,w]=z.useState(null),[j,M]=z.useState(null),[O,A]=z.useState([]),[T,V]=z.useState(null),[ne,Y]=z.useState(null),[G,K]=z.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:"conservative",globalMaxConcurrency:1,providerBuckets:[]}),[de,P]=z.useState(""),[Z,Q]=z.useState("1"),[ae,k]=z.useState(!1),{data:W,loading:_,error:ce,refetch:he}=yn(zy,[i],{enabled:!o}),{data:B,loading:$,refetch:ie}=yn(Qf,[i],{enabled:!o});z.useEffect(()=>{const le=setInterval(()=>{he()},3e4);return()=>clearInterval(le)},[he]),z.useEffect(()=>{o||_y().then(A).catch(console.error)},[i,o]),z.useEffect(()=>{if(o)return;const le=()=>{gS().then(V).catch(()=>{}),yS(24).then(Y).catch(()=>{})};le();const ye=setInterval(le,3e4);return()=>clearInterval(ye)},[o,i]),z.useEffect(()=>{var le,ye,_e,Ge,Be,mt,Dt,Rt,wt;if(B&&!G.isDirty){const ya=eu(B.scheduleBundleId,B.cronSchedule,B.reviewerSchedule,((le=B.qa)==null?void 0:le.schedule)||"45 2,14 * * *",((ye=B.audit)==null?void 0:ye.schedule)||"50 3 * * 1",((_e=B.roadmapScanner)==null?void 0:_e.slicerSchedule)||"35 */12 * * *"),Fe=((Ge=B.queue)==null?void 0:Ge.providerBuckets)??{};K({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:((Be=B.roadmapScanner)==null?void 0:Be.enabled)??!0,slicerSchedule:((mt=B.roadmapScanner)==null?void 0:mt.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:B.scheduleBundleId??null,schedulingPriority:B.schedulingPriority??3,cronScheduleOffset:B.cronScheduleOffset??0,globalQueueEnabled:((Dt=B.queue)==null?void 0:Dt.enabled)??!0},scheduleMode:ya?"template":"custom",selectedTemplateId:(ya==null?void 0:ya.id)??"",isDirty:!1,queueMode:((Rt=B.queue)==null?void 0:Rt.mode)??"conservative",globalMaxConcurrency:((wt=B.queue)==null?void 0:wt.maxConcurrency)??1,providerBuckets:Object.entries(Fe).map(([pn,gt])=>({key:pn,maxConcurrency:gt.maxConcurrency}))})}},[B,G.isDirty]);const ge=()=>{ie(),he()},Se=(le,ye)=>le instanceof Error?le.message:ye,De=async()=>{if(W){v(!0);try{W.paused?(await tu(),l({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await cS(),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)}}},D=async(le,ye)=>{if(!B)return;const Ge=Ry(le==="planner"?"slicer":le);if(Ge){w(le);try{await Qc(Ge.buildEnabledPatch(ye,B));let Be="";try{await tu()}catch(mt){Be=Se(mt,"Failed to reinstall cron schedules")}ge(),l(Be?{title:"Job Saved (Cron Reinstall Failed)",message:Be,type:"warning"}:{title:"Job Updated",message:`${le[0].toUpperCase()+le.slice(1)} ${ye?"enabled":"disabled"}.`,type:"success"})}catch(Be){l({title:"Update Failed",message:Se(Be,"Failed to update job configuration"),type:"error"})}finally{w(null)}}},se=async le=>{const ye=le==="planner"?"slicer":le;M(le);try{await uS(ye),l({title:"Job Triggered",message:`${le[0].toUpperCase()+le.slice(1)} job has been queued.`,type:"success"}),he()}catch(_e){l({title:"Trigger Failed",message:Se(_e,`Failed to trigger ${le} job`),type:"error"})}finally{M(null)}},me=(le,ye)=>{K(_e=>({..._e,form:{..._e.form,[le]:ye},isDirty:!0}))},pe=()=>{if(!G.form)return;const le=eu(G.form.scheduleBundleId,G.form.cronSchedule,G.form.reviewerSchedule,G.form.qa.schedule,G.form.audit.schedule,G.form.roadmapScanner.slicerSchedule||"35 */12 * * *");K(ye=>({...ye,scheduleMode:"template",selectedTemplateId:(le==null?void 0:le.id)??"always-on",form:{...ye.form,scheduleBundleId:(le==null?void 0:le.id)??null},isDirty:!0}))},Ce=()=>{K(le=>({...le,scheduleMode:"custom",selectedTemplateId:"",form:{...le.form,scheduleBundleId:null},isDirty:!0}))},Me=le=>{K(ye=>({...ye,selectedTemplateId:le.id,scheduleMode:"template",form:{...ye.form,cronSchedule:le.schedules.executor,reviewerSchedule:le.schedules.reviewer,scheduleBundleId:le.id,qa:{...ye.form.qa,schedule:le.schedules.qa},audit:{...ye.form.audit,schedule:le.schedules.audit},roadmapScanner:{...ye.form.roadmapScanner,slicerSchedule:le.schedules.slicer}},isDirty:!0}))},Le=async()=>{var le,ye;if(B){b(!0);try{await Qc({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)||((ye=B.analytics)==null?void 0:ye.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(Ge=>[Ge.key,{maxConcurrency:Ge.maxConcurrency}]))},executorEnabled:B.executorEnabled,reviewerEnabled:B.reviewerEnabled});let _e="";try{await tu()}catch(Ge){_e=Se(Ge,"Failed to reinstall cron schedules")}K(Ge=>({...Ge,isDirty:!1})),ge(),l(_e?{title:"Schedules Saved (Cron Reinstall Failed)",message:_e,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(_e){l({title:"Save Failed",message:Se(_e,"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 ye=new Date(le),_e=JS(ye);return s.jsxs("div",{className:"flex items-center space-x-2",children:[_e&&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:IS(ye)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",XS(ye),")"]})]})]})},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 ye=[];return le.balancedDelayMinutes>0&&ye.push(`auto +${le.balancedDelayMinutes}m`),le.manualDelayMinutes>0&&ye.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:[" ",ye.join(" - ")]})]})},sa=z.useMemo(()=>{var le,ye,_e,Ge,Be,mt,Dt,Rt,wt,tn,ya,Fe,pn,gt;return!B||!W?[]:[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Zc,{className:"h-4 w-4"}),enabled:(B==null?void 0:B.executorEnabled)!==!1,schedule:W.executor.schedule,nextRun:W.executor.nextRun,delayInfo:W.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(eo,{className:"h-4 w-4"}),enabled:(B==null?void 0:B.reviewerEnabled)??!1,schedule:W.reviewer.schedule,nextRun:W.reviewer.nextRun,delayInfo:W.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx($1,{className:"h-4 w-4"}),enabled:((le=B==null?void 0:B.qa)==null?void 0:le.enabled)??!1,schedule:(ye=W.qa)==null?void 0:ye.schedule,nextRun:(_e=W.qa)==null?void 0:_e.nextRun,delayInfo:W.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(gg,{className:"h-4 w-4"}),enabled:((Ge=B==null?void 0:B.audit)==null?void 0:Ge.enabled)??!1,schedule:(Be=W.audit)==null?void 0:Be.schedule,nextRun:(mt=W.audit)==null?void 0:mt.nextRun,delayInfo:W.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(gg,{className:"h-4 w-4"}),enabled:((Dt=B==null?void 0:B.roadmapScanner)==null?void 0:Dt.enabled)??!1,schedule:((Rt=W.planner)==null?void 0:Rt.schedule)||((wt=B.roadmapScanner)==null?void 0:wt.slicerSchedule)||"35 */12 * * *",nextRun:(tn=W.planner)==null?void 0:tn.nextRun,delayInfo:W.planner},{id:"analytics",name:"Analytics",description:"Fetches Amplitude data, analyzes with AI, and creates board issues",icon:s.jsx(Gb,{className:"h-4 w-4"}),enabled:((ya=B==null?void 0:B.analytics)==null?void 0:ya.enabled)??!1,schedule:((Fe=W.analytics)==null?void 0:Fe.schedule)||((pn=B.analytics)==null?void 0:pn.schedule)||"0 6 * * 1",nextRun:(gt=W.analytics)==null?void 0:gt.nextRun,delayInfo:W.analytics}]},[B,W]);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||!W||!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(Qe,{onClick:()=>{he(),ie()},children:"Retry"})]});const ma=W.paused,Rn=ma?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",xn=ma?"Paused":"Active",xe=eu(B.scheduleBundleId,B.cronSchedule,B.reviewerSchedule,((Ot=B.qa)==null?void 0:Ot.schedule)||"45 2,14 * * *",((ga=B.audit)==null?void 0:ga.schedule)||"50 3 * * 1",((ra=B.roadmapScanner)==null?void 0:ra.slicerSchedule)||"35 */12 * * *"),ke=(le,ye,_e)=>!xe||le==="analytics"||!Dr(xe.schedules[le],ye)?wg(_e):`${xe.label} - ${xe.hints[le]}`,Mt=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{className:`p-6 border-2 ${Rn}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Zc,{className:"h-8 w-8"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Automation Status"}),s.jsx("div",{className:"text-2xl font-bold",children:xn}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Qe,{variant:ma?"primary":"outline",size:"lg",onClick:De,loading:f,children:ma?s.jsxs(s.Fragment,{children:[s.jsx(kr,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(Ty,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:sa.map(le=>{var ye,_e,Ge,Be,mt,Dt,Rt,wt;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(La,{checked:le.enabled,disabled:y!==null,"aria-label":`Toggle ${le.name.toLowerCase()} automation`,onChange:tn=>D(le.id,tn)})]}),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:ke(le.id==="planner"?"slicer":le.id,le.id==="qa"?((ye=B==null?void 0:B.qa)==null?void 0:ye.schedule)||"":le.id==="audit"?((_e=B==null?void 0:B.audit)==null?void 0:_e.schedule)||"":le.id==="planner"?((Ge=B==null?void 0:B.roadmapScanner)==null?void 0:Ge.slicerSchedule)||"35 */12 * * *":le.id==="analytics"?((Be=B==null?void 0:B.analytics)==null?void 0:Be.schedule)||"0 6 * * 1":le.schedule,le.id==="qa"?((mt=B==null?void 0:B.qa)==null?void 0:mt.schedule)||"":le.id==="audit"?((Dt=B==null?void 0:B.audit)==null?void 0:Dt.schedule)||"":le.id==="planner"?((Rt=B==null?void 0:B.roadmapScanner)==null?void 0:Rt.slicerSchedule)||"35 */12 * * *":le.id==="analytics"?((wt=B==null?void 0:B.analytics)==null?void 0:wt.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:j!==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:[j===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(gx,{configs:O,currentProjectId:i??void 0,onEditJob:(le,ye)=>{},queueStatus:T,queueAnalytics:ne}),s.jsx(yx,{form:G.form,scheduleMode:G.scheduleMode,selectedTemplateId:G.selectedTemplateId,onFieldChange:me,onSwitchToTemplate:pe,onSwitchToCustom:Ce,onApplyTemplate:Me}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Qe,{variant:"ghost",onClick:()=>{var le,ye,_e,Ge,Be,mt,Dt,Rt;if(B){const wt=eu(B.scheduleBundleId,B.cronSchedule,B.reviewerSchedule,((le=B.qa)==null?void 0:le.schedule)||"45 2,14 * * *",((ye=B.audit)==null?void 0:ye.schedule)||"50 3 * * 1",((_e=B.roadmapScanner)==null?void 0:_e.slicerSchedule)||"35 */12 * * *"),tn=((Ge=B.queue)==null?void 0:Ge.providerBuckets)??{};K({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:((Be=B.roadmapScanner)==null?void 0:Be.enabled)??!0,slicerSchedule:((mt=B.roadmapScanner)==null?void 0:mt.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:B.scheduleBundleId??null,schedulingPriority:B.schedulingPriority??3,cronScheduleOffset:B.cronScheduleOffset??0,globalQueueEnabled:((Dt=B.queue)==null?void 0:Dt.enabled)??!0},scheduleMode:wt?"template":"custom",selectedTemplateId:(wt==null?void 0:wt.id)??"",isDirty:!1,queueMode:((Rt=B.queue)==null?void 0:Rt.mode)??"auto",providerBuckets:Object.entries(tn).map(([ya,Fe])=>({key:ya,maxConcurrency:Fe.maxConcurrency}))}),k(!1),P(""),Q("1")}},disabled:!G.isDirty,children:"Reset"}),s.jsxs(Qe,{onClick:Le,loading:S,disabled:!G.isDirty,children:[s.jsx(Fc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(et,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx($f,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),W.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:W.entries.map((le,ye)=>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},ye))})]})},{id:"parallelism",label:"Parallelism",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(I1,{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(ha,{label:"Dispatch Mode",value:G.queueMode,onChange:le=>{K(ye=>({...ye,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(Ye,{label:"Global Max Concurrency",type:"number",min:"1",max:"20",value:String(G.globalMaxConcurrency),onChange:le=>{const ye=Math.min(20,Math.max(1,Number(le.target.value||1)));K(_e=>({..._e,globalMaxConcurrency:ye,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,ye)=>{var Ge,Be;const _e=((Be=(Ge=ne==null?void 0:ne.byProviderBucket)==null?void 0:Ge[le.key])==null?void 0:Be.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}),_e>0&&s.jsxs("div",{className:"text-xs text-amber-400 mt-0.5",children:[_e," running"]})]}),s.jsx("div",{className:"w-28 shrink-0",children:s.jsx(Ye,{type:"number",min:"1",max:"10",value:String(le.maxConcurrency),"aria-label":`Max concurrency for ${le.key}`,onChange:mt=>{const Dt=Math.min(10,Math.max(1,Number(mt.target.value||1)));K(Rt=>{const wt=[...Rt.providerBuckets];return wt[ye]={...wt[ye],maxConcurrency:Dt},{...Rt,providerBuckets:wt,isDirty:!0}})}})}),s.jsx("button",{type:"button","aria-label":`Remove bucket ${le.key}`,onClick:()=>{K(mt=>({...mt,providerBuckets:mt.providerBuckets.filter((Dt,Rt)=>Rt!==ye),isDirty:!0}))},className:"p-1.5 rounded text-slate-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",children:s.jsx(uu,{className:"h-4 w-4"})})]},le.key)}),ae?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(Ye,{label:"Bucket Key",placeholder:"e.g. claude-native, codex",value:de,onChange:le=>P(le.target.value),helperText:"Provider bucket key"})}),s.jsx("div",{className:"w-28 shrink-0",children:s.jsx(Ye,{label:"Max Concurrency",type:"number",min:"1",max:"10",value:Z,onChange:le=>Q(le.target.value)})}),s.jsxs("div",{className:"flex gap-2 pb-0.5",children:[s.jsx(Qe,{size:"sm",onClick:()=>{const le=de.trim();if(!le)return;const ye=Math.min(10,Math.max(1,Number(Z||1)));K(_e=>({..._e,providerBuckets:[..._e.providerBuckets.filter(Ge=>Ge.key!==le),{key:le,maxConcurrency:ye}],isDirty:!0})),P(""),Q("1"),k(!1)},disabled:!de.trim(),children:"Add"}),s.jsx(Qe,{size:"sm",variant:"ghost",onClick:()=>{k(!1),P(""),Q("1")},children:"Cancel"})]})]}):s.jsxs("button",{type:"button",onClick:()=>k(!0),className:"flex items-center gap-1.5 text-sm text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(Us,{className:"h-4 w-4"}),"Add Bucket"]})]})]}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Qe,{variant:"ghost",onClick:()=>{var le;if(B){const ye=((le=B.queue)==null?void 0:le.providerBuckets)??{};K(_e=>{var Ge,Be;return{..._e,queueMode:((Ge=B.queue)==null?void 0:Ge.mode)??"auto",globalMaxConcurrency:((Be=B.queue)==null?void 0:Be.maxConcurrency)??1,providerBuckets:Object.entries(ye).map(([mt,Dt])=>({key:mt,maxConcurrency:Dt.maxConcurrency})),isDirty:!1}}),k(!1),P(""),Q("1")}},disabled:!G.isDirty,children:"Reset"}),s.jsxs(Qe,{onClick:Le,loading:S,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 ",W.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(Vy,{tabs:Mt,activeTab:c,onChange:m})]})};function Ig(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const Aw=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],kw=(l,i)=>l.includes(i)?l.filter(o=>o!==i):[...l,i],Xg=({webhook:l,onChange:i,onSave:o,onCancel:c,isNew:m})=>s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ha,{label:"Type",value:l.type,onChange:f=>{const v=f;i(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(Ye,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:f=>i({...l,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Ye,{label:"Chat ID",value:l.chatId||"",onChange:f=>i({...l,chatId:f.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ye,{label:"Webhook URL",type:"password",value:l.url||"",onChange:f=>i({...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:Aw.map(f=>s.jsx("button",{type:"button",onClick:()=>i({...l,events:kw(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(Qe,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Qe,{onClick:o,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:m?"Add Webhook":"Save Changes"})]})]}),xx=({notifications:l,onChange:i,globalWebhook:o,onSetGlobal:c,onUnsetGlobal:m})=>{const[f,v]=He.useState(null),[S,b]=He.useState(!1),[y,w]=He.useState({type:"slack",url:"",events:[]}),j=()=>{i({webhooks:[...l.webhooks,y]}),w({type:"slack",url:"",events:[]}),b(!1)},M=(A,T)=>{const V=[...l.webhooks];V[A]=T,i({webhooks:V})},O=A=>{i({webhooks:l.webhooks.filter((T,V)=>V!==A)})};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:l.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):l.webhooks.map((A,T)=>s.jsx("div",{children:f===T?s.jsx(Xg,{webhook:A,onChange:V=>M(T,V),onSave:()=>v(null),onCancel:()=>v(null)}):s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:A.type}),A.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",A.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:A.events.map(V=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:V.replace("_"," ")},V))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[c!==void 0&&(()=>{const V=o!=null&&Ig(A)===Ig(o);return s.jsx("button",{type:"button",onClick:()=>V?m==null?void 0:m():c(A),className:`p-2 transition-colors ${V?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":V?"Global channel (active)":"Set as global channel",title:V?"Global channel (active)":"Set as global channel",children:s.jsx(p1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>v(T),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${A.type} webhook`,title:`Edit ${A.type} webhook`,children:s.jsx(Ff,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>O(T),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${A.type} webhook`,title:`Delete ${A.type} webhook`,children:s.jsx(uu,{className:"h-4 w-4"})})]})]})},T))}),S?s.jsx(Xg,{webhook:y,onChange:w,onSave:j,onCancel:()=>b(!1),isNew:!0}):s.jsxs(Qe,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Us,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},_w=({isOpen:l,onClose:i,title:o,children:c})=>(z.useEffect(()=>{const m=f=>{f.key==="Escape"&&i()};return l&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[l,i]),l?Mb.createPortal(s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:i,"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:o}),s.jsx("button",{onClick:i,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:c})]})]}),document.body):null),zw=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(o=>l.toUpperCase().includes(o)),Uw=({value:l,isSensitive:i})=>{const[o,c]=He.useState(!1);return i?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:o?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>c(!o),className:"text-slate-500 hover:text-slate-300","aria-label":o?"Hide sensitive value":"Show sensitive value",title:o?"Hide sensitive value":"Show sensitive value",children:o?s.jsx(d1,{className:"h-4 w-4"}):s.jsx(h1,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},px=({envVars:l,onChange:i,compact:o=!1})=>{const[c,m]=He.useState(""),[f,v]=He.useState(""),[S,b]=He.useState(null),[y,w]=He.useState(""),{addToast:j}=Wt(),M=()=>{if(c.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(c)){j({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}i({...l,[c]:f}),m(""),v("")}},O=Y=>{const G={...l};delete G[Y],i(G)},A=Y=>{b(Y),w(l[Y]??"")},T=()=>{S&&(i({...l,[S]:y}),b(null),w(""))},V=()=>{b(null),w("")},ne=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[!o&&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:ne.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):ne.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}),S===Y?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:y,onChange:K=>w(K.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),s.jsx("button",{type:"button",onClick:T,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:V,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(Uw,{value:G,isSensitive:zw(Y)})]}),S!==Y&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>A(Y),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${Y}`,title:`Edit ${Y}`,children:s.jsx(Ff,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>O(Y),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${Y}`,title:`Delete ${Y}`,children:s.jsx(uu,{className:"h-4 w-4"})})]})]},Y))}),s.jsxs("div",{className:`flex items-end gap-3 ${o?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!o&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:c,onChange:Y=>m(Y.target.value.toUpperCase()),placeholder:o?"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:[!o&&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:o?"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(Qe,{onClick:M,disabled:!c.trim(),size:o?"sm":"md",children:[s.jsx(Us,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function Hw(l,i){var o;return!!(l!=null&&l.startsWith("glm-")||(o=i==null?void 0:i.model)!=null&&o.startsWith("glm-"))}function qw(l,i){var o,c;return Hw(l,i)?!((c=(o=i==null?void 0:i.envVars)==null?void 0:o.ANTHROPIC_API_KEY)!=null&&c.trim()):!1}const Jg={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},custom:{name:"",command:""}},Lw=({isOpen:l,onClose:i,onSave:o,presetId:c,preset:m,isBuiltIn:f,existingIds:v})=>{const[S,b]=He.useState(""),[y,w]=He.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[j,M]=He.useState(!1),[O,A]=He.useState("custom"),[T,V]=He.useState(null),ne=qw(c??S,y);He.useEffect(()=>{l&&(c&&m?(b(c),w({name:m.name,command:m.command,subcommand:m.subcommand??"",promptFlag:m.promptFlag??"",autoApproveFlag:m.autoApproveFlag??"",workdirFlag:m.workdirFlag??"",modelFlag:m.modelFlag??"",model:m.model??"",envVars:m.envVars??{}}),c==="claude"||m.command==="claude"?A("claude"):c==="codex"||m.command==="codex"?A("codex"):A("custom")):(b(""),w({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),A("custom")),V(null),M(!!(m!=null&&m.envVars&&Object.keys(m.envVars).length>0)))},[l,c,m]);const Y=P=>{if(A(P),P!=="custom"&&Jg[P]){const Z=Jg[P];w(Q=>({...Q,...Z,envVars:Q.envVars})),!c&&!S&&b(P)}},G=(P,Z)=>{w(Q=>({...Q,[P]:Z})),V(null)},K=()=>{if(!y.name.trim())return V("Name is required"),!1;if(!y.command.trim())return V("Command is required"),!1;if(!c){if(!S.trim())return V("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(S))return V("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(v.includes(S))return V("A preset with this ID already exists"),!1}return!0},de=()=>{var Z,Q,ae,k,W,_;if(!K())return;const P={name:y.name.trim(),command:y.command.trim()};(Z=y.subcommand)!=null&&Z.trim()&&(P.subcommand=y.subcommand.trim()),(Q=y.promptFlag)!=null&&Q.trim()&&(P.promptFlag=y.promptFlag.trim()),(ae=y.autoApproveFlag)!=null&&ae.trim()&&(P.autoApproveFlag=y.autoApproveFlag.trim()),(k=y.workdirFlag)!=null&&k.trim()&&(P.workdirFlag=y.workdirFlag.trim()),(W=y.modelFlag)!=null&&W.trim()&&(P.modelFlag=y.modelFlag.trim()),(_=y.model)!=null&&_.trim()&&(P.model=y.model.trim()),y.envVars&&Object.keys(y.envVars).length>0&&(P.envVars=y.envVars),o(c||S,P),i()};return s.jsx(_w,{isOpen:l,onClose:i,title:c?`Edit Preset: ${m==null?void 0:m.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[T&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:T}),ne&&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(nu,{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(ha,{label:"Template",value:O,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"})}),!c&&s.jsx(Ye,{label:"Preset ID",value:S,onChange:P=>b(P.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(Ye,{label:"Display Name",value:y.name,onChange:P=>G("name",P.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Ye,{label:"Command",value:y.command,onChange:P=>G("command",P.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(Ye,{label:"Model",value:y.model??"",onChange:P=>G("model",P.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Ye,{label:"Model Flag",value:y.modelFlag??"",onChange:P=>G("modelFlag",P.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:()=>M(!j),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[j?s.jsx(Kb,{className:"h-4 w-4"}):s.jsx(Ny,{className:"h-4 w-4"}),"Advanced Options"]}),j&&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(Ye,{label:"Subcommand",value:y.subcommand??"",onChange:P=>G("subcommand",P.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Ye,{label:"Prompt Flag",value:y.promptFlag??"",onChange:P=>G("promptFlag",P.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(Ye,{label:"Auto-Approve Flag",value:y.autoApproveFlag??"",onChange:P=>G("autoApproveFlag",P.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(Ye,{label:"Workdir Flag",value:y.workdirFlag??"",onChange:P=>G("workdirFlag",P.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(px,{envVars:y.envVars??{},onChange:P=>G("envVars",P),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Qe,{variant:"ghost",onClick:i,children:"Cancel"}),s.jsx(Qe,{onClick:de,children:c?"Save Changes":"Add Preset"})]})]})})},Jf=({label:l,value:i,onChange:o,placeholder:c,helpText:m})=>{const[f,v]=He.useState(""),S=()=>{f.trim()&&!i.includes(f.trim())&&(o([...i,f.trim()]),v(""))},b=w=>{o(i.filter(j=>j!==w))},y=w=>{w.key==="Enter"&&(w.preventDefault(),S())};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:i.map(w=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[w,s.jsx("button",{type:"button",onClick:()=>b(w),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${w}`,title:`Remove ${w}`,children:s.jsx(Hr,{className:"h-3 w-3"})})]},w))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:w=>v(w.target.value),onKeyDown:y,placeholder:c,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(Qe,{onClick:S,disabled:!f.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(Us,{className:"h-4 w-4"})})]}),m&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},Bw=({form:l,updateField:i,projectName:o,doctorChecks:c,doctorLoading:m})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{className:"p-6 space-y-6",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[s.jsx(Ye,{label:"Project Name",value:o,disabled:!0}),s.jsx(Ye,{label:"Default Branch",value:l.defaultBranch,onChange:f=>i("defaultBranch",f.target.value)}),s.jsx(Ye,{label:"PRD Directory",value:l.prdDir,onChange:f=>i("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Ye,{label:"Branch Prefix",value:l.branchPrefix,onChange:f=>i("branchPrefix",f.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(La,{label:"Enable PRD Executor",checked:l.executorEnabled,onChange:f=>i("executorEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(La,{label:"Enable Automated Reviews",checked:l.reviewerEnabled,onChange:f=>i("reviewerEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(La,{label:"Auto-merge approved PRs",checked:l.autoMerge,onChange:f=>i("autoMerge",f)})}),l.autoMerge&&s.jsx(ha,{label:"Merge Method",value:l.autoMergeMethod,onChange:f=>i("autoMergeMethod",f),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]})]}),s.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:s.jsx(Jf,{label:"Branch Patterns",value:l.branchPatterns,onChange:f=>i("branchPatterns",f),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})}),s.jsxs(et,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(wy,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),m?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):c.map((f,v)=>{const S=f.status==="pass",b=f.status==="warn",y=S?"bg-green-500/10 text-green-400 border-green-500/20":b?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return s.jsxs("div",{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:f.name}),s.jsx("p",{className:"text-xs text-slate-500",children:f.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${y}`,children:f.status.toUpperCase()})]},`${f.name}-${v}`)})]})]}),Kg=({presetId:l,preset:i,isBuiltIn:o,onEdit:c,onDelete:m,onReset:f})=>{var y,w,j;const v=i.envVars?Object.keys(i.envVars).length:0,b=(l.startsWith("glm-")||((y=i.model)==null?void 0:y.startsWith("glm-")))&&!((j=(w=i.envVars)==null?void 0:w.ANTHROPIC_API_KEY)!=null&&j.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:i.name}),o&&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(nu,{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:c,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${i.name} preset`,title:"Edit preset",children:s.jsx(Ff,{className:"h-4 w-4"})}),o?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 ${i.name} to defaults`,title:"Reset to defaults",children:s.jsx(Cy,{className:"h-4 w-4"})}):m&&s.jsx("button",{type:"button",onClick:m,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${i.name} preset`,title:"Delete preset",children:s.jsx(uu,{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:[i.command,i.subcommand&&` ${i.subcommand}`]})]}),i.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:i.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":""]})]})]})},Xc=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],Vw={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"}}},Yw=({form:l,updateField:i,jobProvidersChangedRef:o,getAllPresets:c,getPresetOptions:m,handleEditPreset:f,handleDeletePreset:v,handleResetPreset:S,handleAddPreset:b})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure AI provider presets with custom commands, models, and environment variables"})]}),s.jsxs(Qe,{onClick:b,children:[s.jsx(Us,{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:[Xc.map(y=>{const j=c()[y];return j?s.jsx(Kg,{presetId:y,preset:j,isBuiltIn:!0,onEdit:()=>f(y),onReset:()=>S(y)},y):null}),Object.entries(l.providerPresets).filter(([y])=>!Xc.includes(y)).map(([y,w])=>s.jsx(Kg,{presetId:y,preset:w,isBuiltIn:!1,onEdit:()=>f(y),onDelete:()=>v(y)},y))]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Assignments"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Assign provider presets to specific job types. Jobs without an assignment use the global provider."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-indigo-500/30 bg-indigo-500/5 gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Global Provider"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Default preset for all jobs without a specific assignment"})]}),s.jsx("div",{className:"w-64",children:s.jsx(ha,{value:l.provider,onChange:y=>i("provider",y),options:m(l.providerPresets)})})]}),[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"},{key:"analytics",label:"Analytics"}].map(({key:y,label:w})=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:w}),s.jsx("div",{className:"w-64",children:s.jsx(ha,{value:l.jobProviders[y]??"",onChange:j=>{const M={...l.jobProviders};j===""?delete M[y]:M[y]=j,o.current=!0,i("jobProviders",M)},options:[{label:"Use Global (default)",value:""},...m(l.providerPresets)]})})]},y))]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Rate Limit Fallback"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Preset to use when the active provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ha,{label:"Primary Fallback Preset",value:l.primaryFallbackPreset,onChange:y=>i("primaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(c()).map(([y,w])=>({label:w.name,value:y}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(ha,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:y=>i("secondaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(c()).map(([y,w])=>({label:w.name,value:y}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Provider Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Environment variables passed to all provider CLIs. Preset-level env vars take precedence."}),s.jsx(px,{envVars:l.providerEnv,onChange:y=>i("providerEnv",y)})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Performance"}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("input",{type:"range",min:"0",max:"100",value:l.minReviewScore,onChange:y=>i("minReviewScore",Number(y.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),s.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:l.minReviewScore})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ye,{label:"Max Runtime (Executor)",type:"number",value:String(l.maxRuntime),onChange:y=>i("maxRuntime",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ye,{label:"Max Runtime (Reviewer)",type:"number",value:String(l.reviewerMaxRuntime),onChange:y=>i("reviewerMaxRuntime",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ye,{label:"Max Log Size",type:"number",value:String(l.maxLogSize),onChange:y=>i("maxLogSize",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automatic retry behavior for the PR reviewer when fixes do not fully resolve issues."})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ye,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(l.reviewerMaxRetries),onChange:y=>{const w=Math.min(10,Math.max(0,Number(y.target.value||0)));i("reviewerMaxRetries",w)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(Ye,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(l.reviewerRetryDelay),onChange:y=>{const w=Math.min(300,Math.max(0,Number(y.target.value||0)));i("reviewerRetryDelay",w)},helperText:"Wait time between retry attempts to let CI settle."}),s.jsx(Ye,{label:"Max PRs Per Run",type:"number",min:"0",max:"100",value:String(l.reviewerMaxPrsPerRun),onChange:y=>{const w=Math.min(100,Math.max(0,Number(y.target.value||0)));i("reviewerMaxPrsPerRun",w)},helperText:"Hard cap on how many PRs the reviewer processes per run. 0 = unlimited."})]})]})]}),$w=({form:l,updateField:i,handleRoadmapToggle:o})=>{var c,m;return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{id:"job-section-qa",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),s.jsx(La,{checked:l.qa.enabled,onChange:f=>i("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(On,{label:"QA Schedule",value:l.qa.schedule,onChange:f=>i("qa",{...l.qa,schedule:f})}),s.jsx(Ye,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:f=>i("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(ha,{label:"Artifacts",value:l.qa.artifacts,onChange:f=>i("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(Ye,{label:"Skip Label",value:l.qa.skipLabel,onChange:f=>i("qa",{...l.qa,skipLabel:f.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsx(Jf,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:f=>i("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(La,{checked:l.qa.autoInstallPlaywright,onChange:f=>i("qa",{...l.qa,autoInstallPlaywright:f})})]})]})]})}),s.jsx("div",{id:"job-section-audit",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),s.jsx(La,{checked:l.audit.enabled,onChange:f=>i("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(On,{label:"Audit Schedule",value:l.audit.schedule,onChange:f=>i("audit",{...l.audit,schedule:f})}),s.jsx(Ye,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:f=>i("audit",{...l.audit,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})]})]})}),s.jsx("div",{id:"job-section-analytics",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Analytics (Amplitude)"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Fetch Amplitude data, analyze with AI, and create board issues"})]}),s.jsx(La,{checked:l.analytics.enabled,onChange:f=>i("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(Ye,{label:"Amplitude API Key",value:((c=l.providerEnv)==null?void 0:c.AMPLITUDE_API_KEY)??"",onChange:f=>i("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude project API key"}),s.jsx(Ye,{label:"Amplitude Secret Key",type:"password",value:((m=l.providerEnv)==null?void 0:m.AMPLITUDE_SECRET_KEY)??"",onChange:f=>i("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude secret key"}),s.jsx(On,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:f=>i("analytics",{...l.analytics,schedule:f})}),s.jsx(Ye,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:f=>i("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(Ye,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:f=>i("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(ha,{label:"Target Column",value:l.analytics.targetColumn,onChange:f=>i("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=>i("analytics",{...l.analytics,analysisPrompt:f.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-y"}),s.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:"Custom prompt for AI analysis. Leave empty to use default."})]})]})]})}),s.jsx("div",{id:"job-section-slicer",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Generate one PRD per run using ROADMAP.md first, then audit findings when roadmap work is exhausted"})]}),s.jsx(La,{checked:l.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:o})]}),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(Ye,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:f=>i("roadmapScanner",{...l.roadmapScanner,roadmapPath:f.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(On,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:f=>i("roadmapScanner",{...l.roadmapScanner,slicerSchedule:f})}),s.jsx(Ye,{label:"Planner Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:f=>i("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(ha,{label:"Planner Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:f=>i("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(ha,{label:"Planner Issue Column",value:l.roadmapScanner.issueColumn||"Draft",onChange:f=>i("roadmapScanner",{...l.roadmapScanner,issueColumn:f==="Ready"?"Ready":"Draft"}),options:[{label:"Draft (default)",value:"Draft"},{label:"Ready",value:"Ready"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})})]})},Fw=({form:l,scheduleMode:i,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:m,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:S,currentProjectId:b,onEditJob:y})=>s.jsx(yx,{form:l,scheduleMode:i,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:m,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:S,currentProjectId:b,onEditJob:y}),Gw=({form:l,updateField:i})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(La,{checked:l.boardProvider.enabled,onChange:o=>i("boardProvider",{...l.boardProvider,enabled:o})})]}),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(ha,{label:"Board Provider",value:l.boardProvider.provider,onChange:o=>i("boardProvider",{...l.boardProvider,provider:o}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),l.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{label:"Project Number",type:"number",value:String(l.boardProvider.projectNumber||""),onChange:o=>i("boardProvider",{...l.boardProvider,projectNumber:o.target.value?Number(o.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(Ye,{label:"Repository",value:l.boardProvider.repo||"",onChange:o=>i("boardProvider",{...l.boardProvider,repo:o.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),l.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(xx,{notifications:l.notifications,onChange:o=>i("notifications",o)})]})]}),Zw=({form:l,updateField:i})=>s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ye,{label:"Templates Directory",value:l.templatesDir,onChange:o=>i("templatesDir",o.target.value),helperText:"Directory for custom template overrides"}),s.jsx(Ye,{label:"Max Retries",type:"number",min:"1",value:String(l.maxRetries),onChange:o=>{const c=Math.max(1,Number(o.target.value||1));i("maxRetries",c)},helperText:"Retry attempts for rate-limited API calls"})]}),s.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:s.jsx(Jf,{label:"PRD Priority",value:l.prdPriority,onChange:o=>i("prdPriority",o),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]});function Pw(l,i,o,c){const{addToast:m}=Wt(),[f,v]=z.useState(!1),[S,b]=z.useState(null),[y,w]=z.useState(null),[j,M]=z.useState(null),O=z.useCallback(()=>({...Vw,...l}),[l]),A=z.useCallback(P=>{const Z=O();return Object.entries(Z).map(([Q,ae])=>({label:ae.name,value:Q}))},[O]),T=z.useCallback(P=>{const Z=[];i===P&&Z.push("Global Provider");const Q={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[ae,k]of Object.entries(o))k===P&&Z.push(Q[ae]??ae);return Z},[i,o]),V=z.useCallback(()=>{b(null),w(null),v(!0)},[]),ne=z.useCallback(P=>{const Q=O()[P];Q&&(b(P),w(Q),v(!0))},[O]),Y=z.useCallback(async(P,Z)=>{const Q=!S,ae={...l,[P]:Z};c("providerPresets",ae);try{await Qc({providerPresets:{[P]:Z}}),m({title:Q?"Preset Added":"Preset Updated",message:Q?`${Z.name} has been added. You can now assign it to jobs.`:`${Z.name} has been saved.`,type:"success"})}catch(k){m({title:"Save Failed",message:k instanceof Error?k.message:"Failed to save preset",type:"error"}),c("providerPresets",l)}},[S,l,c,m]),G=z.useCallback(P=>{var ae,k;if(Xc.includes(P)){m({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const Z=T(P);if(Z.length>0){M({presetId:P,presetName:((ae=O()[P])==null?void 0:ae.name)??P,references:Z});return}const Q={...l};delete Q[P],c("providerPresets",Q),m({title:"Preset Deleted",message:`${((k=O()[P])==null?void 0:k.name)??P} has been removed.`,type:"success"})},[l,c,m,T,O]),K=z.useCallback(P=>{const Z={...l};delete Z[P],c("providerPresets",Z),m({title:"Preset Reset",message:`${P} has been reset to built-in defaults.`,type:"success"})},[l,c,m]),de=z.useCallback(()=>{if(!j)return;const{presetId:P}=j,Z={...l};delete Z[P],c("providerPresets",Z);const Q={...o};for(const ae of Object.keys(Q))Q[ae]===P&&delete Q[ae];c("jobProviders",Q),i===P&&c("provider","claude"),M(null),m({title:"Preset Deleted",message:`${j.presetName} has been removed and all references cleared.`,type:"success"})},[j,l,o,i,c,m]);return{presetModalOpen:f,setPresetModalOpen:v,editingPresetId:S,editingPreset:y,deleteWarning:j,setDeleteWarning:M,getAllPresets:O,getPresetOptions:A,getPresetReferences:T,handleAddPreset:V,handleEditPreset:ne,handleSavePreset:Y,handleDeletePreset:G,handleResetPreset:K,handleConfirmDelete:de}}const Qw=["executor","reviewer","qa","audit","slicer","analytics"],jf=l=>{var i,o,c,m,f,v,S;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:((i=l.roadmapScanner)==null?void 0:i.enabled)??!0,roadmapPath:((o=l.roadmapScanner)==null?void 0:o.roadmapPath)??"ROADMAP.md",autoScanInterval:((c=l.roadmapScanner)==null?void 0:c.autoScanInterval)??300,slicerSchedule:((m=l.roadmapScanner)==null?void 0:m.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((f=l.roadmapScanner)==null?void 0:f.slicerMaxRuntime)??600,priorityMode:((v=l.roadmapScanner)==null?void 0:v.priorityMode)??"roadmap-first",issueColumn:((S=l.roadmapScanner)==null?void 0:S.issueColumn)??"Draft"},templatesDir:l.templatesDir||".night-watch/templates",boardProvider:l.boardProvider||{enabled:!0,provider:"github"},jobProviders:l.jobProviders||{},autoMerge:l.autoMerge??!1,autoMergeMethod:l.autoMergeMethod??"squash",fallbackOnRateLimit:l.fallbackOnRateLimit??!0,primaryFallbackModel:l.primaryFallbackModel??l.claudeModel??"sonnet",secondaryFallbackModel:l.secondaryFallbackModel??l.primaryFallbackModel??l.claudeModel??"sonnet",primaryFallbackPreset:l.primaryFallbackPreset??"",secondaryFallbackPreset:l.secondaryFallbackPreset??"",claudeModel:l.primaryFallbackModel??l.claudeModel??"sonnet",qa:l.qa||{enabled:!0,schedule:"45 2,14 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},audit:l.audit||{enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800},analytics:l.analytics||{enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},queue:l.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}}}},ey=l=>{const i=eu(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??"35 */12 * * *");return i?{mode:"template",selectedTemplateId:i.id}:{mode:"custom",selectedTemplateId:""}},Ww=()=>{const{addToast:l,projectName:i,selectedProjectId:o,globalModeLoading:c,isGlobalMode:m,removeProjectFromList:f}=Wt(),[v,S]=He.useState(!1),[b,y]=He.useState(!1),[w,j]=He.useState(!1),[M,O]=He.useState(null),[A,T]=He.useState([]),[V,ne]=He.useState(void 0),Y=He.useRef(!1),G=He.useRef(!1),[K,de]=He.useState("template"),[P,Z]=He.useState("always-on"),[Q,ae]=He.useState("general"),[k,W]=He.useState(null),{data:_,loading:ce,error:he,refetch:B}=yn(Qf,[o],{enabled:!c}),{data:$,loading:ie,refetch:ge}=yn(aS,[o],{enabled:!c}),Se=$??[],De=(xe,ke)=>{O(Mt=>Mt&&{...Mt,[xe]:ke})},D=Pw((M==null?void 0:M.providerPresets)??{},(M==null?void 0:M.provider)??"claude",(M==null?void 0:M.jobProviders)??{},De);He.useEffect(()=>{_y().then(T).catch(console.error),xS().then(xe=>ne(xe.webhook)).catch(()=>{})},[o]),He.useEffect(()=>{const xe=new URLSearchParams(location.search),ke=xe.get("tab"),Mt=xe.get("mode");ke&&ae({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",analytics:"jobs",board:"integrations",notifications:"integrations"}[ke]??ke),Mt==="custom"?de("custom"):Mt==="template"&&de("template");const Ot=xe.get("jobType");Ot&&setTimeout(()=>{me("current",Ot)},300)},[location.search,_]);const se=He.useCallback(xe=>{const ke=ey(xe);de(ke.mode),Z(ke.selectedTemplateId)},[]);He.useEffect(()=>{if(_)if(Y.current)Y.current=!1;else{const xe=jf(_);O(xe),se(xe)}},[_,se]),He.useEffect(()=>{M&&G.current&&(G.current=!1,Le())},[M==null?void 0:M.jobProviders]),He.useEffect(()=>{if(k){const xe=setTimeout(()=>W(null),2e3);return()=>clearTimeout(xe)}},[k]);const me=(xe,ke)=>{if(xe===i||xe==="current"){if(["qa","audit","slicer","analytics"].includes(ke)){ae("jobs"),setTimeout(()=>{const Ot=document.getElementById(`job-section-${ke}`);Ot&&(Ot.scrollIntoView({behavior:"smooth",block:"center"}),W(`job-section-${ke}`))},50);return}K!=="custom"&&Ce(),ae("schedules"),setTimeout(()=>{const ga={executor:"job-schedule-executor",reviewer:"job-schedule-reviewer"}[ke]||"",ra=document.getElementById(ga);ra&&(ra.scrollIntoView({behavior:"smooth",block:"center"}),W(ga))},50)}else l({title:"Project Switch Required",message:`To edit ${xe}, please switch to that project in the sidebar.`,type:"info"})},pe=()=>{if(de("template"),!M)return;const xe=ey(M);xe.mode==="template"&&(Z(xe.selectedTemplateId),De("scheduleBundleId",xe.selectedTemplateId))},Ce=()=>{de("custom"),De("scheduleBundleId",null),Z("")},Me=xe=>{Z(xe.id),O(ke=>ke&&{...ke,cronSchedule:xe.schedules.executor,reviewerSchedule:xe.schedules.reviewer,scheduleBundleId:xe.id,qa:{...ke.qa,schedule:xe.schedules.qa},audit:{...ke.audit,schedule:xe.schedules.audit},roadmapScanner:{...ke.roadmapScanner,slicerSchedule:xe.schedules.slicer},fallbackOnRateLimit:!0})},Le=async()=>{var Mt,Ot,ga,ra,le;if(!M)return;const xe=M.cronSchedule!==(_==null?void 0:_.cronSchedule)||M.reviewerSchedule!==(_==null?void 0:_.reviewerSchedule)||M.cronScheduleOffset!==((_==null?void 0:_.cronScheduleOffset)??0)||M.schedulingPriority!==((_==null?void 0:_.schedulingPriority)??3)||M.executorEnabled!==((_==null?void 0:_.executorEnabled)??!0)||M.reviewerEnabled!==((_==null?void 0:_.reviewerEnabled)??!0)||M.queue.enabled!==(((Mt=_==null?void 0:_.queue)==null?void 0:Mt.enabled)??!0)||M.qa.enabled!==((_==null?void 0:_.qa.enabled)??!0)||M.qa.schedule!==(_==null?void 0:_.qa.schedule)||M.audit.enabled!==((_==null?void 0:_.audit.enabled)??!0)||M.audit.schedule!==(_==null?void 0:_.audit.schedule)||M.analytics.enabled!==(((Ot=_==null?void 0:_.analytics)==null?void 0:Ot.enabled)??!1)||M.analytics.schedule!==(((ga=_==null?void 0:_.analytics)==null?void 0:ga.schedule)??"0 6 * * 1")||M.roadmapScanner.enabled!==(((ra=_==null?void 0:_.roadmapScanner)==null?void 0:ra.enabled)??!0)||(M.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((le=_==null?void 0:_.roadmapScanner)==null?void 0:le.slicerSchedule)||"35 */12 * * *"),ke={};for(const ye of Qw){const _e=M.jobProviders[ye];typeof _e=="string"&&_e.trim().length>0?ke[ye]=_e:_!=null&&_.jobProviders[ye]&&(ke[ye]=null)}S(!0);try{const ye=await Qc({provider:M.provider,providerLabel:M.providerLabel.trim(),providerPresets:Object.keys(M.providerPresets).length>0?M.providerPresets:void 0,defaultBranch:M.defaultBranch,prdDir:M.prdDir,branchPrefix:M.branchPrefix,branchPatterns:M.branchPatterns,executorEnabled:M.executorEnabled,reviewerEnabled:M.reviewerEnabled,minReviewScore:M.minReviewScore,maxRuntime:M.maxRuntime,reviewerMaxRuntime:M.reviewerMaxRuntime,maxLogSize:M.maxLogSize,cronSchedule:M.cronSchedule,reviewerSchedule:M.reviewerSchedule,scheduleBundleId:K==="template"?M.scheduleBundleId:null,cronScheduleOffset:M.cronScheduleOffset,schedulingPriority:M.schedulingPriority,maxRetries:M.maxRetries,reviewerMaxRetries:M.reviewerMaxRetries,reviewerRetryDelay:M.reviewerRetryDelay,reviewerMaxPrsPerRun:M.reviewerMaxPrsPerRun,providerEnv:M.providerEnv,notifications:M.notifications,prdPriority:M.prdPriority,roadmapScanner:M.roadmapScanner,templatesDir:M.templatesDir,boardProvider:M.boardProvider,jobProviders:ke,autoMerge:M.autoMerge,autoMergeMethod:M.autoMergeMethod,fallbackOnRateLimit:M.fallbackOnRateLimit,primaryFallbackModel:M.primaryFallbackModel,secondaryFallbackModel:M.secondaryFallbackModel,primaryFallbackPreset:M.primaryFallbackPreset||void 0,secondaryFallbackPreset:M.secondaryFallbackPreset||void 0,claudeModel:M.primaryFallbackModel,qa:M.qa,audit:M.audit,analytics:M.analytics,queue:M.queue}),_e=jf(ye);O(_e),se(_e);let Ge="";if(xe)try{await tu()}catch(Be){Ge=Be instanceof Error?Be.message:"failed to reinstall cron schedules"}l(Ge?{title:"Settings Saved (Cron Reinstall Failed)",message:Ge,type:"warning"}:{title:"Settings Saved",message:xe?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),Y.current=!0,B(),ge()}catch(ye){l({title:"Save Failed",message:ye instanceof Error?ye.message:"Failed to save configuration",type:"error"})}finally{S(!1)}},St=()=>{if(_){const xe=jf(_);O(xe),se(xe),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},tt=async xe=>{if(!(V!=null&&!window.confirm("Replace existing global channel?")))try{const ke=await pg({webhook:xe});ne(ke.webhook)}catch(ke){l({title:"Failed to set global channel",message:ke instanceof Error?ke.message:"Unknown error",type:"error"})}},sa=async()=>{try{await pg({webhook:null}),ne(null)}catch(xe){l({title:"Failed to unset global channel",message:xe instanceof Error?xe.message:"Unknown error",type:"error"})}},ma=async xe=>{try{const ke=await Ly(xe);De("roadmapScanner",ke.roadmapScanner);let Mt="";try{await tu()}catch(Ot){Mt=Ot instanceof Error?Ot.message:"Failed to reinstall cron schedules"}l(Mt?{title:"Planner Saved (Cron Reinstall Failed)",message:Mt,type:"warning"}:{title:xe?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${xe?"enabled":"disabled"}.`,type:"success"})}catch(ke){l({title:"Toggle Failed",message:ke instanceof Error?ke.message:"Failed to toggle roadmap scanner",type:"error"})}},Rn=async()=>{if(o){j(!0);try{await eS(o),f(o),y(!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{j(!1)}}};if(ce||!M)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(Qe,{onClick:()=>B(),children:"Retry"})]});const xn=[{id:"general",label:"General",content:s.jsx(Bw,{form:M,updateField:De,projectName:i,doctorChecks:Se,doctorLoading:ie})},{id:"ai-runtime",label:"AI & Runtime",content:s.jsx(Yw,{form:M,updateField:De,jobProvidersChangedRef:G,getAllPresets:D.getAllPresets,getPresetOptions:D.getPresetOptions,handleEditPreset:D.handleEditPreset,handleDeletePreset:D.handleDeletePreset,handleResetPreset:D.handleResetPreset,handleAddPreset:D.handleAddPreset})},{id:"jobs",label:"Jobs",content:s.jsx($w,{form:M,updateField:De,handleRoadmapToggle:ma})},{id:"schedules",label:"Schedules",content:s.jsx(Fw,{form:{cronSchedule:M.cronSchedule,reviewerSchedule:M.reviewerSchedule,qa:M.qa,audit:M.audit,analytics:M.analytics,roadmapScanner:{enabled:M.roadmapScanner.enabled,slicerSchedule:M.roadmapScanner.slicerSchedule||"35 */12 * * *"},scheduleBundleId:M.scheduleBundleId,schedulingPriority:M.schedulingPriority,cronScheduleOffset:M.cronScheduleOffset,globalQueueEnabled:M.queue.enabled},scheduleMode:K,selectedTemplateId:P,onFieldChange:(xe,ke)=>{xe==="globalQueueEnabled"?De("queue",{...M.queue,enabled:ke}):De(xe,ke)},onSwitchToTemplate:pe,onSwitchToCustom:Ce,onApplyTemplate:Me,allProjectConfigs:A,currentProjectId:o,onEditJob:me})},{id:"notifications",label:"Notifications",content:s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(xx,{notifications:M.notifications,onChange:xe=>De("notifications",xe),globalWebhook:V,onSetGlobal:tt,onUnsetGlobal:sa})]})},{id:"integrations",label:"Integrations",content:s.jsx(Gw,{form:M,updateField:De})},{id:"advanced",label:"Advanced",content:s.jsx(Zw,{form:M,updateField:De})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),s.jsx(Vy,{tabs:xn,activeTab:Q,onChange:ae}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(Qe,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:St,children:[s.jsx(Cy,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Qe,{onClick:Le,loading:v,children:[s.jsx(z1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),m&&o&&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(Qe,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>y(!0),children:[s.jsx(uu,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),b&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>!w&&y(!1),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(nu,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",i,"?"]})]}),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(Qe,{variant:"ghost",onClick:()=>y(!1),disabled:w,children:"Cancel"}),s.jsx(Qe,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:Rn,loading:w,children:"Remove"})]})]})]}),s.jsx(Lw,{isOpen:D.presetModalOpen,onClose:()=>{D.setPresetModalOpen(!1)},onSave:D.handleSavePreset,presetId:D.editingPresetId,preset:D.editingPreset,isBuiltIn:D.editingPresetId?Xc.includes(D.editingPresetId):!1,existingIds:Object.keys(D.getAllPresets())}),D.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:()=>D.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(nu,{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:D.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:D.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(Qe,{variant:"ghost",onClick:()=>D.setDeleteWarning(null),children:"Cancel"}),s.jsx(Qe,{variant:"secondary",onClick:D.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},Iw=()=>(OS(),DS(),s.jsx(yb,{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(ES,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(MS,{}),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(Zv,{children:[s.jsx(al,{path:"/",element:s.jsx(LS,{})}),s.jsx(al,{path:"/prs",element:s.jsx(VS,{})}),s.jsx(al,{path:"/board",element:s.jsx(zS,{})}),s.jsx(al,{path:"/scheduling",element:s.jsx(Rw,{})}),s.jsx(al,{path:"/logs",element:s.jsx(BS,{})}),s.jsx(al,{path:"/roadmap",element:s.jsx(YS,{})}),s.jsx(al,{path:"/settings",element:s.jsx(Ww,{})}),s.jsx(al,{path:"*",element:s.jsx(Fv,{to:"/",replace:!0})})]})})})]}),s.jsx(CS,{})]})})),vx=document.getElementById("root");if(!vx)throw new Error("Could not find root element to mount to");const Xw=Qp.createRoot(vx);Xw.render(s.jsx(He.StrictMode,{children:s.jsx(Iw,{})}));
|