@jonit-dev/night-watch-cli 1.8.10-beta.3 → 1.8.10-beta.4

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.
Files changed (164) hide show
  1. package/dist/cli.d.ts +3 -0
  2. package/dist/cli.d.ts.map +1 -0
  3. package/dist/cli.js +957 -1906
  4. package/dist/cli.js.map +1 -0
  5. package/dist/commands/analytics.d.ts +14 -0
  6. package/dist/commands/analytics.d.ts.map +1 -0
  7. package/dist/commands/analytics.js +69 -0
  8. package/dist/commands/analytics.js.map +1 -0
  9. package/dist/commands/audit.d.ts +19 -0
  10. package/dist/commands/audit.d.ts.map +1 -0
  11. package/dist/commands/audit.js +144 -0
  12. package/dist/commands/audit.js.map +1 -0
  13. package/dist/commands/board.d.ts +9 -0
  14. package/dist/commands/board.d.ts.map +1 -0
  15. package/dist/commands/board.js +702 -0
  16. package/dist/commands/board.js.map +1 -0
  17. package/dist/commands/cancel.d.ts +46 -0
  18. package/dist/commands/cancel.d.ts.map +1 -0
  19. package/dist/commands/cancel.js +239 -0
  20. package/dist/commands/cancel.js.map +1 -0
  21. package/dist/commands/cron.d.ts +8 -0
  22. package/dist/commands/cron.d.ts.map +1 -0
  23. package/dist/commands/cron.js +134 -0
  24. package/dist/commands/cron.js.map +1 -0
  25. package/dist/commands/dashboard/tab-actions.d.ts +10 -0
  26. package/dist/commands/dashboard/tab-actions.d.ts.map +1 -0
  27. package/dist/commands/dashboard/tab-actions.js +247 -0
  28. package/dist/commands/dashboard/tab-actions.js.map +1 -0
  29. package/dist/commands/dashboard/tab-config.d.ts +21 -0
  30. package/dist/commands/dashboard/tab-config.d.ts.map +1 -0
  31. package/dist/commands/dashboard/tab-config.js +873 -0
  32. package/dist/commands/dashboard/tab-config.js.map +1 -0
  33. package/dist/commands/dashboard/tab-logs.d.ts +10 -0
  34. package/dist/commands/dashboard/tab-logs.d.ts.map +1 -0
  35. package/dist/commands/dashboard/tab-logs.js +202 -0
  36. package/dist/commands/dashboard/tab-logs.js.map +1 -0
  37. package/dist/commands/dashboard/tab-schedules.d.ts +21 -0
  38. package/dist/commands/dashboard/tab-schedules.d.ts.map +1 -0
  39. package/dist/commands/dashboard/tab-schedules.js +320 -0
  40. package/dist/commands/dashboard/tab-schedules.js.map +1 -0
  41. package/dist/commands/dashboard/tab-status.d.ts +32 -0
  42. package/dist/commands/dashboard/tab-status.d.ts.map +1 -0
  43. package/dist/commands/dashboard/tab-status.js +424 -0
  44. package/dist/commands/dashboard/tab-status.js.map +1 -0
  45. package/dist/commands/dashboard/types.d.ts +42 -0
  46. package/dist/commands/dashboard/types.d.ts.map +1 -0
  47. package/dist/commands/dashboard/types.js +5 -0
  48. package/dist/commands/dashboard/types.js.map +1 -0
  49. package/dist/commands/dashboard.d.ts +11 -0
  50. package/dist/commands/dashboard.d.ts.map +1 -0
  51. package/dist/commands/dashboard.js +242 -0
  52. package/dist/commands/dashboard.js.map +1 -0
  53. package/dist/commands/doctor.d.ts +16 -0
  54. package/dist/commands/doctor.d.ts.map +1 -0
  55. package/dist/commands/doctor.js +195 -0
  56. package/dist/commands/doctor.js.map +1 -0
  57. package/dist/commands/history.d.ts +7 -0
  58. package/dist/commands/history.d.ts.map +1 -0
  59. package/dist/commands/history.js +49 -0
  60. package/dist/commands/history.js.map +1 -0
  61. package/dist/commands/init.d.ts +45 -0
  62. package/dist/commands/init.d.ts.map +1 -0
  63. package/dist/commands/init.js +777 -0
  64. package/dist/commands/init.js.map +1 -0
  65. package/dist/commands/install.d.ts +65 -0
  66. package/dist/commands/install.d.ts.map +1 -0
  67. package/dist/commands/install.js +405 -0
  68. package/dist/commands/install.js.map +1 -0
  69. package/dist/commands/logs.d.ts +15 -0
  70. package/dist/commands/logs.d.ts.map +1 -0
  71. package/dist/commands/logs.js +155 -0
  72. package/dist/commands/logs.js.map +1 -0
  73. package/dist/commands/merge.d.ts +26 -0
  74. package/dist/commands/merge.d.ts.map +1 -0
  75. package/dist/commands/merge.js +159 -0
  76. package/dist/commands/merge.js.map +1 -0
  77. package/dist/commands/notify.d.ts +7 -0
  78. package/dist/commands/notify.d.ts.map +1 -0
  79. package/dist/commands/notify.js +43 -0
  80. package/dist/commands/notify.js.map +1 -0
  81. package/dist/commands/plan.d.ts +19 -0
  82. package/dist/commands/plan.d.ts.map +1 -0
  83. package/dist/commands/plan.js +88 -0
  84. package/dist/commands/plan.js.map +1 -0
  85. package/dist/commands/prd-state.d.ts +12 -0
  86. package/dist/commands/prd-state.d.ts.map +1 -0
  87. package/dist/commands/prd-state.js +47 -0
  88. package/dist/commands/prd-state.js.map +1 -0
  89. package/dist/commands/prd.d.ts +18 -0
  90. package/dist/commands/prd.d.ts.map +1 -0
  91. package/dist/commands/prd.js +363 -0
  92. package/dist/commands/prd.js.map +1 -0
  93. package/dist/commands/prds.d.ts +13 -0
  94. package/dist/commands/prds.d.ts.map +1 -0
  95. package/dist/commands/prds.js +194 -0
  96. package/dist/commands/prds.js.map +1 -0
  97. package/dist/commands/prs.d.ts +14 -0
  98. package/dist/commands/prs.d.ts.map +1 -0
  99. package/dist/commands/prs.js +104 -0
  100. package/dist/commands/prs.js.map +1 -0
  101. package/dist/commands/qa.d.ts +34 -0
  102. package/dist/commands/qa.d.ts.map +1 -0
  103. package/dist/commands/qa.js +214 -0
  104. package/dist/commands/qa.js.map +1 -0
  105. package/dist/commands/queue.d.ts +8 -0
  106. package/dist/commands/queue.d.ts.map +1 -0
  107. package/dist/commands/queue.js +378 -0
  108. package/dist/commands/queue.js.map +1 -0
  109. package/dist/commands/resolve.d.ts +26 -0
  110. package/dist/commands/resolve.d.ts.map +1 -0
  111. package/dist/commands/resolve.js +186 -0
  112. package/dist/commands/resolve.js.map +1 -0
  113. package/dist/commands/retry.d.ts +9 -0
  114. package/dist/commands/retry.d.ts.map +1 -0
  115. package/dist/commands/retry.js +71 -0
  116. package/dist/commands/retry.js.map +1 -0
  117. package/dist/commands/review.d.ts +82 -0
  118. package/dist/commands/review.d.ts.map +1 -0
  119. package/dist/commands/review.js +479 -0
  120. package/dist/commands/review.js.map +1 -0
  121. package/dist/commands/run.d.ts +73 -0
  122. package/dist/commands/run.d.ts.map +1 -0
  123. package/dist/commands/run.js +509 -0
  124. package/dist/commands/run.js.map +1 -0
  125. package/dist/commands/serve.d.ts +19 -0
  126. package/dist/commands/serve.d.ts.map +1 -0
  127. package/dist/commands/serve.js +142 -0
  128. package/dist/commands/serve.js.map +1 -0
  129. package/dist/commands/shared/env-builder.d.ts +49 -0
  130. package/dist/commands/shared/env-builder.d.ts.map +1 -0
  131. package/dist/commands/shared/env-builder.js +150 -0
  132. package/dist/commands/shared/env-builder.js.map +1 -0
  133. package/dist/commands/slice.d.ts +35 -0
  134. package/dist/commands/slice.d.ts.map +1 -0
  135. package/dist/commands/slice.js +316 -0
  136. package/dist/commands/slice.js.map +1 -0
  137. package/dist/commands/state.d.ts +8 -0
  138. package/dist/commands/state.d.ts.map +1 -0
  139. package/dist/commands/state.js +54 -0
  140. package/dist/commands/state.js.map +1 -0
  141. package/dist/commands/status.d.ts +14 -0
  142. package/dist/commands/status.d.ts.map +1 -0
  143. package/dist/commands/status.js +297 -0
  144. package/dist/commands/status.js.map +1 -0
  145. package/dist/commands/summary.d.ts +14 -0
  146. package/dist/commands/summary.d.ts.map +1 -0
  147. package/dist/commands/summary.js +193 -0
  148. package/dist/commands/summary.js.map +1 -0
  149. package/dist/commands/uninstall.d.ts +25 -0
  150. package/dist/commands/uninstall.d.ts.map +1 -0
  151. package/dist/commands/uninstall.js +134 -0
  152. package/dist/commands/uninstall.js.map +1 -0
  153. package/dist/commands/update.d.ts +22 -0
  154. package/dist/commands/update.d.ts.map +1 -0
  155. package/dist/commands/update.js +90 -0
  156. package/dist/commands/update.js.map +1 -0
  157. package/dist/scripts/night-watch-helpers.sh +52 -7
  158. package/dist/web/assets/index-CgXj_KM1.css +1 -0
  159. package/dist/web/assets/index-Dr4zlyJf.js +406 -0
  160. package/dist/web/index.html +2 -2
  161. package/package.json +1 -1
  162. package/dist/web/assets/index-BUgI2S1s.js +0 -406
  163. package/dist/web/assets/index-CkdLFBd7.js +0 -406
  164. package/dist/web/assets/index-RMfswANB.css +0 -1
@@ -0,0 +1,406 @@
1
+ var Jy=Object.defineProperty;var J0=l=>{throw TypeError(l)};var Ky=(l,r,d)=>r in l?Jy(l,r,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[r]=d;var K0=(l,r,d)=>Ky(l,typeof r!="symbol"?r+"":r,d),of=(l,r,d)=>r.has(l)||J0("Cannot "+d);var ee=(l,r,d)=>(of(l,r,"read from private field"),d?d.call(l):r.get(l)),Ke=(l,r,d)=>r.has(l)?J0("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(l):r.set(l,d),we=(l,r,d,c)=>(of(l,r,"write to private field"),c?c.call(l,d):r.set(l,d),d),Ne=(l,r,d)=>(of(l,r,"access private method"),d);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const b of h.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&c(b)}).observe(document,{childList:!0,subtree:!0});function d(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function c(f){if(f.ep)return;f.ep=!0;const h=d(f);fetch(f.href,h)}})();function Hf(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function ev(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var r=l.default;if(typeof r=="function"){var d=function c(){return this instanceof c?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};d.prototype=r.prototype}else d={};return Object.defineProperty(d,"__esModule",{value:!0}),Object.keys(l).forEach(function(c){var f=Object.getOwnPropertyDescriptor(l,c);Object.defineProperty(d,c,f.get?f:{enumerable:!0,get:function(){return l[c]}})}),d}var df={exports:{}},$i={};/**
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 eg;function tv(){if(eg)return $i;eg=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function d(c,f,h){var b=null;if(h!==void 0&&(b=""+h),f.key!==void 0&&(b=""+f.key),"key"in f){h={};for(var N in f)N!=="key"&&(h[N]=f[N])}else h=f;return f=h.ref,{$$typeof:l,type:c,key:b,ref:f!==void 0?f:null,props:h}}return $i.Fragment=r,$i.jsx=d,$i.jsxs=d,$i}var tg;function av(){return tg||(tg=1,df.exports=tv()),df.exports}var s=av(),ff={exports:{}},Le={};/**
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 ag;function nv(){if(ag)return Le;ag=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),b=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),j=Symbol.iterator;function D(z){return z===null||typeof z!="object"?null:(z=j&&z[j]||z["@@iterator"],typeof z=="function"?z:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,R={};function Z(z,le,he){this.props=z,this.context=le,this.refs=R,this.updater=he||O}Z.prototype.isReactComponent={},Z.prototype.setState=function(z,le){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,le,"setState")},Z.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function T(){}T.prototype=Z.prototype;function K(z,le,he){this.props=z,this.context=le,this.refs=R,this.updater=he||O}var I=K.prototype=new T;I.constructor=K,M(I,Z.prototype),I.isPureReactComponent=!0;var oe=Array.isArray;function Y(){}var G={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function ne(z,le,he){var me=he.ref;return{$$typeof:l,type:z,key:le,ref:me!==void 0?me:null,props:he}}function k(z,le){return ne(z.type,le,z.props)}function ae(z){return typeof z=="object"&&z!==null&&z.$$typeof===l}function F(z){var le={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(he){return le[he]})}var ue=/\/+/g;function xe(z,le){return typeof z=="object"&&z!==null&&z.key!=null?F(""+z.key):le.toString(36)}function J(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(Y,Y):(z.status="pending",z.then(function(le){z.status==="pending"&&(z.status="fulfilled",z.value=le)},function(le){z.status==="pending"&&(z.status="rejected",z.reason=le)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function B(z,le,he,me,Ee){var de=typeof z;(de==="undefined"||de==="boolean")&&(z=null);var _e=!1;if(z===null)_e=!0;else switch(de){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(z.$$typeof){case l:case r:_e=!0;break;case S:return _e=z._init,B(_e(z._payload),le,he,me,Ee)}}if(_e)return Ee=Ee(z),_e=me===""?"."+xe(z,0):me,oe(Ee)?(he="",_e!=null&&(he=_e.replace(ue,"$&/")+"/"),B(Ee,le,he,"",function(Kt){return Kt})):Ee!=null&&(ae(Ee)&&(Ee=k(Ee,he+(Ee.key==null||z&&z.key===Ee.key?"":(""+Ee.key).replace(ue,"$&/")+"/")+_e)),le.push(Ee)),1;_e=0;var ct=me===""?".":me+":";if(oe(z))for(var Xe=0;Xe<z.length;Xe++)me=z[Xe],de=ct+xe(me,Xe),_e+=B(me,le,he,de,Ee);else if(Xe=D(z),typeof Xe=="function")for(z=Xe.call(z),Xe=0;!(me=z.next()).done;)me=me.value,de=ct+xe(me,Xe++),_e+=B(me,le,he,de,Ee);else if(de==="object"){if(typeof z.then=="function")return B(J(z),le,he,me,Ee);throw le=String(z),Error("Objects are not valid as a React child (found: "+(le==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":le)+"). If you meant to render a collection of children, use an array instead.")}return _e}function re(z,le,he){if(z==null)return z;var me=[],Ee=0;return B(z,me,"","",function(de){return le.call(he,de,Ee++)}),me}function ge(z){if(z._status===-1){var le=z._result;le=le(),le.then(function(he){(z._status===0||z._status===-1)&&(z._status=1,z._result=he)},function(he){(z._status===0||z._status===-1)&&(z._status=2,z._result=he)}),z._status===-1&&(z._status=0,z._result=le)}if(z._status===1)return z._result.default;throw z._result}var Se=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var le=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(le))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},ke={map:re,forEach:function(z,le,he){re(z,function(){le.apply(this,arguments)},he)},count:function(z){var le=0;return re(z,function(){le++}),le},toArray:function(z){return re(z,function(le){return le})||[]},only:function(z){if(!ae(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Le.Activity=C,Le.Children=ke,Le.Component=Z,Le.Fragment=d,Le.Profiler=f,Le.PureComponent=K,Le.StrictMode=c,Le.Suspense=v,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Le.__COMPILER_RUNTIME={__proto__:null,c:function(z){return G.H.useMemoCache(z)}},Le.cache=function(z){return function(){return z.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(z,le,he){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var me=M({},z.props),Ee=z.key;if(le!=null)for(de in le.key!==void 0&&(Ee=""+le.key),le)!$.call(le,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&le.ref===void 0||(me[de]=le[de]);var de=arguments.length-2;if(de===1)me.children=he;else if(1<de){for(var _e=Array(de),ct=0;ct<de;ct++)_e[ct]=arguments[ct+2];me.children=_e}return ne(z.type,Ee,me)},Le.createContext=function(z){return z={$$typeof:b,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:h,_context:z},z},Le.createElement=function(z,le,he){var me,Ee={},de=null;if(le!=null)for(me in le.key!==void 0&&(de=""+le.key),le)$.call(le,me)&&me!=="key"&&me!=="__self"&&me!=="__source"&&(Ee[me]=le[me]);var _e=arguments.length-2;if(_e===1)Ee.children=he;else if(1<_e){for(var ct=Array(_e),Xe=0;Xe<_e;Xe++)ct[Xe]=arguments[Xe+2];Ee.children=ct}if(z&&z.defaultProps)for(me in _e=z.defaultProps,_e)Ee[me]===void 0&&(Ee[me]=_e[me]);return ne(z,de,Ee)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(z){return{$$typeof:N,render:z}},Le.isValidElement=ae,Le.lazy=function(z){return{$$typeof:S,_payload:{_status:-1,_result:z},_init:ge}},Le.memo=function(z,le){return{$$typeof:p,type:z,compare:le===void 0?null:le}},Le.startTransition=function(z){var le=G.T,he={};G.T=he;try{var me=z(),Ee=G.S;Ee!==null&&Ee(he,me),typeof me=="object"&&me!==null&&typeof me.then=="function"&&me.then(Y,Se)}catch(de){Se(de)}finally{le!==null&&he.types!==null&&(le.types=he.types),G.T=le}},Le.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},Le.use=function(z){return G.H.use(z)},Le.useActionState=function(z,le,he){return G.H.useActionState(z,le,he)},Le.useCallback=function(z,le){return G.H.useCallback(z,le)},Le.useContext=function(z){return G.H.useContext(z)},Le.useDebugValue=function(){},Le.useDeferredValue=function(z,le){return G.H.useDeferredValue(z,le)},Le.useEffect=function(z,le){return G.H.useEffect(z,le)},Le.useEffectEvent=function(z){return G.H.useEffectEvent(z)},Le.useId=function(){return G.H.useId()},Le.useImperativeHandle=function(z,le,he){return G.H.useImperativeHandle(z,le,he)},Le.useInsertionEffect=function(z,le){return G.H.useInsertionEffect(z,le)},Le.useLayoutEffect=function(z,le){return G.H.useLayoutEffect(z,le)},Le.useMemo=function(z,le){return G.H.useMemo(z,le)},Le.useOptimistic=function(z,le){return G.H.useOptimistic(z,le)},Le.useReducer=function(z,le,he){return G.H.useReducer(z,le,he)},Le.useRef=function(z){return G.H.useRef(z)},Le.useState=function(z){return G.H.useState(z)},Le.useSyncExternalStore=function(z,le,he){return G.H.useSyncExternalStore(z,le,he)},Le.useTransition=function(){return G.H.useTransition()},Le.version="19.2.4",Le}var ng;function qf(){return ng||(ng=1,ff.exports=nv()),ff.exports}var H=qf();const Oe=Hf(H);var hf={exports:{}},Pi={},mf={exports:{}},gf={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var lg;function lv(){return lg||(lg=1,(function(l){function r(B,re){var ge=B.length;B.push(re);e:for(;0<ge;){var Se=ge-1>>>1,ke=B[Se];if(0<f(ke,re))B[Se]=re,B[ge]=ke,ge=Se;else break e}}function d(B){return B.length===0?null:B[0]}function c(B){if(B.length===0)return null;var re=B[0],ge=B.pop();if(ge!==re){B[0]=ge;e:for(var Se=0,ke=B.length,z=ke>>>1;Se<z;){var le=2*(Se+1)-1,he=B[le],me=le+1,Ee=B[me];if(0>f(he,ge))me<ke&&0>f(Ee,he)?(B[Se]=Ee,B[me]=ge,Se=me):(B[Se]=he,B[le]=ge,Se=le);else if(me<ke&&0>f(Ee,ge))B[Se]=Ee,B[me]=ge,Se=me;else break e}}return re}function f(B,re){var ge=B.sortIndex-re.sortIndex;return ge!==0?ge:B.id-re.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;l.unstable_now=function(){return h.now()}}else{var b=Date,N=b.now();l.unstable_now=function(){return b.now()-N}}var v=[],p=[],S=1,C=null,j=3,D=!1,O=!1,M=!1,R=!1,Z=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function I(B){for(var re=d(p);re!==null;){if(re.callback===null)c(p);else if(re.startTime<=B)c(p),re.sortIndex=re.expirationTime,r(v,re);else break;re=d(p)}}function oe(B){if(M=!1,I(B),!O)if(d(v)!==null)O=!0,Y||(Y=!0,F());else{var re=d(p);re!==null&&J(oe,re.startTime-B)}}var Y=!1,G=-1,$=5,ne=-1;function k(){return R?!0:!(l.unstable_now()-ne<$)}function ae(){if(R=!1,Y){var B=l.unstable_now();ne=B;var re=!0;try{e:{O=!1,M&&(M=!1,T(G),G=-1),D=!0;var ge=j;try{t:{for(I(B),C=d(v);C!==null&&!(C.expirationTime>B&&k());){var Se=C.callback;if(typeof Se=="function"){C.callback=null,j=C.priorityLevel;var ke=Se(C.expirationTime<=B);if(B=l.unstable_now(),typeof ke=="function"){C.callback=ke,I(B),re=!0;break t}C===d(v)&&c(v),I(B)}else c(v);C=d(v)}if(C!==null)re=!0;else{var z=d(p);z!==null&&J(oe,z.startTime-B),re=!1}}break e}finally{C=null,j=ge,D=!1}re=void 0}}finally{re?F():Y=!1}}}var F;if(typeof K=="function")F=function(){K(ae)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,xe=ue.port2;ue.port1.onmessage=ae,F=function(){xe.postMessage(null)}}else F=function(){Z(ae,0)};function J(B,re){G=Z(function(){B(l.unstable_now())},re)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(B){B.callback=null},l.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<B?Math.floor(1e3/B):5},l.unstable_getCurrentPriorityLevel=function(){return j},l.unstable_next=function(B){switch(j){case 1:case 2:case 3:var re=3;break;default:re=j}var ge=j;j=re;try{return B()}finally{j=ge}},l.unstable_requestPaint=function(){R=!0},l.unstable_runWithPriority=function(B,re){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ge=j;j=B;try{return re()}finally{j=ge}},l.unstable_scheduleCallback=function(B,re,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,B){case 1:var ke=-1;break;case 2:ke=250;break;case 5:ke=1073741823;break;case 4:ke=1e4;break;default:ke=5e3}return ke=ge+ke,B={id:S++,callback:re,priorityLevel:B,startTime:ge,expirationTime:ke,sortIndex:-1},ge>Se?(B.sortIndex=ge,r(p,B),d(v)===null&&B===d(p)&&(M?(T(G),G=-1):M=!0,J(oe,ge-Se))):(B.sortIndex=ke,r(v,B),O||D||(O=!0,Y||(Y=!0,F()))),B},l.unstable_shouldYield=k,l.unstable_wrapCallback=function(B){var re=j;return function(){var ge=j;j=re;try{return B.apply(this,arguments)}finally{j=ge}}}})(gf)),gf}var sg;function sv(){return sg||(sg=1,mf.exports=lv()),mf.exports}var xf={exports:{}},la={};/**
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 rg;function rv(){if(rg)return la;rg=1;var l=qf();function r(v){var p="https://react.dev/errors/"+v;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)p+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+v+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var c={d:{f:d,r:function(){throw Error(r(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(v,p,S){var C=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:C==null?null:""+C,children:v,containerInfo:p,implementation:S}}var b=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function N(v,p){if(v==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return la.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,la.createPortal=function(v,p){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return h(v,p,null,S)},la.flushSync=function(v){var p=b.T,S=c.p;try{if(b.T=null,c.p=2,v)return v()}finally{b.T=p,c.p=S,c.d.f()}},la.preconnect=function(v,p){typeof v=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,c.d.C(v,p))},la.prefetchDNS=function(v){typeof v=="string"&&c.d.D(v)},la.preinit=function(v,p){if(typeof v=="string"&&p&&typeof p.as=="string"){var S=p.as,C=N(S,p.crossOrigin),j=typeof p.integrity=="string"?p.integrity:void 0,D=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;S==="style"?c.d.S(v,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:C,integrity:j,fetchPriority:D}):S==="script"&&c.d.X(v,{crossOrigin:C,integrity:j,fetchPriority:D,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},la.preinitModule=function(v,p){if(typeof v=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var S=N(p.as,p.crossOrigin);c.d.M(v,{crossOrigin:S,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&c.d.M(v)},la.preload=function(v,p){if(typeof v=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var S=p.as,C=N(S,p.crossOrigin);c.d.L(v,S,{crossOrigin:C,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},la.preloadModule=function(v,p){if(typeof v=="string")if(p){var S=N(p.as,p.crossOrigin);c.d.m(v,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:S,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else c.d.m(v)},la.requestFormReset=function(v){c.d.r(v)},la.unstable_batchedUpdates=function(v,p){return v(p)},la.useFormState=function(v,p,S){return b.H.useFormState(v,p,S)},la.useFormStatus=function(){return b.H.useHostTransitionStatus()},la.version="19.2.4",la}var ig;function gx(){if(ig)return xf.exports;ig=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),xf.exports=rv(),xf.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var ug;function iv(){if(ug)return Pi;ug=1;var l=sv(),r=qf(),d=gx();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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(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 b(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function N(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(h(e)!==e)throw Error(c(188))}function p(e){var t=e.alternate;if(!t){if(t=h(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 o=u.alternate;if(o===null){if(n=u.return,n!==null){a=n;continue}break}if(u.child===o.child){for(o=u.child;o;){if(o===a)return v(u),e;if(o===n)return v(u),t;o=o.sibling}throw Error(c(188))}if(a.return!==n.return)a=u,n=o;else{for(var x=!1,E=u.child;E;){if(E===a){x=!0,a=u,n=o;break}if(E===n){x=!0,n=u,a=o;break}E=E.sibling}if(!x){for(E=o.child;E;){if(E===a){x=!0,a=o,n=u;break}if(E===n){x=!0,n=o,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 S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var C=Object.assign,j=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),K=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),oe=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=ae&&e[ae]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Symbol.for("react.client.reference");function xe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case Z:return"Profiler";case R:return"StrictMode";case oe:return"Suspense";case Y:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case K:return e.displayName||"Context";case T:return(e._context.displayName||"Context")+".Consumer";case I:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:xe(e.type)||"Memo";case $:t=e._payload,e=e._init;try{return xe(e(t))}catch{}}return null}var J=Array.isArray,B=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},Se=[],ke=-1;function z(e){return{current:e}}function le(e){0>ke||(e.current=Se[ke],Se[ke]=null,ke--)}function he(e,t){ke++,Se[ke]=e.current,e.current=t}var me=z(null),Ee=z(null),de=z(null),_e=z(null);function ct(e,t){switch(he(de,t),he(Ee,e),he(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?S0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=S0(t),e=N0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}le(me),he(me,e)}function Xe(){le(me),le(Ee),le(de)}function Kt(e){e.memoizedState!==null&&he(_e,e);var t=me.current,a=N0(t,e.type);t!==a&&(he(Ee,e),he(me,a))}function cn(e){Ee.current===e&&(le(me),le(Ee)),_e.current===e&&(le(_e),qi._currentValue=ge)}var Pl,Nn;function Fa(e){if(Pl===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Pl=t&&t[1]||"",Nn=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Pl+e+Nn}var Za=!1;function Gl(e,t){if(!e||Za)return"";Za=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(te){var X=te}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(te){X=te}e.call(ce.prototype)}}else{try{throw Error()}catch(te){X=te}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(te){if(te&&X&&typeof te.stack=="string")return[te.stack,X.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 o=n.DetermineComponentFrameRoot(),x=o[0],E=o[1];if(x&&E){var _=x.split(`
44
+ `),Q=E.split(`
45
+ `);for(u=n=0;n<_.length&&!_[n].includes("DetermineComponentFrameRoot");)n++;for(;u<Q.length&&!Q[u].includes("DetermineComponentFrameRoot");)u++;if(n===_.length||u===Q.length)for(n=_.length-1,u=Q.length-1;1<=n&&0<=u&&_[n]!==Q[u];)u--;for(;1<=n&&0<=u;n--,u--)if(_[n]!==Q[u]){if(n!==1||u!==1)do if(n--,u--,0>u||_[n]!==Q[u]){var se=`
46
+ `+_[n].replace(" at new "," at ");return e.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",e.displayName)),se}while(1<=n&&0<=u);break}}}finally{Za=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Fa(a):""}function Fl(e,t){switch(e.tag){case 26:case 27:case 5:return Fa(e.type);case 16:return Fa("Lazy");case 13:return e.child!==t&&t!==null?Fa("Suspense Fallback"):Fa("Suspense");case 19:return Fa("SuspenseList");case 0:case 15:return Gl(e.type,!1);case 11:return Gl(e.type.render,!1);case 1:return Gl(e.type,!0);case 31:return Fa("Activity");default:return""}}function Zl(e){try{var t="",a=null;do t+=Fl(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
47
+ Error generating stack: `+n.message+`
48
+ `+n.stack}}var jn=Object.prototype.hasOwnProperty,pe=l.unstable_scheduleCallback,Te=l.unstable_cancelCallback,Ot=l.unstable_shouldYield,qt=l.unstable_requestPaint,St=l.unstable_now,wn=l.unstable_getCurrentPriorityLevel,Wl=l.unstable_ImmediatePriority,Ql=l.unstable_UserBlockingPriority,En=l.unstable_NormalPriority,Ys=l.unstable_LowPriority,Kn=l.unstable_IdlePriority,He=l.log,ba=l.unstable_setDisableYieldValue,ot=null,zt=null;function Pt(e){if(typeof He=="function"&&ba(e),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(ot,e)}catch{}}var Gt=Math.clz32?Math.clz32:so,fu=Math.log,lo=Math.LN2;function so(e){return e>>>=0,e===0?32:31-(fu(e)/lo|0)|0}var el=256,$s=262144,ea=4194304;function on(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Il(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,o=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var E=n&134217727;return E!==0?(n=E&~o,n!==0?u=on(n):(x&=E,x!==0?u=on(x):a||(a=E&~e,a!==0&&(u=on(a))))):(E=n&~o,E!==0?u=on(E):x!==0?u=on(x):a||(a=n&~e,a!==0&&(u=on(a)))),u===0?0:t!==0&&t!==u&&(t&o)===0&&(o=u&-u,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:u}function tl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function hu(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 Yr(){var e=ea;return ea<<=1,(ea&62914560)===0&&(ea=4194304),e}function Ps(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function al(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mu(e,t,a,n,u,o){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,_=e.expirationTimes,Q=e.hiddenUpdates;for(a=x&~a;0<a;){var se=31-Gt(a),ce=1<<se;E[se]=0,_[se]=-1;var X=Q[se];if(X!==null)for(Q[se]=null,se=0;se<X.length;se++){var te=X[se];te!==null&&(te.lane&=-536870913)}a&=~ce}n!==0&&dt(e,n,0),o!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=o&~(x&~t))}function dt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Gt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function ia(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Gt(a),u=1<<n;u&t|e[n]&t&&(e[n]|=t),a&=~u}}function $r(e,t){var a=t&-t;return a=(a&42)!==0?1:Gs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Gs(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 ta(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fs(){var e=re.p;return e!==0?e:(e=window.event,e===void 0?32:G0(e.type))}function Pr(e,t){var a=re.p;try{return re.p=e,t()}finally{re.p=a}}var Wa=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Wa,Ut="__reactProps$"+Wa,Tn="__reactContainer$"+Wa,Xl="__reactEvents$"+Wa,gu="__reactListeners$"+Wa,xu="__reactHandles$"+Wa,pu="__reactResources$"+Wa,Jl="__reactMarker$"+Wa;function Zs(e){delete e[Nt],delete e[Ut],delete e[Xl],delete e[gu],delete e[xu]}function Cn(e){var t=e[Nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Tn]||a[Nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=O0(e);e!==null;){if(a=e[Nt])return a;e=O0(e)}return t}e=a,a=e.parentNode}return null}function Me(e){if(e=e[Nt]||e[Tn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ua(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Qa(e){var t=e[pu];return t||(t=e[pu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Rt(e){e[Jl]=!0}var yu=new Set,Gr={};function dn(e,t){nl(e,t),nl(e+"Capture",t)}function nl(e,t){for(Gr[e]=t,e=0;e<t.length;e++)yu.add(t[e])}var vu=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]*$"),bu={},Mn={};function Fr(e){return jn.call(Mn,e)?!0:jn.call(bu,e)?!1:vu.test(e)?Mn[e]=!0:(bu[e]=!0,!1)}function Ft(e,t,a){if(Fr(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ws(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 et(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 jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zr(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,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(x){a=""+x,o.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 Kl(e){if(!e._valueTracker){var t=fn(e)?"checked":"value";e._valueTracker=Zr(e,t,""+e[t])}}function ll(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=fn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Ia(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 Qs=/[\n"\\]/g;function Zt(e){return e.replace(Qs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Is(e,t,a,n,u,o,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=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?es(e,x,jt(t)):a!=null?es(e,x,jt(a)):n!=null&&e.removeAttribute("value"),u==null&&o!=null&&(e.defaultChecked=!!o),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+jt(E):e.removeAttribute("name")}function sl(e,t,a,n,u,o,x,E){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Kl(e);return}a=a!=null?""+jt(a):"",t=t!=null?""+jt(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),Kl(e)}function es(e,t,a){t==="number"&&Ia(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function On(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=""+jt(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 ts(e,t,a){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+jt(a):""}function Wr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(c(92));if(J(n)){if(1<n.length)throw Error(c(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=jt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Kl(e)}function Xa(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var as=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 ns(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||as.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Su(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&&ns(e,u,n)}else for(var o in t)t.hasOwnProperty(o)&&ns(e,o,t[o])}function Xs(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ro=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Nu=/^[\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 ls(e){return Nu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Da(){}var Qr=null;function Js(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rn=null,rl=null;function ju(e){var t=Me(e);if(t&&(e=t.stateNode)){var a=e[Ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Is(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Zt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var u=n[Ut]||null;if(!u)throw Error(c(90));Is(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&&ll(n)}break e;case"textarea":ts(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&On(e,!!a.multiple,t,!1)}}}var Ir=!1;function Xr(e,t,a){if(Ir)return e(t,a);Ir=!0;try{var n=e(t);return n}finally{if(Ir=!1,(Rn!==null||rl!==null)&&(pc(),Rn&&(t=Rn,e=rl,rl=Rn=null,ju(t),e)))for(t=0;t<e.length;t++)ju(e[t])}}function ss(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Ut]||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 Ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jr=!1;if(Ja)try{var rs={};Object.defineProperty(rs,"passive",{get:function(){Jr=!0}}),window.addEventListener("test",rs,rs),window.removeEventListener("test",rs,rs)}catch{Jr=!1}var hn=null,Ks=null,er=null;function Lt(){if(er)return er;var e,t=Ks,a=t.length,n,u="value"in hn?hn.value:hn.textContent,o=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[o-n];n++);return er=u.slice(e,1<n?1-n:void 0)}function is(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 Ka(){return!0}function Dn(){return!1}function wt(e){function t(a,n,u,o,x){this._reactName=a,this._targetInst=u,this.type=n,this.nativeEvent=o,this.target=x,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(o):o[E]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ka:Dn,this.isPropagationStopped=Dn,this}return C(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=Ka)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ka)},persist:function(){},isPersistent:Ka}),t}var mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},us=wt(mn),cs=C({},mn,{view:0,detail:0}),Kr=wt(cs),tr,os,ds,ar=C({},cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hs,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!==ds&&(ds&&e.type==="mousemove"?(tr=e.screenX-ds.screenX,os=e.screenY-ds.screenY):os=tr=0,ds=e),tr)},movementY:function(e){return"movementY"in e?e.movementY:os}}),wu=wt(ar),io=C({},ar,{dataTransfer:0}),uo=wt(io),co=C({},cs,{relatedTarget:0}),nr=wt(co),oo=C({},mn,{animationName:0,elapsedTime:0,pseudoElement:0}),il=wt(oo),fo=C({},mn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ul=wt(fo),fs=C({},mn,{data:0}),cl=wt(fs),ho={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mo={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},go={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=go[e])?!!t[e]:!1}function hs(){return xo}var po=C({},cs,{key:function(e){if(e.key){var t=ho[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=is(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hs,charCode:function(e){return e.type==="keypress"?is(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?is(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yo=wt(po),vo=C({},ar,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eu=wt(vo),bo=C({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hs}),So=wt(bo),Tu=C({},mn,{propertyName:0,elapsedTime:0,pseudoElement:0}),No=wt(Tu),jo=C({},ar,{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=wt(jo),Eo=C({},mn,{newState:0,oldState:0}),To=wt(Eo),Cu=[9,13,27,32],ei=Ja&&"CompositionEvent"in window,ms=null;Ja&&"documentMode"in document&&(ms=document.documentMode);var Co=Ja&&"TextEvent"in window&&!ms,Mu=Ja&&(!ei||ms&&8<ms&&11>=ms),Ou=" ",Ru=!1;function Du(e,t){switch(e){case"keyup":return Cu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Au(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ol=!1;function Mo(e,t){switch(e){case"compositionend":return Au(t);case"keypress":return t.which!==32?null:(Ru=!0,Ou);case"textInput":return e=t.data,e===Ou&&Ru?null:e;default:return null}}function Oo(e,t){if(ol)return e==="compositionend"||!ei&&Du(e,t)?(e=Lt(),er=Ks=hn=null,ol=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mu&&t.locale!=="ko"?null:t.data;default:return null}}var Ro={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 _u(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ro[e.type]:t==="textarea"}function ti(e,t,a,n){Rn?rl?rl.push(n):rl=[n]:Rn=n,t=wc(t,"onChange"),0<t.length&&(a=new us("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var dl=null,gs=null;function ca(e){g0(e,0)}function en(e){var t=ua(e);if(ll(t))return e}function ku(e,t){if(e==="change")return t}var gn=!1;if(Ja){var ai;if(Ja){var Sa="oninput"in document;if(!Sa){var ni=document.createElement("div");ni.setAttribute("oninput","return;"),Sa=typeof ni.oninput=="function"}ai=Sa}else ai=!1;gn=ai&&(!document.documentMode||9<document.documentMode)}function li(){dl&&(dl.detachEvent("onpropertychange",si),gs=dl=null)}function si(e){if(e.propertyName==="value"&&en(gs)){var t=[];ti(t,gs,e,Js(e)),Xr(ca,t)}}function Pe(e,t,a){e==="focusin"?(li(),dl=t,gs=a,dl.attachEvent("onpropertychange",si)):e==="focusout"&&li()}function fl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return en(gs)}function Do(e,t){if(e==="click")return en(t)}function ht(e,t){if(e==="input"||e==="change")return en(t)}function xs(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var aa=typeof Object.is=="function"?Object.is:xs;function ps(e,t){if(aa(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(!jn.call(t,u)||!aa(e[u],t[u]))return!1}return!0}function zu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Uu(e,t){var a=zu(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=zu(a)}}function We(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?We(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ao(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ia(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=Ia(e.document)}return t}function lr(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 Lu=Ja&&"documentMode"in document&&11>=document.documentMode,hl=null,sr=null,Wt=null,rr=!1;function ys(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;rr||hl==null||hl!==Ia(n)||(n=hl,"selectionStart"in n&&lr(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}),Wt&&ps(Wt,n)||(Wt=n,n=wc(sr,"onSelect"),0<n.length&&(t=new us("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=hl)))}function An(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ml={animationend:An("Animation","AnimationEnd"),animationiteration:An("Animation","AnimationIteration"),animationstart:An("Animation","AnimationStart"),transitionrun:An("Transition","TransitionRun"),transitionstart:An("Transition","TransitionStart"),transitioncancel:An("Transition","TransitionCancel"),transitionend:An("Transition","TransitionEnd")},ri={},Hu={};Ja&&(Hu=document.createElement("div").style,"AnimationEvent"in window||(delete ml.animationend.animation,delete ml.animationiteration.animation,delete ml.animationstart.animation),"TransitionEvent"in window||delete ml.transitionend.transition);function _n(e){if(ri[e])return ri[e];if(!ml[e])return e;var t=ml[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Hu)return ri[e]=t[a];return e}var qu=_n("animationend"),Vu=_n("animationiteration"),ir=_n("animationstart"),_o=_n("transitionrun"),ko=_n("transitionstart"),Bu=_n("transitioncancel"),ii=_n("transitionend"),ui=new Map,ci="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(" ");ci.push("scrollEnd");function oa(e,t){ui.set(e,t),dn(t,[e])}var gl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},sa=[],Aa=0,vs=0;function xl(){for(var e=Aa,t=vs=Aa=0;t<e;){var a=sa[t];sa[t++]=null;var n=sa[t];sa[t++]=null;var u=sa[t];sa[t++]=null;var o=sa[t];if(sa[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}o!==0&&bs(a,u,o)}}function _a(e,t,a,n){sa[Aa++]=e,sa[Aa++]=t,sa[Aa++]=a,sa[Aa++]=n,vs|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ur(e,t,a,n){return _a(e,t,a,n),Ss(e)}function ka(e,t){return _a(e,null,null,t),Ss(e)}function bs(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var u=!1,o=e.return;o!==null;)o.childLanes|=a,n=o.alternate,n!==null&&(n.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(u=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,u&&t!==null&&(u=31-Gt(a),e=o.hiddenUpdates,n=e[u],n===null?e[u]=[t]:n.push(t),t.lane=a|536870912),o):null}function Ss(e){if(50<Ai)throw Ai=0,_d=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Na={};function cr(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(e,t,a,n){return new cr(e,t,a,n)}function or(e){return e=e.prototype,!(!e||!e.isReactComponent)}function za(e,t){var a=e.alternate;return a===null?(a=Qt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Yu(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 dr(e,t,a,n,u,o){var x=0;if(n=e,typeof e=="function")or(e)&&(x=1);else if(typeof e=="string")x=Vy(e,a,me.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=Qt(31,a,t,u),e.elementType=ne,e.lanes=o,e;case M:return Ua(a.children,u,o,t);case R:x=8,u|=24;break;case Z:return e=Qt(12,a,t,u|2),e.elementType=Z,e.lanes=o,e;case oe:return e=Qt(13,a,t,u),e.elementType=oe,e.lanes=o,e;case Y:return e=Qt(19,a,t,u),e.elementType=Y,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case K:x=10;break e;case T:x=9;break e;case I:x=11;break e;case G:x=14;break e;case $:x=16,n=null;break e}x=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=Qt(x,a,t,u),t.elementType=e,t.type=n,t.lanes=o,t}function Ua(e,t,a,n){return e=Qt(7,e,n,t),e.lanes=a,e}function oi(e,t,a){return e=Qt(6,e,null,t),e.lanes=a,e}function $u(e){var t=Qt(18,null,null,0);return t.stateNode=e,t}function pl(e,t,a){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var di=new WeakMap;function da(e,t){if(typeof e=="object"&&e!==null){var a=di.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Zl(t)},di.set(e,t),t)}return{value:e,source:t,stack:Zl(t)}}var kn=[],zn=0,Ns=null,tn=0,na=[],je=0,fa=null,La=1,g="";function i(e,t){kn[zn++]=tn,kn[zn++]=Ns,Ns=e,tn=t}function m(e,t,a){na[je++]=La,na[je++]=g,na[je++]=fa,fa=e;var n=La;e=g;var u=32-Gt(n)-1;n&=~(1<<u),a+=1;var o=32-Gt(t)+u;if(30<o){var x=u-u%5;o=(n&(1<<x)-1).toString(32),n>>=x,u-=x,La=1<<32-Gt(t)+u|a<<u|n,g=o+e}else La=1<<o|a<<u|n,g=e}function y(e){e.return!==null&&(i(e,1),m(e,1,0))}function w(e){for(;e===Ns;)Ns=kn[--zn],kn[zn]=null,tn=kn[--zn],kn[zn]=null;for(;e===fa;)fa=na[--je],na[je]=null,g=na[--je],na[je]=null,La=na[--je],na[je]=null}function A(e,t){na[je++]=La,na[je++]=g,na[je++]=fa,La=t.id,g=t.overflow,fa=e}var U=null,L=null,V=!1,fe=null,ye=!1,Ue=Error(c(519));function Ge(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw an(da(t,e)),Ue}function De(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Nt]=e,t[Ut]=n,a){case"dialog":$e("cancel",t),$e("close",t);break;case"iframe":case"object":case"embed":$e("load",t);break;case"video":case"audio":for(a=0;a<ki.length;a++)$e(ki[a],t);break;case"source":$e("error",t);break;case"img":case"image":case"link":$e("error",t),$e("load",t);break;case"details":$e("toggle",t);break;case"input":$e("invalid",t),sl(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":$e("invalid",t);break;case"textarea":$e("invalid",t),Wr(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||v0(t.textContent,a)?(n.popover!=null&&($e("beforetoggle",t),$e("toggle",t)),n.onScroll!=null&&$e("scroll",t),n.onScrollEnd!=null&&$e("scrollend",t),n.onClick!=null&&(t.onclick=Da),t=!0):t=!1,t||Ge(e,!0)}function yt(e){for(U=e.return;U;)switch(U.tag){case 5:case 31:case 13:ye=!1;return;case 27:case 3:ye=!0;return;default:U=U.return}}function Vt(e){if(e!==U)return!1;if(!V)return yt(e),V=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Wd(e.type,e.memoizedProps)),a=!a),a&&L&&Ge(e),yt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));L=M0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));L=M0(e)}else t===27?(t=L,Rl(e.type)?(e=Kd,Kd=null,L=e):L=t):L=U?Ba(e.stateNode.nextSibling):null;return!0}function Bt(){L=U=null,V=!1}function xn(){var e=fe;return e!==null&&(xa===null?xa=e:xa.push.apply(xa,e),fe=null),e}function an(e){fe===null?fe=[e]:fe.push(e)}var fr=z(null),Un=null,Ha=null;function pn(e,t,a){he(fr,t._currentValue),t._currentValue=a}function nn(e){e._currentValue=fr.current,le(fr)}function fi(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 Ln(e,t,a,n){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var o=u.dependencies;if(o!==null){var x=u.child;o=o.firstContext;e:for(;o!==null;){var E=o;o=u;for(var _=0;_<t.length;_++)if(E.context===t[_]){o.lanes|=a,E=o.alternate,E!==null&&(E.lanes|=a),fi(o.return,a,e),n||(x=null);break e}o=E.next}}else if(u.tag===18){if(x=u.return,x===null)throw Error(c(341));x.lanes|=a,o=x.alternate,o!==null&&(o.lanes|=a),fi(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 qa(e,t,a,n){e=null;for(var u=t,o=!1;u!==null;){if(!o){if((u.flags&524288)!==0)o=!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;aa(u.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(u===_e.current){if(x=u.alternate,x===null)throw Error(c(387));x.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(qi):e=[qi])}u=u.return}e!==null&&Ln(t,e,a,n),t.flags|=262144}function hr(e){for(e=e.firstContext;e!==null;){if(!aa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function js(e){Un=e,Ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function It(e){return lh(Un,e)}function Pu(e,t){return Un===null&&js(e),lh(e,t)}function lh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ha===null){if(e===null)throw Error(c(308));Ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ha=Ha.next=t;return a}var Up=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()})}},Lp=l.unstable_scheduleCallback,Hp=l.unstable_NormalPriority,Dt={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zo(){return{controller:new Up,data:new Map,refCount:0}}function hi(e){e.refCount--,e.refCount===0&&Lp(Hp,function(){e.controller.abort()})}var mi=null,Uo=0,mr=0,gr=null;function qp(e,t){if(mi===null){var a=mi=[];Uo=0,mr=qd(),gr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Uo++,t.then(sh,sh),t}function sh(){if(--Uo===0&&mi!==null){gr!==null&&(gr.status="fulfilled");var e=mi;mi=null,mr=0,gr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Vp(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 rh=B.S;B.S=function(e,t){$m=St(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&qp(e,t),rh!==null&&rh(e,t)};var ws=z(null);function Lo(){var e=ws.current;return e!==null?e:ut.pooledCache}function Gu(e,t){t===null?he(ws,ws.current):he(ws,t.pool)}function ih(){var e=Lo();return e===null?null:{parent:Dt._currentValue,pool:e}}var xr=Error(c(460)),Ho=Error(c(474)),Fu=Error(c(542)),Zu={then:function(){}};function uh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ch(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Da,Da),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,dh(e),e;default:if(typeof t.status=="string")t.then(Da,Da);else{if(e=ut,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,dh(e),e}throw Ts=t,xr}}function Es(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ts=a,xr):a}}var Ts=null;function oh(){if(Ts===null)throw Error(c(459));var e=Ts;return Ts=null,e}function dh(e){if(e===xr||e===Fu)throw Error(c(483))}var pr=null,gi=0;function Wu(e){var t=gi;return gi+=1,pr===null&&(pr=[]),ch(pr,e,t)}function xi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Qu(e,t){throw t.$$typeof===j?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function fh(e){function t(P,q){if(e){var W=P.deletions;W===null?(P.deletions=[q],P.flags|=16):W.push(q)}}function a(P,q){if(!e)return null;for(;q!==null;)t(P,q),q=q.sibling;return null}function n(P){for(var q=new Map;P!==null;)P.key!==null?q.set(P.key,P):q.set(P.index,P),P=P.sibling;return q}function u(P,q){return P=za(P,q),P.index=0,P.sibling=null,P}function o(P,q,W){return P.index=W,e?(W=P.alternate,W!==null?(W=W.index,W<q?(P.flags|=67108866,q):W):(P.flags|=67108866,q)):(P.flags|=1048576,q)}function x(P){return e&&P.alternate===null&&(P.flags|=67108866),P}function E(P,q,W,ie){return q===null||q.tag!==6?(q=oi(W,P.mode,ie),q.return=P,q):(q=u(q,W),q.return=P,q)}function _(P,q,W,ie){var Ce=W.type;return Ce===M?se(P,q,W.props.children,ie,W.key):q!==null&&(q.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===$&&Es(Ce)===q.type)?(q=u(q,W.props),xi(q,W),q.return=P,q):(q=dr(W.type,W.key,W.props,null,P.mode,ie),xi(q,W),q.return=P,q)}function Q(P,q,W,ie){return q===null||q.tag!==4||q.stateNode.containerInfo!==W.containerInfo||q.stateNode.implementation!==W.implementation?(q=pl(W,P.mode,ie),q.return=P,q):(q=u(q,W.children||[]),q.return=P,q)}function se(P,q,W,ie,Ce){return q===null||q.tag!==7?(q=Ua(W,P.mode,ie,Ce),q.return=P,q):(q=u(q,W),q.return=P,q)}function ce(P,q,W){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=oi(""+q,P.mode,W),q.return=P,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case D:return W=dr(q.type,q.key,q.props,null,P.mode,W),xi(W,q),W.return=P,W;case O:return q=pl(q,P.mode,W),q.return=P,q;case $:return q=Es(q),ce(P,q,W)}if(J(q)||F(q))return q=Ua(q,P.mode,W,null),q.return=P,q;if(typeof q.then=="function")return ce(P,Wu(q),W);if(q.$$typeof===K)return ce(P,Pu(P,q),W);Qu(P,q)}return null}function X(P,q,W,ie){var Ce=q!==null?q.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ce!==null?null:E(P,q,""+W,ie);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case D:return W.key===Ce?_(P,q,W,ie):null;case O:return W.key===Ce?Q(P,q,W,ie):null;case $:return W=Es(W),X(P,q,W,ie)}if(J(W)||F(W))return Ce!==null?null:se(P,q,W,ie,null);if(typeof W.then=="function")return X(P,q,Wu(W),ie);if(W.$$typeof===K)return X(P,q,Pu(P,W),ie);Qu(P,W)}return null}function te(P,q,W,ie,Ce){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return P=P.get(W)||null,E(q,P,""+ie,Ce);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case D:return P=P.get(ie.key===null?W:ie.key)||null,_(q,P,ie,Ce);case O:return P=P.get(ie.key===null?W:ie.key)||null,Q(q,P,ie,Ce);case $:return ie=Es(ie),te(P,q,W,ie,Ce)}if(J(ie)||F(ie))return P=P.get(W)||null,se(q,P,ie,Ce,null);if(typeof ie.then=="function")return te(P,q,W,Wu(ie),Ce);if(ie.$$typeof===K)return te(P,q,W,Pu(q,ie),Ce);Qu(q,ie)}return null}function ve(P,q,W,ie){for(var Ce=null,Qe=null,be=q,Ve=q=0,Ze=null;be!==null&&Ve<W.length;Ve++){be.index>Ve?(Ze=be,be=null):Ze=be.sibling;var Ie=X(P,be,W[Ve],ie);if(Ie===null){be===null&&(be=Ze);break}e&&be&&Ie.alternate===null&&t(P,be),q=o(Ie,q,Ve),Qe===null?Ce=Ie:Qe.sibling=Ie,Qe=Ie,be=Ze}if(Ve===W.length)return a(P,be),V&&i(P,Ve),Ce;if(be===null){for(;Ve<W.length;Ve++)be=ce(P,W[Ve],ie),be!==null&&(q=o(be,q,Ve),Qe===null?Ce=be:Qe.sibling=be,Qe=be);return V&&i(P,Ve),Ce}for(be=n(be);Ve<W.length;Ve++)Ze=te(be,P,Ve,W[Ve],ie),Ze!==null&&(e&&Ze.alternate!==null&&be.delete(Ze.key===null?Ve:Ze.key),q=o(Ze,q,Ve),Qe===null?Ce=Ze:Qe.sibling=Ze,Qe=Ze);return e&&be.forEach(function(zl){return t(P,zl)}),V&&i(P,Ve),Ce}function Ae(P,q,W,ie){if(W==null)throw Error(c(151));for(var Ce=null,Qe=null,be=q,Ve=q=0,Ze=null,Ie=W.next();be!==null&&!Ie.done;Ve++,Ie=W.next()){be.index>Ve?(Ze=be,be=null):Ze=be.sibling;var zl=X(P,be,Ie.value,ie);if(zl===null){be===null&&(be=Ze);break}e&&be&&zl.alternate===null&&t(P,be),q=o(zl,q,Ve),Qe===null?Ce=zl:Qe.sibling=zl,Qe=zl,be=Ze}if(Ie.done)return a(P,be),V&&i(P,Ve),Ce;if(be===null){for(;!Ie.done;Ve++,Ie=W.next())Ie=ce(P,Ie.value,ie),Ie!==null&&(q=o(Ie,q,Ve),Qe===null?Ce=Ie:Qe.sibling=Ie,Qe=Ie);return V&&i(P,Ve),Ce}for(be=n(be);!Ie.done;Ve++,Ie=W.next())Ie=te(be,P,Ve,Ie.value,ie),Ie!==null&&(e&&Ie.alternate!==null&&be.delete(Ie.key===null?Ve:Ie.key),q=o(Ie,q,Ve),Qe===null?Ce=Ie:Qe.sibling=Ie,Qe=Ie);return e&&be.forEach(function(Xy){return t(P,Xy)}),V&&i(P,Ve),Ce}function rt(P,q,W,ie){if(typeof W=="object"&&W!==null&&W.type===M&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case D:e:{for(var Ce=W.key;q!==null;){if(q.key===Ce){if(Ce=W.type,Ce===M){if(q.tag===7){a(P,q.sibling),ie=u(q,W.props.children),ie.return=P,P=ie;break e}}else if(q.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===$&&Es(Ce)===q.type){a(P,q.sibling),ie=u(q,W.props),xi(ie,W),ie.return=P,P=ie;break e}a(P,q);break}else t(P,q);q=q.sibling}W.type===M?(ie=Ua(W.props.children,P.mode,ie,W.key),ie.return=P,P=ie):(ie=dr(W.type,W.key,W.props,null,P.mode,ie),xi(ie,W),ie.return=P,P=ie)}return x(P);case O:e:{for(Ce=W.key;q!==null;){if(q.key===Ce)if(q.tag===4&&q.stateNode.containerInfo===W.containerInfo&&q.stateNode.implementation===W.implementation){a(P,q.sibling),ie=u(q,W.children||[]),ie.return=P,P=ie;break e}else{a(P,q);break}else t(P,q);q=q.sibling}ie=pl(W,P.mode,ie),ie.return=P,P=ie}return x(P);case $:return W=Es(W),rt(P,q,W,ie)}if(J(W))return ve(P,q,W,ie);if(F(W)){if(Ce=F(W),typeof Ce!="function")throw Error(c(150));return W=Ce.call(W),Ae(P,q,W,ie)}if(typeof W.then=="function")return rt(P,q,Wu(W),ie);if(W.$$typeof===K)return rt(P,q,Pu(P,W),ie);Qu(P,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,q!==null&&q.tag===6?(a(P,q.sibling),ie=u(q,W),ie.return=P,P=ie):(a(P,q),ie=oi(W,P.mode,ie),ie.return=P,P=ie),x(P)):a(P,q)}return function(P,q,W,ie){try{gi=0;var Ce=rt(P,q,W,ie);return pr=null,Ce}catch(be){if(be===xr||be===Fu)throw be;var Qe=Qt(29,be,null,P.mode);return Qe.lanes=ie,Qe.return=P,Qe}finally{}}}var Cs=fh(!0),hh=fh(!1),yl=!1;function qo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vo(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 vl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bl(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Je&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=Ss(e),bs(e,null,a),t}return _a(e,n,t,a),Ss(e)}function pi(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,ia(e,a)}}function Bo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?u=o=x:o=o.next=x,a=a.next}while(a!==null);o===null?u=o=t:o=o.next=t}else u=o=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:o,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Yo=!1;function yi(){if(Yo){var e=gr;if(e!==null)throw e}}function vi(e,t,a,n){Yo=!1;var u=e.updateQueue;yl=!1;var o=u.firstBaseUpdate,x=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var _=E,Q=_.next;_.next=null,x===null?o=Q:x.next=Q,x=_;var se=e.alternate;se!==null&&(se=se.updateQueue,E=se.lastBaseUpdate,E!==x&&(E===null?se.firstBaseUpdate=Q:E.next=Q,se.lastBaseUpdate=_))}if(o!==null){var ce=u.baseState;x=0,se=Q=_=null,E=o;do{var X=E.lane&-536870913,te=X!==E.lane;if(te?(Fe&X)===X:(n&X)===X){X!==0&&X===mr&&(Yo=!0),se!==null&&(se=se.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ve=e,Ae=E;X=t;var rt=a;switch(Ae.tag){case 1:if(ve=Ae.payload,typeof ve=="function"){ce=ve.call(rt,ce,X);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ae.payload,X=typeof ve=="function"?ve.call(rt,ce,X):ve,X==null)break e;ce=C({},ce,X);break e;case 2:yl=!0}}X=E.callback,X!==null&&(e.flags|=64,te&&(e.flags|=8192),te=u.callbacks,te===null?u.callbacks=[X]:te.push(X))}else te={lane:X,tag:E.tag,payload:E.payload,callback:E.callback,next:null},se===null?(Q=se=te,_=ce):se=se.next=te,x|=X;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);se===null&&(_=ce),u.baseState=_,u.firstBaseUpdate=Q,u.lastBaseUpdate=se,o===null&&(u.shared.lanes=0),El|=x,e.lanes=x,e.memoizedState=ce}}function mh(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function gh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)mh(a[e],t)}var yr=z(null),Iu=z(0);function xh(e,t){e=Fn,he(Iu,e),he(yr,t),Fn=e|t.baseLanes}function $o(){he(Iu,Fn),he(yr,yr.current)}function Po(){Fn=Iu.current,le(yr),le(Iu)}var ja=z(null),Va=null;function Sl(e){var t=e.alternate;he(Et,Et.current&1),he(ja,e),Va===null&&(t===null||yr.current!==null||t.memoizedState!==null)&&(Va=e)}function Go(e){he(Et,Et.current),he(ja,e),Va===null&&(Va=e)}function ph(e){e.tag===22?(he(Et,Et.current),he(ja,e),Va===null&&(Va=e)):Nl()}function Nl(){he(Et,Et.current),he(ja,ja.current)}function wa(e){le(ja),Va===e&&(Va=null),le(Et)}var Et=z(0);function Xu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Xd(a)||Jd(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hn=0,qe=null,lt=null,At=null,Ju=!1,vr=!1,Ms=!1,Ku=0,bi=0,br=null,Bp=0;function vt(){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(!aa(e[a],t[a]))return!1;return!0}function Zo(e,t,a,n,u,o){return Hn=o,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?em:ud,Ms=!1,o=a(n,u),Ms=!1,vr&&(o=vh(t,a,n,u)),yh(e),o}function yh(e){B.H=ji;var t=lt!==null&&lt.next!==null;if(Hn=0,At=lt=qe=null,Ju=!1,bi=0,br=null,t)throw Error(c(300));e===null||_t||(e=e.dependencies,e!==null&&hr(e)&&(_t=!0))}function vh(e,t,a,n){qe=e;var u=0;do{if(vr&&(br=null),bi=0,vr=!1,25<=u)throw Error(c(301));if(u+=1,At=lt=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}B.H=tm,o=t(a,n)}while(vr);return o}function Yp(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?Si(t):t,e=e.useState()[0],(lt!==null?lt.memoizedState:null)!==e&&(qe.flags|=1024),t}function Wo(){var e=Ku!==0;return Ku=0,e}function Qo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Io(e){if(Ju){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ju=!1}Hn=0,At=lt=qe=null,vr=!1,bi=Ku=0,br=null}function ra(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?qe.memoizedState=At=e:At=At.next=e,At}function Tt(){if(lt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=At===null?qe.memoizedState:At.next;if(t!==null)At=t,lt=e;else{if(e===null)throw qe.alternate===null?Error(c(467)):Error(c(310));lt=e,e={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},At===null?qe.memoizedState=At=e:At=At.next=e}return At}function ec(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Si(e){var t=bi;return bi+=1,br===null&&(br=[]),e=ch(br,e,t),t=qe,(At===null?t.memoizedState:At.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?em:ud),e}function tc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Si(e);if(e.$$typeof===K)return It(e)}throw Error(c(438,String(e)))}function Xo(e){var t=null,a=qe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=qe.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=ec(),qe.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 qn(e,t){return typeof t=="function"?t(e):t}function ac(e){var t=Tt();return Jo(t,lt,e)}function Jo(e,t,a){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=a;var u=e.baseQueue,o=n.pending;if(o!==null){if(u!==null){var x=u.next;u.next=o.next,o.next=x}t.baseQueue=u=o,n.pending=null}if(o=e.baseState,u===null)e.memoizedState=o;else{t=u.next;var E=x=null,_=null,Q=t,se=!1;do{var ce=Q.lane&-536870913;if(ce!==Q.lane?(Fe&ce)===ce:(Hn&ce)===ce){var X=Q.revertLane;if(X===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ce===mr&&(se=!0);else if((Hn&X)===X){Q=Q.next,X===mr&&(se=!0);continue}else ce={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},_===null?(E=_=ce,x=o):_=_.next=ce,qe.lanes|=X,El|=X;ce=Q.action,Ms&&a(o,ce),o=Q.hasEagerState?Q.eagerState:a(o,ce)}else X={lane:ce,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},_===null?(E=_=X,x=o):_=_.next=X,qe.lanes|=ce,El|=ce;Q=Q.next}while(Q!==null&&Q!==t);if(_===null?x=o:_.next=E,!aa(o,e.memoizedState)&&(_t=!0,se&&(a=gr,a!==null)))throw a;e.memoizedState=o,e.baseState=x,e.baseQueue=_,n.lastRenderedState=o}return u===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Ko(e){var t=Tt(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var n=a.dispatch,u=a.pending,o=t.memoizedState;if(u!==null){a.pending=null;var x=u=u.next;do o=e(o,x.action),x=x.next;while(x!==u);aa(o,t.memoizedState)||(_t=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,n]}function bh(e,t,a){var n=qe,u=Tt(),o=V;if(o){if(a===void 0)throw Error(c(407));a=a()}else a=t();var x=!aa((lt||u).memoizedState,a);if(x&&(u.memoizedState=a,_t=!0),u=u.queue,ad(jh.bind(null,n,u,e),[e]),u.getSnapshot!==t||x||At!==null&&At.memoizedState.tag&1){if(n.flags|=2048,Sr(9,{destroy:void 0},Nh.bind(null,n,u,a,t),null),ut===null)throw Error(c(349));o||(Hn&127)!==0||Sh(n,t,a)}return a}function Sh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=qe.updateQueue,t===null?(t=ec(),qe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Nh(e,t,a,n){t.value=a,t.getSnapshot=n,wh(t)&&Eh(e)}function jh(e,t,a){return a(function(){wh(t)&&Eh(e)})}function wh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!aa(e,a)}catch{return!0}}function Eh(e){var t=ka(e,2);t!==null&&pa(t,e,2)}function ed(e){var t=ra();if(typeof e=="function"){var a=e;if(e=a(),Ms){Pt(!0);try{a()}finally{Pt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:e},t}function Th(e,t,a,n){return e.baseState=a,Jo(e,lt,typeof n=="function"?n:qn)}function $p(e,t,a,n,u){if(sc(e))throw Error(c(485));if(e=t.action,e!==null){var o={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){o.listeners.push(x)}};B.T!==null?a(!0):o.isTransition=!1,n(o),a=t.pending,a===null?(o.next=t.pending=o,Ch(t,o)):(o.next=a.next,t.pending=a.next=o)}}function Ch(e,t){var a=t.action,n=t.payload,u=e.state;if(t.isTransition){var o=B.T,x={};B.T=x;try{var E=a(u,n),_=B.S;_!==null&&_(x,E),Mh(e,t,E)}catch(Q){td(e,t,Q)}finally{o!==null&&x.types!==null&&(o.types=x.types),B.T=o}}else try{o=a(u,n),Mh(e,t,o)}catch(Q){td(e,t,Q)}}function Mh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Oh(e,t,n)},function(n){return td(e,t,n)}):Oh(e,t,a)}function Oh(e,t,a){t.status="fulfilled",t.value=a,Rh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ch(e,a)))}function td(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Rh(t),t=t.next;while(t!==n)}e.action=null}function Rh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dh(e,t){return t}function Ah(e,t){if(V){var a=ut.formState;if(a!==null){e:{var n=qe;if(V){if(L){t:{for(var u=L,o=ye;u.nodeType!==8;){if(!o){u=null;break t}if(u=Ba(u.nextSibling),u===null){u=null;break t}}o=u.data,u=o==="F!"||o==="F"?u:null}if(u){L=Ba(u.nextSibling),n=u.data==="F!";break e}}Ge(n)}n=!1}n&&(t=a[0])}}return a=ra(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dh,lastRenderedState:t},a.queue=n,a=Xh.bind(null,qe,n),n.dispatch=a,n=ed(!1),o=id.bind(null,qe,!1,n.queue),n=ra(),u={state:t,dispatch:null,action:e,pending:null},n.queue=u,a=$p.bind(null,qe,u,o,a),u.dispatch=a,n.memoizedState=e,[t,a,!1]}function _h(e){var t=Tt();return kh(t,lt,e)}function kh(e,t,a){if(t=Jo(e,t,Dh)[0],e=ac(qn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Si(t)}catch(x){throw x===xr?Fu:x}else n=t;t=Tt();var u=t.queue,o=u.dispatch;return a!==t.memoizedState&&(qe.flags|=2048,Sr(9,{destroy:void 0},Pp.bind(null,u,a),null)),[n,o,e]}function Pp(e,t){e.action=t}function zh(e){var t=Tt(),a=lt;if(a!==null)return kh(t,a,e);Tt(),t=t.memoizedState,a=Tt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Sr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=qe.updateQueue,t===null&&(t=ec(),qe.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 Uh(){return Tt().memoizedState}function nc(e,t,a,n){var u=ra();qe.flags|=e,u.memoizedState=Sr(1|t,{destroy:void 0},a,n===void 0?null:n)}function lc(e,t,a,n){var u=Tt();n=n===void 0?null:n;var o=u.memoizedState.inst;lt!==null&&n!==null&&Fo(n,lt.memoizedState.deps)?u.memoizedState=Sr(t,o,a,n):(qe.flags|=e,u.memoizedState=Sr(1|t,o,a,n))}function Lh(e,t){nc(8390656,8,e,t)}function ad(e,t){lc(2048,8,e,t)}function Gp(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=ec(),qe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Hh(e){var t=Tt().memoizedState;return Gp({ref:t,nextImpl:e}),function(){if((Je&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function qh(e,t){return lc(4,2,e,t)}function Vh(e,t){return lc(4,4,e,t)}function Bh(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 Yh(e,t,a){a=a!=null?a.concat([e]):null,lc(4,4,Bh.bind(null,t,e),a)}function nd(){}function $h(e,t){var a=Tt();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 Ph(e,t){var a=Tt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Fo(t,n[1]))return n[0];if(n=e(),Ms){Pt(!0);try{e()}finally{Pt(!1)}}return a.memoizedState=[n,t],n}function ld(e,t,a){return a===void 0||(Hn&1073741824)!==0&&(Fe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Gm(),qe.lanes|=e,El|=e,a)}function Gh(e,t,a,n){return aa(a,t)?a:yr.current!==null?(e=ld(e,a,n),aa(e,t)||(_t=!0),e):(Hn&42)===0||(Hn&1073741824)!==0&&(Fe&261930)===0?(_t=!0,e.memoizedState=a):(e=Gm(),qe.lanes|=e,El|=e,t)}function Fh(e,t,a,n,u){var o=re.p;re.p=o!==0&&8>o?o:8;var x=B.T,E={};B.T=E,id(e,!1,t,a);try{var _=u(),Q=B.S;if(Q!==null&&Q(E,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var se=Vp(_,n);Ni(e,t,se,Ca(e))}else Ni(e,t,n,Ca(e))}catch(ce){Ni(e,t,{then:function(){},status:"rejected",reason:ce},Ca())}finally{re.p=o,x!==null&&E.types!==null&&(x.types=E.types),B.T=x}}function Fp(){}function sd(e,t,a,n){if(e.tag!==5)throw Error(c(476));var u=Zh(e).queue;Fh(e,u,t,ge,a===null?Fp:function(){return Wh(e),a(n)})}function Zh(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:qn,lastRenderedState:ge},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Wh(e){var t=Zh(e);t.next===null&&(t=e.alternate.memoizedState),Ni(e,t.next.queue,{},Ca())}function rd(){return It(qi)}function Qh(){return Tt().memoizedState}function Ih(){return Tt().memoizedState}function Zp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ca();e=vl(a);var n=bl(t,e,a);n!==null&&(pa(n,t,a),pi(n,t,a)),t={cache:zo()},e.payload=t;return}t=t.return}}function Wp(e,t,a){var n=Ca();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},sc(e)?Jh(t,a):(a=ur(e,t,a,n),a!==null&&(pa(a,e,n),Kh(a,t,n)))}function Xh(e,t,a){var n=Ca();Ni(e,t,a,n)}function Ni(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(sc(e))Jh(t,u);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var x=t.lastRenderedState,E=o(x,a);if(u.hasEagerState=!0,u.eagerState=E,aa(E,x))return _a(e,t,u,0),ut===null&&xl(),!1}catch{}finally{}if(a=ur(e,t,u,n),a!==null)return pa(a,e,n),Kh(a,t,n),!0}return!1}function id(e,t,a,n){if(n={lane:2,revertLane:qd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},sc(e)){if(t)throw Error(c(479))}else t=ur(e,a,n,2),t!==null&&pa(t,e,2)}function sc(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function Jh(e,t){vr=Ju=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Kh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,ia(e,a)}}var ji={readContext:It,use:tc,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useLayoutEffect:vt,useInsertionEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useSyncExternalStore:vt,useId:vt,useHostTransitionStatus:vt,useFormState:vt,useActionState:vt,useOptimistic:vt,useMemoCache:vt,useCacheRefresh:vt};ji.useEffectEvent=vt;var em={readContext:It,use:tc,useCallback:function(e,t){return ra().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:Lh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,nc(4194308,4,Bh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return nc(4194308,4,e,t)},useInsertionEffect:function(e,t){nc(4,2,e,t)},useMemo:function(e,t){var a=ra();t=t===void 0?null:t;var n=e();if(Ms){Pt(!0);try{e()}finally{Pt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ra();if(a!==void 0){var u=a(t);if(Ms){Pt(!0);try{a(t)}finally{Pt(!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=Wp.bind(null,qe,e),[n.memoizedState,e]},useRef:function(e){var t=ra();return e={current:e},t.memoizedState=e},useState:function(e){e=ed(e);var t=e.queue,a=Xh.bind(null,qe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:nd,useDeferredValue:function(e,t){var a=ra();return ld(a,e,t)},useTransition:function(){var e=ed(!1);return e=Fh.bind(null,qe,e.queue,!0,!1),ra().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=qe,u=ra();if(V){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),ut===null)throw Error(c(349));(Fe&127)!==0||Sh(n,t,a)}u.memoizedState=a;var o={value:a,getSnapshot:t};return u.queue=o,Lh(jh.bind(null,n,o,e),[e]),n.flags|=2048,Sr(9,{destroy:void 0},Nh.bind(null,n,o,a,t),null),a},useId:function(){var e=ra(),t=ut.identifierPrefix;if(V){var a=g,n=La;a=(n&~(1<<32-Gt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ku++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Bp++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:rd,useFormState:Ah,useActionState:Ah,useOptimistic:function(e){var t=ra();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=id.bind(null,qe,!0,a),a.dispatch=t,[e,t]},useMemoCache:Xo,useCacheRefresh:function(){return ra().memoizedState=Zp.bind(null,qe)},useEffectEvent:function(e){var t=ra(),a={impl:e};return t.memoizedState=a,function(){if((Je&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},ud={readContext:It,use:tc,useCallback:$h,useContext:It,useEffect:ad,useImperativeHandle:Yh,useInsertionEffect:qh,useLayoutEffect:Vh,useMemo:Ph,useReducer:ac,useRef:Uh,useState:function(){return ac(qn)},useDebugValue:nd,useDeferredValue:function(e,t){var a=Tt();return Gh(a,lt.memoizedState,e,t)},useTransition:function(){var e=ac(qn)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:bh,useId:Qh,useHostTransitionStatus:rd,useFormState:_h,useActionState:_h,useOptimistic:function(e,t){var a=Tt();return Th(a,lt,e,t)},useMemoCache:Xo,useCacheRefresh:Ih};ud.useEffectEvent=Hh;var tm={readContext:It,use:tc,useCallback:$h,useContext:It,useEffect:ad,useImperativeHandle:Yh,useInsertionEffect:qh,useLayoutEffect:Vh,useMemo:Ph,useReducer:Ko,useRef:Uh,useState:function(){return Ko(qn)},useDebugValue:nd,useDeferredValue:function(e,t){var a=Tt();return lt===null?ld(a,e,t):Gh(a,lt.memoizedState,e,t)},useTransition:function(){var e=Ko(qn)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:bh,useId:Qh,useHostTransitionStatus:rd,useFormState:zh,useActionState:zh,useOptimistic:function(e,t){var a=Tt();return lt!==null?Th(a,lt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Xo,useCacheRefresh:Ih};tm.useEffectEvent=Hh;function cd(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:C({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var od={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ca(),u=vl(n);u.payload=t,a!=null&&(u.callback=a),t=bl(e,u,n),t!==null&&(pa(t,e,n),pi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ca(),u=vl(n);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=bl(e,u,n),t!==null&&(pa(t,e,n),pi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ca(),n=vl(a);n.tag=2,t!=null&&(n.callback=t),t=bl(e,n,a),t!==null&&(pa(t,e,a),pi(t,e,a))}};function am(e,t,a,n,u,o,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,x):t.prototype&&t.prototype.isPureReactComponent?!ps(a,n)||!ps(u,o):!0}function nm(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&od.enqueueReplaceState(t,t.state,null)}function Os(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=C({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function lm(e){gl(e)}function sm(e){console.error(e)}function rm(e){gl(e)}function rc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function im(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function dd(e,t,a){return a=vl(a),a.tag=3,a.payload={element:null},a.callback=function(){rc(e,t)},a}function um(e){return e=vl(e),e.tag=3,e}function cm(e,t,a,n){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var o=n.value;e.payload=function(){return u(o)},e.callback=function(){im(t,a,n)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){im(t,a,n),typeof u!="function"&&(Tl===null?Tl=new Set([this]):Tl.add(this));var E=n.stack;this.componentDidCatch(n.value,{componentStack:E!==null?E:""})})}function Qp(e,t,a,n,u){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&qa(t,a,u,!0),a=ja.current,a!==null){switch(a.tag){case 31:case 13:return Va===null?yc():a.alternate===null&&bt===0&&(bt=3),a.flags&=-257,a.flags|=65536,a.lanes=u,n===Zu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Ud(e,n,u)),!1;case 22:return a.flags|=65536,n===Zu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Ud(e,n,u)),!1}throw Error(c(435,a.tag))}return Ud(e,n,u),yc(),!1}if(V)return t=ja.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,n!==Ue&&(e=Error(c(422),{cause:n}),an(da(e,a)))):(n!==Ue&&(t=Error(c(423),{cause:n}),an(da(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,n=da(n,a),u=dd(e.stateNode,n,u),Bo(e,u),bt!==4&&(bt=2)),!1;var o=Error(c(520),{cause:n});if(o=da(o,a),Di===null?Di=[o]:Di.push(o),bt!==4&&(bt=2),t===null)return!0;n=da(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=dd(a.stateNode,n,e),Bo(a,e),!1;case 1:if(t=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Tl===null||!Tl.has(o))))return a.flags|=65536,u&=-u,a.lanes|=u,u=um(u),cm(u,e,a,n),Bo(a,u),!1}a=a.return}while(a!==null);return!1}var fd=Error(c(461)),_t=!1;function Xt(e,t,a,n){t.child=e===null?hh(t,null,a,n):Cs(t,e.child,a,n)}function om(e,t,a,n,u){a=a.render;var o=t.ref;if("ref"in n){var x={};for(var E in n)E!=="ref"&&(x[E]=n[E])}else x=n;return js(t),n=Zo(e,t,a,x,o,u),E=Wo(),e!==null&&!_t?(Qo(e,t,u),Vn(e,t,u)):(V&&E&&y(t),t.flags|=1,Xt(e,t,n,u),t.child)}function dm(e,t,a,n,u){if(e===null){var o=a.type;return typeof o=="function"&&!or(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,fm(e,t,o,n,u)):(e=dr(a.type,null,n,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!bd(e,u)){var x=o.memoizedProps;if(a=a.compare,a=a!==null?a:ps,a(x,n)&&e.ref===t.ref)return Vn(e,t,u)}return t.flags|=1,e=za(o,n),e.ref=t.ref,e.return=t,t.child=e}function fm(e,t,a,n,u){if(e!==null){var o=e.memoizedProps;if(ps(o,n)&&e.ref===t.ref)if(_t=!1,t.pendingProps=n=o,bd(e,u))(e.flags&131072)!==0&&(_t=!0);else return t.lanes=e.lanes,Vn(e,t,u)}return hd(e,t,a,n,u)}function hm(e,t,a,n){var u=n.children,o=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(o=o!==null?o.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&~o}else n=0,t.child=null;return mm(e,t,o,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gu(t,o!==null?o.cachePool:null),o!==null?xh(t,o):$o(),ph(t);else return n=t.lanes=536870912,mm(e,t,o!==null?o.baseLanes|a:a,a,n)}else o!==null?(Gu(t,o.cachePool),xh(t,o),Nl(),t.memoizedState=null):(e!==null&&Gu(t,null),$o(),Nl());return Xt(e,t,u,a),t.child}function wi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mm(e,t,a,n,u){var o=Lo();return o=o===null?null:{parent:Dt._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&Gu(t,null),$o(),ph(t),e!==null&&qa(e,t,n,!0),t.childLanes=u,null}function ic(e,t){return t=cc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gm(e,t,a){return Cs(t,e.child,null,a),e=ic(t,t.pendingProps),e.flags|=2,wa(t),t.memoizedState=null,e}function Ip(e,t,a){var n=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(V){if(n.mode==="hidden")return e=ic(t,n),t.lanes=536870912,wi(null,e);if(Go(t),(e=L)?(e=C0(e,ye),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fa!==null?{id:La,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=$u(e),a.return=t,t.child=a,U=t,L=null)):e=null,e===null)throw Ge(t);return t.lanes=536870912,null}return ic(t,n)}var o=e.memoizedState;if(o!==null){var x=o.dehydrated;if(Go(t),u)if(t.flags&256)t.flags&=-257,t=gm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(_t||qa(e,t,a,!1),u=(a&e.childLanes)!==0,_t||u){if(n=ut,n!==null&&(x=$r(n,a),x!==0&&x!==o.retryLane))throw o.retryLane=x,ka(e,x),pa(n,e,x),fd;yc(),t=gm(e,t,a)}else e=o.treeContext,L=Ba(x.nextSibling),U=t,V=!0,fe=null,ye=!1,e!==null&&A(t,e),t=ic(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 uc(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 hd(e,t,a,n,u){return js(t),a=Zo(e,t,a,n,void 0,u),n=Wo(),e!==null&&!_t?(Qo(e,t,u),Vn(e,t,u)):(V&&n&&y(t),t.flags|=1,Xt(e,t,a,u),t.child)}function xm(e,t,a,n,u,o){return js(t),t.updateQueue=null,a=vh(t,n,a,u),yh(e),n=Wo(),e!==null&&!_t?(Qo(e,t,o),Vn(e,t,o)):(V&&n&&y(t),t.flags|=1,Xt(e,t,a,o),t.child)}function pm(e,t,a,n,u){if(js(t),t.stateNode===null){var o=Na,x=a.contextType;typeof x=="object"&&x!==null&&(o=It(x)),o=new a(n,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=od,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=n,o.state=t.memoizedState,o.refs={},qo(t),x=a.contextType,o.context=typeof x=="object"&&x!==null?It(x):Na,o.state=t.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(cd(t,a,x,n),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(x=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),x!==o.state&&od.enqueueReplaceState(o,o.state,null),vi(t,n,o,u),yi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){o=t.stateNode;var E=t.memoizedProps,_=Os(a,E);o.props=_;var Q=o.context,se=a.contextType;x=Na,typeof se=="object"&&se!==null&&(x=It(se));var ce=a.getDerivedStateFromProps;se=typeof ce=="function"||typeof o.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,se||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(E||Q!==x)&&nm(t,o,n,x),yl=!1;var X=t.memoizedState;o.state=X,vi(t,n,o,u),yi(),Q=t.memoizedState,E||X!==Q||yl?(typeof ce=="function"&&(cd(t,a,ce,n),Q=t.memoizedState),(_=yl||am(t,a,_,n,X,Q,x))?(se||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=Q),o.props=n,o.state=Q,o.context=x,n=_):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Vo(e,t),x=t.memoizedProps,se=Os(a,x),o.props=se,ce=t.pendingProps,X=o.context,Q=a.contextType,_=Na,typeof Q=="object"&&Q!==null&&(_=It(Q)),E=a.getDerivedStateFromProps,(Q=typeof E=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(x!==ce||X!==_)&&nm(t,o,n,_),yl=!1,X=t.memoizedState,o.state=X,vi(t,n,o,u),yi();var te=t.memoizedState;x!==ce||X!==te||yl||e!==null&&e.dependencies!==null&&hr(e.dependencies)?(typeof E=="function"&&(cd(t,a,E,n),te=t.memoizedState),(se=yl||am(t,a,se,n,X,te,_)||e!==null&&e.dependencies!==null&&hr(e.dependencies))?(Q||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,te,_),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,te,_)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=te),o.props=n,o.state=te,o.context=_,n=se):(typeof o.componentDidUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),n=!1)}return o=n,uc(e,t),n=(t.flags&128)!==0,o||n?(o=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&n?(t.child=Cs(t,e.child,null,u),t.child=Cs(t,null,a,u)):Xt(e,t,a,u),t.memoizedState=o.state,e=t.child):e=Vn(e,t,u),e}function ym(e,t,a,n){return Bt(),t.flags|=256,Xt(e,t,a,n),t.child}var md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gd(e){return{baseLanes:e,cachePool:ih()}}function xd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ta),e}function vm(e,t,a){var n=t.pendingProps,u=!1,o=(t.flags&128)!==0,x;if((x=o)||(x=e!==null&&e.memoizedState===null?!1:(Et.current&2)!==0),x&&(u=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(V){if(u?Sl(t):Nl(),(e=L)?(e=C0(e,ye),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fa!==null?{id:La,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=$u(e),a.return=t,t.child=a,U=t,L=null)):e=null,e===null)throw Ge(t);return Jd(e)?t.lanes=32:t.lanes=536870912,null}var E=n.children;return n=n.fallback,u?(Nl(),u=t.mode,E=cc({mode:"hidden",children:E},u),n=Ua(n,u,a,null),E.return=t,n.return=t,E.sibling=n,t.child=E,n=t.child,n.memoizedState=gd(a),n.childLanes=xd(e,x,a),t.memoizedState=md,wi(null,n)):(Sl(t),pd(t,E))}var _=e.memoizedState;if(_!==null&&(E=_.dehydrated,E!==null)){if(o)t.flags&256?(Sl(t),t.flags&=-257,t=yd(e,t,a)):t.memoizedState!==null?(Nl(),t.child=e.child,t.flags|=128,t=null):(Nl(),E=n.fallback,u=t.mode,n=cc({mode:"visible",children:n.children},u),E=Ua(E,u,a,null),E.flags|=2,n.return=t,E.return=t,n.sibling=E,t.child=n,Cs(t,e.child,null,a),n=t.child,n.memoizedState=gd(a),n.childLanes=xd(e,x,a),t.memoizedState=md,t=wi(null,n));else if(Sl(t),Jd(E)){if(x=E.nextSibling&&E.nextSibling.dataset,x)var Q=x.dgst;x=Q,n=Error(c(419)),n.stack="",n.digest=x,an({value:n,source:null,stack:null}),t=yd(e,t,a)}else if(_t||qa(e,t,a,!1),x=(a&e.childLanes)!==0,_t||x){if(x=ut,x!==null&&(n=$r(x,a),n!==0&&n!==_.retryLane))throw _.retryLane=n,ka(e,n),pa(x,e,n),fd;Xd(E)||yc(),t=yd(e,t,a)}else Xd(E)?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,L=Ba(E.nextSibling),U=t,V=!0,fe=null,ye=!1,e!==null&&A(t,e),t=pd(t,n.children),t.flags|=4096);return t}return u?(Nl(),E=n.fallback,u=t.mode,_=e.child,Q=_.sibling,n=za(_,{mode:"hidden",children:n.children}),n.subtreeFlags=_.subtreeFlags&65011712,Q!==null?E=za(Q,E):(E=Ua(E,u,a,null),E.flags|=2),E.return=t,n.return=t,n.sibling=E,t.child=n,wi(null,n),n=t.child,E=e.child.memoizedState,E===null?E=gd(a):(u=E.cachePool,u!==null?(_=Dt._currentValue,u=u.parent!==_?{parent:_,pool:_}:u):u=ih(),E={baseLanes:E.baseLanes|a,cachePool:u}),n.memoizedState=E,n.childLanes=xd(e,x,a),t.memoizedState=md,wi(e.child,n)):(Sl(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 pd(e,t){return t=cc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function cc(e,t){return e=Qt(22,e,null,t),e.lanes=0,e}function yd(e,t,a){return Cs(t,e.child,null,a),e=pd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),fi(e.return,t,a)}function vd(e,t,a,n,u,o){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:u,treeForkCount:o}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=n,x.tail=a,x.tailMode=u,x.treeForkCount=o)}function Sm(e,t,a){var n=t.pendingProps,u=n.revealOrder,o=n.tail;n=n.children;var x=Et.current,E=(x&2)!==0;if(E?(x=x&1|2,t.flags|=128):x&=1,he(Et,x),Xt(e,t,n,a),n=V?tn:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bm(e,a,t);else if(e.tag===19)bm(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&&Xu(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),vd(t,!1,u,a,o,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&&Xu(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}vd(t,!0,a,null,o,n);break;case"together":vd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Vn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),El|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(qa(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 bd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&hr(e)))}function Xp(e,t,a){switch(t.tag){case 3:ct(t,t.stateNode.containerInfo),pn(t,Dt,e.memoizedState.cache),Bt();break;case 27:case 5:Kt(t);break;case 4:ct(t,t.stateNode.containerInfo);break;case 10:pn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Go(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Sl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?vm(e,t,a):(Sl(t),e=Vn(e,t,a),e!==null?e.sibling:null);Sl(t);break;case 19:var u=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(qa(e,t,a,!1),n=(a&t.childLanes)!==0),u){if(n)return Sm(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),he(Et,Et.current),n)break;return null;case 22:return t.lanes=0,hm(e,t,a,t.pendingProps);case 24:pn(t,Dt,e.memoizedState.cache)}return Vn(e,t,a)}function Nm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)_t=!0;else{if(!bd(e,a)&&(t.flags&128)===0)return _t=!1,Xp(e,t,a);_t=(e.flags&131072)!==0}else _t=!1,V&&(t.flags&1048576)!==0&&m(t,tn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Es(t.elementType),t.type=e,typeof e=="function")or(e)?(n=Os(e,n),t.tag=1,t=pm(null,t,e,n,a)):(t.tag=0,t=hd(null,t,e,n,a));else{if(e!=null){var u=e.$$typeof;if(u===I){t.tag=11,t=om(null,t,e,n,a);break e}else if(u===G){t.tag=14,t=dm(null,t,e,n,a);break e}}throw t=xe(e)||e,Error(c(306,t,""))}}return t;case 0:return hd(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,u=Os(n,t.pendingProps),pm(e,t,n,u,a);case 3:e:{if(ct(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var o=t.memoizedState;u=o.element,Vo(e,t),vi(t,n,null,a);var x=t.memoizedState;if(n=x.cache,pn(t,Dt,n),n!==o.cache&&Ln(t,[Dt],a,!0),yi(),n=x.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=ym(e,t,n,a);break e}else if(n!==u){u=da(Error(c(424)),t),an(u),t=ym(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(L=Ba(e.firstChild),U=t,V=!0,fe=null,ye=!0,a=hh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Bt(),n===u){t=Vn(e,t,a);break e}Xt(e,t,n,a)}t=t.child}return t;case 26:return uc(e,t),e===null?(a=_0(t.type,null,t.pendingProps,null))?t.memoizedState=a:V||(a=t.type,e=t.pendingProps,n=Ec(de.current).createElement(a),n[Nt]=t,n[Ut]=e,Jt(n,a,e),Rt(n),t.stateNode=n):t.memoizedState=_0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kt(t),e===null&&V&&(n=t.stateNode=R0(t.type,t.pendingProps,de.current),U=t,ye=!0,u=L,Rl(t.type)?(Kd=u,L=Ba(n.firstChild)):L=u),Xt(e,t,t.pendingProps.children,a),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((u=n=L)&&(n=Cy(n,t.type,t.pendingProps,ye),n!==null?(t.stateNode=n,U=t,L=Ba(n.firstChild),ye=!1,u=!0):u=!1),u||Ge(t)),Kt(t),u=t.type,o=t.pendingProps,x=e!==null?e.memoizedProps:null,n=o.children,Wd(u,o)?n=null:x!==null&&Wd(u,x)&&(t.flags|=32),t.memoizedState!==null&&(u=Zo(e,t,Yp,null,null,a),qi._currentValue=u),uc(e,t),Xt(e,t,n,a),t.child;case 6:return e===null&&V&&((e=a=L)&&(a=My(a,t.pendingProps,ye),a!==null?(t.stateNode=a,U=t,L=null,e=!0):e=!1),e||Ge(t)),null;case 13:return vm(e,t,a);case 4:return ct(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Cs(t,null,n,a):Xt(e,t,n,a),t.child;case 11:return om(e,t,t.type,t.pendingProps,a);case 7:return Xt(e,t,t.pendingProps,a),t.child;case 8:return Xt(e,t,t.pendingProps.children,a),t.child;case 12:return Xt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,pn(t,t.type,n.value),Xt(e,t,n.children,a),t.child;case 9:return u=t.type._context,n=t.pendingProps.children,js(t),u=It(u),n=n(u),t.flags|=1,Xt(e,t,n,a),t.child;case 14:return dm(e,t,t.type,t.pendingProps,a);case 15:return fm(e,t,t.type,t.pendingProps,a);case 19:return Sm(e,t,a);case 31:return Ip(e,t,a);case 22:return hm(e,t,a,t.pendingProps);case 24:return js(t),n=It(Dt),e===null?(u=Lo(),u===null&&(u=ut,o=zo(),u.pooledCache=o,o.refCount++,o!==null&&(u.pooledCacheLanes|=a),u=o),t.memoizedState={parent:n,cache:u},qo(t),pn(t,Dt,u)):((e.lanes&a)!==0&&(Vo(e,t),vi(t,null,null,a),yi()),u=e.memoizedState,o=t.memoizedState,u.parent!==n?(u={parent:n,cache:n},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),pn(t,Dt,n)):(n=o.cache,pn(t,Dt,n),n!==u.cache&&Ln(t,[Dt],a,!0))),Xt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Bn(e){e.flags|=4}function Sd(e,t,a,n,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Qm())e.flags|=8192;else throw Ts=Zu,Ho}else e.flags&=-16777217}function jm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!H0(t))if(Qm())e.flags|=8192;else throw Ts=Zu,Ho}function oc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Yr():536870912,e.lanes|=t,Er|=t)}function Ei(e,t){if(!V)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function mt(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 Jp(e,t,a){var n=t.pendingProps;switch(w(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return mt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),nn(Dt),Xe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Vt(t)?Bn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xn())),mt(t),null;case 26:var u=t.type,o=t.memoizedState;return e===null?(Bn(t),o!==null?(mt(t),jm(t,o)):(mt(t),Sd(t,u,null,n,a))):o?o!==e.memoizedState?(Bn(t),mt(t),jm(t,o)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Bn(t),mt(t),Sd(t,u,e,n,a)),null;case 27:if(cn(t),a=de.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Bn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return mt(t),null}e=me.current,Vt(t)?De(t):(e=R0(u,n,a),t.stateNode=e,Bn(t))}return mt(t),null;case 5:if(cn(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Bn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return mt(t),null}if(o=me.current,Vt(t))De(t);else{var x=Ec(de.current);switch(o){case 1:o=x.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:o=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":o=x.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":o=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":o=x.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof n.is=="string"?x.createElement("select",{is:n.is}):x.createElement("select"),n.multiple?o.multiple=!0:n.size&&(o.size=n.size);break;default:o=typeof n.is=="string"?x.createElement(u,{is:n.is}):x.createElement(u)}}o[Nt]=t,o[Ut]=n;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)o.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=o;e:switch(Jt(o,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&&Bn(t)}}return mt(t),Sd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Bn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=de.current,Vt(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[Nt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||v0(e.nodeValue,a)),e||Ge(t,!0)}else e=Ec(e).createTextNode(n),e[Nt]=t,t.stateNode=e}return mt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Vt(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[Nt]=t}else Bt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else a=xn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(wa(t),t):(wa(t),null);if((t.flags&128)!==0)throw Error(c(558))}return mt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Vt(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[Nt]=t}else Bt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),u=!1}else u=xn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(wa(t),t):(wa(t),null)}return wa(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),oc(t,t.updateQueue),mt(t),null);case 4:return Xe(),e===null&&$d(t.stateNode.containerInfo),mt(t),null;case 10:return nn(t.type),mt(t),null;case 19:if(le(Et),n=t.memoizedState,n===null)return mt(t),null;if(u=(t.flags&128)!==0,o=n.rendering,o===null)if(u)Ei(n,!1);else{if(bt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Xu(e),o!==null){for(t.flags|=128,Ei(n,!1),e=o.updateQueue,t.updateQueue=e,oc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Yu(a,e),a=a.sibling;return he(Et,Et.current&1|2),V&&i(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&St()>gc&&(t.flags|=128,u=!0,Ei(n,!1),t.lanes=4194304)}else{if(!u)if(e=Xu(o),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,oc(t,e),Ei(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!V)return mt(t),null}else 2*St()-n.renderingStartTime>gc&&a!==536870912&&(t.flags|=128,u=!0,Ei(n,!1),t.lanes=4194304);n.isBackwards?(o.sibling=t.child,t.child=o):(e=n.last,e!==null?e.sibling=o:t.child=o,n.last=o)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=St(),e.sibling=null,a=Et.current,he(Et,u?a&1|2:a&1),V&&i(t,n.treeForkCount),e):(mt(t),null);case 22:case 23:return wa(t),Po(),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&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),a=t.updateQueue,a!==null&&oc(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&&le(ws),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),nn(Dt),mt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Kp(e,t){switch(w(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nn(Dt),Xe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return cn(t),null;case 31:if(t.memoizedState!==null){if(wa(t),t.alternate===null)throw Error(c(340));Bt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Bt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(Et),null;case 4:return Xe(),null;case 10:return nn(t.type),null;case 22:case 23:return wa(t),Po(),e!==null&&le(ws),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return nn(Dt),null;case 25:return null;default:return null}}function wm(e,t){switch(w(t),t.tag){case 3:nn(Dt),Xe();break;case 26:case 27:case 5:cn(t);break;case 4:Xe();break;case 31:t.memoizedState!==null&&wa(t);break;case 13:wa(t);break;case 19:le(Et);break;case 10:nn(t.type);break;case 22:case 23:wa(t),Po(),e!==null&&le(ws);break;case 24:nn(Dt)}}function Ti(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 o=a.create,x=a.inst;n=o(),x.destroy=n}a=a.next}while(a!==u)}}catch(E){at(t,t.return,E)}}function jl(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var o=u.next;n=o;do{if((n.tag&e)===e){var x=n.inst,E=x.destroy;if(E!==void 0){x.destroy=void 0,u=t;var _=a,Q=E;try{Q()}catch(se){at(u,_,se)}}}n=n.next}while(n!==o)}}catch(se){at(t,t.return,se)}}function Em(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{gh(t,a)}catch(n){at(e,e.return,n)}}}function Tm(e,t,a){a.props=Os(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){at(e,t,n)}}function Ci(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){at(e,t,u)}}function yn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){at(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){at(e,t,u)}else a.current=null}function Cm(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){at(e,e.return,u)}}function Nd(e,t,a){try{var n=e.stateNode;Sy(n,e.type,a,t),n[Ut]=t}catch(u){at(e,e.return,u)}}function Mm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Rl(e.type)||e.tag===4}function jd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Rl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function 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=Da));else if(n!==4&&(n===27&&Rl(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 dc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&Rl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(dc(e,t,a),e=e.sibling;e!==null;)dc(e,t,a),e=e.sibling}function Om(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Jt(t,n,a),t[Nt]=e,t[Ut]=a}catch(o){at(e,e.return,o)}}var Yn=!1,kt=!1,Ed=!1,Rm=typeof WeakSet=="function"?WeakSet:Set,Yt=null;function ey(e,t){if(e=e.containerInfo,Fd=Ac,e=Ao(e),lr(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,o=n.focusNode;n=n.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var x=0,E=-1,_=-1,Q=0,se=0,ce=e,X=null;t:for(;;){for(var te;ce!==a||u!==0&&ce.nodeType!==3||(E=x+u),ce!==o||n!==0&&ce.nodeType!==3||(_=x+n),ce.nodeType===3&&(x+=ce.nodeValue.length),(te=ce.firstChild)!==null;)X=ce,ce=te;for(;;){if(ce===e)break t;if(X===a&&++Q===u&&(E=x),X===o&&++se===n&&(_=x),(te=ce.nextSibling)!==null)break;ce=X,X=ce.parentNode}ce=te}a=E===-1||_===-1?null:{start:E,end:_}}else a=null}a=a||{start:0,end:0}}else a=null;for(Zd={focusedElem:e,selectionRange:a},Ac=!1,Yt=t;Yt!==null;)if(t=Yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Yt=e;else for(;Yt!==null;){switch(t=Yt,o=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&&o!==null){e=void 0,a=t,u=o.memoizedProps,o=o.memoizedState,n=a.stateNode;try{var ve=Os(a.type,u);e=n.getSnapshotBeforeUpdate(ve,o),n.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){at(a,a.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Id(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Id(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,Yt=e;break}Yt=t.return}}function Dm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Pn(e,a),n&4&&Ti(5,a);break;case 1:if(Pn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(x){at(a,a.return,x)}else{var u=Os(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){at(a,a.return,x)}}n&64&&Em(a),n&512&&Ci(a,a.return);break;case 3:if(Pn(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{gh(e,t)}catch(x){at(a,a.return,x)}}break;case 27:t===null&&n&4&&Om(a);case 26:case 5:Pn(e,a),t===null&&n&4&&Cm(a),n&512&&Ci(a,a.return);break;case 12:Pn(e,a);break;case 31:Pn(e,a),n&4&&km(e,a);break;case 13:Pn(e,a),n&4&&zm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=cy.bind(null,a),Oy(e,a))));break;case 22:if(n=a.memoizedState!==null||Yn,!n){t=t!==null&&t.memoizedState!==null||kt,u=Yn;var o=kt;Yn=n,(kt=t)&&!o?Gn(e,a,(a.subtreeFlags&8772)!==0):Pn(e,a),Yn=u,kt=o}break;case 30:break;default:Pn(e,a)}}function Am(e){var t=e.alternate;t!==null&&(e.alternate=null,Am(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Zs(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 xt=null,ha=!1;function $n(e,t,a){for(a=a.child;a!==null;)_m(e,t,a),a=a.sibling}function _m(e,t,a){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(ot,a)}catch{}switch(a.tag){case 26:kt||yn(a,t),$n(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:kt||yn(a,t);var n=xt,u=ha;Rl(a.type)&&(xt=a.stateNode,ha=!1),$n(e,t,a),Ui(a.stateNode),xt=n,ha=u;break;case 5:kt||yn(a,t);case 6:if(n=xt,u=ha,xt=null,$n(e,t,a),xt=n,ha=u,xt!==null)if(ha)try{(xt.nodeType===9?xt.body:xt.nodeName==="HTML"?xt.ownerDocument.body:xt).removeChild(a.stateNode)}catch(o){at(a,t,o)}else try{xt.removeChild(a.stateNode)}catch(o){at(a,t,o)}break;case 18:xt!==null&&(ha?(e=xt,E0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),_r(e)):E0(xt,a.stateNode));break;case 4:n=xt,u=ha,xt=a.stateNode.containerInfo,ha=!0,$n(e,t,a),xt=n,ha=u;break;case 0:case 11:case 14:case 15:jl(2,a,t),kt||jl(4,a,t),$n(e,t,a);break;case 1:kt||(yn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Tm(a,t,n)),$n(e,t,a);break;case 21:$n(e,t,a);break;case 22:kt=(n=kt)||a.memoizedState!==null,$n(e,t,a),kt=n;break;default:$n(e,t,a)}}function km(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{_r(e)}catch(a){at(t,t.return,a)}}}function zm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{_r(e)}catch(a){at(t,t.return,a)}}function ty(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Rm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Rm),t;default:throw Error(c(435,e.tag))}}function fc(e,t){var a=ty(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var u=oy.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],o=e,x=t,E=x;e:for(;E!==null;){switch(E.tag){case 27:if(Rl(E.type)){xt=E.stateNode,ha=!1;break e}break;case 5:xt=E.stateNode,ha=!1;break e;case 3:case 4:xt=E.stateNode.containerInfo,ha=!0;break e}E=E.return}if(xt===null)throw Error(c(160));_m(o,x,u),xt=null,ha=!1,o=u.alternate,o!==null&&(o.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Um(t,e),t=t.sibling}var ln=null;function Um(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ma(t,e),ga(e),n&4&&(jl(3,e,e.return),Ti(3,e),jl(5,e,e.return));break;case 1:ma(t,e),ga(e),n&512&&(kt||a===null||yn(a,a.return)),n&64&&Yn&&(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=ln;if(ma(t,e),ga(e),n&512&&(kt||a===null||yn(a,a.return)),n&4){var o=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":o=u.getElementsByTagName("title")[0],(!o||o[Jl]||o[Nt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=u.createElement(n),u.head.insertBefore(o,u.querySelector("head > title"))),Jt(o,n,a),o[Nt]=e,Rt(o),n=o;break e;case"link":var x=U0("link","href",u).get(n+(a.href||""));if(x){for(var E=0;E<x.length;E++)if(o=x[E],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){x.splice(E,1);break t}}o=u.createElement(n),Jt(o,n,a),u.head.appendChild(o);break;case"meta":if(x=U0("meta","content",u).get(n+(a.content||""))){for(E=0;E<x.length;E++)if(o=x[E],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){x.splice(E,1);break t}}o=u.createElement(n),Jt(o,n,a),u.head.appendChild(o);break;default:throw Error(c(468,n))}o[Nt]=e,Rt(o),n=o}e.stateNode=n}else L0(u,e.type,e.stateNode);else e.stateNode=z0(u,n,e.memoizedProps);else o!==n?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,n===null?L0(u,e.type,e.stateNode):z0(u,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Nd(e,e.memoizedProps,a.memoizedProps)}break;case 27:ma(t,e),ga(e),n&512&&(kt||a===null||yn(a,a.return)),a!==null&&n&4&&Nd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ma(t,e),ga(e),n&512&&(kt||a===null||yn(a,a.return)),e.flags&32){u=e.stateNode;try{Xa(u,"")}catch(ve){at(e,e.return,ve)}}n&4&&e.stateNode!=null&&(u=e.memoizedProps,Nd(e,u,a!==null?a.memoizedProps:u)),n&1024&&(Ed=!0);break;case 6:if(ma(t,e),ga(e),n&4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(ve){at(e,e.return,ve)}}break;case 3:if(Mc=null,u=ln,ln=Tc(t.containerInfo),ma(t,e),ln=u,ga(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{_r(t.containerInfo)}catch(ve){at(e,e.return,ve)}Ed&&(Ed=!1,Lm(e));break;case 4:n=ln,ln=Tc(e.stateNode.containerInfo),ma(t,e),ga(e),ln=n;break;case 12:ma(t,e),ga(e);break;case 31:ma(t,e),ga(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,fc(e,n)));break;case 13:ma(t,e),ga(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(mc=St()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,fc(e,n)));break;case 22:u=e.memoizedState!==null;var _=a!==null&&a.memoizedState!==null,Q=Yn,se=kt;if(Yn=Q||u,kt=se||_,ma(t,e),kt=se,Yn=Q,ga(e),n&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||_||Yn||kt||Rs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){_=a=t;try{if(o=_.stateNode,u)x=o.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=_.stateNode;var ce=_.memoizedProps.style,X=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;E.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ve){at(_,_.return,ve)}}}else if(t.tag===6){if(a===null){_=t;try{_.stateNode.nodeValue=u?"":_.memoizedProps}catch(ve){at(_,_.return,ve)}}}else if(t.tag===18){if(a===null){_=t;try{var te=_.stateNode;u?T0(te,!0):T0(_.stateNode,!1)}catch(ve){at(_,_.return,ve)}}}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,fc(e,a))));break;case 19:ma(t,e),ga(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,fc(e,n)));break;case 30:break;case 21:break;default:ma(t,e),ga(e)}}function ga(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Mm(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var u=a.stateNode,o=jd(e);dc(e,o,u);break;case 5:var x=a.stateNode;a.flags&32&&(Xa(x,""),a.flags&=-33);var E=jd(e);dc(e,E,x);break;case 3:case 4:var _=a.stateNode.containerInfo,Q=jd(e);wd(e,Q,_);break;default:throw Error(c(161))}}catch(se){at(e,e.return,se)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Lm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Lm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Pn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Dm(e,t.alternate,t),t=t.sibling}function Rs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:jl(4,t,t.return),Rs(t);break;case 1:yn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Tm(t,t.return,a),Rs(t);break;case 27:Ui(t.stateNode);case 26:case 5:yn(t,t.return),Rs(t);break;case 22:t.memoizedState===null&&Rs(t);break;case 30:Rs(t);break;default:Rs(t)}e=e.sibling}}function Gn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,u=e,o=t,x=o.flags;switch(o.tag){case 0:case 11:case 15:Gn(u,o,a),Ti(4,o);break;case 1:if(Gn(u,o,a),n=o,u=n.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(Q){at(n,n.return,Q)}if(n=o,u=n.updateQueue,u!==null){var E=n.stateNode;try{var _=u.shared.hiddenCallbacks;if(_!==null)for(u.shared.hiddenCallbacks=null,u=0;u<_.length;u++)mh(_[u],E)}catch(Q){at(n,n.return,Q)}}a&&x&64&&Em(o),Ci(o,o.return);break;case 27:Om(o);case 26:case 5:Gn(u,o,a),a&&n===null&&x&4&&Cm(o),Ci(o,o.return);break;case 12:Gn(u,o,a);break;case 31:Gn(u,o,a),a&&x&4&&km(u,o);break;case 13:Gn(u,o,a),a&&x&4&&zm(u,o);break;case 22:o.memoizedState===null&&Gn(u,o,a),Ci(o,o.return);break;case 30:break;default:Gn(u,o,a)}t=t.sibling}}function Td(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&hi(a))}function Cd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hi(e))}function sn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hm(e,t,a,n),t=t.sibling}function Hm(e,t,a,n){var u=t.flags;switch(t.tag){case 0:case 11:case 15:sn(e,t,a,n),u&2048&&Ti(9,t);break;case 1:sn(e,t,a,n);break;case 3:sn(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&&hi(e)));break;case 12:if(u&2048){sn(e,t,a,n),e=t.stateNode;try{var o=t.memoizedProps,x=o.id,E=o.onPostCommit;typeof E=="function"&&E(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){at(t,t.return,_)}}else sn(e,t,a,n);break;case 31:sn(e,t,a,n);break;case 13:sn(e,t,a,n);break;case 23:break;case 22:o=t.stateNode,x=t.alternate,t.memoizedState!==null?o._visibility&2?sn(e,t,a,n):Mi(e,t):o._visibility&2?sn(e,t,a,n):(o._visibility|=2,Nr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Td(x,t);break;case 24:sn(e,t,a,n),u&2048&&Cd(t.alternate,t);break;default:sn(e,t,a,n)}}function Nr(e,t,a,n,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,x=t,E=a,_=n,Q=x.flags;switch(x.tag){case 0:case 11:case 15:Nr(o,x,E,_,u),Ti(8,x);break;case 23:break;case 22:var se=x.stateNode;x.memoizedState!==null?se._visibility&2?Nr(o,x,E,_,u):Mi(o,x):(se._visibility|=2,Nr(o,x,E,_,u)),u&&Q&2048&&Td(x.alternate,x);break;case 24:Nr(o,x,E,_,u),u&&Q&2048&&Cd(x.alternate,x);break;default:Nr(o,x,E,_,u)}t=t.sibling}}function Mi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,u=n.flags;switch(n.tag){case 22:Mi(a,n),u&2048&&Td(n.alternate,n);break;case 24:Mi(a,n),u&2048&&Cd(n.alternate,n);break;default:Mi(a,n)}t=t.sibling}}var Oi=8192;function jr(e,t,a){if(e.subtreeFlags&Oi)for(e=e.child;e!==null;)qm(e,t,a),e=e.sibling}function qm(e,t,a){switch(e.tag){case 26:jr(e,t,a),e.flags&Oi&&e.memoizedState!==null&&By(a,ln,e.memoizedState,e.memoizedProps);break;case 5:jr(e,t,a);break;case 3:case 4:var n=ln;ln=Tc(e.stateNode.containerInfo),jr(e,t,a),ln=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Oi,Oi=16777216,jr(e,t,a),Oi=n):jr(e,t,a));break;default:jr(e,t,a)}}function Vm(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 Ri(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];Yt=n,Ym(n,e)}Vm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Bm(e),e=e.sibling}function Bm(e){switch(e.tag){case 0:case 11:case 15:Ri(e),e.flags&2048&&jl(9,e,e.return);break;case 3:Ri(e);break;case 12:Ri(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,hc(e)):Ri(e);break;default:Ri(e)}}function hc(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];Yt=n,Ym(n,e)}Vm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:jl(8,t,t.return),hc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,hc(t));break;default:hc(t)}e=e.sibling}}function Ym(e,t){for(;Yt!==null;){var a=Yt;switch(a.tag){case 0:case 11:case 15:jl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:hi(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Yt=n;else e:for(a=e;Yt!==null;){n=Yt;var u=n.sibling,o=n.return;if(Am(n),n===a){Yt=null;break e}if(u!==null){u.return=o,Yt=u;break e}Yt=o}}}var ay={getCacheForType:function(e){var t=It(Dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return It(Dt).controller.signal}},ny=typeof WeakMap=="function"?WeakMap:Map,Je=0,ut=null,Ye=null,Fe=0,tt=0,Ea=null,wl=!1,wr=!1,Md=!1,Fn=0,bt=0,El=0,Ds=0,Od=0,Ta=0,Er=0,Di=null,xa=null,Rd=!1,mc=0,$m=0,gc=1/0,xc=null,Tl=null,Ht=0,Cl=null,Tr=null,Zn=0,Dd=0,Ad=null,Pm=null,Ai=0,_d=null;function Ca(){return(Je&2)!==0&&Fe!==0?Fe&-Fe:B.T!==null?qd():Fs()}function Gm(){if(Ta===0)if((Fe&536870912)===0||V){var e=$s;$s<<=1,($s&3932160)===0&&($s=262144),Ta=e}else Ta=536870912;return e=ja.current,e!==null&&(e.flags|=32),Ta}function pa(e,t,a){(e===ut&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(Cr(e,0),Ml(e,Fe,Ta,!1)),al(e,a),((Je&2)===0||e!==ut)&&(e===ut&&((Je&2)===0&&(Ds|=a),bt===4&&Ml(e,Fe,Ta,!1)),vn(e))}function Fm(e,t,a){if((Je&6)!==0)throw Error(c(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||tl(e,t),u=n?ry(e,t):zd(e,t,!0),o=n;do{if(u===0){wr&&!n&&Ml(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!ly(a)){u=zd(e,t,!1),o=!1;continue}if(u===2){if(o=t,e.errorRecoveryDisabledLanes&o)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=Di;var _=E.current.memoizedState.isDehydrated;if(_&&(Cr(E,x).flags|=256),x=zd(E,x,!1),x!==2){if(Md&&!_){E.errorRecoveryDisabledLanes|=o,Ds|=o,u=4;break e}o=xa,xa=u,o!==null&&(xa===null?xa=o:xa.push.apply(xa,o))}u=x}if(o=!1,u!==2)continue}}if(u===1){Cr(e,0),Ml(e,t,0,!0);break}e:{switch(n=e,o=u,o){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Ml(n,t,Ta,!wl);break e;case 2:xa=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=mc+300-St(),10<u)){if(Ml(n,t,Ta,!wl),Il(n,0,!0)!==0)break e;Zn=t,n.timeoutHandle=j0(Zm.bind(null,n,a,xa,xc,Rd,t,Ta,Ds,Er,wl,o,"Throttled",-0,0),u);break e}Zm(n,a,xa,xc,Rd,t,Ta,Ds,Er,wl,o,null,-0,0)}}break}while(!0);vn(e)}function Zm(e,t,a,n,u,o,x,E,_,Q,se,ce,X,te){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Da},qm(t,o,ce);var ve=(o&62914560)===o?mc-St():(o&4194048)===o?$m-St():0;if(ve=Yy(ce,ve),ve!==null){Zn=o,e.cancelPendingCommit=ve(t0.bind(null,e,t,o,a,n,u,x,E,_,se,ce,null,X,te)),Ml(e,o,x,!Q);return}}t0(e,t,o,a,n,u,x,E,_)}function ly(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],o=u.getSnapshot;u=u.value;try{if(!aa(o(),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 Ml(e,t,a,n){t&=~Od,t&=~Ds,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var u=t;0<u;){var o=31-Gt(u),x=1<<o;n[o]=-1,u&=~x}a!==0&&dt(e,a,t)}function pc(){return(Je&6)===0?(_i(0),!1):!0}function kd(){if(Ye!==null){if(tt===0)var e=Ye.return;else e=Ye,Ha=Un=null,Io(e),pr=null,gi=0,e=Ye;for(;e!==null;)wm(e.alternate,e),e=e.return;Ye=null}}function Cr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,wy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Zn=0,kd(),ut=e,Ye=a=za(e.current,null),Fe=t,tt=0,Ea=null,wl=!1,wr=tl(e,t),Md=!1,Er=Ta=Od=Ds=El=bt=0,xa=Di=null,Rd=!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-Gt(n),o=1<<u;t|=e[u],n&=~o}return Fn=t,xl(),a}function Wm(e,t){qe=null,B.H=ji,t===xr||t===Fu?(t=oh(),tt=3):t===Ho?(t=oh(),tt=4):tt=t===fd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ea=t,Ye===null&&(bt=1,rc(e,da(t,e.current)))}function Qm(){var e=ja.current;return e===null?!0:(Fe&4194048)===Fe?Va===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?e===Va:!1}function Im(){var e=B.H;return B.H=ji,e===null?ji:e}function Xm(){var e=B.A;return B.A=ay,e}function yc(){bt=4,wl||(Fe&4194048)!==Fe&&ja.current!==null||(wr=!0),(El&134217727)===0&&(Ds&134217727)===0||ut===null||Ml(ut,Fe,Ta,!1)}function zd(e,t,a){var n=Je;Je|=2;var u=Im(),o=Xm();(ut!==e||Fe!==t)&&(xc=null,Cr(e,t)),t=!1;var x=bt;e:do try{if(tt!==0&&Ye!==null){var E=Ye,_=Ea;switch(tt){case 8:kd(),x=6;break e;case 3:case 2:case 9:case 6:ja.current===null&&(t=!0);var Q=tt;if(tt=0,Ea=null,Mr(e,E,_,Q),a&&wr){x=0;break e}break;default:Q=tt,tt=0,Ea=null,Mr(e,E,_,Q)}}sy(),x=bt;break}catch(se){Wm(e,se)}while(!0);return t&&e.shellSuspendCounter++,Ha=Un=null,Je=n,B.H=u,B.A=o,Ye===null&&(ut=null,Fe=0,xl()),x}function sy(){for(;Ye!==null;)Jm(Ye)}function ry(e,t){var a=Je;Je|=2;var n=Im(),u=Xm();ut!==e||Fe!==t?(xc=null,gc=St()+500,Cr(e,t)):wr=tl(e,t);e:do try{if(tt!==0&&Ye!==null){t=Ye;var o=Ea;t:switch(tt){case 1:tt=0,Ea=null,Mr(e,t,o,1);break;case 2:case 9:if(uh(o)){tt=0,Ea=null,Km(t);break}t=function(){tt!==2&&tt!==9||ut!==e||(tt=7),vn(e)},o.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:uh(o)?(tt=0,Ea=null,Km(t)):(tt=0,Ea=null,Mr(e,t,o,7));break;case 5:var x=null;switch(Ye.tag){case 26:x=Ye.memoizedState;case 5:case 27:var E=Ye;if(x?H0(x):E.stateNode.complete){tt=0,Ea=null;var _=E.sibling;if(_!==null)Ye=_;else{var Q=E.return;Q!==null?(Ye=Q,vc(Q)):Ye=null}break t}}tt=0,Ea=null,Mr(e,t,o,5);break;case 6:tt=0,Ea=null,Mr(e,t,o,6);break;case 8:kd(),bt=6;break e;default:throw Error(c(462))}}iy();break}catch(se){Wm(e,se)}while(!0);return Ha=Un=null,B.H=n,B.A=u,Je=a,Ye!==null?0:(ut=null,Fe=0,xl(),bt)}function iy(){for(;Ye!==null&&!Ot();)Jm(Ye)}function Jm(e){var t=Nm(e.alternate,e,Fn);e.memoizedProps=e.pendingProps,t===null?vc(e):Ye=t}function Km(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=xm(a,t,t.pendingProps,t.type,void 0,Fe);break;case 11:t=xm(a,t,t.pendingProps,t.type.render,t.ref,Fe);break;case 5:Io(t);default:wm(a,t),t=Ye=Yu(t,Fn),t=Nm(a,t,Fn)}e.memoizedProps=e.pendingProps,t===null?vc(e):Ye=t}function Mr(e,t,a,n){Ha=Un=null,Io(t),pr=null,gi=0;var u=t.return;try{if(Qp(e,u,t,a,Fe)){bt=1,rc(e,da(a,e.current)),Ye=null;return}}catch(o){if(u!==null)throw Ye=u,o;bt=1,rc(e,da(a,e.current)),Ye=null;return}t.flags&32768?(V||n===1?e=!0:wr||(Fe&536870912)!==0?e=!1:(wl=e=!0,(n===2||n===9||n===3||n===6)&&(n=ja.current,n!==null&&n.tag===13&&(n.flags|=16384))),e0(t,e)):vc(t)}function vc(e){var t=e;do{if((t.flags&32768)!==0){e0(t,wl);return}e=t.return;var a=Jp(t.alternate,t,Fn);if(a!==null){Ye=a;return}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);bt===0&&(bt=5)}function e0(e,t){do{var a=Kp(e.alternate,e);if(a!==null){a.flags&=32767,Ye=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ye=e;return}Ye=e=a}while(e!==null);bt=6,Ye=null}function t0(e,t,a,n,u,o,x,E,_){e.cancelPendingCommit=null;do bc();while(Ht!==0);if((Je&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(o=t.lanes|t.childLanes,o|=vs,mu(e,a,o,x,E,_),e===ut&&(Ye=ut=null,Fe=0),Tr=t,Cl=e,Zn=a,Dd=o,Ad=u,Pm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,dy(En,function(){return r0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=B.T,B.T=null,u=re.p,re.p=2,x=Je,Je|=4;try{ey(e,t,a)}finally{Je=x,re.p=u,B.T=n}}Ht=1,a0(),n0(),l0()}}function a0(){if(Ht===1){Ht=0;var e=Cl,t=Tr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var n=re.p;re.p=2;var u=Je;Je|=4;try{Um(t,e);var o=Zd,x=Ao(e.containerInfo),E=o.focusedElem,_=o.selectionRange;if(x!==E&&E&&E.ownerDocument&&We(E.ownerDocument.documentElement,E)){if(_!==null&&lr(E)){var Q=_.start,se=_.end;if(se===void 0&&(se=Q),"selectionStart"in E)E.selectionStart=Q,E.selectionEnd=Math.min(se,E.value.length);else{var ce=E.ownerDocument||document,X=ce&&ce.defaultView||window;if(X.getSelection){var te=X.getSelection(),ve=E.textContent.length,Ae=Math.min(_.start,ve),rt=_.end===void 0?Ae:Math.min(_.end,ve);!te.extend&&Ae>rt&&(x=rt,rt=Ae,Ae=x);var P=Uu(E,Ae),q=Uu(E,rt);if(P&&q&&(te.rangeCount!==1||te.anchorNode!==P.node||te.anchorOffset!==P.offset||te.focusNode!==q.node||te.focusOffset!==q.offset)){var W=ce.createRange();W.setStart(P.node,P.offset),te.removeAllRanges(),Ae>rt?(te.addRange(W),te.extend(q.node,q.offset)):(W.setEnd(q.node,q.offset),te.addRange(W))}}}}for(ce=[],te=E;te=te.parentNode;)te.nodeType===1&&ce.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ce.length;E++){var ie=ce[E];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Ac=!!Fd,Zd=Fd=null}finally{Je=u,re.p=n,B.T=a}}e.current=t,Ht=2}}function n0(){if(Ht===2){Ht=0;var e=Cl,t=Tr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var n=re.p;re.p=2;var u=Je;Je|=4;try{Dm(e,t.alternate,t)}finally{Je=u,re.p=n,B.T=a}}Ht=3}}function l0(){if(Ht===4||Ht===3){Ht=0,qt();var e=Cl,t=Tr,a=Zn,n=Pm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ht=5:(Ht=0,Tr=Cl=null,s0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Tl=null),ta(a),t=t.stateNode,zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(ot,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=B.T,u=re.p,re.p=2,B.T=null;try{for(var o=e.onRecoverableError,x=0;x<n.length;x++){var E=n[x];o(E.value,{componentStack:E.stack})}}finally{B.T=t,re.p=u}}(Zn&3)!==0&&bc(),vn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===_d?Ai++:(Ai=0,_d=e):Ai=0,_i(0)}}function s0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,hi(t)))}function bc(){return a0(),n0(),l0(),r0()}function r0(){if(Ht!==5)return!1;var e=Cl,t=Dd;Dd=0;var a=ta(Zn),n=B.T,u=re.p;try{re.p=32>a?32:a,B.T=null,a=Ad,Ad=null;var o=Cl,x=Zn;if(Ht=0,Tr=Cl=null,Zn=0,(Je&6)!==0)throw Error(c(331));var E=Je;if(Je|=4,Bm(o.current),Hm(o,o.current,x,a),Je=E,_i(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(ot,o)}catch{}return!0}finally{re.p=u,B.T=n,s0(e,t)}}function i0(e,t,a){t=da(a,t),t=dd(e.stateNode,t,2),e=bl(e,t,2),e!==null&&(al(e,2),vn(e))}function at(e,t,a){if(e.tag===3)i0(e,e,a);else for(;t!==null;){if(t.tag===3){i0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Tl===null||!Tl.has(n))){e=da(a,e),a=um(2),n=bl(t,a,2),n!==null&&(cm(a,n,t,e),al(n,2),vn(n));break}}t=t.return}}function Ud(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new ny;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=uy.bind(null,e,t,a),t.then(e,e))}function uy(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ut===e&&(Fe&a)===a&&(bt===4||bt===3&&(Fe&62914560)===Fe&&300>St()-mc?(Je&2)===0&&Cr(e,0):Od|=a,Er===Fe&&(Er=0)),vn(e)}function u0(e,t){t===0&&(t=Yr()),e=ka(e,t),e!==null&&(al(e,t),vn(e))}function cy(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),u0(e,a)}function oy(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),u0(e,a)}function dy(e,t){return pe(e,t)}var Sc=null,Or=null,Ld=!1,Nc=!1,Hd=!1,Ol=0;function vn(e){e!==Or&&e.next===null&&(Or===null?Sc=Or=e:Or=Or.next=e),Nc=!0,Ld||(Ld=!0,hy())}function _i(e,t){if(!Hd&&Nc){Hd=!0;do for(var a=!1,n=Sc;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var o=0;else{var x=n.suspendedLanes,E=n.pingedLanes;o=(1<<31-Gt(42|e)+1)-1,o&=u&~(x&~E),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,f0(n,o))}else o=Fe,o=Il(n,n===ut?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||tl(n,o)||(a=!0,f0(n,o));n=n.next}while(a);Hd=!1}}function fy(){c0()}function c0(){Nc=Ld=!1;var e=0;Ol!==0&&jy()&&(e=Ol);for(var t=St(),a=null,n=Sc;n!==null;){var u=n.next,o=o0(n,t);o===0?(n.next=null,a===null?Sc=u:a.next=u,u===null&&(Or=a)):(a=n,(e!==0||(o&3)!==0)&&(Nc=!0)),n=u}Ht!==0&&Ht!==5||_i(e),Ol!==0&&(Ol=0)}function o0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var x=31-Gt(o),E=1<<x,_=u[x];_===-1?((E&a)===0||(E&n)!==0)&&(u[x]=hu(E,t)):_<=t&&(e.expiredLanes|=E),o&=~E}if(t=ut,a=Fe,a=Il(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(tt===2||tt===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Te(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||tl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Te(n),ta(a)){case 2:case 8:a=Ql;break;case 32:a=En;break;case 268435456:a=Kn;break;default:a=En}return n=d0.bind(null,e),a=pe(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Te(n),e.callbackPriority=2,e.callbackNode=null,2}function d0(e,t){if(Ht!==0&&Ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(bc()&&e.callbackNode!==a)return null;var n=Fe;return n=Il(e,e===ut?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Fm(e,n,t),o0(e,St()),e.callbackNode!=null&&e.callbackNode===a?d0.bind(null,e):null)}function f0(e,t){if(bc())return null;Fm(e,t,!0)}function hy(){Ey(function(){(Je&6)!==0?pe(Wl,fy):c0()})}function qd(){if(Ol===0){var e=mr;e===0&&(e=el,el<<=1,(el&261888)===0&&(el=256)),Ol=e}return Ol}function h0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ls(""+e)}function m0(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 my(e,t,a,n,u){if(t==="submit"&&a&&a.stateNode===u){var o=h0((u[Ut]||null).action),x=n.submitter;x&&(t=(t=x[Ut]||null)?h0(t.formAction):x.getAttribute("formAction"),t!==null&&(o=t,x=null));var E=new us("action","action",null,n,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ol!==0){var _=x?m0(u,x):new FormData(u);sd(a,{pending:!0,data:_,method:u.method,action:o},null,_)}}else typeof o=="function"&&(E.preventDefault(),_=x?m0(u,x):new FormData(u),sd(a,{pending:!0,data:_,method:u.method,action:o},o,_))},currentTarget:u}]})}}for(var Vd=0;Vd<ci.length;Vd++){var Bd=ci[Vd],gy=Bd.toLowerCase(),xy=Bd[0].toUpperCase()+Bd.slice(1);oa(gy,"on"+xy)}oa(qu,"onAnimationEnd"),oa(Vu,"onAnimationIteration"),oa(ir,"onAnimationStart"),oa("dblclick","onDoubleClick"),oa("focusin","onFocus"),oa("focusout","onBlur"),oa(_o,"onTransitionRun"),oa(ko,"onTransitionStart"),oa(Bu,"onTransitionCancel"),oa(ii,"onTransitionEnd"),nl("onMouseEnter",["mouseout","mouseover"]),nl("onMouseLeave",["mouseout","mouseover"]),nl("onPointerEnter",["pointerout","pointerover"]),nl("onPointerLeave",["pointerout","pointerover"]),dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),dn("onBeforeInput",["compositionend","keypress","textInput","paste"]),dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ki="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),py=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ki));function g0(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 o=void 0;if(t)for(var x=n.length-1;0<=x;x--){var E=n[x],_=E.instance,Q=E.currentTarget;if(E=E.listener,_!==o&&u.isPropagationStopped())break e;o=E,u.currentTarget=Q;try{o(u)}catch(se){gl(se)}u.currentTarget=null,o=_}else for(x=0;x<n.length;x++){if(E=n[x],_=E.instance,Q=E.currentTarget,E=E.listener,_!==o&&u.isPropagationStopped())break e;o=E,u.currentTarget=Q;try{o(u)}catch(se){gl(se)}u.currentTarget=null,o=_}}}}function $e(e,t){var a=t[Xl];a===void 0&&(a=t[Xl]=new Set);var n=e+"__bubble";a.has(n)||(x0(t,e,2,!1),a.add(n))}function Yd(e,t,a){var n=0;t&&(n|=4),x0(a,e,n,t)}var jc="_reactListening"+Math.random().toString(36).slice(2);function $d(e){if(!e[jc]){e[jc]=!0,yu.forEach(function(a){a!=="selectionchange"&&(py.has(a)||Yd(a,!1,e),Yd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jc]||(t[jc]=!0,Yd("selectionchange",!1,t))}}function x0(e,t,a,n){switch(G0(t)){case 2:var u=Gy;break;case 8:u=Fy;break;default:u=lf}a=u.bind(null,t,a,e),u=void 0,!Jr||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 Pd(e,t,a,n,u){var o=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 _=x.tag;if((_===3||_===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;E!==null;){if(x=Cn(E),x===null)return;if(_=x.tag,_===5||_===6||_===26||_===27){n=o=x;continue e}E=E.parentNode}}n=n.return}Xr(function(){var Q=o,se=Js(a),ce=[];e:{var X=ui.get(e);if(X!==void 0){var te=us,ve=e;switch(e){case"keypress":if(is(a)===0)break e;case"keydown":case"keyup":te=yo;break;case"focusin":ve="focus",te=nr;break;case"focusout":ve="blur",te=nr;break;case"beforeblur":case"afterblur":te=nr;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=wu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=uo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=So;break;case qu:case Vu:case ir:te=il;break;case ii:te=No;break;case"scroll":case"scrollend":te=Kr;break;case"wheel":te=wo;break;case"copy":case"cut":case"paste":te=ul;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Eu;break;case"toggle":case"beforetoggle":te=To}var Ae=(t&4)!==0,rt=!Ae&&(e==="scroll"||e==="scrollend"),P=Ae?X!==null?X+"Capture":null:X;Ae=[];for(var q=Q,W;q!==null;){var ie=q;if(W=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||W===null||P===null||(ie=ss(q,P),ie!=null&&Ae.push(zi(q,ie,W))),rt)break;q=q.return}0<Ae.length&&(X=new te(X,ve,null,a,se),ce.push({event:X,listeners:Ae}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",X&&a!==Qr&&(ve=a.relatedTarget||a.fromElement)&&(Cn(ve)||ve[Tn]))break e;if((te||X)&&(X=se.window===se?se:(X=se.ownerDocument)?X.defaultView||X.parentWindow:window,te?(ve=a.relatedTarget||a.toElement,te=Q,ve=ve?Cn(ve):null,ve!==null&&(rt=h(ve),Ae=ve.tag,ve!==rt||Ae!==5&&Ae!==27&&Ae!==6)&&(ve=null)):(te=null,ve=Q),te!==ve)){if(Ae=wu,ie="onMouseLeave",P="onMouseEnter",q="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=Eu,ie="onPointerLeave",P="onPointerEnter",q="pointer"),rt=te==null?X:ua(te),W=ve==null?X:ua(ve),X=new Ae(ie,q+"leave",te,a,se),X.target=rt,X.relatedTarget=W,ie=null,Cn(se)===Q&&(Ae=new Ae(P,q+"enter",ve,a,se),Ae.target=W,Ae.relatedTarget=rt,ie=Ae),rt=ie,te&&ve)t:{for(Ae=yy,P=te,q=ve,W=0,ie=P;ie;ie=Ae(ie))W++;ie=0;for(var Ce=q;Ce;Ce=Ae(Ce))ie++;for(;0<W-ie;)P=Ae(P),W--;for(;0<ie-W;)q=Ae(q),ie--;for(;W--;){if(P===q||q!==null&&P===q.alternate){Ae=P;break t}P=Ae(P),q=Ae(q)}Ae=null}else Ae=null;te!==null&&p0(ce,X,te,Ae,!1),ve!==null&&rt!==null&&p0(ce,rt,ve,Ae,!0)}}e:{if(X=Q?ua(Q):window,te=X.nodeName&&X.nodeName.toLowerCase(),te==="select"||te==="input"&&X.type==="file")var Qe=ku;else if(_u(X))if(gn)Qe=ht;else{Qe=fl;var be=Pe}else te=X.nodeName,!te||te.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&Xs(Q.elementType)&&(Qe=ku):Qe=Do;if(Qe&&(Qe=Qe(e,Q))){ti(ce,Qe,a,se);break e}be&&be(e,X,Q),e==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&es(X,"number",X.value)}switch(be=Q?ua(Q):window,e){case"focusin":(_u(be)||be.contentEditable==="true")&&(hl=be,sr=Q,Wt=null);break;case"focusout":Wt=sr=hl=null;break;case"mousedown":rr=!0;break;case"contextmenu":case"mouseup":case"dragend":rr=!1,ys(ce,a,se);break;case"selectionchange":if(Lu)break;case"keydown":case"keyup":ys(ce,a,se)}var Ve;if(ei)e:{switch(e){case"compositionstart":var Ze="onCompositionStart";break e;case"compositionend":Ze="onCompositionEnd";break e;case"compositionupdate":Ze="onCompositionUpdate";break e}Ze=void 0}else ol?Du(e,a)&&(Ze="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ze="onCompositionStart");Ze&&(Mu&&a.locale!=="ko"&&(ol||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&ol&&(Ve=Lt()):(hn=se,Ks="value"in hn?hn.value:hn.textContent,ol=!0)),be=wc(Q,Ze),0<be.length&&(Ze=new cl(Ze,e,null,a,se),ce.push({event:Ze,listeners:be}),Ve?Ze.data=Ve:(Ve=Au(a),Ve!==null&&(Ze.data=Ve)))),(Ve=Co?Mo(e,a):Oo(e,a))&&(Ze=wc(Q,"onBeforeInput"),0<Ze.length&&(be=new cl("onBeforeInput","beforeinput",null,a,se),ce.push({event:be,listeners:Ze}),be.data=Ve)),my(ce,e,Q,a,se)}g0(ce,t)})}function zi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function wc(e,t){for(var a=t+"Capture",n=[];e!==null;){var u=e,o=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||o===null||(u=ss(e,a),u!=null&&n.unshift(zi(e,u,o)),u=ss(e,t),u!=null&&n.push(zi(e,u,o))),e.tag===3)return n;e=e.return}return[]}function yy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function p0(e,t,a,n,u){for(var o=t._reactName,x=[];a!==null&&a!==n;){var E=a,_=E.alternate,Q=E.stateNode;if(E=E.tag,_!==null&&_===n)break;E!==5&&E!==26&&E!==27||Q===null||(_=Q,u?(Q=ss(a,o),Q!=null&&x.unshift(zi(a,Q,_))):u||(Q=ss(a,o),Q!=null&&x.push(zi(a,Q,_)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var vy=/\r\n?/g,by=/\u0000|\uFFFD/g;function y0(e){return(typeof e=="string"?e:""+e).replace(vy,`
49
+ `).replace(by,"")}function v0(e,t){return t=y0(t),y0(e)===t}function st(e,t,a,n,u,o){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Xa(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Xa(e,""+n);break;case"className":Ws(e,"class",n);break;case"tabIndex":Ws(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ws(e,a,n);break;case"style":Su(e,n,o);break;case"data":if(t!=="object"){Ws(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=ls(""+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 o=="function"&&(a==="formAction"?(t!=="input"&&st(e,t,"name",u.name,u,null),st(e,t,"formEncType",u.formEncType,u,null),st(e,t,"formMethod",u.formMethod,u,null),st(e,t,"formTarget",u.formTarget,u,null)):(st(e,t,"encType",u.encType,u,null),st(e,t,"method",u.method,u,null),st(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ls(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Da);break;case"onScroll":n!=null&&$e("scroll",e);break;case"onScrollEnd":n!=null&&$e("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=ls(""+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":$e("beforetoggle",e),$e("toggle",e),Ft(e,"popover",n);break;case"xlinkActuate":et(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":et(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":et(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":et(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":et(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":et(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":et(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":et(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":et(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ft(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ro.get(a)||a,Ft(e,a,n))}}function Gd(e,t,a,n,u,o){switch(a){case"style":Su(e,n,o);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"?Xa(e,n):(typeof n=="number"||typeof n=="bigint")&&Xa(e,""+n);break;case"onScroll":n!=null&&$e("scroll",e);break;case"onScrollEnd":n!=null&&$e("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),o=e[Ut]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,u),typeof n=="function")){typeof o!="function"&&o!==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,""):Ft(e,a,n)}}}function Jt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",e),$e("load",e);var n=!1,u=!1,o;for(o in a)if(a.hasOwnProperty(o)){var x=a[o];if(x!=null)switch(o){case"src":n=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:st(e,t,o,x,a,null)}}u&&st(e,t,"srcSet",a.srcSet,a,null),n&&st(e,t,"src",a.src,a,null);return;case"input":$e("invalid",e);var E=o=x=u=null,_=null,Q=null;for(n in a)if(a.hasOwnProperty(n)){var se=a[n];if(se!=null)switch(n){case"name":u=se;break;case"type":x=se;break;case"checked":_=se;break;case"defaultChecked":Q=se;break;case"value":o=se;break;case"defaultValue":E=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(c(137,t));break;default:st(e,t,n,se,a,null)}}sl(e,o,E,_,Q,x,u,!1);return;case"select":$e("invalid",e),n=x=o=null;for(u in a)if(a.hasOwnProperty(u)&&(E=a[u],E!=null))switch(u){case"value":o=E;break;case"defaultValue":x=E;break;case"multiple":n=E;default:st(e,t,u,E,a,null)}t=o,a=x,e.multiple=!!n,t!=null?On(e,!!n,t,!1):a!=null&&On(e,!!n,a,!0);return;case"textarea":$e("invalid",e),o=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":o=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(c(91));break;default:st(e,t,x,E,a,null)}Wr(e,n,u,o);return;case"option":for(_ in a)if(a.hasOwnProperty(_)&&(n=a[_],n!=null))switch(_){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:st(e,t,_,n,a,null)}return;case"dialog":$e("beforetoggle",e),$e("toggle",e),$e("cancel",e),$e("close",e);break;case"iframe":case"object":$e("load",e);break;case"video":case"audio":for(n=0;n<ki.length;n++)$e(ki[n],e);break;case"image":$e("error",e),$e("load",e);break;case"details":$e("toggle",e);break;case"embed":case"source":case"link":$e("error",e),$e("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(Q in a)if(a.hasOwnProperty(Q)&&(n=a[Q],n!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:st(e,t,Q,n,a,null)}return;default:if(Xs(t)){for(se in a)a.hasOwnProperty(se)&&(n=a[se],n!==void 0&&Gd(e,t,se,n,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(n=a[E],n!=null&&st(e,t,E,n,a,null))}function Sy(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,o=null,x=null,E=null,_=null,Q=null,se=null;for(te in a){var ce=a[te];if(a.hasOwnProperty(te)&&ce!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":_=ce;default:n.hasOwnProperty(te)||st(e,t,te,null,n,ce)}}for(var X in n){var te=n[X];if(ce=a[X],n.hasOwnProperty(X)&&(te!=null||ce!=null))switch(X){case"type":o=te;break;case"name":u=te;break;case"checked":Q=te;break;case"defaultChecked":se=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!==ce&&st(e,t,X,te,n,ce)}}Is(e,x,E,_,Q,se,o,u);return;case"select":te=x=E=X=null;for(o in a)if(_=a[o],a.hasOwnProperty(o)&&_!=null)switch(o){case"value":break;case"multiple":te=_;default:n.hasOwnProperty(o)||st(e,t,o,null,n,_)}for(u in n)if(o=n[u],_=a[u],n.hasOwnProperty(u)&&(o!=null||_!=null))switch(u){case"value":X=o;break;case"defaultValue":E=o;break;case"multiple":x=o;default:o!==_&&st(e,t,u,o,n,_)}t=E,a=x,n=te,X!=null?On(e,!!a,X,!1):!!n!=!!a&&(t!=null?On(e,!!a,t,!0):On(e,!!a,a?[]:"",!1));return;case"textarea":te=X=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:st(e,t,E,null,n,u)}for(x in n)if(u=n[x],o=a[x],n.hasOwnProperty(x)&&(u!=null||o!=null))switch(x){case"value":X=u;break;case"defaultValue":te=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==o&&st(e,t,x,u,n,o)}ts(e,X,te);return;case"option":for(var ve in a)if(X=a[ve],a.hasOwnProperty(ve)&&X!=null&&!n.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:st(e,t,ve,null,n,X)}for(_ in n)if(X=n[_],te=a[_],n.hasOwnProperty(_)&&X!==te&&(X!=null||te!=null))switch(_){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:st(e,t,_,X,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)X=a[Ae],a.hasOwnProperty(Ae)&&X!=null&&!n.hasOwnProperty(Ae)&&st(e,t,Ae,null,n,X);for(Q in n)if(X=n[Q],te=a[Q],n.hasOwnProperty(Q)&&X!==te&&(X!=null||te!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(c(137,t));break;default:st(e,t,Q,X,n,te)}return;default:if(Xs(t)){for(var rt in a)X=a[rt],a.hasOwnProperty(rt)&&X!==void 0&&!n.hasOwnProperty(rt)&&Gd(e,t,rt,void 0,n,X);for(se in n)X=n[se],te=a[se],!n.hasOwnProperty(se)||X===te||X===void 0&&te===void 0||Gd(e,t,se,X,n,te);return}}for(var P in a)X=a[P],a.hasOwnProperty(P)&&X!=null&&!n.hasOwnProperty(P)&&st(e,t,P,null,n,X);for(ce in n)X=n[ce],te=a[ce],!n.hasOwnProperty(ce)||X===te||X==null&&te==null||st(e,t,ce,X,n,te)}function b0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ny(){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],o=u.transferSize,x=u.initiatorType,E=u.duration;if(o&&E&&b0(x)){for(x=0,E=u.responseEnd,n+=1;n<a.length;n++){var _=a[n],Q=_.startTime;if(Q>E)break;var se=_.transferSize,ce=_.initiatorType;se&&b0(ce)&&(_=_.responseEnd,x+=se*(_<E?1:(E-Q)/(_-Q)))}if(--n,t+=8*(o+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,Zd=null;function Ec(e){return e.nodeType===9?e:e.ownerDocument}function S0(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 N0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Wd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Qd=null;function jy(){var e=window.event;return e&&e.type==="popstate"?e===Qd?!1:(Qd=e,!0):(Qd=null,!1)}var j0=typeof setTimeout=="function"?setTimeout:void 0,wy=typeof clearTimeout=="function"?clearTimeout:void 0,w0=typeof Promise=="function"?Promise:void 0,Ey=typeof queueMicrotask=="function"?queueMicrotask:typeof w0<"u"?function(e){return w0.resolve(null).then(e).catch(Ty)}:j0;function Ty(e){setTimeout(function(){throw e})}function Rl(e){return e==="head"}function E0(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),_r(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Ui(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ui(a);for(var o=a.firstChild;o;){var x=o.nextSibling,E=o.nodeName;o[Jl]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=x}}else a==="body"&&Ui(e.ownerDocument.body);a=u}while(a);_r(t)}function T0(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 Id(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":Id(a),Zs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Cy(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[Jl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==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(o=e.getAttribute("src"),(o!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=Ba(e.nextSibling),e===null)break}return null}function My(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ba(e.nextSibling),e===null))return null;return e}function C0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ba(e.nextSibling),e===null))return null;return e}function Xd(e){return e.data==="$?"||e.data==="$~"}function Jd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Oy(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 Ba(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Kd=null;function M0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ba(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function O0(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 R0(e,t,a){switch(t=Ec(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 Ui(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Zs(e)}var Ya=new Map,D0=new Set;function Tc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Wn=re.d;re.d={f:Ry,r:Dy,D:Ay,C:_y,L:ky,m:zy,X:Ly,S:Uy,M:Hy};function Ry(){var e=Wn.f(),t=pc();return e||t}function Dy(e){var t=Me(e);t!==null&&t.tag===5&&t.type==="form"?Wh(t):Wn.r(e)}var Rr=typeof document>"u"?null:document;function A0(e,t,a){var n=Rr;if(n&&typeof t=="string"&&t){var u=Zt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),D0.has(u)||(D0.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),Jt(t,"link",e),Rt(t),n.head.appendChild(t)))}}function Ay(e){Wn.D(e),A0("dns-prefetch",e,null)}function _y(e,t){Wn.C(e,t),A0("preconnect",e,t)}function ky(e,t,a){Wn.L(e,t,a);var n=Rr;if(n&&e&&t){var u='link[rel="preload"][as="'+Zt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Zt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Zt(a.imageSizes)+'"]')):u+='[href="'+Zt(e)+'"]';var o=u;switch(t){case"style":o=Dr(e);break;case"script":o=Ar(e)}Ya.has(o)||(e=C({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ya.set(o,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Li(o))||t==="script"&&n.querySelector(Hi(o))||(t=n.createElement("link"),Jt(t,"link",e),Rt(t),n.head.appendChild(t)))}}function zy(e,t){Wn.m(e,t);var a=Rr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Zt(n)+'"][href="'+Zt(e)+'"]',o=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Ar(e)}if(!Ya.has(o)&&(e=C({rel:"modulepreload",href:e},t),Ya.set(o,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Hi(o)))return}n=a.createElement("link"),Jt(n,"link",e),Rt(n),a.head.appendChild(n)}}}function Uy(e,t,a){Wn.S(e,t,a);var n=Rr;if(n&&e){var u=Qa(n).hoistableStyles,o=Dr(e);t=t||"default";var x=u.get(o);if(!x){var E={loading:0,preload:null};if(x=n.querySelector(Li(o)))E.loading=5;else{e=C({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ya.get(o))&&ef(e,a);var _=x=n.createElement("link");Rt(_),Jt(_,"link",e),_._p=new Promise(function(Q,se){_.onload=Q,_.onerror=se}),_.addEventListener("load",function(){E.loading|=1}),_.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Cc(x,t,n)}x={type:"stylesheet",instance:x,count:1,state:E},u.set(o,x)}}}function Ly(e,t){Wn.X(e,t);var a=Rr;if(a&&e){var n=Qa(a).hoistableScripts,u=Ar(e),o=n.get(u);o||(o=a.querySelector(Hi(u)),o||(e=C({src:e,async:!0},t),(t=Ya.get(u))&&tf(e,t),o=a.createElement("script"),Rt(o),Jt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(u,o))}}function Hy(e,t){Wn.M(e,t);var a=Rr;if(a&&e){var n=Qa(a).hoistableScripts,u=Ar(e),o=n.get(u);o||(o=a.querySelector(Hi(u)),o||(e=C({src:e,async:!0,type:"module"},t),(t=Ya.get(u))&&tf(e,t),o=a.createElement("script"),Rt(o),Jt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(u,o))}}function _0(e,t,a,n){var u=(u=de.current)?Tc(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=Dr(a.href),a=Qa(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=Dr(a.href);var o=Qa(u).hoistableStyles,x=o.get(e);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,x),(o=u.querySelector(Li(e)))&&!o._p&&(x.instance=o,x.state.loading=5),Ya.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},Ya.set(e,a),o||qy(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=Ar(a),a=Qa(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 Dr(e){return'href="'+Zt(e)+'"'}function Li(e){return'link[rel="stylesheet"]['+e+"]"}function k0(e){return C({},e,{"data-precedence":e.precedence,precedence:null})}function qy(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}),Jt(t,"link",a),Rt(t),e.head.appendChild(t))}function Ar(e){return'[src="'+Zt(e)+'"]'}function Hi(e){return"script[async]"+e}function z0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Zt(a.href)+'"]');if(n)return t.instance=n,Rt(n),n;var u=C({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Rt(n),Jt(n,"style",u),Cc(n,a.precedence,e),t.instance=n;case"stylesheet":u=Dr(a.href);var o=e.querySelector(Li(u));if(o)return t.state.loading|=4,t.instance=o,Rt(o),o;n=k0(a),(u=Ya.get(u))&&ef(n,u),o=(e.ownerDocument||e).createElement("link"),Rt(o);var x=o;return x._p=new Promise(function(E,_){x.onload=E,x.onerror=_}),Jt(o,"link",n),t.state.loading|=4,Cc(o,a.precedence,e),t.instance=o;case"script":return o=Ar(a.src),(u=e.querySelector(Hi(o)))?(t.instance=u,Rt(u),u):(n=a,(u=Ya.get(o))&&(n=C({},a),tf(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),Rt(u),Jt(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,Cc(n,a.precedence,e));return t.instance}function Cc(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,o=u,x=0;x<n.length;x++){var E=n[x];if(E.dataset.precedence===t)o=E;else if(o!==u)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function ef(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function tf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Mc=null;function U0(e,t,a){if(Mc===null){var n=new Map,u=Mc=new Map;u.set(a,n)}else u=Mc,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 o=a[u];if(!(o[Jl]||o[Nt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var x=o.getAttribute(t)||"";x=e+x;var E=n.get(x);E?E.push(o):n.set(x,[o])}}return n}function L0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Vy(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 H0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function By(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=Dr(n.href),o=t.querySelector(Li(u));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Oc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,Rt(o);return}o=t.ownerDocument||t,n=k0(n),(u=Ya.get(u))&&ef(n,u),o=o.createElement("link"),Rt(o);var x=o;x._p=new Promise(function(E,_){x.onload=E,x.onerror=_}),Jt(o,"link",n),a.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Oc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var af=0;function Yy(e,t){return e.stylesheets&&e.count===0&&Dc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Dc(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&af===0&&(af=62500*Ny());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Dc(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>af?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function Oc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Dc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rc=null;function Dc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rc=new Map,t.forEach($y,e),Rc=null,Oc.call(e))}function $y(e,t){if(!(t.state.loading&4)){var a=Rc.get(e);if(a)var n=a.get(null);else{a=new Map,Rc.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<u.length;o++){var x=u[o];(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"),o=a.get(x)||n,o===n&&a.set(null,u),a.set(x,u),this.count++,n=Oc.bind(this),u.addEventListener("load",n),u.addEventListener("error",n),o?o.parentNode.insertBefore(u,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var qi={$$typeof:K,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function Py(e,t,a,n,u,o,x,E,_){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=Ps(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ps(0),this.hiddenUpdates=Ps(null),this.identifierPrefix=n,this.onUncaughtError=u,this.onCaughtError=o,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function q0(e,t,a,n,u,o,x,E,_,Q,se,ce){return e=new Py(e,t,a,x,_,Q,se,ce,E),t=1,o===!0&&(t|=24),o=Qt(3,null,null,t),e.current=o,o.stateNode=e,t=zo(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:n,isDehydrated:a,cache:t},qo(o),e}function V0(e){return e?(e=Na,e):Na}function B0(e,t,a,n,u,o){u=V0(u),n.context===null?n.context=u:n.pendingContext=u,n=vl(t),n.payload={element:a},o=o===void 0?null:o,o!==null&&(n.callback=o),a=bl(e,n,t),a!==null&&(pa(a,e,t),pi(a,e,t))}function Y0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function nf(e,t){Y0(e,t),(e=e.alternate)&&Y0(e,t)}function $0(e){if(e.tag===13||e.tag===31){var t=ka(e,67108864);t!==null&&pa(t,e,67108864),nf(e,67108864)}}function P0(e){if(e.tag===13||e.tag===31){var t=Ca();t=Gs(t);var a=ka(e,t);a!==null&&pa(a,e,t),nf(e,t)}}var Ac=!0;function Gy(e,t,a,n){var u=B.T;B.T=null;var o=re.p;try{re.p=2,lf(e,t,a,n)}finally{re.p=o,B.T=u}}function Fy(e,t,a,n){var u=B.T;B.T=null;var o=re.p;try{re.p=8,lf(e,t,a,n)}finally{re.p=o,B.T=u}}function lf(e,t,a,n){if(Ac){var u=sf(n);if(u===null)Pd(e,t,n,_c,a),F0(e,n);else if(Wy(u,e,t,a,n))n.stopPropagation();else if(F0(e,n),t&4&&-1<Zy.indexOf(e)){for(;u!==null;){var o=Me(u);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var x=on(o.pendingLanes);if(x!==0){var E=o;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var _=1<<31-Gt(x);E.entanglements[1]|=_,x&=~_}vn(o),(Je&6)===0&&(gc=St()+500,_i(0))}}break;case 31:case 13:E=ka(o,2),E!==null&&pa(E,o,2),pc(),nf(o,2)}if(o=sf(n),o===null&&Pd(e,t,n,_c,a),o===u)break;u=o}u!==null&&n.stopPropagation()}else Pd(e,t,n,null,a)}}function sf(e){return e=Js(e),rf(e)}var _c=null;function rf(e){if(_c=null,e=Cn(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=b(t),e!==null)return e;e=null}else if(a===31){if(e=N(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _c=e,null}function G0(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(wn()){case Wl:return 2;case Ql:return 8;case En:case Ys:return 32;case Kn:return 268435456;default:return 32}default:return 32}}var uf=!1,Dl=null,Al=null,_l=null,Vi=new Map,Bi=new Map,kl=[],Zy="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function F0(e,t){switch(e){case"focusin":case"focusout":Dl=null;break;case"dragenter":case"dragleave":Al=null;break;case"mouseover":case"mouseout":_l=null;break;case"pointerover":case"pointerout":Vi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bi.delete(t.pointerId)}}function Yi(e,t,a,n,u,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:o,targetContainers:[u]},t!==null&&(t=Me(t),t!==null&&$0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Wy(e,t,a,n,u){switch(t){case"focusin":return Dl=Yi(Dl,e,t,a,n,u),!0;case"dragenter":return Al=Yi(Al,e,t,a,n,u),!0;case"mouseover":return _l=Yi(_l,e,t,a,n,u),!0;case"pointerover":var o=u.pointerId;return Vi.set(o,Yi(Vi.get(o)||null,e,t,a,n,u)),!0;case"gotpointercapture":return o=u.pointerId,Bi.set(o,Yi(Bi.get(o)||null,e,t,a,n,u)),!0}return!1}function Z0(e){var t=Cn(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=b(a),t!==null){e.blockedOn=t,Pr(e.priority,function(){P0(a)});return}}else if(t===31){if(t=N(a),t!==null){e.blockedOn=t,Pr(e.priority,function(){P0(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 kc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=sf(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Qr=n,a.target.dispatchEvent(n),Qr=null}else return t=Me(a),t!==null&&$0(t),e.blockedOn=a,!1;t.shift()}return!0}function W0(e,t,a){kc(e)&&a.delete(t)}function Qy(){uf=!1,Dl!==null&&kc(Dl)&&(Dl=null),Al!==null&&kc(Al)&&(Al=null),_l!==null&&kc(_l)&&(_l=null),Vi.forEach(W0),Bi.forEach(W0)}function zc(e,t){e.blockedOn===t&&(e.blockedOn=null,uf||(uf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Qy)))}var Uc=null;function Q0(e){Uc!==e&&(Uc=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Uc===e&&(Uc=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],u=e[t+2];if(typeof n!="function"){if(rf(n||a)===null)continue;break}var o=Me(a);o!==null&&(e.splice(t,3),t-=3,sd(o,{pending:!0,data:u,method:a.method,action:n},n,u))}}))}function _r(e){function t(_){return zc(_,e)}Dl!==null&&zc(Dl,e),Al!==null&&zc(Al,e),_l!==null&&zc(_l,e),Vi.forEach(t),Bi.forEach(t);for(var a=0;a<kl.length;a++){var n=kl[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<kl.length&&(a=kl[0],a.blockedOn===null);)Z0(a),a.blockedOn===null&&kl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var u=a[n],o=a[n+1],x=u[Ut]||null;if(typeof o=="function")x||Q0(a);else if(x){var E=null;if(o&&o.hasAttribute("formAction")){if(u=o,x=o[Ut]||null)E=x.formAction;else if(rf(u)!==null)continue}else E=x.action;typeof E=="function"?a[n+1]=E:(a.splice(n,3),n-=3),Q0(a)}}}function I0(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.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 o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function cf(e){this._internalRoot=e}Lc.prototype.render=cf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=Ca();B0(a,n,e,t,null,null)},Lc.prototype.unmount=cf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;B0(e.current,2,null,e,null,null),pc(),t[Tn]=null}};function Lc(e){this._internalRoot=e}Lc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<kl.length&&t!==0&&t<kl[a].priority;a++);kl.splice(a,0,e),a===0&&Z0(e)}};var X0=r.version;if(X0!=="19.2.4")throw Error(c(527,X0,"19.2.4"));re.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=p(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Iy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hc.isDisabled&&Hc.supportsFiber)try{ot=Hc.inject(Iy),zt=Hc}catch{}}return Pi.createRoot=function(e,t){if(!f(e))throw Error(c(299));var a=!1,n="",u=lm,o=sm,x=rm;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&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=q0(e,1,!1,null,null,a,n,null,u,o,x,I0),e[Tn]=t.current,$d(e),new cf(t)},Pi.hydrateRoot=function(e,t,a){if(!f(e))throw Error(c(299));var n=!1,u="",o=lm,x=sm,E=rm,_=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(_=a.formState)),t=q0(e,1,!0,t,a??null,n,u,_,o,x,E,I0),t.context=V0(null),a=t.current,n=Ca(),n=Gs(n),u=vl(n),u.callback=null,bl(a,u,n),a=n,t.current.lanes=a,al(t,a),vn(t),e[Tn]=t.current,$d(e),new Lc(t)},Pi.version="19.2.4",Pi}var cg;function uv(){if(cg)return hf.exports;cg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),hf.exports=iv(),hf.exports}var cv=uv();const ov=Hf(cv);/**
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 og="popstate";function dv(l={}){function r(f,h){let{pathname:b="/",search:N="",hash:v=""}=qs(f.location.hash.substring(1));return!b.startsWith("/")&&!b.startsWith(".")&&(b="/"+b),Cf("",{pathname:b,search:N,hash:v},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function d(f,h){let b=f.document.querySelector("base"),N="";if(b&&b.getAttribute("href")){let v=f.location.href,p=v.indexOf("#");N=p===-1?v:v.slice(0,p)}return N+"#"+(typeof h=="string"?h:ru(h))}function c(f,h){Ga(f.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(h)})`)}return hv(r,d,c,l)}function pt(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function Ga(l,r){if(!l){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function fv(){return Math.random().toString(36).substring(2,10)}function dg(l,r){return{usr:l.state,key:l.key,idx:r}}function Cf(l,r,d=null,c){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?qs(r):r,state:d,key:r&&r.key||c||fv()}}function ru({pathname:l="/",search:r="",hash:d=""}){return r&&r!=="?"&&(l+=r.charAt(0)==="?"?r:"?"+r),d&&d!=="#"&&(l+=d.charAt(0)==="#"?d:"#"+d),l}function qs(l){let r={};if(l){let d=l.indexOf("#");d>=0&&(r.hash=l.substring(d),l=l.substring(0,d));let c=l.indexOf("?");c>=0&&(r.search=l.substring(c),l=l.substring(0,c)),l&&(r.pathname=l)}return r}function hv(l,r,d,c={}){let{window:f=document.defaultView,v5Compat:h=!1}=c,b=f.history,N="POP",v=null,p=S();p==null&&(p=0,b.replaceState({...b.state,idx:p},""));function S(){return(b.state||{idx:null}).idx}function C(){N="POP";let R=S(),Z=R==null?null:R-p;p=R,v&&v({action:N,location:M.location,delta:Z})}function j(R,Z){N="PUSH";let T=Cf(M.location,R,Z);d&&d(T,R),p=S()+1;let K=dg(T,p),I=M.createHref(T);try{b.pushState(K,"",I)}catch(oe){if(oe instanceof DOMException&&oe.name==="DataCloneError")throw oe;f.location.assign(I)}h&&v&&v({action:N,location:M.location,delta:1})}function D(R,Z){N="REPLACE";let T=Cf(M.location,R,Z);d&&d(T,R),p=S();let K=dg(T,p),I=M.createHref(T);b.replaceState(K,"",I),h&&v&&v({action:N,location:M.location,delta:0})}function O(R){return mv(R)}let M={get action(){return N},get location(){return l(f,b)},listen(R){if(v)throw new Error("A history only accepts one active listener");return f.addEventListener(og,C),v=R,()=>{f.removeEventListener(og,C),v=null}},createHref(R){return r(f,R)},createURL:O,encodeLocation(R){let Z=O(R);return{pathname:Z.pathname,search:Z.search,hash:Z.hash}},push:j,replace:D,go(R){return b.go(R)}};return M}function mv(l,r=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),pt(d,"No window.location.(origin|href) available to create URL");let c=typeof l=="string"?l:ru(l);return c=c.replace(/ $/,"%20"),!r&&c.startsWith("//")&&(c=d+c),new URL(c,d)}function xx(l,r,d="/"){return gv(l,r,d,!1)}function gv(l,r,d,c){let f=typeof r=="string"?qs(r):r,h=Jn(f.pathname||"/",d);if(h==null)return null;let b=px(l);xv(b);let N=null;for(let v=0;N==null&&v<b.length;++v){let p=Cv(h);N=Ev(b[v],p,c)}return N}function px(l,r=[],d=[],c="",f=!1){let h=(b,N,v=f,p)=>{let S={relativePath:p===void 0?b.path||"":p,caseSensitive:b.caseSensitive===!0,childrenIndex:N,route:b};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(c)&&v)return;pt(S.relativePath.startsWith(c),`Absolute route path "${S.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(c.length)}let C=Xn([c,S.relativePath]),j=d.concat(S);b.children&&b.children.length>0&&(pt(b.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${C}".`),px(b.children,r,j,C,v)),!(b.path==null&&!b.index)&&r.push({path:C,score:jv(C,b.index),routesMeta:j})};return l.forEach((b,N)=>{var v;if(b.path===""||!((v=b.path)!=null&&v.includes("?")))h(b,N);else for(let p of yx(b.path))h(b,N,!0,p)}),r}function yx(l){let r=l.split("/");if(r.length===0)return[];let[d,...c]=r,f=d.endsWith("?"),h=d.replace(/\?$/,"");if(c.length===0)return f?[h,""]:[h];let b=yx(c.join("/")),N=[];return N.push(...b.map(v=>v===""?h:[h,v].join("/"))),f&&N.push(...b),N.map(v=>l.startsWith("/")&&v===""?"/":v)}function xv(l){l.sort((r,d)=>r.score!==d.score?d.score-r.score:wv(r.routesMeta.map(c=>c.childrenIndex),d.routesMeta.map(c=>c.childrenIndex)))}var pv=/^:[\w-]+$/,yv=3,vv=2,bv=1,Sv=10,Nv=-2,fg=l=>l==="*";function jv(l,r){let d=l.split("/"),c=d.length;return d.some(fg)&&(c+=Nv),r&&(c+=vv),d.filter(f=>!fg(f)).reduce((f,h)=>f+(pv.test(h)?yv:h===""?bv:Sv),c)}function wv(l,r){return l.length===r.length&&l.slice(0,-1).every((c,f)=>c===r[f])?l[l.length-1]-r[r.length-1]:0}function Ev(l,r,d=!1){let{routesMeta:c}=l,f={},h="/",b=[];for(let N=0;N<c.length;++N){let v=c[N],p=N===c.length-1,S=h==="/"?r:r.slice(h.length)||"/",C=Zc({path:v.relativePath,caseSensitive:v.caseSensitive,end:p},S),j=v.route;if(!C&&p&&d&&!c[c.length-1].route.index&&(C=Zc({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},S)),!C)return null;Object.assign(f,C.params),b.push({params:f,pathname:Xn([h,C.pathname]),pathnameBase:Dv(Xn([h,C.pathnameBase])),route:j}),C.pathnameBase!=="/"&&(h=Xn([h,C.pathnameBase]))}return b}function Zc(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[d,c]=Tv(l.path,l.caseSensitive,l.end),f=r.match(d);if(!f)return null;let h=f[0],b=h.replace(/(.)\/+$/,"$1"),N=f.slice(1);return{params:c.reduce((p,{paramName:S,isOptional:C},j)=>{if(S==="*"){let O=N[j]||"";b=h.slice(0,h.length-O.length).replace(/(.)\/+$/,"$1")}const D=N[j];return C&&!D?p[S]=void 0:p[S]=(D||"").replace(/%2F/g,"/"),p},{}),pathname:h,pathnameBase:b,pattern:l}}function Tv(l,r=!1,d=!0){Ga(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=[],f="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(b,N,v)=>(c.push({paramName:N,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(c.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),c]}function Cv(l){try{return l.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Ga(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),l}}function Jn(l,r){if(r==="/")return l;if(!l.toLowerCase().startsWith(r.toLowerCase()))return null;let d=r.endsWith("/")?r.length-1:r.length,c=l.charAt(d);return c&&c!=="/"?null:l.slice(d)||"/"}var Mv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Ov(l,r="/"){let{pathname:d,search:c="",hash:f=""}=typeof l=="string"?qs(l):l,h;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?h=hg(d.substring(1),"/"):h=hg(d,r)):h=r,{pathname:h,search:Av(c),hash:_v(f)}}function hg(l,r){let d=r.replace(/\/+$/,"").split("/");return l.split("/").forEach(f=>{f===".."?d.length>1&&d.pop():f!=="."&&d.push(f)}),d.length>1?d.join("/"):"/"}function pf(l,r,d,c){return`Cannot include a '${l}' character in a manually specified \`to.${r}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Rv(l){return l.filter((r,d)=>d===0||r.route.path&&r.route.path.length>0)}function Vf(l){let r=Rv(l);return r.map((d,c)=>c===r.length-1?d.pathname:d.pathnameBase)}function Bf(l,r,d,c=!1){let f;typeof l=="string"?f=qs(l):(f={...l},pt(!f.pathname||!f.pathname.includes("?"),pf("?","pathname","search",f)),pt(!f.pathname||!f.pathname.includes("#"),pf("#","pathname","hash",f)),pt(!f.search||!f.search.includes("#"),pf("#","search","hash",f)));let h=l===""||f.pathname==="",b=h?"/":f.pathname,N;if(b==null)N=d;else{let C=r.length-1;if(!c&&b.startsWith("..")){let j=b.split("/");for(;j[0]==="..";)j.shift(),C-=1;f.pathname=j.join("/")}N=C>=0?r[C]:"/"}let v=Ov(f,N),p=b&&b!=="/"&&b.endsWith("/"),S=(h||b===".")&&d.endsWith("/");return!v.pathname.endsWith("/")&&(p||S)&&(v.pathname+="/"),v}var Xn=l=>l.join("/").replace(/\/\/+/g,"/"),Dv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Av=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,_v=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,kv=class{constructor(l,r,d,c=!1){this.status=l,this.statusText=r||"",this.internal=c,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function zv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Uv(l){return l.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var vx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function bx(l,r){let d=l;if(typeof d!="string"||!Mv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let c=d,f=!1;if(vx)try{let h=new URL(window.location.href),b=d.startsWith("//")?new URL(h.protocol+d):new URL(d),N=Jn(b.pathname,r);b.origin===h.origin&&N!=null?d=N+b.search+b.hash:f=!0}catch{Ga(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:f,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Sx=["POST","PUT","PATCH","DELETE"];new Set(Sx);var Lv=["GET",...Sx];new Set(Lv);var Hr=H.createContext(null);Hr.displayName="DataRouter";var Kc=H.createContext(null);Kc.displayName="DataRouterState";var Hv=H.createContext(!1),Nx=H.createContext({isTransitioning:!1});Nx.displayName="ViewTransition";var qv=H.createContext(new Map);qv.displayName="Fetchers";var Vv=H.createContext(null);Vv.displayName="Await";var Ra=H.createContext(null);Ra.displayName="Navigation";var uu=H.createContext(null);uu.displayName="Location";var Sn=H.createContext({outlet:null,matches:[],isDataRoute:!1});Sn.displayName="Route";var Yf=H.createContext(null);Yf.displayName="RouteError";var jx="REACT_ROUTER_ERROR",Bv="REDIRECT",Yv="ROUTE_ERROR_RESPONSE";function $v(l){if(l.startsWith(`${jx}:${Bv}:{`))try{let r=JSON.parse(l.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function Pv(l){if(l.startsWith(`${jx}:${Yv}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new kv(r.status,r.statusText,r.data)}catch{}}function Gv(l,{relative:r}={}){pt(qr(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:c}=H.useContext(Ra),{hash:f,pathname:h,search:b}=cu(l,{relative:r}),N=h;return d!=="/"&&(N=h==="/"?d:Xn([d,h])),c.createHref({pathname:N,search:b,hash:f})}function qr(){return H.useContext(uu)!=null}function $l(){return pt(qr(),"useLocation() may be used only in the context of a <Router> component."),H.useContext(uu).location}var wx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ex(l){H.useContext(Ra).static||H.useLayoutEffect(l)}function eo(){let{isDataRoute:l}=H.useContext(Sn);return l?lb():Fv()}function Fv(){pt(qr(),"useNavigate() may be used only in the context of a <Router> component.");let l=H.useContext(Hr),{basename:r,navigator:d}=H.useContext(Ra),{matches:c}=H.useContext(Sn),{pathname:f}=$l(),h=JSON.stringify(Vf(c)),b=H.useRef(!1);return Ex(()=>{b.current=!0}),H.useCallback((v,p={})=>{if(Ga(b.current,wx),!b.current)return;if(typeof v=="number"){d.go(v);return}let S=Bf(v,JSON.parse(h),f,p.relative==="path");l==null&&r!=="/"&&(S.pathname=S.pathname==="/"?r:Xn([r,S.pathname])),(p.replace?d.replace:d.push)(S,p.state,p)},[r,d,h,f,l])}H.createContext(null);function cu(l,{relative:r}={}){let{matches:d}=H.useContext(Sn),{pathname:c}=$l(),f=JSON.stringify(Vf(d));return H.useMemo(()=>Bf(l,JSON.parse(f),c,r==="path"),[l,f,c,r])}function Zv(l,r){return Tx(l,r)}function Tx(l,r,d,c,f){var T;pt(qr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:h}=H.useContext(Ra),{matches:b}=H.useContext(Sn),N=b[b.length-1],v=N?N.params:{},p=N?N.pathname:"/",S=N?N.pathnameBase:"/",C=N&&N.route;{let K=C&&C.path||"";Mx(p,!C||K.endsWith("*")||K.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${K}">) 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="${K}"> to <Route path="${K==="/"?"*":`${K}/*`}">.`)}let j=$l(),D;if(r){let K=typeof r=="string"?qs(r):r;pt(S==="/"||((T=K.pathname)==null?void 0:T.startsWith(S)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${S}" but pathname "${K.pathname}" was given in the \`location\` prop.`),D=K}else D=j;let O=D.pathname||"/",M=O;if(S!=="/"){let K=S.replace(/^\//,"").split("/");M="/"+O.replace(/^\//,"").split("/").slice(K.length).join("/")}let R=xx(l,{pathname:M});Ga(C||R!=null,`No routes matched location "${D.pathname}${D.search}${D.hash}" `),Ga(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${D.pathname}${D.search}${D.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let Z=Jv(R&&R.map(K=>Object.assign({},K,{params:Object.assign({},v,K.params),pathname:Xn([S,h.encodeLocation?h.encodeLocation(K.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:K.pathname]),pathnameBase:K.pathnameBase==="/"?S:Xn([S,h.encodeLocation?h.encodeLocation(K.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:K.pathnameBase])})),b,d,c,f);return r&&Z?H.createElement(uu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},Z):Z}function Wv(){let l=nb(),r=zv(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),d=l instanceof Error?l.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},h={padding:"2px 4px",backgroundColor:c},b=null;return console.error("Error handled by React Router default ErrorBoundary:",l),b=H.createElement(H.Fragment,null,H.createElement("p",null,"💿 Hey developer 👋"),H.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",H.createElement("code",{style:h},"ErrorBoundary")," or"," ",H.createElement("code",{style:h},"errorElement")," prop on your route.")),H.createElement(H.Fragment,null,H.createElement("h2",null,"Unexpected Application Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},r),d?H.createElement("pre",{style:f},d):null,b)}var Qv=H.createElement(Wv,null),Cx=class extends H.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,r){return r.location!==l.location||r.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:r.error,location:r.location,revalidation:l.revalidation||r.revalidation}}componentDidCatch(l,r){this.props.onError?this.props.onError(l,r):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const d=Pv(l.digest);d&&(l=d)}let r=l!==void 0?H.createElement(Sn.Provider,{value:this.props.routeContext},H.createElement(Yf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?H.createElement(Iv,{error:l},r):r}};Cx.contextType=Hv;var yf=new WeakMap;function Iv({children:l,error:r}){let{basename:d}=H.useContext(Ra);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let c=$v(r.digest);if(c){let f=yf.get(r);if(f)throw f;let h=bx(c.location,d);if(vx&&!yf.get(r))if(h.isExternal||c.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:c.replace}));throw yf.set(r,b),b}return H.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return l}function Xv({routeContext:l,match:r,children:d}){let c=H.useContext(Hr);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),H.createElement(Sn.Provider,{value:l},d)}function Jv(l,r=[],d=null,c=null,f=null){if(l==null){if(!d)return null;if(d.errors)l=d.matches;else if(r.length===0&&!d.initialized&&d.matches.length>0)l=d.matches;else return null}let h=l,b=d==null?void 0:d.errors;if(b!=null){let S=h.findIndex(C=>C.route.id&&(b==null?void 0:b[C.route.id])!==void 0);pt(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(b).join(",")}`),h=h.slice(0,Math.min(h.length,S+1))}let N=!1,v=-1;if(d)for(let S=0;S<h.length;S++){let C=h[S];if((C.route.HydrateFallback||C.route.hydrateFallbackElement)&&(v=S),C.route.id){let{loaderData:j,errors:D}=d,O=C.route.loader&&!j.hasOwnProperty(C.route.id)&&(!D||D[C.route.id]===void 0);if(C.route.lazy||O){N=!0,v>=0?h=h.slice(0,v+1):h=[h[0]];break}}}let p=d&&c?(S,C)=>{var j,D;c(S,{location:d.location,params:((D=(j=d.matches)==null?void 0:j[0])==null?void 0:D.params)??{},unstable_pattern:Uv(d.matches),errorInfo:C})}:void 0;return h.reduceRight((S,C,j)=>{let D,O=!1,M=null,R=null;d&&(D=b&&C.route.id?b[C.route.id]:void 0,M=C.route.errorElement||Qv,N&&(v<0&&j===0?(Mx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),O=!0,R=null):v===j&&(O=!0,R=C.route.hydrateFallbackElement||null)));let Z=r.concat(h.slice(0,j+1)),T=()=>{let K;return D?K=M:O?K=R:C.route.Component?K=H.createElement(C.route.Component,null):C.route.element?K=C.route.element:K=S,H.createElement(Xv,{match:C,routeContext:{outlet:S,matches:Z,isDataRoute:d!=null},children:K})};return d&&(C.route.ErrorBoundary||C.route.errorElement||j===0)?H.createElement(Cx,{location:d.location,revalidation:d.revalidation,component:M,error:D,children:T(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:p}):T()},null)}function $f(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kv(l){let r=H.useContext(Hr);return pt(r,$f(l)),r}function eb(l){let r=H.useContext(Kc);return pt(r,$f(l)),r}function tb(l){let r=H.useContext(Sn);return pt(r,$f(l)),r}function Pf(l){let r=tb(l),d=r.matches[r.matches.length-1];return pt(d.route.id,`${l} can only be used on routes that contain a unique "id"`),d.route.id}function ab(){return Pf("useRouteId")}function nb(){var c;let l=H.useContext(Yf),r=eb("useRouteError"),d=Pf("useRouteError");return l!==void 0?l:(c=r.errors)==null?void 0:c[d]}function lb(){let{router:l}=Kv("useNavigate"),r=Pf("useNavigate"),d=H.useRef(!1);return Ex(()=>{d.current=!0}),H.useCallback(async(f,h={})=>{Ga(d.current,wx),d.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:r,...h}))},[l,r])}var mg={};function Mx(l,r,d){!r&&!mg[l]&&(mg[l]=!0,Ga(!1,d))}H.memo(sb);function sb({routes:l,future:r,state:d,onError:c}){return Tx(l,void 0,d,c,r)}function rb({to:l,replace:r,state:d,relative:c}){pt(qr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=H.useContext(Ra);Ga(!f,"<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:h}=H.useContext(Sn),{pathname:b}=$l(),N=eo(),v=Bf(l,Vf(h),b,c==="path"),p=JSON.stringify(v);return H.useEffect(()=>{N(JSON.parse(p),{replace:r,state:d,relative:c})},[N,p,c,r,d]),null}function In(l){pt(!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 ib({basename:l="/",children:r=null,location:d,navigationType:c="POP",navigator:f,static:h=!1,unstable_useTransitions:b}){pt(!qr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let N=l.replace(/^\/*/,"/"),v=H.useMemo(()=>({basename:N,navigator:f,static:h,unstable_useTransitions:b,future:{}}),[N,f,h,b]);typeof d=="string"&&(d=qs(d));let{pathname:p="/",search:S="",hash:C="",state:j=null,key:D="default"}=d,O=H.useMemo(()=>{let M=Jn(p,N);return M==null?null:{location:{pathname:M,search:S,hash:C,state:j,key:D},navigationType:c}},[N,p,S,C,j,D,c]);return Ga(O!=null,`<Router basename="${N}"> is not able to match the URL "${p}${S}${C}" because it does not start with the basename, so the <Router> won't render anything.`),O==null?null:H.createElement(Ra.Provider,{value:v},H.createElement(uu.Provider,{children:r,value:O}))}function ub({children:l,location:r}){return Zv(Mf(l),r)}function Mf(l,r=[]){let d=[];return H.Children.forEach(l,(c,f)=>{if(!H.isValidElement(c))return;let h=[...r,f];if(c.type===H.Fragment){d.push.apply(d,Mf(c.props.children,h));return}pt(c.type===In,`[${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>`),pt(!c.props.index||!c.props.children,"An index route cannot have child routes.");let b={id:c.props.id||h.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&&(b.children=Mf(c.props.children,h)),d.push(b)}),d}var Gc="get",Fc="application/x-www-form-urlencoded";function to(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function cb(l){return to(l)&&l.tagName.toLowerCase()==="button"}function ob(l){return to(l)&&l.tagName.toLowerCase()==="form"}function db(l){return to(l)&&l.tagName.toLowerCase()==="input"}function fb(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function hb(l,r){return l.button===0&&(!r||r==="_self")&&!fb(l)}var qc=null;function mb(){if(qc===null)try{new FormData(document.createElement("form"),0),qc=!1}catch{qc=!0}return qc}var gb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vf(l){return l!=null&&!gb.has(l)?(Ga(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Fc}"`),null):l}function xb(l,r){let d,c,f,h,b;if(ob(l)){let N=l.getAttribute("action");c=N?Jn(N,r):null,d=l.getAttribute("method")||Gc,f=vf(l.getAttribute("enctype"))||Fc,h=new FormData(l)}else if(cb(l)||db(l)&&(l.type==="submit"||l.type==="image")){let N=l.form;if(N==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=l.getAttribute("formaction")||N.getAttribute("action");if(c=v?Jn(v,r):null,d=l.getAttribute("formmethod")||N.getAttribute("method")||Gc,f=vf(l.getAttribute("formenctype"))||vf(N.getAttribute("enctype"))||Fc,h=new FormData(N,l),!mb()){let{name:p,type:S,value:C}=l;if(S==="image"){let j=p?`${p}.`:"";h.append(`${j}x`,"0"),h.append(`${j}y`,"0")}else p&&h.append(p,C)}}else{if(to(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Gc,c=null,f=Fc,b=l}return h&&f==="text/plain"&&(b=h,h=void 0),{action:c,method:d.toLowerCase(),encType:f,formData:h,body:b}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Gf(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function pb(l,r,d,c){let f=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return d?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${c}`:f.pathname=`${f.pathname}.${c}`:f.pathname==="/"?f.pathname=`_root.${c}`:r&&Jn(f.pathname,r)==="/"?f.pathname=`${r.replace(/\/$/,"")}/_root.${c}`:f.pathname=`${f.pathname.replace(/\/$/,"")}.${c}`,f}async function yb(l,r){if(l.id in r)return r[l.id];try{let d=await import(l.module);return r[l.id]=d,d}catch(d){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function vb(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 bb(l,r,d){let c=await Promise.all(l.map(async f=>{let h=r.routes[f.route.id];if(h){let b=await yb(h,d);return b.links?b.links():[]}return[]}));return wb(c.flat(1).filter(vb).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function gg(l,r,d,c,f,h){let b=(v,p)=>d[p]?v.route.id!==d[p].route.id:!0,N=(v,p)=>{var S;return d[p].pathname!==v.pathname||((S=d[p].route.path)==null?void 0:S.endsWith("*"))&&d[p].params["*"]!==v.params["*"]};return h==="assets"?r.filter((v,p)=>b(v,p)||N(v,p)):h==="data"?r.filter((v,p)=>{var C;let S=c.routes[v.route.id];if(!S||!S.hasLoader)return!1;if(b(v,p)||N(v,p))return!0;if(v.route.shouldRevalidate){let j=v.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((C=d[0])==null?void 0:C.params)||{},nextUrl:new URL(l,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof j=="boolean")return j}return!0}):[]}function Sb(l,r,{includeHydrateFallback:d}={}){return Nb(l.map(c=>{let f=r.routes[c.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),d&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function Nb(l){return[...new Set(l)]}function jb(l){let r={},d=Object.keys(l).sort();for(let c of d)r[c]=l[c];return r}function wb(l,r){let d=new Set;return new Set(r),l.reduce((c,f)=>{let h=JSON.stringify(jb(f));return d.has(h)||(d.add(h),c.push({key:h,link:f})),c},[])}function Ox(){let l=H.useContext(Hr);return Gf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function Eb(){let l=H.useContext(Kc);return Gf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Ff=H.createContext(void 0);Ff.displayName="FrameworkContext";function Rx(){let l=H.useContext(Ff);return Gf(l,"You must render this element inside a <HydratedRouter> element"),l}function Tb(l,r){let d=H.useContext(Ff),[c,f]=H.useState(!1),[h,b]=H.useState(!1),{onFocus:N,onBlur:v,onMouseEnter:p,onMouseLeave:S,onTouchStart:C}=r,j=H.useRef(null);H.useEffect(()=>{if(l==="render"&&b(!0),l==="viewport"){let M=Z=>{Z.forEach(T=>{b(T.isIntersecting)})},R=new IntersectionObserver(M,{threshold:.5});return j.current&&R.observe(j.current),()=>{R.disconnect()}}},[l]),H.useEffect(()=>{if(c){let M=setTimeout(()=>{b(!0)},100);return()=>{clearTimeout(M)}}},[c]);let D=()=>{f(!0)},O=()=>{f(!1),b(!1)};return d?l!=="intent"?[h,j,{}]:[h,j,{onFocus:Gi(N,D),onBlur:Gi(v,O),onMouseEnter:Gi(p,D),onMouseLeave:Gi(S,O),onTouchStart:Gi(C,D)}]:[!1,j,{}]}function Gi(l,r){return d=>{l&&l(d),d.defaultPrevented||r(d)}}function Cb({page:l,...r}){let{router:d}=Ox(),c=H.useMemo(()=>xx(d.routes,l,d.basename),[d.routes,l,d.basename]);return c?H.createElement(Ob,{page:l,matches:c,...r}):null}function Mb(l){let{manifest:r,routeModules:d}=Rx(),[c,f]=H.useState([]);return H.useEffect(()=>{let h=!1;return bb(l,r,d).then(b=>{h||f(b)}),()=>{h=!0}},[l,r,d]),c}function Ob({page:l,matches:r,...d}){let c=$l(),{future:f,manifest:h,routeModules:b}=Rx(),{basename:N}=Ox(),{loaderData:v,matches:p}=Eb(),S=H.useMemo(()=>gg(l,r,p,h,c,"data"),[l,r,p,h,c]),C=H.useMemo(()=>gg(l,r,p,h,c,"assets"),[l,r,p,h,c]),j=H.useMemo(()=>{if(l===c.pathname+c.search+c.hash)return[];let M=new Set,R=!1;if(r.forEach(T=>{var I;let K=h.routes[T.route.id];!K||!K.hasLoader||(!S.some(oe=>oe.route.id===T.route.id)&&T.route.id in v&&((I=b[T.route.id])!=null&&I.shouldRevalidate)||K.hasClientLoader?R=!0:M.add(T.route.id))}),M.size===0)return[];let Z=pb(l,N,f.unstable_trailingSlashAwareDataRequests,"data");return R&&M.size>0&&Z.searchParams.set("_routes",r.filter(T=>M.has(T.route.id)).map(T=>T.route.id).join(",")),[Z.pathname+Z.search]},[N,f.unstable_trailingSlashAwareDataRequests,v,c,h,S,r,l,b]),D=H.useMemo(()=>Sb(C,h),[C,h]),O=Mb(C);return H.createElement(H.Fragment,null,j.map(M=>H.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...d})),D.map(M=>H.createElement("link",{key:M,rel:"modulepreload",href:M,...d})),O.map(({key:M,link:R})=>H.createElement("link",{key:M,nonce:d.nonce,...R,crossOrigin:R.crossOrigin??d.crossOrigin})))}function Rb(...l){return r=>{l.forEach(d=>{typeof d=="function"?d(r):d!=null&&(d.current=r)})}}var Db=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Db&&(window.__reactRouterVersion="7.13.0")}catch{}function Ab({basename:l,children:r,unstable_useTransitions:d,window:c}){let f=H.useRef();f.current==null&&(f.current=dv({window:c,v5Compat:!0}));let h=f.current,[b,N]=H.useState({action:h.action,location:h.location}),v=H.useCallback(p=>{d===!1?N(p):H.startTransition(()=>N(p))},[d]);return H.useLayoutEffect(()=>h.listen(v),[h,v]),H.createElement(ib,{basename:l,children:r,location:b.location,navigationType:b.action,navigator:h,unstable_useTransitions:d})}var Dx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ax=H.forwardRef(function({onClick:r,discover:d="render",prefetch:c="none",relative:f,reloadDocument:h,replace:b,state:N,target:v,to:p,preventScrollReset:S,viewTransition:C,unstable_defaultShouldRevalidate:j,...D},O){let{basename:M,unstable_useTransitions:R}=H.useContext(Ra),Z=typeof p=="string"&&Dx.test(p),T=bx(p,M);p=T.to;let K=Gv(p,{relative:f}),[I,oe,Y]=Tb(c,D),G=zb(p,{replace:b,state:N,target:v,preventScrollReset:S,relative:f,viewTransition:C,unstable_defaultShouldRevalidate:j,unstable_useTransitions:R});function $(k){r&&r(k),k.defaultPrevented||G(k)}let ne=H.createElement("a",{...D,...Y,href:T.absoluteURL||K,onClick:T.isExternal||h?r:$,ref:Rb(O,oe),target:v,"data-discover":!Z&&d==="render"?"true":void 0});return I&&!Z?H.createElement(H.Fragment,null,ne,H.createElement(Cb,{page:K})):ne});Ax.displayName="Link";var _x=H.forwardRef(function({"aria-current":r="page",caseSensitive:d=!1,className:c="",end:f=!1,style:h,to:b,viewTransition:N,children:v,...p},S){let C=cu(b,{relative:p.relative}),j=$l(),D=H.useContext(Kc),{navigator:O,basename:M}=H.useContext(Ra),R=D!=null&&Vb(C)&&N===!0,Z=O.encodeLocation?O.encodeLocation(C).pathname:C.pathname,T=j.pathname,K=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;d||(T=T.toLowerCase(),K=K?K.toLowerCase():null,Z=Z.toLowerCase()),K&&M&&(K=Jn(K,M)||K);const I=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let oe=T===Z||!f&&T.startsWith(Z)&&T.charAt(I)==="/",Y=K!=null&&(K===Z||!f&&K.startsWith(Z)&&K.charAt(Z.length)==="/"),G={isActive:oe,isPending:Y,isTransitioning:R},$=oe?r:void 0,ne;typeof c=="function"?ne=c(G):ne=[c,oe?"active":null,Y?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let k=typeof h=="function"?h(G):h;return H.createElement(Ax,{...p,"aria-current":$,className:ne,ref:S,style:k,to:b,viewTransition:N},typeof v=="function"?v(G):v)});_x.displayName="NavLink";var _b=H.forwardRef(({discover:l="render",fetcherKey:r,navigate:d,reloadDocument:c,replace:f,state:h,method:b=Gc,action:N,onSubmit:v,relative:p,preventScrollReset:S,viewTransition:C,unstable_defaultShouldRevalidate:j,...D},O)=>{let{unstable_useTransitions:M}=H.useContext(Ra),R=Hb(),Z=qb(N,{relative:p}),T=b.toLowerCase()==="get"?"get":"post",K=typeof N=="string"&&Dx.test(N),I=oe=>{if(v&&v(oe),oe.defaultPrevented)return;oe.preventDefault();let Y=oe.nativeEvent.submitter,G=(Y==null?void 0:Y.getAttribute("formmethod"))||b,$=()=>R(Y||oe.currentTarget,{fetcherKey:r,method:G,navigate:d,replace:f,state:h,relative:p,preventScrollReset:S,viewTransition:C,unstable_defaultShouldRevalidate:j});M&&d!==!1?H.startTransition(()=>$()):$()};return H.createElement("form",{ref:O,method:T,action:Z,onSubmit:c?v:I,...D,"data-discover":!K&&l==="render"?"true":void 0})});_b.displayName="Form";function kb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function kx(l){let r=H.useContext(Hr);return pt(r,kb(l)),r}function zb(l,{target:r,replace:d,state:c,preventScrollReset:f,relative:h,viewTransition:b,unstable_defaultShouldRevalidate:N,unstable_useTransitions:v}={}){let p=eo(),S=$l(),C=cu(l,{relative:h});return H.useCallback(j=>{if(hb(j,r)){j.preventDefault();let D=d!==void 0?d:ru(S)===ru(C),O=()=>p(l,{replace:D,state:c,preventScrollReset:f,relative:h,viewTransition:b,unstable_defaultShouldRevalidate:N});v?H.startTransition(()=>O()):O()}},[S,p,C,d,c,r,l,f,h,b,N,v])}var Ub=0,Lb=()=>`__${String(++Ub)}__`;function Hb(){let{router:l}=kx("useSubmit"),{basename:r}=H.useContext(Ra),d=ab(),c=l.fetch,f=l.navigate;return H.useCallback(async(h,b={})=>{let{action:N,method:v,encType:p,formData:S,body:C}=xb(h,r);if(b.navigate===!1){let j=b.fetcherKey||Lb();await c(j,d,b.action||N,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:S,body:C,formMethod:b.method||v,formEncType:b.encType||p,flushSync:b.flushSync})}else await f(b.action||N,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:S,body:C,formMethod:b.method||v,formEncType:b.encType||p,replace:b.replace,state:b.state,fromRouteId:d,flushSync:b.flushSync,viewTransition:b.viewTransition})},[c,f,r,d])}function qb(l,{relative:r}={}){let{basename:d}=H.useContext(Ra),c=H.useContext(Sn);pt(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),h={...cu(l||".",{relative:r})},b=$l();if(l==null){h.search=b.search;let N=new URLSearchParams(h.search),v=N.getAll("index");if(v.some(S=>S==="")){N.delete("index"),v.filter(C=>C).forEach(C=>N.append("index",C));let S=N.toString();h.search=S?`?${S}`:""}}return(!l||l===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(h.pathname=h.pathname==="/"?d:Xn([d,h.pathname])),ru(h)}function Vb(l,{relative:r}={}){let d=H.useContext(Nx);pt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=kx("useViewTransitionState"),f=cu(l,{relative:r});if(!d.isTransitioning)return!1;let h=Jn(d.currentLocation.pathname,c)||d.currentLocation.pathname,b=Jn(d.nextLocation.pathname,c)||d.nextLocation.pathname;return Zc(f.pathname,b)!=null||Zc(f.pathname,h)!=null}var Bb=gx();const Yb=Hf(Bb);/**
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 zx=(...l)=>l.filter((r,d,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===d).join(" ").trim();/**
66
+ * @license lucide-react v0.564.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const $b=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 Pb=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,d,c)=>c?c.toUpperCase():d.toLowerCase());/**
76
+ * @license lucide-react v0.564.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const xg=l=>{const r=Pb(l);return r.charAt(0).toUpperCase()+r.slice(1)};/**
81
+ * @license lucide-react v0.564.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */var Gb={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 Fb=l=>{for(const r in l)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};/**
91
+ * @license lucide-react v0.564.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const Zb=H.forwardRef(({color:l="currentColor",size:r=24,strokeWidth:d=2,absoluteStrokeWidth:c,className:f="",children:h,iconNode:b,...N},v)=>H.createElement("svg",{ref:v,...Gb,width:r,height:r,stroke:l,strokeWidth:c?Number(d)*24/Number(r):d,className:zx("lucide",f),...!h&&!Fb(N)&&{"aria-hidden":"true"},...N},[...b.map(([p,S])=>H.createElement(p,S)),...Array.isArray(h)?h:[h]]));/**
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 Re=(l,r)=>{const d=H.forwardRef(({className:c,...f},h)=>H.createElement(Zb,{ref:h,iconNode:r,className:zx(`lucide-${$b(xg(l))}`,`lucide-${l}`,c),...f}));return d.displayName=xg(l),d};/**
101
+ * @license lucide-react v0.564.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const Wb=[["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"}]],Ux=Re("activity",Wb);/**
106
+ * @license lucide-react v0.564.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const Qb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ib=Re("arrow-down",Qb);/**
111
+ * @license lucide-react v0.564.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const Xb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],pg=Re("arrow-right",Xb);/**
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 Jb=[["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"}]],Kb=Re("arrow-up-down",Jb);/**
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 e1=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],t1=Re("arrow-up",e1);/**
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 a1=[["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"}]],n1=Re("bell",a1);/**
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 l1=[["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"}]],yg=Re("briefcase",l1);/**
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 s1=[["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"}]],Lx=Re("calendar",s1);/**
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 r1=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Hx=Re("chart-column",r1);/**
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 i1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],u1=Re("check",i1);/**
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 c1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zf=Re("chevron-down",c1);/**
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 o1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],d1=Re("chevron-left",o1);/**
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 f1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],h1=Re("chevron-right",f1);/**
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 m1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],g1=Re("chevron-up",m1);/**
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 x1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],p1=Re("chevrons-up-down",x1);/**
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 y1=[["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"}]],bn=Re("circle-alert",y1);/**
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 v1=[["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"}]],vg=Re("circle-arrow-down",v1);/**
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 b1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],S1=Re("circle-check",b1);/**
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 N1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ou=Re("circle-check-big",N1);/**
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 j1=[["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"}]],w1=Re("circle-x",j1);/**
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 E1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],qx=Re("clock",E1);/**
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 T1=[["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"}]],Vx=Re("external-link",T1);/**
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 C1=[["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"}]],M1=Re("eye-off",C1);/**
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 O1=[["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"}]],Bx=Re("eye",O1);/**
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 R1=[["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"}]],Of=Re("file-text",R1);/**
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 D1=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Yx=Re("git-merge",D1);/**
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 A1=[["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"}]],Wf=Re("git-pull-request",A1);/**
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 _1=[["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"}]],k1=Re("globe",_1);/**
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 z1=[["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"}]],U1=Re("house",z1);/**
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 L1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],H1=Re("info",L1);/**
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 q1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],V1=Re("kanban",q1);/**
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 B1=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M7 12H3",key:"13ou7f"}],["path",{d:"M7 19H3",key:"wbqt3n"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14",key:"qth677"}],["path",{d:"M11 10v4h4",key:"172dkj"}]],bg=Re("list-restart",B1);/**
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 Y1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$x=Re("loader-circle",Y1);/**
266
+ * @license lucide-react v0.564.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const $1=[["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"}]],Px=Re("map",$1);/**
271
+ * @license lucide-react v0.564.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const P1=[["path",{d:"M5 12h14",key:"1ays0h"}]],G1=Re("minus",P1);/**
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 F1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],Gx=Re("panels-top-left",F1);/**
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 Z1=[["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"}]],Fx=Re("pause",Z1);/**
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 W1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],ao=Re("pen",W1);/**
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 Q1=[["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"}]],Yl=Re("play",Q1);/**
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 I1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Vs=Re("plus",I1);/**
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 X1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Sg=Re("refresh-cw",X1);/**
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 J1=[["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"}]],Zx=Re("rotate-ccw",J1);/**
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 K1=[["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"}]],e2=Re("save",K1);/**
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 t2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],du=Re("search",t2);/**
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 a2=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Ng=Re("settings-2",a2);/**
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 n2=[["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"}]],l2=Re("settings",n2);/**
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 s2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],jg=Re("square",s2);/**
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 r2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],i2=Re("terminal",r2);/**
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 u2=[["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"}]],Vr=Re("trash-2",u2);/**
346
+ * @license lucide-react v0.564.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */const c2=[["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"}]],Ur=Re("triangle-alert",c2);/**
351
+ * @license lucide-react v0.564.0 - ISC
352
+ *
353
+ * This source code is licensed under the ISC license.
354
+ * See the LICENSE file in the root directory of this source tree.
355
+ */const o2=[["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"}]],d2=Re("wifi",o2);/**
356
+ * @license lucide-react v0.564.0 - ISC
357
+ *
358
+ * This source code is licensed under the ISC license.
359
+ * See the LICENSE file in the root directory of this source tree.
360
+ */const f2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Br=Re("x",f2);/**
361
+ * @license lucide-react v0.564.0 - ISC
362
+ *
363
+ * This source code is licensed under the ISC license.
364
+ * See the LICENSE file in the root directory of this source tree.
365
+ */const h2=[["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"}]],wg=Re("zap",h2),Wx=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"}},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"}},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"}},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"}},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"}},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"}},{id:"pr-resolver",label:"PR Resolver",processName:"pr-resolver",color:{bg:"bg-teal-500",border:"border-teal-500/60"}},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"}}],Qx=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"},triggerEndpoint:"/api/actions/run",scheduleTemplateKey:"executor",getEnabled:l=>l.executorEnabled??!0,getSchedule:l=>l.cronSchedule??"5 */2 * * *",settingsSection:"general",buildEnabledPatch:l=>({executorEnabled:l})},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"},triggerEndpoint:"/api/actions/review",scheduleTemplateKey:"reviewer",getEnabled:l=>l.reviewerEnabled??!0,getSchedule:l=>l.reviewerSchedule??"25 */3 * * *",settingsSection:"general",buildEnabledPatch:l=>({reviewerEnabled:l})},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"},triggerEndpoint:"/api/actions/qa",scheduleTemplateKey:"qa",getEnabled:l=>{var r;return((r=l.qa)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.qa)==null?void 0:r.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(l,r)=>({qa:{...r.qa??{},enabled:l}})},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"},triggerEndpoint:"/api/actions/audit",scheduleTemplateKey:"audit",getEnabled:l=>{var r;return((r=l.audit)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.audit)==null?void 0:r.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({audit:{...r.audit??{},enabled:l}})},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"},triggerEndpoint:"/api/actions/planner",scheduleTemplateKey:"slicer",getEnabled:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({roadmapScanner:{...r.roadmapScanner??{},enabled:l}})},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"},triggerEndpoint:"/api/actions/analytics",scheduleTemplateKey:"analytics",getEnabled:l=>{var r;return((r=l.analytics)==null?void 0:r.enabled)??!1},getSchedule:l=>{var r;return((r=l.analytics)==null?void 0:r.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({analytics:{...r.analytics??{},enabled:l}})},{id:"pr-resolver",label:"PR Resolver",processName:"pr-resolver",color:{bg:"bg-teal-500",border:"border-teal-500/60"},triggerEndpoint:"/api/actions/resolve",scheduleTemplateKey:"prResolver",getEnabled:l=>{var r;return((r=l.prResolver)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.prResolver)==null?void 0:r.schedule)??"15 6,14,22 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({prResolver:{...r.prResolver??{},enabled:l}})},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"},triggerEndpoint:"/api/actions/merge",scheduleTemplateKey:"merger",getEnabled:l=>{var r;return((r=l.merger)==null?void 0:r.enabled)??!1},getSchedule:l=>{var r;return((r=l.merger)==null?void 0:r.schedule)??"55 */4 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({merger:{...r.merger??{},enabled:l}})}];function m2(l){return Qx.find(r=>r.id===l)}const Qf="";let If=!1,Wc=null;function g2(l){If=l}function Eg(l){Wc=l}function x2(){return If}function Xf(l){return encodeURIComponent(l.replace(/\//g,"~"))}function Mt(l){return If&&Wc?l.replace("/api/",`/api/projects/${Xf(Wc)}/`):l}function p2(){return it("/api/mode")}function Ix(){return it("/api/projects")}function y2(l){const r=Xf(l);return it(`/api/projects/${r}`,{method:"DELETE"})}async function it(l,r){const d=`${Qf}${l}`,c=await fetch(d,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!c.ok){const f=await c.json().catch(()=>({error:"Unknown error"}));throw new Error(f.error||`HTTP ${c.status}: ${c.statusText}`)}return c.json()}function bf(){return it(Mt("/api/status"))}function Xx(){return it(Mt("/api/prs"))}function v2(l,r){const d=`?lines=${encodeURIComponent(r)}`;return it(Mt(`/api/logs/${encodeURIComponent(l)}${d}`))}function Jf(){return it(Mt("/api/config"))}async function Jx(){if(x2()){const r=(await Ix()).filter(c=>c.valid);return(await Promise.all(r.map(async c=>{try{const f=await it(`/api/projects/${Xf(c.name)}/config`);return{projectId:c.name,config:f}}catch(f){return console.error(`Failed to fetch config for project ${c.name}`,f),null}}))).filter(c=>c!==null)}else{const l=await Jf();return[{projectId:Wc||"current",config:l}]}}function Kf(l){return it(Mt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function b2(){return it(Mt("/api/doctor"))}function Kx(){return it(Mt("/api/schedule-info"))}function S2(){return it(Mt("/api/actions/review"),{method:"POST"})}function ep(l){const r=m2(l);return r?it(Mt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${l}`))}function Rf(){return it(Mt("/api/actions/install-cron"),{method:"POST"})}function N2(){return it(Mt("/api/actions/uninstall-cron"),{method:"POST"})}function j2(l="all"){return it(Mt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Bl=["Draft","Ready","In Progress","Review","Done"];function tp(){return it(Mt("/api/board/status"))}function w2(l){return it(Mt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function ap(l,r){return it(Mt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function E2(l){const r=`${Qf}${Mt(`/api/board/issues/${l}`)}`,d=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const c=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||`HTTP ${d.status}: ${d.statusText}`)}}function T2(){return it(Mt("/api/actions/clear-lock"),{method:"POST"})}function C2(l,r=[],d){const c=(d==null?void 0:d.enabled)??!0,f=H.useRef(l);f.current=l,H.useEffect(()=>{if(!c)return;const h=`${Qf}${Mt("/api/status/events")}`,b=new EventSource(h);return b.addEventListener("status_changed",N=>{try{const v=JSON.parse(N.data);f.current(v)}catch{}}),()=>{b.close()}},[c,...r])}function Tg(){return it("/api/queue/status")}function M2(l){const r=`?window=${encodeURIComponent(l)}`;return it(`/api/queue/analytics${r}`)}function O2(l){return it("/api/queue/clear",{method:"POST",body:JSON.stringify({force:!1})})}function R2(){return it("/api/global-notifications")}function Cg(l){return it("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function D2(){return it(Mt("/api/roadmap"))}function A2(){return it(Mt("/api/roadmap/scan"),{method:"POST"})}function np(l){return it(Mt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function un(l,r=[],d){const c=(d==null?void 0:d.enabled)??!0,[f,h]=H.useState(null),[b,N]=H.useState(!0),[v,p]=H.useState(null),S=H.useRef(l);S.current=l;const C=H.useRef(()=>{(async()=>{p(null);try{const D=await S.current();h(D)}catch(D){p(D instanceof Error?D:new Error("Unknown error"))}})()});return H.useEffect(()=>{if(!c)return;let j=!1;return N(!0),p(null),(async()=>{try{const O=await S.current();j||h(O)}catch(O){j||p(O instanceof Error?O:new Error("Unknown error"))}finally{j||N(!1)}})(),()=>{j=!0}},[...r,c]),{data:f,loading:b,error:v,refetch:C.current}}const Mg=l=>{let r;const d=new Set,c=(p,S)=>{const C=typeof p=="function"?p(r):p;if(!Object.is(C,r)){const j=r;r=S??(typeof C!="object"||C===null)?C:Object.assign({},r,C),d.forEach(D=>D(r,j))}},f=()=>r,N={setState:c,getState:f,getInitialState:()=>v,subscribe:p=>(d.add(p),()=>d.delete(p))},v=r=l(c,f,N);return N},_2=l=>l?Mg(l):Mg,k2=l=>l;function z2(l,r=k2){const d=Oe.useSyncExternalStore(l.subscribe,()=>r(l.getState()),()=>r(l.getInitialState()));return Oe.useDebugValue(d),d}const Og=l=>{const r=_2(l),d=c=>z2(r,c);return Object.assign(d,r),d},U2=l=>l?Og(l):Og,L2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,$t=U2((l,r)=>({projectName:"Night Watch",setProjectName:d=>l({projectName:d}),toasts:[],addToast:d=>{const c=Math.random().toString(36).substring(7);l(f=>({toasts:[...f.toasts,{...d,id:c}]})),setTimeout(()=>{l(f=>({toasts:f.toasts.filter(h=>h.id!==c)}))},5e3)},removeToast:d=>l(c=>({toasts:c.toasts.filter(f=>f.id!==d)})),status:null,setStatus:d=>l(c=>!c.status||new Date(d.timestamp)>new Date(c.status.timestamp)?{status:d}:c),globalModeLoading:!0,setGlobalModeLoading:d=>l({globalModeLoading:d}),isGlobalMode:!1,setGlobalMode:d=>{g2(d),l({isGlobalMode:d})},projects:[],setProjects:d=>l({projects:d}),selectedProjectId:L2,selectProject:d=>{Eg(d),d?localStorage.setItem("nw-selected-project",d):localStorage.removeItem("nw-selected-project"),l(c=>{const f=c.projects.find(h=>h.name===d);return{selectedProjectId:d,...f?{projectName:f.name}:{}}})},removeProjectFromList:d=>{l(c=>{var N;const f=c.projects.filter(v=>v.name!==d),h=c.selectedProjectId===d,b=h?((N=f[0])==null?void 0:N.name)??null:c.selectedProjectId;return h&&(Eg(b),b?localStorage.setItem("nw-selected-project",b):localStorage.removeItem("nw-selected-project")),{projects:f,selectedProjectId:b,...h&&f[0]?{projectName:f[0].name}:{}}})},getJobStates:()=>{const{status:d}=r(),c=d==null?void 0:d.config;return Qx.map(f=>({id:f.id,label:f.label,processName:f.processName,color:f.color,enabled:c?f.getEnabled(c):!0,schedule:c?f.getSchedule(c):"",triggerEndpoint:f.triggerEndpoint}))}})),H2=()=>{const[l,r]=H.useState(!1),{projectName:d,isGlobalMode:c,projects:f,selectedProjectId:h,selectProject:b,globalModeLoading:N}=$t(),{data:v}=un(Xx,[h],{enabled:!N}),p=(v==null?void 0:v.length)??0,S=H.useMemo(()=>[{icon:U1,label:"Dashboard",path:"/",section:"Overview"},{icon:i2,label:"Logs",path:"/logs"},{icon:V1,label:"Board",path:"/board",section:"Work"},{icon:Wf,label:"Pull Requests",path:"/prs",badge:p},{icon:Px,label:"Roadmap",path:"/roadmap"},{icon:Lx,label:"Automation",path:"/scheduling",section:"Automation"},{icon:l2,label:"Settings",path:"/settings",section:"Config"}],[p]);return s.jsxs("aside",{className:`
366
+ relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
367
+ ${l?"w-20":"w-72"} h-screen flex-shrink-0 z-50
368
+ bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
369
+ `,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(yg,{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:h||"",onChange:C=>b(C.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:f.filter(C=>C.valid).map(C=>s.jsx("option",{value:C.name,children:C.name},C.name))}),s.jsx(p1,{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(yg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:d})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:S.map(C=>s.jsxs(Oe.Fragment,{children:[C.section&&!l&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:C.section}),s.jsx("li",{children:s.jsx(_x,{to:C.path,className:({isActive:j})=>`
370
+ flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
371
+ ${j?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
372
+ ${l?"justify-center":""}
373
+ `,children:({isActive:j})=>s.jsxs(s.Fragment,{children:[s.jsx(C.icon,{className:`h-5 w-5 transition-colors ${j?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${l?"":"mr-3.5"}`}),!l&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:C.label}),C.badge&&(l?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${j?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:C.badge})),j&&!l&&s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),l&&s.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:C.label})]})})})]},C.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>r(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(h1,{className:"h-5 w-5"}):s.jsx(d1,{className:"h-5 w-5"})})})]})},q2=()=>{const{projectName:l}=$t();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(d2,{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(du,{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(n1,{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"})]})]})},V2=({toast:l,onDismiss:r})=>{const d={success:s.jsx(ou,{className:"h-5 w-5 text-green-400"}),error:s.jsx(bn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(H1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(Ur,{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:`
374
+ pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
375
+ bg-slate-900 border border-slate-800 border-l-4 ${c[l.type]}
376
+ shadow-lg ring-1 ring-black ring-opacity-5 transition-all
377
+ animate-in slide-in-from-right-full fade-in duration-300
378
+ `,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:d[l.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:l.title}),l.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:l.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>r(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Br,{className:"h-5 w-5"})]})})]})})})},B2=()=>{const{toasts:l,removeToast:r}=$t();return s.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:l.map(d=>s.jsx(V2,{toast:d,onDismiss:r},d.id))})};function Y2(){const{setGlobalMode:l,setGlobalModeLoading:r,setProjects:d,selectProject:c,selectedProjectId:f}=$t();H.useEffect(()=>{r(!0),p2().then(async({globalMode:h})=>{if(l(h),!h)return;const b=await Ix();d(b);const N=b.filter(v=>v.valid);f&&N.some(v=>v.name===f)?c(f):N.length>0&&c(N[0].name)}).catch(()=>{l(!1)}).finally(()=>{r(!1)})},[])}function Rg(l){if(!(l!=null&&l.timestamp))return Number.NEGATIVE_INFINITY;const r=new Date(l.timestamp).getTime();return Number.isNaN(r)?Number.NEGATIVE_INFINITY:r}function Vc(l,r){return l?r?Rg(l)>=Rg(r)?l:r:l:r}function $2(){const{setStatus:l,setProjectName:r,selectedProjectId:d,globalModeLoading:c,status:f}=$t(),h=H.useRef(null);h.current=$t.getState().status,C2(b=>{Vc(b,h.current)===b&&l(b)},[d,c],{enabled:!c}),H.useEffect(()=>{if(c)return;bf().then(N=>{Vc(N,h.current)===N&&l(N)}).catch(()=>{});const b=setInterval(()=>{bf().then(N=>{Vc(N,h.current)===N&&l(N)}).catch(()=>{})},3e4);return()=>clearInterval(b)},[d,c,l]),H.useEffect(()=>{const b=()=>{bf().then(N=>{Vc(N,h.current)===N&&l(N)}).catch(()=>{})};return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[d,l]),H.useEffect(()=>{f!=null&&f.projectName&&r(f.projectName)},[f==null?void 0:f.projectName,r])}const ft=({children:l,className:r="",onClick:d})=>s.jsxs("div",{className:`
379
+ relative bg-[#0b101b] rounded-xl border border-white/5
380
+ shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
381
+ transition-all duration-300
382
+ ${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
383
+ ${r}
384
+ `,onClick:d,children:[d&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:l})]}),Be=({children:l,variant:r="primary",size:d="md",loading:c=!1,className:f="",disabled:h,...b})=>{const N="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",v={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},p={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${N} ${v[r]} ${p[d]} ${f}`,disabled:h||c,...b,children:[c&&s.jsx($x,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},Pa=({children:l,variant:r="default",className:d=""})=>{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[r]} ${d}`,children:l})},lp={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"}},P2=({defaultColumn:l,onClose:r,onCreated:d})=>{const[c,f]=H.useState(""),[h,b]=H.useState(""),[N,v]=H.useState(l),[p,S]=H.useState(!1),[C,j]=H.useState(null),{addToast:D}=$t(),O=async M=>{if(M.preventDefault(),!!c.trim()){S(!0),j(null);try{await w2({title:c.trim(),body:h,column:N}),D({title:"Issue created",message:`"${c.trim()}" added to ${N}`,type:"success"}),d(),r()}catch(R){j(R instanceof Error?R.message:"Failed to create issue")}finally{S(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(Br,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:O,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:M=>f(M.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:N,onChange:M=>v(M.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Bl.map(M=>s.jsx("option",{value:M,children:M},M))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:h,onChange:M=>b(M.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),C&&s.jsx("p",{className:"text-sm text-red-400",children:C}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Be,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Be,{type:"submit",disabled:p||!c.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},G2=({issue:l,onClose:r,onMoved:d,onClosed:c})=>{const[f,h]=H.useState(!1),[b,N]=H.useState(!1),[v,p]=H.useState(!1),{addToast:S}=$t(),C=async O=>{if(O!==l.column){h(!0);try{await ap(l.number,O),S({title:"Issue moved",message:`#${l.number} moved to ${O}`,type:"success"}),d(),r()}catch(M){S({title:"Move failed",message:M instanceof Error?M.message:"Failed to move issue",type:"error"})}finally{h(!1)}}},j=async()=>{p(!1),N(!0);try{await E2(l.number),S({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),c(),r()}catch(O){S({title:"Close failed",message:O instanceof Error?O.message:"Failed to close issue",type:"error"})}finally{N(!1)}},D=l.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",l.number]}),s.jsx(Pa,{variant:lp[D].badge,children:D})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:l.title}),l.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",l.assignees.join(", ")]})]}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:s.jsx(Br,{className:"h-5 w-5"})})]}),s.jsxs("div",{className:"flex items-center space-x-3 px-6 py-3 border-b border-white/5 flex-shrink-0 flex-wrap gap-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),Bl.filter(O=>O!==l.column).map(O=>s.jsx("button",{onClick:()=>C(O),disabled:f,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:O},O))]}),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(Vx,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>p(!0),disabled:b,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:b?"Closing...":"Close Issue"})]})]}),v&&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:()=>p(!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(Be,{variant:"ghost",onClick:()=>p(!1),children:"Cancel"}),s.jsx(Be,{onClick:j,children:"Confirm"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:l.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},F2=({issue:l,onClick:r,onDragStart:d})=>{const[c,f]=H.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:h=>{h.dataTransfer.setData("issueNumber",String(l.number)),h.dataTransfer.effectAllowed="move",f(!0),d(l)},onDragEnd:()=>f(!1),children:s.jsxs(ft,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${c?"opacity-30":""}`,onClick:r,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",l.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:l.title}),l.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:l.assignees.join(", ")})]})})},Z2=({name:l,issues:r,draggingIssue:d,onIssueClick:c,onNewIssue:f,onMoveIssue:h,onDragStart:b})=>{const N=lp[l],[v,p]=H.useState(!1),S=d!==null&&d.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${v&&S?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:C=>{S&&(C.preventDefault(),C.dataTransfer.dropEffect="move",p(!0))},onDragLeave:()=>p(!1),onDrop:C=>{C.preventDefault(),p(!1),d&&d.column!==l&&h(d,l)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${N.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:l}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:r.length})]}),s.jsx("button",{onClick:()=>f(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(Vs,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:r.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${v&&S?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:v&&S?"Drop here":"No issues"})}):r.map(C=>s.jsx(F2,{issue:C,onClick:()=>c(C),onDragStart:b},C.id))})]})},W2=()=>{const[l,r]=H.useState(null),[d,c]=H.useState(null),[f,h]=H.useState(null),[b,N]=H.useState(null),v=H.useRef(!1),{addToast:p,selectedProjectId:S,globalModeLoading:C}=$t(),{data:j,loading:D,error:O,refetch:M}=un(tp,[S],{enabled:!C});H.useEffect(()=>{const T=setInterval(()=>{v.current||M()},3e4);return()=>clearInterval(T)},[M]);const R=H.useCallback(async(T,K)=>{h(null);const I=b??(j==null?void 0:j.columns);if(!I)return;const oe=I,Y={};for(const $ of Bl)Y[$]=(I[$]??[]).filter(ne=>ne.number!==T.number);const G={...T,column:K};Y[K]=[...Y[K]??[],G],N(Y),r($=>($==null?void 0:$.number)===T.number?G:$),v.current=!0;try{await ap(T.number,K),M(),setTimeout(()=>{N(null),v.current=!1},800)}catch($){N(oe),r(ne=>(ne==null?void 0:ne.number)===T.number?T:ne),v.current=!1,p({title:"Move failed",message:$ instanceof Error?$.message:"Failed to move issue",type:"error"})}},[p,M,b,j]);if(C||D)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(O&&O.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(O)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:O.message}),s.jsx(Be,{onClick:()=>M(),children:"Retry"})]});if(!j)return null;const Z=b??j.columns;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),s.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[Bl.reduce((T,K)=>{var I;return T+(((I=Z[K])==null?void 0:I.length)??0)},0)," issues across ",Bl.length," columns"]})]}),s.jsxs(Be,{onClick:()=>c("Ready"),children:[s.jsx(Vs,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>h(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Bl.length*236}px`},children:Bl.map(T=>s.jsx(Z2,{name:T,issues:Z[T]??[],draggingIssue:f,onIssueClick:r,onNewIssue:c,onMoveIssue:R,onDragStart:h},T))})}),l&&s.jsx(G2,{issue:l,onClose:()=>r(null),onMoved:()=>M(),onClosed:()=>M()}),d&&s.jsx(P2,{defaultColumn:d,onClose:()=>c(null),onCreated:()=>M()})]})},Q2=[{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"},{name:"pr-resolver",displayName:"PR Resolver",processName:"pr-resolver",triggerId:"pr-resolver",runningLabel:"Resolving",idleLabel:"Idle"},{name:"merger",displayName:"Merger",processName:"merger",triggerId:"merger",runningLabel:"Running",idleLabel:"Idle"}],I2=({processes:l,activePrd:r,onCancelProcess:d,onForceClear:c,onViewLog:f,cancellingProcess:h,clearingLock:b,onTriggerJob:N,triggeringJob:v})=>{const p=C=>l.find(j=>j.name===C),S=(C,j)=>C.length<=j?C:C.slice(0,j-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-8 gap-3",children:Q2.map(C=>{const j=p(C.processName),D=(j==null?void 0:j.running)??!1,O=j==null?void 0:j.pid,M=h===C.cancelType,R=D&&C.cancelType,Z=!D&&C.name==="executor"&&r,T=D?O?`PID: ${O}`:C.runningLabel:C.idleLabel,K=D&&C.name==="executor"&&r?S(r,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${D?"bg-green-950/30 border-green-800/50":"bg-slate-950/50 border-slate-800"}`,children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${D?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:`text-sm font-medium ${D?"text-slate-200":"text-slate-400"}`,children:C.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:K?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Of,{className:"h-3 w-3 flex-shrink-0"}),K]}):T})]}),s.jsxs("div",{className:"flex-shrink-0",children:[R&&s.jsx("button",{onClick:()=>C.cancelType&&d(C.cancelType),disabled:M,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(jg,{className:"h-3.5 w-3.5"})}),Z&&s.jsx("button",{onClick:c,disabled:b,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(jg,{className:"h-3.5 w-3.5"})}),!R&&!Z&&D&&s.jsx("button",{onClick:f,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Of,{className:"h-3.5 w-3.5"})}),!D&&!Z&&s.jsx("button",{onClick:()=>N(C.triggerId),disabled:v!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${C.displayName}`,children:v===C.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(Yl,{className:"h-3.5 w-3.5"})})]})]},C.name)})})},X2={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"},J2=()=>{var k,ae;const l=eo(),[r,d]=H.useState(null),[c,f]=H.useState(!1),[h,b]=H.useState(null),{setProjectName:N,addToast:v,selectedProjectId:p,globalModeLoading:S,status:C}=$t(),{data:j}=un(Kx,[p],{enabled:!S}),{data:D,loading:O}=un(()=>tp().catch(()=>null),[p],{enabled:!S}),M=C;if(Oe.useEffect(()=>{M!=null&&M.projectName&&N(M.projectName)},[M,N]),S)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!M)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const R=M.prs.length,Z=M.prs.filter(F=>F.reviewScore!==null&&F.reviewScore<70).length,T=((k=D==null?void 0:D.columns.Ready)==null?void 0:k.length)??0,K=((ae=D==null?void 0:D.columns["In Progress"])==null?void 0:ae.length)??0;M.processes.find(F=>F.name==="executor"),M.processes.find(F=>F.name==="reviewer"),M.processes.find(F=>F.name==="qa"),M.processes.find(F=>F.name==="audit"),M.processes.find(F=>F.name==="planner"),M.processes.find(F=>F.name==="analytics");const I=async F=>{d(F);try{const ue=await j2(F),xe=ue.results.every(J=>J.success);v({title:xe?"Process Cancelled":"Cancel Failed",message:ue.results.map(J=>J.message).join("; "),type:xe?"success":"error"})}catch(ue){v({title:"Cancel Failed",message:ue instanceof Error?ue.message:"Failed to cancel process",type:"error"})}finally{d(null)}},oe=async()=>{f(!0);try{await T2(),v({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(F){v({title:"Clear Failed",message:F instanceof Error?F.message:"Failed to clear lock",type:"error"})}finally{f(!1)}},Y=async F=>{b(F);try{await ep(F==="planner"?"slicer":F),v({title:"Job Triggered",message:`${F[0].toUpperCase()+F.slice(1)} job has been queued.`,type:"success"})}catch(ue){v({title:"Trigger Failed",message:ue instanceof Error?ue.message:`Failed to trigger ${F}`,type:"error"})}finally{b(null)}},G=F=>{if(!F)return"Not scheduled";try{const ue=new Date(F),xe=new Date,J=ue.getTime()-xe.getTime(),B=Math.floor(J/6e4);return B<0?"Running now...":B<60?`in ${B} min`:B<1440?`in ${Math.floor(B/60)} hr${B>=120?"s":""}`:`in ${Math.floor(B/1440)} day${B>=2880?"s":""}`}catch{return"Unknown"}},ne=(()=>{var xe,J,B,re,ge,Se;if(j!=null&&j.paused)return null;const F=[{agent:"Executor",nextRun:(j==null?void 0:j.executor.nextRun)??null},{agent:"Reviewer",nextRun:(j==null?void 0:j.reviewer.nextRun)??null},{agent:"QA",nextRun:((xe=j==null?void 0:j.qa)==null?void 0:xe.nextRun)??null},{agent:"Auditor",nextRun:((J=j==null?void 0:j.audit)==null?void 0:J.nextRun)??null},{agent:"Planner",nextRun:((B=j==null?void 0:j.planner)==null?void 0:B.nextRun)??null},{agent:"Analytics",nextRun:((re=j==null?void 0:j.analytics)==null?void 0:re.nextRun)??null},{agent:"PR Resolver",nextRun:((ge=j==null?void 0:j.prResolver)==null?void 0:ge.nextRun)??null},{agent:"Merger",nextRun:((Se=j==null?void 0:j.merger)==null?void 0:Se.nextRun)??null}];let ue=null;for(const ke of F)ke.nextRun&&(!ue||new Date(ke.nextRun)<new Date(ue.nextRun))&&(ue=ke);return ue?{agent:ue.agent,time:G(ue.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(ft,{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:T})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(ou,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(ft,{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:K})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Ux,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(ft,{className:"p-5",onClick:()=>l("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:R})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(qx,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${Z>0?"text-red-400 font-medium":"text-slate-500"}`,children:Z>0?`${Z} need work`:"All passing"})]}),s.jsxs(ft,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:j!=null&&j.paused?"Paused":M.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${j!=null&&j.paused?"bg-amber-500/10 text-amber-400":M.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(Lx,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:j!=null&&j.paused?"All schedules paused":M.crontab.installed?`${M.crontab.entries.length} entr${M.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(ft,{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(I2,{processes:M.processes,activePrd:M.activePrd,onCancelProcess:I,onForceClear:oe,onViewLog:()=>l("/logs"),cancellingProcess:r,clearingLock:c,onTriggerJob:Y,triggeringJob:h})]}),ne&&s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[s.jsx("span",{children:"Next automation:"}),s.jsx("span",{className:"text-slate-200 font-medium",children:ne.agent}),s.jsx("span",{children:ne.time})]}),s.jsxs("button",{onClick:()=>l("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(pg,{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(pg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(ft,{className:"p-4",children:O?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):D?s.jsx("div",{className:"flex flex-wrap gap-3",children:Bl.map(F=>{var xe;const ue=((xe=D.columns[F])==null?void 0:xe.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 ${X2[F]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:F}),s.jsx("span",{className:"text-xs font-bold",children:ue})]},F)})}):s.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",s.jsx("code",{className:"font-mono bg-slate-800 px-1.5 py-0.5 rounded text-indigo-300 text-xs",children:"night-watch board setup"})," to enable."]})})]})]})},K2=()=>{const[l,r]=H.useState(!0),[d,c]=H.useState(""),[f,h]=H.useState("executor"),b=H.useRef(null),{selectedProjectId:N,globalModeLoading:v}=$t(),p=$t(T=>T.status),{data:S,loading:C,error:j,refetch:D}=un(()=>v2(f,500),[f,N],{enabled:!v}),O=(S==null?void 0:S.lines)||[];H.useEffect(()=>{l&&b.current&&(b.current.scrollTop=b.current.scrollHeight)},[O,l]),H.useEffect(()=>{if(!l)return;const T=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(T)},[l,f,D]);const M=O.filter(T=>T.toLowerCase().includes(d.toLowerCase())),R=T=>{h(T),c("")},Z=T=>{if(!(p!=null&&p.processes))return!1;const K=p.processes.find(I=>I.name===T);return(K==null?void 0:K.running)??!1};return j?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(bn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),s.jsx("div",{className:"text-sm text-slate-500",children:j.message}),s.jsx(Be,{onClick:()=>D(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:T=>c(T.target.value)}),s.jsx(du,{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:Wx.map(({processName:T,label:K})=>s.jsx("button",{onClick:()=>R(T),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${f===T?"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:K}),Z(T)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},T))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Be,{size:"sm",variant:"ghost",onClick:()=>D(),children:[s.jsx(vg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Be,{size:"sm",variant:"ghost",onClick:()=>r(!l),children:[l?s.jsx(Fx,{className:"h-4 w-4 mr-2"}):s.jsx(Yl,{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: ",f,".log"]}),s.jsxs("span",{children:[M.length," lines"]})]}),s.jsxs("div",{ref:b,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[C?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):M.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):M.map((T,K)=>{const I=T.includes("[ERROR]"),oe=T.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${I?"text-red-400":oe?"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:K+1}),T]},K)}),l&&s.jsx("div",{className:"h-4"})," "]}),!l&&s.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>r(!0),children:[s.jsx(vg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},eS=()=>{const[l,r]=H.useState(null),[d,c]=H.useState(!1),[f,h]=H.useState("all"),[b,N]=H.useState("number"),[v,p]=H.useState("desc"),{addToast:S,selectedProjectId:C,globalModeLoading:j}=$t(),{data:D,loading:O,error:M,refetch:R}=un(Xx,[C],{enabled:!j}),Z=D??[],T=k=>{switch(k){case"pass":return s.jsx(ou,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(w1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx($x,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(bn,{className:"h-4 w-4 text-slate-500"})}},K=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"}},I=k=>k===null?"No review decision yet":k===100?"PR has been approved":k===0?"Changes have been requested":`Review score: ${k}`,oe=H.useMemo(()=>Z.filter(k=>{switch(f){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}}),[Z,f]),Y=H.useMemo(()=>[...oe].sort((ae,F)=>{let ue=0;switch(b){case"number":ue=ae.number-F.number;break;case"title":ue=ae.title.localeCompare(F.title);break;case"branch":ue=ae.branch.localeCompare(F.branch);break;case"ciStatus":{const xe={fail:0,pending:1,unknown:2,pass:3};ue=(xe[ae.ciStatus]??2)-(xe[F.ciStatus]??2);break}case"reviewScore":{const xe=ae.reviewScore??-1,J=F.reviewScore??-1;ue=xe-J;break}}return v==="asc"?ue:-ue}),[oe,b,v]),G=k=>{b===k?p(v==="asc"?"desc":"asc"):(N(k),p("desc"))},$=k=>b!==k?s.jsx(Kb,{className:"h-3 w-3 text-slate-600"}):v==="asc"?s.jsx(t1,{className:"h-3 w-3 text-indigo-400"}):s.jsx(Ib,{className:"h-3 w-3 text-indigo-400"});if(O)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(M)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(bn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:M.message}),s.jsx(Be,{onClick:()=>R(),children:"Retry"})]});const ne=async()=>{c(!0);try{const k=await S2();S({title:"Reviewer Started",message:k.pid?`Started with PID ${k.pid}`:"Reviewer started",type:"success"})}catch(k){S({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:()=>h("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="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:()=>h("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="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:()=>h("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="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:()=>h("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="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(Be,{size:"sm",onClick:ne,disabled:d,children:[s.jsx(du,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),$("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:()=>G("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),$("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:()=>G("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),$("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:()=>G("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),$("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:[Y.map(k=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(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:K(k.ciStatus),children:[T(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:I(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:ae=>ae.stopPropagation(),children:s.jsx(Vx,{className:"h-4 w-4"})})})]},k.number)),Y.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:Z.length===0?"No open PRs found.":`No PRs match the "${f}" filter.`})})]})]})}),l&&s.jsx(ft,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const k=Z.find(ae=>ae.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:K(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:[T(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:I(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})()})]})},$a=Oe.forwardRef(({className:l="",label:r,checked:d,onChange:c,...f},h)=>{const b=N=>{c&&c(N.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${l}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:h,checked:d,onChange:b,...f}),s.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),r&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:r})]})});$a.displayName="Switch";const tS=()=>{const{addToast:l,selectedProjectId:r,globalModeLoading:d}=$t(),[c,f]=H.useState(!1),[h,b]=H.useState(!1),{data:N,loading:v,error:p,refetch:S}=un(D2,[r],{enabled:!d});H.useEffect(()=>{if(!(N!=null&&N.enabled))return;const T=setInterval(()=>{S()},1e4);return()=>clearInterval(T)},[N==null?void 0:N.enabled,S]);const C=async T=>{b(!0);try{await np(T),l({title:T?"Scanner Enabled":"Scanner Disabled",message:T?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:T?"success":"info"}),S()}catch(K){l({title:"Toggle Failed",message:K instanceof Error?K.message:"Failed to toggle scanner",type:"error"})}finally{b(!1)}},j=async()=>{f(!0);try{const T=await A2();T.created.length>0?l({title:"Scan Complete",message:`Created ${T.created.length} PRD(s): ${T.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),T.errors.length>0&&l({title:"Scan Errors",message:T.errors.join("; "),type:"warning"}),S()}catch(T){l({title:"Scan Failed",message:T instanceof Error?T.message:"Failed to scan roadmap",type:"error"})}finally{f(!1)}};if(v)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(p)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(bn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:p.message}),s.jsx(Be,{onClick:()=>S(),children:"Retry"})]});if(!N)return null;if(N.status==="no-roadmap")return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),s.jsx(ft,{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(Px,{className:"h-10 w-10 text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),s.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",s.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const D=N.totalItems>0?Math.round(N.processedItems/N.totalItems*100):0,O=nS(N.status),M=lS(N.items),R=N.lastScan?sS(N.lastScan):"Never",Z=N.autoScanInterval?Math.round(N.autoScanInterval/60):5;return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx($a,{label:N.enabled?"Enabled":"Disabled",checked:N.enabled,onChange:C,disabled:h}),s.jsxs(Be,{onClick:j,loading:c,disabled:!N.enabled||N.status==="complete",children:[s.jsx(Yl,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(ft,{className:`p-6 border-2 ${O.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(O.icon,{className:`h-8 w-8 ${O.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 ${O.textColor}`,children:O.label})]})]}),s.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[s.jsxs("div",{children:["Last scan: ",s.jsx("span",{className:"text-slate-300",children:R})]}),N.enabled&&N.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",Z," min"]})]}),N.enabled&&N.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(ft,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[N.processedItems," / ",N.totalItems," items (",D,"%)"]})]}),s.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${D===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${D}%`}})})]}),Object.entries(M).map(([T,K])=>s.jsxs(ft,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:T}),s.jsx("div",{className:"space-y-2",children:K.map(I=>s.jsx(aS,{item:I},I.hash))})]},T))]})};function aS({item:l}){const r=l.checked,d=l.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${r?"bg-slate-950/30 border-slate-800/50":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[r?s.jsx(G1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(ou,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Of,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${r?"line-through text-slate-600":"text-slate-200"}`,children:l.title}),l.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:l.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:r?s.jsx(Pa,{variant:"neutral",children:"Skipped"}):d?s.jsx(Pa,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(Pa,{variant:"warning",children:"Pending"})})]})}function nS(l){switch(l){case"complete":return{label:"Complete",icon:ou,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:qx,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:Yl,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:bn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:bn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function lS(l){const r={};for(const d of l){const c=d.section||"General";r[c]||(r[c]=[]),r[c].push(d)}return r}function sS(l){try{const r=new Date(l),c=new Date().getTime()-r.getTime(),f=Math.floor(c/6e4);if(f<1)return"Just now";if(f<60)return`${f} min ago`;const h=Math.floor(f/60);return h<24?`${h} hr ago`:`${Math.floor(h/24)} day(s) ago`}catch{return"Unknown"}}const gt=Oe.forwardRef(({className:l="",label:r,error:d,helperText:c,options:f,value:h,onChange:b,children:N,...v},p)=>{const S=Oe.useId(),C=v.id??S,j=d?`${C}-error`:void 0,D=!d&&c?`${C}-help`:void 0,O=[j,D].filter(Boolean).join(" ")||void 0,M=R=>{b&&b(R.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:C,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:p,id:C,"aria-describedby":O,"aria-invalid":d?!0:v["aria-invalid"],className:`
385
+ w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
386
+ px-3 py-2 pr-10 text-sm text-slate-200
387
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
388
+ disabled:opacity-50 disabled:cursor-not-allowed
389
+ transition-all duration-200
390
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
391
+ ${l}
392
+ `,value:h,onChange:M,...v,children:f?f.map(R=>s.jsx("option",{value:R.value,children:R.label},R.value)):N}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Zf,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:j,className:"mt-1.5 text-xs text-red-400",children:d}):c?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});gt.displayName="Select";const ze=Oe.forwardRef(({className:l="",label:r,error:d,helperText:c,rightIcon:f,...h},b)=>{const N=Oe.useId(),v=h.id??N,p=d?`${v}-error`:void 0,S=!d&&c?`${v}-help`:void 0,C=[p,S].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:v,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:b,id:v,"aria-describedby":C,"aria-invalid":d?!0:h["aria-invalid"],className:`
393
+ w-full rounded-lg bg-slate-950 border border-slate-800
394
+ px-3 py-2 text-sm text-slate-200
395
+ placeholder:text-slate-600
396
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
397
+ disabled:opacity-50 disabled:cursor-not-allowed
398
+ transition-all duration-200
399
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
400
+ ${f?"pr-10":""}
401
+ ${l}
402
+ `,...h}),f&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:f})]}),d?s.jsx("p",{id:p,className:"mt-1.5 text-xs text-red-400",children:d}):c?s.jsx("p",{id:S,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});ze.displayName="Input";var As={},Ma={},Fi={},_s={},Sf={},Dg;function rS(){return Dg||(Dg=1,Object.defineProperty(Sf,"__esModule",{value:!0})),Sf}var Zi={},Wi={},Ag;function Bs(){var r,d,c,f,h,sp,N;if(Ag)return Wi;Ag=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronField=void 0;let l=(N=class{constructor(p,S={rawValue:""}){Ke(this,h);Ke(this,r,!1);Ke(this,d,!1);Ke(this,c,!1);Ke(this,f,[]);K0(this,"options",{rawValue:""});if(!Array.isArray(p))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(p.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...S,rawValue:S.rawValue??""},we(this,f,p.sort(N.sorter)),we(this,c,this.options.wildcard!==void 0?this.options.wildcard:Ne(this,h,sp).call(this)),we(this,r,this.options.rawValue.includes("L")||p.includes("L")),we(this,d,this.options.rawValue.includes("?")||p.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return ee(this,r)}get hasQuestionMarkChar(){return ee(this,d)}get isWildcard(){return ee(this,c)}get values(){return ee(this,f)}static sorter(p,S){const C=typeof p=="number",j=typeof S=="number";return C&&j?p-S:!C&&!j?p.localeCompare(S):C?-1:1}static findNearestValueInList(p,S,C=!1){if(C){for(let j=p.length-1;j>=0;j--)if(p[j]<S)return p[j];return null}for(let j=0;j<p.length;j++)if(p[j]>S)return p[j];return null}findNearestValue(p,S=!1){return this.constructor.findNearestValueInList(this.values,p,S)}serialize(){return{wildcard:ee(this,c),values:ee(this,f)}}validate(){let p;const S=this.chars.length>0?` or chars ${this.chars.join("")}`:"",C=M=>R=>new RegExp(`^\\d{0,2}${R}$`).test(M),j=M=>(p=M,typeof M=="number"?M>=this.min&&M<=this.max:this.chars.some(C(M)));if(!ee(this,f).every(j))throw new Error(`${this.constructor.name} Validation error, got value ${p} expected range ${this.min}-${this.max}${S}`);const O=ee(this,f).find((M,R)=>ee(this,f).indexOf(M)!==R);if(O)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${O}`)}},r=new WeakMap,d=new WeakMap,c=new WeakMap,f=new WeakMap,h=new WeakSet,sp=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(p,S)=>S+this.min).every(p=>ee(this,f).includes(p))},N);return Wi.CronField=l,Wi}var _g;function iS(){if(_g)return Zi;_g=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronDayOfMonth=void 0;const l=Bs(),r=1,d=31,c=Object.freeze(["L"]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(b,N){super(b,N),this.validate()}get values(){return super.values}};return Zi.CronDayOfMonth=f,Zi}var Qi={},kg;function uS(){if(kg)return Qi;kg=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronDayOfWeek=void 0;const l=Bs(),r=0,d=7,c=Object.freeze(["L"]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(b,N){super(b,N),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Qi.CronDayOfWeek=f,Qi}var Ii={},zg;function cS(){if(zg)return Ii;zg=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronHour=void 0;const l=Bs(),r=0,d=23,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}constructor(b,N){super(b,N),this.validate()}get values(){return super.values}};return Ii.CronHour=f,Ii}var Xi={},Ug;function oS(){if(Ug)return Xi;Ug=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronMinute=void 0;const l=Bs(),r=0,d=59,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}constructor(b,N){super(b,N),this.validate()}get values(){return super.values}};return Xi.CronMinute=f,Xi}var Ji={},Nf={},ya={},Lg;function dS(){if(Lg)return ya;Lg=1,Object.defineProperty(ya,"__esModule",{value:!0});class l extends Error{}class r extends l{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class d extends l{constructor(i){super(`Invalid Interval: ${i.toMessage()}`)}}class c extends l{constructor(i){super(`Invalid Duration: ${i.toMessage()}`)}}class f extends l{}class h extends l{constructor(i){super(`Invalid unit ${i}`)}}class b extends l{}class N extends l{constructor(){super("Zone is an abstract class")}}const v="numeric",p="short",S="long",C={year:v,month:v,day:v},j={year:v,month:p,day:v},D={year:v,month:p,day:v,weekday:p},O={year:v,month:S,day:v},M={year:v,month:S,day:v,weekday:S},R={hour:v,minute:v},Z={hour:v,minute:v,second:v},T={hour:v,minute:v,second:v,timeZoneName:p},K={hour:v,minute:v,second:v,timeZoneName:S},I={hour:v,minute:v,hourCycle:"h23"},oe={hour:v,minute:v,second:v,hourCycle:"h23"},Y={hour:v,minute:v,second:v,hourCycle:"h23",timeZoneName:p},G={hour:v,minute:v,second:v,hourCycle:"h23",timeZoneName:S},$={year:v,month:v,day:v,hour:v,minute:v},ne={year:v,month:v,day:v,hour:v,minute:v,second:v},k={year:v,month:p,day:v,hour:v,minute:v},ae={year:v,month:p,day:v,hour:v,minute:v,second:v},F={year:v,month:p,day:v,weekday:p,hour:v,minute:v},ue={year:v,month:S,day:v,hour:v,minute:v,timeZoneName:p},xe={year:v,month:S,day:v,hour:v,minute:v,second:v,timeZoneName:p},J={year:v,month:S,day:v,weekday:S,hour:v,minute:v,timeZoneName:S},B={year:v,month:S,day:v,weekday:S,hour:v,minute:v,second:v,timeZoneName:S};class re{get type(){throw new N}get name(){throw new N}get ianaName(){return this.name}get isUniversal(){throw new N}offsetName(i,m){throw new N}formatOffset(i,m){throw new N}offset(i){throw new N}equals(i){throw new N}get isValid(){throw new N}}let ge=null;class Se extends re{static get instance(){return ge===null&&(ge=new Se),ge}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:m,locale:y}){return On(i,m,y)}formatOffset(i,m){return as(this.offset(i),m)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const ke=new Map;function z(g){let i=ke.get(g);return i===void 0&&(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),ke.set(g,i)),i}const le={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function he(g,i){const m=g.format(i).replace(/\u200E/g,""),y=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(m),[,w,A,U,L,V,fe,ye]=y;return[U,w,A,L,V,fe,ye]}function me(g,i){const m=g.formatToParts(i),y=[];for(let w=0;w<m.length;w++){const{type:A,value:U}=m[w],L=le[A];A==="era"?y[L]=U:Me(L)||(y[L]=parseInt(U,10))}return y}const Ee=new Map;class de extends re{static create(i){let m=Ee.get(i);return m===void 0&&Ee.set(i,m=new de(i)),m}static resetCache(){Ee.clear(),ke.clear()}static isValidSpecifier(i){return this.isValidZone(i)}static isValidZone(i){if(!i)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:i}).format(),!0}catch{return!1}}constructor(i){super(),this.zoneName=i,this.valid=de.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(i,{format:m,locale:y}){return On(i,m,y,this.name)}formatOffset(i,m){return as(this.offset(i),m)}offset(i){if(!this.valid)return NaN;const m=new Date(i);if(isNaN(m))return NaN;const y=z(this.name);let[w,A,U,L,V,fe,ye]=y.formatToParts?me(y,m):he(y,m);L==="BC"&&(w=-Math.abs(w)+1);const Ge=Zt({year:w,month:A,day:U,hour:V===24?0:V,minute:fe,second:ye,millisecond:0});let De=+m;const yt=De%1e3;return De-=yt>=0?yt:1e3+yt,(Ge-De)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let _e={};function ct(g,i={}){const m=JSON.stringify([g,i]);let y=_e[m];return y||(y=new Intl.ListFormat(g,i),_e[m]=y),y}const Xe=new Map;function Kt(g,i={}){const m=JSON.stringify([g,i]);let y=Xe.get(m);return y===void 0&&(y=new Intl.DateTimeFormat(g,i),Xe.set(m,y)),y}const cn=new Map;function Pl(g,i={}){const m=JSON.stringify([g,i]);let y=cn.get(m);return y===void 0&&(y=new Intl.NumberFormat(g,i),cn.set(m,y)),y}const Nn=new Map;function Fa(g,i={}){const{base:m,...y}=i,w=JSON.stringify([g,y]);let A=Nn.get(w);return A===void 0&&(A=new Intl.RelativeTimeFormat(g,i),Nn.set(w,A)),A}let Za=null;function Gl(){return Za||(Za=new Intl.DateTimeFormat().resolvedOptions().locale,Za)}const Fl=new Map;function Zl(g){let i=Fl.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),Fl.set(g,i)),i}const jn=new Map;function pe(g){let i=jn.get(g);if(!i){const m=new Intl.Locale(g);i="getWeekInfo"in m?m.getWeekInfo():m.weekInfo,"minimalDays"in i||(i={...Kn,...i}),jn.set(g,i)}return i}function Te(g){const i=g.indexOf("-x-");i!==-1&&(g=g.substring(0,i));const m=g.indexOf("-u-");if(m===-1)return[g];{let y,w;try{y=Kt(g).resolvedOptions(),w=g}catch{const V=g.substring(0,m);y=Kt(V).resolvedOptions(),w=V}const{numberingSystem:A,calendar:U}=y;return[w,A,U]}}function Ot(g,i,m){return(m||i)&&(g.includes("-u-")||(g+="-u"),m&&(g+=`-ca-${m}`),i&&(g+=`-nu-${i}`)),g}function qt(g){const i=[];for(let m=1;m<=12;m++){const y=je.utc(2009,m,1);i.push(g(y))}return i}function St(g){const i=[];for(let m=1;m<=7;m++){const y=je.utc(2016,11,13+m);i.push(g(y))}return i}function wn(g,i,m,y){const w=g.listingMode();return w==="error"?null:w==="en"?m(i):y(i)}function Wl(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||Zl(g.locale).numberingSystem==="latn"}class Ql{constructor(i,m,y){this.padTo=y.padTo||0,this.floor=y.floor||!1;const{padTo:w,floor:A,...U}=y;if(!m||Object.keys(U).length>0){const L={useGrouping:!1,...y};y.padTo>0&&(L.minimumIntegerDigits=y.padTo),this.inf=Pl(i,L)}}format(i){if(this.inf){const m=this.floor?Math.floor(i):i;return this.inf.format(m)}else{const m=this.floor?Math.floor(i):Kl(i,3);return et(m,this.padTo)}}}class En{constructor(i,m,y){this.opts=y,this.originalZone=void 0;let w;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const U=-1*(i.offset/60),L=U>=0?`Etc/GMT+${U}`:`Etc/GMT${U}`;i.offset!==0&&de.create(L).valid?(w=L,this.dt=i):(w="UTC",this.dt=i.offset===0?i:i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone)}else i.zone.type==="system"?this.dt=i:i.zone.type==="iana"?(this.dt=i,w=i.zone.name):(w="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const A={...this.opts};A.timeZone=A.timeZone||w,this.dtf=Kt(m,A)}format(){return this.originalZone?this.formatToParts().map(({value:i})=>i).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const i=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?i.map(m=>{if(m.type==="timeZoneName"){const y=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...m,value:y}}else return m}):i}resolvedOptions(){return this.dtf.resolvedOptions()}}class Ys{constructor(i,m,y){this.opts={style:"long",...y},!m&&Gr()&&(this.rtf=Fa(i,y))}format(i,m){return this.rtf?this.rtf.format(i,m):hn(m,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,m){return this.rtf?this.rtf.formatToParts(i,m):[]}}const Kn={firstDay:1,minimalDays:4,weekend:[6,7]};class He{static fromOpts(i){return He.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,m,y,w,A=!1){const U=i||dt.defaultLocale,L=U||(A?"en-US":Gl()),V=m||dt.defaultNumberingSystem,fe=y||dt.defaultOutputCalendar,ye=Fr(w)||dt.defaultWeekSettings;return new He(L,V,fe,ye,U)}static resetCache(){Za=null,Xe.clear(),cn.clear(),Nn.clear(),Fl.clear(),jn.clear()}static fromObject({locale:i,numberingSystem:m,outputCalendar:y,weekSettings:w}={}){return He.create(i,m,y,w)}constructor(i,m,y,w,A){const[U,L,V]=Te(i);this.locale=U,this.numberingSystem=m||L||null,this.outputCalendar=y||V||null,this.weekSettings=w,this.intl=Ot(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=A,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Wl(this)),this.fastNumbersCached}listingMode(){const i=this.isEnglish(),m=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return i&&m?"en":"intl"}clone(i){return!i||Object.getOwnPropertyNames(i).length===0?this:He.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,Fr(i.weekSettings)||this.weekSettings,i.defaultToEN||!1)}redefaultToEN(i={}){return this.clone({...i,defaultToEN:!0})}redefaultToSystem(i={}){return this.clone({...i,defaultToEN:!1})}months(i,m=!1){return wn(this,i,Nu,()=>{const y=this.intl==="ja"||this.intl.startsWith("ja-");m&=!y;const w=m?{month:i,day:"numeric"}:{month:i},A=m?"format":"standalone";if(!this.monthsCache[A][i]){const U=y?L=>this.dtFormatter(L,w).format():L=>this.extract(L,w,"month");this.monthsCache[A][i]=qt(U)}return this.monthsCache[A][i]})}weekdays(i,m=!1){return wn(this,i,Js,()=>{const y=m?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},w=m?"format":"standalone";return this.weekdaysCache[w][i]||(this.weekdaysCache[w][i]=St(A=>this.extract(A,y,"weekday"))),this.weekdaysCache[w][i]})}meridiems(){return wn(this,void 0,()=>Rn,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[je.utc(2016,11,13,9),je.utc(2016,11,13,19)].map(m=>this.extract(m,i,"dayperiod"))}return this.meridiemCache})}eras(i){return wn(this,i,Xr,()=>{const m={era:i};return this.eraCache[i]||(this.eraCache[i]=[je.utc(-40,1,1),je.utc(2017,1,1)].map(y=>this.extract(y,m,"era"))),this.eraCache[i]})}extract(i,m,y){const w=this.dtFormatter(i,m),A=w.formatToParts(),U=A.find(L=>L.type.toLowerCase()===y);return U?U.value:null}numberFormatter(i={}){return new Ql(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,m={}){return new En(i,this.intl,m)}relFormatter(i={}){return new Ys(this.intl,this.isEnglish(),i)}listFormatter(i={}){return ct(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Zl(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:dn()?pe(this.locale):Kn}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(i){return this.locale===i.locale&&this.numberingSystem===i.numberingSystem&&this.outputCalendar===i.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let ba=null;class ot extends re{static get utcInstance(){return ba===null&&(ba=new ot(0)),ba}static instance(i){return i===0?ot.utcInstance:new ot(i)}static parseSpecifier(i){if(i){const m=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(m)return new ot(ts(m[1],m[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${as(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${as(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,m){return as(this.fixed,m)}get isUniversal(){return!0}offset(){return this.fixed}equals(i){return i.type==="fixed"&&i.fixed===this.fixed}get isValid(){return!0}}class zt extends re{constructor(i){super(),this.zoneName=i}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Pt(g,i){if(Me(g)||g===null)return i;if(g instanceof re)return g;if(Rt(g)){const m=g.toLowerCase();return m==="default"?i:m==="local"||m==="system"?Se.instance:m==="utc"||m==="gmt"?ot.utcInstance:ot.parseSpecifier(m)||de.create(g)}else return ua(g)?ot.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new zt(g)}const Gt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},fu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},lo=Gt.hanidec.replace(/[\[|\]]/g,"").split("");function so(g){let i=parseInt(g,10);if(isNaN(i)){i="";for(let m=0;m<g.length;m++){const y=g.charCodeAt(m);if(g[m].search(Gt.hanidec)!==-1)i+=lo.indexOf(g[m]);else for(const w in fu){const[A,U]=fu[w];y>=A&&y<=U&&(i+=y-A)}}return parseInt(i,10)}else return i}const el=new Map;function $s(){el.clear()}function ea({numberingSystem:g},i=""){const m=g||"latn";let y=el.get(m);y===void 0&&(y=new Map,el.set(m,y));let w=y.get(i);return w===void 0&&(w=new RegExp(`${Gt[m]}${i}`),y.set(i,w)),w}let on=()=>Date.now(),Il="system",tl=null,hu=null,Yr=null,Ps=60,al,mu=null;class dt{static get now(){return on}static set now(i){on=i}static set defaultZone(i){Il=i}static get defaultZone(){return Pt(Il,Se.instance)}static get defaultLocale(){return tl}static set defaultLocale(i){tl=i}static get defaultNumberingSystem(){return hu}static set defaultNumberingSystem(i){hu=i}static get defaultOutputCalendar(){return Yr}static set defaultOutputCalendar(i){Yr=i}static get defaultWeekSettings(){return mu}static set defaultWeekSettings(i){mu=Fr(i)}static get twoDigitCutoffYear(){return Ps}static set twoDigitCutoffYear(i){Ps=i%100}static get throwOnInvalid(){return al}static set throwOnInvalid(i){al=i}static resetCaches(){He.resetCache(),de.resetCache(),je.resetCache(),$s()}}class ia{constructor(i,m){this.reason=i,this.explanation=m}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const $r=[0,31,59,90,120,151,181,212,243,273,304,334],Gs=[0,31,60,91,121,152,182,213,244,274,305,335];function ta(g,i){return new ia("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function Fs(g,i,m){const y=new Date(Date.UTC(g,i-1,m));g<100&&g>=0&&y.setUTCFullYear(y.getUTCFullYear()-1900);const w=y.getUTCDay();return w===0?7:w}function Pr(g,i,m){return m+(ll(g)?Gs:$r)[i-1]}function Wa(g,i){const m=ll(g)?Gs:$r,y=m.findIndex(A=>A<i),w=i-m[y];return{month:y+1,day:w}}function Nt(g,i){return(g-i+7)%7+1}function Ut(g,i=4,m=1){const{year:y,month:w,day:A}=g,U=Pr(y,w,A),L=Nt(Fs(y,w,A),m);let V=Math.floor((U-L+14-i)/7),fe;return V<1?(fe=y-1,V=sl(fe,i,m)):V>sl(y,i,m)?(fe=y+1,V=1):fe=y,{weekYear:fe,weekNumber:V,weekday:L,...ns(g)}}function Tn(g,i=4,m=1){const{weekYear:y,weekNumber:w,weekday:A}=g,U=Nt(Fs(y,1,i),m),L=Ia(y);let V=w*7+A-U-7+i,fe;V<1?(fe=y-1,V+=Ia(fe)):V>L?(fe=y+1,V-=Ia(y)):fe=y;const{month:ye,day:Ue}=Wa(fe,V);return{year:fe,month:ye,day:Ue,...ns(g)}}function Xl(g){const{year:i,month:m,day:y}=g,w=Pr(i,m,y);return{year:i,ordinal:w,...ns(g)}}function gu(g){const{year:i,ordinal:m}=g,{month:y,day:w}=Wa(i,m);return{year:i,month:y,day:w,...ns(g)}}function xu(g,i){if(!Me(g.localWeekday)||!Me(g.localWeekNumber)||!Me(g.localWeekYear)){if(!Me(g.weekday)||!Me(g.weekNumber)||!Me(g.weekYear))throw new f("Cannot mix locale-based week fields with ISO-based week fields");return Me(g.localWeekday)||(g.weekday=g.localWeekday),Me(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),Me(g.localWeekYear)||(g.weekYear=g.localWeekYear),delete g.localWeekday,delete g.localWeekNumber,delete g.localWeekYear,{minDaysInFirstWeek:i.getMinDaysInFirstWeek(),startOfWeek:i.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function pu(g,i=4,m=1){const y=Qa(g.weekYear),w=Ft(g.weekNumber,1,sl(g.weekYear,i,m)),A=Ft(g.weekday,1,7);return y?w?A?!1:ta("weekday",g.weekday):ta("week",g.weekNumber):ta("weekYear",g.weekYear)}function Jl(g){const i=Qa(g.year),m=Ft(g.ordinal,1,Ia(g.year));return i?m?!1:ta("ordinal",g.ordinal):ta("year",g.year)}function Zs(g){const i=Qa(g.year),m=Ft(g.month,1,12),y=Ft(g.day,1,Qs(g.year,g.month));return i?m?y?!1:ta("day",g.day):ta("month",g.month):ta("year",g.year)}function Cn(g){const{hour:i,minute:m,second:y,millisecond:w}=g,A=Ft(i,0,23)||i===24&&m===0&&y===0&&w===0,U=Ft(m,0,59),L=Ft(y,0,59),V=Ft(w,0,999);return A?U?L?V?!1:ta("millisecond",w):ta("second",y):ta("minute",m):ta("hour",i)}function Me(g){return typeof g>"u"}function ua(g){return typeof g=="number"}function Qa(g){return typeof g=="number"&&g%1===0}function Rt(g){return typeof g=="string"}function yu(g){return Object.prototype.toString.call(g)==="[object Date]"}function Gr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function dn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function nl(g){return Array.isArray(g)?g:[g]}function vu(g,i,m){if(g.length!==0)return g.reduce((y,w)=>{const A=[i(w),w];return y&&m(y[0],A[0])===y[0]?y:A},null)[1]}function bu(g,i){return i.reduce((m,y)=>(m[y]=g[y],m),{})}function Mn(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function Fr(g){if(g==null)return null;if(typeof g!="object")throw new b("Week settings must be an object");if(!Ft(g.firstDay,1,7)||!Ft(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Ft(i,1,7)))throw new b("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Ft(g,i,m){return Qa(g)&&g>=i&&g<=m}function Ws(g,i){return g-i*Math.floor(g/i)}function et(g,i=2){const m=g<0;let y;return m?y="-"+(""+-g).padStart(i,"0"):y=(""+g).padStart(i,"0"),y}function jt(g){if(!(Me(g)||g===null||g===""))return parseInt(g,10)}function fn(g){if(!(Me(g)||g===null||g===""))return parseFloat(g)}function Zr(g){if(!(Me(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function Kl(g,i,m="round"){const y=10**i;switch(m){case"expand":return g>0?Math.ceil(g*y)/y:Math.floor(g*y)/y;case"trunc":return Math.trunc(g*y)/y;case"round":return Math.round(g*y)/y;case"floor":return Math.floor(g*y)/y;case"ceil":return Math.ceil(g*y)/y;default:throw new RangeError(`Value rounding ${m} is out of range`)}}function ll(g){return g%4===0&&(g%100!==0||g%400===0)}function Ia(g){return ll(g)?366:365}function Qs(g,i){const m=Ws(i-1,12)+1,y=g+(i-m)/12;return m===2?ll(y)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][m-1]}function Zt(g){let i=Date.UTC(g.year,g.month-1,g.day,g.hour,g.minute,g.second,g.millisecond);return g.year<100&&g.year>=0&&(i=new Date(i),i.setUTCFullYear(g.year,g.month-1,g.day)),+i}function Is(g,i,m){return-Nt(Fs(g,1,i),m)+i-1}function sl(g,i=4,m=1){const y=Is(g,i,m),w=Is(g+1,i,m);return(Ia(g)-y+w)/7}function es(g){return g>99?g:g>dt.twoDigitCutoffYear?1900+g:2e3+g}function On(g,i,m,y=null){const w=new Date(g),A={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};y&&(A.timeZone=y);const U={timeZoneName:i,...A},L=new Intl.DateTimeFormat(m,U).formatToParts(w).find(V=>V.type.toLowerCase()==="timezonename");return L?L.value:null}function ts(g,i){let m=parseInt(g,10);Number.isNaN(m)&&(m=0);const y=parseInt(i,10)||0,w=m<0||Object.is(m,-0)?-y:y;return m*60+w}function Wr(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new b(`Invalid unit value ${g}`);return i}function Xa(g,i){const m={};for(const y in g)if(Mn(g,y)){const w=g[y];if(w==null)continue;m[i(y)]=Wr(w)}return m}function as(g,i){const m=Math.trunc(Math.abs(g/60)),y=Math.trunc(Math.abs(g%60)),w=g>=0?"+":"-";switch(i){case"short":return`${w}${et(m,2)}:${et(y,2)}`;case"narrow":return`${w}${m}${y>0?`:${y}`:""}`;case"techie":return`${w}${et(m,2)}${et(y,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function ns(g){return bu(g,["hour","minute","second","millisecond"])}const Su=["January","February","March","April","May","June","July","August","September","October","November","December"],Xs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ro=["J","F","M","A","M","J","J","A","S","O","N","D"];function Nu(g){switch(g){case"narrow":return[...ro];case"short":return[...Xs];case"long":return[...Su];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 ls=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Da=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Qr=["M","T","W","T","F","S","S"];function Js(g){switch(g){case"narrow":return[...Qr];case"short":return[...Da];case"long":return[...ls];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Rn=["AM","PM"],rl=["Before Christ","Anno Domini"],ju=["BC","AD"],Ir=["B","A"];function Xr(g){switch(g){case"narrow":return[...Ir];case"short":return[...ju];case"long":return[...rl];default:return null}}function ss(g){return Rn[g.hour<12?0:1]}function Ja(g,i){return Js(i)[g.weekday-1]}function Jr(g,i){return Nu(i)[g.month-1]}function rs(g,i){return Xr(i)[g.year<0?0:1]}function hn(g,i,m="always",y=!1){const w={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},A=["hours","minutes","seconds"].indexOf(g)===-1;if(m==="auto"&&A){const Ue=g==="days";switch(i){case 1:return Ue?"tomorrow":`next ${w[g][0]}`;case-1:return Ue?"yesterday":`last ${w[g][0]}`;case 0:return Ue?"today":`this ${w[g][0]}`}}const U=Object.is(i,-0)||i<0,L=Math.abs(i),V=L===1,fe=w[g],ye=y?V?fe[1]:fe[2]||fe[1]:V?w[g][0]:g;return U?`${L} ${ye} ago`:`in ${L} ${ye}`}function Ks(g,i){let m="";for(const y of g)y.literal?m+=y.val:m+=i(y.val);return m}const er={D:C,DD:j,DDD:O,DDDD:M,t:R,tt:Z,ttt:T,tttt:K,T:I,TT:oe,TTT:Y,TTTT:G,f:$,ff:k,fff:ue,ffff:J,F:ne,FF:ae,FFF:xe,FFFF:B};class Lt{static create(i,m={}){return new Lt(i,m)}static parseFormat(i){let m=null,y="",w=!1;const A=[];for(let U=0;U<i.length;U++){const L=i.charAt(U);L==="'"?((y.length>0||w)&&A.push({literal:w||/^\s+$/.test(y),val:y===""?"'":y}),m=null,y="",w=!w):w||L===m?y+=L:(y.length>0&&A.push({literal:/^\s+$/.test(y),val:y}),y=L,m=L)}return y.length>0&&A.push({literal:w||/^\s+$/.test(y),val:y}),A}static macroTokenToFormatOpts(i){return er[i]}constructor(i,m){this.opts=m,this.loc=i,this.systemLoc=null}formatWithSystemDefault(i,m){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(i,{...this.opts,...m}).format()}dtFormatter(i,m={}){return this.loc.dtFormatter(i,{...this.opts,...m})}formatDateTime(i,m){return this.dtFormatter(i,m).format()}formatDateTimeParts(i,m){return this.dtFormatter(i,m).formatToParts()}formatInterval(i,m){return this.dtFormatter(i.start,m).dtf.formatRange(i.start.toJSDate(),i.end.toJSDate())}resolvedOptions(i,m){return this.dtFormatter(i,m).resolvedOptions()}num(i,m=0,y=void 0){if(this.opts.forceSimple)return et(i,m);const w={...this.opts};return m>0&&(w.padTo=m),y&&(w.signDisplay=y),this.loc.numberFormatter(w).format(i)}formatDateTimeFromString(i,m){const y=this.loc.listingMode()==="en",w=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",A=(De,yt)=>this.loc.extract(i,De,yt),U=De=>i.isOffsetFixed&&i.offset===0&&De.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,De.format):"",L=()=>y?ss(i):A({hour:"numeric",hourCycle:"h12"},"dayperiod"),V=(De,yt)=>y?Jr(i,De):A(yt?{month:De}:{month:De,day:"numeric"},"month"),fe=(De,yt)=>y?Ja(i,De):A(yt?{weekday:De}:{weekday:De,month:"long",day:"numeric"},"weekday"),ye=De=>{const yt=Lt.macroTokenToFormatOpts(De);return yt?this.formatWithSystemDefault(i,yt):De},Ue=De=>y?rs(i,De):A({era:De},"era"),Ge=De=>{switch(De){case"S":return this.num(i.millisecond);case"u":case"SSS":return this.num(i.millisecond,3);case"s":return this.num(i.second);case"ss":return this.num(i.second,2);case"uu":return this.num(Math.floor(i.millisecond/10),2);case"uuu":return this.num(Math.floor(i.millisecond/100));case"m":return this.num(i.minute);case"mm":return this.num(i.minute,2);case"h":return this.num(i.hour%12===0?12:i.hour%12);case"hh":return this.num(i.hour%12===0?12:i.hour%12,2);case"H":return this.num(i.hour);case"HH":return this.num(i.hour,2);case"Z":return 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 i.zone.offsetName(i.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return i.zone.offsetName(i.ts,{format:"long",locale:this.loc.locale});case"z":return i.zoneName;case"a":return L();case"d":return w?A({day:"numeric"},"day"):this.num(i.day);case"dd":return w?A({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return fe("short",!0);case"cccc":return fe("long",!0);case"ccccc":return fe("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return fe("short",!1);case"EEEE":return fe("long",!1);case"EEEEE":return fe("narrow",!1);case"L":return w?A({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return w?A({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return V("short",!0);case"LLLL":return V("long",!0);case"LLLLL":return V("narrow",!0);case"M":return w?A({month:"numeric"},"month"):this.num(i.month);case"MM":return w?A({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return V("short",!1);case"MMMM":return V("long",!1);case"MMMMM":return V("narrow",!1);case"y":return w?A({year:"numeric"},"year"):this.num(i.year);case"yy":return w?A({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return w?A({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return w?A({year:"numeric"},"year"):this.num(i.year,6);case"G":return Ue("short");case"GG":return Ue("long");case"GGGGG":return Ue("narrow");case"kk":return this.num(i.weekYear.toString().slice(-2),2);case"kkkk":return this.num(i.weekYear,4);case"W":return this.num(i.weekNumber);case"WW":return this.num(i.weekNumber,2);case"n":return this.num(i.localWeekNumber);case"nn":return this.num(i.localWeekNumber,2);case"ii":return this.num(i.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(i.localWeekYear,4);case"o":return this.num(i.ordinal);case"ooo":return this.num(i.ordinal,3);case"q":return this.num(i.quarter);case"qq":return this.num(i.quarter,2);case"X":return this.num(Math.floor(i.ts/1e3));case"x":return this.num(i.ts);default:return ye(De)}};return Ks(Lt.parseFormat(m),Ge)}formatDurationFromString(i,m){const y=this.opts.signMode==="negativeLargestOnly"?-1:1,w=ye=>{switch(ye[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}},A=(ye,Ue)=>Ge=>{const De=w(Ge);if(De){const yt=Ue.isNegativeDuration&&De!==Ue.largestUnit?y:1;let Vt;return this.opts.signMode==="negativeLargestOnly"&&De!==Ue.largestUnit?Vt="never":this.opts.signMode==="all"?Vt="always":Vt="auto",this.num(ye.get(De)*yt,Ge.length,Vt)}else return Ge},U=Lt.parseFormat(m),L=U.reduce((ye,{literal:Ue,val:Ge})=>Ue?ye:ye.concat(Ge),[]),V=i.shiftTo(...L.map(w).filter(ye=>ye)),fe={isNegativeDuration:V<0,largestUnit:Object.keys(V.values)[0]};return Ks(U,A(V,fe))}}const is=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ka(...g){const i=g.reduce((m,y)=>m+y.source,"");return RegExp(`^${i}$`)}function Dn(...g){return i=>g.reduce(([m,y,w],A)=>{const[U,L,V]=A(i,w);return[{...m,...U},L||y,V]},[{},null,1]).slice(0,2)}function wt(g,...i){if(g==null)return[null,null];for(const[m,y]of i){const w=m.exec(g);if(w)return y(w)}return[null,null]}function mn(...g){return(i,m)=>{const y={};let w;for(w=0;w<g.length;w++)y[g[w]]=jt(i[m+w]);return[y,null,m+w]}}const us=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,cs=`(?:${us.source}?(?:\\[(${is.source})\\])?)?`,Kr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,tr=RegExp(`${Kr.source}${cs}`),os=RegExp(`(?:[Tt]${tr.source})?`),ds=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ar=/(\d{4})-?W(\d\d)(?:-?(\d))?/,wu=/(\d{4})-?(\d{3})/,io=mn("weekYear","weekNumber","weekDay"),uo=mn("year","ordinal"),co=/(\d{4})-(\d\d)-(\d\d)/,nr=RegExp(`${Kr.source} ?(?:${us.source}|(${is.source}))?`),oo=RegExp(`(?: ${nr.source})?`);function il(g,i,m){const y=g[i];return Me(y)?m:jt(y)}function fo(g,i){return[{year:il(g,i),month:il(g,i+1,1),day:il(g,i+2,1)},null,i+3]}function ul(g,i){return[{hours:il(g,i,0),minutes:il(g,i+1,0),seconds:il(g,i+2,0),milliseconds:Zr(g[i+3])},null,i+4]}function fs(g,i){const m=!g[i]&&!g[i+1],y=ts(g[i+1],g[i+2]),w=m?null:ot.instance(y);return[{},w,i+3]}function cl(g,i){const m=g[i]?de.create(g[i]):null;return[{},m,i+1]}const ho=RegExp(`^T?${Kr.source}$`),mo=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function go(g){const[i,m,y,w,A,U,L,V,fe]=g,ye=i[0]==="-",Ue=V&&V[0]==="-",Ge=(De,yt=!1)=>De!==void 0&&(yt||De&&ye)?-De:De;return[{years:Ge(fn(m)),months:Ge(fn(y)),weeks:Ge(fn(w)),days:Ge(fn(A)),hours:Ge(fn(U)),minutes:Ge(fn(L)),seconds:Ge(fn(V),V==="-0"),milliseconds:Ge(Zr(fe),Ue)}]}const xo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function hs(g,i,m,y,w,A,U){const L={year:i.length===2?es(jt(i)):jt(i),month:Xs.indexOf(m)+1,day:jt(y),hour:jt(w),minute:jt(A)};return U&&(L.second=jt(U)),g&&(L.weekday=g.length>3?ls.indexOf(g)+1:Da.indexOf(g)+1),L}const po=/^(?:(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[,i,m,y,w,A,U,L,V,fe,ye,Ue]=g,Ge=hs(i,w,y,m,A,U,L);let De;return V?De=xo[V]:fe?De=0:De=ts(ye,Ue),[Ge,new ot(De)]}function vo(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Eu=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,bo=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,So=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Tu(g){const[,i,m,y,w,A,U,L]=g;return[hs(i,w,y,m,A,U,L),ot.utcInstance]}function No(g){const[,i,m,y,w,A,U,L]=g;return[hs(i,L,m,y,w,A,U),ot.utcInstance]}const jo=Ka(ds,os),wo=Ka(ar,os),Eo=Ka(wu,os),To=Ka(tr),Cu=Dn(fo,ul,fs,cl),ei=Dn(io,ul,fs,cl),ms=Dn(uo,ul,fs,cl),Co=Dn(ul,fs,cl);function Mu(g){return wt(g,[jo,Cu],[wo,ei],[Eo,ms],[To,Co])}function Ou(g){return wt(vo(g),[po,yo])}function Ru(g){return wt(g,[Eu,Tu],[bo,Tu],[So,No])}function Du(g){return wt(g,[mo,go])}const Au=Dn(ul);function ol(g){return wt(g,[ho,Au])}const Mo=Ka(co,oo),Oo=Ka(nr),Ro=Dn(ul,fs,cl);function _u(g){return wt(g,[Mo,Cu],[Oo,Ro])}const ti="Invalid Duration",dl={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}},gs={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},...dl},ca=146097/400,en=146097/4800,ku={years:{quarters:4,months:12,weeks:ca/7,days:ca,hours:ca*24,minutes:ca*24*60,seconds:ca*24*60*60,milliseconds:ca*24*60*60*1e3},quarters:{months:3,weeks:ca/28,days:ca/4,hours:ca*24/4,minutes:ca*24*60/4,seconds:ca*24*60*60/4,milliseconds:ca*24*60*60*1e3/4},months:{weeks:en/7,days:en,hours:en*24,minutes:en*24*60,seconds:en*24*60*60,milliseconds:en*24*60*60*1e3},...dl},gn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ai=gn.slice(0).reverse();function Sa(g,i,m=!1){const y={values:m?i.values:{...g.values,...i.values||{}},loc:g.loc.clone(i.loc),conversionAccuracy:i.conversionAccuracy||g.conversionAccuracy,matrix:i.matrix||g.matrix};return new Pe(y)}function ni(g,i){var m;let y=(m=i.milliseconds)!=null?m:0;for(const w of ai.slice(1))i[w]&&(y+=i[w]*g[w].milliseconds);return y}function li(g,i){const m=ni(g,i)<0?-1:1;gn.reduceRight((y,w)=>{if(Me(i[w]))return y;if(y){const A=i[y]*m,U=g[w][y],L=Math.floor(A/U);i[w]+=L*m,i[y]-=L*U*m}return w},null),gn.reduce((y,w)=>{if(Me(i[w]))return y;if(y){const A=i[y]%1;i[y]-=A,i[w]+=A*g[y][w]}return w},null)}function si(g){const i={};for(const[m,y]of Object.entries(g))y!==0&&(i[m]=y);return i}class Pe{constructor(i){const m=i.conversionAccuracy==="longterm"||!1;let y=m?ku:gs;i.matrix&&(y=i.matrix),this.values=i.values,this.loc=i.loc||He.create(),this.conversionAccuracy=m?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=y,this.isLuxonDuration=!0}static fromMillis(i,m){return Pe.fromObject({milliseconds:i},m)}static fromObject(i,m={}){if(i==null||typeof i!="object")throw new b(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new Pe({values:Xa(i,Pe.normalizeUnit),loc:He.fromObject(m),conversionAccuracy:m.conversionAccuracy,matrix:m.matrix})}static fromDurationLike(i){if(ua(i))return Pe.fromMillis(i);if(Pe.isDuration(i))return i;if(typeof i=="object")return Pe.fromObject(i);throw new b(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,m){const[y]=Du(i);return y?Pe.fromObject(y,m):Pe.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,m){const[y]=ol(i);return y?Pe.fromObject(y,m):Pe.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,m=null){if(!i)throw new b("need to specify a reason the Duration is invalid");const y=i instanceof ia?i:new ia(i,m);if(dt.throwOnInvalid)throw new c(y);return new Pe({invalid:y})}static normalizeUnit(i){const m={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[i&&i.toLowerCase()];if(!m)throw new h(i);return m}static isDuration(i){return i&&i.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(i,m={}){const y={...m,floor:m.round!==!1&&m.floor!==!1};return this.isValid?Lt.create(this.loc,y).formatDurationFromString(this,i):ti}toHuman(i={}){if(!this.isValid)return ti;const m=i.showZeros!==!1,y=gn.map(w=>{const A=this.values[w];return Me(A)||A===0&&!m?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:w.slice(0,-1)}).format(A)}).filter(w=>w);return this.loc.listFormatter({type:"conjunction",style:i.listStyle||"narrow",...i}).format(y)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let i="P";return this.years!==0&&(i+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(i+=this.months+this.quarters*3+"M"),this.weeks!==0&&(i+=this.weeks+"W"),this.days!==0&&(i+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(i+="T"),this.hours!==0&&(i+=this.hours+"H"),this.minutes!==0&&(i+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(i+=Kl(this.seconds+this.milliseconds/1e3,3)+"S"),i==="P"&&(i+="T0S"),i}toISOTime(i={}){if(!this.isValid)return null;const m=this.toMillis();return m<0||m>=864e5?null:(i={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...i,includeOffset:!1},je.fromMillis(m,{zone:"UTC"}).toISOTime(i))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ni(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const m=Pe.fromDurationLike(i),y={};for(const w of gn)(Mn(m.values,w)||Mn(this.values,w))&&(y[w]=m.get(w)+this.get(w));return Sa(this,{values:y},!0)}minus(i){if(!this.isValid)return this;const m=Pe.fromDurationLike(i);return this.plus(m.negate())}mapUnits(i){if(!this.isValid)return this;const m={};for(const y of Object.keys(this.values))m[y]=Wr(i(this.values[y],y));return Sa(this,{values:m},!0)}get(i){return this[Pe.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const m={...this.values,...Xa(i,Pe.normalizeUnit)};return Sa(this,{values:m})}reconfigure({locale:i,numberingSystem:m,conversionAccuracy:y,matrix:w}={}){const U={loc:this.loc.clone({locale:i,numberingSystem:m}),matrix:w,conversionAccuracy:y};return Sa(this,U)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return li(this.matrix,i),Sa(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=si(this.normalize().shiftToAll().toObject());return Sa(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(U=>Pe.normalizeUnit(U));const m={},y={},w=this.toObject();let A;for(const U of gn)if(i.indexOf(U)>=0){A=U;let L=0;for(const fe in y)L+=this.matrix[fe][U]*y[fe],y[fe]=0;ua(w[U])&&(L+=w[U]);const V=Math.trunc(L);m[U]=V,y[U]=(L*1e3-V*1e3)/1e3}else ua(w[U])&&(y[U]=w[U]);for(const U in y)y[U]!==0&&(m[A]+=U===A?y[U]:y[U]/this.matrix[A][U]);return li(this.matrix,m),Sa(this,{values:m},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const i={};for(const m of Object.keys(this.values))i[m]=this.values[m]===0?0:-this.values[m];return Sa(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=si(this.values);return Sa(this,{values:i},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(i){if(!this.isValid||!i.isValid||!this.loc.equals(i.loc))return!1;function m(y,w){return y===void 0||y===0?w===void 0||w===0:y===w}for(const y of gn)if(!m(this.values[y],i.values[y]))return!1;return!0}}const fl="Invalid Interval";function Do(g,i){return!g||!g.isValid?ht.invalid("missing or invalid start"):!i||!i.isValid?ht.invalid("missing or invalid end"):i<g?ht.invalid("end before start",`The end of an interval must be after its start, but you had start=${g.toISO()} and end=${i.toISO()}`):null}class ht{constructor(i){this.s=i.start,this.e=i.end,this.invalid=i.invalid||null,this.isLuxonInterval=!0}static invalid(i,m=null){if(!i)throw new b("need to specify a reason the Interval is invalid");const y=i instanceof ia?i:new ia(i,m);if(dt.throwOnInvalid)throw new d(y);return new ht({invalid:y})}static fromDateTimes(i,m){const y=fa(i),w=fa(m),A=Do(y,w);return A??new ht({start:y,end:w})}static after(i,m){const y=Pe.fromDurationLike(m),w=fa(i);return ht.fromDateTimes(w,w.plus(y))}static before(i,m){const y=Pe.fromDurationLike(m),w=fa(i);return ht.fromDateTimes(w.minus(y),w)}static fromISO(i,m){const[y,w]=(i||"").split("/",2);if(y&&w){let A,U;try{A=je.fromISO(y,m),U=A.isValid}catch{U=!1}let L,V;try{L=je.fromISO(w,m),V=L.isValid}catch{V=!1}if(U&&V)return ht.fromDateTimes(A,L);if(U){const fe=Pe.fromISO(w,m);if(fe.isValid)return ht.after(A,fe)}else if(V){const fe=Pe.fromISO(y,m);if(fe.isValid)return ht.before(L,fe)}}return ht.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static isInterval(i){return i&&i.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(i="milliseconds"){return this.isValid?this.toDuration(i).get(i):NaN}count(i="milliseconds",m){if(!this.isValid)return NaN;const y=this.start.startOf(i,m);let w;return m!=null&&m.useLocaleWeeks?w=this.end.reconfigure({locale:y.locale}):w=this.end,w=w.startOf(i,m),Math.floor(w.diff(y,i).get(i))+(w.valueOf()!==this.end.valueOf())}hasSame(i){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,i):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(i){return this.isValid?this.s>i:!1}isBefore(i){return this.isValid?this.e<=i:!1}contains(i){return this.isValid?this.s<=i&&this.e>i:!1}set({start:i,end:m}={}){return this.isValid?ht.fromDateTimes(i||this.s,m||this.e):this}splitAt(...i){if(!this.isValid)return[];const m=i.map(fa).filter(U=>this.contains(U)).sort((U,L)=>U.toMillis()-L.toMillis()),y=[];let{s:w}=this,A=0;for(;w<this.e;){const U=m[A]||this.e,L=+U>+this.e?this.e:U;y.push(ht.fromDateTimes(w,L)),w=L,A+=1}return y}splitBy(i){const m=Pe.fromDurationLike(i);if(!this.isValid||!m.isValid||m.as("milliseconds")===0)return[];let{s:y}=this,w=1,A;const U=[];for(;y<this.e;){const L=this.start.plus(m.mapUnits(V=>V*w));A=+L>+this.e?this.e:L,U.push(ht.fromDateTimes(y,A)),y=A,w+=1}return U}divideEqually(i){return this.isValid?this.splitBy(this.length()/i).slice(0,i):[]}overlaps(i){return this.e>i.s&&this.s<i.e}abutsStart(i){return this.isValid?+this.e==+i.s:!1}abutsEnd(i){return this.isValid?+i.e==+this.s:!1}engulfs(i){return this.isValid?this.s<=i.s&&this.e>=i.e:!1}equals(i){return!this.isValid||!i.isValid?!1:this.s.equals(i.s)&&this.e.equals(i.e)}intersection(i){if(!this.isValid)return this;const m=this.s>i.s?this.s:i.s,y=this.e<i.e?this.e:i.e;return m>=y?null:ht.fromDateTimes(m,y)}union(i){if(!this.isValid)return this;const m=this.s<i.s?this.s:i.s,y=this.e>i.e?this.e:i.e;return ht.fromDateTimes(m,y)}static merge(i){const[m,y]=i.sort((w,A)=>w.s-A.s).reduce(([w,A],U)=>A?A.overlaps(U)||A.abutsStart(U)?[w,A.union(U)]:[w.concat([A]),U]:[w,U],[[],null]);return y&&m.push(y),m}static xor(i){let m=null,y=0;const w=[],A=i.map(V=>[{time:V.s,type:"s"},{time:V.e,type:"e"}]),U=Array.prototype.concat(...A),L=U.sort((V,fe)=>V.time-fe.time);for(const V of L)y+=V.type==="s"?1:-1,y===1?m=V.time:(m&&+m!=+V.time&&w.push(ht.fromDateTimes(m,V.time)),m=null);return ht.merge(w)}difference(...i){return ht.xor([this].concat(i)).map(m=>this.intersection(m)).filter(m=>m&&!m.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:fl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(i=C,m={}){return this.isValid?Lt.create(this.s.loc.clone(m),i).formatInterval(this):fl}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:fl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:fl}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:fl}toFormat(i,{separator:m=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${m}${this.e.toFormat(i)}`:fl}toDuration(i,m){return this.isValid?this.e.diff(this.s,i,m):Pe.invalid(this.invalidReason)}mapEndpoints(i){return ht.fromDateTimes(i(this.s),i(this.e))}}class xs{static hasDST(i=dt.defaultZone){const m=je.now().setZone(i).set({month:12});return!i.isUniversal&&m.offset!==m.set({month:6}).offset}static isValidIANAZone(i){return de.isValidZone(i)}static normalizeZone(i){return Pt(i,dt.defaultZone)}static getStartOfWeek({locale:i=null,locObj:m=null}={}){return(m||He.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:m=null}={}){return(m||He.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:m=null}={}){return(m||He.create(i)).getWeekendDays().slice()}static months(i="long",{locale:m=null,numberingSystem:y=null,locObj:w=null,outputCalendar:A="gregory"}={}){return(w||He.create(m,y,A)).months(i)}static monthsFormat(i="long",{locale:m=null,numberingSystem:y=null,locObj:w=null,outputCalendar:A="gregory"}={}){return(w||He.create(m,y,A)).months(i,!0)}static weekdays(i="long",{locale:m=null,numberingSystem:y=null,locObj:w=null}={}){return(w||He.create(m,y,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:m=null,numberingSystem:y=null,locObj:w=null}={}){return(w||He.create(m,y,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return He.create(i).meridiems()}static eras(i="short",{locale:m=null}={}){return He.create(m,null,"gregory").eras(i)}static features(){return{relative:Gr(),localeWeek:dn()}}}function aa(g,i){const m=w=>w.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),y=m(i)-m(g);return Math.floor(Pe.fromMillis(y).as("days"))}function ps(g,i,m){const y=[["years",(V,fe)=>fe.year-V.year],["quarters",(V,fe)=>fe.quarter-V.quarter+(fe.year-V.year)*4],["months",(V,fe)=>fe.month-V.month+(fe.year-V.year)*12],["weeks",(V,fe)=>{const ye=aa(V,fe);return(ye-ye%7)/7}],["days",aa]],w={},A=g;let U,L;for(const[V,fe]of y)m.indexOf(V)>=0&&(U=V,w[V]=fe(g,i),L=A.plus(w),L>i?(w[V]--,g=A.plus(w),g>i&&(L=g,w[V]--,g=A.plus(w))):g=L);return[g,w,L,U]}function zu(g,i,m,y){let[w,A,U,L]=ps(g,i,m);const V=i-w,fe=m.filter(Ue=>["hours","minutes","seconds","milliseconds"].indexOf(Ue)>=0);fe.length===0&&(U<i&&(U=w.plus({[L]:1})),U!==w&&(A[L]=(A[L]||0)+V/(U-w)));const ye=Pe.fromObject(A,y);return fe.length>0?Pe.fromMillis(V,y).shiftTo(...fe).plus(ye):ye}const Uu="missing Intl.DateTimeFormat.formatToParts support";function We(g,i=m=>m){return{regex:g,deser:([m])=>i(so(m))}}const lr="[  ]",Lu=new RegExp(lr,"g");function hl(g){return g.replace(/\./g,"\\.?").replace(Lu,lr)}function sr(g){return g.replace(/\./g,"").replace(Lu," ").toLowerCase()}function Wt(g,i){return g===null?null:{regex:RegExp(g.map(hl).join("|")),deser:([m])=>g.findIndex(y=>sr(m)===sr(y))+i}}function rr(g,i){return{regex:g,deser:([,m,y])=>ts(m,y),groups:i}}function ys(g){return{regex:g,deser:([i])=>i}}function An(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ml(g,i){const m=ea(i),y=ea(i,"{2}"),w=ea(i,"{3}"),A=ea(i,"{4}"),U=ea(i,"{6}"),L=ea(i,"{1,2}"),V=ea(i,"{1,3}"),fe=ea(i,"{1,6}"),ye=ea(i,"{1,9}"),Ue=ea(i,"{2,4}"),Ge=ea(i,"{4,6}"),De=Bt=>({regex:RegExp(An(Bt.val)),deser:([xn])=>xn,literal:!0}),Vt=(Bt=>{if(g.literal)return De(Bt);switch(Bt.val){case"G":return Wt(i.eras("short"),0);case"GG":return Wt(i.eras("long"),0);case"y":return We(fe);case"yy":return We(Ue,es);case"yyyy":return We(A);case"yyyyy":return We(Ge);case"yyyyyy":return We(U);case"M":return We(L);case"MM":return We(y);case"MMM":return Wt(i.months("short",!0),1);case"MMMM":return Wt(i.months("long",!0),1);case"L":return We(L);case"LL":return We(y);case"LLL":return Wt(i.months("short",!1),1);case"LLLL":return Wt(i.months("long",!1),1);case"d":return We(L);case"dd":return We(y);case"o":return We(V);case"ooo":return We(w);case"HH":return We(y);case"H":return We(L);case"hh":return We(y);case"h":return We(L);case"mm":return We(y);case"m":return We(L);case"q":return We(L);case"qq":return We(y);case"s":return We(L);case"ss":return We(y);case"S":return We(V);case"SSS":return We(w);case"u":return ys(ye);case"uu":return ys(L);case"uuu":return We(m);case"a":return Wt(i.meridiems(),0);case"kkkk":return We(A);case"kk":return We(Ue,es);case"W":return We(L);case"WW":return We(y);case"E":case"c":return We(m);case"EEE":return Wt(i.weekdays("short",!1),1);case"EEEE":return Wt(i.weekdays("long",!1),1);case"ccc":return Wt(i.weekdays("short",!0),1);case"cccc":return Wt(i.weekdays("long",!0),1);case"Z":case"ZZ":return rr(new RegExp(`([+-]${L.source})(?::(${y.source}))?`),2);case"ZZZ":return rr(new RegExp(`([+-]${L.source})(${y.source})?`),2);case"z":return ys(/[a-z_+-/]{1,256}?/i);case" ":return ys(/[^\S\n\r]/);default:return De(Bt)}})(g)||{invalidReason:Uu};return Vt.token=g,Vt}const ri={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 Hu(g,i,m){const{type:y,value:w}=g;if(y==="literal"){const V=/^\s+$/.test(w);return{literal:!V,val:V?" ":w}}const A=i[y];let U=y;y==="hour"&&(i.hour12!=null?U=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?U="hour12":U="hour24":U=m.hour12?"hour12":"hour24");let L=ri[U];if(typeof L=="object"&&(L=L[A]),L)return{literal:!1,val:L}}function _n(g){return[`^${g.map(m=>m.regex).reduce((m,y)=>`${m}(${y.source})`,"")}$`,g]}function qu(g,i,m){const y=g.match(i);if(y){const w={};let A=1;for(const U in m)if(Mn(m,U)){const L=m[U],V=L.groups?L.groups+1:1;!L.literal&&L.token&&(w[L.token.val[0]]=L.deser(y.slice(A,A+V))),A+=V}return[y,w]}else return[y,{}]}function Vu(g){const i=A=>{switch(A){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let m=null,y;return Me(g.z)||(m=de.create(g.z)),Me(g.Z)||(m||(m=new ot(g.Z)),y=g.Z),Me(g.q)||(g.M=(g.q-1)*3+1),Me(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),Me(g.u)||(g.S=Zr(g.u)),[Object.keys(g).reduce((A,U)=>{const L=i(U);return L&&(A[L]=g[U]),A},{}),m,y]}let ir=null;function _o(){return ir||(ir=je.fromMillis(1555555555555)),ir}function ko(g,i){if(g.literal)return g;const m=Lt.macroTokenToFormatOpts(g.val),y=oa(m,i);return y==null||y.includes(void 0)?g:y}function Bu(g,i){return Array.prototype.concat(...g.map(m=>ko(m,i)))}class ii{constructor(i,m){if(this.locale=i,this.format=m,this.tokens=Bu(Lt.parseFormat(m),i),this.units=this.tokens.map(y=>ml(y,i)),this.disqualifyingUnit=this.units.find(y=>y.invalidReason),!this.disqualifyingUnit){const[y,w]=_n(this.units);this.regex=RegExp(y,"i"),this.handlers=w}}explainFromTokens(i){if(this.isValid){const[m,y]=qu(i,this.regex,this.handlers),[w,A,U]=y?Vu(y):[null,null,void 0];if(Mn(y,"a")&&Mn(y,"H"))throw new f("Can't include meridiem when specifying 24-hour format");return{input:i,tokens:this.tokens,regex:this.regex,rawMatches:m,matches:y,result:w,zone:A,specificOffset:U}}else return{input:i,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ui(g,i,m){return new ii(g,m).explainFromTokens(i)}function ci(g,i,m){const{result:y,zone:w,specificOffset:A,invalidReason:U}=ui(g,i,m);return[y,w,A,U]}function oa(g,i){if(!g)return null;const y=Lt.create(i,g).dtFormatter(_o()),w=y.formatToParts(),A=y.resolvedOptions();return w.map(U=>Hu(U,g,A))}const gl="Invalid DateTime",sa=864e13;function Aa(g){return new ia("unsupported zone",`the zone "${g.name}" is not supported`)}function vs(g){return g.weekData===null&&(g.weekData=Ut(g.c)),g.weekData}function xl(g){return g.localWeekData===null&&(g.localWeekData=Ut(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function _a(g,i){const m={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new je({...m,...i,old:m})}function ur(g,i,m){let y=g-i*60*1e3;const w=m.offset(y);if(i===w)return[y,i];y-=(w-i)*60*1e3;const A=m.offset(y);return w===A?[y,w]:[g-Math.min(w,A)*60*1e3,Math.max(w,A)]}function ka(g,i){g+=i*60*1e3;const m=new Date(g);return{year:m.getUTCFullYear(),month:m.getUTCMonth()+1,day:m.getUTCDate(),hour:m.getUTCHours(),minute:m.getUTCMinutes(),second:m.getUTCSeconds(),millisecond:m.getUTCMilliseconds()}}function bs(g,i,m){return ur(Zt(g),i,m)}function Ss(g,i){const m=g.o,y=g.c.year+Math.trunc(i.years),w=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,A={...g.c,year:y,month:w,day:Math.min(g.c.day,Qs(y,w))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},U=Pe.fromObject({years:i.years-Math.trunc(i.years),quarters:i.quarters-Math.trunc(i.quarters),months:i.months-Math.trunc(i.months),weeks:i.weeks-Math.trunc(i.weeks),days:i.days-Math.trunc(i.days),hours:i.hours,minutes:i.minutes,seconds:i.seconds,milliseconds:i.milliseconds}).as("milliseconds"),L=Zt(A);let[V,fe]=ur(L,m,g.zone);return U!==0&&(V+=U,fe=g.zone.offset(V)),{ts:V,o:fe}}function Na(g,i,m,y,w,A){const{setZone:U,zone:L}=m;if(g&&Object.keys(g).length!==0||i){const V=i||L,fe=je.fromObject(g,{...m,zone:V,specificOffset:A});return U?fe:fe.setZone(L)}else return je.invalid(new ia("unparsable",`the input "${w}" can't be parsed as ${y}`))}function cr(g,i,m=!0){return g.isValid?Lt.create(He.create("en-US"),{allowZ:m,forceSimple:!0}).formatDateTimeFromString(g,i):null}function Qt(g,i,m){const y=g.c.year>9999||g.c.year<0;let w="";if(y&&g.c.year>=0&&(w+="+"),w+=et(g.c.year,y?6:4),m==="year")return w;if(i){if(w+="-",w+=et(g.c.month),m==="month")return w;w+="-"}else if(w+=et(g.c.month),m==="month")return w;return w+=et(g.c.day),w}function or(g,i,m,y,w,A,U){let L=!m||g.c.millisecond!==0||g.c.second!==0,V="";switch(U){case"day":case"month":case"year":break;default:if(V+=et(g.c.hour),U==="hour")break;if(i){if(V+=":",V+=et(g.c.minute),U==="minute")break;L&&(V+=":",V+=et(g.c.second))}else{if(V+=et(g.c.minute),U==="minute")break;L&&(V+=et(g.c.second))}if(U==="second")break;L&&(!y||g.c.millisecond!==0)&&(V+=".",V+=et(g.c.millisecond,3))}return w&&(g.isOffsetFixed&&g.offset===0&&!A?V+="Z":g.o<0?(V+="-",V+=et(Math.trunc(-g.o/60)),V+=":",V+=et(Math.trunc(-g.o%60))):(V+="+",V+=et(Math.trunc(g.o/60)),V+=":",V+=et(Math.trunc(g.o%60)))),A&&(V+="["+g.zone.ianaName+"]"),V}const za={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Yu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},dr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ua=["year","month","day","hour","minute","second","millisecond"],oi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],$u=["year","ordinal","hour","minute","second","millisecond"];function pl(g){const i={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[g.toLowerCase()];if(!i)throw new h(g);return i}function di(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return pl(g)}}function da(g){if(tn===void 0&&(tn=dt.now()),g.type!=="iana")return g.offset(tn);const i=g.name;let m=na.get(i);return m===void 0&&(m=g.offset(tn),na.set(i,m)),m}function kn(g,i){const m=Pt(i.zone,dt.defaultZone);if(!m.isValid)return je.invalid(Aa(m));const y=He.fromObject(i);let w,A;if(Me(g.year))w=dt.now();else{for(const V of Ua)Me(g[V])&&(g[V]=za[V]);const U=Zs(g)||Cn(g);if(U)return je.invalid(U);const L=da(m);[w,A]=bs(g,L,m)}return new je({ts:w,zone:m,loc:y,o:A})}function zn(g,i,m){const y=Me(m.round)?!0:m.round,w=Me(m.rounding)?"trunc":m.rounding,A=(L,V)=>(L=Kl(L,y||m.calendary?0:2,m.calendary?"round":w),i.loc.clone(m).relFormatter(m).format(L,V)),U=L=>m.calendary?i.hasSame(g,L)?0:i.startOf(L).diff(g.startOf(L),L).get(L):i.diff(g,L).get(L);if(m.unit)return A(U(m.unit),m.unit);for(const L of m.units){const V=U(L);if(Math.abs(V)>=1)return A(V,L)}return A(g>i?-0:0,m.units[m.units.length-1])}function Ns(g){let i={},m;return g.length>0&&typeof g[g.length-1]=="object"?(i=g[g.length-1],m=Array.from(g).slice(0,g.length-1)):m=Array.from(g),[i,m]}let tn;const na=new Map;class je{constructor(i){const m=i.zone||dt.defaultZone;let y=i.invalid||(Number.isNaN(i.ts)?new ia("invalid input"):null)||(m.isValid?null:Aa(m));this.ts=Me(i.ts)?dt.now():i.ts;let w=null,A=null;if(!y)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(m))[w,A]=[i.old.c,i.old.o];else{const L=ua(i.o)&&!i.old?i.o:m.offset(this.ts);w=ka(this.ts,L),y=Number.isNaN(w.year)?new ia("invalid input"):null,w=y?null:w,A=y?null:L}this._zone=m,this.loc=i.loc||He.create(),this.invalid=y,this.weekData=null,this.localWeekData=null,this.c=w,this.o=A,this.isLuxonDateTime=!0}static now(){return new je({})}static local(){const[i,m]=Ns(arguments),[y,w,A,U,L,V,fe]=m;return kn({year:y,month:w,day:A,hour:U,minute:L,second:V,millisecond:fe},i)}static utc(){const[i,m]=Ns(arguments),[y,w,A,U,L,V,fe]=m;return i.zone=ot.utcInstance,kn({year:y,month:w,day:A,hour:U,minute:L,second:V,millisecond:fe},i)}static fromJSDate(i,m={}){const y=yu(i)?i.valueOf():NaN;if(Number.isNaN(y))return je.invalid("invalid input");const w=Pt(m.zone,dt.defaultZone);return w.isValid?new je({ts:y,zone:w,loc:He.fromObject(m)}):je.invalid(Aa(w))}static fromMillis(i,m={}){if(ua(i))return i<-sa||i>sa?je.invalid("Timestamp out of range"):new je({ts:i,zone:Pt(m.zone,dt.defaultZone),loc:He.fromObject(m)});throw new b(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,m={}){if(ua(i))return new je({ts:i*1e3,zone:Pt(m.zone,dt.defaultZone),loc:He.fromObject(m)});throw new b("fromSeconds requires a numerical input")}static fromObject(i,m={}){i=i||{};const y=Pt(m.zone,dt.defaultZone);if(!y.isValid)return je.invalid(Aa(y));const w=He.fromObject(m),A=Xa(i,di),{minDaysInFirstWeek:U,startOfWeek:L}=xu(A,w),V=dt.now(),fe=Me(m.specificOffset)?y.offset(V):m.specificOffset,ye=!Me(A.ordinal),Ue=!Me(A.year),Ge=!Me(A.month)||!Me(A.day),De=Ue||Ge,yt=A.weekYear||A.weekNumber;if((De||ye)&&yt)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Ge&&ye)throw new f("Can't mix ordinal dates with month/day");const Vt=yt||A.weekday&&!De;let Bt,xn,an=ka(V,fe);Vt?(Bt=oi,xn=Yu,an=Ut(an,U,L)):ye?(Bt=$u,xn=dr,an=Xl(an)):(Bt=Ua,xn=za);let fr=!1;for(const qa of Bt){const hr=A[qa];Me(hr)?fr?A[qa]=xn[qa]:A[qa]=an[qa]:fr=!0}const Un=Vt?pu(A,U,L):ye?Jl(A):Zs(A),Ha=Un||Cn(A);if(Ha)return je.invalid(Ha);const pn=Vt?Tn(A,U,L):ye?gu(A):A,[nn,fi]=bs(pn,fe,y),Ln=new je({ts:nn,zone:y,o:fi,loc:w});return A.weekday&&De&&i.weekday!==Ln.weekday?je.invalid("mismatched weekday",`you can't specify both a weekday of ${A.weekday} and a date of ${Ln.toISO()}`):Ln.isValid?Ln:je.invalid(Ln.invalid)}static fromISO(i,m={}){const[y,w]=Mu(i);return Na(y,w,m,"ISO 8601",i)}static fromRFC2822(i,m={}){const[y,w]=Ou(i);return Na(y,w,m,"RFC 2822",i)}static fromHTTP(i,m={}){const[y,w]=Ru(i);return Na(y,w,m,"HTTP",m)}static fromFormat(i,m,y={}){if(Me(i)||Me(m))throw new b("fromFormat requires an input string and a format");const{locale:w=null,numberingSystem:A=null}=y,U=He.fromOpts({locale:w,numberingSystem:A,defaultToEN:!0}),[L,V,fe,ye]=ci(U,i,m);return ye?je.invalid(ye):Na(L,V,y,`format ${m}`,i,fe)}static fromString(i,m,y={}){return je.fromFormat(i,m,y)}static fromSQL(i,m={}){const[y,w]=_u(i);return Na(y,w,m,"SQL",i)}static invalid(i,m=null){if(!i)throw new b("need to specify a reason the DateTime is invalid");const y=i instanceof ia?i:new ia(i,m);if(dt.throwOnInvalid)throw new r(y);return new je({invalid:y})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,m={}){const y=oa(i,He.fromObject(m));return y?y.map(w=>w?w.val:null).join(""):null}static expandFormat(i,m={}){return Bu(Lt.parseFormat(i),He.fromObject(m)).map(w=>w.val).join("")}static resetCache(){tn=void 0,na.clear()}get(i){return this[i]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?vs(this).weekYear:NaN}get weekNumber(){return this.isValid?vs(this).weekNumber:NaN}get weekday(){return this.isValid?vs(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?xl(this).weekday:NaN}get localWeekNumber(){return this.isValid?xl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?xl(this).weekYear:NaN}get ordinal(){return this.isValid?Xl(this.c).ordinal:NaN}get monthShort(){return this.isValid?xs.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?xs.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?xs.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?xs.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const i=864e5,m=6e4,y=Zt(this.c),w=this.zone.offset(y-i),A=this.zone.offset(y+i),U=this.zone.offset(y-w*m),L=this.zone.offset(y-A*m);if(U===L)return[this];const V=y-U*m,fe=y-L*m,ye=ka(V,U),Ue=ka(fe,L);return ye.hour===Ue.hour&&ye.minute===Ue.minute&&ye.second===Ue.second&&ye.millisecond===Ue.millisecond?[_a(this,{ts:V}),_a(this,{ts:fe})]:[this]}get isInLeapYear(){return ll(this.year)}get daysInMonth(){return Qs(this.year,this.month)}get daysInYear(){return this.isValid?Ia(this.year):NaN}get weeksInWeekYear(){return this.isValid?sl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?sl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:m,numberingSystem:y,calendar:w}=Lt.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:m,numberingSystem:y,outputCalendar:w}}toUTC(i=0,m={}){return this.setZone(ot.instance(i),m)}toLocal(){return this.setZone(dt.defaultZone)}setZone(i,{keepLocalTime:m=!1,keepCalendarTime:y=!1}={}){if(i=Pt(i,dt.defaultZone),i.equals(this.zone))return this;if(i.isValid){let w=this.ts;if(m||y){const A=i.offset(this.ts),U=this.toObject();[w]=bs(U,A,i)}return _a(this,{ts:w,zone:i})}else return je.invalid(Aa(i))}reconfigure({locale:i,numberingSystem:m,outputCalendar:y}={}){const w=this.loc.clone({locale:i,numberingSystem:m,outputCalendar:y});return _a(this,{loc:w})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const m=Xa(i,di),{minDaysInFirstWeek:y,startOfWeek:w}=xu(m,this.loc),A=!Me(m.weekYear)||!Me(m.weekNumber)||!Me(m.weekday),U=!Me(m.ordinal),L=!Me(m.year),V=!Me(m.month)||!Me(m.day),fe=L||V,ye=m.weekYear||m.weekNumber;if((fe||U)&&ye)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(V&&U)throw new f("Can't mix ordinal dates with month/day");let Ue;A?Ue=Tn({...Ut(this.c,y,w),...m},y,w):Me(m.ordinal)?(Ue={...this.toObject(),...m},Me(m.day)&&(Ue.day=Math.min(Qs(Ue.year,Ue.month),Ue.day))):Ue=gu({...Xl(this.c),...m});const[Ge,De]=bs(Ue,this.o,this.zone);return _a(this,{ts:Ge,o:De})}plus(i){if(!this.isValid)return this;const m=Pe.fromDurationLike(i);return _a(this,Ss(this,m))}minus(i){if(!this.isValid)return this;const m=Pe.fromDurationLike(i).negate();return _a(this,Ss(this,m))}startOf(i,{useLocaleWeeks:m=!1}={}){if(!this.isValid)return this;const y={},w=Pe.normalizeUnit(i);switch(w){case"years":y.month=1;case"quarters":case"months":y.day=1;case"weeks":case"days":y.hour=0;case"hours":y.minute=0;case"minutes":y.second=0;case"seconds":y.millisecond=0;break}if(w==="weeks")if(m){const A=this.loc.getStartOfWeek(),{weekday:U}=this;U<A&&(y.weekNumber=this.weekNumber-1),y.weekday=A}else y.weekday=1;if(w==="quarters"){const A=Math.ceil(this.month/3);y.month=(A-1)*3+1}return this.set(y)}endOf(i,m){return this.isValid?this.plus({[i]:1}).startOf(i,m).minus(1):this}toFormat(i,m={}){return this.isValid?Lt.create(this.loc.redefaultToEN(m)).formatDateTimeFromString(this,i):gl}toLocaleString(i=C,m={}){return this.isValid?Lt.create(this.loc.clone(m),i).formatDateTime(this):gl}toLocaleParts(i={}){return this.isValid?Lt.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:m=!1,suppressMilliseconds:y=!1,includeOffset:w=!0,extendedZone:A=!1,precision:U="milliseconds"}={}){if(!this.isValid)return null;U=pl(U);const L=i==="extended";let V=Qt(this,L,U);return Ua.indexOf(U)>=3&&(V+="T"),V+=or(this,L,m,y,w,A,U),V}toISODate({format:i="extended",precision:m="day"}={}){return this.isValid?Qt(this,i==="extended",pl(m)):null}toISOWeekDate(){return cr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:m=!1,includeOffset:y=!0,includePrefix:w=!1,extendedZone:A=!1,format:U="extended",precision:L="milliseconds"}={}){return this.isValid?(L=pl(L),(w&&Ua.indexOf(L)>=3?"T":"")+or(this,U==="extended",m,i,y,A,L)):null}toRFC2822(){return cr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return cr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Qt(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:m=!1,includeOffsetSpace:y=!0}={}){let w="HH:mm:ss.SSS";return(m||i)&&(y&&(w+=" "),m?w+="z":i&&(w+="ZZ")),cr(this,w,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():gl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(i={}){if(!this.isValid)return{};const m={...this.c};return i.includeConfig&&(m.outputCalendar=this.outputCalendar,m.numberingSystem=this.loc.numberingSystem,m.locale=this.loc.locale),m}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(i,m="milliseconds",y={}){if(!this.isValid||!i.isValid)return Pe.invalid("created by diffing an invalid DateTime");const w={locale:this.locale,numberingSystem:this.numberingSystem,...y},A=nl(m).map(Pe.normalizeUnit),U=i.valueOf()>this.valueOf(),L=U?this:i,V=U?i:this,fe=zu(L,V,A,w);return U?fe.negate():fe}diffNow(i="milliseconds",m={}){return this.diff(je.now(),i,m)}until(i){return this.isValid?ht.fromDateTimes(this,i):this}hasSame(i,m,y){if(!this.isValid)return!1;const w=i.valueOf(),A=this.setZone(i.zone,{keepLocalTime:!0});return A.startOf(m,y)<=w&&w<=A.endOf(m,y)}equals(i){return this.isValid&&i.isValid&&this.valueOf()===i.valueOf()&&this.zone.equals(i.zone)&&this.loc.equals(i.loc)}toRelative(i={}){if(!this.isValid)return null;const m=i.base||je.fromObject({},{zone:this.zone}),y=i.padding?this<m?-i.padding:i.padding:0;let w=["years","months","days","hours","minutes","seconds"],A=i.unit;return Array.isArray(i.unit)&&(w=i.unit,A=void 0),zn(m,this.plus(y),{...i,numeric:"always",units:w,unit:A})}toRelativeCalendar(i={}){return this.isValid?zn(i.base||je.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(je.isDateTime))throw new b("min requires all arguments be DateTimes");return vu(i,m=>m.valueOf(),Math.min)}static max(...i){if(!i.every(je.isDateTime))throw new b("max requires all arguments be DateTimes");return vu(i,m=>m.valueOf(),Math.max)}static fromFormatExplain(i,m,y={}){const{locale:w=null,numberingSystem:A=null}=y,U=He.fromOpts({locale:w,numberingSystem:A,defaultToEN:!0});return ui(U,i,m)}static fromStringExplain(i,m,y={}){return je.fromFormatExplain(i,m,y)}static buildFormatParser(i,m={}){const{locale:y=null,numberingSystem:w=null}=m,A=He.fromOpts({locale:y,numberingSystem:w,defaultToEN:!0});return new ii(A,i)}static fromFormatParser(i,m,y={}){if(Me(i)||Me(m))throw new b("fromFormatParser requires an input string and a format parser");const{locale:w=null,numberingSystem:A=null}=y,U=He.fromOpts({locale:w,numberingSystem:A,defaultToEN:!0});if(!U.equals(m.locale))throw new b(`fromFormatParser called with a locale of ${U}, but the format parser was created for ${m.locale}`);const{result:L,zone:V,specificOffset:fe,invalidReason:ye}=m.explainFromTokens(i);return ye?je.invalid(ye):Na(L,V,y,`format ${m.format}`,i,fe)}static get DATE_SHORT(){return C}static get DATE_MED(){return j}static get DATE_MED_WITH_WEEKDAY(){return D}static get DATE_FULL(){return O}static get DATE_HUGE(){return M}static get TIME_SIMPLE(){return R}static get TIME_WITH_SECONDS(){return Z}static get TIME_WITH_SHORT_OFFSET(){return T}static get TIME_WITH_LONG_OFFSET(){return K}static get TIME_24_SIMPLE(){return I}static get TIME_24_WITH_SECONDS(){return oe}static get TIME_24_WITH_SHORT_OFFSET(){return Y}static get TIME_24_WITH_LONG_OFFSET(){return G}static get DATETIME_SHORT(){return $}static get DATETIME_SHORT_WITH_SECONDS(){return ne}static get DATETIME_MED(){return k}static get DATETIME_MED_WITH_SECONDS(){return ae}static get DATETIME_MED_WITH_WEEKDAY(){return F}static get DATETIME_FULL(){return ue}static get DATETIME_FULL_WITH_SECONDS(){return xe}static get DATETIME_HUGE(){return J}static get DATETIME_HUGE_WITH_SECONDS(){return B}}function fa(g){if(je.isDateTime(g))return g;if(g&&g.valueOf&&ua(g.valueOf()))return je.fromJSDate(g);if(g&&typeof g=="object")return je.fromObject(g);throw new b(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const La="3.7.2";return ya.DateTime=je,ya.Duration=Pe,ya.FixedOffsetZone=ot,ya.IANAZone=de,ya.Info=xs,ya.Interval=ht,ya.InvalidZone=zt,ya.Settings=dt,ya.SystemZone=Se,ya.VERSION=La,ya.Zone=re,ya}var Hg;function eh(){return Hg||(Hg=1,(function(l){var h,b,N,v,p,Df,C,ql;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const r=dS();var d;(function(O){O.Second="Second",O.Minute="Minute",O.Hour="Hour",O.Day="Day",O.Month="Month",O.Year="Year"})(d||(l.TimeUnit=d={}));var c;(function(O){O.Add="Add",O.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 D=class D{constructor(M,R){Ke(this,C);Ke(this,h);Ke(this,b,null);Ke(this,N,null);Ke(this,v,{add:{[d.Year]:this.addYear.bind(this),[d.Month]:this.addMonth.bind(this),[d.Day]:this.addDay.bind(this),[d.Hour]:this.addHour.bind(this),[d.Minute]:this.addMinute.bind(this),[d.Second]:this.addSecond.bind(this)},subtract:{[d.Year]:this.subtractYear.bind(this),[d.Month]:this.subtractMonth.bind(this),[d.Day]:this.subtractDay.bind(this),[d.Hour]:this.subtractHour.bind(this),[d.Minute]:this.subtractMinute.bind(this),[d.Second]:this.subtractSecond.bind(this)}});const Z={zone:R};if(M?M instanceof D?(we(this,h,ee(M,h)),we(this,b,ee(M,b)),we(this,N,ee(M,N))):M instanceof Date?we(this,h,r.DateTime.fromJSDate(M,Z)):typeof M=="number"?we(this,h,r.DateTime.fromMillis(M,Z)):(we(this,h,r.DateTime.fromISO(M,Z)),ee(this,h).isValid||we(this,h,r.DateTime.fromRFC2822(M,Z)),ee(this,h).isValid||we(this,h,r.DateTime.fromSQL(M,Z)),ee(this,h).isValid||we(this,h,r.DateTime.fromFormat(M,"EEE, d MMM yyyy HH:mm:ss",Z))):we(this,h,r.DateTime.local()),!ee(this,h).isValid)throw new Error(`CronDate: unhandled timestamp: ${M}`);R&&R!==ee(this,h).zoneName&&we(this,h,ee(this,h).setZone(R))}get dstStart(){return ee(this,b)}set dstStart(M){we(this,b,M)}get dstEnd(){return ee(this,N)}set dstEnd(M){we(this,N,M)}addYear(){we(this,h,ee(this,h).plus({years:1}))}addMonth(){we(this,h,ee(this,h).plus({months:1}).startOf("month"))}addDay(){we(this,h,ee(this,h).plus({days:1}).startOf("day"))}addHour(){we(this,h,ee(this,h).plus({hours:1}).startOf("hour"))}addMinute(){we(this,h,ee(this,h).plus({minutes:1}).startOf("minute"))}addSecond(){we(this,h,ee(this,h).plus({seconds:1}))}subtractYear(){we(this,h,ee(this,h).minus({years:1}))}subtractMonth(){we(this,h,ee(this,h).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){we(this,h,ee(this,h).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){we(this,h,ee(this,h).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){we(this,h,ee(this,h).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){we(this,h,ee(this,h).minus({seconds:1}))}addUnit(M){ee(this,v).add[M]()}subtractUnit(M){ee(this,v).subtract[M]()}invokeDateOperation(M,R){if(M===c.Add){this.addUnit(R);return}if(M===c.Subtract){this.subtractUnit(R);return}throw new Error(`Invalid verb: ${M}`)}getDate(){return ee(this,h).day}getFullYear(){return ee(this,h).year}getDay(){const M=ee(this,h).weekday;return M===7?0:M}getMonth(){return ee(this,h).month-1}getHours(){return ee(this,h).hour}getMinutes(){return ee(this,h).minute}getSeconds(){return ee(this,h).second}getMilliseconds(){return ee(this,h).millisecond}getUTCOffset(){return ee(this,h).offset}setStartOfDay(){we(this,h,ee(this,h).startOf("day"))}setEndOfDay(){we(this,h,ee(this,h).endOf("day"))}getTime(){return ee(this,h).valueOf()}getUTCDate(){return Ne(this,C,ql).call(this).day}getUTCFullYear(){return Ne(this,C,ql).call(this).year}getUTCDay(){const M=Ne(this,C,ql).call(this).weekday;return M===7?0:M}getUTCMonth(){return Ne(this,C,ql).call(this).month-1}getUTCHours(){return Ne(this,C,ql).call(this).hour}getUTCMinutes(){return Ne(this,C,ql).call(this).minute}getUTCSeconds(){return Ne(this,C,ql).call(this).second}toISOString(){return ee(this,h).toUTC().toISO()}toJSON(){return ee(this,h).toJSON()}setDate(M){we(this,h,ee(this,h).set({day:M}))}setFullYear(M){we(this,h,ee(this,h).set({year:M}))}setDay(M){we(this,h,ee(this,h).set({weekday:M}))}setMonth(M){we(this,h,ee(this,h).set({month:M+1}))}setHours(M){we(this,h,ee(this,h).set({hour:M}))}setMinutes(M){we(this,h,ee(this,h).set({minute:M}))}setSeconds(M){we(this,h,ee(this,h).set({second:M}))}setMilliseconds(M){we(this,h,ee(this,h).set({millisecond:M}))}toString(){return this.toDate().toString()}toDate(){return ee(this,h).toJSDate()}isLastDayOfMonth(){var Z;const{day:M,month:R}=ee(this,h);if(R===2){const T=Ne(Z=D,p,Df).call(Z,ee(this,h).year);return M===l.DAYS_IN_MONTH[R-1]-(T?0:1)}return M===l.DAYS_IN_MONTH[R-1]}isLastWeekdayOfMonth(){var T;const{day:M,month:R}=ee(this,h);let Z;return R===2?Z=l.DAYS_IN_MONTH[R-1]-(Ne(T=D,p,Df).call(T,ee(this,h).year)?0:1):Z=l.DAYS_IN_MONTH[R-1],M>Z-7}applyDateOperation(M,R,Z){if(R===d.Month||R===d.Day){this.invokeDateOperation(M,R);return}const T=this.getHours();this.invokeDateOperation(M,R);const K=this.getHours(),I=K-T;I===2?Z!==24&&(this.dstStart=K):I===0&&this.getMinutes()===0&&this.getSeconds()===0&&Z!==24&&(this.dstEnd=K)}};h=new WeakMap,b=new WeakMap,N=new WeakMap,v=new WeakMap,p=new WeakSet,Df=function(M){return M%4===0&&M%100!==0||M%400===0},C=new WeakSet,ql=function(){return ee(this,h).toUTC()},Ke(D,p);let f=D;l.CronDate=f,l.default=f})(Nf)),Nf}var qg;function fS(){if(qg)return Ji;qg=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronMonth=void 0;const l=eh(),r=Bs(),d=1,c=12,f=Object.freeze([]);let h=class extends r.CronField{static get min(){return d}static get max(){return c}static get chars(){return f}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(N,v){super(N,v),this.validate()}get values(){return super.values}};return Ji.CronMonth=h,Ji}var Ki={},Vg;function hS(){if(Vg)return Ki;Vg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronSecond=void 0;const l=Bs(),r=0,d=59,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}constructor(b,N){super(b,N),this.validate()}get values(){return super.values}};return Ki.CronSecond=f,Ki}var Bg;function th(){return Bg||(Bg=1,(function(l){var r=_s&&_s.__createBinding||(Object.create?(function(c,f,h,b){b===void 0&&(b=h);var N=Object.getOwnPropertyDescriptor(f,h);(!N||("get"in N?!f.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return f[h]}}),Object.defineProperty(c,b,N)}):(function(c,f,h,b){b===void 0&&(b=h),c[b]=f[h]})),d=_s&&_s.__exportStar||function(c,f){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h)&&r(f,c,h)};Object.defineProperty(l,"__esModule",{value:!0}),d(rS(),l),d(iS(),l),d(uS(),l),d(Bs(),l),d(cS(),l),d(oS(),l),d(fS(),l),d(hS(),l)})(_s)),_s}var Yg;function up(){var d,c,f,h,b,N,v,p,rp,ip;if(Yg)return Fi;Yg=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.CronFieldCollection=void 0;const l=th();let r=(p=class{constructor({second:D,minute:O,hour:M,dayOfMonth:R,month:Z,dayOfWeek:T}){Ke(this,d);Ke(this,c);Ke(this,f);Ke(this,h);Ke(this,b);Ke(this,N);if(!D)throw new Error("Validation error, Field second is missing");if(!O)throw new Error("Validation error, Field minute is missing");if(!M)throw new Error("Validation error, Field hour is missing");if(!R)throw new Error("Validation error, Field dayOfMonth is missing");if(!Z)throw new Error("Validation error, Field month is missing");if(!T)throw new Error("Validation error, Field dayOfWeek is missing");if(Z.values.length===1&&!R.hasLastChar&&!(parseInt(R.values[0],10)<=l.CronMonth.daysInMonth[Z.values[0]-1]))throw new Error("Invalid explicit day of month definition");we(this,d,D),we(this,c,O),we(this,f,M),we(this,b,Z),we(this,N,T),we(this,h,R)}static from(D,O){return new p({second:this.resolveField(l.CronSecond,D.second,O.second),minute:this.resolveField(l.CronMinute,D.minute,O.minute),hour:this.resolveField(l.CronHour,D.hour,O.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,D.dayOfMonth,O.dayOfMonth),month:this.resolveField(l.CronMonth,D.month,O.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,D.dayOfWeek,O.dayOfWeek)})}static resolveField(D,O,M){return M?M instanceof l.CronField?M:new D(M):O}get second(){return ee(this,d)}get minute(){return ee(this,c)}get hour(){return ee(this,f)}get dayOfMonth(){return ee(this,h)}get month(){return ee(this,b)}get dayOfWeek(){return ee(this,N)}static compactField(D){if(D.length===0)return[];const O=[];let M;return D.forEach((R,Z,T)=>{if(M===void 0){M={start:R,count:1};return}const K=T[Z-1]||M.start,I=T[Z+1];if(R==="L"||R==="W"){O.push(M),O.push({start:R,count:1}),M=void 0;return}if(M.step===void 0&&I!==void 0){const oe=R-K,Y=I-R;if(oe<=Y){M={...M,count:2,end:R,step:oe};return}M.step=1}R-(M.end??0)===M.step?(M.count++,M.end=R):(M.count===1?O.push({start:M.start,count:1}):M.count===2?(O.push({start:M.start,count:1}),O.push({start:M.end??K,count:1})):O.push(M),M={start:R,count:1})}),M&&O.push(M),O}stringifyField(D){var Z;let O=D.max,M=D.values;if(D instanceof l.CronDayOfWeek){O=6;const T=ee(this,N).values;M=T[T.length-1]===7?T.slice(0,-1):T}D instanceof l.CronDayOfMonth&&(O=ee(this,b).values.length===1?l.CronMonth.daysInMonth[ee(this,b).values[0]-1]:D.max);const R=p.compactField(M);if(R.length===1){const T=Ne(Z=p,v,rp).call(Z,D,R[0],O);if(T)return T}return R.map(T=>{var I;const K=T.count===1?T.start.toString():Ne(I=p,v,ip).call(I,T,O);return D instanceof l.CronDayOfWeek&&D.nthDay>0?`${K}#${D.nthDay}`:K}).join(",")}stringify(D=!1){const O=[];return D&&O.push(this.stringifyField(ee(this,d))),O.push(this.stringifyField(ee(this,c)),this.stringifyField(ee(this,f)),this.stringifyField(ee(this,h)),this.stringifyField(ee(this,b)),this.stringifyField(ee(this,N))),O.join(" ")}serialize(){return{second:ee(this,d).serialize(),minute:ee(this,c).serialize(),hour:ee(this,f).serialize(),dayOfMonth:ee(this,h).serialize(),month:ee(this,b).serialize(),dayOfWeek:ee(this,N).serialize()}}},d=new WeakMap,c=new WeakMap,f=new WeakMap,h=new WeakMap,b=new WeakMap,N=new WeakMap,v=new WeakSet,rp=function(D,O,M){const R=O.step;return R?R===1&&O.start===D.min&&O.end&&O.end>=M?D.hasQuestionMarkChar?"?":"*":R!==1&&O.start===D.min&&O.end&&O.end>=M-R+1?`*/${R}`:null:null},ip=function(D,O){const M=D.step;if(M===1)return`${D.start}-${D.end}`;const R=D.start===0?D.count-1:D.count;if(!M)throw new Error("Unexpected range step");if(!D.end)throw new Error("Unexpected range end");if(M*R>D.end){const Z=(K,I)=>{if(typeof D.start!="number")throw new Error("Unexpected range start");return I%M===0?D.start+I:null};if(typeof D.start!="number")throw new Error("Unexpected range start");const T={length:D.end-D.start+1};return Array.from(T,Z).filter(K=>K!==null).join(",")}return D.end===O-M+1?`${D.start}/${M}`:`${D.start}-${D.end}/${M}`},Ke(p,v),p);return Fi.CronFieldCollection=r,Fi}var jf={},$g;function gp(){return $g||($g=1,(function(l){var f,h,b,N,v,p,S,C,j,Vl,O,Us,cp,op,dp,fp,Af,hp,mp,zr;Object.defineProperty(l,"__esModule",{value:!0}),l.CronExpression=l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const r=eh();l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const d=1e4,$=class ${constructor(k,ae){Ke(this,O);Ke(this,f);Ke(this,h);Ke(this,b);Ke(this,N);Ke(this,v);Ke(this,p);Ke(this,S,null);Ke(this,C,!1);we(this,f,ae),we(this,h,ae.tz),we(this,N,ae.startDate?new r.CronDate(ae.startDate,ee(this,h)):null),we(this,v,ae.endDate?new r.CronDate(ae.endDate,ee(this,h)):null);let F=ae.currentDate??ae.startDate;if(F){const ue=new r.CronDate(F,ee(this,h));ee(this,N)&&ue.getTime()<ee(this,N).getTime()?F=ee(this,N):ee(this,v)&&ue.getTime()>ee(this,v).getTime()&&(F=ee(this,v))}we(this,b,new r.CronDate(F,ee(this,h))),we(this,p,k)}get fields(){return ee(this,p)}static fieldsToExpression(k,ae){return new $(k,ae||{})}next(){return Ne(this,O,zr).call(this)}prev(){return Ne(this,O,zr).call(this,!0)}hasNext(){const k=ee(this,b);try{return Ne(this,O,zr).call(this),!0}catch{return!1}finally{we(this,b,k)}}hasPrev(){const k=ee(this,b);try{return Ne(this,O,zr).call(this,!0),!0}catch{return!1}finally{we(this,b,k)}}take(k){const ae=[];if(k>=0)for(let F=0;F<k;F++)try{ae.push(this.next())}catch{return ae}else for(let F=0;F>k;F--)try{ae.push(this.prev())}catch{return ae}return ae}reset(k){we(this,b,new r.CronDate(k||ee(this,f).currentDate))}stringify(k=!1){return ee(this,p).stringify(k)}includesDate(k){const{second:ae,minute:F,hour:ue,month:xe}=ee(this,p),J=new r.CronDate(k,ee(this,h));return!(!ae.values.includes(J.getSeconds())||!F.values.includes(J.getMinutes())||!ue.values.includes(J.getHours())||!xe.values.includes(J.getMonth()+1)||!Ne(this,O,Af).call(this,J)||ee(this,p).dayOfWeek.nthDay>0&&Math.ceil(J.getDate()/7)!==ee(this,p).dayOfWeek.nthDay)}toString(){return ee(this,f).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ne(this,O,zr).call(this),done:!this.hasNext()})}}};f=new WeakMap,h=new WeakMap,b=new WeakMap,N=new WeakMap,v=new WeakMap,p=new WeakMap,S=new WeakMap,C=new WeakMap,j=new WeakSet,Vl=function(k,ae){return ae.some(F=>F===k)},O=new WeakSet,Us=function(k,ae){return k[ae?k.length-1:0]},cp=function(k){const ae=`${k.getFullYear()}-${k.getMonth()+1}-${k.getDate()}`;if(ee(this,S)===ae)return ee(this,C);const F=new r.CronDate(k);F.setStartOfDay();const ue=new r.CronDate(k);return ue.setEndOfDay(),we(this,S,ae),we(this,C,F.getUTCOffset()!==ue.getUTCOffset()),ee(this,C)},op=function(k,ae,F){const ue=ee(this,p).second.values,xe=k.getSeconds(),J=ee(this,p).second.findNearestValue(xe,F);if(J!==null){k.setSeconds(J);return}k.applyDateOperation(ae,r.TimeUnit.Minute,ee(this,p).hour.values.length),k.setSeconds(Ne(this,O,Us).call(this,ue,F))},dp=function(k,ae,F){const ue=ee(this,p).minute.values,xe=ee(this,p).second.values,J=k.getMinutes(),B=ee(this,p).minute.findNearestValue(J,F);if(B!==null){k.setMinutes(B),k.setSeconds(Ne(this,O,Us).call(this,xe,F));return}k.applyDateOperation(ae,r.TimeUnit.Hour,ee(this,p).hour.values.length),k.setMinutes(Ne(this,O,Us).call(this,ue,F)),k.setSeconds(Ne(this,O,Us).call(this,xe,F))},fp=function(k,ae){const F=ae.isLastWeekdayOfMonth();return k.some(ue=>{const xe=parseInt(ue.toString().charAt(0),10)%7;if(Number.isNaN(xe))throw new Error(`Invalid last weekday of the month expression: ${ue}`);return ae.getDay()===xe&&F})},Af=function(k){var re,ge,Se;const ae=ee(this,p).dayOfMonth.isWildcard,F=!ae,ue=ee(this,p).dayOfWeek.isWildcard,xe=!ue,J=Ne(re=$,j,Vl).call(re,k.getDate(),ee(this,p).dayOfMonth.values)||ee(this,p).dayOfMonth.hasLastChar&&k.isLastDayOfMonth(),B=Ne(ge=$,j,Vl).call(ge,k.getDay(),ee(this,p).dayOfWeek.values)||ee(this,p).dayOfWeek.hasLastChar&&Ne(Se=$,j,fp).call(Se,ee(this,p).dayOfWeek.values,k);return!!(F&&xe&&(J||B)||J&&!xe||ae&&!ue&&B)},hp=function(k,ae,F){var ke,z;const ue=ee(this,p).hour.values,xe=ue,J=k.getHours(),B=Ne(ke=$,j,Vl).call(ke,J,ue),re=k.dstStart===J,ge=k.dstEnd===J;if(re)return Ne(z=$,j,Vl).call(z,J-1,ue)?!0:(k.invokeDateOperation(ae,r.TimeUnit.Hour),!1);if(ge&&!F)return k.dstEnd=null,k.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,xe.length),!1;if(B)return!0;k.dstStart=null;const Se=ee(this,p).hour.findNearestValue(J,F);if(Se===null)return k.applyDateOperation(ae,r.TimeUnit.Day,xe.length),!1;if(Ne(this,O,cp).call(this,k)){const le=F?J-Se:Se-J;for(let he=0;he<le;he++)k.applyDateOperation(ae,r.TimeUnit.Hour,xe.length)}else k.setHours(Se);return k.setMinutes(Ne(this,O,Us).call(this,ee(this,p).minute.values,F)),k.setSeconds(Ne(this,O,Us).call(this,ee(this,p).second.values,F)),!1},mp=function(k){if(!ee(this,N)&&!ee(this,v))return;const ae=k.getTime();if(ee(this,N)&&ae<ee(this,N).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(ee(this,v)&&ae>ee(this,v).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},zr=function(k=!1){var J,B,re;const ae=k?r.DateMathOp.Subtract:r.DateMathOp.Add,F=new r.CronDate(ee(this,b)),ue=F.getTime();let xe=0;for(;++xe<d;){if(Ne(this,O,mp).call(this,F),!Ne(this,O,Af).call(this,F)){F.applyDateOperation(ae,r.TimeUnit.Day,ee(this,p).hour.values.length);continue}if(!(ee(this,p).dayOfWeek.nthDay<=0||Math.ceil(F.getDate()/7)===ee(this,p).dayOfWeek.nthDay)){F.applyDateOperation(ae,r.TimeUnit.Day,ee(this,p).hour.values.length);continue}if(!Ne(J=$,j,Vl).call(J,F.getMonth()+1,ee(this,p).month.values)){F.applyDateOperation(ae,r.TimeUnit.Month,ee(this,p).hour.values.length);continue}if(Ne(this,O,hp).call(this,F,ae,k)){if(!Ne(B=$,j,Vl).call(B,F.getMinutes(),ee(this,p).minute.values)){Ne(this,O,dp).call(this,F,ae,k);continue}if(!Ne(re=$,j,Vl).call(re,F.getSeconds(),ee(this,p).second.values)){Ne(this,O,op).call(this,F,ae,k);continue}if(ue===F.getTime()){(ae==="Add"||F.getMilliseconds()===0)&&F.applyDateOperation(ae,r.TimeUnit.Second,ee(this,p).hour.values.length);continue}break}}if(xe>d)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return F.getMilliseconds()!==0&&F.setMilliseconds(0),we(this,b,F),F},Ke($,j);let c=$;l.CronExpression=c,l.default=c})(jf)),jf}var Bc={},Pg;function mS(){if(Pg)return Bc;Pg=1,Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.seededRandom=d;function l(c){let f=2166136261;for(let h=0;h<c.length;h++)f^=c.charCodeAt(h),f=Math.imul(f,16777619);return()=>f>>>0}function r(c){return()=>{let f=c+=1831565813;return f=Math.imul(f^f>>>15,f|1),f^=f+Math.imul(f^f>>>7,f|61),((f^f>>>14)>>>0)/4294967296}}function d(c){const f=c?l(c)():Math.floor(Math.random()*1e10);return r(f)}return Bc}var Gg;function kf(){var p,S,xp,Ls,pp,yp,vp,bp,Sp,Np,jp,_f,wp,Ep;if(Gg)return Ma;Gg=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.CronExpressionParser=Ma.DayOfWeek=Ma.Months=Ma.CronUnit=Ma.PredefinedExpressions=void 0;const l=up(),r=gp(),d=mS(),c=th();var f;(function(G){G["@yearly"]="0 0 0 1 1 *",G["@annually"]="0 0 0 1 1 *",G["@monthly"]="0 0 0 1 * *",G["@weekly"]="0 0 0 * * 0",G["@daily"]="0 0 0 * * *",G["@hourly"]="0 0 * * * *",G["@minutely"]="0 * * * * *",G["@secondly"]="* * * * * *",G["@weekdays"]="0 0 0 * * 1-5",G["@weekends"]="0 0 0 * * 0,6"})(f||(Ma.PredefinedExpressions=f={}));var h;(function(G){G.Second="Second",G.Minute="Minute",G.Hour="Hour",G.DayOfMonth="DayOfMonth",G.Month="Month",G.DayOfWeek="DayOfWeek"})(h||(Ma.CronUnit=h={}));var b;(function(G){G[G.jan=1]="jan",G[G.feb=2]="feb",G[G.mar=3]="mar",G[G.apr=4]="apr",G[G.may=5]="may",G[G.jun=6]="jun",G[G.jul=7]="jul",G[G.aug=8]="aug",G[G.sep=9]="sep",G[G.oct=10]="oct",G[G.nov=11]="nov",G[G.dec=12]="dec"})(b||(Ma.Months=b={}));var N;(function(G){G[G.sun=0]="sun",G[G.mon=1]="mon",G[G.tue=2]="tue",G[G.wed=3]="wed",G[G.thu=4]="thu",G[G.fri=5]="fri",G[G.sat=6]="sat"})(N||(Ma.DayOfWeek=N={}));let v=(S=class{static parse($,ne={}){var he,me,Ee,de,_e,ct,Xe,Kt;const{strict:k=!1,hashSeed:ae}=ne,F=(0,d.seededRandom)(ae);$=f[$]||$;const ue=Ne(he=S,p,xp).call(he,$,k);if(!(ue.dayOfMonth==="*"||ue.dayOfWeek==="*"||!k))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const xe=Ne(me=S,p,Ls).call(me,h.Second,ue.second,c.CronSecond.constraints,F),J=Ne(Ee=S,p,Ls).call(Ee,h.Minute,ue.minute,c.CronMinute.constraints,F),B=Ne(de=S,p,Ls).call(de,h.Hour,ue.hour,c.CronHour.constraints,F),re=Ne(_e=S,p,Ls).call(_e,h.Month,ue.month,c.CronMonth.constraints,F),ge=Ne(ct=S,p,Ls).call(ct,h.DayOfMonth,ue.dayOfMonth,c.CronDayOfMonth.constraints,F),{dayOfWeek:Se,nthDayOfWeek:ke}=Ne(Xe=S,p,wp).call(Xe,ue.dayOfWeek),z=Ne(Kt=S,p,Ls).call(Kt,h.DayOfWeek,Se,c.CronDayOfWeek.constraints,F),le=new l.CronFieldCollection({second:new c.CronSecond(xe,{rawValue:ue.second}),minute:new c.CronMinute(J,{rawValue:ue.minute}),hour:new c.CronHour(B,{rawValue:ue.hour}),dayOfMonth:new c.CronDayOfMonth(ge,{rawValue:ue.dayOfMonth}),month:new c.CronMonth(re,{rawValue:ue.month}),dayOfWeek:new c.CronDayOfWeek(z,{rawValue:ue.dayOfWeek,nthDayOfWeek:ke})});return new r.CronExpression(le,{...ne,expression:$})}},p=new WeakSet,xp=function($,ne){if(ne&&!$.length)throw new Error("Invalid cron expression");$=$||"0 * * * * *";const k=$.trim().split(/\s+/);if(ne&&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 ae=["*","*","*","*","*","0"];k.length<ae.length&&k.unshift(...ae.slice(k.length));const[F,ue,xe,J,B,re]=k;return{second:F,minute:ue,hour:xe,dayOfMonth:J,month:B,dayOfWeek:re}},Ls=function($,ne,k,ae){if(($===h.Month||$===h.DayOfWeek)&&(ne=ne.replace(/[a-z]{3}/gi,F=>{F=F.toLowerCase();const ue=b[F]||N[F];if(ue===void 0)throw new Error(`Validation error, cannot resolve alias "${F}"`);return ue.toString()})),!k.validChars.test(ne))throw new Error(`Invalid characters, got value: ${ne}`);return ne=Ne(this,p,pp).call(this,ne,k),ne=Ne(this,p,yp).call(this,ne,k,ae),Ne(this,p,vp).call(this,$,ne,k)},pp=function($,ne){return $.replace(/[*?]/g,ne.min+"-"+ne.max)},yp=function($,ne,k){const ae=k();return $.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(F,ue,xe,J)=>{if(ue&&xe&&J){const B=parseInt(ue,10),re=parseInt(xe,10),ge=parseInt(J,10);if(B>re)throw new Error(`Invalid range: ${B}-${re}, min > max`);if(ge<=0)throw new Error(`Invalid step: ${ge}, must be positive`);const Se=Math.max(B,ne.min),ke=Math.floor(ae*ge),z=[];for(let le=Math.floor(Se/ge)*ge+ke;le<=re;le+=ge)le>=Se&&z.push(le);return z.join(",")}else if(ue&&xe){const B=parseInt(ue,10),re=parseInt(xe,10);if(B>re)throw new Error(`Invalid range: ${B}-${re}, min > max`);return String(Math.floor(ae*(re-B+1))+B)}else if(J){const B=parseInt(J,10);if(B<=0)throw new Error(`Invalid step: ${B}, must be positive`);const re=Math.floor(ae*B),ge=[];for(let Se=Math.floor(ne.min/B)*B+re;Se<=ne.max;Se+=B)Se>=ne.min&&ge.push(Se);return ge.join(",")}else return String(Math.floor(ae*(ne.max-ne.min+1)+ne.min))})},vp=function($,ne,k){const ae=[];function F(xe,J){var B;if(Array.isArray(xe))ae.push(...xe);else if(Ne(B=S,p,Ep).call(B,J,xe))ae.push(xe);else{const re=parseInt(xe.toString(),10);if(!(re>=J.min&&re<=J.max))throw new Error(`Constraint error, got value ${xe} expected range ${J.min}-${J.max}`);ae.push($===h.DayOfWeek?re%7:xe)}}return ne.split(",").forEach(xe=>{var J;if(!(xe.length>0))throw new Error("Invalid list value format");F(Ne(J=S,p,bp).call(J,$,xe,k),k)}),ae},bp=function($,ne,k){var F,ue;const ae=ne.split("/");if(ae.length>2)throw new Error(`Invalid repeat: ${ne}`);return ae.length===2?(isNaN(parseInt(ae[0],10))||(ae[0]=`${ae[0]}-${k.max}`),Ne(F=S,p,_f).call(F,$,ae[0],parseInt(ae[1],10),k)):Ne(ue=S,p,_f).call(ue,$,ne,1,k)},Sp=function($,ne,k){if(!(!isNaN($)&&!isNaN(ne)&&$>=k.min&&ne<=k.max))throw new Error(`Constraint error, got range ${$}-${ne} expected range ${k.min}-${k.max}`);if($>ne)throw new Error(`Invalid range: ${$}-${ne}, min(${$}) > max(${ne})`)},Np=function($){if(!(!isNaN($)&&$>0))throw new Error(`Constraint error, cannot repeat at every ${$} time.`)},jp=function($,ne,k,ae){const F=[];$===h.DayOfWeek&&k%7===0&&F.push(0);for(let ue=ne;ue<=k;ue+=ae)F.indexOf(ue)===-1&&F.push(ue);return F},_f=function($,ne,k,ae){const F=ne.split("-");if(F.length<=1)return isNaN(+ne)?ne:+ne;const[ue,xe]=F.map(J=>parseInt(J,10));return Ne(this,p,Sp).call(this,ue,xe,ae),Ne(this,p,Np).call(this,k),Ne(this,p,jp).call(this,$,ue,xe,k)},wp=function($){const ne=$.split("#");if(ne.length<=1)return{dayOfWeek:ne[0]};const k=+ne[ne.length-1],ae=$.match(/([,-/])/);if(ae!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ae==null?void 0:ae[0]}\` special characters are incompatible`);if(!(ne.length<=2&&!isNaN(k)&&k>=1&&k<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:ne[0],nthDayOfWeek:k}},Ep=function($,ne){return $.chars.some(k=>ne.toString().includes(k))},Ke(S,p),S);return Ma.CronExpressionParser=v,Ma}var rn={};const gS={},xS=Object.freeze(Object.defineProperty({__proto__:null,default:gS},Symbol.toStringTag,{value:"Module"})),Fg=ev(xS);var Zg;function pS(){var h,b,zf,Tp;if(Zg)return rn;Zg=1;var l=rn&&rn.__createBinding||(Object.create?(function(p,S,C,j){j===void 0&&(j=C);var D=Object.getOwnPropertyDescriptor(S,C);(!D||("get"in D?!S.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return S[C]}}),Object.defineProperty(p,j,D)}):(function(p,S,C,j){j===void 0&&(j=C),p[j]=S[C]})),r=rn&&rn.__setModuleDefault||(Object.create?(function(p,S){Object.defineProperty(p,"default",{enumerable:!0,value:S})}):function(p,S){p.default=S}),d=rn&&rn.__importStar||(function(){var p=function(S){return p=Object.getOwnPropertyNames||function(C){var j=[];for(var D in C)Object.prototype.hasOwnProperty.call(C,D)&&(j[j.length]=D);return j},p(S)};return function(S){if(S&&S.__esModule)return S;var C={};if(S!=null)for(var j=p(S),D=0;D<j.length;D++)j[D]!=="default"&&l(C,S,j[D]);return r(C,S),C}})();Object.defineProperty(rn,"__esModule",{value:!0}),rn.CronFileParser=void 0;const c=kf();let f=(b=class{static async parseFile(S){var D;const{readFile:C}=await Promise.resolve().then(()=>d(Fg)),j=await C(S,"utf8");return Ne(D=b,h,zf).call(D,j)}static parseFileSync(S){var D;const{readFileSync:C}=Fg,j=C(S,"utf8");return Ne(D=b,h,zf).call(D,j)}},h=new WeakSet,zf=function(S){var D;const C=S.split(`
403
+ `),j={variables:{},expressions:[],errors:{}};for(const O of C){const M=O.trim();if(M.length===0||M.startsWith("#"))continue;const R=M.match(/^(.*)=(.*)$/);if(R){const[,Z,T]=R;j.variables[Z]=T.replace(/["']/g,"");continue}try{const Z=Ne(D=b,h,Tp).call(D,M);j.expressions.push(Z.interval)}catch(Z){j.errors[M]=Z}}return j},Tp=function(S){const C=S.split(" ");return{interval:c.CronExpressionParser.parse(C.slice(0,5).join(" ")),command:C.slice(5,C.length)}},Ke(b,h),b);return rn.CronFileParser=f,rn}var Wg;function yS(){return Wg||(Wg=1,(function(l){var r=As&&As.__createBinding||(Object.create?(function(p,S,C,j){j===void 0&&(j=C);var D=Object.getOwnPropertyDescriptor(S,C);(!D||("get"in D?!S.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return S[C]}}),Object.defineProperty(p,j,D)}):(function(p,S,C,j){j===void 0&&(j=C),p[j]=S[C]})),d=As&&As.__exportStar||function(p,S){for(var C in p)C!=="default"&&!Object.prototype.hasOwnProperty.call(S,C)&&r(S,p,C)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const c=kf();var f=eh();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return f.CronDate}});var h=up();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return h.CronFieldCollection}});var b=gp();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return b.CronExpression}});var N=kf();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return N.CronExpressionParser}});var v=pS();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return v.CronFileParser}}),d(th(),l),l.default=c.CronExpressionParser})(As)),As}var vS=yS();const Cp=6048e5,bS=864e5,SS=6e4,NS=36e5,Qg=Symbol.for("constructDateFrom");function Oa(l,r){return typeof l=="function"?l(r):l&&typeof l=="object"&&Qg in l?l[Qg](r):l instanceof Date?new l.constructor(r):new Date(r)}function Ct(l,r){return Oa(r||l,l)}function jS(l,r,d){return Oa(l,+Ct(l)+r)}function Yc(l,r,d){return jS(l,r*NS)}let wS={};function no(){return wS}function iu(l,r){var N,v,p,S;const d=no(),c=(r==null?void 0:r.weekStartsOn)??((v=(N=r==null?void 0:r.locale)==null?void 0:N.options)==null?void 0:v.weekStartsOn)??d.weekStartsOn??((S=(p=d.locale)==null?void 0:p.options)==null?void 0:S.weekStartsOn)??0,f=Ct(l,r==null?void 0:r.in),h=f.getDay(),b=(h<c?7:0)+h-c;return f.setDate(f.getDate()-b),f.setHours(0,0,0,0),f}function Qc(l,r){return iu(l,{...r,weekStartsOn:1})}function Mp(l,r){const d=Ct(l,r==null?void 0:r.in),c=d.getFullYear(),f=Oa(d,0);f.setFullYear(c+1,0,4),f.setHours(0,0,0,0);const h=Qc(f),b=Oa(d,0);b.setFullYear(c,0,4),b.setHours(0,0,0,0);const N=Qc(b);return d.getTime()>=h.getTime()?c+1:d.getTime()>=N.getTime()?c:c-1}function Ig(l){const r=Ct(l),d=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return d.setUTCFullYear(r.getFullYear()),+l-+d}function ES(l,...r){const d=Oa.bind(null,r.find(c=>typeof c=="object"));return r.map(d)}function Xg(l,r){const d=Ct(l,r==null?void 0:r.in);return d.setHours(0,0,0,0),d}function TS(l,r,d){const[c,f]=ES(d==null?void 0:d.in,l,r),h=Xg(c),b=Xg(f),N=+h-Ig(h),v=+b-Ig(b);return Math.round((N-v)/bS)}function CS(l,r){const d=Mp(l,r),c=Oa(l,0);return c.setFullYear(d,0,4),c.setHours(0,0,0,0),Qc(c)}function MS(l,r){let d,c=r==null?void 0:r.in;return l.forEach(f=>{!c&&typeof f=="object"&&(c=Oa.bind(null,f));const h=Ct(f,c);(!d||d<h||isNaN(+h))&&(d=h)}),Oa(c,d||NaN)}function OS(l,r){let d,c=r==null?void 0:r.in;return l.forEach(f=>{!c&&typeof f=="object"&&(c=Oa.bind(null,f));const h=Ct(f,c);(!d||d>h||isNaN(+h))&&(d=h)}),Oa(c,d||NaN)}function RS(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function DS(l){return!(!RS(l)&&typeof l!="number"||isNaN(+Ct(l)))}function AS(l){return r=>{const c=(l?Math[l]:Math.trunc)(r);return c===0?0:c}}function _S(l,r){return+Ct(l)-+Ct(r)}function Jg(l,r,d){const c=_S(l,r)/SS;return AS(d==null?void 0:d.roundingMethod)(c)}function kS(l,r){const d=Ct(l,r==null?void 0:r.in);return d.setFullYear(d.getFullYear(),0,1),d.setHours(0,0,0,0),d}const zS={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"}},US=(l,r,d)=>{let c;const f=zS[l];return typeof f=="string"?c=f:r===1?c=f.one:c=f.other.replace("{{count}}",r.toString()),d!=null&&d.addSuffix?d.comparison&&d.comparison>0?"in "+c:c+" ago":c};function wf(l){return(r={})=>{const d=r.width?String(r.width):l.defaultWidth;return l.formats[d]||l.formats[l.defaultWidth]}}const LS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},HS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},VS={date:wf({formats:LS,defaultWidth:"full"}),time:wf({formats:HS,defaultWidth:"full"}),dateTime:wf({formats:qS,defaultWidth:"full"})},BS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},YS=(l,r,d,c)=>BS[l];function eu(l){return(r,d)=>{const c=d!=null&&d.context?String(d.context):"standalone";let f;if(c==="formatting"&&l.formattingValues){const b=l.defaultFormattingWidth||l.defaultWidth,N=d!=null&&d.width?String(d.width):b;f=l.formattingValues[N]||l.formattingValues[b]}else{const b=l.defaultWidth,N=d!=null&&d.width?String(d.width):l.defaultWidth;f=l.values[N]||l.values[b]}const h=l.argumentCallback?l.argumentCallback(r):r;return f[h]}}const $S={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},PS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},GS={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"]},FS={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"]},ZS={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"}},WS={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"}},QS=(l,r)=>{const d=Number(l),c=d%100;if(c>20||c<10)switch(c%10){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd"}return d+"th"},IS={ordinalNumber:QS,era:eu({values:$S,defaultWidth:"wide"}),quarter:eu({values:PS,defaultWidth:"wide",argumentCallback:l=>l-1}),month:eu({values:GS,defaultWidth:"wide"}),day:eu({values:FS,defaultWidth:"wide"}),dayPeriod:eu({values:ZS,defaultWidth:"wide",formattingValues:WS,defaultFormattingWidth:"wide"})};function tu(l){return(r,d={})=>{const c=d.width,f=c&&l.matchPatterns[c]||l.matchPatterns[l.defaultMatchWidth],h=r.match(f);if(!h)return null;const b=h[0],N=c&&l.parsePatterns[c]||l.parsePatterns[l.defaultParseWidth],v=Array.isArray(N)?JS(N,C=>C.test(b)):XS(N,C=>C.test(b));let p;p=l.valueCallback?l.valueCallback(v):v,p=d.valueCallback?d.valueCallback(p):p;const S=r.slice(b.length);return{value:p,rest:S}}}function XS(l,r){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&r(l[d]))return d}function JS(l,r){for(let d=0;d<l.length;d++)if(r(l[d]))return d}function KS(l){return(r,d={})=>{const c=r.match(l.matchPattern);if(!c)return null;const f=c[0],h=r.match(l.parsePattern);if(!h)return null;let b=l.valueCallback?l.valueCallback(h[0]):h[0];b=d.valueCallback?d.valueCallback(b):b;const N=r.slice(f.length);return{value:b,rest:N}}}const eN=/^(\d+)(th|st|nd|rd)?/i,tN=/\d+/i,aN={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},nN={any:[/^b/i,/^(a|c)/i]},lN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sN={any:[/1/i,/2/i,/3/i,/4/i]},rN={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},iN={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]},uN={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},cN={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]},oN={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},dN={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}},fN={ordinalNumber:KS({matchPattern:eN,parsePattern:tN,valueCallback:l=>parseInt(l,10)}),era:tu({matchPatterns:aN,defaultMatchWidth:"wide",parsePatterns:nN,defaultParseWidth:"any"}),quarter:tu({matchPatterns:lN,defaultMatchWidth:"wide",parsePatterns:sN,defaultParseWidth:"any",valueCallback:l=>l+1}),month:tu({matchPatterns:rN,defaultMatchWidth:"wide",parsePatterns:iN,defaultParseWidth:"any"}),day:tu({matchPatterns:uN,defaultMatchWidth:"wide",parsePatterns:cN,defaultParseWidth:"any"}),dayPeriod:tu({matchPatterns:oN,defaultMatchWidth:"any",parsePatterns:dN,defaultParseWidth:"any"})},hN={code:"en-US",formatDistance:US,formatLong:VS,formatRelative:YS,localize:IS,match:fN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function mN(l,r){const d=Ct(l,r==null?void 0:r.in);return TS(d,kS(d))+1}function gN(l,r){const d=Ct(l,r==null?void 0:r.in),c=+Qc(d)-+CS(d);return Math.round(c/Cp)+1}function Op(l,r){var S,C,j,D;const d=Ct(l,r==null?void 0:r.in),c=d.getFullYear(),f=no(),h=(r==null?void 0:r.firstWeekContainsDate)??((C=(S=r==null?void 0:r.locale)==null?void 0:S.options)==null?void 0:C.firstWeekContainsDate)??f.firstWeekContainsDate??((D=(j=f.locale)==null?void 0:j.options)==null?void 0:D.firstWeekContainsDate)??1,b=Oa((r==null?void 0:r.in)||l,0);b.setFullYear(c+1,0,h),b.setHours(0,0,0,0);const N=iu(b,r),v=Oa((r==null?void 0:r.in)||l,0);v.setFullYear(c,0,h),v.setHours(0,0,0,0);const p=iu(v,r);return+d>=+N?c+1:+d>=+p?c:c-1}function xN(l,r){var N,v,p,S;const d=no(),c=(r==null?void 0:r.firstWeekContainsDate)??((v=(N=r==null?void 0:r.locale)==null?void 0:N.options)==null?void 0:v.firstWeekContainsDate)??d.firstWeekContainsDate??((S=(p=d.locale)==null?void 0:p.options)==null?void 0:S.firstWeekContainsDate)??1,f=Op(l,r),h=Oa((r==null?void 0:r.in)||l,0);return h.setFullYear(f,0,c),h.setHours(0,0,0,0),iu(h,r)}function pN(l,r){const d=Ct(l,r==null?void 0:r.in),c=+iu(d,r)-+xN(d,r);return Math.round(c/Cp)+1}function nt(l,r){const d=l<0?"-":"",c=Math.abs(l).toString().padStart(r,"0");return d+c}const Ul={y(l,r){const d=l.getFullYear(),c=d>0?d:1-d;return nt(r==="yy"?c%100:c,r.length)},M(l,r){const d=l.getMonth();return r==="M"?String(d+1):nt(d+1,2)},d(l,r){return nt(l.getDate(),r.length)},a(l,r){const d=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return d.toUpperCase();case"aaa":return d;case"aaaaa":return d[0];case"aaaa":default:return d==="am"?"a.m.":"p.m."}},h(l,r){return nt(l.getHours()%12||12,r.length)},H(l,r){return nt(l.getHours(),r.length)},m(l,r){return nt(l.getMinutes(),r.length)},s(l,r){return nt(l.getSeconds(),r.length)},S(l,r){const d=r.length,c=l.getMilliseconds(),f=Math.trunc(c*Math.pow(10,d-3));return nt(f,r.length)}},kr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Kg={G:function(l,r,d){const c=l.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return d.era(c,{width:"abbreviated"});case"GGGGG":return d.era(c,{width:"narrow"});case"GGGG":default:return d.era(c,{width:"wide"})}},y:function(l,r,d){if(r==="yo"){const c=l.getFullYear(),f=c>0?c:1-c;return d.ordinalNumber(f,{unit:"year"})}return Ul.y(l,r)},Y:function(l,r,d,c){const f=Op(l,c),h=f>0?f:1-f;if(r==="YY"){const b=h%100;return nt(b,2)}return r==="Yo"?d.ordinalNumber(h,{unit:"year"}):nt(h,r.length)},R:function(l,r){const d=Mp(l);return nt(d,r.length)},u:function(l,r){const d=l.getFullYear();return nt(d,r.length)},Q:function(l,r,d){const c=Math.ceil((l.getMonth()+1)/3);switch(r){case"Q":return String(c);case"QQ":return nt(c,2);case"Qo":return d.ordinalNumber(c,{unit:"quarter"});case"QQQ":return d.quarter(c,{width:"abbreviated",context:"formatting"});case"QQQQQ":return d.quarter(c,{width:"narrow",context:"formatting"});case"QQQQ":default:return d.quarter(c,{width:"wide",context:"formatting"})}},q:function(l,r,d){const c=Math.ceil((l.getMonth()+1)/3);switch(r){case"q":return String(c);case"qq":return nt(c,2);case"qo":return d.ordinalNumber(c,{unit:"quarter"});case"qqq":return d.quarter(c,{width:"abbreviated",context:"standalone"});case"qqqqq":return d.quarter(c,{width:"narrow",context:"standalone"});case"qqqq":default:return d.quarter(c,{width:"wide",context:"standalone"})}},M:function(l,r,d){const c=l.getMonth();switch(r){case"M":case"MM":return Ul.M(l,r);case"Mo":return d.ordinalNumber(c+1,{unit:"month"});case"MMM":return d.month(c,{width:"abbreviated",context:"formatting"});case"MMMMM":return d.month(c,{width:"narrow",context:"formatting"});case"MMMM":default:return d.month(c,{width:"wide",context:"formatting"})}},L:function(l,r,d){const c=l.getMonth();switch(r){case"L":return String(c+1);case"LL":return nt(c+1,2);case"Lo":return d.ordinalNumber(c+1,{unit:"month"});case"LLL":return d.month(c,{width:"abbreviated",context:"standalone"});case"LLLLL":return d.month(c,{width:"narrow",context:"standalone"});case"LLLL":default:return d.month(c,{width:"wide",context:"standalone"})}},w:function(l,r,d,c){const f=pN(l,c);return r==="wo"?d.ordinalNumber(f,{unit:"week"}):nt(f,r.length)},I:function(l,r,d){const c=gN(l);return r==="Io"?d.ordinalNumber(c,{unit:"week"}):nt(c,r.length)},d:function(l,r,d){return r==="do"?d.ordinalNumber(l.getDate(),{unit:"date"}):Ul.d(l,r)},D:function(l,r,d){const c=mN(l);return r==="Do"?d.ordinalNumber(c,{unit:"dayOfYear"}):nt(c,r.length)},E:function(l,r,d){const c=l.getDay();switch(r){case"E":case"EE":case"EEE":return d.day(c,{width:"abbreviated",context:"formatting"});case"EEEEE":return d.day(c,{width:"narrow",context:"formatting"});case"EEEEEE":return d.day(c,{width:"short",context:"formatting"});case"EEEE":default:return d.day(c,{width:"wide",context:"formatting"})}},e:function(l,r,d,c){const f=l.getDay(),h=(f-c.weekStartsOn+8)%7||7;switch(r){case"e":return String(h);case"ee":return nt(h,2);case"eo":return d.ordinalNumber(h,{unit:"day"});case"eee":return d.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return d.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return d.day(f,{width:"short",context:"formatting"});case"eeee":default:return d.day(f,{width:"wide",context:"formatting"})}},c:function(l,r,d,c){const f=l.getDay(),h=(f-c.weekStartsOn+8)%7||7;switch(r){case"c":return String(h);case"cc":return nt(h,r.length);case"co":return d.ordinalNumber(h,{unit:"day"});case"ccc":return d.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return d.day(f,{width:"narrow",context:"standalone"});case"cccccc":return d.day(f,{width:"short",context:"standalone"});case"cccc":default:return d.day(f,{width:"wide",context:"standalone"})}},i:function(l,r,d){const c=l.getDay(),f=c===0?7:c;switch(r){case"i":return String(f);case"ii":return nt(f,r.length);case"io":return d.ordinalNumber(f,{unit:"day"});case"iii":return d.day(c,{width:"abbreviated",context:"formatting"});case"iiiii":return d.day(c,{width:"narrow",context:"formatting"});case"iiiiii":return d.day(c,{width:"short",context:"formatting"});case"iiii":default:return d.day(c,{width:"wide",context:"formatting"})}},a:function(l,r,d){const f=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"aaa":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return d.dayPeriod(f,{width:"narrow",context:"formatting"});case"aaaa":default:return d.dayPeriod(f,{width:"wide",context:"formatting"})}},b:function(l,r,d){const c=l.getHours();let f;switch(c===12?f=kr.noon:c===0?f=kr.midnight:f=c/12>=1?"pm":"am",r){case"b":case"bb":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return d.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return d.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(l,r,d){const c=l.getHours();let f;switch(c>=17?f=kr.evening:c>=12?f=kr.afternoon:c>=4?f=kr.morning:f=kr.night,r){case"B":case"BB":case"BBB":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return d.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return d.dayPeriod(f,{width:"wide",context:"formatting"})}},h:function(l,r,d){if(r==="ho"){let c=l.getHours()%12;return c===0&&(c=12),d.ordinalNumber(c,{unit:"hour"})}return Ul.h(l,r)},H:function(l,r,d){return r==="Ho"?d.ordinalNumber(l.getHours(),{unit:"hour"}):Ul.H(l,r)},K:function(l,r,d){const c=l.getHours()%12;return r==="Ko"?d.ordinalNumber(c,{unit:"hour"}):nt(c,r.length)},k:function(l,r,d){let c=l.getHours();return c===0&&(c=24),r==="ko"?d.ordinalNumber(c,{unit:"hour"}):nt(c,r.length)},m:function(l,r,d){return r==="mo"?d.ordinalNumber(l.getMinutes(),{unit:"minute"}):Ul.m(l,r)},s:function(l,r,d){return r==="so"?d.ordinalNumber(l.getSeconds(),{unit:"second"}):Ul.s(l,r)},S:function(l,r){return Ul.S(l,r)},X:function(l,r,d){const c=l.getTimezoneOffset();if(c===0)return"Z";switch(r){case"X":return tx(c);case"XXXX":case"XX":return Hs(c);case"XXXXX":case"XXX":default:return Hs(c,":")}},x:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"x":return tx(c);case"xxxx":case"xx":return Hs(c);case"xxxxx":case"xxx":default:return Hs(c,":")}},O:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ex(c,":");case"OOOO":default:return"GMT"+Hs(c,":")}},z:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ex(c,":");case"zzzz":default:return"GMT"+Hs(c,":")}},t:function(l,r,d){const c=Math.trunc(+l/1e3);return nt(c,r.length)},T:function(l,r,d){return nt(+l,r.length)}};function ex(l,r=""){const d=l>0?"-":"+",c=Math.abs(l),f=Math.trunc(c/60),h=c%60;return h===0?d+String(f):d+String(f)+r+nt(h,2)}function tx(l,r){return l%60===0?(l>0?"-":"+")+nt(Math.abs(l)/60,2):Hs(l,r)}function Hs(l,r=""){const d=l>0?"-":"+",c=Math.abs(l),f=nt(Math.trunc(c/60),2),h=nt(c%60,2);return d+f+r+h}const ax=(l,r)=>{switch(l){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Rp=(l,r)=>{switch(l){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},yN=(l,r)=>{const d=l.match(/(P+)(p+)?/)||[],c=d[1],f=d[2];if(!f)return ax(l,r);let h;switch(c){case"P":h=r.dateTime({width:"short"});break;case"PP":h=r.dateTime({width:"medium"});break;case"PPP":h=r.dateTime({width:"long"});break;case"PPPP":default:h=r.dateTime({width:"full"});break}return h.replace("{{date}}",ax(c,r)).replace("{{time}}",Rp(f,r))},vN={p:Rp,P:yN},bN=/^D+$/,SN=/^Y+$/,NN=["D","DD","YY","YYYY"];function jN(l){return bN.test(l)}function wN(l){return SN.test(l)}function EN(l,r,d){const c=TN(l,r,d);if(console.warn(c),NN.includes(l))throw new RangeError(c)}function TN(l,r,d){const c=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${r}\`) for formatting ${c} to the input \`${d}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const CN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,MN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ON=/^'([^]*?)'?$/,RN=/''/g,DN=/[a-zA-Z]/;function ks(l,r,d){var S,C,j,D;const c=no(),f=c.locale??hN,h=c.firstWeekContainsDate??((C=(S=c.locale)==null?void 0:S.options)==null?void 0:C.firstWeekContainsDate)??1,b=c.weekStartsOn??((D=(j=c.locale)==null?void 0:j.options)==null?void 0:D.weekStartsOn)??0,N=Ct(l,d==null?void 0:d.in);if(!DS(N))throw new RangeError("Invalid time value");let v=r.match(MN).map(O=>{const M=O[0];if(M==="p"||M==="P"){const R=vN[M];return R(O,f.formatLong)}return O}).join("").match(CN).map(O=>{if(O==="''")return{isToken:!1,value:"'"};const M=O[0];if(M==="'")return{isToken:!1,value:AN(O)};if(Kg[M])return{isToken:!0,value:O};if(M.match(DN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:O}});f.localize.preprocessor&&(v=f.localize.preprocessor(N,v));const p={firstWeekContainsDate:h,weekStartsOn:b,locale:f};return v.map(O=>{if(!O.isToken)return O.value;const M=O.value;(wN(M)||jN(M))&&EN(M,r,String(l));const R=Kg[M[0]];return R(N,M,f.localize,p)}).join("")}function AN(l){const r=l.match(ON);return r?r[1].replace(RN,"'"):l}function _N(l,r){return+Ct(l)>+Ct(r)}function kN(l,r){return+Ct(l)<+Ct(r)}function zN(l,r){const d=Ct(l,r==null?void 0:r.in);return d.setMinutes(0,0,0),d}const Ef=Wx,$c=[{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"}],Qn=160,Pc=14,UN=10,LN=7,nx=4,Dp=({configs:l,currentProjectId:r,onEditJob:d,queueStatus:c,queueAnalytics:f})=>{const h=H.useMemo(()=>zN(new Date),[]),b=H.useMemo(()=>Yc(h,24),[h]),N=H.useMemo(()=>Yc(h,-24),[h]),v=b,p=H.useMemo(()=>{const I=[];for(let oe=0;oe<=24;oe++)I.push(Yc(h,oe));return I},[h]),S=H.useMemo(()=>{const I=[];return l.forEach(({projectId:oe,config:Y})=>{var ne,k,ae,F,ue;const G={executor:Y.executorEnabled!==!1?Y.cronSchedule:null,reviewer:Y.reviewerEnabled?Y.reviewerSchedule:null,qa:Y.qa.enabled?Y.qa.schedule:null,audit:Y.audit.enabled?Y.audit.schedule:null,slicer:Y.roadmapScanner.enabled?Y.roadmapScanner.slicerSchedule:null,analytics:(ne=Y.analytics)!=null&&ne.enabled?(k=Y.analytics)==null?void 0:k.schedule:null,"pr-resolver":(ae=Y.prResolver)!=null&&ae.enabled?Y.prResolver.schedule:null,merger:(F=Y.merger)!=null&&F.enabled?(ue=Y.merger)==null?void 0:ue.schedule:null},$=Y.cronScheduleOffset||0;Object.entries(G).forEach(([xe,J])=>{if(J)try{const B=vS.CronExpressionParser.parse(J,{currentDate:h,endDate:b});for(;B.hasNext();){const re=B.next(),ge=new Date(re.getTime());ge.setMinutes(ge.getMinutes()+$),_N(ge,h)&&kN(ge,b)&&I.push({projectId:oe,jobType:xe,time:ge})}}catch(B){console.error(`Failed to parse cron "${J}" for ${oe}/${xe}`,B)}})}),I},[l,h,b]),C=H.useMemo(()=>{const I=new Set;return l.length===0||(l.every(oe=>oe.config.executorEnabled===!1)&&I.add("executor"),l.every(oe=>!oe.config.reviewerEnabled)&&I.add("reviewer"),l.every(oe=>!oe.config.qa.enabled)&&I.add("qa"),l.every(oe=>!oe.config.audit.enabled)&&I.add("audit"),l.every(oe=>!oe.config.roadmapScanner.enabled)&&I.add("slicer"),l.every(oe=>{var Y;return!((Y=oe.config.analytics)!=null&&Y.enabled)})&&I.add("analytics"),l.every(oe=>{var Y;return!((Y=oe.config.prResolver)!=null&&Y.enabled)})&&I.add("pr-resolver"),l.every(oe=>{var Y;return!((Y=oe.config.merger)!=null&&Y.enabled)})&&I.add("merger")),I},[l]),j=H.useMemo(()=>{const I=new Map;let oe=0;return l.forEach(Y=>{Y.projectId===r||(I.set(Y.projectId,oe%$c.length),oe++)}),I},[l,r]),D=I=>Jg(I,h),O=H.useMemo(()=>{const I=[];for(let oe=0;oe<=24;oe++)I.push(Yc(N,oe));return I},[N]),M=I=>{const oe=OS([MS([I,N]),v]);return Jg(oe,N)},R=H.useMemo(()=>{const I=(f==null?void 0:f.recentRuns)??[],oe=new Map;for(const Y of I){const G=Y.providerKey||"default",$=new Date(Y.startedAt*1e3),ne=Y.finishedAt?new Date(Y.finishedAt*1e3):new Date;ne<N||$>v||(oe.has(G)||oe.set(G,[]),oe.get(G).push({id:Y.id,jobType:Y.jobType,status:Y.status,projectPath:Y.projectPath,startedAt:$,finishedAt:ne,throttledCount:Y.throttledCount}))}if(c!=null&&c.running){const Y=c.running.providerKey??"default";oe.has(Y)||oe.set(Y,[]),oe.get(Y).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(oe.entries()).sort(([Y],[G])=>Y.localeCompare(G)).map(([Y,G])=>({providerKey:Y,runs:G.sort(($,ne)=>$.startedAt.getTime()-ne.startedAt.getTime())}))},[v,N,f,c]),Z=I=>I.split(/[-_]/).map(oe=>oe.charAt(0).toUpperCase()+oe.slice(1)).join(" "),T=l.length>1,K=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:p.map((I,oe)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},oe))});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."})]}),T&&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(I=>I.projectId!==r).slice(0,5).map(I=>{const oe=j.get(I.projectId)??0,Y=$c[oe],G=(I.projectId.split("/").pop()??I.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 ${Y.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:I.projectId,children:G})]},I.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+Qn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Qn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:p.map((I,oe)=>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:oe*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:ks(I,"HH:mm")})},oe))})]}),s.jsxs("div",{className:"relative",children:[l.length===0&&s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("p",{className:"text-sm text-slate-500 italic",children:"No project data available for timeline."})}),Ef.map(I=>{const oe=C.has(I.id),Y=S.filter($=>$.jobType===I.id);if(!T)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${oe?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Qn},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 ${I.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:I.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[K,Y.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:oe?"Disabled":"No runs in this window"})}):Y.map(($,ne)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d($.projectId,$.jobType),style:{left:D($.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${I.color.bg} ${I.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${I.label} at ${ks($.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-10",children:ks($.time,"HH:mm")})},ne))]})]},I.id);const G=l.length*Pc+nx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${oe?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Qn,height:G},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 ${I.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:I.label})]}),l.map($=>{const ne=$.projectId===r,k=($.projectId.split("/").pop()??$.projectId).slice(0,14),ae=j.get($.projectId)??0,F=ne?I.color.bg:$c[ae].bg;return s.jsxs("div",{style:{height:Pc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${F}`}),s.jsx("span",{className:`text-[9px] truncate ${ne?"text-slate-200 font-semibold":"text-slate-600"}`,title:$.projectId,children:ne?`${k} ★`:k})]},$.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:G},children:[K,l.map(($,ne)=>{const k=$.projectId===r,ae=Y.filter(re=>re.projectId===$.projectId),F=nx+ne*Pc,ue=k?UN:LN,xe=Math.floor((Pc-ue)/2),J=j.get($.projectId)??0,B=k?{bg:I.color.bg,border:I.color.border}:$c[J];return s.jsxs(Oe.Fragment,{children:[ne>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:F}}),ae.map((re,ge)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d($.projectId,re.jobType),style:{left:D(re.time)-3,top:F+xe,height:ue},className:`absolute w-6 rounded border ${B.bg} ${B.border} ${k?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${$.projectId} · ${I.label} @ ${ks(re.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-20",children:ks(re.time,"HH:mm")})},ge))]},$.projectId)}),Y.length===0&&!oe&&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"})})]})]},I.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Qn+D(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})}),s.jsxs("div",{className:"p-3 bg-slate-900/40 flex items-center gap-4 text-[10px] text-slate-500",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-1.5 h-3 rounded bg-blue-500/50 border border-blue-500"}),s.jsx("span",{children:"Each block = one scheduled run"})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-[1px] h-4 bg-rose-500"}),s.jsx("span",{children:"Current Time"})]}),T&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project  ·  blocks in same column = scheduling overlap"})})]}),R.length>0&&s.jsxs("div",{className:"border-t border-slate-800",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Recent Execution Runs"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Last 24h of real runs grouped by provider bucket."})]}),s.jsxs("div",{className:"text-[10px] uppercase tracking-[0.2em] text-slate-500",children:[(f==null?void 0:f.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+Qn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Qn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:O.map((I,oe)=>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:oe*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:ks(I,"HH:mm")})},oe))})]}),s.jsx("div",{className:"relative",children:R.map(({providerKey:I,runs:oe})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${I}`,children:[s.jsxs("div",{style:{width:Qn},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:I,children:Z(I)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:I})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:O.map((Y,G)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},G))}),oe.map(Y=>{const G=Ef.find(J=>J.id===Y.jobType)??Ef[0],$=M(Y.startedAt),ne=M(Y.finishedAt),k=Math.max(ne-$,8),ae=Y.status==="running",F=Y.status==="error"||Y.status==="failed"||Y.status==="errored",ue=ae?"bg-green-500":F?"bg-red-500":G.color.bg,xe=ae?"border-green-400/60":F?"border-red-400/60":G.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ue} ${xe} opacity-85 shadow-lg ${ae?"animate-pulse":""}`,style:{left:$,width:k},title:`${I} • ${G.label} • ${ks(Y.startedAt,"MMM d HH:mm")} • ${Y.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:G.label}),s.jsx("span",{className:"text-white/70",children:Y.status}),Y.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",Y.throttledCount,"x"]})]})},`${I}-${Y.id}-${Y.startedAt.getTime()}`)})]})]},I))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Qn+M(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},Ic=[{label:"Balanced (recommended)",value:"5 */2 * * *",description:"Every 2 hours at minute 5"},{label:"Every 6 hours (very safe)",value:"10 */6 * * *",description:"Every 6 hours at minute 10"},{label:"Every 4 hours",value:"10 */4 * * *",description:"Every 4 hours at minute 10"},{label:"Twice daily",value:"20 2,14 * * *",description:"At 02:20 and 14:20 UTC"},{label:"Daily",value:"30 3 * * *",description:"Once per day at 03:30 UTC"},{label:"Weekdays only",value:"30 9 * * 1-5",description:"At 09:30 UTC, Monday to Friday"},{label:"Weekly (Monday)",value:"40 3 * * 1",description:"At 03:40 UTC every Monday"},{label:"Custom",value:"__custom__",description:"Enter your own cron expression"}],ah=[{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 * * *",prResolver:"15 9,15,21 * * *",merger:"55 */4 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am",prResolver:"9:15am, 3:15pm, 9:15pm",merger:"Every 4h at :55"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *",prResolver:"15 6,14,22 * * *",merger:"55 */4 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35",prResolver:"6:15am, 2:15pm & 10:15pm",merger:"Every 4h at :55"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1",prResolver:"15 8,12,16 * * 1-5",merger:"55 */4 * * 1-5"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am",prResolver:"8:15am, 12:15pm & 4:15pm weekdays",merger:"Every 4h at :55 weekdays"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1",prResolver:"15 8 * * 1,4",merger:"55 */8 * * *"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am",prResolver:"Mon & Thu at 8:15am",merger:"Every 8h at :55"}}];function Lr(l){return l?l.trim().replace(/\s+/g," "):""}function zs(l,r){return Lr(l)===Lr(r)}function HN(l){if(l)return ah.find(r=>r.id===l)}function Ap(l,r,d,c,f,h,b,N){return zs(l.schedules.executor,r)&&zs(l.schedules.reviewer,d)&&zs(l.schedules.qa,c)&&zs(l.schedules.audit,f)&&zs(l.schedules.slicer,h)&&zs(l.schedules.prResolver,b)&&zs(l.schedules.merger,N)}function qN(l,r,d,c,f,h,b){return ah.find(N=>Ap(N,l,r,d,c,f,h,b))}function VN(l,r,d,c,f,h,b,N){const v=HN(l);return v&&Ap(v,r,d,c,f,h,b,N)?v:qN(r,d,c,f,h,b,N)}function Ll(l){const r=Lr(l),d=r.split(/\s+/);if(d.length!==5)return r;const[c,f,h,b,N]=d,v=/^\d+$/.test(c),p=Ic.find(S=>Lr(S.value)===r);if(p)return p.label;if(c==="*/30"&&f==="*")return"Every 30 minutes";if(c==="0"&&f==="*")return"Every hour";if(c.startsWith("*/"))return`Every ${parseInt(c.replace("*/",""),10)} minutes`;if(v&&f.startsWith("*/")&&h==="*"&&b==="*"&&N==="*"){const S=parseInt(f.replace("*/",""),10);return c==="0"?`Every ${S} hours`:`Every ${S} hours at :${c.padStart(2,"0")}`}if(c==="0"&&f.startsWith("*/"))return`Every ${parseInt(f.replace("*/",""),10)} hours`;if(c==="0"&&f.includes("-")){const[S,C]=f.split("-");return`Every hour from ${au(S)} to ${au(C)}`}if(v&&f.includes("-")&&h==="*"&&b==="*"&&N==="*"){const[S,C]=f.split("-");return`Every hour from ${nu(S,c)} to ${nu(C,c)}`}if(c==="0"&&f.includes(",")){const S=f.split(",").map(au);return S.length<=3?`At ${S.join(" and ")}`:`At ${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}if(v&&f.includes(",")&&h==="*"&&b==="*"&&(N==="*"||N==="1-5")){const S=f.split(",").map(j=>nu(j,c)),C=N==="1-5"?"Weekdays at ":"At ";return S.length<=3?`${C}${S.join(" and ")}`:`${C}${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}return c==="0"&&f!=="*"&&h==="*"&&b==="*"&&N==="*"?`Daily at ${au(f)}`:v&&f!=="*"&&h==="*"&&b==="*"&&N==="*"?`Daily at ${nu(f,c)}`:c==="0"&&f!=="*"&&h==="*"&&b==="*"&&N==="1-5"?`Weekdays at ${au(f)}`:v&&f!=="*"&&h==="*"&&b==="*"&&N==="1-5"?`Weekdays at ${nu(f,c)}`:r}function au(l){const r=parseInt(l,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function nu(l,r){const d=r.padStart(2,"0"),c=parseInt(l,10);return Number.isNaN(c)?`${l}:${d}`:c===0?`12:${d} AM`:c<12?`${c}:${d} AM`:c===12?`12:${d} PM`:`${c-12}:${d} PM`}function BN(l){const r=Lr(l),d=Ic.find(c=>Lr(c.value)===r);return(d==null?void 0:d.value)??"__custom__"}function lx(l){const r=new Date,d=l.getTime()-r.getTime(),c=Math.floor(d/6e4),f=Math.floor(c/60),h=Math.floor(f/24);return c<1?"less than a minute":c<60?`in ${c} minute${c>1?"s":""}`:f<24?`in ${f} hour${f>1?"s":""}`:`in ${h} day${h>1?"s":""}`}const YN=()=>{var re,ge,Se,ke,z,le,he,me,Ee;const l=eo(),{addToast:r,selectedProjectId:d,globalModeLoading:c}=$t(),[f,h]=H.useState(!1),[b,N]=H.useState(!1),[v,p]=H.useState(!1),[S,C]=H.useState(!1),[j,D]=H.useState(null),[O,M]=H.useState([]),[R,Z]=H.useState(null),[T,K]=H.useState(null),{data:I,loading:oe,error:Y,refetch:G}=un(Kx,[d],{enabled:!c}),{data:$,loading:ne,refetch:k}=un(Jf,[d],{enabled:!c});H.useEffect(()=>{if(c)return;const de=()=>{G(),k(),Tg().then(Z).catch(()=>{}),M2(24).then(K).catch(()=>{}),Jx().then(M).catch(()=>{})};de();const _e=setInterval(de,3e4);return()=>clearInterval(_e)},[d,c,G,k]);const ae=async()=>{if(I){h(!0);try{I.paused?(await Rf(),r({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await N2(),r({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"})),G()}catch(de){r({title:"Action Failed",message:de instanceof Error?de.message:"Toggle failed",type:"error"})}finally{h(!1)}}},F=async()=>{if(window.confirm("Are you sure you want to clear all pending jobs?")){p(!0);try{const de=await O2();r({title:"Queue Cleared",message:`Removed ${de.cleared} pending jobs.`,type:"success"}),Tg().then(Z)}catch(de){r({title:"Clear Failed",message:de instanceof Error?de.message:"Failed to clear queue",type:"error"})}finally{p(!1)}}},ue=async de=>{if($){N(!0);try{await Kf({queue:{...$.queue,...de}}),r({title:"Settings Saved",message:"Queue configuration updated.",type:"success"}),k()}catch(_e){r({title:"Save Failed",message:_e instanceof Error?_e.message:"Save failed",type:"error"})}finally{N(!1)}}},xe=async de=>{const _e=de==="planner"?"slicer":de;D(de);try{await ep(_e),r({title:"Job Triggered",message:`${de} job queued successfully.`,type:"success"})}catch(ct){r({title:"Trigger Failed",message:ct instanceof Error?ct.message:"Failed to trigger job",type:"error"})}finally{D(null)}},J=de=>{l(`/settings?tab=jobs&jobType=${de==="planner"?"slicer":de}`)};if(oe||ne)return s.jsx("div",{className:"flex items-center justify-center min-h-[400px] text-slate-500",children:"Loading automation state..."});if(Y||!I||!$)return s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[s.jsx(bn,{className:"h-10 w-10 text-red-500"}),s.jsx("div",{className:"text-slate-300 font-medium",children:"Failed to load scheduling data"}),s.jsx(Be,{onClick:()=>{G(),k()},children:"Retry"})]});const B=I.paused;return s.jsxs("div",{className:"max-w-6xl mx-auto space-y-8 pb-20",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-6",children:[s.jsxs("div",{children:[s.jsxs("h2",{className:"text-2xl font-bold text-slate-100 flex items-center gap-3",children:["Automation Queue",s.jsx(Pa,{variant:B?"warning":"success",className:"px-3 py-1 text-xs uppercase tracking-wider",children:B?"Paused":"Active"})]}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Live queue, manual triggers, and run history for automated jobs"}),s.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[s.jsx(Be,{variant:"outline",size:"sm",onClick:()=>l("/settings?tab=schedules"),children:"Open Schedules"}),s.jsx(Be,{variant:"ghost",size:"sm",onClick:()=>l("/settings?tab=jobs"),children:"Open Jobs"})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"Cadence and schedule presets are configured in Settings > Schedules."})]}),s.jsx(Be,{variant:B?"primary":"outline",size:"lg",className:B?"bg-emerald-600 hover:bg-emerald-700":"border-slate-700 hover:bg-slate-800",onClick:ae,loading:f,children:B?s.jsxs(s.Fragment,{children:[s.jsx(Yl,{className:"h-5 w-5 mr-2 fill-current"})," Resume Scheduling"]}):s.jsxs(s.Fragment,{children:[s.jsx(Fx,{className:"h-5 w-5 mr-2"})," Pause Scheduling"]})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[s.jsxs(ft,{className:"overflow-hidden border-slate-800",children:[s.jsxs("div",{className:"p-5 border-b border-slate-800 flex items-center justify-between bg-slate-900/30",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wg,{className:"h-5 w-5 text-indigo-400"}),s.jsx("h3",{className:"font-semibold text-slate-200",children:"Execution Queue"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Be,{variant:"ghost",size:"sm",onClick:F,loading:v,disabled:!(R!=null&&R.items.length),className:"text-slate-500 hover:text-red-400 hover:bg-red-400/10",children:[s.jsx(Vr,{className:"h-4 w-4 mr-1.5"}),"Clear"]}),s.jsx("div",{className:`p-1.5 rounded-lg cursor-pointer hover:bg-slate-800 transition-colors ${S?"text-indigo-400 bg-slate-800":"text-slate-500"}`,onClick:()=>C(!S),title:"Queue Settings",children:s.jsx(Ng,{className:"h-5 w-5"})})]})]}),s.jsx("div",{className:`transition-all duration-300 overflow-hidden ${S?"max-h-[500px]":"max-h-0"}`,children:s.jsxs("div",{className:"p-6 bg-slate-950/40 border-b border-slate-800 grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(gt,{label:"Dispatch Mode",value:((re=$.queue)==null?void 0:re.mode)||"auto",onChange:de=>ue({mode:de}),options:[{label:"Auto (Recommended)",value:"auto"},{label:"Conservative (1 at a time)",value:"conservative"},{label:"Provider-aware",value:"provider-aware"}]}),s.jsx(ze,{label:"Max Concurrency",type:"number",min:"1",max:"20",value:String(((ge=$.queue)==null?void 0:ge.maxConcurrency)||1),onChange:de=>ue({maxConcurrency:Number(de.target.value)})}),s.jsx("div",{className:"md:col-span-2 flex items-center gap-3",children:s.jsx($a,{label:"Coordinator Enabled",checked:((Se=$.queue)==null?void 0:Se.enabled)??!0,onChange:de=>ue({enabled:de})})})]})}),s.jsx("div",{className:"p-0",children:R!=null&&R.items.length?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"text-[11px] uppercase tracking-wider text-slate-500 font-semibold bg-slate-900/20",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3",children:"Job / Project"}),s.jsx("th",{className:"px-6 py-3",children:"Status"}),s.jsx("th",{className:"px-6 py-3",children:"Wait Time"}),s.jsx("th",{className:"px-6 py-3 text-right",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/40",children:R.items.map(de=>s.jsxs("tr",{className:"hover:bg-slate-800/20 transition-colors group",children:[s.jsxs("td",{className:"px-6 py-4",children:[s.jsx("div",{className:"font-medium text-slate-200",children:de.jobType}),s.jsx("div",{className:"text-[11px] text-slate-500 truncate max-w-[200px]",title:de.projectPath,children:de.projectName||de.projectPath})]}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(Pa,{variant:de.status==="running"?"info":"neutral",className:"text-[10px]",children:de.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:lx(new Date(de.enqueuedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("button",{onClick:()=>J(de.jobType),className:"opacity-0 group-hover:opacity-100 p-2 text-slate-500 hover:text-indigo-400 transition-all",title:"Configure Job",children:s.jsx(Ng,{className:"h-4 w-4"})})})]},de.id))})]})}):s.jsxs("div",{className:"py-12 flex flex-col items-center justify-center text-slate-500 text-sm italic",children:[s.jsx("div",{className:"mb-3 p-3 rounded-full bg-slate-900 border border-slate-800",children:s.jsx(bg,{className:"h-6 w-6 opacity-30"})}),"Queue is empty"]})})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Operational Timeline"}),s.jsxs("div",{className:"text-xs text-slate-500 flex items-center gap-2",children:[s.jsx(Sg,{className:"h-3 w-3 animate-spin-slow"})," Live Update"]})]}),s.jsx(Dp,{configs:O,currentProjectId:d??void 0,onEditJob:(de,_e)=>J(_e),queueStatus:R,queueAnalytics:T})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(ft,{className:"p-5 space-y-4 border-slate-800 bg-slate-900/20",children:[s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Efficiency Stats"}),s.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Avg Wait Time"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[R!=null&&R.averageWaitSeconds?(R.averageWaitSeconds/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]}),s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Oldest Pending"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[R!=null&&R.oldestPendingAge?(R.oldestPendingAge/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]})]})]}),s.jsxs(ft,{className:"divide-y divide-slate-800 border-slate-800",children:[s.jsx("div",{className:"p-4 bg-slate-900/30",children:s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Manual Trigger"})}),s.jsx("div",{className:"p-2 space-y-1",children:[{id:"executor",label:"Run Executor",icon:Yl,enabled:$.executorEnabled!==!1},{id:"reviewer",label:"Run Reviewer",icon:du,enabled:$.reviewerEnabled??!1},{id:"qa",label:"Run QA",icon:wg,enabled:((ke=$.qa)==null?void 0:ke.enabled)??!1},{id:"audit",label:"Run Audit",icon:bg,enabled:((z=$.audit)==null?void 0:z.enabled)??!1},{id:"planner",label:"Run Planner",icon:Gx,enabled:((le=$.roadmapScanner)==null?void 0:le.enabled)??!1},{id:"analytics",label:"Run Analytics",icon:Hx,enabled:((he=$.analytics)==null?void 0:he.enabled)??!1},{id:"pr-resolver",label:"Run PR Resolver",icon:Yx,enabled:((me=$.prResolver)==null?void 0:me.enabled)??!1},{id:"merger",label:"Run Merger",icon:Wf,enabled:((Ee=$.merger)==null?void 0:Ee.enabled)??!1}].map(de=>s.jsxs("button",{onClick:()=>xe(de.id),disabled:j===de.id||!de.enabled,className:`w-full flex items-center justify-between p-3 rounded-lg text-sm transition-colors group disabled:cursor-not-allowed ${de.enabled?"text-slate-300 hover:bg-slate-800/40":"text-slate-600 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(de.icon,{className:`h-4 w-4 ${de.enabled?"text-slate-500 group-hover:text-indigo-400":"text-slate-700"}`}),de.label]}),j===de.id?s.jsx(Sg,{className:"h-3 w-3 animate-spin text-indigo-400"}):de.enabled?s.jsx(Yl,{className:"h-3 w-3 opacity-0 group-hover:opacity-100 transition-all fill-current text-indigo-400"}):s.jsx("span",{className:"text-[10px] text-slate-600 uppercase tracking-wider",children:"Off"})]},de.id))}),s.jsx("div",{className:"p-4",children:s.jsx(Be,{variant:"outline",size:"sm",className:"w-full",onClick:()=>l("/settings?tab=jobs"),children:"Advanced Settings"})})]})]})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Execution History (Last 24h)"}),s.jsx(ft,{className:"border-slate-800 overflow-hidden",children:T!=null&&T.recentRuns.length?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"text-[11px] uppercase tracking-wider text-slate-500 font-semibold bg-slate-900/20",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-4",children:"Job Type"}),s.jsx("th",{className:"px-6 py-4",children:"Status"}),s.jsx("th",{className:"px-6 py-4",children:"Duration"}),s.jsx("th",{className:"px-6 py-4",children:"Started"}),s.jsx("th",{className:"px-6 py-4 text-right",children:"Provider"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/40",children:T.recentRuns.map(de=>s.jsxs("tr",{className:"hover:bg-slate-800/10 transition-colors",children:[s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"font-medium text-slate-300 capitalize",children:de.jobType})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(Pa,{variant:de.status==="finished"?"success":de.status==="failed"?"error":"neutral",className:"text-[10px]",children:de.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400",children:de.durationSeconds?`${de.durationSeconds}s`:"--"}),s.jsx("td",{className:"px-6 py-4 text-slate-500 text-xs",children:lx(new Date(de.startedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right text-slate-500 font-mono text-xs",children:de.providerKey||"default"})]},de.id))})]})}):s.jsx("div",{className:"py-20 text-center text-slate-500 italic text-sm",children:"No recorded runs in the last 24 hours."})})]})]})},$N=({isOpen:l,onClose:r,title:d,children:c})=>(H.useEffect(()=>{const f=h=>{h.key==="Escape"&&r()};return l&&(document.addEventListener("keydown",f),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",f),document.body.style.overflow="unset"}},[l,r]),l?Yb.createPortal(s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:r,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:d}),s.jsx("button",{onClick:r,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:s.jsx(Br,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:c})]})]}),document.body):null),PN=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>l.toUpperCase().includes(d)),GN=({value:l,isSensitive:r})=>{const[d,c]=Oe.useState(!1);return r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>c(!d),className:"text-slate-500 hover:text-slate-300","aria-label":d?"Hide sensitive value":"Show sensitive value",title:d?"Hide sensitive value":"Show sensitive value",children:d?s.jsx(M1,{className:"h-4 w-4"}):s.jsx(Bx,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},_p=({envVars:l,onChange:r,compact:d=!1})=>{const[c,f]=Oe.useState(""),[h,b]=Oe.useState(""),[N,v]=Oe.useState(null),[p,S]=Oe.useState(""),{addToast:C}=$t(),j=()=>{if(c.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(c)){C({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...l,[c]:h}),f(""),b("")}},D=T=>{const K={...l};delete K[T],r(K)},O=T=>{v(T),S(l[T]??"")},M=()=>{N&&(r({...l,[N]:p}),v(null),S(""))},R=()=>{v(null),S("")},Z=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[!d&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:Z.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):Z.map(([T,K])=>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:T}),N===T?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:p,onChange:I=>S(I.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),s.jsx("button",{type:"button",onClick:M,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${T} value`,title:`Save ${T} value`,children:s.jsx(u1,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:R,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${T}`,title:`Cancel editing ${T}`,children:s.jsx(Br,{className:"h-4 w-4"})})]}):s.jsx(GN,{value:K,isSensitive:PN(T)})]}),N!==T&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>O(T),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${T}`,title:`Edit ${T}`,children:s.jsx(ao,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>D(T),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${T}`,title:`Delete ${T}`,children:s.jsx(Vr,{className:"h-4 w-4"})})]})]},T))}),s.jsxs("div",{className:`flex items-end gap-3 ${d?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:c,onChange:T=>f(T.target.value.toUpperCase()),placeholder:d?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:h,onChange:T=>b(T.target.value),placeholder:d?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Be,{onClick:j,disabled:!c.trim(),size:d?"sm":"md",children:[s.jsx(Vs,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function FN(l,r){var d;return!!(l!=null&&l.startsWith("glm-")||(d=r==null?void 0:r.model)!=null&&d.startsWith("glm-"))}function ZN(l,r){var d,c;return FN(l,r)?!((c=(d=r==null?void 0:r.envVars)==null?void 0:d.ANTHROPIC_API_KEY)!=null&&c.trim()):!1}const sx={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:""}},WN=({isOpen:l,onClose:r,onSave:d,presetId:c,preset:f,isBuiltIn:h,existingIds:b})=>{const[N,v]=Oe.useState(""),[p,S]=Oe.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[C,j]=Oe.useState(!1),[D,O]=Oe.useState("custom"),[M,R]=Oe.useState(null),Z=ZN(c??N,p);Oe.useEffect(()=>{l&&(c&&f?(v(c),S({name:f.name,command:f.command,subcommand:f.subcommand??"",promptFlag:f.promptFlag??"",autoApproveFlag:f.autoApproveFlag??"",workdirFlag:f.workdirFlag??"",modelFlag:f.modelFlag??"",model:f.model??"",envVars:f.envVars??{}}),c==="claude"||f.command==="claude"?O("claude"):c==="codex"||f.command==="codex"?O("codex"):O("custom")):(v(""),S({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),O("custom")),R(null),j(!!(f!=null&&f.envVars&&Object.keys(f.envVars).length>0)))},[l,c,f]);const T=Y=>{if(O(Y),Y!=="custom"&&sx[Y]){const G=sx[Y];S($=>({...$,...G,envVars:$.envVars})),!c&&!N&&v(Y)}},K=(Y,G)=>{S($=>({...$,[Y]:G})),R(null)},I=()=>{if(!p.name.trim())return R("Name is required"),!1;if(!p.command.trim())return R("Command is required"),!1;if(!c){if(!N.trim())return R("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(N))return R("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(b.includes(N))return R("A preset with this ID already exists"),!1}return!0},oe=()=>{var G,$,ne,k,ae,F;if(!I())return;const Y={name:p.name.trim(),command:p.command.trim()};(G=p.subcommand)!=null&&G.trim()&&(Y.subcommand=p.subcommand.trim()),($=p.promptFlag)!=null&&$.trim()&&(Y.promptFlag=p.promptFlag.trim()),(ne=p.autoApproveFlag)!=null&&ne.trim()&&(Y.autoApproveFlag=p.autoApproveFlag.trim()),(k=p.workdirFlag)!=null&&k.trim()&&(Y.workdirFlag=p.workdirFlag.trim()),(ae=p.modelFlag)!=null&&ae.trim()&&(Y.modelFlag=p.modelFlag.trim()),(F=p.model)!=null&&F.trim()&&(Y.model=p.model.trim()),p.envVars&&Object.keys(p.envVars).length>0&&(Y.envVars=p.envVars),d(c||N,Y),r()};return s.jsx($N,{isOpen:l,onClose:r,title:c?`Edit Preset: ${f==null?void 0:f.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[M&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:M}),Z&&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(Ur,{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."})]})]})}),!h&&s.jsx("div",{children:s.jsx(gt,{label:"Template",value:D,onChange:T,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(ze,{label:"Preset ID",value:N,onChange:Y=>v(Y.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(ze,{label:"Display Name",value:p.name,onChange:Y=>K("name",Y.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(ze,{label:"Command",value:p.command,onChange:Y=>K("command",Y.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(ze,{label:"Model",value:p.model??"",onChange:Y=>K("model",Y.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(ze,{label:"Model Flag",value:p.modelFlag??"",onChange:Y=>K("modelFlag",Y.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>j(!C),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[C?s.jsx(g1,{className:"h-4 w-4"}):s.jsx(Zf,{className:"h-4 w-4"}),"Advanced Options"]}),C&&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(ze,{label:"Subcommand",value:p.subcommand??"",onChange:Y=>K("subcommand",Y.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(ze,{label:"Prompt Flag",value:p.promptFlag??"",onChange:Y=>K("promptFlag",Y.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(ze,{label:"Auto-Approve Flag",value:p.autoApproveFlag??"",onChange:Y=>K("autoApproveFlag",Y.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(ze,{label:"Workdir Flag",value:p.workdirFlag??"",onChange:Y=>K("workdirFlag",Y.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(_p,{envVars:p.envVars??{},onChange:Y=>K("envVars",Y),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Be,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Be,{onClick:oe,children:c?"Save Changes":"Add Preset"})]})]})})},QN=({tabs:l,activeTab:r,onChange:d,className:c=""})=>{var v,p;const[f,h]=Oe.useState((v=l[0])==null?void 0:v.id),b=r||f,N=S=>{d?d(S):h(S)};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(S=>s.jsx("button",{onClick:()=>N(S.id),className:`
404
+ whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
405
+ ${b===S.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
406
+ `,children:S.label},S.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=l.find(S=>S.id===b))==null?void 0:p.content})]})},lu=({label:l,value:r=[],onChange:d,placeholder:c,helpText:f})=>{const[h,b]=Oe.useState(""),N=()=>{h.trim()&&!r.includes(h.trim())&&(d([...r,h.trim()]),b(""))},v=S=>{d(r.filter(C=>C!==S))},p=S=>{S.key==="Enter"&&(S.preventDefault(),N())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:l}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:r.map(S=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[S,s.jsx("button",{type:"button",onClick:()=>v(S),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${S}`,title:`Remove ${S}`,children:s.jsx(Br,{className:"h-3 w-3"})})]},S))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:h,onChange:S=>b(S.target.value),onKeyDown:p,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(Be,{onClick:N,disabled:!h.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(Vs,{className:"h-4 w-4"})})]}),f&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:f})]})},IN=({form:l,updateField:r,projectName:d,doctorChecks:c,doctorLoading:f})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(ft,{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(ze,{label:"Project Name",value:d,disabled:!0}),s.jsx(ze,{label:"Default Branch",value:l.defaultBranch,onChange:h=>r("defaultBranch",h.target.value)}),s.jsx(ze,{label:"PRD Directory",value:l.prdDir,onChange:h=>r("prdDir",h.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(ze,{label:"Branch Prefix",value:l.branchPrefix,onChange:h=>r("branchPrefix",h.target.value)}),s.jsx(ze,{label:"Templates Directory",value:l.templatesDir,onChange:h=>r("templatesDir",h.target.value),helperText:"Directory for custom template overrides"}),s.jsx(ze,{label:"Max Log Size",type:"number",value:String(l.maxLogSize),onChange:h=>r("maxLogSize",Number(h.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"}),helperText:"Maximum size for process log files"})]}),s.jsxs("div",{className:"pt-4 mt-4 border-t border-slate-800 space-y-6",children:[s.jsx(lu,{label:"Branch Patterns",value:l.branchPatterns,onChange:h=>r("branchPatterns",h),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"}),s.jsx(lu,{label:"PRD Priority",value:l.prdPriority,onChange:h=>r("prdPriority",h),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}),s.jsxs(ft,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(Ux,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),f?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):c.map((h,b)=>{const N=h.status==="pass",v=h.status==="warn",p=N?"bg-green-500/10 text-green-400 border-green-500/20":v?"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:h.name}),s.jsx("p",{className:"text-xs text-slate-500",children:h.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${p}`,children:h.status.toUpperCase()})]},`${h.name}-${b}`)})]})]}),rx=({presetId:l,preset:r,isBuiltIn:d,onEdit:c,onDelete:f,onReset:h})=>{var p,S,C;const b=r.envVars?Object.keys(r.envVars).length:0,v=(l.startsWith("glm-")||((p=r.model)==null?void 0:p.startsWith("glm-")))&&!((C=(S=r.envVars)==null?void 0:S.ANTHROPIC_API_KEY)!=null&&C.trim());return s.jsxs("div",{className:"flex flex-col p-4 rounded-lg border border-slate-800 bg-slate-950/40 hover:border-slate-700 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:r.name}),d&&s.jsx(Pa,{variant:"info",className:"text-[10px]",children:"Built-in"}),v&&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(Ur,{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 ${r.name} preset`,title:"Edit preset",children:s.jsx(ao,{className:"h-4 w-4"})}),d?h&&s.jsx("button",{type:"button",onClick:h,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${r.name} to defaults`,title:"Reset to defaults",children:s.jsx(Zx,{className:"h-4 w-4"})}):f&&s.jsx("button",{type:"button",onClick:f,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${r.name} preset`,title:"Delete preset",children:s.jsx(Vr,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Command:"}),s.jsxs("code",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-indigo-400 font-mono",children:[r.command,r.subcommand&&` ${r.subcommand}`]})]}),r.model&&s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Model:"}),s.jsx(Pa,{variant:"neutral",className:"text-[10px] font-mono",children:r.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",l]}),b>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[b," env var",b!==1?"s":""]})]})]})},Uf={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},Lf={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics",planner:"Planner","pr-resolver":"PR Resolver",merger:"Merger"},Tf={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},ix=({override:l,onChange:r,onSave:d,onCancel:c,isNew:f,presetOptions:h})=>{const b=O=>{const M=l.days.includes(O)?l.days.filter(R=>R!==O):[...l.days,O].sort((R,Z)=>R-Z);r({...l,days:M})},N=()=>{r({...l,days:[1,2,3,4,5]})},v=()=>{r({...l,days:[0,6]})},p=()=>{r({...l,days:[0,1,2,3,4,5,6]})},S=()=>{r({...l,jobTypes:null})},C=O=>{const M=l.jobTypes??[],R=M.includes(O)?M.filter(Z=>Z!==O):[...M,O];r({...l,jobTypes:R.length===0?null:R})},j=l.jobTypes===null||l.jobTypes===void 0,D=l.label.trim().length>0&&l.presetId.trim().length>0&&l.days.length>0&&l.startTime.trim().length>0&&l.endTime.trim().length>0;return s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ze,{label:"Label",value:l.label,onChange:O=>r({...l,label:O.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(gt,{label:"Provider",value:l.presetId,onChange:O=>r({...l,presetId:O}),options:h})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Days"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Object.keys(Uf).map(O=>s.jsx("button",{type:"button",onClick:()=>b(O),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${l.days.includes(O)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:Uf[O]},O)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:N,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekdays"}),s.jsx("button",{type:"button",onClick:v,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekend"}),s.jsx("button",{type:"button",onClick:p,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"All"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Start Time"}),s.jsx("input",{type:"time",value:l.startTime,onChange:O=>r({...l,startTime:O.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"End Time"}),s.jsx("input",{type:"time",value:l.endTime,onChange:O=>r({...l,endTime:O.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Job Types"}),s.jsx("button",{type:"button",onClick:S,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:j?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(Lf).filter(O=>O!=="planner").map(O=>{var R;const M=j||(((R=l.jobTypes)==null?void 0:R.includes(O))??!1);return s.jsx("button",{type:"button",onClick:()=>C(O),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${M?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled:j,children:Lf[O]},O)})}),j&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"This override applies to all job types."})]}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx($a,{checked:l.enabled,onChange:O=>r({...l,enabled:O}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(Be,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Be,{onClick:d,disabled:!D,children:f?"Add Override":"Save Changes"})]})]})},XN=({overrides:l,onChange:r,presetOptions:d})=>{const[c,f]=Oe.useState(null),[h,b]=Oe.useState(!1),[N,v]=Oe.useState(Tf),p=()=>{r([...l,N]),v({...Tf}),b(!1)},S=(R,Z)=>{const T=[...l];T[R]=Z,r(T)},C=R=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(l.filter((Z,T)=>T!==R))},j=R=>{const Z=[...l];Z[R]={...Z[R],enabled:!Z[R].enabled},r(Z)},D=R=>R.length===7?"Every day":R.length===5&&R.every(Z=>Z>=1&&Z<=5)?"Weekdays":R.length===2&&R.includes(0)&&R.includes(6)?"Weekends":R.map(Z=>Uf[Z]).join(", "),O=R=>!R||R.length===0?"All Jobs":R.map(Z=>Lf[Z]).join(", "),M=R=>{const Z=d.find(T=>T.value===R);return(Z==null?void 0:Z.label)||R};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"space-y-3",children:l.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No schedule overrides configured."}):l.map((R,Z)=>s.jsx("div",{children:c===Z?s.jsx(ix,{override:R,onChange:T=>S(Z,T),onSave:()=>f(null),onCancel:()=>f(null),presetOptions:d}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${R.enabled?"border-slate-800":"border-slate-800/50 opacity-60"}`,children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsx($a,{checked:R.enabled,onChange:()=>j(Z)}),s.jsx("span",{className:"text-slate-100 font-medium",children:R.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:M(R.presetId)})," · ",D(R.days)," · ",R.startTime," - ",R.endTime," · ",O(R.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>f(Z),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${R.label}`,title:`Edit ${R.label}`,children:s.jsx(ao,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>C(Z),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${R.label}`,title:`Delete ${R.label}`,children:s.jsx(Vr,{className:"h-4 w-4"})})]})]})},Z))}),h?s.jsx(ix,{override:N,onChange:v,onSave:p,onCancel:()=>{b(!1),v({...Tf})},isNew:!0,presetOptions:d}):s.jsxs(Be,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Vs,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},Xc=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],JN={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"}}},KN=({form:l,updateField:r,getAllPresets:d,getPresetOptions:c,handleEditPreset:f,handleDeletePreset:h,handleResetPreset:b,handleAddPreset:N})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(ft,{className:"p-6 bg-slate-900/60 border-indigo-500/20",children:s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-100",children:"Global AI Provider"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Default preset for all automation tasks"})]}),s.jsx("div",{className:"w-full md:w-72",children:s.jsx(gt,{value:l.provider,onChange:v=>r("provider",v),options:c(l.providerPresets)})})]})}),s.jsxs(ft,{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:"Available Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Custom AI models and environment configurations"})]}),s.jsxs(Be,{onClick:N,variant:"primary",size:"sm",children:[s.jsx(Vs,{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(v=>{const S=d()[v];return S?s.jsx(rx,{presetId:v,preset:S,isBuiltIn:!0,onEdit:()=>f(v),onReset:()=>b(v)},v):null}),Object.entries(l.providerPresets).filter(([v])=>!Xc.includes(v)).map(([v,p])=>s.jsx(rx,{presetId:v,preset:p,isBuiltIn:!1,onEdit:()=>f(v),onDelete:()=>h(v)},v))]})]}),s.jsxs(ft,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Reliability & Fallbacks"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automated fallback when a provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(gt,{label:"Primary Fallback Preset",value:l.primaryFallbackPreset,onChange:v=>r("primaryFallbackPreset",v),options:[{label:"— None —",value:""},...Object.entries(d()).map(([v,p])=>({label:p.name,value:v}))],helperText:"Automatic switch when global provider is throttled"}),s.jsx(gt,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:v=>r("secondaryFallbackPreset",v),options:[{label:"— None —",value:""},...Object.entries(d()).map(([v,p])=>({label:p.name,value:v}))]})]})]}),s.jsxs(ft,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Scheduled Overrides"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Automatically switch providers based on the time of day (e.g. use cheaper models at night)"})]}),s.jsx(XN,{overrides:l.providerScheduleOverrides,onChange:v=>r("providerScheduleOverrides",v),presetOptions:Object.entries(d()).map(([v,p])=>({label:p.name,value:v}))})]}),s.jsxs(ft,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Variables passed to all provider CLI executions"}),s.jsx(_p,{envVars:l.providerEnv,onChange:v=>r("providerEnv",v)})]})]}),va=({label:l,value:r,onChange:d,helperText:c,placeholder:f="5 */3 * * *"})=>{const h=BN(r),b=h==="__custom__",N=S=>{S!=="__custom__"&&d(S)},v=S=>{d(S.target.value)},p=Ic.find(S=>S.value===h);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(gt,{label:l,value:h,onChange:N,options:Ic.map(S=>({label:S.label,value:S.value})),helperText:b?void 0:(p==null?void 0:p.description)||c}),b&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(ze,{label:"Cron Expression",value:r,onChange:v,placeholder:f}),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)"]})]})]})},Hl=({title:l,icon:r,description:d,enabled:c,onToggle:f,expanded:h,onExpandChange:b,scheduleSummary:N,providerLabel:v,children:p,id:S})=>s.jsxs("div",{id:S,className:`border border-slate-800 rounded-xl overflow-hidden transition-all duration-200 ${h?"bg-slate-900/50 ring-1 ring-indigo-500/20":"bg-slate-900/20 hover:bg-slate-900/40"}`,children:[s.jsxs("div",{className:"flex items-center justify-between p-4 cursor-pointer select-none",onClick:()=>b(!h),children:[s.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[s.jsx("div",{className:`p-2 rounded-lg ${h?"bg-indigo-500/20 text-indigo-400":"bg-slate-800 text-slate-400"}`,children:s.jsx(r,{className:"h-5 w-5"})}),s.jsxs("div",{className:"overflow-hidden",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-200 truncate",children:l}),!h&&s.jsx("p",{className:"text-xs text-slate-500 truncate",children:d})]})]}),s.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[!h&&s.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[N&&s.jsx(Pa,{variant:"neutral",className:"bg-slate-800/50 text-[10px]",children:N}),v&&s.jsx(Pa,{variant:"info",className:"bg-blue-500/5 text-[10px]",children:v})]}),s.jsx("div",{onClick:C=>C.stopPropagation(),children:s.jsx($a,{checked:c,onChange:f})}),s.jsx(Zf,{className:`h-5 w-5 text-slate-500 transition-transform duration-300 ${h?"rotate-180 text-indigo-400":""}`})]})]}),s.jsx("div",{className:`grid transition-all duration-300 ease-in-out ${h?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:s.jsx("div",{className:"overflow-hidden",children:s.jsx("div",{className:"p-6 pt-0 space-y-6 border-t border-slate-800/50 mt-2",children:s.jsx("div",{className:"pt-6",children:p})})})})]}),ej=({form:l,updateField:r,handleRoadmapToggle:d,presetOptions:c})=>{var v,p,S,C,j,D,O,M,R,Z;const[f,h]=Oe.useState(null);Oe.useEffect(()=>{const K=new URLSearchParams(window.location.search).get("jobType");K&&(h(K),setTimeout(()=>{const I=document.getElementById(`job-section-${K}`);I&&I.scrollIntoView({behavior:"smooth",block:"center"})},100))},[]);const b=(T,K)=>{const I={...l.jobProviders};K===""?delete I[T]:I[T]=K,r("jobProviders",I)},N=[{label:"Use Global (default)",value:""},...c];return s.jsx("div",{className:"space-y-8",children:s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Configurations"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Enable jobs, choose providers, and tune runtime behavior. Cadence lives in the Schedules tab."})]}),s.jsx("span",{className:"text-xs text-slate-500",children:"8 total jobs"})]}),s.jsx(Hl,{id:"job-section-executor",title:"PRD Executor",icon:Yl,description:"Executes PRDs to generate code and create PRs",enabled:l.executorEnabled,onToggle:T=>r("executorEnabled",T),expanded:f==="executor",onExpandChange:T=>h(T?"executor":null),scheduleSummary:Ll(l.cronSchedule),providerLabel:l.jobProviders.executor?(v=c.find(T=>T.value===l.jobProviders.executor))==null?void 0:v.label:"Global",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(gt,{label:"Provider",value:l.jobProviders.executor??"",onChange:T=>b("executor",T),options:N}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.maxRuntime),onChange:T=>r("maxRuntime",Number(T.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for executor tasks"})]})}),s.jsx(Hl,{id:"job-section-reviewer",title:"PR Reviewer",icon:Bx,description:"Reviews PRs and provides feedback or automated fixes",enabled:l.reviewerEnabled,onToggle:T=>r("reviewerEnabled",T),expanded:f==="reviewer",onExpandChange:T=>h(T?"reviewer":null),scheduleSummary:Ll(l.reviewerSchedule),providerLabel:l.jobProviders.reviewer?(p=c.find(T=>T.value===l.jobProviders.reviewer))==null?void 0:p.label:"Global",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(gt,{label:"Provider",value:l.jobProviders.reviewer??"",onChange:T=>b("reviewer",T),options:N}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.reviewerMaxRuntime),onChange:T=>r("reviewerMaxRuntime",Number(T.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ze,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.minReviewScore),onChange:T=>r("minReviewScore",Number(T.target.value||0)),helperText:"PRs below this score will be marked as 'Needs Work'"}),s.jsx(ze,{label:"Max Retries",type:"number",value:String(l.reviewerMaxRetries),onChange:T=>r("reviewerMaxRetries",Number(T.target.value||0)),helperText:"Fix attempts after initial review"}),s.jsx(ze,{label:"Retry Delay",type:"number",value:String(l.reviewerRetryDelay),onChange:T=>r("reviewerRetryDelay",Number(T.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(ze,{label:"Max PRs Per Run",type:"number",value:String(l.reviewerMaxPrsPerRun),onChange:T=>r("reviewerMaxPrsPerRun",Number(T.target.value||0)),helperText:"Hard cap on PRs processed per run (0 = unlimited)"})})]})}),s.jsx(Hl,{id:"job-section-qa",title:"Quality Assurance",icon:S1,description:"Automated UI testing using Playwright",enabled:l.qa.enabled,onToggle:T=>r("qa",{...l.qa,enabled:T}),expanded:f==="qa",onExpandChange:T=>h(T?"qa":null),scheduleSummary:Ll(l.qa.schedule),providerLabel:l.jobProviders.qa?(S=c.find(T=>T.value===l.jobProviders.qa))==null?void 0:S.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(va,{label:"Schedule",value:l.qa.schedule,onChange:T=>r("qa",{...l.qa,schedule:T})}),s.jsx(gt,{label:"Provider",value:l.jobProviders.qa??"",onChange:T=>b("qa",T),options:N}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:T=>r("qa",{...l.qa,maxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(gt,{label:"Artifacts",value:l.qa.artifacts,onChange:T=>r("qa",{...l.qa,artifacts:T}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}]}),s.jsx(ze,{label:"Skip Label",value:l.qa.skipLabel,onChange:T=>r("qa",{...l.qa,skipLabel:T.target.value}),helperText:"GitHub label to skip QA"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 mt-1.5",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-0.5",children:"Install browsers if missing"})]}),s.jsx($a,{checked:l.qa.autoInstallPlaywright,onChange:T=>r("qa",{...l.qa,autoInstallPlaywright:T})})]})]}),s.jsx(lu,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:T=>r("qa",{...l.qa,branchPatterns:T}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA"})]})}),s.jsx(Hl,{id:"job-section-audit",title:"Code Audit",icon:du,description:"Automated code quality and security audits",enabled:l.audit.enabled,onToggle:T=>r("audit",{...l.audit,enabled:T}),expanded:f==="audit",onExpandChange:T=>h(T?"audit":null),scheduleSummary:Ll(l.audit.schedule),providerLabel:l.jobProviders.audit?(C=c.find(T=>T.value===l.jobProviders.audit))==null?void 0:C.label:"Global",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(va,{label:"Schedule",value:l.audit.schedule,onChange:T=>r("audit",{...l.audit,schedule:T})}),s.jsx(gt,{label:"Provider",value:l.jobProviders.audit??"",onChange:T=>b("audit",T),options:N}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:T=>r("audit",{...l.audit,maxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(gt,{label:"Target Column",value:l.audit.targetColumn,onChange:T=>r("audit",{...l.audit,targetColumn:T}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]})]})}),s.jsx(Hl,{id:"job-section-slicer",title:"Planner",icon:Gx,description:"Generate one PRD per run using ROADMAP.md or audit findings",enabled:l.roadmapScanner.enabled,onToggle:d,expanded:f==="slicer",onExpandChange:T=>h(T?"slicer":null),scheduleSummary:Ll(l.roadmapScanner.slicerSchedule),providerLabel:l.jobProviders.slicer?(j=c.find(T=>T.value===l.jobProviders.slicer))==null?void 0:j.label:"Global",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(va,{label:"Schedule",value:l.roadmapScanner.slicerSchedule,onChange:T=>r("roadmapScanner",{...l.roadmapScanner,slicerSchedule:T})}),s.jsx(gt,{label:"Provider",value:l.jobProviders.slicer??"",onChange:T=>b("slicer",T),options:N}),s.jsx(ze,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:T=>r("roadmapScanner",{...l.roadmapScanner,roadmapPath:T.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:T=>r("roadmapScanner",{...l.roadmapScanner,slicerMaxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(gt,{label:"Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:T=>r("roadmapScanner",{...l.roadmapScanner,priorityMode:T==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}]}),s.jsx(gt,{label:"Issue Column",value:l.roadmapScanner.issueColumn||"Ready",onChange:T=>r("roadmapScanner",{...l.roadmapScanner,issueColumn:T==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}]})]})}),s.jsx(Hl,{id:"job-section-analytics",title:"Analytics (Amplitude)",icon:Hx,description:"Fetch Amplitude data, analyze with AI, and create board issues",enabled:l.analytics.enabled,onToggle:T=>r("analytics",{...l.analytics,enabled:T}),expanded:f==="analytics",onExpandChange:T=>h(T?"analytics":null),scheduleSummary:Ll(l.analytics.schedule),providerLabel:l.jobProviders.analytics?(D=c.find(T=>T.value===l.jobProviders.analytics))==null?void 0:D.label:"Global",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(va,{label:"Schedule",value:l.analytics.schedule,onChange:T=>r("analytics",{...l.analytics,schedule:T})}),s.jsx(gt,{label:"Provider",value:l.jobProviders.analytics??"",onChange:T=>b("analytics",T),options:N}),s.jsx(ze,{label:"Amplitude API Key",value:((O=l.providerEnv)==null?void 0:O.AMPLITUDE_API_KEY)??"",onChange:T=>r("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:T.target.value}),placeholder:"Required"}),s.jsx(ze,{label:"Amplitude Secret Key",type:"password",value:((M=l.providerEnv)==null?void 0:M.AMPLITUDE_SECRET_KEY)??"",onChange:T=>r("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:T.target.value}),placeholder:"Required"}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:T=>r("analytics",{...l.analytics,maxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ze,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:T=>r("analytics",{...l.analytics,lookbackDays:Math.max(1,Math.min(90,Number(T.target.value||7)))})}),s.jsx(gt,{label:"Target Column",value:l.analytics.targetColumn,onChange:T=>r("analytics",{...l.analytics,targetColumn:T}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),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:T=>r("analytics",{...l.analytics,analysisPrompt:T.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(Hl,{id:"job-section-pr-resolver",title:"PR Resolver",icon:Yx,description:"Repo-wide conflict resolver that rebases PRs and applies feedback",enabled:l.prResolver.enabled,onToggle:T=>r("prResolver",{...l.prResolver,enabled:T}),expanded:f==="pr-resolver",onExpandChange:T=>h(T?"pr-resolver":null),scheduleSummary:Ll(l.prResolver.schedule),providerLabel:l.jobProviders["pr-resolver"]?(R=c.find(T=>T.value===l.jobProviders["pr-resolver"]))==null?void 0:R.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(va,{label:"Schedule",value:l.prResolver.schedule,onChange:T=>r("prResolver",{...l.prResolver,schedule:T})}),s.jsx(gt,{label:"Provider",value:l.jobProviders["pr-resolver"]??"",onChange:T=>b("pr-resolver",T),options:N}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.prResolver.maxRuntime),onChange:T=>r("prResolver",{...l.prResolver,maxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ze,{label:"Per-PR Timeout",type:"number",value:String(l.prResolver.perPrTimeout),onChange:T=>r("prResolver",{...l.prResolver,perPrTimeout:Math.max(0,Number(T.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ze,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.prResolver.maxPrsPerRun),onChange:T=>r("prResolver",{...l.prResolver,maxPrsPerRun:Math.max(0,Number(T.target.value||0))})}),s.jsx(ze,{label:"Ready Label",value:l.prResolver.readyLabel,onChange:T=>r("prResolver",{...l.prResolver,readyLabel:T.target.value})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"AI conflict resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"AI help for non-trivial rebases"})]}),s.jsx($a,{checked:l.prResolver.aiConflictResolution,onChange:T=>r("prResolver",{...l.prResolver,aiConflictResolution:T})})]}),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:"AI review resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Implement open review comments"})]}),s.jsx($a,{checked:l.prResolver.aiReviewResolution,onChange:T=>r("prResolver",{...l.prResolver,aiReviewResolution:T})})]})]}),s.jsx(lu,{label:"PR Resolver Branch Patterns",value:l.prResolver.branchPatterns,onChange:T=>r("prResolver",{...l.prResolver,branchPatterns:T}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter PRs (empty = all)"})]})}),s.jsx(Hl,{id:"job-section-merger",title:"Merge Orchestrator",icon:Wf,description:"Repo-wide PR merge coordinator — scans, rebases, and merges",enabled:l.merger.enabled,onToggle:T=>r("merger",{...l.merger,enabled:T}),expanded:f==="merger",onExpandChange:T=>h(T?"merger":null),scheduleSummary:Ll(l.merger.schedule),providerLabel:l.jobProviders.merger?(Z=c.find(T=>T.value===l.jobProviders.merger))==null?void 0:Z.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(va,{label:"Schedule",value:l.merger.schedule,onChange:T=>r("merger",{...l.merger,schedule:T})}),s.jsx(gt,{label:"Provider",value:l.jobProviders.merger??"",onChange:T=>b("merger",T),options:N}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.merger.maxRuntime),onChange:T=>r("merger",{...l.merger,maxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(gt,{label:"Merge Method",value:l.merger.mergeMethod,onChange:T=>r("merger",{...l.merger,mergeMethod:T}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]}),s.jsx(ze,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.merger.minReviewScore),onChange:T=>r("merger",{...l.merger,minReviewScore:Math.max(0,Math.min(100,Number(T.target.value||0)))})}),s.jsx(ze,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.merger.maxPrsPerRun),onChange:T=>r("merger",{...l.merger,maxPrsPerRun:Math.max(0,Number(T.target.value||0))})})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Rebase before merge"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rebase each PR against its base branch"})]}),s.jsx($a,{checked:l.merger.rebaseBeforeMerge,onChange:T=>r("merger",{...l.merger,rebaseBeforeMerge:T})})]}),s.jsx(lu,{label:"Merger Branch Patterns",value:l.merger.branchPatterns,onChange:T=>r("merger",{...l.merger,branchPatterns:T}),placeholder:"e.g., feat/, night-watch/"})]})})]})})};function ux(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const tj=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Merge Completed",value:"merge_completed"},{label:"Merge Failed",value:"merge_failed"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],aj=(l,r)=>l.includes(r)?l.filter(d=>d!==r):[...l,r],cx=({webhook:l,onChange:r,onSave:d,onCancel:c,isNew:f})=>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(gt,{label:"Type",value:l.type,onChange:h=>{const b=h;r(b==="telegram"?{type:b,botToken:"",chatId:"",events:l.events}:{type:b,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(ze,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:h=>r({...l,botToken:h.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(ze,{label:"Chat ID",value:l.chatId||"",onChange:h=>r({...l,chatId:h.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(ze,{label:"Webhook URL",type:"password",value:l.url||"",onChange:h=>r({...l,url:h.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:tj.map(h=>s.jsx("button",{type:"button",onClick:()=>r({...l,events:aj(l.events,h.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${l.events.includes(h.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:h.label},h.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Be,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Be,{onClick:d,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:f?"Add Webhook":"Save Changes"})]})]}),nj=({notifications:l,onChange:r,globalWebhook:d,onSetGlobal:c,onUnsetGlobal:f})=>{const[h,b]=Oe.useState(null),[N,v]=Oe.useState(!1),[p,S]=Oe.useState({type:"slack",url:"",events:[]}),C=()=>{r({webhooks:[...l.webhooks,p]}),S({type:"slack",url:"",events:[]}),v(!1)},j=(O,M)=>{const R=[...l.webhooks];R[O]=M,r({webhooks:R})},D=O=>{r({webhooks:l.webhooks.filter((M,R)=>R!==O)})};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((O,M)=>s.jsx("div",{children:h===M?s.jsx(cx,{webhook:O,onChange:R=>j(M,R),onSave:()=>b(null),onCancel:()=>b(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:O.type}),O.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",O.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:O.events.map(R=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:R.replace("_"," ")},R))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[c!==void 0&&(()=>{const R=d!=null&&ux(O)===ux(d);return s.jsx("button",{type:"button",onClick:()=>R?f==null?void 0:f():c(O),className:`p-2 transition-colors ${R?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":R?"Global channel (active)":"Set as global channel",title:R?"Global channel (active)":"Set as global channel",children:s.jsx(k1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>b(M),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${O.type} webhook`,title:`Edit ${O.type} webhook`,children:s.jsx(ao,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>D(M),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${O.type} webhook`,title:`Delete ${O.type} webhook`,children:s.jsx(Vr,{className:"h-4 w-4"})})]})]})},M))}),N?s.jsx(cx,{webhook:p,onChange:S,onSave:C,onCancel:()=>v(!1),isNew:!0}):s.jsxs(Be,{variant:"ghost",onClick:()=>v(!0),children:[s.jsx(Vs,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},lj=({form:l,updateField:r,globalWebhook:d,onSetGlobal:c,onUnsetGlobal:f})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(ft,{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 mt-1",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx($a,{checked:l.boardProvider.enabled,onChange:h=>r("boardProvider",{...l.boardProvider,enabled:h})})]}),l.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(gt,{label:"Board Provider",value:l.boardProvider.provider,onChange:h=>r("boardProvider",{...l.boardProvider,provider:h}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),l.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(ze,{label:"Project Number",type:"number",value:String(l.boardProvider.projectNumber||""),onChange:h=>r("boardProvider",{...l.boardProvider,projectNumber:h.target.value?Number(h.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(ze,{label:"Repository",value:l.boardProvider.repo||"",onChange:h=>r("boardProvider",{...l.boardProvider,repo:h.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(ft,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:"Send status updates and job results to custom endpoints or team channels"}),s.jsx(nj,{notifications:l.notifications,onChange:h=>r("notifications",h),globalWebhook:d,onSetGlobal:c,onUnsetGlobal:f})]})]}),sj=({form:l,scheduleMode:r,selectedTemplateId:d,onFieldChange:c,onSwitchToTemplate:f,onSwitchToCustom:h,onApplyTemplate:b,allProjectConfigs:N,currentProjectId:v,onEditJob:p})=>s.jsxs(ft,{className:"p-6 space-y-6",children:[N&&N.length>0&&s.jsx(Dp,{configs:N,currentProjectId:v,onEditJob:p}),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.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"Cadence is managed here. Enablement and runtime settings live in the Jobs tab."})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:h,children:"Custom"})]})]}),r==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:ah.map(S=>{const C=d===S.id;return s.jsxs("button",{type:"button",onClick:()=>b(S),className:`text-left p-4 rounded-lg border transition-colors ${C?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children:S.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:S.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",S.hints.executor],["Reviewer",S.hints.reviewer],["QA",S.hints.qa],["Audit",S.hints.audit],["Planner",S.hints.slicer],["PR Resolver",S.hints.prResolver],["Merger",S.hints.merger]].map(([j,D])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:j}),s.jsx("span",{className:"text-xs text-slate-400",children:D})]},j))})]},S.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx("div",{id:"job-schedule-executor",children:s.jsx(va,{label:"PRD Execution Schedule",value:l.cronSchedule,onChange:S=>c("cronSchedule",S)})}),s.jsx("div",{id:"job-schedule-reviewer",children:s.jsx(va,{label:"PR Review Schedule",value:l.reviewerSchedule,onChange:S=>c("reviewerSchedule",S)})}),s.jsx("div",{id:"job-schedule-qa",children:s.jsx(va,{label:"QA Schedule",value:l.qa.schedule,onChange:S=>c("qa",{...l.qa,schedule:S})})}),s.jsx("div",{id:"job-schedule-audit",children:s.jsx(va,{label:"Audit Schedule",value:l.audit.schedule,onChange:S=>c("audit",{...l.audit,schedule:S})})}),s.jsx("div",{id:"job-schedule-slicer",children:s.jsx(va,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule,onChange:S=>c("roadmapScanner",{...l.roadmapScanner,slicerSchedule:S})})}),l.analytics&&s.jsx("div",{id:"job-schedule-analytics",children:s.jsx(va,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:S=>c("analytics",{...l.analytics,schedule:S})})}),l.prResolver&&s.jsx("div",{id:"job-schedule-pr-resolver",children:s.jsx(va,{label:"PR Resolver Schedule",value:l.prResolver.schedule,onChange:S=>c("prResolver",{...l.prResolver,schedule:S})})}),l.merger&&s.jsx("div",{id:"job-schedule-merger",children:s.jsx(va,{label:"Merge Orchestrator Schedule",value:l.merger.schedule,onChange:S=>c("merger",{...l.merger,schedule:S})})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(gt,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:S=>c("schedulingPriority",Number(S)),options:[{label:"1 - Lowest",value:"1"},{label:"2 - Low",value:"2"},{label:"3 - Balanced",value:"3"},{label:"4 - High",value:"4"},{label:"5 - Highest",value:"5"}],helperText:"Higher-priority projects get earlier balanced start slots and win queue tie-breakers first."}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),s.jsx($a,{checked:l.globalQueueEnabled??!0,onChange:S=>c("globalQueueEnabled",S)})]})}),s.jsx(ze,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:S=>{const C=Math.min(59,Math.max(0,Number(S.target.value||0)));c("cronScheduleOffset",C)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]});function rj(l,r,d,c){const{addToast:f}=$t(),[h,b]=H.useState(!1),[N,v]=H.useState(null),[p,S]=H.useState(null),[C,j]=H.useState(null),D=H.useCallback(()=>({...JN,...l}),[l]),O=H.useCallback(Y=>{const G=D();return Object.entries(G).map(([$,ne])=>({label:ne.name,value:$}))},[D]),M=H.useCallback(Y=>{const G=[];r===Y&&G.push("Global Provider");const $={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[ne,k]of Object.entries(d))k===Y&&G.push($[ne]??ne);return G},[r,d]),R=H.useCallback(()=>{v(null),S(null),b(!0)},[]),Z=H.useCallback(Y=>{const $=D()[Y];$&&(v(Y),S($),b(!0))},[D]),T=H.useCallback(async(Y,G)=>{const $=!N,ne={...l,[Y]:G};c("providerPresets",ne);try{await Kf({providerPresets:{[Y]:G}}),f({title:$?"Preset Added":"Preset Updated",message:$?`${G.name} has been added. You can now assign it to jobs.`:`${G.name} has been saved.`,type:"success"})}catch(k){f({title:"Save Failed",message:k instanceof Error?k.message:"Failed to save preset",type:"error"}),c("providerPresets",l)}},[N,l,c,f]),K=H.useCallback(Y=>{var ne,k;if(Xc.includes(Y)){f({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const G=M(Y);if(G.length>0){j({presetId:Y,presetName:((ne=D()[Y])==null?void 0:ne.name)??Y,references:G});return}const $={...l};delete $[Y],c("providerPresets",$),f({title:"Preset Deleted",message:`${((k=D()[Y])==null?void 0:k.name)??Y} has been removed.`,type:"success"})},[l,c,f,M,D]),I=H.useCallback(Y=>{const G={...l};delete G[Y],c("providerPresets",G),f({title:"Preset Reset",message:`${Y} has been reset to built-in defaults.`,type:"success"})},[l,c,f]),oe=H.useCallback(()=>{if(!C)return;const{presetId:Y}=C,G={...l};delete G[Y],c("providerPresets",G);const $={...d};for(const ne of Object.keys($))$[ne]===Y&&delete $[ne];c("jobProviders",$),r===Y&&c("provider","claude"),j(null),f({title:"Preset Deleted",message:`${C.presetName} has been removed and all references cleared.`,type:"success"})},[C,l,d,r,c,f]);return{presetModalOpen:h,setPresetModalOpen:b,editingPresetId:N,editingPreset:p,deleteWarning:C,setDeleteWarning:j,getAllPresets:D,getPresetOptions:O,getPresetReferences:M,handleAddPreset:R,handleEditPreset:Z,handleSavePreset:T,handleDeletePreset:K,handleResetPreset:I,handleConfirmDelete:oe}}const ij="5 * * * *",uj="25 */3 * * *",cj={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},ox={enabled:!0,schedule:"45 2,10,18 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},oj={enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800,targetColumn:"Draft"},dj={enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},dx={enabled:!0,schedule:"15 6,14,22 * * *",maxRuntime:3600,branchPatterns:[],maxPrsPerRun:0,perPrTimeout:600,aiConflictResolution:!0,aiReviewResolution:!1,readyLabel:"ready-to-merge"},fx={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0};function su(){return{...cj}}function fj(){return{...ox,branchPatterns:[...ox.branchPatterns]}}function hj(){return{...oj}}function kp(){return{...dj}}function Jc(){return{...dx,branchPatterns:[...dx.branchPatterns]}}function nh(){return{...fx,branchPatterns:[...fx.branchPatterns]}}const mj=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],hx=l=>({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||ij,reviewerSchedule:l.reviewerSchedule||uj,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:l.roadmapScanner||su(),templatesDir:l.templatesDir||".night-watch/templates",boardProvider:l.boardProvider||{enabled:!0,provider:"github"},jobProviders:l.jobProviders||{},fallbackOnRateLimit:l.fallbackOnRateLimit??!0,primaryFallbackModel:l.primaryFallbackModel??l.claudeModel??"sonnet",secondaryFallbackModel:l.secondaryFallbackModel??l.primaryFallbackModel??l.claudeModel??"sonnet",primaryFallbackPreset:l.primaryFallbackPreset??"",secondaryFallbackPreset:l.secondaryFallbackPreset??"",claudeModel:l.primaryFallbackModel??l.claudeModel??"sonnet",providerScheduleOverrides:l.providerScheduleOverrides??[],qa:l.qa||fj(),audit:l.audit||hj(),analytics:l.analytics||kp(),prResolver:l.prResolver??Jc(),merger:l.merger??nh(),queue:l.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}}}),mx=l=>{var d,c;const r=VN(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??su().slicerSchedule,((d=l.prResolver)==null?void 0:d.schedule)??Jc().schedule,((c=l.merger)==null?void 0:c.schedule)??nh().schedule);return r?{mode:"template",selectedTemplateId:r.id}:{mode:"custom",selectedTemplateId:""}},gj=()=>{const{addToast:l,projectName:r,selectedProjectId:d,globalModeLoading:c,isGlobalMode:f,removeProjectFromList:h}=$t(),[b,N]=Oe.useState(!1),[v,p]=Oe.useState(!1),[S,C]=Oe.useState(!1),[j,D]=Oe.useState(null),[O,M]=Oe.useState([]),[R,Z]=Oe.useState(void 0),T=Oe.useRef(null),[K,I]=Oe.useState(!1),oe=Oe.useRef(!1),Y=Oe.useRef(!1),[G,$]=Oe.useState("template"),[ne,k]=Oe.useState("always-on"),[ae,F]=Oe.useState("project"),[ue,xe]=Oe.useState(null),{data:J,loading:B,error:re,refetch:ge}=un(Jf,[d],{enabled:!c}),{data:Se,loading:ke,refetch:z}=un(b2,[d],{enabled:!c}),le=Se??[],he=(pe,Te)=>{D(Ot=>Ot&&{...Ot,[pe]:Te})},me=rj((j==null?void 0:j.providerPresets)??{},(j==null?void 0:j.provider)??"claude",(j==null?void 0:j.jobProviders)??{},he);Oe.useEffect(()=>{Jx().then(M).catch(console.error),R2().then(pe=>Z(pe.webhook)).catch(()=>{})},[d]),Oe.useEffect(()=>{const pe=new URLSearchParams(window.location.search),Te=pe.get("tab"),Ot=pe.get("mode");Te&&F({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",notifications:"integrations",schedules:"schedules",general:"project","ai-runtime":"ai-providers",advanced:"project"}[Te]??Te),Ot==="custom"?$("custom"):Ot==="template"&&$("template");const qt=pe.get("jobType");qt&&setTimeout(()=>{cn("current",qt,Te==="schedules"?"schedule":Te==="jobs"?"job":void 0)},300)},[location.search,J]);const Ee=Oe.useCallback(pe=>{const Te=mx(pe);$(Te.mode),k(Te.selectedTemplateId)},[]);Oe.useEffect(()=>{if(J){if(oe.current){oe.current=!1;return}const pe=hx(J);D(pe),T.current=pe,I(!1),Ee(pe)}},[J,Ee]),Oe.useEffect(()=>{if(!j||!T.current)return;const pe=JSON.stringify(j),Te=JSON.stringify(T.current);I(pe!==Te)},[j]),Oe.useEffect(()=>{j&&Y.current&&(Y.current=!1,Nn())},[j==null?void 0:j.jobProviders]),Oe.useEffect(()=>{if(ue){const pe=setTimeout(()=>xe(null),2e3);return()=>clearTimeout(pe)}},[ue]);const de=()=>{if($("template"),!j)return;const pe=mx(j);pe.mode==="template"&&(k(pe.selectedTemplateId),he("scheduleBundleId",pe.selectedTemplateId))},_e=()=>{$("custom"),he("scheduleBundleId",null),k("")},ct=pe=>{setTimeout(()=>{const Te=document.getElementById(pe);Te&&(Te.scrollIntoView({behavior:"smooth",block:"center"}),xe(pe))},50)},Xe=pe=>{const Te=pe==="planner"?"slicer":pe;F("jobs"),ct(`job-section-${Te}`)},Kt=pe=>{const Te=pe==="planner"?"slicer":pe;G!=="custom"&&_e(),F("schedules"),ct(`job-schedule-${Te}`)},cn=(pe,Te,Ot)=>{const qt=Te==="planner"?"slicer":Te,St=new Set(["qa","audit","slicer","analytics","pr-resolver","merger"]);if(Ot==="job"){Xe(qt);return}if(Ot==="schedule"){Kt(qt);return}if(St.has(qt)){Xe(qt);return}Kt(qt)},Pl=pe=>{k(pe.id),D(Te=>Te&&{...Te,cronSchedule:pe.schedules.executor,reviewerSchedule:pe.schedules.reviewer,scheduleBundleId:pe.id,qa:{...Te.qa,schedule:pe.schedules.qa},audit:{...Te.audit,schedule:pe.schedules.audit},roadmapScanner:{...Te.roadmapScanner,slicerSchedule:pe.schedules.slicer},prResolver:{...Te.prResolver,schedule:pe.schedules.prResolver},merger:{...Te.merger,schedule:pe.schedules.merger},fallbackOnRateLimit:!0})},Nn=async()=>{var Ot,qt,St,wn,Wl,Ql,En,Ys,Kn;if(!j)return;const pe=j.cronSchedule!==(J==null?void 0:J.cronSchedule)||j.reviewerSchedule!==(J==null?void 0:J.reviewerSchedule)||j.cronScheduleOffset!==((J==null?void 0:J.cronScheduleOffset)??0)||j.schedulingPriority!==((J==null?void 0:J.schedulingPriority)??3)||j.executorEnabled!==((J==null?void 0:J.executorEnabled)??!0)||j.reviewerEnabled!==((J==null?void 0:J.reviewerEnabled)??!0)||j.queue.enabled!==(((Ot=J==null?void 0:J.queue)==null?void 0:Ot.enabled)??!0)||j.qa.enabled!==((J==null?void 0:J.qa.enabled)??!0)||j.qa.schedule!==(J==null?void 0:J.qa.schedule)||j.audit.enabled!==((J==null?void 0:J.audit.enabled)??!0)||j.audit.schedule!==(J==null?void 0:J.audit.schedule)||j.analytics.enabled!==(((qt=J==null?void 0:J.analytics)==null?void 0:qt.enabled)??!1)||j.analytics.schedule!==(((St=J==null?void 0:J.analytics)==null?void 0:St.schedule)??kp().schedule)||j.prResolver.enabled!==(((wn=J==null?void 0:J.prResolver)==null?void 0:wn.enabled)??Jc().enabled)||j.prResolver.schedule!==(((Wl=J==null?void 0:J.prResolver)==null?void 0:Wl.schedule)??Jc().schedule)||j.merger.enabled!==(((Ql=J==null?void 0:J.merger)==null?void 0:Ql.enabled)??!1)||j.merger.schedule!==(((En=J==null?void 0:J.merger)==null?void 0:En.schedule)??nh().schedule)||j.roadmapScanner.enabled!==(((Ys=J==null?void 0:J.roadmapScanner)==null?void 0:Ys.enabled)??!0)||(j.roadmapScanner.slicerSchedule||su().slicerSchedule)!==(((Kn=J==null?void 0:J.roadmapScanner)==null?void 0:Kn.slicerSchedule)||su().slicerSchedule),Te={};for(const He of mj){const ba=j.jobProviders[He];typeof ba=="string"&&ba.trim().length>0?Te[He]=ba:J!=null&&J.jobProviders[He]&&(Te[He]=null)}N(!0);try{const He=await Kf({provider:j.provider,providerLabel:j.providerLabel.trim(),providerPresets:Object.keys(j.providerPresets).length>0?j.providerPresets:void 0,defaultBranch:j.defaultBranch,prdDir:j.prdDir,branchPrefix:j.branchPrefix,branchPatterns:j.branchPatterns,executorEnabled:j.executorEnabled,reviewerEnabled:j.reviewerEnabled,minReviewScore:j.minReviewScore,maxRuntime:j.maxRuntime,reviewerMaxRuntime:j.reviewerMaxRuntime,maxLogSize:j.maxLogSize,cronSchedule:j.cronSchedule,reviewerSchedule:j.reviewerSchedule,scheduleBundleId:G==="template"?j.scheduleBundleId:null,cronScheduleOffset:j.cronScheduleOffset,schedulingPriority:j.schedulingPriority,maxRetries:j.maxRetries,reviewerMaxRetries:j.reviewerMaxRetries,reviewerRetryDelay:j.reviewerRetryDelay,reviewerMaxPrsPerRun:j.reviewerMaxPrsPerRun,providerEnv:j.providerEnv,notifications:j.notifications,prdPriority:j.prdPriority,roadmapScanner:j.roadmapScanner,templatesDir:j.templatesDir,boardProvider:j.boardProvider,jobProviders:Te,fallbackOnRateLimit:j.fallbackOnRateLimit,primaryFallbackModel:j.primaryFallbackModel,secondaryFallbackModel:j.secondaryFallbackModel,primaryFallbackPreset:j.primaryFallbackPreset||void 0,secondaryFallbackPreset:j.secondaryFallbackPreset||void 0,claudeModel:j.primaryFallbackModel,providerScheduleOverrides:j.providerScheduleOverrides,qa:j.qa,audit:j.audit,analytics:j.analytics,prResolver:j.prResolver,merger:j.merger,queue:j.queue}),ba=hx(He);D(ba),T.current=ba,I(!1),Ee(ba);let ot="";if(pe)try{await Rf()}catch(zt){ot=zt instanceof Error?zt.message:"failed to reinstall cron schedules"}l(ot?{title:"Settings Saved (Cron Reinstall Failed)",message:ot,type:"warning"}:{title:"Settings Saved",message:pe?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),oe.current=!0,ge(),z()}catch(He){l({title:"Save Failed",message:He instanceof Error?He.message:"Failed to save configuration",type:"error"})}finally{N(!1)}},Fa=()=>{if(T.current){const pe=T.current;D(pe),I(!1),Ee(pe),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},Za=async pe=>{if(!(R!=null&&!window.confirm("Replace existing global channel?")))try{const Te=await Cg({webhook:pe});Z(Te.webhook)}catch(Te){l({title:"Failed to set global channel",message:Te instanceof Error?Te.message:"Unknown error",type:"error"})}},Gl=async()=>{try{await Cg({webhook:null}),Z(null)}catch(pe){l({title:"Failed to unset global channel",message:pe instanceof Error?pe.message:"Unknown error",type:"error"})}},Fl=async pe=>{try{const Te=await np(pe);he("roadmapScanner",Te.roadmapScanner);let Ot="";try{await Rf()}catch(qt){Ot=qt instanceof Error?qt.message:"Failed to reinstall cron schedules"}l(Ot?{title:"Planner Saved (Cron Reinstall Failed)",message:Ot,type:"warning"}:{title:pe?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${pe?"enabled":"disabled"}.`,type:"success"})}catch(Te){l({title:"Toggle Failed",message:Te instanceof Error?Te.message:"Failed to toggle roadmap scanner",type:"error"})}},Zl=async()=>{if(d){C(!0);try{await y2(d),h(d),p(!1),l({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(pe){l({title:"Remove Failed",message:pe instanceof Error?pe.message:"Failed to remove project",type:"error"})}finally{C(!1)}}};if(B||!j)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(re)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(bn,{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:re.message}),s.jsx(Be,{onClick:()=>ge(),children:"Retry"})]});const jn=[{id:"project",label:"Project",content:s.jsx(IN,{form:j,updateField:he,projectName:r,doctorChecks:le,doctorLoading:ke})},{id:"ai-providers",label:"AI Providers",content:s.jsx(KN,{form:j,updateField:he,getAllPresets:me.getAllPresets,getPresetOptions:me.getPresetOptions,handleEditPreset:me.handleEditPreset,handleDeletePreset:me.handleDeletePreset,handleResetPreset:me.handleResetPreset,handleAddPreset:me.handleAddPreset})},{id:"jobs",label:"Jobs",content:s.jsx(ej,{form:j,updateField:he,handleRoadmapToggle:Fl,presetOptions:me.getPresetOptions(j.providerPresets)})},{id:"schedules",label:"Schedules",content:s.jsx(sj,{form:{cronSchedule:j.cronSchedule,reviewerSchedule:j.reviewerSchedule,qa:j.qa,audit:j.audit,analytics:j.analytics,roadmapScanner:{...j.roadmapScanner,slicerSchedule:j.roadmapScanner.slicerSchedule??su().slicerSchedule},prResolver:j.prResolver,merger:j.merger,scheduleBundleId:j.scheduleBundleId,schedulingPriority:j.schedulingPriority,cronScheduleOffset:j.cronScheduleOffset,globalQueueEnabled:j.queue.enabled},scheduleMode:G,selectedTemplateId:ne,onFieldChange:(pe,Te)=>{if(pe==="globalQueueEnabled"){he("queue",{...j.queue,enabled:!!Te});return}he(pe,Te)},onSwitchToTemplate:de,onSwitchToCustom:_e,onApplyTemplate:Pl,allProjectConfigs:O,currentProjectId:d,onEditJob:(pe,Te)=>Kt(Te)})},{id:"integrations",label:"Integrations",content:s.jsx(lj,{form:j,updateField:he,globalWebhook:R,onSetGlobal:Za,onUnsetGlobal:Gl})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-32",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100",children:"Settings"}),s.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Configure project automation, providers, and integrations"})]}),K&&s.jsxs(Pa,{variant:"warning",className:"animate-pulse",children:[s.jsx(Ur,{className:"h-3 w-3 mr-1"}),"Unsaved Changes"]})]}),s.jsx(QN,{tabs:jn,activeTab:ae,onChange:F}),K&&s.jsx("div",{className:"fixed bottom-8 left-1/2 -translate-x-1/2 z-50 w-full max-w-2xl px-4 animate-in fade-in slide-in-from-bottom-4 duration-300",children:s.jsxs("div",{className:"bg-slate-900/90 backdrop-blur-md border border-indigo-500/30 rounded-2xl p-4 shadow-2xl flex items-center justify-between shadow-indigo-500/10",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/20 text-indigo-400",children:s.jsx(bn,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-200",children:"You have unsaved changes"}),s.jsx("div",{className:"text-[11px] text-slate-400",children:"Save your configuration to apply changes"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs(Be,{variant:"ghost",size:"sm",className:"text-slate-400 hover:text-slate-300",onClick:Fa,children:[s.jsx(Zx,{className:"h-4 w-4 mr-2"}),"Discard"]}),s.jsxs(Be,{size:"sm",className:"bg-indigo-600 hover:bg-indigo-500 shadow-lg shadow-indigo-500/20",onClick:Nn,loading:b,children:[s.jsx(e2,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]})}),f&&d&&s.jsxs("div",{className:"mt-10 rounded-lg border border-red-900/50 bg-red-950/20 p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-red-400 mb-2",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Remove this project from Night Watch. This will uninstall cron jobs and delete all project data from the database. Files on disk will not be touched."}),s.jsxs(Be,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>p(!0),children:[s.jsx(Vr,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),v&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>!S&&p(!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(Ur,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",r,"?"]})]}),s.jsx("p",{className:"text-sm text-slate-300 mb-6",children:"This will uninstall cron jobs and remove all Night Watch data for this project from the database. The project files on disk will not be deleted."}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Be,{variant:"ghost",onClick:()=>p(!1),disabled:S,children:"Cancel"}),s.jsx(Be,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:Zl,loading:S,children:"Remove"})]})]})]}),s.jsx(WN,{isOpen:me.presetModalOpen,onClose:()=>{me.setPresetModalOpen(!1)},onSave:me.handleSavePreset,presetId:me.editingPresetId,preset:me.editingPreset,isBuiltIn:me.editingPresetId?Xc.includes(me.editingPresetId):!1,existingIds:Object.keys(me.getAllPresets())}),me.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:()=>me.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(Ur,{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:me.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:me.deleteWarning.references.map(pe=>s.jsx("li",{children:pe},pe))}),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(Be,{variant:"ghost",onClick:()=>me.setDeleteWarning(null),children:"Cancel"}),s.jsx(Be,{variant:"secondary",onClick:me.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},xj=()=>(Y2(),$2(),s.jsx(Ab,{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(H2,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(q2,{}),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(ub,{children:[s.jsx(In,{path:"/",element:s.jsx(J2,{})}),s.jsx(In,{path:"/prs",element:s.jsx(eS,{})}),s.jsx(In,{path:"/board",element:s.jsx(W2,{})}),s.jsx(In,{path:"/scheduling",element:s.jsx(YN,{})}),s.jsx(In,{path:"/logs",element:s.jsx(K2,{})}),s.jsx(In,{path:"/roadmap",element:s.jsx(tS,{})}),s.jsx(In,{path:"/settings",element:s.jsx(gj,{})}),s.jsx(In,{path:"*",element:s.jsx(rb,{to:"/",replace:!0})})]})})})]}),s.jsx(B2,{})]})})),zp=document.getElementById("root");if(!zp)throw new Error("Could not find root element to mount to");const pj=ov.createRoot(zp);pj.render(s.jsx(Oe.StrictMode,{children:s.jsx(xj,{})}));