@usine/server 0.4.1-next.325.g79174da.1.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +7 -1
  2. package/dist/auth/api.d.ts +108 -0
  3. package/dist/auth/api.d.ts.map +1 -0
  4. package/dist/auth/api.js +109 -0
  5. package/dist/auth/api.js.map +1 -0
  6. package/dist/auth/http.d.ts.map +1 -1
  7. package/dist/auth/http.js +26 -33
  8. package/dist/auth/http.js.map +1 -1
  9. package/dist/http.d.ts.map +1 -1
  10. package/dist/http.js +2 -1
  11. package/dist/http.js.map +1 -1
  12. package/dist/openapi.d.ts +6 -0
  13. package/dist/openapi.d.ts.map +1 -0
  14. package/dist/openapi.js +68 -0
  15. package/dist/openapi.js.map +1 -0
  16. package/dist/web/assets/_agent-DduvwaVK.js +1 -0
  17. package/dist/web/assets/_label-CeJTfdyr.js +1 -0
  18. package/dist/web/assets/{_loop-CI8wT73I.js → _loop-xu3sbDMH.js} +1 -1
  19. package/dist/web/assets/{_name-BIiHdJIM.js → _name-DHJA0DfK.js} +1 -1
  20. package/dist/web/assets/{_number-DOftkarN.js → _number-CxL2Fcpl.js} +1 -1
  21. package/dist/web/assets/_number-DAq4EEnO.js +1 -0
  22. package/dist/web/assets/{_number-zDnuidOW.js → _number-DlcNbQyC.js} +1 -1
  23. package/dist/web/assets/_project-DAq4EEnO.js +1 -0
  24. package/dist/web/assets/{_project-DwYWqZaq.js → _project-DwpEglrZ.js} +1 -1
  25. package/dist/web/assets/{_project-CVPqKw8_.js → _project-GK2-urBn.js} +1 -1
  26. package/dist/web/assets/_run-DAq4EEnO.js +1 -0
  27. package/dist/web/assets/{_run-B4-87ibA.js → _run-jX-octY4.js} +1 -1
  28. package/dist/web/assets/{_worker-BBfkUdTZ.js → _worker-C_Nw6Vto.js} +1 -1
  29. package/dist/web/assets/{action-CAwzK5mk.js → action-CniC234z.js} +1 -1
  30. package/dist/web/assets/{actions-BXWVnBF3.js → actions-BJ8FViiC.js} +1 -1
  31. package/dist/web/assets/{agents-BStm1azV.js → agents-BD_MpjbH.js} +1 -1
  32. package/dist/web/assets/agents-Csj7pU8B.js +1 -0
  33. package/dist/web/assets/api-D3RWLycx.js +335 -0
  34. package/dist/web/assets/{code-block-CgYM2MuQ.js → code-block-d5zwBZo-.js} +1 -1
  35. package/dist/web/assets/{drawer-BB7jwe-O.js → drawer-D6KxeZBZ.js} +1 -1
  36. package/dist/web/assets/{edit-and-retry-B0OIPvbt.js → edit-and-retry-BKxt-FIG.js} +1 -1
  37. package/dist/web/assets/{file-error-DeQv_cj8.js → file-error-LMdCcTon.js} +1 -1
  38. package/dist/web/assets/{history-Dg2dL6yf.js → history-34nvr9sY.js} +1 -1
  39. package/dist/web/assets/{index-BGr-Cg-z.js → index-B_6qmKij.js} +3 -3
  40. package/dist/web/assets/{label-badge-C3PtxhEk.js → label-badge-cRUT7_pk.js} +1 -1
  41. package/dist/web/assets/{labels-DFfLQe0K.js → labels-BGCA9v1C.js} +1 -1
  42. package/dist/web/assets/{list-CHD0VbJL.js → list-qM2KUYvo.js} +1 -1
  43. package/dist/web/assets/loops-BXqvj3ko.js +1 -0
  44. package/dist/web/assets/{members-Cl_WCHwt.js → members-B14AFaH7.js} +1 -1
  45. package/dist/web/assets/{model-D9QKZ_Hk.js → model-C6gErpq3.js} +1 -1
  46. package/dist/web/assets/{moves-BQl144Rz.js → moves-BYTLKqNE.js} +1 -1
  47. package/dist/web/assets/{not-found-C8JhxsFV.js → not-found-CCicx33l.js} +1 -1
  48. package/dist/web/assets/{outcome-Bmu_N2Ni.js → outcome-D5IWnu4P.js} +1 -1
  49. package/dist/web/assets/{overview-CUn9OtUH.js → overview-DLYaCoiG.js} +1 -1
  50. package/dist/web/assets/{page-CmRQu9F2.js → page-BEpkTOW0.js} +1 -1
  51. package/dist/web/assets/{projects-D7j8WXJK.js → projects-B6PO2z2B.js} +1 -1
  52. package/dist/web/assets/{queries-Cvt0xQVN.js → queries-Bhp4FeLT.js} +1 -1
  53. package/dist/web/assets/{queries-CKjxlPEk.js → queries-CU77zJnf.js} +1 -1
  54. package/dist/web/assets/{queries-D5TGw8Nr.js → queries-C_qC_nGu.js} +1 -1
  55. package/dist/web/assets/{queries-Cdfj6CtB.js → queries-ESTqS3FK.js} +1 -1
  56. package/dist/web/assets/{repositories-B_mXysRY.js → repositories-Db6PsyxS.js} +1 -1
  57. package/dist/web/assets/{repository-link-B7-4fVcX.js → repository-link-OOfhq6c8.js} +1 -1
  58. package/dist/web/assets/route-D8Nd9ZwI.js +1 -0
  59. package/dist/web/assets/route-DjjbuG-J.js +1 -0
  60. package/dist/web/assets/{route-status-tny9_oCm.js → route-status-Cxocu6W_.js} +1 -1
  61. package/dist/web/assets/routes-DAq4EEnO.js +1 -0
  62. package/dist/web/assets/{routes-DRogv1gQ.js → routes-Dq3R4rSX.js} +1 -1
  63. package/dist/web/assets/{run-again-DVg9Ncn3.js → run-again-DHlW6Dcb.js} +1 -1
  64. package/dist/web/assets/{section-CjCP4gvu.js → section-C75aUrac.js} +1 -1
  65. package/dist/web/assets/{section-Du_ZZiFG.js → section-Db-f1liW.js} +1 -1
  66. package/dist/web/assets/{section-BjpSGYua.js → section-Wflvjspx.js} +1 -1
  67. package/dist/web/assets/{settings-DlN91oPk.js → settings-CpA5zhaC.js} +1 -1
  68. package/dist/web/assets/{sign-in-i_b9opnw.js → sign-in-D5kDf9C5.js} +1 -1
  69. package/dist/web/assets/{strings-DhGEKt5X.js → strings-DmAVtEUC.js} +1 -1
  70. package/dist/web/assets/tasks-DAq4EEnO.js +1 -0
  71. package/dist/web/assets/{tasks-DG6D0ByG.js → tasks-Dmzf4nUy.js} +1 -1
  72. package/dist/web/assets/{tokens-Dfsm5C2T.js → tokens-BHREcyDp.js} +1 -1
  73. package/dist/web/assets/{usage-cNWB4RMb.js → usage-ZTnmWdRP.js} +1 -1
  74. package/dist/web/assets/{use-project-links-C3F9c85T.js → use-project-links-CdgpfpoU.js} +1 -1
  75. package/dist/web/assets/{useTriggerFocusGuards-BEdypEdV.js → useTriggerFocusGuards-u-Jz4hr2.js} +1 -1
  76. package/dist/web/assets/{workers-DkgWKjiI.js → workers-D8lcf3zo.js} +1 -1
  77. package/dist/web/index.html +12 -12
  78. package/package.json +11 -10
  79. package/dist/web/assets/_agent-DIZrJ2oZ.js +0 -1
  80. package/dist/web/assets/_label-DMFWLPtF.js +0 -1
  81. package/dist/web/assets/_number-Bn_57si9.js +0 -1
  82. package/dist/web/assets/_project-Bn_57si9.js +0 -1
  83. package/dist/web/assets/_run-Bn_57si9.js +0 -1
  84. package/dist/web/assets/agents-BZV7-W7e.js +0 -1
  85. package/dist/web/assets/api-CoJQoiOc.js +0 -335
  86. package/dist/web/assets/loops-CRPsfOzn.js +0 -1
  87. package/dist/web/assets/route-Di3rgfZ0.js +0 -1
  88. package/dist/web/assets/route-DjL-s2L0.js +0 -1
  89. package/dist/web/assets/routes-Bn_57si9.js +0 -1
  90. package/dist/web/assets/tasks-Bn_57si9.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as e,i as t,n,r,t as i}from"./jsx-runtime-Wy9s6hX0.js";import{n as a,t as o}from"./use-project-links-C3F9c85T.js";import{t as s}from"./useSuspenseQuery-ajaZl96Y.js";import{_ as c,g as l,y as u}from"./actions-BXWVnBF3.js";import{n as d}from"./useNavigate-I5E4IRt2.js";import{t as f}from"./link-3oQYoIpm.js";import{t as p}from"./with-selector-b7q86Bem.js";import{h as m,t as h}from"./mark-lp0qzo_h.js";import{a as g,b as _,g as v,i as y,l as b,m as x,p as S,r as C,s as w,t as T,u as E,x as D}from"./button-CzVqBv_O.js";import{$ as O,Ct as k,Q as A,a as j,c as M,d as N,et as ee,f as te,i as ne,it as re,o as ie,rt as ae,s as oe,u as se}from"./useScrollLock-BYvLFu8E.js";import{_ as ce,a as le,w as ue}from"./useValueChanged-CnAH0RHB.js";import{a as de,c as fe,i as pe,m as me,o as he,s as ge,u as _e}from"./useTriggerFocusGuards-BEdypEdV.js";import{Dn as ve,En as ye,Ln as be,Pn as xe,St as Se,Tn as Ce}from"./api-CoJQoiOc.js";import{t as we}from"./skeleton-QB2WT34R.js";import{C as Te,i as Ee,o as De,r as Oe,s as ke,t as Ae,v as je,y as Me}from"./strings-BIVdGoBr.js";import{V as Ne,W as Pe,g as Fe,m as Ie,n as Le}from"./overview-CUn9OtUH.js";import{a as Re,i as ze,t as Be}from"./page-CmRQu9F2.js";import{t as Ve}from"./error-alert-Bq-SD6of.js";import{t as He}from"./usine-mark-B7sGtLae.js";import{t as Ue}from"./useControlled-CiSbwZN5.js";import{t as We}from"./queries-Cdfj6CtB.js";import{D as Ge,I as Ke,J as qe,L as Je,R as Ye,T as Xe,at as Ze,b as Qe,y as $e}from"./index-BGr-Cg-z.js";import{n as et,r as tt}from"./status-badge-B2-vzEoZ.js";import{a as nt,i as P,n as rt,o as it,r as at,t as ot}from"./table-CKp2wE4u.js";import{t as st}from"./fill-cell-BtM3J7oO.js";import{n as ct,r as lt,t as ut}from"./collapsible-D2r0KF65.js";import{i as dt,n as ft,r as pt,t as mt}from"./section-BjpSGYua.js";import{t as ht}from"./action-CAwzK5mk.js";import{o as gt}from"./model-D9QKZ_Hk.js";import{n as _t}from"./strings-DhGEKt5X.js";function vt(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var F=i(),yt=({needs:e})=>{let t=Ge();return e.length===0?null:(0,F.jsxs)(ut,{className:`mt-3`,children:[(0,F.jsxs)(lt,{render:(0,F.jsx)(T,{variant:`ghost`,size:`sm`,className:`-mx-2 w-fit gap-1.5 px-2 text-sm font-medium text-muted-foreground hover:text-foreground data-[panel-open]:text-foreground data-[panel-open]:[&>svg]:rotate-90`}),children:[(0,F.jsx)(u,{"aria-hidden":`true`,className:`transition-transform duration-(--duration-fast)`}),Ie,` (`,e.length,`)`]}),(0,F.jsx)(ct,{children:(0,F.jsx)(`ul`,{className:`mt-2.5 divide-y divide-border`,children:e.map(e=>{let n=Fe(e),r=n.runId;return(0,F.jsx)(Je,{copy:n,open:r===null?void 0:()=>t(r),actions:(0,F.jsx)(Ke,{need:e,action:`undoDismissNeed`})},e.id)})})})]})},bt=e=>Se(e,{WorkerSilent:({worker:e,lastAnsweredAt:t})=>`${e} silent since ${Ee(t)}`,ProviderRetrying:({agent:e,retries:t,since:n})=>`${e}: provider unreachable, ${t} ${t===1?`retry`:`retries`} since ${Ee(n)}`}),xt=e=>e.reduce((e,{slots:{capacity:t,leased:n}})=>e+Math.max(0,t-n),0),St=e=>{let t=e.reduce((e,{slots:t})=>e+t.capacity,0),n=xt(e);return t===0?`Nothing running`:`Nothing running, ${n} of ${t} worker ${t===1?`slot`:`slots`} free`},Ct=(e,t)=>{if(e.length===0)return null;if(e.every(({polledAt:e})=>e===null))return`Not checked yet`;let[n]=e;return e.length===1&&n!==void 0&&n.polledAt!==null?`Last checked ${Ae(n.polledAt,t)}`:`Last checked ${e.map(({repository:e,polledAt:n})=>`${e} ${n===null?`not yet`:Ae(n,t)}`).join(`, `)}`},wt=e=>{let t=[e.running.length>0?`${e.running.length} running`:null,e.notMoving.length>0?`${e.notMoving.length} stalled`:null].filter(e=>e!==null);return t.length===0?void 0:t.join(`, `)},Tt=6e4,Et=60*Tt,Dt=24*Et,Ot=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],kt={"7d":`7 days`,"30d":`30 days`,all:`All`},At=e=>e===`all`?`yet`:`in the last ${kt[e]}`,jt=e=>{let t=new Date(`${e}T00:00:00.000Z`);return`${t.getUTCDate()} ${Ot[t.getUTCMonth()]}`},Mt=e=>jt(new Date(e).toISOString().slice(0,10)),Nt=(e,t)=>t===`day`?jt(e):`Week of ${jt(e)}`,Pt=(e,t)=>`From ${jt(e.slice(0,10))}, by UTC ${t}`,Ft=e=>{if(e<1e3)return`under 1s`;if(e<2*Dt)return ke(e);let t=Math.round(e/Et);return t%24==0?`${t/24} d`:`${Math.floor(t/24)} d ${t%24} h`},It=e=>{let t=e/Tt,n=t<10?1:t<60?5:t<600?10:60;return`about ${Ft(Math.max(1,Math.round(t/n))*n*Tt)}`},Lt=(e,t)=>t===0?`0%`:`${Math.round(e/t*100)}%`,Rt=e=>e>0&&e<.005?`under 1%`:`${Math.round(e*100)}%`,zt=({succeeded:e,failed:t,canceled:n})=>e+t+n,Bt=(e,t,n)=>`${e.toLocaleString(`en`)} ${e===1?t:n}`,Vt=(e,t)=>t===0?`0`:(e/t).toLocaleString(`en`,{maximumFractionDigits:1}),Ht=e=>`No tasks done ${At(e)}`,Ut=({tasks:e,before:t})=>e===1?`1 task before ${jt(t)} lacks timing and is left out`:`${e.toLocaleString(`en`)} tasks before ${jt(t)} lack timing and are left out`,Wt=e=>e===1?`1 task lacks token reports and is left out of tokens`:`${e.toLocaleString(`en`)} tasks lack token reports and are left out of tokens`,Gt=e=>e===1?`1 task lacks a price and is left out of the median price`:`${e.toLocaleString(`en`)} tasks lack a price and are left out of the median price`,Kt=e=>Bt(e,`attempt`,`attempts`),qt=e=>Lt(e.find(({attempts:e})=>e===1)?.runs??0,e.reduce((e,{runs:t})=>e+t,0)),Jt=`Median failure to answer`,Yt=`Median failure to retry`,Xt=`Median failure to resolution`,Zt={title:`No projects`,description:`Create a project from registered repositories in Configuration.`,action:`Open projects`},Qt=`First time right means no loop succeeded twice on the same item in a task. Every loop counts, including loops that rebase pull requests.`,$t=`Utilization uses slot counts from configuration history over the selected window. Before the first revision, it uses revision 1’s slot count. The displayed slot count is the current count.`,en=({closed:e,overview:t,now:n})=>{let{run:r,item:i,closedAt:a}=e,o=fe(t,r.itemKey),s=xe(o,{onNone:()=>i,onSome:e=>de(e).origin}),c=Ce(ye(ve(r.pullRequestUrl),e=>ge(e,xe(o,{onNone:()=>[],onSome:({items:e})=>e}))),({number:e})=>e!==s?.number);return(0,F.jsxs)(dt,{run:r,children:[(0,F.jsxs)(st,{className:`py-3`,children:[(0,F.jsx)(pt,{run:r,children:s===null?(0,F.jsxs)(`span`,{className:`block truncate text-sm font-medium`,children:[`Run `,(0,F.jsx)(`span`,{className:`font-mono text-xs`,children:r.id.slice(0,8)})]}):(0,F.jsx)(Ye,{variant:`row`,item:be(s),title:s.title,linked:!1})}),(0,F.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-muted-foreground md:hidden`,children:r.loop})]}),(0,F.jsx)(at,{className:`py-3 max-md:hidden`,children:r.loop}),(0,F.jsx)(at,{className:`py-3`,children:(0,F.jsx)(tt,{state:r.state})}),(0,F.jsx)(at,{className:`py-3 text-right max-sm:hidden`,children:(0,F.jsx)(`time`,{dateTime:a,title:je(a),className:`text-xs text-muted-foreground tabular-nums`,children:Ae(a,n)})}),(0,F.jsx)(at,{className:`py-3 text-right`,children:r.pullRequestUrl===null?(0,F.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`None`}):xe(c,{onNone:()=>null,onSome:e=>(0,F.jsx)(h,{item:e})})})]})},tn=({outcomes:e,now:t})=>{let n=_e();return e.length===0?(0,F.jsx)(ft,{children:`No recent runs`}):(0,F.jsx)(`div`,{className:`-mx-2`,children:(0,F.jsxs)(ot,{children:[(0,F.jsx)(nt,{children:(0,F.jsxs)(it,{className:`hover:bg-transparent`,children:[(0,F.jsx)(P,{children:`Item`}),(0,F.jsx)(P,{className:`max-md:hidden`,children:`Loop`}),(0,F.jsx)(P,{children:`Outcome`}),(0,F.jsx)(P,{className:`text-right max-sm:hidden`,children:`Closed`}),(0,F.jsx)(P,{className:`text-right`,children:`Pull request`})]})}),(0,F.jsx)(rt,{children:e.map(e=>(0,F.jsx)(en,{closed:e,overview:n,now:t},e.run.id))})]})})},nn=({stalled:e,overview:t,now:n,readOnly:r,narrow:i})=>{let a=gt(e),{origin:o}=he(t,e.item),s=(0,F.jsx)(Ye,{variant:`row`,item:be(o),title:o.title,linked:a===null}),c=a===null?s:(0,F.jsx)(pt,{run:a,children:s}),l=(0,F.jsx)(ht,{stalled:e,readOnly:r,appearance:`row`});return i?(0,F.jsx)(dt,{run:a,children:(0,F.jsxs)(st,{className:`py-3 align-top whitespace-normal`,children:[c,(0,F.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-muted-foreground`,children:e.loop}),(0,F.jsx)(`p`,{className:`mt-1 text-sm text-foreground/90`,children:_t(e,n)}),(0,F.jsx)(`div`,{className:`-ml-2.5 empty:hidden [&>span]:items-start`,children:l})]})}):(0,F.jsxs)(dt,{run:a,children:[(0,F.jsx)(at,{className:`w-2/5 max-w-0 py-3 align-top whitespace-normal`,children:c}),(0,F.jsx)(at,{className:`py-3 align-top`,children:e.loop}),(0,F.jsx)(at,{className:`w-3/5 py-3 align-top whitespace-normal text-foreground/90`,children:_t(e,n)}),(0,F.jsx)(at,{className:`py-2 text-right align-top`,children:l})]})},rn=({stalled:e,now:t,readOnly:n,polled:r})=>{let i=qe(),a=_e();return e.length===0?(0,F.jsx)(ft,{children:r?`Nothing stalled`:`Not checked yet`}):(0,F.jsx)(`div`,{className:`-mx-2`,children:(0,F.jsxs)(ot,{children:[(0,F.jsx)(nt,{children:(0,F.jsxs)(it,{className:`hover:bg-transparent`,children:[(0,F.jsx)(P,{children:`Item`}),!i&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(P,{children:`Loop`}),(0,F.jsx)(P,{children:`Reason`}),(0,F.jsx)(P,{children:(0,F.jsx)(`span`,{className:`sr-only`,children:`Action`})})]})]})}),(0,F.jsx)(rt,{children:e.map(e=>(0,F.jsx)(nn,{stalled:e,overview:a,now:t,readOnly:n,narrow:i},`${e.loop}:${e.item.itemKey}`))})]})})},an=(e,t)=>new Date(e).toDateString()===new Date(t).toDateString()?je(e).slice(11):De(e),on=()=>(0,F.jsx)(He,{running:!0,className:`mr-2 inline-block size-3 align-middle text-run-active`}),sn=({running:e,overview:t,now:n})=>{let{run:r,attempt:i,item:a,lastActivityAt:o,warnings:s}=e,c=a===null?null:he(t,a).origin;return(0,F.jsxs)(dt,{run:r,children:[(0,F.jsxs)(st,{className:`py-3 whitespace-normal align-top`,children:[(0,F.jsx)(pt,{run:r,children:c===null?(0,F.jsxs)(`span`,{className:`block truncate text-sm font-medium`,children:[`Run `,(0,F.jsx)(`span`,{className:`font-mono text-xs`,children:r.id.slice(0,8)})]}):(0,F.jsx)(Ye,{variant:`row`,item:be(c),title:c.title,linked:!1})}),(0,F.jsxs)(`p`,{className:`mt-0.5 truncate text-xs text-muted-foreground lg:hidden`,children:[(0,F.jsxs)(`span`,{className:`md:hidden`,children:[(0,F.jsx)(on,{}),r.loop,`, `,r.agent,` on `,i.worker]}),(0,F.jsxs)(`span`,{className:`max-md:hidden`,children:[r.agent,` on `,i.worker]})]}),s.map(e=>(0,F.jsxs)(`p`,{className:`mt-1 flex items-start gap-1.5 text-xs text-warning`,children:[(0,F.jsx)(Ze,{"aria-hidden":`true`,weight:`fill`,className:`mt-0.5 size-3 shrink-0`}),(0,F.jsxs)(`span`,{children:[bt(e),e._tag===`ProviderRetrying`&&(0,F.jsx)(`span`,{className:`block text-warning/80 wrap-anywhere`,children:e.message})]})]},e._tag===`WorkerSilent`?e.worker:`${e.agent}`))]}),(0,F.jsxs)(at,{className:`py-3 max-md:hidden align-top`,children:[(0,F.jsx)(on,{}),r.loop]}),(0,F.jsx)(at,{className:`py-3 max-lg:hidden align-top`,children:r.agent}),(0,F.jsx)(at,{className:`py-3 max-lg:hidden align-top`,children:i.worker}),(0,F.jsx)(at,{className:`py-3 max-sm:hidden align-top`,children:(0,F.jsx)(`time`,{dateTime:i.startedAt,title:je(i.startedAt),className:`font-mono text-xs tabular-nums`,children:an(i.startedAt,n)})}),(0,F.jsx)(at,{className:`py-3 text-right align-top`,children:o===null?(0,F.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`None yet`}):(0,F.jsx)(`time`,{dateTime:o,title:je(o),className:`text-xs text-muted-foreground tabular-nums`,children:Ae(o,n)})})]})},cn=({running:e,workers:t,now:n})=>{let r=_e();return e.length===0?(0,F.jsx)(ft,{children:St(t)}):(0,F.jsx)(`div`,{className:`-mx-2`,children:(0,F.jsxs)(ot,{children:[(0,F.jsx)(nt,{children:(0,F.jsxs)(it,{className:`hover:bg-transparent`,children:[(0,F.jsx)(P,{children:`Item`}),(0,F.jsx)(P,{className:`max-md:hidden`,children:`Loop`}),(0,F.jsx)(P,{className:`max-lg:hidden`,children:`Agent`}),(0,F.jsx)(P,{className:`max-lg:hidden`,children:`Worker`}),(0,F.jsx)(P,{className:`max-sm:hidden`,children:`Started`}),(0,F.jsx)(P,{className:`text-right`,children:`Last activity`})]})}),(0,F.jsx)(rt,{children:e.map(e=>(0,F.jsx)(sn,{running:e,overview:r,now:n},e.attempt.id))})]})})},I=e(n(),1),ln=I.createContext(void 0);function un(){return I.useContext(ln)}var dn=I.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:a,onPressedChange:o,pressed:s,render:c,type:u,value:d,nativeButton:f=!0,style:p,...m}=e,h=le(d||void 0),g=un(),_=g?.value??[],v=(i||g?.disabled)??!1,[y,b]=Ue({controlled:g?h!==void 0&&_.indexOf(h)>-1:s,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:S,buttonRef:C}=x({disabled:v,native:f}),T={disabled:v,pressed:y},E=[C,t],D=[{"aria-pressed":y,onClick(e){let t=!y,n=ue(ce,e.nativeEvent);o?.(t,n),!n.isCanceled&&(h&&g?.setGroupValue?.(h,t,n),!n.isCanceled&&b(t))}},m,S],O=w(`button`,e,{enabled:!g,state:T,ref:E,props:D}),k=I.useMemo(()=>({disabled:v,focusableWhenDisabled:!1}),[v]);return g?(0,F.jsx)(l,{tag:`button`,render:c,className:n,style:p,metadata:k,state:T,refs:E,props:D}):O});function fn(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=b}=e,[p,m]=I.useState(0),h=r!=null,g=I.useRef(null),v=S(g,c),y=I.useRef([]),x=I.useRef(!1),C=I.useRef(null),w=o??p,T=D((e,t=!1)=>{if(C.current=y.current[e]??null,(s??m)(e),t){let t=y.current[e];te(g.current,t,a,n)}}),E=D(e=>{if(e.size===0)return;if(x.current){let e=y.current,t=e.indexOf(C.current);if(t===-1){let t=e[w];!t||re(e,w,d)?T(pn(e,d)):C.current=t}else t!==w&&T(t);return}x.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)T(i);else if(re(t,w,d)){let e=A(t,{disabledIndices:d});ae(t,e)||T(e)}te(g.current,r,a,n)});_(()=>{if(d==null||o!=null||!x.current)return;let e=y.current;if(re(e,w,d)){let t=A(e,{disabledIndices:d});ae(e,t)||T(t)}},[d,o,w,y,T]);let se=D((e,t,n)=>i?i(e,t,n,y):n),ce=D(e=>{let o=e.key===`Home`||e.key===`End`;if(!M.has(e.key)||!l&&o||mn(e,f)||!g.current)return;let s=a===`rtl`,c=s?j:ie,p=s?ie:j,m=n===`vertical`?ne:c,_=n===`vertical`?oe:p,v=k(e.nativeEvent);if(v!=null&&N(v)&&!vt(v)){let t=v.selectionStart,n=v.selectionEnd,r=v.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=w,x=ee(y,d),S=O(y,d);r!=null&&(b=r({disabledIndices:d,elementsRef:y,event:e,highlightedIndex:w,loopFocus:t,maxIndex:S,minIndex:x,onLoop:se,orientation:n,rtl:s}));let C=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,E=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=x:e.key===`End`&&(b=S)),b===w&&(C||E)&&(t&&b===S&&C?(b=x,i&&(b=i(e,w,b,y))):t&&b===x&&E?(b=S,i&&(b=i(e,w,b,y))):b=A(y.current,{startingIndex:b,decrement:E,disabledIndices:d})),b!==w&&!ae(y.current,b)&&(u&&e.stopPropagation(),(h||o||C||E)&&e.preventDefault(),T(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))});return{props:{ref:v,onFocus(e){let t=g.current,n=k(e.nativeEvent);t&&n!=null&&N(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:ce},highlightedIndex:w,onHighlightedIndexChange:T,elementsRef:y,onMapChange:E,relayKeyboardEvent:ce}}function pn(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!re(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function mn(e,t){for(let n of se)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function hn(e){let{render:t,className:n,style:r,refs:i=b,props:a=b,state:o=E,stateAttributesMapping:s,highlightedIndex:l,onHighlightedIndexChange:u,orientation:d,grid:f,loopFocus:p,onLoop:m,enableHomeAndEndKeys:h,onMapChange:g,stopEventPropagation:_=!0,rootRef:y,disabledIndices:x,modifierKeys:S,highlightItemOnHover:C=!1,tag:T=`div`,...D}=e,{props:O,highlightedIndex:k,onHighlightedIndexChange:A,elementsRef:j,onMapChange:M,relayKeyboardEvent:N}=fn({grid:f,loopFocus:p,onLoop:m,orientation:d,highlightedIndex:l,onHighlightedIndexChange:u,rootRef:y,stopEventPropagation:_,enableHomeAndEndKeys:h,direction:me(),disabledIndices:x,modifierKeys:S}),ee=w(T,e,{state:o,ref:i,props:[O,...a,D],stateAttributesMapping:s}),te=I.useMemo(()=>({highlightedIndex:k,onHighlightedIndexChange:A,highlightItemOnHover:C,relayKeyboardEvent:N}),[k,A,C,N]);return(0,F.jsx)(v.Provider,{value:te,children:(0,F.jsx)(c,{elementsRef:j,onMapChange:e=>{g?.(e),M(e)},children:ee})})}var gn=I.createContext(void 0);function _n(){return I.useContext(gn)}var vn=I.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:a,orientation:o=`horizontal`,multiple:s=!1,value:c,className:l,render:u,style:d,...f}=e,p=pe(!0),m=_n(),h=n??b,g=c!==void 0||n!==void 0,_=(p?.disabled??!1)||(m?.disabled??!1)||r,[v,y]=Ue({controlled:c,default:h,name:`ToggleGroup`,state:`value`}),x=D((e,t,n)=>{let r;s?(r=v.slice(),t?r.push(e):r.splice(v.indexOf(e),1)):r=t?[e]:[],a?.(r,n),!n.isCanceled&&y(r)}),S={disabled:_,multiple:s,orientation:o},C=I.useMemo(()=>({disabled:_,setGroupValue:x,value:v,isValueInitialized:g}),[_,x,v,g]),T={role:`group`},E=w(`div`,e,{enabled:!!p,state:S,ref:t,props:[T,f]});return(0,F.jsx)(ln.Provider,{value:C,children:p?E:(0,F.jsx)(hn,{render:u,className:l,style:d,state:S,refs:[t],props:[T,f],loopFocus:i,enableHomeAndEndKeys:!0,orientation:o})})}),yn=y(`group/toggle inline-flex items-center justify-center gap-1.5 rounded-md text-sm font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow] duration-100 outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/70 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent text-muted-foreground hover:bg-muted/50 aria-pressed:text-foreground`},size:{default:`h-7 min-w-7 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5`,sm:`h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,lg:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`}},defaultVariants:{variant:`default`,size:`default`}}),bn=I.createContext({size:`default`,variant:`default`,spacing:2,orientation:`horizontal`});function xn({className:e,variant:t,size:n,spacing:r=2,orientation:i=`horizontal`,children:a,...o}){return(0,F.jsx)(vn,{"data-slot":`toggle-group`,"data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":i,style:{"--gap":r},className:C(`group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch`,e),...o,children:(0,F.jsx)(bn.Provider,{value:{variant:t,size:n,spacing:r,orientation:i},children:a})})}function Sn({className:e,children:t,variant:n=`default`,size:r=`default`,...i}){let a=I.useContext(bn);return(0,F.jsx)(dn,{"data-slot":`toggle-group-item`,"data-variant":a.variant||n,"data-size":a.size||r,"data-spacing":a.spacing,className:C(`shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t`,yn({variant:a.variant||n,size:a.size||r}),e),...i,children:t})}var Cn=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function wn(e){return typeof e==`string`&&Cn.includes(e)}var Tn=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function En(e){return typeof e==`string`&&Tn.has(e)}function Dn(e){return typeof e==`string`&&e.startsWith(`data-`)}function On(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(En(n)||Dn(n))&&(t[n]=e[n]);return t}function kn(e){if(e==null)return null;if((0,I.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return On(t)}return typeof e==`object`&&!Array.isArray(e)?On(e):null}function An(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(En(n)||Dn(n)||wn(n))&&(t[n]=e[n]);return t}function jn(e){return e==null?null:(0,I.isValidElement)(e)?An(e.props):typeof e==`object`&&!Array.isArray(e)?An(e):null}var Mn=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function Nn(){return Nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nn.apply(null,arguments)}function Pn(e,t){if(e==null)return{};var n,r,i=Fn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var In=(0,I.forwardRef)((e,t)=>{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,c=e.title,l=e.desc,u=Pn(e,Mn),d=a||{width:r,height:i,x:0,y:0},f=g(`recharts-surface`,o);return I.createElement(`svg`,Nn({},An(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),I.createElement(`title`,null,c),I.createElement(`desc`,null,l),n)}),Ln=[`children`,`className`];function Rn(){return Rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rn.apply(null,arguments)}function zn(e,t){if(e==null)return{};var n,r,i=Bn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Vn=I.forwardRef((e,t)=>{var n=e.children,r=e.className,i=zn(e,Ln),a=g(`recharts-layer`,r);return I.createElement(`g`,Rn({className:a},An(i),{ref:t}),n)});function Hn(e){return e===`__proto__`}var Un=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function Wn(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:Un.test(e);default:return!1}}function Gn(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Kn(e){return typeof e==`symbol`||e instanceof Symbol}function qn(e){return e==null?``:Jn(e)}function Jn(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Jn).join(`,`);if(Kn(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Yn(e){if(Array.isArray(e))return e.map(Gn);if(typeof e==`symbol`)return[e];e=qn(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o){if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l}else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function Xn(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(Hn(t))return n;let r=e[t];return r===void 0?Wn(t)&&!Object.hasOwn(e,t)?Xn(e,Yn(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Gn(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Zn(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),Hn(t))return n;let r=e[t];return r===void 0?n:r}}}function Zn(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||Hn(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var Qn=4;function $n(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qn),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function er(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+$n(i)+n},``)}var tr=e=>e===0?0:e>0?1:-1,nr=e=>typeof e==`number`&&e!=+e,rr=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,L=e=>(typeof e==`number`||e instanceof Number)&&!nr(e),ir=e=>L(e)||typeof e==`string`,ar=0,or=e=>{var t=++ar;return`${e||``}${t}`},sr=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!L(e)&&typeof e!=`string`)return n;var i;if(rr(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return nr(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},cr=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function R(e,t,n){return L(e)&&L(t)?$n(e+n*(t-e)):t}function lr(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):Xn(e,t))===n)}var ur=e=>{for(var t=e.length,n=0,r=0,i=0,a=0,o=1/0,s=-1/0,c=0,l=0,u=0;u<t;u++)c=e[u]?.cx||0,l=e[u]?.cy||0,n+=c,r+=l,i+=c*l,a+=c*c,o=Math.min(o,c),s=Math.max(s,c);var d=t*a===n*n?0:(t*i-n*r)/(t*a-n*n);return{xmin:o,xmax:s,a:d,b:(r-d*n)/t}},z=e=>e==null,dr=e=>z(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function fr(e){return e!=null}function pr(){}function mr(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?hr(Object(n),!0).forEach(function(t){_r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _r(e,t,n){return(t=vr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vr(e){var t=yr(e,`string`);return typeof t==`symbol`?t:t+``}function yr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var br=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=mr(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?gr({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?gr({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?gr({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?gr({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?gr({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?gr({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?gr({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?gr({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(L(n.x)||rr(n.x))&&(L(n.y)||rr(n.y))?gr({x:c+sr(n.x,g),y:l+sr(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):gr({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},xr=[`top`,`left`,`right`,`bottom`];function Sr(e){return e==null?!1:typeof e==`object`||xr.includes(e)}var Cr=(0,I.createContext)(null),wr=()=>(0,I.useContext)(Cr);function B(e){return function(){return e}}var Tr=Math.cos,Er=Math.sin,Dr=Math.sqrt,Or=Math.PI;Or/2;var kr=2*Or,Ar=Math.PI,jr=2*Ar,Mr=1e-6,Nr=jr-Mr;function Pr(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Fr(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Pr;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Ir=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Pr:Fr(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Mr){if(!(Math.abs(u*s-c*l)>Mr)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Ar-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Mr&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Mr||Math.abs(this._y1-l)>Mr)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%jr+jr),d>Nr?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Mr&&this._append`A${n},${n},0,${+(d>=Ar)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};Ir.prototype;function Lr(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Ir(t)}Array.prototype.slice;function Rr(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function zr(e){this._context=e}zr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function Br(e){return new zr(e)}function Vr(e){return e[0]}function Hr(e){return e[1]}function Ur(e,t){var n=B(!0),r=null,i=Br,a=null,o=Lr(s);e=typeof e==`function`?e:e===void 0?Vr:B(e),t=typeof t==`function`?t:t===void 0?Hr:B(t);function s(s){var c,l=(s=Rr(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:B(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:B(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:B(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function Wr(e,t,n){var r=null,i=B(!0),a=null,o=Br,s=null,c=Lr(l);e=typeof e==`function`?e:e===void 0?Vr:B(+e),t=typeof t==`function`?t:B(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?Hr:B(+n);function l(l){var u,d,f,p=(l=Rr(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return Ur().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:B(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:B(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:B(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:B(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:B(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:B(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:B(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var Gr=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function Kr(e){return new Gr(e,!0)}function qr(e){return new Gr(e,!1)}var Jr={draw(e,t){let n=Dr(t/Or);e.moveTo(n,0),e.arc(0,0,n,0,kr)}},Yr={draw(e,t){let n=Dr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Xr=Dr(1/3),Zr=Xr*2,Qr={draw(e,t){let n=Dr(t/Zr),r=n*Xr;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},$r={draw(e,t){let n=Dr(t),r=-n/2;e.rect(r,r,n,n)}},ei=.8908130915292852,ti=Er(Or/10)/Er(7*Or/10),ni=Er(kr/10)*ti,ri=-Tr(kr/10)*ti,ii={draw(e,t){let n=Dr(t*ei),r=ni*n,i=ri*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=kr*t/5,o=Tr(a),s=Er(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},ai=Dr(3),oi={draw(e,t){let n=-Dr(t/(ai*3));e.moveTo(0,n*2),e.lineTo(-ai*n,-n),e.lineTo(ai*n,-n),e.closePath()}},si=-.5,ci=Dr(3)/2,li=1/Dr(12),ui=(li/2+1)*3,di={draw(e,t){let n=Dr(t/ui),r=n/2,i=n*li,a=r,o=n*li+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(si*r-ci*i,ci*r+si*i),e.lineTo(si*a-ci*o,ci*a+si*o),e.lineTo(si*s-ci*c,ci*s+si*c),e.lineTo(si*r+ci*i,si*i-ci*r),e.lineTo(si*a+ci*o,si*o-ci*a),e.lineTo(si*s+ci*c,si*c-ci*s),e.closePath()}};function fi(e,t){let n=null,r=Lr(i);e=typeof e==`function`?e:B(e||Jr),t=typeof t==`function`?t:B(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:B(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:B(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function pi(){}function mi(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function hi(e){this._context=e}hi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mi(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gi(e){return new hi(e)}function _i(e){this._context=e}_i.prototype={areaStart:pi,areaEnd:pi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:mi(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vi(e){return new _i(e)}function yi(e){this._context=e}yi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:mi(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bi(e){return new yi(e)}function xi(e){this._context=e}xi.prototype={areaStart:pi,areaEnd:pi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Si(e){return new xi(e)}function Ci(e){return e<0?-1:1}function wi(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Ci(a)+Ci(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ti(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ei(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Di(e){this._context=e}Di.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ei(this,this._t0,Ti(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ei(this,Ti(this,n=wi(this,e,t)),n);break;default:Ei(this,this._t0,n=wi(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Oi(e){this._context=new ki(e)}(Oi.prototype=Object.create(Di.prototype)).point=function(e,t){Di.prototype.point.call(this,t,e)};function ki(e){this._context=e}ki.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Ai(e){return new Di(e)}function ji(e){return new Oi(e)}function Mi(e){this._context=e}Mi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Ni(e),i=Ni(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ni(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Pi(e){return new Mi(e)}function Fi(e,t){this._context=e,this._t=t}Fi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function Ii(e){return new Fi(e,.5)}function Li(e){return new Fi(e,0)}function Ri(e){return new Fi(e,1)}function zi(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Bi(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Vi(e,t){return e[t]}function Hi(e){let t=[];return t.key=e,t}function Ui(){var e=B([]),t=Bi,n=zi,r=Vi;function i(i){var a=Array.from(e.apply(this,arguments),Hi),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=Rr(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:B(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:B(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Bi:typeof e==`function`?e:B(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??zi,i):n},i}function Wi(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}zi(e,t)}}function Gi(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}zi(e,t)}}function Ki(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,zi(e,t)}}var qi=[`type`,`size`,`sizeType`];function Ji(){return Ji=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ji.apply(null,arguments)}function Yi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Yi(Object(n),!0).forEach(function(t){Zi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zi(e,t,n){return(t=Qi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qi(e){var t=$i(e,`string`);return typeof t==`symbol`?t:t+``}function $i(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ea(e,t){if(e==null)return{};var n,r,i=ta(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ta(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var na={symbolCircle:Jr,symbolCross:Yr,symbolDiamond:Qr,symbolSquare:$r,symbolStar:ii,symbolTriangle:oi,symbolWye:di},ra=Math.PI/180,ia=e=>na[`symbol${dr(e)}`]||Jr,aa=(e,t,n)=>{if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*ra;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},oa=(e,t)=>{na[`symbol${dr(e)}`]=t},sa=e=>{var t=e.type,n=t===void 0?`circle`:t,r=e.size,i=r===void 0?64:r,a=e.sizeType,o=a===void 0?`area`:a,s=Xi(Xi({},ea(e,qi)),{},{type:n,size:i,sizeType:o}),c=`circle`;typeof n==`string`&&(c=n);var l=()=>{var e=ia(c),t=fi().type(e).size(aa(i,o,c))();if(t!==null)return t},u=s.className,d=s.cx,f=s.cy,p=An(s);return L(d)&&L(f)&&L(i)?I.createElement(`path`,Ji({},p,{className:g(`recharts-symbols`,u),transform:`translate(${d}, ${f})`,d:l()})):null};sa.registerSymbol=oa;var ca=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,la=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,I.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{wn(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},ua=(e,t,n)=>r=>(e(t,n,r),null),da=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];wn(i)&&typeof a==`function`&&(r||={},r[i]=ua(a,t,n))}),r},fa=e=>Array.isArray(e)&&e.length>0;function pa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pa(Object(n),!0).forEach(function(t){ha(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ha(e,t,n){return(t=ga(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ga(e){var t=_a(e,`string`);return typeof t==`symbol`?t:t+``}function _a(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function V(e,t){var n=ma({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function va(){return va=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},va.apply(null,arguments)}function ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ya(Object(n),!0).forEach(function(t){xa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ya(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xa(e,t,n){return(t=Sa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sa(e){var t=Ca(e,`string`);return typeof t==`symbol`?t:t+``}function Ca(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var wa=32,Ta={align:`center`,iconSize:14,inactiveColor:`#ccc`,layout:`horizontal`,verticalAlign:`middle`,labelStyle:{}};function Ea(e){if(typeof e==`object`&&e&&`strokeDasharray`in e)return String(e.strokeDasharray)}function Da(e){var t=e.data,n=e.iconType,r=e.inactiveColor,i=wa/2,a=wa/6,o=wa/3,s=t.inactive?r:t.color,c=n??t.type;if(c===`none`)return null;if(c===`plainline`)return I.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:s,strokeDasharray:Ea(t.payload),x1:0,y1:i,x2:wa,y2:i,className:`recharts-legend-icon`});if(c===`line`)return I.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:s,d:`M0,${i}h${o}
1
+ import{a as e,i as t,n,r,t as i}from"./jsx-runtime-Wy9s6hX0.js";import{n as a,t as o}from"./use-project-links-CdgpfpoU.js";import{t as s}from"./useSuspenseQuery-ajaZl96Y.js";import{_ as c,g as l,y as u}from"./actions-BJ8FViiC.js";import{n as d}from"./useNavigate-I5E4IRt2.js";import{t as f}from"./link-3oQYoIpm.js";import{t as p}from"./with-selector-b7q86Bem.js";import{h as m,t as h}from"./mark-lp0qzo_h.js";import{a as g,b as _,g as v,i as y,l as b,m as x,p as S,r as C,s as w,t as T,u as E,x as D}from"./button-CzVqBv_O.js";import{$ as O,Ct as k,Q as A,a as j,c as M,d as N,et as ee,f as te,i as ne,it as re,o as ie,rt as ae,s as oe,u as se}from"./useScrollLock-BYvLFu8E.js";import{_ as ce,a as le,w as ue}from"./useValueChanged-CnAH0RHB.js";import{a as de,c as fe,i as pe,m as me,o as he,s as ge,u as _e}from"./useTriggerFocusGuards-u-Jz4hr2.js";import{Dn as ve,En as ye,Ln as be,Pn as xe,St as Se,Tn as Ce}from"./api-D3RWLycx.js";import{t as we}from"./skeleton-QB2WT34R.js";import{C as Te,i as Ee,o as De,r as Oe,s as ke,t as Ae,v as je,y as Me}from"./strings-BIVdGoBr.js";import{V as Ne,W as Pe,g as Fe,m as Ie,n as Le}from"./overview-DLYaCoiG.js";import{a as Re,i as ze,t as Be}from"./page-BEpkTOW0.js";import{t as Ve}from"./error-alert-Bq-SD6of.js";import{t as He}from"./usine-mark-B7sGtLae.js";import{t as Ue}from"./useControlled-CiSbwZN5.js";import{t as We}from"./queries-ESTqS3FK.js";import{D as Ge,I as Ke,J as qe,L as Je,R as Ye,T as Xe,at as Ze,b as Qe,y as $e}from"./index-B_6qmKij.js";import{n as et,r as tt}from"./status-badge-B2-vzEoZ.js";import{a as nt,i as P,n as rt,o as it,r as at,t as ot}from"./table-CKp2wE4u.js";import{t as st}from"./fill-cell-BtM3J7oO.js";import{n as ct,r as lt,t as ut}from"./collapsible-D2r0KF65.js";import{i as dt,n as ft,r as pt,t as mt}from"./section-Wflvjspx.js";import{t as ht}from"./action-CniC234z.js";import{o as gt}from"./model-C6gErpq3.js";import{n as _t}from"./strings-DmAVtEUC.js";function vt(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var F=i(),yt=({needs:e})=>{let t=Ge();return e.length===0?null:(0,F.jsxs)(ut,{className:`mt-3`,children:[(0,F.jsxs)(lt,{render:(0,F.jsx)(T,{variant:`ghost`,size:`sm`,className:`-mx-2 w-fit gap-1.5 px-2 text-sm font-medium text-muted-foreground hover:text-foreground data-[panel-open]:text-foreground data-[panel-open]:[&>svg]:rotate-90`}),children:[(0,F.jsx)(u,{"aria-hidden":`true`,className:`transition-transform duration-(--duration-fast)`}),Ie,` (`,e.length,`)`]}),(0,F.jsx)(ct,{children:(0,F.jsx)(`ul`,{className:`mt-2.5 divide-y divide-border`,children:e.map(e=>{let n=Fe(e),r=n.runId;return(0,F.jsx)(Je,{copy:n,open:r===null?void 0:()=>t(r),actions:(0,F.jsx)(Ke,{need:e,action:`undoDismissNeed`})},e.id)})})})]})},bt=e=>Se(e,{WorkerSilent:({worker:e,lastAnsweredAt:t})=>`${e} silent since ${Ee(t)}`,ProviderRetrying:({agent:e,retries:t,since:n})=>`${e}: provider unreachable, ${t} ${t===1?`retry`:`retries`} since ${Ee(n)}`}),xt=e=>e.reduce((e,{slots:{capacity:t,leased:n}})=>e+Math.max(0,t-n),0),St=e=>{let t=e.reduce((e,{slots:t})=>e+t.capacity,0),n=xt(e);return t===0?`Nothing running`:`Nothing running, ${n} of ${t} worker ${t===1?`slot`:`slots`} free`},Ct=(e,t)=>{if(e.length===0)return null;if(e.every(({polledAt:e})=>e===null))return`Not checked yet`;let[n]=e;return e.length===1&&n!==void 0&&n.polledAt!==null?`Last checked ${Ae(n.polledAt,t)}`:`Last checked ${e.map(({repository:e,polledAt:n})=>`${e} ${n===null?`not yet`:Ae(n,t)}`).join(`, `)}`},wt=e=>{let t=[e.running.length>0?`${e.running.length} running`:null,e.notMoving.length>0?`${e.notMoving.length} stalled`:null].filter(e=>e!==null);return t.length===0?void 0:t.join(`, `)},Tt=6e4,Et=60*Tt,Dt=24*Et,Ot=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],kt={"7d":`7 days`,"30d":`30 days`,all:`All`},At=e=>e===`all`?`yet`:`in the last ${kt[e]}`,jt=e=>{let t=new Date(`${e}T00:00:00.000Z`);return`${t.getUTCDate()} ${Ot[t.getUTCMonth()]}`},Mt=e=>jt(new Date(e).toISOString().slice(0,10)),Nt=(e,t)=>t===`day`?jt(e):`Week of ${jt(e)}`,Pt=(e,t)=>`From ${jt(e.slice(0,10))}, by UTC ${t}`,Ft=e=>{if(e<1e3)return`under 1s`;if(e<2*Dt)return ke(e);let t=Math.round(e/Et);return t%24==0?`${t/24} d`:`${Math.floor(t/24)} d ${t%24} h`},It=e=>{let t=e/Tt,n=t<10?1:t<60?5:t<600?10:60;return`about ${Ft(Math.max(1,Math.round(t/n))*n*Tt)}`},Lt=(e,t)=>t===0?`0%`:`${Math.round(e/t*100)}%`,Rt=e=>e>0&&e<.005?`under 1%`:`${Math.round(e*100)}%`,zt=({succeeded:e,failed:t,canceled:n})=>e+t+n,Bt=(e,t,n)=>`${e.toLocaleString(`en`)} ${e===1?t:n}`,Vt=(e,t)=>t===0?`0`:(e/t).toLocaleString(`en`,{maximumFractionDigits:1}),Ht=e=>`No tasks done ${At(e)}`,Ut=({tasks:e,before:t})=>e===1?`1 task before ${jt(t)} lacks timing and is left out`:`${e.toLocaleString(`en`)} tasks before ${jt(t)} lack timing and are left out`,Wt=e=>e===1?`1 task lacks token reports and is left out of tokens`:`${e.toLocaleString(`en`)} tasks lack token reports and are left out of tokens`,Gt=e=>e===1?`1 task lacks a price and is left out of the median price`:`${e.toLocaleString(`en`)} tasks lack a price and are left out of the median price`,Kt=e=>Bt(e,`attempt`,`attempts`),qt=e=>Lt(e.find(({attempts:e})=>e===1)?.runs??0,e.reduce((e,{runs:t})=>e+t,0)),Jt=`Median failure to answer`,Yt=`Median failure to retry`,Xt=`Median failure to resolution`,Zt={title:`No projects`,description:`Create a project from registered repositories in Configuration.`,action:`Open projects`},Qt=`First time right means no loop succeeded twice on the same item in a task. Every loop counts, including loops that rebase pull requests.`,$t=`Utilization uses slot counts from configuration history over the selected window. Before the first revision, it uses revision 1’s slot count. The displayed slot count is the current count.`,en=({closed:e,overview:t,now:n})=>{let{run:r,item:i,closedAt:a}=e,o=fe(t,r.itemKey),s=xe(o,{onNone:()=>i,onSome:e=>de(e).origin}),c=Ce(ye(ve(r.pullRequestUrl),e=>ge(e,xe(o,{onNone:()=>[],onSome:({items:e})=>e}))),({number:e})=>e!==s?.number);return(0,F.jsxs)(dt,{run:r,children:[(0,F.jsxs)(st,{className:`py-3`,children:[(0,F.jsx)(pt,{run:r,children:s===null?(0,F.jsxs)(`span`,{className:`block truncate text-sm font-medium`,children:[`Run `,(0,F.jsx)(`span`,{className:`font-mono text-xs`,children:r.id.slice(0,8)})]}):(0,F.jsx)(Ye,{variant:`row`,item:be(s),title:s.title,linked:!1})}),(0,F.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-muted-foreground md:hidden`,children:r.loop})]}),(0,F.jsx)(at,{className:`py-3 max-md:hidden`,children:r.loop}),(0,F.jsx)(at,{className:`py-3`,children:(0,F.jsx)(tt,{state:r.state})}),(0,F.jsx)(at,{className:`py-3 text-right max-sm:hidden`,children:(0,F.jsx)(`time`,{dateTime:a,title:je(a),className:`text-xs text-muted-foreground tabular-nums`,children:Ae(a,n)})}),(0,F.jsx)(at,{className:`py-3 text-right`,children:r.pullRequestUrl===null?(0,F.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`None`}):xe(c,{onNone:()=>null,onSome:e=>(0,F.jsx)(h,{item:e})})})]})},tn=({outcomes:e,now:t})=>{let n=_e();return e.length===0?(0,F.jsx)(ft,{children:`No recent runs`}):(0,F.jsx)(`div`,{className:`-mx-2`,children:(0,F.jsxs)(ot,{children:[(0,F.jsx)(nt,{children:(0,F.jsxs)(it,{className:`hover:bg-transparent`,children:[(0,F.jsx)(P,{children:`Item`}),(0,F.jsx)(P,{className:`max-md:hidden`,children:`Loop`}),(0,F.jsx)(P,{children:`Outcome`}),(0,F.jsx)(P,{className:`text-right max-sm:hidden`,children:`Closed`}),(0,F.jsx)(P,{className:`text-right`,children:`Pull request`})]})}),(0,F.jsx)(rt,{children:e.map(e=>(0,F.jsx)(en,{closed:e,overview:n,now:t},e.run.id))})]})})},nn=({stalled:e,overview:t,now:n,readOnly:r,narrow:i})=>{let a=gt(e),{origin:o}=he(t,e.item),s=(0,F.jsx)(Ye,{variant:`row`,item:be(o),title:o.title,linked:a===null}),c=a===null?s:(0,F.jsx)(pt,{run:a,children:s}),l=(0,F.jsx)(ht,{stalled:e,readOnly:r,appearance:`row`});return i?(0,F.jsx)(dt,{run:a,children:(0,F.jsxs)(st,{className:`py-3 align-top whitespace-normal`,children:[c,(0,F.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-muted-foreground`,children:e.loop}),(0,F.jsx)(`p`,{className:`mt-1 text-sm text-foreground/90`,children:_t(e,n)}),(0,F.jsx)(`div`,{className:`-ml-2.5 empty:hidden [&>span]:items-start`,children:l})]})}):(0,F.jsxs)(dt,{run:a,children:[(0,F.jsx)(at,{className:`w-2/5 max-w-0 py-3 align-top whitespace-normal`,children:c}),(0,F.jsx)(at,{className:`py-3 align-top`,children:e.loop}),(0,F.jsx)(at,{className:`w-3/5 py-3 align-top whitespace-normal text-foreground/90`,children:_t(e,n)}),(0,F.jsx)(at,{className:`py-2 text-right align-top`,children:l})]})},rn=({stalled:e,now:t,readOnly:n,polled:r})=>{let i=qe(),a=_e();return e.length===0?(0,F.jsx)(ft,{children:r?`Nothing stalled`:`Not checked yet`}):(0,F.jsx)(`div`,{className:`-mx-2`,children:(0,F.jsxs)(ot,{children:[(0,F.jsx)(nt,{children:(0,F.jsxs)(it,{className:`hover:bg-transparent`,children:[(0,F.jsx)(P,{children:`Item`}),!i&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(P,{children:`Loop`}),(0,F.jsx)(P,{children:`Reason`}),(0,F.jsx)(P,{children:(0,F.jsx)(`span`,{className:`sr-only`,children:`Action`})})]})]})}),(0,F.jsx)(rt,{children:e.map(e=>(0,F.jsx)(nn,{stalled:e,overview:a,now:t,readOnly:n,narrow:i},`${e.loop}:${e.item.itemKey}`))})]})})},an=(e,t)=>new Date(e).toDateString()===new Date(t).toDateString()?je(e).slice(11):De(e),on=()=>(0,F.jsx)(He,{running:!0,className:`mr-2 inline-block size-3 align-middle text-run-active`}),sn=({running:e,overview:t,now:n})=>{let{run:r,attempt:i,item:a,lastActivityAt:o,warnings:s}=e,c=a===null?null:he(t,a).origin;return(0,F.jsxs)(dt,{run:r,children:[(0,F.jsxs)(st,{className:`py-3 whitespace-normal align-top`,children:[(0,F.jsx)(pt,{run:r,children:c===null?(0,F.jsxs)(`span`,{className:`block truncate text-sm font-medium`,children:[`Run `,(0,F.jsx)(`span`,{className:`font-mono text-xs`,children:r.id.slice(0,8)})]}):(0,F.jsx)(Ye,{variant:`row`,item:be(c),title:c.title,linked:!1})}),(0,F.jsxs)(`p`,{className:`mt-0.5 truncate text-xs text-muted-foreground lg:hidden`,children:[(0,F.jsxs)(`span`,{className:`md:hidden`,children:[(0,F.jsx)(on,{}),r.loop,`, `,r.agent,` on `,i.worker]}),(0,F.jsxs)(`span`,{className:`max-md:hidden`,children:[r.agent,` on `,i.worker]})]}),s.map(e=>(0,F.jsxs)(`p`,{className:`mt-1 flex items-start gap-1.5 text-xs text-warning`,children:[(0,F.jsx)(Ze,{"aria-hidden":`true`,weight:`fill`,className:`mt-0.5 size-3 shrink-0`}),(0,F.jsxs)(`span`,{children:[bt(e),e._tag===`ProviderRetrying`&&(0,F.jsx)(`span`,{className:`block text-warning/80 wrap-anywhere`,children:e.message})]})]},e._tag===`WorkerSilent`?e.worker:`${e.agent}`))]}),(0,F.jsxs)(at,{className:`py-3 max-md:hidden align-top`,children:[(0,F.jsx)(on,{}),r.loop]}),(0,F.jsx)(at,{className:`py-3 max-lg:hidden align-top`,children:r.agent}),(0,F.jsx)(at,{className:`py-3 max-lg:hidden align-top`,children:i.worker}),(0,F.jsx)(at,{className:`py-3 max-sm:hidden align-top`,children:(0,F.jsx)(`time`,{dateTime:i.startedAt,title:je(i.startedAt),className:`font-mono text-xs tabular-nums`,children:an(i.startedAt,n)})}),(0,F.jsx)(at,{className:`py-3 text-right align-top`,children:o===null?(0,F.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`None yet`}):(0,F.jsx)(`time`,{dateTime:o,title:je(o),className:`text-xs text-muted-foreground tabular-nums`,children:Ae(o,n)})})]})},cn=({running:e,workers:t,now:n})=>{let r=_e();return e.length===0?(0,F.jsx)(ft,{children:St(t)}):(0,F.jsx)(`div`,{className:`-mx-2`,children:(0,F.jsxs)(ot,{children:[(0,F.jsx)(nt,{children:(0,F.jsxs)(it,{className:`hover:bg-transparent`,children:[(0,F.jsx)(P,{children:`Item`}),(0,F.jsx)(P,{className:`max-md:hidden`,children:`Loop`}),(0,F.jsx)(P,{className:`max-lg:hidden`,children:`Agent`}),(0,F.jsx)(P,{className:`max-lg:hidden`,children:`Worker`}),(0,F.jsx)(P,{className:`max-sm:hidden`,children:`Started`}),(0,F.jsx)(P,{className:`text-right`,children:`Last activity`})]})}),(0,F.jsx)(rt,{children:e.map(e=>(0,F.jsx)(sn,{running:e,overview:r,now:n},e.attempt.id))})]})})},I=e(n(),1),ln=I.createContext(void 0);function un(){return I.useContext(ln)}var dn=I.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:a,onPressedChange:o,pressed:s,render:c,type:u,value:d,nativeButton:f=!0,style:p,...m}=e,h=le(d||void 0),g=un(),_=g?.value??[],v=(i||g?.disabled)??!1,[y,b]=Ue({controlled:g?h!==void 0&&_.indexOf(h)>-1:s,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:S,buttonRef:C}=x({disabled:v,native:f}),T={disabled:v,pressed:y},E=[C,t],D=[{"aria-pressed":y,onClick(e){let t=!y,n=ue(ce,e.nativeEvent);o?.(t,n),!n.isCanceled&&(h&&g?.setGroupValue?.(h,t,n),!n.isCanceled&&b(t))}},m,S],O=w(`button`,e,{enabled:!g,state:T,ref:E,props:D}),k=I.useMemo(()=>({disabled:v,focusableWhenDisabled:!1}),[v]);return g?(0,F.jsx)(l,{tag:`button`,render:c,className:n,style:p,metadata:k,state:T,refs:E,props:D}):O});function fn(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=b}=e,[p,m]=I.useState(0),h=r!=null,g=I.useRef(null),v=S(g,c),y=I.useRef([]),x=I.useRef(!1),C=I.useRef(null),w=o??p,T=D((e,t=!1)=>{if(C.current=y.current[e]??null,(s??m)(e),t){let t=y.current[e];te(g.current,t,a,n)}}),E=D(e=>{if(e.size===0)return;if(x.current){let e=y.current,t=e.indexOf(C.current);if(t===-1){let t=e[w];!t||re(e,w,d)?T(pn(e,d)):C.current=t}else t!==w&&T(t);return}x.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)T(i);else if(re(t,w,d)){let e=A(t,{disabledIndices:d});ae(t,e)||T(e)}te(g.current,r,a,n)});_(()=>{if(d==null||o!=null||!x.current)return;let e=y.current;if(re(e,w,d)){let t=A(e,{disabledIndices:d});ae(e,t)||T(t)}},[d,o,w,y,T]);let se=D((e,t,n)=>i?i(e,t,n,y):n),ce=D(e=>{let o=e.key===`Home`||e.key===`End`;if(!M.has(e.key)||!l&&o||mn(e,f)||!g.current)return;let s=a===`rtl`,c=s?j:ie,p=s?ie:j,m=n===`vertical`?ne:c,_=n===`vertical`?oe:p,v=k(e.nativeEvent);if(v!=null&&N(v)&&!vt(v)){let t=v.selectionStart,n=v.selectionEnd,r=v.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=w,x=ee(y,d),S=O(y,d);r!=null&&(b=r({disabledIndices:d,elementsRef:y,event:e,highlightedIndex:w,loopFocus:t,maxIndex:S,minIndex:x,onLoop:se,orientation:n,rtl:s}));let C=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,E=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=x:e.key===`End`&&(b=S)),b===w&&(C||E)&&(t&&b===S&&C?(b=x,i&&(b=i(e,w,b,y))):t&&b===x&&E?(b=S,i&&(b=i(e,w,b,y))):b=A(y.current,{startingIndex:b,decrement:E,disabledIndices:d})),b!==w&&!ae(y.current,b)&&(u&&e.stopPropagation(),(h||o||C||E)&&e.preventDefault(),T(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))});return{props:{ref:v,onFocus(e){let t=g.current,n=k(e.nativeEvent);t&&n!=null&&N(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:ce},highlightedIndex:w,onHighlightedIndexChange:T,elementsRef:y,onMapChange:E,relayKeyboardEvent:ce}}function pn(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!re(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function mn(e,t){for(let n of se)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function hn(e){let{render:t,className:n,style:r,refs:i=b,props:a=b,state:o=E,stateAttributesMapping:s,highlightedIndex:l,onHighlightedIndexChange:u,orientation:d,grid:f,loopFocus:p,onLoop:m,enableHomeAndEndKeys:h,onMapChange:g,stopEventPropagation:_=!0,rootRef:y,disabledIndices:x,modifierKeys:S,highlightItemOnHover:C=!1,tag:T=`div`,...D}=e,{props:O,highlightedIndex:k,onHighlightedIndexChange:A,elementsRef:j,onMapChange:M,relayKeyboardEvent:N}=fn({grid:f,loopFocus:p,onLoop:m,orientation:d,highlightedIndex:l,onHighlightedIndexChange:u,rootRef:y,stopEventPropagation:_,enableHomeAndEndKeys:h,direction:me(),disabledIndices:x,modifierKeys:S}),ee=w(T,e,{state:o,ref:i,props:[O,...a,D],stateAttributesMapping:s}),te=I.useMemo(()=>({highlightedIndex:k,onHighlightedIndexChange:A,highlightItemOnHover:C,relayKeyboardEvent:N}),[k,A,C,N]);return(0,F.jsx)(v.Provider,{value:te,children:(0,F.jsx)(c,{elementsRef:j,onMapChange:e=>{g?.(e),M(e)},children:ee})})}var gn=I.createContext(void 0);function _n(){return I.useContext(gn)}var vn=I.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:a,orientation:o=`horizontal`,multiple:s=!1,value:c,className:l,render:u,style:d,...f}=e,p=pe(!0),m=_n(),h=n??b,g=c!==void 0||n!==void 0,_=(p?.disabled??!1)||(m?.disabled??!1)||r,[v,y]=Ue({controlled:c,default:h,name:`ToggleGroup`,state:`value`}),x=D((e,t,n)=>{let r;s?(r=v.slice(),t?r.push(e):r.splice(v.indexOf(e),1)):r=t?[e]:[],a?.(r,n),!n.isCanceled&&y(r)}),S={disabled:_,multiple:s,orientation:o},C=I.useMemo(()=>({disabled:_,setGroupValue:x,value:v,isValueInitialized:g}),[_,x,v,g]),T={role:`group`},E=w(`div`,e,{enabled:!!p,state:S,ref:t,props:[T,f]});return(0,F.jsx)(ln.Provider,{value:C,children:p?E:(0,F.jsx)(hn,{render:u,className:l,style:d,state:S,refs:[t],props:[T,f],loopFocus:i,enableHomeAndEndKeys:!0,orientation:o})})}),yn=y(`group/toggle inline-flex items-center justify-center gap-1.5 rounded-md text-sm font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow] duration-100 outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/70 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent text-muted-foreground hover:bg-muted/50 aria-pressed:text-foreground`},size:{default:`h-7 min-w-7 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5`,sm:`h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,lg:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`}},defaultVariants:{variant:`default`,size:`default`}}),bn=I.createContext({size:`default`,variant:`default`,spacing:2,orientation:`horizontal`});function xn({className:e,variant:t,size:n,spacing:r=2,orientation:i=`horizontal`,children:a,...o}){return(0,F.jsx)(vn,{"data-slot":`toggle-group`,"data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":i,style:{"--gap":r},className:C(`group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch`,e),...o,children:(0,F.jsx)(bn.Provider,{value:{variant:t,size:n,spacing:r,orientation:i},children:a})})}function Sn({className:e,children:t,variant:n=`default`,size:r=`default`,...i}){let a=I.useContext(bn);return(0,F.jsx)(dn,{"data-slot":`toggle-group-item`,"data-variant":a.variant||n,"data-size":a.size||r,"data-spacing":a.spacing,className:C(`shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t`,yn({variant:a.variant||n,size:a.size||r}),e),...i,children:t})}var Cn=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function wn(e){return typeof e==`string`&&Cn.includes(e)}var Tn=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function En(e){return typeof e==`string`&&Tn.has(e)}function Dn(e){return typeof e==`string`&&e.startsWith(`data-`)}function On(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(En(n)||Dn(n))&&(t[n]=e[n]);return t}function kn(e){if(e==null)return null;if((0,I.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return On(t)}return typeof e==`object`&&!Array.isArray(e)?On(e):null}function An(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(En(n)||Dn(n)||wn(n))&&(t[n]=e[n]);return t}function jn(e){return e==null?null:(0,I.isValidElement)(e)?An(e.props):typeof e==`object`&&!Array.isArray(e)?An(e):null}var Mn=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function Nn(){return Nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nn.apply(null,arguments)}function Pn(e,t){if(e==null)return{};var n,r,i=Fn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var In=(0,I.forwardRef)((e,t)=>{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,c=e.title,l=e.desc,u=Pn(e,Mn),d=a||{width:r,height:i,x:0,y:0},f=g(`recharts-surface`,o);return I.createElement(`svg`,Nn({},An(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),I.createElement(`title`,null,c),I.createElement(`desc`,null,l),n)}),Ln=[`children`,`className`];function Rn(){return Rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rn.apply(null,arguments)}function zn(e,t){if(e==null)return{};var n,r,i=Bn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Vn=I.forwardRef((e,t)=>{var n=e.children,r=e.className,i=zn(e,Ln),a=g(`recharts-layer`,r);return I.createElement(`g`,Rn({className:a},An(i),{ref:t}),n)});function Hn(e){return e===`__proto__`}var Un=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function Wn(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:Un.test(e);default:return!1}}function Gn(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Kn(e){return typeof e==`symbol`||e instanceof Symbol}function qn(e){return e==null?``:Jn(e)}function Jn(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Jn).join(`,`);if(Kn(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Yn(e){if(Array.isArray(e))return e.map(Gn);if(typeof e==`symbol`)return[e];e=qn(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o){if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l}else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function Xn(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(Hn(t))return n;let r=e[t];return r===void 0?Wn(t)&&!Object.hasOwn(e,t)?Xn(e,Yn(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Gn(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Zn(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),Hn(t))return n;let r=e[t];return r===void 0?n:r}}}function Zn(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||Hn(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var Qn=4;function $n(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qn),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function er(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+$n(i)+n},``)}var tr=e=>e===0?0:e>0?1:-1,nr=e=>typeof e==`number`&&e!=+e,rr=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,L=e=>(typeof e==`number`||e instanceof Number)&&!nr(e),ir=e=>L(e)||typeof e==`string`,ar=0,or=e=>{var t=++ar;return`${e||``}${t}`},sr=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!L(e)&&typeof e!=`string`)return n;var i;if(rr(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return nr(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},cr=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function R(e,t,n){return L(e)&&L(t)?$n(e+n*(t-e)):t}function lr(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):Xn(e,t))===n)}var ur=e=>{for(var t=e.length,n=0,r=0,i=0,a=0,o=1/0,s=-1/0,c=0,l=0,u=0;u<t;u++)c=e[u]?.cx||0,l=e[u]?.cy||0,n+=c,r+=l,i+=c*l,a+=c*c,o=Math.min(o,c),s=Math.max(s,c);var d=t*a===n*n?0:(t*i-n*r)/(t*a-n*n);return{xmin:o,xmax:s,a:d,b:(r-d*n)/t}},z=e=>e==null,dr=e=>z(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function fr(e){return e!=null}function pr(){}function mr(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?hr(Object(n),!0).forEach(function(t){_r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _r(e,t,n){return(t=vr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vr(e){var t=yr(e,`string`);return typeof t==`symbol`?t:t+``}function yr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var br=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=mr(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?gr({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?gr({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?gr({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?gr({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?gr({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?gr({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?gr({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?gr({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(L(n.x)||rr(n.x))&&(L(n.y)||rr(n.y))?gr({x:c+sr(n.x,g),y:l+sr(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):gr({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},xr=[`top`,`left`,`right`,`bottom`];function Sr(e){return e==null?!1:typeof e==`object`||xr.includes(e)}var Cr=(0,I.createContext)(null),wr=()=>(0,I.useContext)(Cr);function B(e){return function(){return e}}var Tr=Math.cos,Er=Math.sin,Dr=Math.sqrt,Or=Math.PI;Or/2;var kr=2*Or,Ar=Math.PI,jr=2*Ar,Mr=1e-6,Nr=jr-Mr;function Pr(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Fr(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Pr;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Ir=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Pr:Fr(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Mr){if(!(Math.abs(u*s-c*l)>Mr)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Ar-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Mr&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Mr||Math.abs(this._y1-l)>Mr)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%jr+jr),d>Nr?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Mr&&this._append`A${n},${n},0,${+(d>=Ar)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};Ir.prototype;function Lr(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Ir(t)}Array.prototype.slice;function Rr(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function zr(e){this._context=e}zr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function Br(e){return new zr(e)}function Vr(e){return e[0]}function Hr(e){return e[1]}function Ur(e,t){var n=B(!0),r=null,i=Br,a=null,o=Lr(s);e=typeof e==`function`?e:e===void 0?Vr:B(e),t=typeof t==`function`?t:t===void 0?Hr:B(t);function s(s){var c,l=(s=Rr(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:B(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:B(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:B(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function Wr(e,t,n){var r=null,i=B(!0),a=null,o=Br,s=null,c=Lr(l);e=typeof e==`function`?e:e===void 0?Vr:B(+e),t=typeof t==`function`?t:B(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?Hr:B(+n);function l(l){var u,d,f,p=(l=Rr(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return Ur().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:B(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:B(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:B(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:B(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:B(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:B(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:B(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var Gr=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function Kr(e){return new Gr(e,!0)}function qr(e){return new Gr(e,!1)}var Jr={draw(e,t){let n=Dr(t/Or);e.moveTo(n,0),e.arc(0,0,n,0,kr)}},Yr={draw(e,t){let n=Dr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Xr=Dr(1/3),Zr=Xr*2,Qr={draw(e,t){let n=Dr(t/Zr),r=n*Xr;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},$r={draw(e,t){let n=Dr(t),r=-n/2;e.rect(r,r,n,n)}},ei=.8908130915292852,ti=Er(Or/10)/Er(7*Or/10),ni=Er(kr/10)*ti,ri=-Tr(kr/10)*ti,ii={draw(e,t){let n=Dr(t*ei),r=ni*n,i=ri*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=kr*t/5,o=Tr(a),s=Er(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},ai=Dr(3),oi={draw(e,t){let n=-Dr(t/(ai*3));e.moveTo(0,n*2),e.lineTo(-ai*n,-n),e.lineTo(ai*n,-n),e.closePath()}},si=-.5,ci=Dr(3)/2,li=1/Dr(12),ui=(li/2+1)*3,di={draw(e,t){let n=Dr(t/ui),r=n/2,i=n*li,a=r,o=n*li+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(si*r-ci*i,ci*r+si*i),e.lineTo(si*a-ci*o,ci*a+si*o),e.lineTo(si*s-ci*c,ci*s+si*c),e.lineTo(si*r+ci*i,si*i-ci*r),e.lineTo(si*a+ci*o,si*o-ci*a),e.lineTo(si*s+ci*c,si*c-ci*s),e.closePath()}};function fi(e,t){let n=null,r=Lr(i);e=typeof e==`function`?e:B(e||Jr),t=typeof t==`function`?t:B(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:B(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:B(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function pi(){}function mi(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function hi(e){this._context=e}hi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mi(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gi(e){return new hi(e)}function _i(e){this._context=e}_i.prototype={areaStart:pi,areaEnd:pi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:mi(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vi(e){return new _i(e)}function yi(e){this._context=e}yi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:mi(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bi(e){return new yi(e)}function xi(e){this._context=e}xi.prototype={areaStart:pi,areaEnd:pi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Si(e){return new xi(e)}function Ci(e){return e<0?-1:1}function wi(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Ci(a)+Ci(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ti(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ei(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Di(e){this._context=e}Di.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ei(this,this._t0,Ti(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ei(this,Ti(this,n=wi(this,e,t)),n);break;default:Ei(this,this._t0,n=wi(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Oi(e){this._context=new ki(e)}(Oi.prototype=Object.create(Di.prototype)).point=function(e,t){Di.prototype.point.call(this,t,e)};function ki(e){this._context=e}ki.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Ai(e){return new Di(e)}function ji(e){return new Oi(e)}function Mi(e){this._context=e}Mi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Ni(e),i=Ni(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ni(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Pi(e){return new Mi(e)}function Fi(e,t){this._context=e,this._t=t}Fi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function Ii(e){return new Fi(e,.5)}function Li(e){return new Fi(e,0)}function Ri(e){return new Fi(e,1)}function zi(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Bi(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Vi(e,t){return e[t]}function Hi(e){let t=[];return t.key=e,t}function Ui(){var e=B([]),t=Bi,n=zi,r=Vi;function i(i){var a=Array.from(e.apply(this,arguments),Hi),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=Rr(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:B(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:B(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Bi:typeof e==`function`?e:B(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??zi,i):n},i}function Wi(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}zi(e,t)}}function Gi(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}zi(e,t)}}function Ki(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,zi(e,t)}}var qi=[`type`,`size`,`sizeType`];function Ji(){return Ji=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ji.apply(null,arguments)}function Yi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Yi(Object(n),!0).forEach(function(t){Zi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zi(e,t,n){return(t=Qi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qi(e){var t=$i(e,`string`);return typeof t==`symbol`?t:t+``}function $i(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ea(e,t){if(e==null)return{};var n,r,i=ta(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ta(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var na={symbolCircle:Jr,symbolCross:Yr,symbolDiamond:Qr,symbolSquare:$r,symbolStar:ii,symbolTriangle:oi,symbolWye:di},ra=Math.PI/180,ia=e=>na[`symbol${dr(e)}`]||Jr,aa=(e,t,n)=>{if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*ra;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},oa=(e,t)=>{na[`symbol${dr(e)}`]=t},sa=e=>{var t=e.type,n=t===void 0?`circle`:t,r=e.size,i=r===void 0?64:r,a=e.sizeType,o=a===void 0?`area`:a,s=Xi(Xi({},ea(e,qi)),{},{type:n,size:i,sizeType:o}),c=`circle`;typeof n==`string`&&(c=n);var l=()=>{var e=ia(c),t=fi().type(e).size(aa(i,o,c))();if(t!==null)return t},u=s.className,d=s.cx,f=s.cy,p=An(s);return L(d)&&L(f)&&L(i)?I.createElement(`path`,Ji({},p,{className:g(`recharts-symbols`,u),transform:`translate(${d}, ${f})`,d:l()})):null};sa.registerSymbol=oa;var ca=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,la=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,I.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{wn(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},ua=(e,t,n)=>r=>(e(t,n,r),null),da=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];wn(i)&&typeof a==`function`&&(r||={},r[i]=ua(a,t,n))}),r},fa=e=>Array.isArray(e)&&e.length>0;function pa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pa(Object(n),!0).forEach(function(t){ha(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ha(e,t,n){return(t=ga(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ga(e){var t=_a(e,`string`);return typeof t==`symbol`?t:t+``}function _a(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function V(e,t){var n=ma({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function va(){return va=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},va.apply(null,arguments)}function ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ya(Object(n),!0).forEach(function(t){xa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ya(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xa(e,t,n){return(t=Sa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sa(e){var t=Ca(e,`string`);return typeof t==`symbol`?t:t+``}function Ca(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var wa=32,Ta={align:`center`,iconSize:14,inactiveColor:`#ccc`,layout:`horizontal`,verticalAlign:`middle`,labelStyle:{}};function Ea(e){if(typeof e==`object`&&e&&`strokeDasharray`in e)return String(e.strokeDasharray)}function Da(e){var t=e.data,n=e.iconType,r=e.inactiveColor,i=wa/2,a=wa/6,o=wa/3,s=t.inactive?r:t.color,c=n??t.type;if(c===`none`)return null;if(c===`plainline`)return I.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:s,strokeDasharray:Ea(t.payload),x1:0,y1:i,x2:wa,y2:i,className:`recharts-legend-icon`});if(c===`line`)return I.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:s,d:`M0,${i}h${o}
2
2
  A${a},${a},0,1,1,${2*o},${i}
3
3
  H${wa}M${2*o},${i}
4
4
  A${a},${a},0,1,1,${o},${i}`,className:`recharts-legend-icon`});if(c===`rect`)return I.createElement(`path`,{stroke:`none`,fill:s,d:`M0,${wa/8}h${wa}v${wa*3/4}h${-wa}z`,className:`recharts-legend-icon`});if(I.isValidElement(t.legendIcon)){var l=ba({},t);return delete l.legendIcon,I.cloneElement(t.legendIcon,l)}return I.createElement(sa,{fill:s,cx:i,cy:i,size:wa,sizeType:`diameter`,type:c})}function Oa(e){var t=e.payload,n=e.iconSize,r=e.layout,i=e.formatter,a=e.inactiveColor,o=e.iconType,s=e.labelStyle,c={x:0,y:0,width:wa,height:wa},l={display:r===`horizontal`?`inline-block`:`block`,marginRight:10,whiteSpace:`nowrap`},u={display:`inline-block`,verticalAlign:`middle`,marginRight:4};return t.map((t,r)=>{var d=t.formatter||i,f=g({"recharts-legend-item":!0,[`legend-item-${r}`]:!0,inactive:t.inactive});if(t.type===`none`)return null;var p=typeof s==`object`?ba({},s):{};p.color=t.inactive?a:p.color||t.color,p.whiteSpace??=`normal`,p.overflowWrap??=`break-word`;var m=d?d(t.value,t,r):t.value;return I.createElement(`li`,va({className:f,style:l,key:`legend-item-${r}`},da(e,t,r)),I.createElement(In,{width:n,height:n,viewBox:c,style:u,"aria-label":t.value==null?`legend icon`:`${t.value} legend icon`},I.createElement(Da,{data:t,iconType:o,inactiveColor:a})),I.createElement(`span`,{className:`recharts-legend-item-text`,style:p},m))})}var ka=e=>{var t=V(e,Ta),n=t.payload,r=t.layout,i=t.align;if(!n||!n.length)return null;var a={padding:0,margin:0,textAlign:r===`horizontal`?i:`left`};return I.createElement(`ul`,{className:`recharts-default-legend`,style:a},I.createElement(Oa,va({},t,{payload:n})))};function Aa(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function ja(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function Ma(e){return e}function Na(e){return Number.isSafeInteger(e)&&e>=0}function Pa(e){return e!=null&&typeof e!=`function`&&Na(e.length)}function Fa(e){return function(t){return Xn(t,e)}}function Ia(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function La(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ra(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function za(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Ba=`[object RegExp]`,Va=`[object String]`,Ha=`[object Number]`,Ua=`[object Boolean]`,Wa=`[object Arguments]`,Ga=`[object Symbol]`,Ka=`[object Date]`,qa=`[object Map]`,Ja=`[object Set]`,Ya=`[object Array]`,Xa=`[object Function]`,Za=`[object ArrayBuffer]`,Qa=`[object Object]`,$a=`[object Error]`,eo=`[object DataView]`,to=`[object Uint8Array]`,no=`[object Uint8ClampedArray]`,ro=`[object Uint16Array]`,io=`[object Uint32Array]`,ao=`[object BigUint64Array]`,oo=`[object Int8Array]`,so=`[object Int16Array]`,co=`[object Int32Array]`,lo=`[object BigInt64Array]`,uo=`[object Float32Array]`,fo=`[object Float64Array]`,po=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function mo(e){return po.Buffer!==void 0&&po.Buffer.isBuffer(e)}function ho(e,t){return go(e,void 0,e,new Map,t)}function go(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(Ia(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=go(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,go(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(go(a,void 0,n,r,i));return t}if(mo(e))return e.subarray();if(La(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=go(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),_o(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),_o(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),_o(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,_o(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),_o(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),_o(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),_o(t,e,n,r,i),t}if(typeof e==`object`&&vo(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),_o(t,e,n,r,i),t}return e}function _o(e,t,n=e,r,i){let a=[...Object.keys(t),...Ra(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=go(t[s],s,n,r,i))}}function vo(e){switch(za(e)){case Wa:case Ya:case Za:case eo:case Ua:case Ka:case uo:case fo:case oo:case so:case co:case qa:case Ha:case Qa:case Ba:case Ja:case Va:case Ga:case to:case no:case ro:case io:return!0;default:return!1}}function yo(e){return go(e,void 0,e,new Map,void 0)}function bo(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function xo(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function So(e,t,n){return typeof n==`function`?Co(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?Co(t,r,e,s,!1):!!c},new Map,!0):So(e,t,()=>void 0)}function Co(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return wo(e,t,n,r,i);case`function`:return Object.keys(t).length>0?Co(e,{...t},n,r,i):bo(e,t);default:return xo(e)&&i?typeof t!=`string`||t===``:bo(e,t)}}function wo(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return Eo(e,t,n,r);if(t instanceof Map)return To(e,t,n,r);if(t instanceof Set)return Do(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)Ia(e)&&(e=Object(e));else{let t=za(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<a.length;i++){let o=a[i];if(!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function To(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function Eo(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function Do(e,t,n,r){return t.size===0||e instanceof Set&&Eo([...e],[...t],n,r)}function Oo(e,t){return So(e,t,()=>void 0)}function ko(e){return e=yo(e),t=>Oo(t,e)}function Ao(e,t){return ho(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(za(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),_o(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case Ha:case Va:case Ua:{let t=new e.constructor(e?.valueOf());return _o(t,e),t}case Wa:{let t={};return _o(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function jo(e){return Ao(e)}var Mo=/^(?:0|[1-9]\d*)$/;function No(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return Mo.test(e)}}function Po(e){return typeof e==`object`&&!!e&&za(e)===`[object Arguments]`}function Fo(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&Wn(t)&&!(t in Object(e))?Yn(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=Gn(n[e]);if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||Po(r))&&No(t)&&Number(t)<r.length))return!1;r=r[t]}return!0}function Io(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=Gn(e)}return t=jo(t),function(n){let r=Xn(n,e);return r===void 0?Fo(n,e):t===void 0?r===void 0:Oo(r,t)}}function Lo(e){if(e==null)return Ma;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?Io(e[0],e[1]):ko(e);default:return Fa(e)}}function Ro(e){return e===0?0:e}function zo(e,t=Ma){return Pa(e)?Aa(Array.from(e),ja(Lo(t),1)).map(Ro):[]}function Bo(e,t,n){return t===!0?zo(e,n):typeof t==`function`?zo(e,t):e}var Vo=(0,I.createContext)(null),Ho=p(),Uo=e=>e,H=()=>{var e=(0,I.useContext)(Vo);return e?e.store.dispatch:Uo},Wo=()=>{},Go=()=>Wo,Ko=(e,t)=>e===t;function U(e){var t=(0,I.useContext)(Vo),n=(0,I.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:Wo,[t,e]);return(0,Ho.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:Go,t?t.store.getState:Wo,t?t.store.getState:Wo,n,Ko)}function qo(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Jo(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var Yo=e=>Array.isArray(e)?e:[e];function Xo(e){let t=Array.isArray(e[0])?e[0]:e;return Jo(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Zo(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Qo=class{constructor(e){this.value=e}deref(){return this.value}},$o=typeof WeakRef>`u`?Qo:WeakRef,es=0,ts=1;function ns(){return{s:es,v:void 0,o:null,p:null}}function rs(e){return e instanceof $o?e.deref():e}function is(e,t={}){let n=ns(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=ns(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=ns(),e.set(n,t)):t=r}}let s=t,c;if(t.s===ts)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=rs(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new $o(c):c}return s.s=ts,s.v=c,c}return o.clearCache=()=>{n=ns(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function as(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),qo(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=is,argsMemoizeOptions:u=[]}={...n,...a},d=Yo(c),f=Yo(u),p=Xo(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Zo(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var W=as(is);function os(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function ss(e,t,n){return xo(n)&&(typeof t==`number`&&Pa(n)&&No(t)&&t<n.length||typeof t==`string`&&t in n)?bo(n[t],e):!1}function cs(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var ls=(e,t,n)=>{if(e!==t){let r=cs(e),i=cs(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},us=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ds=/^\w*$/;function fs(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||Kn(e)?!0:typeof e==`string`&&(ds.test(e)||!us.test(e))||t!=null&&Object.hasOwn(t,e)}function ps(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=Pa(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r<t.length&&n!=null;++r)n=n[t[r]];return r>0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||fs(e)?e:{key:e,path:Yn(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=ls(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function ms(e,...t){let n=t.length;return n>1&&ss(e,t[0],t[1])?t=[]:n>2&&ss(t[0],t[1],t[2])&&(t=[t[0]]),ps(e,os(t),[`asc`])}var hs=e=>e.legend.settings,gs=e=>e.legend.size,_s=W([e=>e.legend.payload,hs],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?ms(r,n):r});function vs(){return U(_s)}function ys(e,t){return ws(e)||Cs(e,t)||xs(e,t)||bs()}function bs(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./use-project-links-C3F9c85T.js";import{t as n}from"./link-3oQYoIpm.js";import{r}from"./button-CzVqBv_O.js";import{Dn as i,En as a,Pn as o}from"./api-CoJQoiOc.js";import{o as s,v as c}from"./strings-BIVdGoBr.js";import{C as l}from"./overview-CUn9OtUH.js";var u=e(),d=({approval:e,className:t})=>{if(e===null)return null;let n=i(e.source),d=a(n,({approver:e})=>e);return(0,u.jsxs)(`span`,{className:r(`text-muted-foreground`,t),children:[(0,u.jsx)(`span`,{className:`whitespace-nowrap`,children:o(d,{onNone:()=>`Approved`,onSome:e=>`Approved by ${e}`})}),` · `,(0,u.jsx)(`time`,{dateTime:e.approvedAt,title:c(e.approvedAt),className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:s(e.approvedAt)}),o(n,{onNone:()=>null,onSome:({channel:e})=>(0,u.jsxs)(u.Fragment,{children:[` · `,(0,u.jsx)(`span`,{className:`whitespace-nowrap`,children:l[e]})]})})]})},f=({run:e,source:t,className:n})=>{if(e.runAgain===null)return null;let{from:i,requestedBy:a}=e.runAgain,l=i.slice(0,8);return(0,u.jsxs)(`span`,{className:r(`text-muted-foreground`,n),children:[(0,u.jsx)(`span`,{className:`whitespace-nowrap`,children:o(a,{onNone:()=>`Run again`,onSome:e=>`Run again by ${e}`})}),` · `,(0,u.jsx)(`time`,{dateTime:e.openedAt,title:c(e.openedAt),className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:s(e.openedAt)}),` · `,(0,u.jsxs)(`span`,{className:`whitespace-nowrap`,children:[`from run`,` `,t===`link`?(0,u.jsx)(p,{run:e,from:i,label:l}):(0,u.jsx)(`span`,{className:`font-mono text-xs`,children:l})]})]})},p=({run:e,from:r,label:i})=>{let a=t();return(0,u.jsx)(n,{...a.run(e.repository,r),className:`relative z-10 font-mono text-xs text-primary underline-offset-4 hover:underline`,children:i})};export{d as n,f as t};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./use-project-links-CdgpfpoU.js";import{t as n}from"./link-3oQYoIpm.js";import{r}from"./button-CzVqBv_O.js";import{Dn as i,En as a,Pn as o}from"./api-D3RWLycx.js";import{o as s,v as c}from"./strings-BIVdGoBr.js";import{C as l}from"./overview-DLYaCoiG.js";var u=e(),d=({approval:e,className:t})=>{if(e===null)return null;let n=i(e.source),d=a(n,({approver:e})=>e);return(0,u.jsxs)(`span`,{className:r(`text-muted-foreground`,t),children:[(0,u.jsx)(`span`,{className:`whitespace-nowrap`,children:o(d,{onNone:()=>`Approved`,onSome:e=>`Approved by ${e}`})}),` · `,(0,u.jsx)(`time`,{dateTime:e.approvedAt,title:c(e.approvedAt),className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:s(e.approvedAt)}),o(n,{onNone:()=>null,onSome:({channel:e})=>(0,u.jsxs)(u.Fragment,{children:[` · `,(0,u.jsx)(`span`,{className:`whitespace-nowrap`,children:l[e]})]})})]})},f=({run:e,source:t,className:n})=>{if(e.runAgain===null)return null;let{from:i,requestedBy:a}=e.runAgain,l=i.slice(0,8);return(0,u.jsxs)(`span`,{className:r(`text-muted-foreground`,n),children:[(0,u.jsx)(`span`,{className:`whitespace-nowrap`,children:o(a,{onNone:()=>`Run again`,onSome:e=>`Run again by ${e}`})}),` · `,(0,u.jsx)(`time`,{dateTime:e.openedAt,title:c(e.openedAt),className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:s(e.openedAt)}),` · `,(0,u.jsxs)(`span`,{className:`whitespace-nowrap`,children:[`from run`,` `,t===`link`?(0,u.jsx)(p,{run:e,from:i,label:l}):(0,u.jsx)(`span`,{className:`font-mono text-xs`,children:l})]})]})},p=({run:e,from:r,label:i})=>{let a=t();return(0,u.jsx)(n,{...a.run(e.repository,r),className:`relative z-10 font-mono text-xs text-primary underline-offset-4 hover:underline`,children:i})};export{d as n,f as t};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./native-select-BCc0nbNt.js";import{bt as n}from"./api-CoJQoiOc.js";import{g as r,n as i}from"./strings-BIVdGoBr.js";import{t as a}from"./label-DcQGgkXe.js";var o=e(),s=({repositories:e,value:s,onChange:c})=>(0,o.jsxs)(a,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[r,(0,o.jsxs)(t,{className:`w-full min-w-0 sm:w-auto`,value:e.find(e=>s!==void 0&&n(e)===n(s))??``,onChange:t=>c(e.find(e=>e===t.target.value)),children:[(0,o.jsx)(`option`,{value:``,children:i}),e.map(e=>(0,o.jsx)(`option`,{value:e,children:e},e))]})]}),c=`relative hover:bg-muted/60 has-[a[data-row-link]:focus-visible]:bg-muted/60`,l=`rounded-sm outline-none after:absolute after:inset-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,u=({id:e,title:t,count:n})=>(0,o.jsxs)(`h2`,{id:e,className:`flex items-baseline gap-2`,children:[(0,o.jsx)(`span`,{className:`text-lg font-semibold`,children:t}),(0,o.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:n})]}),d=({title:e,children:t})=>(0,o.jsxs)(`div`,{className:`flex max-w-prose flex-col gap-1 border-t py-3`,children:[(0,o.jsx)(`p`,{className:`font-medium`,children:e}),(0,o.jsx)(`p`,{className:`text-muted-foreground`,children:t})]});export{s as a,l as i,u as n,c as r,d as t};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./native-select-BCc0nbNt.js";import{bt as n}from"./api-D3RWLycx.js";import{g as r,n as i}from"./strings-BIVdGoBr.js";import{t as a}from"./label-DcQGgkXe.js";var o=e(),s=({repositories:e,value:s,onChange:c})=>(0,o.jsxs)(a,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[r,(0,o.jsxs)(t,{className:`w-full min-w-0 sm:w-auto`,value:e.find(e=>s!==void 0&&n(e)===n(s))??``,onChange:t=>c(e.find(e=>e===t.target.value)),children:[(0,o.jsx)(`option`,{value:``,children:i}),e.map(e=>(0,o.jsx)(`option`,{value:e,children:e},e))]})]}),c=`relative hover:bg-muted/60 has-[a[data-row-link]:focus-visible]:bg-muted/60`,l=`rounded-sm outline-none after:absolute after:inset-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,u=({id:e,title:t,count:n})=>(0,o.jsxs)(`h2`,{id:e,className:`flex items-baseline gap-2`,children:[(0,o.jsx)(`span`,{className:`text-lg font-semibold`,children:t}),(0,o.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:n})]}),d=({title:e,children:t})=>(0,o.jsxs)(`div`,{className:`flex max-w-prose flex-col gap-1 border-t py-3`,children:[(0,o.jsx)(`p`,{className:`font-medium`,children:e}),(0,o.jsx)(`p`,{className:`text-muted-foreground`,children:t})]});export{s as a,l as i,u as n,c as r,d as t};
@@ -1,4 +1,4 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{A as r,I as i,M as a,O as o,a as s,c,d as l,f as u,h as d,i as f,l as p,m,n as h,o as g,s as ee,u as te,x as _,y as ne}from"./queryOptions-Bavh4JFe.js";import{n as v,t as re}from"./use-project-links-C3F9c85T.js";import{a as ie,c as ae,f as oe,i as se,n as ce,o as le,p as y,r as ue,s as b,t as de,u as x}from"./queries-Cvt0xQVN.js";import{n as fe}from"./useNavigate-I5E4IRt2.js";import{t as pe}from"./link-3oQYoIpm.js";import{c as me,f as S,i as C,l as he,o as ge}from"./mark-lp0qzo_h.js";import{c as w,s as T,t as E}from"./code-block-CgYM2MuQ.js";import{t as D}from"./native-select-BCc0nbNt.js";import{M as _e,W as ve,b as ye,h as be,m as xe,p as Se,r as Ce,s as we,t as O,u as Te,v as Ee,y as De}from"./button-CzVqBv_O.js";import{t as Oe}from"./X.es-DOdg41RP.js";import{_ as ke,a as Ae,t as je,w as Me}from"./useValueChanged-CnAH0RHB.js";import{A as Ne,At as Pe,Bt as Fe,C as Ie,Ct as k,D as Le,Dt as Re,F as ze,Fn as Be,Ft as A,Ht as Ve,I as j,L as M,Ln as He,M as N,Mt as Ue,N as We,O as Ge,Ot as Ke,P as qe,Pn as Je,Pt as Ye,S as Xe,Sn as Ze,Wt as P,Y as Qe,_ as $e,a as et,an as tt,at as nt,b as rt,bn as it,bt as at,cn as ot,dn as st,dt as ct,en as lt,fn as ut,ft as dt,ht as ft,i as pt,in as mt,it as ht,j as gt,jn as _t,k as vt,kn as yt,l as bt,mn as xt,n as St,nn as Ct,o as wt,ot as Tt,pt as Et,r as Dt,sn as Ot,un as kt,v as At,vt as jt,xn as Mt,y as Nt,yt as Pt,zt as Ft}from"./api-CoJQoiOc.js";import{i as It,t as Lt}from"./page-CmRQu9F2.js";import{t as F}from"./error-alert-Bq-SD6of.js";import{i as Rt,o as zt,r as Bt,t as Vt}from"./empty-Cu_oAz6O.js";import{t as Ht}from"./useControlled-CiSbwZN5.js";import{n as Ut}from"./queries-D5TGw8Nr.js";import{$ as Wt,E as I,Q as Gt,R as Kt,X as qt,Y as Jt,Z as Yt,dt as Xt,et as Zt,it as Qt,nt as $t,rt as en,tt as tn}from"./index-BGr-Cg-z.js";import{r as nn}from"./status-badge-B2-vzEoZ.js";import{t as L}from"./label-DcQGgkXe.js";import{t as rn}from"./markdown-DQ2LWxl6.js";import{n as an,o as on,r as sn,t as cn}from"./table-CKp2wE4u.js";import{t as ln}from"./fill-cell-BtM3J7oO.js";import{a as un,c as dn,g as fn,h as pn,i as mn,l as hn,m as gn,n as _n,o as vn,r as yn,t as bn,u as xn}from"./sortable.esm-D-1SvrpE.js";import{t as Sn}from"./label-badge-C3PtxhEk.js";var Cn=class extends u{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,f=o&&c===`backward`,p=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:m(t,n.data),hasPreviousPage:d(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:f,isFetchingPreviousPage:p,isRefetchError:s&&!l&&!f,isRefetching:a&&!u&&!p}}};function wn(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}var Tn=class extends _{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,ne.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,o=n.some((t,n)=>t!==e[n]),s=i||o,c=s?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!a(e,n)});(s||c)&&(s&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(s&&(wn(e,n).forEach(e=>{e.destroy()}),wn(n,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){let n=new Set;return t.map((r,i)=>{let a=e[i];return r.defaultedQueryOptions.notifyOnChangeProps?a:r.observer.trackResult(a,e=>{n.has(e)||(n.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#d(e,t,n){if(t){let i=this.#c,a=n!==void 0&&i!==void 0&&(i.length!==n.length||n.some((e,t)=>e!==i[t]));return(this.#t!==this.#s||a||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=r(this.#a,t(e))),this.#a}return e}#f(){return!this.#r?.combine||this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new u(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=this.#t.slice(),this.#t[n]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#f(),t=this.#a,n=e?t:this.#d(this.#u(this.#t,this.#l),this.#r?.combine);(e||t!==n)&&ne.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},R=e(t(),1);function En({queries:e,...t},n){let r=i(n),a=l(),d=te(),m=t.subscribed!==!1,h=R.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=a?`isRestoring`:m?`optimistic`:void 0,t}),[e,r,a,m]);h.forEach(e=>{f(e);let t=r.getQueryCache().get(e.queryHash);ee(e,d,t)}),p(d);let[_]=R.useState(()=>new Tn(r,h,t)),[v,re,ie]=_.getOptimisticResult(h,t.combine),ae=!a&&m;R.useSyncExternalStore(R.useCallback(e=>ae?_.subscribe(ne.batchCalls(e)):o,[_,ae]),()=>_.getCurrentResult(),()=>_.getCurrentResult()),R.useEffect(()=>{_.setQueries(h,t)},[h,t,_]);let oe=v.some((e,t)=>g(h[t],e))?v.flatMap((e,t)=>{let n=h[t];if(n&&g(n,e)){let e=new u(r,n);return s(n,e,d)}return[]}):[];if(oe.length>0)throw Promise.all(oe);let se=v.find((e,t)=>{let n=h[t];return n&&c({result:e,errorResetBoundary:d,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(se)throw se.error;return re(ie())}function Dn(e,t){return h(e,Cn,t)}var On=new Map([[`bold`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z`}))],[`duotone`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M208,32V224a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V32A16,16,0,0,1,64,16H192A16,16,0,0,1,208,32Z`,opacity:`0.2`}),R.createElement(`path`,{d:`M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z`}))],[`fill`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M192,16H64A16,16,0,0,0,48,32V224a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V32A16,16,0,0,0,192,16ZM100,200a12,12,0,1,1,12-12A12,12,0,0,1,100,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,80Zm56,120a12,12,0,1,1,12-12A12,12,0,0,1,156,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,80Z`}))],[`light`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M102,60A10,10,0,1,1,92,50,10,10,0,0,1,102,60Zm62,10a10,10,0,1,0-10-10A10,10,0,0,0,164,70ZM92,118a10,10,0,1,0,10,10A10,10,0,0,0,92,118Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,118ZM92,186a10,10,0,1,0,10,10A10,10,0,0,0,92,186Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,186Z`}))],[`regular`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z`}))],[`thin`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M100,60a8,8,0,1,1-8-8A8,8,0,0,1,100,60Zm64,8a8,8,0,1,0-8-8A8,8,0,0,0,164,68ZM92,120a8,8,0,1,0,8,8A8,8,0,0,0,92,120Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,120ZM92,188a8,8,0,1,0,8,8A8,8,0,0,0,92,188Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,188Z`}))]]),kn=R.forwardRef((e,t)=>R.createElement(ve,{ref:t,...e,weights:On}));kn.displayName=`DotsSixVerticalIcon`;function An(e,t,n,r=!0,i,a){let[o,s]=R.useState(),c=Ae(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return ye(()=>{let i=e||t||l||!r?void 0:jn(n.current,c);o!==i&&s(i)}),u}function jn(e,t){let n=Mn(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Mn(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var z=n(),Nn=R.createContext({disabled:!1});function Pn(){return R.useContext(Nn)}var{workers:Fn,repos:In,labels:Ln,projects:Rn,...zn}=Ne.fields,Bn=A(zn),Vn=A({...We.fields,repositories:k(Pt)}),Hn={project:We,agent:oe,loop:y,worker:N,repository:vt,settings:Bn},Un=Pe(it(Hn)),Wn=P(Un),Gn=(e,t)=>{if(!Wn(e.kind))return Ot(new j({file:M.make(e.key),stage:`schema`,expression:Be(),message:`Use the text editor for this configuration entity.`}));let n=Hn[e.kind];return Ft(n)(t,{onExcessProperty:`error`,errors:`all`}).pipe(mt(t),st(t=>j.fromSchema(M.make(e.key),t)))},Kn=(e,t)=>{let n=M.make(e.key);return e.kind===`loop`?At(M.make(`loops/${e.identifier}.md`),t).pipe(kt(Ve(y)),ot(e=>Ft(Ke)(e)),tt(`SchemaError`,e=>Ot(j.fromSchema(n,e)))):e.kind===`agent`?$e(M.make(`agents/${e.identifier}.md`),t).pipe(kt(Ve(oe)),ot(e=>Ft(Ke)(e)),tt(`SchemaError`,e=>Ot(j.fromSchema(n,e)))):rt(n,t).pipe(ot(e=>Ft(Ke)(e.toJS())),tt(`SchemaError`,e=>Ot(j.fromSchema(n,e))),ot(t=>{if(e.kind===`project`)return Ft(Vn)(t,{onExcessProperty:`error`,errors:`all`}).pipe(mt(t),st(e=>j.fromSchema(n,e)));if(e.kind===`repository`){let{lanes:n,...r}=t;return Gn(e,r)}return Gn(e,t)}))},qn=(e,t)=>new Ie({kind:e,identifier:Xe.make(t)}),Jn=({kind:e,identifier:t})=>{switch(e){case`settings`:return`/configuration/settings`;case`repository`:return`/configuration/repositories/${t.split(`/`).map(encodeURIComponent).join(`/`)}`;default:return`/configuration/${e}s/${encodeURIComponent(t)}`}},Yn=(e,t)=>{let n=e.identifier;switch(e.kind){case`agent`:return t.agents.find(({name:e})=>e===n)?.loops.map(e=>`loop ${e}`)??[];case`loop`:return t.loops.find(({name:e})=>e===n)?.repositories.map(e=>`project ${e}`)??[];case`project`:return t.loops.filter(({name:e})=>e.startsWith(`${n}/`)).map(({name:e})=>`loop ${e}`);case`repository`:return t.loops.filter(({repositories:e})=>e.some(e=>e===n)).map(({name:e})=>`loop ${e}`);case`label`:return t.repositories.filter(({declaredLabels:e})=>e.some(({name:e})=>e===n)).map(({name:e})=>`project ${e}`);case`worker`:return t.repositories.map(({name:e})=>`project ${e}`);case`settings`:return t.repositories.map(({name:e})=>`project ${e}`)}},Xn=(e,t,n)=>{switch(e){case`agent`:return`---
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{A as r,I as i,M as a,O as o,a as s,c,d as l,f as u,h as d,i as f,l as p,m,n as h,o as g,s as ee,u as te,x as _,y as ne}from"./queryOptions-Bavh4JFe.js";import{n as v,t as re}from"./use-project-links-CdgpfpoU.js";import{a as ie,c as ae,f as oe,i as se,n as ce,o as le,p as y,r as ue,s as b,t as de,u as x}from"./queries-Bhp4FeLT.js";import{n as fe}from"./useNavigate-I5E4IRt2.js";import{t as pe}from"./link-3oQYoIpm.js";import{c as me,f as S,i as C,l as he,o as ge}from"./mark-lp0qzo_h.js";import{c as w,s as T,t as E}from"./code-block-d5zwBZo-.js";import{t as D}from"./native-select-BCc0nbNt.js";import{M as _e,W as ve,b as ye,h as be,m as xe,p as Se,r as Ce,s as we,t as O,u as Te,v as Ee,y as De}from"./button-CzVqBv_O.js";import{t as Oe}from"./X.es-DOdg41RP.js";import{_ as ke,a as Ae,t as je,w as Me}from"./useValueChanged-CnAH0RHB.js";import{A as Ne,At as Pe,Bt as Fe,C as Ie,Ct as k,D as Le,Dt as Re,F as ze,Fn as Be,Ft as A,Ht as Ve,I as j,L as M,Ln as He,M as N,Mt as Ue,N as We,O as Ge,Ot as Ke,P as qe,Pn as Je,Pt as Ye,S as Xe,Sn as Ze,Wt as P,Y as Qe,_ as $e,a as et,an as tt,at as nt,b as rt,bn as it,bt as at,cn as ot,dn as st,dt as ct,en as lt,fn as ut,ft as dt,ht as ft,i as pt,in as mt,it as ht,j as gt,jn as _t,k as vt,kn as yt,l as bt,mn as xt,n as St,nn as Ct,o as wt,ot as Tt,pt as Et,r as Dt,sn as Ot,un as kt,v as At,vt as jt,xn as Mt,y as Nt,yt as Pt,zt as Ft}from"./api-D3RWLycx.js";import{i as It,t as Lt}from"./page-BEpkTOW0.js";import{t as F}from"./error-alert-Bq-SD6of.js";import{i as Rt,o as zt,r as Bt,t as Vt}from"./empty-Cu_oAz6O.js";import{t as Ht}from"./useControlled-CiSbwZN5.js";import{n as Ut}from"./queries-C_qC_nGu.js";import{$ as Wt,E as I,Q as Gt,R as Kt,X as qt,Y as Jt,Z as Yt,dt as Xt,et as Zt,it as Qt,nt as $t,rt as en,tt as tn}from"./index-B_6qmKij.js";import{r as nn}from"./status-badge-B2-vzEoZ.js";import{t as L}from"./label-DcQGgkXe.js";import{t as rn}from"./markdown-DQ2LWxl6.js";import{n as an,o as on,r as sn,t as cn}from"./table-CKp2wE4u.js";import{t as ln}from"./fill-cell-BtM3J7oO.js";import{a as un,c as dn,g as fn,h as pn,i as mn,l as hn,m as gn,n as _n,o as vn,r as yn,t as bn,u as xn}from"./sortable.esm-D-1SvrpE.js";import{t as Sn}from"./label-badge-cRUT7_pk.js";var Cn=class extends u{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,f=o&&c===`backward`,p=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:m(t,n.data),hasPreviousPage:d(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:f,isFetchingPreviousPage:p,isRefetchError:s&&!l&&!f,isRefetching:a&&!u&&!p}}};function wn(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}var Tn=class extends _{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,ne.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,o=n.some((t,n)=>t!==e[n]),s=i||o,c=s?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!a(e,n)});(s||c)&&(s&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(s&&(wn(e,n).forEach(e=>{e.destroy()}),wn(n,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){let n=new Set;return t.map((r,i)=>{let a=e[i];return r.defaultedQueryOptions.notifyOnChangeProps?a:r.observer.trackResult(a,e=>{n.has(e)||(n.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#d(e,t,n){if(t){let i=this.#c,a=n!==void 0&&i!==void 0&&(i.length!==n.length||n.some((e,t)=>e!==i[t]));return(this.#t!==this.#s||a||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=r(this.#a,t(e))),this.#a}return e}#f(){return!this.#r?.combine||this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new u(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=this.#t.slice(),this.#t[n]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#f(),t=this.#a,n=e?t:this.#d(this.#u(this.#t,this.#l),this.#r?.combine);(e||t!==n)&&ne.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},R=e(t(),1);function En({queries:e,...t},n){let r=i(n),a=l(),d=te(),m=t.subscribed!==!1,h=R.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=a?`isRestoring`:m?`optimistic`:void 0,t}),[e,r,a,m]);h.forEach(e=>{f(e);let t=r.getQueryCache().get(e.queryHash);ee(e,d,t)}),p(d);let[_]=R.useState(()=>new Tn(r,h,t)),[v,re,ie]=_.getOptimisticResult(h,t.combine),ae=!a&&m;R.useSyncExternalStore(R.useCallback(e=>ae?_.subscribe(ne.batchCalls(e)):o,[_,ae]),()=>_.getCurrentResult(),()=>_.getCurrentResult()),R.useEffect(()=>{_.setQueries(h,t)},[h,t,_]);let oe=v.some((e,t)=>g(h[t],e))?v.flatMap((e,t)=>{let n=h[t];if(n&&g(n,e)){let e=new u(r,n);return s(n,e,d)}return[]}):[];if(oe.length>0)throw Promise.all(oe);let se=v.find((e,t)=>{let n=h[t];return n&&c({result:e,errorResetBoundary:d,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(se)throw se.error;return re(ie())}function Dn(e,t){return h(e,Cn,t)}var On=new Map([[`bold`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z`}))],[`duotone`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M208,32V224a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V32A16,16,0,0,1,64,16H192A16,16,0,0,1,208,32Z`,opacity:`0.2`}),R.createElement(`path`,{d:`M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z`}))],[`fill`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M192,16H64A16,16,0,0,0,48,32V224a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V32A16,16,0,0,0,192,16ZM100,200a12,12,0,1,1,12-12A12,12,0,0,1,100,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,80Zm56,120a12,12,0,1,1,12-12A12,12,0,0,1,156,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,80Z`}))],[`light`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M102,60A10,10,0,1,1,92,50,10,10,0,0,1,102,60Zm62,10a10,10,0,1,0-10-10A10,10,0,0,0,164,70ZM92,118a10,10,0,1,0,10,10A10,10,0,0,0,92,118Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,118ZM92,186a10,10,0,1,0,10,10A10,10,0,0,0,92,186Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,186Z`}))],[`regular`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z`}))],[`thin`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M100,60a8,8,0,1,1-8-8A8,8,0,0,1,100,60Zm64,8a8,8,0,1,0-8-8A8,8,0,0,0,164,68ZM92,120a8,8,0,1,0,8,8A8,8,0,0,0,92,120Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,120ZM92,188a8,8,0,1,0,8,8A8,8,0,0,0,92,188Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,188Z`}))]]),kn=R.forwardRef((e,t)=>R.createElement(ve,{ref:t,...e,weights:On}));kn.displayName=`DotsSixVerticalIcon`;function An(e,t,n,r=!0,i,a){let[o,s]=R.useState(),c=Ae(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return ye(()=>{let i=e||t||l||!r?void 0:jn(n.current,c);o!==i&&s(i)}),u}function jn(e,t){let n=Mn(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Mn(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var z=n(),Nn=R.createContext({disabled:!1});function Pn(){return R.useContext(Nn)}var{workers:Fn,repos:In,labels:Ln,projects:Rn,...zn}=Ne.fields,Bn=A(zn),Vn=A({...We.fields,repositories:k(Pt)}),Hn={project:We,agent:oe,loop:y,worker:N,repository:vt,settings:Bn},Un=Pe(it(Hn)),Wn=P(Un),Gn=(e,t)=>{if(!Wn(e.kind))return Ot(new j({file:M.make(e.key),stage:`schema`,expression:Be(),message:`Use the text editor for this configuration entity.`}));let n=Hn[e.kind];return Ft(n)(t,{onExcessProperty:`error`,errors:`all`}).pipe(mt(t),st(t=>j.fromSchema(M.make(e.key),t)))},Kn=(e,t)=>{let n=M.make(e.key);return e.kind===`loop`?At(M.make(`loops/${e.identifier}.md`),t).pipe(kt(Ve(y)),ot(e=>Ft(Ke)(e)),tt(`SchemaError`,e=>Ot(j.fromSchema(n,e)))):e.kind===`agent`?$e(M.make(`agents/${e.identifier}.md`),t).pipe(kt(Ve(oe)),ot(e=>Ft(Ke)(e)),tt(`SchemaError`,e=>Ot(j.fromSchema(n,e)))):rt(n,t).pipe(ot(e=>Ft(Ke)(e.toJS())),tt(`SchemaError`,e=>Ot(j.fromSchema(n,e))),ot(t=>{if(e.kind===`project`)return Ft(Vn)(t,{onExcessProperty:`error`,errors:`all`}).pipe(mt(t),st(e=>j.fromSchema(n,e)));if(e.kind===`repository`){let{lanes:n,...r}=t;return Gn(e,r)}return Gn(e,t)}))},qn=(e,t)=>new Ie({kind:e,identifier:Xe.make(t)}),Jn=({kind:e,identifier:t})=>{switch(e){case`settings`:return`/configuration/settings`;case`repository`:return`/configuration/repositories/${t.split(`/`).map(encodeURIComponent).join(`/`)}`;default:return`/configuration/${e}s/${encodeURIComponent(t)}`}},Yn=(e,t)=>{let n=e.identifier;switch(e.kind){case`agent`:return t.agents.find(({name:e})=>e===n)?.loops.map(e=>`loop ${e}`)??[];case`loop`:return t.loops.find(({name:e})=>e===n)?.repositories.map(e=>`project ${e}`)??[];case`project`:return t.loops.filter(({name:e})=>e.startsWith(`${n}/`)).map(({name:e})=>`loop ${e}`);case`repository`:return t.loops.filter(({repositories:e})=>e.some(e=>e===n)).map(({name:e})=>`loop ${e}`);case`label`:return t.repositories.filter(({declaredLabels:e})=>e.some(({name:e})=>e===n)).map(({name:e})=>`project ${e}`);case`worker`:return t.repositories.map(({name:e})=>`project ${e}`);case`settings`:return t.repositories.map(({name:e})=>`project ${e}`)}},Xn=(e,t,n)=>{switch(e){case`agent`:return`---
2
2
  harness: codex
3
3
  model: gpt-6-astra
4
4
  effort: medium
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./use-project-links-C3F9c85T.js";import{n}from"./useNavigate-I5E4IRt2.js";import{t as r}from"./link-3oQYoIpm.js";import{r as i}from"./button-CzVqBv_O.js";import{o as a}from"./table-CKp2wE4u.js";var o=e(),s=({id:e,title:t,count:n,countTone:r=`muted`,note:a,actions:s,children:c})=>(0,o.jsxs)(`section`,{"aria-labelledby":e,className:`flex min-w-0 flex-col gap-2`,children:[(0,o.jsxs)(`header`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5`,children:[(0,o.jsx)(`h2`,{id:e,className:`text-lg font-semibold`,children:t}),n!==void 0&&n>0&&(0,o.jsx)(`span`,{className:i(`text-sm tabular-nums`,r===`needs-you`?`text-needs-you`:`text-muted-foreground`),children:n}),a!==void 0&&(0,o.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground tabular-nums`,children:a}),s!==void 0&&(0,o.jsx)(`div`,{className:i(`self-center`,a===void 0&&`ml-auto`),children:s})]}),c]}),c=({children:e})=>(0,o.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e}),l=({run:e,children:n})=>{let i=t();return(0,o.jsx)(r,{...i.run(e.repository,e.id),onClick:e=>e.stopPropagation(),className:`block min-w-0 rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,children:n})},u=({run:e,className:r,children:s})=>{let c=t(),l=n();return(0,o.jsx)(a,{className:i(e===null?`hover:bg-transparent`:`cursor-pointer hover:bg-muted/60 has-[a:focus-visible]:bg-muted/60`,r),onClick:e===null?void 0:t=>{t.target instanceof Element&&t.target.closest(`a, button`)!==null||l({...c.run(e.repository,e.id)})},children:s})};export{u as i,c as n,l as r,s as t};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./use-project-links-CdgpfpoU.js";import{n}from"./useNavigate-I5E4IRt2.js";import{t as r}from"./link-3oQYoIpm.js";import{r as i}from"./button-CzVqBv_O.js";import{o as a}from"./table-CKp2wE4u.js";var o=e(),s=({id:e,title:t,count:n,countTone:r=`muted`,note:a,actions:s,children:c})=>(0,o.jsxs)(`section`,{"aria-labelledby":e,className:`flex min-w-0 flex-col gap-2`,children:[(0,o.jsxs)(`header`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5`,children:[(0,o.jsx)(`h2`,{id:e,className:`text-lg font-semibold`,children:t}),n!==void 0&&n>0&&(0,o.jsx)(`span`,{className:i(`text-sm tabular-nums`,r===`needs-you`?`text-needs-you`:`text-muted-foreground`),children:n}),a!==void 0&&(0,o.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground tabular-nums`,children:a}),s!==void 0&&(0,o.jsx)(`div`,{className:i(`self-center`,a===void 0&&`ml-auto`),children:s})]}),c]}),c=({children:e})=>(0,o.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e}),l=({run:e,children:n})=>{let i=t();return(0,o.jsx)(r,{...i.run(e.repository,e.id),onClick:e=>e.stopPropagation(),className:`block min-w-0 rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,children:n})},u=({run:e,className:r,children:s})=>{let c=t(),l=n();return(0,o.jsx)(a,{className:i(e===null?`hover:bg-transparent`:`cursor-pointer hover:bg-muted/60 has-[a:focus-visible]:bg-muted/60`,r),onClick:e===null?void 0:t=>{t.target instanceof Element&&t.target.closest(`a, button`)!==null||l({...c.run(e.repository,e.id)})},children:s})};export{u as i,c as n,l as r,s as t};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{I as t}from"./queryOptions-Bavh4JFe.js";import{F as n,G as r,H as i,J as a,L as o,M as s,P as c,R as l,U as u,V as d,W as f,Z as p,q as m,t as h}from"./section-Du_ZZiFG.js";import{o as g}from"./queries-CKjxlPEk.js";import{t as _}from"./useSuspenseQuery-ajaZl96Y.js";import{l as v}from"./queries-Cvt0xQVN.js";import{Fn as y,n as b,s as x,t as S}from"./api-CoJQoiOc.js";import{n as C}from"./queries-D5TGw8Nr.js";import{E as w}from"./index-BGr-Cg-z.js";var T=e(),E=e=>/-next\.\d+\.g([0-9a-f]{7,40})$/u.exec(e)?.[1]??`@usine/server@${e}`,D=()=>{let{data:e}=_(v()),a=t(),p=g({mutationFn:e=>S(t=>t.requestUpgrade({payload:new x({timing:e,version:y()})})),onSuccess:()=>a.invalidateQueries(v())}),h=e.phase===`waiting`||e.phase===`installing`,C=e.available===null?null:`https://github.com/basaltbytes/usine/compare/${encodeURIComponent(E(e.running))}...${encodeURIComponent(E(e.available))}`;return(0,T.jsxs)(`section`,{className:`flex flex-col gap-3`,"aria-labelledby":`upgrades-title`,children:[(0,T.jsx)(`h2`,{id:`upgrades-title`,className:`text-md font-semibold`,children:m}),(0,T.jsxs)(`dl`,{className:`grid gap-x-6 gap-y-2 border-y py-3 sm:grid-cols-[16rem_minmax(0,1fr)]`,children:[(0,T.jsx)(`dt`,{className:`text-muted-foreground`,children:u}),(0,T.jsx)(`dd`,{className:`font-mono text-xs`,children:e.running}),(0,T.jsx)(`dt`,{className:`text-muted-foreground`,children:c}),(0,T.jsx)(`dd`,{children:e.channel}),(0,T.jsx)(`dt`,{className:`text-muted-foreground`,children:l}),(0,T.jsx)(`dd`,{children:e.mode})]}),e.supported?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`p`,{role:`status`,children:e.phase===`waiting`?r:e.phase===`installing`?o:e.mode===`off`?d:e.available===null?n:s(e.available)}),C!==null&&(0,T.jsx)(`a`,{href:C,target:`_blank`,rel:`noreferrer`,className:`w-fit text-primary underline underline-offset-4`,children:`View changes`}),e.available!==null&&!h&&e.phase!==`failed`&&(0,T.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:gap-8`,children:[(0,T.jsxs)(`div`,{className:`flex max-w-sm flex-col items-start gap-2`,children:[(0,T.jsx)(w,{command:`Upgrade when idle`,disabled:p.isPending,onClick:()=>p.mutate(`idle`),children:`Upgrade when idle`}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Wait for running attempts to finish. No new attempt starts while waiting.`})]}),(0,T.jsxs)(`div`,{className:`flex max-w-sm flex-col items-start gap-2`,children:[(0,T.jsx)(w,{command:`Upgrade now`,variant:`outline`,disabled:p.isPending,onClick:()=>p.mutate(`now`),children:`Upgrade now`}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Restart now. Running attempts reattach after the server restarts.`})]})]})]}):(0,T.jsx)(`p`,{className:`text-muted-foreground`,children:f}),e.outcome?.status===`rolled-back`&&(0,T.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:i(e.outcome.previous,e.outcome.target,e.outcome.reason)}),e.outcome?.status===`failed`&&(0,T.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:e.outcome.reason}),e.message!==null&&(0,T.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:e.message}),p.isError&&(0,T.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:b(p.error)})]})},O=e=>(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:e}),k=e=>(0,T.jsx)(`code`,{className:`font-mono text-xs`,children:e}),A=e=>[[`Polling`,[{key:`settings.poll_interval`,value:k(e.pollInterval),effect:`Seconds between the starts of two GitHub poll cycles.`}]],[`Attempts`,[{key:`settings.max_children`,value:k(e.maxChildren),effect:`Maximum child sessions per attempt. Starting one more fails the attempt.`},{key:`settings.max_attempt_minutes`,value:e.maxAttemptMinutes===null?O(`Not set`):k(e.maxAttemptMinutes),effect:e.maxAttemptMinutes===null?`No wall-clock ceiling.`:`Minutes an attempt may run before the runaway guard fails it.`},{key:`settings.max_attempt_tokens`,value:e.maxAttemptTokens===null?O(`Not set`):k(e.maxAttemptTokens),effect:e.maxAttemptTokens===null?`No token ceiling.`:`Tokens an attempt may use, parent and children combined, before the runaway guard fails it.`}]],[`Parent`,[{key:`settings.parent_model`,value:e.parentModel===null?O(`Not set`):k(e.parentModel),effect:e.parentModel===null?`Chosen by Pi unless the agent file sets parent_model.`:`Parent model when the agent file sets no parent_model.`},{key:`settings.parent_effort`,value:e.parentEffort===null?O(`Not set`):k(e.parentEffort),effect:e.parentEffort===null?`parent_effort from the agent file, or effort if it is not set.`:`Parent effort when the agent file sets no parent_effort.`}]],[`Operator`,[{key:`operator`,value:e.operator===null?O(`Not set`):k(e.operator),effect:e.operator===null?`Approvals from the UI record no approver; messages show as local operator.`:`The GitHub login recorded on approvals and messages from the UI, and the only login that can answer an ask on GitHub.`}]],[`Webhooks`,[{key:`webhooks.mode`,value:k(e.webhooks),effect:a.mode[e.webhooks]},{key:a.lastHint,value:e.lastHintAt===null?O(a.never):(0,T.jsx)(`time`,{dateTime:e.lastHintAt,children:e.lastHintAt}),effect:a.hintEffect},...e.webhooksPublicUrl===null?[]:[{key:`webhooks.public_url`,value:k(e.webhooksPublicUrl),effect:`The full public webhook URL, including /webhooks/github.`}]]],[`Tracing`,e.tracing===null?[{key:`tracing.otlp_url`,value:O(`Not set`),effect:`No span export. A change applies after usine up restarts.`}]:[{key:`tracing.otlp_url`,value:k(e.tracing.otlpUrl),effect:`Collector endpoint that receives every span as OTLP/HTTP protobuf. A change applies after usine up restarts.`},{key:`tracing.service_name`,value:k(e.tracing.serviceName),effect:`The service.name resource attribute of every exported span.`}]]],j=({configuration:e,children:t})=>(0,T.jsx)(h,{entity:p(`settings`,`instance`),title:`Settings`,children:(0,T.jsxs)(`div`,{className:`flex max-w-4xl flex-col gap-8 pt-2`,children:[t,A(e.settings).map(([e,t])=>(0,T.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,T.jsx)(`h2`,{className:`text-md font-semibold`,children:e}),(0,T.jsx)(`dl`,{className:`border-t`,children:t.map(({key:e,value:t,effect:n})=>(0,T.jsxs)(`div`,{className:`grid gap-x-6 gap-y-1 border-b py-3 sm:grid-cols-[16rem_minmax(0,1fr)]`,children:[(0,T.jsx)(`dt`,{className:`font-mono text-xs leading-5 text-muted-foreground`,children:e}),(0,T.jsxs)(`dd`,{className:`flex flex-col gap-0.5 wrap-anywhere`,children:[(0,T.jsx)(`span`,{children:t}),(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n})]})]},e))})]},e))]})}),M=()=>{let{data:e}=_(C());return(0,T.jsx)(j,{configuration:e,children:(0,T.jsx)(D,{})})};export{M as component};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{I as t}from"./queryOptions-Bavh4JFe.js";import{F as n,G as r,H as i,J as a,L as o,M as s,P as c,R as l,U as u,V as d,W as f,Z as p,q as m,t as h}from"./section-Db-f1liW.js";import{o as g}from"./queries-CU77zJnf.js";import{t as _}from"./useSuspenseQuery-ajaZl96Y.js";import{l as v}from"./queries-Bhp4FeLT.js";import{Fn as y,n as b,s as x,t as S}from"./api-D3RWLycx.js";import{n as C}from"./queries-C_qC_nGu.js";import{E as w}from"./index-B_6qmKij.js";var T=e(),E=e=>/-next\.\d+\.g([0-9a-f]{7,40})$/u.exec(e)?.[1]??`@usine/server@${e}`,D=()=>{let{data:e}=_(v()),a=t(),p=g({mutationFn:e=>S(t=>t.requestUpgrade({payload:new x({timing:e,version:y()})})),onSuccess:()=>a.invalidateQueries(v())}),h=e.phase===`waiting`||e.phase===`installing`,C=e.available===null?null:`https://github.com/basaltbytes/usine/compare/${encodeURIComponent(E(e.running))}...${encodeURIComponent(E(e.available))}`;return(0,T.jsxs)(`section`,{className:`flex flex-col gap-3`,"aria-labelledby":`upgrades-title`,children:[(0,T.jsx)(`h2`,{id:`upgrades-title`,className:`text-md font-semibold`,children:m}),(0,T.jsxs)(`dl`,{className:`grid gap-x-6 gap-y-2 border-y py-3 sm:grid-cols-[16rem_minmax(0,1fr)]`,children:[(0,T.jsx)(`dt`,{className:`text-muted-foreground`,children:u}),(0,T.jsx)(`dd`,{className:`font-mono text-xs`,children:e.running}),(0,T.jsx)(`dt`,{className:`text-muted-foreground`,children:c}),(0,T.jsx)(`dd`,{children:e.channel}),(0,T.jsx)(`dt`,{className:`text-muted-foreground`,children:l}),(0,T.jsx)(`dd`,{children:e.mode})]}),e.supported?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`p`,{role:`status`,children:e.phase===`waiting`?r:e.phase===`installing`?o:e.mode===`off`?d:e.available===null?n:s(e.available)}),C!==null&&(0,T.jsx)(`a`,{href:C,target:`_blank`,rel:`noreferrer`,className:`w-fit text-primary underline underline-offset-4`,children:`View changes`}),e.available!==null&&!h&&e.phase!==`failed`&&(0,T.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:gap-8`,children:[(0,T.jsxs)(`div`,{className:`flex max-w-sm flex-col items-start gap-2`,children:[(0,T.jsx)(w,{command:`Upgrade when idle`,disabled:p.isPending,onClick:()=>p.mutate(`idle`),children:`Upgrade when idle`}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Wait for running attempts to finish. No new attempt starts while waiting.`})]}),(0,T.jsxs)(`div`,{className:`flex max-w-sm flex-col items-start gap-2`,children:[(0,T.jsx)(w,{command:`Upgrade now`,variant:`outline`,disabled:p.isPending,onClick:()=>p.mutate(`now`),children:`Upgrade now`}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Restart now. Running attempts reattach after the server restarts.`})]})]})]}):(0,T.jsx)(`p`,{className:`text-muted-foreground`,children:f}),e.outcome?.status===`rolled-back`&&(0,T.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:i(e.outcome.previous,e.outcome.target,e.outcome.reason)}),e.outcome?.status===`failed`&&(0,T.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:e.outcome.reason}),e.message!==null&&(0,T.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:e.message}),p.isError&&(0,T.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:b(p.error)})]})},O=e=>(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:e}),k=e=>(0,T.jsx)(`code`,{className:`font-mono text-xs`,children:e}),A=e=>[[`Polling`,[{key:`settings.poll_interval`,value:k(e.pollInterval),effect:`Seconds between the starts of two GitHub poll cycles.`}]],[`Attempts`,[{key:`settings.max_children`,value:k(e.maxChildren),effect:`Maximum child sessions per attempt. Starting one more fails the attempt.`},{key:`settings.max_attempt_minutes`,value:e.maxAttemptMinutes===null?O(`Not set`):k(e.maxAttemptMinutes),effect:e.maxAttemptMinutes===null?`No wall-clock ceiling.`:`Minutes an attempt may run before the runaway guard fails it.`},{key:`settings.max_attempt_tokens`,value:e.maxAttemptTokens===null?O(`Not set`):k(e.maxAttemptTokens),effect:e.maxAttemptTokens===null?`No token ceiling.`:`Tokens an attempt may use, parent and children combined, before the runaway guard fails it.`}]],[`Parent`,[{key:`settings.parent_model`,value:e.parentModel===null?O(`Not set`):k(e.parentModel),effect:e.parentModel===null?`Chosen by Pi unless the agent file sets parent_model.`:`Parent model when the agent file sets no parent_model.`},{key:`settings.parent_effort`,value:e.parentEffort===null?O(`Not set`):k(e.parentEffort),effect:e.parentEffort===null?`parent_effort from the agent file, or effort if it is not set.`:`Parent effort when the agent file sets no parent_effort.`}]],[`Operator`,[{key:`operator`,value:e.operator===null?O(`Not set`):k(e.operator),effect:e.operator===null?`Approvals from the UI record no approver; messages show as local operator.`:`The GitHub login recorded on approvals and messages from the UI, and the only login that can answer an ask on GitHub.`}]],[`Webhooks`,[{key:`webhooks.mode`,value:k(e.webhooks),effect:a.mode[e.webhooks]},{key:a.lastHint,value:e.lastHintAt===null?O(a.never):(0,T.jsx)(`time`,{dateTime:e.lastHintAt,children:e.lastHintAt}),effect:a.hintEffect},...e.webhooksPublicUrl===null?[]:[{key:`webhooks.public_url`,value:k(e.webhooksPublicUrl),effect:`The full public webhook URL, including /webhooks/github.`}]]],[`Tracing`,e.tracing===null?[{key:`tracing.otlp_url`,value:O(`Not set`),effect:`No span export. A change applies after usine up restarts.`}]:[{key:`tracing.otlp_url`,value:k(e.tracing.otlpUrl),effect:`Collector endpoint that receives every span as OTLP/HTTP protobuf. A change applies after usine up restarts.`},{key:`tracing.service_name`,value:k(e.tracing.serviceName),effect:`The service.name resource attribute of every exported span.`}]]],j=({configuration:e,children:t})=>(0,T.jsx)(h,{entity:p(`settings`,`instance`),title:`Settings`,children:(0,T.jsxs)(`div`,{className:`flex max-w-4xl flex-col gap-8 pt-2`,children:[t,A(e.settings).map(([e,t])=>(0,T.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,T.jsx)(`h2`,{className:`text-md font-semibold`,children:e}),(0,T.jsx)(`dl`,{className:`border-t`,children:t.map(({key:e,value:t,effect:n})=>(0,T.jsxs)(`div`,{className:`grid gap-x-6 gap-y-1 border-b py-3 sm:grid-cols-[16rem_minmax(0,1fr)]`,children:[(0,T.jsx)(`dt`,{className:`font-mono text-xs leading-5 text-muted-foreground`,children:e}),(0,T.jsxs)(`dd`,{className:`flex flex-col gap-0.5 wrap-anywhere`,children:[(0,T.jsx)(`span`,{children:t}),(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n})]})]},e))})]},e))]})}),M=()=>{let{data:e}=_(C());return(0,T.jsx)(j,{configuration:e,children:(0,T.jsx)(D,{})})};export{M as component};
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./useSuspenseQuery-ajaZl96Y.js";import{t as i}from"./button-CzVqBv_O.js";import{Ft as a,_t as o,n as s,wt as c}from"./api-CoJQoiOc.js";import{t as l}from"./error-alert-Bq-SD6of.js";import{m as u,p as d}from"./index-BGr-Cg-z.js";var f=e(t(),1),p=`Sign in to usine`,m=`Run usine sign-in-link in the instance folder to get a one-time sign-in link.`,h=`Signing in…`,g=n(),_=({error:e})=>{let{data:t}=r(u()),[n,d]=(0,f.useState)(e),[_,v]=(0,f.useState)(!1);return(0,f.useEffect)(()=>{let e=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(`link`);e!==null&&(window.history.replaceState(null,``,window.location.pathname),d(void 0),v(!0),o(`/api/auth/link/consume`,a({ok:c,bootstrap:c}),{method:`POST`,body:{token:e}}).then(e=>window.location.replace(e.bootstrap&&t.github?`/api/auth/github`:`/`),e=>{d(s(e)),v(!1)}))};return e(),window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[t.github]),(0,g.jsx)(`main`,{className:`flex min-h-svh items-center justify-center bg-background p-6`,children:(0,g.jsxs)(`section`,{className:`w-full max-w-sm space-y-6`,"aria-labelledby":`sign-in-title`,children:[(0,g.jsx)(`h1`,{id:`sign-in-title`,className:`text-xl font-semibold`,children:p}),n!==void 0&&(0,g.jsx)(l,{message:n}),_?(0,g.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:h}):(0,g.jsxs)(g.Fragment,{children:[t.github&&(0,g.jsx)(i,{render:(0,g.jsx)(`a`,{href:`/api/auth/github`}),children:`Continue with GitHub`}),(0,g.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:m})]})]})})},v=()=>(0,g.jsx)(_,{error:d.useSearch().error});export{v as component};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./useSuspenseQuery-ajaZl96Y.js";import{t as i}from"./button-CzVqBv_O.js";import{Ft as a,_t as o,n as s,wt as c}from"./api-D3RWLycx.js";import{t as l}from"./error-alert-Bq-SD6of.js";import{m as u,p as d}from"./index-B_6qmKij.js";var f=e(t(),1),p=`Sign in to usine`,m=`Run usine sign-in-link in the instance folder to get a one-time sign-in link.`,h=`Signing in…`,g=n(),_=({error:e})=>{let{data:t}=r(u()),[n,d]=(0,f.useState)(e),[_,v]=(0,f.useState)(!1);return(0,f.useEffect)(()=>{let e=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(`link`);e!==null&&(window.history.replaceState(null,``,window.location.pathname),d(void 0),v(!0),o(`/api/auth/link/consume`,a({ok:c,bootstrap:c}),{method:`POST`,body:{token:e}}).then(e=>window.location.replace(e.bootstrap&&t.github?`/api/auth/github`:`/`),e=>{d(s(e)),v(!1)}))};return e(),window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[t.github]),(0,g.jsx)(`main`,{className:`flex min-h-svh items-center justify-center bg-background p-6`,children:(0,g.jsxs)(`section`,{className:`w-full max-w-sm space-y-6`,"aria-labelledby":`sign-in-title`,children:[(0,g.jsx)(`h1`,{id:`sign-in-title`,className:`text-xl font-semibold`,children:p}),n!==void 0&&(0,g.jsx)(l,{message:n}),_?(0,g.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:h}):(0,g.jsxs)(g.Fragment,{children:[t.github&&(0,g.jsx)(i,{render:(0,g.jsx)(`a`,{href:`/api/auth/github`}),children:`Continue with GitHub`}),(0,g.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:m})]})]})})},v=()=>(0,g.jsx)(_,{error:d.useSearch().error});export{v as component};
@@ -1 +1 @@
1
- import{St as e}from"./api-CoJQoiOc.js";import{t}from"./strings-BIVdGoBr.js";import{D as n,R as r,U as i}from"./overview-CUn9OtUH.js";import{i as a}from"./model-D9QKZ_Hk.js";var o=e=>{let t=e.attempts.at(-1)?.outcome;return t?._tag===`Failed`&&t.failure._tag===`QuestionFailure`},s=({reason:e})=>e._tag===`LoopPaused`,c=({loop:s,reason:c},l)=>e(c,{AwaitingApproval:()=>`Waiting for approval`,SuppressedForOperator:({run:e})=>o(e)?`Question from the agent`:`Blocked by the agent`,CycleBudgetUsedUp:({ask:e})=>`Cycle budget used, ${e.limit} rounds`,RunFailed:({run:e})=>{let r=e.attempts.at(-1)?.outcome,i=r?._tag===`Failed`?`: ${n(r.failure)}`:``;return`Failed ${t(a(e),l)}${i}`},ClosedUnchanged:({run:e})=>`${e.state===`Succeeded`?`Succeeded`:`Canceled`} ${t(a(e),l)}, unchanged since`,LoopPaused:()=>`${s} paused`,WaitingForStop:({run:e,stop:t})=>r(e.id,t),QueuedForWorker:({ahead:e,creating:t,priority:n})=>t===null?[`Waiting for a free worker slot`,...n===null?[]:[`priority ${n}`],...e===null?[]:[e===0?`next in queue`:`behind ${e} ${e===1?`run`:`runs`}`]].join(`, `):i(t,l),AwaitingPoll:()=>`Waiting for the next poll`});export{c as n,s as t};
1
+ import{St as e}from"./api-D3RWLycx.js";import{t}from"./strings-BIVdGoBr.js";import{D as n,R as r,U as i}from"./overview-DLYaCoiG.js";import{i as a}from"./model-C6gErpq3.js";var o=e=>{let t=e.attempts.at(-1)?.outcome;return t?._tag===`Failed`&&t.failure._tag===`QuestionFailure`},s=({reason:e})=>e._tag===`LoopPaused`,c=({loop:s,reason:c},l)=>e(c,{AwaitingApproval:()=>`Waiting for approval`,SuppressedForOperator:({run:e})=>o(e)?`Question from the agent`:`Blocked by the agent`,CycleBudgetUsedUp:({ask:e})=>`Cycle budget used, ${e.limit} rounds`,RunFailed:({run:e})=>{let r=e.attempts.at(-1)?.outcome,i=r?._tag===`Failed`?`: ${n(r.failure)}`:``;return`Failed ${t(a(e),l)}${i}`},ClosedUnchanged:({run:e})=>`${e.state===`Succeeded`?`Succeeded`:`Canceled`} ${t(a(e),l)}, unchanged since`,LoopPaused:()=>`${s} paused`,WaitingForStop:({run:e,stop:t})=>r(e.id,t),QueuedForWorker:({ahead:e,creating:t,priority:n})=>t===null?[`Waiting for a free worker slot`,...n===null?[]:[`priority ${n}`],...e===null?[]:[e===0?`next in queue`:`behind ${e} ${e===1?`run`:`runs`}`]].join(`, `):i(t,l),AwaitingPoll:()=>`Waiting for the next poll`});export{c as n,s as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./route-status-Cxocu6W_.js";var t=e;export{t as errorComponent};
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./useSuspenseQuery-ajaZl96Y.js";import{t as i}from"./link-3oQYoIpm.js";import{i as a,t as o}from"./mark-lp0qzo_h.js";import{P as s,b as c,r as l,s as u,v as d}from"./button-CzVqBv_O.js";import{A as f,D as p,E as m,F as h,I as g,It as _,K as v,L as y,N as b,O as x,Pt as S,T as C,_ as w,b as T,g as E,h as D,m as O,p as k,v as A,x as j,y as M}from"./useScrollLock-BYvLFu8E.js";import{a as N,p as ee,w as te}from"./useValueChanged-CnAH0RHB.js";import{S as ne,_ as re,a as ie,d as ae,f as oe,p as se,v as ce,x as le,y as ue}from"./useTriggerFocusGuards-BEdypEdV.js";import{Ln as de,St as P,bt as F}from"./api-CoJQoiOc.js";import{C as fe,s as pe,t as me,v as he,y as I}from"./strings-BIVdGoBr.js";import{a as ge,i as L,n as _e}from"./overview-CUn9OtUH.js";import{a as ve,i as ye,t as be}from"./page-CmRQu9F2.js";import{t as xe}from"./queries-Cdfj6CtB.js";import{H as Se,R as Ce,Y as we,r as R}from"./index-BGr-Cg-z.js";import{t as Te}from"./pull-request-marks-_FfWkWIz.js";import{n as Ee}from"./status-badge-B2-vzEoZ.js";import{t as De}from"./usage-cNWB4RMb.js";import{a as Oe,i as z,n as ke,o as Ae,r as B,t as je}from"./table-CKp2wE4u.js";import{t as Me}from"./fill-cell-BtM3J7oO.js";import{n as Ne}from"./section-BjpSGYua.js";import{c as Pe,d as Fe,g as Ie,h as Le,i as Re,l as ze,m as Be,p as Ve,r as He,s as Ue,u as We}from"./model-D9QKZ_Hk.js";import{n as Ge,t as Ke}from"./strings-DhGEKt5X.js";import{t as qe}from"./project-not-found-BfK7XtjD.js";import{a as Je,i as Ye,r as Xe}from"./section-CjCP4gvu.js";function V(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function Ze(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function H(e){let t=[],n,r=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of Array.from(e).sort((e,t)=>e.top-t.top)){if(r=Math.min(r,s.left),i=Math.min(i,s.top),a=Math.max(a,s.right),o=Math.max(o,s.bottom),!n||s.top-n.top>n.height/2)t.push(Ze(s));else{let e=t[t.length-1];e.left=Math.min(e.left,s.left),e.right=Math.max(e.right,s.right),e.bottom=Math.max(e.bottom,s.bottom),e.width=e.right-e.left,e.height=e.bottom-e.top}n=s}return{lines:t,fallback:V(r,i,a,o)}}function U(e,t,n){return e.findIndex(e=>t>e.left-2&&t<e.right+2&&n>e.top-2&&n<e.bottom+2)}function W(e){return V(e.left,e.top,e.right,e.bottom)}function Qe(e,t,n){let{lines:r}=H(e.getClientRects());if(r.length<2)return;let i=U(r,t,n);return{x:t,y:n,lineIndex:i===-1?void 0:i,element:e}}function $e(e,t,n){let{lines:r,fallback:i}=H(e.getClientRects());if(r.length<2)return null;let a=n?.x,o=n?.y,s=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return W(r[n.lineIndex]);if(a!=null&&o!=null){let e=U(r,a,o);if(e!==-1)return W(r[e])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&o!=null)return i;if(s===`t`||s===`b`){let e=r[0],t=r[r.length-1],n=s===`t`?e:t;return V(n.left,e.top,n.right,t.bottom)}let c=s===`l`,l=r[0].left,u=r[0].right,d=c?1/0:-1/0,f=r[0],p=r[0];for(let e of r){l=Math.min(l,e.left),u=Math.max(u,e.right);let t=c?e.left:e.right;c&&t<d||!c&&t>d?(d=t,f=e,p=e):t===d&&(p=e)}return V(l,f.top,u,p.bottom)}function et(e){return`contextElement`in e&&e.contextElement?e.contextElement:s(e)?e:void 0}function tt(e,t){function n(t){G(e,t.currentTarget,t.clientX,t.clientY)}function r(e){t||n(e)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function G(e,t,n,r){let i=Qe(t,n,r);return e.current=i,i}function nt(e){return{name:`inline`,async fn(t){let n=t.elements.reference;if(typeof n?.getClientRects!=`function`)return{};let r=et(n),i=e.current,a=i?.element===n||i?.element===r?i:void 0,o=$e(n,t.placement,a);if(!o||typeof t.platform.getElementRects!=`function`)return{};let s=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return o}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===s.reference.x&&t.rects.reference.y===s.reference.y&&t.rects.reference.width===s.reference.width&&t.rects.reference.height===s.reference.height?{}:{reset:{rects:s}}}}}var K=e(t(),1),q=K.createContext(void 0);function J(e){let t=K.useContext(q);if(t===void 0&&!e)throw Error(d(50));return t}var rt={...O,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay},it=class extends D{constructor(e,t,n){let r=new A;super(at(e,r,t,n),ot(r),rt)}setOpen=(e,t)=>{let{inlineRectCoordsRef:n}=this.context;j(this,e,t,{onBeforeDispatch(){let r=t.event;e&&t.reason===`trigger-hover`&&t.trigger&&`clientX`in r&&`clientY`in r&&n.current?.element!==t.trigger&&G(n,t.trigger,r.clientX,r.clientY)}})}};function at(e,t,n,r=!1){return{...k(t,n,r),instantType:void 0,adaptiveOrigin:void 0,closeDelay:300,...e}}function ot(e){return{popupRef:K.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}var Y=n();function st(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:a,handle:o,triggerId:s,defaultTriggerId:l=null,children:u}=e,d=x((e,r)=>new it({open:n,openProp:t,activeTriggerId:l,triggerIdProp:s},e,r));d.useControlledProp(`openProp`,t),d.useControlledProp(`triggerIdProp`,s),d.useContextCallback(`onOpenChange`,r),d.useContextCallback(`onOpenChangeComplete`,i);let f=d.useState(`open`),p=d.useState(`activeTriggerId`),h=d.useState(`mounted`),g=d.useState(`payload`);C(d,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:_}=m(f,d,()=>{d.context.inlineRectCoordsRef.current=void 0});c(()=>{f&&(p??d.set(`payload`,void 0))},[d,p,f]),K.useImperativeHandle(a,()=>({unmount:_,close:()=>d.setOpen(!1,te(ee))}),[_,d]);let v=f||h||o!=null;return(0,Y.jsxs)(q.Provider,{value:d,children:[o&&(0,Y.jsx)(T,{handle:o,store:d}),v&&(0,Y.jsx)(ct,{store:d}),typeof u==`function`?u({payload:g}):u]})}function ct({store:e}){let t=e.useState(`floatingRootContext`),n=b(t);return p(e,{activeTriggerProps:n.reference,inactiveTriggerProps:n.trigger,popupProps:n.floating}),null}var lt=E(function(e){return J(!0)?(0,Y.jsx)(st,{...e}):(0,Y.jsx)(g,{children:(0,Y.jsx)(st,{...e})})}),ut=K.createContext(void 0);function dt(){let e=K.useContext(ut);if(e===void 0)throw Error(d(48));return e}var ft=K.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return J().useState(`mounted`)||n?(0,Y.jsx)(ut.Provider,{value:n,children:(0,Y.jsx)(Se,{ref:t,...r})}):null}),pt=w(function(e,t){let{render:n,className:r,delay:i,closeDelay:a,id:o,payload:s,handle:c,style:l,...p}=e,m=J(!0),h=ne(c)??m;if(!h)throw Error(d(89));let g=N(o),v=h.useState(`isTriggerActive`,g),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`floatingRootContext`),x=h.context.inlineRectCoordsRef,S=K.useRef(null),C=i??600,w=a??300,{registerTrigger:T,isMountedByThisTrigger:E}=f(g,S,h,{payload:s,closeDelay:w}),D=ce(b,{mouseOnly:!0,move:!1,handleClose:re(),delay:()=>({open:C,close:w}),triggerElementRef:S,isActiveTrigger:v,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=le(b,{delay:C}),k={open:y},A=h.useState(`triggerProps`,E),j=tt(x,y);return u(`a`,e,{state:k,ref:[t,T,S],props:[D,O.reference,A,j,{id:g},p],stateAttributesMapping:_})}),mt=K.createContext(void 0);function ht(){let e=K.useContext(mt);if(e===void 0)throw Error(d(49));return e}var gt=K.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:m=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=v,style:b,...x}=e,S=J(),C=dt(),w=y(),T=S.useState(`open`),E=S.useState(`mounted`),D=S.useState(`floatingRootContext`),O=S.useState(`instantType`),k=S.useState(`transitionStatus`),A=S.useState(`adaptiveOrigin`),j=S.context.inlineRectCoordsRef,M=se({anchor:i,floatingRootContext:D,positionMethod:a,mounted:E,side:o,sideOffset:l,align:s,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:g,keepMounted:C,nodeId:w,collisionAvoidance:_,adaptiveOrigin:A,inline:nt(j)}),N=M.update;c(()=>{T&&E&&N()},[T,E,N]);let ee={open:T,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:O},te=ae(e,ee,{styles:M.positionerStyles,transitionStatus:k,props:x,refs:[t,S.useStateSetter(`positionerElement`)],hidden:!E,inert:!T});return(0,Y.jsx)(mt.Provider,{value:M,children:(0,Y.jsx)(h,{id:w,children:te})})}),_t=K.forwardRef(function(e,t){let{className:n,render:r,style:i,...o}=e,s=J(),{side:c,align:l}=ht(),d=s.useState(`open`),f=s.useState(`instantType`),p=s.useState(`transitionStatus`),m=s.useState(`popupProps`),h=s.useState(`floatingRootContext`),g=s.useState(`closeDelay`);return a({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),ue(h,{closeDelay:g}),u(`div`,e,{state:{open:d,side:c,align:l,instant:f,transitionStatus:p},ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],props:[M,m,oe(p),o],stateAttributesMapping:S})});function vt({...e}){return(0,Y.jsx)(lt,{"data-slot":`hover-card`,...e})}function yt({...e}){return(0,Y.jsx)(pt,{"data-slot":`hover-card-trigger`,...e})}function bt({className:e,side:t=`bottom`,sideOffset:n=4,align:r=`center`,alignOffset:i=4,...a}){return(0,Y.jsx)(ft,{"data-slot":`hover-card-portal`,children:(0,Y.jsx)(gt,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,Y.jsx)(_t,{"data-slot":`hover-card-content`,className:l(`z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-xs/relaxed text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}var xt=`relative z-10 rounded-sm underline-offset-4 outline-none hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,St=({usage:e,label:t,note:n,children:r})=>(0,Y.jsxs)(vt,{children:[(0,Y.jsx)(yt,{delay:200,"aria-label":t,render:(0,Y.jsx)(`button`,{type:`button`,className:xt}),children:r}),(0,Y.jsxs)(bt,{align:`end`,className:`w-[26rem] max-w-[calc(100vw-2rem)] p-3 font-sans text-xs shadow-raised`,children:[n!==null&&(0,Y.jsxs)(`p`,{className:`pb-2 text-muted-foreground`,children:[n,`.`]}),(0,Y.jsx)(De,{pools:e.pools})]})]}),X=`hidden @5xl:table-cell`,Z=`hidden @4xl:table-cell`,Q=`@md:w-max @md:max-w-(--side)`,Ct=({reason:e})=>P(e,{AwaitingApproval:()=>`Waiting`,SuppressedForOperator:()=>`needs-you`,CycleBudgetUsedUp:()=>`needs-you`,RunFailed:()=>`Failed`,ClosedUnchanged:({run:e})=>e.state,LoopPaused:()=>`paused`,WaitingForStop:({run:e})=>e.state,QueuedForWorker:({run:e})=>e.state,AwaitingPoll:()=>`Pending`}),wt=({last:e,status:t},n)=>{let r=Re(e),i=t=>({state:Ct(t),words:`${e.loop!==t.loop&&!Ke(t)?`${t.loop} `:``}${Ge(t,n)}`,at:null});return P(t,{Running:({run:e})=>({state:`Running`,words:`Running ${e.loop}`,at:r}),AwaitingApproval:()=>({state:`Waiting`,words:`Waiting for approval`,at:r}),Queued:({run:e})=>({state:e.state,words:e.state,at:r}),Stalled:({stall:e})=>i(e),Idle:({stall:e})=>i(e),NeedsAttention:()=>({state:`needs-you`,words:`Needs attention`,at:r}),Done:()=>({state:`Done`,words:`Done`,at:r}),Ended:({run:e})=>({state:e.state,words:e.state,at:r})})},Tt=({row:e,now:t})=>{let{state:n,words:r,at:i}=wt(e,t);return(0,Y.jsxs)(`span`,{className:l(`flex items-start gap-1.5 text-xs/5 font-medium`,Q),children:[n===`Done`?(0,Y.jsx)(o,{item:e.task,linked:!1,numbered:!1,className:`mt-0.75`}):(0,Y.jsx)(Ee,{state:n,className:`mt-1.75 mr-0.5 ml-0.75`}),(0,Y.jsxs)(`span`,{className:`min-w-0 wrap-break-word`,children:[r,i!==null&&(0,Y.jsxs)(Y.Fragment,{children:[` `,(0,Y.jsxs)(`span`,{className:`font-normal whitespace-nowrap text-muted-foreground`,children:[`·`,` `,(0,Y.jsx)(`time`,{dateTime:i,title:he(i),className:`font-mono tabular-nums`,children:me(i,t)})]})]})]})]})},Et=()=>(0,Y.jsx)(`span`,{className:`absolute left-full text-muted-foreground`,children:`*`}),Dt=({usage:e})=>{if(e.cost===null)return null;let t=He(e),n=fe(e.cost.usd);return(0,Y.jsxs)(St,{usage:e,label:`Estimated cost: ${t?`at least `:``}${n}. Show per pool`,note:t?Le:null,children:[n,t&&(0,Y.jsx)(Et,{})]})},Ot=({task:e,now:t})=>{let{usage:n}=e;if(e.runs.every(({attempts:e})=>e.length===0))return null;let r=n.unmeasured>0;return(0,Y.jsxs)(`span`,{className:`relative`,title:r?Ie:`Total attempt time`,children:[pe(Pe(n,t)),r&&(0,Y.jsx)(Et,{})]})},kt=`py-3 align-top whitespace-normal`,$=`py-3 text-right align-top font-mono text-xs/5 whitespace-nowrap tabular-nums`,At=({task:e})=>{let t=ze(e);return(0,Y.jsxs)(`span`,{className:l(`flex items-baseline gap-2`,Q),children:[(0,Y.jsx)(`span`,{className:`truncate`,title:t.map(({loop:e})=>e).join(` · `),children:t.map(({loop:e,state:t},n)=>(0,Y.jsxs)(K.Fragment,{children:[n>0&&(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:` · `}),(0,Y.jsx)(Ee,{state:t,className:`mr-2 ml-0.75 align-middle`}),e,(0,Y.jsxs)(`span`,{className:`sr-only`,children:[` `,t]})]},e))}),(0,Y.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-muted-foreground tabular-nums`,children:e.runs.length})]})},jt=({row:e,repository:t,now:n,project:r,showRepository:a})=>(0,Y.jsxs)(Ae,{className:Xe,children:[(0,Y.jsxs)(Me,{className:`py-3 align-top`,children:[(0,Y.jsx)(i,{"data-row-link":!0,to:`/projects/$project/tasks/$number`,params:{project:r,number:We(e.task)},search:{repository:t},className:l(`block min-w-0`,Ye),children:(0,Y.jsx)(Ce,{variant:`row`,item:de(ie(e.task).origin),title:e.task.title,linked:!1})}),a&&(0,Y.jsxs)(`p`,{className:`mt-1 flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,Y.jsx)(we,{repository:t}),(0,Y.jsx)(`span`,{className:`truncate`,children:t})]})]}),(0,Y.jsx)(B,{className:kt,children:(0,Y.jsx)(Tt,{row:e,now:n})}),(0,Y.jsx)(B,{className:l(`py-3 align-top`,X),children:(0,Y.jsx)(At,{task:e.task})}),(0,Y.jsx)(B,{className:l(`py-3 text-right align-top`,X),children:(0,Y.jsx)(Te,{pullRequests:ie(e.task).pullRequests,className:`relative z-10 justify-end`})}),(0,Y.jsx)(B,{className:$,children:(0,Y.jsx)(Ot,{task:e.task,now:n})}),(0,Y.jsx)(B,{className:l($,Z),children:e.task.usage.pools.length>0&&(0,Y.jsx)(St,{usage:e.task.usage,label:`Tokens: ${I(e.task.usage.tokens)}. Show per pool`,note:null,children:I(e.task.usage.tokens)})}),(0,Y.jsx)(B,{className:l($,Z),children:(0,Y.jsx)(Dt,{usage:e.task.usage})})]}),Mt=({totals:e})=>(0,Y.jsx)(`p`,{className:`-mt-2 text-sm text-muted-foreground tabular-nums`,children:Be(e).map(({figure:e,words:t,lowerBound:n},r)=>(0,Y.jsxs)(K.Fragment,{children:[r>0&&`, `,n===null?e:(0,Y.jsx)(`span`,{title:n,children:`${e}*`}),` `,t]},t))}),Nt=`@md:[--side:clamp(7rem,calc((100cqw-26rem-var(--rest))/var(--sides)),13rem)] [--rest:7rem] [--sides:1] @4xl:[--rest:16.5rem] @5xl:[--rest:23rem] @5xl:[--sides:2]`,Pt=({project:e,stalled:t,repository:n,onRepositoryChange:r})=>{let i=ve(3e4),a=Fe(e.board.lanes,t).filter(e=>n===void 0||F(e.task.repository)===F(n));return(0,Y.jsxs)(be,{width:`full`,children:[(0,Y.jsx)(ye,{title:`Tasks`,counts:Ue(a)}),e.repositories.length>1&&r!==void 0&&(0,Y.jsx)(Je,{repositories:e.repositories,value:n,onChange:r}),a.length===0?(0,Y.jsx)(Ne,{children:`No runs yet`}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Mt,{totals:Ve(a,i)}),(0,Y.jsx)(`div`,{className:`@container -mx-2`,children:(0,Y.jsxs)(je,{"aria-label":`${ge(e)} tasks`,className:Nt,children:[(0,Y.jsx)(Oe,{children:(0,Y.jsxs)(Ae,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(z,{children:`Task`}),(0,Y.jsx)(z,{children:`Status`}),(0,Y.jsx)(z,{className:X,children:`Runs`}),(0,Y.jsx)(z,{className:l(`text-right`,X),children:`Pull request`}),(0,Y.jsx)(z,{className:`text-right`,children:`Elapsed time`}),(0,Y.jsx)(z,{className:l(`text-right`,Z),children:`Tokens`}),(0,Y.jsx)(z,{className:l(`text-right`,Z),children:`Estimated cost`})]})}),(0,Y.jsx)(ke,{children:a.map(t=>(0,Y.jsx)(jt,{row:t,project:L(e),showRepository:e.repositories.length>1,repository:t.task.repository,now:i},t.task.itemKey))})]})})]})]})},Ft=()=>{let{project:e}=R.useParams(),{data:t}=r(_e()),{repository:n}=R.useSearch(),i=R.useNavigate(),a=r(xe()),o=t.projects.find(t=>L(t)===e);return o===void 0?(0,Y.jsx)(qe,{}):(0,Y.jsx)(Pt,{project:o,stalled:a.data.notMoving,repository:n,onRepositoryChange:e=>void i({search:t=>({...t,repository:e})})})};export{Ft as component};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./useSuspenseQuery-ajaZl96Y.js";import{t as i}from"./link-3oQYoIpm.js";import{i as a,t as o}from"./mark-lp0qzo_h.js";import{P as s,b as c,r as l,s as u,v as d}from"./button-CzVqBv_O.js";import{A as f,D as p,E as m,F as h,I as g,It as _,K as v,L as y,N as b,O as x,Pt as S,T as C,_ as w,b as T,g as E,h as D,m as O,p as k,v as A,x as j,y as M}from"./useScrollLock-BYvLFu8E.js";import{a as N,p as ee,w as te}from"./useValueChanged-CnAH0RHB.js";import{S as ne,_ as re,a as ie,d as ae,f as oe,p as se,v as ce,x as le,y as ue}from"./useTriggerFocusGuards-u-Jz4hr2.js";import{Ln as de,St as P,bt as F}from"./api-D3RWLycx.js";import{C as fe,s as pe,t as me,v as he,y as I}from"./strings-BIVdGoBr.js";import{a as ge,i as L,n as _e}from"./overview-DLYaCoiG.js";import{a as ve,i as ye,t as be}from"./page-BEpkTOW0.js";import{t as xe}from"./queries-ESTqS3FK.js";import{H as Se,R as Ce,Y as we,r as R}from"./index-B_6qmKij.js";import{t as Te}from"./pull-request-marks-_FfWkWIz.js";import{n as Ee}from"./status-badge-B2-vzEoZ.js";import{t as De}from"./usage-ZTnmWdRP.js";import{a as Oe,i as z,n as ke,o as Ae,r as B,t as je}from"./table-CKp2wE4u.js";import{t as Me}from"./fill-cell-BtM3J7oO.js";import{n as Ne}from"./section-Wflvjspx.js";import{c as Pe,d as Fe,g as Ie,h as Le,i as Re,l as ze,m as Be,p as Ve,r as He,s as Ue,u as We}from"./model-C6gErpq3.js";import{n as Ge,t as Ke}from"./strings-DmAVtEUC.js";import{t as qe}from"./project-not-found-BfK7XtjD.js";import{a as Je,i as Ye,r as Xe}from"./section-C75aUrac.js";function V(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function Ze(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function H(e){let t=[],n,r=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of Array.from(e).sort((e,t)=>e.top-t.top)){if(r=Math.min(r,s.left),i=Math.min(i,s.top),a=Math.max(a,s.right),o=Math.max(o,s.bottom),!n||s.top-n.top>n.height/2)t.push(Ze(s));else{let e=t[t.length-1];e.left=Math.min(e.left,s.left),e.right=Math.max(e.right,s.right),e.bottom=Math.max(e.bottom,s.bottom),e.width=e.right-e.left,e.height=e.bottom-e.top}n=s}return{lines:t,fallback:V(r,i,a,o)}}function U(e,t,n){return e.findIndex(e=>t>e.left-2&&t<e.right+2&&n>e.top-2&&n<e.bottom+2)}function W(e){return V(e.left,e.top,e.right,e.bottom)}function Qe(e,t,n){let{lines:r}=H(e.getClientRects());if(r.length<2)return;let i=U(r,t,n);return{x:t,y:n,lineIndex:i===-1?void 0:i,element:e}}function $e(e,t,n){let{lines:r,fallback:i}=H(e.getClientRects());if(r.length<2)return null;let a=n?.x,o=n?.y,s=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return W(r[n.lineIndex]);if(a!=null&&o!=null){let e=U(r,a,o);if(e!==-1)return W(r[e])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&o!=null)return i;if(s===`t`||s===`b`){let e=r[0],t=r[r.length-1],n=s===`t`?e:t;return V(n.left,e.top,n.right,t.bottom)}let c=s===`l`,l=r[0].left,u=r[0].right,d=c?1/0:-1/0,f=r[0],p=r[0];for(let e of r){l=Math.min(l,e.left),u=Math.max(u,e.right);let t=c?e.left:e.right;c&&t<d||!c&&t>d?(d=t,f=e,p=e):t===d&&(p=e)}return V(l,f.top,u,p.bottom)}function et(e){return`contextElement`in e&&e.contextElement?e.contextElement:s(e)?e:void 0}function tt(e,t){function n(t){G(e,t.currentTarget,t.clientX,t.clientY)}function r(e){t||n(e)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function G(e,t,n,r){let i=Qe(t,n,r);return e.current=i,i}function nt(e){return{name:`inline`,async fn(t){let n=t.elements.reference;if(typeof n?.getClientRects!=`function`)return{};let r=et(n),i=e.current,a=i?.element===n||i?.element===r?i:void 0,o=$e(n,t.placement,a);if(!o||typeof t.platform.getElementRects!=`function`)return{};let s=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return o}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===s.reference.x&&t.rects.reference.y===s.reference.y&&t.rects.reference.width===s.reference.width&&t.rects.reference.height===s.reference.height?{}:{reset:{rects:s}}}}}var K=e(t(),1),q=K.createContext(void 0);function J(e){let t=K.useContext(q);if(t===void 0&&!e)throw Error(d(50));return t}var rt={...O,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay},it=class extends D{constructor(e,t,n){let r=new A;super(at(e,r,t,n),ot(r),rt)}setOpen=(e,t)=>{let{inlineRectCoordsRef:n}=this.context;j(this,e,t,{onBeforeDispatch(){let r=t.event;e&&t.reason===`trigger-hover`&&t.trigger&&`clientX`in r&&`clientY`in r&&n.current?.element!==t.trigger&&G(n,t.trigger,r.clientX,r.clientY)}})}};function at(e,t,n,r=!1){return{...k(t,n,r),instantType:void 0,adaptiveOrigin:void 0,closeDelay:300,...e}}function ot(e){return{popupRef:K.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}var Y=n();function st(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:a,handle:o,triggerId:s,defaultTriggerId:l=null,children:u}=e,d=x((e,r)=>new it({open:n,openProp:t,activeTriggerId:l,triggerIdProp:s},e,r));d.useControlledProp(`openProp`,t),d.useControlledProp(`triggerIdProp`,s),d.useContextCallback(`onOpenChange`,r),d.useContextCallback(`onOpenChangeComplete`,i);let f=d.useState(`open`),p=d.useState(`activeTriggerId`),h=d.useState(`mounted`),g=d.useState(`payload`);C(d,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:_}=m(f,d,()=>{d.context.inlineRectCoordsRef.current=void 0});c(()=>{f&&(p??d.set(`payload`,void 0))},[d,p,f]),K.useImperativeHandle(a,()=>({unmount:_,close:()=>d.setOpen(!1,te(ee))}),[_,d]);let v=f||h||o!=null;return(0,Y.jsxs)(q.Provider,{value:d,children:[o&&(0,Y.jsx)(T,{handle:o,store:d}),v&&(0,Y.jsx)(ct,{store:d}),typeof u==`function`?u({payload:g}):u]})}function ct({store:e}){let t=e.useState(`floatingRootContext`),n=b(t);return p(e,{activeTriggerProps:n.reference,inactiveTriggerProps:n.trigger,popupProps:n.floating}),null}var lt=E(function(e){return J(!0)?(0,Y.jsx)(st,{...e}):(0,Y.jsx)(g,{children:(0,Y.jsx)(st,{...e})})}),ut=K.createContext(void 0);function dt(){let e=K.useContext(ut);if(e===void 0)throw Error(d(48));return e}var ft=K.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return J().useState(`mounted`)||n?(0,Y.jsx)(ut.Provider,{value:n,children:(0,Y.jsx)(Se,{ref:t,...r})}):null}),pt=w(function(e,t){let{render:n,className:r,delay:i,closeDelay:a,id:o,payload:s,handle:c,style:l,...p}=e,m=J(!0),h=ne(c)??m;if(!h)throw Error(d(89));let g=N(o),v=h.useState(`isTriggerActive`,g),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`floatingRootContext`),x=h.context.inlineRectCoordsRef,S=K.useRef(null),C=i??600,w=a??300,{registerTrigger:T,isMountedByThisTrigger:E}=f(g,S,h,{payload:s,closeDelay:w}),D=ce(b,{mouseOnly:!0,move:!1,handleClose:re(),delay:()=>({open:C,close:w}),triggerElementRef:S,isActiveTrigger:v,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=le(b,{delay:C}),k={open:y},A=h.useState(`triggerProps`,E),j=tt(x,y);return u(`a`,e,{state:k,ref:[t,T,S],props:[D,O.reference,A,j,{id:g},p],stateAttributesMapping:_})}),mt=K.createContext(void 0);function ht(){let e=K.useContext(mt);if(e===void 0)throw Error(d(49));return e}var gt=K.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:m=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=v,style:b,...x}=e,S=J(),C=dt(),w=y(),T=S.useState(`open`),E=S.useState(`mounted`),D=S.useState(`floatingRootContext`),O=S.useState(`instantType`),k=S.useState(`transitionStatus`),A=S.useState(`adaptiveOrigin`),j=S.context.inlineRectCoordsRef,M=se({anchor:i,floatingRootContext:D,positionMethod:a,mounted:E,side:o,sideOffset:l,align:s,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:g,keepMounted:C,nodeId:w,collisionAvoidance:_,adaptiveOrigin:A,inline:nt(j)}),N=M.update;c(()=>{T&&E&&N()},[T,E,N]);let ee={open:T,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:O},te=ae(e,ee,{styles:M.positionerStyles,transitionStatus:k,props:x,refs:[t,S.useStateSetter(`positionerElement`)],hidden:!E,inert:!T});return(0,Y.jsx)(mt.Provider,{value:M,children:(0,Y.jsx)(h,{id:w,children:te})})}),_t=K.forwardRef(function(e,t){let{className:n,render:r,style:i,...o}=e,s=J(),{side:c,align:l}=ht(),d=s.useState(`open`),f=s.useState(`instantType`),p=s.useState(`transitionStatus`),m=s.useState(`popupProps`),h=s.useState(`floatingRootContext`),g=s.useState(`closeDelay`);return a({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),ue(h,{closeDelay:g}),u(`div`,e,{state:{open:d,side:c,align:l,instant:f,transitionStatus:p},ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],props:[M,m,oe(p),o],stateAttributesMapping:S})});function vt({...e}){return(0,Y.jsx)(lt,{"data-slot":`hover-card`,...e})}function yt({...e}){return(0,Y.jsx)(pt,{"data-slot":`hover-card-trigger`,...e})}function bt({className:e,side:t=`bottom`,sideOffset:n=4,align:r=`center`,alignOffset:i=4,...a}){return(0,Y.jsx)(ft,{"data-slot":`hover-card-portal`,children:(0,Y.jsx)(gt,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,Y.jsx)(_t,{"data-slot":`hover-card-content`,className:l(`z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-xs/relaxed text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}var xt=`relative z-10 rounded-sm underline-offset-4 outline-none hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,St=({usage:e,label:t,note:n,children:r})=>(0,Y.jsxs)(vt,{children:[(0,Y.jsx)(yt,{delay:200,"aria-label":t,render:(0,Y.jsx)(`button`,{type:`button`,className:xt}),children:r}),(0,Y.jsxs)(bt,{align:`end`,className:`w-[26rem] max-w-[calc(100vw-2rem)] p-3 font-sans text-xs shadow-raised`,children:[n!==null&&(0,Y.jsxs)(`p`,{className:`pb-2 text-muted-foreground`,children:[n,`.`]}),(0,Y.jsx)(De,{pools:e.pools})]})]}),X=`hidden @5xl:table-cell`,Z=`hidden @4xl:table-cell`,Q=`@md:w-max @md:max-w-(--side)`,Ct=({reason:e})=>P(e,{AwaitingApproval:()=>`Waiting`,SuppressedForOperator:()=>`needs-you`,CycleBudgetUsedUp:()=>`needs-you`,RunFailed:()=>`Failed`,ClosedUnchanged:({run:e})=>e.state,LoopPaused:()=>`paused`,WaitingForStop:({run:e})=>e.state,QueuedForWorker:({run:e})=>e.state,AwaitingPoll:()=>`Pending`}),wt=({last:e,status:t},n)=>{let r=Re(e),i=t=>({state:Ct(t),words:`${e.loop!==t.loop&&!Ke(t)?`${t.loop} `:``}${Ge(t,n)}`,at:null});return P(t,{Running:({run:e})=>({state:`Running`,words:`Running ${e.loop}`,at:r}),AwaitingApproval:()=>({state:`Waiting`,words:`Waiting for approval`,at:r}),Queued:({run:e})=>({state:e.state,words:e.state,at:r}),Stalled:({stall:e})=>i(e),Idle:({stall:e})=>i(e),NeedsAttention:()=>({state:`needs-you`,words:`Needs attention`,at:r}),Done:()=>({state:`Done`,words:`Done`,at:r}),Ended:({run:e})=>({state:e.state,words:e.state,at:r})})},Tt=({row:e,now:t})=>{let{state:n,words:r,at:i}=wt(e,t);return(0,Y.jsxs)(`span`,{className:l(`flex items-start gap-1.5 text-xs/5 font-medium`,Q),children:[n===`Done`?(0,Y.jsx)(o,{item:e.task,linked:!1,numbered:!1,className:`mt-0.75`}):(0,Y.jsx)(Ee,{state:n,className:`mt-1.75 mr-0.5 ml-0.75`}),(0,Y.jsxs)(`span`,{className:`min-w-0 wrap-break-word`,children:[r,i!==null&&(0,Y.jsxs)(Y.Fragment,{children:[` `,(0,Y.jsxs)(`span`,{className:`font-normal whitespace-nowrap text-muted-foreground`,children:[`·`,` `,(0,Y.jsx)(`time`,{dateTime:i,title:he(i),className:`font-mono tabular-nums`,children:me(i,t)})]})]})]})]})},Et=()=>(0,Y.jsx)(`span`,{className:`absolute left-full text-muted-foreground`,children:`*`}),Dt=({usage:e})=>{if(e.cost===null)return null;let t=He(e),n=fe(e.cost.usd);return(0,Y.jsxs)(St,{usage:e,label:`Estimated cost: ${t?`at least `:``}${n}. Show per pool`,note:t?Le:null,children:[n,t&&(0,Y.jsx)(Et,{})]})},Ot=({task:e,now:t})=>{let{usage:n}=e;if(e.runs.every(({attempts:e})=>e.length===0))return null;let r=n.unmeasured>0;return(0,Y.jsxs)(`span`,{className:`relative`,title:r?Ie:`Total attempt time`,children:[pe(Pe(n,t)),r&&(0,Y.jsx)(Et,{})]})},kt=`py-3 align-top whitespace-normal`,$=`py-3 text-right align-top font-mono text-xs/5 whitespace-nowrap tabular-nums`,At=({task:e})=>{let t=ze(e);return(0,Y.jsxs)(`span`,{className:l(`flex items-baseline gap-2`,Q),children:[(0,Y.jsx)(`span`,{className:`truncate`,title:t.map(({loop:e})=>e).join(` · `),children:t.map(({loop:e,state:t},n)=>(0,Y.jsxs)(K.Fragment,{children:[n>0&&(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:` · `}),(0,Y.jsx)(Ee,{state:t,className:`mr-2 ml-0.75 align-middle`}),e,(0,Y.jsxs)(`span`,{className:`sr-only`,children:[` `,t]})]},e))}),(0,Y.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-muted-foreground tabular-nums`,children:e.runs.length})]})},jt=({row:e,repository:t,now:n,project:r,showRepository:a})=>(0,Y.jsxs)(Ae,{className:Xe,children:[(0,Y.jsxs)(Me,{className:`py-3 align-top`,children:[(0,Y.jsx)(i,{"data-row-link":!0,to:`/projects/$project/tasks/$number`,params:{project:r,number:We(e.task)},search:{repository:t},className:l(`block min-w-0`,Ye),children:(0,Y.jsx)(Ce,{variant:`row`,item:de(ie(e.task).origin),title:e.task.title,linked:!1})}),a&&(0,Y.jsxs)(`p`,{className:`mt-1 flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,Y.jsx)(we,{repository:t}),(0,Y.jsx)(`span`,{className:`truncate`,children:t})]})]}),(0,Y.jsx)(B,{className:kt,children:(0,Y.jsx)(Tt,{row:e,now:n})}),(0,Y.jsx)(B,{className:l(`py-3 align-top`,X),children:(0,Y.jsx)(At,{task:e.task})}),(0,Y.jsx)(B,{className:l(`py-3 text-right align-top`,X),children:(0,Y.jsx)(Te,{pullRequests:ie(e.task).pullRequests,className:`relative z-10 justify-end`})}),(0,Y.jsx)(B,{className:$,children:(0,Y.jsx)(Ot,{task:e.task,now:n})}),(0,Y.jsx)(B,{className:l($,Z),children:e.task.usage.pools.length>0&&(0,Y.jsx)(St,{usage:e.task.usage,label:`Tokens: ${I(e.task.usage.tokens)}. Show per pool`,note:null,children:I(e.task.usage.tokens)})}),(0,Y.jsx)(B,{className:l($,Z),children:(0,Y.jsx)(Dt,{usage:e.task.usage})})]}),Mt=({totals:e})=>(0,Y.jsx)(`p`,{className:`-mt-2 text-sm text-muted-foreground tabular-nums`,children:Be(e).map(({figure:e,words:t,lowerBound:n},r)=>(0,Y.jsxs)(K.Fragment,{children:[r>0&&`, `,n===null?e:(0,Y.jsx)(`span`,{title:n,children:`${e}*`}),` `,t]},t))}),Nt=`@md:[--side:clamp(7rem,calc((100cqw-26rem-var(--rest))/var(--sides)),13rem)] [--rest:7rem] [--sides:1] @4xl:[--rest:16.5rem] @5xl:[--rest:23rem] @5xl:[--sides:2]`,Pt=({project:e,stalled:t,repository:n,onRepositoryChange:r})=>{let i=ve(3e4),a=Fe(e.board.lanes,t).filter(e=>n===void 0||F(e.task.repository)===F(n));return(0,Y.jsxs)(be,{width:`full`,children:[(0,Y.jsx)(ye,{title:`Tasks`,counts:Ue(a)}),e.repositories.length>1&&r!==void 0&&(0,Y.jsx)(Je,{repositories:e.repositories,value:n,onChange:r}),a.length===0?(0,Y.jsx)(Ne,{children:`No runs yet`}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Mt,{totals:Ve(a,i)}),(0,Y.jsx)(`div`,{className:`@container -mx-2`,children:(0,Y.jsxs)(je,{"aria-label":`${ge(e)} tasks`,className:Nt,children:[(0,Y.jsx)(Oe,{children:(0,Y.jsxs)(Ae,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(z,{children:`Task`}),(0,Y.jsx)(z,{children:`Status`}),(0,Y.jsx)(z,{className:X,children:`Runs`}),(0,Y.jsx)(z,{className:l(`text-right`,X),children:`Pull request`}),(0,Y.jsx)(z,{className:`text-right`,children:`Elapsed time`}),(0,Y.jsx)(z,{className:l(`text-right`,Z),children:`Tokens`}),(0,Y.jsx)(z,{className:l(`text-right`,Z),children:`Estimated cost`})]})}),(0,Y.jsx)(ke,{children:a.map(t=>(0,Y.jsx)(jt,{row:t,project:L(e),showRepository:e.repositories.length>1,repository:t.task.repository,now:i},t.task.itemKey))})]})})]})]})},Ft=()=>{let{project:e}=R.useParams(),{data:t}=r(_e()),{repository:n}=R.useSearch(),i=R.useNavigate(),a=r(xe()),o=t.projects.find(t=>L(t)===e);return o===void 0?(0,Y.jsx)(qe,{}):(0,Y.jsx)(Pt,{project:o,stalled:a.data.notMoving,repository:n,onRepositoryChange:e=>void i({search:t=>({...t,repository:e})})})};export{Ft as component};
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{I as r}from"./queryOptions-Bavh4JFe.js";import{t as i}from"./useSuspenseQuery-ajaZl96Y.js";import{t as a}from"./button-CzVqBv_O.js";import{_t as o,gt as s,n as c}from"./api-CoJQoiOc.js";import{i as l}from"./page-CmRQu9F2.js";import{t as u}from"./error-alert-Bq-SD6of.js";import{E as d,f}from"./index-BGr-Cg-z.js";var p=e(t(),1),m=`Tokens`,h=`Revoke a token to end access from that browser or device.`,g=`No tokens`,_=`Revoke`,v=`Confirm revocation`,y=`Keep token`,b=`Last used`,x=`Created`,S=n(),C=()=>{let{data:e}=i(f()),t=r(),[n,C]=(0,p.useState)(),[w,T]=(0,p.useState)(!1),[E,D]=(0,p.useState)(),O=async e=>{T(!0),D(void 0);try{await o(`/api/tokens/${encodeURIComponent(e)}`,s,{method:`DELETE`}),C(void 0),await t.invalidateQueries(f())}catch(e){D(c(e))}finally{T(!1)}};return(0,S.jsxs)(`section`,{className:`space-y-6 p-4 md:p-5`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(l,{title:m}),(0,S.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:h})]}),E!==void 0&&(0,S.jsx)(u,{message:E}),e.length===0?(0,S.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:g}):(0,S.jsx)(`ul`,{className:`divide-y divide-border`,children:e.map(e=>(0,S.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-3 py-3`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`p`,{className:`text-sm font-medium`,children:e.name}),(0,S.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[x,` `,new Date(e.createdAt).toLocaleDateString(),` · `,b,` `,new Date(e.lastUsedAt).toLocaleString()]})]}),(0,S.jsx)(`div`,{className:`flex gap-2`,children:n===e.id?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(a,{variant:`destructive`,disabled:w,onClick:()=>void O(e.id),children:v}),(0,S.jsx)(a,{variant:`ghost`,onClick:()=>C(void 0),children:y})]}):(0,S.jsx)(d,{command:`${_} · ${e.name} · ${e.id}`,variant:`ghost`,disabled:w,onClick:()=>C(e.id),children:_})})]},e.id))})]})};export{C as component};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{I as r}from"./queryOptions-Bavh4JFe.js";import{t as i}from"./useSuspenseQuery-ajaZl96Y.js";import{t as a}from"./button-CzVqBv_O.js";import{_t as o,gt as s,n as c}from"./api-D3RWLycx.js";import{i as l}from"./page-BEpkTOW0.js";import{t as u}from"./error-alert-Bq-SD6of.js";import{E as d,f}from"./index-B_6qmKij.js";var p=e(t(),1),m=`Tokens`,h=`Revoke a token to end access from that browser or device.`,g=`No tokens`,_=`Revoke`,v=`Confirm revocation`,y=`Keep token`,b=`Last used`,x=`Created`,S=n(),C=()=>{let{data:e}=i(f()),t=r(),[n,C]=(0,p.useState)(),[w,T]=(0,p.useState)(!1),[E,D]=(0,p.useState)(),O=async e=>{T(!0),D(void 0);try{await o(`/api/tokens/${encodeURIComponent(e)}`,s,{method:`DELETE`}),C(void 0),await t.invalidateQueries(f())}catch(e){D(c(e))}finally{T(!1)}};return(0,S.jsxs)(`section`,{className:`space-y-6 p-4 md:p-5`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(l,{title:m}),(0,S.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:h})]}),E!==void 0&&(0,S.jsx)(u,{message:E}),e.length===0?(0,S.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:g}):(0,S.jsx)(`ul`,{className:`divide-y divide-border`,children:e.map(e=>(0,S.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-3 py-3`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`p`,{className:`text-sm font-medium`,children:e.name}),(0,S.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[x,` `,new Date(e.createdAt).toLocaleDateString(),` · `,b,` `,new Date(e.lastUsedAt).toLocaleString()]})]}),(0,S.jsx)(`div`,{className:`flex gap-2`,children:n===e.id?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(a,{variant:`destructive`,disabled:w,onClick:()=>void O(e.id),children:v}),(0,S.jsx)(a,{variant:`ghost`,onClick:()=>C(void 0),children:y})]}):(0,S.jsx)(d,{command:`${_} · ${e.name} · ${e.id}`,variant:`ghost`,disabled:w,onClick:()=>C(e.id),children:_})})]},e.id))})]})};export{C as component};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{C as t,p as n,y as r}from"./strings-BIVdGoBr.js";import{C as i,S as a,x as o}from"./index-BGr-Cg-z.js";var s=e(),c=new Intl.NumberFormat(`en`),l=({cost:e})=>e===null?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`span`,{className:`font-mono text-foreground tabular-nums`,children:t(e.usd)}),e.estimate&&(0,s.jsx)(`span`,{className:`text-muted-foreground`,children:` estimate`})]}),u=({session:e})=>e._tag===`ParentSession`?`Parent`:e.agent,d=`grid grid-cols-[minmax(0,1fr)_auto_7rem] items-baseline gap-x-3 py-0.5`,f=`grid grid-cols-[minmax(0,1fr)_auto_10rem] items-baseline gap-x-3 py-0.5`,p=e=>`unpriced`in e&&e.unpriced,m=({pools:e})=>{let t=e.some(e=>p(e)&&e.cost!==null);return(0,s.jsxs)(`section`,{"aria-label":`Tokens per pool`,children:[(0,s.jsx)(`h2`,{className:`pb-1 text-sm font-medium text-foreground`,children:`Tokens per pool`}),e.map(e=>(0,s.jsxs)(`div`,{className:t?f:d,children:[(0,s.jsx)(`span`,{className:`truncate text-foreground`,children:n(e.pool)}),(0,s.jsx)(`span`,{className:`text-right font-mono text-foreground tabular-nums`,children:c.format(e.tokens)}),(0,s.jsxs)(`span`,{className:`text-right`,children:[p(e)&&e.cost!==null&&(0,s.jsx)(`span`,{className:`text-muted-foreground`,children:`at least `}),(0,s.jsx)(l,{cost:e.cost})]})]},e.pool))]})},h=({usage:e,attempts:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m,{pools:e.pools}),(0,s.jsxs)(`section`,{"aria-label":`Tokens per session`,className:`border-t pt-2.5`,children:[(0,s.jsx)(`h2`,{className:`pb-1 text-sm font-medium text-foreground`,children:`Tokens per session`}),t.map(t=>{let n=e.sessions.filter(({attemptId:e})=>e===t.id);return n.length===0?null:(0,s.jsxs)(`div`,{className:`pb-1`,children:[(0,s.jsxs)(`h3`,{className:`pt-1 text-muted-foreground`,children:[`Attempt `,t.number]}),n.map(e=>(0,s.jsxs)(`div`,{className:d,children:[(0,s.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,s.jsx)(`span`,{className:`shrink-0 text-foreground`,children:u(e)}),(0,s.jsx)(`span`,{className:`truncate font-mono text-muted-foreground`,children:e.session.brain.model})]}),(0,s.jsx)(`span`,{className:`text-right font-mono text-foreground tabular-nums`,children:c.format(e.tokens)}),(0,s.jsx)(`span`,{className:`text-right`,children:(0,s.jsx)(l,{cost:e.cost})})]},e.session.id))]},t.id)})]}),(0,s.jsx)(`p`,{className:`text-muted-foreground`,children:`Tokens are output and uncached input. Dollars are the price each harness reports, or for Codex, the OpenAI API price.`})]}),g=({usage:e,attempts:t})=>(0,s.jsxs)(o,{children:[(0,s.jsxs)(i,{"aria-label":`Tokens: ${c.format(e.tokens)}. Show per pool and session`,className:`rounded-sm text-primary underline-offset-4 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring/70`,children:[(0,s.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,children:r(e.tokens)}),` tokens`]}),(0,s.jsx)(a,{align:`start`,className:`w-[26rem] max-w-[calc(100vw-2rem)] gap-3 p-3 text-xs shadow-raised`,children:(0,s.jsx)(h,{usage:e,attempts:t})})]});export{g as n,m as t};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{C as t,p as n,y as r}from"./strings-BIVdGoBr.js";import{C as i,S as a,x as o}from"./index-B_6qmKij.js";var s=e(),c=new Intl.NumberFormat(`en`),l=({cost:e})=>e===null?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`span`,{className:`font-mono text-foreground tabular-nums`,children:t(e.usd)}),e.estimate&&(0,s.jsx)(`span`,{className:`text-muted-foreground`,children:` estimate`})]}),u=({session:e})=>e._tag===`ParentSession`?`Parent`:e.agent,d=`grid grid-cols-[minmax(0,1fr)_auto_7rem] items-baseline gap-x-3 py-0.5`,f=`grid grid-cols-[minmax(0,1fr)_auto_10rem] items-baseline gap-x-3 py-0.5`,p=e=>`unpriced`in e&&e.unpriced,m=({pools:e})=>{let t=e.some(e=>p(e)&&e.cost!==null);return(0,s.jsxs)(`section`,{"aria-label":`Tokens per pool`,children:[(0,s.jsx)(`h2`,{className:`pb-1 text-sm font-medium text-foreground`,children:`Tokens per pool`}),e.map(e=>(0,s.jsxs)(`div`,{className:t?f:d,children:[(0,s.jsx)(`span`,{className:`truncate text-foreground`,children:n(e.pool)}),(0,s.jsx)(`span`,{className:`text-right font-mono text-foreground tabular-nums`,children:c.format(e.tokens)}),(0,s.jsxs)(`span`,{className:`text-right`,children:[p(e)&&e.cost!==null&&(0,s.jsx)(`span`,{className:`text-muted-foreground`,children:`at least `}),(0,s.jsx)(l,{cost:e.cost})]})]},e.pool))]})},h=({usage:e,attempts:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m,{pools:e.pools}),(0,s.jsxs)(`section`,{"aria-label":`Tokens per session`,className:`border-t pt-2.5`,children:[(0,s.jsx)(`h2`,{className:`pb-1 text-sm font-medium text-foreground`,children:`Tokens per session`}),t.map(t=>{let n=e.sessions.filter(({attemptId:e})=>e===t.id);return n.length===0?null:(0,s.jsxs)(`div`,{className:`pb-1`,children:[(0,s.jsxs)(`h3`,{className:`pt-1 text-muted-foreground`,children:[`Attempt `,t.number]}),n.map(e=>(0,s.jsxs)(`div`,{className:d,children:[(0,s.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,s.jsx)(`span`,{className:`shrink-0 text-foreground`,children:u(e)}),(0,s.jsx)(`span`,{className:`truncate font-mono text-muted-foreground`,children:e.session.brain.model})]}),(0,s.jsx)(`span`,{className:`text-right font-mono text-foreground tabular-nums`,children:c.format(e.tokens)}),(0,s.jsx)(`span`,{className:`text-right`,children:(0,s.jsx)(l,{cost:e.cost})})]},e.session.id))]},t.id)})]}),(0,s.jsx)(`p`,{className:`text-muted-foreground`,children:`Tokens are output and uncached input. Dollars are the price each harness reports, or for Codex, the OpenAI API price.`})]}),g=({usage:e,attempts:t})=>(0,s.jsxs)(o,{children:[(0,s.jsxs)(i,{"aria-label":`Tokens: ${c.format(e.tokens)}. Show per pool and session`,className:`rounded-sm text-primary underline-offset-4 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring/70`,children:[(0,s.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,children:r(e.tokens)}),` tokens`]}),(0,s.jsx)(a,{align:`start`,className:`w-[26rem] max-w-[calc(100vw-2rem)] gap-3 p-3 text-xs shadow-raised`,children:(0,s.jsx)(h,{usage:e,attempts:t})})]});export{g as n,m as t};