@tapflowio/relay 0.28.0 → 0.28.1

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 (163) hide show
  1. package/dist/api/builds.d.ts.map +1 -1
  2. package/dist/api/builds.js +3 -2
  3. package/dist/api/builds.js.map +1 -1
  4. package/dist/api/profile.d.ts.map +1 -1
  5. package/dist/api/profile.js +3 -1
  6. package/dist/api/profile.js.map +1 -1
  7. package/dist/api/settings.d.ts.map +1 -1
  8. package/dist/api/settings.js +4 -2
  9. package/dist/api/settings.js.map +1 -1
  10. package/package.json +3 -3
  11. package/public/assets/{AISessionWatch-Bxew762e.js → AISessionWatch-C2h4NZ_I.js} +7 -12
  12. package/public/assets/AISessionWatch-C2h4NZ_I.js.br +0 -0
  13. package/public/assets/AISessionWatch-C2h4NZ_I.js.gz +0 -0
  14. package/public/assets/{AppCenter-93hnrrdy.js → AppCenter-S1y-8_7l.js} +1 -1
  15. package/public/assets/AppCenter-S1y-8_7l.js.br +0 -0
  16. package/public/assets/AppCenter-S1y-8_7l.js.gz +0 -0
  17. package/public/assets/Default-C-l1O-g9.js +6 -0
  18. package/public/assets/Default-C-l1O-g9.js.br +0 -0
  19. package/public/assets/Default-C-l1O-g9.js.gz +0 -0
  20. package/public/assets/{Invite-DQBwLaOl.js → Invite-BCndVxaO.js} +1 -1
  21. package/public/assets/Invite-BCndVxaO.js.br +0 -0
  22. package/public/assets/Invite-BCndVxaO.js.gz +0 -0
  23. package/public/assets/{MacResources-D4LMGxgV.js → MacResources-41cFDgE1.js} +1 -1
  24. package/public/assets/MacResources-41cFDgE1.js.br +0 -0
  25. package/public/assets/MacResources-41cFDgE1.js.gz +0 -0
  26. package/public/assets/QASession-B67RsIPm.js +81 -0
  27. package/public/assets/QASession-B67RsIPm.js.br +0 -0
  28. package/public/assets/QASession-B67RsIPm.js.gz +0 -0
  29. package/public/assets/{ResetPassword-inTbbral.js → ResetPassword-8rj7ASt1.js} +1 -1
  30. package/public/assets/ResetPassword-8rj7ASt1.js.br +0 -0
  31. package/public/assets/ResetPassword-8rj7ASt1.js.gz +0 -0
  32. package/public/assets/{RunDetail-B3dw8_U0.js → RunDetail-BIgq9gJ0.js} +2 -2
  33. package/public/assets/RunDetail-BIgq9gJ0.js.br +0 -0
  34. package/public/assets/RunDetail-BIgq9gJ0.js.gz +0 -0
  35. package/public/assets/Runs-DpK5aoBr.js +6 -0
  36. package/public/assets/Runs-DpK5aoBr.js.br +0 -0
  37. package/public/assets/Runs-DpK5aoBr.js.gz +0 -0
  38. package/public/assets/{Setup-CPa_UWpa.js → Setup-DZrhA_7b.js} +1 -1
  39. package/public/assets/Setup-DZrhA_7b.js.br +0 -0
  40. package/public/assets/Setup-DZrhA_7b.js.gz +0 -0
  41. package/public/assets/{Team-DZie8W7R.js → Team-CJThCjd3.js} +2 -2
  42. package/public/assets/Team-CJThCjd3.js.br +0 -0
  43. package/public/assets/Team-CJThCjd3.js.gz +0 -0
  44. package/public/assets/{Tokens-u3-uRAwd.js → Tokens-DGURtHWi.js} +1 -1
  45. package/public/assets/Tokens-DGURtHWi.js.br +0 -0
  46. package/public/assets/Tokens-DGURtHWi.js.gz +0 -0
  47. package/public/assets/{aiSession-BsmDnyV1.js → aiSession-BW09Jhqz.js} +6 -11
  48. package/public/assets/aiSession-BW09Jhqz.js.br +0 -0
  49. package/public/assets/aiSession-BW09Jhqz.js.gz +0 -0
  50. package/public/assets/{alert-dialog-Bq_Ln5bp.js → alert-dialog-t5vlOabq.js} +1 -1
  51. package/public/assets/alert-dialog-t5vlOabq.js.br +0 -0
  52. package/public/assets/alert-dialog-t5vlOabq.js.gz +0 -0
  53. package/public/assets/{badge-D-bt97WR.js → badge-DrDCTAQQ.js} +1 -1
  54. package/public/assets/badge-DrDCTAQQ.js.br +0 -0
  55. package/public/assets/badge-DrDCTAQQ.js.gz +0 -0
  56. package/public/assets/{dialog-CtzPkg0O.js → dialog-BOFZkCES.js} +1 -1
  57. package/public/assets/dialog-BOFZkCES.js.br +0 -0
  58. package/public/assets/dialog-BOFZkCES.js.gz +0 -0
  59. package/public/assets/{field-hint-B774BIWK.js → field-hint-B9fPUgi7.js} +1 -1
  60. package/public/assets/field-hint-B9fPUgi7.js.br +0 -0
  61. package/public/assets/field-hint-B9fPUgi7.js.gz +0 -0
  62. package/public/assets/index-Bixhy5MB.js +248 -0
  63. package/public/assets/index-Bixhy5MB.js.br +0 -0
  64. package/public/assets/index-Bixhy5MB.js.gz +0 -0
  65. package/public/assets/{index-EPyP3g9A.css → index-h2hiZ2OM.css} +1 -1
  66. package/public/assets/index-h2hiZ2OM.css.br +0 -0
  67. package/public/assets/index-h2hiZ2OM.css.gz +0 -0
  68. package/public/assets/list-view-BpOY1e-d.js +1 -0
  69. package/public/assets/list-view-BpOY1e-d.js.br +0 -0
  70. package/public/assets/list-view-BpOY1e-d.js.gz +0 -0
  71. package/public/assets/{pencil-1XSs32nb.js → pencil-ZlrAsWuU.js} +1 -1
  72. package/public/assets/pencil-ZlrAsWuU.js.br +0 -0
  73. package/public/assets/pencil-ZlrAsWuU.js.gz +0 -0
  74. package/public/assets/{play-DCvrorIC.js → play-4CsGZdQU.js} +1 -1
  75. package/public/assets/{play-DCvrorIC.js.br → play-4CsGZdQU.js.br} +0 -0
  76. package/public/assets/play-4CsGZdQU.js.gz +0 -0
  77. package/public/assets/{search-input-CFWgLcKA.js → search-input-G_QpBvPM.js} +1 -1
  78. package/public/assets/search-input-G_QpBvPM.js.br +0 -0
  79. package/public/assets/search-input-G_QpBvPM.js.gz +0 -0
  80. package/public/assets/{select-5ZtzWRYG.js → select-DDzv2YfY.js} +1 -1
  81. package/public/assets/select-DDzv2YfY.js.br +0 -0
  82. package/public/assets/select-DDzv2YfY.js.gz +0 -0
  83. package/public/assets/{slider-DHuMDXcP.js → slider-DE7lQdK4.js} +1 -1
  84. package/public/assets/slider-DE7lQdK4.js.br +0 -0
  85. package/public/assets/slider-DE7lQdK4.js.gz +0 -0
  86. package/public/assets/{tabs-CmgV_sSI.js → tabs-Co1N3x_X.js} +1 -1
  87. package/public/assets/tabs-Co1N3x_X.js.br +0 -0
  88. package/public/assets/tabs-Co1N3x_X.js.gz +0 -0
  89. package/public/assets/{tech-label-qLodPeUI.js → tech-label-BMvuJmUf.js} +1 -1
  90. package/public/assets/tech-label-BMvuJmUf.js.br +0 -0
  91. package/public/assets/tech-label-BMvuJmUf.js.gz +0 -0
  92. package/public/assets/{trash-CXjB9oU1.js → trash-Cwj2dbgB.js} +1 -1
  93. package/public/assets/trash-Cwj2dbgB.js.br +0 -0
  94. package/public/assets/trash-Cwj2dbgB.js.gz +0 -0
  95. package/public/assets/{video-CK2q3-0B.js → video-swsaHrfi.js} +1 -1
  96. package/public/assets/video-swsaHrfi.js.br +0 -0
  97. package/public/assets/video-swsaHrfi.js.gz +0 -0
  98. package/public/index.html +14 -2
  99. package/public/index.html.br +0 -0
  100. package/public/index.html.gz +0 -0
  101. package/public/og-image.jpg +0 -0
  102. package/public/assets/AISessionWatch-Bxew762e.js.br +0 -0
  103. package/public/assets/AISessionWatch-Bxew762e.js.gz +0 -0
  104. package/public/assets/AppCenter-93hnrrdy.js.br +0 -0
  105. package/public/assets/AppCenter-93hnrrdy.js.gz +0 -0
  106. package/public/assets/Default-BhgcUKBm.js +0 -6
  107. package/public/assets/Default-BhgcUKBm.js.br +0 -0
  108. package/public/assets/Default-BhgcUKBm.js.gz +0 -0
  109. package/public/assets/Invite-DQBwLaOl.js.br +0 -0
  110. package/public/assets/Invite-DQBwLaOl.js.gz +0 -0
  111. package/public/assets/MacResources-D4LMGxgV.js.br +0 -0
  112. package/public/assets/MacResources-D4LMGxgV.js.gz +0 -0
  113. package/public/assets/QASession-Dnuq0yrN.js +0 -81
  114. package/public/assets/QASession-Dnuq0yrN.js.br +0 -0
  115. package/public/assets/QASession-Dnuq0yrN.js.gz +0 -0
  116. package/public/assets/ResetPassword-inTbbral.js.br +0 -0
  117. package/public/assets/ResetPassword-inTbbral.js.gz +0 -0
  118. package/public/assets/RunDetail-B3dw8_U0.js.br +0 -0
  119. package/public/assets/RunDetail-B3dw8_U0.js.gz +0 -0
  120. package/public/assets/Runs-DqZl9Y6M.js +0 -6
  121. package/public/assets/Runs-DqZl9Y6M.js.br +0 -0
  122. package/public/assets/Runs-DqZl9Y6M.js.gz +0 -0
  123. package/public/assets/Setup-CPa_UWpa.js.br +0 -0
  124. package/public/assets/Setup-CPa_UWpa.js.gz +0 -0
  125. package/public/assets/Team-DZie8W7R.js.br +0 -0
  126. package/public/assets/Team-DZie8W7R.js.gz +0 -0
  127. package/public/assets/Tokens-u3-uRAwd.js.br +0 -0
  128. package/public/assets/Tokens-u3-uRAwd.js.gz +0 -0
  129. package/public/assets/aiSession-BsmDnyV1.js.br +0 -0
  130. package/public/assets/aiSession-BsmDnyV1.js.gz +0 -0
  131. package/public/assets/alert-dialog-Bq_Ln5bp.js.br +0 -0
  132. package/public/assets/alert-dialog-Bq_Ln5bp.js.gz +0 -0
  133. package/public/assets/badge-D-bt97WR.js.br +0 -0
  134. package/public/assets/badge-D-bt97WR.js.gz +0 -0
  135. package/public/assets/dialog-CtzPkg0O.js.br +0 -0
  136. package/public/assets/dialog-CtzPkg0O.js.gz +0 -0
  137. package/public/assets/field-hint-B774BIWK.js.br +0 -1
  138. package/public/assets/field-hint-B774BIWK.js.gz +0 -0
  139. package/public/assets/index-EPyP3g9A.css.br +0 -0
  140. package/public/assets/index-EPyP3g9A.css.gz +0 -0
  141. package/public/assets/index-cgl1yEKu.js +0 -223
  142. package/public/assets/index-cgl1yEKu.js.br +0 -0
  143. package/public/assets/index-cgl1yEKu.js.gz +0 -0
  144. package/public/assets/list-view-BcjDCJy5.js +0 -1
  145. package/public/assets/list-view-BcjDCJy5.js.br +0 -0
  146. package/public/assets/list-view-BcjDCJy5.js.gz +0 -0
  147. package/public/assets/pencil-1XSs32nb.js.br +0 -0
  148. package/public/assets/pencil-1XSs32nb.js.gz +0 -0
  149. package/public/assets/play-DCvrorIC.js.gz +0 -0
  150. package/public/assets/search-input-CFWgLcKA.js.br +0 -0
  151. package/public/assets/search-input-CFWgLcKA.js.gz +0 -0
  152. package/public/assets/select-5ZtzWRYG.js.br +0 -0
  153. package/public/assets/select-5ZtzWRYG.js.gz +0 -0
  154. package/public/assets/slider-DHuMDXcP.js.br +0 -0
  155. package/public/assets/slider-DHuMDXcP.js.gz +0 -0
  156. package/public/assets/tabs-CmgV_sSI.js.br +0 -0
  157. package/public/assets/tabs-CmgV_sSI.js.gz +0 -0
  158. package/public/assets/tech-label-qLodPeUI.js.br +0 -0
  159. package/public/assets/tech-label-qLodPeUI.js.gz +0 -0
  160. package/public/assets/trash-CXjB9oU1.js.br +0 -0
  161. package/public/assets/trash-CXjB9oU1.js.gz +0 -0
  162. package/public/assets/video-CK2q3-0B.js.br +0 -0
  163. package/public/assets/video-CK2q3-0B.js.gz +0 -0
