@tapflowio/relay 0.29.0 → 0.30.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 (162) hide show
  1. package/dist/RelayServer.d.ts +6 -0
  2. package/dist/RelayServer.d.ts.map +1 -1
  3. package/dist/RelayServer.js +48 -3
  4. package/dist/RelayServer.js.map +1 -1
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/lib/config.d.ts +14 -0
  10. package/dist/lib/config.d.ts.map +1 -1
  11. package/dist/lib/config.js +98 -0
  12. package/dist/lib/config.js.map +1 -1
  13. package/dist/lib/launchDefaults.d.ts +25 -0
  14. package/dist/lib/launchDefaults.d.ts.map +1 -0
  15. package/dist/lib/launchDefaults.js +41 -0
  16. package/dist/lib/launchDefaults.js.map +1 -0
  17. package/dist/server.js +2 -2
  18. package/dist/server.js.map +1 -1
  19. package/package.json +3 -3
  20. package/public/assets/{AISessionWatch-BSBkpTom.js → AISessionWatch-DxsyhjAy.js} +1 -1
  21. package/public/assets/AISessionWatch-DxsyhjAy.js.br +0 -0
  22. package/public/assets/AISessionWatch-DxsyhjAy.js.gz +0 -0
  23. package/public/assets/{AppCenter-DD_6LQx-.js → AppCenter-CZMTgfBh.js} +1 -1
  24. package/public/assets/AppCenter-CZMTgfBh.js.br +0 -0
  25. package/public/assets/AppCenter-CZMTgfBh.js.gz +0 -0
  26. package/public/assets/{Default-CQ3Ae2mK.js → Default-DCk7wCIg.js} +1 -1
  27. package/public/assets/Default-DCk7wCIg.js.br +0 -0
  28. package/public/assets/Default-DCk7wCIg.js.gz +0 -0
  29. package/public/assets/{Invite-D1uNMm0-.js → Invite-BNgu8qb9.js} +1 -1
  30. package/public/assets/Invite-BNgu8qb9.js.br +0 -0
  31. package/public/assets/Invite-BNgu8qb9.js.gz +0 -0
  32. package/public/assets/{MacResources-D2UeRbKL.js → MacResources-B26lSN5B.js} +1 -1
  33. package/public/assets/MacResources-B26lSN5B.js.br +0 -0
  34. package/public/assets/MacResources-B26lSN5B.js.gz +0 -0
  35. package/public/assets/{QASession-d0eOjXXo.js → QASession-Rin1Ol-2.js} +1 -1
  36. package/public/assets/QASession-Rin1Ol-2.js.br +0 -0
  37. package/public/assets/QASession-Rin1Ol-2.js.gz +0 -0
  38. package/public/assets/{ResetPassword-B-4Uyfwr.js → ResetPassword-CQsALVBn.js} +1 -1
  39. package/public/assets/ResetPassword-CQsALVBn.js.br +0 -0
  40. package/public/assets/ResetPassword-CQsALVBn.js.gz +0 -0
  41. package/public/assets/{RunDetail-C50RjsuM.js → RunDetail-D0JKuXAS.js} +1 -1
  42. package/public/assets/RunDetail-D0JKuXAS.js.br +0 -0
  43. package/public/assets/RunDetail-D0JKuXAS.js.gz +0 -0
  44. package/public/assets/{Runs-A7RcDLgO.js → Runs-DSHpDs0m.js} +1 -1
  45. package/public/assets/Runs-DSHpDs0m.js.br +0 -0
  46. package/public/assets/Runs-DSHpDs0m.js.gz +0 -0
  47. package/public/assets/{Setup-DK6TZbwh.js → Setup-4-HC1rwb.js} +1 -1
  48. package/public/assets/Setup-4-HC1rwb.js.br +0 -0
  49. package/public/assets/Setup-4-HC1rwb.js.gz +0 -0
  50. package/public/assets/{Team-VoGput2p.js → Team-CgJM95TR.js} +1 -1
  51. package/public/assets/Team-CgJM95TR.js.br +0 -0
  52. package/public/assets/Team-CgJM95TR.js.gz +0 -0
  53. package/public/assets/{Tokens-qkcJgunR.js → Tokens-D2wbiDVG.js} +1 -1
  54. package/public/assets/Tokens-D2wbiDVG.js.br +0 -0
  55. package/public/assets/Tokens-D2wbiDVG.js.gz +0 -0
  56. package/public/assets/{aiSession-U7UqgdSb.js → aiSession-DE80E1QU.js} +1 -1
  57. package/public/assets/aiSession-DE80E1QU.js.br +0 -0
  58. package/public/assets/aiSession-DE80E1QU.js.gz +0 -0
  59. package/public/assets/{alert-dialog-C0mRms8g.js → alert-dialog-nxQTqXgk.js} +1 -1
  60. package/public/assets/alert-dialog-nxQTqXgk.js.br +0 -0
  61. package/public/assets/alert-dialog-nxQTqXgk.js.gz +0 -0
  62. package/public/assets/{badge-BjEnOmb0.js → badge-DM1m4CLq.js} +1 -1
  63. package/public/assets/badge-DM1m4CLq.js.br +0 -0
  64. package/public/assets/badge-DM1m4CLq.js.gz +0 -0
  65. package/public/assets/{dialog-Cugbp1C4.js → dialog-CTc84wr4.js} +1 -1
  66. package/public/assets/dialog-CTc84wr4.js.br +0 -0
  67. package/public/assets/dialog-CTc84wr4.js.gz +0 -0
  68. package/public/assets/{field-hint-qmBa0qqN.js → field-hint-xptj_gfn.js} +1 -1
  69. package/public/assets/field-hint-xptj_gfn.js.br +0 -0
  70. package/public/assets/field-hint-xptj_gfn.js.gz +0 -0
  71. package/public/assets/{index-C_3Q51YJ.js → index-2zL1a5_0.js} +3 -3
  72. package/public/assets/index-2zL1a5_0.js.br +0 -0
  73. package/public/assets/index-2zL1a5_0.js.gz +0 -0
  74. package/public/assets/{list-view-CyM0QUaH.js → list-view-BzI8tLvX.js} +1 -1
  75. package/public/assets/list-view-BzI8tLvX.js.br +0 -0
  76. package/public/assets/list-view-BzI8tLvX.js.gz +0 -0
  77. package/public/assets/{pencil-DUZRZB3S.js → pencil-CEWs8Of9.js} +1 -1
  78. package/public/assets/pencil-CEWs8Of9.js.br +0 -0
  79. package/public/assets/pencil-CEWs8Of9.js.gz +0 -0
  80. package/public/assets/{play-Z1L2Eb91.js → play-Dab2J3Tw.js} +1 -1
  81. package/public/assets/play-Dab2J3Tw.js.br +0 -0
  82. package/public/assets/play-Dab2J3Tw.js.gz +0 -0
  83. package/public/assets/{search-input-B0s9mzRt.js → search-input-BK7cFT1m.js} +1 -1
  84. package/public/assets/search-input-BK7cFT1m.js.br +0 -0
  85. package/public/assets/search-input-BK7cFT1m.js.gz +0 -0
  86. package/public/assets/{select-CHbE6M4S.js → select-BH7E2Q0r.js} +1 -1
  87. package/public/assets/select-BH7E2Q0r.js.br +0 -0
  88. package/public/assets/select-BH7E2Q0r.js.gz +0 -0
  89. package/public/assets/{slider-tyb3JvL2.js → slider-B4sPZi8m.js} +1 -1
  90. package/public/assets/slider-B4sPZi8m.js.br +0 -0
  91. package/public/assets/slider-B4sPZi8m.js.gz +0 -0
  92. package/public/assets/{tabs-Bf7ou-eS.js → tabs-CYoB-S2t.js} +1 -1
  93. package/public/assets/tabs-CYoB-S2t.js.br +0 -0
  94. package/public/assets/tabs-CYoB-S2t.js.gz +0 -0
  95. package/public/assets/{tech-label-KAwM5qZ_.js → tech-label-fz5PvoAL.js} +1 -1
  96. package/public/assets/tech-label-fz5PvoAL.js.br +3 -0
  97. package/public/assets/tech-label-fz5PvoAL.js.gz +0 -0
  98. package/public/assets/{trash-HEJmY7DQ.js → trash-CZ-V9h2G.js} +1 -1
  99. package/public/assets/trash-CZ-V9h2G.js.br +0 -0
  100. package/public/assets/trash-CZ-V9h2G.js.gz +0 -0
  101. package/public/assets/{video-DdHH0Q0l.js → video-CilstoqV.js} +1 -1
  102. package/public/assets/video-CilstoqV.js.br +0 -0
  103. package/public/assets/video-CilstoqV.js.gz +0 -0
  104. package/public/index.html +1 -1
  105. package/public/index.html.br +0 -0
  106. package/public/index.html.gz +0 -0
  107. package/public/assets/AISessionWatch-BSBkpTom.js.br +0 -0
  108. package/public/assets/AISessionWatch-BSBkpTom.js.gz +0 -0
  109. package/public/assets/AppCenter-DD_6LQx-.js.br +0 -0
  110. package/public/assets/AppCenter-DD_6LQx-.js.gz +0 -0
  111. package/public/assets/Default-CQ3Ae2mK.js.br +0 -0
  112. package/public/assets/Default-CQ3Ae2mK.js.gz +0 -0
  113. package/public/assets/Invite-D1uNMm0-.js.br +0 -0
  114. package/public/assets/Invite-D1uNMm0-.js.gz +0 -0
  115. package/public/assets/MacResources-D2UeRbKL.js.br +0 -0
  116. package/public/assets/MacResources-D2UeRbKL.js.gz +0 -0
  117. package/public/assets/QASession-d0eOjXXo.js.br +0 -0
  118. package/public/assets/QASession-d0eOjXXo.js.gz +0 -0
  119. package/public/assets/ResetPassword-B-4Uyfwr.js.br +0 -0
  120. package/public/assets/ResetPassword-B-4Uyfwr.js.gz +0 -0
  121. package/public/assets/RunDetail-C50RjsuM.js.br +0 -0
  122. package/public/assets/RunDetail-C50RjsuM.js.gz +0 -0
  123. package/public/assets/Runs-A7RcDLgO.js.br +0 -0
  124. package/public/assets/Runs-A7RcDLgO.js.gz +0 -0
  125. package/public/assets/Setup-DK6TZbwh.js.br +0 -0
  126. package/public/assets/Setup-DK6TZbwh.js.gz +0 -0
  127. package/public/assets/Team-VoGput2p.js.br +0 -0
  128. package/public/assets/Team-VoGput2p.js.gz +0 -0
  129. package/public/assets/Tokens-qkcJgunR.js.br +0 -0
  130. package/public/assets/Tokens-qkcJgunR.js.gz +0 -0
  131. package/public/assets/aiSession-U7UqgdSb.js.br +0 -0
  132. package/public/assets/aiSession-U7UqgdSb.js.gz +0 -0
  133. package/public/assets/alert-dialog-C0mRms8g.js.br +0 -0
  134. package/public/assets/alert-dialog-C0mRms8g.js.gz +0 -0
  135. package/public/assets/badge-BjEnOmb0.js.br +0 -0
  136. package/public/assets/badge-BjEnOmb0.js.gz +0 -0
  137. package/public/assets/dialog-Cugbp1C4.js.br +0 -0
  138. package/public/assets/dialog-Cugbp1C4.js.gz +0 -0
  139. package/public/assets/field-hint-qmBa0qqN.js.br +0 -0
  140. package/public/assets/field-hint-qmBa0qqN.js.gz +0 -0
  141. package/public/assets/index-C_3Q51YJ.js.br +0 -0
  142. package/public/assets/index-C_3Q51YJ.js.gz +0 -0
  143. package/public/assets/list-view-CyM0QUaH.js.br +0 -0
  144. package/public/assets/list-view-CyM0QUaH.js.gz +0 -0
  145. package/public/assets/pencil-DUZRZB3S.js.br +0 -0
  146. package/public/assets/pencil-DUZRZB3S.js.gz +0 -0
  147. package/public/assets/play-Z1L2Eb91.js.br +0 -0
  148. package/public/assets/play-Z1L2Eb91.js.gz +0 -0
  149. package/public/assets/search-input-B0s9mzRt.js.br +0 -0
  150. package/public/assets/search-input-B0s9mzRt.js.gz +0 -0
  151. package/public/assets/select-CHbE6M4S.js.br +0 -0
  152. package/public/assets/select-CHbE6M4S.js.gz +0 -0
  153. package/public/assets/slider-tyb3JvL2.js.br +0 -0
  154. package/public/assets/slider-tyb3JvL2.js.gz +0 -0
  155. package/public/assets/tabs-Bf7ou-eS.js.br +0 -0
  156. package/public/assets/tabs-Bf7ou-eS.js.gz +0 -0
  157. package/public/assets/tech-label-KAwM5qZ_.js.br +0 -0
  158. package/public/assets/tech-label-KAwM5qZ_.js.gz +0 -0
  159. package/public/assets/trash-HEJmY7DQ.js.br +0 -0
  160. package/public/assets/trash-HEJmY7DQ.js.gz +0 -0
  161. package/public/assets/video-DdHH0Q0l.js.br +0 -0
  162. package/public/assets/video-DdHH0Q0l.js.gz +0 -0
