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

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 (239) hide show
  1. package/dist/cli.js +2309 -1313
  2. package/dist/scripts/night-watch-cron.sh +1 -3
  3. package/dist/scripts/night-watch-merger-cron.sh +1 -1
  4. package/dist/scripts/night-watch-plan-cron.sh +1 -1
  5. package/dist/scripts/night-watch-slicer-cron.sh +1 -1
  6. package/dist/web/assets/index-BUgI2S1s.js +406 -0
  7. package/dist/web/assets/index-CkdLFBd7.js +406 -0
  8. package/dist/web/assets/index-RMfswANB.css +1 -0
  9. package/dist/web/index.html +2 -2
  10. package/package.json +1 -1
  11. package/dist/cli.d.ts +0 -3
  12. package/dist/cli.d.ts.map +0 -1
  13. package/dist/cli.js.map +0 -1
  14. package/dist/commands/analytics.d.ts +0 -14
  15. package/dist/commands/analytics.d.ts.map +0 -1
  16. package/dist/commands/analytics.js +0 -69
  17. package/dist/commands/analytics.js.map +0 -1
  18. package/dist/commands/audit.d.ts +0 -19
  19. package/dist/commands/audit.d.ts.map +0 -1
  20. package/dist/commands/audit.js +0 -144
  21. package/dist/commands/audit.js.map +0 -1
  22. package/dist/commands/board.d.ts +0 -9
  23. package/dist/commands/board.d.ts.map +0 -1
  24. package/dist/commands/board.js +0 -702
  25. package/dist/commands/board.js.map +0 -1
  26. package/dist/commands/cancel.d.ts +0 -46
  27. package/dist/commands/cancel.d.ts.map +0 -1
  28. package/dist/commands/cancel.js +0 -239
  29. package/dist/commands/cancel.js.map +0 -1
  30. package/dist/commands/cron.d.ts +0 -8
  31. package/dist/commands/cron.d.ts.map +0 -1
  32. package/dist/commands/cron.js +0 -134
  33. package/dist/commands/cron.js.map +0 -1
  34. package/dist/commands/dashboard/tab-actions.d.ts +0 -10
  35. package/dist/commands/dashboard/tab-actions.d.ts.map +0 -1
  36. package/dist/commands/dashboard/tab-actions.js +0 -247
  37. package/dist/commands/dashboard/tab-actions.js.map +0 -1
  38. package/dist/commands/dashboard/tab-config.d.ts +0 -21
  39. package/dist/commands/dashboard/tab-config.d.ts.map +0 -1
  40. package/dist/commands/dashboard/tab-config.js +0 -873
  41. package/dist/commands/dashboard/tab-config.js.map +0 -1
  42. package/dist/commands/dashboard/tab-logs.d.ts +0 -10
  43. package/dist/commands/dashboard/tab-logs.d.ts.map +0 -1
  44. package/dist/commands/dashboard/tab-logs.js +0 -202
  45. package/dist/commands/dashboard/tab-logs.js.map +0 -1
  46. package/dist/commands/dashboard/tab-schedules.d.ts +0 -21
  47. package/dist/commands/dashboard/tab-schedules.d.ts.map +0 -1
  48. package/dist/commands/dashboard/tab-schedules.js +0 -320
  49. package/dist/commands/dashboard/tab-schedules.js.map +0 -1
  50. package/dist/commands/dashboard/tab-status.d.ts +0 -32
  51. package/dist/commands/dashboard/tab-status.d.ts.map +0 -1
  52. package/dist/commands/dashboard/tab-status.js +0 -424
  53. package/dist/commands/dashboard/tab-status.js.map +0 -1
  54. package/dist/commands/dashboard/types.d.ts +0 -42
  55. package/dist/commands/dashboard/types.d.ts.map +0 -1
  56. package/dist/commands/dashboard/types.js +0 -5
  57. package/dist/commands/dashboard/types.js.map +0 -1
  58. package/dist/commands/dashboard.d.ts +0 -11
  59. package/dist/commands/dashboard.d.ts.map +0 -1
  60. package/dist/commands/dashboard.js +0 -242
  61. package/dist/commands/dashboard.js.map +0 -1
  62. package/dist/commands/doctor.d.ts +0 -16
  63. package/dist/commands/doctor.d.ts.map +0 -1
  64. package/dist/commands/doctor.js +0 -195
  65. package/dist/commands/doctor.js.map +0 -1
  66. package/dist/commands/history.d.ts +0 -7
  67. package/dist/commands/history.d.ts.map +0 -1
  68. package/dist/commands/history.js +0 -49
  69. package/dist/commands/history.js.map +0 -1
  70. package/dist/commands/init.d.ts +0 -45
  71. package/dist/commands/init.d.ts.map +0 -1
  72. package/dist/commands/init.js +0 -777
  73. package/dist/commands/init.js.map +0 -1
  74. package/dist/commands/install.d.ts +0 -65
  75. package/dist/commands/install.d.ts.map +0 -1
  76. package/dist/commands/install.js +0 -405
  77. package/dist/commands/install.js.map +0 -1
  78. package/dist/commands/logs.d.ts +0 -15
  79. package/dist/commands/logs.d.ts.map +0 -1
  80. package/dist/commands/logs.js +0 -155
  81. package/dist/commands/logs.js.map +0 -1
  82. package/dist/commands/merge.d.ts +0 -26
  83. package/dist/commands/merge.d.ts.map +0 -1
  84. package/dist/commands/merge.js +0 -159
  85. package/dist/commands/merge.js.map +0 -1
  86. package/dist/commands/notify.d.ts +0 -7
  87. package/dist/commands/notify.d.ts.map +0 -1
  88. package/dist/commands/notify.js +0 -43
  89. package/dist/commands/notify.js.map +0 -1
  90. package/dist/commands/plan.d.ts +0 -19
  91. package/dist/commands/plan.d.ts.map +0 -1
  92. package/dist/commands/plan.js +0 -88
  93. package/dist/commands/plan.js.map +0 -1
  94. package/dist/commands/prd-state.d.ts +0 -12
  95. package/dist/commands/prd-state.d.ts.map +0 -1
  96. package/dist/commands/prd-state.js +0 -47
  97. package/dist/commands/prd-state.js.map +0 -1
  98. package/dist/commands/prd.d.ts +0 -18
  99. package/dist/commands/prd.d.ts.map +0 -1
  100. package/dist/commands/prd.js +0 -363
  101. package/dist/commands/prd.js.map +0 -1
  102. package/dist/commands/prds.d.ts +0 -13
  103. package/dist/commands/prds.d.ts.map +0 -1
  104. package/dist/commands/prds.js +0 -194
  105. package/dist/commands/prds.js.map +0 -1
  106. package/dist/commands/prs.d.ts +0 -14
  107. package/dist/commands/prs.d.ts.map +0 -1
  108. package/dist/commands/prs.js +0 -104
  109. package/dist/commands/prs.js.map +0 -1
  110. package/dist/commands/qa.d.ts +0 -34
  111. package/dist/commands/qa.d.ts.map +0 -1
  112. package/dist/commands/qa.js +0 -214
  113. package/dist/commands/qa.js.map +0 -1
  114. package/dist/commands/queue.d.ts +0 -8
  115. package/dist/commands/queue.d.ts.map +0 -1
  116. package/dist/commands/queue.js +0 -376
  117. package/dist/commands/queue.js.map +0 -1
  118. package/dist/commands/resolve.d.ts +0 -26
  119. package/dist/commands/resolve.d.ts.map +0 -1
  120. package/dist/commands/resolve.js +0 -186
  121. package/dist/commands/resolve.js.map +0 -1
  122. package/dist/commands/retry.d.ts +0 -9
  123. package/dist/commands/retry.d.ts.map +0 -1
  124. package/dist/commands/retry.js +0 -71
  125. package/dist/commands/retry.js.map +0 -1
  126. package/dist/commands/review.d.ts +0 -82
  127. package/dist/commands/review.d.ts.map +0 -1
  128. package/dist/commands/review.js +0 -479
  129. package/dist/commands/review.js.map +0 -1
  130. package/dist/commands/run.d.ts +0 -73
  131. package/dist/commands/run.d.ts.map +0 -1
  132. package/dist/commands/run.js +0 -509
  133. package/dist/commands/run.js.map +0 -1
  134. package/dist/commands/serve.d.ts +0 -19
  135. package/dist/commands/serve.d.ts.map +0 -1
  136. package/dist/commands/serve.js +0 -142
  137. package/dist/commands/serve.js.map +0 -1
  138. package/dist/commands/shared/env-builder.d.ts +0 -49
  139. package/dist/commands/shared/env-builder.d.ts.map +0 -1
  140. package/dist/commands/shared/env-builder.js +0 -150
  141. package/dist/commands/shared/env-builder.js.map +0 -1
  142. package/dist/commands/slice.d.ts +0 -35
  143. package/dist/commands/slice.d.ts.map +0 -1
  144. package/dist/commands/slice.js +0 -316
  145. package/dist/commands/slice.js.map +0 -1
  146. package/dist/commands/state.d.ts +0 -8
  147. package/dist/commands/state.d.ts.map +0 -1
  148. package/dist/commands/state.js +0 -54
  149. package/dist/commands/state.js.map +0 -1
  150. package/dist/commands/status.d.ts +0 -14
  151. package/dist/commands/status.d.ts.map +0 -1
  152. package/dist/commands/status.js +0 -297
  153. package/dist/commands/status.js.map +0 -1
  154. package/dist/commands/summary.d.ts +0 -14
  155. package/dist/commands/summary.d.ts.map +0 -1
  156. package/dist/commands/summary.js +0 -193
  157. package/dist/commands/summary.js.map +0 -1
  158. package/dist/commands/uninstall.d.ts +0 -25
  159. package/dist/commands/uninstall.d.ts.map +0 -1
  160. package/dist/commands/uninstall.js +0 -134
  161. package/dist/commands/uninstall.js.map +0 -1
  162. package/dist/commands/update.d.ts +0 -22
  163. package/dist/commands/update.d.ts.map +0 -1
  164. package/dist/commands/update.js +0 -90
  165. package/dist/commands/update.js.map +0 -1
  166. package/dist/web/assets/index-2JY0x_Ij.js +0 -381
  167. package/dist/web/assets/index-3h8pgmqL.css +0 -1
  168. package/dist/web/assets/index-B-wbyZq7.js +0 -386
  169. package/dist/web/assets/index-B1BnOpiO.css +0 -1
  170. package/dist/web/assets/index-B3CnV08_.js +0 -365
  171. package/dist/web/assets/index-B5QjuFh9.css +0 -1
  172. package/dist/web/assets/index-B8FW2ecQ.js +0 -370
  173. package/dist/web/assets/index-BFxPiKyy.js +0 -381
  174. package/dist/web/assets/index-BGqNh_Da.js +0 -365
  175. package/dist/web/assets/index-BIONU0qz.css +0 -1
  176. package/dist/web/assets/index-B_l_3wnA.js +0 -370
  177. package/dist/web/assets/index-Ba-4YvTQ.js +0 -365
  178. package/dist/web/assets/index-Bbb4-39N.js +0 -370
  179. package/dist/web/assets/index-BdgdShEN.js +0 -365
  180. package/dist/web/assets/index-BhiC4Z-G.js +0 -381
  181. package/dist/web/assets/index-BjhCFjZi.js +0 -381
  182. package/dist/web/assets/index-BlRxmrnQ.css +0 -1
  183. package/dist/web/assets/index-BqwbXsHS.js +0 -365
  184. package/dist/web/assets/index-BsC7RT48.css +0 -1
  185. package/dist/web/assets/index-Bvh8XI8_.js +0 -370
  186. package/dist/web/assets/index-C01r2ymn.js +0 -381
  187. package/dist/web/assets/index-C51Rbsmk.js +0 -381
  188. package/dist/web/assets/index-C7lMNxRE.js +0 -370
  189. package/dist/web/assets/index-CJLObgsn.js +0 -386
  190. package/dist/web/assets/index-CLuRf7Zt.js +0 -381
  191. package/dist/web/assets/index-CM3xFd3e.css +0 -1
  192. package/dist/web/assets/index-CNkBtDK7.js +0 -370
  193. package/dist/web/assets/index-CPQbZ1BL.css +0 -1
  194. package/dist/web/assets/index-CTy5dUDU.css +0 -1
  195. package/dist/web/assets/index-CU15COKs.js +0 -370
  196. package/dist/web/assets/index-CiRJZI4z.js +0 -386
  197. package/dist/web/assets/index-Cp7RYjoy.css +0 -1
  198. package/dist/web/assets/index-CvPkZOWT.js +0 -381
  199. package/dist/web/assets/index-CvUk-33B.css +0 -1
  200. package/dist/web/assets/index-Cvmj-oF6.css +0 -1
  201. package/dist/web/assets/index-CxE5iQVO.js +0 -381
  202. package/dist/web/assets/index-D7lZQpFV.js +0 -365
  203. package/dist/web/assets/index-DAyP4GOi.css +0 -1
  204. package/dist/web/assets/index-DCG0n8Kg.js +0 -386
  205. package/dist/web/assets/index-DEEI8cyF.css +0 -1
  206. package/dist/web/assets/index-DF99BowV.js +0 -381
  207. package/dist/web/assets/index-DGWsvFj6.css +0 -1
  208. package/dist/web/assets/index-DGpU39Cp.css +0 -1
  209. package/dist/web/assets/index-DI4kFgOi.js +0 -370
  210. package/dist/web/assets/index-DIyTcPw5.css +0 -1
  211. package/dist/web/assets/index-DTsfDC7m.js +0 -381
  212. package/dist/web/assets/index-DcgNAi4A.js +0 -386
  213. package/dist/web/assets/index-DgOAgkZy.css +0 -1
  214. package/dist/web/assets/index-DnHkqbOa.js +0 -386
  215. package/dist/web/assets/index-DnR7Idcf.css +0 -1
  216. package/dist/web/assets/index-DpVirMEe.css +0 -1
  217. package/dist/web/assets/index-DsYIWZ86.css +0 -1
  218. package/dist/web/assets/index-DtrDkci5.js +0 -381
  219. package/dist/web/assets/index-DyjIth5M.js +0 -386
  220. package/dist/web/assets/index-FwIKfHPL.css +0 -1
  221. package/dist/web/assets/index-IKrZymWk.css +0 -1
  222. package/dist/web/assets/index-MA6fM0ab.js +0 -381
  223. package/dist/web/assets/index-N_QxaSEg.css +0 -1
  224. package/dist/web/assets/index-OcU-0TCQ.css +0 -1
  225. package/dist/web/assets/index-OyhrmG-L.js +0 -381
  226. package/dist/web/assets/index-SQlBKu_s.js +0 -386
  227. package/dist/web/assets/index-Sv2B60J4.js +0 -370
  228. package/dist/web/assets/index-Vgyivb5u.js +0 -365
  229. package/dist/web/assets/index-ZABWMEZR.js +0 -381
  230. package/dist/web/assets/index-ZE5lOeJp.js +0 -386
  231. package/dist/web/assets/index-aCHmkAcJ.css +0 -1
  232. package/dist/web/assets/index-bFijnpuU.js +0 -381
  233. package/dist/web/assets/index-bUPZgSoZ.css +0 -1
  234. package/dist/web/assets/index-mz1VIYsP.css +0 -1
  235. package/dist/web/assets/index-oOp_MFeE.js +0 -376
  236. package/dist/web/assets/index-rfU713Zm.js +0 -386
  237. package/dist/web/assets/index-tuNH9gmb.js +0 -448
  238. package/dist/web/assets/index-viSwHyDD.js +0 -365
  239. package/dist/web/assets/index-yKEQysks.js +0 -365
@@ -1,386 +0,0 @@
1
- var Qp=Object.defineProperty;var ag=l=>{throw TypeError(l)};var Ip=(l,r,o)=>r in l?Qp(l,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):l[r]=o;var ng=(l,r,o)=>Ip(l,typeof r!="symbol"?r+"":r,o),ff=(l,r,o)=>r.has(l)||ag("Cannot "+o);var J=(l,r,o)=>(ff(l,r,"read from private field"),o?o.call(l):r.get(l)),lt=(l,r,o)=>r.has(l)?ag("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(l):r.set(l,o),Te=(l,r,o,c)=>(ff(l,r,"write to private field"),c?c.call(l,o):r.set(l,o),o),je=(l,r,o)=>(ff(l,r,"access private method"),o);(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 m of f)if(m.type==="childList")for(const v of m.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&c(v)}).observe(document,{childList:!0,subtree:!0});function o(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function c(f){if(f.ep)return;f.ep=!0;const m=o(f);fetch(f.href,m)}})();function Ff(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function Xp(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var r=l.default;if(typeof r=="function"){var o=function c(){return this instanceof c?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};o.prototype=r.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(l).forEach(function(c){var f=Object.getOwnPropertyDescriptor(l,c);Object.defineProperty(o,c,f.get?f:{enumerable:!0,get:function(){return l[c]}})}),o}var hf={exports:{}},Yi={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var lg;function Jp(){if(lg)return Yi;lg=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(c,f,m){var v=null;if(m!==void 0&&(v=""+m),f.key!==void 0&&(v=""+f.key),"key"in f){m={};for(var N in f)N!=="key"&&(m[N]=f[N])}else m=f;return f=m.ref,{$$typeof:l,type:c,key:v,ref:f!==void 0?f:null,props:m}}return Yi.Fragment=r,Yi.jsx=o,Yi.jsxs=o,Yi}var sg;function Kp(){return sg||(sg=1,hf.exports=Jp()),hf.exports}var s=Kp(),mf={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 rg;function ev(){if(rg)return Le;rg=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),v=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),w=Symbol.iterator;function R(_){return _===null||typeof _!="object"?null:(_=w&&_[w]||_["@@iterator"],typeof _=="function"?_:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,A={};function Q(_,le,ge){this.props=_,this.context=le,this.refs=A,this.updater=ge||C}Q.prototype.isReactComponent={},Q.prototype.setState=function(_,le){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,le,"setState")},Q.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function B(){}B.prototype=Q.prototype;function X(_,le,ge){this.props=_,this.context=le,this.refs=A,this.updater=ge||C}var K=X.prototype=new B;K.constructor=X,M(K,Q.prototype),K.isPureReactComponent=!0;var fe=Array.isArray;function G(){}var F={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function ae(_,le,ge){var pe=ge.ref;return{$$typeof:l,type:_,key:le,ref:pe!==void 0?pe:null,props:ge}}function O(_,le){return ae(_.type,le,_.props)}function ne(_){return typeof _=="object"&&_!==null&&_.$$typeof===l}function k(_){var le={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(ge){return le[ge]})}var ce=/\/+/g;function te(_,le){return typeof _=="object"&&_!==null&&_.key!=null?k(""+_.key):le.toString(36)}function me(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(G,G):(_.status="pending",_.then(function(le){_.status==="pending"&&(_.status="fulfilled",_.value=le)},function(le){_.status==="pending"&&(_.status="rejected",_.reason=le)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function Y(_,le,ge,pe,Ce){var we=typeof _;(we==="undefined"||we==="boolean")&&(_=null);var He=!1;if(_===null)He=!0;else switch(we){case"bigint":case"string":case"number":He=!0;break;case"object":switch(_.$$typeof){case l:case r:He=!0;break;case b:return He=_._init,Y(He(_._payload),le,ge,pe,Ce)}}if(He)return Ce=Ce(_),He=pe===""?"."+te(_,0):pe,fe(Ce)?(ge="",He!=null&&(ge=He.replace(ce,"$&/")+"/"),Y(Ce,le,ge,"",function(Ft){return Ft})):Ce!=null&&(ne(Ce)&&(Ce=O(Ce,ge+(Ce.key==null||_&&_.key===Ce.key?"":(""+Ce.key).replace(ce,"$&/")+"/")+He)),le.push(Ce)),1;He=0;var xt=pe===""?".":pe+":";if(fe(_))for(var $e=0;$e<_.length;$e++)pe=_[$e],we=xt+te(pe,$e),He+=Y(pe,le,ge,we,Ce);else if($e=R(_),typeof $e=="function")for(_=$e.call(_),$e=0;!(pe=_.next()).done;)pe=pe.value,we=xt+te(pe,$e++),He+=Y(pe,le,ge,we,Ce);else if(we==="object"){if(typeof _.then=="function")return Y(me(_),le,ge,pe,Ce);throw le=String(_),Error("Objects are not valid as a React child (found: "+(le==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":le)+"). If you meant to render a collection of children, use an array instead.")}return He}function re(_,le,ge){if(_==null)return _;var pe=[],Ce=0;return Y(_,pe,"","",function(we){return le.call(ge,we,Ce++)}),pe}function ye(_){if(_._status===-1){var le=_._result;le=le(),le.then(function(ge){(_._status===0||_._status===-1)&&(_._status=1,_._result=ge)},function(ge){(_._status===0||_._status===-1)&&(_._status=2,_._result=ge)}),_._status===-1&&(_._status=0,_._result=le)}if(_._status===1)return _._result.default;throw _._result}var Me=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var le=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(le))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},Ne={map:re,forEach:function(_,le,ge){re(_,function(){le.apply(this,arguments)},ge)},count:function(_){var le=0;return re(_,function(){le++}),le},toArray:function(_){return re(_,function(le){return le})||[]},only:function(_){if(!ne(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return Le.Activity=T,Le.Children=Ne,Le.Component=Q,Le.Fragment=o,Le.Profiler=f,Le.PureComponent=X,Le.StrictMode=c,Le.Suspense=S,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,Le.__COMPILER_RUNTIME={__proto__:null,c:function(_){return F.H.useMemoCache(_)}},Le.cache=function(_){return function(){return _.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(_,le,ge){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var pe=M({},_.props),Ce=_.key;if(le!=null)for(we in le.key!==void 0&&(Ce=""+le.key),le)!P.call(le,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&le.ref===void 0||(pe[we]=le[we]);var we=arguments.length-2;if(we===1)pe.children=ge;else if(1<we){for(var He=Array(we),xt=0;xt<we;xt++)He[xt]=arguments[xt+2];pe.children=He}return ae(_.type,Ce,pe)},Le.createContext=function(_){return _={$$typeof:v,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:m,_context:_},_},Le.createElement=function(_,le,ge){var pe,Ce={},we=null;if(le!=null)for(pe in le.key!==void 0&&(we=""+le.key),le)P.call(le,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(Ce[pe]=le[pe]);var He=arguments.length-2;if(He===1)Ce.children=ge;else if(1<He){for(var xt=Array(He),$e=0;$e<He;$e++)xt[$e]=arguments[$e+2];Ce.children=xt}if(_&&_.defaultProps)for(pe in He=_.defaultProps,He)Ce[pe]===void 0&&(Ce[pe]=He[pe]);return ae(_,we,Ce)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(_){return{$$typeof:N,render:_}},Le.isValidElement=ne,Le.lazy=function(_){return{$$typeof:b,_payload:{_status:-1,_result:_},_init:ye}},Le.memo=function(_,le){return{$$typeof:x,type:_,compare:le===void 0?null:le}},Le.startTransition=function(_){var le=F.T,ge={};F.T=ge;try{var pe=_(),Ce=F.S;Ce!==null&&Ce(ge,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(G,Me)}catch(we){Me(we)}finally{le!==null&&ge.types!==null&&(le.types=ge.types),F.T=le}},Le.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},Le.use=function(_){return F.H.use(_)},Le.useActionState=function(_,le,ge){return F.H.useActionState(_,le,ge)},Le.useCallback=function(_,le){return F.H.useCallback(_,le)},Le.useContext=function(_){return F.H.useContext(_)},Le.useDebugValue=function(){},Le.useDeferredValue=function(_,le){return F.H.useDeferredValue(_,le)},Le.useEffect=function(_,le){return F.H.useEffect(_,le)},Le.useEffectEvent=function(_){return F.H.useEffectEvent(_)},Le.useId=function(){return F.H.useId()},Le.useImperativeHandle=function(_,le,ge){return F.H.useImperativeHandle(_,le,ge)},Le.useInsertionEffect=function(_,le){return F.H.useInsertionEffect(_,le)},Le.useLayoutEffect=function(_,le){return F.H.useLayoutEffect(_,le)},Le.useMemo=function(_,le){return F.H.useMemo(_,le)},Le.useOptimistic=function(_,le){return F.H.useOptimistic(_,le)},Le.useReducer=function(_,le,ge){return F.H.useReducer(_,le,ge)},Le.useRef=function(_){return F.H.useRef(_)},Le.useState=function(_){return F.H.useState(_)},Le.useSyncExternalStore=function(_,le,ge){return F.H.useSyncExternalStore(_,le,ge)},Le.useTransition=function(){return F.H.useTransition()},Le.version="19.2.4",Le}var ig;function Gf(){return ig||(ig=1,mf.exports=ev()),mf.exports}var U=Gf();const _e=Ff(U);var gf={exports:{}},$i={},xf={exports:{}},yf={};/**
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 ug;function tv(){return ug||(ug=1,(function(l){function r(Y,re){var ye=Y.length;Y.push(re);e:for(;0<ye;){var Me=ye-1>>>1,Ne=Y[Me];if(0<f(Ne,re))Y[Me]=re,Y[ye]=Ne,ye=Me;else break e}}function o(Y){return Y.length===0?null:Y[0]}function c(Y){if(Y.length===0)return null;var re=Y[0],ye=Y.pop();if(ye!==re){Y[0]=ye;e:for(var Me=0,Ne=Y.length,_=Ne>>>1;Me<_;){var le=2*(Me+1)-1,ge=Y[le],pe=le+1,Ce=Y[pe];if(0>f(ge,ye))pe<Ne&&0>f(Ce,ge)?(Y[Me]=Ce,Y[pe]=ye,Me=pe):(Y[Me]=ge,Y[le]=ye,Me=le);else if(pe<Ne&&0>f(Ce,ye))Y[Me]=Ce,Y[pe]=ye,Me=pe;else break e}}return re}function f(Y,re){var ye=Y.sortIndex-re.sortIndex;return ye!==0?ye:Y.id-re.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var v=Date,N=v.now();l.unstable_now=function(){return v.now()-N}}var S=[],x=[],b=1,T=null,w=3,R=!1,C=!1,M=!1,A=!1,Q=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;function K(Y){for(var re=o(x);re!==null;){if(re.callback===null)c(x);else if(re.startTime<=Y)c(x),re.sortIndex=re.expirationTime,r(S,re);else break;re=o(x)}}function fe(Y){if(M=!1,K(Y),!C)if(o(S)!==null)C=!0,G||(G=!0,k());else{var re=o(x);re!==null&&me(fe,re.startTime-Y)}}var G=!1,F=-1,P=5,ae=-1;function O(){return A?!0:!(l.unstable_now()-ae<P)}function ne(){if(A=!1,G){var Y=l.unstable_now();ae=Y;var re=!0;try{e:{C=!1,M&&(M=!1,B(F),F=-1),R=!0;var ye=w;try{t:{for(K(Y),T=o(S);T!==null&&!(T.expirationTime>Y&&O());){var Me=T.callback;if(typeof Me=="function"){T.callback=null,w=T.priorityLevel;var Ne=Me(T.expirationTime<=Y);if(Y=l.unstable_now(),typeof Ne=="function"){T.callback=Ne,K(Y),re=!0;break t}T===o(S)&&c(S),K(Y)}else c(S);T=o(S)}if(T!==null)re=!0;else{var _=o(x);_!==null&&me(fe,_.startTime-Y),re=!1}}break e}finally{T=null,w=ye,R=!1}re=void 0}}finally{re?k():G=!1}}}var k;if(typeof X=="function")k=function(){X(ne)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,te=ce.port2;ce.port1.onmessage=ne,k=function(){te.postMessage(null)}}else k=function(){Q(ne,0)};function me(Y,re){F=Q(function(){Y(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(Y){Y.callback=null},l.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<Y?Math.floor(1e3/Y):5},l.unstable_getCurrentPriorityLevel=function(){return w},l.unstable_next=function(Y){switch(w){case 1:case 2:case 3:var re=3;break;default:re=w}var ye=w;w=re;try{return Y()}finally{w=ye}},l.unstable_requestPaint=function(){A=!0},l.unstable_runWithPriority=function(Y,re){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var ye=w;w=Y;try{return re()}finally{w=ye}},l.unstable_scheduleCallback=function(Y,re,ye){var Me=l.unstable_now();switch(typeof ye=="object"&&ye!==null?(ye=ye.delay,ye=typeof ye=="number"&&0<ye?Me+ye:Me):ye=Me,Y){case 1:var Ne=-1;break;case 2:Ne=250;break;case 5:Ne=1073741823;break;case 4:Ne=1e4;break;default:Ne=5e3}return Ne=ye+Ne,Y={id:b++,callback:re,priorityLevel:Y,startTime:ye,expirationTime:Ne,sortIndex:-1},ye>Me?(Y.sortIndex=ye,r(x,Y),o(S)===null&&Y===o(x)&&(M?(B(F),F=-1):M=!0,me(fe,ye-Me))):(Y.sortIndex=Ne,r(S,Y),C||R||(C=!0,G||(G=!0,k()))),Y},l.unstable_shouldYield=O,l.unstable_wrapCallback=function(Y){var re=w;return function(){var ye=w;w=re;try{return Y.apply(this,arguments)}finally{w=ye}}}})(yf)),yf}var cg;function av(){return cg||(cg=1,xf.exports=tv()),xf.exports}var pf={exports:{}},ca={};/**
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 og;function nv(){if(og)return ca;og=1;var l=Gf();function r(S){var x="https://react.dev/errors/"+S;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)x+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+S+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var c={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},f=Symbol.for("react.portal");function m(S,x,b){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:T==null?null:""+T,children:S,containerInfo:x,implementation:b}}var v=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function N(S,x){if(S==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return ca.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,ca.createPortal=function(S,x){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(r(299));return m(S,x,null,b)},ca.flushSync=function(S){var x=v.T,b=c.p;try{if(v.T=null,c.p=2,S)return S()}finally{v.T=x,c.p=b,c.d.f()}},ca.preconnect=function(S,x){typeof S=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,c.d.C(S,x))},ca.prefetchDNS=function(S){typeof S=="string"&&c.d.D(S)},ca.preinit=function(S,x){if(typeof S=="string"&&x&&typeof x.as=="string"){var b=x.as,T=N(b,x.crossOrigin),w=typeof x.integrity=="string"?x.integrity:void 0,R=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;b==="style"?c.d.S(S,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:T,integrity:w,fetchPriority:R}):b==="script"&&c.d.X(S,{crossOrigin:T,integrity:w,fetchPriority:R,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},ca.preinitModule=function(S,x){if(typeof S=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var b=N(x.as,x.crossOrigin);c.d.M(S,{crossOrigin:b,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&c.d.M(S)},ca.preload=function(S,x){if(typeof S=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var b=x.as,T=N(b,x.crossOrigin);c.d.L(S,b,{crossOrigin:T,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},ca.preloadModule=function(S,x){if(typeof S=="string")if(x){var b=N(x.as,x.crossOrigin);c.d.m(S,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:b,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else c.d.m(S)},ca.requestFormReset=function(S){c.d.r(S)},ca.unstable_batchedUpdates=function(S,x){return S(x)},ca.useFormState=function(S,x,b){return v.H.useFormState(S,x,b)},ca.useFormStatus=function(){return v.H.useHostTransitionStatus()},ca.version="19.2.4",ca}var dg;function hx(){if(dg)return pf.exports;dg=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(),pf.exports=nv(),pf.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 fg;function lv(){if(fg)return $i;fg=1;var l=av(),r=Gf(),o=hx();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 m(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function v(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function N(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function S(e){if(m(e)!==e)throw Error(c(188))}function x(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(c(188));return t!==e?null:e}for(var a=e,n=t;;){var u=a.return;if(u===null)break;var d=u.alternate;if(d===null){if(n=u.return,n!==null){a=n;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===a)return S(u),e;if(d===n)return S(u),t;d=d.sibling}throw Error(c(188))}if(a.return!==n.return)a=u,n=d;else{for(var y=!1,E=u.child;E;){if(E===a){y=!0,a=u,n=d;break}if(E===n){y=!0,n=u,a=d;break}E=E.sibling}if(!y){for(E=d.child;E;){if(E===a){y=!0,a=d,n=u;break}if(E===n){y=!0,n=d,a=u;break}E=E.sibling}if(!y)throw Error(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 b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,w=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),X=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function k(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case Q:return"Profiler";case A:return"StrictMode";case fe:return"Suspense";case G:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case X:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case K:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var me=Array.isArray,Y=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye={pending:!1,data:null,method:null,action:null},Me=[],Ne=-1;function _(e){return{current:e}}function le(e){0>Ne||(e.current=Me[Ne],Me[Ne]=null,Ne--)}function ge(e,t){Ne++,Me[Ne]=e.current,e.current=t}var pe=_(null),Ce=_(null),we=_(null),He=_(null);function xt(e,t){switch(ge(we,t),ge(Ce,e),ge(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?E0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=E0(t),e=T0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}le(pe),ge(pe,e)}function $e(){le(pe),le(Ce),le(we)}function Ft(e){e.memoizedState!==null&&ge(He,e);var t=pe.current,a=T0(t,e.type);t!==a&&(ge(Ce,e),ge(pe,a))}function qa(e){Ce.current===e&&(le(pe),le(Ce)),He.current===e&&(le(He),Hi._currentValue=ye)}var xn,en;function ha(e){if(xn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);xn=t&&t[1]||"",en=-1<a.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+xn+e+en}var ma=!1;function oe(e,t){if(!e||ma)return"";ma=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ee){var I=ee}Reflect.construct(e,[],de)}else{try{de.call()}catch(ee){I=ee}e.call(de.prototype)}}else{try{throw Error()}catch(ee){I=ee}(de=e())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(ee){if(ee&&I&&typeof ee.stack=="string")return[ee.stack,I.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=n.DetermineComponentFrameRoot(),y=d[0],E=d[1];if(y&&E){var z=y.split(`
44
- `),W=E.split(`
45
- `);for(u=n=0;n<z.length&&!z[n].includes("DetermineComponentFrameRoot");)n++;for(;u<W.length&&!W[u].includes("DetermineComponentFrameRoot");)u++;if(n===z.length||u===W.length)for(n=z.length-1,u=W.length-1;1<=n&&0<=u&&z[n]!==W[u];)u--;for(;1<=n&&0<=u;n--,u--)if(z[n]!==W[u]){if(n!==1||u!==1)do if(n--,u--,0>u||z[n]!==W[u]){var se=`
46
- `+z[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{ma=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ha(a):""}function ie(e,t){switch(e.tag){case 26:case 27:case 5:return ha(e.type);case 16:return ha("Lazy");case 13:return e.child!==t&&t!==null?ha("Suspense Fallback"):ha("Suspense");case 19:return ha("SuspenseList");case 0:case 15:return oe(e.type,!1);case 11:return oe(e.type.render,!1);case 1:return oe(e.type,!0);case 31:return ha("Activity");default:return""}}function xe(e){try{var t="",a=null;do t+=ie(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
47
- Error generating stack: `+n.message+`
48
- `+n.stack}}var Be=Object.prototype.hasOwnProperty,Je=l.unstable_scheduleCallback,ft=l.unstable_cancelCallback,aa=l.unstable_shouldYield,na=l.unstable_requestPaint,yt=l.unstable_now,Ba=l.unstable_getCurrentPriorityLevel,Gt=l.unstable_ImmediatePriority,ga=l.unstable_UserBlockingPriority,Ca=l.unstable_NormalPriority,Cn=l.unstable_LowPriority,nl=l.unstable_IdlePriority,Xe=l.log,ll=l.unstable_setDisableYieldValue,pt=null,la=null;function Pt(e){if(typeof Xe=="function"&&ll(e),la&&typeof la.setStrictMode=="function")try{la.setStrictMode(pt,e)}catch{}}var Zt=Math.clz32?Math.clz32:io,ou=Math.log,ro=Math.LN2;function io(e){return e>>>=0,e===0?32:31-(ou(e)/ro|0)|0}var sl=256,Bs=262144,sa=4194304;function yn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Wl(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var E=n&134217727;return E!==0?(n=E&~d,n!==0?u=yn(n):(y&=E,y!==0?u=yn(y):a||(a=E&~e,a!==0&&(u=yn(a))))):(E=n&~d,E!==0?u=yn(E):y!==0?u=yn(y):a||(a=n&~e,a!==0&&(u=yn(a)))),u===0?0:t!==0&&t!==u&&(t&d)===0&&(d=u&-u,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:u}function rl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function du(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vr(){var e=sa;return sa<<=1,(sa&62914560)===0&&(sa=4194304),e}function Vs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function il(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fu(e,t,a,n,u,d){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var E=e.entanglements,z=e.expirationTimes,W=e.hiddenUpdates;for(a=y&~a;0<a;){var se=31-Zt(a),de=1<<se;E[se]=0,z[se]=-1;var I=W[se];if(I!==null)for(W[se]=null,se=0;se<I.length;se++){var ee=I[se];ee!==null&&(ee.lane&=-536870913)}a&=~de}n!==0&&gt(e,n,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~t))}function gt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Zt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function xa(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Zt(a),u=1<<n;u&t|e[n]&t&&(e[n]|=t),a&=~u}}function Yr(e,t){var a=t&-t;return a=(a&42)!==0?1:Ys(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ys(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 ra(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function $s(){var e=re.p;return e!==0?e:(e=window.event,e===void 0?32:Q0(e.type))}function $r(e,t){var a=re.p;try{return re.p=e,t()}finally{re.p=a}}var tn=Math.random().toString(36).slice(2),Tt="__reactFiber$"+tn,Lt="__reactProps$"+tn,On="__reactContainer$"+tn,Ql="__reactEvents$"+tn,hu="__reactListeners$"+tn,mu="__reactHandles$"+tn,gu="__reactResources$"+tn,Il="__reactMarker$"+tn;function Fs(e){delete e[Tt],delete e[Lt],delete e[Ql],delete e[hu],delete e[mu]}function Dn(e){var t=e[Tt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[On]||a[Tt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=k0(e);e!==null;){if(a=e[Tt])return a;e=k0(e)}return t}e=a,a=e.parentNode}return null}function De(e){if(e=e[Tt]||e[On]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ya(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function an(e){var t=e[gu];return t||(t=e[gu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function At(e){e[Il]=!0}var xu=new Set,Fr={};function pn(e,t){ul(e,t),ul(e+"Capture",t)}function ul(e,t){for(Fr[e]=t,e=0;e<t.length;e++)xu.add(t[e])}var yu=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),pu={},Rn={};function Gr(e){return Be.call(Rn,e)?!0:Be.call(pu,e)?!1:yu.test(e)?Rn[e]=!0:(pu[e]=!0,!1)}function Wt(e,t,a){if(Gr(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Gs(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 st(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Mt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Pr(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var u=n.get,d=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(y){a=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xl(e){if(!e._valueTracker){var t=vn(e)?"checked":"value";e._valueTracker=Pr(e,t,""+e[t])}}function cl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=vn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function nn(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 Ps=/[\n"\\]/g;function Qt(e){return e.replace(Ps,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zs(e,t,a,n,u,d,y,E){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mt(t)):e.value!==""+Mt(t)&&(e.value=""+Mt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Jl(e,y,Mt(t)):a!=null?Jl(e,y,Mt(a)):n!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Mt(E):e.removeAttribute("name")}function ol(e,t,a,n,u,d,y,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Xl(e);return}a=a!=null?""+Mt(a):"",t=t!=null?""+Mt(t):a,E||t===e.value||(e.value=t),e.defaultValue=t}n=n??u,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=E?e.checked:!!n,e.defaultChecked=!!n,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Xl(e)}function Jl(e,t,a){t==="number"&&nn(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function An(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=""+Mt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,n&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Kl(e,t,a){if(t!=null&&(t=""+Mt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Mt(a):""}function Zr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(c(92));if(me(n)){if(1<n.length)throw Error(c(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Mt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Xl(e)}function ln(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var es=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ts(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||es.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function vu(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&&ts(e,u,n)}else for(var d in t)t.hasOwnProperty(d)&&ts(e,d,t[d])}function Ws(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 uo=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),bu=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function as(e){return bu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Va(){}var Wr=null;function Qs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kn=null,dl=null;function Su(e){var t=De(e);if(t&&(e=t.stateNode)){var a=e[Lt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Zs(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Qt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var u=n[Lt]||null;if(!u)throw Error(c(90));Zs(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&&cl(n)}break e;case"textarea":Kl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&An(e,!!a.multiple,t,!1)}}}var Qr=!1;function Ir(e,t,a){if(Qr)return e(t,a);Qr=!0;try{var n=e(t);return n}finally{if(Qr=!1,(kn!==null||dl!==null)&&(gc(),kn&&(t=kn,e=dl,dl=kn=null,Su(t),e)))for(t=0;t<e.length;t++)Su(e[t])}}function ns(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Lt]||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 sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xr=!1;if(sn)try{var ls={};Object.defineProperty(ls,"passive",{get:function(){Xr=!0}}),window.addEventListener("test",ls,ls),window.removeEventListener("test",ls,ls)}catch{Xr=!1}var bn=null,Is=null,Xs=null;function Ht(){if(Xs)return Xs;var e,t=Is,a=t.length,n,u="value"in bn?bn.value:bn.textContent,d=u.length;for(e=0;e<a&&t[e]===u[e];e++);var y=a-e;for(n=1;n<=y&&t[a-n]===u[d-n];n++);return Xs=u.slice(e,1<n?1-n:void 0)}function ss(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function rn(){return!0}function _n(){return!1}function Ct(e){function t(a,n,u,d,y){this._reactName=a,this._targetInst=u,this.type=n,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?rn:_n,this.isPropagationStopped=_n,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rs=Ct(Sn),is=T({},Sn,{view:0,detail:0}),Jr=Ct(is),Js,us,cs,Ks=T({},is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ds,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cs&&(cs&&e.type==="mousemove"?(Js=e.screenX-cs.screenX,us=e.screenY-cs.screenY):us=Js=0,cs=e),Js)},movementY:function(e){return"movementY"in e?e.movementY:us}}),Nu=Ct(Ks),co=T({},Ks,{dataTransfer:0}),oo=Ct(co),fo=T({},is,{relatedTarget:0}),er=Ct(fo),ho=T({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0}),fl=Ct(ho),mo=T({},Sn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hl=Ct(mo),os=T({},Sn,{data:0}),ml=Ct(os),go={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xo={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"},yo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function po(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yo[e])?!!t[e]:!1}function ds(){return po}var vo=T({},is,{key:function(e){if(e.key){var t=go[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ss(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ds,charCode:function(e){return e.type==="keypress"?ss(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ss(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bo=Ct(vo),So=T({},Ks,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ju=Ct(So),No=T({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ds}),jo=Ct(No),wu=T({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0}),wo=Ct(wu),Eo=T({},Ks,{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}),To=Ct(Eo),Mo=T({},Sn,{newState:0,oldState:0}),Co=Ct(Mo),Eu=[9,13,27,32],Kr=sn&&"CompositionEvent"in window,fs=null;sn&&"documentMode"in document&&(fs=document.documentMode);var Oo=sn&&"TextEvent"in window&&!fs,Tu=sn&&(!Kr||fs&&8<fs&&11>=fs),Mu=" ",Cu=!1;function Ou(e,t){switch(e){case"keyup":return Eu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Du(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gl=!1;function Do(e,t){switch(e){case"compositionend":return Du(t);case"keypress":return t.which!==32?null:(Cu=!0,Mu);case"textInput":return e=t.data,e===Mu&&Cu?null:e;default:return null}}function Ro(e,t){if(gl)return e==="compositionend"||!Kr&&Ou(e,t)?(e=Ht(),Xs=Is=bn=null,gl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tu&&t.locale!=="ko"?null:t.data;default:return null}}var Ao={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ru(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ao[e.type]:t==="textarea"}function ei(e,t,a,n){kn?dl?dl.push(n):dl=[n]:kn=n,t=Nc(t,"onChange"),0<t.length&&(a=new rs("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var xl=null,hs=null;function pa(e){v0(e,0)}function un(e){var t=ya(e);if(cl(t))return e}function Au(e,t){if(e==="change")return t}var Nn=!1;if(sn){var ti;if(sn){var Oa="oninput"in document;if(!Oa){var ai=document.createElement("div");ai.setAttribute("oninput","return;"),Oa=typeof ai.oninput=="function"}ti=Oa}else ti=!1;Nn=ti&&(!document.documentMode||9<document.documentMode)}function ni(){xl&&(xl.detachEvent("onpropertychange",li),hs=xl=null)}function li(e){if(e.propertyName==="value"&&un(hs)){var t=[];ei(t,hs,e,Qs(e)),Ir(pa,t)}}function Ze(e,t,a){e==="focusin"?(ni(),xl=t,hs=a,xl.attachEvent("onpropertychange",li)):e==="focusout"&&ni()}function yl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return un(hs)}function ko(e,t){if(e==="click")return un(t)}function vt(e,t){if(e==="input"||e==="change")return un(t)}function ms(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ia=typeof Object.is=="function"?Object.is:ms;function gs(e,t){if(ia(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(!Be.call(t,u)||!ia(e[u],t[u]))return!1}return!0}function ku(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _u(e,t){var a=ku(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=ku(a)}}function Ke(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ke(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _o(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=nn(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=nn(e.document)}return t}function tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var zu=sn&&"documentMode"in document&&11>=document.documentMode,pl=null,ar=null,It=null,nr=!1;function xs(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;nr||pl==null||pl!==nn(n)||(n=pl,"selectionStart"in n&&tr(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}),It&&gs(It,n)||(It=n,n=Nc(ar,"onSelect"),0<n.length&&(t=new rs("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=pl)))}function zn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var vl={animationend:zn("Animation","AnimationEnd"),animationiteration:zn("Animation","AnimationIteration"),animationstart:zn("Animation","AnimationStart"),transitionrun:zn("Transition","TransitionRun"),transitionstart:zn("Transition","TransitionStart"),transitioncancel:zn("Transition","TransitionCancel"),transitionend:zn("Transition","TransitionEnd")},si={},Uu={};sn&&(Uu=document.createElement("div").style,"AnimationEvent"in window||(delete vl.animationend.animation,delete vl.animationiteration.animation,delete vl.animationstart.animation),"TransitionEvent"in window||delete vl.transitionend.transition);function Un(e){if(si[e])return si[e];if(!vl[e])return e;var t=vl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Uu)return si[e]=t[a];return e}var Lu=Un("animationend"),Hu=Un("animationiteration"),lr=Un("animationstart"),zo=Un("transitionrun"),Uo=Un("transitionstart"),qu=Un("transitioncancel"),ri=Un("transitionend"),ii=new Map,ui="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ui.push("scrollEnd");function va(e,t){ii.set(e,t),pn(t,[e])}var bl=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)},da=[],Ya=0,ys=0;function Sl(){for(var e=Ya,t=ys=Ya=0;t<e;){var a=da[t];da[t++]=null;var n=da[t];da[t++]=null;var u=da[t];da[t++]=null;var d=da[t];if(da[t++]=null,n!==null&&u!==null){var y=n.pending;y===null?u.next=u:(u.next=y.next,y.next=u),n.pending=u}d!==0&&ps(a,u,d)}}function $a(e,t,a,n){da[Ya++]=e,da[Ya++]=t,da[Ya++]=a,da[Ya++]=n,ys|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function sr(e,t,a,n){return $a(e,t,a,n),vs(e)}function Fa(e,t){return $a(e,null,null,t),vs(e)}function ps(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var u=!1,d=e.return;d!==null;)d.childLanes|=a,n=d.alternate,n!==null&&(n.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&t!==null&&(u=31-Zt(a),e=d.hiddenUpdates,n=e[u],n===null?e[u]=[t]:n.push(t),t.lane=a|536870912),d):null}function vs(e){if(50<Ri)throw Ri=0,zd=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Da={};function rr(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 Xt(e,t,a,n){return new rr(e,t,a,n)}function ir(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ga(e,t){var a=e.alternate;return a===null?(a=Xt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Bu(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ur(e,t,a,n,u,d){var y=0;if(n=e,typeof e=="function")ir(e)&&(y=1);else if(typeof e=="string")y=Lp(e,a,pe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=Xt(31,a,t,u),e.elementType=ae,e.lanes=d,e;case M:return Pa(a.children,u,d,t);case A:y=8,u|=24;break;case Q:return e=Xt(12,a,t,u|2),e.elementType=Q,e.lanes=d,e;case fe:return e=Xt(13,a,t,u),e.elementType=fe,e.lanes=d,e;case G:return e=Xt(19,a,t,u),e.elementType=G,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case X:y=10;break e;case B:y=9;break e;case K:y=11;break e;case F:y=14;break e;case P:y=16,n=null;break e}y=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=Xt(y,a,t,u),t.elementType=e,t.type=n,t.lanes=d,t}function Pa(e,t,a,n){return e=Xt(7,e,n,t),e.lanes=a,e}function ci(e,t,a){return e=Xt(6,e,null,t),e.lanes=a,e}function Vu(e){var t=Xt(18,null,null,0);return t.stateNode=e,t}function Nl(e,t,a){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var oi=new WeakMap;function ba(e,t){if(typeof e=="object"&&e!==null){var a=oi.get(e);return a!==void 0?a:(t={value:e,source:t,stack:xe(t)},oi.set(e,t),t)}return{value:e,source:t,stack:xe(t)}}var Ln=[],Hn=0,bs=null,cn=0,ua=[],Ee=0,Sa=null,Za=1,g="";function i(e,t){Ln[Hn++]=cn,Ln[Hn++]=bs,bs=e,cn=t}function h(e,t,a){ua[Ee++]=Za,ua[Ee++]=g,ua[Ee++]=Sa,Sa=e;var n=Za;e=g;var u=32-Zt(n)-1;n&=~(1<<u),a+=1;var d=32-Zt(t)+u;if(30<d){var y=u-u%5;d=(n&(1<<y)-1).toString(32),n>>=y,u-=y,Za=1<<32-Zt(t)+u|a<<u|n,g=d+e}else Za=1<<d|a<<u|n,g=e}function p(e){e.return!==null&&(i(e,1),h(e,1,0))}function j(e){for(;e===bs;)bs=Ln[--Hn],Ln[Hn]=null,cn=Ln[--Hn],Ln[Hn]=null;for(;e===Sa;)Sa=ua[--Ee],ua[Ee]=null,g=ua[--Ee],ua[Ee]=null,Za=ua[--Ee],ua[Ee]=null}function D(e,t){ua[Ee++]=Za,ua[Ee++]=g,ua[Ee++]=Sa,Za=t.id,g=t.overflow,Sa=e}var L=null,H=null,V=!1,he=null,ve=!1,Ue=Error(c(519));function We(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw on(ba(t,e)),Ue}function Re(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Tt]=e,t[Lt]=n,a){case"dialog":Ge("cancel",t),Ge("close",t);break;case"iframe":case"object":case"embed":Ge("load",t);break;case"video":case"audio":for(a=0;a<ki.length;a++)Ge(ki[a],t);break;case"source":Ge("error",t);break;case"img":case"image":case"link":Ge("error",t),Ge("load",t);break;case"details":Ge("toggle",t);break;case"input":Ge("invalid",t),ol(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ge("invalid",t);break;case"textarea":Ge("invalid",t),Zr(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||j0(t.textContent,a)?(n.popover!=null&&(Ge("beforetoggle",t),Ge("toggle",t)),n.onScroll!=null&&Ge("scroll",t),n.onScrollEnd!=null&&Ge("scrollend",t),n.onClick!=null&&(t.onclick=Va),t=!0):t=!1,t||We(e,!0)}function jt(e){for(L=e.return;L;)switch(L.tag){case 5:case 31:case 13:ve=!1;return;case 27:case 3:ve=!0;return;default:L=L.return}}function Bt(e){if(e!==L)return!1;if(!V)return jt(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")||Id(e.type,e.memoizedProps)),a=!a),a&&H&&We(e),jt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));H=A0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));H=A0(e)}else t===27?(t=H,zl(e.type)?(e=tf,tf=null,H=e):H=t):H=L?Xa(e.stateNode.nextSibling):null;return!0}function Vt(){H=L=null,V=!1}function jn(){var e=he;return e!==null&&(Ea===null?Ea=e:Ea.push.apply(Ea,e),he=null),e}function on(e){he===null?he=[e]:he.push(e)}var cr=_(null),qn=null,Wa=null;function wn(e,t,a){ge(cr,t._currentValue),t._currentValue=a}function dn(e){e._currentValue=cr.current,le(cr)}function di(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Bn(e,t,a,n){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var y=u.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=u;for(var z=0;z<t.length;z++)if(E.context===t[z]){d.lanes|=a,E=d.alternate,E!==null&&(E.lanes|=a),di(d.return,a,e),n||(y=null);break e}d=E.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(c(341));y.lanes|=a,d=y.alternate,d!==null&&(d.lanes|=a),di(y,a,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function Qa(e,t,a,n){e=null;for(var u=t,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(c(387));if(y=y.memoizedProps,y!==null){var E=u.type;ia(u.pendingProps.value,y.value)||(e!==null?e.push(E):e=[E])}}else if(u===He.current){if(y=u.alternate,y===null)throw Error(c(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Hi):e=[Hi])}u=u.return}e!==null&&Bn(t,e,a,n),t.flags|=262144}function or(e){for(e=e.firstContext;e!==null;){if(!ia(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ss(e){qn=e,Wa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Jt(e){return uh(qn,e)}function Yu(e,t){return qn===null&&Ss(e),uh(e,t)}function uh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Wa===null){if(e===null)throw Error(c(308));Wa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wa=Wa.next=t;return a}var ky=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()})}},_y=l.unstable_scheduleCallback,zy=l.unstable_NormalPriority,kt={$$typeof:X,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lo(){return{controller:new ky,data:new Map,refCount:0}}function fi(e){e.refCount--,e.refCount===0&&_y(zy,function(){e.controller.abort()})}var hi=null,Ho=0,dr=0,fr=null;function Uy(e,t){if(hi===null){var a=hi=[];Ho=0,dr=Vd(),fr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Ho++,t.then(ch,ch),t}function ch(){if(--Ho===0&&hi!==null){fr!==null&&(fr.status="fulfilled");var e=hi;hi=null,dr=0,fr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ly(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 oh=Y.S;Y.S=function(e,t){Zm=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Uy(e,t),oh!==null&&oh(e,t)};var Ns=_(null);function qo(){var e=Ns.current;return e!==null?e:ht.pooledCache}function $u(e,t){t===null?ge(Ns,Ns.current):ge(Ns,t.pool)}function dh(){var e=qo();return e===null?null:{parent:kt._currentValue,pool:e}}var hr=Error(c(460)),Bo=Error(c(474)),Fu=Error(c(542)),Gu={then:function(){}};function fh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function hh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Va,Va),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gh(e),e;default:if(typeof t.status=="string")t.then(Va,Va);else{if(e=ht,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,gh(e),e}throw ws=t,hr}}function js(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ws=a,hr):a}}var ws=null;function mh(){if(ws===null)throw Error(c(459));var e=ws;return ws=null,e}function gh(e){if(e===hr||e===Fu)throw Error(c(483))}var mr=null,mi=0;function Pu(e){var t=mi;return mi+=1,mr===null&&(mr=[]),hh(mr,e,t)}function gi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zu(e,t){throw t.$$typeof===w?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function xh(e){function t($,q){if(e){var Z=$.deletions;Z===null?($.deletions=[q],$.flags|=16):Z.push(q)}}function a($,q){if(!e)return null;for(;q!==null;)t($,q),q=q.sibling;return null}function n($){for(var q=new Map;$!==null;)$.key!==null?q.set($.key,$):q.set($.index,$),$=$.sibling;return q}function u($,q){return $=Ga($,q),$.index=0,$.sibling=null,$}function d($,q,Z){return $.index=Z,e?(Z=$.alternate,Z!==null?(Z=Z.index,Z<q?($.flags|=67108866,q):Z):($.flags|=67108866,q)):($.flags|=1048576,q)}function y($){return e&&$.alternate===null&&($.flags|=67108866),$}function E($,q,Z,ue){return q===null||q.tag!==6?(q=ci(Z,$.mode,ue),q.return=$,q):(q=u(q,Z),q.return=$,q)}function z($,q,Z,ue){var Oe=Z.type;return Oe===M?se($,q,Z.props.children,ue,Z.key):q!==null&&(q.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===P&&js(Oe)===q.type)?(q=u(q,Z.props),gi(q,Z),q.return=$,q):(q=ur(Z.type,Z.key,Z.props,null,$.mode,ue),gi(q,Z),q.return=$,q)}function W($,q,Z,ue){return q===null||q.tag!==4||q.stateNode.containerInfo!==Z.containerInfo||q.stateNode.implementation!==Z.implementation?(q=Nl(Z,$.mode,ue),q.return=$,q):(q=u(q,Z.children||[]),q.return=$,q)}function se($,q,Z,ue,Oe){return q===null||q.tag!==7?(q=Pa(Z,$.mode,ue,Oe),q.return=$,q):(q=u(q,Z),q.return=$,q)}function de($,q,Z){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=ci(""+q,$.mode,Z),q.return=$,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case R:return Z=ur(q.type,q.key,q.props,null,$.mode,Z),gi(Z,q),Z.return=$,Z;case C:return q=Nl(q,$.mode,Z),q.return=$,q;case P:return q=js(q),de($,q,Z)}if(me(q)||k(q))return q=Pa(q,$.mode,Z,null),q.return=$,q;if(typeof q.then=="function")return de($,Pu(q),Z);if(q.$$typeof===X)return de($,Yu($,q),Z);Zu($,q)}return null}function I($,q,Z,ue){var Oe=q!==null?q.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Oe!==null?null:E($,q,""+Z,ue);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case R:return Z.key===Oe?z($,q,Z,ue):null;case C:return Z.key===Oe?W($,q,Z,ue):null;case P:return Z=js(Z),I($,q,Z,ue)}if(me(Z)||k(Z))return Oe!==null?null:se($,q,Z,ue,null);if(typeof Z.then=="function")return I($,q,Pu(Z),ue);if(Z.$$typeof===X)return I($,q,Yu($,Z),ue);Zu($,Z)}return null}function ee($,q,Z,ue,Oe){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return $=$.get(Z)||null,E(q,$,""+ue,Oe);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case R:return $=$.get(ue.key===null?Z:ue.key)||null,z(q,$,ue,Oe);case C:return $=$.get(ue.key===null?Z:ue.key)||null,W(q,$,ue,Oe);case P:return ue=js(ue),ee($,q,Z,ue,Oe)}if(me(ue)||k(ue))return $=$.get(Z)||null,se(q,$,ue,Oe,null);if(typeof ue.then=="function")return ee($,q,Z,Pu(ue),Oe);if(ue.$$typeof===X)return ee($,q,Z,Yu(q,ue),Oe);Zu(q,ue)}return null}function be($,q,Z,ue){for(var Oe=null,tt=null,Se=q,Ve=q=0,Ie=null;Se!==null&&Ve<Z.length;Ve++){Se.index>Ve?(Ie=Se,Se=null):Ie=Se.sibling;var at=I($,Se,Z[Ve],ue);if(at===null){Se===null&&(Se=Ie);break}e&&Se&&at.alternate===null&&t($,Se),q=d(at,q,Ve),tt===null?Oe=at:tt.sibling=at,tt=at,Se=Ie}if(Ve===Z.length)return a($,Se),V&&i($,Ve),Oe;if(Se===null){for(;Ve<Z.length;Ve++)Se=de($,Z[Ve],ue),Se!==null&&(q=d(Se,q,Ve),tt===null?Oe=Se:tt.sibling=Se,tt=Se);return V&&i($,Ve),Oe}for(Se=n(Se);Ve<Z.length;Ve++)Ie=ee(Se,$,Ve,Z[Ve],ue),Ie!==null&&(e&&Ie.alternate!==null&&Se.delete(Ie.key===null?Ve:Ie.key),q=d(Ie,q,Ve),tt===null?Oe=Ie:tt.sibling=Ie,tt=Ie);return e&&Se.forEach(function(Bl){return t($,Bl)}),V&&i($,Ve),Oe}function Ae($,q,Z,ue){if(Z==null)throw Error(c(151));for(var Oe=null,tt=null,Se=q,Ve=q=0,Ie=null,at=Z.next();Se!==null&&!at.done;Ve++,at=Z.next()){Se.index>Ve?(Ie=Se,Se=null):Ie=Se.sibling;var Bl=I($,Se,at.value,ue);if(Bl===null){Se===null&&(Se=Ie);break}e&&Se&&Bl.alternate===null&&t($,Se),q=d(Bl,q,Ve),tt===null?Oe=Bl:tt.sibling=Bl,tt=Bl,Se=Ie}if(at.done)return a($,Se),V&&i($,Ve),Oe;if(Se===null){for(;!at.done;Ve++,at=Z.next())at=de($,at.value,ue),at!==null&&(q=d(at,q,Ve),tt===null?Oe=at:tt.sibling=at,tt=at);return V&&i($,Ve),Oe}for(Se=n(Se);!at.done;Ve++,at=Z.next())at=ee(Se,$,Ve,at.value,ue),at!==null&&(e&&at.alternate!==null&&Se.delete(at.key===null?Ve:at.key),q=d(at,q,Ve),tt===null?Oe=at:tt.sibling=at,tt=at);return e&&Se.forEach(function(Wp){return t($,Wp)}),V&&i($,Ve),Oe}function dt($,q,Z,ue){if(typeof Z=="object"&&Z!==null&&Z.type===M&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case R:e:{for(var Oe=Z.key;q!==null;){if(q.key===Oe){if(Oe=Z.type,Oe===M){if(q.tag===7){a($,q.sibling),ue=u(q,Z.props.children),ue.return=$,$=ue;break e}}else if(q.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===P&&js(Oe)===q.type){a($,q.sibling),ue=u(q,Z.props),gi(ue,Z),ue.return=$,$=ue;break e}a($,q);break}else t($,q);q=q.sibling}Z.type===M?(ue=Pa(Z.props.children,$.mode,ue,Z.key),ue.return=$,$=ue):(ue=ur(Z.type,Z.key,Z.props,null,$.mode,ue),gi(ue,Z),ue.return=$,$=ue)}return y($);case C:e:{for(Oe=Z.key;q!==null;){if(q.key===Oe)if(q.tag===4&&q.stateNode.containerInfo===Z.containerInfo&&q.stateNode.implementation===Z.implementation){a($,q.sibling),ue=u(q,Z.children||[]),ue.return=$,$=ue;break e}else{a($,q);break}else t($,q);q=q.sibling}ue=Nl(Z,$.mode,ue),ue.return=$,$=ue}return y($);case P:return Z=js(Z),dt($,q,Z,ue)}if(me(Z))return be($,q,Z,ue);if(k(Z)){if(Oe=k(Z),typeof Oe!="function")throw Error(c(150));return Z=Oe.call(Z),Ae($,q,Z,ue)}if(typeof Z.then=="function")return dt($,q,Pu(Z),ue);if(Z.$$typeof===X)return dt($,q,Yu($,Z),ue);Zu($,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,q!==null&&q.tag===6?(a($,q.sibling),ue=u(q,Z),ue.return=$,$=ue):(a($,q),ue=ci(Z,$.mode,ue),ue.return=$,$=ue),y($)):a($,q)}return function($,q,Z,ue){try{mi=0;var Oe=dt($,q,Z,ue);return mr=null,Oe}catch(Se){if(Se===hr||Se===Fu)throw Se;var tt=Xt(29,Se,null,$.mode);return tt.lanes=ue,tt.return=$,tt}finally{}}}var Es=xh(!0),yh=xh(!1),jl=!1;function Vo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yo(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 wl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function El(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(nt&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=vs(e),ps(e,null,a),t}return $a(e,n,t,a),vs(e)}function xi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,xa(e,a)}}function $o(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?u=d=y:d=d.next=y,a=a.next}while(a!==null);d===null?u=d=t:d=d.next=t}else u=d=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Fo=!1;function yi(){if(Fo){var e=fr;if(e!==null)throw e}}function pi(e,t,a,n){Fo=!1;var u=e.updateQueue;jl=!1;var d=u.firstBaseUpdate,y=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var z=E,W=z.next;z.next=null,y===null?d=W:y.next=W,y=z;var se=e.alternate;se!==null&&(se=se.updateQueue,E=se.lastBaseUpdate,E!==y&&(E===null?se.firstBaseUpdate=W:E.next=W,se.lastBaseUpdate=z))}if(d!==null){var de=u.baseState;y=0,se=W=z=null,E=d;do{var I=E.lane&-536870913,ee=I!==E.lane;if(ee?(Qe&I)===I:(n&I)===I){I!==0&&I===dr&&(Fo=!0),se!==null&&(se=se.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var be=e,Ae=E;I=t;var dt=a;switch(Ae.tag){case 1:if(be=Ae.payload,typeof be=="function"){de=be.call(dt,de,I);break e}de=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Ae.payload,I=typeof be=="function"?be.call(dt,de,I):be,I==null)break e;de=T({},de,I);break e;case 2:jl=!0}}I=E.callback,I!==null&&(e.flags|=64,ee&&(e.flags|=8192),ee=u.callbacks,ee===null?u.callbacks=[I]:ee.push(I))}else ee={lane:I,tag:E.tag,payload:E.payload,callback:E.callback,next:null},se===null?(W=se=ee,z=de):se=se.next=ee,y|=I;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;ee=E,E=ee.next,ee.next=null,u.lastBaseUpdate=ee,u.shared.pending=null}}while(!0);se===null&&(z=de),u.baseState=z,u.firstBaseUpdate=W,u.lastBaseUpdate=se,d===null&&(u.shared.lanes=0),Dl|=y,e.lanes=y,e.memoizedState=de}}function ph(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function vh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ph(a[e],t)}var gr=_(null),Wu=_(0);function bh(e,t){e=Qn,ge(Wu,e),ge(gr,t),Qn=e|t.baseLanes}function Go(){ge(Wu,Qn),ge(gr,gr.current)}function Po(){Qn=Wu.current,le(gr),le(Wu)}var Ra=_(null),Ia=null;function Tl(e){var t=e.alternate;ge(Ot,Ot.current&1),ge(Ra,e),Ia===null&&(t===null||gr.current!==null||t.memoizedState!==null)&&(Ia=e)}function Zo(e){ge(Ot,Ot.current),ge(Ra,e),Ia===null&&(Ia=e)}function Sh(e){e.tag===22?(ge(Ot,Ot.current),ge(Ra,e),Ia===null&&(Ia=e)):Ml()}function Ml(){ge(Ot,Ot.current),ge(Ra,Ra.current)}function Aa(e){le(Ra),Ia===e&&(Ia=null),le(Ot)}var Ot=_(0);function Qu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Kd(a)||ef(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 Vn=0,qe=null,ct=null,_t=null,Iu=!1,xr=!1,Ts=!1,Xu=0,vi=0,yr=null,Hy=0;function wt(){throw Error(c(321))}function Wo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ia(e[a],t[a]))return!1;return!0}function Qo(e,t,a,n,u,d){return Vn=d,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e===null||e.memoizedState===null?lm:od,Ts=!1,d=a(n,u),Ts=!1,xr&&(d=jh(t,a,n,u)),Nh(e),d}function Nh(e){Y.H=Ni;var t=ct!==null&&ct.next!==null;if(Vn=0,_t=ct=qe=null,Iu=!1,vi=0,yr=null,t)throw Error(c(300));e===null||zt||(e=e.dependencies,e!==null&&or(e)&&(zt=!0))}function jh(e,t,a,n){qe=e;var u=0;do{if(xr&&(yr=null),vi=0,xr=!1,25<=u)throw Error(c(301));if(u+=1,_t=ct=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}Y.H=sm,d=t(a,n)}while(xr);return d}function qy(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?bi(t):t,e=e.useState()[0],(ct!==null?ct.memoizedState:null)!==e&&(qe.flags|=1024),t}function Io(){var e=Xu!==0;return Xu=0,e}function Xo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Jo(e){if(Iu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Iu=!1}Vn=0,_t=ct=qe=null,xr=!1,vi=Xu=0,yr=null}function fa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?qe.memoizedState=_t=e:_t=_t.next=e,_t}function Dt(){if(ct===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var t=_t===null?qe.memoizedState:_t.next;if(t!==null)_t=t,ct=e;else{if(e===null)throw qe.alternate===null?Error(c(467)):Error(c(310));ct=e,e={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},_t===null?qe.memoizedState=_t=e:_t=_t.next=e}return _t}function Ju(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bi(e){var t=vi;return vi+=1,yr===null&&(yr=[]),e=hh(yr,e,t),t=qe,(_t===null?t.memoizedState:_t.next)===null&&(t=t.alternate,Y.H=t===null||t.memoizedState===null?lm:od),e}function Ku(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bi(e);if(e.$$typeof===X)return Jt(e)}throw Error(c(438,String(e)))}function Ko(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=Ju(),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]=O;return t.index++,a}function Yn(e,t){return typeof t=="function"?t(e):t}function ec(e){var t=Dt();return ed(t,ct,e)}function ed(e,t,a){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=a;var u=e.baseQueue,d=n.pending;if(d!==null){if(u!==null){var y=u.next;u.next=d.next,d.next=y}t.baseQueue=u=d,n.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var E=y=null,z=null,W=t,se=!1;do{var de=W.lane&-536870913;if(de!==W.lane?(Qe&de)===de:(Vn&de)===de){var I=W.revertLane;if(I===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),de===dr&&(se=!0);else if((Vn&I)===I){W=W.next,I===dr&&(se=!0);continue}else de={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},z===null?(E=z=de,y=d):z=z.next=de,qe.lanes|=I,Dl|=I;de=W.action,Ts&&a(d,de),d=W.hasEagerState?W.eagerState:a(d,de)}else I={lane:de,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},z===null?(E=z=I,y=d):z=z.next=I,qe.lanes|=de,Dl|=de;W=W.next}while(W!==null&&W!==t);if(z===null?y=d:z.next=E,!ia(d,e.memoizedState)&&(zt=!0,se&&(a=fr,a!==null)))throw a;e.memoizedState=d,e.baseState=y,e.baseQueue=z,n.lastRenderedState=d}return u===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function td(e){var t=Dt(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var n=a.dispatch,u=a.pending,d=t.memoizedState;if(u!==null){a.pending=null;var y=u=u.next;do d=e(d,y.action),y=y.next;while(y!==u);ia(d,t.memoizedState)||(zt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,n]}function wh(e,t,a){var n=qe,u=Dt(),d=V;if(d){if(a===void 0)throw Error(c(407));a=a()}else a=t();var y=!ia((ct||u).memoizedState,a);if(y&&(u.memoizedState=a,zt=!0),u=u.queue,ld(Mh.bind(null,n,u,e),[e]),u.getSnapshot!==t||y||_t!==null&&_t.memoizedState.tag&1){if(n.flags|=2048,pr(9,{destroy:void 0},Th.bind(null,n,u,a,t),null),ht===null)throw Error(c(349));d||(Vn&127)!==0||Eh(n,t,a)}return a}function Eh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=qe.updateQueue,t===null?(t=Ju(),qe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Th(e,t,a,n){t.value=a,t.getSnapshot=n,Ch(t)&&Oh(e)}function Mh(e,t,a){return a(function(){Ch(t)&&Oh(e)})}function Ch(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ia(e,a)}catch{return!0}}function Oh(e){var t=Fa(e,2);t!==null&&Ta(t,e,2)}function ad(e){var t=fa();if(typeof e=="function"){var a=e;if(e=a(),Ts){Pt(!0);try{a()}finally{Pt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:e},t}function Dh(e,t,a,n){return e.baseState=a,ed(e,ct,typeof n=="function"?n:Yn)}function By(e,t,a,n,u){if(nc(e))throw Error(c(485));if(e=t.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};Y.T!==null?a(!0):d.isTransition=!1,n(d),a=t.pending,a===null?(d.next=t.pending=d,Rh(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Rh(e,t){var a=t.action,n=t.payload,u=e.state;if(t.isTransition){var d=Y.T,y={};Y.T=y;try{var E=a(u,n),z=Y.S;z!==null&&z(y,E),Ah(e,t,E)}catch(W){nd(e,t,W)}finally{d!==null&&y.types!==null&&(d.types=y.types),Y.T=d}}else try{d=a(u,n),Ah(e,t,d)}catch(W){nd(e,t,W)}}function Ah(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){kh(e,t,n)},function(n){return nd(e,t,n)}):kh(e,t,a)}function kh(e,t,a){t.status="fulfilled",t.value=a,_h(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Rh(e,a)))}function nd(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,_h(t),t=t.next;while(t!==n)}e.action=null}function _h(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function zh(e,t){return t}function Uh(e,t){if(V){var a=ht.formState;if(a!==null){e:{var n=qe;if(V){if(H){t:{for(var u=H,d=ve;u.nodeType!==8;){if(!d){u=null;break t}if(u=Xa(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){H=Xa(u.nextSibling),n=u.data==="F!";break e}}We(n)}n=!1}n&&(t=a[0])}}return a=fa(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zh,lastRenderedState:t},a.queue=n,a=tm.bind(null,qe,n),n.dispatch=a,n=ad(!1),d=cd.bind(null,qe,!1,n.queue),n=fa(),u={state:t,dispatch:null,action:e,pending:null},n.queue=u,a=By.bind(null,qe,u,d,a),u.dispatch=a,n.memoizedState=e,[t,a,!1]}function Lh(e){var t=Dt();return Hh(t,ct,e)}function Hh(e,t,a){if(t=ed(e,t,zh)[0],e=ec(Yn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=bi(t)}catch(y){throw y===hr?Fu:y}else n=t;t=Dt();var u=t.queue,d=u.dispatch;return a!==t.memoizedState&&(qe.flags|=2048,pr(9,{destroy:void 0},Vy.bind(null,u,a),null)),[n,d,e]}function Vy(e,t){e.action=t}function qh(e){var t=Dt(),a=ct;if(a!==null)return Hh(t,a,e);Dt(),t=t.memoizedState,a=Dt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function pr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=qe.updateQueue,t===null&&(t=Ju(),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 Bh(){return Dt().memoizedState}function tc(e,t,a,n){var u=fa();qe.flags|=e,u.memoizedState=pr(1|t,{destroy:void 0},a,n===void 0?null:n)}function ac(e,t,a,n){var u=Dt();n=n===void 0?null:n;var d=u.memoizedState.inst;ct!==null&&n!==null&&Wo(n,ct.memoizedState.deps)?u.memoizedState=pr(t,d,a,n):(qe.flags|=e,u.memoizedState=pr(1|t,d,a,n))}function Vh(e,t){tc(8390656,8,e,t)}function ld(e,t){ac(2048,8,e,t)}function Yy(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=Ju(),qe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Yh(e){var t=Dt().memoizedState;return Yy({ref:t,nextImpl:e}),function(){if((nt&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function $h(e,t){return ac(4,2,e,t)}function Fh(e,t){return ac(4,4,e,t)}function Gh(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 Ph(e,t,a){a=a!=null?a.concat([e]):null,ac(4,4,Gh.bind(null,t,e),a)}function sd(){}function Zh(e,t){var a=Dt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Wo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Wh(e,t){var a=Dt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Wo(t,n[1]))return n[0];if(n=e(),Ts){Pt(!0);try{e()}finally{Pt(!1)}}return a.memoizedState=[n,t],n}function rd(e,t,a){return a===void 0||(Vn&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Qm(),qe.lanes|=e,Dl|=e,a)}function Qh(e,t,a,n){return ia(a,t)?a:gr.current!==null?(e=rd(e,a,n),ia(e,t)||(zt=!0),e):(Vn&42)===0||(Vn&1073741824)!==0&&(Qe&261930)===0?(zt=!0,e.memoizedState=a):(e=Qm(),qe.lanes|=e,Dl|=e,t)}function Ih(e,t,a,n,u){var d=re.p;re.p=d!==0&&8>d?d:8;var y=Y.T,E={};Y.T=E,cd(e,!1,t,a);try{var z=u(),W=Y.S;if(W!==null&&W(E,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var se=Ly(z,n);Si(e,t,se,za(e))}else Si(e,t,n,za(e))}catch(de){Si(e,t,{then:function(){},status:"rejected",reason:de},za())}finally{re.p=d,y!==null&&E.types!==null&&(y.types=E.types),Y.T=y}}function $y(){}function id(e,t,a,n){if(e.tag!==5)throw Error(c(476));var u=Xh(e).queue;Ih(e,u,t,ye,a===null?$y:function(){return Jh(e),a(n)})}function Xh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ye,baseState:ye,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:ye},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jh(e){var t=Xh(e);t.next===null&&(t=e.alternate.memoizedState),Si(e,t.next.queue,{},za())}function ud(){return Jt(Hi)}function Kh(){return Dt().memoizedState}function em(){return Dt().memoizedState}function Fy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=za();e=wl(a);var n=El(t,e,a);n!==null&&(Ta(n,t,a),xi(n,t,a)),t={cache:Lo()},e.payload=t;return}t=t.return}}function Gy(e,t,a){var n=za();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},nc(e)?am(t,a):(a=sr(e,t,a,n),a!==null&&(Ta(a,e,n),nm(a,t,n)))}function tm(e,t,a){var n=za();Si(e,t,a,n)}function Si(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(nc(e))am(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,E=d(y,a);if(u.hasEagerState=!0,u.eagerState=E,ia(E,y))return $a(e,t,u,0),ht===null&&Sl(),!1}catch{}finally{}if(a=sr(e,t,u,n),a!==null)return Ta(a,e,n),nm(a,t,n),!0}return!1}function cd(e,t,a,n){if(n={lane:2,revertLane:Vd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},nc(e)){if(t)throw Error(c(479))}else t=sr(e,a,n,2),t!==null&&Ta(t,e,2)}function nc(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function am(e,t){xr=Iu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function nm(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,xa(e,a)}}var Ni={readContext:Jt,use:Ku,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};Ni.useEffectEvent=wt;var lm={readContext:Jt,use:Ku,useCallback:function(e,t){return fa().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:Vh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,tc(4194308,4,Gh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return tc(4194308,4,e,t)},useInsertionEffect:function(e,t){tc(4,2,e,t)},useMemo:function(e,t){var a=fa();t=t===void 0?null:t;var n=e();if(Ts){Pt(!0);try{e()}finally{Pt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=fa();if(a!==void 0){var u=a(t);if(Ts){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=Gy.bind(null,qe,e),[n.memoizedState,e]},useRef:function(e){var t=fa();return e={current:e},t.memoizedState=e},useState:function(e){e=ad(e);var t=e.queue,a=tm.bind(null,qe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:sd,useDeferredValue:function(e,t){var a=fa();return rd(a,e,t)},useTransition:function(){var e=ad(!1);return e=Ih.bind(null,qe,e.queue,!0,!1),fa().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=qe,u=fa();if(V){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),ht===null)throw Error(c(349));(Qe&127)!==0||Eh(n,t,a)}u.memoizedState=a;var d={value:a,getSnapshot:t};return u.queue=d,Vh(Mh.bind(null,n,d,e),[e]),n.flags|=2048,pr(9,{destroy:void 0},Th.bind(null,n,d,a,t),null),a},useId:function(){var e=fa(),t=ht.identifierPrefix;if(V){var a=g,n=Za;a=(n&~(1<<32-Zt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Xu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Hy++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ud,useFormState:Uh,useActionState:Uh,useOptimistic:function(e){var t=fa();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=cd.bind(null,qe,!0,a),a.dispatch=t,[e,t]},useMemoCache:Ko,useCacheRefresh:function(){return fa().memoizedState=Fy.bind(null,qe)},useEffectEvent:function(e){var t=fa(),a={impl:e};return t.memoizedState=a,function(){if((nt&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},od={readContext:Jt,use:Ku,useCallback:Zh,useContext:Jt,useEffect:ld,useImperativeHandle:Ph,useInsertionEffect:$h,useLayoutEffect:Fh,useMemo:Wh,useReducer:ec,useRef:Bh,useState:function(){return ec(Yn)},useDebugValue:sd,useDeferredValue:function(e,t){var a=Dt();return Qh(a,ct.memoizedState,e,t)},useTransition:function(){var e=ec(Yn)[0],t=Dt().memoizedState;return[typeof e=="boolean"?e:bi(e),t]},useSyncExternalStore:wh,useId:Kh,useHostTransitionStatus:ud,useFormState:Lh,useActionState:Lh,useOptimistic:function(e,t){var a=Dt();return Dh(a,ct,e,t)},useMemoCache:Ko,useCacheRefresh:em};od.useEffectEvent=Yh;var sm={readContext:Jt,use:Ku,useCallback:Zh,useContext:Jt,useEffect:ld,useImperativeHandle:Ph,useInsertionEffect:$h,useLayoutEffect:Fh,useMemo:Wh,useReducer:td,useRef:Bh,useState:function(){return td(Yn)},useDebugValue:sd,useDeferredValue:function(e,t){var a=Dt();return ct===null?rd(a,e,t):Qh(a,ct.memoizedState,e,t)},useTransition:function(){var e=td(Yn)[0],t=Dt().memoizedState;return[typeof e=="boolean"?e:bi(e),t]},useSyncExternalStore:wh,useId:Kh,useHostTransitionStatus:ud,useFormState:qh,useActionState:qh,useOptimistic:function(e,t){var a=Dt();return ct!==null?Dh(a,ct,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Ko,useCacheRefresh:em};sm.useEffectEvent=Yh;function dd(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:T({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var fd={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=za(),u=wl(n);u.payload=t,a!=null&&(u.callback=a),t=El(e,u,n),t!==null&&(Ta(t,e,n),xi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=za(),u=wl(n);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=El(e,u,n),t!==null&&(Ta(t,e,n),xi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=za(),n=wl(a);n.tag=2,t!=null&&(n.callback=t),t=El(e,n,a),t!==null&&(Ta(t,e,a),xi(t,e,a))}};function rm(e,t,a,n,u,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,d,y):t.prototype&&t.prototype.isPureReactComponent?!gs(a,n)||!gs(u,d):!0}function im(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&&fd.enqueueReplaceState(t,t.state,null)}function Ms(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=T({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function um(e){bl(e)}function cm(e){console.error(e)}function om(e){bl(e)}function lc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function dm(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 hd(e,t,a){return a=wl(a),a.tag=3,a.payload={element:null},a.callback=function(){lc(e,t)},a}function fm(e){return e=wl(e),e.tag=3,e}function hm(e,t,a,n){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var d=n.value;e.payload=function(){return u(d)},e.callback=function(){dm(t,a,n)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){dm(t,a,n),typeof u!="function"&&(Rl===null?Rl=new Set([this]):Rl.add(this));var E=n.stack;this.componentDidCatch(n.value,{componentStack:E!==null?E:""})})}function Py(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=Ra.current,a!==null){switch(a.tag){case 31:case 13:return Ia===null?xc():a.alternate===null&&Et===0&&(Et=3),a.flags&=-257,a.flags|=65536,a.lanes=u,n===Gu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Hd(e,n,u)),!1;case 22:return a.flags|=65536,n===Gu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Hd(e,n,u)),!1}throw Error(c(435,a.tag))}return Hd(e,n,u),xc(),!1}if(V)return t=Ra.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,n!==Ue&&(e=Error(c(422),{cause:n}),on(ba(e,a)))):(n!==Ue&&(t=Error(c(423),{cause:n}),on(ba(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,n=ba(n,a),u=hd(e.stateNode,n,u),$o(e,u),Et!==4&&(Et=2)),!1;var d=Error(c(520),{cause:n});if(d=ba(d,a),Di===null?Di=[d]:Di.push(d),Et!==4&&(Et=2),t===null)return!0;n=ba(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=hd(a.stateNode,n,e),$o(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Rl===null||!Rl.has(d))))return a.flags|=65536,u&=-u,a.lanes|=u,u=fm(u),hm(u,e,a,n),$o(a,u),!1}a=a.return}while(a!==null);return!1}var md=Error(c(461)),zt=!1;function Kt(e,t,a,n){t.child=e===null?yh(t,null,a,n):Es(t,e.child,a,n)}function mm(e,t,a,n,u){a=a.render;var d=t.ref;if("ref"in n){var y={};for(var E in n)E!=="ref"&&(y[E]=n[E])}else y=n;return Ss(t),n=Qo(e,t,a,y,d,u),E=Io(),e!==null&&!zt?(Xo(e,t,u),$n(e,t,u)):(V&&E&&p(t),t.flags|=1,Kt(e,t,n,u),t.child)}function gm(e,t,a,n,u){if(e===null){var d=a.type;return typeof d=="function"&&!ir(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,xm(e,t,d,n,u)):(e=ur(a.type,null,n,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Nd(e,u)){var y=d.memoizedProps;if(a=a.compare,a=a!==null?a:gs,a(y,n)&&e.ref===t.ref)return $n(e,t,u)}return t.flags|=1,e=Ga(d,n),e.ref=t.ref,e.return=t,t.child=e}function xm(e,t,a,n,u){if(e!==null){var d=e.memoizedProps;if(gs(d,n)&&e.ref===t.ref)if(zt=!1,t.pendingProps=n=d,Nd(e,u))(e.flags&131072)!==0&&(zt=!0);else return t.lanes=e.lanes,$n(e,t,u)}return gd(e,t,a,n,u)}function ym(e,t,a,n){var u=n.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(n=t.child=e.child,u=0;n!==null;)u=u|n.lanes|n.childLanes,n=n.sibling;n=u&~d}else n=0,t.child=null;return pm(e,t,d,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&$u(t,d!==null?d.cachePool:null),d!==null?bh(t,d):Go(),Sh(t);else return n=t.lanes=536870912,pm(e,t,d!==null?d.baseLanes|a:a,a,n)}else d!==null?($u(t,d.cachePool),bh(t,d),Ml(),t.memoizedState=null):(e!==null&&$u(t,null),Go(),Ml());return Kt(e,t,u,a),t.child}function ji(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function pm(e,t,a,n,u){var d=qo();return d=d===null?null:{parent:kt._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&$u(t,null),Go(),Sh(t),e!==null&&Qa(e,t,n,!0),t.childLanes=u,null}function sc(e,t){return t=ic({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function vm(e,t,a){return Es(t,e.child,null,a),e=sc(t,t.pendingProps),e.flags|=2,Aa(t),t.memoizedState=null,e}function Zy(e,t,a){var n=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(V){if(n.mode==="hidden")return e=sc(t,n),t.lanes=536870912,ji(null,e);if(Zo(t),(e=H)?(e=R0(e,ve),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sa!==null?{id:Za,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Vu(e),a.return=t,t.child=a,L=t,H=null)):e=null,e===null)throw We(t);return t.lanes=536870912,null}return sc(t,n)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(Zo(t),u)if(t.flags&256)t.flags&=-257,t=vm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(zt||Qa(e,t,a,!1),u=(a&e.childLanes)!==0,zt||u){if(n=ht,n!==null&&(y=Yr(n,a),y!==0&&y!==d.retryLane))throw d.retryLane=y,Fa(e,y),Ta(n,e,y),md;xc(),t=vm(e,t,a)}else e=d.treeContext,H=Xa(y.nextSibling),L=t,V=!0,he=null,ve=!1,e!==null&&D(t,e),t=sc(t,n),t.flags|=4096;return t}return e=Ga(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function rc(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function gd(e,t,a,n,u){return Ss(t),a=Qo(e,t,a,n,void 0,u),n=Io(),e!==null&&!zt?(Xo(e,t,u),$n(e,t,u)):(V&&n&&p(t),t.flags|=1,Kt(e,t,a,u),t.child)}function bm(e,t,a,n,u,d){return Ss(t),t.updateQueue=null,a=jh(t,n,a,u),Nh(e),n=Io(),e!==null&&!zt?(Xo(e,t,d),$n(e,t,d)):(V&&n&&p(t),t.flags|=1,Kt(e,t,a,d),t.child)}function Sm(e,t,a,n,u){if(Ss(t),t.stateNode===null){var d=Da,y=a.contextType;typeof y=="object"&&y!==null&&(d=Jt(y)),d=new a(n,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=fd,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=n,d.state=t.memoizedState,d.refs={},Vo(t),y=a.contextType,d.context=typeof y=="object"&&y!==null?Jt(y):Da,d.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(dd(t,a,y,n),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&fd.enqueueReplaceState(d,d.state,null),pi(t,n,d,u),yi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,z=Ms(a,E);d.props=z;var W=d.context,se=a.contextType;y=Da,typeof se=="object"&&se!==null&&(y=Jt(se));var de=a.getDerivedStateFromProps;se=typeof de=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,se||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||W!==y)&&im(t,d,n,y),jl=!1;var I=t.memoizedState;d.state=I,pi(t,n,d,u),yi(),W=t.memoizedState,E||I!==W||jl?(typeof de=="function"&&(dd(t,a,de,n),W=t.memoizedState),(z=jl||rm(t,a,z,n,I,W,y))?(se||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=W),d.props=n,d.state=W,d.context=y,n=z):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{d=t.stateNode,Yo(e,t),y=t.memoizedProps,se=Ms(a,y),d.props=se,de=t.pendingProps,I=d.context,W=a.contextType,z=Da,typeof W=="object"&&W!==null&&(z=Jt(W)),E=a.getDerivedStateFromProps,(W=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==de||I!==z)&&im(t,d,n,z),jl=!1,I=t.memoizedState,d.state=I,pi(t,n,d,u),yi();var ee=t.memoizedState;y!==de||I!==ee||jl||e!==null&&e.dependencies!==null&&or(e.dependencies)?(typeof E=="function"&&(dd(t,a,E,n),ee=t.memoizedState),(se=jl||rm(t,a,se,n,I,ee,z)||e!==null&&e.dependencies!==null&&or(e.dependencies))?(W||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(n,ee,z),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(n,ee,z)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=ee),d.props=n,d.state=ee,d.context=z,n=se):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),n=!1)}return d=n,rc(e,t),n=(t.flags&128)!==0,d||n?(d=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&n?(t.child=Es(t,e.child,null,u),t.child=Es(t,null,a,u)):Kt(e,t,a,u),t.memoizedState=d.state,e=t.child):e=$n(e,t,u),e}function Nm(e,t,a,n){return Vt(),t.flags|=256,Kt(e,t,a,n),t.child}var xd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yd(e){return{baseLanes:e,cachePool:dh()}}function pd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=_a),e}function jm(e,t,a){var n=t.pendingProps,u=!1,d=(t.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(Ot.current&2)!==0),y&&(u=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(V){if(u?Tl(t):Ml(),(e=H)?(e=R0(e,ve),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sa!==null?{id:Za,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Vu(e),a.return=t,t.child=a,L=t,H=null)):e=null,e===null)throw We(t);return ef(e)?t.lanes=32:t.lanes=536870912,null}var E=n.children;return n=n.fallback,u?(Ml(),u=t.mode,E=ic({mode:"hidden",children:E},u),n=Pa(n,u,a,null),E.return=t,n.return=t,E.sibling=n,t.child=E,n=t.child,n.memoizedState=yd(a),n.childLanes=pd(e,y,a),t.memoizedState=xd,ji(null,n)):(Tl(t),vd(t,E))}var z=e.memoizedState;if(z!==null&&(E=z.dehydrated,E!==null)){if(d)t.flags&256?(Tl(t),t.flags&=-257,t=bd(e,t,a)):t.memoizedState!==null?(Ml(),t.child=e.child,t.flags|=128,t=null):(Ml(),E=n.fallback,u=t.mode,n=ic({mode:"visible",children:n.children},u),E=Pa(E,u,a,null),E.flags|=2,n.return=t,E.return=t,n.sibling=E,t.child=n,Es(t,e.child,null,a),n=t.child,n.memoizedState=yd(a),n.childLanes=pd(e,y,a),t.memoizedState=xd,t=ji(null,n));else if(Tl(t),ef(E)){if(y=E.nextSibling&&E.nextSibling.dataset,y)var W=y.dgst;y=W,n=Error(c(419)),n.stack="",n.digest=y,on({value:n,source:null,stack:null}),t=bd(e,t,a)}else if(zt||Qa(e,t,a,!1),y=(a&e.childLanes)!==0,zt||y){if(y=ht,y!==null&&(n=Yr(y,a),n!==0&&n!==z.retryLane))throw z.retryLane=n,Fa(e,n),Ta(y,e,n),md;Kd(E)||xc(),t=bd(e,t,a)}else Kd(E)?(t.flags|=192,t.child=e.child,t=null):(e=z.treeContext,H=Xa(E.nextSibling),L=t,V=!0,he=null,ve=!1,e!==null&&D(t,e),t=vd(t,n.children),t.flags|=4096);return t}return u?(Ml(),E=n.fallback,u=t.mode,z=e.child,W=z.sibling,n=Ga(z,{mode:"hidden",children:n.children}),n.subtreeFlags=z.subtreeFlags&65011712,W!==null?E=Ga(W,E):(E=Pa(E,u,a,null),E.flags|=2),E.return=t,n.return=t,n.sibling=E,t.child=n,ji(null,n),n=t.child,E=e.child.memoizedState,E===null?E=yd(a):(u=E.cachePool,u!==null?(z=kt._currentValue,u=u.parent!==z?{parent:z,pool:z}:u):u=dh(),E={baseLanes:E.baseLanes|a,cachePool:u}),n.memoizedState=E,n.childLanes=pd(e,y,a),t.memoizedState=xd,ji(e.child,n)):(Tl(t),a=e.child,e=a.sibling,a=Ga(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function vd(e,t){return t=ic({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ic(e,t){return e=Xt(22,e,null,t),e.lanes=0,e}function bd(e,t,a){return Es(t,e.child,null,a),e=vd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),di(e.return,t,a)}function Sd(e,t,a,n,u,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:u,treeForkCount:d}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=n,y.tail=a,y.tailMode=u,y.treeForkCount=d)}function Em(e,t,a){var n=t.pendingProps,u=n.revealOrder,d=n.tail;n=n.children;var y=Ot.current,E=(y&2)!==0;if(E?(y=y&1|2,t.flags|=128):y&=1,ge(Ot,y),Kt(e,t,n,a),n=V?cn:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wm(e,a,t);else if(e.tag===19)wm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&Qu(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),Sd(t,!1,u,a,d,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Qu(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}Sd(t,!0,a,null,d,n);break;case"together":Sd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function $n(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Dl|=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=Ga(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ga(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Nd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&or(e)))}function Wy(e,t,a){switch(t.tag){case 3:xt(t,t.stateNode.containerInfo),wn(t,kt,e.memoizedState.cache),Vt();break;case 27:case 5:Ft(t);break;case 4:xt(t,t.stateNode.containerInfo);break;case 10:wn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Zo(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Tl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?jm(e,t,a):(Tl(t),e=$n(e,t,a),e!==null?e.sibling:null);Tl(t);break;case 19:var u=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Qa(e,t,a,!1),n=(a&t.childLanes)!==0),u){if(n)return Em(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ge(Ot,Ot.current),n)break;return null;case 22:return t.lanes=0,ym(e,t,a,t.pendingProps);case 24:wn(t,kt,e.memoizedState.cache)}return $n(e,t,a)}function Tm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)zt=!0;else{if(!Nd(e,a)&&(t.flags&128)===0)return zt=!1,Wy(e,t,a);zt=(e.flags&131072)!==0}else zt=!1,V&&(t.flags&1048576)!==0&&h(t,cn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=js(t.elementType),t.type=e,typeof e=="function")ir(e)?(n=Ms(e,n),t.tag=1,t=Sm(null,t,e,n,a)):(t.tag=0,t=gd(null,t,e,n,a));else{if(e!=null){var u=e.$$typeof;if(u===K){t.tag=11,t=mm(null,t,e,n,a);break e}else if(u===F){t.tag=14,t=gm(null,t,e,n,a);break e}}throw t=te(e)||e,Error(c(306,t,""))}}return t;case 0:return gd(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,u=Ms(n,t.pendingProps),Sm(e,t,n,u,a);case 3:e:{if(xt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var d=t.memoizedState;u=d.element,Yo(e,t),pi(t,n,null,a);var y=t.memoizedState;if(n=y.cache,wn(t,kt,n),n!==d.cache&&Bn(t,[kt],a,!0),yi(),n=y.element,d.isDehydrated)if(d={element:n,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Nm(e,t,n,a);break e}else if(n!==u){u=ba(Error(c(424)),t),on(u),t=Nm(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(H=Xa(e.firstChild),L=t,V=!0,he=null,ve=!0,a=yh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Vt(),n===u){t=$n(e,t,a);break e}Kt(e,t,n,a)}t=t.child}return t;case 26:return rc(e,t),e===null?(a=L0(t.type,null,t.pendingProps,null))?t.memoizedState=a:V||(a=t.type,e=t.pendingProps,n=jc(we.current).createElement(a),n[Tt]=t,n[Lt]=e,ea(n,a,e),At(n),t.stateNode=n):t.memoizedState=L0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ft(t),e===null&&V&&(n=t.stateNode=_0(t.type,t.pendingProps,we.current),L=t,ve=!0,u=H,zl(t.type)?(tf=u,H=Xa(n.firstChild)):H=u),Kt(e,t,t.pendingProps.children,a),rc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((u=n=H)&&(n=wp(n,t.type,t.pendingProps,ve),n!==null?(t.stateNode=n,L=t,H=Xa(n.firstChild),ve=!1,u=!0):u=!1),u||We(t)),Ft(t),u=t.type,d=t.pendingProps,y=e!==null?e.memoizedProps:null,n=d.children,Id(u,d)?n=null:y!==null&&Id(u,y)&&(t.flags|=32),t.memoizedState!==null&&(u=Qo(e,t,qy,null,null,a),Hi._currentValue=u),rc(e,t),Kt(e,t,n,a),t.child;case 6:return e===null&&V&&((e=a=H)&&(a=Ep(a,t.pendingProps,ve),a!==null?(t.stateNode=a,L=t,H=null,e=!0):e=!1),e||We(t)),null;case 13:return jm(e,t,a);case 4:return xt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Es(t,null,n,a):Kt(e,t,n,a),t.child;case 11:return mm(e,t,t.type,t.pendingProps,a);case 7:return Kt(e,t,t.pendingProps,a),t.child;case 8:return Kt(e,t,t.pendingProps.children,a),t.child;case 12:return Kt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,wn(t,t.type,n.value),Kt(e,t,n.children,a),t.child;case 9:return u=t.type._context,n=t.pendingProps.children,Ss(t),u=Jt(u),n=n(u),t.flags|=1,Kt(e,t,n,a),t.child;case 14:return gm(e,t,t.type,t.pendingProps,a);case 15:return xm(e,t,t.type,t.pendingProps,a);case 19:return Em(e,t,a);case 31:return Zy(e,t,a);case 22:return ym(e,t,a,t.pendingProps);case 24:return Ss(t),n=Jt(kt),e===null?(u=qo(),u===null&&(u=ht,d=Lo(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=a),u=d),t.memoizedState={parent:n,cache:u},Vo(t),wn(t,kt,u)):((e.lanes&a)!==0&&(Yo(e,t),pi(t,null,null,a),yi()),u=e.memoizedState,d=t.memoizedState,u.parent!==n?(u={parent:n,cache:n},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),wn(t,kt,n)):(n=d.cache,wn(t,kt,n),n!==u.cache&&Bn(t,[kt],a,!0))),Kt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Fn(e){e.flags|=4}function jd(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(Km())e.flags|=8192;else throw ws=Gu,Bo}else e.flags&=-16777217}function Mm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Y0(t))if(Km())e.flags|=8192;else throw ws=Gu,Bo}function uc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Vr():536870912,e.lanes|=t,Nr|=t)}function wi(e,t){if(!V)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags&65011712,n|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags,n|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Qy(e,t,a){var n=t.pendingProps;switch(j(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(t),null;case 1:return bt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),dn(kt),$e(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Bt(t)?Fn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,jn())),bt(t),null;case 26:var u=t.type,d=t.memoizedState;return e===null?(Fn(t),d!==null?(bt(t),Mm(t,d)):(bt(t),jd(t,u,null,n,a))):d?d!==e.memoizedState?(Fn(t),bt(t),Mm(t,d)):(bt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Fn(t),bt(t),jd(t,u,e,n,a)),null;case 27:if(qa(t),a=we.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Fn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return bt(t),null}e=pe.current,Bt(t)?Re(t):(e=_0(u,n,a),t.stateNode=e,Fn(t))}return bt(t),null;case 5:if(qa(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Fn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return bt(t),null}if(d=pe.current,Bt(t))Re(t);else{var y=jc(we.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof n.is=="string"?y.createElement("select",{is:n.is}):y.createElement("select"),n.multiple?d.multiple=!0:n.size&&(d.size=n.size);break;default:d=typeof n.is=="string"?y.createElement(u,{is:n.is}):y.createElement(u)}}d[Tt]=t,d[Lt]=n;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=d;e:switch(ea(d,u,n),u){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Fn(t)}}return bt(t),jd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Fn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=we.current,Bt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=L,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||j0(e.nodeValue,a)),e||We(t,!0)}else e=jc(e).createTextNode(n),e[Tt]=t,t.stateNode=e}return bt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Bt(t),a!==null){if(e===null){if(!n)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[Tt]=t}else Vt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;bt(t),e=!1}else a=jn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Aa(t),t):(Aa(t),null);if((t.flags&128)!==0)throw Error(c(558))}return bt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Bt(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[Tt]=t}else Vt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;bt(t),u=!1}else u=jn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Aa(t),t):(Aa(t),null)}return Aa(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),d=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(d=n.memoizedState.cachePool.pool),d!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),uc(t,t.updateQueue),bt(t),null);case 4:return $e(),e===null&&Gd(t.stateNode.containerInfo),bt(t),null;case 10:return dn(t.type),bt(t),null;case 19:if(le(Ot),n=t.memoizedState,n===null)return bt(t),null;if(u=(t.flags&128)!==0,d=n.rendering,d===null)if(u)wi(n,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Qu(e),d!==null){for(t.flags|=128,wi(n,!1),e=d.updateQueue,t.updateQueue=e,uc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Bu(a,e),a=a.sibling;return ge(Ot,Ot.current&1|2),V&&i(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&yt()>hc&&(t.flags|=128,u=!0,wi(n,!1),t.lanes=4194304)}else{if(!u)if(e=Qu(d),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,uc(t,e),wi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!d.alternate&&!V)return bt(t),null}else 2*yt()-n.renderingStartTime>hc&&a!==536870912&&(t.flags|=128,u=!0,wi(n,!1),t.lanes=4194304);n.isBackwards?(d.sibling=t.child,t.child=d):(e=n.last,e!==null?e.sibling=d:t.child=d,n.last=d)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=yt(),e.sibling=null,a=Ot.current,ge(Ot,u?a&1|2:a&1),V&&i(t,n.treeForkCount),e):(bt(t),null);case 22:case 23:return Aa(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&&(bt(t),t.subtreeFlags&6&&(t.flags|=8192)):bt(t),a=t.updateQueue,a!==null&&uc(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&le(Ns),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),dn(kt),bt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Iy(e,t){switch(j(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dn(kt),$e(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return qa(t),null;case 31:if(t.memoizedState!==null){if(Aa(t),t.alternate===null)throw Error(c(340));Vt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Aa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Vt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(Ot),null;case 4:return $e(),null;case 10:return dn(t.type),null;case 22:case 23:return Aa(t),Po(),e!==null&&le(Ns),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return dn(kt),null;case 25:return null;default:return null}}function Cm(e,t){switch(j(t),t.tag){case 3:dn(kt),$e();break;case 26:case 27:case 5:qa(t);break;case 4:$e();break;case 31:t.memoizedState!==null&&Aa(t);break;case 13:Aa(t);break;case 19:le(Ot);break;case 10:dn(t.type);break;case 22:case 23:Aa(t),Po(),e!==null&&le(Ns);break;case 24:dn(kt)}}function Ei(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){n=void 0;var d=a.create,y=a.inst;n=d(),y.destroy=n}a=a.next}while(a!==u)}}catch(E){it(t,t.return,E)}}function Cl(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var d=u.next;n=d;do{if((n.tag&e)===e){var y=n.inst,E=y.destroy;if(E!==void 0){y.destroy=void 0,u=t;var z=a,W=E;try{W()}catch(se){it(u,z,se)}}}n=n.next}while(n!==d)}}catch(se){it(t,t.return,se)}}function Om(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{vh(t,a)}catch(n){it(e,e.return,n)}}}function Dm(e,t,a){a.props=Ms(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){it(e,t,n)}}function Ti(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(u){it(e,t,u)}}function En(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){it(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){it(e,t,u)}else a.current=null}function Rm(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){it(e,e.return,u)}}function wd(e,t,a){try{var n=e.stateNode;pp(n,e.type,a,t),n[Lt]=t}catch(u){it(e,e.return,u)}}function Am(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zl(e.type)||e.tag===4}function Ed(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Am(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&&zl(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 Td(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=Va));else if(n!==4&&(n===27&&zl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Td(e,t,a),e=e.sibling;e!==null;)Td(e,t,a),e=e.sibling}function cc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&zl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(cc(e,t,a),e=e.sibling;e!==null;)cc(e,t,a),e=e.sibling}function km(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);ea(t,n,a),t[Tt]=e,t[Lt]=a}catch(d){it(e,e.return,d)}}var Gn=!1,Ut=!1,Md=!1,_m=typeof WeakSet=="function"?WeakSet:Set,Yt=null;function Xy(e,t){if(e=e.containerInfo,Wd=Dc,e=_o(e),tr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var u=n.anchorOffset,d=n.focusNode;n=n.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var y=0,E=-1,z=-1,W=0,se=0,de=e,I=null;t:for(;;){for(var ee;de!==a||u!==0&&de.nodeType!==3||(E=y+u),de!==d||n!==0&&de.nodeType!==3||(z=y+n),de.nodeType===3&&(y+=de.nodeValue.length),(ee=de.firstChild)!==null;)I=de,de=ee;for(;;){if(de===e)break t;if(I===a&&++W===u&&(E=y),I===d&&++se===n&&(z=y),(ee=de.nextSibling)!==null)break;de=I,I=de.parentNode}de=ee}a=E===-1||z===-1?null:{start:E,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(Qd={focusedElem:e,selectionRange:a},Dc=!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,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,u=d.memoizedProps,d=d.memoizedState,n=a.stateNode;try{var be=Ms(a.type,u);e=n.getSnapshotBeforeUpdate(be,d),n.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){it(a,a.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Jd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Jd(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 zm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Zn(e,a),n&4&&Ei(5,a);break;case 1:if(Zn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){it(a,a.return,y)}else{var u=Ms(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){it(a,a.return,y)}}n&64&&Om(a),n&512&&Ti(a,a.return);break;case 3:if(Zn(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{vh(e,t)}catch(y){it(a,a.return,y)}}break;case 27:t===null&&n&4&&km(a);case 26:case 5:Zn(e,a),t===null&&n&4&&Rm(a),n&512&&Ti(a,a.return);break;case 12:Zn(e,a);break;case 31:Zn(e,a),n&4&&Hm(e,a);break;case 13:Zn(e,a),n&4&&qm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=rp.bind(null,a),Tp(e,a))));break;case 22:if(n=a.memoizedState!==null||Gn,!n){t=t!==null&&t.memoizedState!==null||Ut,u=Gn;var d=Ut;Gn=n,(Ut=t)&&!d?Wn(e,a,(a.subtreeFlags&8772)!==0):Zn(e,a),Gn=u,Ut=d}break;case 30:break;default:Zn(e,a)}}function Um(e){var t=e.alternate;t!==null&&(e.alternate=null,Um(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Fs(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var St=null,Na=!1;function Pn(e,t,a){for(a=a.child;a!==null;)Lm(e,t,a),a=a.sibling}function Lm(e,t,a){if(la&&typeof la.onCommitFiberUnmount=="function")try{la.onCommitFiberUnmount(pt,a)}catch{}switch(a.tag){case 26:Ut||En(a,t),Pn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ut||En(a,t);var n=St,u=Na;zl(a.type)&&(St=a.stateNode,Na=!1),Pn(e,t,a),zi(a.stateNode),St=n,Na=u;break;case 5:Ut||En(a,t);case 6:if(n=St,u=Na,St=null,Pn(e,t,a),St=n,Na=u,St!==null)if(Na)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(a.stateNode)}catch(d){it(a,t,d)}else try{St.removeChild(a.stateNode)}catch(d){it(a,t,d)}break;case 18:St!==null&&(Na?(e=St,O0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Dr(e)):O0(St,a.stateNode));break;case 4:n=St,u=Na,St=a.stateNode.containerInfo,Na=!0,Pn(e,t,a),St=n,Na=u;break;case 0:case 11:case 14:case 15:Cl(2,a,t),Ut||Cl(4,a,t),Pn(e,t,a);break;case 1:Ut||(En(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Dm(a,t,n)),Pn(e,t,a);break;case 21:Pn(e,t,a);break;case 22:Ut=(n=Ut)||a.memoizedState!==null,Pn(e,t,a),Ut=n;break;default:Pn(e,t,a)}}function Hm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Dr(e)}catch(a){it(t,t.return,a)}}}function qm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Dr(e)}catch(a){it(t,t.return,a)}}function Jy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _m),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _m),t;default:throw Error(c(435,e.tag))}}function oc(e,t){var a=Jy(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var u=ip.bind(null,e,n);n.then(u,u)}})}function ja(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var u=a[n],d=e,y=t,E=y;e:for(;E!==null;){switch(E.tag){case 27:if(zl(E.type)){St=E.stateNode,Na=!1;break e}break;case 5:St=E.stateNode,Na=!1;break e;case 3:case 4:St=E.stateNode.containerInfo,Na=!0;break e}E=E.return}if(St===null)throw Error(c(160));Lm(d,y,u),St=null,Na=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bm(t,e),t=t.sibling}var fn=null;function Bm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ja(t,e),wa(e),n&4&&(Cl(3,e,e.return),Ei(3,e),Cl(5,e,e.return));break;case 1:ja(t,e),wa(e),n&512&&(Ut||a===null||En(a,a.return)),n&64&&Gn&&(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=fn;if(ja(t,e),wa(e),n&512&&(Ut||a===null||En(a,a.return)),n&4){var d=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(n){case"title":d=u.getElementsByTagName("title")[0],(!d||d[Il]||d[Tt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(n),u.head.insertBefore(d,u.querySelector("head > title"))),ea(d,n,a),d[Tt]=e,At(d),n=d;break e;case"link":var y=B0("link","href",u).get(n+(a.href||""));if(y){for(var E=0;E<y.length;E++)if(d=y[E],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(E,1);break t}}d=u.createElement(n),ea(d,n,a),u.head.appendChild(d);break;case"meta":if(y=B0("meta","content",u).get(n+(a.content||""))){for(E=0;E<y.length;E++)if(d=y[E],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(E,1);break t}}d=u.createElement(n),ea(d,n,a),u.head.appendChild(d);break;default:throw Error(c(468,n))}d[Tt]=e,At(d),n=d}e.stateNode=n}else V0(u,e.type,e.stateNode);else e.stateNode=q0(u,n,e.memoizedProps);else d!==n?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,n===null?V0(u,e.type,e.stateNode):q0(u,n,e.memoizedProps)):n===null&&e.stateNode!==null&&wd(e,e.memoizedProps,a.memoizedProps)}break;case 27:ja(t,e),wa(e),n&512&&(Ut||a===null||En(a,a.return)),a!==null&&n&4&&wd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ja(t,e),wa(e),n&512&&(Ut||a===null||En(a,a.return)),e.flags&32){u=e.stateNode;try{ln(u,"")}catch(be){it(e,e.return,be)}}n&4&&e.stateNode!=null&&(u=e.memoizedProps,wd(e,u,a!==null?a.memoizedProps:u)),n&1024&&(Md=!0);break;case 6:if(ja(t,e),wa(e),n&4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(be){it(e,e.return,be)}}break;case 3:if(Tc=null,u=fn,fn=wc(t.containerInfo),ja(t,e),fn=u,wa(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Dr(t.containerInfo)}catch(be){it(e,e.return,be)}Md&&(Md=!1,Vm(e));break;case 4:n=fn,fn=wc(e.stateNode.containerInfo),ja(t,e),wa(e),fn=n;break;case 12:ja(t,e),wa(e);break;case 31:ja(t,e),wa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 13:ja(t,e),wa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(fc=yt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 22:u=e.memoizedState!==null;var z=a!==null&&a.memoizedState!==null,W=Gn,se=Ut;if(Gn=W||u,Ut=se||z,ja(t,e),Ut=se,Gn=W,wa(e),n&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||z||Gn||Ut||Cs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){z=a=t;try{if(d=z.stateNode,u)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{E=z.stateNode;var de=z.memoizedProps.style,I=de!=null&&de.hasOwnProperty("display")?de.display:null;E.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(be){it(z,z.return,be)}}}else if(t.tag===6){if(a===null){z=t;try{z.stateNode.nodeValue=u?"":z.memoizedProps}catch(be){it(z,z.return,be)}}}else if(t.tag===18){if(a===null){z=t;try{var ee=z.stateNode;u?D0(ee,!0):D0(z.stateNode,!1)}catch(be){it(z,z.return,be)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,oc(e,a))));break;case 19:ja(t,e),wa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 30:break;case 21:break;default:ja(t,e),wa(e)}}function wa(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Am(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var u=a.stateNode,d=Ed(e);cc(e,d,u);break;case 5:var y=a.stateNode;a.flags&32&&(ln(y,""),a.flags&=-33);var E=Ed(e);cc(e,E,y);break;case 3:case 4:var z=a.stateNode.containerInfo,W=Ed(e);Td(e,W,z);break;default:throw Error(c(161))}}catch(se){it(e,e.return,se)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Zn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)zm(e,t.alternate,t),t=t.sibling}function Cs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Cl(4,t,t.return),Cs(t);break;case 1:En(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Dm(t,t.return,a),Cs(t);break;case 27:zi(t.stateNode);case 26:case 5:En(t,t.return),Cs(t);break;case 22:t.memoizedState===null&&Cs(t);break;case 30:Cs(t);break;default:Cs(t)}e=e.sibling}}function Wn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,u=e,d=t,y=d.flags;switch(d.tag){case 0:case 11:case 15:Wn(u,d,a),Ei(4,d);break;case 1:if(Wn(u,d,a),n=d,u=n.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(W){it(n,n.return,W)}if(n=d,u=n.updateQueue,u!==null){var E=n.stateNode;try{var z=u.shared.hiddenCallbacks;if(z!==null)for(u.shared.hiddenCallbacks=null,u=0;u<z.length;u++)ph(z[u],E)}catch(W){it(n,n.return,W)}}a&&y&64&&Om(d),Ti(d,d.return);break;case 27:km(d);case 26:case 5:Wn(u,d,a),a&&n===null&&y&4&&Rm(d),Ti(d,d.return);break;case 12:Wn(u,d,a);break;case 31:Wn(u,d,a),a&&y&4&&Hm(u,d);break;case 13:Wn(u,d,a),a&&y&4&&qm(u,d);break;case 22:d.memoizedState===null&&Wn(u,d,a),Ti(d,d.return);break;case 30:break;default:Wn(u,d,a)}t=t.sibling}}function Cd(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&fi(a))}function Od(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fi(e))}function hn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ym(e,t,a,n),t=t.sibling}function Ym(e,t,a,n){var u=t.flags;switch(t.tag){case 0:case 11:case 15:hn(e,t,a,n),u&2048&&Ei(9,t);break;case 1:hn(e,t,a,n);break;case 3:hn(e,t,a,n),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fi(e)));break;case 12:if(u&2048){hn(e,t,a,n),e=t.stateNode;try{var d=t.memoizedProps,y=d.id,E=d.onPostCommit;typeof E=="function"&&E(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){it(t,t.return,z)}}else hn(e,t,a,n);break;case 31:hn(e,t,a,n);break;case 13:hn(e,t,a,n);break;case 23:break;case 22:d=t.stateNode,y=t.alternate,t.memoizedState!==null?d._visibility&2?hn(e,t,a,n):Mi(e,t):d._visibility&2?hn(e,t,a,n):(d._visibility|=2,vr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Cd(y,t);break;case 24:hn(e,t,a,n),u&2048&&Od(t.alternate,t);break;default:hn(e,t,a,n)}}function vr(e,t,a,n,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,y=t,E=a,z=n,W=y.flags;switch(y.tag){case 0:case 11:case 15:vr(d,y,E,z,u),Ei(8,y);break;case 23:break;case 22:var se=y.stateNode;y.memoizedState!==null?se._visibility&2?vr(d,y,E,z,u):Mi(d,y):(se._visibility|=2,vr(d,y,E,z,u)),u&&W&2048&&Cd(y.alternate,y);break;case 24:vr(d,y,E,z,u),u&&W&2048&&Od(y.alternate,y);break;default:vr(d,y,E,z,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&&Cd(n.alternate,n);break;case 24:Mi(a,n),u&2048&&Od(n.alternate,n);break;default:Mi(a,n)}t=t.sibling}}var Ci=8192;function br(e,t,a){if(e.subtreeFlags&Ci)for(e=e.child;e!==null;)$m(e,t,a),e=e.sibling}function $m(e,t,a){switch(e.tag){case 26:br(e,t,a),e.flags&Ci&&e.memoizedState!==null&&Hp(a,fn,e.memoizedState,e.memoizedProps);break;case 5:br(e,t,a);break;case 3:case 4:var n=fn;fn=wc(e.stateNode.containerInfo),br(e,t,a),fn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ci,Ci=16777216,br(e,t,a),Ci=n):br(e,t,a));break;default:br(e,t,a)}}function Fm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Oi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Yt=n,Pm(n,e)}Fm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gm(e),e=e.sibling}function Gm(e){switch(e.tag){case 0:case 11:case 15:Oi(e),e.flags&2048&&Cl(9,e,e.return);break;case 3:Oi(e);break;case 12:Oi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,dc(e)):Oi(e);break;default:Oi(e)}}function dc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Yt=n,Pm(n,e)}Fm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cl(8,t,t.return),dc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,dc(t));break;default:dc(t)}e=e.sibling}}function Pm(e,t){for(;Yt!==null;){var a=Yt;switch(a.tag){case 0:case 11:case 15:Cl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:fi(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Yt=n;else e:for(a=e;Yt!==null;){n=Yt;var u=n.sibling,d=n.return;if(Um(n),n===a){Yt=null;break e}if(u!==null){u.return=d,Yt=u;break e}Yt=d}}}var Ky={getCacheForType:function(e){var t=Jt(kt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Jt(kt).controller.signal}},ep=typeof WeakMap=="function"?WeakMap:Map,nt=0,ht=null,Fe=null,Qe=0,rt=0,ka=null,Ol=!1,Sr=!1,Dd=!1,Qn=0,Et=0,Dl=0,Os=0,Rd=0,_a=0,Nr=0,Di=null,Ea=null,Ad=!1,fc=0,Zm=0,hc=1/0,mc=null,Rl=null,qt=0,Al=null,jr=null,In=0,kd=0,_d=null,Wm=null,Ri=0,zd=null;function za(){return(nt&2)!==0&&Qe!==0?Qe&-Qe:Y.T!==null?Vd():$s()}function Qm(){if(_a===0)if((Qe&536870912)===0||V){var e=Bs;Bs<<=1,(Bs&3932160)===0&&(Bs=262144),_a=e}else _a=536870912;return e=Ra.current,e!==null&&(e.flags|=32),_a}function Ta(e,t,a){(e===ht&&(rt===2||rt===9)||e.cancelPendingCommit!==null)&&(wr(e,0),kl(e,Qe,_a,!1)),il(e,a),((nt&2)===0||e!==ht)&&(e===ht&&((nt&2)===0&&(Os|=a),Et===4&&kl(e,Qe,_a,!1)),Tn(e))}function Im(e,t,a){if((nt&6)!==0)throw Error(c(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||rl(e,t),u=n?np(e,t):Ld(e,t,!0),d=n;do{if(u===0){Sr&&!n&&kl(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!tp(a)){u=Ld(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var E=e;u=Di;var z=E.current.memoizedState.isDehydrated;if(z&&(wr(E,y).flags|=256),y=Ld(E,y,!1),y!==2){if(Dd&&!z){E.errorRecoveryDisabledLanes|=d,Os|=d,u=4;break e}d=Ea,Ea=u,d!==null&&(Ea===null?Ea=d:Ea.push.apply(Ea,d))}u=y}if(d=!1,u!==2)continue}}if(u===1){wr(e,0),kl(e,t,0,!0);break}e:{switch(n=e,d=u,d){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:kl(n,t,_a,!Ol);break e;case 2:Ea=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=fc+300-yt(),10<u)){if(kl(n,t,_a,!Ol),Wl(n,0,!0)!==0)break e;In=t,n.timeoutHandle=M0(Xm.bind(null,n,a,Ea,mc,Ad,t,_a,Os,Nr,Ol,d,"Throttled",-0,0),u);break e}Xm(n,a,Ea,mc,Ad,t,_a,Os,Nr,Ol,d,null,-0,0)}}break}while(!0);Tn(e)}function Xm(e,t,a,n,u,d,y,E,z,W,se,de,I,ee){if(e.timeoutHandle=-1,de=t.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Va},$m(t,d,de);var be=(d&62914560)===d?fc-yt():(d&4194048)===d?Zm-yt():0;if(be=qp(de,be),be!==null){In=d,e.cancelPendingCommit=be(s0.bind(null,e,t,d,a,n,u,y,E,z,se,de,null,I,ee)),kl(e,d,y,!W);return}}s0(e,t,d,a,n,u,y,E,z)}function tp(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var u=a[n],d=u.getSnapshot;u=u.value;try{if(!ia(d(),u))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function kl(e,t,a,n){t&=~Rd,t&=~Os,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var u=t;0<u;){var d=31-Zt(u),y=1<<d;n[d]=-1,u&=~y}a!==0&&gt(e,a,t)}function gc(){return(nt&6)===0?(Ai(0),!1):!0}function Ud(){if(Fe!==null){if(rt===0)var e=Fe.return;else e=Fe,Wa=qn=null,Jo(e),mr=null,mi=0,e=Fe;for(;e!==null;)Cm(e.alternate,e),e=e.return;Fe=null}}function wr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Sp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),In=0,Ud(),ht=e,Fe=a=Ga(e.current,null),Qe=t,rt=0,ka=null,Ol=!1,Sr=rl(e,t),Dd=!1,Nr=_a=Rd=Os=Dl=Et=0,Ea=Di=null,Ad=!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-Zt(n),d=1<<u;t|=e[u],n&=~d}return Qn=t,Sl(),a}function Jm(e,t){qe=null,Y.H=Ni,t===hr||t===Fu?(t=mh(),rt=3):t===Bo?(t=mh(),rt=4):rt=t===md?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ka=t,Fe===null&&(Et=1,lc(e,ba(t,e.current)))}function Km(){var e=Ra.current;return e===null?!0:(Qe&4194048)===Qe?Ia===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===Ia:!1}function e0(){var e=Y.H;return Y.H=Ni,e===null?Ni:e}function t0(){var e=Y.A;return Y.A=Ky,e}function xc(){Et=4,Ol||(Qe&4194048)!==Qe&&Ra.current!==null||(Sr=!0),(Dl&134217727)===0&&(Os&134217727)===0||ht===null||kl(ht,Qe,_a,!1)}function Ld(e,t,a){var n=nt;nt|=2;var u=e0(),d=t0();(ht!==e||Qe!==t)&&(mc=null,wr(e,t)),t=!1;var y=Et;e:do try{if(rt!==0&&Fe!==null){var E=Fe,z=ka;switch(rt){case 8:Ud(),y=6;break e;case 3:case 2:case 9:case 6:Ra.current===null&&(t=!0);var W=rt;if(rt=0,ka=null,Er(e,E,z,W),a&&Sr){y=0;break e}break;default:W=rt,rt=0,ka=null,Er(e,E,z,W)}}ap(),y=Et;break}catch(se){Jm(e,se)}while(!0);return t&&e.shellSuspendCounter++,Wa=qn=null,nt=n,Y.H=u,Y.A=d,Fe===null&&(ht=null,Qe=0,Sl()),y}function ap(){for(;Fe!==null;)a0(Fe)}function np(e,t){var a=nt;nt|=2;var n=e0(),u=t0();ht!==e||Qe!==t?(mc=null,hc=yt()+500,wr(e,t)):Sr=rl(e,t);e:do try{if(rt!==0&&Fe!==null){t=Fe;var d=ka;t:switch(rt){case 1:rt=0,ka=null,Er(e,t,d,1);break;case 2:case 9:if(fh(d)){rt=0,ka=null,n0(t);break}t=function(){rt!==2&&rt!==9||ht!==e||(rt=7),Tn(e)},d.then(t,t);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:fh(d)?(rt=0,ka=null,n0(t)):(rt=0,ka=null,Er(e,t,d,7));break;case 5:var y=null;switch(Fe.tag){case 26:y=Fe.memoizedState;case 5:case 27:var E=Fe;if(y?Y0(y):E.stateNode.complete){rt=0,ka=null;var z=E.sibling;if(z!==null)Fe=z;else{var W=E.return;W!==null?(Fe=W,yc(W)):Fe=null}break t}}rt=0,ka=null,Er(e,t,d,5);break;case 6:rt=0,ka=null,Er(e,t,d,6);break;case 8:Ud(),Et=6;break e;default:throw Error(c(462))}}lp();break}catch(se){Jm(e,se)}while(!0);return Wa=qn=null,Y.H=n,Y.A=u,nt=a,Fe!==null?0:(ht=null,Qe=0,Sl(),Et)}function lp(){for(;Fe!==null&&!aa();)a0(Fe)}function a0(e){var t=Tm(e.alternate,e,Qn);e.memoizedProps=e.pendingProps,t===null?yc(e):Fe=t}function n0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=bm(a,t,t.pendingProps,t.type,void 0,Qe);break;case 11:t=bm(a,t,t.pendingProps,t.type.render,t.ref,Qe);break;case 5:Jo(t);default:Cm(a,t),t=Fe=Bu(t,Qn),t=Tm(a,t,Qn)}e.memoizedProps=e.pendingProps,t===null?yc(e):Fe=t}function Er(e,t,a,n){Wa=qn=null,Jo(t),mr=null,mi=0;var u=t.return;try{if(Py(e,u,t,a,Qe)){Et=1,lc(e,ba(a,e.current)),Fe=null;return}}catch(d){if(u!==null)throw Fe=u,d;Et=1,lc(e,ba(a,e.current)),Fe=null;return}t.flags&32768?(V||n===1?e=!0:Sr||(Qe&536870912)!==0?e=!1:(Ol=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ra.current,n!==null&&n.tag===13&&(n.flags|=16384))),l0(t,e)):yc(t)}function yc(e){var t=e;do{if((t.flags&32768)!==0){l0(t,Ol);return}e=t.return;var a=Qy(t.alternate,t,Qn);if(a!==null){Fe=a;return}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);Et===0&&(Et=5)}function l0(e,t){do{var a=Iy(e.alternate,e);if(a!==null){a.flags&=32767,Fe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Fe=e;return}Fe=e=a}while(e!==null);Et=6,Fe=null}function s0(e,t,a,n,u,d,y,E,z){e.cancelPendingCommit=null;do pc();while(qt!==0);if((nt&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(d=t.lanes|t.childLanes,d|=ys,fu(e,a,d,y,E,z),e===ht&&(Fe=ht=null,Qe=0),jr=t,Al=e,In=a,kd=d,_d=u,Wm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,up(Ca,function(){return o0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=Y.T,Y.T=null,u=re.p,re.p=2,y=nt,nt|=4;try{Xy(e,t,a)}finally{nt=y,re.p=u,Y.T=n}}qt=1,r0(),i0(),u0()}}function r0(){if(qt===1){qt=0;var e=Al,t=jr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=Y.T,Y.T=null;var n=re.p;re.p=2;var u=nt;nt|=4;try{Bm(t,e);var d=Qd,y=_o(e.containerInfo),E=d.focusedElem,z=d.selectionRange;if(y!==E&&E&&E.ownerDocument&&Ke(E.ownerDocument.documentElement,E)){if(z!==null&&tr(E)){var W=z.start,se=z.end;if(se===void 0&&(se=W),"selectionStart"in E)E.selectionStart=W,E.selectionEnd=Math.min(se,E.value.length);else{var de=E.ownerDocument||document,I=de&&de.defaultView||window;if(I.getSelection){var ee=I.getSelection(),be=E.textContent.length,Ae=Math.min(z.start,be),dt=z.end===void 0?Ae:Math.min(z.end,be);!ee.extend&&Ae>dt&&(y=dt,dt=Ae,Ae=y);var $=_u(E,Ae),q=_u(E,dt);if($&&q&&(ee.rangeCount!==1||ee.anchorNode!==$.node||ee.anchorOffset!==$.offset||ee.focusNode!==q.node||ee.focusOffset!==q.offset)){var Z=de.createRange();Z.setStart($.node,$.offset),ee.removeAllRanges(),Ae>dt?(ee.addRange(Z),ee.extend(q.node,q.offset)):(Z.setEnd(q.node,q.offset),ee.addRange(Z))}}}}for(de=[],ee=E;ee=ee.parentNode;)ee.nodeType===1&&de.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<de.length;E++){var ue=de[E];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Dc=!!Wd,Qd=Wd=null}finally{nt=u,re.p=n,Y.T=a}}e.current=t,qt=2}}function i0(){if(qt===2){qt=0;var e=Al,t=jr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=Y.T,Y.T=null;var n=re.p;re.p=2;var u=nt;nt|=4;try{zm(e,t.alternate,t)}finally{nt=u,re.p=n,Y.T=a}}qt=3}}function u0(){if(qt===4||qt===3){qt=0,na();var e=Al,t=jr,a=In,n=Wm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?qt=5:(qt=0,jr=Al=null,c0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Rl=null),ra(a),t=t.stateNode,la&&typeof la.onCommitFiberRoot=="function")try{la.onCommitFiberRoot(pt,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=Y.T,u=re.p,re.p=2,Y.T=null;try{for(var d=e.onRecoverableError,y=0;y<n.length;y++){var E=n[y];d(E.value,{componentStack:E.stack})}}finally{Y.T=t,re.p=u}}(In&3)!==0&&pc(),Tn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===zd?Ri++:(Ri=0,zd=e):Ri=0,Ai(0)}}function c0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fi(t)))}function pc(){return r0(),i0(),u0(),o0()}function o0(){if(qt!==5)return!1;var e=Al,t=kd;kd=0;var a=ra(In),n=Y.T,u=re.p;try{re.p=32>a?32:a,Y.T=null,a=_d,_d=null;var d=Al,y=In;if(qt=0,jr=Al=null,In=0,(nt&6)!==0)throw Error(c(331));var E=nt;if(nt|=4,Gm(d.current),Ym(d,d.current,y,a),nt=E,Ai(0,!1),la&&typeof la.onPostCommitFiberRoot=="function")try{la.onPostCommitFiberRoot(pt,d)}catch{}return!0}finally{re.p=u,Y.T=n,c0(e,t)}}function d0(e,t,a){t=ba(a,t),t=hd(e.stateNode,t,2),e=El(e,t,2),e!==null&&(il(e,2),Tn(e))}function it(e,t,a){if(e.tag===3)d0(e,e,a);else for(;t!==null;){if(t.tag===3){d0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Rl===null||!Rl.has(n))){e=ba(a,e),a=fm(2),n=El(t,a,2),n!==null&&(hm(a,n,t,e),il(n,2),Tn(n));break}}t=t.return}}function Hd(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new ep;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)||(Dd=!0,u.add(a),e=sp.bind(null,e,t,a),t.then(e,e))}function sp(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ht===e&&(Qe&a)===a&&(Et===4||Et===3&&(Qe&62914560)===Qe&&300>yt()-fc?(nt&2)===0&&wr(e,0):Rd|=a,Nr===Qe&&(Nr=0)),Tn(e)}function f0(e,t){t===0&&(t=Vr()),e=Fa(e,t),e!==null&&(il(e,t),Tn(e))}function rp(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),f0(e,a)}function ip(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),f0(e,a)}function up(e,t){return Je(e,t)}var vc=null,Tr=null,qd=!1,bc=!1,Bd=!1,_l=0;function Tn(e){e!==Tr&&e.next===null&&(Tr===null?vc=Tr=e:Tr=Tr.next=e),bc=!0,qd||(qd=!0,op())}function Ai(e,t){if(!Bd&&bc){Bd=!0;do for(var a=!1,n=vc;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var d=0;else{var y=n.suspendedLanes,E=n.pingedLanes;d=(1<<31-Zt(42|e)+1)-1,d&=u&~(y&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,x0(n,d))}else d=Qe,d=Wl(n,n===ht?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(d&3)===0||rl(n,d)||(a=!0,x0(n,d));n=n.next}while(a);Bd=!1}}function cp(){h0()}function h0(){bc=qd=!1;var e=0;_l!==0&&bp()&&(e=_l);for(var t=yt(),a=null,n=vc;n!==null;){var u=n.next,d=m0(n,t);d===0?(n.next=null,a===null?vc=u:a.next=u,u===null&&(Tr=a)):(a=n,(e!==0||(d&3)!==0)&&(bc=!0)),n=u}qt!==0&&qt!==5||Ai(e),_l!==0&&(_l=0)}function m0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-Zt(d),E=1<<y,z=u[y];z===-1?((E&a)===0||(E&n)!==0)&&(u[y]=du(E,t)):z<=t&&(e.expiredLanes|=E),d&=~E}if(t=ht,a=Qe,a=Wl(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(rt===2||rt===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&ft(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||rl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&ft(n),ra(a)){case 2:case 8:a=ga;break;case 32:a=Ca;break;case 268435456:a=nl;break;default:a=Ca}return n=g0.bind(null,e),a=Je(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&ft(n),e.callbackPriority=2,e.callbackNode=null,2}function g0(e,t){if(qt!==0&&qt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(pc()&&e.callbackNode!==a)return null;var n=Qe;return n=Wl(e,e===ht?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Im(e,n,t),m0(e,yt()),e.callbackNode!=null&&e.callbackNode===a?g0.bind(null,e):null)}function x0(e,t){if(pc())return null;Im(e,t,!0)}function op(){Np(function(){(nt&6)!==0?Je(Gt,cp):h0()})}function Vd(){if(_l===0){var e=dr;e===0&&(e=sl,sl<<=1,(sl&261888)===0&&(sl=256)),_l=e}return _l}function y0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:as(""+e)}function p0(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 dp(e,t,a,n,u){if(t==="submit"&&a&&a.stateNode===u){var d=y0((u[Lt]||null).action),y=n.submitter;y&&(t=(t=y[Lt]||null)?y0(t.formAction):y.getAttribute("formAction"),t!==null&&(d=t,y=null));var E=new rs("action","action",null,n,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(_l!==0){var z=y?p0(u,y):new FormData(u);id(a,{pending:!0,data:z,method:u.method,action:d},null,z)}}else typeof d=="function"&&(E.preventDefault(),z=y?p0(u,y):new FormData(u),id(a,{pending:!0,data:z,method:u.method,action:d},d,z))},currentTarget:u}]})}}for(var Yd=0;Yd<ui.length;Yd++){var $d=ui[Yd],fp=$d.toLowerCase(),hp=$d[0].toUpperCase()+$d.slice(1);va(fp,"on"+hp)}va(Lu,"onAnimationEnd"),va(Hu,"onAnimationIteration"),va(lr,"onAnimationStart"),va("dblclick","onDoubleClick"),va("focusin","onFocus"),va("focusout","onBlur"),va(zo,"onTransitionRun"),va(Uo,"onTransitionStart"),va(qu,"onTransitionCancel"),va(ri,"onTransitionEnd"),ul("onMouseEnter",["mouseout","mouseover"]),ul("onMouseLeave",["mouseout","mouseover"]),ul("onPointerEnter",["pointerout","pointerover"]),ul("onPointerLeave",["pointerout","pointerover"]),pn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),pn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),pn("onBeforeInput",["compositionend","keypress","textInput","paste"]),pn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),pn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),pn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var 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(" "),mp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ki));function v0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],u=n.event;n=n.listeners;e:{var d=void 0;if(t)for(var y=n.length-1;0<=y;y--){var E=n[y],z=E.instance,W=E.currentTarget;if(E=E.listener,z!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=W;try{d(u)}catch(se){bl(se)}u.currentTarget=null,d=z}else for(y=0;y<n.length;y++){if(E=n[y],z=E.instance,W=E.currentTarget,E=E.listener,z!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=W;try{d(u)}catch(se){bl(se)}u.currentTarget=null,d=z}}}}function Ge(e,t){var a=t[Ql];a===void 0&&(a=t[Ql]=new Set);var n=e+"__bubble";a.has(n)||(b0(t,e,2,!1),a.add(n))}function Fd(e,t,a){var n=0;t&&(n|=4),b0(a,e,n,t)}var Sc="_reactListening"+Math.random().toString(36).slice(2);function Gd(e){if(!e[Sc]){e[Sc]=!0,xu.forEach(function(a){a!=="selectionchange"&&(mp.has(a)||Fd(a,!1,e),Fd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sc]||(t[Sc]=!0,Fd("selectionchange",!1,t))}}function b0(e,t,a,n){switch(Q0(t)){case 2:var u=Yp;break;case 8:u=$p;break;default:u=rf}a=u.bind(null,t,a,e),u=void 0,!Xr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),n?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function Pd(e,t,a,n,u){var d=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var y=n.tag;if(y===3||y===4){var E=n.stateNode.containerInfo;if(E===u)break;if(y===4)for(y=n.return;y!==null;){var z=y.tag;if((z===3||z===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;E!==null;){if(y=Dn(E),y===null)return;if(z=y.tag,z===5||z===6||z===26||z===27){n=d=y;continue e}E=E.parentNode}}n=n.return}Ir(function(){var W=d,se=Qs(a),de=[];e:{var I=ii.get(e);if(I!==void 0){var ee=rs,be=e;switch(e){case"keypress":if(ss(a)===0)break e;case"keydown":case"keyup":ee=bo;break;case"focusin":be="focus",ee=er;break;case"focusout":be="blur",ee=er;break;case"beforeblur":case"afterblur":ee=er;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":ee=Nu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=oo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=jo;break;case Lu:case Hu:case lr:ee=fl;break;case ri:ee=wo;break;case"scroll":case"scrollend":ee=Jr;break;case"wheel":ee=To;break;case"copy":case"cut":case"paste":ee=hl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=ju;break;case"toggle":case"beforetoggle":ee=Co}var Ae=(t&4)!==0,dt=!Ae&&(e==="scroll"||e==="scrollend"),$=Ae?I!==null?I+"Capture":null:I;Ae=[];for(var q=W,Z;q!==null;){var ue=q;if(Z=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||Z===null||$===null||(ue=ns(q,$),ue!=null&&Ae.push(_i(q,ue,Z))),dt)break;q=q.return}0<Ae.length&&(I=new ee(I,be,null,a,se),de.push({event:I,listeners:Ae}))}}if((t&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",I&&a!==Wr&&(be=a.relatedTarget||a.fromElement)&&(Dn(be)||be[On]))break e;if((ee||I)&&(I=se.window===se?se:(I=se.ownerDocument)?I.defaultView||I.parentWindow:window,ee?(be=a.relatedTarget||a.toElement,ee=W,be=be?Dn(be):null,be!==null&&(dt=m(be),Ae=be.tag,be!==dt||Ae!==5&&Ae!==27&&Ae!==6)&&(be=null)):(ee=null,be=W),ee!==be)){if(Ae=Nu,ue="onMouseLeave",$="onMouseEnter",q="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=ju,ue="onPointerLeave",$="onPointerEnter",q="pointer"),dt=ee==null?I:ya(ee),Z=be==null?I:ya(be),I=new Ae(ue,q+"leave",ee,a,se),I.target=dt,I.relatedTarget=Z,ue=null,Dn(se)===W&&(Ae=new Ae($,q+"enter",be,a,se),Ae.target=Z,Ae.relatedTarget=dt,ue=Ae),dt=ue,ee&&be)t:{for(Ae=gp,$=ee,q=be,Z=0,ue=$;ue;ue=Ae(ue))Z++;ue=0;for(var Oe=q;Oe;Oe=Ae(Oe))ue++;for(;0<Z-ue;)$=Ae($),Z--;for(;0<ue-Z;)q=Ae(q),ue--;for(;Z--;){if($===q||q!==null&&$===q.alternate){Ae=$;break t}$=Ae($),q=Ae(q)}Ae=null}else Ae=null;ee!==null&&S0(de,I,ee,Ae,!1),be!==null&&dt!==null&&S0(de,dt,be,Ae,!0)}}e:{if(I=W?ya(W):window,ee=I.nodeName&&I.nodeName.toLowerCase(),ee==="select"||ee==="input"&&I.type==="file")var tt=Au;else if(Ru(I))if(Nn)tt=vt;else{tt=yl;var Se=Ze}else ee=I.nodeName,!ee||ee.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?W&&Ws(W.elementType)&&(tt=Au):tt=ko;if(tt&&(tt=tt(e,W))){ei(de,tt,a,se);break e}Se&&Se(e,I,W),e==="focusout"&&W&&I.type==="number"&&W.memoizedProps.value!=null&&Jl(I,"number",I.value)}switch(Se=W?ya(W):window,e){case"focusin":(Ru(Se)||Se.contentEditable==="true")&&(pl=Se,ar=W,It=null);break;case"focusout":It=ar=pl=null;break;case"mousedown":nr=!0;break;case"contextmenu":case"mouseup":case"dragend":nr=!1,xs(de,a,se);break;case"selectionchange":if(zu)break;case"keydown":case"keyup":xs(de,a,se)}var Ve;if(Kr)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else gl?Ou(e,a)&&(Ie="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ie="onCompositionStart");Ie&&(Tu&&a.locale!=="ko"&&(gl||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&gl&&(Ve=Ht()):(bn=se,Is="value"in bn?bn.value:bn.textContent,gl=!0)),Se=Nc(W,Ie),0<Se.length&&(Ie=new ml(Ie,e,null,a,se),de.push({event:Ie,listeners:Se}),Ve?Ie.data=Ve:(Ve=Du(a),Ve!==null&&(Ie.data=Ve)))),(Ve=Oo?Do(e,a):Ro(e,a))&&(Ie=Nc(W,"onBeforeInput"),0<Ie.length&&(Se=new ml("onBeforeInput","beforeinput",null,a,se),de.push({event:Se,listeners:Ie}),Se.data=Ve)),dp(de,e,W,a,se)}v0(de,t)})}function _i(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Nc(e,t){for(var a=t+"Capture",n=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=ns(e,a),u!=null&&n.unshift(_i(e,u,d)),u=ns(e,t),u!=null&&n.push(_i(e,u,d))),e.tag===3)return n;e=e.return}return[]}function gp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function S0(e,t,a,n,u){for(var d=t._reactName,y=[];a!==null&&a!==n;){var E=a,z=E.alternate,W=E.stateNode;if(E=E.tag,z!==null&&z===n)break;E!==5&&E!==26&&E!==27||W===null||(z=W,u?(W=ns(a,d),W!=null&&y.unshift(_i(a,W,z))):u||(W=ns(a,d),W!=null&&y.push(_i(a,W,z)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var xp=/\r\n?/g,yp=/\u0000|\uFFFD/g;function N0(e){return(typeof e=="string"?e:""+e).replace(xp,`
49
- `).replace(yp,"")}function j0(e,t){return t=N0(t),N0(e)===t}function ot(e,t,a,n,u,d){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||ln(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&ln(e,""+n);break;case"className":Gs(e,"class",n);break;case"tabIndex":Gs(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Gs(e,a,n);break;case"style":vu(e,n,d);break;case"data":if(t!=="object"){Gs(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=as(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&ot(e,t,"name",u.name,u,null),ot(e,t,"formEncType",u.formEncType,u,null),ot(e,t,"formMethod",u.formMethod,u,null),ot(e,t,"formTarget",u.formTarget,u,null)):(ot(e,t,"encType",u.encType,u,null),ot(e,t,"method",u.method,u,null),ot(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=as(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Va);break;case"onScroll":n!=null&&Ge("scroll",e);break;case"onScrollEnd":n!=null&&Ge("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=as(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":Ge("beforetoggle",e),Ge("toggle",e),Wt(e,"popover",n);break;case"xlinkActuate":st(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":st(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":st(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":st(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":st(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":st(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":st(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":st(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":st(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Wt(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=uo.get(a)||a,Wt(e,a,n))}}function Zd(e,t,a,n,u,d){switch(a){case"style":vu(e,n,d);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(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"?ln(e,n):(typeof n=="number"||typeof n=="bigint")&&ln(e,""+n);break;case"onScroll":n!=null&&Ge("scroll",e);break;case"onScrollEnd":n!=null&&Ge("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Va);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),d=e[Lt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,u),typeof n=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,u);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Wt(e,a,n)}}}function ea(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",e),Ge("load",e);var n=!1,u=!1,d;for(d in a)if(a.hasOwnProperty(d)){var y=a[d];if(y!=null)switch(d){case"src":n=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:ot(e,t,d,y,a,null)}}u&&ot(e,t,"srcSet",a.srcSet,a,null),n&&ot(e,t,"src",a.src,a,null);return;case"input":Ge("invalid",e);var E=d=y=u=null,z=null,W=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":y=se;break;case"checked":z=se;break;case"defaultChecked":W=se;break;case"value":d=se;break;case"defaultValue":E=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(c(137,t));break;default:ot(e,t,n,se,a,null)}}ol(e,d,E,z,W,y,u,!1);return;case"select":Ge("invalid",e),n=y=d=null;for(u in a)if(a.hasOwnProperty(u)&&(E=a[u],E!=null))switch(u){case"value":d=E;break;case"defaultValue":y=E;break;case"multiple":n=E;default:ot(e,t,u,E,a,null)}t=d,a=y,e.multiple=!!n,t!=null?An(e,!!n,t,!1):a!=null&&An(e,!!n,a,!0);return;case"textarea":Ge("invalid",e),d=u=n=null;for(y in a)if(a.hasOwnProperty(y)&&(E=a[y],E!=null))switch(y){case"value":n=E;break;case"defaultValue":u=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(c(91));break;default:ot(e,t,y,E,a,null)}Zr(e,n,u,d);return;case"option":for(z in a)if(a.hasOwnProperty(z)&&(n=a[z],n!=null))switch(z){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:ot(e,t,z,n,a,null)}return;case"dialog":Ge("beforetoggle",e),Ge("toggle",e),Ge("cancel",e),Ge("close",e);break;case"iframe":case"object":Ge("load",e);break;case"video":case"audio":for(n=0;n<ki.length;n++)Ge(ki[n],e);break;case"image":Ge("error",e),Ge("load",e);break;case"details":Ge("toggle",e);break;case"embed":case"source":case"link":Ge("error",e),Ge("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(W in a)if(a.hasOwnProperty(W)&&(n=a[W],n!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:ot(e,t,W,n,a,null)}return;default:if(Ws(t)){for(se in a)a.hasOwnProperty(se)&&(n=a[se],n!==void 0&&Zd(e,t,se,n,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(n=a[E],n!=null&&ot(e,t,E,n,a,null))}function pp(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,y=null,E=null,z=null,W=null,se=null;for(ee in a){var de=a[ee];if(a.hasOwnProperty(ee)&&de!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":z=de;default:n.hasOwnProperty(ee)||ot(e,t,ee,null,n,de)}}for(var I in n){var ee=n[I];if(de=a[I],n.hasOwnProperty(I)&&(ee!=null||de!=null))switch(I){case"type":d=ee;break;case"name":u=ee;break;case"checked":W=ee;break;case"defaultChecked":se=ee;break;case"value":y=ee;break;case"defaultValue":E=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(c(137,t));break;default:ee!==de&&ot(e,t,I,ee,n,de)}}Zs(e,y,E,z,W,se,d,u);return;case"select":ee=y=E=I=null;for(d in a)if(z=a[d],a.hasOwnProperty(d)&&z!=null)switch(d){case"value":break;case"multiple":ee=z;default:n.hasOwnProperty(d)||ot(e,t,d,null,n,z)}for(u in n)if(d=n[u],z=a[u],n.hasOwnProperty(u)&&(d!=null||z!=null))switch(u){case"value":I=d;break;case"defaultValue":E=d;break;case"multiple":y=d;default:d!==z&&ot(e,t,u,d,n,z)}t=E,a=y,n=ee,I!=null?An(e,!!a,I,!1):!!n!=!!a&&(t!=null?An(e,!!a,t,!0):An(e,!!a,a?[]:"",!1));return;case"textarea":ee=I=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:ot(e,t,E,null,n,u)}for(y in n)if(u=n[y],d=a[y],n.hasOwnProperty(y)&&(u!=null||d!=null))switch(y){case"value":I=u;break;case"defaultValue":ee=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==d&&ot(e,t,y,u,n,d)}Kl(e,I,ee);return;case"option":for(var be in a)if(I=a[be],a.hasOwnProperty(be)&&I!=null&&!n.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:ot(e,t,be,null,n,I)}for(z in n)if(I=n[z],ee=a[z],n.hasOwnProperty(z)&&I!==ee&&(I!=null||ee!=null))switch(z){case"selected":e.selected=I&&typeof I!="function"&&typeof I!="symbol";break;default:ot(e,t,z,I,n,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in a)I=a[Ae],a.hasOwnProperty(Ae)&&I!=null&&!n.hasOwnProperty(Ae)&&ot(e,t,Ae,null,n,I);for(W in n)if(I=n[W],ee=a[W],n.hasOwnProperty(W)&&I!==ee&&(I!=null||ee!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(c(137,t));break;default:ot(e,t,W,I,n,ee)}return;default:if(Ws(t)){for(var dt in a)I=a[dt],a.hasOwnProperty(dt)&&I!==void 0&&!n.hasOwnProperty(dt)&&Zd(e,t,dt,void 0,n,I);for(se in n)I=n[se],ee=a[se],!n.hasOwnProperty(se)||I===ee||I===void 0&&ee===void 0||Zd(e,t,se,I,n,ee);return}}for(var $ in a)I=a[$],a.hasOwnProperty($)&&I!=null&&!n.hasOwnProperty($)&&ot(e,t,$,null,n,I);for(de in n)I=n[de],ee=a[de],!n.hasOwnProperty(de)||I===ee||I==null&&ee==null||ot(e,t,de,I,n,ee)}function w0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function vp(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var u=a[n],d=u.transferSize,y=u.initiatorType,E=u.duration;if(d&&E&&w0(y)){for(y=0,E=u.responseEnd,n+=1;n<a.length;n++){var z=a[n],W=z.startTime;if(W>E)break;var se=z.transferSize,de=z.initiatorType;se&&w0(de)&&(z=z.responseEnd,y+=se*(z<E?1:(E-W)/(z-W)))}if(--n,t+=8*(d+y)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Wd=null,Qd=null;function jc(e){return e.nodeType===9?e:e.ownerDocument}function E0(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 T0(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 Id(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 Xd=null;function bp(){var e=window.event;return e&&e.type==="popstate"?e===Xd?!1:(Xd=e,!0):(Xd=null,!1)}var M0=typeof setTimeout=="function"?setTimeout:void 0,Sp=typeof clearTimeout=="function"?clearTimeout:void 0,C0=typeof Promise=="function"?Promise:void 0,Np=typeof queueMicrotask=="function"?queueMicrotask:typeof C0<"u"?function(e){return C0.resolve(null).then(e).catch(jp)}:M0;function jp(e){setTimeout(function(){throw e})}function zl(e){return e==="head"}function O0(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),Dr(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")zi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,zi(a);for(var d=a.firstChild;d;){var y=d.nextSibling,E=d.nodeName;d[Il]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=y}}else a==="body"&&zi(e.ownerDocument.body);a=u}while(a);Dr(t)}function D0(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 Jd(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":Jd(a),Fs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function wp(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[Il])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Xa(e.nextSibling),e===null)break}return null}function Ep(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Xa(e.nextSibling),e===null))return null;return e}function R0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Xa(e.nextSibling),e===null))return null;return e}function Kd(e){return e.data==="$?"||e.data==="$~"}function ef(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Tp(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 Xa(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 tf=null;function A0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Xa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function k0(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 _0(e,t,a){switch(t=jc(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 zi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Fs(e)}var Ja=new Map,z0=new Set;function wc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Xn=re.d;re.d={f:Mp,r:Cp,D:Op,C:Dp,L:Rp,m:Ap,X:_p,S:kp,M:zp};function Mp(){var e=Xn.f(),t=gc();return e||t}function Cp(e){var t=De(e);t!==null&&t.tag===5&&t.type==="form"?Jh(t):Xn.r(e)}var Mr=typeof document>"u"?null:document;function U0(e,t,a){var n=Mr;if(n&&typeof t=="string"&&t){var u=Qt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),z0.has(u)||(z0.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),ea(t,"link",e),At(t),n.head.appendChild(t)))}}function Op(e){Xn.D(e),U0("dns-prefetch",e,null)}function Dp(e,t){Xn.C(e,t),U0("preconnect",e,t)}function Rp(e,t,a){Xn.L(e,t,a);var n=Mr;if(n&&e&&t){var u='link[rel="preload"][as="'+Qt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Qt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Qt(a.imageSizes)+'"]')):u+='[href="'+Qt(e)+'"]';var d=u;switch(t){case"style":d=Cr(e);break;case"script":d=Or(e)}Ja.has(d)||(e=T({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ja.set(d,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Ui(d))||t==="script"&&n.querySelector(Li(d))||(t=n.createElement("link"),ea(t,"link",e),At(t),n.head.appendChild(t)))}}function Ap(e,t){Xn.m(e,t);var a=Mr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Qt(n)+'"][href="'+Qt(e)+'"]',d=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Or(e)}if(!Ja.has(d)&&(e=T({rel:"modulepreload",href:e},t),Ja.set(d,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Li(d)))return}n=a.createElement("link"),ea(n,"link",e),At(n),a.head.appendChild(n)}}}function kp(e,t,a){Xn.S(e,t,a);var n=Mr;if(n&&e){var u=an(n).hoistableStyles,d=Cr(e);t=t||"default";var y=u.get(d);if(!y){var E={loading:0,preload:null};if(y=n.querySelector(Ui(d)))E.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ja.get(d))&&af(e,a);var z=y=n.createElement("link");At(z),ea(z,"link",e),z._p=new Promise(function(W,se){z.onload=W,z.onerror=se}),z.addEventListener("load",function(){E.loading|=1}),z.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Ec(y,t,n)}y={type:"stylesheet",instance:y,count:1,state:E},u.set(d,y)}}}function _p(e,t){Xn.X(e,t);var a=Mr;if(a&&e){var n=an(a).hoistableScripts,u=Or(e),d=n.get(u);d||(d=a.querySelector(Li(u)),d||(e=T({src:e,async:!0},t),(t=Ja.get(u))&&nf(e,t),d=a.createElement("script"),At(d),ea(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function zp(e,t){Xn.M(e,t);var a=Mr;if(a&&e){var n=an(a).hoistableScripts,u=Or(e),d=n.get(u);d||(d=a.querySelector(Li(u)),d||(e=T({src:e,async:!0,type:"module"},t),(t=Ja.get(u))&&nf(e,t),d=a.createElement("script"),At(d),ea(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function L0(e,t,a,n){var u=(u=we.current)?wc(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=Cr(a.href),a=an(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=Cr(a.href);var d=an(u).hoistableStyles,y=d.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=u.querySelector(Ui(e)))&&!d._p&&(y.instance=d,y.state.loading=5),Ja.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},Ja.set(e,a),d||Up(u,e,a,y.state))),t&&n===null)throw Error(c(528,""));return y}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=Or(a),a=an(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 Cr(e){return'href="'+Qt(e)+'"'}function Ui(e){return'link[rel="stylesheet"]['+e+"]"}function H0(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Up(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}),ea(t,"link",a),At(t),e.head.appendChild(t))}function Or(e){return'[src="'+Qt(e)+'"]'}function Li(e){return"script[async]"+e}function q0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Qt(a.href)+'"]');if(n)return t.instance=n,At(n),n;var u=T({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),At(n),ea(n,"style",u),Ec(n,a.precedence,e),t.instance=n;case"stylesheet":u=Cr(a.href);var d=e.querySelector(Ui(u));if(d)return t.state.loading|=4,t.instance=d,At(d),d;n=H0(a),(u=Ja.get(u))&&af(n,u),d=(e.ownerDocument||e).createElement("link"),At(d);var y=d;return y._p=new Promise(function(E,z){y.onload=E,y.onerror=z}),ea(d,"link",n),t.state.loading|=4,Ec(d,a.precedence,e),t.instance=d;case"script":return d=Or(a.src),(u=e.querySelector(Li(d)))?(t.instance=u,At(u),u):(n=a,(u=Ja.get(d))&&(n=T({},a),nf(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),At(u),ea(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,Ec(n,a.precedence,e));return t.instance}function Ec(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,d=u,y=0;y<n.length;y++){var E=n[y];if(E.dataset.precedence===t)d=E;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function af(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function nf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Tc=null;function B0(e,t,a){if(Tc===null){var n=new Map,u=Tc=new Map;u.set(a,n)}else u=Tc,n=u.get(a),n||(n=new Map,u.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var d=a[u];if(!(d[Il]||d[Tt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(t)||"";y=e+y;var E=n.get(y);E?E.push(d):n.set(y,[d])}}return n}function V0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Lp(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 Y0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Hp(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=Cr(n.href),d=t.querySelector(Ui(u));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Mc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,At(d);return}d=t.ownerDocument||t,n=H0(n),(u=Ja.get(u))&&af(n,u),d=d.createElement("link"),At(d);var y=d;y._p=new Promise(function(E,z){y.onload=E,y.onerror=z}),ea(d,"link",n),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Mc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var lf=0;function qp(e,t){return e.stylesheets&&e.count===0&&Oc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Oc(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&lf===0&&(lf=62500*vp());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Oc(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>lf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function Mc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Oc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Cc=null;function Oc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cc=new Map,t.forEach(Bp,e),Cc=null,Mc.call(e))}function Bp(e,t){if(!(t.state.loading&4)){var a=Cc.get(e);if(a)var n=a.get(null);else{a=new Map,Cc.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var y=u[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),n=y)}n&&a.set(null,n)}u=t.instance,y=u.getAttribute("data-precedence"),d=a.get(y)||n,d===n&&a.set(null,u),a.set(y,u),this.count++,n=Mc.bind(this),u.addEventListener("load",n),u.addEventListener("error",n),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Hi={$$typeof:X,Provider:null,Consumer:null,_currentValue:ye,_currentValue2:ye,_threadCount:0};function Vp(e,t,a,n,u,d,y,E,z){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Vs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vs(0),this.hiddenUpdates=Vs(null),this.identifierPrefix=n,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function $0(e,t,a,n,u,d,y,E,z,W,se,de){return e=new Vp(e,t,a,y,z,W,se,de,E),t=1,d===!0&&(t|=24),d=Xt(3,null,null,t),e.current=d,d.stateNode=e,t=Lo(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:n,isDehydrated:a,cache:t},Vo(d),e}function F0(e){return e?(e=Da,e):Da}function G0(e,t,a,n,u,d){u=F0(u),n.context===null?n.context=u:n.pendingContext=u,n=wl(t),n.payload={element:a},d=d===void 0?null:d,d!==null&&(n.callback=d),a=El(e,n,t),a!==null&&(Ta(a,e,t),xi(a,e,t))}function P0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function sf(e,t){P0(e,t),(e=e.alternate)&&P0(e,t)}function Z0(e){if(e.tag===13||e.tag===31){var t=Fa(e,67108864);t!==null&&Ta(t,e,67108864),sf(e,67108864)}}function W0(e){if(e.tag===13||e.tag===31){var t=za();t=Ys(t);var a=Fa(e,t);a!==null&&Ta(a,e,t),sf(e,t)}}var Dc=!0;function Yp(e,t,a,n){var u=Y.T;Y.T=null;var d=re.p;try{re.p=2,rf(e,t,a,n)}finally{re.p=d,Y.T=u}}function $p(e,t,a,n){var u=Y.T;Y.T=null;var d=re.p;try{re.p=8,rf(e,t,a,n)}finally{re.p=d,Y.T=u}}function rf(e,t,a,n){if(Dc){var u=uf(n);if(u===null)Pd(e,t,n,Rc,a),I0(e,n);else if(Gp(u,e,t,a,n))n.stopPropagation();else if(I0(e,n),t&4&&-1<Fp.indexOf(e)){for(;u!==null;){var d=De(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=yn(d.pendingLanes);if(y!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;y;){var z=1<<31-Zt(y);E.entanglements[1]|=z,y&=~z}Tn(d),(nt&6)===0&&(hc=yt()+500,Ai(0))}}break;case 31:case 13:E=Fa(d,2),E!==null&&Ta(E,d,2),gc(),sf(d,2)}if(d=uf(n),d===null&&Pd(e,t,n,Rc,a),d===u)break;u=d}u!==null&&n.stopPropagation()}else Pd(e,t,n,null,a)}}function uf(e){return e=Qs(e),cf(e)}var Rc=null;function cf(e){if(Rc=null,e=Dn(e),e!==null){var t=m(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=v(t),e!==null)return e;e=null}else if(a===31){if(e=N(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Rc=e,null}function Q0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ba()){case Gt:return 2;case ga:return 8;case Ca:case Cn:return 32;case nl:return 268435456;default:return 32}default:return 32}}var of=!1,Ul=null,Ll=null,Hl=null,qi=new Map,Bi=new Map,ql=[],Fp="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 I0(e,t){switch(e){case"focusin":case"focusout":Ul=null;break;case"dragenter":case"dragleave":Ll=null;break;case"mouseover":case"mouseout":Hl=null;break;case"pointerover":case"pointerout":qi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bi.delete(t.pointerId)}}function Vi(e,t,a,n,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:d,targetContainers:[u]},t!==null&&(t=De(t),t!==null&&Z0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Gp(e,t,a,n,u){switch(t){case"focusin":return Ul=Vi(Ul,e,t,a,n,u),!0;case"dragenter":return Ll=Vi(Ll,e,t,a,n,u),!0;case"mouseover":return Hl=Vi(Hl,e,t,a,n,u),!0;case"pointerover":var d=u.pointerId;return qi.set(d,Vi(qi.get(d)||null,e,t,a,n,u)),!0;case"gotpointercapture":return d=u.pointerId,Bi.set(d,Vi(Bi.get(d)||null,e,t,a,n,u)),!0}return!1}function X0(e){var t=Dn(e.target);if(t!==null){var a=m(t);if(a!==null){if(t=a.tag,t===13){if(t=v(a),t!==null){e.blockedOn=t,$r(e.priority,function(){W0(a)});return}}else if(t===31){if(t=N(a),t!==null){e.blockedOn=t,$r(e.priority,function(){W0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ac(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=uf(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Wr=n,a.target.dispatchEvent(n),Wr=null}else return t=De(a),t!==null&&Z0(t),e.blockedOn=a,!1;t.shift()}return!0}function J0(e,t,a){Ac(e)&&a.delete(t)}function Pp(){of=!1,Ul!==null&&Ac(Ul)&&(Ul=null),Ll!==null&&Ac(Ll)&&(Ll=null),Hl!==null&&Ac(Hl)&&(Hl=null),qi.forEach(J0),Bi.forEach(J0)}function kc(e,t){e.blockedOn===t&&(e.blockedOn=null,of||(of=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Pp)))}var _c=null;function K0(e){_c!==e&&(_c=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){_c===e&&(_c=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],u=e[t+2];if(typeof n!="function"){if(cf(n||a)===null)continue;break}var d=De(a);d!==null&&(e.splice(t,3),t-=3,id(d,{pending:!0,data:u,method:a.method,action:n},n,u))}}))}function Dr(e){function t(z){return kc(z,e)}Ul!==null&&kc(Ul,e),Ll!==null&&kc(Ll,e),Hl!==null&&kc(Hl,e),qi.forEach(t),Bi.forEach(t);for(var a=0;a<ql.length;a++){var n=ql[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<ql.length&&(a=ql[0],a.blockedOn===null);)X0(a),a.blockedOn===null&&ql.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var u=a[n],d=a[n+1],y=u[Lt]||null;if(typeof d=="function")y||K0(a);else if(y){var E=null;if(d&&d.hasAttribute("formAction")){if(u=d,y=d[Lt]||null)E=y.formAction;else if(cf(u)!==null)continue}else E=y.action;typeof E=="function"?a[n+1]=E:(a.splice(n,3),n-=3),K0(a)}}}function eg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function df(e){this._internalRoot=e}zc.prototype.render=df.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=za();G0(a,n,e,t,null,null)},zc.prototype.unmount=df.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;G0(e.current,2,null,e,null,null),gc(),t[On]=null}};function zc(e){this._internalRoot=e}zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=$s();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ql.length&&t!==0&&t<ql[a].priority;a++);ql.splice(a,0,e),a===0&&X0(e)}};var tg=r.version;if(tg!=="19.2.4")throw Error(c(527,tg,"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=x(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Zp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uc.isDisabled&&Uc.supportsFiber)try{pt=Uc.inject(Zp),la=Uc}catch{}}return $i.createRoot=function(e,t){if(!f(e))throw Error(c(299));var a=!1,n="",u=um,d=cm,y=om;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=$0(e,1,!1,null,null,a,n,null,u,d,y,eg),e[On]=t.current,Gd(e),new df(t)},$i.hydrateRoot=function(e,t,a){if(!f(e))throw Error(c(299));var n=!1,u="",d=um,y=cm,E=om,z=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(z=a.formState)),t=$0(e,1,!0,t,a??null,n,u,z,d,y,E,eg),t.context=F0(null),a=t.current,n=za(),n=Ys(n),u=wl(n),u.callback=null,El(a,u,n),a=n,t.current.lanes=a,il(t,a),Tn(t),e[On]=t.current,Gd(e),new zc(t)},$i.version="19.2.4",$i}var hg;function sv(){if(hg)return gf.exports;hg=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(),gf.exports=lv(),gf.exports}var rv=sv();const iv=Ff(rv);/**
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 mg="popstate";function uv(l={}){function r(f,m){let{pathname:v="/",search:N="",hash:S=""}=Hs(f.location.hash.substring(1));return!v.startsWith("/")&&!v.startsWith(".")&&(v="/"+v),Df("",{pathname:v,search:N,hash:S},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function o(f,m){let v=f.document.querySelector("base"),N="";if(v&&v.getAttribute("href")){let S=f.location.href,x=S.indexOf("#");N=x===-1?S:S.slice(0,x)}return N+"#"+(typeof m=="string"?m:lu(m))}function c(f,m){Ka(f.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return ov(r,o,c,l)}function Nt(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function Ka(l,r){if(!l){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function cv(){return Math.random().toString(36).substring(2,10)}function gg(l,r){return{usr:l.state,key:l.key,idx:r}}function Df(l,r,o=null,c){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?Hs(r):r,state:o,key:r&&r.key||c||cv()}}function lu({pathname:l="/",search:r="",hash:o=""}){return r&&r!=="?"&&(l+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(l+=o.charAt(0)==="#"?o:"#"+o),l}function Hs(l){let r={};if(l){let o=l.indexOf("#");o>=0&&(r.hash=l.substring(o),l=l.substring(0,o));let c=l.indexOf("?");c>=0&&(r.search=l.substring(c),l=l.substring(0,c)),l&&(r.pathname=l)}return r}function ov(l,r,o,c={}){let{window:f=document.defaultView,v5Compat:m=!1}=c,v=f.history,N="POP",S=null,x=b();x==null&&(x=0,v.replaceState({...v.state,idx:x},""));function b(){return(v.state||{idx:null}).idx}function T(){N="POP";let A=b(),Q=A==null?null:A-x;x=A,S&&S({action:N,location:M.location,delta:Q})}function w(A,Q){N="PUSH";let B=Df(M.location,A,Q);o&&o(B,A),x=b()+1;let X=gg(B,x),K=M.createHref(B);try{v.pushState(X,"",K)}catch(fe){if(fe instanceof DOMException&&fe.name==="DataCloneError")throw fe;f.location.assign(K)}m&&S&&S({action:N,location:M.location,delta:1})}function R(A,Q){N="REPLACE";let B=Df(M.location,A,Q);o&&o(B,A),x=b();let X=gg(B,x),K=M.createHref(B);v.replaceState(X,"",K),m&&S&&S({action:N,location:M.location,delta:0})}function C(A){return dv(A)}let M={get action(){return N},get location(){return l(f,v)},listen(A){if(S)throw new Error("A history only accepts one active listener");return f.addEventListener(mg,T),S=A,()=>{f.removeEventListener(mg,T),S=null}},createHref(A){return r(f,A)},createURL:C,encodeLocation(A){let Q=C(A);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:w,replace:R,go(A){return v.go(A)}};return M}function dv(l,r=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),Nt(o,"No window.location.(origin|href) available to create URL");let c=typeof l=="string"?l:lu(l);return c=c.replace(/ $/,"%20"),!r&&c.startsWith("//")&&(c=o+c),new URL(c,o)}function mx(l,r,o="/"){return fv(l,r,o,!1)}function fv(l,r,o,c){let f=typeof r=="string"?Hs(r):r,m=tl(f.pathname||"/",o);if(m==null)return null;let v=gx(l);hv(v);let N=null;for(let S=0;N==null&&S<v.length;++S){let x=wv(m);N=Nv(v[S],x,c)}return N}function gx(l,r=[],o=[],c="",f=!1){let m=(v,N,S=f,x)=>{let b={relativePath:x===void 0?v.path||"":x,caseSensitive:v.caseSensitive===!0,childrenIndex:N,route:v};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(c)&&S)return;Nt(b.relativePath.startsWith(c),`Absolute route path "${b.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(c.length)}let T=el([c,b.relativePath]),w=o.concat(b);v.children&&v.children.length>0&&(Nt(v.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${T}".`),gx(v.children,r,w,T,S)),!(v.path==null&&!v.index)&&r.push({path:T,score:bv(T,v.index),routesMeta:w})};return l.forEach((v,N)=>{var S;if(v.path===""||!((S=v.path)!=null&&S.includes("?")))m(v,N);else for(let x of xx(v.path))m(v,N,!0,x)}),r}function xx(l){let r=l.split("/");if(r.length===0)return[];let[o,...c]=r,f=o.endsWith("?"),m=o.replace(/\?$/,"");if(c.length===0)return f?[m,""]:[m];let v=xx(c.join("/")),N=[];return N.push(...v.map(S=>S===""?m:[m,S].join("/"))),f&&N.push(...v),N.map(S=>l.startsWith("/")&&S===""?"/":S)}function hv(l){l.sort((r,o)=>r.score!==o.score?o.score-r.score:Sv(r.routesMeta.map(c=>c.childrenIndex),o.routesMeta.map(c=>c.childrenIndex)))}var mv=/^:[\w-]+$/,gv=3,xv=2,yv=1,pv=10,vv=-2,xg=l=>l==="*";function bv(l,r){let o=l.split("/"),c=o.length;return o.some(xg)&&(c+=vv),r&&(c+=xv),o.filter(f=>!xg(f)).reduce((f,m)=>f+(mv.test(m)?gv:m===""?yv:pv),c)}function Sv(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 Nv(l,r,o=!1){let{routesMeta:c}=l,f={},m="/",v=[];for(let N=0;N<c.length;++N){let S=c[N],x=N===c.length-1,b=m==="/"?r:r.slice(m.length)||"/",T=Pc({path:S.relativePath,caseSensitive:S.caseSensitive,end:x},b),w=S.route;if(!T&&x&&o&&!c[c.length-1].route.index&&(T=Pc({path:S.relativePath,caseSensitive:S.caseSensitive,end:!1},b)),!T)return null;Object.assign(f,T.params),v.push({params:f,pathname:el([m,T.pathname]),pathnameBase:Cv(el([m,T.pathnameBase])),route:w}),T.pathnameBase!=="/"&&(m=el([m,T.pathnameBase]))}return v}function Pc(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[o,c]=jv(l.path,l.caseSensitive,l.end),f=r.match(o);if(!f)return null;let m=f[0],v=m.replace(/(.)\/+$/,"$1"),N=f.slice(1);return{params:c.reduce((x,{paramName:b,isOptional:T},w)=>{if(b==="*"){let C=N[w]||"";v=m.slice(0,m.length-C.length).replace(/(.)\/+$/,"$1")}const R=N[w];return T&&!R?x[b]=void 0:x[b]=(R||"").replace(/%2F/g,"/"),x},{}),pathname:m,pathnameBase:v,pattern:l}}function jv(l,r=!1,o=!0){Ka(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,(v,N,S)=>(c.push({paramName:N,isOptional:S!=null}),S?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(c.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),c]}function wv(l){try{return l.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Ka(!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 tl(l,r){if(r==="/")return l;if(!l.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,c=l.charAt(o);return c&&c!=="/"?null:l.slice(o)||"/"}var Ev=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Tv(l,r="/"){let{pathname:o,search:c="",hash:f=""}=typeof l=="string"?Hs(l):l,m;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?m=yg(o.substring(1),"/"):m=yg(o,r)):m=r,{pathname:m,search:Ov(c),hash:Dv(f)}}function yg(l,r){let o=r.replace(/\/+$/,"").split("/");return l.split("/").forEach(f=>{f===".."?o.length>1&&o.pop():f!=="."&&o.push(f)}),o.length>1?o.join("/"):"/"}function vf(l,r,o,c){return`Cannot include a '${l}' character in a manually specified \`to.${r}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Mv(l){return l.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function Pf(l){let r=Mv(l);return r.map((o,c)=>c===r.length-1?o.pathname:o.pathnameBase)}function Zf(l,r,o,c=!1){let f;typeof l=="string"?f=Hs(l):(f={...l},Nt(!f.pathname||!f.pathname.includes("?"),vf("?","pathname","search",f)),Nt(!f.pathname||!f.pathname.includes("#"),vf("#","pathname","hash",f)),Nt(!f.search||!f.search.includes("#"),vf("#","search","hash",f)));let m=l===""||f.pathname==="",v=m?"/":f.pathname,N;if(v==null)N=o;else{let T=r.length-1;if(!c&&v.startsWith("..")){let w=v.split("/");for(;w[0]==="..";)w.shift(),T-=1;f.pathname=w.join("/")}N=T>=0?r[T]:"/"}let S=Tv(f,N),x=v&&v!=="/"&&v.endsWith("/"),b=(m||v===".")&&o.endsWith("/");return!S.pathname.endsWith("/")&&(x||b)&&(S.pathname+="/"),S}var el=l=>l.join("/").replace(/\/\/+/g,"/"),Cv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Ov=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Dv=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,Rv=class{constructor(l,r,o,c=!1){this.status=l,this.statusText=r||"",this.internal=c,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function Av(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function kv(l){return l.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var yx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function px(l,r){let o=l;if(typeof o!="string"||!Ev.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let c=o,f=!1;if(yx)try{let m=new URL(window.location.href),v=o.startsWith("//")?new URL(m.protocol+o):new URL(o),N=tl(v.pathname,r);v.origin===m.origin&&N!=null?o=N+v.search+v.hash:f=!0}catch{Ka(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:f,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var vx=["POST","PUT","PATCH","DELETE"];new Set(vx);var _v=["GET",...vx];new Set(_v);var Lr=U.createContext(null);Lr.displayName="DataRouter";var eo=U.createContext(null);eo.displayName="DataRouterState";var zv=U.createContext(!1),bx=U.createContext({isTransitioning:!1});bx.displayName="ViewTransition";var Uv=U.createContext(new Map);Uv.displayName="Fetchers";var Lv=U.createContext(null);Lv.displayName="Await";var Ha=U.createContext(null);Ha.displayName="Navigation";var iu=U.createContext(null);iu.displayName="Location";var Mn=U.createContext({outlet:null,matches:[],isDataRoute:!1});Mn.displayName="Route";var Wf=U.createContext(null);Wf.displayName="RouteError";var Sx="REACT_ROUTER_ERROR",Hv="REDIRECT",qv="ROUTE_ERROR_RESPONSE";function Bv(l){if(l.startsWith(`${Sx}:${Hv}:{`))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 Vv(l){if(l.startsWith(`${Sx}:${qv}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Rv(r.status,r.statusText,r.data)}catch{}}function Yv(l,{relative:r}={}){Nt(Hr(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:c}=U.useContext(Ha),{hash:f,pathname:m,search:v}=uu(l,{relative:r}),N=m;return o!=="/"&&(N=m==="/"?o:el([o,m])),c.createHref({pathname:N,search:v,hash:f})}function Hr(){return U.useContext(iu)!=null}function Pl(){return Nt(Hr(),"useLocation() may be used only in the context of a <Router> component."),U.useContext(iu).location}var Nx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function jx(l){U.useContext(Ha).static||U.useLayoutEffect(l)}function to(){let{isDataRoute:l}=U.useContext(Mn);return l?tb():$v()}function $v(){Nt(Hr(),"useNavigate() may be used only in the context of a <Router> component.");let l=U.useContext(Lr),{basename:r,navigator:o}=U.useContext(Ha),{matches:c}=U.useContext(Mn),{pathname:f}=Pl(),m=JSON.stringify(Pf(c)),v=U.useRef(!1);return jx(()=>{v.current=!0}),U.useCallback((S,x={})=>{if(Ka(v.current,Nx),!v.current)return;if(typeof S=="number"){o.go(S);return}let b=Zf(S,JSON.parse(m),f,x.relative==="path");l==null&&r!=="/"&&(b.pathname=b.pathname==="/"?r:el([r,b.pathname])),(x.replace?o.replace:o.push)(b,x.state,x)},[r,o,m,f,l])}U.createContext(null);function uu(l,{relative:r}={}){let{matches:o}=U.useContext(Mn),{pathname:c}=Pl(),f=JSON.stringify(Pf(o));return U.useMemo(()=>Zf(l,JSON.parse(f),c,r==="path"),[l,f,c,r])}function Fv(l,r){return wx(l,r)}function wx(l,r,o,c,f){var B;Nt(Hr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:m}=U.useContext(Ha),{matches:v}=U.useContext(Mn),N=v[v.length-1],S=N?N.params:{},x=N?N.pathname:"/",b=N?N.pathnameBase:"/",T=N&&N.route;{let X=T&&T.path||"";Tx(x,!T||X.endsWith("*")||X.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${X}">) 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="${X}"> to <Route path="${X==="/"?"*":`${X}/*`}">.`)}let w=Pl(),R;if(r){let X=typeof r=="string"?Hs(r):r;Nt(b==="/"||((B=X.pathname)==null?void 0:B.startsWith(b)),`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 "${b}" but pathname "${X.pathname}" was given in the \`location\` prop.`),R=X}else R=w;let C=R.pathname||"/",M=C;if(b!=="/"){let X=b.replace(/^\//,"").split("/");M="/"+C.replace(/^\//,"").split("/").slice(X.length).join("/")}let A=mx(l,{pathname:M});Ka(T||A!=null,`No routes matched location "${R.pathname}${R.search}${R.hash}" `),Ka(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${R.pathname}${R.search}${R.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let Q=Qv(A&&A.map(X=>Object.assign({},X,{params:Object.assign({},S,X.params),pathname:el([b,m.encodeLocation?m.encodeLocation(X.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:X.pathname]),pathnameBase:X.pathnameBase==="/"?b:el([b,m.encodeLocation?m.encodeLocation(X.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:X.pathnameBase])})),v,o,c,f);return r&&Q?U.createElement(iu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...R},navigationType:"POP"}},Q):Q}function Gv(){let l=eb(),r=Av(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),o=l instanceof Error?l.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},m={padding:"2px 4px",backgroundColor:c},v=null;return console.error("Error handled by React Router default ErrorBoundary:",l),v=U.createElement(U.Fragment,null,U.createElement("p",null,"💿 Hey developer 👋"),U.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",U.createElement("code",{style:m},"ErrorBoundary")," or"," ",U.createElement("code",{style:m},"errorElement")," prop on your route.")),U.createElement(U.Fragment,null,U.createElement("h2",null,"Unexpected Application Error!"),U.createElement("h3",{style:{fontStyle:"italic"}},r),o?U.createElement("pre",{style:f},o):null,v)}var Pv=U.createElement(Gv,null),Ex=class extends U.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,r){return r.location!==l.location||r.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:r.error,location:r.location,revalidation:l.revalidation||r.revalidation}}componentDidCatch(l,r){this.props.onError?this.props.onError(l,r):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const o=Vv(l.digest);o&&(l=o)}let r=l!==void 0?U.createElement(Mn.Provider,{value:this.props.routeContext},U.createElement(Wf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?U.createElement(Zv,{error:l},r):r}};Ex.contextType=zv;var bf=new WeakMap;function Zv({children:l,error:r}){let{basename:o}=U.useContext(Ha);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let c=Bv(r.digest);if(c){let f=bf.get(r);if(f)throw f;let m=px(c.location,o);if(yx&&!bf.get(r))if(m.isExternal||c.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:c.replace}));throw bf.set(r,v),v}return U.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return l}function Wv({routeContext:l,match:r,children:o}){let c=U.useContext(Lr);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),U.createElement(Mn.Provider,{value:l},o)}function Qv(l,r=[],o=null,c=null,f=null){if(l==null){if(!o)return null;if(o.errors)l=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)l=o.matches;else return null}let m=l,v=o==null?void 0:o.errors;if(v!=null){let b=m.findIndex(T=>T.route.id&&(v==null?void 0:v[T.route.id])!==void 0);Nt(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(v).join(",")}`),m=m.slice(0,Math.min(m.length,b+1))}let N=!1,S=-1;if(o)for(let b=0;b<m.length;b++){let T=m[b];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(S=b),T.route.id){let{loaderData:w,errors:R}=o,C=T.route.loader&&!w.hasOwnProperty(T.route.id)&&(!R||R[T.route.id]===void 0);if(T.route.lazy||C){N=!0,S>=0?m=m.slice(0,S+1):m=[m[0]];break}}}let x=o&&c?(b,T)=>{var w,R;c(b,{location:o.location,params:((R=(w=o.matches)==null?void 0:w[0])==null?void 0:R.params)??{},unstable_pattern:kv(o.matches),errorInfo:T})}:void 0;return m.reduceRight((b,T,w)=>{let R,C=!1,M=null,A=null;o&&(R=v&&T.route.id?v[T.route.id]:void 0,M=T.route.errorElement||Pv,N&&(S<0&&w===0?(Tx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,A=null):S===w&&(C=!0,A=T.route.hydrateFallbackElement||null)));let Q=r.concat(m.slice(0,w+1)),B=()=>{let X;return R?X=M:C?X=A:T.route.Component?X=U.createElement(T.route.Component,null):T.route.element?X=T.route.element:X=b,U.createElement(Wv,{match:T,routeContext:{outlet:b,matches:Q,isDataRoute:o!=null},children:X})};return o&&(T.route.ErrorBoundary||T.route.errorElement||w===0)?U.createElement(Ex,{location:o.location,revalidation:o.revalidation,component:M,error:R,children:B(),routeContext:{outlet:null,matches:Q,isDataRoute:!0},onError:x}):B()},null)}function Qf(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Iv(l){let r=U.useContext(Lr);return Nt(r,Qf(l)),r}function Xv(l){let r=U.useContext(eo);return Nt(r,Qf(l)),r}function Jv(l){let r=U.useContext(Mn);return Nt(r,Qf(l)),r}function If(l){let r=Jv(l),o=r.matches[r.matches.length-1];return Nt(o.route.id,`${l} can only be used on routes that contain a unique "id"`),o.route.id}function Kv(){return If("useRouteId")}function eb(){var c;let l=U.useContext(Wf),r=Xv("useRouteError"),o=If("useRouteError");return l!==void 0?l:(c=r.errors)==null?void 0:c[o]}function tb(){let{router:l}=Iv("useNavigate"),r=If("useNavigate"),o=U.useRef(!1);return jx(()=>{o.current=!0}),U.useCallback(async(f,m={})=>{Ka(o.current,Nx),o.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:r,...m}))},[l,r])}var pg={};function Tx(l,r,o){!r&&!pg[l]&&(pg[l]=!0,Ka(!1,o))}U.memo(ab);function ab({routes:l,future:r,state:o,onError:c}){return wx(l,void 0,o,c,r)}function nb({to:l,replace:r,state:o,relative:c}){Nt(Hr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=U.useContext(Ha);Ka(!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:m}=U.useContext(Mn),{pathname:v}=Pl(),N=to(),S=Zf(l,Pf(m),v,c==="path"),x=JSON.stringify(S);return U.useEffect(()=>{N(JSON.parse(x),{replace:r,state:o,relative:c})},[N,x,c,r,o]),null}function Kn(l){Nt(!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 lb({basename:l="/",children:r=null,location:o,navigationType:c="POP",navigator:f,static:m=!1,unstable_useTransitions:v}){Nt(!Hr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let N=l.replace(/^\/*/,"/"),S=U.useMemo(()=>({basename:N,navigator:f,static:m,unstable_useTransitions:v,future:{}}),[N,f,m,v]);typeof o=="string"&&(o=Hs(o));let{pathname:x="/",search:b="",hash:T="",state:w=null,key:R="default"}=o,C=U.useMemo(()=>{let M=tl(x,N);return M==null?null:{location:{pathname:M,search:b,hash:T,state:w,key:R},navigationType:c}},[N,x,b,T,w,R,c]);return Ka(C!=null,`<Router basename="${N}"> is not able to match the URL "${x}${b}${T}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:U.createElement(Ha.Provider,{value:S},U.createElement(iu.Provider,{children:r,value:C}))}function sb({children:l,location:r}){return Fv(Rf(l),r)}function Rf(l,r=[]){let o=[];return U.Children.forEach(l,(c,f)=>{if(!U.isValidElement(c))return;let m=[...r,f];if(c.type===U.Fragment){o.push.apply(o,Rf(c.props.children,m));return}Nt(c.type===Kn,`[${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>`),Nt(!c.props.index||!c.props.children,"An index route cannot have child routes.");let v={id:c.props.id||m.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(v.children=Rf(c.props.children,m)),o.push(v)}),o}var $c="get",Fc="application/x-www-form-urlencoded";function ao(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function rb(l){return ao(l)&&l.tagName.toLowerCase()==="button"}function ib(l){return ao(l)&&l.tagName.toLowerCase()==="form"}function ub(l){return ao(l)&&l.tagName.toLowerCase()==="input"}function cb(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function ob(l,r){return l.button===0&&(!r||r==="_self")&&!cb(l)}var Lc=null;function db(){if(Lc===null)try{new FormData(document.createElement("form"),0),Lc=!1}catch{Lc=!0}return Lc}var fb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Sf(l){return l!=null&&!fb.has(l)?(Ka(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Fc}"`),null):l}function hb(l,r){let o,c,f,m,v;if(ib(l)){let N=l.getAttribute("action");c=N?tl(N,r):null,o=l.getAttribute("method")||$c,f=Sf(l.getAttribute("enctype"))||Fc,m=new FormData(l)}else if(rb(l)||ub(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 S=l.getAttribute("formaction")||N.getAttribute("action");if(c=S?tl(S,r):null,o=l.getAttribute("formmethod")||N.getAttribute("method")||$c,f=Sf(l.getAttribute("formenctype"))||Sf(N.getAttribute("enctype"))||Fc,m=new FormData(N,l),!db()){let{name:x,type:b,value:T}=l;if(b==="image"){let w=x?`${x}.`:"";m.append(`${w}x`,"0"),m.append(`${w}y`,"0")}else x&&m.append(x,T)}}else{if(ao(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=$c,c=null,f=Fc,v=l}return m&&f==="text/plain"&&(v=m,m=void 0),{action:c,method:o.toLowerCase(),encType:f,formData:m,body:v}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Xf(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function mb(l,r,o,c){let f=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return o?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${c}`:f.pathname=`${f.pathname}.${c}`:f.pathname==="/"?f.pathname=`_root.${c}`:r&&tl(f.pathname,r)==="/"?f.pathname=`${r.replace(/\/$/,"")}/_root.${c}`:f.pathname=`${f.pathname.replace(/\/$/,"")}.${c}`,f}async function gb(l,r){if(l.id in r)return r[l.id];try{let o=await import(l.module);return r[l.id]=o,o}catch(o){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function xb(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 yb(l,r,o){let c=await Promise.all(l.map(async f=>{let m=r.routes[f.route.id];if(m){let v=await gb(m,o);return v.links?v.links():[]}return[]}));return Sb(c.flat(1).filter(xb).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function vg(l,r,o,c,f,m){let v=(S,x)=>o[x]?S.route.id!==o[x].route.id:!0,N=(S,x)=>{var b;return o[x].pathname!==S.pathname||((b=o[x].route.path)==null?void 0:b.endsWith("*"))&&o[x].params["*"]!==S.params["*"]};return m==="assets"?r.filter((S,x)=>v(S,x)||N(S,x)):m==="data"?r.filter((S,x)=>{var T;let b=c.routes[S.route.id];if(!b||!b.hasLoader)return!1;if(v(S,x)||N(S,x))return!0;if(S.route.shouldRevalidate){let w=S.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((T=o[0])==null?void 0:T.params)||{},nextUrl:new URL(l,window.origin),nextParams:S.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function pb(l,r,{includeHydrateFallback:o}={}){return vb(l.map(c=>{let f=r.routes[c.route.id];if(!f)return[];let m=[f.module];return f.clientActionModule&&(m=m.concat(f.clientActionModule)),f.clientLoaderModule&&(m=m.concat(f.clientLoaderModule)),o&&f.hydrateFallbackModule&&(m=m.concat(f.hydrateFallbackModule)),f.imports&&(m=m.concat(f.imports)),m}).flat(1))}function vb(l){return[...new Set(l)]}function bb(l){let r={},o=Object.keys(l).sort();for(let c of o)r[c]=l[c];return r}function Sb(l,r){let o=new Set;return new Set(r),l.reduce((c,f)=>{let m=JSON.stringify(bb(f));return o.has(m)||(o.add(m),c.push({key:m,link:f})),c},[])}function Mx(){let l=U.useContext(Lr);return Xf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function Nb(){let l=U.useContext(eo);return Xf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Jf=U.createContext(void 0);Jf.displayName="FrameworkContext";function Cx(){let l=U.useContext(Jf);return Xf(l,"You must render this element inside a <HydratedRouter> element"),l}function jb(l,r){let o=U.useContext(Jf),[c,f]=U.useState(!1),[m,v]=U.useState(!1),{onFocus:N,onBlur:S,onMouseEnter:x,onMouseLeave:b,onTouchStart:T}=r,w=U.useRef(null);U.useEffect(()=>{if(l==="render"&&v(!0),l==="viewport"){let M=Q=>{Q.forEach(B=>{v(B.isIntersecting)})},A=new IntersectionObserver(M,{threshold:.5});return w.current&&A.observe(w.current),()=>{A.disconnect()}}},[l]),U.useEffect(()=>{if(c){let M=setTimeout(()=>{v(!0)},100);return()=>{clearTimeout(M)}}},[c]);let R=()=>{f(!0)},C=()=>{f(!1),v(!1)};return o?l!=="intent"?[m,w,{}]:[m,w,{onFocus:Fi(N,R),onBlur:Fi(S,C),onMouseEnter:Fi(x,R),onMouseLeave:Fi(b,C),onTouchStart:Fi(T,R)}]:[!1,w,{}]}function Fi(l,r){return o=>{l&&l(o),o.defaultPrevented||r(o)}}function wb({page:l,...r}){let{router:o}=Mx(),c=U.useMemo(()=>mx(o.routes,l,o.basename),[o.routes,l,o.basename]);return c?U.createElement(Tb,{page:l,matches:c,...r}):null}function Eb(l){let{manifest:r,routeModules:o}=Cx(),[c,f]=U.useState([]);return U.useEffect(()=>{let m=!1;return yb(l,r,o).then(v=>{m||f(v)}),()=>{m=!0}},[l,r,o]),c}function Tb({page:l,matches:r,...o}){let c=Pl(),{future:f,manifest:m,routeModules:v}=Cx(),{basename:N}=Mx(),{loaderData:S,matches:x}=Nb(),b=U.useMemo(()=>vg(l,r,x,m,c,"data"),[l,r,x,m,c]),T=U.useMemo(()=>vg(l,r,x,m,c,"assets"),[l,r,x,m,c]),w=U.useMemo(()=>{if(l===c.pathname+c.search+c.hash)return[];let M=new Set,A=!1;if(r.forEach(B=>{var K;let X=m.routes[B.route.id];!X||!X.hasLoader||(!b.some(fe=>fe.route.id===B.route.id)&&B.route.id in S&&((K=v[B.route.id])!=null&&K.shouldRevalidate)||X.hasClientLoader?A=!0:M.add(B.route.id))}),M.size===0)return[];let Q=mb(l,N,f.unstable_trailingSlashAwareDataRequests,"data");return A&&M.size>0&&Q.searchParams.set("_routes",r.filter(B=>M.has(B.route.id)).map(B=>B.route.id).join(",")),[Q.pathname+Q.search]},[N,f.unstable_trailingSlashAwareDataRequests,S,c,m,b,r,l,v]),R=U.useMemo(()=>pb(T,m),[T,m]),C=Eb(T);return U.createElement(U.Fragment,null,w.map(M=>U.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...o})),R.map(M=>U.createElement("link",{key:M,rel:"modulepreload",href:M,...o})),C.map(({key:M,link:A})=>U.createElement("link",{key:M,nonce:o.nonce,...A,crossOrigin:A.crossOrigin??o.crossOrigin})))}function Mb(...l){return r=>{l.forEach(o=>{typeof o=="function"?o(r):o!=null&&(o.current=r)})}}var Cb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Cb&&(window.__reactRouterVersion="7.13.0")}catch{}function Ob({basename:l,children:r,unstable_useTransitions:o,window:c}){let f=U.useRef();f.current==null&&(f.current=uv({window:c,v5Compat:!0}));let m=f.current,[v,N]=U.useState({action:m.action,location:m.location}),S=U.useCallback(x=>{o===!1?N(x):U.startTransition(()=>N(x))},[o]);return U.useLayoutEffect(()=>m.listen(S),[m,S]),U.createElement(lb,{basename:l,children:r,location:v.location,navigationType:v.action,navigator:m,unstable_useTransitions:o})}var Ox=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dx=U.forwardRef(function({onClick:r,discover:o="render",prefetch:c="none",relative:f,reloadDocument:m,replace:v,state:N,target:S,to:x,preventScrollReset:b,viewTransition:T,unstable_defaultShouldRevalidate:w,...R},C){let{basename:M,unstable_useTransitions:A}=U.useContext(Ha),Q=typeof x=="string"&&Ox.test(x),B=px(x,M);x=B.to;let X=Yv(x,{relative:f}),[K,fe,G]=jb(c,R),F=Ab(x,{replace:v,state:N,target:S,preventScrollReset:b,relative:f,viewTransition:T,unstable_defaultShouldRevalidate:w,unstable_useTransitions:A});function P(O){r&&r(O),O.defaultPrevented||F(O)}let ae=U.createElement("a",{...R,...G,href:B.absoluteURL||X,onClick:B.isExternal||m?r:P,ref:Mb(C,fe),target:S,"data-discover":!Q&&o==="render"?"true":void 0});return K&&!Q?U.createElement(U.Fragment,null,ae,U.createElement(wb,{page:X})):ae});Dx.displayName="Link";var Rx=U.forwardRef(function({"aria-current":r="page",caseSensitive:o=!1,className:c="",end:f=!1,style:m,to:v,viewTransition:N,children:S,...x},b){let T=uu(v,{relative:x.relative}),w=Pl(),R=U.useContext(eo),{navigator:C,basename:M}=U.useContext(Ha),A=R!=null&&Lb(T)&&N===!0,Q=C.encodeLocation?C.encodeLocation(T).pathname:T.pathname,B=w.pathname,X=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;o||(B=B.toLowerCase(),X=X?X.toLowerCase():null,Q=Q.toLowerCase()),X&&M&&(X=tl(X,M)||X);const K=Q!=="/"&&Q.endsWith("/")?Q.length-1:Q.length;let fe=B===Q||!f&&B.startsWith(Q)&&B.charAt(K)==="/",G=X!=null&&(X===Q||!f&&X.startsWith(Q)&&X.charAt(Q.length)==="/"),F={isActive:fe,isPending:G,isTransitioning:A},P=fe?r:void 0,ae;typeof c=="function"?ae=c(F):ae=[c,fe?"active":null,G?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let O=typeof m=="function"?m(F):m;return U.createElement(Dx,{...x,"aria-current":P,className:ae,ref:b,style:O,to:v,viewTransition:N},typeof S=="function"?S(F):S)});Rx.displayName="NavLink";var Db=U.forwardRef(({discover:l="render",fetcherKey:r,navigate:o,reloadDocument:c,replace:f,state:m,method:v=$c,action:N,onSubmit:S,relative:x,preventScrollReset:b,viewTransition:T,unstable_defaultShouldRevalidate:w,...R},C)=>{let{unstable_useTransitions:M}=U.useContext(Ha),A=zb(),Q=Ub(N,{relative:x}),B=v.toLowerCase()==="get"?"get":"post",X=typeof N=="string"&&Ox.test(N),K=fe=>{if(S&&S(fe),fe.defaultPrevented)return;fe.preventDefault();let G=fe.nativeEvent.submitter,F=(G==null?void 0:G.getAttribute("formmethod"))||v,P=()=>A(G||fe.currentTarget,{fetcherKey:r,method:F,navigate:o,replace:f,state:m,relative:x,preventScrollReset:b,viewTransition:T,unstable_defaultShouldRevalidate:w});M&&o!==!1?U.startTransition(()=>P()):P()};return U.createElement("form",{ref:C,method:B,action:Q,onSubmit:c?S:K,...R,"data-discover":!X&&l==="render"?"true":void 0})});Db.displayName="Form";function Rb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ax(l){let r=U.useContext(Lr);return Nt(r,Rb(l)),r}function Ab(l,{target:r,replace:o,state:c,preventScrollReset:f,relative:m,viewTransition:v,unstable_defaultShouldRevalidate:N,unstable_useTransitions:S}={}){let x=to(),b=Pl(),T=uu(l,{relative:m});return U.useCallback(w=>{if(ob(w,r)){w.preventDefault();let R=o!==void 0?o:lu(b)===lu(T),C=()=>x(l,{replace:R,state:c,preventScrollReset:f,relative:m,viewTransition:v,unstable_defaultShouldRevalidate:N});S?U.startTransition(()=>C()):C()}},[b,x,T,o,c,r,l,f,m,v,N,S])}var kb=0,_b=()=>`__${String(++kb)}__`;function zb(){let{router:l}=Ax("useSubmit"),{basename:r}=U.useContext(Ha),o=Kv(),c=l.fetch,f=l.navigate;return U.useCallback(async(m,v={})=>{let{action:N,method:S,encType:x,formData:b,body:T}=hb(m,r);if(v.navigate===!1){let w=v.fetcherKey||_b();await c(w,o,v.action||N,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:b,body:T,formMethod:v.method||S,formEncType:v.encType||x,flushSync:v.flushSync})}else await f(v.action||N,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:b,body:T,formMethod:v.method||S,formEncType:v.encType||x,replace:v.replace,state:v.state,fromRouteId:o,flushSync:v.flushSync,viewTransition:v.viewTransition})},[c,f,r,o])}function Ub(l,{relative:r}={}){let{basename:o}=U.useContext(Ha),c=U.useContext(Mn);Nt(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),m={...uu(l||".",{relative:r})},v=Pl();if(l==null){m.search=v.search;let N=new URLSearchParams(m.search),S=N.getAll("index");if(S.some(b=>b==="")){N.delete("index"),S.filter(T=>T).forEach(T=>N.append("index",T));let b=N.toString();m.search=b?`?${b}`:""}}return(!l||l===".")&&f.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(m.pathname=m.pathname==="/"?o:el([o,m.pathname])),lu(m)}function Lb(l,{relative:r}={}){let o=U.useContext(bx);Nt(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=Ax("useViewTransitionState"),f=uu(l,{relative:r});if(!o.isTransitioning)return!1;let m=tl(o.currentLocation.pathname,c)||o.currentLocation.pathname,v=tl(o.nextLocation.pathname,c)||o.nextLocation.pathname;return Pc(f.pathname,v)!=null||Pc(f.pathname,m)!=null}var Hb=hx();const qb=Ff(Hb);/**
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 kx=(...l)=>l.filter((r,o,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===o).join(" ").trim();/**
66
- * @license lucide-react v0.564.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */const Bb=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 Vb=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,c)=>c?c.toUpperCase():o.toLowerCase());/**
76
- * @license lucide-react v0.564.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const bg=l=>{const r=Vb(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 Yb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
86
- * @license lucide-react v0.564.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const $b=l=>{for(const r in l)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};/**
91
- * @license lucide-react v0.564.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const Fb=U.forwardRef(({color:l="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:f="",children:m,iconNode:v,...N},S)=>U.createElement("svg",{ref:S,...Yb,width:r,height:r,stroke:l,strokeWidth:c?Number(o)*24/Number(r):o,className:kx("lucide",f),...!m&&!$b(N)&&{"aria-hidden":"true"},...N},[...v.map(([x,b])=>U.createElement(x,b)),...Array.isArray(m)?m:[m]]));/**
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 ke=(l,r)=>{const o=U.forwardRef(({className:c,...f},m)=>U.createElement(Fb,{ref:m,iconNode:r,className:kx(`lucide-${Bb(bg(l))}`,`lucide-${l}`,c),...f}));return o.displayName=bg(l),o};/**
101
- * @license lucide-react v0.564.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const Gb=[["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"}]],_x=ke("activity",Gb);/**
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 Pb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Zb=ke("arrow-down",Pb);/**
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 Wb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Sg=ke("arrow-right",Wb);/**
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 Qb=[["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"}]],Ib=ke("arrow-up-down",Qb);/**
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 Xb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Jb=ke("arrow-up",Xb);/**
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 Kb=[["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"}]],e1=ke("bell",Kb);/**
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 t1=[["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"}]],Ng=ke("briefcase",t1);/**
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 a1=[["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"}]],Kf=ke("calendar",a1);/**
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 n1=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],l1=ke("chart-no-axes-column",n1);/**
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 s1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Af=ke("check",s1);/**
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 r1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zx=ke("chevron-down",r1);/**
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 i1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],u1=ke("chevron-left",i1);/**
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 c1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],o1=ke("chevron-right",c1);/**
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 d1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],f1=ke("chevron-up",d1);/**
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 h1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],m1=ke("chevrons-up-down",h1);/**
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 g1=[["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"}]],al=ke("circle-alert",g1);/**
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 x1=[["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"}]],jg=ke("circle-arrow-down",x1);/**
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 y1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],cu=ke("circle-check-big",y1);/**
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 p1=[["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"}]],v1=ke("circle-x",p1);/**
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 b1=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],wg=ke("clipboard-list",b1);/**
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 S1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Zc=ke("clock",S1);/**
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 N1=[["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"}]],Ux=ke("external-link",N1);/**
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 j1=[["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"}]],w1=ke("eye-off",j1);/**
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 E1=[["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"}]],T1=ke("eye",E1);/**
221
- * @license lucide-react v0.564.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const M1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],kf=ke("file-text",M1);/**
226
- * @license lucide-react v0.564.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const C1=[["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"}]],O1=ke("git-pull-request",C1);/**
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 D1=[["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"}]],R1=ke("globe",D1);/**
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 A1=[["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"}]],k1=ke("house",A1);/**
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 _1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],z1=ke("info",_1);/**
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 U1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],L1=ke("kanban",U1);/**
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 H1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Lx=ke("loader-circle",H1);/**
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 q1=[["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"}]],Hx=ke("map",q1);/**
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 B1=[["path",{d:"M5 12h14",key:"1ays0h"}]],V1=ke("minus",B1);/**
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 Y1=[["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"}]],qx=ke("pause",Y1);/**
271
- * @license lucide-react v0.564.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const $1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],no=ke("pen",$1);/**
276
- * @license lucide-react v0.564.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const F1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],zr=ke("play",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 G1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Zl=ke("plus",G1);/**
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 P1=[["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"}]],Bx=ke("rotate-ccw",P1);/**
291
- * @license lucide-react v0.564.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const Z1=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],W1=ke("save",Z1);/**
296
- * @license lucide-react v0.564.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */const Q1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lo=ke("search",Q1);/**
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 I1=[["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"}]],X1=ke("settings",I1);/**
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=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Eg=ke("square",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:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],e2=ke("terminal",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 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]],a2=ke("test-tube-diagonal",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 n2=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],qr=ke("trash-2",n2);/**
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 l2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],su=ke("triangle-alert",l2);/**
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=[["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"}]],r2=ke("wifi",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 i2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Br=ke("x",i2);/**
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:"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"}]],Tg=ke("zap",u2),Vx=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"}},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"}},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"}},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"}},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"}},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"}},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"}}],Yx=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"},triggerEndpoint:"/api/actions/run",scheduleTemplateKey:"executor",getEnabled:l=>l.executorEnabled??!0,getSchedule:l=>l.cronSchedule??"5 */2 * * *",settingsSection:"general",buildEnabledPatch:l=>({executorEnabled:l})},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"},triggerEndpoint:"/api/actions/review",scheduleTemplateKey:"reviewer",getEnabled:l=>l.reviewerEnabled??!0,getSchedule:l=>l.reviewerSchedule??"25 */3 * * *",settingsSection:"general",buildEnabledPatch:l=>({reviewerEnabled:l})},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"},triggerEndpoint:"/api/actions/qa",scheduleTemplateKey:"qa",getEnabled:l=>{var r;return((r=l.qa)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.qa)==null?void 0:r.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(l,r)=>({qa:{...r.qa??{},enabled:l}})},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"},triggerEndpoint:"/api/actions/audit",scheduleTemplateKey:"audit",getEnabled:l=>{var r;return((r=l.audit)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.audit)==null?void 0:r.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({audit:{...r.audit??{},enabled:l}})},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"},triggerEndpoint:"/api/actions/planner",scheduleTemplateKey:"slicer",getEnabled:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({roadmapScanner:{...r.roadmapScanner??{},enabled:l}})},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"},triggerEndpoint:"/api/actions/analytics",scheduleTemplateKey:"analytics",getEnabled:l=>{var r;return((r=l.analytics)==null?void 0:r.enabled)??!1},getSchedule:l=>{var r;return((r=l.analytics)==null?void 0:r.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({analytics:{...r.analytics??{},enabled:l}})},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"},triggerEndpoint:"/api/actions/merge",scheduleTemplateKey:"merger",getEnabled:l=>{var r;return((r=l.merger)==null?void 0:r.enabled)??!1},getSchedule:l=>{var r;return((r=l.merger)==null?void 0:r.schedule)??"55 */4 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({merger:{...r.merger??{},enabled:l}})}];function c2(l){return Yx.find(r=>r.id===l)}const eh="";let th=!1,Wc=null;function o2(l){th=l}function Mg(l){Wc=l}function d2(){return th}function ah(l){return encodeURIComponent(l.replace(/\//g,"~"))}function mt(l){return th&&Wc?l.replace("/api/",`/api/projects/${ah(Wc)}/`):l}function f2(){return et("/api/mode")}function $x(){return et("/api/projects")}function h2(l){const r=ah(l);return et(`/api/projects/${r}`,{method:"DELETE"})}async function et(l,r){const o=`${eh}${l}`,c=await fetch(o,{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 Nf(){return et(mt("/api/status"))}function Fx(){return et(mt("/api/prs"))}function m2(l,r){const o=`?lines=${encodeURIComponent(r)}`;return et(mt(`/api/logs/${encodeURIComponent(l)}${o}`))}function nh(){return et(mt("/api/config"))}async function Gx(){if(d2()){const r=(await $x()).filter(c=>c.valid);return(await Promise.all(r.map(async c=>{try{const f=await et(`/api/projects/${ah(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 nh();return[{projectId:Wc||"current",config:l}]}}function lh(l){return et(mt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function g2(){return et(mt("/api/doctor"))}function Px(){return et(mt("/api/schedule-info"))}function x2(){return et(mt("/api/actions/run"),{method:"POST"})}function Zx(){return et(mt("/api/actions/review"),{method:"POST"})}function y2(){return et(mt("/api/actions/qa"),{method:"POST"})}function p2(){return et(mt("/api/actions/audit"),{method:"POST"})}function v2(){return et(mt("/api/actions/analytics"),{method:"POST"})}function b2(){return et(mt("/api/actions/planner"),{method:"POST"})}function S2(){return et(mt("/api/actions/merge"),{method:"POST"})}function N2(l){const r=c2(l);return r?et(mt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${l}`))}function _f(){return et(mt("/api/actions/install-cron"),{method:"POST"})}function j2(){return et(mt("/api/actions/uninstall-cron"),{method:"POST"})}function w2(l="all"){return et(mt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Fl=["Draft","Ready","In Progress","Review","Done"];function Wx(){return et(mt("/api/board/status"))}function E2(l){return et(mt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function Qx(l,r){return et(mt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function T2(l){const r=`${eh}${mt(`/api/board/issues/${l}`)}`,o=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!o.ok){const c=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||`HTTP ${o.status}: ${o.statusText}`)}}function M2(){return et(mt("/api/actions/clear-lock"),{method:"POST"})}function C2(l,r=[],o){const c=(o==null?void 0:o.enabled)??!0,f=U.useRef(l);f.current=l,U.useEffect(()=>{if(!c)return;const m=`${eh}${mt("/api/status/events")}`,v=new EventSource(m);return v.addEventListener("status_changed",N=>{try{const S=JSON.parse(N.data);f.current(S)}catch{}}),()=>{v.close()}},[c,...r])}function O2(){return et("/api/queue/status")}function D2(l){const r=`?window=${encodeURIComponent(l)}`;return et(`/api/queue/analytics${r}`)}function R2(){return et("/api/global-notifications")}function Cg(l){return et("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function A2(){return et(mt("/api/roadmap"))}function k2(){return et(mt("/api/roadmap/scan"),{method:"POST"})}function Ix(l){return et(mt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function gn(l,r=[],o){const c=(o==null?void 0:o.enabled)??!0,[f,m]=U.useState(null),[v,N]=U.useState(!0),[S,x]=U.useState(null),b=U.useRef(l);b.current=l;const T=U.useRef(()=>{(async()=>{x(null);try{const R=await b.current();m(R)}catch(R){x(R instanceof Error?R:new Error("Unknown error"))}})()});return U.useEffect(()=>{if(!c)return;let w=!1;return N(!0),x(null),(async()=>{try{const C=await b.current();w||m(C)}catch(C){w||x(C instanceof Error?C:new Error("Unknown error"))}finally{w||N(!1)}})(),()=>{w=!0}},[...r,c]),{data:f,loading:v,error:S,refetch:T.current}}const Og=l=>{let r;const o=new Set,c=(x,b)=>{const T=typeof x=="function"?x(r):x;if(!Object.is(T,r)){const w=r;r=b??(typeof T!="object"||T===null)?T:Object.assign({},r,T),o.forEach(R=>R(r,w))}},f=()=>r,N={setState:c,getState:f,getInitialState:()=>S,subscribe:x=>(o.add(x),()=>o.delete(x))},S=r=l(c,f,N);return N},_2=l=>l?Og(l):Og,z2=l=>l;function U2(l,r=z2){const o=_e.useSyncExternalStore(l.subscribe,()=>r(l.getState()),()=>r(l.getInitialState()));return _e.useDebugValue(o),o}const Dg=l=>{const r=_2(l),o=c=>U2(r,c);return Object.assign(o,r),o},L2=l=>l?Dg(l):Dg,H2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,$t=L2((l,r)=>({projectName:"Night Watch",setProjectName:o=>l({projectName:o}),toasts:[],addToast:o=>{const c=Math.random().toString(36).substring(7);l(f=>({toasts:[...f.toasts,{...o,id:c}]})),setTimeout(()=>{l(f=>({toasts:f.toasts.filter(m=>m.id!==c)}))},5e3)},removeToast:o=>l(c=>({toasts:c.toasts.filter(f=>f.id!==o)})),status:null,setStatus:o=>l(c=>!c.status||new Date(o.timestamp)>new Date(c.status.timestamp)?{status:o}:c),globalModeLoading:!0,setGlobalModeLoading:o=>l({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{o2(o),l({isGlobalMode:o})},projects:[],setProjects:o=>l({projects:o}),selectedProjectId:H2,selectProject:o=>{Mg(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),l(c=>{const f=c.projects.find(m=>m.name===o);return{selectedProjectId:o,...f?{projectName:f.name}:{}}})},removeProjectFromList:o=>{l(c=>{var N;const f=c.projects.filter(S=>S.name!==o),m=c.selectedProjectId===o,v=m?((N=f[0])==null?void 0:N.name)??null:c.selectedProjectId;return m&&(Mg(v),v?localStorage.setItem("nw-selected-project",v):localStorage.removeItem("nw-selected-project")),{projects:f,selectedProjectId:v,...m&&f[0]?{projectName:f[0].name}:{}}})},getJobStates:()=>{const{status:o}=r(),c=o==null?void 0:o.config;return Yx.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}))}})),q2=()=>{const[l,r]=U.useState(!1),{projectName:o,isGlobalMode:c,projects:f,selectedProjectId:m,selectProject:v,globalModeLoading:N}=$t(),{data:S}=gn(Fx,[m],{enabled:!N}),x=(S==null?void 0:S.length)??0,b=U.useMemo(()=>[{icon:k1,label:"Dashboard",path:"/",section:"Overview"},{icon:e2,label:"Logs",path:"/logs"},{icon:L1,label:"Board",path:"/board",section:"Work"},{icon:O1,label:"Pull Requests",path:"/prs",badge:x},{icon:Hx,label:"Roadmap",path:"/roadmap"},{icon:Kf,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:X1,label:"Settings",path:"/settings",section:"Config"}],[x]);return s.jsxs("aside",{className:`
346
- relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
347
- ${l?"w-20":"w-72"} h-screen flex-shrink-0 z-50
348
- bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
349
- `,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${l?"items-center justify-center flex":""}`,children:l?s.jsx("div",{className:"relative group",children:s.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:c?"Projects":"Workspace"}),c?s.jsxs("div",{className:"relative",children:[s.jsx(Ng,{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:m||"",onChange:T=>v(T.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:f.filter(T=>T.valid).map(T=>s.jsx("option",{value:T.name,children:T.name},T.name))}),s.jsx(m1,{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(Ng,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:o})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:b.map(T=>s.jsxs(_e.Fragment,{children:[T.section&&!l&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:T.section}),s.jsx("li",{children:s.jsx(Rx,{to:T.path,className:({isActive:w})=>`
350
- flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
351
- ${w?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
352
- ${l?"justify-center":""}
353
- `,children:({isActive:w})=>s.jsxs(s.Fragment,{children:[s.jsx(T.icon,{className:`h-5 w-5 transition-colors ${w?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${l?"":"mr-3.5"}`}),!l&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:T.label}),T.badge&&(l?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${w?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:T.badge})),w&&!l&&s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),l&&s.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:T.label})]})})})]},T.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>r(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(o1,{className:"h-5 w-5"}):s.jsx(u1,{className:"h-5 w-5"})})})]})},B2=()=>{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(r2,{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(lo,{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(e1,{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 o={success:s.jsx(cu,{className:"h-5 w-5 text-green-400"}),error:s.jsx(al,{className:"h-5 w-5 text-red-400"}),info:s.jsx(z1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(su,{className:"h-5 w-5 text-amber-400"})},c={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
354
- pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
355
- bg-slate-900 border border-slate-800 border-l-4 ${c[l.type]}
356
- shadow-lg ring-1 ring-black ring-opacity-5 transition-all
357
- animate-in slide-in-from-right-full fade-in duration-300
358
- `,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:o[l.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:l.title}),l.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:l.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>r(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Br,{className:"h-5 w-5"})]})})]})})})},Y2=()=>{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(o=>s.jsx(V2,{toast:o,onDismiss:r},o.id))})};function $2(){const{setGlobalMode:l,setGlobalModeLoading:r,setProjects:o,selectProject:c,selectedProjectId:f}=$t();U.useEffect(()=>{r(!0),f2().then(async({globalMode:m})=>{if(l(m),!m)return;const v=await $x();o(v);const N=v.filter(S=>S.valid);f&&N.some(S=>S.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 Hc(l,r){return l?r?Rg(l)>=Rg(r)?l:r:l:r}function F2(){const{setStatus:l,setProjectName:r,selectedProjectId:o,globalModeLoading:c,status:f}=$t(),m=U.useRef(null);m.current=$t.getState().status,C2(v=>{Hc(v,m.current)===v&&l(v)},[o,c],{enabled:!c}),U.useEffect(()=>{if(c)return;Nf().then(N=>{Hc(N,m.current)===N&&l(N)}).catch(()=>{});const v=setInterval(()=>{Nf().then(N=>{Hc(N,m.current)===N&&l(N)}).catch(()=>{})},3e4);return()=>clearInterval(v)},[o,c,l]),U.useEffect(()=>{const v=()=>{Nf().then(N=>{Hc(N,m.current)===N&&l(N)}).catch(()=>{})};return window.addEventListener("focus",v),()=>window.removeEventListener("focus",v)},[o,l]),U.useEffect(()=>{f!=null&&f.projectName&&r(f.projectName)},[f==null?void 0:f.projectName,r])}const Pe=({children:l,className:r="",onClick:o})=>s.jsxs("div",{className:`
359
- relative bg-[#0b101b] rounded-xl border border-white/5
360
- shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
361
- transition-all duration-300
362
- ${o?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
363
- ${r}
364
- `,onClick:o,children:[o&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:l})]}),Ye=({children:l,variant:r="primary",size:o="md",loading:c=!1,className:f="",disabled:m,...v})=>{const N="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",S={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},x={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${N} ${S[r]} ${x[o]} ${f}`,disabled:m||c,...v,children:[c&&s.jsx(Lx,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},kr=({children:l,variant:r="default",className:o=""})=>{const c={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${c[r]} ${o}`,children:l})},Xx={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"}},G2=({defaultColumn:l,onClose:r,onCreated:o})=>{const[c,f]=U.useState(""),[m,v]=U.useState(""),[N,S]=U.useState(l),[x,b]=U.useState(!1),[T,w]=U.useState(null),{addToast:R}=$t(),C=async M=>{if(M.preventDefault(),!!c.trim()){b(!0),w(null);try{await E2({title:c.trim(),body:m,column:N}),R({title:"Issue created",message:`"${c.trim()}" added to ${N}`,type:"success"}),o(),r()}catch(A){w(A instanceof Error?A.message:"Failed to create issue")}finally{b(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(Br,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:C,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value: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=>S(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:Fl.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:m,onChange:M=>v(M.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),T&&s.jsx("p",{className:"text-sm text-red-400",children:T}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Ye,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Ye,{type:"submit",disabled:x||!c.trim(),children:x?"Creating...":"Create Issue"})]})]})]})]})},P2=({issue:l,onClose:r,onMoved:o,onClosed:c})=>{const[f,m]=U.useState(!1),[v,N]=U.useState(!1),[S,x]=U.useState(!1),{addToast:b}=$t(),T=async C=>{if(C!==l.column){m(!0);try{await Qx(l.number,C),b({title:"Issue moved",message:`#${l.number} moved to ${C}`,type:"success"}),o(),r()}catch(M){b({title:"Move failed",message:M instanceof Error?M.message:"Failed to move issue",type:"error"})}finally{m(!1)}}},w=async()=>{x(!1),N(!0);try{await T2(l.number),b({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),c(),r()}catch(C){b({title:"Close failed",message:C instanceof Error?C.message:"Failed to close issue",type:"error"})}finally{N(!1)}},R=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(kr,{variant:Xx[R].badge,children:R})]}),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:"}),Fl.filter(C=>C!==l.column).map(C=>s.jsx("button",{onClick:()=>T(C),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:C},C))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[l.url&&!l.url.startsWith("local://")&&s.jsxs("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(Ux,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>x(!0),disabled:v,className:"text-xs px-2.5 py-1 rounded-md bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20 transition-colors disabled:opacity-50",children:v?"Closing...":"Close Issue"})]})]}),S&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>x(!1)}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border border-white/10 rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-100 mb-2",children:"Close issue?"}),s.jsxs("p",{className:"text-sm text-slate-400 mb-4",children:["Close issue #",l.number,': "',l.title,'"?']}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx(Ye,{variant:"ghost",onClick:()=>x(!1),children:"Cancel"}),s.jsx(Ye,{onClick:w,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."})})]})]})},Z2=({issue:l,onClick:r,onDragStart:o})=>{const[c,f]=U.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:m=>{m.dataTransfer.setData("issueNumber",String(l.number)),m.dataTransfer.effectAllowed="move",f(!0),o(l)},onDragEnd:()=>f(!1),children:s.jsxs(Pe,{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(", ")})]})})},W2=({name:l,issues:r,draggingIssue:o,onIssueClick:c,onNewIssue:f,onMoveIssue:m,onDragStart:v})=>{const N=Xx[l],[S,x]=U.useState(!1),b=o!==null&&o.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${S&&b?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:T=>{b&&(T.preventDefault(),T.dataTransfer.dropEffect="move",x(!0))},onDragLeave:()=>x(!1),onDrop:T=>{T.preventDefault(),x(!1),o&&o.column!==l&&m(o,l)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${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(Zl,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:r.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${S&&b?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:S&&b?"Drop here":"No issues"})}):r.map(T=>s.jsx(Z2,{issue:T,onClick:()=>c(T),onDragStart:v},T.id))})]})},Q2=()=>{const[l,r]=U.useState(null),[o,c]=U.useState(null),[f,m]=U.useState(null),[v,N]=U.useState(null),S=U.useRef(!1),{addToast:x,selectedProjectId:b,globalModeLoading:T}=$t(),{data:w,loading:R,error:C,refetch:M}=gn(Wx,[b],{enabled:!T});U.useEffect(()=>{const B=setInterval(()=>{S.current||M()},3e4);return()=>clearInterval(B)},[M]);const A=U.useCallback(async(B,X)=>{m(null);const K=v??(w==null?void 0:w.columns);if(!K)return;const fe=K,G={};for(const P of Fl)G[P]=(K[P]??[]).filter(ae=>ae.number!==B.number);const F={...B,column:X};G[X]=[...G[X]??[],F],N(G),r(P=>(P==null?void 0:P.number)===B.number?F:P),S.current=!0;try{await Qx(B.number,X),M(),setTimeout(()=>{N(null),S.current=!1},800)}catch(P){N(fe),r(ae=>(ae==null?void 0:ae.number)===B.number?B:ae),S.current=!1,x({title:"Move failed",message:P instanceof Error?P.message:"Failed to move issue",type:"error"})}},[x,M,v,w]);if(T||R)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(C&&C.message.includes("Board not configured"))return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-4xl",children:"📋"}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),s.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",s.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(C)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),s.jsx("div",{className:"text-sm text-slate-500",children:C.message}),s.jsx(Ye,{onClick:()=>M(),children:"Retry"})]});if(!w)return null;const Q=v??w.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:[Fl.reduce((B,X)=>{var K;return B+(((K=Q[X])==null?void 0:K.length)??0)},0)," issues across ",Fl.length," columns"]})]}),s.jsxs(Ye,{onClick:()=>c("Ready"),children:[s.jsx(Zl,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>m(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Fl.length*236}px`},children:Fl.map(B=>s.jsx(W2,{name:B,issues:Q[B]??[],draggingIssue:f,onIssueClick:r,onNewIssue:c,onMoveIssue:A,onDragStart:m},B))})}),l&&s.jsx(P2,{issue:l,onClose:()=>r(null),onMoved:()=>M(),onClosed:()=>M()}),o&&s.jsx(G2,{defaultColumn:o,onClose:()=>c(null),onCreated:()=>M()})]})},I2=[{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:"merger",displayName:"Merger",processName:"merger",triggerId:"merger",runningLabel:"Running",idleLabel:"Idle"}],X2=({processes:l,activePrd:r,onCancelProcess:o,onForceClear:c,onViewLog:f,cancellingProcess:m,clearingLock:v,onTriggerJob:N,triggeringJob:S})=>{const x=T=>l.find(w=>w.name===T),b=(T,w)=>T.length<=w?T:T.slice(0,w-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-3",children:I2.map(T=>{const w=x(T.processName),R=(w==null?void 0:w.running)??!1,C=w==null?void 0:w.pid,M=m===T.cancelType,A=R&&T.cancelType,Q=!R&&T.name==="executor"&&r,B=R?C?`PID: ${C}`:T.runningLabel:T.idleLabel,X=R&&T.name==="executor"&&r?b(r,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${R?"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 ${R?"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 ${R?"text-slate-200":"text-slate-400"}`,children:T.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:X?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(kf,{className:"h-3 w-3 flex-shrink-0"}),X]}):B})]}),s.jsxs("div",{className:"flex-shrink-0",children:[A&&s.jsx("button",{onClick:()=>T.cancelType&&o(T.cancelType),disabled:M,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(Eg,{className:"h-3.5 w-3.5"})}),Q&&s.jsx("button",{onClick:c,disabled:v,className:"p-1 text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 rounded transition-colors disabled:opacity-50",title:"Force clear stale state",children:s.jsx(Eg,{className:"h-3.5 w-3.5"})}),!A&&!Q&&R&&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(kf,{className:"h-3.5 w-3.5"})}),!R&&!Q&&s.jsx("button",{onClick:()=>N(T.triggerId),disabled:S!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${T.displayName}`,children:S===T.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(zr,{className:"h-3.5 w-3.5"})})]})]},T.name)})})},J2={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"},K2=()=>{var O,ne;const l=to(),[r,o]=U.useState(null),[c,f]=U.useState(!1),[m,v]=U.useState(null),{setProjectName:N,addToast:S,selectedProjectId:x,globalModeLoading:b,status:T}=$t(),{data:w}=gn(Px,[x],{enabled:!b}),{data:R,loading:C}=gn(()=>Wx().catch(()=>null),[x],{enabled:!b}),M=T;if(_e.useEffect(()=>{M!=null&&M.projectName&&N(M.projectName)},[M,N]),b)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 A=M.prs.length,Q=M.prs.filter(k=>k.reviewScore!==null&&k.reviewScore<70).length,B=((O=R==null?void 0:R.columns.Ready)==null?void 0:O.length)??0,X=((ne=R==null?void 0:R.columns["In Progress"])==null?void 0:ne.length)??0;M.processes.find(k=>k.name==="executor"),M.processes.find(k=>k.name==="reviewer"),M.processes.find(k=>k.name==="qa"),M.processes.find(k=>k.name==="audit"),M.processes.find(k=>k.name==="planner"),M.processes.find(k=>k.name==="analytics");const K=async k=>{o(k);try{const ce=await w2(k),te=ce.results.every(me=>me.success);S({title:te?"Process Cancelled":"Cancel Failed",message:ce.results.map(me=>me.message).join("; "),type:te?"success":"error"})}catch(ce){S({title:"Cancel Failed",message:ce instanceof Error?ce.message:"Failed to cancel process",type:"error"})}finally{o(null)}},fe=async()=>{f(!0);try{await M2(),S({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(k){S({title:"Clear Failed",message:k instanceof Error?k.message:"Failed to clear lock",type:"error"})}finally{f(!1)}},G=async k=>{v(k);try{await{executor:x2,reviewer:Zx,qa:y2,audit:p2,planner:b2,analytics:v2,merger:S2}[k](),S({title:"Job Triggered",message:`${k[0].toUpperCase()+k.slice(1)} job has been queued.`,type:"success"})}catch(ce){S({title:"Trigger Failed",message:ce instanceof Error?ce.message:`Failed to trigger ${k}`,type:"error"})}finally{v(null)}},F=k=>{if(!k)return"Not scheduled";try{const ce=new Date(k),te=new Date,me=ce.getTime()-te.getTime(),Y=Math.floor(me/6e4);return Y<0?"Running now...":Y<60?`in ${Y} min`:Y<1440?`in ${Math.floor(Y/60)} hr${Y>=120?"s":""}`:`in ${Math.floor(Y/1440)} day${Y>=2880?"s":""}`}catch{return"Unknown"}},ae=(()=>{var te,me,Y;if(w!=null&&w.paused)return null;const k=[{agent:"Executor",nextRun:(w==null?void 0:w.executor.nextRun)??null},{agent:"Reviewer",nextRun:(w==null?void 0:w.reviewer.nextRun)??null},{agent:"QA",nextRun:((te=w==null?void 0:w.qa)==null?void 0:te.nextRun)??null},{agent:"Auditor",nextRun:((me=w==null?void 0:w.audit)==null?void 0:me.nextRun)??null},{agent:"Planner",nextRun:((Y=w==null?void 0:w.planner)==null?void 0:Y.nextRun)??null}];let ce=null;for(const re of k)re.nextRun&&(!ce||new Date(re.nextRun)<new Date(ce.nextRun))&&(ce=re);return ce?{agent:ce.agent,time:F(ce.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(Pe,{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:B})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(cu,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(Pe,{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:X})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(_x,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(Pe,{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:A})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Zc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${Q>0?"text-red-400 font-medium":"text-slate-500"}`,children:Q>0?`${Q} need work`:"All passing"})]}),s.jsxs(Pe,{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:w!=null&&w.paused?"Paused":M.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${w!=null&&w.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(Kf,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:w!=null&&w.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(Pe,{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(X2,{processes:M.processes,activePrd:M.activePrd,onCancelProcess:K,onForceClear:fe,onViewLog:()=>l("/logs"),cancellingProcess:r,clearingLock:c,onTriggerJob:G,triggeringJob:m})]}),ae&&s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[s.jsx("span",{children:"Next automation:"}),s.jsx("span",{className:"text-slate-200 font-medium",children:ae.agent}),s.jsx("span",{children:ae.time})]}),s.jsxs("button",{onClick:()=>l("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(Sg,{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(Sg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(Pe,{className:"p-4",children:C?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):R?s.jsx("div",{className:"flex flex-wrap gap-3",children:Fl.map(k=>{var te;const ce=((te=R.columns[k])==null?void 0:te.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 ${J2[k]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:k}),s.jsx("span",{className:"text-xs font-bold",children:ce})]},k)})}):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."]})})]})]})},eS=()=>{const[l,r]=U.useState(!0),[o,c]=U.useState(""),[f,m]=U.useState("executor"),v=U.useRef(null),{selectedProjectId:N,globalModeLoading:S}=$t(),x=$t(B=>B.status),{data:b,loading:T,error:w,refetch:R}=gn(()=>m2(f,500),[f,N],{enabled:!S}),C=(b==null?void 0:b.lines)||[];U.useEffect(()=>{l&&v.current&&(v.current.scrollTop=v.current.scrollHeight)},[C,l]),U.useEffect(()=>{if(!l)return;const B=window.setInterval(()=>{R()},3e3);return()=>window.clearInterval(B)},[l,f,R]);const M=C.filter(B=>B.toLowerCase().includes(o.toLowerCase())),A=B=>{m(B),c("")},Q=B=>{if(!(x!=null&&x.processes))return!1;const X=x.processes.find(K=>K.name===B);return(X==null?void 0:X.running)??!1};return w?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(al,{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:w.message}),s.jsx(Ye,{onClick:()=>R(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:o,onChange:B=>c(B.target.value)}),s.jsx(lo,{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:Vx.map(({processName:B,label:X})=>s.jsx("button",{onClick:()=>A(B),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${f===B?"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:X}),Q(B)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},B))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Ye,{size:"sm",variant:"ghost",onClick:()=>R(),children:[s.jsx(jg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Ye,{size:"sm",variant:"ghost",onClick:()=>r(!l),children:[l?s.jsx(qx,{className:"h-4 w-4 mr-2"}):s.jsx(zr,{className:"h-4 w-4 mr-2"}),l?"Pause":"Resume"]})]})]}),s.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[s.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[s.jsxs("span",{children:["File: ",f,".log"]}),s.jsxs("span",{children:[M.length," lines"]})]}),s.jsxs("div",{ref:v,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[T?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):M.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:o?"No logs match your filter":"No logs yet — logs will appear after the first run"}):M.map((B,X)=>{const K=B.includes("[ERROR]"),fe=B.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${K?"text-red-400":fe?"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:X+1}),B]},X)}),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(jg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},tS=()=>{const[l,r]=U.useState(null),[o,c]=U.useState(!1),[f,m]=U.useState("all"),[v,N]=U.useState("number"),[S,x]=U.useState("desc"),{addToast:b,selectedProjectId:T,globalModeLoading:w}=$t(),{data:R,loading:C,error:M,refetch:A}=gn(Fx,[T],{enabled:!w}),Q=R??[],B=O=>{switch(O){case"pass":return s.jsx(cu,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(v1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Lx,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(al,{className:"h-4 w-4 text-slate-500"})}},X=O=>{switch(O){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},K=O=>O===null?"No review decision yet":O===100?"PR has been approved":O===0?"Changes have been requested":`Review score: ${O}`,fe=U.useMemo(()=>Q.filter(O=>{switch(f){case"needs-work":return O.ciStatus==="fail"||O.reviewScore===0;case"pending":return O.ciStatus==="pending"||O.ciStatus==="unknown"||O.reviewScore===null;case"passed":return O.ciStatus==="pass"&&O.reviewScore===100;case"all":default:return!0}}),[Q,f]),G=U.useMemo(()=>[...fe].sort((ne,k)=>{let ce=0;switch(v){case"number":ce=ne.number-k.number;break;case"title":ce=ne.title.localeCompare(k.title);break;case"branch":ce=ne.branch.localeCompare(k.branch);break;case"ciStatus":{const te={fail:0,pending:1,unknown:2,pass:3};ce=(te[ne.ciStatus]??2)-(te[k.ciStatus]??2);break}case"reviewScore":{const te=ne.reviewScore??-1,me=k.reviewScore??-1;ce=te-me;break}}return S==="asc"?ce:-ce}),[fe,v,S]),F=O=>{v===O?x(S==="asc"?"desc":"asc"):(N(O),x("desc"))},P=O=>v!==O?s.jsx(Ib,{className:"h-3 w-3 text-slate-600"}):S==="asc"?s.jsx(Jb,{className:"h-3 w-3 text-indigo-400"}):s.jsx(Zb,{className:"h-3 w-3 text-indigo-400"});if(C)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(M)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(al,{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(Ye,{onClick:()=>A(),children:"Retry"})]});const ae=async()=>{c(!0);try{const O=await Zx();b({title:"Reviewer Started",message:O.pid?`Started with PID ${O.pid}`:"Reviewer started",type:"success"})}catch(O){b({title:"Reviewer Failed",message:O instanceof Error?O.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:()=>m("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:()=>m("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:()=>m("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:()=>m("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(Ye,{size:"sm",onClick:ae,disabled:o,children:[s.jsx(lo,{className:"h-4 w-4 mr-2"}),o?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>F("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),P("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:()=>F("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),P("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:()=>F("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),P("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:()=>F("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),P("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:[G.map(O=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(l===O.number?null:O.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:["#",O.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:O.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:O.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:X(O.ciStatus),children:[B(O.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:O.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:O.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:K(O.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${O.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${O.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${O.reviewScore>=70?"text-green-500":"text-red-500"}`,children:O.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:O.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:ne=>ne.stopPropagation(),children:s.jsx(Ux,{className:"h-4 w-4"})})})]},O.number)),G.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:Q.length===0?"No open PRs found.":`No PRs match the "${f}" filter.`})})]})]})}),l&&s.jsx(Pe,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const O=Q.find(ne=>ne.number===l);return O?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:O.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:O.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:X(O.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:[B(O.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:O.ciStatus})]})]}),O.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:K(O.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${O.reviewScore>=70?"text-green-500":"text-red-500"}`,children:O.reviewScore})]})]})]}):null})()})]})},oa=_e.forwardRef(({className:l="",label:r,checked:o,onChange:c,...f},m)=>{const v=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:m,checked:o,onChange:v,...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})]})});oa.displayName="Switch";const aS=()=>{const{addToast:l,selectedProjectId:r,globalModeLoading:o}=$t(),[c,f]=U.useState(!1),[m,v]=U.useState(!1),{data:N,loading:S,error:x,refetch:b}=gn(A2,[r],{enabled:!o});U.useEffect(()=>{if(!(N!=null&&N.enabled))return;const B=setInterval(()=>{b()},1e4);return()=>clearInterval(B)},[N==null?void 0:N.enabled,b]);const T=async B=>{v(!0);try{await Ix(B),l({title:B?"Scanner Enabled":"Scanner Disabled",message:B?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:B?"success":"info"}),b()}catch(X){l({title:"Toggle Failed",message:X instanceof Error?X.message:"Failed to toggle scanner",type:"error"})}finally{v(!1)}},w=async()=>{f(!0);try{const B=await k2();B.created.length>0?l({title:"Scan Complete",message:`Created ${B.created.length} PRD(s): ${B.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),B.errors.length>0&&l({title:"Scan Errors",message:B.errors.join("; "),type:"warning"}),b()}catch(B){l({title:"Scan Failed",message:B instanceof Error?B.message:"Failed to scan roadmap",type:"error"})}finally{f(!1)}};if(S)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(x)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(al,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:x.message}),s.jsx(Ye,{onClick:()=>b(),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(Pe,{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(Hx,{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 R=N.totalItems>0?Math.round(N.processedItems/N.totalItems*100):0,C=lS(N.status),M=sS(N.items),A=N.lastScan?rS(N.lastScan):"Never",Q=N.autoScanInterval?Math.round(N.autoScanInterval/60):5;return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(oa,{label:N.enabled?"Enabled":"Disabled",checked:N.enabled,onChange:T,disabled:m}),s.jsxs(Ye,{onClick:w,loading:c,disabled:!N.enabled||N.status==="complete",children:[s.jsx(zr,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(Pe,{className:`p-6 border-2 ${C.borderColor}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(C.icon,{className:`h-8 w-8 ${C.textColor}`}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),s.jsx("div",{className:`text-2xl font-bold ${C.textColor}`,children:C.label})]})]}),s.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[s.jsxs("div",{children:["Last scan: ",s.jsx("span",{className:"text-slate-300",children:A})]}),N.enabled&&N.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",Q," min"]})]}),N.enabled&&N.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(Pe,{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 (",R,"%)"]})]}),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 ${R===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${R}%`}})})]}),Object.entries(M).map(([B,X])=>s.jsxs(Pe,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:B}),s.jsx("div",{className:"space-y-2",children:X.map(K=>s.jsx(nS,{item:K},K.hash))})]},B))]})};function nS({item:l}){const r=l.checked,o=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":o?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[r?s.jsx(V1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):o?s.jsx(cu,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(kf,{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(kr,{variant:"neutral",children:"Skipped"}):o?s.jsx(kr,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(kr,{variant:"warning",children:"Pending"})})]})}function lS(l){switch(l){case"complete":return{label:"Complete",icon:cu,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Zc,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:zr,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:al,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:al,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function sS(l){const r={};for(const o of l){const c=o.section||"General";r[c]||(r[c]=[]),r[c].push(o)}return r}function rS(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 m=Math.floor(f/60);return m<24?`${m} hr ago`:`${Math.floor(m/24)} day(s) ago`}catch{return"Unknown"}}const ze=_e.forwardRef(({className:l="",label:r,error:o,helperText:c,rightIcon:f,...m},v)=>{const N=_e.useId(),S=m.id??N,x=o?`${S}-error`:void 0,b=!o&&c?`${S}-help`:void 0,T=[x,b].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:S,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:v,id:S,"aria-describedby":T,"aria-invalid":o?!0:m["aria-invalid"],className:`
365
- w-full rounded-lg bg-slate-950 border border-slate-800
366
- px-3 py-2 text-sm text-slate-200
367
- placeholder:text-slate-600
368
- focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
369
- disabled:opacity-50 disabled:cursor-not-allowed
370
- transition-all duration-200
371
- ${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
372
- ${f?"pr-10":""}
373
- ${l}
374
- `,...m}),f&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:f})]}),o?s.jsx("p",{id:x,className:"mt-1.5 text-xs text-red-400",children:o}):c?s.jsx("p",{id:b,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});ze.displayName="Input";const ta=_e.forwardRef(({className:l="",label:r,error:o,helperText:c,options:f,value:m,onChange:v,children:N,...S},x)=>{const b=_e.useId(),T=S.id??b,w=o?`${T}-error`:void 0,R=!o&&c?`${T}-help`:void 0,C=[w,R].filter(Boolean).join(" ")||void 0,M=A=>{v&&v(A.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:T,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:x,id:T,"aria-describedby":C,"aria-invalid":o?!0:S["aria-invalid"],className:`
375
- w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
376
- px-3 py-2 pr-10 text-sm text-slate-200
377
- focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
378
- disabled:opacity-50 disabled:cursor-not-allowed
379
- transition-all duration-200
380
- ${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
381
- ${l}
382
- `,value:m,onChange:M,...S,children:f?f.map(A=>s.jsx("option",{value:A.value,children:A.label},A.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(zx,{className:"h-4 w-4"})})]}),o?s.jsx("p",{id:w,className:"mt-1.5 text-xs text-red-400",children:o}):c?s.jsx("p",{id:R,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});ta.displayName="Select";const Jx=({tabs:l,activeTab:r,onChange:o,className:c=""})=>{var S,x;const[f,m]=_e.useState((S=l[0])==null?void 0:S.id),v=r||f,N=b=>{o?o(b):m(b)};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(b=>s.jsx("button",{onClick:()=>N(b.id),className:`
383
- whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
384
- ${v===b.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
385
- `,children:b.label},b.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(x=l.find(b=>b.id===v))==null?void 0:x.content})]})};var Ds={},Ua={},Gi={},Rs={},jf={},Ag;function iS(){return Ag||(Ag=1,Object.defineProperty(jf,"__esModule",{value:!0})),jf}var Pi={},Zi={},kg;function qs(){var r,o,c,f,m,Kx,N;if(kg)return Zi;kg=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronField=void 0;let l=(N=class{constructor(x,b={rawValue:""}){lt(this,m);lt(this,r,!1);lt(this,o,!1);lt(this,c,!1);lt(this,f,[]);ng(this,"options",{rawValue:""});if(!Array.isArray(x))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(x.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...b,rawValue:b.rawValue??""},Te(this,f,x.sort(N.sorter)),Te(this,c,this.options.wildcard!==void 0?this.options.wildcard:je(this,m,Kx).call(this)),Te(this,r,this.options.rawValue.includes("L")||x.includes("L")),Te(this,o,this.options.rawValue.includes("?")||x.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return J(this,r)}get hasQuestionMarkChar(){return J(this,o)}get isWildcard(){return J(this,c)}get values(){return J(this,f)}static sorter(x,b){const T=typeof x=="number",w=typeof b=="number";return T&&w?x-b:!T&&!w?x.localeCompare(b):T?-1:1}static findNearestValueInList(x,b,T=!1){if(T){for(let w=x.length-1;w>=0;w--)if(x[w]<b)return x[w];return null}for(let w=0;w<x.length;w++)if(x[w]>b)return x[w];return null}findNearestValue(x,b=!1){return this.constructor.findNearestValueInList(this.values,x,b)}serialize(){return{wildcard:J(this,c),values:J(this,f)}}validate(){let x;const b=this.chars.length>0?` or chars ${this.chars.join("")}`:"",T=M=>A=>new RegExp(`^\\d{0,2}${A}$`).test(M),w=M=>(x=M,typeof M=="number"?M>=this.min&&M<=this.max:this.chars.some(T(M)));if(!J(this,f).every(w))throw new Error(`${this.constructor.name} Validation error, got value ${x} expected range ${this.min}-${this.max}${b}`);const C=J(this,f).find((M,A)=>J(this,f).indexOf(M)!==A);if(C)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${C}`)}},r=new WeakMap,o=new WeakMap,c=new WeakMap,f=new WeakMap,m=new WeakSet,Kx=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(x,b)=>b+this.min).every(x=>J(this,f).includes(x))},N);return Zi.CronField=l,Zi}var _g;function uS(){if(_g)return Pi;_g=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.CronDayOfMonth=void 0;const l=qs(),r=1,o=31,c=Object.freeze(["L"]);let f=class extends l.CronField{static get min(){return r}static get max(){return o}static get chars(){return c}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Pi.CronDayOfMonth=f,Pi}var Wi={},zg;function cS(){if(zg)return Wi;zg=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronDayOfWeek=void 0;const l=qs(),r=0,o=7,c=Object.freeze(["L"]);let f=class extends l.CronField{static get min(){return r}static get max(){return o}static get chars(){return c}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Wi.CronDayOfWeek=f,Wi}var Qi={},Ug;function oS(){if(Ug)return Qi;Ug=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronHour=void 0;const l=qs(),r=0,o=23,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return o}static get chars(){return c}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Qi.CronHour=f,Qi}var Ii={},Lg;function dS(){if(Lg)return Ii;Lg=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronMinute=void 0;const l=qs(),r=0,o=59,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return o}static get chars(){return c}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Ii.CronMinute=f,Ii}var Xi={},wf={},Ma={},Hg;function fS(){if(Hg)return Ma;Hg=1,Object.defineProperty(Ma,"__esModule",{value:!0});class l extends Error{}class r extends l{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class o 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 m extends l{constructor(i){super(`Invalid unit ${i}`)}}class v extends l{}class N extends l{constructor(){super("Zone is an abstract class")}}const S="numeric",x="short",b="long",T={year:S,month:S,day:S},w={year:S,month:x,day:S},R={year:S,month:x,day:S,weekday:x},C={year:S,month:b,day:S},M={year:S,month:b,day:S,weekday:b},A={hour:S,minute:S},Q={hour:S,minute:S,second:S},B={hour:S,minute:S,second:S,timeZoneName:x},X={hour:S,minute:S,second:S,timeZoneName:b},K={hour:S,minute:S,hourCycle:"h23"},fe={hour:S,minute:S,second:S,hourCycle:"h23"},G={hour:S,minute:S,second:S,hourCycle:"h23",timeZoneName:x},F={hour:S,minute:S,second:S,hourCycle:"h23",timeZoneName:b},P={year:S,month:S,day:S,hour:S,minute:S},ae={year:S,month:S,day:S,hour:S,minute:S,second:S},O={year:S,month:x,day:S,hour:S,minute:S},ne={year:S,month:x,day:S,hour:S,minute:S,second:S},k={year:S,month:x,day:S,weekday:x,hour:S,minute:S},ce={year:S,month:b,day:S,hour:S,minute:S,timeZoneName:x},te={year:S,month:b,day:S,hour:S,minute:S,second:S,timeZoneName:x},me={year:S,month:b,day:S,weekday:b,hour:S,minute:S,timeZoneName:b},Y={year:S,month:b,day:S,weekday:b,hour:S,minute:S,second:S,timeZoneName:b};class re{get type(){throw new N}get name(){throw new N}get ianaName(){return this.name}get isUniversal(){throw new N}offsetName(i,h){throw new N}formatOffset(i,h){throw new N}offset(i){throw new N}equals(i){throw new N}get isValid(){throw new N}}let ye=null;class Me extends re{static get instance(){return ye===null&&(ye=new Me),ye}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:h,locale:p}){return An(i,h,p)}formatOffset(i,h){return es(this.offset(i),h)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const Ne=new Map;function _(g){let i=Ne.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"}),Ne.set(g,i)),i}const le={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ge(g,i){const h=g.format(i).replace(/\u200E/g,""),p=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(h),[,j,D,L,H,V,he,ve]=p;return[L,j,D,H,V,he,ve]}function pe(g,i){const h=g.formatToParts(i),p=[];for(let j=0;j<h.length;j++){const{type:D,value:L}=h[j],H=le[D];D==="era"?p[H]=L:De(H)||(p[H]=parseInt(L,10))}return p}const Ce=new Map;class we extends re{static create(i){let h=Ce.get(i);return h===void 0&&Ce.set(i,h=new we(i)),h}static resetCache(){Ce.clear(),Ne.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=we.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(i,{format:h,locale:p}){return An(i,h,p,this.name)}formatOffset(i,h){return es(this.offset(i),h)}offset(i){if(!this.valid)return NaN;const h=new Date(i);if(isNaN(h))return NaN;const p=_(this.name);let[j,D,L,H,V,he,ve]=p.formatToParts?pe(p,h):ge(p,h);H==="BC"&&(j=-Math.abs(j)+1);const We=Qt({year:j,month:D,day:L,hour:V===24?0:V,minute:he,second:ve,millisecond:0});let Re=+h;const jt=Re%1e3;return Re-=jt>=0?jt:1e3+jt,(We-Re)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let He={};function xt(g,i={}){const h=JSON.stringify([g,i]);let p=He[h];return p||(p=new Intl.ListFormat(g,i),He[h]=p),p}const $e=new Map;function Ft(g,i={}){const h=JSON.stringify([g,i]);let p=$e.get(h);return p===void 0&&(p=new Intl.DateTimeFormat(g,i),$e.set(h,p)),p}const qa=new Map;function xn(g,i={}){const h=JSON.stringify([g,i]);let p=qa.get(h);return p===void 0&&(p=new Intl.NumberFormat(g,i),qa.set(h,p)),p}const en=new Map;function ha(g,i={}){const{base:h,...p}=i,j=JSON.stringify([g,p]);let D=en.get(j);return D===void 0&&(D=new Intl.RelativeTimeFormat(g,i),en.set(j,D)),D}let ma=null;function oe(){return ma||(ma=new Intl.DateTimeFormat().resolvedOptions().locale,ma)}const ie=new Map;function xe(g){let i=ie.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),ie.set(g,i)),i}const Be=new Map;function Je(g){let i=Be.get(g);if(!i){const h=new Intl.Locale(g);i="getWeekInfo"in h?h.getWeekInfo():h.weekInfo,"minimalDays"in i||(i={...nl,...i}),Be.set(g,i)}return i}function ft(g){const i=g.indexOf("-x-");i!==-1&&(g=g.substring(0,i));const h=g.indexOf("-u-");if(h===-1)return[g];{let p,j;try{p=Ft(g).resolvedOptions(),j=g}catch{const V=g.substring(0,h);p=Ft(V).resolvedOptions(),j=V}const{numberingSystem:D,calendar:L}=p;return[j,D,L]}}function aa(g,i,h){return(h||i)&&(g.includes("-u-")||(g+="-u"),h&&(g+=`-ca-${h}`),i&&(g+=`-nu-${i}`)),g}function na(g){const i=[];for(let h=1;h<=12;h++){const p=Ee.utc(2009,h,1);i.push(g(p))}return i}function yt(g){const i=[];for(let h=1;h<=7;h++){const p=Ee.utc(2016,11,13+h);i.push(g(p))}return i}function Ba(g,i,h,p){const j=g.listingMode();return j==="error"?null:j==="en"?h(i):p(i)}function Gt(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||xe(g.locale).numberingSystem==="latn"}class ga{constructor(i,h,p){this.padTo=p.padTo||0,this.floor=p.floor||!1;const{padTo:j,floor:D,...L}=p;if(!h||Object.keys(L).length>0){const H={useGrouping:!1,...p};p.padTo>0&&(H.minimumIntegerDigits=p.padTo),this.inf=xn(i,H)}}format(i){if(this.inf){const h=this.floor?Math.floor(i):i;return this.inf.format(h)}else{const h=this.floor?Math.floor(i):Xl(i,3);return st(h,this.padTo)}}}class Ca{constructor(i,h,p){this.opts=p,this.originalZone=void 0;let j;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const L=-1*(i.offset/60),H=L>=0?`Etc/GMT+${L}`:`Etc/GMT${L}`;i.offset!==0&&we.create(H).valid?(j=H,this.dt=i):(j="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,j=i.zone.name):(j="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const D={...this.opts};D.timeZone=D.timeZone||j,this.dtf=Ft(h,D)}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(h=>{if(h.type==="timeZoneName"){const p=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...h,value:p}}else return h}):i}resolvedOptions(){return this.dtf.resolvedOptions()}}class Cn{constructor(i,h,p){this.opts={style:"long",...p},!h&&Fr()&&(this.rtf=ha(i,p))}format(i,h){return this.rtf?this.rtf.format(i,h):bn(h,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,h){return this.rtf?this.rtf.formatToParts(i,h):[]}}const nl={firstDay:1,minimalDays:4,weekend:[6,7]};class Xe{static fromOpts(i){return Xe.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,h,p,j,D=!1){const L=i||gt.defaultLocale,H=L||(D?"en-US":oe()),V=h||gt.defaultNumberingSystem,he=p||gt.defaultOutputCalendar,ve=Gr(j)||gt.defaultWeekSettings;return new Xe(H,V,he,ve,L)}static resetCache(){ma=null,$e.clear(),qa.clear(),en.clear(),ie.clear(),Be.clear()}static fromObject({locale:i,numberingSystem:h,outputCalendar:p,weekSettings:j}={}){return Xe.create(i,h,p,j)}constructor(i,h,p,j,D){const[L,H,V]=ft(i);this.locale=L,this.numberingSystem=h||H||null,this.outputCalendar=p||V||null,this.weekSettings=j,this.intl=aa(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=D,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Gt(this)),this.fastNumbersCached}listingMode(){const i=this.isEnglish(),h=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return i&&h?"en":"intl"}clone(i){return!i||Object.getOwnPropertyNames(i).length===0?this:Xe.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,Gr(i.weekSettings)||this.weekSettings,i.defaultToEN||!1)}redefaultToEN(i={}){return this.clone({...i,defaultToEN:!0})}redefaultToSystem(i={}){return this.clone({...i,defaultToEN:!1})}months(i,h=!1){return Ba(this,i,bu,()=>{const p=this.intl==="ja"||this.intl.startsWith("ja-");h&=!p;const j=h?{month:i,day:"numeric"}:{month:i},D=h?"format":"standalone";if(!this.monthsCache[D][i]){const L=p?H=>this.dtFormatter(H,j).format():H=>this.extract(H,j,"month");this.monthsCache[D][i]=na(L)}return this.monthsCache[D][i]})}weekdays(i,h=!1){return Ba(this,i,Qs,()=>{const p=h?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},j=h?"format":"standalone";return this.weekdaysCache[j][i]||(this.weekdaysCache[j][i]=yt(D=>this.extract(D,p,"weekday"))),this.weekdaysCache[j][i]})}meridiems(){return Ba(this,void 0,()=>kn,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ee.utc(2016,11,13,9),Ee.utc(2016,11,13,19)].map(h=>this.extract(h,i,"dayperiod"))}return this.meridiemCache})}eras(i){return Ba(this,i,Ir,()=>{const h={era:i};return this.eraCache[i]||(this.eraCache[i]=[Ee.utc(-40,1,1),Ee.utc(2017,1,1)].map(p=>this.extract(p,h,"era"))),this.eraCache[i]})}extract(i,h,p){const j=this.dtFormatter(i,h),D=j.formatToParts(),L=D.find(H=>H.type.toLowerCase()===p);return L?L.value:null}numberFormatter(i={}){return new ga(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,h={}){return new Ca(i,this.intl,h)}relFormatter(i={}){return new Cn(this.intl,this.isEnglish(),i)}listFormatter(i={}){return xt(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||xe(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:pn()?Je(this.locale):nl}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 ll=null;class pt extends re{static get utcInstance(){return ll===null&&(ll=new pt(0)),ll}static instance(i){return i===0?pt.utcInstance:new pt(i)}static parseSpecifier(i){if(i){const h=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(h)return new pt(Kl(h[1],h[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${es(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${es(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,h){return es(this.fixed,h)}get isUniversal(){return!0}offset(){return this.fixed}equals(i){return i.type==="fixed"&&i.fixed===this.fixed}get isValid(){return!0}}class la 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(De(g)||g===null)return i;if(g instanceof re)return g;if(At(g)){const h=g.toLowerCase();return h==="default"?i:h==="local"||h==="system"?Me.instance:h==="utc"||h==="gmt"?pt.utcInstance:pt.parseSpecifier(h)||we.create(g)}else return ya(g)?pt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new la(g)}const Zt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ou={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]},ro=Zt.hanidec.replace(/[\[|\]]/g,"").split("");function io(g){let i=parseInt(g,10);if(isNaN(i)){i="";for(let h=0;h<g.length;h++){const p=g.charCodeAt(h);if(g[h].search(Zt.hanidec)!==-1)i+=ro.indexOf(g[h]);else for(const j in ou){const[D,L]=ou[j];p>=D&&p<=L&&(i+=p-D)}}return parseInt(i,10)}else return i}const sl=new Map;function Bs(){sl.clear()}function sa({numberingSystem:g},i=""){const h=g||"latn";let p=sl.get(h);p===void 0&&(p=new Map,sl.set(h,p));let j=p.get(i);return j===void 0&&(j=new RegExp(`${Zt[h]}${i}`),p.set(i,j)),j}let yn=()=>Date.now(),Wl="system",rl=null,du=null,Vr=null,Vs=60,il,fu=null;class gt{static get now(){return yn}static set now(i){yn=i}static set defaultZone(i){Wl=i}static get defaultZone(){return Pt(Wl,Me.instance)}static get defaultLocale(){return rl}static set defaultLocale(i){rl=i}static get defaultNumberingSystem(){return du}static set defaultNumberingSystem(i){du=i}static get defaultOutputCalendar(){return Vr}static set defaultOutputCalendar(i){Vr=i}static get defaultWeekSettings(){return fu}static set defaultWeekSettings(i){fu=Gr(i)}static get twoDigitCutoffYear(){return Vs}static set twoDigitCutoffYear(i){Vs=i%100}static get throwOnInvalid(){return il}static set throwOnInvalid(i){il=i}static resetCaches(){Xe.resetCache(),we.resetCache(),Ee.resetCache(),Bs()}}class xa{constructor(i,h){this.reason=i,this.explanation=h}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Yr=[0,31,59,90,120,151,181,212,243,273,304,334],Ys=[0,31,60,91,121,152,182,213,244,274,305,335];function ra(g,i){return new xa("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function $s(g,i,h){const p=new Date(Date.UTC(g,i-1,h));g<100&&g>=0&&p.setUTCFullYear(p.getUTCFullYear()-1900);const j=p.getUTCDay();return j===0?7:j}function $r(g,i,h){return h+(cl(g)?Ys:Yr)[i-1]}function tn(g,i){const h=cl(g)?Ys:Yr,p=h.findIndex(D=>D<i),j=i-h[p];return{month:p+1,day:j}}function Tt(g,i){return(g-i+7)%7+1}function Lt(g,i=4,h=1){const{year:p,month:j,day:D}=g,L=$r(p,j,D),H=Tt($s(p,j,D),h);let V=Math.floor((L-H+14-i)/7),he;return V<1?(he=p-1,V=ol(he,i,h)):V>ol(p,i,h)?(he=p+1,V=1):he=p,{weekYear:he,weekNumber:V,weekday:H,...ts(g)}}function On(g,i=4,h=1){const{weekYear:p,weekNumber:j,weekday:D}=g,L=Tt($s(p,1,i),h),H=nn(p);let V=j*7+D-L-7+i,he;V<1?(he=p-1,V+=nn(he)):V>H?(he=p+1,V-=nn(p)):he=p;const{month:ve,day:Ue}=tn(he,V);return{year:he,month:ve,day:Ue,...ts(g)}}function Ql(g){const{year:i,month:h,day:p}=g,j=$r(i,h,p);return{year:i,ordinal:j,...ts(g)}}function hu(g){const{year:i,ordinal:h}=g,{month:p,day:j}=tn(i,h);return{year:i,month:p,day:j,...ts(g)}}function mu(g,i){if(!De(g.localWeekday)||!De(g.localWeekNumber)||!De(g.localWeekYear)){if(!De(g.weekday)||!De(g.weekNumber)||!De(g.weekYear))throw new f("Cannot mix locale-based week fields with ISO-based week fields");return De(g.localWeekday)||(g.weekday=g.localWeekday),De(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),De(g.localWeekYear)||(g.weekYear=g.localWeekYear),delete g.localWeekday,delete g.localWeekNumber,delete g.localWeekYear,{minDaysInFirstWeek:i.getMinDaysInFirstWeek(),startOfWeek:i.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function gu(g,i=4,h=1){const p=an(g.weekYear),j=Wt(g.weekNumber,1,ol(g.weekYear,i,h)),D=Wt(g.weekday,1,7);return p?j?D?!1:ra("weekday",g.weekday):ra("week",g.weekNumber):ra("weekYear",g.weekYear)}function Il(g){const i=an(g.year),h=Wt(g.ordinal,1,nn(g.year));return i?h?!1:ra("ordinal",g.ordinal):ra("year",g.year)}function Fs(g){const i=an(g.year),h=Wt(g.month,1,12),p=Wt(g.day,1,Ps(g.year,g.month));return i?h?p?!1:ra("day",g.day):ra("month",g.month):ra("year",g.year)}function Dn(g){const{hour:i,minute:h,second:p,millisecond:j}=g,D=Wt(i,0,23)||i===24&&h===0&&p===0&&j===0,L=Wt(h,0,59),H=Wt(p,0,59),V=Wt(j,0,999);return D?L?H?V?!1:ra("millisecond",j):ra("second",p):ra("minute",h):ra("hour",i)}function De(g){return typeof g>"u"}function ya(g){return typeof g=="number"}function an(g){return typeof g=="number"&&g%1===0}function At(g){return typeof g=="string"}function xu(g){return Object.prototype.toString.call(g)==="[object Date]"}function Fr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function pn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ul(g){return Array.isArray(g)?g:[g]}function yu(g,i,h){if(g.length!==0)return g.reduce((p,j)=>{const D=[i(j),j];return p&&h(p[0],D[0])===p[0]?p:D},null)[1]}function pu(g,i){return i.reduce((h,p)=>(h[p]=g[p],h),{})}function Rn(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function Gr(g){if(g==null)return null;if(typeof g!="object")throw new v("Week settings must be an object");if(!Wt(g.firstDay,1,7)||!Wt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Wt(i,1,7)))throw new v("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Wt(g,i,h){return an(g)&&g>=i&&g<=h}function Gs(g,i){return g-i*Math.floor(g/i)}function st(g,i=2){const h=g<0;let p;return h?p="-"+(""+-g).padStart(i,"0"):p=(""+g).padStart(i,"0"),p}function Mt(g){if(!(De(g)||g===null||g===""))return parseInt(g,10)}function vn(g){if(!(De(g)||g===null||g===""))return parseFloat(g)}function Pr(g){if(!(De(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function Xl(g,i,h="round"){const p=10**i;switch(h){case"expand":return g>0?Math.ceil(g*p)/p:Math.floor(g*p)/p;case"trunc":return Math.trunc(g*p)/p;case"round":return Math.round(g*p)/p;case"floor":return Math.floor(g*p)/p;case"ceil":return Math.ceil(g*p)/p;default:throw new RangeError(`Value rounding ${h} is out of range`)}}function cl(g){return g%4===0&&(g%100!==0||g%400===0)}function nn(g){return cl(g)?366:365}function Ps(g,i){const h=Gs(i-1,12)+1,p=g+(i-h)/12;return h===2?cl(p)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][h-1]}function Qt(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 Zs(g,i,h){return-Tt($s(g,1,i),h)+i-1}function ol(g,i=4,h=1){const p=Zs(g,i,h),j=Zs(g+1,i,h);return(nn(g)-p+j)/7}function Jl(g){return g>99?g:g>gt.twoDigitCutoffYear?1900+g:2e3+g}function An(g,i,h,p=null){const j=new Date(g),D={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};p&&(D.timeZone=p);const L={timeZoneName:i,...D},H=new Intl.DateTimeFormat(h,L).formatToParts(j).find(V=>V.type.toLowerCase()==="timezonename");return H?H.value:null}function Kl(g,i){let h=parseInt(g,10);Number.isNaN(h)&&(h=0);const p=parseInt(i,10)||0,j=h<0||Object.is(h,-0)?-p:p;return h*60+j}function Zr(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new v(`Invalid unit value ${g}`);return i}function ln(g,i){const h={};for(const p in g)if(Rn(g,p)){const j=g[p];if(j==null)continue;h[i(p)]=Zr(j)}return h}function es(g,i){const h=Math.trunc(Math.abs(g/60)),p=Math.trunc(Math.abs(g%60)),j=g>=0?"+":"-";switch(i){case"short":return`${j}${st(h,2)}:${st(p,2)}`;case"narrow":return`${j}${h}${p>0?`:${p}`:""}`;case"techie":return`${j}${st(h,2)}${st(p,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function ts(g){return pu(g,["hour","minute","second","millisecond"])}const vu=["January","February","March","April","May","June","July","August","September","October","November","December"],Ws=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],uo=["J","F","M","A","M","J","J","A","S","O","N","D"];function bu(g){switch(g){case"narrow":return[...uo];case"short":return[...Ws];case"long":return[...vu];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const as=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Va=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Wr=["M","T","W","T","F","S","S"];function Qs(g){switch(g){case"narrow":return[...Wr];case"short":return[...Va];case"long":return[...as];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const kn=["AM","PM"],dl=["Before Christ","Anno Domini"],Su=["BC","AD"],Qr=["B","A"];function Ir(g){switch(g){case"narrow":return[...Qr];case"short":return[...Su];case"long":return[...dl];default:return null}}function ns(g){return kn[g.hour<12?0:1]}function sn(g,i){return Qs(i)[g.weekday-1]}function Xr(g,i){return bu(i)[g.month-1]}function ls(g,i){return Ir(i)[g.year<0?0:1]}function bn(g,i,h="always",p=!1){const j={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},D=["hours","minutes","seconds"].indexOf(g)===-1;if(h==="auto"&&D){const Ue=g==="days";switch(i){case 1:return Ue?"tomorrow":`next ${j[g][0]}`;case-1:return Ue?"yesterday":`last ${j[g][0]}`;case 0:return Ue?"today":`this ${j[g][0]}`}}const L=Object.is(i,-0)||i<0,H=Math.abs(i),V=H===1,he=j[g],ve=p?V?he[1]:he[2]||he[1]:V?j[g][0]:g;return L?`${H} ${ve} ago`:`in ${H} ${ve}`}function Is(g,i){let h="";for(const p of g)p.literal?h+=p.val:h+=i(p.val);return h}const Xs={D:T,DD:w,DDD:C,DDDD:M,t:A,tt:Q,ttt:B,tttt:X,T:K,TT:fe,TTT:G,TTTT:F,f:P,ff:O,fff:ce,ffff:me,F:ae,FF:ne,FFF:te,FFFF:Y};class Ht{static create(i,h={}){return new Ht(i,h)}static parseFormat(i){let h=null,p="",j=!1;const D=[];for(let L=0;L<i.length;L++){const H=i.charAt(L);H==="'"?((p.length>0||j)&&D.push({literal:j||/^\s+$/.test(p),val:p===""?"'":p}),h=null,p="",j=!j):j||H===h?p+=H:(p.length>0&&D.push({literal:/^\s+$/.test(p),val:p}),p=H,h=H)}return p.length>0&&D.push({literal:j||/^\s+$/.test(p),val:p}),D}static macroTokenToFormatOpts(i){return Xs[i]}constructor(i,h){this.opts=h,this.loc=i,this.systemLoc=null}formatWithSystemDefault(i,h){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(i,{...this.opts,...h}).format()}dtFormatter(i,h={}){return this.loc.dtFormatter(i,{...this.opts,...h})}formatDateTime(i,h){return this.dtFormatter(i,h).format()}formatDateTimeParts(i,h){return this.dtFormatter(i,h).formatToParts()}formatInterval(i,h){return this.dtFormatter(i.start,h).dtf.formatRange(i.start.toJSDate(),i.end.toJSDate())}resolvedOptions(i,h){return this.dtFormatter(i,h).resolvedOptions()}num(i,h=0,p=void 0){if(this.opts.forceSimple)return st(i,h);const j={...this.opts};return h>0&&(j.padTo=h),p&&(j.signDisplay=p),this.loc.numberFormatter(j).format(i)}formatDateTimeFromString(i,h){const p=this.loc.listingMode()==="en",j=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",D=(Re,jt)=>this.loc.extract(i,Re,jt),L=Re=>i.isOffsetFixed&&i.offset===0&&Re.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,Re.format):"",H=()=>p?ns(i):D({hour:"numeric",hourCycle:"h12"},"dayperiod"),V=(Re,jt)=>p?Xr(i,Re):D(jt?{month:Re}:{month:Re,day:"numeric"},"month"),he=(Re,jt)=>p?sn(i,Re):D(jt?{weekday:Re}:{weekday:Re,month:"long",day:"numeric"},"weekday"),ve=Re=>{const jt=Ht.macroTokenToFormatOpts(Re);return jt?this.formatWithSystemDefault(i,jt):Re},Ue=Re=>p?ls(i,Re):D({era:Re},"era"),We=Re=>{switch(Re){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 L({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return L({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return L({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return i.zone.offsetName(i.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return i.zone.offsetName(i.ts,{format:"long",locale:this.loc.locale});case"z":return i.zoneName;case"a":return H();case"d":return j?D({day:"numeric"},"day"):this.num(i.day);case"dd":return j?D({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return he("short",!0);case"cccc":return he("long",!0);case"ccccc":return he("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return he("short",!1);case"EEEE":return he("long",!1);case"EEEEE":return he("narrow",!1);case"L":return j?D({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return j?D({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 j?D({month:"numeric"},"month"):this.num(i.month);case"MM":return j?D({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 j?D({year:"numeric"},"year"):this.num(i.year);case"yy":return j?D({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return j?D({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return j?D({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 ve(Re)}};return Is(Ht.parseFormat(h),We)}formatDurationFromString(i,h){const p=this.opts.signMode==="negativeLargestOnly"?-1:1,j=ve=>{switch(ve[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},D=(ve,Ue)=>We=>{const Re=j(We);if(Re){const jt=Ue.isNegativeDuration&&Re!==Ue.largestUnit?p:1;let Bt;return this.opts.signMode==="negativeLargestOnly"&&Re!==Ue.largestUnit?Bt="never":this.opts.signMode==="all"?Bt="always":Bt="auto",this.num(ve.get(Re)*jt,We.length,Bt)}else return We},L=Ht.parseFormat(h),H=L.reduce((ve,{literal:Ue,val:We})=>Ue?ve:ve.concat(We),[]),V=i.shiftTo(...H.map(j).filter(ve=>ve)),he={isNegativeDuration:V<0,largestUnit:Object.keys(V.values)[0]};return Is(L,D(V,he))}}const ss=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function rn(...g){const i=g.reduce((h,p)=>h+p.source,"");return RegExp(`^${i}$`)}function _n(...g){return i=>g.reduce(([h,p,j],D)=>{const[L,H,V]=D(i,j);return[{...h,...L},H||p,V]},[{},null,1]).slice(0,2)}function Ct(g,...i){if(g==null)return[null,null];for(const[h,p]of i){const j=h.exec(g);if(j)return p(j)}return[null,null]}function Sn(...g){return(i,h)=>{const p={};let j;for(j=0;j<g.length;j++)p[g[j]]=Mt(i[h+j]);return[p,null,h+j]}}const rs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,is=`(?:${rs.source}?(?:\\[(${ss.source})\\])?)?`,Jr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Js=RegExp(`${Jr.source}${is}`),us=RegExp(`(?:[Tt]${Js.source})?`),cs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ks=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Nu=/(\d{4})-?(\d{3})/,co=Sn("weekYear","weekNumber","weekDay"),oo=Sn("year","ordinal"),fo=/(\d{4})-(\d\d)-(\d\d)/,er=RegExp(`${Jr.source} ?(?:${rs.source}|(${ss.source}))?`),ho=RegExp(`(?: ${er.source})?`);function fl(g,i,h){const p=g[i];return De(p)?h:Mt(p)}function mo(g,i){return[{year:fl(g,i),month:fl(g,i+1,1),day:fl(g,i+2,1)},null,i+3]}function hl(g,i){return[{hours:fl(g,i,0),minutes:fl(g,i+1,0),seconds:fl(g,i+2,0),milliseconds:Pr(g[i+3])},null,i+4]}function os(g,i){const h=!g[i]&&!g[i+1],p=Kl(g[i+1],g[i+2]),j=h?null:pt.instance(p);return[{},j,i+3]}function ml(g,i){const h=g[i]?we.create(g[i]):null;return[{},h,i+1]}const go=RegExp(`^T?${Jr.source}$`),xo=/^-?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 yo(g){const[i,h,p,j,D,L,H,V,he]=g,ve=i[0]==="-",Ue=V&&V[0]==="-",We=(Re,jt=!1)=>Re!==void 0&&(jt||Re&&ve)?-Re:Re;return[{years:We(vn(h)),months:We(vn(p)),weeks:We(vn(j)),days:We(vn(D)),hours:We(vn(L)),minutes:We(vn(H)),seconds:We(vn(V),V==="-0"),milliseconds:We(Pr(he),Ue)}]}const po={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ds(g,i,h,p,j,D,L){const H={year:i.length===2?Jl(Mt(i)):Mt(i),month:Ws.indexOf(h)+1,day:Mt(p),hour:Mt(j),minute:Mt(D)};return L&&(H.second=Mt(L)),g&&(H.weekday=g.length>3?as.indexOf(g)+1:Va.indexOf(g)+1),H}const vo=/^(?:(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 bo(g){const[,i,h,p,j,D,L,H,V,he,ve,Ue]=g,We=ds(i,j,p,h,D,L,H);let Re;return V?Re=po[V]:he?Re=0:Re=Kl(ve,Ue),[We,new pt(Re)]}function So(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const ju=/^(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$/,No=/^(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$/,jo=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function wu(g){const[,i,h,p,j,D,L,H]=g;return[ds(i,j,p,h,D,L,H),pt.utcInstance]}function wo(g){const[,i,h,p,j,D,L,H]=g;return[ds(i,H,h,p,j,D,L),pt.utcInstance]}const Eo=rn(cs,us),To=rn(Ks,us),Mo=rn(Nu,us),Co=rn(Js),Eu=_n(mo,hl,os,ml),Kr=_n(co,hl,os,ml),fs=_n(oo,hl,os,ml),Oo=_n(hl,os,ml);function Tu(g){return Ct(g,[Eo,Eu],[To,Kr],[Mo,fs],[Co,Oo])}function Mu(g){return Ct(So(g),[vo,bo])}function Cu(g){return Ct(g,[ju,wu],[No,wu],[jo,wo])}function Ou(g){return Ct(g,[xo,yo])}const Du=_n(hl);function gl(g){return Ct(g,[go,Du])}const Do=rn(fo,ho),Ro=rn(er),Ao=_n(hl,os,ml);function Ru(g){return Ct(g,[Do,Eu],[Ro,Ao])}const ei="Invalid Duration",xl={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},hs={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...xl},pa=146097/400,un=146097/4800,Au={years:{quarters:4,months:12,weeks:pa/7,days:pa,hours:pa*24,minutes:pa*24*60,seconds:pa*24*60*60,milliseconds:pa*24*60*60*1e3},quarters:{months:3,weeks:pa/28,days:pa/4,hours:pa*24/4,minutes:pa*24*60/4,seconds:pa*24*60*60/4,milliseconds:pa*24*60*60*1e3/4},months:{weeks:un/7,days:un,hours:un*24,minutes:un*24*60,seconds:un*24*60*60,milliseconds:un*24*60*60*1e3},...xl},Nn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ti=Nn.slice(0).reverse();function Oa(g,i,h=!1){const p={values:h?i.values:{...g.values,...i.values||{}},loc:g.loc.clone(i.loc),conversionAccuracy:i.conversionAccuracy||g.conversionAccuracy,matrix:i.matrix||g.matrix};return new Ze(p)}function ai(g,i){var h;let p=(h=i.milliseconds)!=null?h:0;for(const j of ti.slice(1))i[j]&&(p+=i[j]*g[j].milliseconds);return p}function ni(g,i){const h=ai(g,i)<0?-1:1;Nn.reduceRight((p,j)=>{if(De(i[j]))return p;if(p){const D=i[p]*h,L=g[j][p],H=Math.floor(D/L);i[j]+=H*h,i[p]-=H*L*h}return j},null),Nn.reduce((p,j)=>{if(De(i[j]))return p;if(p){const D=i[p]%1;i[p]-=D,i[j]+=D*g[p][j]}return j},null)}function li(g){const i={};for(const[h,p]of Object.entries(g))p!==0&&(i[h]=p);return i}class Ze{constructor(i){const h=i.conversionAccuracy==="longterm"||!1;let p=h?Au:hs;i.matrix&&(p=i.matrix),this.values=i.values,this.loc=i.loc||Xe.create(),this.conversionAccuracy=h?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=p,this.isLuxonDuration=!0}static fromMillis(i,h){return Ze.fromObject({milliseconds:i},h)}static fromObject(i,h={}){if(i==null||typeof i!="object")throw new v(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new Ze({values:ln(i,Ze.normalizeUnit),loc:Xe.fromObject(h),conversionAccuracy:h.conversionAccuracy,matrix:h.matrix})}static fromDurationLike(i){if(ya(i))return Ze.fromMillis(i);if(Ze.isDuration(i))return i;if(typeof i=="object")return Ze.fromObject(i);throw new v(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,h){const[p]=Ou(i);return p?Ze.fromObject(p,h):Ze.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,h){const[p]=gl(i);return p?Ze.fromObject(p,h):Ze.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,h=null){if(!i)throw new v("need to specify a reason the Duration is invalid");const p=i instanceof xa?i:new xa(i,h);if(gt.throwOnInvalid)throw new c(p);return new Ze({invalid:p})}static normalizeUnit(i){const h={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[i&&i.toLowerCase()];if(!h)throw new m(i);return h}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,h={}){const p={...h,floor:h.round!==!1&&h.floor!==!1};return this.isValid?Ht.create(this.loc,p).formatDurationFromString(this,i):ei}toHuman(i={}){if(!this.isValid)return ei;const h=i.showZeros!==!1,p=Nn.map(j=>{const D=this.values[j];return De(D)||D===0&&!h?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:j.slice(0,-1)}).format(D)}).filter(j=>j);return this.loc.listFormatter({type:"conjunction",style:i.listStyle||"narrow",...i}).format(p)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let i="P";return this.years!==0&&(i+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(i+=this.months+this.quarters*3+"M"),this.weeks!==0&&(i+=this.weeks+"W"),this.days!==0&&(i+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(i+="T"),this.hours!==0&&(i+=this.hours+"H"),this.minutes!==0&&(i+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(i+=Xl(this.seconds+this.milliseconds/1e3,3)+"S"),i==="P"&&(i+="T0S"),i}toISOTime(i={}){if(!this.isValid)return null;const h=this.toMillis();return h<0||h>=864e5?null:(i={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...i,includeOffset:!1},Ee.fromMillis(h,{zone:"UTC"}).toISOTime(i))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ai(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const h=Ze.fromDurationLike(i),p={};for(const j of Nn)(Rn(h.values,j)||Rn(this.values,j))&&(p[j]=h.get(j)+this.get(j));return Oa(this,{values:p},!0)}minus(i){if(!this.isValid)return this;const h=Ze.fromDurationLike(i);return this.plus(h.negate())}mapUnits(i){if(!this.isValid)return this;const h={};for(const p of Object.keys(this.values))h[p]=Zr(i(this.values[p],p));return Oa(this,{values:h},!0)}get(i){return this[Ze.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const h={...this.values,...ln(i,Ze.normalizeUnit)};return Oa(this,{values:h})}reconfigure({locale:i,numberingSystem:h,conversionAccuracy:p,matrix:j}={}){const L={loc:this.loc.clone({locale:i,numberingSystem:h}),matrix:j,conversionAccuracy:p};return Oa(this,L)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return ni(this.matrix,i),Oa(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=li(this.normalize().shiftToAll().toObject());return Oa(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(L=>Ze.normalizeUnit(L));const h={},p={},j=this.toObject();let D;for(const L of Nn)if(i.indexOf(L)>=0){D=L;let H=0;for(const he in p)H+=this.matrix[he][L]*p[he],p[he]=0;ya(j[L])&&(H+=j[L]);const V=Math.trunc(H);h[L]=V,p[L]=(H*1e3-V*1e3)/1e3}else ya(j[L])&&(p[L]=j[L]);for(const L in p)p[L]!==0&&(h[D]+=L===D?p[L]:p[L]/this.matrix[D][L]);return ni(this.matrix,h),Oa(this,{values:h},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const i={};for(const h of Object.keys(this.values))i[h]=this.values[h]===0?0:-this.values[h];return Oa(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=li(this.values);return Oa(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 h(p,j){return p===void 0||p===0?j===void 0||j===0:p===j}for(const p of Nn)if(!h(this.values[p],i.values[p]))return!1;return!0}}const yl="Invalid Interval";function ko(g,i){return!g||!g.isValid?vt.invalid("missing or invalid start"):!i||!i.isValid?vt.invalid("missing or invalid end"):i<g?vt.invalid("end before start",`The end of an interval must be after its start, but you had start=${g.toISO()} and end=${i.toISO()}`):null}class vt{constructor(i){this.s=i.start,this.e=i.end,this.invalid=i.invalid||null,this.isLuxonInterval=!0}static invalid(i,h=null){if(!i)throw new v("need to specify a reason the Interval is invalid");const p=i instanceof xa?i:new xa(i,h);if(gt.throwOnInvalid)throw new o(p);return new vt({invalid:p})}static fromDateTimes(i,h){const p=Sa(i),j=Sa(h),D=ko(p,j);return D??new vt({start:p,end:j})}static after(i,h){const p=Ze.fromDurationLike(h),j=Sa(i);return vt.fromDateTimes(j,j.plus(p))}static before(i,h){const p=Ze.fromDurationLike(h),j=Sa(i);return vt.fromDateTimes(j.minus(p),j)}static fromISO(i,h){const[p,j]=(i||"").split("/",2);if(p&&j){let D,L;try{D=Ee.fromISO(p,h),L=D.isValid}catch{L=!1}let H,V;try{H=Ee.fromISO(j,h),V=H.isValid}catch{V=!1}if(L&&V)return vt.fromDateTimes(D,H);if(L){const he=Ze.fromISO(j,h);if(he.isValid)return vt.after(D,he)}else if(V){const he=Ze.fromISO(p,h);if(he.isValid)return vt.before(H,he)}}return vt.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static isInterval(i){return i&&i.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(i="milliseconds"){return this.isValid?this.toDuration(i).get(i):NaN}count(i="milliseconds",h){if(!this.isValid)return NaN;const p=this.start.startOf(i,h);let j;return h!=null&&h.useLocaleWeeks?j=this.end.reconfigure({locale:p.locale}):j=this.end,j=j.startOf(i,h),Math.floor(j.diff(p,i).get(i))+(j.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:h}={}){return this.isValid?vt.fromDateTimes(i||this.s,h||this.e):this}splitAt(...i){if(!this.isValid)return[];const h=i.map(Sa).filter(L=>this.contains(L)).sort((L,H)=>L.toMillis()-H.toMillis()),p=[];let{s:j}=this,D=0;for(;j<this.e;){const L=h[D]||this.e,H=+L>+this.e?this.e:L;p.push(vt.fromDateTimes(j,H)),j=H,D+=1}return p}splitBy(i){const h=Ze.fromDurationLike(i);if(!this.isValid||!h.isValid||h.as("milliseconds")===0)return[];let{s:p}=this,j=1,D;const L=[];for(;p<this.e;){const H=this.start.plus(h.mapUnits(V=>V*j));D=+H>+this.e?this.e:H,L.push(vt.fromDateTimes(p,D)),p=D,j+=1}return L}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 h=this.s>i.s?this.s:i.s,p=this.e<i.e?this.e:i.e;return h>=p?null:vt.fromDateTimes(h,p)}union(i){if(!this.isValid)return this;const h=this.s<i.s?this.s:i.s,p=this.e>i.e?this.e:i.e;return vt.fromDateTimes(h,p)}static merge(i){const[h,p]=i.sort((j,D)=>j.s-D.s).reduce(([j,D],L)=>D?D.overlaps(L)||D.abutsStart(L)?[j,D.union(L)]:[j.concat([D]),L]:[j,L],[[],null]);return p&&h.push(p),h}static xor(i){let h=null,p=0;const j=[],D=i.map(V=>[{time:V.s,type:"s"},{time:V.e,type:"e"}]),L=Array.prototype.concat(...D),H=L.sort((V,he)=>V.time-he.time);for(const V of H)p+=V.type==="s"?1:-1,p===1?h=V.time:(h&&+h!=+V.time&&j.push(vt.fromDateTimes(h,V.time)),h=null);return vt.merge(j)}difference(...i){return vt.xor([this].concat(i)).map(h=>this.intersection(h)).filter(h=>h&&!h.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:yl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(i=T,h={}){return this.isValid?Ht.create(this.s.loc.clone(h),i).formatInterval(this):yl}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:yl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:yl}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:yl}toFormat(i,{separator:h=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${h}${this.e.toFormat(i)}`:yl}toDuration(i,h){return this.isValid?this.e.diff(this.s,i,h):Ze.invalid(this.invalidReason)}mapEndpoints(i){return vt.fromDateTimes(i(this.s),i(this.e))}}class ms{static hasDST(i=gt.defaultZone){const h=Ee.now().setZone(i).set({month:12});return!i.isUniversal&&h.offset!==h.set({month:6}).offset}static isValidIANAZone(i){return we.isValidZone(i)}static normalizeZone(i){return Pt(i,gt.defaultZone)}static getStartOfWeek({locale:i=null,locObj:h=null}={}){return(h||Xe.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:h=null}={}){return(h||Xe.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:h=null}={}){return(h||Xe.create(i)).getWeekendDays().slice()}static months(i="long",{locale:h=null,numberingSystem:p=null,locObj:j=null,outputCalendar:D="gregory"}={}){return(j||Xe.create(h,p,D)).months(i)}static monthsFormat(i="long",{locale:h=null,numberingSystem:p=null,locObj:j=null,outputCalendar:D="gregory"}={}){return(j||Xe.create(h,p,D)).months(i,!0)}static weekdays(i="long",{locale:h=null,numberingSystem:p=null,locObj:j=null}={}){return(j||Xe.create(h,p,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:h=null,numberingSystem:p=null,locObj:j=null}={}){return(j||Xe.create(h,p,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return Xe.create(i).meridiems()}static eras(i="short",{locale:h=null}={}){return Xe.create(h,null,"gregory").eras(i)}static features(){return{relative:Fr(),localeWeek:pn()}}}function ia(g,i){const h=j=>j.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),p=h(i)-h(g);return Math.floor(Ze.fromMillis(p).as("days"))}function gs(g,i,h){const p=[["years",(V,he)=>he.year-V.year],["quarters",(V,he)=>he.quarter-V.quarter+(he.year-V.year)*4],["months",(V,he)=>he.month-V.month+(he.year-V.year)*12],["weeks",(V,he)=>{const ve=ia(V,he);return(ve-ve%7)/7}],["days",ia]],j={},D=g;let L,H;for(const[V,he]of p)h.indexOf(V)>=0&&(L=V,j[V]=he(g,i),H=D.plus(j),H>i?(j[V]--,g=D.plus(j),g>i&&(H=g,j[V]--,g=D.plus(j))):g=H);return[g,j,H,L]}function ku(g,i,h,p){let[j,D,L,H]=gs(g,i,h);const V=i-j,he=h.filter(Ue=>["hours","minutes","seconds","milliseconds"].indexOf(Ue)>=0);he.length===0&&(L<i&&(L=j.plus({[H]:1})),L!==j&&(D[H]=(D[H]||0)+V/(L-j)));const ve=Ze.fromObject(D,p);return he.length>0?Ze.fromMillis(V,p).shiftTo(...he).plus(ve):ve}const _u="missing Intl.DateTimeFormat.formatToParts support";function Ke(g,i=h=>h){return{regex:g,deser:([h])=>i(io(h))}}const tr="[  ]",zu=new RegExp(tr,"g");function pl(g){return g.replace(/\./g,"\\.?").replace(zu,tr)}function ar(g){return g.replace(/\./g,"").replace(zu," ").toLowerCase()}function It(g,i){return g===null?null:{regex:RegExp(g.map(pl).join("|")),deser:([h])=>g.findIndex(p=>ar(h)===ar(p))+i}}function nr(g,i){return{regex:g,deser:([,h,p])=>Kl(h,p),groups:i}}function xs(g){return{regex:g,deser:([i])=>i}}function zn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function vl(g,i){const h=sa(i),p=sa(i,"{2}"),j=sa(i,"{3}"),D=sa(i,"{4}"),L=sa(i,"{6}"),H=sa(i,"{1,2}"),V=sa(i,"{1,3}"),he=sa(i,"{1,6}"),ve=sa(i,"{1,9}"),Ue=sa(i,"{2,4}"),We=sa(i,"{4,6}"),Re=Vt=>({regex:RegExp(zn(Vt.val)),deser:([jn])=>jn,literal:!0}),Bt=(Vt=>{if(g.literal)return Re(Vt);switch(Vt.val){case"G":return It(i.eras("short"),0);case"GG":return It(i.eras("long"),0);case"y":return Ke(he);case"yy":return Ke(Ue,Jl);case"yyyy":return Ke(D);case"yyyyy":return Ke(We);case"yyyyyy":return Ke(L);case"M":return Ke(H);case"MM":return Ke(p);case"MMM":return It(i.months("short",!0),1);case"MMMM":return It(i.months("long",!0),1);case"L":return Ke(H);case"LL":return Ke(p);case"LLL":return It(i.months("short",!1),1);case"LLLL":return It(i.months("long",!1),1);case"d":return Ke(H);case"dd":return Ke(p);case"o":return Ke(V);case"ooo":return Ke(j);case"HH":return Ke(p);case"H":return Ke(H);case"hh":return Ke(p);case"h":return Ke(H);case"mm":return Ke(p);case"m":return Ke(H);case"q":return Ke(H);case"qq":return Ke(p);case"s":return Ke(H);case"ss":return Ke(p);case"S":return Ke(V);case"SSS":return Ke(j);case"u":return xs(ve);case"uu":return xs(H);case"uuu":return Ke(h);case"a":return It(i.meridiems(),0);case"kkkk":return Ke(D);case"kk":return Ke(Ue,Jl);case"W":return Ke(H);case"WW":return Ke(p);case"E":case"c":return Ke(h);case"EEE":return It(i.weekdays("short",!1),1);case"EEEE":return It(i.weekdays("long",!1),1);case"ccc":return It(i.weekdays("short",!0),1);case"cccc":return It(i.weekdays("long",!0),1);case"Z":case"ZZ":return nr(new RegExp(`([+-]${H.source})(?::(${p.source}))?`),2);case"ZZZ":return nr(new RegExp(`([+-]${H.source})(${p.source})?`),2);case"z":return xs(/[a-z_+-/]{1,256}?/i);case" ":return xs(/[^\S\n\r]/);default:return Re(Vt)}})(g)||{invalidReason:_u};return Bt.token=g,Bt}const si={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Uu(g,i,h){const{type:p,value:j}=g;if(p==="literal"){const V=/^\s+$/.test(j);return{literal:!V,val:V?" ":j}}const D=i[p];let L=p;p==="hour"&&(i.hour12!=null?L=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?L="hour12":L="hour24":L=h.hour12?"hour12":"hour24");let H=si[L];if(typeof H=="object"&&(H=H[D]),H)return{literal:!1,val:H}}function Un(g){return[`^${g.map(h=>h.regex).reduce((h,p)=>`${h}(${p.source})`,"")}$`,g]}function Lu(g,i,h){const p=g.match(i);if(p){const j={};let D=1;for(const L in h)if(Rn(h,L)){const H=h[L],V=H.groups?H.groups+1:1;!H.literal&&H.token&&(j[H.token.val[0]]=H.deser(p.slice(D,D+V))),D+=V}return[p,j]}else return[p,{}]}function Hu(g){const i=D=>{switch(D){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let h=null,p;return De(g.z)||(h=we.create(g.z)),De(g.Z)||(h||(h=new pt(g.Z)),p=g.Z),De(g.q)||(g.M=(g.q-1)*3+1),De(g.h)||(g.h<12&&g.a===1?g.h+=12:g.h===12&&g.a===0&&(g.h=0)),g.G===0&&g.y&&(g.y=-g.y),De(g.u)||(g.S=Pr(g.u)),[Object.keys(g).reduce((D,L)=>{const H=i(L);return H&&(D[H]=g[L]),D},{}),h,p]}let lr=null;function zo(){return lr||(lr=Ee.fromMillis(1555555555555)),lr}function Uo(g,i){if(g.literal)return g;const h=Ht.macroTokenToFormatOpts(g.val),p=va(h,i);return p==null||p.includes(void 0)?g:p}function qu(g,i){return Array.prototype.concat(...g.map(h=>Uo(h,i)))}class ri{constructor(i,h){if(this.locale=i,this.format=h,this.tokens=qu(Ht.parseFormat(h),i),this.units=this.tokens.map(p=>vl(p,i)),this.disqualifyingUnit=this.units.find(p=>p.invalidReason),!this.disqualifyingUnit){const[p,j]=Un(this.units);this.regex=RegExp(p,"i"),this.handlers=j}}explainFromTokens(i){if(this.isValid){const[h,p]=Lu(i,this.regex,this.handlers),[j,D,L]=p?Hu(p):[null,null,void 0];if(Rn(p,"a")&&Rn(p,"H"))throw new f("Can't include meridiem when specifying 24-hour format");return{input:i,tokens:this.tokens,regex:this.regex,rawMatches:h,matches:p,result:j,zone:D,specificOffset:L}}else return{input:i,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ii(g,i,h){return new ri(g,h).explainFromTokens(i)}function ui(g,i,h){const{result:p,zone:j,specificOffset:D,invalidReason:L}=ii(g,i,h);return[p,j,D,L]}function va(g,i){if(!g)return null;const p=Ht.create(i,g).dtFormatter(zo()),j=p.formatToParts(),D=p.resolvedOptions();return j.map(L=>Uu(L,g,D))}const bl="Invalid DateTime",da=864e13;function Ya(g){return new xa("unsupported zone",`the zone "${g.name}" is not supported`)}function ys(g){return g.weekData===null&&(g.weekData=Lt(g.c)),g.weekData}function Sl(g){return g.localWeekData===null&&(g.localWeekData=Lt(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function $a(g,i){const h={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new Ee({...h,...i,old:h})}function sr(g,i,h){let p=g-i*60*1e3;const j=h.offset(p);if(i===j)return[p,i];p-=(j-i)*60*1e3;const D=h.offset(p);return j===D?[p,j]:[g-Math.min(j,D)*60*1e3,Math.max(j,D)]}function Fa(g,i){g+=i*60*1e3;const h=new Date(g);return{year:h.getUTCFullYear(),month:h.getUTCMonth()+1,day:h.getUTCDate(),hour:h.getUTCHours(),minute:h.getUTCMinutes(),second:h.getUTCSeconds(),millisecond:h.getUTCMilliseconds()}}function ps(g,i,h){return sr(Qt(g),i,h)}function vs(g,i){const h=g.o,p=g.c.year+Math.trunc(i.years),j=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,D={...g.c,year:p,month:j,day:Math.min(g.c.day,Ps(p,j))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},L=Ze.fromObject({years:i.years-Math.trunc(i.years),quarters:i.quarters-Math.trunc(i.quarters),months:i.months-Math.trunc(i.months),weeks:i.weeks-Math.trunc(i.weeks),days:i.days-Math.trunc(i.days),hours:i.hours,minutes:i.minutes,seconds:i.seconds,milliseconds:i.milliseconds}).as("milliseconds"),H=Qt(D);let[V,he]=sr(H,h,g.zone);return L!==0&&(V+=L,he=g.zone.offset(V)),{ts:V,o:he}}function Da(g,i,h,p,j,D){const{setZone:L,zone:H}=h;if(g&&Object.keys(g).length!==0||i){const V=i||H,he=Ee.fromObject(g,{...h,zone:V,specificOffset:D});return L?he:he.setZone(H)}else return Ee.invalid(new xa("unparsable",`the input "${j}" can't be parsed as ${p}`))}function rr(g,i,h=!0){return g.isValid?Ht.create(Xe.create("en-US"),{allowZ:h,forceSimple:!0}).formatDateTimeFromString(g,i):null}function Xt(g,i,h){const p=g.c.year>9999||g.c.year<0;let j="";if(p&&g.c.year>=0&&(j+="+"),j+=st(g.c.year,p?6:4),h==="year")return j;if(i){if(j+="-",j+=st(g.c.month),h==="month")return j;j+="-"}else if(j+=st(g.c.month),h==="month")return j;return j+=st(g.c.day),j}function ir(g,i,h,p,j,D,L){let H=!h||g.c.millisecond!==0||g.c.second!==0,V="";switch(L){case"day":case"month":case"year":break;default:if(V+=st(g.c.hour),L==="hour")break;if(i){if(V+=":",V+=st(g.c.minute),L==="minute")break;H&&(V+=":",V+=st(g.c.second))}else{if(V+=st(g.c.minute),L==="minute")break;H&&(V+=st(g.c.second))}if(L==="second")break;H&&(!p||g.c.millisecond!==0)&&(V+=".",V+=st(g.c.millisecond,3))}return j&&(g.isOffsetFixed&&g.offset===0&&!D?V+="Z":g.o<0?(V+="-",V+=st(Math.trunc(-g.o/60)),V+=":",V+=st(Math.trunc(-g.o%60))):(V+="+",V+=st(Math.trunc(g.o/60)),V+=":",V+=st(Math.trunc(g.o%60)))),D&&(V+="["+g.zone.ianaName+"]"),V}const Ga={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Bu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ur={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Pa=["year","month","day","hour","minute","second","millisecond"],ci=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Vu=["year","ordinal","hour","minute","second","millisecond"];function Nl(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 m(g);return i}function oi(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Nl(g)}}function ba(g){if(cn===void 0&&(cn=gt.now()),g.type!=="iana")return g.offset(cn);const i=g.name;let h=ua.get(i);return h===void 0&&(h=g.offset(cn),ua.set(i,h)),h}function Ln(g,i){const h=Pt(i.zone,gt.defaultZone);if(!h.isValid)return Ee.invalid(Ya(h));const p=Xe.fromObject(i);let j,D;if(De(g.year))j=gt.now();else{for(const V of Pa)De(g[V])&&(g[V]=Ga[V]);const L=Fs(g)||Dn(g);if(L)return Ee.invalid(L);const H=ba(h);[j,D]=ps(g,H,h)}return new Ee({ts:j,zone:h,loc:p,o:D})}function Hn(g,i,h){const p=De(h.round)?!0:h.round,j=De(h.rounding)?"trunc":h.rounding,D=(H,V)=>(H=Xl(H,p||h.calendary?0:2,h.calendary?"round":j),i.loc.clone(h).relFormatter(h).format(H,V)),L=H=>h.calendary?i.hasSame(g,H)?0:i.startOf(H).diff(g.startOf(H),H).get(H):i.diff(g,H).get(H);if(h.unit)return D(L(h.unit),h.unit);for(const H of h.units){const V=L(H);if(Math.abs(V)>=1)return D(V,H)}return D(g>i?-0:0,h.units[h.units.length-1])}function bs(g){let i={},h;return g.length>0&&typeof g[g.length-1]=="object"?(i=g[g.length-1],h=Array.from(g).slice(0,g.length-1)):h=Array.from(g),[i,h]}let cn;const ua=new Map;class Ee{constructor(i){const h=i.zone||gt.defaultZone;let p=i.invalid||(Number.isNaN(i.ts)?new xa("invalid input"):null)||(h.isValid?null:Ya(h));this.ts=De(i.ts)?gt.now():i.ts;let j=null,D=null;if(!p)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(h))[j,D]=[i.old.c,i.old.o];else{const H=ya(i.o)&&!i.old?i.o:h.offset(this.ts);j=Fa(this.ts,H),p=Number.isNaN(j.year)?new xa("invalid input"):null,j=p?null:j,D=p?null:H}this._zone=h,this.loc=i.loc||Xe.create(),this.invalid=p,this.weekData=null,this.localWeekData=null,this.c=j,this.o=D,this.isLuxonDateTime=!0}static now(){return new Ee({})}static local(){const[i,h]=bs(arguments),[p,j,D,L,H,V,he]=h;return Ln({year:p,month:j,day:D,hour:L,minute:H,second:V,millisecond:he},i)}static utc(){const[i,h]=bs(arguments),[p,j,D,L,H,V,he]=h;return i.zone=pt.utcInstance,Ln({year:p,month:j,day:D,hour:L,minute:H,second:V,millisecond:he},i)}static fromJSDate(i,h={}){const p=xu(i)?i.valueOf():NaN;if(Number.isNaN(p))return Ee.invalid("invalid input");const j=Pt(h.zone,gt.defaultZone);return j.isValid?new Ee({ts:p,zone:j,loc:Xe.fromObject(h)}):Ee.invalid(Ya(j))}static fromMillis(i,h={}){if(ya(i))return i<-da||i>da?Ee.invalid("Timestamp out of range"):new Ee({ts:i,zone:Pt(h.zone,gt.defaultZone),loc:Xe.fromObject(h)});throw new v(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,h={}){if(ya(i))return new Ee({ts:i*1e3,zone:Pt(h.zone,gt.defaultZone),loc:Xe.fromObject(h)});throw new v("fromSeconds requires a numerical input")}static fromObject(i,h={}){i=i||{};const p=Pt(h.zone,gt.defaultZone);if(!p.isValid)return Ee.invalid(Ya(p));const j=Xe.fromObject(h),D=ln(i,oi),{minDaysInFirstWeek:L,startOfWeek:H}=mu(D,j),V=gt.now(),he=De(h.specificOffset)?p.offset(V):h.specificOffset,ve=!De(D.ordinal),Ue=!De(D.year),We=!De(D.month)||!De(D.day),Re=Ue||We,jt=D.weekYear||D.weekNumber;if((Re||ve)&&jt)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(We&&ve)throw new f("Can't mix ordinal dates with month/day");const Bt=jt||D.weekday&&!Re;let Vt,jn,on=Fa(V,he);Bt?(Vt=ci,jn=Bu,on=Lt(on,L,H)):ve?(Vt=Vu,jn=ur,on=Ql(on)):(Vt=Pa,jn=Ga);let cr=!1;for(const Qa of Vt){const or=D[Qa];De(or)?cr?D[Qa]=jn[Qa]:D[Qa]=on[Qa]:cr=!0}const qn=Bt?gu(D,L,H):ve?Il(D):Fs(D),Wa=qn||Dn(D);if(Wa)return Ee.invalid(Wa);const wn=Bt?On(D,L,H):ve?hu(D):D,[dn,di]=ps(wn,he,p),Bn=new Ee({ts:dn,zone:p,o:di,loc:j});return D.weekday&&Re&&i.weekday!==Bn.weekday?Ee.invalid("mismatched weekday",`you can't specify both a weekday of ${D.weekday} and a date of ${Bn.toISO()}`):Bn.isValid?Bn:Ee.invalid(Bn.invalid)}static fromISO(i,h={}){const[p,j]=Tu(i);return Da(p,j,h,"ISO 8601",i)}static fromRFC2822(i,h={}){const[p,j]=Mu(i);return Da(p,j,h,"RFC 2822",i)}static fromHTTP(i,h={}){const[p,j]=Cu(i);return Da(p,j,h,"HTTP",h)}static fromFormat(i,h,p={}){if(De(i)||De(h))throw new v("fromFormat requires an input string and a format");const{locale:j=null,numberingSystem:D=null}=p,L=Xe.fromOpts({locale:j,numberingSystem:D,defaultToEN:!0}),[H,V,he,ve]=ui(L,i,h);return ve?Ee.invalid(ve):Da(H,V,p,`format ${h}`,i,he)}static fromString(i,h,p={}){return Ee.fromFormat(i,h,p)}static fromSQL(i,h={}){const[p,j]=Ru(i);return Da(p,j,h,"SQL",i)}static invalid(i,h=null){if(!i)throw new v("need to specify a reason the DateTime is invalid");const p=i instanceof xa?i:new xa(i,h);if(gt.throwOnInvalid)throw new r(p);return new Ee({invalid:p})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,h={}){const p=va(i,Xe.fromObject(h));return p?p.map(j=>j?j.val:null).join(""):null}static expandFormat(i,h={}){return qu(Ht.parseFormat(i),Xe.fromObject(h)).map(j=>j.val).join("")}static resetCache(){cn=void 0,ua.clear()}get(i){return this[i]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ys(this).weekYear:NaN}get weekNumber(){return this.isValid?ys(this).weekNumber:NaN}get weekday(){return this.isValid?ys(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Sl(this).weekday:NaN}get localWeekNumber(){return this.isValid?Sl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Sl(this).weekYear:NaN}get ordinal(){return this.isValid?Ql(this.c).ordinal:NaN}get monthShort(){return this.isValid?ms.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ms.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ms.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ms.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const i=864e5,h=6e4,p=Qt(this.c),j=this.zone.offset(p-i),D=this.zone.offset(p+i),L=this.zone.offset(p-j*h),H=this.zone.offset(p-D*h);if(L===H)return[this];const V=p-L*h,he=p-H*h,ve=Fa(V,L),Ue=Fa(he,H);return ve.hour===Ue.hour&&ve.minute===Ue.minute&&ve.second===Ue.second&&ve.millisecond===Ue.millisecond?[$a(this,{ts:V}),$a(this,{ts:he})]:[this]}get isInLeapYear(){return cl(this.year)}get daysInMonth(){return Ps(this.year,this.month)}get daysInYear(){return this.isValid?nn(this.year):NaN}get weeksInWeekYear(){return this.isValid?ol(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ol(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:h,numberingSystem:p,calendar:j}=Ht.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:h,numberingSystem:p,outputCalendar:j}}toUTC(i=0,h={}){return this.setZone(pt.instance(i),h)}toLocal(){return this.setZone(gt.defaultZone)}setZone(i,{keepLocalTime:h=!1,keepCalendarTime:p=!1}={}){if(i=Pt(i,gt.defaultZone),i.equals(this.zone))return this;if(i.isValid){let j=this.ts;if(h||p){const D=i.offset(this.ts),L=this.toObject();[j]=ps(L,D,i)}return $a(this,{ts:j,zone:i})}else return Ee.invalid(Ya(i))}reconfigure({locale:i,numberingSystem:h,outputCalendar:p}={}){const j=this.loc.clone({locale:i,numberingSystem:h,outputCalendar:p});return $a(this,{loc:j})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const h=ln(i,oi),{minDaysInFirstWeek:p,startOfWeek:j}=mu(h,this.loc),D=!De(h.weekYear)||!De(h.weekNumber)||!De(h.weekday),L=!De(h.ordinal),H=!De(h.year),V=!De(h.month)||!De(h.day),he=H||V,ve=h.weekYear||h.weekNumber;if((he||L)&&ve)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(V&&L)throw new f("Can't mix ordinal dates with month/day");let Ue;D?Ue=On({...Lt(this.c,p,j),...h},p,j):De(h.ordinal)?(Ue={...this.toObject(),...h},De(h.day)&&(Ue.day=Math.min(Ps(Ue.year,Ue.month),Ue.day))):Ue=hu({...Ql(this.c),...h});const[We,Re]=ps(Ue,this.o,this.zone);return $a(this,{ts:We,o:Re})}plus(i){if(!this.isValid)return this;const h=Ze.fromDurationLike(i);return $a(this,vs(this,h))}minus(i){if(!this.isValid)return this;const h=Ze.fromDurationLike(i).negate();return $a(this,vs(this,h))}startOf(i,{useLocaleWeeks:h=!1}={}){if(!this.isValid)return this;const p={},j=Ze.normalizeUnit(i);switch(j){case"years":p.month=1;case"quarters":case"months":p.day=1;case"weeks":case"days":p.hour=0;case"hours":p.minute=0;case"minutes":p.second=0;case"seconds":p.millisecond=0;break}if(j==="weeks")if(h){const D=this.loc.getStartOfWeek(),{weekday:L}=this;L<D&&(p.weekNumber=this.weekNumber-1),p.weekday=D}else p.weekday=1;if(j==="quarters"){const D=Math.ceil(this.month/3);p.month=(D-1)*3+1}return this.set(p)}endOf(i,h){return this.isValid?this.plus({[i]:1}).startOf(i,h).minus(1):this}toFormat(i,h={}){return this.isValid?Ht.create(this.loc.redefaultToEN(h)).formatDateTimeFromString(this,i):bl}toLocaleString(i=T,h={}){return this.isValid?Ht.create(this.loc.clone(h),i).formatDateTime(this):bl}toLocaleParts(i={}){return this.isValid?Ht.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:h=!1,suppressMilliseconds:p=!1,includeOffset:j=!0,extendedZone:D=!1,precision:L="milliseconds"}={}){if(!this.isValid)return null;L=Nl(L);const H=i==="extended";let V=Xt(this,H,L);return Pa.indexOf(L)>=3&&(V+="T"),V+=ir(this,H,h,p,j,D,L),V}toISODate({format:i="extended",precision:h="day"}={}){return this.isValid?Xt(this,i==="extended",Nl(h)):null}toISOWeekDate(){return rr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:h=!1,includeOffset:p=!0,includePrefix:j=!1,extendedZone:D=!1,format:L="extended",precision:H="milliseconds"}={}){return this.isValid?(H=Nl(H),(j&&Pa.indexOf(H)>=3?"T":"")+ir(this,L==="extended",h,i,p,D,H)):null}toRFC2822(){return rr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return rr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Xt(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:h=!1,includeOffsetSpace:p=!0}={}){let j="HH:mm:ss.SSS";return(h||i)&&(p&&(j+=" "),h?j+="z":i&&(j+="ZZ")),rr(this,j,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():bl}[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 h={...this.c};return i.includeConfig&&(h.outputCalendar=this.outputCalendar,h.numberingSystem=this.loc.numberingSystem,h.locale=this.loc.locale),h}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(i,h="milliseconds",p={}){if(!this.isValid||!i.isValid)return Ze.invalid("created by diffing an invalid DateTime");const j={locale:this.locale,numberingSystem:this.numberingSystem,...p},D=ul(h).map(Ze.normalizeUnit),L=i.valueOf()>this.valueOf(),H=L?this:i,V=L?i:this,he=ku(H,V,D,j);return L?he.negate():he}diffNow(i="milliseconds",h={}){return this.diff(Ee.now(),i,h)}until(i){return this.isValid?vt.fromDateTimes(this,i):this}hasSame(i,h,p){if(!this.isValid)return!1;const j=i.valueOf(),D=this.setZone(i.zone,{keepLocalTime:!0});return D.startOf(h,p)<=j&&j<=D.endOf(h,p)}equals(i){return this.isValid&&i.isValid&&this.valueOf()===i.valueOf()&&this.zone.equals(i.zone)&&this.loc.equals(i.loc)}toRelative(i={}){if(!this.isValid)return null;const h=i.base||Ee.fromObject({},{zone:this.zone}),p=i.padding?this<h?-i.padding:i.padding:0;let j=["years","months","days","hours","minutes","seconds"],D=i.unit;return Array.isArray(i.unit)&&(j=i.unit,D=void 0),Hn(h,this.plus(p),{...i,numeric:"always",units:j,unit:D})}toRelativeCalendar(i={}){return this.isValid?Hn(i.base||Ee.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(Ee.isDateTime))throw new v("min requires all arguments be DateTimes");return yu(i,h=>h.valueOf(),Math.min)}static max(...i){if(!i.every(Ee.isDateTime))throw new v("max requires all arguments be DateTimes");return yu(i,h=>h.valueOf(),Math.max)}static fromFormatExplain(i,h,p={}){const{locale:j=null,numberingSystem:D=null}=p,L=Xe.fromOpts({locale:j,numberingSystem:D,defaultToEN:!0});return ii(L,i,h)}static fromStringExplain(i,h,p={}){return Ee.fromFormatExplain(i,h,p)}static buildFormatParser(i,h={}){const{locale:p=null,numberingSystem:j=null}=h,D=Xe.fromOpts({locale:p,numberingSystem:j,defaultToEN:!0});return new ri(D,i)}static fromFormatParser(i,h,p={}){if(De(i)||De(h))throw new v("fromFormatParser requires an input string and a format parser");const{locale:j=null,numberingSystem:D=null}=p,L=Xe.fromOpts({locale:j,numberingSystem:D,defaultToEN:!0});if(!L.equals(h.locale))throw new v(`fromFormatParser called with a locale of ${L}, but the format parser was created for ${h.locale}`);const{result:H,zone:V,specificOffset:he,invalidReason:ve}=h.explainFromTokens(i);return ve?Ee.invalid(ve):Da(H,V,p,`format ${h.format}`,i,he)}static get DATE_SHORT(){return T}static get DATE_MED(){return w}static get DATE_MED_WITH_WEEKDAY(){return R}static get DATE_FULL(){return C}static get DATE_HUGE(){return M}static get TIME_SIMPLE(){return A}static get TIME_WITH_SECONDS(){return Q}static get TIME_WITH_SHORT_OFFSET(){return B}static get TIME_WITH_LONG_OFFSET(){return X}static get TIME_24_SIMPLE(){return K}static get TIME_24_WITH_SECONDS(){return fe}static get TIME_24_WITH_SHORT_OFFSET(){return G}static get TIME_24_WITH_LONG_OFFSET(){return F}static get DATETIME_SHORT(){return P}static get DATETIME_SHORT_WITH_SECONDS(){return ae}static get DATETIME_MED(){return O}static get DATETIME_MED_WITH_SECONDS(){return ne}static get DATETIME_MED_WITH_WEEKDAY(){return k}static get DATETIME_FULL(){return ce}static get DATETIME_FULL_WITH_SECONDS(){return te}static get DATETIME_HUGE(){return me}static get DATETIME_HUGE_WITH_SECONDS(){return Y}}function Sa(g){if(Ee.isDateTime(g))return g;if(g&&g.valueOf&&ya(g.valueOf()))return Ee.fromJSDate(g);if(g&&typeof g=="object")return Ee.fromObject(g);throw new v(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Za="3.7.2";return Ma.DateTime=Ee,Ma.Duration=Ze,Ma.FixedOffsetZone=pt,Ma.IANAZone=we,Ma.Info=ms,Ma.Interval=vt,Ma.InvalidZone=la,Ma.Settings=gt,Ma.SystemZone=Me,Ma.VERSION=Za,Ma.Zone=re,Ma}var qg;function sh(){return qg||(qg=1,(function(l){var m,v,N,S,x,zf,T,Yl;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const r=fS();var o;(function(C){C.Second="Second",C.Minute="Minute",C.Hour="Hour",C.Day="Day",C.Month="Month",C.Year="Year"})(o||(l.TimeUnit=o={}));var c;(function(C){C.Add="Add",C.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 R=class R{constructor(M,A){lt(this,T);lt(this,m);lt(this,v,null);lt(this,N,null);lt(this,S,{add:{[o.Year]:this.addYear.bind(this),[o.Month]:this.addMonth.bind(this),[o.Day]:this.addDay.bind(this),[o.Hour]:this.addHour.bind(this),[o.Minute]:this.addMinute.bind(this),[o.Second]:this.addSecond.bind(this)},subtract:{[o.Year]:this.subtractYear.bind(this),[o.Month]:this.subtractMonth.bind(this),[o.Day]:this.subtractDay.bind(this),[o.Hour]:this.subtractHour.bind(this),[o.Minute]:this.subtractMinute.bind(this),[o.Second]:this.subtractSecond.bind(this)}});const Q={zone:A};if(M?M instanceof R?(Te(this,m,J(M,m)),Te(this,v,J(M,v)),Te(this,N,J(M,N))):M instanceof Date?Te(this,m,r.DateTime.fromJSDate(M,Q)):typeof M=="number"?Te(this,m,r.DateTime.fromMillis(M,Q)):(Te(this,m,r.DateTime.fromISO(M,Q)),J(this,m).isValid||Te(this,m,r.DateTime.fromRFC2822(M,Q)),J(this,m).isValid||Te(this,m,r.DateTime.fromSQL(M,Q)),J(this,m).isValid||Te(this,m,r.DateTime.fromFormat(M,"EEE, d MMM yyyy HH:mm:ss",Q))):Te(this,m,r.DateTime.local()),!J(this,m).isValid)throw new Error(`CronDate: unhandled timestamp: ${M}`);A&&A!==J(this,m).zoneName&&Te(this,m,J(this,m).setZone(A))}get dstStart(){return J(this,v)}set dstStart(M){Te(this,v,M)}get dstEnd(){return J(this,N)}set dstEnd(M){Te(this,N,M)}addYear(){Te(this,m,J(this,m).plus({years:1}))}addMonth(){Te(this,m,J(this,m).plus({months:1}).startOf("month"))}addDay(){Te(this,m,J(this,m).plus({days:1}).startOf("day"))}addHour(){Te(this,m,J(this,m).plus({hours:1}).startOf("hour"))}addMinute(){Te(this,m,J(this,m).plus({minutes:1}).startOf("minute"))}addSecond(){Te(this,m,J(this,m).plus({seconds:1}))}subtractYear(){Te(this,m,J(this,m).minus({years:1}))}subtractMonth(){Te(this,m,J(this,m).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Te(this,m,J(this,m).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Te(this,m,J(this,m).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Te(this,m,J(this,m).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Te(this,m,J(this,m).minus({seconds:1}))}addUnit(M){J(this,S).add[M]()}subtractUnit(M){J(this,S).subtract[M]()}invokeDateOperation(M,A){if(M===c.Add){this.addUnit(A);return}if(M===c.Subtract){this.subtractUnit(A);return}throw new Error(`Invalid verb: ${M}`)}getDate(){return J(this,m).day}getFullYear(){return J(this,m).year}getDay(){const M=J(this,m).weekday;return M===7?0:M}getMonth(){return J(this,m).month-1}getHours(){return J(this,m).hour}getMinutes(){return J(this,m).minute}getSeconds(){return J(this,m).second}getMilliseconds(){return J(this,m).millisecond}getUTCOffset(){return J(this,m).offset}setStartOfDay(){Te(this,m,J(this,m).startOf("day"))}setEndOfDay(){Te(this,m,J(this,m).endOf("day"))}getTime(){return J(this,m).valueOf()}getUTCDate(){return je(this,T,Yl).call(this).day}getUTCFullYear(){return je(this,T,Yl).call(this).year}getUTCDay(){const M=je(this,T,Yl).call(this).weekday;return M===7?0:M}getUTCMonth(){return je(this,T,Yl).call(this).month-1}getUTCHours(){return je(this,T,Yl).call(this).hour}getUTCMinutes(){return je(this,T,Yl).call(this).minute}getUTCSeconds(){return je(this,T,Yl).call(this).second}toISOString(){return J(this,m).toUTC().toISO()}toJSON(){return J(this,m).toJSON()}setDate(M){Te(this,m,J(this,m).set({day:M}))}setFullYear(M){Te(this,m,J(this,m).set({year:M}))}setDay(M){Te(this,m,J(this,m).set({weekday:M}))}setMonth(M){Te(this,m,J(this,m).set({month:M+1}))}setHours(M){Te(this,m,J(this,m).set({hour:M}))}setMinutes(M){Te(this,m,J(this,m).set({minute:M}))}setSeconds(M){Te(this,m,J(this,m).set({second:M}))}setMilliseconds(M){Te(this,m,J(this,m).set({millisecond:M}))}toString(){return this.toDate().toString()}toDate(){return J(this,m).toJSDate()}isLastDayOfMonth(){var Q;const{day:M,month:A}=J(this,m);if(A===2){const B=je(Q=R,x,zf).call(Q,J(this,m).year);return M===l.DAYS_IN_MONTH[A-1]-(B?0:1)}return M===l.DAYS_IN_MONTH[A-1]}isLastWeekdayOfMonth(){var B;const{day:M,month:A}=J(this,m);let Q;return A===2?Q=l.DAYS_IN_MONTH[A-1]-(je(B=R,x,zf).call(B,J(this,m).year)?0:1):Q=l.DAYS_IN_MONTH[A-1],M>Q-7}applyDateOperation(M,A,Q){if(A===o.Month||A===o.Day){this.invokeDateOperation(M,A);return}const B=this.getHours();this.invokeDateOperation(M,A);const X=this.getHours(),K=X-B;K===2?Q!==24&&(this.dstStart=X):K===0&&this.getMinutes()===0&&this.getSeconds()===0&&Q!==24&&(this.dstEnd=X)}};m=new WeakMap,v=new WeakMap,N=new WeakMap,S=new WeakMap,x=new WeakSet,zf=function(M){return M%4===0&&M%100!==0||M%400===0},T=new WeakSet,Yl=function(){return J(this,m).toUTC()},lt(R,x);let f=R;l.CronDate=f,l.default=f})(wf)),wf}var Bg;function hS(){if(Bg)return Xi;Bg=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronMonth=void 0;const l=sh(),r=qs(),o=1,c=12,f=Object.freeze([]);let m=class extends r.CronField{static get min(){return o}static get max(){return c}static get chars(){return f}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(N,S){super(N,S),this.validate()}get values(){return super.values}};return Xi.CronMonth=m,Xi}var Ji={},Vg;function mS(){if(Vg)return Ji;Vg=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronSecond=void 0;const l=qs(),r=0,o=59,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return o}static get chars(){return c}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Ji.CronSecond=f,Ji}var Yg;function rh(){return Yg||(Yg=1,(function(l){var r=Rs&&Rs.__createBinding||(Object.create?(function(c,f,m,v){v===void 0&&(v=m);var N=Object.getOwnPropertyDescriptor(f,m);(!N||("get"in N?!f.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return f[m]}}),Object.defineProperty(c,v,N)}):(function(c,f,m,v){v===void 0&&(v=m),c[v]=f[m]})),o=Rs&&Rs.__exportStar||function(c,f){for(var m in c)m!=="default"&&!Object.prototype.hasOwnProperty.call(f,m)&&r(f,c,m)};Object.defineProperty(l,"__esModule",{value:!0}),o(iS(),l),o(uS(),l),o(cS(),l),o(qs(),l),o(oS(),l),o(dS(),l),o(hS(),l),o(mS(),l)})(Rs)),Rs}var $g;function ay(){var o,c,f,m,v,N,S,x,ey,ty;if($g)return Gi;$g=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.CronFieldCollection=void 0;const l=rh();let r=(x=class{constructor({second:R,minute:C,hour:M,dayOfMonth:A,month:Q,dayOfWeek:B}){lt(this,o);lt(this,c);lt(this,f);lt(this,m);lt(this,v);lt(this,N);if(!R)throw new Error("Validation error, Field second is missing");if(!C)throw new Error("Validation error, Field minute is missing");if(!M)throw new Error("Validation error, Field hour is missing");if(!A)throw new Error("Validation error, Field dayOfMonth is missing");if(!Q)throw new Error("Validation error, Field month is missing");if(!B)throw new Error("Validation error, Field dayOfWeek is missing");if(Q.values.length===1&&!A.hasLastChar&&!(parseInt(A.values[0],10)<=l.CronMonth.daysInMonth[Q.values[0]-1]))throw new Error("Invalid explicit day of month definition");Te(this,o,R),Te(this,c,C),Te(this,f,M),Te(this,v,Q),Te(this,N,B),Te(this,m,A)}static from(R,C){return new x({second:this.resolveField(l.CronSecond,R.second,C.second),minute:this.resolveField(l.CronMinute,R.minute,C.minute),hour:this.resolveField(l.CronHour,R.hour,C.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,R.dayOfMonth,C.dayOfMonth),month:this.resolveField(l.CronMonth,R.month,C.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,R.dayOfWeek,C.dayOfWeek)})}static resolveField(R,C,M){return M?M instanceof l.CronField?M:new R(M):C}get second(){return J(this,o)}get minute(){return J(this,c)}get hour(){return J(this,f)}get dayOfMonth(){return J(this,m)}get month(){return J(this,v)}get dayOfWeek(){return J(this,N)}static compactField(R){if(R.length===0)return[];const C=[];let M;return R.forEach((A,Q,B)=>{if(M===void 0){M={start:A,count:1};return}const X=B[Q-1]||M.start,K=B[Q+1];if(A==="L"||A==="W"){C.push(M),C.push({start:A,count:1}),M=void 0;return}if(M.step===void 0&&K!==void 0){const fe=A-X,G=K-A;if(fe<=G){M={...M,count:2,end:A,step:fe};return}M.step=1}A-(M.end??0)===M.step?(M.count++,M.end=A):(M.count===1?C.push({start:M.start,count:1}):M.count===2?(C.push({start:M.start,count:1}),C.push({start:M.end??X,count:1})):C.push(M),M={start:A,count:1})}),M&&C.push(M),C}stringifyField(R){var Q;let C=R.max,M=R.values;if(R instanceof l.CronDayOfWeek){C=6;const B=J(this,N).values;M=B[B.length-1]===7?B.slice(0,-1):B}R instanceof l.CronDayOfMonth&&(C=J(this,v).values.length===1?l.CronMonth.daysInMonth[J(this,v).values[0]-1]:R.max);const A=x.compactField(M);if(A.length===1){const B=je(Q=x,S,ey).call(Q,R,A[0],C);if(B)return B}return A.map(B=>{var K;const X=B.count===1?B.start.toString():je(K=x,S,ty).call(K,B,C);return R instanceof l.CronDayOfWeek&&R.nthDay>0?`${X}#${R.nthDay}`:X}).join(",")}stringify(R=!1){const C=[];return R&&C.push(this.stringifyField(J(this,o))),C.push(this.stringifyField(J(this,c)),this.stringifyField(J(this,f)),this.stringifyField(J(this,m)),this.stringifyField(J(this,v)),this.stringifyField(J(this,N))),C.join(" ")}serialize(){return{second:J(this,o).serialize(),minute:J(this,c).serialize(),hour:J(this,f).serialize(),dayOfMonth:J(this,m).serialize(),month:J(this,v).serialize(),dayOfWeek:J(this,N).serialize()}}},o=new WeakMap,c=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakMap,N=new WeakMap,S=new WeakSet,ey=function(R,C,M){const A=C.step;return A?A===1&&C.start===R.min&&C.end&&C.end>=M?R.hasQuestionMarkChar?"?":"*":A!==1&&C.start===R.min&&C.end&&C.end>=M-A+1?`*/${A}`:null:null},ty=function(R,C){const M=R.step;if(M===1)return`${R.start}-${R.end}`;const A=R.start===0?R.count-1:R.count;if(!M)throw new Error("Unexpected range step");if(!R.end)throw new Error("Unexpected range end");if(M*A>R.end){const Q=(X,K)=>{if(typeof R.start!="number")throw new Error("Unexpected range start");return K%M===0?R.start+K:null};if(typeof R.start!="number")throw new Error("Unexpected range start");const B={length:R.end-R.start+1};return Array.from(B,Q).filter(X=>X!==null).join(",")}return R.end===C-M+1?`${R.start}/${M}`:`${R.start}-${R.end}/${M}`},lt(x,S),x);return Gi.CronFieldCollection=r,Gi}var Ef={},Fg;function cy(){return Fg||(Fg=1,(function(l){var f,m,v,N,S,x,b,T,w,$l,C,_s,ny,ly,sy,ry,Uf,iy,uy,Ar;Object.defineProperty(l,"__esModule",{value:!0}),l.CronExpression=l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const r=sh();l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const o=1e4,P=class P{constructor(O,ne){lt(this,C);lt(this,f);lt(this,m);lt(this,v);lt(this,N);lt(this,S);lt(this,x);lt(this,b,null);lt(this,T,!1);Te(this,f,ne),Te(this,m,ne.tz),Te(this,N,ne.startDate?new r.CronDate(ne.startDate,J(this,m)):null),Te(this,S,ne.endDate?new r.CronDate(ne.endDate,J(this,m)):null);let k=ne.currentDate??ne.startDate;if(k){const ce=new r.CronDate(k,J(this,m));J(this,N)&&ce.getTime()<J(this,N).getTime()?k=J(this,N):J(this,S)&&ce.getTime()>J(this,S).getTime()&&(k=J(this,S))}Te(this,v,new r.CronDate(k,J(this,m))),Te(this,x,O)}get fields(){return J(this,x)}static fieldsToExpression(O,ne){return new P(O,ne||{})}next(){return je(this,C,Ar).call(this)}prev(){return je(this,C,Ar).call(this,!0)}hasNext(){const O=J(this,v);try{return je(this,C,Ar).call(this),!0}catch{return!1}finally{Te(this,v,O)}}hasPrev(){const O=J(this,v);try{return je(this,C,Ar).call(this,!0),!0}catch{return!1}finally{Te(this,v,O)}}take(O){const ne=[];if(O>=0)for(let k=0;k<O;k++)try{ne.push(this.next())}catch{return ne}else for(let k=0;k>O;k--)try{ne.push(this.prev())}catch{return ne}return ne}reset(O){Te(this,v,new r.CronDate(O||J(this,f).currentDate))}stringify(O=!1){return J(this,x).stringify(O)}includesDate(O){const{second:ne,minute:k,hour:ce,month:te}=J(this,x),me=new r.CronDate(O,J(this,m));return!(!ne.values.includes(me.getSeconds())||!k.values.includes(me.getMinutes())||!ce.values.includes(me.getHours())||!te.values.includes(me.getMonth()+1)||!je(this,C,Uf).call(this,me)||J(this,x).dayOfWeek.nthDay>0&&Math.ceil(me.getDate()/7)!==J(this,x).dayOfWeek.nthDay)}toString(){return J(this,f).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:je(this,C,Ar).call(this),done:!this.hasNext()})}}};f=new WeakMap,m=new WeakMap,v=new WeakMap,N=new WeakMap,S=new WeakMap,x=new WeakMap,b=new WeakMap,T=new WeakMap,w=new WeakSet,$l=function(O,ne){return ne.some(k=>k===O)},C=new WeakSet,_s=function(O,ne){return O[ne?O.length-1:0]},ny=function(O){const ne=`${O.getFullYear()}-${O.getMonth()+1}-${O.getDate()}`;if(J(this,b)===ne)return J(this,T);const k=new r.CronDate(O);k.setStartOfDay();const ce=new r.CronDate(O);return ce.setEndOfDay(),Te(this,b,ne),Te(this,T,k.getUTCOffset()!==ce.getUTCOffset()),J(this,T)},ly=function(O,ne,k){const ce=J(this,x).second.values,te=O.getSeconds(),me=J(this,x).second.findNearestValue(te,k);if(me!==null){O.setSeconds(me);return}O.applyDateOperation(ne,r.TimeUnit.Minute,J(this,x).hour.values.length),O.setSeconds(je(this,C,_s).call(this,ce,k))},sy=function(O,ne,k){const ce=J(this,x).minute.values,te=J(this,x).second.values,me=O.getMinutes(),Y=J(this,x).minute.findNearestValue(me,k);if(Y!==null){O.setMinutes(Y),O.setSeconds(je(this,C,_s).call(this,te,k));return}O.applyDateOperation(ne,r.TimeUnit.Hour,J(this,x).hour.values.length),O.setMinutes(je(this,C,_s).call(this,ce,k)),O.setSeconds(je(this,C,_s).call(this,te,k))},ry=function(O,ne){const k=ne.isLastWeekdayOfMonth();return O.some(ce=>{const te=parseInt(ce.toString().charAt(0),10)%7;if(Number.isNaN(te))throw new Error(`Invalid last weekday of the month expression: ${ce}`);return ne.getDay()===te&&k})},Uf=function(O){var re,ye,Me;const ne=J(this,x).dayOfMonth.isWildcard,k=!ne,ce=J(this,x).dayOfWeek.isWildcard,te=!ce,me=je(re=P,w,$l).call(re,O.getDate(),J(this,x).dayOfMonth.values)||J(this,x).dayOfMonth.hasLastChar&&O.isLastDayOfMonth(),Y=je(ye=P,w,$l).call(ye,O.getDay(),J(this,x).dayOfWeek.values)||J(this,x).dayOfWeek.hasLastChar&&je(Me=P,w,ry).call(Me,J(this,x).dayOfWeek.values,O);return!!(k&&te&&(me||Y)||me&&!te||ne&&!ce&&Y)},iy=function(O,ne,k){var Ne,_;const ce=J(this,x).hour.values,te=ce,me=O.getHours(),Y=je(Ne=P,w,$l).call(Ne,me,ce),re=O.dstStart===me,ye=O.dstEnd===me;if(re)return je(_=P,w,$l).call(_,me-1,ce)?!0:(O.invokeDateOperation(ne,r.TimeUnit.Hour),!1);if(ye&&!k)return O.dstEnd=null,O.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,te.length),!1;if(Y)return!0;O.dstStart=null;const Me=J(this,x).hour.findNearestValue(me,k);if(Me===null)return O.applyDateOperation(ne,r.TimeUnit.Day,te.length),!1;if(je(this,C,ny).call(this,O)){const le=k?me-Me:Me-me;for(let ge=0;ge<le;ge++)O.applyDateOperation(ne,r.TimeUnit.Hour,te.length)}else O.setHours(Me);return O.setMinutes(je(this,C,_s).call(this,J(this,x).minute.values,k)),O.setSeconds(je(this,C,_s).call(this,J(this,x).second.values,k)),!1},uy=function(O){if(!J(this,N)&&!J(this,S))return;const ne=O.getTime();if(J(this,N)&&ne<J(this,N).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(J(this,S)&&ne>J(this,S).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Ar=function(O=!1){var me,Y,re;const ne=O?r.DateMathOp.Subtract:r.DateMathOp.Add,k=new r.CronDate(J(this,v)),ce=k.getTime();let te=0;for(;++te<o;){if(je(this,C,uy).call(this,k),!je(this,C,Uf).call(this,k)){k.applyDateOperation(ne,r.TimeUnit.Day,J(this,x).hour.values.length);continue}if(!(J(this,x).dayOfWeek.nthDay<=0||Math.ceil(k.getDate()/7)===J(this,x).dayOfWeek.nthDay)){k.applyDateOperation(ne,r.TimeUnit.Day,J(this,x).hour.values.length);continue}if(!je(me=P,w,$l).call(me,k.getMonth()+1,J(this,x).month.values)){k.applyDateOperation(ne,r.TimeUnit.Month,J(this,x).hour.values.length);continue}if(je(this,C,iy).call(this,k,ne,O)){if(!je(Y=P,w,$l).call(Y,k.getMinutes(),J(this,x).minute.values)){je(this,C,sy).call(this,k,ne,O);continue}if(!je(re=P,w,$l).call(re,k.getSeconds(),J(this,x).second.values)){je(this,C,ly).call(this,k,ne,O);continue}if(ce===k.getTime()){(ne==="Add"||k.getMilliseconds()===0)&&k.applyDateOperation(ne,r.TimeUnit.Second,J(this,x).hour.values.length);continue}break}}if(te>o)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return k.getMilliseconds()!==0&&k.setMilliseconds(0),Te(this,v,k),k},lt(P,w);let c=P;l.CronExpression=c,l.default=c})(Ef)),Ef}var qc={},Gg;function gS(){if(Gg)return qc;Gg=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.seededRandom=o;function l(c){let f=2166136261;for(let m=0;m<c.length;m++)f^=c.charCodeAt(m),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 o(c){const f=c?l(c)():Math.floor(Math.random()*1e10);return r(f)}return qc}var Pg;function Hf(){var x,b,oy,zs,dy,fy,hy,my,gy,xy,yy,Lf,py,vy;if(Pg)return Ua;Pg=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.CronExpressionParser=Ua.DayOfWeek=Ua.Months=Ua.CronUnit=Ua.PredefinedExpressions=void 0;const l=ay(),r=cy(),o=gS(),c=rh();var f;(function(F){F["@yearly"]="0 0 0 1 1 *",F["@annually"]="0 0 0 1 1 *",F["@monthly"]="0 0 0 1 * *",F["@weekly"]="0 0 0 * * 0",F["@daily"]="0 0 0 * * *",F["@hourly"]="0 0 * * * *",F["@minutely"]="0 * * * * *",F["@secondly"]="* * * * * *",F["@weekdays"]="0 0 0 * * 1-5",F["@weekends"]="0 0 0 * * 0,6"})(f||(Ua.PredefinedExpressions=f={}));var m;(function(F){F.Second="Second",F.Minute="Minute",F.Hour="Hour",F.DayOfMonth="DayOfMonth",F.Month="Month",F.DayOfWeek="DayOfWeek"})(m||(Ua.CronUnit=m={}));var v;(function(F){F[F.jan=1]="jan",F[F.feb=2]="feb",F[F.mar=3]="mar",F[F.apr=4]="apr",F[F.may=5]="may",F[F.jun=6]="jun",F[F.jul=7]="jul",F[F.aug=8]="aug",F[F.sep=9]="sep",F[F.oct=10]="oct",F[F.nov=11]="nov",F[F.dec=12]="dec"})(v||(Ua.Months=v={}));var N;(function(F){F[F.sun=0]="sun",F[F.mon=1]="mon",F[F.tue=2]="tue",F[F.wed=3]="wed",F[F.thu=4]="thu",F[F.fri=5]="fri",F[F.sat=6]="sat"})(N||(Ua.DayOfWeek=N={}));let S=(b=class{static parse(P,ae={}){var ge,pe,Ce,we,He,xt,$e,Ft;const{strict:O=!1,hashSeed:ne}=ae,k=(0,o.seededRandom)(ne);P=f[P]||P;const ce=je(ge=b,x,oy).call(ge,P,O);if(!(ce.dayOfMonth==="*"||ce.dayOfWeek==="*"||!O))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const te=je(pe=b,x,zs).call(pe,m.Second,ce.second,c.CronSecond.constraints,k),me=je(Ce=b,x,zs).call(Ce,m.Minute,ce.minute,c.CronMinute.constraints,k),Y=je(we=b,x,zs).call(we,m.Hour,ce.hour,c.CronHour.constraints,k),re=je(He=b,x,zs).call(He,m.Month,ce.month,c.CronMonth.constraints,k),ye=je(xt=b,x,zs).call(xt,m.DayOfMonth,ce.dayOfMonth,c.CronDayOfMonth.constraints,k),{dayOfWeek:Me,nthDayOfWeek:Ne}=je($e=b,x,py).call($e,ce.dayOfWeek),_=je(Ft=b,x,zs).call(Ft,m.DayOfWeek,Me,c.CronDayOfWeek.constraints,k),le=new l.CronFieldCollection({second:new c.CronSecond(te,{rawValue:ce.second}),minute:new c.CronMinute(me,{rawValue:ce.minute}),hour:new c.CronHour(Y,{rawValue:ce.hour}),dayOfMonth:new c.CronDayOfMonth(ye,{rawValue:ce.dayOfMonth}),month:new c.CronMonth(re,{rawValue:ce.month}),dayOfWeek:new c.CronDayOfWeek(_,{rawValue:ce.dayOfWeek,nthDayOfWeek:Ne})});return new r.CronExpression(le,{...ae,expression:P})}},x=new WeakSet,oy=function(P,ae){if(ae&&!P.length)throw new Error("Invalid cron expression");P=P||"0 * * * * *";const O=P.trim().split(/\s+/);if(ae&&O.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(O.length>6)throw new Error("Invalid cron expression, too many fields");const ne=["*","*","*","*","*","0"];O.length<ne.length&&O.unshift(...ne.slice(O.length));const[k,ce,te,me,Y,re]=O;return{second:k,minute:ce,hour:te,dayOfMonth:me,month:Y,dayOfWeek:re}},zs=function(P,ae,O,ne){if((P===m.Month||P===m.DayOfWeek)&&(ae=ae.replace(/[a-z]{3}/gi,k=>{k=k.toLowerCase();const ce=v[k]||N[k];if(ce===void 0)throw new Error(`Validation error, cannot resolve alias "${k}"`);return ce.toString()})),!O.validChars.test(ae))throw new Error(`Invalid characters, got value: ${ae}`);return ae=je(this,x,dy).call(this,ae,O),ae=je(this,x,fy).call(this,ae,O,ne),je(this,x,hy).call(this,P,ae,O)},dy=function(P,ae){return P.replace(/[*?]/g,ae.min+"-"+ae.max)},fy=function(P,ae,O){const ne=O();return P.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(k,ce,te,me)=>{if(ce&&te&&me){const Y=parseInt(ce,10),re=parseInt(te,10),ye=parseInt(me,10);if(Y>re)throw new Error(`Invalid range: ${Y}-${re}, min > max`);if(ye<=0)throw new Error(`Invalid step: ${ye}, must be positive`);const Me=Math.max(Y,ae.min),Ne=Math.floor(ne*ye),_=[];for(let le=Math.floor(Me/ye)*ye+Ne;le<=re;le+=ye)le>=Me&&_.push(le);return _.join(",")}else if(ce&&te){const Y=parseInt(ce,10),re=parseInt(te,10);if(Y>re)throw new Error(`Invalid range: ${Y}-${re}, min > max`);return String(Math.floor(ne*(re-Y+1))+Y)}else if(me){const Y=parseInt(me,10);if(Y<=0)throw new Error(`Invalid step: ${Y}, must be positive`);const re=Math.floor(ne*Y),ye=[];for(let Me=Math.floor(ae.min/Y)*Y+re;Me<=ae.max;Me+=Y)Me>=ae.min&&ye.push(Me);return ye.join(",")}else return String(Math.floor(ne*(ae.max-ae.min+1)+ae.min))})},hy=function(P,ae,O){const ne=[];function k(te,me){var Y;if(Array.isArray(te))ne.push(...te);else if(je(Y=b,x,vy).call(Y,me,te))ne.push(te);else{const re=parseInt(te.toString(),10);if(!(re>=me.min&&re<=me.max))throw new Error(`Constraint error, got value ${te} expected range ${me.min}-${me.max}`);ne.push(P===m.DayOfWeek?re%7:te)}}return ae.split(",").forEach(te=>{var me;if(!(te.length>0))throw new Error("Invalid list value format");k(je(me=b,x,my).call(me,P,te,O),O)}),ne},my=function(P,ae,O){var k,ce;const ne=ae.split("/");if(ne.length>2)throw new Error(`Invalid repeat: ${ae}`);return ne.length===2?(isNaN(parseInt(ne[0],10))||(ne[0]=`${ne[0]}-${O.max}`),je(k=b,x,Lf).call(k,P,ne[0],parseInt(ne[1],10),O)):je(ce=b,x,Lf).call(ce,P,ae,1,O)},gy=function(P,ae,O){if(!(!isNaN(P)&&!isNaN(ae)&&P>=O.min&&ae<=O.max))throw new Error(`Constraint error, got range ${P}-${ae} expected range ${O.min}-${O.max}`);if(P>ae)throw new Error(`Invalid range: ${P}-${ae}, min(${P}) > max(${ae})`)},xy=function(P){if(!(!isNaN(P)&&P>0))throw new Error(`Constraint error, cannot repeat at every ${P} time.`)},yy=function(P,ae,O,ne){const k=[];P===m.DayOfWeek&&O%7===0&&k.push(0);for(let ce=ae;ce<=O;ce+=ne)k.indexOf(ce)===-1&&k.push(ce);return k},Lf=function(P,ae,O,ne){const k=ae.split("-");if(k.length<=1)return isNaN(+ae)?ae:+ae;const[ce,te]=k.map(me=>parseInt(me,10));return je(this,x,gy).call(this,ce,te,ne),je(this,x,xy).call(this,O),je(this,x,yy).call(this,P,ce,te,O)},py=function(P){const ae=P.split("#");if(ae.length<=1)return{dayOfWeek:ae[0]};const O=+ae[ae.length-1],ne=P.match(/([,-/])/);if(ne!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ne==null?void 0:ne[0]}\` special characters are incompatible`);if(!(ae.length<=2&&!isNaN(O)&&O>=1&&O<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:ae[0],nthDayOfWeek:O}},vy=function(P,ae){return P.chars.some(O=>ae.toString().includes(O))},lt(b,x),b);return Ua.CronExpressionParser=S,Ua}var mn={};const xS={},yS=Object.freeze(Object.defineProperty({__proto__:null,default:xS},Symbol.toStringTag,{value:"Module"})),Zg=Xp(yS);var Wg;function pS(){var m,v,qf,by;if(Wg)return mn;Wg=1;var l=mn&&mn.__createBinding||(Object.create?(function(x,b,T,w){w===void 0&&(w=T);var R=Object.getOwnPropertyDescriptor(b,T);(!R||("get"in R?!b.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return b[T]}}),Object.defineProperty(x,w,R)}):(function(x,b,T,w){w===void 0&&(w=T),x[w]=b[T]})),r=mn&&mn.__setModuleDefault||(Object.create?(function(x,b){Object.defineProperty(x,"default",{enumerable:!0,value:b})}):function(x,b){x.default=b}),o=mn&&mn.__importStar||(function(){var x=function(b){return x=Object.getOwnPropertyNames||function(T){var w=[];for(var R in T)Object.prototype.hasOwnProperty.call(T,R)&&(w[w.length]=R);return w},x(b)};return function(b){if(b&&b.__esModule)return b;var T={};if(b!=null)for(var w=x(b),R=0;R<w.length;R++)w[R]!=="default"&&l(T,b,w[R]);return r(T,b),T}})();Object.defineProperty(mn,"__esModule",{value:!0}),mn.CronFileParser=void 0;const c=Hf();let f=(v=class{static async parseFile(b){var R;const{readFile:T}=await Promise.resolve().then(()=>o(Zg)),w=await T(b,"utf8");return je(R=v,m,qf).call(R,w)}static parseFileSync(b){var R;const{readFileSync:T}=Zg,w=T(b,"utf8");return je(R=v,m,qf).call(R,w)}},m=new WeakSet,qf=function(b){var R;const T=b.split(`
386
- `),w={variables:{},expressions:[],errors:{}};for(const C of T){const M=C.trim();if(M.length===0||M.startsWith("#"))continue;const A=M.match(/^(.*)=(.*)$/);if(A){const[,Q,B]=A;w.variables[Q]=B.replace(/["']/g,"");continue}try{const Q=je(R=v,m,by).call(R,M);w.expressions.push(Q.interval)}catch(Q){w.errors[M]=Q}}return w},by=function(b){const T=b.split(" ");return{interval:c.CronExpressionParser.parse(T.slice(0,5).join(" ")),command:T.slice(5,T.length)}},lt(v,m),v);return mn.CronFileParser=f,mn}var Qg;function vS(){return Qg||(Qg=1,(function(l){var r=Ds&&Ds.__createBinding||(Object.create?(function(x,b,T,w){w===void 0&&(w=T);var R=Object.getOwnPropertyDescriptor(b,T);(!R||("get"in R?!b.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return b[T]}}),Object.defineProperty(x,w,R)}):(function(x,b,T,w){w===void 0&&(w=T),x[w]=b[T]})),o=Ds&&Ds.__exportStar||function(x,b){for(var T in x)T!=="default"&&!Object.prototype.hasOwnProperty.call(b,T)&&r(b,x,T)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const c=Hf();var f=sh();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return f.CronDate}});var m=ay();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return m.CronFieldCollection}});var v=cy();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return v.CronExpression}});var N=Hf();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return N.CronExpressionParser}});var S=pS();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return S.CronFileParser}}),o(rh(),l),l.default=c.CronExpressionParser})(Ds)),Ds}var bS=vS();const Sy=6048e5,SS=864e5,NS=6e4,jS=36e5,Ig=Symbol.for("constructDateFrom");function La(l,r){return typeof l=="function"?l(r):l&&typeof l=="object"&&Ig in l?l[Ig](r):l instanceof Date?new l.constructor(r):new Date(r)}function Rt(l,r){return La(r||l,l)}function wS(l,r,o){return La(l,+Rt(l)+r)}function Bc(l,r,o){return wS(l,r*jS)}let ES={};function so(){return ES}function ru(l,r){var N,S,x,b;const o=so(),c=(r==null?void 0:r.weekStartsOn)??((S=(N=r==null?void 0:r.locale)==null?void 0:N.options)==null?void 0:S.weekStartsOn)??o.weekStartsOn??((b=(x=o.locale)==null?void 0:x.options)==null?void 0:b.weekStartsOn)??0,f=Rt(l,r==null?void 0:r.in),m=f.getDay(),v=(m<c?7:0)+m-c;return f.setDate(f.getDate()-v),f.setHours(0,0,0,0),f}function Qc(l,r){return ru(l,{...r,weekStartsOn:1})}function Ny(l,r){const o=Rt(l,r==null?void 0:r.in),c=o.getFullYear(),f=La(o,0);f.setFullYear(c+1,0,4),f.setHours(0,0,0,0);const m=Qc(f),v=La(o,0);v.setFullYear(c,0,4),v.setHours(0,0,0,0);const N=Qc(v);return o.getTime()>=m.getTime()?c+1:o.getTime()>=N.getTime()?c:c-1}function Xg(l){const r=Rt(l),o=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return o.setUTCFullYear(r.getFullYear()),+l-+o}function TS(l,...r){const o=La.bind(null,r.find(c=>typeof c=="object"));return r.map(o)}function Jg(l,r){const o=Rt(l,r==null?void 0:r.in);return o.setHours(0,0,0,0),o}function MS(l,r,o){const[c,f]=TS(o==null?void 0:o.in,l,r),m=Jg(c),v=Jg(f),N=+m-Xg(m),S=+v-Xg(v);return Math.round((N-S)/SS)}function CS(l,r){const o=Ny(l,r),c=La(l,0);return c.setFullYear(o,0,4),c.setHours(0,0,0,0),Qc(c)}function OS(l,r){let o,c=r==null?void 0:r.in;return l.forEach(f=>{!c&&typeof f=="object"&&(c=La.bind(null,f));const m=Rt(f,c);(!o||o<m||isNaN(+m))&&(o=m)}),La(c,o||NaN)}function DS(l,r){let o,c=r==null?void 0:r.in;return l.forEach(f=>{!c&&typeof f=="object"&&(c=La.bind(null,f));const m=Rt(f,c);(!o||o>m||isNaN(+m))&&(o=m)}),La(c,o||NaN)}function RS(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function AS(l){return!(!RS(l)&&typeof l!="number"||isNaN(+Rt(l)))}function kS(l){return r=>{const c=(l?Math[l]:Math.trunc)(r);return c===0?0:c}}function _S(l,r){return+Rt(l)-+Rt(r)}function Kg(l,r,o){const c=_S(l,r)/NS;return kS(o==null?void 0:o.roundingMethod)(c)}function zS(l,r){const o=Rt(l,r==null?void 0:r.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}const US={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"}},LS=(l,r,o)=>{let c;const f=US[l];return typeof f=="string"?c=f:r===1?c=f.one:c=f.other.replace("{{count}}",r.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+c:c+" ago":c};function Tf(l){return(r={})=>{const o=r.width?String(r.width):l.defaultWidth;return l.formats[o]||l.formats[l.defaultWidth]}}const HS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},BS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},VS={date:Tf({formats:HS,defaultWidth:"full"}),time:Tf({formats:qS,defaultWidth:"full"}),dateTime:Tf({formats:BS,defaultWidth:"full"})},YS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$S=(l,r,o,c)=>YS[l];function Ki(l){return(r,o)=>{const c=o!=null&&o.context?String(o.context):"standalone";let f;if(c==="formatting"&&l.formattingValues){const v=l.defaultFormattingWidth||l.defaultWidth,N=o!=null&&o.width?String(o.width):v;f=l.formattingValues[N]||l.formattingValues[v]}else{const v=l.defaultWidth,N=o!=null&&o.width?String(o.width):l.defaultWidth;f=l.values[N]||l.values[v]}const m=l.argumentCallback?l.argumentCallback(r):r;return f[m]}}const FS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},GS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},PS={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"]},ZS={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"]},WS={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"}},QS={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"}},IS=(l,r)=>{const o=Number(l),c=o%100;if(c>20||c<10)switch(c%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},XS={ordinalNumber:IS,era:Ki({values:FS,defaultWidth:"wide"}),quarter:Ki({values:GS,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Ki({values:PS,defaultWidth:"wide"}),day:Ki({values:ZS,defaultWidth:"wide"}),dayPeriod:Ki({values:WS,defaultWidth:"wide",formattingValues:QS,defaultFormattingWidth:"wide"})};function eu(l){return(r,o={})=>{const c=o.width,f=c&&l.matchPatterns[c]||l.matchPatterns[l.defaultMatchWidth],m=r.match(f);if(!m)return null;const v=m[0],N=c&&l.parsePatterns[c]||l.parsePatterns[l.defaultParseWidth],S=Array.isArray(N)?KS(N,T=>T.test(v)):JS(N,T=>T.test(v));let x;x=l.valueCallback?l.valueCallback(S):S,x=o.valueCallback?o.valueCallback(x):x;const b=r.slice(v.length);return{value:x,rest:b}}}function JS(l,r){for(const o in l)if(Object.prototype.hasOwnProperty.call(l,o)&&r(l[o]))return o}function KS(l,r){for(let o=0;o<l.length;o++)if(r(l[o]))return o}function eN(l){return(r,o={})=>{const c=r.match(l.matchPattern);if(!c)return null;const f=c[0],m=r.match(l.parsePattern);if(!m)return null;let v=l.valueCallback?l.valueCallback(m[0]):m[0];v=o.valueCallback?o.valueCallback(v):v;const N=r.slice(f.length);return{value:v,rest:N}}}const tN=/^(\d+)(th|st|nd|rd)?/i,aN=/\d+/i,nN={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},lN={any:[/^b/i,/^(a|c)/i]},sN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rN={any:[/1/i,/2/i,/3/i,/4/i]},iN={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},uN={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]},cN={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},oN={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]},dN={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},fN={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}},hN={ordinalNumber:eN({matchPattern:tN,parsePattern:aN,valueCallback:l=>parseInt(l,10)}),era:eu({matchPatterns:nN,defaultMatchWidth:"wide",parsePatterns:lN,defaultParseWidth:"any"}),quarter:eu({matchPatterns:sN,defaultMatchWidth:"wide",parsePatterns:rN,defaultParseWidth:"any",valueCallback:l=>l+1}),month:eu({matchPatterns:iN,defaultMatchWidth:"wide",parsePatterns:uN,defaultParseWidth:"any"}),day:eu({matchPatterns:cN,defaultMatchWidth:"wide",parsePatterns:oN,defaultParseWidth:"any"}),dayPeriod:eu({matchPatterns:dN,defaultMatchWidth:"any",parsePatterns:fN,defaultParseWidth:"any"})},mN={code:"en-US",formatDistance:LS,formatLong:VS,formatRelative:$S,localize:XS,match:hN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gN(l,r){const o=Rt(l,r==null?void 0:r.in);return MS(o,zS(o))+1}function xN(l,r){const o=Rt(l,r==null?void 0:r.in),c=+Qc(o)-+CS(o);return Math.round(c/Sy)+1}function jy(l,r){var b,T,w,R;const o=Rt(l,r==null?void 0:r.in),c=o.getFullYear(),f=so(),m=(r==null?void 0:r.firstWeekContainsDate)??((T=(b=r==null?void 0:r.locale)==null?void 0:b.options)==null?void 0:T.firstWeekContainsDate)??f.firstWeekContainsDate??((R=(w=f.locale)==null?void 0:w.options)==null?void 0:R.firstWeekContainsDate)??1,v=La((r==null?void 0:r.in)||l,0);v.setFullYear(c+1,0,m),v.setHours(0,0,0,0);const N=ru(v,r),S=La((r==null?void 0:r.in)||l,0);S.setFullYear(c,0,m),S.setHours(0,0,0,0);const x=ru(S,r);return+o>=+N?c+1:+o>=+x?c:c-1}function yN(l,r){var N,S,x,b;const o=so(),c=(r==null?void 0:r.firstWeekContainsDate)??((S=(N=r==null?void 0:r.locale)==null?void 0:N.options)==null?void 0:S.firstWeekContainsDate)??o.firstWeekContainsDate??((b=(x=o.locale)==null?void 0:x.options)==null?void 0:b.firstWeekContainsDate)??1,f=jy(l,r),m=La((r==null?void 0:r.in)||l,0);return m.setFullYear(f,0,c),m.setHours(0,0,0,0),ru(m,r)}function pN(l,r){const o=Rt(l,r==null?void 0:r.in),c=+ru(o,r)-+yN(o,r);return Math.round(c/Sy)+1}function ut(l,r){const o=l<0?"-":"",c=Math.abs(l).toString().padStart(r,"0");return o+c}const Vl={y(l,r){const o=l.getFullYear(),c=o>0?o:1-o;return ut(r==="yy"?c%100:c,r.length)},M(l,r){const o=l.getMonth();return r==="M"?String(o+1):ut(o+1,2)},d(l,r){return ut(l.getDate(),r.length)},a(l,r){const o=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(l,r){return ut(l.getHours()%12||12,r.length)},H(l,r){return ut(l.getHours(),r.length)},m(l,r){return ut(l.getMinutes(),r.length)},s(l,r){return ut(l.getSeconds(),r.length)},S(l,r){const o=r.length,c=l.getMilliseconds(),f=Math.trunc(c*Math.pow(10,o-3));return ut(f,r.length)}},Rr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ex={G:function(l,r,o){const c=l.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return o.era(c,{width:"abbreviated"});case"GGGGG":return o.era(c,{width:"narrow"});case"GGGG":default:return o.era(c,{width:"wide"})}},y:function(l,r,o){if(r==="yo"){const c=l.getFullYear(),f=c>0?c:1-c;return o.ordinalNumber(f,{unit:"year"})}return Vl.y(l,r)},Y:function(l,r,o,c){const f=jy(l,c),m=f>0?f:1-f;if(r==="YY"){const v=m%100;return ut(v,2)}return r==="Yo"?o.ordinalNumber(m,{unit:"year"}):ut(m,r.length)},R:function(l,r){const o=Ny(l);return ut(o,r.length)},u:function(l,r){const o=l.getFullYear();return ut(o,r.length)},Q:function(l,r,o){const c=Math.ceil((l.getMonth()+1)/3);switch(r){case"Q":return String(c);case"QQ":return ut(c,2);case"Qo":return o.ordinalNumber(c,{unit:"quarter"});case"QQQ":return o.quarter(c,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(c,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(c,{width:"wide",context:"formatting"})}},q:function(l,r,o){const c=Math.ceil((l.getMonth()+1)/3);switch(r){case"q":return String(c);case"qq":return ut(c,2);case"qo":return o.ordinalNumber(c,{unit:"quarter"});case"qqq":return o.quarter(c,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(c,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(c,{width:"wide",context:"standalone"})}},M:function(l,r,o){const c=l.getMonth();switch(r){case"M":case"MM":return Vl.M(l,r);case"Mo":return o.ordinalNumber(c+1,{unit:"month"});case"MMM":return o.month(c,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(c,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(c,{width:"wide",context:"formatting"})}},L:function(l,r,o){const c=l.getMonth();switch(r){case"L":return String(c+1);case"LL":return ut(c+1,2);case"Lo":return o.ordinalNumber(c+1,{unit:"month"});case"LLL":return o.month(c,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(c,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(c,{width:"wide",context:"standalone"})}},w:function(l,r,o,c){const f=pN(l,c);return r==="wo"?o.ordinalNumber(f,{unit:"week"}):ut(f,r.length)},I:function(l,r,o){const c=xN(l);return r==="Io"?o.ordinalNumber(c,{unit:"week"}):ut(c,r.length)},d:function(l,r,o){return r==="do"?o.ordinalNumber(l.getDate(),{unit:"date"}):Vl.d(l,r)},D:function(l,r,o){const c=gN(l);return r==="Do"?o.ordinalNumber(c,{unit:"dayOfYear"}):ut(c,r.length)},E:function(l,r,o){const c=l.getDay();switch(r){case"E":case"EE":case"EEE":return o.day(c,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(c,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(c,{width:"short",context:"formatting"});case"EEEE":default:return o.day(c,{width:"wide",context:"formatting"})}},e:function(l,r,o,c){const f=l.getDay(),m=(f-c.weekStartsOn+8)%7||7;switch(r){case"e":return String(m);case"ee":return ut(m,2);case"eo":return o.ordinalNumber(m,{unit:"day"});case"eee":return o.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(f,{width:"short",context:"formatting"});case"eeee":default:return o.day(f,{width:"wide",context:"formatting"})}},c:function(l,r,o,c){const f=l.getDay(),m=(f-c.weekStartsOn+8)%7||7;switch(r){case"c":return String(m);case"cc":return ut(m,r.length);case"co":return o.ordinalNumber(m,{unit:"day"});case"ccc":return o.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(f,{width:"narrow",context:"standalone"});case"cccccc":return o.day(f,{width:"short",context:"standalone"});case"cccc":default:return o.day(f,{width:"wide",context:"standalone"})}},i:function(l,r,o){const c=l.getDay(),f=c===0?7:c;switch(r){case"i":return String(f);case"ii":return ut(f,r.length);case"io":return o.ordinalNumber(f,{unit:"day"});case"iii":return o.day(c,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(c,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(c,{width:"short",context:"formatting"});case"iiii":default:return o.day(c,{width:"wide",context:"formatting"})}},a:function(l,r,o){const f=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(f,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(f,{width:"wide",context:"formatting"})}},b:function(l,r,o){const c=l.getHours();let f;switch(c===12?f=Rr.noon:c===0?f=Rr.midnight:f=c/12>=1?"pm":"am",r){case"b":case"bb":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(l,r,o){const c=l.getHours();let f;switch(c>=17?f=Rr.evening:c>=12?f=Rr.afternoon:c>=4?f=Rr.morning:f=Rr.night,r){case"B":case"BB":case"BBB":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(f,{width:"wide",context:"formatting"})}},h:function(l,r,o){if(r==="ho"){let c=l.getHours()%12;return c===0&&(c=12),o.ordinalNumber(c,{unit:"hour"})}return Vl.h(l,r)},H:function(l,r,o){return r==="Ho"?o.ordinalNumber(l.getHours(),{unit:"hour"}):Vl.H(l,r)},K:function(l,r,o){const c=l.getHours()%12;return r==="Ko"?o.ordinalNumber(c,{unit:"hour"}):ut(c,r.length)},k:function(l,r,o){let c=l.getHours();return c===0&&(c=24),r==="ko"?o.ordinalNumber(c,{unit:"hour"}):ut(c,r.length)},m:function(l,r,o){return r==="mo"?o.ordinalNumber(l.getMinutes(),{unit:"minute"}):Vl.m(l,r)},s:function(l,r,o){return r==="so"?o.ordinalNumber(l.getSeconds(),{unit:"second"}):Vl.s(l,r)},S:function(l,r){return Vl.S(l,r)},X:function(l,r,o){const c=l.getTimezoneOffset();if(c===0)return"Z";switch(r){case"X":return ax(c);case"XXXX":case"XX":return Us(c);case"XXXXX":case"XXX":default:return Us(c,":")}},x:function(l,r,o){const c=l.getTimezoneOffset();switch(r){case"x":return ax(c);case"xxxx":case"xx":return Us(c);case"xxxxx":case"xxx":default:return Us(c,":")}},O:function(l,r,o){const c=l.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+tx(c,":");case"OOOO":default:return"GMT"+Us(c,":")}},z:function(l,r,o){const c=l.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+tx(c,":");case"zzzz":default:return"GMT"+Us(c,":")}},t:function(l,r,o){const c=Math.trunc(+l/1e3);return ut(c,r.length)},T:function(l,r,o){return ut(+l,r.length)}};function tx(l,r=""){const o=l>0?"-":"+",c=Math.abs(l),f=Math.trunc(c/60),m=c%60;return m===0?o+String(f):o+String(f)+r+ut(m,2)}function ax(l,r){return l%60===0?(l>0?"-":"+")+ut(Math.abs(l)/60,2):Us(l,r)}function Us(l,r=""){const o=l>0?"-":"+",c=Math.abs(l),f=ut(Math.trunc(c/60),2),m=ut(c%60,2);return o+f+r+m}const nx=(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"})}},wy=(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"})}},vN=(l,r)=>{const o=l.match(/(P+)(p+)?/)||[],c=o[1],f=o[2];if(!f)return nx(l,r);let m;switch(c){case"P":m=r.dateTime({width:"short"});break;case"PP":m=r.dateTime({width:"medium"});break;case"PPP":m=r.dateTime({width:"long"});break;case"PPPP":default:m=r.dateTime({width:"full"});break}return m.replace("{{date}}",nx(c,r)).replace("{{time}}",wy(f,r))},bN={p:wy,P:vN},SN=/^D+$/,NN=/^Y+$/,jN=["D","DD","YY","YYYY"];function wN(l){return SN.test(l)}function EN(l){return NN.test(l)}function TN(l,r,o){const c=MN(l,r,o);if(console.warn(c),jN.includes(l))throw new RangeError(c)}function MN(l,r,o){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 \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const CN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ON=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,DN=/^'([^]*?)'?$/,RN=/''/g,AN=/[a-zA-Z]/;function As(l,r,o){var b,T,w,R;const c=so(),f=c.locale??mN,m=c.firstWeekContainsDate??((T=(b=c.locale)==null?void 0:b.options)==null?void 0:T.firstWeekContainsDate)??1,v=c.weekStartsOn??((R=(w=c.locale)==null?void 0:w.options)==null?void 0:R.weekStartsOn)??0,N=Rt(l,o==null?void 0:o.in);if(!AS(N))throw new RangeError("Invalid time value");let S=r.match(ON).map(C=>{const M=C[0];if(M==="p"||M==="P"){const A=bN[M];return A(C,f.formatLong)}return C}).join("").match(CN).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const M=C[0];if(M==="'")return{isToken:!1,value:kN(C)};if(ex[M])return{isToken:!0,value:C};if(M.match(AN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:C}});f.localize.preprocessor&&(S=f.localize.preprocessor(N,S));const x={firstWeekContainsDate:m,weekStartsOn:v,locale:f};return S.map(C=>{if(!C.isToken)return C.value;const M=C.value;(EN(M)||wN(M))&&TN(M,r,String(l));const A=ex[M[0]];return A(N,M,f.localize,x)}).join("")}function kN(l){const r=l.match(DN);return r?r[1].replace(RN,"'"):l}function _N(l,r){return+Rt(l)>+Rt(r)}function zN(l,r){return+Rt(l)<+Rt(r)}function UN(l,r){const o=Rt(l,r==null?void 0:r.in);return o.setMinutes(0,0,0),o}const Mf=Vx,Vc=[{bg:"bg-indigo-400",border:"border-indigo-400/60"},{bg:"bg-cyan-400",border:"border-cyan-400/60"},{bg:"bg-rose-400",border:"border-rose-400/60"},{bg:"bg-violet-400",border:"border-violet-400/60"},{bg:"bg-amber-400",border:"border-amber-400/60"}],Jn=160,Yc=14,LN=10,HN=7,lx=4,Ey=({configs:l,currentProjectId:r,onEditJob:o,queueStatus:c,queueAnalytics:f})=>{const m=U.useMemo(()=>UN(new Date),[]),v=U.useMemo(()=>Bc(m,24),[m]),N=U.useMemo(()=>Bc(m,-24),[m]),S=v,x=U.useMemo(()=>{const K=[];for(let fe=0;fe<=24;fe++)K.push(Bc(m,fe));return K},[m]),b=U.useMemo(()=>{const K=[];return l.forEach(({projectId:fe,config:G})=>{var ae,O;const F={executor:G.executorEnabled!==!1?G.cronSchedule:null,reviewer:G.reviewerEnabled?G.reviewerSchedule:null,qa:G.qa.enabled?G.qa.schedule:null,audit:G.audit.enabled?G.audit.schedule:null,slicer:G.roadmapScanner.enabled?G.roadmapScanner.slicerSchedule:null,analytics:(ae=G.analytics)!=null&&ae.enabled?(O=G.analytics)==null?void 0:O.schedule:null},P=G.cronScheduleOffset||0;Object.entries(F).forEach(([ne,k])=>{if(k)try{const ce=bS.CronExpressionParser.parse(k,{currentDate:m,endDate:v});for(;ce.hasNext();){const te=ce.next(),me=new Date(te.getTime());me.setMinutes(me.getMinutes()+P),_N(me,m)&&zN(me,v)&&K.push({projectId:fe,jobType:ne,time:me})}}catch(ce){console.error(`Failed to parse cron "${k}" for ${fe}/${ne}`,ce)}})}),K},[l,m,v]),T=U.useMemo(()=>{const K=new Set;return l.length===0||(l.every(fe=>fe.config.executorEnabled===!1)&&K.add("executor"),l.every(fe=>!fe.config.reviewerEnabled)&&K.add("reviewer"),l.every(fe=>!fe.config.qa.enabled)&&K.add("qa"),l.every(fe=>!fe.config.audit.enabled)&&K.add("audit"),l.every(fe=>!fe.config.roadmapScanner.enabled)&&K.add("slicer"),l.every(fe=>{var G;return!((G=fe.config.analytics)!=null&&G.enabled)})&&K.add("analytics")),K},[l]),w=U.useMemo(()=>{const K=new Map;let fe=0;return l.forEach(G=>{G.projectId===r||(K.set(G.projectId,fe%Vc.length),fe++)}),K},[l,r]),R=K=>Kg(K,m),C=U.useMemo(()=>{const K=[];for(let fe=0;fe<=24;fe++)K.push(Bc(N,fe));return K},[N]),M=K=>{const fe=DS([OS([K,N]),S]);return Kg(fe,N)},A=U.useMemo(()=>{const K=(f==null?void 0:f.recentRuns)??[],fe=new Map;for(const G of K){const F=G.providerKey||"default",P=new Date(G.startedAt*1e3),ae=G.finishedAt?new Date(G.finishedAt*1e3):new Date;ae<N||P>S||(fe.has(F)||fe.set(F,[]),fe.get(F).push({id:G.id,jobType:G.jobType,status:G.status,projectPath:G.projectPath,startedAt:P,finishedAt:ae,throttledCount:G.throttledCount}))}if(c!=null&&c.running){const G=c.running.providerKey??"default";fe.has(G)||fe.set(G,[]),fe.get(G).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(fe.entries()).sort(([G],[F])=>G.localeCompare(F)).map(([G,F])=>({providerKey:G,runs:F.sort((P,ae)=>P.startedAt.getTime()-ae.startedAt.getTime())}))},[S,N,f,c]),Q=K=>K.split(/[-_]/).map(fe=>fe.charAt(0).toUpperCase()+fe.slice(1)).join(" "),B=l.length>1,X=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:x.map((K,fe)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},fe))});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."})]}),B&&s.jsxs("div",{className:"flex flex-wrap gap-2 justify-end max-w-sm",children:[s.jsxs("div",{className:"flex items-center gap-1 mr-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-400 shrink-0"}),s.jsx("span",{className:"text-[10px] text-slate-400 font-semibold",children:"current"})]}),l.filter(K=>K.projectId!==r).slice(0,5).map(K=>{const fe=w.get(K.projectId)??0,G=Vc[fe],F=(K.projectId.split("/").pop()??K.projectId).slice(0,14);return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${G.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:K.projectId,children:F})]},K.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+Jn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Jn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:x.map((K,fe)=>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:fe*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:As(K,"HH:mm")})},fe))})]}),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."})}),Mf.map(K=>{const fe=T.has(K.id),G=b.filter(P=>P.jobType===K.id);if(!B)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${fe?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Jn},className:"shrink-0 p-3 border-r border-slate-800/50 flex items-center gap-2",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${K.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:K.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[X,G.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:fe?"Disabled":"No runs in this window"})}):G.map((P,ae)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(P.projectId,P.jobType),style:{left:R(P.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${K.color.bg} ${K.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${K.label} at ${As(P.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-10",children:As(P.time,"HH:mm")})},ae))]})]},K.id);const F=l.length*Yc+lx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${fe?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Jn,height:F},className:"shrink-0 border-r border-slate-800/50 flex flex-col px-2 py-1",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[s.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${K.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:K.label})]}),l.map(P=>{const ae=P.projectId===r,O=(P.projectId.split("/").pop()??P.projectId).slice(0,14),ne=w.get(P.projectId)??0,k=ae?K.color.bg:Vc[ne].bg;return s.jsxs("div",{style:{height:Yc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${k}`}),s.jsx("span",{className:`text-[9px] truncate ${ae?"text-slate-200 font-semibold":"text-slate-600"}`,title:P.projectId,children:ae?`${O} ★`:O})]},P.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:F},children:[X,l.map((P,ae)=>{const O=P.projectId===r,ne=G.filter(re=>re.projectId===P.projectId),k=lx+ae*Yc,ce=O?LN:HN,te=Math.floor((Yc-ce)/2),me=w.get(P.projectId)??0,Y=O?{bg:K.color.bg,border:K.color.border}:Vc[me];return s.jsxs(_e.Fragment,{children:[ae>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:k}}),ne.map((re,ye)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(P.projectId,re.jobType),style:{left:R(re.time)-3,top:k+te,height:ce},className:`absolute w-6 rounded border ${Y.bg} ${Y.border} ${O?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${P.projectId} · ${K.label} @ ${As(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:As(re.time,"HH:mm")})},ye))]},P.projectId)}),G.length===0&&!fe&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-700 italic",children:"No runs in this window"})})]})]},K.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Jn+R(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"})]}),B&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project  ·  blocks in same column = scheduling overlap"})})]}),A.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+Jn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Jn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:C.map((K,fe)=>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:fe*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:As(K,"HH:mm")})},fe))})]}),s.jsx("div",{className:"relative",children:A.map(({providerKey:K,runs:fe})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${K}`,children:[s.jsxs("div",{style:{width:Jn},className:"shrink-0 p-3 border-r border-slate-800/50 flex flex-col justify-center",children:[s.jsx("span",{className:"text-xs font-semibold text-slate-300 truncate",title:K,children:Q(K)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:K})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:C.map((G,F)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},F))}),fe.map(G=>{const F=Mf.find(me=>me.id===G.jobType)??Mf[0],P=M(G.startedAt),ae=M(G.finishedAt),O=Math.max(ae-P,8),ne=G.status==="running",k=G.status==="error"||G.status==="failed"||G.status==="errored",ce=ne?"bg-green-500":k?"bg-red-500":F.color.bg,te=ne?"border-green-400/60":k?"border-red-400/60":F.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ce} ${te} opacity-85 shadow-lg ${ne?"animate-pulse":""}`,style:{left:P,width:O},title:`${K} • ${F.label} • ${As(G.startedAt,"MMM d HH:mm")} • ${G.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:F.label}),s.jsx("span",{className:"text-white/70",children:G.status}),G.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",G.throttledCount,"x"]})]})},`${K}-${G.id}-${G.startedAt.getTime()}`)})]})]},K))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Jn+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"}],ih=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *",merger:"55 */4 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am",merger:"Every 4h at :55"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *",merger:"55 */4 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35",merger:"Every 4h at :55"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1",merger:"55 */4 * * 1-5"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am",merger:"Every 4h at :55 weekdays"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1",merger:"55 */8 * * *"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am",merger:"Every 8h at :55"}}];function Ur(l){return l?l.trim().replace(/\s+/g," "):""}function Ls(l,r){return Ur(l)===Ur(r)}function qN(l){if(l)return ih.find(r=>r.id===l)}function Ty(l,r,o,c,f,m,v){return Ls(l.schedules.executor,r)&&Ls(l.schedules.reviewer,o)&&Ls(l.schedules.qa,c)&&Ls(l.schedules.audit,f)&&Ls(l.schedules.slicer,m)&&Ls(l.schedules.merger,v)}function BN(l,r,o,c,f,m){return ih.find(v=>Ty(v,l,r,o,c,f,m))}function My(l,r,o,c,f,m,v){const N=qN(l);return N&&Ty(N,r,o,c,f,m,v)?N:BN(r,o,c,f,m,v)}function Gc(l){const r=Ur(l),o=r.split(/\s+/);if(o.length!==5)return r;const[c,f,m,v,N]=o,S=/^\d+$/.test(c),x=Ic.find(b=>Ur(b.value)===r);if(x)return x.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(S&&f.startsWith("*/")&&m==="*"&&v==="*"&&N==="*"){const b=parseInt(f.replace("*/",""),10);return c==="0"?`Every ${b} hours`:`Every ${b} hours at :${c.padStart(2,"0")}`}if(c==="0"&&f.startsWith("*/"))return`Every ${parseInt(f.replace("*/",""),10)} hours`;if(c==="0"&&f.includes("-")){const[b,T]=f.split("-");return`Every hour from ${tu(b)} to ${tu(T)}`}if(S&&f.includes("-")&&m==="*"&&v==="*"&&N==="*"){const[b,T]=f.split("-");return`Every hour from ${au(b,c)} to ${au(T,c)}`}if(c==="0"&&f.includes(",")){const b=f.split(",").map(tu);return b.length<=3?`At ${b.join(" and ")}`:`At ${b.slice(0,-1).join(", ")}, and ${b[b.length-1]}`}if(S&&f.includes(",")&&m==="*"&&v==="*"&&(N==="*"||N==="1-5")){const b=f.split(",").map(w=>au(w,c)),T=N==="1-5"?"Weekdays at ":"At ";return b.length<=3?`${T}${b.join(" and ")}`:`${T}${b.slice(0,-1).join(", ")}, and ${b[b.length-1]}`}return c==="0"&&f!=="*"&&m==="*"&&v==="*"&&N==="*"?`Daily at ${tu(f)}`:S&&f!=="*"&&m==="*"&&v==="*"&&N==="*"?`Daily at ${au(f,c)}`:c==="0"&&f!=="*"&&m==="*"&&v==="*"&&N==="1-5"?`Weekdays at ${tu(f)}`:S&&f!=="*"&&m==="*"&&v==="*"&&N==="1-5"?`Weekdays at ${au(f,c)}`:r}function tu(l){const r=parseInt(l,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function au(l,r){const o=r.padStart(2,"0"),c=parseInt(l,10);return Number.isNaN(c)?`${l}:${o}`:c===0?`12:${o} AM`:c<12?`${c}:${o} AM`:c===12?`12:${o} PM`:`${c-12}:${o} PM`}function VN(l){const r=Ur(l),o=Ic.find(c=>Ur(c.value)===r);return(o==null?void 0:o.value)??"__custom__"}function YN(l){const r=new Date,o=l.getTime()-r.getTime(),c=Math.floor(o/6e4),f=Math.floor(c/60),m=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 ${m} day${m>1?"s":""}`}function $N(l){const r={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",r)}function FN(l){const r=new Date,o=l.getTime()-r.getTime(),c=Math.floor(o/6e4);return c>=0&&c<30}const Cy="5 * * * *",Oy="25 */3 * * *",GN={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},sx={enabled:!0,schedule:"45 2,10,18 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},PN={enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800},ZN={enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},rx={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0};function Gl(){return{...GN}}function Bf(){return{...sx,branchPatterns:[...sx.branchPatterns]}}function Vf(){return{...PN}}function Xc(){return{...ZN}}function _r(){return{...rx,branchPatterns:[...rx.branchPatterns]}}const WN=()=>{var xn,en,ha,ma;const l=to(),{addToast:r,selectedProjectId:o,globalModeLoading:c}=$t(),[f,m]=U.useState("overview"),[v,N]=U.useState(!1),[S,x]=U.useState(!1),[b,T]=U.useState(null),[w,R]=U.useState([]),[C,M]=U.useState(null),[A,Q]=U.useState(null),[B,X]=U.useState({isDirty:!1,enabled:!0,queueMode:"auto",globalMaxConcurrency:1,providerBuckets:[]}),[K,fe]=U.useState(""),[G,F]=U.useState("1"),[P,ae]=U.useState(!1),{data:O,loading:ne,error:k,refetch:ce}=gn(Px,[o],{enabled:!c}),{data:te,loading:me,refetch:Y}=gn(nh,[o],{enabled:!c});U.useEffect(()=>{const oe=setInterval(()=>{ce()},3e4);return()=>clearInterval(oe)},[ce]),U.useEffect(()=>{c||Gx().then(R).catch(console.error)},[o,c]),U.useEffect(()=>{if(c)return;const oe=()=>{O2().then(M).catch(()=>{}),D2(24).then(Q).catch(()=>{})};oe();const ie=setInterval(oe,3e4);return()=>clearInterval(ie)},[c,o]),U.useEffect(()=>{var oe,ie,xe,Be;if(te&&!B.isDirty){const Je=((oe=te.queue)==null?void 0:oe.providerBuckets)??{};X({isDirty:!1,enabled:((ie=te.queue)==null?void 0:ie.enabled)??!0,queueMode:((xe=te.queue)==null?void 0:xe.mode)??"auto",globalMaxConcurrency:((Be=te.queue)==null?void 0:Be.maxConcurrency)??1,providerBuckets:Object.entries(Je).map(([ft,aa])=>({key:ft,maxConcurrency:aa.maxConcurrency}))})}},[te,B.isDirty]);const re=()=>{Y(),ce()},ye=(oe,ie)=>oe instanceof Error?oe.message:ie,Me=async()=>{if(O){N(!0);try{O.paused?(await _f(),r({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await j2(),r({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),re()}catch(oe){r({title:"Action Failed",message:ye(oe,"Failed to toggle schedule state"),type:"error"})}finally{N(!1)}}},Ne=(oe,ie)=>{const xe=new URLSearchParams({tab:oe});oe==="schedules"&&xe.set("mode","custom"),ie&&xe.set("jobType",ie==="planner"?"slicer":ie),l(`/settings?${xe.toString()}`)},_=async oe=>{const ie=oe==="planner"?"slicer":oe;T(oe);try{await N2(ie),r({title:"Job Triggered",message:`${oe[0].toUpperCase()+oe.slice(1)} job has been queued.`,type:"success"}),ce()}catch(xe){r({title:"Trigger Failed",message:ye(xe,`Failed to trigger ${oe} job`),type:"error"})}finally{T(null)}},le=async()=>{if(te){x(!0);try{await lh({queue:{...te.queue,enabled:B.enabled,mode:B.queueMode,maxConcurrency:B.globalMaxConcurrency,providerBuckets:Object.fromEntries(B.providerBuckets.map(oe=>[oe.key,{maxConcurrency:oe.maxConcurrency}]))}}),X(oe=>({...oe,isDirty:!1})),re(),r({title:"Parallelism Updated",message:"Queue coordination settings were saved.",type:"success"})}catch(oe){r({title:"Save Failed",message:ye(oe,"Failed to save queue settings"),type:"error"})}finally{x(!1)}}},ge=oe=>{if(!oe)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const ie=new Date(oe),xe=FN(ie);return s.jsxs("div",{className:"flex items-center space-x-2",children:[xe&&s.jsxs("span",{className:"relative flex h-3 w-3",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-slate-200 font-medium",children:YN(ie)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",$N(ie),")"]})]})]})},pe=oe=>{if(!oe||oe.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const ie=[];return oe.balancedDelayMinutes>0&&ie.push(`auto +${oe.balancedDelayMinutes}m`),oe.manualDelayMinutes>0&&ie.push(`manual +${oe.manualDelayMinutes}m`),s.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Delayed after cron fire:",s.jsxs("span",{className:"text-slate-300",children:[" ",ie.join(" - ")]})]})},Ce=U.useMemo(()=>{var oe,ie,xe,Be,Je,ft,aa,na,yt,Ba,Gt,ga,Ca,Cn,nl,Xe,ll,pt;return!te||!O?[]:[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Zc,{className:"h-4 w-4"}),enabled:(te==null?void 0:te.executorEnabled)!==!1,schedule:O.executor.schedule,nextRun:O.executor.nextRun,delayInfo:O.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(lo,{className:"h-4 w-4"}),enabled:(te==null?void 0:te.reviewerEnabled)??!1,schedule:O.reviewer.schedule,nextRun:O.reviewer.nextRun,delayInfo:O.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx(a2,{className:"h-4 w-4"}),enabled:((oe=te==null?void 0:te.qa)==null?void 0:oe.enabled)??!1,schedule:(ie=O.qa)==null?void 0:ie.schedule,nextRun:(xe=O.qa)==null?void 0:xe.nextRun,delayInfo:O.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(wg,{className:"h-4 w-4"}),enabled:((Be=te==null?void 0:te.audit)==null?void 0:Be.enabled)??!1,schedule:(Je=O.audit)==null?void 0:Je.schedule,nextRun:(ft=O.audit)==null?void 0:ft.nextRun,delayInfo:O.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(wg,{className:"h-4 w-4"}),enabled:((aa=te==null?void 0:te.roadmapScanner)==null?void 0:aa.enabled)??!1,schedule:((na=O.planner)==null?void 0:na.schedule)||((yt=te.roadmapScanner)==null?void 0:yt.slicerSchedule)||Gl().slicerSchedule,nextRun:(Ba=O.planner)==null?void 0:Ba.nextRun,delayInfo:O.planner},{id:"analytics",name:"Analytics",description:"Fetches Amplitude data, analyzes with AI, and creates board issues",icon:s.jsx(l1,{className:"h-4 w-4"}),enabled:((Gt=te==null?void 0:te.analytics)==null?void 0:Gt.enabled)??!1,schedule:((ga=O.analytics)==null?void 0:ga.schedule)||((Ca=te.analytics)==null?void 0:Ca.schedule)||Xc().schedule,nextRun:(Cn=O.analytics)==null?void 0:Cn.nextRun,delayInfo:O.analytics},{id:"merger",name:"Merger",description:"Repo-wide PR merge orchestrator — merges eligible PRs in FIFO order",icon:s.jsx(Tg,{className:"h-4 w-4"}),enabled:((nl=te==null?void 0:te.merger)==null?void 0:nl.enabled)??!1,schedule:((Xe=O.merger)==null?void 0:Xe.schedule)||((ll=te.merger)==null?void 0:ll.schedule)||_r().schedule,nextRun:(pt=O.merger)==null?void 0:pt.nextRun,delayInfo:O.merger}]},[te,O]);if(ne||me)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(k||!O||!te)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(al,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),s.jsx("div",{className:"text-sm text-slate-500",children:(k==null?void 0:k.message)||"Unknown error"}),s.jsx(Ye,{onClick:()=>{ce(),Y()},children:"Retry"})]});const we=O.paused,He=we?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",xt=we?"Paused":"Active",$e=My(te.scheduleBundleId,te.cronSchedule,te.reviewerSchedule,((xn=te.qa)==null?void 0:xn.schedule)||Bf().schedule,((en=te.audit)==null?void 0:en.schedule)||Vf().schedule,((ha=te.roadmapScanner)==null?void 0:ha.slicerSchedule)||Gl().slicerSchedule,((ma=te.merger)==null?void 0:ma.schedule)??_r().schedule),Ft=(oe,ie,xe)=>!$e||oe==="analytics"||!Ls($e.schedules[oe],ie)?Gc(xe):`${$e.label} - ${$e.hints[oe]}`,qa=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Pe,{className:`p-6 border-2 ${He}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Zc,{className:"h-8 w-8"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Automation Status"}),s.jsx("div",{className:"text-2xl font-bold",children:xt}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Ye,{variant:we?"primary":"outline",size:"lg",onClick:Me,loading:v,children:we?s.jsxs(s.Fragment,{children:[s.jsx(zr,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(qx,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(Pe,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Ce.map(oe=>{var ie,xe,Be,Je,ft;return s.jsxs("div",{className:`p-4 rounded-lg border ${oe.enabled?"border-slate-800":"border-slate-800 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[oe.icon,s.jsxs("div",{children:[s.jsx("h4",{className:"text-base font-semibold text-slate-200",children:oe.name}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:oe.description})]})]}),s.jsx("span",{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium ${oe.enabled?"border-green-500/30 bg-green-500/10 text-green-300":"border-slate-700 bg-slate-900 text-slate-400"}`,children:oe.enabled?"Enabled":"Disabled"})]}),s.jsxs("div",{className:"space-y-3 mt-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Schedule"}),s.jsx("div",{className:"text-sm text-slate-200 font-medium",children:Ft(oe.id==="planner"?"slicer":oe.id,oe.id==="qa"?((ie=te.qa)==null?void 0:ie.schedule)||Bf().schedule:oe.id==="audit"?((xe=te.audit)==null?void 0:xe.schedule)||Vf().schedule:oe.id==="planner"?((Be=te.roadmapScanner)==null?void 0:Be.slicerSchedule)||Gl().slicerSchedule:oe.id==="analytics"?((Je=te.analytics)==null?void 0:Je.schedule)||Xc().schedule:oe.id==="merger"?((ft=te.merger)==null?void 0:ft.schedule)||_r().schedule:oe.id==="reviewer"?te.reviewerSchedule||Oy:te.cronSchedule||Cy,oe.schedule)})]}),pe(oe.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),ge(oe.nextRun)]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${oe.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(Af,{className:"h-4 w-4"}),s.jsx("span",{children:oe.enabled?"Configured in Settings > Jobs":"Disabled in Settings > Jobs"})]}),s.jsx("button",{type:"button",onClick:()=>Ne("schedules",oe.id),className:"rounded-md border border-slate-700 px-3 py-1.5 text-xs font-medium text-slate-300 transition-colors hover:border-slate-600 hover:bg-slate-900",children:"Edit cadence"}),["qa","audit","planner","analytics","merger"].includes(oe.id)&&s.jsx("button",{type:"button",onClick:()=>Ne("jobs",oe.id),className:"rounded-md border border-indigo-500/30 bg-indigo-500/10 px-3 py-1.5 text-xs font-medium text-indigo-300 transition-colors hover:border-indigo-400/50 hover:bg-indigo-500/15",children:"Job settings"}),s.jsxs("button",{disabled:b!==null,onClick:()=>_(oe.id),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium text-green-400 bg-green-500/10 hover:bg-green-500/20 border border-green-500/30 hover:border-green-500/50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[b===oe.id?s.jsx("div",{className:"h-3 w-3 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(zr,{className:"h-3 w-3 fill-current"}),"Run now"]})]})]})]},oe.id)})})]})]})},{id:"cadence",label:"Cadence",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Ey,{configs:w,currentProjectId:o??void 0,onEditJob:(oe,ie)=>Ne("schedules",ie),queueStatus:C,queueAnalytics:A}),s.jsx(Pe,{className:"p-6 border border-slate-800 bg-slate-950/50",children:s.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Cadence is configured in Settings"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Use Settings > Schedules for cron cadence and templates. Use Settings > Jobs for enablement, runtime, and merger behavior."})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(Ye,{variant:"outline",onClick:()=>Ne("schedules"),children:"Open Schedules"}),s.jsx(Ye,{onClick:()=>Ne("jobs"),children:"Open Jobs"})]})]})}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Ce.map(oe=>s.jsxs(Pe,{className:"p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[oe.icon,s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-200",children:oe.name}),s.jsx("div",{className:"text-xs text-slate-500",children:oe.description})]})]}),s.jsx("span",{className:"text-xs font-mono text-slate-500",children:oe.schedule})]}),s.jsx("div",{className:"text-sm text-slate-300",children:Gc(oe.schedule)}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx("button",{type:"button",onClick:()=>Ne("schedules",oe.id),className:"rounded-md border border-slate-700 px-3 py-1.5 text-xs font-medium text-slate-300 transition-colors hover:border-slate-600 hover:bg-slate-900",children:"Edit cadence"}),["qa","audit","planner","analytics","merger"].includes(oe.id)&&s.jsx("button",{type:"button",onClick:()=>Ne("jobs",oe.id),className:"rounded-md border border-indigo-500/30 bg-indigo-500/10 px-3 py-1.5 text-xs font-medium text-indigo-300 transition-colors hover:border-indigo-400/50 hover:bg-indigo-500/15",children:"Job settings"})]})]},`cadence-${oe.id}`))})]})},{id:"crontab",label:"Crontab",content:s.jsxs(Pe,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(Kf,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),O.entries.length===0?s.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):s.jsx("div",{className:"space-y-2",children:O.entries.map((oe,ie)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:oe},ie))})]})},{id:"parallelism",label:"Parallelism",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Tg,{className:"h-5 w-5 text-indigo-400"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Buckets"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Control how jobs from different AI providers are dispatched concurrently."})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[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:"Queue Enabled"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Coordinate overlapping jobs globally instead of dispatching each project independently."})]}),s.jsx(oa,{checked:B.enabled,onChange:oe=>X(ie=>({...ie,enabled:oe,isDirty:!0}))})]})}),s.jsx(ta,{label:"Dispatch Mode",value:B.queueMode,onChange:oe=>{X(ie=>({...ie,queueMode:oe,isDirty:!0}))},options:[{label:"Auto — detect providers, balance automatically",value:"auto"},{label:"Conservative — one job at a time globally",value:"conservative"},{label:"Provider-aware — per-bucket concurrency",value:"provider-aware"}],helperText:"Auto (recommended) detects providers and allows cross-provider parallelism with no config. Provider-aware lets you set explicit per-bucket limits."}),s.jsx(ze,{label:"Global Max Concurrency",type:"number",min:"1",max:"20",value:String(B.globalMaxConcurrency),onChange:oe=>{const ie=Math.min(20,Math.max(1,Number(oe.target.value||1)));X(xe=>({...xe,globalMaxConcurrency:ie,isDirty:!0}))},helperText:"Maximum concurrent jobs across all providers."})]}),B.queueMode==="provider-aware"&&s.jsxs("div",{className:"space-y-3 pt-2 border-t border-slate-800",children:[s.jsx("div",{className:"text-sm font-medium text-slate-300",children:"Configured Buckets"}),B.providerBuckets.length===0&&s.jsx("div",{className:"text-sm text-slate-500",children:"No buckets configured. Add a bucket below to set per-provider concurrency limits."}),B.providerBuckets.map((oe,ie)=>{var Be,Je;const xe=((Je=(Be=A==null?void 0:A.byProviderBucket)==null?void 0:Be[oe.key])==null?void 0:Je.running)??0;return s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-slate-800 bg-slate-950/50",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-sm font-mono text-slate-200 truncate",children:oe.key}),xe>0&&s.jsxs("div",{className:"text-xs text-amber-400 mt-0.5",children:[xe," running"]})]}),s.jsx("div",{className:"w-28 shrink-0",children:s.jsx(ze,{type:"number",min:"1",max:"10",value:String(oe.maxConcurrency),"aria-label":`Max concurrency for ${oe.key}`,onChange:ft=>{const aa=Math.min(10,Math.max(1,Number(ft.target.value||1)));X(na=>{const yt=[...na.providerBuckets];return yt[ie]={...yt[ie],maxConcurrency:aa},{...na,providerBuckets:yt,isDirty:!0}})}})}),s.jsx("button",{type:"button","aria-label":`Remove bucket ${oe.key}`,onClick:()=>{X(ft=>({...ft,providerBuckets:ft.providerBuckets.filter((aa,na)=>na!==ie),isDirty:!0}))},className:"p-1.5 rounded text-slate-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",children:s.jsx(qr,{className:"h-4 w-4"})})]},oe.key)}),P?s.jsxs("div",{className:"flex items-end gap-3 p-3 rounded-lg border border-indigo-500/30 bg-indigo-950/20",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ze,{label:"Bucket Key",placeholder:"e.g. claude-native, codex",value:K,onChange:oe=>fe(oe.target.value),helperText:"Provider bucket key"})}),s.jsx("div",{className:"w-28 shrink-0",children:s.jsx(ze,{label:"Max Concurrency",type:"number",min:"1",max:"10",value:G,onChange:oe=>F(oe.target.value)})}),s.jsxs("div",{className:"flex gap-2 pb-0.5",children:[s.jsx(Ye,{size:"sm",onClick:()=>{const oe=K.trim();if(!oe)return;const ie=Math.min(10,Math.max(1,Number(G||1)));X(xe=>({...xe,providerBuckets:[...xe.providerBuckets.filter(Be=>Be.key!==oe),{key:oe,maxConcurrency:ie}],isDirty:!0})),fe(""),F("1"),ae(!1)},disabled:!K.trim(),children:"Add"}),s.jsx(Ye,{size:"sm",variant:"ghost",onClick:()=>{ae(!1),fe(""),F("1")},children:"Cancel"})]})]}):s.jsxs("button",{type:"button",onClick:()=>ae(!0),className:"flex items-center gap-1.5 text-sm text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(Zl,{className:"h-4 w-4"}),"Add Bucket"]})]})]}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Ye,{variant:"ghost",onClick:()=>{var oe;if(te){const ie=((oe=te.queue)==null?void 0:oe.providerBuckets)??{};X(xe=>{var Be,Je,ft;return{...xe,enabled:((Be=te.queue)==null?void 0:Be.enabled)??!0,queueMode:((Je=te.queue)==null?void 0:Je.mode)??"auto",globalMaxConcurrency:((ft=te.queue)==null?void 0:ft.maxConcurrency)??1,providerBuckets:Object.entries(ie).map(([aa,na])=>({key:aa,maxConcurrency:na.maxConcurrency})),isDirty:!1}}),ae(!1),fe(""),F("1")}},disabled:!B.isDirty,children:"Reset"}),s.jsxs(Ye,{onClick:le,loading:S,disabled:!B.isDirty,children:[s.jsx(Af,{className:"h-4 w-4 mr-2"}),"Save Queue Settings"]})]})]})}];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.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"}),s.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Monitor automation here. Edit cadence and job behavior in Settings."})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[$e&&s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Schedule Bundle"}),s.jsx("div",{className:"text-sm font-medium text-indigo-300",children:$e.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",O.schedulingPriority,"/5 across registered projects"]})]}),s.jsx(Ye,{variant:"outline",onClick:()=>Ne("schedules"),children:"Open Settings"})]})]}),s.jsx(Jx,{tabs:qa,activeTab:f,onChange:m})]})};function ix(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const QN=[{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"}],IN=(l,r)=>l.includes(r)?l.filter(o=>o!==r):[...l,r],ux=({webhook:l,onChange:r,onSave:o,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(ta,{label:"Type",value:l.type,onChange:m=>{const v=m;r(v==="telegram"?{type:v,botToken:"",chatId:"",events:l.events}:{type:v,url:"",events:l.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),l.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(ze,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:m=>r({...l,botToken:m.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(ze,{label:"Chat ID",value:l.chatId||"",onChange:m=>r({...l,chatId:m.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:m=>r({...l,url:m.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:QN.map(m=>s.jsx("button",{type:"button",onClick:()=>r({...l,events:IN(l.events,m.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${l.events.includes(m.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:m.label},m.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Ye,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Ye,{onClick:o,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:f?"Add Webhook":"Save Changes"})]})]}),Dy=({notifications:l,onChange:r,globalWebhook:o,onSetGlobal:c,onUnsetGlobal:f})=>{const[m,v]=_e.useState(null),[N,S]=_e.useState(!1),[x,b]=_e.useState({type:"slack",url:"",events:[]}),T=()=>{r({webhooks:[...l.webhooks,x]}),b({type:"slack",url:"",events:[]}),S(!1)},w=(C,M)=>{const A=[...l.webhooks];A[C]=M,r({webhooks:A})},R=C=>{r({webhooks:l.webhooks.filter((M,A)=>A!==C)})};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:l.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):l.webhooks.map((C,M)=>s.jsx("div",{children:m===M?s.jsx(ux,{webhook:C,onChange:A=>w(M,A),onSave:()=>v(null),onCancel:()=>v(null)}):s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:C.type}),C.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",C.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:C.events.map(A=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:A.replace("_"," ")},A))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[c!==void 0&&(()=>{const A=o!=null&&ix(C)===ix(o);return s.jsx("button",{type:"button",onClick:()=>A?f==null?void 0:f():c(C),className:`p-2 transition-colors ${A?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":A?"Global channel (active)":"Set as global channel",title:A?"Global channel (active)":"Set as global channel",children:s.jsx(R1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>v(M),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${C.type} webhook`,title:`Edit ${C.type} webhook`,children:s.jsx(no,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>R(M),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${C.type} webhook`,title:`Delete ${C.type} webhook`,children:s.jsx(qr,{className:"h-4 w-4"})})]})]})},M))}),N?s.jsx(ux,{webhook:x,onChange:b,onSave:T,onCancel:()=>S(!1),isNew:!0}):s.jsxs(Ye,{variant:"ghost",onClick:()=>S(!0),children:[s.jsx(Zl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},XN=({isOpen:l,onClose:r,title:o,children:c})=>(U.useEffect(()=>{const f=m=>{m.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?qb.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:o}),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),JN=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(o=>l.toUpperCase().includes(o)),KN=({value:l,isSensitive:r})=>{const[o,c]=_e.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:o?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>c(!o),className:"text-slate-500 hover:text-slate-300","aria-label":o?"Hide sensitive value":"Show sensitive value",title:o?"Hide sensitive value":"Show sensitive value",children:o?s.jsx(w1,{className:"h-4 w-4"}):s.jsx(T1,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},Ry=({envVars:l,onChange:r,compact:o=!1})=>{const[c,f]=_e.useState(""),[m,v]=_e.useState(""),[N,S]=_e.useState(null),[x,b]=_e.useState(""),{addToast:T}=$t(),w=()=>{if(c.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(c)){T({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...l,[c]:m}),f(""),v("")}},R=B=>{const X={...l};delete X[B],r(X)},C=B=>{S(B),b(l[B]??"")},M=()=>{N&&(r({...l,[N]:x}),S(null),b(""))},A=()=>{S(null),b("")},Q=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[!o&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:Q.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):Q.map(([B,X])=>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:B}),N===B?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:x,onChange:K=>b(K.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),s.jsx("button",{type:"button",onClick:M,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${B} value`,title:`Save ${B} value`,children:s.jsx(Af,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:A,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${B}`,title:`Cancel editing ${B}`,children:s.jsx(Br,{className:"h-4 w-4"})})]}):s.jsx(KN,{value:X,isSensitive:JN(B)})]}),N!==B&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>C(B),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${B}`,title:`Edit ${B}`,children:s.jsx(no,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>R(B),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${B}`,title:`Delete ${B}`,children:s.jsx(qr,{className:"h-4 w-4"})})]})]},B))}),s.jsxs("div",{className:`flex items-end gap-3 ${o?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!o&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:c,onChange:B=>f(B.target.value.toUpperCase()),placeholder:o?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!o&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:m,onChange:B=>v(B.target.value),placeholder:o?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Ye,{onClick:w,disabled:!c.trim(),size:o?"sm":"md",children:[s.jsx(Zl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function ej(l,r){var o;return!!(l!=null&&l.startsWith("glm-")||(o=r==null?void 0:r.model)!=null&&o.startsWith("glm-"))}function tj(l,r){var o,c;return ej(l,r)?!((c=(o=r==null?void 0:r.envVars)==null?void 0:o.ANTHROPIC_API_KEY)!=null&&c.trim()):!1}const cx={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:""}},aj=({isOpen:l,onClose:r,onSave:o,presetId:c,preset:f,isBuiltIn:m,existingIds:v})=>{const[N,S]=_e.useState(""),[x,b]=_e.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[T,w]=_e.useState(!1),[R,C]=_e.useState("custom"),[M,A]=_e.useState(null),Q=tj(c??N,x);_e.useEffect(()=>{l&&(c&&f?(S(c),b({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"?C("claude"):c==="codex"||f.command==="codex"?C("codex"):C("custom")):(S(""),b({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),C("custom")),A(null),w(!!(f!=null&&f.envVars&&Object.keys(f.envVars).length>0)))},[l,c,f]);const B=G=>{if(C(G),G!=="custom"&&cx[G]){const F=cx[G];b(P=>({...P,...F,envVars:P.envVars})),!c&&!N&&S(G)}},X=(G,F)=>{b(P=>({...P,[G]:F})),A(null)},K=()=>{if(!x.name.trim())return A("Name is required"),!1;if(!x.command.trim())return A("Command is required"),!1;if(!c){if(!N.trim())return A("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(N))return A("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(v.includes(N))return A("A preset with this ID already exists"),!1}return!0},fe=()=>{var F,P,ae,O,ne,k;if(!K())return;const G={name:x.name.trim(),command:x.command.trim()};(F=x.subcommand)!=null&&F.trim()&&(G.subcommand=x.subcommand.trim()),(P=x.promptFlag)!=null&&P.trim()&&(G.promptFlag=x.promptFlag.trim()),(ae=x.autoApproveFlag)!=null&&ae.trim()&&(G.autoApproveFlag=x.autoApproveFlag.trim()),(O=x.workdirFlag)!=null&&O.trim()&&(G.workdirFlag=x.workdirFlag.trim()),(ne=x.modelFlag)!=null&&ne.trim()&&(G.modelFlag=x.modelFlag.trim()),(k=x.model)!=null&&k.trim()&&(G.model=x.model.trim()),x.envVars&&Object.keys(x.envVars).length>0&&(G.envVars=x.envVars),o(c||N,G),r()};return s.jsx(XN,{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}),Q&&s.jsx("div",{className:"p-3 rounded-md bg-amber-500/10 border border-amber-500/20 text-amber-300 text-sm",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(su,{className:"h-4 w-4 shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:"GLM presets require `ANTHROPIC_API_KEY`."}),s.jsx("div",{className:"text-amber-200/80",children:"Add `ANTHROPIC_API_KEY` in Environment Variables before using this preset."})]})]})}),!m&&s.jsx("div",{children:s.jsx(ta,{label:"Template",value:R,onChange:B,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:G=>S(G.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:x.name,onChange:G=>X("name",G.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(ze,{label:"Command",value:x.command,onChange:G=>X("command",G.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:x.model??"",onChange:G=>X("model",G.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(ze,{label:"Model Flag",value:x.modelFlag??"",onChange:G=>X("modelFlag",G.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:()=>w(!T),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[T?s.jsx(f1,{className:"h-4 w-4"}):s.jsx(zx,{className:"h-4 w-4"}),"Advanced Options"]}),T&&s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ze,{label:"Subcommand",value:x.subcommand??"",onChange:G=>X("subcommand",G.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(ze,{label:"Prompt Flag",value:x.promptFlag??"",onChange:G=>X("promptFlag",G.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:x.autoApproveFlag??"",onChange:G=>X("autoApproveFlag",G.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(ze,{label:"Workdir Flag",value:x.workdirFlag??"",onChange:G=>X("workdirFlag",G.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(Ry,{envVars:x.envVars??{},onChange:G=>X("envVars",G),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Ye,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Ye,{onClick:fe,children:c?"Save Changes":"Add Preset"})]})]})})},Jc=({label:l,value:r,onChange:o,placeholder:c,helpText:f})=>{const[m,v]=_e.useState(""),N=()=>{m.trim()&&!r.includes(m.trim())&&(o([...r,m.trim()]),v(""))},S=b=>{o(r.filter(T=>T!==b))},x=b=>{b.key==="Enter"&&(b.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(b=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[b,s.jsx("button",{type:"button",onClick:()=>S(b),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${b}`,title:`Remove ${b}`,children:s.jsx(Br,{className:"h-3 w-3"})})]},b))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:m,onChange:b=>v(b.target.value),onKeyDown:x,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(Ye,{onClick:N,disabled:!m.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(Zl,{className:"h-4 w-4"})})]}),f&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:f})]})},nj=({form:l,updateField:r,projectName:o,doctorChecks:c,doctorLoading:f})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(Pe,{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:o,disabled:!0}),s.jsx(ze,{label:"Default Branch",value:l.defaultBranch,onChange:m=>r("defaultBranch",m.target.value)}),s.jsx(ze,{label:"PRD Directory",value:l.prdDir,onChange:m=>r("prdDir",m.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(ze,{label:"Branch Prefix",value:l.branchPrefix,onChange:m=>r("branchPrefix",m.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(oa,{label:"Enable PRD Executor",checked:l.executorEnabled,onChange:m=>r("executorEnabled",m)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(oa,{label:"Enable Automated Reviews",checked:l.reviewerEnabled,onChange:m=>r("reviewerEnabled",m)})})]}),s.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:s.jsx(Jc,{label:"Branch Patterns",value:l.branchPatterns,onChange:m=>r("branchPatterns",m),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})}),s.jsxs(Pe,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(_x,{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((m,v)=>{const N=m.status==="pass",S=m.status==="warn",x=N?"bg-green-500/10 text-green-400 border-green-500/20":S?"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:m.name}),s.jsx("p",{className:"text-xs text-slate-500",children:m.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${x}`,children:m.status.toUpperCase()})]},`${m.name}-${v}`)})]})]}),ox=({presetId:l,preset:r,isBuiltIn:o,onEdit:c,onDelete:f,onReset:m})=>{var x,b,T;const v=r.envVars?Object.keys(r.envVars).length:0,S=(l.startsWith("glm-")||((x=r.model)==null?void 0:x.startsWith("glm-")))&&!((T=(b=r.envVars)==null?void 0:b.ANTHROPIC_API_KEY)!=null&&T.trim());return s.jsxs("div",{className:"flex flex-col p-4 rounded-lg border border-slate-800 bg-slate-950/40 hover:border-slate-700 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:r.name}),o&&s.jsx(kr,{variant:"info",className:"text-[10px]",children:"Built-in"}),S&&s.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] bg-amber-900/40 text-amber-400 border border-amber-800/50",title:"GLM presets require ANTHROPIC_API_KEY in env vars",children:[s.jsx(su,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick: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(no,{className:"h-4 w-4"})}),o?m&&s.jsx("button",{type:"button",onClick:m,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(Bx,{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(qr,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Command:"}),s.jsxs("code",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-indigo-400 font-mono",children:[r.command,r.subcommand&&` ${r.subcommand}`]})]}),r.model&&s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Model:"}),s.jsx(kr,{variant:"neutral",className:"text-[10px] font-mono",children:r.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",l]}),v>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[v," env var",v!==1?"s":""]})]})]})},Yf={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},$f={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics",planner:"Planner",merger:"Merger"},Cf={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},dx=({override:l,onChange:r,onSave:o,onCancel:c,isNew:f,presetOptions:m})=>{const v=C=>{const M=l.days.includes(C)?l.days.filter(A=>A!==C):[...l.days,C].sort((A,Q)=>A-Q);r({...l,days:M})},N=()=>{r({...l,days:[1,2,3,4,5]})},S=()=>{r({...l,days:[0,6]})},x=()=>{r({...l,days:[0,1,2,3,4,5,6]})},b=()=>{r({...l,jobTypes:null})},T=C=>{const M=l.jobTypes??[],A=M.includes(C)?M.filter(Q=>Q!==C):[...M,C];r({...l,jobTypes:A.length===0?null:A})},w=l.jobTypes===null||l.jobTypes===void 0,R=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:C=>r({...l,label:C.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(ta,{label:"Provider",value:l.presetId,onChange:C=>r({...l,presetId:C}),options:m})]}),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(Yf).map(C=>s.jsx("button",{type:"button",onClick:()=>v(C),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${l.days.includes(C)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:Yf[C]},C)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:N,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekdays"}),s.jsx("button",{type:"button",onClick:S,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekend"}),s.jsx("button",{type:"button",onClick:x,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"All"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Start Time"}),s.jsx("input",{type:"time",value:l.startTime,onChange:C=>r({...l,startTime:C.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"End Time"}),s.jsx("input",{type:"time",value:l.endTime,onChange:C=>r({...l,endTime:C.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Job Types"}),s.jsx("button",{type:"button",onClick:b,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:w?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys($f).filter(C=>C!=="planner").map(C=>{var A;const M=w||(((A=l.jobTypes)==null?void 0:A.includes(C))??!1);return s.jsx("button",{type:"button",onClick:()=>T(C),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${M?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled:w,children:$f[C]},C)})}),w&&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(oa,{checked:l.enabled,onChange:C=>r({...l,enabled:C}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(Ye,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Ye,{onClick:o,disabled:!R,children:f?"Add Override":"Save Changes"})]})]})},lj=({overrides:l,onChange:r,presetOptions:o})=>{const[c,f]=_e.useState(null),[m,v]=_e.useState(!1),[N,S]=_e.useState(Cf),x=()=>{r([...l,N]),S({...Cf}),v(!1)},b=(A,Q)=>{const B=[...l];B[A]=Q,r(B)},T=A=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(l.filter((Q,B)=>B!==A))},w=A=>{const Q=[...l];Q[A]={...Q[A],enabled:!Q[A].enabled},r(Q)},R=A=>A.length===7?"Every day":A.length===5&&A.every(Q=>Q>=1&&Q<=5)?"Weekdays":A.length===2&&A.includes(0)&&A.includes(6)?"Weekends":A.map(Q=>Yf[Q]).join(", "),C=A=>!A||A.length===0?"All Jobs":A.map(Q=>$f[Q]).join(", "),M=A=>{const Q=o.find(B=>B.value===A);return(Q==null?void 0:Q.label)||A};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((A,Q)=>s.jsx("div",{children:c===Q?s.jsx(dx,{override:A,onChange:B=>b(Q,B),onSave:()=>f(null),onCancel:()=>f(null),presetOptions:o}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${A.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(oa,{checked:A.enabled,onChange:()=>w(Q)}),s.jsx("span",{className:"text-slate-100 font-medium",children:A.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:M(A.presetId)})," · ",R(A.days)," · ",A.startTime," - ",A.endTime," · ",C(A.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>f(Q),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${A.label}`,title:`Edit ${A.label}`,children:s.jsx(no,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>T(Q),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${A.label}`,title:`Delete ${A.label}`,children:s.jsx(qr,{className:"h-4 w-4"})})]})]})},Q))}),m?s.jsx(dx,{override:N,onChange:S,onSave:x,onCancel:()=>{v(!1),S({...Cf})},isNew:!0,presetOptions:o}):s.jsxs(Ye,{variant:"ghost",onClick:()=>v(!0),children:[s.jsx(Zl,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},Kc=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],sj={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"}}},rj=({form:l,updateField:r,jobProvidersChangedRef:o,getAllPresets:c,getPresetOptions:f,handleEditPreset:m,handleDeletePreset:v,handleResetPreset:N,handleAddPreset:S})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure AI provider presets with custom commands, models, and environment variables"})]}),s.jsxs(Ye,{onClick:S,children:[s.jsx(Zl,{className:"h-4 w-4 mr-2"}),"Add Provider"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[Kc.map(x=>{const T=c()[x];return T?s.jsx(ox,{presetId:x,preset:T,isBuiltIn:!0,onEdit:()=>m(x),onReset:()=>N(x)},x):null}),Object.entries(l.providerPresets).filter(([x])=>!Kc.includes(x)).map(([x,b])=>s.jsx(ox,{presetId:x,preset:b,isBuiltIn:!1,onEdit:()=>m(x),onDelete:()=>v(x)},x))]})]}),s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Assignments"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Assign provider presets to specific job types. Jobs without an assignment use the global provider."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-indigo-500/30 bg-indigo-500/5 gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Global Provider"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Default preset for all jobs without a specific assignment"})]}),s.jsx("div",{className:"w-64",children:s.jsx(ta,{value:l.provider,onChange:x=>r("provider",x),options:f(l.providerPresets)})})]}),[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"},{key:"analytics",label:"Analytics"}].map(({key:x,label:b})=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:b}),s.jsx("div",{className:"w-64",children:s.jsx(ta,{value:l.jobProviders[x]??"",onChange:T=>{const w={...l.jobProviders};T===""?delete w[x]:w[x]=T,o.current=!0,r("jobProviders",w)},options:[{label:"Use Global (default)",value:""},...f(l.providerPresets)]})})]},x))]})]}),s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Rate Limit Fallback"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Preset to use when the active provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ta,{label:"Primary Fallback Preset",value:l.primaryFallbackPreset,onChange:x=>r("primaryFallbackPreset",x),options:[{label:"— None —",value:""},...Object.entries(c()).map(([x,b])=>({label:b.name,value:x}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(ta,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:x=>r("secondaryFallbackPreset",x),options:[{label:"— None —",value:""},...Object.entries(c()).map(([x,b])=>({label:b.name,value:x}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Schedule Overrides"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Temporarily switch providers based on day of week and time windows"})]}),s.jsx(lj,{overrides:l.providerScheduleOverrides,onChange:x=>r("providerScheduleOverrides",x),presetOptions:Object.entries(c()).map(([x,b])=>({label:b.name,value:x}))})]}),s.jsxs(Pe,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Provider Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Environment variables passed to all provider CLIs. Preset-level env vars take precedence."}),s.jsx(Ry,{envVars:l.providerEnv,onChange:x=>r("providerEnv",x)})]}),s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Performance"}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("input",{type:"range",min:"0",max:"100",value:l.minReviewScore,onChange:x=>r("minReviewScore",Number(x.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),s.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:l.minReviewScore})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ze,{label:"Max Runtime (Executor)",type:"number",value:String(l.maxRuntime),onChange:x=>r("maxRuntime",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ze,{label:"Max Runtime (Reviewer)",type:"number",value:String(l.reviewerMaxRuntime),onChange:x=>r("reviewerMaxRuntime",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ze,{label:"Max Log Size",type:"number",value:String(l.maxLogSize),onChange:x=>r("maxLogSize",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automatic retry behavior for the PR reviewer when fixes do not fully resolve issues."})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ze,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(l.reviewerMaxRetries),onChange:x=>{const b=Math.min(10,Math.max(0,Number(x.target.value||0)));r("reviewerMaxRetries",b)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(ze,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(l.reviewerRetryDelay),onChange:x=>{const b=Math.min(300,Math.max(0,Number(x.target.value||0)));r("reviewerRetryDelay",b)},helperText:"Wait time between retry attempts to let CI settle."}),s.jsx(ze,{label:"Max PRs Per Run",type:"number",min:"0",max:"100",value:String(l.reviewerMaxPrsPerRun),onChange:x=>{const b=Math.min(100,Math.max(0,Number(x.target.value||0)));r("reviewerMaxPrsPerRun",b)},helperText:"Hard cap on how many PRs the reviewer processes per run. 0 = unlimited."})]})]})]}),nu=({schedule:l,onManage:r})=>s.jsxs("div",{className:"flex items-start justify-between gap-4 p-4 rounded-xl border border-slate-800 bg-slate-950/50",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Managed in Schedules"}),s.jsx("div",{className:"text-sm font-medium text-slate-200 mt-1",children:Gc(l)}),s.jsx("div",{className:"text-xs font-mono text-slate-500 mt-1",children:l})]}),s.jsx("button",{type:"button",onClick:r,className:"shrink-0 rounded-md border border-indigo-500/30 bg-indigo-500/10 px-3 py-1.5 text-xs font-medium text-indigo-300 transition-colors hover:border-indigo-400/50 hover:bg-indigo-500/15",children:"Manage schedule"})]}),ij=({form:l,updateField:r,handleRoadmapToggle:o,onManageSchedule:c})=>{var f,m;return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{id:"job-section-qa",children:s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),s.jsx(oa,{checked:l.qa.enabled,onChange:v=>r("qa",{...l.qa,enabled:v})})]}),l.qa.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsx(nu,{schedule:l.qa.schedule,onManage:()=>c("qa")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:v=>r("qa",{...l.qa,maxRuntime:Number(v.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(ta,{label:"Artifacts",value:l.qa.artifacts,onChange:v=>r("qa",{...l.qa,artifacts:v}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(ze,{label:"Skip Label",value:l.qa.skipLabel,onChange:v=>r("qa",{...l.qa,skipLabel:v.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsx(Jc,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:v=>r("qa",{...l.qa,branchPatterns:v}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA (defaults to top-level branchPatterns if empty)"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Automatically install Playwright browsers if missing during QA run"})]}),s.jsx(oa,{checked:l.qa.autoInstallPlaywright,onChange:v=>r("qa",{...l.qa,autoInstallPlaywright:v})})]})]})]})}),s.jsx("div",{id:"job-section-audit",children:s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),s.jsx(oa,{checked:l.audit.enabled,onChange:v=>r("audit",{...l.audit,enabled:v})})]}),l.audit.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsx(nu,{schedule:l.audit.schedule,onManage:()=>c("audit")}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:v=>r("audit",{...l.audit,maxRuntime:Number(v.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})})]})]})}),s.jsx("div",{id:"job-section-analytics",children:s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Analytics (Amplitude)"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Fetch Amplitude data, analyze with AI, and create board issues"})]}),s.jsx(oa,{checked:l.analytics.enabled,onChange:v=>r("analytics",{...l.analytics,enabled:v})})]}),l.analytics.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsx(nu,{schedule:l.analytics.schedule,onManage:()=>c("analytics")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ze,{label:"Amplitude API Key",value:((f=l.providerEnv)==null?void 0:f.AMPLITUDE_API_KEY)??"",onChange:v=>r("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:v.target.value}),placeholder:"Required",helperText:"Your Amplitude project API key"}),s.jsx(ze,{label:"Amplitude Secret Key",type:"password",value:((m=l.providerEnv)==null?void 0:m.AMPLITUDE_SECRET_KEY)??"",onChange:v=>r("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:v.target.value}),placeholder:"Required",helperText:"Your Amplitude secret key"}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:v=>r("analytics",{...l.analytics,maxRuntime:Number(v.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for analytics job (default: 900 seconds)"}),s.jsx(ze,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:v=>r("analytics",{...l.analytics,lookbackDays:Math.max(1,Math.min(90,Number(v.target.value||7)))}),helperText:"Number of days to look back in Amplitude (1-90)"}),s.jsx(ta,{label:"Target Column",value:l.analytics.targetColumn,onChange:v=>r("analytics",{...l.analytics,targetColumn:v}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}],helperText:"Board column for created issues"}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:"Analysis Prompt (optional)"}),s.jsx("textarea",{rows:4,value:l.analytics.analysisPrompt??"",onChange:v=>r("analytics",{...l.analytics,analysisPrompt:v.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-y"}),s.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:"Custom prompt for AI analysis. Leave empty to use default."})]})]})]})]})}),s.jsx("div",{id:"job-section-slicer",children:s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Generate one PRD per run using ROADMAP.md first, then audit findings when roadmap work is exhausted"})]}),s.jsx(oa,{checked:l.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:o})]}),l.roadmapScanner.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsx(nu,{schedule:l.roadmapScanner.slicerSchedule,onManage:()=>c("slicer")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ze,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:v=>r("roadmapScanner",{...l.roadmapScanner,roadmapPath:v.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(ze,{label:"Planner Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:v=>r("roadmapScanner",{...l.roadmapScanner,slicerMaxRuntime:Number(v.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(ta,{label:"Planner Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:v=>r("roadmapScanner",{...l.roadmapScanner,priorityMode:v==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}],helperText:"Choose whether planner consumes roadmap items or audit findings first."}),s.jsx(ta,{label:"Planner Issue Column",value:l.roadmapScanner.issueColumn||"Ready",onChange:v=>r("roadmapScanner",{...l.roadmapScanner,issueColumn:v==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})]})}),s.jsx("div",{id:"job-section-merger",children:s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Merge Orchestrator"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Repo-wide PR merge coordinator — scans, rebases, and merges in FIFO order"})]}),s.jsx(oa,{checked:l.merger.enabled,onChange:v=>r("merger",{...l.merger,enabled:v})})]}),l.merger.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsx(nu,{schedule:l.merger.schedule,onManage:()=>c("merger")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.merger.maxRuntime),onChange:v=>r("merger",{...l.merger,maxRuntime:Number(v.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime (default: 1800 seconds)"}),s.jsx(ta,{label:"Merge Method",value:l.merger.mergeMethod,onChange:v=>r("merger",{...l.merger,mergeMethod:v}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}],helperText:"Git merge method for eligible PRs"}),s.jsx(ze,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.merger.minReviewScore),onChange:v=>r("merger",{...l.merger,minReviewScore:Math.max(0,Math.min(100,Number(v.target.value||0)))}),helperText:"Minimum review score required (0-100)"}),s.jsx(ze,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.merger.maxPrsPerRun),onChange:v=>r("merger",{...l.merger,maxPrsPerRun:Math.max(0,Number(v.target.value||0))}),helperText:"Maximum PRs to merge per run (0 = unlimited)"})]}),s.jsx(Jc,{label:"Branch Patterns",value:l.merger.branchPatterns,onChange:v=>r("merger",{...l.merger,branchPatterns:v}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter eligible PRs (empty = use top-level patterns)"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Rebase before merge"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rebase each PR against its base branch before merging"})]}),s.jsx(oa,{checked:l.merger.rebaseBeforeMerge,onChange:v=>r("merger",{...l.merger,rebaseBeforeMerge:v})})]})]})]})})]})},ks=({label:l,value:r,onChange:o,helperText:c,placeholder:f="5 */3 * * *"})=>{const m=VN(r),v=m==="__custom__",N=b=>{b!=="__custom__"&&o(b)},S=b=>{o(b.target.value)},x=Ic.find(b=>b.value===m);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(ta,{label:l,value:m,onChange:N,options:Ic.map(b=>({label:b.label,value:b.value})),helperText:v?void 0:(x==null?void 0:x.description)||c}),v&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(ze,{label:"Cron Expression",value:r,onChange:S,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)"]})]})]})},uj=({form:l,scheduleMode:r,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:f,onSwitchToCustom:m,onApplyTemplate:v,allProjectConfigs:N,currentProjectId:S,onEditJob:x})=>s.jsxs(Pe,{className:"p-6 space-y-6",children:[N&&N.length>0&&s.jsx(Ey,{configs:N,currentProjectId:S,onEditJob:x}),s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"}),s.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:m,children:"Custom"})]})]}),r==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:ih.map(b=>{const T=o===b.id;return s.jsxs("button",{type:"button",onClick:()=>v(b),className:`text-left p-4 rounded-lg border transition-colors ${T?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children:b.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:b.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",b.hints.executor],["Reviewer",b.hints.reviewer],["QA",b.hints.qa],["Audit",b.hints.audit],["Planner",b.hints.slicer],["Merger",b.hints.merger]].map(([w,R])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:w}),s.jsx("span",{className:"text-xs text-slate-400",children:R})]},w))})]},b.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(ks,{label:"PRD Execution Schedule",value:l.cronSchedule,onChange:b=>c("cronSchedule",b)})}),s.jsx("div",{id:"job-schedule-reviewer",children:s.jsx(ks,{label:"PR Review Schedule",value:l.reviewerSchedule,onChange:b=>c("reviewerSchedule",b)})}),s.jsx("div",{id:"job-schedule-qa",children:s.jsx(ks,{label:"QA Schedule",value:l.qa.schedule,onChange:b=>c("qa",{...l.qa,schedule:b})})}),s.jsx("div",{id:"job-schedule-audit",children:s.jsx(ks,{label:"Audit Schedule",value:l.audit.schedule,onChange:b=>c("audit",{...l.audit,schedule:b})})}),s.jsx("div",{id:"job-schedule-slicer",children:s.jsx(ks,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule,onChange:b=>c("roadmapScanner",{...l.roadmapScanner,slicerSchedule:b})})}),l.analytics&&s.jsx("div",{id:"job-schedule-analytics",children:s.jsx(ks,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:b=>c("analytics",{...l.analytics,schedule:b})})}),l.merger&&s.jsx("div",{id:"job-schedule-merger",children:s.jsx(ks,{label:"Merge Orchestrator Schedule",value:l.merger.schedule,onChange:b=>c("merger",{...l.merger,schedule:b})})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(ta,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:b=>c("schedulingPriority",Number(b)),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(oa,{checked:l.globalQueueEnabled??!0,onChange:b=>c("globalQueueEnabled",b)})]})}),s.jsx(ze,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:b=>{const T=Math.min(59,Math.max(0,Number(b.target.value||0)));c("cronScheduleOffset",T)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]}),cj=({form:l,scheduleMode:r,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:f,onSwitchToCustom:m,onApplyTemplate:v,allProjectConfigs:N,currentProjectId:S,onEditJob:x})=>s.jsx(uj,{form:l,scheduleMode:r,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:f,onSwitchToCustom:m,onApplyTemplate:v,allProjectConfigs:N,currentProjectId:S,onEditJob:x}),oj=({form:l,updateField:r})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(oa,{checked:l.boardProvider.enabled,onChange:o=>r("boardProvider",{...l.boardProvider,enabled:o})})]}),l.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(ta,{label:"Board Provider",value:l.boardProvider.provider,onChange:o=>r("boardProvider",{...l.boardProvider,provider:o}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),l.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(ze,{label:"Project Number",type:"number",value:String(l.boardProvider.projectNumber||""),onChange:o=>r("boardProvider",{...l.boardProvider,projectNumber:o.target.value?Number(o.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(ze,{label:"Repository",value:l.boardProvider.repo||"",onChange:o=>r("boardProvider",{...l.boardProvider,repo:o.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),l.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]}),s.jsxs(Pe,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Dy,{notifications:l.notifications,onChange:o=>r("notifications",o)})]})]}),dj=({form:l,updateField:r})=>s.jsxs(Pe,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ze,{label:"Templates Directory",value:l.templatesDir,onChange:o=>r("templatesDir",o.target.value),helperText:"Directory for custom template overrides"}),s.jsx(ze,{label:"Max Retries",type:"number",min:"1",value:String(l.maxRetries),onChange:o=>{const c=Math.max(1,Number(o.target.value||1));r("maxRetries",c)},helperText:"Retry attempts for rate-limited API calls"})]}),s.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:s.jsx(Jc,{label:"PRD Priority",value:l.prdPriority,onChange:o=>r("prdPriority",o),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]});function fj(l,r,o,c){const{addToast:f}=$t(),[m,v]=U.useState(!1),[N,S]=U.useState(null),[x,b]=U.useState(null),[T,w]=U.useState(null),R=U.useCallback(()=>({...sj,...l}),[l]),C=U.useCallback(G=>{const F=R();return Object.entries(F).map(([P,ae])=>({label:ae.name,value:P}))},[R]),M=U.useCallback(G=>{const F=[];r===G&&F.push("Global Provider");const P={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[ae,O]of Object.entries(o))O===G&&F.push(P[ae]??ae);return F},[r,o]),A=U.useCallback(()=>{S(null),b(null),v(!0)},[]),Q=U.useCallback(G=>{const P=R()[G];P&&(S(G),b(P),v(!0))},[R]),B=U.useCallback(async(G,F)=>{const P=!N,ae={...l,[G]:F};c("providerPresets",ae);try{await lh({providerPresets:{[G]:F}}),f({title:P?"Preset Added":"Preset Updated",message:P?`${F.name} has been added. You can now assign it to jobs.`:`${F.name} has been saved.`,type:"success"})}catch(O){f({title:"Save Failed",message:O instanceof Error?O.message:"Failed to save preset",type:"error"}),c("providerPresets",l)}},[N,l,c,f]),X=U.useCallback(G=>{var ae,O;if(Kc.includes(G)){f({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const F=M(G);if(F.length>0){w({presetId:G,presetName:((ae=R()[G])==null?void 0:ae.name)??G,references:F});return}const P={...l};delete P[G],c("providerPresets",P),f({title:"Preset Deleted",message:`${((O=R()[G])==null?void 0:O.name)??G} has been removed.`,type:"success"})},[l,c,f,M,R]),K=U.useCallback(G=>{const F={...l};delete F[G],c("providerPresets",F),f({title:"Preset Reset",message:`${G} has been reset to built-in defaults.`,type:"success"})},[l,c,f]),fe=U.useCallback(()=>{if(!T)return;const{presetId:G}=T,F={...l};delete F[G],c("providerPresets",F);const P={...o};for(const ae of Object.keys(P))P[ae]===G&&delete P[ae];c("jobProviders",P),r===G&&c("provider","claude"),w(null),f({title:"Preset Deleted",message:`${T.presetName} has been removed and all references cleared.`,type:"success"})},[T,l,o,r,c,f]);return{presetModalOpen:m,setPresetModalOpen:v,editingPresetId:N,editingPreset:x,deleteWarning:T,setDeleteWarning:w,getAllPresets:R,getPresetOptions:C,getPresetReferences:M,handleAddPreset:A,handleEditPreset:Q,handleSavePreset:B,handleDeletePreset:X,handleResetPreset:K,handleConfirmDelete:fe}}const hj=["executor","reviewer","qa","audit","slicer","analytics"],Of=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||Cy,reviewerSchedule:l.reviewerSchedule||Oy,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||Gl(),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||Bf(),audit:l.audit||Vf(),analytics:l.analytics||Xc(),merger:l.merger??_r(),queue:l.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}}}),fx=l=>{var o;const r=My(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??Gl().slicerSchedule,((o=l.merger)==null?void 0:o.schedule)??_r().schedule);return r?{mode:"template",selectedTemplateId:r.id}:{mode:"custom",selectedTemplateId:""}},mj=()=>{const{addToast:l,projectName:r,selectedProjectId:o,globalModeLoading:c,isGlobalMode:f,removeProjectFromList:m}=$t(),[v,N]=_e.useState(!1),[S,x]=_e.useState(!1),[b,T]=_e.useState(!1),[w,R]=_e.useState(null),[C,M]=_e.useState([]),[A,Q]=_e.useState(void 0),B=_e.useRef(!1),X=_e.useRef(!1),[K,fe]=_e.useState("template"),[G,F]=_e.useState("always-on"),[P,ae]=_e.useState("general"),[O,ne]=_e.useState(null),{data:k,loading:ce,error:te,refetch:me}=gn(nh,[o],{enabled:!c}),{data:Y,loading:re,refetch:ye}=gn(g2,[o],{enabled:!c}),Me=Y??[],Ne=(ie,xe)=>{R(Be=>Be&&{...Be,[ie]:xe})},_=fj((w==null?void 0:w.providerPresets)??{},(w==null?void 0:w.provider)??"claude",(w==null?void 0:w.jobProviders)??{},Ne);_e.useEffect(()=>{Gx().then(M).catch(console.error),R2().then(ie=>Q(ie.webhook)).catch(()=>{})},[o]),_e.useEffect(()=>{const ie=new URLSearchParams(location.search),xe=ie.get("tab"),Be=ie.get("mode");xe&&ae({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",analytics:"jobs",board:"integrations",notifications:"integrations"}[xe]??xe),Be==="custom"?fe("custom"):Be==="template"&&fe("template");const Je=ie.get("jobType");Je&&setTimeout(()=>{xt("current",Je,xe==="schedules"?"schedule":xe==="jobs"?"job":void 0)},300)},[location.search,k]);const le=_e.useCallback(ie=>{const xe=fx(ie);fe(xe.mode),F(xe.selectedTemplateId)},[]);_e.useEffect(()=>{if(k)if(B.current)B.current=!1;else{const ie=Of(k);R(ie),le(ie)}},[k,le]),_e.useEffect(()=>{w&&X.current&&(X.current=!1,Ft())},[w==null?void 0:w.jobProviders]),_e.useEffect(()=>{if(O){const ie=setTimeout(()=>ne(null),2e3);return()=>clearTimeout(ie)}},[O]);const ge=()=>{if(fe("template"),!w)return;const ie=fx(w);ie.mode==="template"&&(F(ie.selectedTemplateId),Ne("scheduleBundleId",ie.selectedTemplateId))},pe=()=>{fe("custom"),Ne("scheduleBundleId",null),F("")},Ce=ie=>{setTimeout(()=>{const xe=document.getElementById(ie);xe&&(xe.scrollIntoView({behavior:"smooth",block:"center"}),ne(ie))},50)},we=ie=>{const xe=ie==="planner"?"slicer":ie;ae("jobs"),Ce(`job-section-${xe}`)},He=ie=>{const xe=ie==="planner"?"slicer":ie;K!=="custom"&&pe(),ae("schedules"),Ce(`job-schedule-${xe}`)},xt=(ie,xe,Be)=>{if(ie!==r&&ie!=="current"){l({title:"Project Switch Required",message:`To edit ${ie}, please switch to that project in the sidebar.`,type:"info"});return}const Je=xe==="planner"?"slicer":xe,ft=new Set(["qa","audit","slicer","analytics","merger"]);if(Be==="job"){we(Je);return}if(Be==="schedule"){He(Je);return}if(ft.has(Je)){we(Je);return}He(Je)},$e=ie=>{F(ie.id),R(xe=>xe&&{...xe,cronSchedule:ie.schedules.executor,reviewerSchedule:ie.schedules.reviewer,scheduleBundleId:ie.id,qa:{...xe.qa,schedule:ie.schedules.qa},audit:{...xe.audit,schedule:ie.schedules.audit},roadmapScanner:{...xe.roadmapScanner,slicerSchedule:ie.schedules.slicer},merger:{...xe.merger,schedule:ie.schedules.merger},fallbackOnRateLimit:!0})},Ft=async()=>{var Be,Je,ft,aa,na,yt,Ba;if(!w)return;const ie=w.cronSchedule!==(k==null?void 0:k.cronSchedule)||w.reviewerSchedule!==(k==null?void 0:k.reviewerSchedule)||w.cronScheduleOffset!==((k==null?void 0:k.cronScheduleOffset)??0)||w.schedulingPriority!==((k==null?void 0:k.schedulingPriority)??3)||w.executorEnabled!==((k==null?void 0:k.executorEnabled)??!0)||w.reviewerEnabled!==((k==null?void 0:k.reviewerEnabled)??!0)||w.queue.enabled!==(((Be=k==null?void 0:k.queue)==null?void 0:Be.enabled)??!0)||w.qa.enabled!==((k==null?void 0:k.qa.enabled)??!0)||w.qa.schedule!==(k==null?void 0:k.qa.schedule)||w.audit.enabled!==((k==null?void 0:k.audit.enabled)??!0)||w.audit.schedule!==(k==null?void 0:k.audit.schedule)||w.analytics.enabled!==(((Je=k==null?void 0:k.analytics)==null?void 0:Je.enabled)??!1)||w.analytics.schedule!==(((ft=k==null?void 0:k.analytics)==null?void 0:ft.schedule)??Xc().schedule)||w.merger.enabled!==(((aa=k==null?void 0:k.merger)==null?void 0:aa.enabled)??!1)||w.merger.schedule!==(((na=k==null?void 0:k.merger)==null?void 0:na.schedule)??_r().schedule)||w.roadmapScanner.enabled!==(((yt=k==null?void 0:k.roadmapScanner)==null?void 0:yt.enabled)??!0)||(w.roadmapScanner.slicerSchedule||Gl().slicerSchedule)!==(((Ba=k==null?void 0:k.roadmapScanner)==null?void 0:Ba.slicerSchedule)||Gl().slicerSchedule),xe={};for(const Gt of hj){const ga=w.jobProviders[Gt];typeof ga=="string"&&ga.trim().length>0?xe[Gt]=ga:k!=null&&k.jobProviders[Gt]&&(xe[Gt]=null)}N(!0);try{const Gt=await lh({provider:w.provider,providerLabel:w.providerLabel.trim(),providerPresets:Object.keys(w.providerPresets).length>0?w.providerPresets:void 0,defaultBranch:w.defaultBranch,prdDir:w.prdDir,branchPrefix:w.branchPrefix,branchPatterns:w.branchPatterns,executorEnabled:w.executorEnabled,reviewerEnabled:w.reviewerEnabled,minReviewScore:w.minReviewScore,maxRuntime:w.maxRuntime,reviewerMaxRuntime:w.reviewerMaxRuntime,maxLogSize:w.maxLogSize,cronSchedule:w.cronSchedule,reviewerSchedule:w.reviewerSchedule,scheduleBundleId:K==="template"?w.scheduleBundleId:null,cronScheduleOffset:w.cronScheduleOffset,schedulingPriority:w.schedulingPriority,maxRetries:w.maxRetries,reviewerMaxRetries:w.reviewerMaxRetries,reviewerRetryDelay:w.reviewerRetryDelay,reviewerMaxPrsPerRun:w.reviewerMaxPrsPerRun,providerEnv:w.providerEnv,notifications:w.notifications,prdPriority:w.prdPriority,roadmapScanner:w.roadmapScanner,templatesDir:w.templatesDir,boardProvider:w.boardProvider,jobProviders:xe,fallbackOnRateLimit:w.fallbackOnRateLimit,primaryFallbackModel:w.primaryFallbackModel,secondaryFallbackModel:w.secondaryFallbackModel,primaryFallbackPreset:w.primaryFallbackPreset||void 0,secondaryFallbackPreset:w.secondaryFallbackPreset||void 0,claudeModel:w.primaryFallbackModel,providerScheduleOverrides:w.providerScheduleOverrides,qa:w.qa,audit:w.audit,analytics:w.analytics,merger:w.merger,queue:w.queue}),ga=Of(Gt);R(ga),le(ga);let Ca="";if(ie)try{await _f()}catch(Cn){Ca=Cn instanceof Error?Cn.message:"failed to reinstall cron schedules"}l(Ca?{title:"Settings Saved (Cron Reinstall Failed)",message:Ca,type:"warning"}:{title:"Settings Saved",message:ie?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),B.current=!0,me(),ye()}catch(Gt){l({title:"Save Failed",message:Gt instanceof Error?Gt.message:"Failed to save configuration",type:"error"})}finally{N(!1)}},qa=()=>{if(k){const ie=Of(k);R(ie),le(ie),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},xn=async ie=>{if(!(A!=null&&!window.confirm("Replace existing global channel?")))try{const xe=await Cg({webhook:ie});Q(xe.webhook)}catch(xe){l({title:"Failed to set global channel",message:xe instanceof Error?xe.message:"Unknown error",type:"error"})}},en=async()=>{try{await Cg({webhook:null}),Q(null)}catch(ie){l({title:"Failed to unset global channel",message:ie instanceof Error?ie.message:"Unknown error",type:"error"})}},ha=async ie=>{try{const xe=await Ix(ie);Ne("roadmapScanner",xe.roadmapScanner);let Be="";try{await _f()}catch(Je){Be=Je instanceof Error?Je.message:"Failed to reinstall cron schedules"}l(Be?{title:"Planner Saved (Cron Reinstall Failed)",message:Be,type:"warning"}:{title:ie?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${ie?"enabled":"disabled"}.`,type:"success"})}catch(xe){l({title:"Toggle Failed",message:xe instanceof Error?xe.message:"Failed to toggle roadmap scanner",type:"error"})}},ma=async()=>{if(o){T(!0);try{await h2(o),m(o),x(!1),l({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(ie){l({title:"Remove Failed",message:ie instanceof Error?ie.message:"Failed to remove project",type:"error"})}finally{T(!1)}}};if(ce||!w)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(te)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(al,{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:te.message}),s.jsx(Ye,{onClick:()=>me(),children:"Retry"})]});const oe=[{id:"general",label:"General",content:s.jsx(nj,{form:w,updateField:Ne,projectName:r,doctorChecks:Me,doctorLoading:re})},{id:"ai-runtime",label:"AI & Runtime",content:s.jsx(rj,{form:w,updateField:Ne,jobProvidersChangedRef:X,getAllPresets:_.getAllPresets,getPresetOptions:_.getPresetOptions,handleEditPreset:_.handleEditPreset,handleDeletePreset:_.handleDeletePreset,handleResetPreset:_.handleResetPreset,handleAddPreset:_.handleAddPreset})},{id:"jobs",label:"Jobs",content:s.jsx(ij,{form:w,updateField:Ne,handleRoadmapToggle:ha,onManageSchedule:He})},{id:"schedules",label:"Schedules",content:s.jsx(cj,{form:{cronSchedule:w.cronSchedule,reviewerSchedule:w.reviewerSchedule,qa:w.qa,audit:w.audit,analytics:w.analytics,roadmapScanner:{enabled:w.roadmapScanner.enabled,slicerSchedule:w.roadmapScanner.slicerSchedule||Gl().slicerSchedule},merger:w.merger,scheduleBundleId:w.scheduleBundleId,schedulingPriority:w.schedulingPriority,cronScheduleOffset:w.cronScheduleOffset,globalQueueEnabled:w.queue.enabled},scheduleMode:K,selectedTemplateId:G,onFieldChange:(ie,xe)=>{ie==="globalQueueEnabled"?Ne("queue",{...w.queue,enabled:xe}):Ne(ie,xe)},onSwitchToTemplate:ge,onSwitchToCustom:pe,onApplyTemplate:$e,allProjectConfigs:C,currentProjectId:o,onEditJob:xt})},{id:"notifications",label:"Notifications",content:s.jsxs(Pe,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Dy,{notifications:w.notifications,onChange:ie=>Ne("notifications",ie),globalWebhook:A,onSetGlobal:xn,onUnsetGlobal:en})]})},{id:"integrations",label:"Integrations",content:s.jsx(oj,{form:w,updateField:Ne})},{id:"advanced",label:"Advanced",content:s.jsx(dj,{form:w,updateField:Ne})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),s.jsx(Jx,{tabs:oe,activeTab:P,onChange:ae}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(Ye,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:qa,children:[s.jsx(Bx,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Ye,{onClick:Ft,loading:v,children:[s.jsx(W1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),f&&o&&s.jsxs("div",{className:"mt-10 rounded-lg border border-red-900/50 bg-red-950/20 p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-red-400 mb-2",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Remove this project from Night Watch. This will uninstall cron jobs and delete all project data from the database. Files on disk will not be touched."}),s.jsxs(Ye,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>x(!0),children:[s.jsx(qr,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),S&&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:()=>!b&&x(!1),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(su,{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(Ye,{variant:"ghost",onClick:()=>x(!1),disabled:b,children:"Cancel"}),s.jsx(Ye,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:ma,loading:b,children:"Remove"})]})]})]}),s.jsx(aj,{isOpen:_.presetModalOpen,onClose:()=>{_.setPresetModalOpen(!1)},onSave:_.handleSavePreset,presetId:_.editingPresetId,preset:_.editingPreset,isBuiltIn:_.editingPresetId?Kc.includes(_.editingPresetId):!1,existingIds:Object.keys(_.getAllPresets())}),_.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:()=>_.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(su,{className:"h-6 w-6 text-amber-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:"Cannot Delete Preset"})]}),s.jsxs("p",{className:"text-sm text-slate-300 mb-4",children:[s.jsx("strong",{children:_.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:_.deleteWarning.references.map(ie=>s.jsx("li",{children:ie},ie))}),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(Ye,{variant:"ghost",onClick:()=>_.setDeleteWarning(null),children:"Cancel"}),s.jsx(Ye,{variant:"secondary",onClick:_.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},gj=()=>($2(),F2(),s.jsx(Ob,{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(q2,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(B2,{}),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(sb,{children:[s.jsx(Kn,{path:"/",element:s.jsx(K2,{})}),s.jsx(Kn,{path:"/prs",element:s.jsx(tS,{})}),s.jsx(Kn,{path:"/board",element:s.jsx(Q2,{})}),s.jsx(Kn,{path:"/scheduling",element:s.jsx(WN,{})}),s.jsx(Kn,{path:"/logs",element:s.jsx(eS,{})}),s.jsx(Kn,{path:"/roadmap",element:s.jsx(aS,{})}),s.jsx(Kn,{path:"/settings",element:s.jsx(mj,{})}),s.jsx(Kn,{path:"*",element:s.jsx(nb,{to:"/",replace:!0})})]})})})]}),s.jsx(Y2,{})]})})),Ay=document.getElementById("root");if(!Ay)throw new Error("Could not find root element to mount to");const xj=iv.createRoot(Ay);xj.render(s.jsx(_e.StrictMode,{children:s.jsx(gj,{})}));