@@ -1,6 +0,0 @@
1
- import{r as y,j as e,c as Ee}from"./vendor-react-DTSdA8m-.js";import{a5 as ve,a7 as Me,a2 as be,b as je,u as R,a as $,C as D,d as F,e as k,f as E,n as L,L as j,B as C,h as q,o as O,aD as ue,H as f,q as S,z as Te,R as Ve,c as pe,l as Ge,I as N,F as P,S as fe,p as Re,g as $e,P as qe,aE as Le,_ as ye,s as M,i as Oe,j as Be,aF as Ie,Z as Qe}from"./index-cgl1yEKu.js";import{F as z}from"./field-hint-B774BIWK.js";import{B as He}from"./badge-D-bt97WR.js";import{P as ze}from"./build-format-ofd2iIzf.js";import{g as Ke,h as Ue,d as We,A as Xe,a as Je,b as Ye,e as Ze,c as er,f as rr}from"./alert-dialog-Bq_Ln5bp.js";import{S as ge}from"./slider-DHuMDXcP.js";import{P as he}from"./pencil-1XSs32nb.js";import"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";var sr=Object.defineProperty,w=(a,i)=>sr(a,"name",{value:i,configurable:!0}),we="Progress",X=100,[ar,Cr]=Me(we),[tr,or]=ar(we),Se=y.forwardRef(w(function(i,r){const{__scopeProgress:g,value:t=null,max:n,getValueLabel:p=Ne,...x}=i;(n||n===0)&&!K(n)&&console.error(Pe(`${n}`,"Progress"));const m=K(n)?n:X;t!==null&&!U(t,m)&&console.error(Ce(`${t}`,"Progress"));const h=U(t,m)?t:null,u=T(h)?p(h,m):void 0;return e.jsx(tr,{scope:g,value:h,max:m,children:e.jsx(ve.div,{"aria-valuemax":m,"aria-valuemin":0,"aria-valuenow":T(h)?h:void 0,"aria-valuetext":u,role:"progressbar","data-state":J(h,m),"data-value":h??void 0,"data-max":m,...x,ref:r})})},"Progress")),ir="ProgressIndicator",nr=y.forwardRef(w(function(i,r){const{__scopeProgress:g,...t}=i,n=or(ir,g);return e.jsx(ve.div,{"data-state":J(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...t,ref:r})},"ProgressIndicator"));function Ne(a,i){return`${Math.round(a/i*100)}%`}w(Ne,"defaultGetValueLabel");function J(a,i){return a==null?"indeterminate":a===i?"complete":"loading"}w(J,"getProgressState");function T(a){return typeof a=="number"}w(T,"isNumber");function K(a){return T(a)&&!isNaN(a)&&a>0}w(K,"isValidMaxNumber");function U(a,i){return T(a)&&!isNaN(a)&&a<=i&&a>=0}w(U,"isValidValueNumber");function Pe(a,i){return`Invalid prop \`max\` of value \`${a}\` supplied to \`${i}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${X}\`.`}w(Pe,"getInvalidMaxError");function Ce(a,i){return`Invalid prop \`value\` of value \`${a}\` supplied to \`${i}\`. The \`value\` prop must be:
2
- - a positive number
3
- - less than the value passed to \`max\` (or ${X} if no \`max\` prop is set)
4
- - \`null\` or \`undefined\` if the progress is indeterminate.
5
-
6
- Defaulting to \`null\`.`}w(Ce,"getInvalidValueError");const _e=y.forwardRef((a,i)=>{const r=Ee.c(14);let g,t,n;r[0]!==a?({className:g,value:n,...t}=a,r[0]=a,r[1]=g,r[2]=t,r[3]=n):(g=r[1],t=r[2],n=r[3]);let p;r[4]!==g?(p=be("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",g),r[4]=g,r[5]=p):p=r[5];const x=`translateX(-${100-(n||0)}%)`;let m;r[6]!==x?(m=e.jsx(nr,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:x}}),r[6]=x,r[7]=m):m=r[7];let h;return r[8]!==t||r[9]!==i||r[10]!==p||r[11]!==m||r[12]!==n?(h=e.jsx(Se,{ref:i,className:p,value:n,...t,children:m}),r[8]=t,r[9]=i,r[10]=p,r[11]=m,r[12]=n,r[13]=h):h=r[13],h});_e.displayName=Se.displayName;const xe=1024*1024*1024,lr=14,W=1,dr=100,cr=O({retentionDays:ue().int().min(0).max(365),capGb:ue().int().min(W).max(10240)});function A(a){if(a<xe)return`${Math.round(a/(1024*1024))} MB`;const i=a/xe;return`${i>=10?i.toFixed(0):i.toFixed(1)} GB`}function mr({settings:a}){const i=je(),r=a.video_pass_retention_days??3,g=Math.max(W,Math.round((a.video_storage_cap_mb??20480)/1024)),t=R({shouldFocusError:!1,resolver:$(cr),values:{retentionDays:r,capGb:g},resetOptions:{keepDirtyValues:!0}});async function n(u){const c=t.formState.dirtyFields;if(!c.retentionDays&&!c.capGb)return;const _=new FormData;c.retentionDays&&_.append("video_pass_retention_days",String(u.retentionDays)),c.capGb&&_.append("video_storage_cap_mb",String(u.capGb*1024));const B=c.retentionDays===!0,I=c.capGb===!0;try{if(!(await fetch("/api/v1/settings",{method:"PATCH",credentials:"include",body:_})).ok){f.error("Failed to update video storage");return}B&&t.getValues("retentionDays")===u.retentionDays&&t.resetField("retentionDays",{defaultValue:u.retentionDays}),I&&t.getValues("capGb")===u.capGb&&t.resetField("capGb",{defaultValue:u.capGb}),f.success("Video storage updated"),i.invalidateQueries({queryKey:S.settings})}catch{f.error("Failed to update video storage")}}if(a.video_storage_cap_mb===void 0)return null;const p=a.video_storage_cap_mb*1024*1024,x=a.video_effective_cap_bytes??p,m=a.video_usage_bytes??0,h=x>0?Math.min(100,m/x*100):0;return e.jsxs(D,{children:[e.jsx(F,{children:e.jsx(k,{children:"Flow run videos"})}),e.jsx(E,{children:e.jsxs("form",{onSubmit:t.handleSubmit(n),className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(_e,{value:h,"aria-label":"Storage used by videos","aria-valuetext":`${A(m)} of ${A(x)}`}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:A(m)})," of ",A(x)," used",x<p&&" — the disk has less room than the limit below, so that is the limit in effect"]})]}),e.jsx(L,{name:"retentionDays",control:t.control,render:({field:u})=>e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"flex items-baseline justify-between",children:[e.jsx(j,{id:"video-retention-label",children:"Keep passed flows' videos for"}),e.jsx("span",{className:"text-sm tabular-nums",children:u.value===1?"1 day":`${u.value} days`})]}),e.jsx(ge,{min:0,max:Math.max(lr,r),step:1,value:[u.value],onValueChange:([c])=>u.onChange(c),"aria-labelledby":"video-retention-label","aria-describedby":"video-retention-hint"}),e.jsx(z,{id:"video-retention-hint",children:"A failed flow's video is kept as long as its run, unless storage runs out."})]})}),e.jsx(L,{name:"capGb",control:t.control,render:({field:u})=>e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"flex items-baseline justify-between",children:[e.jsx(j,{id:"video-cap-label",children:"Storage for videos"}),e.jsx("span",{className:"text-sm tabular-nums",children:t.formState.dirtyFields.capGb?`${u.value} GB`:A(p)})]}),e.jsx(ge,{min:W,max:Math.max(dr,g),step:1,value:[u.value],onValueChange:([c])=>u.onChange(c),"aria-labelledby":"video-cap-label","aria-describedby":"video-cap-hint"}),e.jsx(z,{id:"video-cap-hint",children:"When full, the oldest passed flows' videos go first."})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(C,{type:"submit",size:"sm",disabled:t.formState.isSubmitting,children:t.formState.isSubmitting?"Saving…":"Save changes"})}),e.jsx(q,{errors:t.formState.errors,submitCount:t.formState.submitCount})]})})]})}const ur=O({teamName:M().min(1,"Team name is required"),logo:ye(File).nullable().optional()}),pr=O({displayName:M().min(1,"Display name is required"),avatar:ye(File).nullable().optional()}),fr=O({currentPassword:M().min(1,"Enter your current password"),newPassword:M().min(Oe,Be),confirmPassword:M()}).refine(a=>a.newPassword===a.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});function _r(){var oe,ie,ne,le,de,ce,me;const{resolvedTheme:a}=Te(),i=a==="dark"?"/logo-dark.svg":"/logo.svg",{user:r}=Ve(),g=(r==null?void 0:r.role)==="Admin",t=(r==null?void 0:r.role)==="Admin"||(r==null?void 0:r.role)==="Developer"||(r==null?void 0:r.role)==="QA",n=je(),p=pe({queryKey:S.settings,queryFn:Ie,enabled:g}),[x,m]=y.useState(null),h=x??((oe=p.data)==null?void 0:oe.logo_url)??null,u=y.useRef(null),c=R({shouldFocusError:!1,resolver:$(ur),defaultValues:{teamName:"",logo:null},values:p.data?{teamName:p.data.team_name,logo:null}:void 0,resetOptions:{keepDirtyValues:!0}});async function _(s){const o=new FormData;o.append("team_name",s.teamName),s.logo&&o.append("logo",s.logo);try{if(!(await fetch("/api/v1/settings",{method:"PATCH",credentials:"include",body:o})).ok){f.error("Failed to update workspace");return}f.success("Workspace updated"),n.invalidateQueries({queryKey:S.settings})}catch{f.error("Failed to update workspace")}}const[B,I]=y.useState(null),Q=B??(r==null?void 0:r.avatarUrl)??null,Y=y.useRef(null),v=R({shouldFocusError:!1,resolver:$(pr),defaultValues:{displayName:"",avatar:null},values:r?{displayName:r.displayName??"",avatar:null}:void 0,resetOptions:{keepDirtyValues:!0}});async function Ae(s){const o=new FormData;o.append("display_name",s.displayName),s.avatar&&o.append("avatar",s.avatar);try{if(!(await fetch("/api/v1/profile",{method:"PATCH",credentials:"include",body:o})).ok){f.error("Failed to update profile");return}f.success("Profile updated"),n.invalidateQueries({queryKey:S.me})}catch{f.error("Failed to update profile")}}const d=R({shouldFocusError:!1,resolver:$(fr)});async function De(s){try{const o=await fetch("/api/v1/auth/change-password",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:s.currentPassword,newPassword:s.newPassword})});if(!o.ok){const l=await o.json();d.setError("root",{message:l.error??"Failed to change password"});return}d.reset(),f.success("Password changed")}catch{d.setError("root",{message:"Network error"})}}const H=pe({queryKey:S.apps,queryFn:Qe,enabled:t}).data??[],[Z,ee]=y.useState({}),[re,se]=y.useState({}),[ae,te]=y.useState({});async function Fe(s){te(o=>({...o,[s]:!0}));try{if(!(await fetch(`/api/v1/apps/${s}`,{method:"DELETE",credentials:"include"})).ok){f.error("Failed to delete app");return}n.invalidateQueries({queryKey:S.apps}),f.success("App deleted")}catch{f.error("Failed to delete app")}finally{te(o=>({...o,[s]:!1}))}}async function ke(s){var o;se(l=>({...l,[s]:!0}));try{if(!(await fetch(`/api/v1/apps/${s}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:Z[s]??((o=H.find(b=>b.id===s))==null?void 0:o.name)})})).ok){f.error("Failed to update app");return}f.success("App updated"),ee(({[s]:b,...G})=>G),n.invalidateQueries({queryKey:S.apps})}catch{f.error("Failed to update app")}finally{se(l=>({...l,[s]:!1}))}}const V=Ge({control:v.control,name:"displayName"});return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[e.jsx("h1",{className:"text-xl font-semibold tracking-display-sm",children:"Settings"}),g&&e.jsxs(D,{children:[e.jsx(F,{children:e.jsx(k,{children:"Workspace"})}),e.jsx(E,{children:e.jsxs("form",{onSubmit:c.handleSubmit(_),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"team-name",children:"Team name"}),e.jsx(N,{id:"team-name",placeholder:"My QA Team","aria-required":"true","aria-invalid":!!c.formState.errors.teamName,"aria-describedby":c.formState.errors.teamName?"teamName-error":void 0,...c.register("teamName")}),e.jsx(P,{id:"teamName-error",message:(ie=c.formState.errors.teamName)==null?void 0:ie.message})]}),e.jsx(fe,{}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(j,{children:["Logo ",e.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),e.jsx(L,{name:"logo",control:c.control,render:({field:s})=>e.jsxs("div",{className:"relative w-16 h-16",children:[e.jsx("img",{src:h??i,alt:"Workspace logo",className:"w-16 h-16 rounded-lg object-contain"}),e.jsx("button",{type:"button","aria-label":"Change logo",onClick:()=>{var o;return(o=u.current)==null?void 0:o.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:e.jsx(he,{className:"w-3 h-3","aria-hidden":"true"})}),e.jsx("input",{ref:u,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:o=>{var b;const l=(b=o.target.files)==null?void 0:b[0];if(l&&l.size>2*1024*1024){f.error("Image must be 2MB or less");return}l&&(s.onChange(l),m(URL.createObjectURL(l)))}})]})})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(C,{type:"submit",size:"sm",disabled:c.formState.isSubmitting,children:c.formState.isSubmitting?"Saving…":"Save changes"})}),e.jsx(q,{errors:c.formState.errors,submitCount:c.formState.submitCount})]})})]}),g&&p.data&&e.jsx(mr,{settings:p.data}),e.jsxs(D,{children:[e.jsx(F,{children:e.jsx(k,{children:"Profile"})}),e.jsx(E,{children:e.jsxs("form",{onSubmit:v.handleSubmit(Ae),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"display-name",children:"Nickname"}),e.jsx(N,{id:"display-name",placeholder:"Your name","aria-required":"true","aria-invalid":!!v.formState.errors.displayName,"aria-describedby":v.formState.errors.displayName?"displayName-error":void 0,...v.register("displayName")}),e.jsx(P,{id:"displayName-error",message:(ne=v.formState.errors.displayName)==null?void 0:ne.message})]}),e.jsx(fe,{}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(j,{children:["Avatar ",e.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),e.jsx(L,{name:"avatar",control:v.control,render:({field:s})=>{var o;return e.jsxs("div",{className:"relative w-14 h-14",children:[Q?e.jsx("img",{src:Q,alt:"Profile avatar",className:"w-14 h-14 rounded-full object-cover border"}):e.jsx("div",{className:"w-14 h-14 rounded-full flex items-center justify-center text-lg font-medium",style:(()=>{const l=Re(V||(r==null?void 0:r.email)||"");return{backgroundColor:l.bg,color:l.fg}})(),children:((o=V==null?void 0:V[0])==null?void 0:o.toUpperCase())??"?"}),e.jsx("button",{type:"button","aria-label":"Change avatar",onClick:()=>{var l;return(l=Y.current)==null?void 0:l.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:e.jsx(he,{className:"w-3 h-3","aria-hidden":"true"})}),e.jsx("input",{ref:Y,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:l=>{var G;const b=(G=l.target.files)==null?void 0:G[0];if(b&&b.size>2*1024*1024){f.error("Image must be 2MB or less");return}b&&(s.onChange(b),I(URL.createObjectURL(b)))}})]})}})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(C,{type:"submit",size:"sm",disabled:v.formState.isSubmitting,children:v.formState.isSubmitting?"Saving…":"Save changes"})}),e.jsx(q,{errors:v.formState.errors,submitCount:v.formState.submitCount})]})})]}),e.jsxs(D,{children:[e.jsx(F,{children:e.jsx(k,{children:"Password"})}),e.jsx(E,{children:e.jsxs("form",{onSubmit:d.handleSubmit(De),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"current-password",children:"Current password"}),e.jsx(N,{id:"current-password",type:"password","aria-required":"true",autoComplete:"current-password","aria-invalid":!!d.formState.errors.currentPassword,"aria-describedby":d.formState.errors.currentPassword?"currentPassword-error":void 0,...d.register("currentPassword")}),e.jsx(P,{id:"currentPassword-error",message:(le=d.formState.errors.currentPassword)==null?void 0:le.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"new-password",children:"New password"}),e.jsx(N,{id:"new-password",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!d.formState.errors.newPassword,"aria-describedby":$e("newPassword-hint","newPassword-error",!!d.formState.errors.newPassword),...d.register("newPassword")}),!d.formState.errors.newPassword&&e.jsx(z,{id:"newPassword-hint",children:qe}),e.jsx(P,{id:"newPassword-error",message:(de=d.formState.errors.newPassword)==null?void 0:de.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"confirm-password",children:"Confirm new password"}),e.jsx(N,{id:"confirm-password",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!d.formState.errors.confirmPassword,"aria-describedby":d.formState.errors.confirmPassword?"confirmPassword-error":void 0,...d.register("confirmPassword")}),e.jsx(P,{id:"confirmPassword-error",message:(ce=d.formState.errors.confirmPassword)==null?void 0:ce.message})]}),e.jsx(P,{assertive:!0,id:"default-error",message:(me=d.formState.errors.root)==null?void 0:me.message}),e.jsx("div",{className:"flex justify-end",children:e.jsx(C,{type:"submit",size:"sm",disabled:d.formState.isSubmitting,children:d.formState.isSubmitting?"Saving…":"Change password"})}),e.jsx(q,{errors:d.formState.errors,submitCount:d.formState.submitCount})]})})]}),t&&H.length>0&&e.jsxs(D,{children:[e.jsx(F,{children:e.jsx(k,{children:"Apps"})}),e.jsx(E,{children:e.jsx("div",{className:"flex flex-col divide-y divide-border",children:H.map(s=>e.jsxs("div",{className:"flex flex-col gap-2 py-4 first:pt-0 last:pb-0",children:[e.jsx(j,{htmlFor:`app-${s.id}`,children:"App Name"}),e.jsx(N,{id:`app-${s.id}`,value:Z[s.id]??s.name,onChange:o=>ee(l=>({...l,[s.id]:o.target.value}))}),e.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:s.bundle_id_key}),e.jsx(He,{tone:s.platform==="ios"?"ios":s.platform==="android"?"android":void 0,variant:s.platform==="both"?"secondary":void 0,children:ze[s.platform]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(C,{size:"sm",variant:"outline",disabled:re[s.id],onClick:()=>ke(s.id),children:re[s.id]?"Saving…":"Save"}),e.jsxs(Ke,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx(C,{size:"sm",variant:"destructive",disabled:ae[s.id],children:ae[s.id]?"Deleting…":"Delete"})}),e.jsxs(We,{children:[e.jsxs(Xe,{children:[e.jsx(Je,{children:"Delete app?"}),e.jsxs(Ye,{children:["This will permanently delete ",e.jsx("strong",{children:s.name})," and all its builds. This action cannot be undone."]})]}),e.jsxs(Ze,{children:[e.jsx(er,{className:"w-24",children:"Cancel"}),e.jsx(rr,{className:be(Le({variant:"destructive"}),"w-24"),onClick:()=>Fe(s.id),children:"Delete"})]})]})]})]})]})]},s.id))})})]})]})}export{_r as DefaultSettings};
Binary file
Binary file
@@ -1,81 +0,0 @@
1
- import{c as de,r as a,j as r}from"./vendor-react-DTSdA8m-.js";import{G as it,a1 as Fs,a2 as He,K as Nt,M as Tt,N as Et,B as Qe,T as or,S as Or,H as It,a3 as qs,a4 as vn,a5 as Sn,a6 as zs,a7 as Hr,a8 as Mn,a9 as Us,aa as Ks,ab as nr,ac as wn,b as Br,c as Fr,ad as Ws,q as tr,ae as Vs,af as Ys,ag as Xs,O as Gs,ah as Qs,ai as Zs,aj as Js,L as eo}from"./index-cgl1yEKu.js";import{u as qr,n as Re}from"./useRelay-CES3I1Mt.js";import{p as to,u as zr,a as no,i as ro,b as so,c as oo,t as Ur,I as lo,d as ao,e as io,f as yr,r as co,g as uo,A as fo,o as ho,M as wr,h as po,j as mo,k as go,C as bo,H as vr,l as xo,s as Sr}from"./AndroidDeviceScreen-C55msKfh.js";import{c as Kr,a as yo}from"./vendor-router-B1pQim9Z.js";import{g as wo,d as vo,A as So,a as jo,b as Ro,e as ko,c as Co,f as _o}from"./alert-dialog-Bq_Ln5bp.js";import{L as $n,a as Wr,H as Vr,K as No,A as To,D as Eo,h as Io}from"./aiSession-BsmDnyV1.js";import{V as Po}from"./video-CK2q3-0B.js";import{b as Yr,a as Ao,e as Lo,c as Xr,f as Do,d as Gr}from"./dialog-CtzPkg0O.js";import{a as Mo,S as $o}from"./search-input-CFWgLcKA.js";import{P as Qr}from"./play-DCvrorIC.js";import{T as jr,a as Oo,b as Rr,c as Ho}from"./tabs-CmgV_sSI.js";import{c as Bo}from"./index-D17hSi50.js";import{l as kr,j as Fo}from"./publicLink-D6zKS_wu.js";import{u as qo}from"./useShownAfter-By1Yxysz.js";import{d as zo,S as Uo,a as Ko,b as Wo,c as Zr}from"./select-5ZtzWRYG.js";import{B as Vo}from"./badge-D-bt97WR.js";import{P as Yo,a as Cr,S as Xo}from"./build-format-ofd2iIzf.js";import{R as Go,g as Qo}from"./resource-health-oWJ8hy9X.js";/**
2
- * @license lucide-react v1.58.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Jr={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};Jr.node;const Zo=it(Jr);/**
7
- * @license lucide-react v1.58.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const es={name:"camera",size:24,node:[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]};es.node;const Jo=it(es);/**
12
- * @license lucide-react v1.58.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const ts={name:"film",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]};ts.node;const el=it(ts);/**
17
- * @license lucide-react v1.58.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const ns={name:"fold-horizontal",size:24,node:[["path",{d:"M2 12h6",key:"1wqiqv"}],["path",{d:"M22 12h-6",key:"1eg9hc"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 8v2",key:"1woqiv"}],["path",{d:"M12 14v2",key:"8jcxud"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m19 9-3 3 3 3",key:"12ol22"}],["path",{d:"m5 15 3-3-3-3",key:"1kdhjc"}]]};ns.node;const tl=it(ns);/**
22
- * @license lucide-react v1.58.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const rs={name:"image-plus",size:24,node:[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]};rs.node;const nl=it(rs);/**
27
- * @license lucide-react v1.58.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const ss={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};ss.node;const rl=it(ss);/**
32
- * @license lucide-react v1.58.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const os={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};os.node;const sl=it(os);/**
37
- * @license lucide-react v1.58.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */const ls={name:"radio-off",size:24,node:[["path",{d:"M13.414 13.414a2 2 0 1 1-2.828-2.828",key:"srl686"}],["path",{d:"M16.247 7.761a6 6 0 0 1 1.744 4.572",key:"1h86sp"}],["path",{d:"M19.075 4.933a10 10 0 0 1 2.234 10.72",key:"1n13k4"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}]]};ls.node;const ol=it(ls);/**
42
- * @license lucide-react v1.58.0 - ISC
43
- *
44
- * This source code is licensed under the ISC license.
45
- * See the LICENSE file in the root directory of this source tree.
46
- */const as={name:"radio",size:24,node:[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};as.node;const rr=it(as);/**
47
- * @license lucide-react v1.58.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */const is={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};is.node;const ll=it(is);/**
52
- * @license lucide-react v1.58.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */const cs={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};cs.node;const al=it(cs);/**
57
- * @license lucide-react v1.58.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */const ds={name:"scan-line",size:24,node:[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]]};ds.node;const il=it(ds);/**
62
- * @license lucide-react v1.58.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */const us={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};us.node;const cl=it(us);/**
67
- * @license lucide-react v1.58.0 - ISC
68
- *
69
- * This source code is licensed under the ISC license.
70
- * See the LICENSE file in the root directory of this source tree.
71
- */const fs={name:"unfold-horizontal",size:24,node:[["path",{d:"M16 12h6",key:"15xry1"}],["path",{d:"M8 12H2",key:"1jqql6"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 8v2",key:"1woqiv"}],["path",{d:"M12 14v2",key:"8jcxud"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m19 15 3-3-3-3",key:"wjy7rq"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}]]};fs.node;const dl=it(fs);/**
72
- * @license lucide-react v1.58.0 - ISC
73
- *
74
- * This source code is licensed under the ISC license.
75
- * See the LICENSE file in the root directory of this source tree.
76
- */const hs={name:"volume-1",size:24,node:[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}]]};hs.node;const ul=it(hs);/**
77
- * @license lucide-react v1.58.0 - ISC
78
- *
79
- * This source code is licensed under the ISC license.
80
- * See the LICENSE file in the root directory of this source tree.
81
- */const ps={name:"volume-2",size:24,node:[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]};ps.node;const fl=it(ps);function hl(n){const e=de.c(5),[t,l]=a.useState(null);let s,o;e[0]!==n?(s=()=>{n&&Fs(n).then(l)},o=[n],e[0]=n,e[1]=s,e[2]=o):(s=e[1],o=e[2]),a.useEffect(s,o);let i;return e[3]!==t?(i={build:t},e[3]=t,e[4]=i):i=e[4],i}function pl(n){const e=de.c(43);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],e[0]=t):t=e[0];const[l,s]=a.useState(t),[o,i]=a.useState(null),[c,u]=a.useState(null),[d,f]=a.useState(""),[h,p]=a.useState(void 0),[m,b]=a.useState(!1),[g,E]=a.useState("");let y;e[1]!==c||e[2]!==d?(y={sessionId:c,deviceId:d},e[1]=c,e[2]=d,e[3]=y):y=e[3];const j=a.useRef(y);let C,w;e[4]!==c||e[5]!==d?(C=()=>{j.current={sessionId:c,deviceId:d}},w=[c,d],e[4]=c,e[5]=d,e[6]=C,e[7]=w):(C=e[6],w=e[7]),a.useEffect(C,w);let k;e[8]===Symbol.for("react.memo_cache_sentinel")?(k=Y=>{var B;if(Y.type==="agents:listed"){s(Y.sessions);const{deviceId:te}=j.current,he=te?(B=Y.sessions.flatMap(ml).find(X=>X.id===te))==null?void 0:B.formFactor:void 0;he&&p(he)}Y.type==="session:joined"&&(b(!1),E("Connected")),Y.type==="error"&&(b(!1),E(`Error: ${Y.message}`))},e[8]=k):k=e[8];const N=k,{send:v,connected:R}=qr(N);let D,I;e[9]!==R||e[10]!==v?(D=()=>{if(!R)return;v({type:"agents:list"});const Y=setInterval(()=>v({type:"agents:list"}),5e3);return()=>clearInterval(Y)},I=[R,v],e[9]=R,e[10]=v,e[11]=D,e[12]=I):(D=e[11],I=e[12]),a.useEffect(D,I);let L,M;e[13]!==v?(L=()=>()=>{const{sessionId:Y,deviceId:B}=j.current;Y&&B&&v({type:"device:shutdown",sessionId:Y,payload:{deviceId:B}})},M=[v],e[13]=v,e[14]=L,e[15]=M):(L=e[14],M=e[15]),a.useEffect(L,M);let K;if(e[16]!==n||e[17]!==l){let Y;e[19]!==n?(Y=B=>B.devices.some(te=>te.platform===n),e[19]=n,e[20]=Y):Y=e[20],K=l.filter(Y),e[16]=n,e[17]=l,e[18]=K}else K=e[18];const q=K;let O;e[21]===Symbol.for("react.memo_cache_sentinel")?(O=Y=>{p(Y.formFactor),f(Y.id),b(!0),E("Booting…"),u(Y.sessionId)},e[21]=O):O=e[21];const G=O;let Z;e[22]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>f(""),e[22]=Z):Z=e[22];const J=Z;let $;e[23]!==v?($=()=>{const{sessionId:Y,deviceId:B}=j.current;Y&&B&&v({type:"device:shutdown",sessionId:Y,payload:{deviceId:B}}),u(null),b(!1),E("")},e[23]=v,e[24]=$):$=e[24];const z=$;let ee;e[25]!==v?(ee=()=>{const{sessionId:Y,deviceId:B}=j.current;Y&&B&&v({type:"device:shutdown",sessionId:Y,payload:{deviceId:B}}),u(null),i(null),b(!1),E(""),v({type:"agents:list"})},e[25]=v,e[26]=ee):ee=e[26];const ue=ee;let ie;e[27]!==v?(ie=()=>{u(null),i(null),b(!1),E(""),v({type:"agents:list"})},e[27]=v,e[28]=ie):ie=e[28];const ye=ie;let re;return e[29]!==h||e[30]!==c||e[31]!==q||e[32]!==m||e[33]!==R||e[34]!==d||e[35]!==z||e[36]!==ue||e[37]!==ye||e[38]!==o||e[39]!==v||e[40]!==l||e[41]!==g?(re={sessions:l,activeFormFactor:h,selectedAgent:o,setSelectedAgent:i,activeSessionId:c,deviceId:d,booting:m,status:g,send:v,connected:R,agentGroups:q,startDevice:G,resetDevice:J,handleBack:z,handleBackToMacs:ue,handleSessionEnded:ye},e[29]=h,e[30]=c,e[31]=q,e[32]=m,e[33]=R,e[34]=d,e[35]=z,e[36]=ue,e[37]=ye,e[38]=o,e[39]=v,e[40]=l,e[41]=g,e[42]=re):re=e[42],re}function ml(n){return n.devices}function gl(n,e){const t=de.c(24),[l,s]=a.useState(""),[o,i]=a.useState(""),[c,u]=a.useState("app-only"),[d,f]=a.useState("app-only");let h;t[0]!==(n==null?void 0:n.capabilities)?(h=(n==null?void 0:n.capabilities.includes("full-reset"))??!1,t[0]=n==null?void 0:n.capabilities,t[1]=h):h=t[1];const p=h;let m;t[2]!==p||t[3]!==c?(m=()=>{f(p?c:"app-only"),u("app-only")},t[2]=p,t[3]=c,t[4]=m):m=t[4];const b=m;let g,E,y;if(t[5]!==o||t[6]!==e||t[7]!==l||t[8]!==(n==null?void 0:n.devices)){g=(n==null?void 0:n.devices.filter(k=>k.platform===e))??[],E=[...new Set(g.map(yl).filter(Boolean))].sort(bl);let w;t[12]!==o?(w=k=>!o||k.name.toLowerCase().includes(o.toLowerCase()),t[12]=o,t[13]=w):w=t[13],y=(l?g.filter(k=>k.osVersion===l):g).filter(w),t[5]=o,t[6]=e,t[7]=l,t[8]=n==null?void 0:n.devices,t[9]=g,t[10]=E,t[11]=y}else g=t[9],E=t[10],y=t[11];const j=y;let C;return t[14]!==d||t[15]!==b||t[16]!==o||t[17]!==g||t[18]!==p||t[19]!==l||t[20]!==E||t[21]!==c||t[22]!==j?(C={filteredDevices:g,osVersions:E,osVersion:l,setOsVersion:s,deviceSearch:o,setDeviceSearch:i,versionedDevices:j,resetMode:c,setResetMode:u,appliedResetMode:d,consumeResetMode:b,fullResetSupported:p},t[14]=d,t[15]=b,t[16]=o,t[17]=g,t[18]=p,t[19]=l,t[20]=E,t[21]=c,t[22]=j,t[23]=C):C=t[23],C}function bl(n,e){const t=xl,[l,s]=[t(n),t(e)];for(let o=0;o<Math.max(l.length,s.length);o++){const i=(s[o]??0)-(l[o]??0);if(i!==0)return i}return 0}function xl(n){return n.replace(/^[^\d]*/,"").split(".").map(Number)}function yl(n){return n.osVersion}function wl(){const n=de.c(8),[e]=Kr();let t;n[0]!==e?(t=e.get("perf"),n[0]=e,n[1]=t):t=n[1];const l=t==="1",[s,o]=a.useState(!1),[i,c]=a.useState(l);i!==l&&(c(l),l||o(!1));let u,d;n[2]!==l?(u=()=>{if(!l)return;const p=m=>{m.ctrlKey&&m.shiftKey&&m.key==="P"&&o(vl)};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},d=[l],n[2]=l,n[3]=u,n[4]=d):(u=n[3],d=n[4]),a.useEffect(u,d);const f=l&&!s;let h;return n[5]!==l||n[6]!==f?(h={perfMode:l,visible:f},n[5]=l,n[6]=f,n[7]=h):h=n[7],h}function vl(n){return!n}const Sl=["video/mp4;codecs=avc1","video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm"];function ms({sessionId:n,buildId:e,onRecordingUploaded:t}){const[l,s]=a.useState("idle"),o=a.useRef(null),i=a.useRef(t);a.useEffect(()=>{i.current=t},[t]);const c=a.useRef(!1),u=a.useRef(null),d=a.useRef([]),f=a.useRef(""),h=a.useRef(0),p=a.useRef(null),m=a.useCallback(function y(){var j;c.current&&((j=p.current)==null||j.call(p),h.current=requestAnimationFrame(y))},[]),b=a.useCallback(y=>{p.current=y},[]),g=a.useCallback(()=>{const y=o.current;if(!y)return;const j=y.getContext("2d");j&&(j.fillStyle="#000",j.fillRect(0,0,y.width,y.height));const C=Sl.find(k=>MediaRecorder.isTypeSupported(k))??"";if(!C)return;f.current=C,d.current=[];const w=new MediaRecorder(y.captureStream(30),{mimeType:C});w.ondataavailable=k=>{k.data.size>0&&d.current.push(k.data)},u.current=w,w.start(1e3),c.current=!0,h.current=requestAnimationFrame(m),s("recording")},[m]),E=a.useCallback(async()=>{var N;s("uploading"),c.current=!1,cancelAnimationFrame(h.current);const y=u.current;if(!y){s("idle");return}await new Promise(v=>{const R=setTimeout(v,5e3);y.onstop=()=>{clearTimeout(R),v()};try{y.stop()}catch{clearTimeout(R),v()}}),u.current=null;const j=f.current,C=j.includes("mp4")?".mp4":".webm",w=new Blob(d.current,{type:j});d.current=[];const k=new FormData;k.append("file",w,`tapflow-${Date.now()}${C}`);try{const v=new URLSearchParams({sessionId:n});e&&v.set("buildId",String(e));const R=await fetch(`/api/v1/recordings/upload?${v}`,{method:"POST",credentials:"include",body:k}),D=await R.json();if(R.ok&&D.url){const I=document.createElement("a");I.href=D.url,I.download="",I.click(),(N=i.current)==null||N.call(i),s("done"),setTimeout(()=>s("idle"),2e3)}else s("idle")}catch{s("idle")}},[n,e]);return a.useEffect(()=>{if(l!=="recording")return;const y=()=>{document.visibilityState==="hidden"&&E()};return document.addEventListener("visibilitychange",y),()=>{var j;document.removeEventListener("visibilitychange",y),c.current&&(c.current=!1,cancelAnimationFrame(h.current),(j=u.current)==null||j.stop(),u.current=null)}},[l,E]),{recordState:l,recordCanvasRef:o,setComposeFrame:b,startClientRecording:g,stopClientRecording:E}}function Dn(n){const e=de.c(8);let t,l;e[0]!==n?({className:t,...l}=n,e[0]=n,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=He("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",t),e[3]=t,e[4]=s):s=e[4];let o;return e[5]!==l||e[6]!==s?(o=r.jsx("kbd",{"data-slot":"kbd",className:s,...l}),e[5]=l,e[6]=s,e[7]=o):o=e[7],o}function lr(n){const e=de.c(8);let t,l;e[0]!==n?({className:t,...l}=n,e[0]=n,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=He("inline-flex items-center gap-1",t),e[3]=t,e[4]=s):s=e[4];let o;return e[5]!==l||e[6]!==s?(o=r.jsx("kbd",{"data-slot":"kbd-group",className:s,...l}),e[5]=l,e[6]=s,e[7]=o):o=e[7],o}function Un(n){const e=de.c(7),{label:t,keys:l}=n;let s;e[0]!==l?(s=l.map(jl),e[0]=l,e[1]=s):s=e[1];let o;e[2]!==s?(o=r.jsx(lr,{children:s}),e[2]=s,e[3]=o):o=e[3];let i;return e[4]!==t||e[5]!==o?(i=r.jsxs("span",{className:"flex items-center gap-3",children:[t,o]}),e[4]=t,e[5]=o,e[6]=i):i=e[6],i}function jl(n){return r.jsx(Dn,{children:n},n)}const _r="text-muted-foreground hover:text-muted-foreground",Nr="text-destructive hover:text-destructive";function Rl(n){switch(n){case"awaiting-app":return" Launch an app through tapflow so it is told too.";case"not-armed":return" Restart the device so tapflow can set it up.";case"state-unconfirmed":return" tapflow could not confirm the change — try again.";case"unsupported-device":return" The device did not change when tapflow asked — try again, or use another device.";case"filter-unavailable":return" This Mac is not set up to take devices off the network — see the network control guide.";case"enforcement-lost":return" It went back on the network on its own.";case"hooks-not-installed":return" tapflow cannot tell this app it is off the network.";default:return" tapflow cannot change it right now."}}function kl({position:n,steerable:e,reason:t}){const l=t==="awaiting-app",s=!e&&t==="state-unconfirmed"?" animate-pulse":"",o=e?"":Rl(t);switch(n){case"offline":return{Icon:ol,className:(e||l?"text-amber-500 hover:text-amber-500":Nr)+s,status:`Device is offline.${o}`};case"online":return{Icon:rr,className:(e||l?"":Nr)+s,status:`Device is on the network.${o}`};case"waiting":return{Icon:rr,className:`${_r} animate-pulse`,status:"Checking the network state."};case"unknown":return{Icon:rr,className:_r,status:e?"No network state has been reported.":"tapflow could not read the network state — try again."}}}function Cl({position:n,steerable:e,reason:t}){const l=n==="offline"?"Bring device online":n==="online"?"Take device offline":"Toggle device network",s=n==="online"||n==="offline",o=n==="unknown"&&!e&&t==="state-unconfirmed",i=t==="state-unconfirmed"||t==="unsupported-device";return e||!(s||o)||t==="awaiting-app"?l:i?`Retry: ${l.toLowerCase()}`:`${l} — unavailable`}function gs(n){var Ee;const e=de.c(82),{joined:t,onScreenshot:l,onRecordToggle:s,recordState:o,onRotate:i,posture:c,onDeepLink:u,navigationSlot:d,deviceSlot:f,launchSlot:h,network:p,reboot:m}=n,b=a.useId(),g=a.useId(),E=a.useId(),y=a.useId(),[j,C]=a.useState(!1);if(!t)return null;let w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w=r.jsx(Wr,{className:"h-4 w-4"}),e[0]=w):w=e[0];let k;e[1]!==u?(k=r.jsx(Tt,{asChild:!0,children:r.jsx(Qe,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":"Open a deeplink",onClick:u,children:w})}),e[1]=u,e[2]=k):k=e[2];let N;e[3]===Symbol.for("react.memo_cache_sentinel")?(N=r.jsx(Et,{side:"left",children:r.jsx(Un,{label:"Deeplink",keys:["⌘","K"]})}),e[3]=N):N=e[3];let v;e[4]!==k?(v=r.jsxs(Nt,{children:[k,N]}),e[4]=k,e[5]=v):v=e[5];let R;e[6]!==h||e[7]!==d||e[8]!==v?(R=r.jsxs("div",{role:"group","aria-label":"Navigation",className:"flex flex-col items-center gap-0.5",children:[h,d,v]}),e[6]=h,e[7]=d,e[8]=v,e[9]=R):R=e[9];let D;e[10]===Symbol.for("react.memo_cache_sentinel")?(D=r.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"w-4 h-px bg-border my-1"}),e[10]=D):D=e[10];let I;e[11]===Symbol.for("react.memo_cache_sentinel")?(I=r.jsx(al,{className:"h-4 w-4"}),e[11]=I):I=e[11];let L;e[12]!==i?(L=r.jsx(Tt,{asChild:!0,children:r.jsx(Qe,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":"Rotate the device",onClick:i,children:I})}),e[12]=i,e[13]=L):L=e[13];let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=r.jsx(Et,{side:"left",children:r.jsx(Un,{label:"Rotate",keys:["⌘","⇧","O"]})}),e[14]=M):M=e[14];let K;e[15]!==L?(K=r.jsxs(Nt,{children:[L,M]}),e[15]=L,e[16]=K):K=e[16];let q;e[17]!==c||e[18]!==E?(q=c&&c.postures.length===2&&r.jsx("span",{id:E,role:"status","aria-live":"polite",className:"sr-only",children:c.pending?"Changing posture":((Ee=c.postures.find(ae=>ae.id===c.currentId))==null?void 0:Ee.label)??"Current posture unknown"}),e[17]=c,e[18]=E,e[19]=q):q=e[19];let O;e[20]!==c||e[21]!==E?(O=c&&c.postures.length===2&&(()=>{const ae=c.postures.findIndex(Le=>Le.id===c.currentId),ke=ae===-1?null:c.postures[ae],Ke=c.postures[(ae+1)%2],Ae=ae===0,Ye=Ae?dl:tl,Se=Ae?"Unfold":"Fold",Fe=ke?`${Se}: ${ke.label} to ${Ke.label}`:`${Se}: ${Ke.label}`,Xe=Le=>r.jsx(Qe,{variant:"ghost",size:"icon",className:"h-8 w-8 aria-disabled:opacity-50","aria-label":c.pending?`${Fe} — changing`:Fe,"aria-busy":c.pending,"aria-disabled":c.pending,"aria-describedby":E,onClick:()=>{c.pending||Le==null||Le()},children:c.pending?r.jsx($n,{className:"h-4 w-4 animate-spin"}):r.jsx(Ye,{className:"h-4 w-4"})});return r.jsxs(Nt,{children:[r.jsx(Tt,{asChild:!0,children:Xe(()=>c.onSelect(Ke.id))}),r.jsx(Et,{side:"left",children:c.pending?`${Fe} — changing`:Fe})]})})(),e[20]=c,e[21]=E,e[22]=O):O=e[22];let G;e[23]!==m||e[24]!==g?(G=m&&(()=>{const ae=m.pending?"Restarting the device":"Restart the device";return r.jsxs(r.Fragment,{children:[r.jsxs(Nt,{children:[r.jsx(Tt,{asChild:!0,children:r.jsx(Qe,{ref:m.buttonRef,variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":ae,"aria-busy":m.pending,"aria-disabled":m.pending,"aria-describedby":g,onClick:()=>{m.pending||C(!0)},children:m.pending?r.jsx($n,{className:"h-4 w-4 animate-spin"}):r.jsx(ll,{className:"h-4 w-4"})})}),r.jsx(Et,{side:"left",children:ae})]}),r.jsx("span",{id:g,role:"status",className:"sr-only",children:m.pending?"Restarting the device.":""})]})})(),e[23]=m,e[24]=g,e[25]=G):G=e[25];let Z;e[26]!==f||e[27]!==K||e[28]!==q||e[29]!==O||e[30]!==G?(Z=r.jsxs("div",{role:"group","aria-label":"Device",className:"flex flex-col items-center gap-0.5",children:[f,K,q,O,G]}),e[26]=f,e[27]=K,e[28]=q,e[29]=O,e[30]=G,e[31]=Z):Z=e[31];let J;e[32]===Symbol.for("react.memo_cache_sentinel")?(J=r.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"w-4 h-px bg-border my-1"}),e[32]=J):J=e[32];let $;e[33]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx(Jo,{className:"h-4 w-4"}),e[33]=$):$=e[33];let z;e[34]!==l?(z=r.jsx(Tt,{asChild:!0,children:r.jsx(Qe,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":"Take a screenshot",onClick:l,children:$})}),e[34]=l,e[35]=z):z=e[35];let ee;e[36]===Symbol.for("react.memo_cache_sentinel")?(ee=r.jsx(Et,{side:"left",children:r.jsx(Un,{label:"Screenshot",keys:["⌘","S"]})}),e[36]=ee):ee=e[36];let ue;e[37]!==z?(ue=r.jsxs(Nt,{children:[z,ee]}),e[37]=z,e[38]=ue):ue=e[38];const ie=o==="recording"&&"text-red-500 hover:text-red-500";let ye;e[39]!==ie?(ye=He("h-8 w-8 aria-disabled:opacity-50",ie),e[39]=ie,e[40]=ye):ye=e[40];const re=o==="recording"?"Stop recording":o==="uploading"?"Processing the recording":o==="done"?"Recording saved":"Start recording",Y=o==="uploading",B=o==="uploading"||o==="done";let te;e[41]!==s||e[42]!==o?(te=()=>{(o==="idle"||o==="recording")&&s()},e[41]=s,e[42]=o,e[43]=te):te=e[43];let he;e[44]!==o?(he=o==="uploading"?r.jsx($n,{className:"h-4 w-4 animate-spin"}):o==="recording"?r.jsx(cl,{className:"h-4 w-4 fill-current"}):r.jsx(Po,{className:"h-4 w-4"}),e[44]=o,e[45]=he):he=e[45];let X;e[46]!==y||e[47]!==ye||e[48]!==re||e[49]!==Y||e[50]!==B||e[51]!==te||e[52]!==he?(X=r.jsx(Tt,{asChild:!0,children:r.jsx(Qe,{variant:"ghost",size:"icon",className:ye,"aria-label":re,"aria-busy":Y,"aria-disabled":B,"aria-describedby":y,onClick:te,children:he})}),e[46]=y,e[47]=ye,e[48]=re,e[49]=Y,e[50]=B,e[51]=te,e[52]=he,e[53]=X):X=e[53];let fe;e[54]!==o?(fe=o==="idle"?r.jsx(Un,{label:"Start recording",keys:["⌘","⇧","Y"]}):o==="recording"?r.jsx(Un,{label:"Stop recording",keys:["⌘","⇧","Y"]}):o==="done"?"Recording saved":"Processing the recording",e[54]=o,e[55]=fe):fe=e[55];let se;e[56]!==fe?(se=r.jsx(Et,{side:"left",children:fe}),e[56]=fe,e[57]=se):se=e[57];let pe;e[58]!==X||e[59]!==se?(pe=r.jsxs(Nt,{children:[X,se]}),e[58]=X,e[59]=se,e[60]=pe):pe=e[60];const Be=o==="recording"?"Recording.":o==="uploading"?"Processing the recording.":o==="done"?"Recording saved.":"";let H;e[61]!==y||e[62]!==Be?(H=r.jsx("span",{id:y,role:"status",className:"sr-only",children:Be}),e[61]=y,e[62]=Be,e[63]=H):H=e[63];let V;e[64]!==ue||e[65]!==pe||e[66]!==H?(V=r.jsxs("div",{role:"group","aria-label":"Capture",className:"flex flex-col items-center gap-0.5",children:[ue,pe,H]}),e[64]=ue,e[65]=pe,e[66]=H,e[67]=V):V=e[67];let ce;e[68]!==b||e[69]!==p?(ce=p&&r.jsxs(r.Fragment,{children:[r.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"w-4 h-px bg-border my-1"}),r.jsx("div",{role:"group","aria-label":"Environment",className:"flex flex-col items-center gap-0.5",children:p&&(()=>{const{Icon:ae,className:ke,status:Ke}=kl(p),Ae=Cl(p),Ye=p.position==="waiting"||p.position==="unknown"||!p.steerable;return r.jsxs(Nt,{children:[r.jsx(Tt,{asChild:!0,children:r.jsx(Qe,{variant:"ghost",size:"icon",className:He("h-8 w-8",ke),"aria-label":Ae,"aria-busy":p.pending,"aria-disabled":p.pending,"aria-describedby":b,onClick:()=>{p.pending||p.onToggle()},children:p.pending?r.jsx($n,{className:"h-4 w-4 animate-spin"}):r.jsx(ae,{className:"h-4 w-4"})})}),r.jsx("span",{id:b,role:"status",className:"sr-only",children:p.pending?"Changing the network state.":Ke}),r.jsx(Et,{side:"left",children:Ye?`${Ae} — ${Ke}`:Ae})]})})()})]}),e[68]=b,e[69]=p,e[70]=ce):ce=e[70];let _e;e[71]!==Z||e[72]!==V||e[73]!==ce||e[74]!==R?(_e=r.jsxs("div",{className:"flex flex-col items-center gap-0.5 rounded-2xl border bg-background/90 backdrop-blur-sm px-1.5 py-2.5 shrink-0 mt-3",children:[R,D,Z,J,V,ce]}),e[71]=Z,e[72]=V,e[73]=ce,e[74]=R,e[75]=_e):_e=e[75];let ve;e[76]!==j||e[77]!==m?(ve=m&&r.jsx(wo,{open:j,onOpenChange:C,children:r.jsxs(vo,{children:[r.jsxs(So,{children:[r.jsx(jo,{children:"Restart this device?"}),r.jsx(Ro,{children:"Anything open on the device closes, and whatever you had set up on screen is gone. The app under test is reinstalled, which clears its data; other apps keep theirs. The device takes a moment to come back."})]}),r.jsxs(ko,{children:[r.jsx(Co,{children:"Cancel"}),r.jsx(_o,{onClick:()=>{C(!1),m.onReboot()},children:"Restart"})]})]})}),e[76]=j,e[77]=m,e[78]=ve):ve=e[78];let Ne;return e[79]!==_e||e[80]!==ve?(Ne=r.jsxs(or,{delayDuration:400,children:[_e,ve]}),e[79]=_e,e[80]=ve,e[81]=Ne):Ne=e[81],Ne}const _l=3e3,Nl=8e3;function bs(n){const e=de.c(40),{sessionId:t,send:l,supported:s,deviceReady:o,handlerRef:i,onError:c}=n,[u,d]=a.useState("waiting"),[f,h]=a.useState(!0),[p,m]=a.useState(void 0),b=a.useRef(void 0),[g,E]=a.useState(!1),y=a.useRef(null);let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=new Set,e[0]=j):j=e[0];const C=a.useRef(j),w=a.useRef(c);let k,N;e[1]!==c?(k=()=>{w.current=c},N=[c],e[1]=c,e[2]=k,e[3]=N):(k=e[2],N=e[3]),a.useEffect(k,N);const v=a.useRef(o);let R,D;e[4]!==o?(R=()=>{v.current=o},D=[o],e[4]=o,e[5]=R,e[6]=D):(R=e[5],D=e[6]),a.useEffect(R,D);const I=a.useRef(o),[L,M]=a.useState(t);L!==t&&(M(t),d("waiting"),h(!0),m(void 0),E(!1));let K;e[7]===Symbol.for("react.memo_cache_sentinel")?(K=()=>{b.current=void 0,y.current=null,I.current=v.current,C.current.clear()},e[7]=K):K=e[7];let q;e[8]!==t?(q=[t],e[8]=t,e[9]=q):q=e[9],a.useEffect(K,q);let O,G;e[10]!==o?(O=()=>{var X;if(o){I.current=!0,d("waiting");return}d(I.current?"unknown":"waiting"),h(!0),m(void 0),b.current=void 0,y.current&&((X=w.current)==null||X.call(w,"The device became unavailable before it answered. Its network state is unchanged as far as tapflow can tell."),C.current.add(y.current)),E(!1),y.current=null},G=[o],e[10]=o,e[11]=O,e[12]=G):(O=e[11],G=e[12]),a.useEffect(O,G);let Z,J;e[13]!==i||e[14]!==s?(Z=()=>{if(s)return i.current=X=>{var se,pe;if(X.type==="network:error"){X.requestId===y.current&&(y.current=null,E(!1),(se=w.current)==null||se.call(w,X.message));return}if(X.type!=="network:state"||!v.current||X.requestId!==void 0&&C.current.has(X.requestId))return;const fe=X.payload.available?void 0:X.payload.reason;d(X.payload.offline===void 0?"unknown":X.payload.offline?"offline":"online"),h(X.payload.available),m(fe),fe==="enforcement-lost"&&b.current!=="enforcement-lost"&&((pe=w.current)==null||pe.call(w,"The device went back on the network before you took it off. Anything checked while it was offline needs checking again.")),b.current=fe,X.requestId!==void 0&&X.requestId===y.current&&(y.current=null,E(!1))},()=>{i.current=void 0}},J=[i,s],e[13]=i,e[14]=s,e[15]=Z,e[16]=J):(Z=e[15],J=e[16]),a.useEffect(Z,J);let $,z;e[17]!==o||e[18]!==u||e[19]!==s?($=()=>{if(!s||!o||u!=="waiting")return;const X=setTimeout(()=>d(Tl),_l);return()=>clearTimeout(X)},z=[s,o,u],e[17]=o,e[18]=u,e[19]=s,e[20]=$,e[21]=z):($=e[20],z=e[21]),a.useEffect($,z);let ee;e[22]!==g||e[23]!==u||e[24]!==l||e[25]!==t||e[26]!==s?(ee=()=>{if(!s||g)return;const X=Re();y.current=X,E(!0),l({type:"network:set",sessionId:t,requestId:X,payload:{offline:u!=="offline"}})},e[22]=g,e[23]=u,e[24]=l,e[25]=t,e[26]=s,e[27]=ee):ee=e[27];const ue=ee,[ie,ye]=a.useState(null);let re,Y;e[28]!==g?(re=()=>{ye(g?y.current:null)},Y=[g],e[28]=g,e[29]=re,e[30]=Y):(re=e[29],Y=e[30]),a.useEffect(re,Y);let B,te;e[31]!==ie?(B=()=>{if(ie===null)return;const X=setTimeout(()=>{var fe;y.current===ie&&(y.current=null,E(!1),(fe=w.current)==null||fe.call(w,"The device did not answer. Its network state is unchanged as far as tapflow can tell."))},Nl);return()=>clearTimeout(X)},te=[ie],e[31]=ie,e[32]=B,e[33]=te):(B=e[32],te=e[33]),a.useEffect(B,te);let he;return e[34]!==g||e[35]!==u||e[36]!==p||e[37]!==f||e[38]!==ue?(he={position:u,steerable:f,reason:p,pending:g,toggle:ue},e[34]=g,e[35]=u,e[36]=p,e[37]=f,e[38]=ue,e[39]=he):he=e[39],he}function Tl(n){return n==="waiting"?"unknown":n}const El="https://www.tapflow.dev/operate/https#pick-a-method";function Il(n){const e=de.c(9),{open:t,onOpenChange:l}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx(Yr,{children:"Streaming in Standard mode"}),e[0]=s):s=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(Ao,{children:[s,r.jsxs(Lo,{className:"space-y-3 pt-1",children:[r.jsx("span",{className:"block",children:"This screen is running in Standard mode. For a faster, smoother picture, switch to Smooth."}),r.jsx("span",{className:"block",children:"Smooth needs the relay served over HTTPS. If you didn't set up tapflow, ask whoever did."})]})]}),e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(Qe,{variant:"outline",onClick:Pl,children:"How to enable"}),e[2]=i):i=e[2];let c;e[3]!==l?(c=r.jsxs(Xr,{className:"sm:max-w-[440px]",children:[o,r.jsxs(Do,{children:[i,r.jsx(Qe,{onClick:()=>l(!1),children:"Got it"})]})]}),e[3]=l,e[4]=c):c=e[4];let u;return e[5]!==l||e[6]!==t||e[7]!==c?(u=r.jsx(Gr,{open:t,onOpenChange:l,children:c}),e[5]=l,e[6]=t,e[7]=c,e[8]=u):u=e[8],u}function Pl(){return window.open(El,"_blank","noopener,noreferrer")}const Tr="tapflow.perfModeNoticeDismissed";function Al(n,e){return n==="standard"&&!e}const Ll={high:"Smooth",standard:"Standard",unsupported:null};function Dl(n){const{connected:e,joined:t,bootError:l,deviceReady:s,installing:o,installError:i,agentAway:c,decoderUnsupported:u}=n;return e?t?c?"The agent went away — waiting for it to come back…":l?`Boot failed: ${l.length>40?l.slice(0,40)+"…":l}`:s?o?"Installing app…":i?`Install failed: ${i}`:u?"Streaming is not supported in this environment.":null:"Starting device…":"Joining session…":"Connecting…"}function cr(n){const e=de.c(40),{joined:t,fps:l,keyboardActive:s}=n;let o;e[0]!==n?(o=Dl(n),e[0]=n,e[1]=o):o=e[1];const i=o,c=l>15,u=c?"#10b981":"#94a3b8",d=c?"Active":"Idle";let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=to(),e[2]=f):f=e[2];const h=f,p=Ll[h];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{let z=!1;try{z=localStorage.getItem(Tr)==="1"}catch{}return Al(h,z)},e[3]=m):m=e[3];const[b,g]=a.useState(m);let E;e[4]===Symbol.for("react.memo_cache_sentinel")?(E=z=>{if(g(z),!z)try{localStorage.setItem(Tr,"1")}catch{}},e[4]=E):E=e[4];const y=E,j=s?"text-emerald-500":"text-muted-foreground";let C;e[5]!==j?(C=He("flex items-center",j),e[5]=j,e[6]=C):C=e[6];let w,k,N,v;e[7]===Symbol.for("react.memo_cache_sentinel")?(w={gap:6},k=r.jsx(il,{className:"h-3.5 w-3.5 shrink-0"}),N=r.jsx("span",{className:"text-[12px] font-medium",children:"Focus"}),v=r.jsx("span",{"aria-hidden":"true",className:"text-[11px] text-muted-foreground/60",children:"·"}),e[7]=w,e[8]=k,e[9]=N,e[10]=v):(w=e[7],k=e[8],N=e[9],v=e[10]);const R=s?"text-emerald-500":"text-muted-foreground/60";let D;e[11]!==R?(D=He("text-[11px]",R),e[11]=R,e[12]=D):D=e[12];const I=s?"On":"Off";let L;e[13]!==D||e[14]!==I?(L=r.jsx("span",{className:D,children:I}),e[13]=D,e[14]=I,e[15]=L):L=e[15];let M;e[16]!==L||e[17]!==C?(M=r.jsxs("div",{className:C,style:w,children:[k,N,v,L]}),e[16]=L,e[17]=C,e[18]=M):M=e[18];let K;e[19]!==u||e[20]!==l||e[21]!==c||e[22]!==t||e[23]!==d?(K=t&&r.jsxs("div",{className:"flex items-center gap-[12px]",children:[r.jsxs("div",{className:"flex items-center gap-[4px]",children:[r.jsx("span",{className:"h-2 w-2 rounded-full shrink-0 mr-1",style:{background:u}}),r.jsx("span",{className:"text-[12px] font-mono text-foreground/75",children:l}),r.jsx("span",{className:"text-[12px] text-muted-foreground",children:"fps"}),r.jsx("span",{className:"text-[11px] text-muted-foreground/60",children:"·"}),r.jsx("span",{className:He("text-[11px]",c?"text-emerald-500":"text-muted-foreground/60"),children:d})]}),p&&r.jsxs(r.Fragment,{children:[r.jsx(Or,{orientation:"vertical",className:"h-3"}),h==="standard"?r.jsx("button",{type:"button",onClick:()=>g(!0),className:"text-[11px] text-foreground/70 hover:text-foreground underline-offset-2 hover:underline",children:p}):r.jsx("span",{className:"text-[11px] text-muted-foreground",children:p})]})]}),e[19]=u,e[20]=l,e[21]=c,e[22]=t,e[23]=d,e[24]=K):K=e[24];const q=i?void 0:"sr-only";let O;e[25]!==i?(O=i&&r.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed break-words",children:i}),e[25]=i,e[26]=O):O=e[26];let G;e[27]!==q||e[28]!==O?(G=r.jsx("div",{role:"status",className:q,children:O}),e[27]=q,e[28]=O,e[29]=G):G=e[29];let Z;e[30]!==n.note?(Z=n.note&&r.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed break-words",children:n.note}),e[30]=n.note,e[31]=Z):Z=e[31];let J;e[32]!==b?(J=r.jsx(Il,{open:b,onOpenChange:y}),e[32]=b,e[33]=J):J=e[33];let $;return e[34]!==M||e[35]!==K||e[36]!==G||e[37]!==Z||e[38]!==J?($=r.jsxs("div",{className:"w-[300px] shrink-0 mt-3 rounded-xl border bg-background px-4 py-4 flex flex-col gap-3",children:[M,K,G,Z,J]}),e[34]=M,e[35]=K,e[36]=G,e[37]=Z,e[38]=J,e[39]=$):$=e[39],$}function xs(n){const e=de.c(11),{open:t,onOpenChange:l,openUrl:s}=n,[o,i]=a.useState(0),[c,u]=a.useState(t);c!==t&&(u(t),t&&i(Ml));let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(Yr,{className:"sr-only",children:"Open Deeplink"}),e[0]=d):d=e[0];let f;e[1]!==l?(f=()=>l(!1),e[1]=l,e[2]=f):f=e[2];let h;e[3]!==s||e[4]!==o||e[5]!==f?(h=r.jsxs(Xr,{className:"w-[500px] max-w-[500px] h-[52px] !rounded-[18px] p-[10px] border border-border bg-background shadow-lg overflow-hidden [&>button]:hidden","aria-describedby":void 0,children:[d,r.jsx($l,{openUrl:s,close:f},o)]}),e[3]=s,e[4]=o,e[5]=f,e[6]=h):h=e[6];let p;return e[7]!==l||e[8]!==t||e[9]!==h?(p=r.jsx(Gr,{open:t,onOpenChange:l,children:h}),e[7]=l,e[8]=t,e[9]=h,e[10]=p):p=e[10],p}function Ml(n){return n+1}function $l(n){const e=de.c(21),{openUrl:t,close:l}=n,[s,o]=a.useState(""),i=a.useRef(null);let c,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{const C=setTimeout(()=>{var w;return(w=i.current)==null?void 0:w.focus()},0);return()=>clearTimeout(C)},u=[],e[0]=c,e[1]=u):(c=e[0],u=e[1]),a.useEffect(c,u);let d;e[2]!==l||e[3]!==t||e[4]!==s?(d=()=>{s.trim()&&(t(s.trim()),l())},e[2]=l,e[3]=t,e[4]=s,e[5]=d):d=e[5];const f=d;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=r.jsx(Mo,{className:"h-4 w-4 text-muted-foreground shrink-0","aria-hidden":"true"}),e[6]=h):h=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=C=>o(C.target.value),e[7]=p):p=e[7];let m;e[8]!==f?(m=C=>{C.key==="Enter"&&f()},e[8]=f,e[9]=m):m=e[9];let b;e[10]!==m||e[11]!==s?(b=r.jsxs("div",{className:"flex-1 h-[32px] flex items-center gap-2 pl-[4px] pb-[1px]",children:[h,r.jsx("input",{ref:i,"aria-label":"Deeplink URL",className:"flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground min-w-0",placeholder:"myapp://home...",value:s,onChange:p,onKeyDown:m})]}),e[10]=m,e[11]=s,e[12]=b):b=e[12];let g;e[13]!==s?(g=s.trim(),e[13]=s,e[14]=g):g=e[14];const E=!g;let y;e[15]!==f||e[16]!==E?(y=r.jsx(Qe,{size:"sm",disabled:E,onClick:f,className:"shrink-0 rounded-xl h-8 px-4",children:"Open"}),e[15]=f,e[16]=E,e[17]=y):y=e[17];let j;return e[18]!==y||e[19]!==b?(j=r.jsx(r.Fragment,{children:r.jsxs("div",{className:"flex items-center gap-3",children:[b,y]})}),e[18]=y,e[19]=b,e[20]=j):j=e[20],j}const Ol=3e3+5*300,Hl=Ol+500,Qn=8;function Bl(){var n;return window.isSecureContext&&typeof ClipboardItem<"u"&&!!((n=navigator.clipboard)!=null&&n.write)}class Kn extends Error{}function Fl(n){const e=n.then(t=>new Blob([t],{type:"text/plain"}));return navigator.clipboard.write([new ClipboardItem({"text/plain":e})])}function dr(n){return!(n.metaKey||n.ctrlKey)||n.altKey?!1:n.code==="KeyV"?!0:!n.shiftKey&&(n.code==="KeyC"||n.code==="KeyX")}const ql=1024*1024,zl=n=>new TextEncoder().encode(n).length,Ul=n=>{var e;return!!((e=n.payload)!=null&&e.unsupported)},Kl=n=>{var e,t;return((e=n.payload)==null?void 0:e.sentinelParked)===!1||((t=n.payload)==null?void 0:t.unsupported)===!0};function Wl(){const n=window.getSelection();return!!n&&!n.isCollapsed&&n.toString().length>0}function Er(){const n=document.activeElement;return!!n&&(n.tagName==="INPUT"||n.tagName==="TEXTAREA"||n.isContentEditable)}function ys(n){const e=de.c(16),{sessionId:t,send:l,active:s,supported:o,handlerRef:i,sendChord:c,onError:u}=n;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=new Map,e[0]=d):d=e[0];const f=a.useRef(d),h=a.useRef(null),p=a.useRef(u);let m;e[1]!==u?(m=()=>{p.current=u},e[1]=u,e[2]=m):m=e[2],a.useLayoutEffect(m);let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=N=>{var v;h.current!==N&&(h.current=N,(v=p.current)==null||v.call(p,N))},e[3]=b):b=e[3];const g=b;let E,y;e[4]!==i?(E=()=>(i.current=N=>{if(!N.requestId)return;const v=f.current.get(N.requestId);v&&(f.current.delete(N.requestId),v(N))},()=>{i.current=void 0}),y=[i],e[4]=i,e[5]=E,e[6]=y):(E=e[5],y=e[6]),a.useEffect(E,y);let j;e[7]!==l||e[8]!==t?(j=(...N)=>{const[v,R]=N,D=Re();return new Promise(I=>{const L=setTimeout(()=>{f.current.delete(D),I(null)},Hl);f.current.set(D,M=>{clearTimeout(L),I(M)}),l({type:v,sessionId:t,requestId:D,payload:R})})},e[7]=l,e[8]=t,e[9]=j):j=e[9];const C=j;let w,k;e[10]!==s||e[11]!==C||e[12]!==c||e[13]!==o?(w=()=>{if(!s||!o)return;const N=async R=>{if(R.code==="KeyV"||!dr(R))return;const D=R.code==="KeyX";if(Er()||Wl()||(R.preventDefault(),R.repeat))return;if(!Bl()){c(D?"KeyX":"KeyC",Qn),g("Copied on the device. Serving the dashboard over HTTPS also brings it to your clipboard.");return}let I,L;const M=new Promise((G,Z)=>{I=G,L=Z});M.catch(Vl);const K=Fl(M).catch(G=>{G instanceof Kn||g(G instanceof Error&&G.name==="NotAllowedError"?"Your browser blocked the clipboard write":"Could not write to your clipboard")}),q=await C("clipboard:read",{press:D?"cut":"copy"});if(!q){L(new Kn("timeout")),g("The device is taking too long — try again");return}if(q.type==="clipboard:error"){L(new Kn(q.message||"read failed")),g(q.message||"Clipboard read failed"),Kl(q)&&c(D?"KeyX":"KeyC",Qn);return}if(q.type!=="clipboard:data"){L(new Kn("unexpected reply")),g("Clipboard read failed");return}const{text:O}=q.payload;if(h.current=null,!O){L(new Kn("empty"));return}I(O),await K},v=R=>{var I;if(Er())return;const D=((I=R.clipboardData)==null?void 0:I.getData("text"))??"";if(R.preventDefault(),!D){c("KeyV",Qn);return}if(zl(D)>ql){g("That text is too large to send to the device");return}C("clipboard:write",{text:D,pasteAfter:!0}).then(L=>{if(!L){g("The device is taking too long — try again");return}if(L.type==="clipboard:write-done"){h.current=null;return}if(L.type!=="clipboard:error"){g("Clipboard write failed");return}g(L.message||"Clipboard write failed"),Ul(L)&&c("KeyV",Qn)})};return document.addEventListener("keydown",N),document.addEventListener("paste",v),()=>{document.removeEventListener("keydown",N),document.removeEventListener("paste",v)}},k=[s,o,C,c,g],e[10]=s,e[11]=C,e[12]=c,e[13]=o,e[14]=w,e[15]=k):(w=e[14],k=e[15]),a.useEffect(w,k)}function Vl(){}const pn=13,An=8,Ir=16,Yl=.02;function Xl(n){const e=de.c(234),{sessionId:t,buildId:l,send:s,openUrl:o,launchApp:i,connected:c,joined:u,deviceReady:d,installing:f,installed:h,installError:p,bootError:m,launching:b,chrome:g,formFactor:E,binaryFrameHandlerRef:y,clipboardHandlerRef:j,clipboardSupported:C,networkHandlerRef:w,networkSupported:k,onRecordingUploaded:N,swKeyboardVisible:v,swKeyboardPending:R,onKbdToggle:D,rebootPending:I,onReboot:L,restartButtonRef:M,perfHookRef:K,onStreamSize:q}=n,{fps:O,frameCount:G}=zr();let Z;e[0]!==l||e[1]!==N||e[2]!==t?(Z={sessionId:t,buildId:l,onRecordingUploaded:N},e[0]=l,e[1]=N,e[2]=t,e[3]=Z):Z=e[3];const{recordState:J,recordCanvasRef:$,setComposeFrame:z,startClientRecording:ee,stopClientRecording:ue}=ms(Z),[ie,ye]=a.useState(!1),[re,Y]=a.useState(!1),[B,te]=a.useState(!1),[he,X]=a.useState(null),[fe,se]=a.useState(null),[pe,Be]=a.useState(!1),[H,V]=a.useState(null),ce=a.useRef(H);let _e,ve;e[4]!==H?(_e=()=>{ce.current=H},ve=[H],e[4]=H,e[5]=_e,e[6]=ve):(_e=e[5],ve=e[6]),a.useEffect(_e,ve);const Ne=a.useRef(null);let Ee;e[7]===Symbol.for("react.memo_cache_sentinel")?(Ee=new Set,e[7]=Ee):Ee=e[7];const ae=a.useRef(Ee),ke=a.useRef(null);let Ke,Ae;e[8]===Symbol.for("react.memo_cache_sentinel")?(Ke=()=>()=>{ke.current&&clearTimeout(ke.current)},Ae=[],e[8]=Ke,e[9]=Ae):(Ke=e[8],Ae=e[9]),a.useEffect(Ke,Ae);const Ye=a.useRef(null),Se=a.useRef(!1),Fe=a.useRef(!1),Xe=a.useRef(0),Le=a.useRef(null),Ze=a.useRef(null),$e=a.useRef("idle"),ht=a.useRef(null),Wt=a.useRef(null),qe=a.useRef(null);let Pt,pt;e[10]!==g?(Pt=()=>{qe.current=g},pt=[g],e[10]=g,e[11]=Pt,e[12]=pt):(Pt=e[11],pt=e[12]),a.useEffect(Pt,pt);let Gt,mt;e[13]!==g.framePng?(mt=()=>{const S=new Image;S.onload=()=>{Wt.current=S},S.src=`data:image/png;base64,${g.framePng}`},Gt=[g.framePng],e[13]=g.framePng,e[14]=Gt,e[15]=mt):(Gt=e[14],mt=e[15]),a.useEffect(mt,Gt);let At;e[16]!==q||e[17]!==$?(At=S=>{if(q==null||q(S),!qe.current){const _=$.current;_&&(_.width=S.width,_.height=S.height)}},e[16]=q,e[17]=$,e[18]=At):At=e[18];let ge;e[19]!==y||e[20]!==g||e[21]!==O||e[22]!==G||e[23]!==K||e[24]!==At?(ge={chrome:g,binaryFrameHandlerRef:y,perfHookRef:K,fps:O,frameCount:G,onCanvasResize:At},e[19]=y,e[20]=g,e[21]=O,e[22]=G,e[23]=K,e[24]=At,e[25]=ge):ge=e[25];const We=no(ge),{canvasRef:be,containerRef:me,screenAreaRef:Qt,decoderUnsupported:gt}=We;let Ie;e[26]!==me||e[27]!==$?(Ie=()=>{const S=$.current,_=me.current;S&&_&&(S.width=_.clientWidth,S.height=_.clientHeight)},e[26]=me,e[27]=$,e[28]=Ie):Ie=e[28];let bt;e[29]!==g||e[30]!==me||e[31]!==$?(bt=[g,$,me],e[29]=g,e[30]=me,e[31]=$,e[32]=bt):bt=e[32],a.useEffect(Ie,bt);let Je;e[33]!==be||e[34]!==$?(Je=()=>{const S=$.current,_=be.current;if(!S||!_)return;const T=S.getContext("2d");if(!T)return;const Te=qe.current;if(T.clearRect(0,0,S.width,S.height),Te){Wt.current&&T.drawImage(Wt.current,0,0,S.width,S.height);const Ue=Math.round(Te.screenCornerRadius/2*(S.height/(Te.compositeHeight/2)));T.save(),T.beginPath(),Ue>0?T.roundRect(_.offsetLeft,_.offsetTop,_.clientWidth,_.clientHeight,Ue):T.rect(_.offsetLeft,_.offsetTop,_.clientWidth,_.clientHeight),T.clip(),T.drawImage(_,_.offsetLeft,_.offsetTop,_.clientWidth,_.clientHeight),T.restore()}else T.drawImage(_,0,0,S.width,S.height);const nt=ce.current;if(nt)for(const Ue of[nt.f0,nt.f1]){const Ce=Te?_.offsetLeft+Ue.x*_.clientWidth:Ue.x*S.width,Me=Te?_.offsetTop+Ue.y*_.clientHeight:Ue.y*S.height;Se.current?(T.beginPath(),T.arc(Ce,Me,An,0,Math.PI*2),T.fillStyle="rgba(255,255,255,0.92)",T.fill(),T.strokeStyle="rgba(0,0,0,0.2)",T.lineWidth=1,T.stroke()):(T.beginPath(),T.arc(Ce,Me,pn,0,Math.PI*2),T.strokeStyle="rgba(0,0,0,0.3)",T.lineWidth=3,T.stroke(),T.beginPath(),T.arc(Ce,Me,pn,0,Math.PI*2),T.strokeStyle="rgba(255,255,255,0.65)",T.lineWidth=1.5,T.stroke())}const F=Ze.current;if(F){const Ue=$e.current,Ce=ht.current;if(T.save(),Ue==="down")T.beginPath(),T.arc(F.x,F.y,An,0,Math.PI*2),T.fillStyle="rgba(255,255,255,0.92)",T.fill(),T.strokeStyle="rgba(0,0,0,0.2)",T.lineWidth=1,T.stroke();else if(Ue==="release"&&Ce){const Me=Math.min((performance.now()-Ce.startTime)/350,1);T.beginPath(),T.arc(F.x,F.y,An+26*Me,0,Math.PI*2),T.strokeStyle=`rgba(255,255,255,${(1-Me)*.55})`,T.lineWidth=1.5,T.stroke(),Me>=1&&($e.current="idle",ht.current=null)}else T.beginPath(),T.arc(F.x,F.y,pn,0,Math.PI*2),T.strokeStyle="rgba(0,0,0,0.3)",T.lineWidth=3,T.stroke(),T.beginPath(),T.arc(F.x,F.y,pn,0,Math.PI*2),T.strokeStyle="rgba(255,255,255,0.65)",T.lineWidth=1.5,T.stroke();T.restore()}},e[33]=be,e[34]=$,e[35]=Je):Je=e[35];const xt=Je;let Lt,yt;e[36]!==xt||e[37]!==z?(Lt=()=>{z(xt)},yt=[xt,z],e[36]=xt,e[37]=z,e[38]=Lt,e[39]=yt):(Lt=e[38],yt=e[39]),a.useLayoutEffect(Lt,yt);let Dt;e[40]!==be?(Dt=()=>{const S=be.current;if(!S)return;const _=document.createElement("canvas"),T=_.getContext("2d");T&&(_.width=S.width,_.height=S.height,T.drawImage(S,0,0),_.toBlob(Zl,"image/png"))},e[40]=be,e[41]=Dt):Dt=e[41];const ct=Dt;let Mt;e[42]!==be||e[43]!==me||e[44]!==$||e[45]!==J||e[46]!==ee||e[47]!==ue?(Mt=()=>{if(J==="idle"){const S=$.current;if(!S)return;const _=me.current;if(_&&_.clientWidth>0)S.width=_.clientWidth,S.height=_.clientHeight;else{const T=be.current;if(T&&T.width>0)S.width=T.width,S.height=T.height;else return}ee()}else J==="recording"&&ue()},e[42]=be,e[43]=me,e[44]=$,e[45]=J,e[46]=ee,e[47]=ue,e[48]=Mt):Mt=e[48];const dt=Mt,on=a.useRef(!1);let wt;e[49]!==s||e[50]!==t?(wt=()=>{const S=!on.current;on.current=S,Y(S),s({type:"input:rotate",sessionId:t,payload:{orientation:S?"landscape":"portrait"}})},e[49]=s,e[50]=t,e[51]=wt):wt=e[51];const Ve=wt,$t=a.useRef(null);let vt,Ot;e[52]!==s||e[53]!==t?(vt=()=>{$t.current=()=>{on.current&&s({type:"input:rotate",sessionId:t,payload:{orientation:"portrait"}})}},Ot=[s,t],e[52]=s,e[53]=t,e[54]=vt,e[55]=Ot):(vt=e[54],Ot=e[55]),a.useEffect(vt,Ot);let Ht,St;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ht=()=>()=>{var S;(S=$t.current)==null||S.call($t)},St=[],e[56]=Ht,e[57]=St):(Ht=e[56],St=e[57]),a.useEffect(Ht,St);let jt;e[58]!==s||e[59]!==t?(jt=(S,_)=>{s({type:"input:key",sessionId:t,requestId:Re(),payload:{code:S,modifiers:_}})},e[58]=s,e[59]=t,e[60]=jt):jt=e[60];const Vt=jt;let Rt;e[61]!==j||e[62]!==C||e[63]!==B||e[64]!==s||e[65]!==Vt||e[66]!==t?(Rt={sessionId:t,send:s,active:B,supported:C,handlerRef:j,sendChord:Vt,onError:Ql},e[61]=j,e[62]=C,e[63]=B,e[64]=s,e[65]=Vt,e[66]=t,e[67]=Rt):Rt=e[67],ys(Rt);let rt;e[68]!==d||e[69]!==w||e[70]!==k||e[71]!==s||e[72]!==t?(rt={sessionId:t,send:s,supported:k,deviceReady:d,handlerRef:w,onError:Gl},e[68]=d,e[69]=w,e[70]=k,e[71]=s,e[72]=t,e[73]=rt):rt=e[73];const Oe=bs(rt);let kt,st;e[74]!==C||e[75]!==dt||e[76]!==Ve||e[77]!==ct||e[78]!==B||e[79]!==D||e[80]!==s||e[81]!==t||e[82]!==R?(kt=()=>{const S=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),_=F=>{if(F.code==="AltLeft"||F.code==="AltRight"){Fe.current=!0;return}if(F.metaKey){const Ce=document.activeElement;if(!Ce||Ce.tagName!=="INPUT"&&Ce.tagName!=="TEXTAREA"){if(!F.shiftKey&&F.code==="KeyK"){F.preventDefault(),ye(!0);return}if(!F.shiftKey&&F.code==="KeyS"){F.preventDefault(),ct();return}if(F.shiftKey&&F.code==="KeyY"){F.preventDefault(),dt();return}if(F.shiftKey&&F.code==="KeyO"){F.preventDefault(),F.repeat||Ve();return}if(F.shiftKey&&F.code==="KeyU"){F.preventDefault(),s({type:"input:button",sessionId:t,requestId:Re(),payload:{name:"home"}});return}if(F.shiftKey&&F.code==="KeyK"){F.preventDefault(),R||D();return}}}if(!B||S.has(F.code)||C&&dr(F))return;F.preventDefault();const Ue=(F.shiftKey?2:0)|(F.ctrlKey?1:0)|(F.metaKey?8:0);s({type:"input:key",sessionId:t,requestId:Re(),payload:{code:F.code,modifiers:Ue}})},T=()=>{Se.current&&(Se.current=!1,Be(!1),s({type:"input:pinch:end",sessionId:t,requestId:Re()})),Fe.current=!1,V(null)},Te=F=>{(F.code==="AltLeft"||F.code==="AltRight")&&T()},nt=()=>{Fe.current&&T()};return window.addEventListener("keydown",_),window.addEventListener("keyup",Te),window.addEventListener("blur",nt),()=>{window.removeEventListener("keydown",_),window.removeEventListener("keyup",Te),window.removeEventListener("blur",nt)}},st=[B,C,s,t,ct,dt,Ve,D,R],e[74]=C,e[75]=dt,e[76]=Ve,e[77]=ct,e[78]=B,e[79]=D,e[80]=s,e[81]=t,e[82]=R,e[83]=kt,e[84]=st):(kt=e[83],st=e[84]),a.useEffect(kt,st);let Yt,ot;e[85]!==be||e[86]!==me||e[87]!==B?(Yt=()=>{if(!B)return;const S=_=>{const T=me.current??be.current;T&&!T.contains(_.target)&&te(!1)};return document.addEventListener("pointerdown",S),()=>document.removeEventListener("pointerdown",S)},ot=[B,me,be],e[85]=be,e[86]=me,e[87]=B,e[88]=Yt,e[89]=ot):(Yt=e[88],ot=e[89]),a.useEffect(Yt,ot);let lt;e[90]!==g.compositeHeight||e[91]!==g.compositeWidth||e[92]!==g.screenRect||e[93]!==me||e[94]!==re||e[95]!==Qt?(lt=S=>{const _=(re?Qt.current:null)??me.current;if(!_)return null;const T=_.getBoundingClientRect(),Te=g.compositeWidth/2,nt=g.compositeHeight/2,F=g.screenRect.x/2,Ue=g.screenRect.y/2,Ce=g.screenRect.width/2,Me=g.screenRect.height/2;return oo({x:S.clientX,y:S.clientY},T,Te,nt,{x:F,y:Ue,width:Ce,height:Me},re)},e[90]=g.compositeHeight,e[91]=g.compositeWidth,e[92]=g.screenRect,e[93]=me,e[94]=re,e[95]=Qt,e[96]=lt):lt=e[96];const we=lt;let Ct;e[97]!==we?(Ct=S=>{const _=we(S);return _?Ur(_):null},e[97]=we,e[98]=Ct):Ct=e[98];const x=Ct;let Q;e[99]!==be||e[100]!==$?(Q=S=>{const _=be.current,T=$.current;return _&&_.clientWidth>0?{x:_.offsetLeft+S.x*_.clientWidth,y:_.offsetTop+S.y*_.clientHeight}:{x:S.x*((T==null?void 0:T.width)??1),y:S.y*((T==null?void 0:T.height)??1)}},e[99]=be,e[100]=$,e[101]=Q):Q=e[101];const xe=Q;let Pe;e[102]!==xe||e[103]!==s||e[104]!==t||e[105]!==we||e[106]!==x?(Pe=S=>{if(te(!0),Fe.current){const nt=x(S);if(!nt)return;Se.current=!0,Be(!0),S.target.setPointerCapture(S.pointerId),V(nt),s({type:"input:pinch:start",sessionId:t,payload:nt});return}const _=we(S);if(!_)return;Ye.current=_,S.target.setPointerCapture(S.pointerId),Ze.current=xe(_),$e.current="down",ht.current=null;const T=S.currentTarget.getBoundingClientRect(),Te=Le.current;Te&&(Te.style.display="block",Te.style.left=`${S.clientX-T.left}px`,Te.style.top=`${S.clientY-T.top}px`,Te.style.width=`${An*2}px`,Te.style.height=`${An*2}px`,Te.style.background="rgba(255,255,255,0.92)",Te.style.border="1.5px solid rgba(0,0,0,0.2)",Te.style.boxShadow="0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"),s({type:"input:touch:start",sessionId:t,payload:_})},e[102]=xe,e[103]=s,e[104]=t,e[105]=we,e[106]=x,e[107]=Pe):Pe=e[107];const oe=Pe;let ze;e[108]!==s||e[109]!==t?(ze=(S,_)=>{if(!Fe.current){if(_.stopPropagation(),Ne.current){ae.current.add(_.pointerId);return}te(!0),ke.current&&(clearTimeout(ke.current),ke.current=null),Ne.current={name:S,pointerId:_.pointerId},X(S),_.currentTarget.setPointerCapture(_.pointerId),s({type:"input:button",sessionId:t,requestId:Re(),payload:{name:S,phase:"down"}})}},e[108]=s,e[109]=t,e[110]=ze):ze=e[110];const Xt=ze;let gn;e[111]!==xe||e[112]!==s||e[113]!==t||e[114]!==we||e[115]!==x?(gn=S=>{var Ue;if(ae.current.has(S.pointerId))return;if(S.buttons===0){if(Fe.current){V(x(S)),Ze.current=null;const Ce=Le.current;Ce&&(Ce.style.display="none")}else{V(null);const Ce=we(S);Ze.current=Ce?xe(Ce):null,$e.current!=="down"&&($e.current="idle");const Me=Le.current;if(Me)if(Ce){const xr=S.currentTarget.getBoundingClientRect();Me.style.display="block",Me.style.left=`${S.clientX-xr.left}px`,Me.style.top=`${S.clientY-xr.top}px`,Me.style.width=`${pn*2}px`,Me.style.height=`${pn*2}px`,Me.style.background="transparent",Me.style.border="1.5px solid rgba(255,255,255,0.6)",Me.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"}else Me.style.display="none"}return}if(Se.current){const Ce=x(S);if(!Ce)return;const Me=performance.now();if(Me-Xe.current<Ir)return;Xe.current=Me,V(Ce),s({type:"input:pinch:move",sessionId:t,payload:Ce});return}if(((Ue=Ne.current)==null?void 0:Ue.pointerId)===S.pointerId||!Ye.current)return;const _=we(S);if(!_)return;const T=_.x-Ye.current.x,Te=_.y-Ye.current.y;if(Math.sqrt(T*T+Te*Te)<Yl)return;const nt=performance.now();if(nt-Xe.current<Ir)return;Xe.current=nt,Ze.current=xe(_);const F=Le.current;if(F&&F.style.display!=="none"){const Ce=S.currentTarget.getBoundingClientRect();F.style.left=`${S.clientX-Ce.left}px`,F.style.top=`${S.clientY-Ce.top}px`}s({type:"input:touch:move",sessionId:t,payload:_})},e[111]=xe,e[112]=s,e[113]=t,e[114]=we,e[115]=x,e[116]=gn):gn=e[116];const Pn=gn;let bn;e[117]!==s||e[118]!==t?(bn=S=>{var T;if(ae.current.delete(S.pointerId))return;if(Se.current){Se.current=!1,Be(!1),V(null),s({type:"input:pinch:end",sessionId:t,requestId:Re()});return}if(Ye.current=null,((T=Ne.current)==null?void 0:T.pointerId)===S.pointerId){s({type:"input:button",sessionId:t,requestId:Re(),payload:{name:Ne.current.name,phase:"up"}}),Ne.current=null,ke.current=setTimeout(()=>{ke.current=null,X(null)},100);return}$e.current="release",ht.current={startTime:performance.now()};const _=Le.current;_&&(_.style.width=`${pn*2}px`,_.style.height=`${pn*2}px`,_.style.background="transparent",_.style.border="1.5px solid rgba(255,255,255,0.6)",_.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"),s({type:"input:touch:end",sessionId:t,requestId:Re()})},e[117]=s,e[118]=t,e[119]=bn):bn=e[119];const zn=bn;let Zt;e[120]!==s||e[121]!==t?(Zt=S=>{var _;if(!ae.current.delete(S.pointerId)){if(Se.current){Se.current=!1,Be(!1),V(null),s({type:"input:pinch:end",sessionId:t,requestId:Re()});return}if(Ye.current=null,((_=Ne.current)==null?void 0:_.pointerId)===S.pointerId){s({type:"input:button",sessionId:t,requestId:Re(),payload:{name:Ne.current.name,phase:"up"}}),Ne.current=null,X(null);return}$e.current="release",ht.current={startTime:performance.now()},s({type:"input:touch:end",sessionId:t,requestId:Re()})}},e[120]=s,e[121]=t,e[122]=Zt):Zt=e[122];const Rn=Zt;let kn;e[123]===Symbol.for("react.memo_cache_sentinel")?(kn=()=>{se(null),V(null),Ze.current=null;const S=Le.current;S&&(S.style.display="none")},e[123]=kn):kn=e[123];const Hn=kn;let Cn;e[124]!==g?(Cn=ro(g),e[124]=g,e[125]=Cn):Cn=e[125];const{screenPctLeft:_n,screenPctTop:ln,screenPctW:an,screenPctH:Nn}=Cn;let Bt;e[126]!==s||e[127]!==t?(Bt=()=>s({type:"input:button",sessionId:t,requestId:Re(),payload:{name:"home"}}),e[126]=s,e[127]=t,e[128]=Bt):Bt=e[128];let Jt;e[129]===Symbol.for("react.memo_cache_sentinel")?(Jt=r.jsx(Vr,{className:"h-4 w-4"}),e[129]=Jt):Jt=e[129];let Ft;e[130]!==Bt?(Ft=r.jsx(Tt,{asChild:!0,children:r.jsx(Qe,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":"Home",onClick:Bt,children:Jt})}),e[130]=Bt,e[131]=Ft):Ft=e[131];let en;e[132]===Symbol.for("react.memo_cache_sentinel")?(en=r.jsx(Et,{side:"left",children:r.jsxs("span",{className:"flex items-center gap-3",children:["Home ",r.jsxs(lr,{children:[r.jsx(Dn,{children:"⌘"}),r.jsx(Dn,{children:"⇧"}),r.jsx(Dn,{children:"U"})]})]})}),e[132]=en):en=e[132];let tn;e[133]!==Ft?(tn=r.jsx(r.Fragment,{children:r.jsxs(Nt,{children:[Ft,en]})}),e[133]=Ft,e[134]=tn):tn=e[134];const Tn=tn,qt=a.useId(),cn=R?"Changing the software keyboard.":v?"The software keyboard is up.":"The software keyboard is down.";let zt;e[135]!==qt||e[136]!==cn?(zt=r.jsx("span",{id:qt,role:"status",className:"sr-only",children:cn}),e[135]=qt,e[136]=cn,e[137]=zt):zt=e[137];const dn=R?"Software keyboard — changing it":"Software keyboard";let Ut;e[138]!==D||e[139]!==R?(Ut=()=>{R||D()},e[138]=D,e[139]=R,e[140]=Ut):Ut=e[140];let nn;e[141]!==R?(nn=R?r.jsx($n,{className:"h-4 w-4 animate-spin"}):r.jsx(No,{className:"h-4 w-4"}),e[141]=R,e[142]=nn):nn=e[142];let P;e[143]!==qt||e[144]!==R||e[145]!==v||e[146]!==dn||e[147]!==Ut||e[148]!==nn?(P=r.jsx(Tt,{asChild:!0,children:r.jsx(Qe,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":dn,"aria-pressed":v,"aria-busy":R,"aria-disabled":R,"aria-describedby":qt,onClick:Ut,"data-active":v,children:nn})}),e[143]=qt,e[144]=R,e[145]=v,e[146]=dn,e[147]=Ut,e[148]=nn,e[149]=P):P=e[149];let W;e[150]!==R?(W=r.jsx(Et,{side:"left",children:R?r.jsx("span",{children:"Software keyboard — changing it"}):r.jsxs("span",{className:"flex items-center gap-3",children:["Software keyboard ",r.jsxs(lr,{children:[r.jsx(Dn,{children:"⌘"}),r.jsx(Dn,{children:"⇧"}),r.jsx(Dn,{children:"K"})]})]})}),e[150]=R,e[151]=W):W=e[151];let le;e[152]!==P||e[153]!==W?(le=r.jsxs(Nt,{children:[P,W]}),e[152]=P,e[153]=W,e[154]=le):le=e[154];let A;e[155]!==zt||e[156]!==le?(A=r.jsxs(r.Fragment,{children:[zt,le]}),e[155]=zt,e[156]=le,e[157]=A):A=e[157];const De=A;let U;e[158]!==l||e[159]!==h||e[160]!==i||e[161]!==b?(U=h&&l?r.jsxs(Nt,{children:[r.jsx(Tt,{asChild:!0,children:r.jsx(Qe,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:b,"aria-label":"Launch app",onClick:i,children:b?r.jsx($n,{className:"h-4 w-4 animate-spin"}):r.jsx(Qr,{className:"h-4 w-4"})})}),r.jsx(Et,{side:"left",children:b?"Launching…":"Launch app"})]}):null,e[158]=l,e[159]=h,e[160]=i,e[161]=b,e[162]=U):U=e[162];const Ge=U;let et;e[163]===Symbol.for("react.memo_cache_sentinel")?(et={display:"none"},e[163]=et):et=e[163];let ut;e[164]!==$?(ut=r.jsx("canvas",{ref:$,style:et}),e[164]=$,e[165]=ut):ut=e[165];let je;e[166]!==ie||e[167]!==o?(je=r.jsx(xs,{open:ie,onOpenChange:ye,openUrl:o}),e[166]=ie,e[167]=o,e[168]=je):je=e[168];let un;e[169]===Symbol.for("react.memo_cache_sentinel")?(un=()=>ye(!0),e[169]=un):un=e[169];let xn;e[170]!==Oe||e[171]!==k?(xn=k?{position:Oe.position,steerable:Oe.steerable,reason:Oe.reason,pending:Oe.pending,onToggle:Oe.toggle}:void 0,e[170]=Oe,e[171]=k,e[172]=xn):xn=e[172];let at;e[173]!==L||e[174]!==I||e[175]!==M?(at={pending:I,onReboot:L,buttonRef:M},e[173]=L,e[174]=I,e[175]=M,e[176]=at):at=e[176];let yn;e[177]!==De||e[178]!==dt||e[179]!==Ve||e[180]!==ct||e[181]!==u||e[182]!==Ge||e[183]!==Tn||e[184]!==J||e[185]!==xn||e[186]!==at?(yn=r.jsx(gs,{joined:u,onDeepLink:un,onScreenshot:ct,onRecordToggle:dt,recordState:J,onRotate:Ve,navigationSlot:Tn,deviceSlot:De,launchSlot:Ge,network:xn,reboot:at}),e[177]=De,e[178]=dt,e[179]=Ve,e[180]=ct,e[181]=u,e[182]=Ge,e[183]=Tn,e[184]=J,e[185]=xn,e[186]=at,e[187]=yn):yn=e[187];let tt;e[188]!==Rn||e[189]!==oe||e[190]!==Pn||e[191]!==zn?(tt={onPointerDown:oe,onPointerMove:Pn,onPointerUp:zn,onPointerCancel:Rn,onPointerLeave:Hn},e[188]=Rn,e[189]=oe,e[190]=Pn,e[191]=zn,e[192]=tt):tt=e[192];let rn;e[193]!==he||e[194]!==fe||e[195]!==Xt?(rn={hovered:fe,flashed:he,onHoverChange:se,onPress:Xt},e[193]=he,e[194]=fe,e[195]=Xt,e[196]=rn):rn=e[196];let fn;e[197]!==pe||e[198]!==H||e[199]!==Nn||e[200]!==_n||e[201]!==ln||e[202]!==an?(fn=H&&(()=>{const S=_n/100,_=ln/100,T=an/100,Te=Nn/100,nt=(F,Ue)=>({left:`${(S+F*T)*100}%`,top:`${(_+Ue*Te)*100}%`});return r.jsx(r.Fragment,{children:[H.f0,H.f1].map((F,Ue)=>r.jsx("div",{style:{position:"absolute",zIndex:10,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease",...pe?{width:An*2,height:An*2,background:"rgba(255,255,255,0.92)",border:"1.5px solid rgba(0,0,0,0.2)",boxShadow:"0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"}:{width:pn*2,height:pn*2,background:"transparent",border:"1.5px solid rgba(255,255,255,0.6)",boxShadow:"0 0 0 1px rgba(0,0,0,0.3)"},...nt(F.x,F.y)}},Ue))})})(),e[197]=pe,e[198]=H,e[199]=Nn,e[200]=_n,e[201]=ln,e[202]=an,e[203]=fn):fn=e[203];let En;e[204]===Symbol.for("react.memo_cache_sentinel")?(En=r.jsx("div",{ref:Le,style:{display:"none",position:"absolute",zIndex:20,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease, box-shadow 0.1s ease"}}),e[204]=En):En=e[204];let hn;e[205]!==g||e[206]!==E||e[207]!==O||e[208]!==re||e[209]!==u||e[210]!==We||e[211]!==tt||e[212]!==rn||e[213]!==fn?(hn=r.jsx(lo,{screen:We,chrome:g,formFactor:E,isLandscape:re,joined:u,fps:O,containerHandlers:tt,buttons:rn,overlay:fn,areaOverlay:En}),e[205]=g,e[206]=E,e[207]=O,e[208]=re,e[209]=u,e[210]=We,e[211]=tt,e[212]=rn,e[213]=fn,e[214]=hn):hn=e[214];const Bn=so(g)?"The device frame couldn't be loaded, so its side buttons (lock, volume) are unavailable this session.":void 0;let _t;e[215]!==m||e[216]!==c||e[217]!==gt||e[218]!==d||e[219]!==O||e[220]!==p||e[221]!==f||e[222]!==u||e[223]!==B||e[224]!==Bn?(_t=r.jsx(cr,{joined:u,fps:O,connected:c,deviceReady:d,bootError:m,installing:f,installError:p,decoderUnsupported:gt,keyboardActive:B,note:Bn}),e[215]=m,e[216]=c,e[217]=gt,e[218]=d,e[219]=O,e[220]=p,e[221]=f,e[222]=u,e[223]=B,e[224]=Bn,e[225]=_t):_t=e[225];let ft;e[226]!==hn||e[227]!==_t?(ft=r.jsxs("div",{className:"flex items-start gap-8",children:[hn,_t]}),e[226]=hn,e[227]=_t,e[228]=ft):ft=e[228];let sn;return e[229]!==ut||e[230]!==je||e[231]!==yn||e[232]!==ft?(sn=r.jsxs("div",{role:"region","aria-label":"Device screen",className:"flex items-start justify-center gap-16",children:[ut,je,yn,ft]}),e[229]=ut,e[230]=je,e[231]=yn,e[232]=ft,e[233]=sn):sn=e[233],sn}function Gl(n){return It.error(n)}function Ql(n){return It.error(n)}function Zl(n){if(!n)return;const e=URL.createObjectURL(n),t=document.createElement("a");t.href=e,t.download=`tapflow-${Date.now()}.png`,t.click(),URL.revokeObjectURL(e)}const Ln=13,Wn=8,Pr=16,Jl=.02;function ea(n){const e=de.c(192),{sessionId:t,buildId:l,send:s,openUrl:o,launchApp:i,connected:c,joined:u,deviceReady:d,installing:f,installed:h,installError:p,bootError:m,launching:b,androidButtons:g,binaryFrameHandlerRef:E,clipboardHandlerRef:y,clipboardSupported:j,networkHandlerRef:C,networkSupported:w,onRecordingUploaded:k,rebootPending:N,onReboot:v,restartButtonRef:R,screenWidth:D,screenHeight:I,cornerRadius:L,postures:M,streamRotation:K,perfHookRef:q}=n,O=K===void 0?0:K,{fps:G,frameCount:Z}=zr();let J;e[0]!==l||e[1]!==k||e[2]!==t?(J={sessionId:t,buildId:l,onRecordingUploaded:k},e[0]=l,e[1]=k,e[2]=t,e[3]=J):J=e[3];const{recordState:$,recordCanvasRef:z,setComposeFrame:ee,startClientRecording:ue,stopClientRecording:ie}=ms(J),[ye,re]=a.useState(!1),[Y,B]=a.useState(!1),[te,he]=a.useState(!1),[X,fe]=a.useState(!1),[se,pe]=a.useState(null),Be=a.useRef(se);let H,V;e[4]!==se?(H=()=>{Be.current=se},V=[se],e[4]=se,e[5]=H,e[6]=V):(H=e[5],V=e[6]),a.useEffect(H,V);const ce=a.useRef(!1),_e=a.useRef(!1),ve=a.useRef(null),Ne=a.useRef(0),Ee=a.useRef(null),ae=a.useRef(null),ke=a.useRef("idle"),Ke=a.useRef(null),[Ae,Ye]=a.useState(!1);let Se;e[7]!==E||e[8]!==L||e[9]!==Z||e[10]!==q||e[11]!==Ae||e[12]!==I||e[13]!==D||e[14]!==O||e[15]!==Y?(Se={binaryFrameHandlerRef:E,perfHookRef:q,frameCount:Z,screenWidth:D,screenHeight:I,streamRotation:O,cornerRadius:L,userWantsLandscape:Y,rotatePending:Ae},e[7]=E,e[8]=L,e[9]=Z,e[10]=q,e[11]=Ae,e[12]=I,e[13]=D,e[14]=O,e[15]=Y,e[16]=Se):Se=e[16];const Fe=ao(Se),{surfaceHostRef:Xe,containerRef:Le,decoderRef:Ze,videoSizeRef:$e,needsCSSRotationRef:ht,decoderUnsupported:Wt,totalTurn:qe}=Fe;let Pt;e[17]!==Ze||e[18]!==z||e[19]!==O||e[20]!==qe||e[21]!==$e?(Pt=()=>{var Bn;const P=z.current,W=(Bn=Ze.current)==null?void 0:Bn.surface,le=$e.current;if(!P||!W||!le)return;const A=P.getContext("2d");if(!A)return;const De=le.width,U=le.height,Ge=qe,{picW:et,picH:ut,scale:je,left:un,top:xn}=io(P.width,P.height,De,U,Ge);A.clearRect(0,0,P.width,P.height),A.save(),A.translate(un+et*je/2,xn+ut*je/2),A.scale(je,je),A.rotate(Ge*Math.PI/180),A.drawImage(W,-De/2,-U/2,De,U),A.restore();const at=ho(De,U,Ge,O);A.save(),A.translate(un+et*je/2,xn+ut*je/2),A.scale(je,je),A.rotate(at.turn*Math.PI/180),A.translate(-at.width/2,-at.height/2);const yn=Math.max(at.width,at.height),tt=yn>wr?yn/wr:1,rn=Ln*tt,fn=Wn*tt,En=Be.current;if(En)for(const _t of[En.f0,En.f1]){const ft=_t.x*at.width,sn=_t.y*at.height;ce.current?(A.beginPath(),A.arc(ft,sn,fn,0,Math.PI*2),A.fillStyle="rgba(255,255,255,0.92)",A.fill(),A.strokeStyle="rgba(0,0,0,0.2)",A.lineWidth=tt,A.stroke()):(A.beginPath(),A.arc(ft,sn,rn,0,Math.PI*2),A.strokeStyle="rgba(0,0,0,0.3)",A.lineWidth=3*tt,A.stroke(),A.beginPath(),A.arc(ft,sn,rn,0,Math.PI*2),A.strokeStyle="rgba(255,255,255,0.65)",A.lineWidth=1.5*tt,A.stroke())}const hn=ae.current;if(hn){const _t=hn.x*at.width,ft=hn.y*at.height,sn=ke.current,S=Ke.current;if(sn==="down")A.beginPath(),A.arc(_t,ft,fn,0,Math.PI*2),A.fillStyle="rgba(255,255,255,0.92)",A.fill(),A.strokeStyle="rgba(0,0,0,0.2)",A.lineWidth=tt,A.stroke();else if(sn==="release"&&S){const _=Math.min((performance.now()-S.startTime)/350,1);A.beginPath(),A.arc(_t,ft,fn+26*tt*_,0,Math.PI*2),A.strokeStyle=`rgba(255,255,255,${(1-_)*.55})`,A.lineWidth=1.5*tt,A.stroke(),_>=1&&(ke.current="idle",Ke.current=null)}else A.beginPath(),A.arc(_t,ft,rn,0,Math.PI*2),A.strokeStyle="rgba(0,0,0,0.3)",A.lineWidth=3*tt,A.stroke(),A.beginPath(),A.arc(_t,ft,rn,0,Math.PI*2),A.strokeStyle="rgba(255,255,255,0.65)",A.lineWidth=1.5*tt,A.stroke()}A.restore()},e[17]=Ze,e[18]=z,e[19]=O,e[20]=qe,e[21]=$e,e[22]=Pt):Pt=e[22];const pt=Pt;let Gt,mt;e[23]!==pt||e[24]!==ee?(Gt=()=>{ee(pt)},mt=[pt,ee],e[23]=pt,e[24]=ee,e[25]=Gt,e[26]=mt):(Gt=e[25],mt=e[26]),a.useLayoutEffect(Gt,mt);let At;e[27]!==Ze||e[28]!==qe||e[29]!==$e?(At=()=>{var Ge;const P=(Ge=Ze.current)==null?void 0:Ge.surface,W=$e.current;if(!P||!W)return;const le=document.createElement("canvas"),A=le.getContext("2d");if(!A)return;const De=qe,U=yr(W.width,W.height,De);le.width=U.width,le.height=U.height,A.translate(le.width/2,le.height/2),A.rotate(De*Math.PI/180),A.drawImage(P,-W.width/2,-W.height/2,W.width,W.height),le.toBlob(oa,"image/png")},e[27]=Ze,e[28]=qe,e[29]=$e,e[30]=At):At=e[30];const ge=At;let We;e[31]!==z||e[32]!==$||e[33]!==ue||e[34]!==ie||e[35]!==qe||e[36]!==$e?(We=()=>{if($==="idle"){const P=z.current;if(!P)return;const W=$e.current;if(!W)return;const le=yr(W.width,W.height,qe);P.width=le.width,P.height=le.height,ue()}else $==="recording"&&ie()},e[31]=z,e[32]=$,e[33]=ue,e[34]=ie,e[35]=qe,e[36]=$e,e[37]=We):We=e[37];const be=We,[me,Qt]=a.useState(null),gt=me!==null,Ie=a.useRef(0);let bt;e[38]!==s||e[39]!==t?(bt=P=>{Ie.current=Date.now()+8e3,Qt(P),s({type:"input:posture",sessionId:t,payload:{postureId:P}})},e[38]=s,e[39]=t,e[40]=bt):bt=e[40];const Je=bt;let xt;e[41]!==me||e[42]!==(M==null?void 0:M.currentId)?(xt=()=>{if(me===null)return;const P=(M==null?void 0:M.currentId)===me,W=setTimeout(()=>Qt(null),P?0:co(Ie.current,Date.now()));return()=>clearTimeout(W)},e[41]=me,e[42]=M==null?void 0:M.currentId,e[43]=xt):xt=e[43];let Lt;e[44]!==me||e[45]!==M?(Lt=[me,M],e[44]=me,e[45]=M,e[46]=Lt):Lt=e[46],a.useEffect(xt,Lt);let yt,Dt;e[47]!==Ae?(yt=()=>{if(!Ae)return;const P=setTimeout(()=>Ye(!1),400);return()=>clearTimeout(P)},Dt=[Ae],e[47]=Ae,e[48]=yt,e[49]=Dt):(yt=e[48],Dt=e[49]),a.useEffect(yt,Dt);const ct=a.useRef(!1);let Mt;e[50]===Symbol.for("react.memo_cache_sentinel")?(Mt=()=>{if(!ct.current){ct.current=!0;return}Ye(!1)},e[50]=Mt):Mt=e[50];let dt;e[51]!==I||e[52]!==D||e[53]!==O?(dt=[O,D,I],e[51]=I,e[52]=D,e[53]=O,e[54]=dt):dt=e[54],a.useEffect(Mt,dt);const on=a.useRef(!1);let wt;e[55]!==s||e[56]!==t?(wt=()=>{const P=!on.current;on.current=P,Ye(!0),s({type:"input:rotate",sessionId:t,payload:{orientation:P?"landscape":"portrait"}}),B(P)},e[55]=s,e[56]=t,e[57]=wt):wt=e[57];const Ve=wt,$t=a.useRef(null);let vt,Ot;e[58]!==s||e[59]!==t?(vt=()=>{$t.current=()=>{on.current&&s({type:"input:rotate",sessionId:t,payload:{orientation:"portrait"}})}},Ot=[s,t],e[58]=s,e[59]=t,e[60]=vt,e[61]=Ot):(vt=e[60],Ot=e[61]),a.useEffect(vt,Ot);let Ht,St;e[62]===Symbol.for("react.memo_cache_sentinel")?(Ht=()=>()=>{var P;(P=$t.current)==null||P.call($t)},St=[],e[62]=Ht,e[63]=St):(Ht=e[62],St=e[63]),a.useEffect(Ht,St);let jt;e[64]!==s||e[65]!==t?(jt=(P,W)=>{s({type:"input:key",sessionId:t,requestId:Re(),payload:{code:P,modifiers:W}})},e[64]=s,e[65]=t,e[66]=jt):jt=e[66];const Vt=jt;let Rt;e[67]!==y||e[68]!==j||e[69]!==te||e[70]!==s||e[71]!==Vt||e[72]!==t?(Rt={sessionId:t,send:s,active:te,supported:j,handlerRef:y,sendChord:Vt,onError:sa},e[67]=y,e[68]=j,e[69]=te,e[70]=s,e[71]=Vt,e[72]=t,e[73]=Rt):Rt=e[73],ys(Rt);let rt;e[74]!==d||e[75]!==C||e[76]!==w||e[77]!==s||e[78]!==t?(rt={sessionId:t,send:s,supported:w,deviceReady:d,handlerRef:C,onError:ra},e[74]=d,e[75]=C,e[76]=w,e[77]=s,e[78]=t,e[79]=rt):rt=e[79];const Oe=bs(rt);let kt,st;e[80]!==j||e[81]!==be||e[82]!==Ve||e[83]!==ge||e[84]!==te||e[85]!==s||e[86]!==t?(kt=()=>{const P=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),W=U=>{if(U.code==="AltLeft"||U.code==="AltRight"){_e.current=!0;return}if(U.metaKey){const et=document.activeElement;if(!et||et.tagName!=="INPUT"&&et.tagName!=="TEXTAREA"){if(!U.shiftKey&&U.code==="KeyK"){U.preventDefault(),re(!0);return}if(!U.shiftKey&&U.code==="KeyS"){U.preventDefault(),ge();return}if(U.shiftKey&&U.code==="KeyY"){U.preventDefault(),be();return}if(U.shiftKey&&U.code==="KeyO"){U.preventDefault(),U.repeat||Ve();return}}}if(!te||P.has(U.code)||j&&dr(U))return;U.preventDefault();const Ge=(U.shiftKey?2:0)|(U.ctrlKey?1:0)|(U.metaKey?8:0);s({type:"input:key",sessionId:t,requestId:Re(),payload:{code:U.code,modifiers:Ge}})},le=()=>{ce.current&&(ce.current=!1,fe(!1),s({type:"input:pinch:end",sessionId:t,requestId:Re()})),_e.current=!1,pe(null)},A=U=>{(U.code==="AltLeft"||U.code==="AltRight")&&le()},De=()=>{_e.current&&le()};return window.addEventListener("keydown",W),window.addEventListener("keyup",A),window.addEventListener("blur",De),()=>{window.removeEventListener("keydown",W),window.removeEventListener("keyup",A),window.removeEventListener("blur",De)}},st=[te,j,s,t,ge,be,Ve],e[80]=j,e[81]=be,e[82]=Ve,e[83]=ge,e[84]=te,e[85]=s,e[86]=t,e[87]=kt,e[88]=st):(kt=e[87],st=e[88]),a.useEffect(kt,st);let Yt,ot;e[89]!==Le||e[90]!==te||e[91]!==Xe?(Yt=()=>{if(!te)return;const P=W=>{const le=Le.current??Xe.current;le&&!le.contains(W.target)&&he(!1)};return document.addEventListener("pointerdown",P),()=>document.removeEventListener("pointerdown",P)},ot=[te,Le,Xe],e[89]=Le,e[90]=te,e[91]=Xe,e[92]=Yt,e[93]=ot):(Yt=e[92],ot=e[93]),a.useEffect(Yt,ot);let lt;e[94]!==ht||e[95]!==Xe?(lt=P=>{const W=Xe.current;if(!W)return null;const le=W.getBoundingClientRect();return uo({x:P.clientX,y:P.clientY},le,ht.current)},e[94]=ht,e[95]=Xe,e[96]=lt):lt=e[96];const we=lt;let Ct;e[97]!==we?(Ct=P=>{const W=we(P);return W?Ur(W):null},e[97]=we,e[98]=Ct):Ct=e[98];const x=Ct;let Q;e[99]!==s||e[100]!==t||e[101]!==we||e[102]!==x?(Q=P=>{if(_e.current){const De=x(P);if(!De)return;ce.current=!0,fe(!0),P.target.setPointerCapture(P.pointerId);const U=Ee.current;U&&(U.style.display="none"),pe(De),s({type:"input:pinch:start",sessionId:t,payload:De});return}const W=we(P);if(!W)return;he(!0),ve.current=W,P.target.setPointerCapture(P.pointerId);const le=P.currentTarget.getBoundingClientRect();ae.current=W,ke.current="down",Ke.current=null;const A=Ee.current;A&&(A.style.display="block",A.style.left=`${P.clientX-le.left}px`,A.style.top=`${P.clientY-le.top}px`,A.style.width=`${Wn*2}px`,A.style.height=`${Wn*2}px`,A.style.background="rgba(255,255,255,0.92)",A.style.border="1.5px solid rgba(0,0,0,0.2)",A.style.boxShadow="0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"),s({type:"input:touch:start",sessionId:t,payload:W})},e[99]=s,e[100]=t,e[101]=we,e[102]=x,e[103]=Q):Q=e[103];const xe=Q;let Pe;e[104]!==s||e[105]!==t||e[106]!==we||e[107]!==x?(Pe=P=>{if(P.buttons===0){if(_e.current){pe(x(P)),ae.current=null;const un=Ee.current;un&&(un.style.display="none");return}const et=we(P),ut=P.currentTarget.getBoundingClientRect(),je=Ee.current;et?(ae.current=et,ke.current!=="down"&&(ke.current="idle"),je&&(je.style.display="block",je.style.left=`${P.clientX-ut.left}px`,je.style.top=`${P.clientY-ut.top}px`,je.style.width=`${Ln*2}px`,je.style.height=`${Ln*2}px`,je.style.background="transparent",je.style.border="1.5px solid rgba(255,255,255,0.6)",je.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)")):(ae.current=null,je&&(je.style.display="none"));return}if(ce.current){const et=x(P);if(!et)return;const ut=performance.now();if(ut-Ne.current<Pr)return;Ne.current=ut,pe(et),s({type:"input:pinch:move",sessionId:t,payload:et});return}if(!ve.current)return;const W=we(P);if(!W)return;const le=W.x-ve.current.x,A=W.y-ve.current.y;if(Math.sqrt(le*le+A*A)<Jl)return;const De=performance.now();if(De-Ne.current<Pr)return;Ne.current=De;const U=P.currentTarget.getBoundingClientRect();ae.current=W;const Ge=Ee.current;Ge&&Ge.style.display!=="none"&&(Ge.style.left=`${P.clientX-U.left}px`,Ge.style.top=`${P.clientY-U.top}px`),s({type:"input:touch:move",sessionId:t,payload:W})},e[104]=s,e[105]=t,e[106]=we,e[107]=x,e[108]=Pe):Pe=e[108];const oe=Pe;let ze;e[109]!==s||e[110]!==t?(ze=()=>{if(ce.current){ce.current=!1,fe(!1),pe(null),s({type:"input:pinch:end",sessionId:t,requestId:Re()});return}ve.current=null,ke.current="release",Ke.current={startTime:performance.now()};const P=Ee.current;P&&(P.style.width=`${Ln*2}px`,P.style.height=`${Ln*2}px`,P.style.background="transparent",P.style.border="1.5px solid rgba(255,255,255,0.6)",P.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"),s({type:"input:touch:end",sessionId:t,requestId:Re()})},e[109]=s,e[110]=t,e[111]=ze):ze=e[111];const Xt=ze;let gn;e[112]!==s||e[113]!==t?(gn=()=>{if(ce.current){ce.current=!1,fe(!1),pe(null),s({type:"input:pinch:end",sessionId:t,requestId:Re()});return}ve.current=null,ke.current="release",Ke.current={startTime:performance.now()},s({type:"input:touch:end",sessionId:t,requestId:Re()})},e[112]=s,e[113]=t,e[114]=gn):gn=e[114];const Pn=gn;let bn;e[115]===Symbol.for("react.memo_cache_sentinel")?(bn=()=>{pe(null),ae.current=null;const P=Ee.current;P&&(P.style.display="none")},e[115]=bn):bn=e[115];const zn=bn;let Zt,Rn;if(e[116]!==g||e[117]!==s||e[118]!==t){const P=["home","back","recent_apps"],W=["volume_up","volume_down","power"],le=na,A=De=>r.jsx(r.Fragment,{children:De.map(U=>g==null?void 0:g.find(Ge=>Ge.name===U)).filter(ta).map(U=>r.jsxs(Nt,{children:[r.jsx(Tt,{asChild:!0,children:r.jsx(Qe,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":U.accessibilityTitle,onClick:()=>s({type:"input:button",sessionId:t,requestId:Re(),payload:{name:U.name}}),children:le(U.name)})}),r.jsx(Et,{side:"left",children:U.accessibilityTitle})]},U.name))});Zt=A(P),Rn=A(W),e[116]=g,e[117]=s,e[118]=t,e[119]=Zt,e[120]=Rn}else Zt=e[119],Rn=e[120];const kn=Rn;let Hn;e[121]!==l||e[122]!==h||e[123]!==f||e[124]!==i||e[125]!==b?(Hn=h&&l?r.jsxs(Nt,{children:[r.jsx(Tt,{asChild:!0,children:r.jsx(Qe,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:b||f,"aria-label":"Launch app",onClick:i,children:b?r.jsx($n,{className:"h-4 w-4 animate-spin"}):r.jsx(Qr,{className:"h-4 w-4"})})}),r.jsx(Et,{side:"left",children:b?"Launching…":f?"Installing…":"Launch app"})]}):null,e[121]=l,e[122]=h,e[123]=f,e[124]=i,e[125]=b,e[126]=Hn):Hn=e[126];const Cn=Hn;let _n;e[127]===Symbol.for("react.memo_cache_sentinel")?(_n={display:"none"},e[127]=_n):_n=e[127];let ln;e[128]!==z?(ln=r.jsx("canvas",{ref:z,style:_n}),e[128]=z,e[129]=ln):ln=e[129];let an;e[130]!==ye||e[131]!==o?(an=r.jsx(xs,{open:ye,onOpenChange:re,openUrl:o}),e[130]=ye,e[131]=o,e[132]=an):an=e[132];let Nn;e[133]===Symbol.for("react.memo_cache_sentinel")?(Nn=()=>re(!0),e[133]=Nn):Nn=e[133];let Bt;e[134]!==Je||e[135]!==gt||e[136]!==M?(Bt=M&&M.postures.length>1?{postures:M.postures,currentId:M.currentId,pending:gt,onSelect:Je}:void 0,e[134]=Je,e[135]=gt,e[136]=M,e[137]=Bt):Bt=e[137];let Jt;e[138]!==Oe||e[139]!==w?(Jt=w?{position:Oe.position,steerable:Oe.steerable,reason:Oe.reason,pending:Oe.pending,onToggle:Oe.toggle}:void 0,e[138]=Oe,e[139]=w,e[140]=Jt):Jt=e[140];let Ft;e[141]!==v||e[142]!==N||e[143]!==R?(Ft={pending:N,onReboot:v,buttonRef:R},e[141]=v,e[142]=N,e[143]=R,e[144]=Ft):Ft=e[144];let en;e[145]!==kn||e[146]!==be||e[147]!==Ve||e[148]!==ge||e[149]!==u||e[150]!==Cn||e[151]!==Zt||e[152]!==$||e[153]!==Bt||e[154]!==Jt||e[155]!==Ft?(en=r.jsx(gs,{joined:u,onDeepLink:Nn,onScreenshot:ge,onRecordToggle:be,recordState:$,onRotate:Ve,posture:Bt,navigationSlot:Zt,deviceSlot:kn,launchSlot:Cn,network:Jt,reboot:Ft}),e[145]=kn,e[146]=be,e[147]=Ve,e[148]=ge,e[149]=u,e[150]=Cn,e[151]=Zt,e[152]=$,e[153]=Bt,e[154]=Jt,e[155]=Ft,e[156]=en):en=e[156];let tn;e[157]!==Pn||e[158]!==xe||e[159]!==oe||e[160]!==Xt?(tn={onPointerDown:xe,onPointerMove:oe,onPointerUp:Xt,onPointerCancel:Pn,onPointerLeave:zn},e[157]=Pn,e[158]=xe,e[159]=oe,e[160]=Xt,e[161]=tn):tn=e[161];let Tn;e[162]===Symbol.for("react.memo_cache_sentinel")?(Tn=r.jsx("div",{ref:Ee,style:{display:"none",position:"absolute",zIndex:20,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease, box-shadow 0.1s ease"}}),e[162]=Tn):Tn=e[162];let qt;e[163]!==X||e[164]!==se?(qt=se&&r.jsx(r.Fragment,{children:[se.f0,se.f1].map((P,W)=>r.jsx("div",{style:{position:"absolute",zIndex:10,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease",left:`${P.x*100}%`,top:`${P.y*100}%`,...X?{width:Wn*2,height:Wn*2,background:"rgba(255,255,255,0.92)",border:"1.5px solid rgba(0,0,0,0.2)",boxShadow:"0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"}:{width:Ln*2,height:Ln*2,background:"transparent",border:"1.5px solid rgba(255,255,255,0.6)",boxShadow:"0 0 0 1px rgba(0,0,0,0.3)"}}},W))}),e[163]=X,e[164]=se,e[165]=qt):qt=e[165];let cn;e[166]!==qt?(cn=r.jsxs(r.Fragment,{children:[Tn,qt]}),e[166]=qt,e[167]=cn):cn=e[167];let zt;e[168]!==d||e[169]!==gt||e[170]!==Fe||e[171]!==tn||e[172]!==cn?(zt=r.jsx(fo,{screen:Fe,deviceReady:d,posturePending:gt,surfaceHandlers:tn,overlay:cn}),e[168]=d,e[169]=gt,e[170]=Fe,e[171]=tn,e[172]=cn,e[173]=zt):zt=e[173];let dn;e[174]!==m||e[175]!==c||e[176]!==Wt||e[177]!==d||e[178]!==G||e[179]!==p||e[180]!==f||e[181]!==u||e[182]!==te?(dn=r.jsx(cr,{joined:u,fps:G,connected:c,deviceReady:d,bootError:m,installing:f,installError:p,decoderUnsupported:Wt,keyboardActive:te}),e[174]=m,e[175]=c,e[176]=Wt,e[177]=d,e[178]=G,e[179]=p,e[180]=f,e[181]=u,e[182]=te,e[183]=dn):dn=e[183];let Ut;e[184]!==zt||e[185]!==dn?(Ut=r.jsxs("div",{className:"flex items-start gap-8",children:[zt,dn]}),e[184]=zt,e[185]=dn,e[186]=Ut):Ut=e[186];let nn;return e[187]!==ln||e[188]!==an||e[189]!==en||e[190]!==Ut?(nn=r.jsxs("div",{role:"region","aria-label":"Device screen",className:"flex items-start justify-center gap-16",children:[ln,an,en,Ut]}),e[187]=ln,e[188]=an,e[189]=en,e[190]=Ut,e[191]=nn):nn=e[191],nn}function ta(n){return n!==void 0}function na(n){return n==="back"?r.jsx(To,{className:"h-4 w-4"}):n==="recent_apps"?r.jsx(qs,{className:"h-4 w-4"}):n==="volume_up"?r.jsx(fl,{className:"h-4 w-4"}):n==="volume_down"?r.jsx(ul,{className:"h-4 w-4"}):n==="power"?r.jsx(sl,{className:"h-4 w-4"}):r.jsx(Vr,{className:"h-4 w-4"})}function ra(n){return It.error(n)}function sa(n){return It.error(n)}function oa(n){if(!n)return;const e=URL.createObjectURL(n),t=document.createElement("a");t.href=e,t.download=`tapflow-${Date.now()}.png`,t.click(),URL.revokeObjectURL(e)}function la(n,e){const t=new DataView(n),l=Math.floor(n.byteLength/2),s=Math.floor(l/e),o=[];for(let i=0;i<e;i++)o.push(new Float32Array(s));for(let i=0;i<s;i++)for(let c=0;c<e;c++){const u=t.getInt16((i*e+c)*2,!0);o[c][i]=u/32768}return o}const aa=44100,sr=2,Ar=.06,ia=.3;function ca(){const n=de.c(5),e=a.useRef(null),t=a.useRef(0);let l;n[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{if(e.current)return e.current;const f=window.AudioContext??window.webkitAudioContext;return f?(e.current=new f,e.current):null},n[0]=l):l=n[0];const s=l;let o;n[1]===Symbol.for("react.memo_cache_sentinel")?(o=f=>{var j;const h=s();if(!h)return;h.state==="suspended"&&h.resume();const p=la(f,sr),m=((j=p[0])==null?void 0:j.length)??0;if(m===0)return;const b=h.createBuffer(sr,m,aa);for(let C=0;C<sr;C++)b.getChannelData(C).set(p[C]);const g=h.createBufferSource();g.buffer=b,g.connect(h.destination);const E=h.currentTime;let y=t.current;(y<E+.005||y>E+ia+Ar)&&(y=E+Ar),g.start(y),t.current=y+b.duration},n[1]=o):o=n[1];const i=o;let c,u;n[2]===Symbol.for("react.memo_cache_sentinel")?(c=()=>()=>{var f;(f=e.current)==null||f.close(),e.current=null},u=[],n[2]=c,n[3]=u):(c=n[2],u=n[3]),a.useEffect(c,u);let d;return n[4]===Symbol.for("react.memo_cache_sentinel")?(d={pushFrame:i},n[4]=d):d=n[4],d}const da=2e4;function ua(n){const e=de.c(32),{sessionId:t,deviceId:l,deviceReady:s,send:o,handlerRef:i,onShutdownComplete:c,onError:u}=n,[d,f]=a.useState(!1),h=a.useRef(null),p=a.useRef(c),m=a.useRef(u);let b,g;e[0]!==c?(b=()=>{p.current=c},g=[c],e[0]=c,e[1]=b,e[2]=g):(b=e[1],g=e[2]),a.useEffect(b,g);let E,y;e[3]!==u?(E=()=>{m.current=u},y=[u],e[3]=u,e[4]=E,e[5]=y):(E=e[4],y=e[5]),a.useEffect(E,y);let j;e[6]!==s||e[7]!==t?(j={sessionId:t,deviceReady:s},e[6]=s,e[7]=t,e[8]=j):j=e[8];const[C,w]=a.useState(j);(C.sessionId!==t||C.deviceReady!==s)&&(w({sessionId:t,deviceReady:s}),(C.sessionId!==t||!s)&&f(!1));let k;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=()=>{h.current=null},e[9]=k):k=e[9];let N;e[10]!==t?(N=[t],e[10]=t,e[11]=N):N=e[11],a.useEffect(k,N);let v,R;e[12]!==s?(v=()=>{s||(h.current=null)},R=[s],e[12]=s,e[13]=v,e[14]=R):(v=e[13],R=e[14]),a.useEffect(v,R);let D,I;e[15]!==i?(D=()=>(i.current=z=>{if(z.requestId===h.current){if(h.current=null,f(!1),z.type==="device:shutdown-error"){m.current(`The device was not restarted. ${z.message}`);return}p.current()}},()=>{i.current=void 0}),I=[i],e[15]=i,e[16]=D,e[17]=I):(D=e[16],I=e[17]),a.useEffect(D,I);const[L,M]=a.useState(null);let K,q;e[18]!==d?(K=()=>{M(d?h.current:null)},q=[d],e[18]=d,e[19]=K,e[20]=q):(K=e[19],q=e[20]),a.useEffect(K,q);let O,G;e[21]!==L?(O=()=>{if(L===null)return;const z=setTimeout(()=>{h.current===L&&(f(!1),m.current("The device has not answered the restart yet. If its answer arrives tapflow will finish restarting it; if nothing changes, press Restart again."))},da);return()=>clearTimeout(z)},G=[L],e[21]=L,e[22]=O,e[23]=G):(O=e[22],G=e[23]),a.useEffect(O,G);let Z;e[24]!==l||e[25]!==d||e[26]!==o||e[27]!==t?(Z=()=>{if(d)return;const z=Re();h.current=z,f(!0),o({type:"device:shutdown",sessionId:t,requestId:z,payload:{deviceId:l}})},e[24]=l,e[25]=d,e[26]=o,e[27]=t,e[28]=Z):Z=e[28];const J=Z;let $;return e[29]!==d||e[30]!==J?($={pending:d,reboot:J},e[29]=d,e[30]=J,e[31]=$):$=e[31],$}const Lr={"channel-unavailable":{title:"Input is not reaching this device",action:"Rejoin the session to continue."},"not-booted":{title:"The device is not running",action:"Start it again to continue testing."},"dispatch-failed":{title:"The device rejected that input",action:"Try once more. If it keeps failing, restart the device."},unsupported:{title:"That input is not supported on this device",action:"Everything else still works — this one has no equivalent here."},malformed:{title:"tapflow sent a malformed input",action:"This is a bug in tapflow — please report it with what you were doing."},"channel-starting":null,"no-gesture":null,"not-session-owner":{title:"This session is no longer yours",action:"Go back and open the device again — another tester may have taken it. Nothing you just did reached the device."}};function fa(n){const e=n!==void 0&&Object.hasOwn(Lr,n)?n:"channel-unavailable";return{key:e,notice:Lr[e]}}function ha(n){const e=de.c(125),{sessionId:t,deviceId:l,formFactor:s,platform:o,buildId:i,resetMode:c,onRecordingUploaded:u,onSessionEnded:d}=n,f=o===void 0?"ios":o,h=a.useRef(ga),p=a.useRef(!1);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={pending:0,appInstalled:!1},e[0]=m):m=e[0];const b=a.useRef(m),{perfMode:g,visible:E}=wl(),y=a.useRef(null),j=a.useRef(null);let C;e[1]===Symbol.for("react.memo_cache_sentinel")?(C=[],e[1]=C):C=e[1];const w=a.useRef(C);let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k={onFrameBegin:()=>{var x;return(x=y.current)==null?void 0:x.onFrameBegin()},onFrameEnd:x=>{var Pe,oe;const Q=w.current.shift()??null,xe=Q?{...x,capturedAt:Q.capturedAt,relayedAt:Q.relayedAt}:x;(Pe=y.current)==null||Pe.onFrameEnd(xe),(oe=j.current)==null||oe.call(j,xe)}},e[2]=k):k=e[2],a.useRef(k);const[N,v]=a.useState(!1),[R,D]=a.useState(!1),[I,L]=a.useState(!1),[M,K]=a.useState(null),[q,O]=a.useState(null);let G;e[3]===Symbol.for("react.memo_cache_sentinel")?(G=x=>{O(Q=>Q&&Q.width===x.width&&Q.height===x.height?Q:x)},e[3]=G):G=e[3];const Z=G;let J;e[4]===Symbol.for("react.memo_cache_sentinel")?(J={postures:[],currentId:null},e[4]=J):J=e[4];const[$,z]=a.useState(J),[ee,ue]=a.useState(!1),[ie,ye]=a.useState(!1),[re,Y]=a.useState(null),[B,te]=a.useState(null),[he,X]=a.useState(!1);let fe;e[5]===Symbol.for("react.memo_cache_sentinel")?(fe=[],e[5]=fe):fe=e[5];const[se,pe]=a.useState(fe);let Be;e[6]===Symbol.for("react.memo_cache_sentinel")?(Be=new Set,e[6]=Be):Be=e[6];const H=a.useRef(Be),V=a.useRef(null);let ce;e[7]===Symbol.for("react.memo_cache_sentinel")?(ce=new Set,e[7]=ce):ce=e[7];const _e=a.useRef(ce);let ve;e[8]===Symbol.for("react.memo_cache_sentinel")?(ve=new Set,e[8]=ve):ve=e[8];const Ne=a.useRef(ve);let Ee;e[9]===Symbol.for("react.memo_cache_sentinel")?(Ee=new Set,e[9]=Ee):Ee=e[9];const ae=a.useRef(Ee),[ke,Ke]=a.useState(!1),[Ae,Ye]=a.useState(!1),Se=a.useRef(null);let Fe,Xe;e[10]===Symbol.for("react.memo_cache_sentinel")?(Fe=()=>()=>{Se.current&&clearTimeout(Se.current)},Xe=[],e[10]=Fe,e[11]=Xe):(Fe=e[10],Xe=e[11]),a.useEffect(Fe,Xe);const Le=a.useRef(void 0),Ze=a.useRef(void 0),$e=a.useRef(void 0),ht=a.useRef(void 0);let Wt;e[12]!==l||e[13]!==t?(Wt=x=>{const Q=Re();H.current.add(Q),V.current=Q,h.current({type:"device:boot",sessionId:t,requestId:Q,payload:{deviceId:l,resetMode:x,acceptH264:mo(),secureContext:window.isSecureContext}})},e[12]=l,e[13]=t,e[14]=Wt):Wt=e[14];const qe=Wt,{pushFrame:Pt}=ca();let pt;e[15]!==R||e[16]!==i||e[17]!==ie||e[18]!==d||e[19]!==c||e[20]!==qe||e[21]!==t?(pt=x=>{var Q,xe,Pe;if(!("sessionId"in x&&x.sessionId!==t)){if(x.type==="session:joined"){b.current={pending:0,appInstalled:!1},v(!0),D(!1),pe(x.capabilities??[]);const oe=p.current?"app-only":c;p.current=!0,H.current.clear(),qe(oe)}if(x.type==="session:agent-away"){D(!0),K(null),L(!1);return}if(x.type==="session:terminated"){d==null||d(x.reason);return}if(x.type==="session:rebound"){L(!1),K(null),ue(!1),Y(null),te(null),X(!1),Ye(!1),Se.current&&clearTimeout(Se.current),Ke(!1),w.current=[],pe(x.capabilities);const oe=R;D(!1),b.current={pending:b.current.pending+1,appInstalled:b.current.pending>0?b.current.appInstalled:ie},p.current=!0,qe("app-only"),oe||It.info("The agent restarted — reconnecting to the device.");return}if(x.type==="device:boot-error"){if(x.requestId!==void 0&&x.requestId!==V.current||R)return;b.current={pending:0,appInstalled:!1},te(x.message)}if(x.type==="input:error"){if(R)return;const{key:oe,notice:ze}=fa(x.reason);x.reason!==void 0&&x.reason!==oe&&console.debug(`[tapflow] unrecognised input:error reason "${x.reason}", treated as ${oe}`),ze?It.error(ze.title,{id:`input:${t}:${oe}`,description:x.message?`${ze.action} (${x.message})`:ze.action,duration:6e3}):console.debug(`[tapflow] input refused, shown nowhere: ${oe}${x.message?` — ${x.message}`:""}`)}if(x.type==="device:booting"&&(L(!1),ue(!1),ye(!1),Y(null),te(null),z({postures:[],currentId:null}),Ne.current.clear(),ae.current.clear(),K(null)),x.type==="device:ready"){if(L(!0),x.requestId!==void 0&&!H.current.delete(x.requestId))return;if(b.current.pending>0){const{appInstalled:oe}=b.current;if(b.current={pending:b.current.pending-1,appInstalled:oe},oe){ye(!0);return}}if(i){ue(!0);const oe=Re();Ne.current.add(oe),h.current({type:"app:install",sessionId:t,requestId:oe,buildId:i})}}if(x.type==="app:install-done"||x.type==="app:install-error"){if(!Ne.current.delete(x.requestId))return;ue(!1),x.type==="app:install-done"?ye(!0):Y(x.message)}if(x.type==="app:launch-done"||x.type==="app:launch-error"){if(!ae.current.delete(x.requestId))return;X(!1),x.type==="app:launch-error"&&It.error("The app did not launch",{description:x.message})}if(x.type==="session:chrome"&&K(x.payload),x.type==="device:postures"&&z(x.payload),x.type==="keyboard:toggled"){const{visible:oe}=x.payload;Ke(oe),Ye(!1),Se.current&&clearTimeout(Se.current)}if(x.type==="network:state"||x.type==="network:error"){(Q=$e.current)==null||Q.call($e,x);return}if(x.type==="device:shutdown-done"||x.type==="device:shutdown-error"){(xe=ht.current)==null||xe.call(ht,x);return}if((x.type==="clipboard:data"||x.type==="clipboard:write-done"||x.type==="clipboard:error")&&((Pe=Ze.current)==null||Pe.call(Ze,x)),x.type==="open-url:done"||x.type==="open-url:error"){if(!_e.current.delete(x.requestId))return;x.type==="open-url:done"?It.success("Deeplink opened"):It.error(x.message)}if(x.type==="error")switch(x.reason){case"session-not-found":{d==null||d("agent-disconnected");return}case"session-busy":{d==null||d("busy-elsewhere");return}case"agent-resources-exhausted":{d==null||d("mac-overloaded");return}}}},e[15]=R,e[16]=i,e[17]=ie,e[18]=d,e[19]=c,e[20]=qe,e[21]=t,e[22]=pt):pt=e[22];const Gt=pt;let mt;e[23]!==Pt?(mt=x=>{var oe;const Q=go(x);if(Q&&Q.codec===bo){Pt(x.slice(vr));return}Q&&Q.codec===xo||w.current.push(Q);const xe=Q?x.slice(vr):x,Pe=Q?{codec:Q.codec,keyframe:Q.keyframe,capturedAt:Q.capturedAt,relayedAt:Q.relayedAt}:void 0;(oe=Le.current)==null||oe.call(Le,xe,Pe)},e[23]=Pt,e[24]=mt):mt=e[24];const At=mt,{send:ge,connected:We}=qr(Gt,At);let be;e[25]!==ge?(be=()=>{h.current=ge},e[25]=ge,e[26]=be):be=e[26],a.useLayoutEffect(be);let me,Qt;e[27]!==We||e[28]!==ge||e[29]!==t?(me=()=>{We&&ge({type:"session:start",sessionId:t,clientKind:"dashboard"})},Qt=[We,ge,t],e[27]=We,e[28]=ge,e[29]=t,e[30]=me,e[31]=Qt):(me=e[30],Qt=e[31]),a.useEffect(me,Qt);const gt=M!==null&&"framePng"in M?M:null,Ie=M!==null&&!("framePng"in M)?M:null;let bt;e[32]!==Ie||e[33]!==I||e[34]!==s||e[35]!==f||e[36]!==gt||e[37]!==q?(bt=gt??(I&&f==="ios"&&!Ie?po(q??Sr(s,f)):null),e[32]=Ie,e[33]=I,e[34]=s,e[35]=f,e[36]=gt,e[37]=q,e[38]=bt):bt=e[38];const Je=bt;let xt;e[39]!==ge||e[40]!==t?(xt=()=>{Ye(!0),Se.current&&clearTimeout(Se.current),Se.current=setTimeout(()=>{Ye(!1),It.error("The device did not answer. The software keyboard is where it was, as far as tapflow can tell.")},8e3),ge({type:"input:keyboard:toggle",sessionId:t})},e[39]=ge,e[40]=t,e[41]=xt):xt=e[41];const Lt=xt;let yt;e[42]!==t?(yt=x=>{const Q=Re();_e.current.add(Q),h.current({type:"open-url",sessionId:t,requestId:Q,payload:{url:x}})},e[42]=t,e[43]=yt):yt=e[43];const Dt=yt;let ct;e[44]!==i||e[45]!==t?(ct=()=>{if(i===void 0)return;const x=Re();ae.current.add(x),X(!0),h.current({type:"app:launch",sessionId:t,requestId:x,buildId:i})},e[44]=i,e[45]=t,e[46]=ct):ct=e[46];const Mt=ct,dt=a.useRef(null),on=a.useRef(!1),wt=a.useRef(!1);let Ve;e[47]!==qe?(Ve=()=>{wt.current=!0,qe("app-only")},e[47]=qe,e[48]=Ve):Ve=e[48];const $t=Ve;let vt;e[49]!==l||e[50]!==I||e[51]!==ge||e[52]!==t||e[53]!==$t?(vt={sessionId:t,deviceId:l,deviceReady:I,send:ge,handlerRef:ht,onShutdownComplete:$t,onError:ma},e[49]=l,e[50]=I,e[51]=ge,e[52]=t,e[53]=$t,e[54]=vt):vt=e[54];const{pending:Ot,reboot:Ht}=ua(vt);let St,jt;e[55]!==Ie||e[56]!==Je?(St=()=>{var xe;const x=!!(Je??Ie),Q=!on.current&&x;on.current=x,!(!Q||!wt.current)&&(wt.current=!1,document.activeElement===document.body&&((xe=dt.current)==null||xe.focus()))},jt=[Je,Ie],e[55]=Ie,e[56]=Je,e[57]=St,e[58]=jt):(St=e[57],jt=e[58]),a.useEffect(St,jt);let Vt,Rt;e[59]!==R||e[60]!==B?(Vt=()=>{(B||R)&&(wt.current=!1)},Rt=[B,R],e[59]=R,e[60]=B,e[61]=Vt,e[62]=Rt):(Vt=e[61],Rt=e[62]),a.useEffect(Vt,Rt);let rt;e[63]!==se?(rt=se.includes("clipboard"),e[63]=se,e[64]=rt):rt=e[64];let Oe;e[65]!==se?(Oe=se.includes("network-control"),e[65]=se,e[66]=Oe):Oe=e[66];let kt;e[67]!==B||e[68]!==i||e[69]!==We||e[70]!==I||e[71]!==re||e[72]!==ie||e[73]!==ee||e[74]!==N||e[75]!==Mt||e[76]!==he||e[77]!==Lt||e[78]!==u||e[79]!==Dt||e[80]!==Ht||e[81]!==Ot||e[82]!==ge||e[83]!==t||e[84]!==Ae||e[85]!==ke||e[86]!==rt||e[87]!==Oe?(kt={sessionId:t,buildId:i,send:ge,openUrl:Dt,launchApp:Mt,connected:We,joined:N,deviceReady:I,installing:ee,installed:ie,installError:re,bootError:B,launching:he,binaryFrameHandlerRef:Le,clipboardHandlerRef:Ze,clipboardSupported:rt,networkHandlerRef:$e,networkSupported:Oe,onRecordingUploaded:u,swKeyboardVisible:ke,swKeyboardPending:Ae,onKbdToggle:Lt,rebootPending:Ot,onReboot:Ht,restartButtonRef:dt},e[67]=B,e[68]=i,e[69]=We,e[70]=I,e[71]=re,e[72]=ie,e[73]=ee,e[74]=N,e[75]=Mt,e[76]=he,e[77]=Lt,e[78]=u,e[79]=Dt,e[80]=Ht,e[81]=Ot,e[82]=ge,e[83]=t,e[84]=Ae,e[85]=ke,e[86]=rt,e[87]=Oe,e[88]=kt):kt=e[88];const st=kt;if(!Je&&!Ie){let x;e[89]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx("div",{"aria-hidden":"true",className:"flex flex-col items-center gap-0.5 rounded-2xl border bg-background/90 px-1.5 py-2.5 shrink-0 mt-3 opacity-40",children:Array.from({length:5}).map(pa)}),e[89]=x):x=e[89];let Q;e[90]===Symbol.for("react.memo_cache_sentinel")?(Q={background:"#1c1c1e",borderRadius:"34px",padding:"12px",flexShrink:0},e[90]=Q):Q=e[90];let xe;e[91]!==s||e[92]!==f?(xe=Sr(s,f),e[91]=s,e[92]=f,e[93]=xe):xe=e[93];let Pe;e[94]!==xe?(Pe=r.jsx("div",{"aria-hidden":"true",style:Q,children:r.jsx("div",{"data-testid":"device-skeleton",className:"animate-pulse bg-zinc-700",style:{...xe,borderRadius:"22px"}})}),e[94]=xe,e[95]=Pe):Pe=e[95];let oe;e[96]!==R||e[97]!==B||e[98]!==We||e[99]!==I||e[100]!==re||e[101]!==ee||e[102]!==N?(oe=r.jsx(cr,{joined:N,fps:0,connected:We,deviceReady:I,bootError:B,installing:ee,installError:re,decoderUnsupported:!1,keyboardActive:!1,agentAway:R}),e[96]=R,e[97]=B,e[98]=We,e[99]=I,e[100]=re,e[101]=ee,e[102]=N,e[103]=oe):oe=e[103];let ze;e[104]!==Pe||e[105]!==oe?(ze=r.jsxs("div",{className:"flex items-start gap-8",children:[Pe,oe]}),e[104]=Pe,e[105]=oe,e[106]=ze):ze=e[106];let Xt;return e[107]!==x||e[108]!==ze?(Xt=r.jsxs("div",{role:"region","aria-label":"Device screen",className:"flex items-start justify-center gap-16",children:[x,ze]}),e[107]=x,e[108]=ze,e[109]=Xt):Xt=e[109],Xt}const Yt=void 0;let ot;e[110]!==st||e[111]!==s||e[112]!==Je?(ot=Je&&r.jsx(Xl,{...st,chrome:Je,formFactor:s,perfHookRef:Yt,onStreamSize:Z}),e[110]=st,e[111]=s,e[112]=Je,e[113]=ot):ot=e[113];let lt;e[114]!==Ie||e[115]!==st||e[116]!==$?(lt=Ie&&r.jsx(ea,{...st,androidButtons:Ie.buttons,screenWidth:Ie.screenWidth,screenHeight:Ie.screenHeight,cornerRadius:Ie.cornerRadius,postures:$,streamRotation:Ie.streamRotation,perfHookRef:Yt}),e[114]=Ie,e[115]=st,e[116]=$,e[117]=lt):lt=e[117];let we;e[118]!==g||e[119]!==E?(we=!1,e[118]=g,e[119]=E,e[120]=we):we=e[120];let Ct;return e[121]!==ot||e[122]!==lt||e[123]!==we?(Ct=r.jsxs(r.Fragment,{children:[ot,lt,we]}),e[121]=ot,e[122]=lt,e[123]=we,e[124]=Ct):Ct=e[124],Ct}function pa(n,e){return r.jsx("div",{className:"h-8 w-8 rounded-md bg-muted animate-pulse"},e)}function ma(n){It.error(n)}function ga(){}const ws=a.forwardRef((n,e)=>{const t=de.c(9);let l,s;t[0]!==n?({className:l,...s}=n,t[0]=n,t[1]=l,t[2]=s):(l=t[1],s=t[2]);let o;t[3]!==l?(o=He("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",l),t[3]=l,t[4]=o):o=t[4];let i;return t[5]!==s||t[6]!==e||t[7]!==o?(i=r.jsx("textarea",{className:o,ref:e,...s}),t[5]=s,t[6]=e,t[7]=o,t[8]=i):i=t[8],i});ws.displayName="Textarea";var ba=Object.defineProperty,ne=(n,e)=>ba(n,"name",{value:e,configurable:!0});function vs(n,e){return a.useReducer((t,l)=>e[t][l]??t,n)}ne(vs,"useStateMachine");var Fn={Auto:"auto",Always:"always",Scroll:"scroll",Hover:"hover"},qn={Vertical:"vertical",Horizontal:"horizontal"},mn={LTR:"ltr",RTL:"rtl"},Ss="ScrollArea",[js,vi]=Hr(Ss),[xa,Kt]=js(Ss),Rs=a.forwardRef(ne(function(e,t){const{__scopeScrollArea:l,type:s=Fn.Hover,dir:o,scrollHideDelay:i=600,...c}=e,[u,d]=a.useState(null),[f,h]=a.useState(null),[p,m]=a.useState(null),[b,g]=a.useState(null),[E,y]=a.useState(null),[j,C]=a.useState(0),[w,k]=a.useState(0),[N,v]=a.useState(!1),[R,D]=a.useState(!1),I=vn(t,d),L=Ks(o);return r.jsx(xa,{scope:l,type:s,dir:L,scrollHideDelay:i,scrollArea:u,viewport:f,onViewportChange:h,content:p,onContentChange:m,scrollbarX:b,onScrollbarXChange:g,scrollbarXEnabled:N,onScrollbarXEnabledChange:v,scrollbarY:E,onScrollbarYChange:y,scrollbarYEnabled:R,onScrollbarYEnabledChange:D,onCornerWidthChange:C,onCornerHeightChange:k,children:r.jsx(Sn.div,{dir:L,...c,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})},"ScrollArea")),ks="ScrollAreaViewport",Dr=zs(ks),ya=a.forwardRef(ne(function(e,t){const{__scopeScrollArea:l,children:s,nonce:o,disableImplicitContentElement:i,...c}=e,u=Kt(ks,l),d=a.useRef(null),f=vn(t,d,u.onViewportChange),h=a.isValidElement(s);return r.jsxs(r.Fragment,{children:[r.jsx(wa,{nonce:o}),r.jsx(Sn.div,{"data-radix-scroll-area-viewport":"",...c,ref:f,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:i?s:h?r.jsx(Dr,{child:s,children:p=>r.jsx(Mr,{__scopeScrollArea:l,children:p})}):r.jsx(Dr,{children:r.jsx(Mr,{__scopeScrollArea:l,children:s})})})]})},"ScrollAreaViewport")),wa=a.memo(ne(function({nonce:e}){return r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e})},"ScrollAreaViewportStyle"),(n,e)=>n.nonce===e.nonce),va="ScrollAreaContent",Mr=a.forwardRef(ne(function(e,t){const{__scopeScrollArea:l,children:s,...o}=e,i=Kt(va,l),c=vn(t,i.onContentChange);return r.jsx(Sn.div,{...o,ref:c,style:{minWidth:"100%",display:"table",...e.style},children:s})},"ScrollAreaContent")),jn="ScrollAreaScrollbar",Cs=a.forwardRef(ne(function(e,t){const{forceMount:l,...s}=e,o=Kt(jn,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:c}=o,u=e.orientation===qn.Horizontal;return a.useEffect(()=>(u?i(!0):c(!0),()=>{u?i(!1):c(!1)}),[u,i,c]),o.type===Fn.Hover?r.jsx(Sa,{...s,ref:t,forceMount:l}):o.type===Fn.Scroll?r.jsx(ja,{...s,ref:t,forceMount:l}):o.type===Fn.Auto?r.jsx(_s,{...s,ref:t,forceMount:l}):o.type===Fn.Always?r.jsx(ur,{...s,ref:t,"data-state":"visible"}):null},"ScrollAreaScrollbar")),Sa=a.forwardRef(ne(function(e,t){const{forceMount:l,...s}=e,o=Kt(jn,e.__scopeScrollArea),[i,c]=a.useState(!1);return a.useEffect(()=>{const u=o.scrollArea;let d=0;if(u){const f=ne(()=>{window.clearTimeout(d),c(!0)},"handlePointerEnter"),h=ne(()=>{d=window.setTimeout(()=>c(!1),o.scrollHideDelay)},"handlePointerLeave");return u.addEventListener("pointerenter",f),u.addEventListener("pointerleave",h),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",f),u.removeEventListener("pointerleave",h)}}},[o.scrollArea,o.scrollHideDelay]),r.jsx(nr,{present:l||i,children:r.jsx(_s,{"data-state":i?"visible":"hidden",...s,ref:t})})},"ScrollAreaScrollbarHover")),ja=a.forwardRef(ne(function(e,t){const{forceMount:l,...s}=e,o=Kt(jn,e.__scopeScrollArea),i=e.orientation===qn.Horizontal,c=Gn(()=>d("SCROLL_END"),100),[u,d]=vs("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(u==="idle"){const f=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(f)}},[u,o.scrollHideDelay,d]),a.useEffect(()=>{const f=o.viewport,h=i?"scrollLeft":"scrollTop";if(f){let p=f[h];const m=ne(()=>{const b=f[h];p!==b&&(d("SCROLL"),c()),p=b},"handleScroll");return f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[o.viewport,i,d,c]),r.jsx(nr,{present:l||u!=="hidden",children:r.jsx(ur,{"data-state":u==="hidden"?"hidden":"visible",...s,ref:t,onPointerEnter:wn(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:wn(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),_s=a.forwardRef(ne(function(e,t){const l=Kt(jn,e.__scopeScrollArea),{forceMount:s,...o}=e,[i,c]=a.useState(!1),u=e.orientation===qn.Horizontal,d=Gn(()=>{if(l.viewport){const f=l.viewport.offsetWidth<l.viewport.scrollWidth,h=l.viewport.offsetHeight<l.viewport.scrollHeight;c(u?f:h)}},10);return On(l.viewport,d),On(l.content,d),r.jsx(nr,{present:s||i,children:r.jsx(ur,{"data-state":i?"visible":"hidden",...o,ref:t})})},"ScrollAreaScrollbarAuto")),ur=a.forwardRef(ne(function(e,t){const{orientation:l=qn.Vertical,...s}=e,o=Kt(jn,e.__scopeScrollArea),i=a.useRef(null),c=a.useRef(0),[u,d]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=fr(u.viewport,u.content),h={...s,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:ne(m=>i.current=m,"onThumbChange"),onThumbPointerUp:ne(()=>c.current=0,"onThumbPointerUp"),onThumbPointerDown:ne(m=>c.current=m,"onThumbPointerDown")};function p(m,b){return Is(m,c.current,u,b)}return ne(p,"getScrollPosition"),l===qn.Horizontal?r.jsx(Ra,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollLeft,b=ir(m,u,o.dir);i.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=p(m,o.dir))}}):l===qn.Vertical?r.jsx(ka,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollTop,b=ir(m,u);i.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=p(m))}}):null},"ScrollAreaScrollbarVisible")),Ra=a.forwardRef(ne(function(e,t){const{sizes:l,onSizesChange:s,...o}=e,i=Kt(jn,e.__scopeScrollArea),[c,u]=a.useState(),d=a.useRef(null),f=vn(t,d,i.onScrollbarXChange);return a.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),r.jsx(Ts,{"data-orientation":"horizontal",...o,ref:f,sizes:l,style:{bottom:0,left:i.dir===mn.RTL?"var(--radix-scroll-area-corner-width)":0,right:i.dir===mn.LTR?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Xn(l)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,p)=>{if(i.viewport){const m=i.viewport.scrollLeft+h.deltaX;e.onWheelScroll(m),pr(m,p)&&h.preventDefault()}},onResize:()=>{d.current&&i.viewport&&c&&s({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Yn(c.paddingLeft),paddingEnd:Yn(c.paddingRight)}})}})},"ScrollAreaScrollbarX")),ka=a.forwardRef(ne(function(e,t){const{sizes:l,onSizesChange:s,...o}=e,i=Kt(jn,e.__scopeScrollArea),[c,u]=a.useState(),d=a.useRef(null),f=vn(t,d,i.onScrollbarYChange);return a.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),r.jsx(Ts,{"data-orientation":"vertical",...o,ref:f,sizes:l,style:{top:0,right:i.dir===mn.LTR?0:void 0,left:i.dir===mn.RTL?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Xn(l)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,p)=>{if(i.viewport){const m=i.viewport.scrollTop+h.deltaY;e.onWheelScroll(m),pr(m,p)&&h.preventDefault()}},onResize:()=>{d.current&&i.viewport&&c&&s({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Yn(c.paddingTop),paddingEnd:Yn(c.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[Ca,Ns]=js(jn),Ts=a.forwardRef(ne(function(e,t){const{__scopeScrollArea:l,sizes:s,hasThumb:o,onThumbChange:i,onThumbPointerUp:c,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:h,onResize:p,...m}=e,b=Kt(jn,l),[g,E]=a.useState(null),y=vn(t,E),j=a.useRef(null),C=a.useRef(""),w=b.viewport,k=s.content-s.viewport,N=Mn(h),v=Mn(d),R=Gn(p,10);function D(I){if(j.current){const L=I.clientX-j.current.left,M=I.clientY-j.current.top;f({x:L,y:M})}}return ne(D,"handleDragScroll"),a.useEffect(()=>{const I=ne(L=>{const M=L.target;(g==null?void 0:g.contains(M))&&N(L,k)},"handleWheel");return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[w,g,k,N]),a.useEffect(v,[s,v]),On(g,R),On(b.content,R),r.jsx(Ca,{scope:l,scrollbar:g,hasThumb:o,onThumbChange:Mn(i),onThumbPointerUp:Mn(c),onThumbPositionChange:v,onThumbPointerDown:Mn(u),children:r.jsx(Sn.div,{...m,ref:y,style:{position:"absolute",...m.style},onPointerDown:wn(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),j.current=g.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),D(I))}),onPointerMove:wn(e.onPointerMove,D),onPointerUp:wn(e.onPointerUp,I=>{const L=I.target;L.hasPointerCapture(I.pointerId)&&L.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=C.current,b.viewport&&(b.viewport.style.scrollBehavior=""),j.current=null})})})},"ScrollAreaScrollbarImpl")),ar="ScrollAreaThumb",_a=a.forwardRef(ne(function(e,t){const{forceMount:l,...s}=e,o=Ns(ar,e.__scopeScrollArea);return r.jsx(nr,{present:l||o.hasThumb,children:r.jsx(Na,{ref:t,...s})})},"ScrollAreaThumb")),Na=a.forwardRef(ne(function(e,t){const{__scopeScrollArea:l,style:s,...o}=e,i=Kt(ar,l),c=Ns(ar,l),{onThumbPositionChange:u}=c,d=vn(t,c.onThumbChange),f=a.useRef(void 0),h=Gn(()=>{f.current&&(f.current(),f.current=void 0)},100);return a.useEffect(()=>{const p=i.viewport;if(p){const m=ne(()=>{if(h(),!f.current){const b=Ia(p,u);f.current=b,u()}},"handleScroll");return u(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[i.viewport,h,u]),r.jsx(Sn.div,{"data-state":c.hasThumb?"visible":"hidden",...o,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:wn(e.onPointerDownCapture,p=>{const b=p.target.getBoundingClientRect(),g=p.clientX-b.left,E=p.clientY-b.top;c.onThumbPointerDown({x:g,y:E})}),onPointerUp:wn(e.onPointerUp,c.onThumbPointerUp)})},"ScrollAreaThumbImpl")),Es="ScrollAreaCorner",Ta=a.forwardRef(ne(function(e,t){const l=Kt(Es,e.__scopeScrollArea),s=!!(l.scrollbarX&&l.scrollbarY);return l.type!==Fn.Scroll&&s?r.jsx(Ea,{...e,ref:t}):null},"ScrollAreaCorner")),Ea=a.forwardRef(ne(function(e,t){const{__scopeScrollArea:l,...s}=e,o=Kt(Es,l),[i,c]=a.useState(0),[u,d]=a.useState(0),f=!!(i&&u),{onCornerWidthChange:h,onCornerHeightChange:p}=o;return On(o.scrollbarX,()=>{var b;const m=((b=o.scrollbarX)==null?void 0:b.offsetHeight)||0;o.onCornerHeightChange(m),d(m)}),On(o.scrollbarY,()=>{var b;const m=((b=o.scrollbarY)==null?void 0:b.offsetWidth)||0;o.onCornerWidthChange(m),c(m)}),a.useEffect(()=>()=>{h(0),p(0)},[h,p]),f?r.jsx(Sn.div,{...s,ref:t,style:{width:i,height:u,position:"absolute",right:o.dir===mn.LTR?0:void 0,left:o.dir===mn.RTL?0:void 0,bottom:0,...e.style}}):null},"ScrollAreaCornerImpl"));function Yn(n){return n?parseInt(n,10):0}ne(Yn,"toInt");function fr(n,e){const t=n/e;return isNaN(t)?0:t}ne(fr,"getThumbRatio");function Xn(n){const e=fr(n.viewport,n.content),t=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,l=(n.scrollbar.size-t)*e;return Math.max(l,18)}ne(Xn,"getThumbSize");function Is(n,e,t,l=mn.LTR){const s=Xn(t),o=s/2,i=e||o,c=s-i,u=t.scrollbar.paddingStart+i,d=t.scrollbar.size-t.scrollbar.paddingEnd-c,f=t.content-t.viewport,h=l===mn.LTR?[0,f]:[f*-1,0];return hr([u,d],h)(n)}ne(Is,"getScrollPositionFromPointer");function ir(n,e,t=mn.LTR){const l=Xn(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-s,i=e.content-e.viewport,c=o-l,u=t===mn.LTR?[0,i]:[i*-1,0],d=Bo(n,u);return hr([0,i],[0,c])(d)}ne(ir,"getThumbOffsetFromScroll");function hr(n,e){return t=>{if(n[0]===n[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(n[1]-n[0]);return e[0]+l*(t-n[0])}}ne(hr,"linearScale");function pr(n,e){return n>0&&n<e}ne(pr,"isScrollingWithinScrollbarBounds");var Ia=ne((n,e=()=>{})=>{let t={left:n.scrollLeft,top:n.scrollTop},l=0;function s(){const o={left:n.scrollLeft,top:n.scrollTop},i=t.left!==o.left,c=t.top!==o.top;(i||c)&&e(),t=o,l=window.requestAnimationFrame(s)}return ne(s,"loop"),s(),()=>window.cancelAnimationFrame(l)},"addUnlinkedScrollListener");function Gn(n,e){const t=Mn(n),l=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(l.current),[]),a.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(t,e)},[t,e])}ne(Gn,"useDebounceCallback");function On(n,e){const t=Mn(e);Us(()=>{let l=0;if(n){const s=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(t)});return s.observe(n),()=>{window.cancelAnimationFrame(l),s.unobserve(n)}}},[n,t])}ne(On,"useResizeObserver");const Ps=a.forwardRef((n,e)=>{const t=de.c(15);let l,s,o;t[0]!==n?({className:s,children:l,...o}=n,t[0]=n,t[1]=l,t[2]=s,t[3]=o):(l=t[1],s=t[2],o=t[3]);let i;t[4]!==s?(i=He("relative overflow-hidden",s),t[4]=s,t[5]=i):i=t[5];let c;t[6]!==l?(c=r.jsx(ya,{className:"h-full w-full rounded-[inherit]",children:l}),t[6]=l,t[7]=c):c=t[7];let u,d;t[8]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx(As,{}),d=r.jsx(Ta,{}),t[8]=u,t[9]=d):(u=t[8],d=t[9]);let f;return t[10]!==o||t[11]!==e||t[12]!==i||t[13]!==c?(f=r.jsxs(Rs,{ref:e,className:i,...o,children:[c,u,d]}),t[10]=o,t[11]=e,t[12]=i,t[13]=c,t[14]=f):f=t[14],f});Ps.displayName=Rs.displayName;const As=a.forwardRef((n,e)=>{const t=de.c(14);let l,s,o;t[0]!==n?({className:l,orientation:o,...s}=n,t[0]=n,t[1]=l,t[2]=s,t[3]=o):(l=t[1],s=t[2],o=t[3]);const i=o===void 0?"vertical":o,c=i==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",u=i==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]";let d;t[4]!==l||t[5]!==c||t[6]!==u?(d=He("flex touch-none select-none transition-colors",c,u,l),t[4]=l,t[5]=c,t[6]=u,t[7]=d):d=t[7];let f;t[8]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx(_a,{className:"relative flex-1 rounded-full bg-border"}),t[8]=f):f=t[8];let h;return t[9]!==i||t[10]!==s||t[11]!==e||t[12]!==d?(h=r.jsx(Cs,{ref:e,orientation:i,className:d,...s,children:f}),t[9]=i,t[10]=s,t[11]=e,t[12]=d,t[13]=h):h=t[13],h});As.displayName=Cs.displayName;function Ls(n){return/[Zz]|[+-]\d{2}/.test(n)?new Date(n):new Date(n.replace(" ","T")+"Z")}function Pa(n){const e=new Map;for(const s of n){const o=Ls(s.created_at).toDateString();e.has(o)||e.set(o,[]),e.get(o).push(s)}const t=new Date().toDateString(),l=new Date(Date.now()-864e5).toDateString();return Array.from(e.entries()).map(([s,o])=>{let i;if(s===t)i="Today";else if(s===l)i="Yesterday";else{const c=new Date(s);i=c.toLocaleDateString(void 0,{month:"short",day:"numeric",...c.getFullYear()!==new Date().getFullYear()?{year:"numeric"}:{}})}return{label:i,items:o}})}function Aa(n){return Ls(n).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}const La=5*1024*1024,Da=["image/png","image/jpeg","image/webp"];function Ma({buildId:n}){const e=a.useId(),[t,l]=a.useState(""),[s,o]=a.useState(null),[i,c]=a.useState(!1),[u,d]=a.useState(""),f=a.useRef(null),h=a.useRef({}),p=Br(),m=Fr({queryKey:tr.comments(n),queryFn:()=>Ws(n)}),b=m.data??[],g=()=>{p.invalidateQueries({queryKey:tr.comments(n)})};a.useEffect(()=>{const w=window.location.hash;if(!w.startsWith("#comment-"))return;const k=Number(w.replace("#comment-","")),N=h.current[k];if(!N)return;N.scrollIntoView({behavior:"smooth"});const v=document.documentElement.classList.contains("dark");N.style.backgroundColor=v?"rgb(0 112 243 / 0.18)":"#d3e5ff",setTimeout(()=>{N.style.backgroundColor=""},2e3)},[m.data]),a.useEffect(()=>{kr()},[]);async function E(w){const{linkBase:k}=await kr(),N=Fo(k,`${location.pathname}${location.search}#comment-${w}`);try{if(!navigator.clipboard)throw new Error("no clipboard");await navigator.clipboard.writeText(N),It.success("Link copied")}catch{It.error("Could not copy link")}}function y(w){if(d(""),!Da.includes(w.type)){d("Only png, jpg, webp allowed");return}if(w.size>La){d("Max 5MB");return}o(w)}async function j(w){if(w.preventDefault(),!t.trim()&&!s)return;c(!0);const k=new FormData;k.append("build_id",String(n)),k.append("body",t),s&&k.append("attachment",s),(await fetch("/api/v1/comments",{method:"POST",credentials:"include",body:k})).ok&&(l(""),o(null),g()),c(!1)}const C=Pa(b);return r.jsxs("div",{className:"flex h-full flex-col gap-3 px-1",children:[r.jsx(Ps,{className:"flex-1 rounded-md border",children:r.jsx("div",{className:"p-3",children:m.isPending?r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"Loading comments…"}):m.isError&&!m.data?r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"Couldn't load comments."}):b.length===0?r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No comments yet."}):r.jsx("div",{className:"flex flex-col",children:C.map(({label:w,items:k})=>r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 py-3",children:[r.jsx("div",{className:"h-px flex-1 bg-border"}),r.jsx("span",{className:"text-[11px] font-medium text-muted-foreground px-1 select-none",children:w}),r.jsx("div",{className:"h-px flex-1 bg-border"})]}),r.jsx("div",{className:"flex flex-col gap-4",children:k.map(N=>r.jsxs("div",{id:`comment-${N.id}`,ref:v=>{h.current[N.id]=v},className:"group flex gap-2.5 rounded-md px-2 py-1.5 transition-all",children:[r.jsx("div",{className:"mt-0.5 shrink-0",children:r.jsx(Vs,{name:N.author,avatarUrl:N.authorAvatarUrl,size:28})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"text-sm font-semibold leading-none",children:N.author}),r.jsx("span",{className:"text-[11px] text-muted-foreground leading-none",children:Aa(N.created_at)}),r.jsx(Qe,{variant:"ghost",size:"icon",className:"h-4 w-4 ml-0.5 opacity-0 group-hover:opacity-50 hover:!opacity-100 group-focus-within:opacity-50 focus-visible:!opacity-100 transition-opacity","aria-label":"Copy link to comment",onClick:()=>void E(N.id),children:r.jsx(Wr,{className:"h-3 w-3","aria-hidden":"true"})})]}),r.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap mt-1",children:N.body}),N.attachments.map(v=>{const R=decodeURIComponent(v.file_path.split("/").pop()??"image");return r.jsx("a",{href:v.file_path,target:"_blank",rel:"noreferrer",className:"mt-1.5 block","aria-label":`Open ${R} in a new tab`,children:r.jsx("img",{src:v.file_path,alt:R,className:"max-h-48 rounded border object-contain"})},v.id)})]})]},N.id))})]},w))})})}),r.jsx("div",{className:"pb-1",children:r.jsx("form",{onSubmit:j,children:r.jsxs("div",{className:"rounded-md border border-input bg-background ring-offset-background transition-shadow focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",children:[r.jsx(ws,{"aria-label":"Comment",placeholder:"Leave a comment…",value:t,onChange:w=>l(w.target.value),className:"min-h-16 resize-none border-0 bg-transparent shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 text-sm"}),(s||u)&&r.jsxs("div",{className:"px-3 -mt-1 pb-1",children:[s&&r.jsx("p",{className:"text-xs text-muted-foreground",children:s.name}),u&&r.jsx("p",{id:e,role:"alert",className:"text-xs text-destructive",children:u})]}),r.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[r.jsx(Qe,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground","aria-label":"Attach image","aria-describedby":u?e:void 0,onClick:()=>{var w;return(w=f.current)==null?void 0:w.click()},children:r.jsx(nl,{className:"h-4 w-4","aria-hidden":"true"})}),r.jsx("input",{ref:f,type:"file",accept:"image/png,image/jpeg,image/webp",className:"hidden",onChange:w=>{var N;const k=(N=w.target.files)==null?void 0:N[0];k&&y(k)}}),r.jsx("div",{className:"flex-1"}),r.jsx(Qe,{type:"submit",size:"icon",className:"h-7 w-7 rounded-full","aria-label":"Post comment",disabled:i||!t.trim()&&!s,children:r.jsx(Zo,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})})})]})}function $a(n){return n<1024*1024?`${(n/1024).toFixed(0)} KB`:`${(n/1024/1024).toFixed(1)} MB`}function Oa(n){return new Date(n).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Ha(n){const e=new Date(n).getTime()-Date.now();if(e<=0)return{label:"Expired",urgent:!0};const t=Math.floor(e/36e5);return t<1?{label:"< 1 hour left",urgent:!0}:t<24?{label:`Expires in ${t}h`,urgent:t<6}:{label:`Expires in ${Math.floor(t/24)}d`,urgent:!1}}function Ba(n){const e=de.c(17),{buildId:t}=n;let l;e[0]!==t?(l=tr.recordings(t),e[0]=t,e[1]=l):l=e[1];let s;e[2]!==t?(s=()=>Ys(t),e[2]=t,e[3]=s):s=e[3];let o;e[4]!==l||e[5]!==s?(o={queryKey:l,queryFn:s},e[4]=l,e[5]=s,e[6]=o):o=e[6];const i=Fr(o);let c;e[7]!==i.data?(c=i.data??[],e[7]=i.data,e[8]=c):c=e[8];const u=c,d=qo(i.isPending,250,t);if(i.isPending){let p;return e[9]!==d?(p=d?r.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading recordings…"}):null,e[9]=d,e[10]=p):p=e[10],p}if(i.isError&&!i.data){let p;return e[11]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"Couldn't load recordings."}),e[11]=p):p=e[11],p}if(u.length===0){let p;return e[12]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No recordings yet."}),e[12]=p):p=e[12],p}let f;e[13]!==u?(f=u.map(Fa),e[13]=u,e[14]=f):f=e[14];let h;return e[15]!==f?(h=r.jsx("div",{className:"flex flex-col gap-2",children:f}),e[15]=f,e[16]=h):h=e[16],h}function Fa(n){const e=Ha(n.expiresAt);return r.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border px-3 py-2 text-sm",children:[r.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[r.jsx("span",{className:"text-xs font-medium truncate",children:Oa(n.createdAt)}),r.jsxs("span",{className:`text-xs ${e.urgent?"text-destructive":"text-muted-foreground"}`,children:[e.label," · ",$a(n.fileSize)]})]}),r.jsx(Qe,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0 ml-2",title:"Download",onClick:()=>{const t=document.createElement("a");t.href=n.url,t.download="",t.click()},children:r.jsx(Eo,{className:"h-3.5 w-3.5"})})]},n.id)}function qa(n){const e=de.c(9),{buildId:t}=n;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsxs(jr,{value:"comments",className:"flex-1 gap-1.5",children:[r.jsx(rl,{className:"h-3.5 w-3.5"}),"Comments"]}),e[0]=l):l=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"shrink-0 px-1",children:r.jsxs(Oo,{className:"w-full",children:[l,r.jsxs(jr,{value:"recordings",className:"flex-1 gap-1.5",children:[r.jsx(el,{className:"h-3.5 w-3.5"}),"Recordings"]})]})}),e[1]=s):s=e[1];let o;e[2]!==t?(o=r.jsx(Rr,{value:"comments",className:"mt-3 min-h-0 flex-1 overflow-hidden",children:r.jsx(Ma,{buildId:t})}),e[2]=t,e[3]=o):o=e[3];let i;e[4]!==t?(i=r.jsx(Rr,{value:"recordings",className:"mt-3 min-h-0 flex-1 overflow-y-auto",children:r.jsx(Ba,{buildId:t})}),e[4]=t,e[5]=i):i=e[5];let c;return e[6]!==o||e[7]!==i?(c=r.jsxs(Ho,{defaultValue:"comments",className:"flex h-full flex-col",children:[s,o,i]}),e[6]=o,e[7]=i,e[8]=c):c=e[8],c}const Ds=a.forwardRef((n,e)=>{const t=de.c(5);let l;t[0]!==n?({...l}=n,t[0]=n,t[1]=l):l=t[1];let s;return t[2]!==l||t[3]!==e?(s=r.jsx("nav",{ref:e,"aria-label":"breadcrumb",...l}),t[2]=l,t[3]=e,t[4]=s):s=t[4],s});Ds.displayName="Breadcrumb";const Ms=a.forwardRef((n,e)=>{const t=de.c(9);let l,s;t[0]!==n?({className:l,...s}=n,t[0]=n,t[1]=l,t[2]=s):(l=t[1],s=t[2]);let o;t[3]!==l?(o=He("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",l),t[3]=l,t[4]=o):o=t[4];let i;return t[5]!==s||t[6]!==e||t[7]!==o?(i=r.jsx("ol",{ref:e,className:o,...s}),t[5]=s,t[6]=e,t[7]=o,t[8]=i):i=t[8],i});Ms.displayName="BreadcrumbList";const Vn=a.forwardRef((n,e)=>{const t=de.c(9);let l,s;t[0]!==n?({className:l,...s}=n,t[0]=n,t[1]=l,t[2]=s):(l=t[1],s=t[2]);let o;t[3]!==l?(o=He("inline-flex items-center gap-1.5",l),t[3]=l,t[4]=o):o=t[4];let i;return t[5]!==s||t[6]!==e||t[7]!==o?(i=r.jsx("li",{ref:e,className:o,...s}),t[5]=s,t[6]=e,t[7]=o,t[8]=i):i=t[8],i});Vn.displayName="BreadcrumbItem";const Zn=a.forwardRef((n,e)=>{const t=de.c(11);let l,s,o;t[0]!==n?({asChild:l,className:s,...o}=n,t[0]=n,t[1]=l,t[2]=s,t[3]=o):(l=t[1],s=t[2],o=t[3]);const i=l?Xs:"a";let c;t[4]!==s?(c=He("transition-colors hover:text-foreground cursor-pointer",s),t[4]=s,t[5]=c):c=t[5];let u;return t[6]!==i||t[7]!==o||t[8]!==e||t[9]!==c?(u=r.jsx(i,{ref:e,className:c,...o}),t[6]=i,t[7]=o,t[8]=e,t[9]=c,t[10]=u):u=t[10],u});Zn.displayName="BreadcrumbLink";const Jn=a.forwardRef((n,e)=>{const t=de.c(9);let l,s;t[0]!==n?({className:l,...s}=n,t[0]=n,t[1]=l,t[2]=s):(l=t[1],s=t[2]);let o;t[3]!==l?(o=He("font-medium text-foreground",l),t[3]=l,t[4]=o):o=t[4];let i;return t[5]!==s||t[6]!==e||t[7]!==o?(i=r.jsx("span",{ref:e,role:"link","aria-disabled":"true","aria-current":"page",className:o,...s}),t[5]=s,t[6]=e,t[7]=o,t[8]=i):i=t[8],i});Jn.displayName="BreadcrumbPage";const er=n=>{const e=de.c(12);let t,l,s;e[0]!==n?({children:t,className:l,...s}=n,e[0]=n,e[1]=t,e[2]=l,e[3]=s):(t=e[1],l=e[2],s=e[3]);let o;e[4]!==l?(o=He("[&>svg]:h-3.5 [&>svg]:w-3.5",l),e[4]=l,e[5]=o):o=e[5];let i;e[6]!==t?(i=t??r.jsx(Gs,{}),e[6]=t,e[7]=i):i=e[7];let c;return e[8]!==s||e[9]!==o||e[10]!==i?(c=r.jsx("li",{role:"presentation","aria-hidden":"true",className:o,...s,children:i}),e[8]=s,e[9]=o,e[10]=i,e[11]=c):c=e[11],c};er.displayName="BreadcrumbSeparator";var za=Object.defineProperty,In=(n,e)=>za(n,"name",{value:e,configurable:!0}),mr="Switch",[Ua,Si]=Hr(mr),[Ka,gr]=Ua(mr);function $s(n){const{__scopeSwitch:e,checked:t,children:l,defaultChecked:s,disabled:o,form:i,name:c,onCheckedChange:u,required:d,value:f="on",internal_do_not_use_render:h}=n,[p,m]=Zs({prop:t,defaultProp:s??!1,onChange:u,caller:mr}),[b,g]=a.useState(null),[E,y]=a.useState(null),[j,C]=a.useState(null),w=b?!!i||!!b.closest("form"):!0,k={checked:p,setChecked:m,disabled:o,control:b,setControl:g,name:c,form:i,value:f,userClick:j,onUserClick:C,required:d,defaultChecked:s,isFormControl:w,bubbleInput:E,setBubbleInput:y};return r.jsx(Ka,{scope:e,...k,children:Hs(h)?h(k):l})}In($s,"SwitchProvider");var Wa="SwitchTrigger",Va=a.forwardRef(In(function({__scopeSwitch:e,onClick:t,...l},s){const{control:o,form:i,value:c,disabled:u,checked:d,required:f,setControl:h,setChecked:p,onUserClick:m,isFormControl:b,bubbleInput:g}=gr(Wa,e),E=vn(s,h),y=a.useRef(d);return a.useEffect(()=>{const j=i?o==null?void 0:o.ownerDocument.getElementById(i):o==null?void 0:o.form;if(j instanceof HTMLFormElement){const C=In(()=>p(y.current),"reset");return j.addEventListener("reset",C),()=>j.removeEventListener("reset",C)}},[o,i,p]),r.jsx(Sn.button,{type:"button",role:"switch","aria-checked":d,"aria-required":f,"data-state":br(d),"data-disabled":u?"":void 0,disabled:u,value:c,...l,ref:E,onClick:wn(t,j=>{const C=j.isPropagationStopped();m({requestedChecked:!d,hasConsumerStoppedPropagation:C}),p(w=>!w),g&&b&&(C||j.stopPropagation())})})},"SwitchTrigger")),Os=a.forwardRef(In(function(e,t){const{__scopeSwitch:l,name:s,checked:o,defaultChecked:i,required:c,disabled:u,value:d,onCheckedChange:f,form:h,...p}=e;return r.jsx($s,{__scopeSwitch:l,checked:o,defaultChecked:i,disabled:u,required:c,onCheckedChange:f,name:s,form:h,value:d,internal_do_not_use_render:({isFormControl:m})=>r.jsxs(r.Fragment,{children:[r.jsx(Va,{...p,ref:t,__scopeSwitch:l}),m&&r.jsx(Qa,{__scopeSwitch:l})]})})},"Switch")),Ya="SwitchThumb",Xa=a.forwardRef(In(function(e,t){const{__scopeSwitch:l,...s}=e,o=gr(Ya,l);return r.jsx(Sn.span,{"data-state":br(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})},"SwitchThumb")),Ga="SwitchBubbleInput",Qa=a.forwardRef(In(function({__scopeSwitch:e,onClick:t,...l},s){const{control:o,userClick:i,checked:c,defaultChecked:u,required:d,disabled:f,name:h,value:p,form:m,bubbleInput:b,setBubbleInput:g}=gr(Ga,e),E=vn(s,g),y=Qs(o),j=a.useRef(!1),C=a.useRef(c),w=a.useRef(i),k=a.useRef(null);a.useEffect(()=>{const v=b;if(!v)return;const R=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(R,"checked").set;if(!I)return;const L=C.current!==c;C.current=c;const M=i!==null&&i!==w.current;if(w.current=i,M)k.current=L?null:i,L&&I.call(v,c),v.dispatchEvent(new Event("click",{bubbles:!i.hasConsumerStoppedPropagation}));else if(L){const K=k.current;k.current=null;const q=(K==null?void 0:K.requestedChecked)===c;j.current=!0,I.call(v,c),v.dispatchEvent(new Event("click",{bubbles:!(q&&K.hasConsumerStoppedPropagation)})),j.current=!1}},[b,c,i]);const N=a.useRef(c);return r.jsx(Sn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??N.current,required:d,disabled:f,name:h,value:p,form:m,...l,tabIndex:-1,ref:E,onClick:wn(t,v=>{j.current&&v.stopPropagation()}),style:{...l.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function Hs(n){return typeof n=="function"}In(Hs,"isFunction");function br(n){return n?"checked":"unchecked"}In(br,"getState");const Bs=a.forwardRef((n,e)=>{const t=de.c(10);let l,s;t[0]!==n?({className:l,...s}=n,t[0]=n,t[1]=l,t[2]=s):(l=t[1],s=t[2]);let o;t[3]!==l?(o=He("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",l),t[3]=l,t[4]=o):o=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(Xa,{className:He("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")}),t[5]=i):i=t[5];let c;return t[6]!==s||t[7]!==e||t[8]!==o?(c=r.jsx(Os,{className:o,...s,ref:e,children:i}),t[6]=s,t[7]=e,t[8]=o,t[9]=c):c=t[9],c});Bs.displayName=Os.displayName;const Za={"agent-disconnected":{title:"The agent disconnected — this session ended.",description:"Pick the Mac again to start a new session."},"busy-elsewhere":{title:"This device is already open in another browser session.",description:"Someone else may be testing it. If you reloaded while your connection was down it is your own tab, and that clears within about 45 seconds."},"mac-overloaded":{title:"That Mac is too busy to start a session.",description:"Pick a different Mac, or wait for it to settle."}};function ji(){const n=de.c(61),[e]=Kr(),t=yo();let l;n[0]!==e?(l=e.get("id"),n[0]=e,n[1]=l):l=n[1];const s=l,{build:o}=hl(s),i=Br(),c=(o==null?void 0:o.platform)??"ios",{sessions:u,activeFormFactor:d,selectedAgent:f,setSelectedAgent:h,activeSessionId:p,deviceId:m,booting:b,status:g,connected:E,agentGroups:y,startDevice:j,resetDevice:C,handleBack:w,handleBackToMacs:k,handleSessionEnded:N}=pl(c);let v;if(n[2]!==y||n[3]!==f){let H;n[5]!==f?(H=V=>V.agentName===f,n[5]=f,n[6]=H):H=n[6],v=y.find(H),n[2]=y,n[3]=f,n[4]=v}else v=n[4];const R=v,{osVersions:D,osVersion:I,setOsVersion:L,deviceSearch:M,setDeviceSearch:K,versionedDevices:q,resetMode:O,setResetMode:G,appliedResetMode:Z,consumeResetMode:J,fullResetSupported:$}=gl(R,c);let z;if(n[7]!==m||n[8]!==u){const H=u.flatMap(ei);let V;n[10]!==m?(V=ce=>ce.id===m,n[10]=m,n[11]=V):V=n[11],z=H.find(V),n[7]=m,n[8]=u,n[9]=z}else z=n[9];const ee=z,ue=ee?`${ee.name}${ee.osVersion?` · ${ee.osVersion}`:""}`:"";let ie;n[12]!==i?(ie=()=>{i.invalidateQueries({queryKey:tr.allRecordings})},n[12]=i,n[13]=ie):ie=n[13];const ye=ie;let re;n[14]!==J||n[15]!==j?(re=H=>{J(),j(H)},n[14]=J,n[15]=j,n[16]=re):re=n[16];const Y=re;let B;n[17]!==N?(B=H=>{const V=Za[H];It.error(V.title,{description:V.description}),N()},n[17]=N,n[18]=B):B=n[18];const te=B,{setNode:he}=Js();let X,fe;n[19]!==p||n[20]!==o||n[21]!==ue||n[22]!==w||n[23]!==k||n[24]!==t||n[25]!==f||n[26]!==he?(X=()=>{if(o)return he(r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(Ds,{children:r.jsxs(Ms,{children:[r.jsx(Vn,{children:r.jsx(Zn,{asChild:!0,children:r.jsx("button",{onClick:()=>t(`/app-center?appId=${o.app_id}`),children:o.name})})}),r.jsx(er,{}),r.jsx(Vn,{children:f?r.jsx(Zn,{asChild:!0,children:r.jsx("button",{onClick:k,children:Cr(o)})}):r.jsx(Jn,{children:Cr(o)})}),f&&r.jsxs(r.Fragment,{children:[r.jsx(er,{}),r.jsx(Vn,{children:p?r.jsx(Zn,{asChild:!0,children:r.jsx("button",{onClick:w,children:f})}):r.jsx(Jn,{children:f})})]}),p&&r.jsxs(r.Fragment,{children:[r.jsx(er,{}),r.jsx(Vn,{children:r.jsx(Jn,{children:ue})})]})]})}),!f&&o.status_label&&r.jsx(Vo,{tone:Xo[o.status_label],children:o.status_label})]})),()=>he(null)},fe=[o,f,p,ue,t,w,k,he],n[19]=p,n[20]=o,n[21]=ue,n[22]=w,n[23]=k,n[24]=t,n[25]=f,n[26]=he,n[27]=X,n[28]=fe):(X=n[27],fe=n[28]),a.useEffect(X,fe);let se;n[29]!==d||n[30]!==p||n[31]!==y||n[32]!==Z||n[33]!==b||n[34]!==(o==null?void 0:o.id)||n[35]!==E||n[36]!==m||n[37]!==M||n[38]!==$||n[39]!==ye||n[40]!==Y||n[41]!==te||n[42]!==c||n[43]!==I||n[44]!==D||n[45]!==C||n[46]!==O||n[47]!==f||n[48]!==(ee==null?void 0:ee.formFactor)||n[49]!==K||n[50]!==L||n[51]!==G||n[52]!==h||n[53]!==g||n[54]!==q?(se=r.jsx("div",{className:"flex flex-col gap-3 flex-1 min-w-0 min-h-0",children:r.jsx("div",{className:"flex-1 min-h-0 overflow-auto -ml-1 pl-1 -mr-4 pr-4",children:p?r.jsx("div",{className:"min-h-full flex items-center justify-center py-6 px-8 min-w-max",children:r.jsx(ha,{sessionId:p,deviceId:m,formFactor:(ee==null?void 0:ee.formFactor)??d,platform:c,buildId:o==null?void 0:o.id,resetMode:Z,onRecordingUploaded:ye,onSessionEnded:te})}):f?r.jsxs("div",{className:"flex flex-col gap-5",children:[r.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Select device"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx($o,{"aria-label":"Search devices",placeholder:"Search device…",value:M,onChange:K}),D.length>0&&r.jsxs(zo,{value:I||"__all__",onValueChange:H=>{L(H==="__all__"?"":H),C()},children:[r.jsx(Uo,{className:"h-8 w-36 shrink-0","aria-label":"Filter by OS version",children:r.jsx(Ko,{})}),r.jsxs(Wo,{children:[r.jsx(Zr,{value:"__all__",children:"Any version"}),D.map(Ja)]})]}),$&&r.jsx(or,{children:r.jsxs(Nt,{children:[r.jsx(Tt,{asChild:!0,children:r.jsxs("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:[r.jsx(eo,{htmlFor:"reset-mode",className:"text-sm cursor-pointer whitespace-nowrap",children:"Full reset"}),r.jsx("span",{id:"reset-mode-desc",className:"sr-only",children:"When on, erases all data on the next device you pick"}),r.jsx(Bs,{id:"reset-mode","aria-describedby":"reset-mode-desc",checked:O==="full-erase",onCheckedChange:H=>G(H?"full-erase":"app-only")})]})}),r.jsx(Et,{children:O==="full-erase"?"Erase all data on the next device you pick":"Keep existing data"})]})})]}),q.length===0?r.jsx("p",{className:"text-sm text-muted-foreground",children:E?"No devices available for this OS.":"Connecting to relay…"}):r.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-2",children:q.map(H=>{const V=H.status==="booted",ce=H.busy,_e=ce?H.holder?`${Io(H.holder.kind)} is driving it`:"In use":V?"Booted":"Available",ve=ce?"bg-amber-400":V?"bg-emerald-400":"bg-muted-foreground/40";return r.jsxs("button",{disabled:ce||b||!E,onClick:()=>Y(H),className:He("flex flex-col gap-3 rounded-lg border p-3 text-left transition-colors min-h-[100px]","hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"),children:[r.jsx("span",{className:"text-sm font-medium leading-tight",children:H.name}),H.osVersion&&r.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:H.osVersion}),r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[r.jsx("span",{className:He("inline-block h-1.5 w-1.5 rounded-full",ve)}),_e]})]},H.id)})}),g&&r.jsx("p",{className:"text-sm text-muted-foreground",children:g})]}):r.jsxs("div",{className:"flex flex-col gap-5",children:[r.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Select Mac"}),y.length===0?r.jsx("p",{className:"text-sm text-muted-foreground",children:E?`No agents available for ${Yo[c]}.`:"Connecting to relay…"}):r.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-2",children:y.map(H=>{const V=H.resources,ce=V?Date.now()-V.reportedAt>Go:!1,_e=H.devices.filter(ke=>ke.platform===c).length,ve=(V==null?void 0:V.cpuPercent)??0,Ne=V?V.memUsedMB/V.memTotalMB*100:0,Ee=Qo(V,ce),ae=Ee==="overloaded";return r.jsx(or,{children:r.jsxs(Nt,{children:[r.jsx(Tt,{asChild:!0,children:r.jsx("span",{tabIndex:ae?0:void 0,className:ae?"cursor-not-allowed":void 0,children:r.jsxs("button",{disabled:ae,"aria-disabled":ae,onClick:()=>h(H.agentName??null),className:He("flex flex-col gap-3 rounded-lg border p-3 text-left transition-colors min-h-[100px] w-full",ae?"pointer-events-none":"hover:bg-accent"),children:[r.jsxs("div",{className:"flex items-start justify-between gap-2",children:[r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx(ti,{health:Ee}),r.jsx("span",{className:"text-sm font-medium leading-tight truncate",children:H.agentName??"Unknown"})]}),ce&&r.jsx("span",{className:"shrink-0 text-[10px] font-medium text-amber-500",children:"Stale"})]}),r.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[r.jsxs("span",{children:[_e," device",_e!==1?"s":""]}),V&&r.jsxs(r.Fragment,{children:[r.jsx("span",{children:"·"}),r.jsxs("span",{children:[V.slotsAvailable,"/",V.slotsTotal," slots"]})]})]}),V&&!ce&&r.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[r.jsx($r,{label:"CPU",percent:ve,colorClass:"bg-blue-400"}),r.jsx($r,{label:"RAM",percent:Ne,colorClass:"bg-violet-400"})]})]})})}),ae&&r.jsx(Et,{children:"This Mac is currently overloaded. Try again later."})]})},H.agentName)})})]})})}),n[29]=d,n[30]=p,n[31]=y,n[32]=Z,n[33]=b,n[34]=o==null?void 0:o.id,n[35]=E,n[36]=m,n[37]=M,n[38]=$,n[39]=ye,n[40]=Y,n[41]=te,n[42]=c,n[43]=I,n[44]=D,n[45]=C,n[46]=O,n[47]=f,n[48]=ee==null?void 0:ee.formFactor,n[49]=K,n[50]=L,n[51]=G,n[52]=h,n[53]=g,n[54]=q,n[55]=se):se=n[55];let pe;n[56]!==s?(pe=s&&r.jsxs(r.Fragment,{children:[r.jsx(Or,{orientation:"vertical",className:"h-auto"}),r.jsx("div",{className:"w-80 shrink-0 h-full",children:r.jsx(qa,{buildId:Number(s)})})]}),n[56]=s,n[57]=pe):pe=n[57];let Be;return n[58]!==se||n[59]!==pe?(Be=r.jsxs("div",{className:"flex h-full min-h-0 gap-6 p-6",children:[se,pe]}),n[58]=se,n[59]=pe,n[60]=Be):Be=n[60],Be}function Ja(n){return r.jsx(Zr,{value:n,children:n},n)}function ei(n){return n.devices}function ti(n){const e=de.c(6),{health:t}=n;let l,s;if(e[0]!==t){const i={unknown:"bg-muted-foreground/40",healthy:"bg-emerald-400",warning:"bg-amber-400",overloaded:"bg-red-500"}[t];l="resource-health-dot",s=He("inline-block h-2 w-2 shrink-0 rounded-full",i),e[0]=t,e[1]=l,e[2]=s}else l=e[1],s=e[2];let o;return e[3]!==l||e[4]!==s?(o=r.jsx("span",{"data-testid":l,className:s}),e[3]=l,e[4]=s,e[5]=o):o=e[5],o}function $r(n){const e=de.c(19),{label:t,percent:l,colorClass:s}=n;let o;e[0]!==t?(o=r.jsx("span",{children:t}),e[0]=t,e[1]=o):o=e[1];let i;e[2]!==l?(i=l.toFixed(0),e[2]=l,e[3]=i):i=e[3];let c;e[4]!==i?(c=r.jsxs("span",{children:[i,"%"]}),e[4]=i,e[5]=c):c=e[5];let u;e[6]!==o||e[7]!==c?(u=r.jsxs("div",{className:"flex justify-between text-[10px] text-muted-foreground",children:[o,c]}),e[6]=o,e[7]=c,e[8]=u):u=e[8];let d;e[9]!==s?(d=He("h-full rounded-full transition-all",s),e[9]=s,e[10]=d):d=e[10];const f=`${Math.min(100,l)}%`;let h;e[11]!==f?(h={width:f},e[11]=f,e[12]=h):h=e[12];let p;e[13]!==d||e[14]!==h?(p=r.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:r.jsx("div",{className:d,style:h})}),e[13]=d,e[14]=h,e[15]=p):p=e[15];let m;return e[16]!==u||e[17]!==p?(m=r.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,p]}),e[16]=u,e[17]=p,e[18]=m):m=e[18],m}export{ji as QASession};
@@ -1,6 +0,0 @@
1
- import{c as he,r as Q,j as s}from"./vendor-react-DTSdA8m-.js";import{G as Ke,aj as Oe,c as Ue,O as qe,q as Ge,ak as Ve,$ as We,B as Ee,al as ze}from"./index-cgl1yEKu.js";import{B as Be}from"./badge-D-bt97WR.js";import{S as He}from"./search-input-CFWgLcKA.js";import{T as Ce}from"./tech-label-qLodPeUI.js";import{a as Me,T as me,c as Qe}from"./tabs-CmgV_sSI.js";import{S as Xe,a as Je,b as Ye,c as De,d as Ze}from"./select-5ZtzWRYG.js";import{l as et,T as tt,a as st,b as z,c as lt,d as Fe,e as H,L as at}from"./list-view-BcjDCJy5.js";import{u as rt}from"./useFocusAfterSwap-BdItkQCu.js";import{r as $e,f as nt,a as Re,b as ot,c as it,R as ct,p as ut}from"./runs-CInQb6v1.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
- * @license lucide-react v1.58.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const ke={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};ke.node;const ht=Ke(ke),xt=300,Ae=["running","passed","failed","aborted"],Le="newest";function Ft(){var pe,ge,je,we,Se,ve,Ne,Te,ye,Pe;const e=he.c(89),[t,l]=dt();let c;e[0]!==t?(c=["ci","local","all"].find(r=>r===t.get("source"))??"ci",e[0]=t,e[1]=c):c=e[1];const o=c;let x;e[2]!==t?(x=r=>r===t.get("status"),e[2]=t,e[3]=x):x=e[3];const u=Ae.find(x);let h;e[4]!==t?(h=t.get("build"),e[4]=t,e[5]=h):h=e[5];const b=Number(h);let g;e[6]!==b?(g=Number.isInteger(b)&&b>0?b:void 0,e[6]=b,e[7]=g):g=e[7];const d=g;let _;e[8]!==t?(_=t.get("flow")??"",e[8]=t,e[9]=_):_=e[9];const i=_,T=t.get("after")?{after:t.get("after")}:t.get("before")?{before:t.get("before")}:{},{setNode:p}=Oe();let j,w;e[10]!==p?(j=()=>(p(s.jsx("span",{className:"text-sm font-medium",children:"Flow Runs"})),()=>p(null)),w=[p],e[10]=p,e[11]=j,e[12]=w):(j=e[11],w=e[12]),Q.useEffect(j,w);let S;e[13]!==l?(S=function(N,C){l(Ie=>oe(Ie,N,C),{replace:!0})},e[13]=l,e[14]=S):S=e[14];const f=S,[m,v]=Q.useState(i),[y,E]=Q.useState(i);i!==y&&(E(i),i!==m.trim()&&v(i));let P,R;e[15]!==i||e[16]!==m||e[17]!==l?(P=()=>{const r=m.trim();if(r===i)return;const N=setTimeout(()=>l(C=>oe(C,"flow",r||null),{replace:!0}),xt);return()=>clearTimeout(N)},R=[m,i,l],e[15]=i,e[16]=m,e[17]=l,e[18]=P,e[19]=R):(P=e[18],R=e[19]),Q.useEffect(P,R);const xe={...o==="all"?{}:{ci:o==="ci"},...u?{status:u}:{},...i?{flow:i}:{},...d!==void 0?{build:d}:{}},ie=Ge.runs({...xe,...T}),ce=r=>{const{signal:N}=r;return Ve(xe,T,N)};let X;e[20]!==ie||e[21]!==ce?(X={queryKey:ie,queryFn:ce,placeholderData:We,refetchInterval:gt},e[20]=ie,e[21]=ce,e[22]=X):X=e[22];const a=Ue(X),n=(pe=a.data)==null?void 0:pe.items,A=!!(T.before||T.after),ue=a.isFetchedAfterMount&&(a.isPlaceholderData||a.isLoading);let J;e[23]!==ue||e[24]!==n||e[25]!==a.isLoadingError?(J=ue?"error":et({data:n,isError:a.isLoadingError}),e[23]=ue,e[24]=n,e[25]=a.isLoadingError,e[26]=J):J=e[26];const L=J,be=Q.useRef(null),de=rt(L,be);let Y;e[27]!==l?(Y=function(N){l(C=>oe(oe(C,"before",N.before??null),"after",N.after??null))},e[27]=l,e[28]=Y):Y=e[28];const Z=Y;let ee;if(e[29]!==d||e[30]!==n){const r=d===void 0||(ge=n==null?void 0:n.find(N=>{var C;return((C=N.build)==null?void 0:C.id)===d}))==null?void 0:ge.build;ee=d===void 0?null:r?$e(r):`build ${d}`,e[29]=d,e[30]=n,e[31]=ee}else ee=e[31];const M=ee;let te;e[32]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Flow Runs"}),e[32]=te):te=e[32];let B;e[33]!==f?(B=r=>f("source",r==="ci"?null:r),e[33]=f,e[34]=B):B=e[34];let se;e[35]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsxs(Me,{"aria-label":"Where the run came from",children:[s.jsx(me,{ref:be,value:"all",children:"All"}),s.jsx(me,{value:"ci",children:"CI"}),s.jsx(me,{value:"local",children:"Local"})]}),e[35]=se):se=e[35];let D;e[36]!==o||e[37]!==B?(D=s.jsx(Qe,{value:o,onValueChange:B,children:se}),e[36]=o,e[37]=B,e[38]=D):D=e[38];const fe=u??"any";let F;e[39]!==f?(F=r=>f("status",r==="any"?null:r),e[39]=f,e[40]=F):F=e[40];let le;e[41]===Symbol.for("react.memo_cache_sentinel")?(le=s.jsx(Xe,{className:"h-8 w-36","aria-label":"Status",children:s.jsx(Je,{})}),e[41]=le):le=e[41];let ae;e[42]===Symbol.for("react.memo_cache_sentinel")?(ae=s.jsxs(Ye,{children:[s.jsx(De,{value:"any",children:"Any status"}),Ae.map(pt)]}),e[42]=ae):ae=e[42];let $;e[43]!==fe||e[44]!==F?($=s.jsxs(Ze,{value:fe,onValueChange:F,children:[le,ae]}),e[43]=fe,e[44]=F,e[45]=$):$=e[45];let k;e[46]!==m||e[47]!==v?(k=s.jsx(He,{value:m,onChange:v,placeholder:"Flow name","aria-label":"Flow name"}),e[46]=m,e[47]=v,e[48]=k):k=e[48];let I;e[49]!==M||e[50]!==f?(I=M&&s.jsxs(Be,{variant:"outline",className:"gap-1 pr-1 text-xs font-normal",children:[M,s.jsx(Ee,{variant:"ghost",size:"icon-sm",className:"h-5 w-5","aria-label":`Show runs of every build, not only ${M}`,onClick:()=>f("build",null),children:s.jsx(ze,{className:"h-3 w-3","aria-hidden":!0})})]}),e[49]=M,e[50]=f,e[51]=I):I=e[51];let K;e[52]!==D||e[53]!==$||e[54]!==k||e[55]!==I?(K=s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[D,$,k,I]}),e[52]=D,e[53]=$,e[54]=k,e[55]=I,e[56]=K):K=e[56];let re;e[57]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(lt,{children:s.jsxs(Fe,{children:[s.jsx(H,{children:"Status"}),s.jsx(H,{children:"Build"}),s.jsx(H,{children:"Flows passed"}),s.jsx(H,{children:"Source"}),s.jsx(H,{children:"Started"}),s.jsx(H,{children:"Duration"})]})}),e[57]=re):re=e[57];let O;e[58]!==d||e[59]!==i||e[60]!==A||e[61]!==o||e[62]!==u?(O=A?"No runs on this page any more. Newer goes back to the newest runs.":wt(o,!!(u||i||d!==void 0)),e[58]=d,e[59]=i,e[60]=A,e[61]=o,e[62]=u,e[63]=O):O=e[63];let U;e[64]!==a?(U=()=>void a.refetch(),e[64]=a,e[65]=U):U=e[65];let q;e[66]!==O||e[67]!==U||e[68]!==L?(q=s.jsx(at,{view:L,colSpan:6,noun:"flow runs",emptyText:O,onRetry:U}),e[66]=O,e[67]=U,e[68]=L,e[69]=q):q=e[69];let G;e[70]!==n||e[71]!==L?(G=L==="list"&&(n==null?void 0:n.map(bt)),e[70]=n,e[71]=L,e[72]=G):G=e[72];let V;e[73]!==de||e[74]!==a.isPlaceholderData||e[75]!==q||e[76]!==G?(V=s.jsx("div",{className:"rounded-md border bg-card",children:s.jsxs(tt,{children:[re,s.jsxs(st,{...de,"aria-busy":a.isPlaceholderData,children:[q,G]})]})}),e[73]=de,e[74]=a.isPlaceholderData,e[75]=q,e[76]=G,e[77]=V):V=e[77];let W;e[78]!==Z||e[79]!==A||e[80]!==(n==null?void 0:n.length)||e[81]!==((je=a.data)==null?void 0:je.nextCursor)||e[82]!==((we=a.data)==null?void 0:we.prevCursor)||e[83]!==a.isPlaceholderData?(W=(A||((Se=a.data)==null?void 0:Se.prevCursor)||((ve=a.data)==null?void 0:ve.nextCursor))&&s.jsxs("nav",{"aria-label":"Pages of flow runs",className:"flex items-center justify-end gap-2",children:[s.jsxs(_e,{cursor:a.isPlaceholderData?null:((Ne=a.data)==null?void 0:Ne.prevCursor)??(A&&!(n!=null&&n.length)?Le:null),onGo:r=>Z(r===Le?{}:{after:r}),children:[s.jsx(ht,{className:"mr-1 h-3.5 w-3.5","aria-hidden":!0}),"Newer"]}),s.jsxs(_e,{cursor:a.isPlaceholderData?null:((Te=a.data)==null?void 0:Te.nextCursor)??null,onGo:r=>Z({before:r}),children:["Older",s.jsx(qe,{className:"ml-1 h-3.5 w-3.5","aria-hidden":!0})]})]}),e[78]=Z,e[79]=A,e[80]=n==null?void 0:n.length,e[81]=(ye=a.data)==null?void 0:ye.nextCursor,e[82]=(Pe=a.data)==null?void 0:Pe.prevCursor,e[83]=a.isPlaceholderData,e[84]=W):W=e[84];let ne;return e[85]!==K||e[86]!==V||e[87]!==W?(ne=s.jsxs("div",{className:"flex flex-col gap-5 p-6",children:[te,K,V,W]}),e[85]=K,e[86]=V,e[87]=W,e[88]=ne):ne=e[88],ne}function bt(e){return s.jsx(St,{run:e},e.id)}function pt(e){return s.jsx(De,{value:e,children:ct[e]},e)}function gt(e){var t;return ut((t=e.state.data)==null?void 0:t.items.map(jt))}function jt(e){return e.status}function oe(e,t,l){const c=new URLSearchParams(e);return t!=="before"&&t!=="after"&&(c.delete("before"),c.delete("after")),l===null?c.delete(t):c.set(t,l),c}function _e(e){const t=he.c(7),{cursor:l,onGo:c,children:o}=e,x=l===null;let u;t[0]!==l||t[1]!==c?(u=()=>{l!==null&&c(l)},t[0]=l,t[1]=c,t[2]=u):u=t[2];let h;return t[3]!==o||t[4]!==x||t[5]!==u?(h=s.jsx(Ee,{variant:"outline",size:"sm",className:"aria-disabled:opacity-50","aria-disabled":x,onClick:u,children:o}),t[3]=o,t[4]=x,t[5]=u,t[6]=h):h=t[6],h}function wt(e,t){return t?"No runs match these filters.":e==="ci"?"No CI runs yet. A run is recorded when tapflow flow run has a token.":e==="local"?"No local runs yet.":"No runs yet. A run is recorded when tapflow flow run has a token."}function St(e){const t=he.c(40),{run:l}=e,c=ft(),o=`/automation/runs/${l.id}`;let x;t[0]!==l.build?(x=$e(l.build),t[0]=l.build,t[1]=x):x=t[1];const u=x;let h;t[2]!==l.failureKind||t[3]!==l.status?(h=nt(l.status,l.failureKind),t[2]=l.failureKind,t[3]=l.status,t[4]=h):h=t[4];const b=h;let g;t[5]!==o||t[6]!==c?(g=P=>{var R;P.target.closest('a, button, input, [role="button"]')||(R=window.getSelection())!=null&&R.toString()||(P.metaKey||P.ctrlKey?window.open(o,"_blank","noopener"):c(o))},t[5]=o,t[6]=c,t[7]=g):g=t[7];let d;t[8]!==b.label||t[9]!==b.tone?(d=s.jsx(z,{children:s.jsx(Be,{tone:b.tone,className:"text-xs",children:b.label})}),t[8]=b.label,t[9]=b.tone,t[10]=d):d=t[10];const _=b.label;let i;t[11]!==l.createdAt?(i=Re(l.createdAt),t[11]=l.createdAt,t[12]=i):i=t[12];const T=`${u}, ${_}, ${i}`;let p;t[13]!==u||t[14]!==o||t[15]!==T?(p=s.jsx(z,{className:"text-sm",children:s.jsx(mt,{to:o,className:"rounded-sm font-medium underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":T,children:u})}),t[13]=u,t[14]=o,t[15]=T,t[16]=p):p=t[16];let j;t[17]!==l.flowsPassed||t[18]!==l.flowsTotal?(j=s.jsx(z,{children:s.jsxs(Ce,{children:[l.flowsPassed,"/",l.flowsTotal]})}),t[17]=l.flowsPassed,t[18]=l.flowsTotal,t[19]=j):j=t[19];let w;t[20]!==l?(w=ot(l),t[20]=l,t[21]=w):w=t[21];let S;t[22]!==w?(S=s.jsx(z,{className:"text-sm text-muted-foreground",children:w}),t[22]=w,t[23]=S):S=t[23];let f;t[24]!==l.createdAt?(f=Re(l.createdAt),t[24]=l.createdAt,t[25]=f):f=t[25];let m;t[26]!==f?(m=s.jsx(z,{className:"text-sm text-muted-foreground",children:f}),t[26]=f,t[27]=m):m=t[27];let v;t[28]!==l?(v=it(l),t[28]=l,t[29]=v):v=t[29];let y;t[30]!==v?(y=s.jsx(z,{children:s.jsx(Ce,{children:v})}),t[30]=v,t[31]=y):y=t[31];let E;return t[32]!==S||t[33]!==m||t[34]!==y||t[35]!==g||t[36]!==d||t[37]!==p||t[38]!==j?(E=s.jsxs(Fe,{className:"cursor-pointer",onClick:g,children:[d,p,j,S,m,y]}),t[32]=S,t[33]=m,t[34]=y,t[35]=g,t[36]=d,t[37]=p,t[38]=j,t[39]=E):E=t[39],E}export{Ft as Runs};
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- t`�ø�[Eć�6]ӹw�(q�b˒�#�>{��v�W���۪%A5Y����Zٌ`#�&��E��*\^��ț��4t��W����_�P����ͺ�����2�'ډ��E�/��l�v��=i�?��Q��� Q�dw�����l���ͼᏼ��c1�" �r�\y�d��^��#�l�w�՜o�P��LF���'�����<>��*_4�~���9<��!�v��EMg+v�b����W���9��x��^�~1