@@ -1 +1 @@
1
- import{r as M,c as He,j as s}from"./vendor-react-DTSdA8m-.js";import{ak as Tt,c as bt,b as Ot,ay as Rt,az as Ct,q as Xe,aA as Dt,Q as xt}from"./index-C_3Q51YJ.js";import{u as It}from"./useRelay-CES3I1Mt.js";import{u as Pt,S as Kt}from"./useShownAfter-By1Yxysz.js";import{c as Ft,a as Ht,T as Ut}from"./tabs-Bf7ou-eS.js";import{R as Bt}from"./resource-health-oWJ8hy9X.js";import{t as qt,a as wt,b as Gt,c as Qt,d as Wt,e as $t,l as Xt,P as Vt,L as zt,G as Yt,A as Jt,m as St,f as Zt,g as es,h as ts,i as ss,B as ns,j as ls}from"./vendor-charts-BE7R_8yA.js";import"./vendor-router-B1pQim9Z.js";const os=t=>(document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t));function as(){return M.useSyncExternalStore(os,is,rs)}function rs(){return!0}function is(){return document.visibilityState!=="hidden"}function cs(t,e){const o=He.c(4),[m,g]=M.useState(ds);let i,n;return o[0]!==e||o[1]!==t?(i=()=>{if(!e)return;g(Date.now());const h=setInterval(()=>g(Date.now()),t);return()=>clearInterval(h)},n=[t,e],o[0]=e,o[1]=t,o[2]=i,o[3]=n):(i=o[2],n=o[3]),M.useEffect(i,n),m}function ds(){return Date.now()}const pt={"1h":36e5,"6h":216e5,"24h":864e5,"7d":6048e5},us={"1h":Gt.every(10),"6h":wt,"24h":wt.every(3),"7d":qt};function fs(t,e,o){return us[o].range(new Date(t),new Date(e+1))}function ms(t,e){const o=new Date(t);return e==="7d"?`${o.getMonth()+1}/${o.getDate()}`:`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}`}const hs=2e3;function xs(t){return Math.min(1e4,Math.max(1e3,pt[t]/hs))}const ps={"1h":6e4,"6h":6e4,"24h":3e5,"7d":9e5},gt=t=>Math.round(t*10)/10;function gs(t,e,o){let m;for(const i of t){const n=i.agentName===e?i.resources:void 0;n&&(!m||n.reportedAt>m.reportedAt)&&(m=n)}if(!m||o-m.reportedAt>Bt)return null;const g=i=>Number.isFinite(i)?gt(i):null;return{cpu:g(m.cpuPercent),mem:g(m.memUsedMB/m.memTotalMB*100)}}const Et={cpu:{label:"CPU",color:"#60a5fa"},mem:{label:"RAM",color:"#a78bfa"}},Lt={"1h":"1h","6h":"6h","24h":"24h","7d":"7d"};function Is(){const t=He.c(66);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],t[0]=e):e=t[0];const[o,m]=M.useState(e),[g,i]=M.useState(null),[n,h]=M.useState("24h"),R=as();let S;t[1]!==n?(S=xs(n),t[1]=n,t[2]=S):S=t[2];const x=cs(S,R),{setNode:v}=Tt();let p,j;t[3]!==v?(p=()=>(v(s.jsx("span",{className:"text-sm font-medium",children:"Mac Resources"})),()=>v(null)),j=[v],t[3]=v,t[4]=p,t[5]=j):(p=t[4],j=t[5]),M.useEffect(p,j);let C;t[6]===Symbol.for("react.memo_cache_sentinel")?(C=u=>{u.type==="agents:listed"&&m(u.sessions??[])},t[6]=C):C=t[6];const X=C,{send:$,connected:E}=It(X);let ce,de;t[7]!==E||t[8]!==$?(ce=()=>{if(!E)return;$({type:"agents:list"});const u=setInterval(()=>$({type:"agents:list"}),1e4);return()=>clearInterval(u)},de=[E,$],t[7]=E,t[8]=$,t[9]=ce,t[10]=de):(ce=t[9],de=t[10]),M.useEffect(ce,de);let se;t[11]===Symbol.for("react.memo_cache_sentinel")?(se={queryKey:Xe.agents,queryFn:Ct,refetchOnWindowFocus:!1},t[11]=se):se=t[11];const V=bt(se);let d,f,B,ne;t[12]!==V.data||t[13]!==o?(B=V.data??[],f=o.map(js).filter(Boolean),d=[...new Set([...f,...B])],ne=new Set(f),t[12]=V.data,t[13]=o,t[14]=d,t[15]=f,t[16]=B,t[17]=ne):(d=t[14],f=t[15],B=t[16],ne=t[17]);const b=ne,l=g??(V.isPending?null:B[0]??f[0]??null),q=Ot();let ee;t[18]!==n||t[19]!==l?(ee=l?Xe.resourceHistory(l,n):null,t[18]=n,t[19]=l,t[20]=ee):ee=t[20];const te=ee;let D;t[21]!==te||t[22]!==n?(D=te??Xe.resourceHistory("",n),t[21]=te,t[22]=n,t[23]=D):D=t[23];let G;t[24]!==n||t[25]!==l?(G=u=>{const{signal:T}=u;return Dt(l,n,T)},t[24]=n,t[25]=l,t[26]=G):G=t[26];let z;t[27]!==D||t[28]!==G?(z={queryKey:D,queryFn:G,enabled:!1},t[27]=D,t[28]=G,t[29]=z):z=t[29];const I=bt(z),Q=I.refetch;let P,Y;t[30]!==q||t[31]!==n||t[32]!==Q||t[33]!==l||t[34]!==R?(P=()=>{if(!l||!R)return;const u=Xe.resourceHistory(l,n),T=ps[n],N=()=>{const H=q.getQueryState(u);(H==null?void 0:H.fetchStatus)==="fetching"&&H.data===void 0?q.cancelQueries({queryKey:u,exact:!0}).then(()=>Q()):Q({cancelRefetch:!0})},k=q.getQueryState(u),ae=Math.max((k==null?void 0:k.dataUpdatedAt)??0,(k==null?void 0:k.errorUpdatedAt)??0),re=(k==null?void 0:k.data)!==void 0&&ae>0?Math.max(0,T-(Date.now()-ae)):0;let ie;const Ue=()=>{N(),ie=setInterval(N,T)},Fe=re>0?setTimeout(Ue,re):void 0;return re===0&&Ue(),()=>{clearTimeout(Fe),clearInterval(ie),q.cancelQueries({queryKey:u,exact:!0})}},Y=[l,n,R,Q,q],t[30]=q,t[31]=n,t[32]=Q,t[33]=l,t[34]=R,t[35]=P,t[36]=Y):(P=t[35],Y=t[36]),M.useEffect(P,Y);const w=I.data!==void 0||I.isError,J=te!==null&&!w,c=Pt(J,Kt);let K;t[37]!==I.data?(K=I.data??[],t[37]=I.data,t[38]=K):K=t[38];let Z;t[39]!==K?(Z=K.map(vs),t[39]=K,t[40]=Z):Z=t[40];const W=Z;let le;t[41]!==x||t[42]!==l||t[43]!==o?(le=l?gs(o,l,x):null,t[41]=x,t[42]=l,t[43]=o,t[44]=le):le=t[44];const r=le;let y;t[45]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("h1",{className:"sr-only",children:"Mac Resources"}),t[45]=y):y=t[45];let L;t[46]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx("h2",{id:"macs-heading",className:"px-2 pb-1 font-mono text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Macs"}),t[46]=L):L=t[46];let _;t[47]!==d||t[48]!==E||t[49]!==b||t[50]!==l?(_=d.length===0?s.jsx("span",{className:"px-2 text-sm text-muted-foreground",children:E?"No agents yet.":"Connecting…"}):d.map(u=>{const T=b.has(u),N=l===u;return s.jsxs("button",{onClick:()=>i(u),"aria-current":N?"true":void 0,className:["flex items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent transition-colors",N?"bg-accent font-medium":""].join(" "),children:[s.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 rounded-full ${T?"bg-emerald-400":"bg-muted-foreground/40"}`,"aria-hidden":"true"}),s.jsx("span",{className:"truncate min-w-0",children:u}),s.jsx("span",{className:"sr-only",children:T?"Online":"Offline"})]},u)}),t[47]=d,t[48]=E,t[49]=b,t[50]=l,t[51]=_):_=t[51];let A;t[52]!==_?(A=s.jsxs("aside",{"aria-labelledby":"macs-heading",className:"w-64 shrink-0 border-r flex flex-col gap-1 p-3 overflow-y-auto",children:[L,_]}),t[52]=_,t[53]=A):A=t[53];let F;t[54]!==W||t[55]!==(r==null?void 0:r.cpu)||t[56]!==(r==null?void 0:r.mem)||t[57]!==J||t[58]!==x||t[59]!==n||t[60]!==l||t[61]!==c?(F=s.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:l?s.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-base font-semibold",children:l}),s.jsx(Ft,{value:n,onValueChange:u=>h(u),children:s.jsx(Ht,{children:Object.keys(Lt).map(ys)})})]}),J?s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("p",{className:"sr-only",children:"Loading…"}),s.jsxs("div",{className:c?"flex flex-col gap-6":"flex flex-col gap-6 invisible",children:[s.jsx(_t,{}),s.jsx(_t,{})]})]}):W.length===0?s.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"No data yet for this range. Data is collected every minute while the agent is connected."}):s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(At,{title:"CPU %",color:"cpu",data:W,dataKey:"cpu",range:n,now:x,live:(r==null?void 0:r.cpu)??null}),s.jsx(At,{title:"RAM %",color:"mem",data:W,dataKey:"mem",range:n,now:x,live:(r==null?void 0:r.mem)??null})]})]}):s.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-muted-foreground",children:[s.jsx(Rt,{className:"h-8 w-8"}),s.jsx("p",{className:"text-sm",children:"Select a Mac to view resource history."})]})}),t[54]=W,t[55]=r==null?void 0:r.cpu,t[56]=r==null?void 0:r.mem,t[57]=J,t[58]=x,t[59]=n,t[60]=l,t[61]=c,t[62]=F):F=t[62];let oe;return t[63]!==A||t[64]!==F?(oe=s.jsxs("div",{className:"flex h-full min-h-0",children:[y,A,F]}),t[63]=A,t[64]=F,t[65]=oe):oe=t[65],oe}function ys(t){return s.jsx(Ut,{value:t,children:Lt[t]},t)}function vs(t){return{time:t.recorded_at,cpu:gt(t.cpu_percent),mem:gt(t.mem_percent)}}function js(t){return t.agentName}const yt=t=>new Date(t.time).getTime(),Nt=t=>new Date(t).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),Ve=t=>`${Math.round(t*10)/10}%`,bs=$t(yt).left,ws=$t(t=>t.t).left,U={top:8,right:24,bottom:24,left:40},kt=16,Mt=6,Ss=20,Ns=40;function _t(){const t=He.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"rounded-lg border p-4 flex flex-col gap-3","aria-hidden":!0,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xt,{className:"h-2.5 w-2.5 rounded-full"}),s.jsx(xt,{className:"h-5 w-12"})]}),s.jsx(xt,{className:"h-[220px] w-full"})]}),t[0]=e):e=t[0],e}function At(t){const e=He.c(18),{title:o,color:m,data:g,dataKey:i,range:n,now:h,live:R}=t,S=Et[m].color;let x;e[0]!==S?(x=s.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{background:S}}),e[0]=S,e[1]=x):x=e[1];let v;e[2]!==o?(v=s.jsx("h2",{className:"text-sm font-medium",children:o}),e[2]=o,e[3]=v):v=e[3];let p;e[4]!==x||e[5]!==v?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[x,v]}),e[4]=x,e[5]=v,e[6]=p):p=e[6];let j;e[7]!==g||e[8]!==i||e[9]!==S||e[10]!==R||e[11]!==h||e[12]!==n||e[13]!==o?(j=s.jsx("div",{className:"relative h-[220px] w-full",children:s.jsx(Vt,{children:X=>{const{width:$,height:E}=X;return $>0&&E>0?s.jsx(ks,{width:$,height:E,data:g,dataKey:i,hex:S,range:n,now:h,live:R,label:o}):null}})}),e[7]=g,e[8]=i,e[9]=S,e[10]=R,e[11]=h,e[12]=n,e[13]=o,e[14]=j):j=e[14];let C;return e[15]!==p||e[16]!==j?(C=s.jsxs("div",{className:"rounded-lg border p-4 flex flex-col gap-3",children:[p,j]}),e[15]=p,e[16]=j,e[17]=C):C=e[17],C}function ks(t){const e=He.c(139),{width:o,height:m,data:g,dataKey:i,hex:n,range:h,now:R,live:S,label:x}=t,v=S===void 0?null:S,p=`chart-hint-${i}`,[j,C]=M.useState(null),[X,$]=M.useState(!1),[E,ce]=M.useState(null),[de,se]=M.useState(!1),V=de?E:null,d=o-U.left-U.right,f=m-U.top-U.bottom,B=R,ne=B-pt[h],b=Qt({domain:[ne,B],range:[0,Math.max(0,d)]}),l=Wt({domain:[0,100],range:[f,kt]}),q=d>0?Ss/d*pt[h]:0,ee=ne-q,te=B+q;let D;e[0]!==h||e[1]!==ee||e[2]!==te?(D=fs(ee,te,h),e[0]=h,e[1]=ee,e[2]=te,e[3]=D):D=e[3];const G=D,z=d>0?Math.min(.5,Ns/d):0,I=`fill-${i}`,Q=`plot-${i}`,P=`axis-fade-${i}`,Y=g[g.length-1],w=v!==null&&Y?{t:Math.max(B,yt(Y)+1),v,live:!0}:null;let J;e[4]!==i?(J=a=>({t:yt(a),v:a[i]}),e[4]=i,e[5]=J):J=e[5];const c=g.map(J);w&&c.push(w);const K=a=>Math.min(b(a),d),Z=w?K(w.t):0,W=w?l(w.v):0,le=Math.max(0,g.length-1),r=j===null?Math.max(0,c.length-1):j==="live"?w?c.length-1:le:Math.min(bs(g,j),le),y=X?c[r]:void 0,L=y?K(y.t):0,_=y?l(y.v):0,A=Et[i].label;let F;e[6]!==A?(F=a=>`${A}, ${Nt(a.t)}, ${a.live?"latest, ":""}${Ve(a.v)}`,e[6]=A,e[7]=F):F=e[7];const oe=F,u=a=>{const O=c[a];O&&(C(O.live?"live":O.t),$(!0),ce({now:a,text:oe(O)}))};let T;e[8]===Symbol.for("react.memo_cache_sentinel")?(T=()=>$(!1),e[8]=T):T=e[8];const N=T;let k,ae;e[9]!==X?(k=()=>{if(!X)return;const a=O=>{O.key==="Escape"&&$(!1)};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},ae=[X],e[9]=X,e[10]=k,e[11]=ae):(k=e[10],ae=e[11]),M.useEffect(k,ae);const re=a=>{if(c.length===0)return;const O=r,Ke=a.key==="ArrowLeft"||a.key==="ArrowDown"?Math.max(0,O-1):a.key==="ArrowRight"||a.key==="ArrowUp"?Math.min(c.length-1,O+1):a.key==="Home"?0:a.key==="End"?c.length-1:null;Ke!==null&&(a.preventDefault(),u(Ke))},ie=a=>{const O=Xt(a);if(!O)return;const Ke=O.x-U.left,vt=ws(c,b.invert(Ke).getTime()),jt=[c[vt-1],c[vt],w].reduce((mt,ht)=>ht&&(!mt||Math.abs(K(ht.t)-Ke)<=Math.abs(K(mt.t)-Ke))?ht:mt,void 0);jt&&u(c.indexOf(jt))},Ue="group",Fe=w?`${x}, last ${h}. Now ${Ve(w.v)}.`:Y?`${x}, last ${h}. Latest ${Ve(Y[i])}.`:`${x}, last ${h}. No samples.`;let H;e[12]!==I||e[13]!==n?(H=s.jsx(zt,{id:I,from:n,to:n,fromOpacity:.3,toOpacity:0,fromOffset:"5%",toOffset:"95%"}),e[12]=I,e[13]=n,e[14]=H):H=e[14];const ze=Math.max(0,d),Ye=Math.max(0,f);let ue;e[15]!==ze||e[16]!==Ye?(ue=s.jsx("rect",{x:0,y:0,width:ze,height:Ye}),e[15]=ze,e[16]=Ye,e[17]=ue):ue=e[17];let fe;e[18]!==Q||e[19]!==ue?(fe=s.jsx("clipPath",{id:Q,children:ue}),e[18]=Q,e[19]=ue,e[20]=fe):fe=e[20];const Je=`${P}-grad`,Ze=Math.max(0,d);let Be;e[21]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx("stop",{offset:0,stopColor:"white",stopOpacity:0}),e[21]=Be):Be=e[21];let me;e[22]!==z?(me=s.jsx("stop",{offset:z,stopColor:"white",stopOpacity:1}),e[22]=z,e[23]=me):me=e[23];const et=1-z;let he;e[24]!==et?(he=s.jsx("stop",{offset:et,stopColor:"white",stopOpacity:1}),e[24]=et,e[25]=he):he=e[25];let qe;e[26]===Symbol.for("react.memo_cache_sentinel")?(qe=s.jsx("stop",{offset:1,stopColor:"white",stopOpacity:0}),e[26]=qe):qe=e[26];let xe;e[27]!==Je||e[28]!==Ze||e[29]!==me||e[30]!==he?(xe=s.jsxs("linearGradient",{id:Je,gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:Ze,y2:0,children:[Be,me,he,qe]}),e[27]=Je,e[28]=Ze,e[29]=me,e[30]=he,e[31]=xe):xe=e[31];const tt=Math.max(0,d),st=Math.max(0,d),nt=`url(#${P}-grad)`;let pe;e[32]!==f||e[33]!==st||e[34]!==nt?(pe=s.jsx("rect",{x:0,y:f,width:st,height:U.bottom*2,fill:nt}),e[32]=f,e[33]=st,e[34]=nt,e[35]=pe):pe=e[35];let ge;e[36]!==P||e[37]!==f||e[38]!==tt||e[39]!==pe?(ge=s.jsx("mask",{id:P,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse",x:0,y:f,width:tt,height:U.bottom*2,children:pe}),e[36]=P,e[37]=f,e[38]=tt,e[39]=pe,e[40]=ge):ge=e[40];let Ge;e[41]===Symbol.for("react.memo_cache_sentinel")?(Ge=[0,25,50,75,100],e[41]=Ge):Ge=e[41];let ye;e[42]!==d||e[43]!==l?(ye=s.jsx(Yt,{scale:l,width:d,tickValues:Ge,strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),e[42]=d,e[43]=l,e[44]=ye):ye=e[44];const lt=`url(#${Q})`;let ve;e[45]!==b?(ve=a=>b(a.t),e[45]=b,e[46]=ve):ve=e[46];let je;e[47]!==l?(je=a=>l(a.v),e[47]=l,e[48]=je):je=e[48];const ot=`url(#${I})`;let be;e[49]!==c||e[50]!==ve||e[51]!==je||e[52]!==ot||e[53]!==l?(be=s.jsx(Jt,{data:c,x:ve,y:je,yScale:l,curve:St,fill:ot}),e[49]=c,e[50]=ve,e[51]=je,e[52]=ot,e[53]=l,e[54]=be):be=e[54];let we;e[55]!==b?(we=a=>b(a.t),e[55]=b,e[56]=we):we=e[56];let Se;e[57]!==l?(Se=a=>l(a.v),e[57]=l,e[58]=Se):Se=e[58];let Ne;e[59]!==n||e[60]!==c||e[61]!==we||e[62]!==Se?(Ne=s.jsx(Zt,{data:c,x:we,y:Se,curve:St,stroke:n,strokeWidth:1.5}),e[59]=n,e[60]=c,e[61]=we,e[62]=Se,e[63]=Ne):Ne=e[63];let ke;e[64]!==lt||e[65]!==be||e[66]!==Ne?(ke=s.jsxs("g",{clipPath:lt,children:[be,Ne]}),e[64]=lt,e[65]=be,e[66]=Ne,e[67]=ke):ke=e[67];const at=`url(#${P})`;let Me;e[68]!==h?(Me=a=>ms(+a,h),e[68]=h,e[69]=Me):Me=e[69];let _e;e[70]!==f||e[71]!==Me||e[72]!==G||e[73]!==b?(_e=s.jsx(es,{top:f,scale:b,tickValues:G,tickFormat:Me,hideAxisLine:!0,hideTicks:!0,tickLength:0,tickLabelProps:As}),e[70]=f,e[71]=Me,e[72]=G,e[73]=b,e[74]=_e):_e=e[74];let Ae;e[75]!==at||e[76]!==_e?(Ae=s.jsx("g",{mask:at,children:_e}),e[75]=at,e[76]=_e,e[77]=Ae):Ae=e[77];let Qe;e[78]===Symbol.for("react.memo_cache_sentinel")?(Qe=[0,25,50,75,100],e[78]=Qe):Qe=e[78];let $e;e[79]!==l?($e=s.jsx(ts,{scale:l,tickValues:Qe,tickFormat:_s,hideAxisLine:!0,hideTicks:!0,tickLabelProps:Ms}),e[79]=l,e[80]=$e):$e=e[80];let Ee;e[81]!==Z||e[82]!==W||e[83]!==n||e[84]!==w?(Ee=w&&s.jsxs("g",{className:"live-head","aria-hidden":"true",pointerEvents:"none",children:[s.jsx("circle",{cx:Z,cy:W,r:Mt,fill:n,fillOpacity:.2}),s.jsx("circle",{cx:Z,cy:W,r:3,fill:n,stroke:"hsl(var(--background))",strokeWidth:1.5})]}),e[81]=Z,e[82]=W,e[83]=n,e[84]=w,e[85]=Ee):Ee=e[85];let Le;e[86]!==n||e[87]!==f||e[88]!==y||e[89]!==L||e[90]!==_?(Le=y&&s.jsxs("g",{style:{transition:"transform 0.25s ease-out",transform:`translateX(${L}px)`},pointerEvents:"none",children:[s.jsx(ss,{from:{x:0,y:kt},to:{x:0,y:f},stroke:"hsl(var(--border))",strokeWidth:1}),s.jsx("circle",{cx:0,cy:0,r:3,fill:n,stroke:"hsl(var(--background))",strokeWidth:1.5,style:{transition:"transform 0.25s ease-out",transform:`translateY(${_}px)`}})]}),e[86]=n,e[87]=f,e[88]=y,e[89]=L,e[90]=_,e[91]=Le):Le=e[91];const rt=Math.max(0,d)+Mt,it=Math.max(0,f),ct=`${x} samples`,dt=Math.max(0,c.length-1),ut=V?Math.min(V.now,Math.max(0,c.length-1)):r,ft=V?V.text:c[r]?oe(c[r]):void 0;let Te;e[92]!==r||e[93]!==u?(Te=()=>{se(!0),u(r)},e[92]=r,e[93]=u,e[94]=Te):Te=e[94];let Oe;e[95]!==N?(Oe=()=>{N(),se(!1)},e[95]=N,e[96]=Oe):Oe=e[96];let Re;e[97]!==re||e[98]!==ie||e[99]!==N||e[100]!==p||e[101]!==rt||e[102]!==it||e[103]!==ct||e[104]!==dt||e[105]!==ut||e[106]!==ft||e[107]!==Te||e[108]!==Oe?(Re=s.jsx(ns,{x:0,y:0,width:rt,height:it,fill:"transparent",tabIndex:0,role:"slider","aria-label":ct,"aria-valuemin":0,"aria-valuemax":dt,"aria-valuenow":ut,"aria-valuetext":ft,"aria-describedby":p,className:"outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",onFocus:Te,onBlur:Oe,onKeyDown:re,onMouseMove:ie,onMouseLeave:N,onTouchMove:ie,onTouchEnd:N,onTouchCancel:N}),e[97]=re,e[98]=ie,e[99]=N,e[100]=p,e[101]=rt,e[102]=it,e[103]=ct,e[104]=dt,e[105]=ut,e[106]=ft,e[107]=Te,e[108]=Oe,e[109]=Re):Re=e[109];let Ce;e[110]!==ye||e[111]!==ke||e[112]!==Ae||e[113]!==$e||e[114]!==Ee||e[115]!==Le||e[116]!==Re?(Ce=s.jsxs(ls,{left:U.left,top:U.top,children:[ye,ke,Ae,$e,Ee,Le,Re]}),e[110]=ye,e[111]=ke,e[112]=Ae,e[113]=$e,e[114]=Ee,e[115]=Le,e[116]=Re,e[117]=Ce):Ce=e[117];let De;e[118]!==m||e[119]!==Fe||e[120]!==H||e[121]!==fe||e[122]!==xe||e[123]!==ge||e[124]!==Ce||e[125]!==o?(De=s.jsxs("svg",{width:o,height:m,role:Ue,"aria-label":Fe,children:[H,fe,xe,ge,Ce]}),e[118]=m,e[119]=Fe,e[120]=H,e[121]=fe,e[122]=xe,e[123]=ge,e[124]=Ce,e[125]=o,e[126]=De):De=e[126];let Ie;e[127]!==p?(Ie=s.jsx("p",{id:p,className:"sr-only",children:"Use the arrow keys to read individual samples, and End for the latest value. Escape hides the reading."}),e[127]=p,e[128]=Ie):Ie=e[128];let Pe;e[129]!==d||e[130]!==A||e[131]!==y||e[132]!==L||e[133]!==_?(Pe=y&&s.jsxs("div",{"aria-hidden":"true",className:"pointer-events-none absolute top-0 left-0 whitespace-nowrap rounded-lg border bg-background px-3 py-2 text-xs text-foreground shadow-md",style:{transform:`translate(${L+U.left}px, ${_+U.top}px) translate(${L>d*.6?"calc(-100% - 12px)":"12px"}, -50%)`,transition:"transform 0.25s ease-out"},children:[s.jsxs("p",{className:"mb-1",children:["Date: ",Nt(y.t)]}),s.jsxs("p",{children:[A,": ",Ve(y.v)]})]}),e[129]=d,e[130]=A,e[131]=y,e[132]=L,e[133]=_,e[134]=Pe):Pe=e[134];let We;return e[135]!==De||e[136]!==Ie||e[137]!==Pe?(We=s.jsxs(s.Fragment,{children:[De,Ie,Pe]}),e[135]=De,e[136]=Ie,e[137]=Pe,e[138]=We):We=e[138],We}function Ms(){return{fontSize:11,fill:"currentColor",textAnchor:"end",dx:-4,dy:3,className:"fill-muted-foreground"}}function _s(t){return`${t}%`}function As(){return{fontSize:11,fill:"currentColor",textAnchor:"middle",dy:6,className:"fill-muted-foreground"}}export{ks as AreaChartInner,Is as MacResources};
1
+ import{r as M,c as He,j as s}from"./vendor-react-DTSdA8m-.js";import{ak as Tt,c as bt,b as Ot,ay as Rt,az as Ct,q as Xe,aA as Dt,Q as xt}from"./index-2zL1a5_0.js";import{u as It}from"./useRelay-CES3I1Mt.js";import{u as Pt,S as Kt}from"./useShownAfter-By1Yxysz.js";import{c as Ft,a as Ht,T as Ut}from"./tabs-CYoB-S2t.js";import{R as Bt}from"./resource-health-oWJ8hy9X.js";import{t as qt,a as wt,b as Gt,c as Qt,d as Wt,e as $t,l as Xt,P as Vt,L as zt,G as Yt,A as Jt,m as St,f as Zt,g as es,h as ts,i as ss,B as ns,j as ls}from"./vendor-charts-BE7R_8yA.js";import"./vendor-router-B1pQim9Z.js";const os=t=>(document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t));function as(){return M.useSyncExternalStore(os,is,rs)}function rs(){return!0}function is(){return document.visibilityState!=="hidden"}function cs(t,e){const o=He.c(4),[m,g]=M.useState(ds);let i,n;return o[0]!==e||o[1]!==t?(i=()=>{if(!e)return;g(Date.now());const h=setInterval(()=>g(Date.now()),t);return()=>clearInterval(h)},n=[t,e],o[0]=e,o[1]=t,o[2]=i,o[3]=n):(i=o[2],n=o[3]),M.useEffect(i,n),m}function ds(){return Date.now()}const pt={"1h":36e5,"6h":216e5,"24h":864e5,"7d":6048e5},us={"1h":Gt.every(10),"6h":wt,"24h":wt.every(3),"7d":qt};function fs(t,e,o){return us[o].range(new Date(t),new Date(e+1))}function ms(t,e){const o=new Date(t);return e==="7d"?`${o.getMonth()+1}/${o.getDate()}`:`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}`}const hs=2e3;function xs(t){return Math.min(1e4,Math.max(1e3,pt[t]/hs))}const ps={"1h":6e4,"6h":6e4,"24h":3e5,"7d":9e5},gt=t=>Math.round(t*10)/10;function gs(t,e,o){let m;for(const i of t){const n=i.agentName===e?i.resources:void 0;n&&(!m||n.reportedAt>m.reportedAt)&&(m=n)}if(!m||o-m.reportedAt>Bt)return null;const g=i=>Number.isFinite(i)?gt(i):null;return{cpu:g(m.cpuPercent),mem:g(m.memUsedMB/m.memTotalMB*100)}}const Et={cpu:{label:"CPU",color:"#60a5fa"},mem:{label:"RAM",color:"#a78bfa"}},Lt={"1h":"1h","6h":"6h","24h":"24h","7d":"7d"};function Is(){const t=He.c(66);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],t[0]=e):e=t[0];const[o,m]=M.useState(e),[g,i]=M.useState(null),[n,h]=M.useState("24h"),R=as();let S;t[1]!==n?(S=xs(n),t[1]=n,t[2]=S):S=t[2];const x=cs(S,R),{setNode:v}=Tt();let p,j;t[3]!==v?(p=()=>(v(s.jsx("span",{className:"text-sm font-medium",children:"Mac Resources"})),()=>v(null)),j=[v],t[3]=v,t[4]=p,t[5]=j):(p=t[4],j=t[5]),M.useEffect(p,j);let C;t[6]===Symbol.for("react.memo_cache_sentinel")?(C=u=>{u.type==="agents:listed"&&m(u.sessions??[])},t[6]=C):C=t[6];const X=C,{send:$,connected:E}=It(X);let ce,de;t[7]!==E||t[8]!==$?(ce=()=>{if(!E)return;$({type:"agents:list"});const u=setInterval(()=>$({type:"agents:list"}),1e4);return()=>clearInterval(u)},de=[E,$],t[7]=E,t[8]=$,t[9]=ce,t[10]=de):(ce=t[9],de=t[10]),M.useEffect(ce,de);let se;t[11]===Symbol.for("react.memo_cache_sentinel")?(se={queryKey:Xe.agents,queryFn:Ct,refetchOnWindowFocus:!1},t[11]=se):se=t[11];const V=bt(se);let d,f,B,ne;t[12]!==V.data||t[13]!==o?(B=V.data??[],f=o.map(js).filter(Boolean),d=[...new Set([...f,...B])],ne=new Set(f),t[12]=V.data,t[13]=o,t[14]=d,t[15]=f,t[16]=B,t[17]=ne):(d=t[14],f=t[15],B=t[16],ne=t[17]);const b=ne,l=g??(V.isPending?null:B[0]??f[0]??null),q=Ot();let ee;t[18]!==n||t[19]!==l?(ee=l?Xe.resourceHistory(l,n):null,t[18]=n,t[19]=l,t[20]=ee):ee=t[20];const te=ee;let D;t[21]!==te||t[22]!==n?(D=te??Xe.resourceHistory("",n),t[21]=te,t[22]=n,t[23]=D):D=t[23];let G;t[24]!==n||t[25]!==l?(G=u=>{const{signal:T}=u;return Dt(l,n,T)},t[24]=n,t[25]=l,t[26]=G):G=t[26];let z;t[27]!==D||t[28]!==G?(z={queryKey:D,queryFn:G,enabled:!1},t[27]=D,t[28]=G,t[29]=z):z=t[29];const I=bt(z),Q=I.refetch;let P,Y;t[30]!==q||t[31]!==n||t[32]!==Q||t[33]!==l||t[34]!==R?(P=()=>{if(!l||!R)return;const u=Xe.resourceHistory(l,n),T=ps[n],N=()=>{const H=q.getQueryState(u);(H==null?void 0:H.fetchStatus)==="fetching"&&H.data===void 0?q.cancelQueries({queryKey:u,exact:!0}).then(()=>Q()):Q({cancelRefetch:!0})},k=q.getQueryState(u),ae=Math.max((k==null?void 0:k.dataUpdatedAt)??0,(k==null?void 0:k.errorUpdatedAt)??0),re=(k==null?void 0:k.data)!==void 0&&ae>0?Math.max(0,T-(Date.now()-ae)):0;let ie;const Ue=()=>{N(),ie=setInterval(N,T)},Fe=re>0?setTimeout(Ue,re):void 0;return re===0&&Ue(),()=>{clearTimeout(Fe),clearInterval(ie),q.cancelQueries({queryKey:u,exact:!0})}},Y=[l,n,R,Q,q],t[30]=q,t[31]=n,t[32]=Q,t[33]=l,t[34]=R,t[35]=P,t[36]=Y):(P=t[35],Y=t[36]),M.useEffect(P,Y);const w=I.data!==void 0||I.isError,J=te!==null&&!w,c=Pt(J,Kt);let K;t[37]!==I.data?(K=I.data??[],t[37]=I.data,t[38]=K):K=t[38];let Z;t[39]!==K?(Z=K.map(vs),t[39]=K,t[40]=Z):Z=t[40];const W=Z;let le;t[41]!==x||t[42]!==l||t[43]!==o?(le=l?gs(o,l,x):null,t[41]=x,t[42]=l,t[43]=o,t[44]=le):le=t[44];const r=le;let y;t[45]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("h1",{className:"sr-only",children:"Mac Resources"}),t[45]=y):y=t[45];let L;t[46]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx("h2",{id:"macs-heading",className:"px-2 pb-1 font-mono text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Macs"}),t[46]=L):L=t[46];let _;t[47]!==d||t[48]!==E||t[49]!==b||t[50]!==l?(_=d.length===0?s.jsx("span",{className:"px-2 text-sm text-muted-foreground",children:E?"No agents yet.":"Connecting…"}):d.map(u=>{const T=b.has(u),N=l===u;return s.jsxs("button",{onClick:()=>i(u),"aria-current":N?"true":void 0,className:["flex items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent transition-colors",N?"bg-accent font-medium":""].join(" "),children:[s.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 rounded-full ${T?"bg-emerald-400":"bg-muted-foreground/40"}`,"aria-hidden":"true"}),s.jsx("span",{className:"truncate min-w-0",children:u}),s.jsx("span",{className:"sr-only",children:T?"Online":"Offline"})]},u)}),t[47]=d,t[48]=E,t[49]=b,t[50]=l,t[51]=_):_=t[51];let A;t[52]!==_?(A=s.jsxs("aside",{"aria-labelledby":"macs-heading",className:"w-64 shrink-0 border-r flex flex-col gap-1 p-3 overflow-y-auto",children:[L,_]}),t[52]=_,t[53]=A):A=t[53];let F;t[54]!==W||t[55]!==(r==null?void 0:r.cpu)||t[56]!==(r==null?void 0:r.mem)||t[57]!==J||t[58]!==x||t[59]!==n||t[60]!==l||t[61]!==c?(F=s.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:l?s.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-base font-semibold",children:l}),s.jsx(Ft,{value:n,onValueChange:u=>h(u),children:s.jsx(Ht,{children:Object.keys(Lt).map(ys)})})]}),J?s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("p",{className:"sr-only",children:"Loading…"}),s.jsxs("div",{className:c?"flex flex-col gap-6":"flex flex-col gap-6 invisible",children:[s.jsx(_t,{}),s.jsx(_t,{})]})]}):W.length===0?s.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"No data yet for this range. Data is collected every minute while the agent is connected."}):s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(At,{title:"CPU %",color:"cpu",data:W,dataKey:"cpu",range:n,now:x,live:(r==null?void 0:r.cpu)??null}),s.jsx(At,{title:"RAM %",color:"mem",data:W,dataKey:"mem",range:n,now:x,live:(r==null?void 0:r.mem)??null})]})]}):s.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-muted-foreground",children:[s.jsx(Rt,{className:"h-8 w-8"}),s.jsx("p",{className:"text-sm",children:"Select a Mac to view resource history."})]})}),t[54]=W,t[55]=r==null?void 0:r.cpu,t[56]=r==null?void 0:r.mem,t[57]=J,t[58]=x,t[59]=n,t[60]=l,t[61]=c,t[62]=F):F=t[62];let oe;return t[63]!==A||t[64]!==F?(oe=s.jsxs("div",{className:"flex h-full min-h-0",children:[y,A,F]}),t[63]=A,t[64]=F,t[65]=oe):oe=t[65],oe}function ys(t){return s.jsx(Ut,{value:t,children:Lt[t]},t)}function vs(t){return{time:t.recorded_at,cpu:gt(t.cpu_percent),mem:gt(t.mem_percent)}}function js(t){return t.agentName}const yt=t=>new Date(t.time).getTime(),Nt=t=>new Date(t).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),Ve=t=>`${Math.round(t*10)/10}%`,bs=$t(yt).left,ws=$t(t=>t.t).left,U={top:8,right:24,bottom:24,left:40},kt=16,Mt=6,Ss=20,Ns=40;function _t(){const t=He.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"rounded-lg border p-4 flex flex-col gap-3","aria-hidden":!0,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xt,{className:"h-2.5 w-2.5 rounded-full"}),s.jsx(xt,{className:"h-5 w-12"})]}),s.jsx(xt,{className:"h-[220px] w-full"})]}),t[0]=e):e=t[0],e}function At(t){const e=He.c(18),{title:o,color:m,data:g,dataKey:i,range:n,now:h,live:R}=t,S=Et[m].color;let x;e[0]!==S?(x=s.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{background:S}}),e[0]=S,e[1]=x):x=e[1];let v;e[2]!==o?(v=s.jsx("h2",{className:"text-sm font-medium",children:o}),e[2]=o,e[3]=v):v=e[3];let p;e[4]!==x||e[5]!==v?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[x,v]}),e[4]=x,e[5]=v,e[6]=p):p=e[6];let j;e[7]!==g||e[8]!==i||e[9]!==S||e[10]!==R||e[11]!==h||e[12]!==n||e[13]!==o?(j=s.jsx("div",{className:"relative h-[220px] w-full",children:s.jsx(Vt,{children:X=>{const{width:$,height:E}=X;return $>0&&E>0?s.jsx(ks,{width:$,height:E,data:g,dataKey:i,hex:S,range:n,now:h,live:R,label:o}):null}})}),e[7]=g,e[8]=i,e[9]=S,e[10]=R,e[11]=h,e[12]=n,e[13]=o,e[14]=j):j=e[14];let C;return e[15]!==p||e[16]!==j?(C=s.jsxs("div",{className:"rounded-lg border p-4 flex flex-col gap-3",children:[p,j]}),e[15]=p,e[16]=j,e[17]=C):C=e[17],C}function ks(t){const e=He.c(139),{width:o,height:m,data:g,dataKey:i,hex:n,range:h,now:R,live:S,label:x}=t,v=S===void 0?null:S,p=`chart-hint-${i}`,[j,C]=M.useState(null),[X,$]=M.useState(!1),[E,ce]=M.useState(null),[de,se]=M.useState(!1),V=de?E:null,d=o-U.left-U.right,f=m-U.top-U.bottom,B=R,ne=B-pt[h],b=Qt({domain:[ne,B],range:[0,Math.max(0,d)]}),l=Wt({domain:[0,100],range:[f,kt]}),q=d>0?Ss/d*pt[h]:0,ee=ne-q,te=B+q;let D;e[0]!==h||e[1]!==ee||e[2]!==te?(D=fs(ee,te,h),e[0]=h,e[1]=ee,e[2]=te,e[3]=D):D=e[3];const G=D,z=d>0?Math.min(.5,Ns/d):0,I=`fill-${i}`,Q=`plot-${i}`,P=`axis-fade-${i}`,Y=g[g.length-1],w=v!==null&&Y?{t:Math.max(B,yt(Y)+1),v,live:!0}:null;let J;e[4]!==i?(J=a=>({t:yt(a),v:a[i]}),e[4]=i,e[5]=J):J=e[5];const c=g.map(J);w&&c.push(w);const K=a=>Math.min(b(a),d),Z=w?K(w.t):0,W=w?l(w.v):0,le=Math.max(0,g.length-1),r=j===null?Math.max(0,c.length-1):j==="live"?w?c.length-1:le:Math.min(bs(g,j),le),y=X?c[r]:void 0,L=y?K(y.t):0,_=y?l(y.v):0,A=Et[i].label;let F;e[6]!==A?(F=a=>`${A}, ${Nt(a.t)}, ${a.live?"latest, ":""}${Ve(a.v)}`,e[6]=A,e[7]=F):F=e[7];const oe=F,u=a=>{const O=c[a];O&&(C(O.live?"live":O.t),$(!0),ce({now:a,text:oe(O)}))};let T;e[8]===Symbol.for("react.memo_cache_sentinel")?(T=()=>$(!1),e[8]=T):T=e[8];const N=T;let k,ae;e[9]!==X?(k=()=>{if(!X)return;const a=O=>{O.key==="Escape"&&$(!1)};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},ae=[X],e[9]=X,e[10]=k,e[11]=ae):(k=e[10],ae=e[11]),M.useEffect(k,ae);const re=a=>{if(c.length===0)return;const O=r,Ke=a.key==="ArrowLeft"||a.key==="ArrowDown"?Math.max(0,O-1):a.key==="ArrowRight"||a.key==="ArrowUp"?Math.min(c.length-1,O+1):a.key==="Home"?0:a.key==="End"?c.length-1:null;Ke!==null&&(a.preventDefault(),u(Ke))},ie=a=>{const O=Xt(a);if(!O)return;const Ke=O.x-U.left,vt=ws(c,b.invert(Ke).getTime()),jt=[c[vt-1],c[vt],w].reduce((mt,ht)=>ht&&(!mt||Math.abs(K(ht.t)-Ke)<=Math.abs(K(mt.t)-Ke))?ht:mt,void 0);jt&&u(c.indexOf(jt))},Ue="group",Fe=w?`${x}, last ${h}. Now ${Ve(w.v)}.`:Y?`${x}, last ${h}. Latest ${Ve(Y[i])}.`:`${x}, last ${h}. No samples.`;let H;e[12]!==I||e[13]!==n?(H=s.jsx(zt,{id:I,from:n,to:n,fromOpacity:.3,toOpacity:0,fromOffset:"5%",toOffset:"95%"}),e[12]=I,e[13]=n,e[14]=H):H=e[14];const ze=Math.max(0,d),Ye=Math.max(0,f);let ue;e[15]!==ze||e[16]!==Ye?(ue=s.jsx("rect",{x:0,y:0,width:ze,height:Ye}),e[15]=ze,e[16]=Ye,e[17]=ue):ue=e[17];let fe;e[18]!==Q||e[19]!==ue?(fe=s.jsx("clipPath",{id:Q,children:ue}),e[18]=Q,e[19]=ue,e[20]=fe):fe=e[20];const Je=`${P}-grad`,Ze=Math.max(0,d);let Be;e[21]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx("stop",{offset:0,stopColor:"white",stopOpacity:0}),e[21]=Be):Be=e[21];let me;e[22]!==z?(me=s.jsx("stop",{offset:z,stopColor:"white",stopOpacity:1}),e[22]=z,e[23]=me):me=e[23];const et=1-z;let he;e[24]!==et?(he=s.jsx("stop",{offset:et,stopColor:"white",stopOpacity:1}),e[24]=et,e[25]=he):he=e[25];let qe;e[26]===Symbol.for("react.memo_cache_sentinel")?(qe=s.jsx("stop",{offset:1,stopColor:"white",stopOpacity:0}),e[26]=qe):qe=e[26];let xe;e[27]!==Je||e[28]!==Ze||e[29]!==me||e[30]!==he?(xe=s.jsxs("linearGradient",{id:Je,gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:Ze,y2:0,children:[Be,me,he,qe]}),e[27]=Je,e[28]=Ze,e[29]=me,e[30]=he,e[31]=xe):xe=e[31];const tt=Math.max(0,d),st=Math.max(0,d),nt=`url(#${P}-grad)`;let pe;e[32]!==f||e[33]!==st||e[34]!==nt?(pe=s.jsx("rect",{x:0,y:f,width:st,height:U.bottom*2,fill:nt}),e[32]=f,e[33]=st,e[34]=nt,e[35]=pe):pe=e[35];let ge;e[36]!==P||e[37]!==f||e[38]!==tt||e[39]!==pe?(ge=s.jsx("mask",{id:P,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse",x:0,y:f,width:tt,height:U.bottom*2,children:pe}),e[36]=P,e[37]=f,e[38]=tt,e[39]=pe,e[40]=ge):ge=e[40];let Ge;e[41]===Symbol.for("react.memo_cache_sentinel")?(Ge=[0,25,50,75,100],e[41]=Ge):Ge=e[41];let ye;e[42]!==d||e[43]!==l?(ye=s.jsx(Yt,{scale:l,width:d,tickValues:Ge,strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),e[42]=d,e[43]=l,e[44]=ye):ye=e[44];const lt=`url(#${Q})`;let ve;e[45]!==b?(ve=a=>b(a.t),e[45]=b,e[46]=ve):ve=e[46];let je;e[47]!==l?(je=a=>l(a.v),e[47]=l,e[48]=je):je=e[48];const ot=`url(#${I})`;let be;e[49]!==c||e[50]!==ve||e[51]!==je||e[52]!==ot||e[53]!==l?(be=s.jsx(Jt,{data:c,x:ve,y:je,yScale:l,curve:St,fill:ot}),e[49]=c,e[50]=ve,e[51]=je,e[52]=ot,e[53]=l,e[54]=be):be=e[54];let we;e[55]!==b?(we=a=>b(a.t),e[55]=b,e[56]=we):we=e[56];let Se;e[57]!==l?(Se=a=>l(a.v),e[57]=l,e[58]=Se):Se=e[58];let Ne;e[59]!==n||e[60]!==c||e[61]!==we||e[62]!==Se?(Ne=s.jsx(Zt,{data:c,x:we,y:Se,curve:St,stroke:n,strokeWidth:1.5}),e[59]=n,e[60]=c,e[61]=we,e[62]=Se,e[63]=Ne):Ne=e[63];let ke;e[64]!==lt||e[65]!==be||e[66]!==Ne?(ke=s.jsxs("g",{clipPath:lt,children:[be,Ne]}),e[64]=lt,e[65]=be,e[66]=Ne,e[67]=ke):ke=e[67];const at=`url(#${P})`;let Me;e[68]!==h?(Me=a=>ms(+a,h),e[68]=h,e[69]=Me):Me=e[69];let _e;e[70]!==f||e[71]!==Me||e[72]!==G||e[73]!==b?(_e=s.jsx(es,{top:f,scale:b,tickValues:G,tickFormat:Me,hideAxisLine:!0,hideTicks:!0,tickLength:0,tickLabelProps:As}),e[70]=f,e[71]=Me,e[72]=G,e[73]=b,e[74]=_e):_e=e[74];let Ae;e[75]!==at||e[76]!==_e?(Ae=s.jsx("g",{mask:at,children:_e}),e[75]=at,e[76]=_e,e[77]=Ae):Ae=e[77];let Qe;e[78]===Symbol.for("react.memo_cache_sentinel")?(Qe=[0,25,50,75,100],e[78]=Qe):Qe=e[78];let $e;e[79]!==l?($e=s.jsx(ts,{scale:l,tickValues:Qe,tickFormat:_s,hideAxisLine:!0,hideTicks:!0,tickLabelProps:Ms}),e[79]=l,e[80]=$e):$e=e[80];let Ee;e[81]!==Z||e[82]!==W||e[83]!==n||e[84]!==w?(Ee=w&&s.jsxs("g",{className:"live-head","aria-hidden":"true",pointerEvents:"none",children:[s.jsx("circle",{cx:Z,cy:W,r:Mt,fill:n,fillOpacity:.2}),s.jsx("circle",{cx:Z,cy:W,r:3,fill:n,stroke:"hsl(var(--background))",strokeWidth:1.5})]}),e[81]=Z,e[82]=W,e[83]=n,e[84]=w,e[85]=Ee):Ee=e[85];let Le;e[86]!==n||e[87]!==f||e[88]!==y||e[89]!==L||e[90]!==_?(Le=y&&s.jsxs("g",{style:{transition:"transform 0.25s ease-out",transform:`translateX(${L}px)`},pointerEvents:"none",children:[s.jsx(ss,{from:{x:0,y:kt},to:{x:0,y:f},stroke:"hsl(var(--border))",strokeWidth:1}),s.jsx("circle",{cx:0,cy:0,r:3,fill:n,stroke:"hsl(var(--background))",strokeWidth:1.5,style:{transition:"transform 0.25s ease-out",transform:`translateY(${_}px)`}})]}),e[86]=n,e[87]=f,e[88]=y,e[89]=L,e[90]=_,e[91]=Le):Le=e[91];const rt=Math.max(0,d)+Mt,it=Math.max(0,f),ct=`${x} samples`,dt=Math.max(0,c.length-1),ut=V?Math.min(V.now,Math.max(0,c.length-1)):r,ft=V?V.text:c[r]?oe(c[r]):void 0;let Te;e[92]!==r||e[93]!==u?(Te=()=>{se(!0),u(r)},e[92]=r,e[93]=u,e[94]=Te):Te=e[94];let Oe;e[95]!==N?(Oe=()=>{N(),se(!1)},e[95]=N,e[96]=Oe):Oe=e[96];let Re;e[97]!==re||e[98]!==ie||e[99]!==N||e[100]!==p||e[101]!==rt||e[102]!==it||e[103]!==ct||e[104]!==dt||e[105]!==ut||e[106]!==ft||e[107]!==Te||e[108]!==Oe?(Re=s.jsx(ns,{x:0,y:0,width:rt,height:it,fill:"transparent",tabIndex:0,role:"slider","aria-label":ct,"aria-valuemin":0,"aria-valuemax":dt,"aria-valuenow":ut,"aria-valuetext":ft,"aria-describedby":p,className:"outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",onFocus:Te,onBlur:Oe,onKeyDown:re,onMouseMove:ie,onMouseLeave:N,onTouchMove:ie,onTouchEnd:N,onTouchCancel:N}),e[97]=re,e[98]=ie,e[99]=N,e[100]=p,e[101]=rt,e[102]=it,e[103]=ct,e[104]=dt,e[105]=ut,e[106]=ft,e[107]=Te,e[108]=Oe,e[109]=Re):Re=e[109];let Ce;e[110]!==ye||e[111]!==ke||e[112]!==Ae||e[113]!==$e||e[114]!==Ee||e[115]!==Le||e[116]!==Re?(Ce=s.jsxs(ls,{left:U.left,top:U.top,children:[ye,ke,Ae,$e,Ee,Le,Re]}),e[110]=ye,e[111]=ke,e[112]=Ae,e[113]=$e,e[114]=Ee,e[115]=Le,e[116]=Re,e[117]=Ce):Ce=e[117];let De;e[118]!==m||e[119]!==Fe||e[120]!==H||e[121]!==fe||e[122]!==xe||e[123]!==ge||e[124]!==Ce||e[125]!==o?(De=s.jsxs("svg",{width:o,height:m,role:Ue,"aria-label":Fe,children:[H,fe,xe,ge,Ce]}),e[118]=m,e[119]=Fe,e[120]=H,e[121]=fe,e[122]=xe,e[123]=ge,e[124]=Ce,e[125]=o,e[126]=De):De=e[126];let Ie;e[127]!==p?(Ie=s.jsx("p",{id:p,className:"sr-only",children:"Use the arrow keys to read individual samples, and End for the latest value. Escape hides the reading."}),e[127]=p,e[128]=Ie):Ie=e[128];let Pe;e[129]!==d||e[130]!==A||e[131]!==y||e[132]!==L||e[133]!==_?(Pe=y&&s.jsxs("div",{"aria-hidden":"true",className:"pointer-events-none absolute top-0 left-0 whitespace-nowrap rounded-lg border bg-background px-3 py-2 text-xs text-foreground shadow-md",style:{transform:`translate(${L+U.left}px, ${_+U.top}px) translate(${L>d*.6?"calc(-100% - 12px)":"12px"}, -50%)`,transition:"transform 0.25s ease-out"},children:[s.jsxs("p",{className:"mb-1",children:["Date: ",Nt(y.t)]}),s.jsxs("p",{children:[A,": ",Ve(y.v)]})]}),e[129]=d,e[130]=A,e[131]=y,e[132]=L,e[133]=_,e[134]=Pe):Pe=e[134];let We;return e[135]!==De||e[136]!==Ie||e[137]!==Pe?(We=s.jsxs(s.Fragment,{children:[De,Ie,Pe]}),e[135]=De,e[136]=Ie,e[137]=Pe,e[138]=We):We=e[138],We}function Ms(){return{fontSize:11,fill:"currentColor",textAnchor:"end",dx:-4,dy:3,className:"fill-muted-foreground"}}function _s(t){return`${t}%`}function As(){return{fontSize:11,fill:"currentColor",textAnchor:"middle",dy:6,className:"fill-muted-foreground"}}export{ks as AreaChartInner,Is as MacResources};
@@ -1,4 +1,4 @@
1
- import{c as de,r as a,j as r}from"./vendor-react-DTSdA8m-.js";import{G as ht,a1 as zs,a2 as Fe,K as Pt,M as At,N as Lt,B as Xe,a3 as Hn,T as ar,S as Br,H as xt,a4 as Us,a5 as Rn,a6 as kn,a7 as Ks,a8 as Fr,a9 as On,aa as Ws,ab as Vs,ac as sr,ad as jn,b as qr,c as zr,ae as Ys,q as rr,af as Xs,ag as Gs,ah as Qs,O as Zs,ai as Js,aj as eo,ak as to,L as no}from"./index-C_3Q51YJ.js";import{u as Ur,n as je}from"./useRelay-CES3I1Mt.js";import{p as ro,u as Kr,a as so,i as oo,b as lo,c as ao,t as Wr,I as io,d as co,e as uo,f as wr,r as fo,g as ho,A as po,o as mo,M as Sr,h as go,j as bo,k as xo,C as yo,H as jr,l as vo,s as Rr}from"./AndroidDeviceScreen-C55msKfh.js";import{c as Vr,a as wo}from"./vendor-router-B1pQim9Z.js";import{g as So,d as jo,A as Ro,a as ko,b as Co,e as _o,c as No,f as To}from"./alert-dialog-C0mRms8g.js";import{L as Yr,H as Xr,K as Eo,A as Io,D as Po,h as Ao}from"./aiSession-U7UqgdSb.js";import{V as Lo}from"./video-DdHH0Q0l.js";import{b as Gr,a as Do,e as Mo,c as Qr,f as $o,d as Zr}from"./dialog-Cugbp1C4.js";import{a as Oo,S as Ho}from"./search-input-B0s9mzRt.js";import{P as Jr}from"./play-Z1L2Eb91.js";import{T as kr,a as Bo,b as Cr,c as Fo}from"./tabs-Bf7ou-eS.js";import{c as qo}from"./index-D17hSi50.js";import{l as _r,j as zo}from"./publicLink-D6zKS_wu.js";import{u as Uo}from"./useShownAfter-By1Yxysz.js";import{d as Ko,S as Wo,a as Vo,b as Yo,c as es}from"./select-CHbE6M4S.js";import{B as Xo}from"./badge-BjEnOmb0.js";import{P as Go,a as Nr,S as Qo}from"./build-format-ofd2iIzf.js";import{R as Zo,g as Jo}from"./resource-health-oWJ8hy9X.js";/**
1
+ import{c as de,r as a,j as r}from"./vendor-react-DTSdA8m-.js";import{G as ht,a1 as zs,a2 as Fe,K as Pt,M as At,N as Lt,B as Xe,a3 as Hn,T as ar,S as Br,H as xt,a4 as Us,a5 as Rn,a6 as kn,a7 as Ks,a8 as Fr,a9 as On,aa as Ws,ab as Vs,ac as sr,ad as jn,b as qr,c as zr,ae as Ys,q as rr,af as Xs,ag as Gs,ah as Qs,O as Zs,ai as Js,aj as eo,ak as to,L as no}from"./index-2zL1a5_0.js";import{u as Ur,n as je}from"./useRelay-CES3I1Mt.js";import{p as ro,u as Kr,a as so,i as oo,b as lo,c as ao,t as Wr,I as io,d as co,e as uo,f as wr,r as fo,g as ho,A as po,o as mo,M as Sr,h as go,j as bo,k as xo,C as yo,H as jr,l as vo,s as Rr}from"./AndroidDeviceScreen-C55msKfh.js";import{c as Vr,a as wo}from"./vendor-router-B1pQim9Z.js";import{g as So,d as jo,A as Ro,a as ko,b as Co,e as _o,c as No,f as To}from"./alert-dialog-nxQTqXgk.js";import{L as Yr,H as Xr,K as Eo,A as Io,D as Po,h as Ao}from"./aiSession-DE80E1QU.js";import{V as Lo}from"./video-CilstoqV.js";import{b as Gr,a as Do,e as Mo,c as Qr,f as $o,d as Zr}from"./dialog-CTc84wr4.js";import{a as Oo,S as Ho}from"./search-input-BK7cFT1m.js";import{P as Jr}from"./play-Dab2J3Tw.js";import{T as kr,a as Bo,b as Cr,c as Fo}from"./tabs-CYoB-S2t.js";import{c as qo}from"./index-D17hSi50.js";import{l as _r,j as zo}from"./publicLink-D6zKS_wu.js";import{u as Uo}from"./useShownAfter-By1Yxysz.js";import{d as Ko,S as Wo,a as Vo,b as Yo,c as es}from"./select-BH7E2Q0r.js";import{B as Xo}from"./badge-DM1m4CLq.js";import{P as Go,a as Nr,S as Qo}from"./build-format-ofd2iIzf.js";import{R as Zo,g as Jo}from"./resource-health-oWJ8hy9X.js";/**
2
2
  * @license lucide-react v1.59.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as s}from"./vendor-react-DTSdA8m-.js";import{u as k,a as q,b as E,c as O,C as w,d as h,e as f,m as x,f as R,L as j,I as y,g as H,P as I,F as i,B as _,h as A,q as g,o as D,s as v,i as L,j as B,r as K}from"./index-C_3Q51YJ.js";import{F as Q}from"./field-hint-qmBa0qqN.js";import{a as W,c as G}from"./vendor-router-B1pQim9Z.js";const J=D({password:v().min(L,B),confirm:v()}).refine(a=>a.password===a.confirm,{message:"Passwords do not match",path:["confirm"]});function X(){var l,m,p;const a=W(),[b]=G(),r=b.get("token")??"",{register:o,handleSubmit:N,setError:t,formState:{errors:e,isSubmitting:n,submitCount:S}}=k({shouldFocusError:!1,resolver:q(J)}),C=E(),d=O({queryKey:g.resetToken(r),queryFn:()=>K(r),enabled:r!=="",staleTime:1/0}),c=!r||d.isError?"invalid":d.isPending?"loading":"valid";async function T(F){try{const u=await fetch("/api/v1/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:r,password:F.password})});if(!u.ok){const P=await u.json();t("root",{message:P.error??"Failed to reset password"});return}C.removeQueries({queryKey:g.resetToken(r)}),a("/login",{replace:!0})}catch{t("root",{message:"Network error. Please try again."})}}return c==="loading"?s.jsx("div",{className:"flex min-h-svh items-center justify-center"}):c==="invalid"?s.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:s.jsx(w,{level:4,className:"w-full max-w-sm text-center",children:s.jsxs(h,{children:[s.jsx(f,{children:"Link expired"}),s.jsx(x,{children:"This password reset link is invalid or has expired. Ask your admin to send a new one."})]})})}):s.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:s.jsxs(w,{level:4,className:"w-full max-w-sm",children:[s.jsxs(h,{className:"text-center",children:[s.jsx(f,{children:"Reset password"}),s.jsx(x,{children:"Enter your new password below."})]}),s.jsx(R,{children:s.jsxs("form",{onSubmit:N(T),className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(j,{htmlFor:"password",children:"New password"}),s.jsx(y,{id:"password",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!e.password,"aria-describedby":H("password-hint","password-error",!!e.password),...o("password")}),!e.password&&s.jsx(Q,{id:"password-hint",children:I}),s.jsx(i,{id:"password-error",message:(l=e.password)==null?void 0:l.message})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(j,{htmlFor:"confirm",children:"Confirm password"}),s.jsx(y,{id:"confirm",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!e.confirm,"aria-describedby":e.confirm?"confirm-error":void 0,...o("confirm")}),s.jsx(i,{id:"confirm-error",message:(m=e.confirm)==null?void 0:m.message})]}),s.jsx(i,{assertive:!0,id:"resetpassword-error",message:(p=e.root)==null?void 0:p.message}),s.jsx(_,{type:"submit",disabled:n,className:"w-full",children:n?"Saving…":"Set new password"}),s.jsx(A,{errors:e,submitCount:S})]})})]})})}export{X as ResetPassword};
1
+ import{j as s}from"./vendor-react-DTSdA8m-.js";import{u as k,a as q,b as E,c as O,C as w,d as h,e as f,m as x,f as R,L as j,I as y,g as H,P as I,F as i,B as _,h as A,q as g,o as D,s as v,i as L,j as B,r as K}from"./index-2zL1a5_0.js";import{F as Q}from"./field-hint-xptj_gfn.js";import{a as W,c as G}from"./vendor-router-B1pQim9Z.js";const J=D({password:v().min(L,B),confirm:v()}).refine(a=>a.password===a.confirm,{message:"Passwords do not match",path:["confirm"]});function X(){var l,m,p;const a=W(),[b]=G(),r=b.get("token")??"",{register:o,handleSubmit:N,setError:t,formState:{errors:e,isSubmitting:n,submitCount:S}}=k({shouldFocusError:!1,resolver:q(J)}),C=E(),d=O({queryKey:g.resetToken(r),queryFn:()=>K(r),enabled:r!=="",staleTime:1/0}),c=!r||d.isError?"invalid":d.isPending?"loading":"valid";async function T(F){try{const u=await fetch("/api/v1/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:r,password:F.password})});if(!u.ok){const P=await u.json();t("root",{message:P.error??"Failed to reset password"});return}C.removeQueries({queryKey:g.resetToken(r)}),a("/login",{replace:!0})}catch{t("root",{message:"Network error. Please try again."})}}return c==="loading"?s.jsx("div",{className:"flex min-h-svh items-center justify-center"}):c==="invalid"?s.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:s.jsx(w,{level:4,className:"w-full max-w-sm text-center",children:s.jsxs(h,{children:[s.jsx(f,{children:"Link expired"}),s.jsx(x,{children:"This password reset link is invalid or has expired. Ask your admin to send a new one."})]})})}):s.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:s.jsxs(w,{level:4,className:"w-full max-w-sm",children:[s.jsxs(h,{className:"text-center",children:[s.jsx(f,{children:"Reset password"}),s.jsx(x,{children:"Enter your new password below."})]}),s.jsx(R,{children:s.jsxs("form",{onSubmit:N(T),className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(j,{htmlFor:"password",children:"New password"}),s.jsx(y,{id:"password",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!e.password,"aria-describedby":H("password-hint","password-error",!!e.password),...o("password")}),!e.password&&s.jsx(Q,{id:"password-hint",children:I}),s.jsx(i,{id:"password-error",message:(l=e.password)==null?void 0:l.message})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(j,{htmlFor:"confirm",children:"Confirm password"}),s.jsx(y,{id:"confirm",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!e.confirm,"aria-describedby":e.confirm?"confirm-error":void 0,...o("confirm")}),s.jsx(i,{id:"confirm-error",message:(m=e.confirm)==null?void 0:m.message})]}),s.jsx(i,{assertive:!0,id:"resetpassword-error",message:(p=e.root)==null?void 0:p.message}),s.jsx(_,{type:"submit",disabled:n,className:"w-full",children:n?"Saving…":"Set new password"}),s.jsx(A,{errors:e,submitCount:S})]})})]})})}export{X as ResetPassword};
@@ -1,4 +1,4 @@
1
- import{c as B,r as S,j as t}from"./vendor-react-DTSdA8m-.js";import{G,c as ie,an as je,ao as ye,ap as Ne,aq as ve,T as be,K as ne,M as ae,ar as P,N as le,B as A,as as we,q as ce,at as ke,au as Se,ak as Me,av as Re,aw as $e,I as Ce,H as oe}from"./index-C_3Q51YJ.js";import{B as H}from"./badge-BjEnOmb0.js";import{T as F}from"./tech-label-KAwM5qZ_.js";import{r as de,d as Ie,f as ue,b as Te,s as Ee,a as qe,c as _e,p as Le,S as De,e as fe,U as Fe}from"./runs-CFQ6M4rx.js";import{S as Pe}from"./slider-tyb3JvL2.js";import{d as Ae,S as Be,a as ze,b as Ve,c as Ke}from"./select-CHbE6M4S.js";import{W as Oe}from"./WatchedDevice-CpaKHa1x.js";import{k as Ue,C as We,H as He}from"./AndroidDeviceScreen-C55msKfh.js";import{P as Qe}from"./play-Z1L2Eb91.js";import{V as Ge}from"./video-DdHH0Q0l.js";import{d as Ze,L as Q}from"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";/**
1
+ import{c as B,r as S,j as t}from"./vendor-react-DTSdA8m-.js";import{G,c as ie,an as je,ao as ye,ap as Ne,aq as ve,T as be,K as ne,M as ae,ar as P,N as le,B as A,as as we,q as ce,at as ke,au as Se,ak as Me,av as Re,aw as $e,I as Ce,H as oe}from"./index-2zL1a5_0.js";import{B as H}from"./badge-DM1m4CLq.js";import{T as F}from"./tech-label-fz5PvoAL.js";import{r as de,d as Ie,f as ue,b as Te,s as Ee,a as qe,c as _e,p as Le,S as De,e as fe,U as Fe}from"./runs-CFQ6M4rx.js";import{S as Pe}from"./slider-B4sPZi8m.js";import{d as Ae,S as Be,a as ze,b as Ve,c as Ke}from"./select-BH7E2Q0r.js";import{W as Oe}from"./WatchedDevice-CpaKHa1x.js";import{k as Ue,C as We,H as He}from"./AndroidDeviceScreen-C55msKfh.js";import{P as Qe}from"./play-Dab2J3Tw.js";import{V as Ge}from"./video-CilstoqV.js";import{d as Ze,L as Q}from"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";/**
2
2
  * @license lucide-react v1.59.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as xe,r as Z,j as l}from"./vendor-react-DTSdA8m-.js";import{G as Ke,ak as Oe,c as Ue,O as qe,q as Ge,al as He,$ as Ve,B as Ee,am as We}from"./index-C_3Q51YJ.js";import{B as Be}from"./badge-BjEnOmb0.js";import{S as ze}from"./search-input-B0s9mzRt.js";import{T as Re}from"./tech-label-KAwM5qZ_.js";import{a as Me,T as he,c as Qe}from"./tabs-Bf7ou-eS.js";import{S as Xe,a as Je,b as Ye,c as ke,d as Ze}from"./select-CHbE6M4S.js";import{l as et,T as tt,a as st,b as X,c as lt,d as De,e as J,L as at}from"./list-view-CyM0QUaH.js";import{u as rt}from"./useFocusAfterSwap-BdItkQCu.js";import{r as Fe,f as nt,a as Ce,b as it,c as ot,R as ct,p as ut}from"./runs-CFQ6M4rx.js";import{c as dt,a as ft,L as mt}from"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";import"./useShownAfter-By1Yxysz.js";/**
1
+ import{c as xe,r as Z,j as l}from"./vendor-react-DTSdA8m-.js";import{G as Ke,ak as Oe,c as Ue,O as qe,q as Ge,al as He,$ as Ve,B as Ee,am as We}from"./index-2zL1a5_0.js";import{B as Be}from"./badge-DM1m4CLq.js";import{S as ze}from"./search-input-BK7cFT1m.js";import{T as Re}from"./tech-label-fz5PvoAL.js";import{a as Me,T as he,c as Qe}from"./tabs-CYoB-S2t.js";import{S as Xe,a as Je,b as Ye,c as ke,d as Ze}from"./select-BH7E2Q0r.js";import{l as et,T as tt,a as st,b as X,c as lt,d as De,e as J,L as at}from"./list-view-BzI8tLvX.js";import{u as rt}from"./useFocusAfterSwap-BdItkQCu.js";import{r as Fe,f as nt,a as Ce,b as it,c as ot,R as ct,p as ut}from"./runs-CFQ6M4rx.js";import{c as dt,a as ft,L as mt}from"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";import"./useShownAfter-By1Yxysz.js";/**
2
2
  * @license lucide-react v1.59.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as e}from"./vendor-react-DTSdA8m-.js";import{z as A,u as O,a as P,b as k,c as I,C as _,d as q,e as D,f as E,I as t,L as l,F as i,g as R,P as L,B as W,h as z,q as w,o as H,s as d,i as M,j as B,k as Q}from"./index-C_3Q51YJ.js";import{F as K}from"./field-hint-qmBa0qqN.js";import{a as G,N as J}from"./vendor-router-B1pQim9Z.js";const U=H({email:d().email("Enter a valid email"),password:d().min(M,B),confirm:d()}).refine(a=>a.password===a.confirm,{message:"Passwords do not match",path:["confirm"]});function $(){var u,p,h,x,f,g;const a=G(),{resolvedTheme:y}=A(),N=y==="dark"?"/logo-dark.svg":"/logo.svg",{register:o,handleSubmit:v,setError:m,formState:{errors:s,isSubmitting:c,submitCount:b}}=O({shouldFocusError:!1,resolver:P(U)}),S=k(),n=I({queryKey:w.authStatus,queryFn:Q,staleTime:1/0});async function C(r){try{const j=await fetch("/api/v1/auth/init",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r.email,password:r.password})});if(!j.ok){const T=await j.json();m("root",{message:T.error??"Failed to create account"});return}S.setQueryData(w.authStatus,{initialized:!0}),a("/login",{replace:!0})}catch{m("root",{message:"Network error. Please try again."})}}if((u=n.data)!=null&&u.initialized)return e.jsx(J,{to:"/login",replace:!0});if(n.isPending)return null;const F=((p=n.data)==null?void 0:p.canInitialize)===!1;return e.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:e.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:N,alt:"tapflow",className:"w-6 h-6"}),e.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),e.jsxs(_,{level:4,className:"w-full",children:[e.jsx(q,{className:"text-center",children:e.jsx(D,{className:"text-2xl tracking-display-md",children:"Set up tapflow"})}),e.jsx(E,{children:F?e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{id:"setup-remote-command",className:"text-sm text-muted-foreground",children:"The admin account can only be created on the machine running the relay. Run this there, then reload this page:"}),e.jsx(t,{readOnly:!0,value:"tapflow admin init","aria-labelledby":"setup-remote-command",onFocus:r=>r.currentTarget.select(),className:"font-mono"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Running the relay in Docker? Set ",e.jsx("code",{className:"text-xs",children:"TAPFLOW_ADMIN_EMAIL"})," and ",e.jsx("code",{className:"text-xs",children:"TAPFLOW_ADMIN_PASSWORD"})," on the container and recreate it, e.g. with ",e.jsx("code",{className:"text-xs",children:"docker compose up -d"}),". A restart keeps the old environment."]})]}):e.jsxs("form",{onSubmit:v(C),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"email",children:"Admin email"}),e.jsx(t,{id:"email",type:"email",placeholder:"admin@yourteam.com",autoComplete:"email","aria-required":"true","aria-invalid":!!s.email,"aria-describedby":s.email?"email-error":void 0,...o("email")}),e.jsx(i,{id:"email-error",message:(h=s.email)==null?void 0:h.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"password",children:"Password"}),e.jsx(t,{id:"password",type:"password",autoComplete:"new-password","aria-required":"true","aria-invalid":!!s.password,"aria-describedby":R("password-hint","password-error",!!s.password),...o("password")}),!s.password&&e.jsx(K,{id:"password-hint",children:L}),e.jsx(i,{id:"password-error",message:(x=s.password)==null?void 0:x.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"confirm",children:"Confirm password"}),e.jsx(t,{id:"confirm",type:"password",autoComplete:"new-password","aria-required":"true","aria-invalid":!!s.confirm,"aria-describedby":s.confirm?"confirm-error":void 0,...o("confirm")}),e.jsx(i,{id:"confirm-error",message:(f=s.confirm)==null?void 0:f.message})]}),e.jsx(i,{assertive:!0,id:"setup-error",message:(g=s.root)==null?void 0:g.message}),e.jsx(W,{type:"submit",size:"lg",disabled:c,className:"w-full mt-1",children:c?"Creating account…":"Create admin account"}),e.jsx(z,{errors:s,submitCount:b})]})})]})]})})}export{$ as Setup};
1
+ import{j as e}from"./vendor-react-DTSdA8m-.js";import{z as A,u as O,a as P,b as k,c as I,C as _,d as q,e as D,f as E,I as t,L as l,F as i,g as R,P as L,B as W,h as z,q as w,o as H,s as d,i as M,j as B,k as Q}from"./index-2zL1a5_0.js";import{F as K}from"./field-hint-xptj_gfn.js";import{a as G,N as J}from"./vendor-router-B1pQim9Z.js";const U=H({email:d().email("Enter a valid email"),password:d().min(M,B),confirm:d()}).refine(a=>a.password===a.confirm,{message:"Passwords do not match",path:["confirm"]});function $(){var u,p,h,x,f,g;const a=G(),{resolvedTheme:y}=A(),N=y==="dark"?"/logo-dark.svg":"/logo.svg",{register:o,handleSubmit:v,setError:m,formState:{errors:s,isSubmitting:c,submitCount:b}}=O({shouldFocusError:!1,resolver:P(U)}),S=k(),n=I({queryKey:w.authStatus,queryFn:Q,staleTime:1/0});async function C(r){try{const j=await fetch("/api/v1/auth/init",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r.email,password:r.password})});if(!j.ok){const T=await j.json();m("root",{message:T.error??"Failed to create account"});return}S.setQueryData(w.authStatus,{initialized:!0}),a("/login",{replace:!0})}catch{m("root",{message:"Network error. Please try again."})}}if((u=n.data)!=null&&u.initialized)return e.jsx(J,{to:"/login",replace:!0});if(n.isPending)return null;const F=((p=n.data)==null?void 0:p.canInitialize)===!1;return e.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:e.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:N,alt:"tapflow",className:"w-6 h-6"}),e.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),e.jsxs(_,{level:4,className:"w-full",children:[e.jsx(q,{className:"text-center",children:e.jsx(D,{className:"text-2xl tracking-display-md",children:"Set up tapflow"})}),e.jsx(E,{children:F?e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{id:"setup-remote-command",className:"text-sm text-muted-foreground",children:"The admin account can only be created on the machine running the relay. Run this there, then reload this page:"}),e.jsx(t,{readOnly:!0,value:"tapflow admin init","aria-labelledby":"setup-remote-command",onFocus:r=>r.currentTarget.select(),className:"font-mono"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Running the relay in Docker? Set ",e.jsx("code",{className:"text-xs",children:"TAPFLOW_ADMIN_EMAIL"})," and ",e.jsx("code",{className:"text-xs",children:"TAPFLOW_ADMIN_PASSWORD"})," on the container and recreate it, e.g. with ",e.jsx("code",{className:"text-xs",children:"docker compose up -d"}),". A restart keeps the old environment."]})]}):e.jsxs("form",{onSubmit:v(C),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"email",children:"Admin email"}),e.jsx(t,{id:"email",type:"email",placeholder:"admin@yourteam.com",autoComplete:"email","aria-required":"true","aria-invalid":!!s.email,"aria-describedby":s.email?"email-error":void 0,...o("email")}),e.jsx(i,{id:"email-error",message:(h=s.email)==null?void 0:h.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"password",children:"Password"}),e.jsx(t,{id:"password",type:"password",autoComplete:"new-password","aria-required":"true","aria-invalid":!!s.password,"aria-describedby":R("password-hint","password-error",!!s.password),...o("password")}),!s.password&&e.jsx(K,{id:"password-hint",children:L}),e.jsx(i,{id:"password-error",message:(x=s.password)==null?void 0:x.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"confirm",children:"Confirm password"}),e.jsx(t,{id:"confirm",type:"password",autoComplete:"new-password","aria-required":"true","aria-invalid":!!s.confirm,"aria-describedby":s.confirm?"confirm-error":void 0,...o("confirm")}),e.jsx(i,{id:"confirm-error",message:(f=s.confirm)==null?void 0:f.message})]}),e.jsx(i,{assertive:!0,id:"setup-error",message:(g=s.root)==null?void 0:g.message}),e.jsx(W,{type:"submit",size:"lg",disabled:c,className:"w-full mt-1",children:c?"Creating account…":"Create admin account"}),e.jsx(z,{errors:s,submitCount:b})]})})]})]})})}export{$ as Setup};
@@ -1,4 +1,4 @@
1
- import{r as a,j as e,c as je}from"./vendor-react-DTSdA8m-.js";import{G as ve,b as fe,c as ge,u as be,a as ye,B as k,L as _,I as ee,F as Q,n as ke,h as Ce,C as we,d as Se,e as De,f as Te,H as h,o as E,s as C,q as V,aJ as se,aK as Ne}from"./index-C_3Q51YJ.js";import{d as q,c as H,a as M,b as B,e as Re,D as Ae}from"./dialog-Cugbp1C4.js";import{g as Ee,d as Ie,A as $e,a as Fe,b as Oe,e as Le,c as Pe,f as _e}from"./alert-dialog-C0mRms8g.js";import{d as U,S as z,a as J,b as K,c as x}from"./select-CHbE6M4S.js";import{l as Qe,T as Ve,c as qe,d as G,e as S,a as He,L as Me,b as D}from"./list-view-CyM0QUaH.js";import{j as W,l as X}from"./publicLink-D6zKS_wu.js";import{u as Be}from"./useFocusAfterSwap-BdItkQCu.js";import"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";import"./useShownAfter-By1Yxysz.js";/**
1
+ import{r as a,j as e,c as je}from"./vendor-react-DTSdA8m-.js";import{G as ve,b as fe,c as ge,u as be,a as ye,B as k,L as _,I as ee,F as Q,n as ke,h as Ce,C as we,d as Se,e as De,f as Te,H as h,o as E,s as C,q as V,aJ as se,aK as Ne}from"./index-2zL1a5_0.js";import{d as q,c as H,a as M,b as B,e as Re,D as Ae}from"./dialog-CTc84wr4.js";import{g as Ee,d as Ie,A as $e,a as Fe,b as Oe,e as Le,c as Pe,f as _e}from"./alert-dialog-nxQTqXgk.js";import{d as U,S as z,a as J,b as K,c as x}from"./select-BH7E2Q0r.js";import{l as Qe,T as Ve,c as qe,d as G,e as S,a as He,L as Me,b as D}from"./list-view-BzI8tLvX.js";import{j as W,l as X}from"./publicLink-D6zKS_wu.js";import{u as Be}from"./useFocusAfterSwap-BdItkQCu.js";import"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";import"./useShownAfter-By1Yxysz.js";/**
2
2
  * @license lucide-react v1.59.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as a,j as e}from"./vendor-react-DTSdA8m-.js";import{b as ce,R as de,c as xe,u as ue,a as me,l as pe,B as u,I as j,H as n,L as y,F as Q,n as he,h as je,C as ye,d as ge,e as fe,m as ve,f as ke,o as be,aL as Ne,s as z,q as K,aM as we}from"./index-C_3Q51YJ.js";import{B as N}from"./badge-BjEnOmb0.js";import{g as Ce,d as Te,A as De,a as Se,b as Ae,e as Fe,c as Ie}from"./alert-dialog-C0mRms8g.js";import{d as Re,D as Ee,c as Be,a as Le,b as Pe}from"./dialog-Cugbp1C4.js";import{d as M,S as $,a as G,b as J,c as m}from"./select-CHbE6M4S.js";import{l as qe,T as Oe,c as He,d as U,e as p,a as Ve,L as We,b as h}from"./list-view-CyM0QUaH.js";import{l as _e}from"./publicLink-D6zKS_wu.js";import{u as Qe}from"./useFocusAfterSwap-BdItkQCu.js";import{P as ze,T as Ke}from"./trash-HEJmY7DQ.js";import"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";import"./useShownAfter-By1Yxysz.js";const X=["7","30","60","90"],Me=be({name:z().min(1,"Give the token a name"),expiry:Ne([...X,"custom","never"]),expiresDays:z()}).superRefine((r,g)=>{if(r.expiry!=="custom")return;const o=Number(r.expiresDays);(!Number.isInteger(o)||o<1||o>365)&&g.addIssue({code:"custom",path:["expiresDays"],message:"Must be between 1 and 365"})});function $e(r){if(r.expiry!=="never")return Number(r.expiry==="custom"?r.expiresDays:r.expiry)}function is(){var V,W,_;const r=ce(),g=((V=de().user)==null?void 0:V.role)==="Admin",o=xe({queryKey:K.tokens,queryFn:we}),Y=o.data??[],w=qe(o),C=a.useRef(null),Z=Qe(w,C),[ee,se]=a.useState(!1),[l,T]=a.useState(""),[x,D]=a.useState("api"),[S,A]=a.useState(""),[f,v]=a.useState(null),F=a.useId(),I=a.useId(),k=a.useRef(null),[ae,c]=a.useState(""),R=a.useId(),{register:E,control:B,handleSubmit:re,reset:te,formState:{errors:i,isSubmitting:L,submitCount:ne}}=ue({shouldFocusError:!1,resolver:me(Me),defaultValues:{name:"",expiry:"30",expiresDays:"30"}}),P=pe({control:B,name:"expiry"}),q=()=>{r.invalidateQueries({queryKey:K.tokens})};a.useEffect(()=>{var s;l&&((s=k.current)==null||s.focus())},[l]);async function oe(s){c("");try{const t=$e(s),b=await fetch("/api/v1/tokens",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.name,...t!==void 0?{expires_in_days:t}:{},...x==="agent"?{scope:"agent"}:{}})});if(!b.ok){const d=await b.json().catch(()=>null);n.error((d==null?void 0:d.error)??"Failed to create token"),c((d==null?void 0:d.error)??"Failed to create token");return}const le=await b.json();x==="agent"&&A((await _e()).agentWsBase),n.success("Token created"),T(le.token),q()}catch{n.error("Network error"),c("Network error")}}function O(s){se(s),s&&(T(""),D("api"),A(""),c(""),te())}async function ie(s){try{return(await fetch(`/api/v1/tokens/${s}`,{method:"DELETE",credentials:"include"})).ok?(n.success("Token revoked"),q(),!0):(n.error("Failed to revoke token"),!1)}catch{return n.error("Network error"),!1}}function H(s){return s.expires_at&&new Date(s.expires_at)<new Date}return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Personal Access Tokens"}),e.jsxs(Re,{open:ee,onOpenChange:O,children:[e.jsx(Ee,{asChild:!0,children:e.jsxs(u,{ref:C,size:"sm",children:[e.jsx(ze,{className:"mr-2 h-4 w-4"}),"New token"]})}),e.jsxs(Be,{className:"sm:max-w-md",children:[e.jsx(Le,{children:e.jsx(Pe,{children:"Create token"})}),e.jsx("p",{role:"status",className:"sr-only",children:ae}),l?e.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[e.jsx("p",{id:F,className:"text-sm text-muted-foreground",children:"Copy this token now — it won't be shown again."}),e.jsx(j,{ref:k,readOnly:!0,value:l,"aria-labelledby":F,onFocus:s=>s.currentTarget.select(),className:"font-mono"}),x==="agent"&&S&&e.jsxs(e.Fragment,{children:[e.jsx("p",{id:I,className:"text-sm text-muted-foreground",children:"Run this on the agent Mac to connect it to this relay:"}),e.jsx(j,{readOnly:!0,value:`tapflow agent start --relay ${S} --token ${l}`,"aria-labelledby":I,onFocus:s=>s.currentTarget.select(),className:"font-mono"})]}),e.jsx(u,{onClick:()=>{c(""),(navigator.clipboard?navigator.clipboard.writeText(l):Promise.reject(new Error("no clipboard"))).then(()=>{n.success("Token copied to clipboard"),O(!1)}).catch(()=>{var s;n.error("Failed to copy — copy manually"),c("Could not copy the token. Select it and copy it by hand."),(s=k.current)==null||s.focus()})},children:"Copy & close"})]}):e.jsxs("form",{onSubmit:re(oe),className:"flex flex-col gap-4 pt-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"token-name",children:"Name"}),e.jsx(j,{id:"token-name",placeholder:"e.g. ci-deploy","aria-required":"true","aria-invalid":!!i.name,"aria-describedby":i.name?"name-error":void 0,...E("name")}),e.jsx(Q,{id:"name-error",message:(W=i.name)==null?void 0:W.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"token-expiry",children:"Expiration"}),e.jsx(he,{control:B,name:"expiry",render:({field:s})=>e.jsxs(M,{value:s.value,onValueChange:t=>s.onChange(t),children:[e.jsx($,{id:"token-expiry",ref:s.ref,onBlur:s.onBlur,"aria-describedby":s.value==="never"?R:void 0,children:e.jsx(G,{})}),e.jsxs(J,{children:[X.map(t=>e.jsxs(m,{value:t,children:[t," days"]},t)),e.jsx(m,{value:"custom",children:"Custom…"}),e.jsx(m,{value:"never",children:"No expiration"})]})]})}),P==="never"&&e.jsx("p",{id:R,className:"text-sm text-amber-700 dark:text-amber-300",children:"A token without an expiry stays valid until you revoke it. For CI, 90 days or less is recommended."})]}),P==="custom"&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"expires",children:"Expires in (days)"}),e.jsx(j,{id:"expires",type:"number","aria-required":"true","aria-invalid":!!i.expiresDays,"aria-describedby":i.expiresDays?"expiresDays-error":void 0,...E("expiresDays")}),e.jsx(Q,{id:"expiresDays-error",message:(_=i.expiresDays)==null?void 0:_.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"token-type",children:"Type"}),e.jsxs(M,{value:x,onValueChange:s=>D(s),children:[e.jsx($,{id:"token-type",children:e.jsx(G,{})}),e.jsxs(J,{children:[e.jsx(m,{value:"api",children:"API — CI uploads & API access"}),g&&e.jsx(m,{value:"agent",children:"Agent — connect remote device agents (Admin only)"})]})]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Scope: ",e.jsx(N,{variant:"secondary",children:x==="agent"?"agent":"view, builds:write"})]}),e.jsx(u,{type:"submit",disabled:L,children:L?"Creating…":"Create token"}),e.jsx(je,{errors:i,submitCount:ne})]})]})]})]}),e.jsxs(ye,{children:[e.jsxs(ge,{children:[e.jsx(fe,{children:"Active tokens"}),e.jsxs(ve,{children:["Use these tokens with ",e.jsx("code",{className:"text-xs",children:"Authorization: Bearer <token>"})," for API deployments."]})]}),e.jsx(ke,{className:"px-4 pt-0 pb-2",children:e.jsxs(Oe,{children:[e.jsx(He,{children:e.jsxs(U,{children:[e.jsx(p,{children:"Name"}),e.jsx(p,{children:"Scope"}),e.jsx(p,{children:"Last used"}),e.jsx(p,{children:"Expires"}),e.jsx(p,{className:"w-10"})]})}),e.jsxs(Ve,{...Z,children:[e.jsx(We,{view:w,colSpan:5,noun:"tokens",emptyText:"No tokens yet.",onRetry:()=>{o.refetch()}}),Y.map(s=>e.jsxs(U,{className:"hover:bg-transparent",children:[e.jsx(h,{className:"font-medium",children:s.name}),e.jsx(h,{children:e.jsx(N,{variant:"secondary",children:s.scope})}),e.jsx(h,{className:"text-muted-foreground text-sm",children:s.last_used_at?new Date(s.last_used_at).toLocaleDateString():"Never"}),e.jsx(h,{children:s.expires_at?e.jsx("span",{className:H(s)?"text-destructive text-sm":"text-muted-foreground text-sm",children:H(s)?"Expired":new Date(s.expires_at).toLocaleDateString()}):e.jsx(N,{variant:"outline",children:"No expiration"})}),e.jsx(h,{children:e.jsx(u,{variant:"destructive",size:"icon",className:"h-7 w-7","aria-label":"Revoke token",onClick:()=>v(s.id),children:e.jsx(Ke,{className:"h-4 w-4"})})})]},s.id))]})]})})]}),e.jsx(Ce,{open:f!==null,onOpenChange:s=>{s||v(null)},children:e.jsxs(Te,{children:[e.jsxs(De,{children:[e.jsx(Se,{children:"Revoke token?"}),e.jsx(Ae,{children:"Any active API calls using this token will immediately fail."})]}),e.jsxs(Fe,{children:[e.jsx(Ie,{children:"Cancel"}),e.jsx(u,{variant:"destructive",onClick:async()=>{if(f===null)return;await ie(f)&&v(null)},children:"Revoke"})]})]})})]})}export{is as TokenSettings};
1
+ import{r as a,j as e}from"./vendor-react-DTSdA8m-.js";import{b as ce,R as de,c as xe,u as ue,a as me,l as pe,B as u,I as j,H as n,L as y,F as Q,n as he,h as je,C as ye,d as ge,e as fe,m as ve,f as ke,o as be,aL as Ne,s as z,q as K,aM as we}from"./index-2zL1a5_0.js";import{B as N}from"./badge-DM1m4CLq.js";import{g as Ce,d as Te,A as De,a as Se,b as Ae,e as Fe,c as Ie}from"./alert-dialog-nxQTqXgk.js";import{d as Re,D as Ee,c as Be,a as Le,b as Pe}from"./dialog-CTc84wr4.js";import{d as M,S as $,a as G,b as J,c as m}from"./select-BH7E2Q0r.js";import{l as qe,T as Oe,c as He,d as U,e as p,a as Ve,L as We,b as h}from"./list-view-BzI8tLvX.js";import{l as _e}from"./publicLink-D6zKS_wu.js";import{u as Qe}from"./useFocusAfterSwap-BdItkQCu.js";import{P as ze,T as Ke}from"./trash-CZ-V9h2G.js";import"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";import"./useShownAfter-By1Yxysz.js";const X=["7","30","60","90"],Me=be({name:z().min(1,"Give the token a name"),expiry:Ne([...X,"custom","never"]),expiresDays:z()}).superRefine((r,g)=>{if(r.expiry!=="custom")return;const o=Number(r.expiresDays);(!Number.isInteger(o)||o<1||o>365)&&g.addIssue({code:"custom",path:["expiresDays"],message:"Must be between 1 and 365"})});function $e(r){if(r.expiry!=="never")return Number(r.expiry==="custom"?r.expiresDays:r.expiry)}function is(){var V,W,_;const r=ce(),g=((V=de().user)==null?void 0:V.role)==="Admin",o=xe({queryKey:K.tokens,queryFn:we}),Y=o.data??[],w=qe(o),C=a.useRef(null),Z=Qe(w,C),[ee,se]=a.useState(!1),[l,T]=a.useState(""),[x,D]=a.useState("api"),[S,A]=a.useState(""),[f,v]=a.useState(null),F=a.useId(),I=a.useId(),k=a.useRef(null),[ae,c]=a.useState(""),R=a.useId(),{register:E,control:B,handleSubmit:re,reset:te,formState:{errors:i,isSubmitting:L,submitCount:ne}}=ue({shouldFocusError:!1,resolver:me(Me),defaultValues:{name:"",expiry:"30",expiresDays:"30"}}),P=pe({control:B,name:"expiry"}),q=()=>{r.invalidateQueries({queryKey:K.tokens})};a.useEffect(()=>{var s;l&&((s=k.current)==null||s.focus())},[l]);async function oe(s){c("");try{const t=$e(s),b=await fetch("/api/v1/tokens",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.name,...t!==void 0?{expires_in_days:t}:{},...x==="agent"?{scope:"agent"}:{}})});if(!b.ok){const d=await b.json().catch(()=>null);n.error((d==null?void 0:d.error)??"Failed to create token"),c((d==null?void 0:d.error)??"Failed to create token");return}const le=await b.json();x==="agent"&&A((await _e()).agentWsBase),n.success("Token created"),T(le.token),q()}catch{n.error("Network error"),c("Network error")}}function O(s){se(s),s&&(T(""),D("api"),A(""),c(""),te())}async function ie(s){try{return(await fetch(`/api/v1/tokens/${s}`,{method:"DELETE",credentials:"include"})).ok?(n.success("Token revoked"),q(),!0):(n.error("Failed to revoke token"),!1)}catch{return n.error("Network error"),!1}}function H(s){return s.expires_at&&new Date(s.expires_at)<new Date}return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Personal Access Tokens"}),e.jsxs(Re,{open:ee,onOpenChange:O,children:[e.jsx(Ee,{asChild:!0,children:e.jsxs(u,{ref:C,size:"sm",children:[e.jsx(ze,{className:"mr-2 h-4 w-4"}),"New token"]})}),e.jsxs(Be,{className:"sm:max-w-md",children:[e.jsx(Le,{children:e.jsx(Pe,{children:"Create token"})}),e.jsx("p",{role:"status",className:"sr-only",children:ae}),l?e.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[e.jsx("p",{id:F,className:"text-sm text-muted-foreground",children:"Copy this token now — it won't be shown again."}),e.jsx(j,{ref:k,readOnly:!0,value:l,"aria-labelledby":F,onFocus:s=>s.currentTarget.select(),className:"font-mono"}),x==="agent"&&S&&e.jsxs(e.Fragment,{children:[e.jsx("p",{id:I,className:"text-sm text-muted-foreground",children:"Run this on the agent Mac to connect it to this relay:"}),e.jsx(j,{readOnly:!0,value:`tapflow agent start --relay ${S} --token ${l}`,"aria-labelledby":I,onFocus:s=>s.currentTarget.select(),className:"font-mono"})]}),e.jsx(u,{onClick:()=>{c(""),(navigator.clipboard?navigator.clipboard.writeText(l):Promise.reject(new Error("no clipboard"))).then(()=>{n.success("Token copied to clipboard"),O(!1)}).catch(()=>{var s;n.error("Failed to copy — copy manually"),c("Could not copy the token. Select it and copy it by hand."),(s=k.current)==null||s.focus()})},children:"Copy & close"})]}):e.jsxs("form",{onSubmit:re(oe),className:"flex flex-col gap-4 pt-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"token-name",children:"Name"}),e.jsx(j,{id:"token-name",placeholder:"e.g. ci-deploy","aria-required":"true","aria-invalid":!!i.name,"aria-describedby":i.name?"name-error":void 0,...E("name")}),e.jsx(Q,{id:"name-error",message:(W=i.name)==null?void 0:W.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"token-expiry",children:"Expiration"}),e.jsx(he,{control:B,name:"expiry",render:({field:s})=>e.jsxs(M,{value:s.value,onValueChange:t=>s.onChange(t),children:[e.jsx($,{id:"token-expiry",ref:s.ref,onBlur:s.onBlur,"aria-describedby":s.value==="never"?R:void 0,children:e.jsx(G,{})}),e.jsxs(J,{children:[X.map(t=>e.jsxs(m,{value:t,children:[t," days"]},t)),e.jsx(m,{value:"custom",children:"Custom…"}),e.jsx(m,{value:"never",children:"No expiration"})]})]})}),P==="never"&&e.jsx("p",{id:R,className:"text-sm text-amber-700 dark:text-amber-300",children:"A token without an expiry stays valid until you revoke it. For CI, 90 days or less is recommended."})]}),P==="custom"&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"expires",children:"Expires in (days)"}),e.jsx(j,{id:"expires",type:"number","aria-required":"true","aria-invalid":!!i.expiresDays,"aria-describedby":i.expiresDays?"expiresDays-error":void 0,...E("expiresDays")}),e.jsx(Q,{id:"expiresDays-error",message:(_=i.expiresDays)==null?void 0:_.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"token-type",children:"Type"}),e.jsxs(M,{value:x,onValueChange:s=>D(s),children:[e.jsx($,{id:"token-type",children:e.jsx(G,{})}),e.jsxs(J,{children:[e.jsx(m,{value:"api",children:"API — CI uploads & API access"}),g&&e.jsx(m,{value:"agent",children:"Agent — connect remote device agents (Admin only)"})]})]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Scope: ",e.jsx(N,{variant:"secondary",children:x==="agent"?"agent":"view, builds:write"})]}),e.jsx(u,{type:"submit",disabled:L,children:L?"Creating…":"Create token"}),e.jsx(je,{errors:i,submitCount:ne})]})]})]})]}),e.jsxs(ye,{children:[e.jsxs(ge,{children:[e.jsx(fe,{children:"Active tokens"}),e.jsxs(ve,{children:["Use these tokens with ",e.jsx("code",{className:"text-xs",children:"Authorization: Bearer <token>"})," for API deployments."]})]}),e.jsx(ke,{className:"px-4 pt-0 pb-2",children:e.jsxs(Oe,{children:[e.jsx(He,{children:e.jsxs(U,{children:[e.jsx(p,{children:"Name"}),e.jsx(p,{children:"Scope"}),e.jsx(p,{children:"Last used"}),e.jsx(p,{children:"Expires"}),e.jsx(p,{className:"w-10"})]})}),e.jsxs(Ve,{...Z,children:[e.jsx(We,{view:w,colSpan:5,noun:"tokens",emptyText:"No tokens yet.",onRetry:()=>{o.refetch()}}),Y.map(s=>e.jsxs(U,{className:"hover:bg-transparent",children:[e.jsx(h,{className:"font-medium",children:s.name}),e.jsx(h,{children:e.jsx(N,{variant:"secondary",children:s.scope})}),e.jsx(h,{className:"text-muted-foreground text-sm",children:s.last_used_at?new Date(s.last_used_at).toLocaleDateString():"Never"}),e.jsx(h,{children:s.expires_at?e.jsx("span",{className:H(s)?"text-destructive text-sm":"text-muted-foreground text-sm",children:H(s)?"Expired":new Date(s.expires_at).toLocaleDateString()}):e.jsx(N,{variant:"outline",children:"No expiration"})}),e.jsx(h,{children:e.jsx(u,{variant:"destructive",size:"icon",className:"h-7 w-7","aria-label":"Revoke token",onClick:()=>v(s.id),children:e.jsx(Ke,{className:"h-4 w-4"})})})]},s.id))]})]})})]}),e.jsx(Ce,{open:f!==null,onOpenChange:s=>{s||v(null)},children:e.jsxs(Te,{children:[e.jsxs(De,{children:[e.jsx(Se,{children:"Revoke token?"}),e.jsx(Ae,{children:"Any active API calls using this token will immediately fail."})]}),e.jsxs(Fe,{children:[e.jsx(Ie,{children:"Cancel"}),e.jsx(u,{variant:"destructive",onClick:async()=>{if(f===null)return;await ie(f)&&v(null)},children:"Revoke"})]})]})})]})}export{is as TokenSettings};
@@ -1,4 +1,4 @@
1
- import{G as a}from"./index-C_3Q51YJ.js";/**
1
+ import{G as a}from"./index-2zL1a5_0.js";/**
2
2
  * @license lucide-react v1.59.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as n,j as i,c as d}from"./vendor-react-DTSdA8m-.js";import{aQ as S,a5 as u,aR as O,ad as T,aS as b,aT as E,aV as x,b7 as N,a8 as h,aO as z,aP as F,aU as H,a2 as f,aG as v}from"./index-C_3Q51YJ.js";var M=Object.defineProperty,c=(s,t)=>M(s,"name",{value:t,configurable:!0}),k="AlertDialog",[V,oe]=h(k,[N]),p=N(),G=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(z,{...a,...e,modal:!0})},"AlertDialog"),I=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(F,{...o,...l,ref:e})},"AlertDialogTrigger")),L=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(S,{...a,...e})},"AlertDialogPortal"),_=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(H,{...o,...l,ref:e})},"AlertDialogOverlay")),Q="AlertDialogContent",[U,q]=V(Q),y=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,children:l,...o}=t,r=p(a),g=n.useRef(null),$=u(e,g),m=n.useRef(null);return i.jsx(U,{scope:a,cancelRef:m,children:i.jsx(O,{role:"alertdialog",...r,...o,ref:$,onOpenAutoFocus:T(o.onOpenAutoFocus,D=>{var A;D.preventDefault(),(A=m.current)==null||A.focus({preventScroll:!0})}),onPointerDownOutside:D=>D.preventDefault(),onInteractOutside:D=>D.preventDefault(),children:l})})},"AlertDialogContent")),j=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(b,{...o,...l,ref:e})},"AlertDialogTitle")),R=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(E,{...o,...l,ref:e})},"AlertDialogDescription")),C=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(x,{...o,...l,ref:e})},"AlertDialogAction")),B="AlertDialogCancel",w=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,{cancelRef:o}=q(B,a),r=p(a),g=u(e,o);return i.jsx(x,{...r,...l,ref:g})},"AlertDialogCancel"));const se=G,re=I,J=L,P=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(_,{className:o,...l,ref:t}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});P.displayName=_.displayName;const K=n.forwardRef((s,t)=>{const e=d.c(10);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(P,{}),e[3]=o):o=e[3];let r;e[4]!==a?(r=f("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/2 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/2 sm:rounded-lg",a),e[4]=a,e[5]=r):r=e[5];let g;return e[6]!==l||e[7]!==t||e[8]!==r?(g=i.jsxs(J,{children:[o,i.jsx(y,{ref:t,className:r,...l})]}),e[6]=l,e[7]=t,e[8]=r,e[9]=g):g=e[9],g});K.displayName=y.displayName;const W=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col space-y-2 text-center sm:text-left",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};W.displayName="AlertDialogHeader";const X=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};X.displayName="AlertDialogFooter";const Y=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-lg font-semibold",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(j,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});Y.displayName=j.displayName;const Z=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-sm text-muted-foreground",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(R,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});Z.displayName=R.displayName;const ee=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(v(),a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(C,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ee.displayName=C.displayName;const te=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(v({variant:"outline"}),"mt-2 sm:mt-0",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(w,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});te.displayName=w.displayName;export{W as A,Y as a,Z as b,te as c,K as d,X as e,ee as f,se as g,re as h};
1
+ import{r as n,j as i,c as d}from"./vendor-react-DTSdA8m-.js";import{aQ as S,a5 as u,aR as O,ad as T,aS as b,aT as E,aV as x,b7 as N,a8 as h,aO as z,aP as F,aU as H,a2 as f,aG as v}from"./index-2zL1a5_0.js";var M=Object.defineProperty,c=(s,t)=>M(s,"name",{value:t,configurable:!0}),k="AlertDialog",[V,oe]=h(k,[N]),p=N(),G=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(z,{...a,...e,modal:!0})},"AlertDialog"),I=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(F,{...o,...l,ref:e})},"AlertDialogTrigger")),L=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(S,{...a,...e})},"AlertDialogPortal"),_=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(H,{...o,...l,ref:e})},"AlertDialogOverlay")),Q="AlertDialogContent",[U,q]=V(Q),y=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,children:l,...o}=t,r=p(a),g=n.useRef(null),$=u(e,g),m=n.useRef(null);return i.jsx(U,{scope:a,cancelRef:m,children:i.jsx(O,{role:"alertdialog",...r,...o,ref:$,onOpenAutoFocus:T(o.onOpenAutoFocus,D=>{var A;D.preventDefault(),(A=m.current)==null||A.focus({preventScroll:!0})}),onPointerDownOutside:D=>D.preventDefault(),onInteractOutside:D=>D.preventDefault(),children:l})})},"AlertDialogContent")),j=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(b,{...o,...l,ref:e})},"AlertDialogTitle")),R=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(E,{...o,...l,ref:e})},"AlertDialogDescription")),C=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(x,{...o,...l,ref:e})},"AlertDialogAction")),B="AlertDialogCancel",w=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,{cancelRef:o}=q(B,a),r=p(a),g=u(e,o);return i.jsx(x,{...r,...l,ref:g})},"AlertDialogCancel"));const se=G,re=I,J=L,P=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(_,{className:o,...l,ref:t}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});P.displayName=_.displayName;const K=n.forwardRef((s,t)=>{const e=d.c(10);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(P,{}),e[3]=o):o=e[3];let r;e[4]!==a?(r=f("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/2 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/2 sm:rounded-lg",a),e[4]=a,e[5]=r):r=e[5];let g;return e[6]!==l||e[7]!==t||e[8]!==r?(g=i.jsxs(J,{children:[o,i.jsx(y,{ref:t,className:r,...l})]}),e[6]=l,e[7]=t,e[8]=r,e[9]=g):g=e[9],g});K.displayName=y.displayName;const W=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col space-y-2 text-center sm:text-left",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};W.displayName="AlertDialogHeader";const X=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};X.displayName="AlertDialogFooter";const Y=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-lg font-semibold",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(j,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});Y.displayName=j.displayName;const Z=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-sm text-muted-foreground",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(R,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});Z.displayName=R.displayName;const ee=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(v(),a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(C,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ee.displayName=C.displayName;const te=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(v({variant:"outline"}),"mt-2 sm:mt-0",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(w,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});te.displayName=w.displayName;export{W as A,Y as a,Z as b,te as c,K as d,X as e,ee as f,se as g,re as h};
@@ -1 +1 @@
1
- import{c as i,j as b}from"./vendor-react-DTSdA8m-.js";import{a2 as l,aN as g}from"./index-C_3Q51YJ.js";const x=g("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"},tone:{backlog:"border-transparent bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",progress:"border-transparent bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300",done:"border-transparent bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300",rejected:"border-transparent bg-red-50 text-red-700 dark:bg-red-950 dark:text-red-300",ios:"border-transparent bg-sky-50 text-sky-700 dark:bg-sky-950 dark:text-sky-300",android:"border-transparent bg-emerald-50 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300"}},defaultVariants:{variant:"default"}});function u(o){const e=i.c(12);let r,t,a,n;e[0]!==o?({className:r,variant:n,tone:a,...t}=o,e[0]=o,e[1]=r,e[2]=t,e[3]=a,e[4]=n):(r=e[1],t=e[2],a=e[3],n=e[4]);let d;e[5]!==r||e[6]!==a||e[7]!==n?(d=l(x({variant:n,tone:a}),r),e[5]=r,e[6]=a,e[7]=n,e[8]=d):d=e[8];let s;return e[9]!==t||e[10]!==d?(s=b.jsx("div",{className:d,...t}),e[9]=t,e[10]=d,e[11]=s):s=e[11],s}export{u as B};
1
+ import{c as i,j as b}from"./vendor-react-DTSdA8m-.js";import{a2 as l,aN as g}from"./index-2zL1a5_0.js";const x=g("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"},tone:{backlog:"border-transparent bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",progress:"border-transparent bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300",done:"border-transparent bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300",rejected:"border-transparent bg-red-50 text-red-700 dark:bg-red-950 dark:text-red-300",ios:"border-transparent bg-sky-50 text-sky-700 dark:bg-sky-950 dark:text-sky-300",android:"border-transparent bg-emerald-50 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300"}},defaultVariants:{variant:"default"}});function u(o){const e=i.c(12);let r,t,a,n;e[0]!==o?({className:r,variant:n,tone:a,...t}=o,e[0]=o,e[1]=r,e[2]=t,e[3]=a,e[4]=n):(r=e[1],t=e[2],a=e[3],n=e[4]);let d;e[5]!==r||e[6]!==a||e[7]!==n?(d=l(x({variant:n,tone:a}),r),e[5]=r,e[6]=a,e[7]=n,e[8]=d):d=e[8];let s;return e[9]!==t||e[10]!==d?(s=b.jsx("div",{className:d,...t}),e[9]=t,e[10]=d,e[11]=s):s=e[11],s}export{u as B};
@@ -1 +1 @@
1
- import{r as p,c,j as n}from"./vendor-react-DTSdA8m-.js";import{aO as y,aP as j,a2 as d,aQ as $,aR as g,aS as x,aT as u,aU as N,aV as h,am as b}from"./index-C_3Q51YJ.js";const E=y,O=j,w=$,D=p.forwardRef((o,a)=>{const e=c.c(9);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==t||e[6]!==a||e[7]!==l?(i=n.jsx(N,{ref:a,className:l,...t}),e[5]=t,e[6]=a,e[7]=l,e[8]=i):i=e[8],i});D.displayName=N.displayName;const R=p.forwardRef((o,a)=>{const e=c.c(13);let s,t,l;e[0]!==o?({className:t,children:s,...l}=o,e[0]=o,e[1]=s,e[2]=t,e[3]=l):(s=e[1],t=e[2],l=e[3]);let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(D,{}),e[4]=i):i=e[4];let r;e[5]!==t?(r=d("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/2 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/2 sm:rounded-lg",t),e[5]=t,e[6]=r):r=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(h,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(b,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[7]=m):m=e[7];let f;return e[8]!==s||e[9]!==l||e[10]!==a||e[11]!==r?(f=n.jsxs(w,{children:[i,n.jsxs(g,{ref:a,className:r,...l,children:[s,m]})]}),e[8]=s,e[9]=l,e[10]=a,e[11]=r,e[12]=f):f=e[12],f});R.displayName=g.displayName;const v=o=>{const a=c.c(8);let e,s;a[0]!==o?({className:e,...s}=o,a[0]=o,a[1]=e,a[2]=s):(e=a[1],s=a[2]);let t;a[3]!==e?(t=d("flex flex-col space-y-1.5 text-center sm:text-left",e),a[3]=e,a[4]=t):t=a[4];let l;return a[5]!==s||a[6]!==t?(l=n.jsx("div",{className:t,...s}),a[5]=s,a[6]=t,a[7]=l):l=a[7],l};v.displayName="DialogHeader";const T=o=>{const a=c.c(8);let e,s;a[0]!==o?({className:e,...s}=o,a[0]=o,a[1]=e,a[2]=s):(e=a[1],s=a[2]);let t;a[3]!==e?(t=d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),a[3]=e,a[4]=t):t=a[4];let l;return a[5]!==s||a[6]!==t?(l=n.jsx("div",{className:t,...s}),a[5]=s,a[6]=t,a[7]=l):l=a[7],l};T.displayName="DialogFooter";const k=p.forwardRef((o,a)=>{const e=c.c(9);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=d("text-lg font-semibold leading-none tracking-tight",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==t||e[6]!==a||e[7]!==l?(i=n.jsx(x,{ref:a,className:l,...t}),e[5]=t,e[6]=a,e[7]=l,e[8]=i):i=e[8],i});k.displayName=x.displayName;const z=p.forwardRef((o,a)=>{const e=c.c(9);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=d("text-sm text-muted-foreground",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==t||e[6]!==a||e[7]!==l?(i=n.jsx(u,{ref:a,className:l,...t}),e[5]=t,e[6]=a,e[7]=l,e[8]=i):i=e[8],i});z.displayName=u.displayName;export{O as D,v as a,k as b,R as c,E as d,z as e,T as f};
1
+ import{r as p,c,j as n}from"./vendor-react-DTSdA8m-.js";import{aO as y,aP as j,a2 as d,aQ as $,aR as g,aS as x,aT as u,aU as N,aV as h,am as b}from"./index-2zL1a5_0.js";const E=y,O=j,w=$,D=p.forwardRef((o,a)=>{const e=c.c(9);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==t||e[6]!==a||e[7]!==l?(i=n.jsx(N,{ref:a,className:l,...t}),e[5]=t,e[6]=a,e[7]=l,e[8]=i):i=e[8],i});D.displayName=N.displayName;const R=p.forwardRef((o,a)=>{const e=c.c(13);let s,t,l;e[0]!==o?({className:t,children:s,...l}=o,e[0]=o,e[1]=s,e[2]=t,e[3]=l):(s=e[1],t=e[2],l=e[3]);let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(D,{}),e[4]=i):i=e[4];let r;e[5]!==t?(r=d("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/2 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/2 sm:rounded-lg",t),e[5]=t,e[6]=r):r=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(h,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(b,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[7]=m):m=e[7];let f;return e[8]!==s||e[9]!==l||e[10]!==a||e[11]!==r?(f=n.jsxs(w,{children:[i,n.jsxs(g,{ref:a,className:r,...l,children:[s,m]})]}),e[8]=s,e[9]=l,e[10]=a,e[11]=r,e[12]=f):f=e[12],f});R.displayName=g.displayName;const v=o=>{const a=c.c(8);let e,s;a[0]!==o?({className:e,...s}=o,a[0]=o,a[1]=e,a[2]=s):(e=a[1],s=a[2]);let t;a[3]!==e?(t=d("flex flex-col space-y-1.5 text-center sm:text-left",e),a[3]=e,a[4]=t):t=a[4];let l;return a[5]!==s||a[6]!==t?(l=n.jsx("div",{className:t,...s}),a[5]=s,a[6]=t,a[7]=l):l=a[7],l};v.displayName="DialogHeader";const T=o=>{const a=c.c(8);let e,s;a[0]!==o?({className:e,...s}=o,a[0]=o,a[1]=e,a[2]=s):(e=a[1],s=a[2]);let t;a[3]!==e?(t=d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),a[3]=e,a[4]=t):t=a[4];let l;return a[5]!==s||a[6]!==t?(l=n.jsx("div",{className:t,...s}),a[5]=s,a[6]=t,a[7]=l):l=a[7],l};T.displayName="DialogFooter";const k=p.forwardRef((o,a)=>{const e=c.c(9);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=d("text-lg font-semibold leading-none tracking-tight",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==t||e[6]!==a||e[7]!==l?(i=n.jsx(x,{ref:a,className:l,...t}),e[5]=t,e[6]=a,e[7]=l,e[8]=i):i=e[8],i});k.displayName=x.displayName;const z=p.forwardRef((o,a)=>{const e=c.c(9);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=d("text-sm text-muted-foreground",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==t||e[6]!==a||e[7]!==l?(i=n.jsx(u,{ref:a,className:l,...t}),e[5]=t,e[6]=a,e[7]=l,e[8]=i):i=e[8],i});z.displayName=u.displayName;export{O as D,v as a,k as b,R as c,E as d,z as e,T as f};
@@ -1 +1 @@
1
- import{c as n,j as c}from"./vendor-react-DTSdA8m-.js";import{a2 as a}from"./index-C_3Q51YJ.js";function x(m){const t=n.c(6),{id:o,children:r,className:i}=m;let e;t[0]!==i?(e=a("text-sm text-muted-foreground",i),t[0]=i,t[1]=e):e=t[1];let s;return t[2]!==r||t[3]!==o||t[4]!==e?(s=c.jsx("p",{id:o,className:e,children:r}),t[2]=r,t[3]=o,t[4]=e,t[5]=s):s=t[5],s}export{x as F};
1
+ import{c as n,j as c}from"./vendor-react-DTSdA8m-.js";import{a2 as a}from"./index-2zL1a5_0.js";function x(m){const t=n.c(6),{id:o,children:r,className:i}=m;let e;t[0]!==i?(e=a("text-sm text-muted-foreground",i),t[0]=i,t[1]=e):e=t[1];let s;return t[2]!==r||t[3]!==o||t[4]!==e?(s=c.jsx("p",{id:o,className:e,children:r}),t[2]=r,t[3]=o,t[4]=e,t[5]=s):s=t[5],s}export{x as F};