@tapflowio/relay 0.29.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/dist/RelayServer.d.ts +6 -0
  2. package/dist/RelayServer.d.ts.map +1 -1
  3. package/dist/RelayServer.js +48 -3
  4. package/dist/RelayServer.js.map +1 -1
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/lib/config.d.ts +14 -0
  10. package/dist/lib/config.d.ts.map +1 -1
  11. package/dist/lib/config.js +98 -0
  12. package/dist/lib/config.js.map +1 -1
  13. package/dist/lib/launchDefaults.d.ts +25 -0
  14. package/dist/lib/launchDefaults.d.ts.map +1 -0
  15. package/dist/lib/launchDefaults.js +41 -0
  16. package/dist/lib/launchDefaults.js.map +1 -0
  17. package/dist/server.js +2 -2
  18. package/dist/server.js.map +1 -1
  19. package/package.json +4 -4
  20. package/public/assets/{AISessionWatch-BSBkpTom.js → AISessionWatch-DMfOAt_U.js} +7 -7
  21. package/public/assets/AISessionWatch-DMfOAt_U.js.br +0 -0
  22. package/public/assets/AISessionWatch-DMfOAt_U.js.gz +0 -0
  23. package/public/assets/AndroidDeviceScreen-1RaPu10r.js +35 -0
  24. package/public/assets/AndroidDeviceScreen-1RaPu10r.js.br +0 -0
  25. package/public/assets/AndroidDeviceScreen-1RaPu10r.js.gz +0 -0
  26. package/public/assets/{AppCenter-DD_6LQx-.js → AppCenter-BWgstOJH.js} +6 -6
  27. package/public/assets/AppCenter-BWgstOJH.js.br +0 -0
  28. package/public/assets/AppCenter-BWgstOJH.js.gz +0 -0
  29. package/public/assets/{Default-CQ3Ae2mK.js → Default-Obywi6hR.js} +1 -1
  30. package/public/assets/Default-Obywi6hR.js.br +0 -0
  31. package/public/assets/Default-Obywi6hR.js.gz +0 -0
  32. package/public/assets/{Invite-D1uNMm0-.js → Invite-BVRKLYJu.js} +1 -1
  33. package/public/assets/Invite-BVRKLYJu.js.br +0 -0
  34. package/public/assets/Invite-BVRKLYJu.js.gz +0 -0
  35. package/public/assets/{MacResources-D2UeRbKL.js → MacResources-B6_Es8ye.js} +1 -1
  36. package/public/assets/MacResources-B6_Es8ye.js.br +0 -0
  37. package/public/assets/MacResources-B6_Es8ye.js.gz +0 -0
  38. package/public/assets/QASession-BuQdx-pq.js +81 -0
  39. package/public/assets/QASession-BuQdx-pq.js.br +0 -0
  40. package/public/assets/QASession-BuQdx-pq.js.gz +0 -0
  41. package/public/assets/{ResetPassword-B-4Uyfwr.js → ResetPassword-DU97TnMC.js} +1 -1
  42. package/public/assets/ResetPassword-DU97TnMC.js.br +0 -0
  43. package/public/assets/ResetPassword-DU97TnMC.js.gz +0 -0
  44. package/public/assets/{RunDetail-C50RjsuM.js → RunDetail-BspFUFg2.js} +4 -4
  45. package/public/assets/RunDetail-BspFUFg2.js.br +0 -0
  46. package/public/assets/RunDetail-BspFUFg2.js.gz +0 -0
  47. package/public/assets/{Runs-A7RcDLgO.js → Runs-BdCnN_dH.js} +2 -2
  48. package/public/assets/Runs-BdCnN_dH.js.br +0 -0
  49. package/public/assets/Runs-BdCnN_dH.js.gz +0 -0
  50. package/public/assets/{Setup-DK6TZbwh.js → Setup-D4DsciMG.js} +1 -1
  51. package/public/assets/Setup-D4DsciMG.js.br +0 -0
  52. package/public/assets/Setup-D4DsciMG.js.gz +0 -0
  53. package/public/assets/{Team-VoGput2p.js → Team-B2Txvi0a.js} +2 -2
  54. package/public/assets/Team-B2Txvi0a.js.br +0 -0
  55. package/public/assets/Team-B2Txvi0a.js.gz +0 -0
  56. package/public/assets/{Tokens-qkcJgunR.js → Tokens-D-ekP8kU.js} +1 -1
  57. package/public/assets/Tokens-D-ekP8kU.js.br +0 -0
  58. package/public/assets/Tokens-D-ekP8kU.js.gz +0 -0
  59. package/public/assets/WatchedDevice-D-SfDxp8.js +1 -0
  60. package/public/assets/WatchedDevice-D-SfDxp8.js.br +0 -0
  61. package/public/assets/WatchedDevice-D-SfDxp8.js.gz +0 -0
  62. package/public/assets/{aiSession-U7UqgdSb.js → aiSession-p7Uu2swu.js} +6 -6
  63. package/public/assets/aiSession-p7Uu2swu.js.br +0 -0
  64. package/public/assets/aiSession-p7Uu2swu.js.gz +0 -0
  65. package/public/assets/{alert-dialog-C0mRms8g.js → alert-dialog-DPNbpxqG.js} +1 -1
  66. package/public/assets/alert-dialog-DPNbpxqG.js.br +0 -0
  67. package/public/assets/alert-dialog-DPNbpxqG.js.gz +0 -0
  68. package/public/assets/{badge-BjEnOmb0.js → badge-Bjwwchrt.js} +1 -1
  69. package/public/assets/badge-Bjwwchrt.js.br +0 -0
  70. package/public/assets/badge-Bjwwchrt.js.gz +0 -0
  71. package/public/assets/{dialog-Cugbp1C4.js → dialog-CrzZQwxn.js} +1 -1
  72. package/public/assets/dialog-CrzZQwxn.js.br +0 -0
  73. package/public/assets/dialog-CrzZQwxn.js.gz +0 -0
  74. package/public/assets/{field-hint-qmBa0qqN.js → field-hint-CIJmSABE.js} +1 -1
  75. package/public/assets/field-hint-CIJmSABE.js.br +2 -0
  76. package/public/assets/field-hint-CIJmSABE.js.gz +0 -0
  77. package/public/assets/index-CiJwpDAf.js +248 -0
  78. package/public/assets/index-CiJwpDAf.js.br +0 -0
  79. package/public/assets/index-CiJwpDAf.js.gz +0 -0
  80. package/public/assets/index-DKKkUgNI.css +1 -0
  81. package/public/assets/index-DKKkUgNI.css.br +0 -0
  82. package/public/assets/index-DKKkUgNI.css.gz +0 -0
  83. package/public/assets/{list-view-CyM0QUaH.js → list-view-DpnCsTM-.js} +1 -1
  84. package/public/assets/list-view-DpnCsTM-.js.br +0 -0
  85. package/public/assets/list-view-DpnCsTM-.js.gz +0 -0
  86. package/public/assets/{pencil-DUZRZB3S.js → pencil-CE5LnE8i.js} +2 -2
  87. package/public/assets/pencil-CE5LnE8i.js.br +0 -0
  88. package/public/assets/pencil-CE5LnE8i.js.gz +0 -0
  89. package/public/assets/{play-Z1L2Eb91.js → play-BR_CdQzZ.js} +2 -2
  90. package/public/assets/play-BR_CdQzZ.js.br +0 -0
  91. package/public/assets/play-BR_CdQzZ.js.gz +0 -0
  92. package/public/assets/{search-input-B0s9mzRt.js → search-input-2MuvmbBR.js} +2 -2
  93. package/public/assets/search-input-2MuvmbBR.js.br +0 -0
  94. package/public/assets/search-input-2MuvmbBR.js.gz +0 -0
  95. package/public/assets/{select-CHbE6M4S.js → select-7EkQtxVy.js} +3 -3
  96. package/public/assets/select-7EkQtxVy.js.br +0 -0
  97. package/public/assets/select-7EkQtxVy.js.gz +0 -0
  98. package/public/assets/{slider-tyb3JvL2.js → slider-ifEFgQFt.js} +1 -1
  99. package/public/assets/slider-ifEFgQFt.js.br +0 -0
  100. package/public/assets/slider-ifEFgQFt.js.gz +0 -0
  101. package/public/assets/{tabs-Bf7ou-eS.js → tabs-SLpwFQLx.js} +1 -1
  102. package/public/assets/tabs-SLpwFQLx.js.br +0 -0
  103. package/public/assets/tabs-SLpwFQLx.js.gz +0 -0
  104. package/public/assets/{tech-label-KAwM5qZ_.js → tech-label-DpVGqU2Y.js} +1 -1
  105. package/public/assets/tech-label-DpVGqU2Y.js.br +0 -0
  106. package/public/assets/tech-label-DpVGqU2Y.js.gz +0 -0
  107. package/public/assets/{trash-HEJmY7DQ.js → trash-DFsQhdZ1.js} +3 -3
  108. package/public/assets/trash-DFsQhdZ1.js.br +0 -0
  109. package/public/assets/trash-DFsQhdZ1.js.gz +0 -0
  110. package/public/assets/{video-DdHH0Q0l.js → video-D1ajuM3p.js} +2 -2
  111. package/public/assets/video-D1ajuM3p.js.br +0 -0
  112. package/public/assets/video-D1ajuM3p.js.gz +0 -0
  113. package/public/index.html +2 -2
  114. package/public/index.html.br +0 -0
  115. package/public/index.html.gz +0 -0
  116. package/public/assets/AISessionWatch-BSBkpTom.js.br +0 -0
  117. package/public/assets/AISessionWatch-BSBkpTom.js.gz +0 -0
  118. package/public/assets/AndroidDeviceScreen-C55msKfh.js +0 -35
  119. package/public/assets/AndroidDeviceScreen-C55msKfh.js.br +0 -0
  120. package/public/assets/AndroidDeviceScreen-C55msKfh.js.gz +0 -0
  121. package/public/assets/AppCenter-DD_6LQx-.js.br +0 -0
  122. package/public/assets/AppCenter-DD_6LQx-.js.gz +0 -0
  123. package/public/assets/Default-CQ3Ae2mK.js.br +0 -0
  124. package/public/assets/Default-CQ3Ae2mK.js.gz +0 -0
  125. package/public/assets/Invite-D1uNMm0-.js.br +0 -0
  126. package/public/assets/Invite-D1uNMm0-.js.gz +0 -0
  127. package/public/assets/MacResources-D2UeRbKL.js.br +0 -0
  128. package/public/assets/MacResources-D2UeRbKL.js.gz +0 -0
  129. package/public/assets/QASession-d0eOjXXo.js +0 -81
  130. package/public/assets/QASession-d0eOjXXo.js.br +0 -0
  131. package/public/assets/QASession-d0eOjXXo.js.gz +0 -0
  132. package/public/assets/ResetPassword-B-4Uyfwr.js.br +0 -0
  133. package/public/assets/ResetPassword-B-4Uyfwr.js.gz +0 -0
  134. package/public/assets/RunDetail-C50RjsuM.js.br +0 -0
  135. package/public/assets/RunDetail-C50RjsuM.js.gz +0 -0
  136. package/public/assets/Runs-A7RcDLgO.js.br +0 -0
  137. package/public/assets/Runs-A7RcDLgO.js.gz +0 -0
  138. package/public/assets/Setup-DK6TZbwh.js.br +0 -0
  139. package/public/assets/Setup-DK6TZbwh.js.gz +0 -0
  140. package/public/assets/Team-VoGput2p.js.br +0 -0
  141. package/public/assets/Team-VoGput2p.js.gz +0 -0
  142. package/public/assets/Tokens-qkcJgunR.js.br +0 -0
  143. package/public/assets/Tokens-qkcJgunR.js.gz +0 -0
  144. package/public/assets/WatchedDevice-CpaKHa1x.js +0 -1
  145. package/public/assets/WatchedDevice-CpaKHa1x.js.br +0 -0
  146. package/public/assets/WatchedDevice-CpaKHa1x.js.gz +0 -0
  147. package/public/assets/aiSession-U7UqgdSb.js.br +0 -0
  148. package/public/assets/aiSession-U7UqgdSb.js.gz +0 -0
  149. package/public/assets/alert-dialog-C0mRms8g.js.br +0 -0
  150. package/public/assets/alert-dialog-C0mRms8g.js.gz +0 -0
  151. package/public/assets/badge-BjEnOmb0.js.br +0 -0
  152. package/public/assets/badge-BjEnOmb0.js.gz +0 -0
  153. package/public/assets/dialog-Cugbp1C4.js.br +0 -0
  154. package/public/assets/dialog-Cugbp1C4.js.gz +0 -0
  155. package/public/assets/field-hint-qmBa0qqN.js.br +0 -0
  156. package/public/assets/field-hint-qmBa0qqN.js.gz +0 -0
  157. package/public/assets/index-C_3Q51YJ.js +0 -248
  158. package/public/assets/index-C_3Q51YJ.js.br +0 -0
  159. package/public/assets/index-C_3Q51YJ.js.gz +0 -0
  160. package/public/assets/index-h2hiZ2OM.css +0 -1
  161. package/public/assets/index-h2hiZ2OM.css.br +0 -0
  162. package/public/assets/index-h2hiZ2OM.css.gz +0 -0
  163. package/public/assets/list-view-CyM0QUaH.js.br +0 -0
  164. package/public/assets/list-view-CyM0QUaH.js.gz +0 -0
  165. package/public/assets/pencil-DUZRZB3S.js.br +0 -0
  166. package/public/assets/pencil-DUZRZB3S.js.gz +0 -0
  167. package/public/assets/play-Z1L2Eb91.js.br +0 -0
  168. package/public/assets/play-Z1L2Eb91.js.gz +0 -0
  169. package/public/assets/search-input-B0s9mzRt.js.br +0 -0
  170. package/public/assets/search-input-B0s9mzRt.js.gz +0 -0
  171. package/public/assets/select-CHbE6M4S.js.br +0 -0
  172. package/public/assets/select-CHbE6M4S.js.gz +0 -0
  173. package/public/assets/slider-tyb3JvL2.js.br +0 -0
  174. package/public/assets/slider-tyb3JvL2.js.gz +0 -0
  175. package/public/assets/tabs-Bf7ou-eS.js.br +0 -0
  176. package/public/assets/tabs-Bf7ou-eS.js.gz +0 -0
  177. package/public/assets/tech-label-KAwM5qZ_.js.br +0 -0
  178. package/public/assets/tech-label-KAwM5qZ_.js.gz +0 -0
  179. package/public/assets/trash-HEJmY7DQ.js.br +0 -0
  180. package/public/assets/trash-HEJmY7DQ.js.gz +0 -0
  181. package/public/assets/video-DdHH0Q0l.js.br +0 -0
  182. package/public/assets/video-DdHH0Q0l.js.gz +0 -0
@@ -0,0 +1,81 @@
1
+ import{c as ae,r as i,j as r}from"./vendor-react-DTSdA8m-.js";import{G as mt,a1 as So,a2 as Be,K as Ot,M as Ht,N as Bt,B as tt,a3 as or,T as Ir,S as hs,H as St,a4 as Ro,a5 as qn,a6 as zn,a7 as jo,a8 as ps,a9 as sr,aa as ko,ab as Co,ac as _r,ad as Fn,b as ms,c as gs,ae as _o,q as Cr,af as No,ag as To,ah as Eo,O as Io,ai as Po,aj as Ao,ak as Lo,L as Do}from"./index-CiJwpDAf.js";import{u as bs,n as je}from"./useRelay-CES3I1Mt.js";import{p as Mo,r as xs,u as ys,a as $o,i as Oo,b as Ho,I as Bo,c as Fo,d as qo,t as Pr,e as ws,f as zo,g as Ar,h as Uo,j as Kr,o as Wo,S as Ko,k as Vo,A as Yo,M as Vr,l as Xo,m as Go,n as Qo,C as Zo,H as Yr,q as Jo,s as Xr}from"./AndroidDeviceScreen-1RaPu10r.js";import{c as vs,a as el}from"./vendor-router-B1pQim9Z.js";import{g as tl,d as nl,A as rl,a as sl,b as ol,e as ll,c as il,f as al}from"./alert-dialog-DPNbpxqG.js";import{L as Ss,H as Rs,K as cl,A as dl,D as ul,h as fl}from"./aiSession-p7Uu2swu.js";import{V as hl}from"./video-D1ajuM3p.js";import{b as js,a as pl,e as ml,c as ks,f as gl,d as Cs}from"./dialog-CrzZQwxn.js";import{a as bl,S as xl}from"./search-input-2MuvmbBR.js";import{P as _s}from"./play-BR_CdQzZ.js";import{T as Gr,a as yl,b as Qr,c as wl}from"./tabs-SLpwFQLx.js";import{c as vl}from"./index-D17hSi50.js";import{l as Zr,j as Sl}from"./publicLink-D6zKS_wu.js";import{u as Rl}from"./useShownAfter-By1Yxysz.js";import{d as jl,S as kl,a as Cl,b as _l,c as Ns}from"./select-7EkQtxVy.js";import{B as Nl}from"./badge-Bjwwchrt.js";import{P as Tl,a as Jr,S as El}from"./build-format-ofd2iIzf.js";import{R as Il,g as Pl}from"./resource-health-oWJ8hy9X.js";/**
2
+ * @license lucide-react v1.61.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 Ts={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};Ts.node;const Al=mt(Ts);/**
7
+ * @license lucide-react v1.61.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 Ll=mt(Es);/**
12
+ * @license lucide-react v1.61.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 Is={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"}]]};Is.node;const Dl=mt(Is);/**
17
+ * @license lucide-react v1.61.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 Ps={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"}]]};Ps.node;const Ml=mt(Ps);/**
22
+ * @license lucide-react v1.61.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 As={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"}]]};As.node;const $l=mt(As);/**
27
+ * @license lucide-react v1.61.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 Ls={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"}]]};Ls.node;const Ol=mt(Ls);/**
32
+ * @license lucide-react v1.61.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 Ds={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"}]]};Ds.node;const Hl=mt(Ds);/**
37
+ * @license lucide-react v1.61.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 Ms={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"}]]};Ms.node;const Bl=mt(Ms);/**
42
+ * @license lucide-react v1.61.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 $s={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"}]]};$s.node;const Tr=mt($s);/**
47
+ * @license lucide-react v1.61.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 Os={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"}]]};Os.node;const Fl=mt(Os);/**
52
+ * @license lucide-react v1.61.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 Hs={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"}]]};Hs.node;const ql=mt(Hs);/**
57
+ * @license lucide-react v1.61.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 Bs={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"}]]};Bs.node;const zl=mt(Bs);/**
62
+ * @license lucide-react v1.61.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 Fs={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};Fs.node;const Ul=mt(Fs);/**
67
+ * @license lucide-react v1.61.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 qs={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"}]]};qs.node;const Wl=mt(qs);/**
72
+ * @license lucide-react v1.61.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 zs={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"}]]};zs.node;const Kl=mt(zs);/**
77
+ * @license lucide-react v1.61.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 Us={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"}]]};Us.node;const Vl=mt(Us);function Yl(n){const e=ae.c(5),[t,l]=i.useState(null);let s,o;e[0]!==n?(s=()=>{n&&So(n).then(l)},o=[n],e[0]=n,e[1]=s,e[2]=o):(s=e[1],o=e[2]),i.useEffect(s,o);let a;return e[3]!==t?(a={build:t},e[3]=t,e[4]=a):a=e[4],a}function Xl(n){const e=ae.c(43);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],e[0]=t):t=e[0];const[l,s]=i.useState(t),[o,a]=i.useState(null),[c,u]=i.useState(null),[d,f]=i.useState(""),[h,p]=i.useState(void 0),[g,b]=i.useState(!1),[w,C]=i.useState("");let m;e[1]!==c||e[2]!==d?(m={sessionId:c,deviceId:d},e[1]=c,e[2]=d,e[3]=m):m=e[3];const _=i.useRef(m);let E,A;e[4]!==c||e[5]!==d?(E=()=>{_.current={sessionId:c,deviceId:d}},A=[c,d],e[4]=c,e[5]=d,e[6]=E,e[7]=A):(E=e[6],A=e[7]),i.useEffect(E,A);let L;e[8]===Symbol.for("react.memo_cache_sentinel")?(L=X=>{var J;if(X.type==="agents:listed"){s(X.sessions);const{deviceId:ue}=_.current,fe=ue?(J=X.sessions.flatMap(Gl).find($=>$.id===ue))==null?void 0:J.formFactor:void 0;fe&&p(fe)}X.type==="session:joined"&&(b(!1),C("Connected")),X.type==="error"&&(b(!1),C(`Error: ${X.message}`))},e[8]=L):L=e[8];const T=L,{send:y,connected:x}=bs(T);let D,R;e[9]!==x||e[10]!==y?(D=()=>{if(!x)return;y({type:"agents:list"});const X=setInterval(()=>y({type:"agents:list"}),5e3);return()=>clearInterval(X)},R=[x,y],e[9]=x,e[10]=y,e[11]=D,e[12]=R):(D=e[11],R=e[12]),i.useEffect(D,R);let I,F;e[13]!==y?(I=()=>()=>{const{sessionId:X,deviceId:J}=_.current;X&&J&&y({type:"device:shutdown",sessionId:X,payload:{deviceId:J}})},F=[y],e[13]=y,e[14]=I,e[15]=F):(I=e[14],F=e[15]),i.useLayoutEffect(I,F);let K;if(e[16]!==n||e[17]!==l){let X;e[19]!==n?(X=J=>J.devices.some(ue=>ue.platform===n),e[19]=n,e[20]=X):X=e[20],K=l.filter(X),e[16]=n,e[17]=l,e[18]=K}else K=e[18];const H=K;let ee;e[21]===Symbol.for("react.memo_cache_sentinel")?(ee=X=>{p(X.formFactor),f(X.id),b(!0),C("Booting…"),u(X.sessionId)},e[21]=ee):ee=e[21];const q=ee;let G;e[22]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(""),e[22]=G):G=e[22];const Y=G;let te;e[23]!==y?(te=()=>{const{sessionId:X,deviceId:J}=_.current;X&&J&&y({type:"device:shutdown",sessionId:X,payload:{deviceId:J}}),u(null),b(!1),C("")},e[23]=y,e[24]=te):te=e[24];const Z=te;let O;e[25]!==y?(O=()=>{const{sessionId:X,deviceId:J}=_.current;X&&J&&y({type:"device:shutdown",sessionId:X,payload:{deviceId:J}}),u(null),a(null),b(!1),C(""),y({type:"agents:list"})},e[25]=y,e[26]=O):O=e[26];const z=O;let se;e[27]!==y?(se=()=>{u(null),a(null),b(!1),C(""),y({type:"agents:list"})},e[27]=y,e[28]=se):se=e[28];const ge=se;let de;return e[29]!==h||e[30]!==c||e[31]!==H||e[32]!==g||e[33]!==x||e[34]!==d||e[35]!==Z||e[36]!==z||e[37]!==ge||e[38]!==o||e[39]!==y||e[40]!==l||e[41]!==w?(de={sessions:l,activeFormFactor:h,selectedAgent:o,setSelectedAgent:a,activeSessionId:c,deviceId:d,booting:g,status:w,send:y,connected:x,agentGroups:H,startDevice:q,resetDevice:Y,handleBack:Z,handleBackToMacs:z,handleSessionEnded:ge},e[29]=h,e[30]=c,e[31]=H,e[32]=g,e[33]=x,e[34]=d,e[35]=Z,e[36]=z,e[37]=ge,e[38]=o,e[39]=y,e[40]=l,e[41]=w,e[42]=de):de=e[42],de}function Gl(n){return n.devices}function Ql(n,e){const t=ae.c(24),[l,s]=i.useState(""),[o,a]=i.useState(""),[c,u]=i.useState("app-only"),[d,f]=i.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 g;t[2]!==p||t[3]!==c?(g=()=>{f(p?c:"app-only"),u("app-only")},t[2]=p,t[3]=c,t[4]=g):g=t[4];const b=g;let w,C,m;if(t[5]!==o||t[6]!==e||t[7]!==l||t[8]!==(n==null?void 0:n.devices)){w=(n==null?void 0:n.devices.filter(L=>L.platform===e))??[],C=[...new Set(w.map(ei).filter(Boolean))].sort(Zl);let A;t[12]!==o?(A=L=>!o||L.name.toLowerCase().includes(o.toLowerCase()),t[12]=o,t[13]=A):A=t[13],m=(l?w.filter(L=>L.osVersion===l):w).filter(A),t[5]=o,t[6]=e,t[7]=l,t[8]=n==null?void 0:n.devices,t[9]=w,t[10]=C,t[11]=m}else w=t[9],C=t[10],m=t[11];const _=m;let E;return t[14]!==d||t[15]!==b||t[16]!==o||t[17]!==w||t[18]!==p||t[19]!==l||t[20]!==C||t[21]!==c||t[22]!==_?(E={filteredDevices:w,osVersions:C,osVersion:l,setOsVersion:s,deviceSearch:o,setDeviceSearch:a,versionedDevices:_,resetMode:c,setResetMode:u,appliedResetMode:d,consumeResetMode:b,fullResetSupported:p},t[14]=d,t[15]=b,t[16]=o,t[17]=w,t[18]=p,t[19]=l,t[20]=C,t[21]=c,t[22]=_,t[23]=E):E=t[23],E}function Zl(n,e){const t=Jl,[l,s]=[t(n),t(e)];for(let o=0;o<Math.max(l.length,s.length);o++){const a=(s[o]??0)-(l[o]??0);if(a!==0)return a}return 0}function Jl(n){return n.replace(/^[^\d]*/,"").split(".").map(Number)}function ei(n){return n.osVersion}function ti(){const n=ae.c(8),[e]=vs();let t;n[0]!==e?(t=e.get("perf"),n[0]=e,n[1]=t):t=n[1];const l=t==="1",[s,o]=i.useState(!1),[a,c]=i.useState(l);a!==l&&(c(l),l||o(!1));let u,d;n[2]!==l?(u=()=>{if(!l)return;const p=g=>{g.ctrlKey&&g.shiftKey&&g.key==="P"&&o(ni)};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]),i.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 ni(n){return!n}const ri=["video/mp4;codecs=avc1","video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm"];function Ws({sessionId:n,buildId:e,onRecordingUploaded:t}){const[l,s]=i.useState("idle"),o=i.useRef(null),a=i.useRef(t);i.useEffect(()=>{a.current=t},[t]);const c=i.useRef(!1),u=i.useRef(null),d=i.useRef([]),f=i.useRef(""),h=i.useRef(0),p=i.useRef(null),g=i.useCallback(function m(){var _;c.current&&((_=p.current)==null||_.call(p),h.current=requestAnimationFrame(m))},[]),b=i.useCallback(m=>{p.current=m},[]),w=i.useCallback(()=>{const m=o.current;if(!m)return;const _=m.getContext("2d");_&&(_.fillStyle="#000",_.fillRect(0,0,m.width,m.height));const E=ri.find(L=>MediaRecorder.isTypeSupported(L))??"";if(!E)return;f.current=E,d.current=[];const A=new MediaRecorder(m.captureStream(30),{mimeType:E});A.ondataavailable=L=>{L.data.size>0&&d.current.push(L.data)},u.current=A,A.start(1e3),c.current=!0,h.current=requestAnimationFrame(g),s("recording")},[g]),C=i.useCallback(async()=>{var T;s("uploading"),c.current=!1,cancelAnimationFrame(h.current);const m=u.current;if(!m){s("idle");return}await new Promise(y=>{const x=setTimeout(y,5e3);m.onstop=()=>{clearTimeout(x),y()};try{m.stop()}catch{clearTimeout(x),y()}}),u.current=null;const _=f.current,E=_.includes("mp4")?".mp4":".webm",A=new Blob(d.current,{type:_});d.current=[];const L=new FormData;L.append("file",A,`tapflow-${Date.now()}${E}`);try{const y=new URLSearchParams({sessionId:n});e&&y.set("buildId",String(e));const x=await fetch(`/api/v1/recordings/upload?${y}`,{method:"POST",credentials:"include",body:L}),D=await x.json();if(x.ok&&D.url){const R=document.createElement("a");R.href=D.url,R.download="",R.click(),(T=a.current)==null||T.call(a),s("done"),setTimeout(()=>s("idle"),2e3)}else s("idle")}catch{s("idle")}},[n,e]);return i.useEffect(()=>{if(l!=="recording")return;const m=()=>{document.visibilityState==="hidden"&&C()};return document.addEventListener("visibilitychange",m),()=>{var _;document.removeEventListener("visibilitychange",m),c.current&&(c.current=!1,cancelAnimationFrame(h.current),(_=u.current)==null||_.stop(),u.current=null)}},[l,C]),{recordState:l,recordCanvasRef:o,setComposeFrame:b,startClientRecording:w,stopClientRecording:C}}function rr(n){const e=ae.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=Be("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=ae.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=Be("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 hr(n){const e=ae.c(7),{label:t,keys:l}=n;let s;e[0]!==l?(s=l.map(si),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 a;return e[4]!==t||e[5]!==o?(a=r.jsxs("span",{className:"flex items-center gap-3",children:[t,o]}),e[4]=t,e[5]=o,e[6]=a):a=e[6],a}function si(n){return r.jsx(rr,{children:n},n)}const es="text-muted-foreground hover:text-muted-foreground",ts="text-destructive hover:text-destructive";function oi(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 li({position:n,steerable:e,reason:t}){const l=t==="awaiting-app",s=!e&&t==="state-unconfirmed"?" animate-pulse":"",o=e?"":oi(t);switch(n){case"offline":return{Icon:Bl,className:(e||l?"text-amber-500 hover:text-amber-500":ts)+s,status:`Device is offline.${o}`};case"online":return{Icon:Tr,className:(e||l?"":ts)+s,status:`Device is on the network.${o}`};case"waiting":return{Icon:Tr,className:`${es} animate-pulse`,status:"Checking the network state."};case"unknown":return{Icon:Tr,className:es,status:e?"No network state has been reported.":"tapflow could not read the network state — try again."}}}function ii({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",a=t==="state-unconfirmed"||t==="unsupported-device";return e||!(s||o)||t==="awaiting-app"?l:a?`Retry: ${l.toLowerCase()}`:`${l} — unavailable`}function Ks(n){var Ue;const e=ae.c(82),{joined:t,onScreenshot:l,onRecordToggle:s,recordState:o,onRotate:a,posture:c,onDeepLink:u,navigationSlot:d,deviceSlot:f,launchSlot:h,network:p,reboot:g}=n,b=i.useId(),w=i.useId(),C=i.useId(),m=i.useId(),[_,E]=i.useState(!1);if(!t)return null;let A;e[0]===Symbol.for("react.memo_cache_sentinel")?(A=r.jsx(Ss,{className:"h-4 w-4"}),e[0]=A):A=e[0];let L;e[1]!==u?(L=r.jsx(Ht,{asChild:!0,children:r.jsx(tt,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":"Open a deeplink",onClick:u,children:A})}),e[1]=u,e[2]=L):L=e[2];let T;e[3]===Symbol.for("react.memo_cache_sentinel")?(T=r.jsx(Bt,{side:"left",children:r.jsx(hr,{label:"Deeplink",keys:["⌘","K"]})}),e[3]=T):T=e[3];let y;e[4]!==L?(y=r.jsxs(Ot,{children:[L,T]}),e[4]=L,e[5]=y):y=e[5];let x;e[6]!==h||e[7]!==d||e[8]!==y?(x=r.jsxs("div",{role:"group","aria-label":"Navigation",className:"flex flex-col items-center gap-0.5",children:[h,d,y]}),e[6]=h,e[7]=d,e[8]=y,e[9]=x):x=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 R;e[11]===Symbol.for("react.memo_cache_sentinel")?(R=r.jsx(ql,{className:"h-4 w-4"}),e[11]=R):R=e[11];let I;e[12]!==a?(I=r.jsx(Ht,{asChild:!0,children:r.jsx(tt,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":"Rotate the device",onClick:a,children:R})}),e[12]=a,e[13]=I):I=e[13];let F;e[14]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(Bt,{side:"left",children:r.jsx(hr,{label:"Rotate",keys:["⌘","⇧","O"]})}),e[14]=F):F=e[14];let K;e[15]!==I?(K=r.jsxs(Ot,{children:[I,F]}),e[15]=I,e[16]=K):K=e[16];let H;e[17]!==c||e[18]!==C?(H=c&&c.postures.length===2&&r.jsx("span",{id:C,role:"status","aria-live":"polite",className:"sr-only",children:c.pending?"Changing posture":((Ue=c.postures.find(pe=>pe.id===c.currentId))==null?void 0:Ue.label)??"Current posture unknown"}),e[17]=c,e[18]=C,e[19]=H):H=e[19];let ee;e[20]!==c||e[21]!==C?(ee=c&&c.postures.length===2&&(()=>{const pe=c.postures.findIndex(We=>We.id===c.currentId),Fe=pe===-1?null:c.postures[pe],$e=c.postures[(pe+1)%2],Le=pe===0,qe=Le?Wl:Ml,De=Le?"Unfold":"Fold",Ie=Fe?`${De}: ${Fe.label} to ${$e.label}`:`${De}: ${$e.label}`,Jt=We=>r.jsx(tt,{variant:"ghost",size:"icon",className:"h-8 w-8 aria-disabled:opacity-50","aria-label":c.pending?`${Ie} — changing`:Ie,"aria-busy":c.pending,"aria-disabled":c.pending,"aria-describedby":C,onClick:()=>{c.pending||We==null||We()},children:c.pending?r.jsx(or,{className:"h-4 w-4 animate-spin"}):r.jsx(qe,{className:"h-4 w-4"})});return r.jsxs(Ot,{children:[r.jsx(Ht,{asChild:!0,children:Jt(()=>c.onSelect($e.id))}),r.jsx(Bt,{side:"left",children:c.pending?`${Ie} — changing`:Ie})]})})(),e[20]=c,e[21]=C,e[22]=ee):ee=e[22];let q;e[23]!==g||e[24]!==w?(q=g&&(()=>{const pe=g.pending?"Restarting the device":"Restart the device";return r.jsxs(r.Fragment,{children:[r.jsxs(Ot,{children:[r.jsx(Ht,{asChild:!0,children:r.jsx(tt,{ref:g.buttonRef,variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":pe,"aria-busy":g.pending,"aria-disabled":g.pending,"aria-describedby":w,onClick:()=>{g.pending||E(!0)},children:g.pending?r.jsx(or,{className:"h-4 w-4 animate-spin"}):r.jsx(Fl,{className:"h-4 w-4"})})}),r.jsx(Bt,{side:"left",children:pe})]}),r.jsx("span",{id:w,role:"status",className:"sr-only",children:g.pending?"Restarting the device.":""})]})})(),e[23]=g,e[24]=w,e[25]=q):q=e[25];let G;e[26]!==f||e[27]!==K||e[28]!==H||e[29]!==ee||e[30]!==q?(G=r.jsxs("div",{role:"group","aria-label":"Device",className:"flex flex-col items-center gap-0.5",children:[f,K,H,ee,q]}),e[26]=f,e[27]=K,e[28]=H,e[29]=ee,e[30]=q,e[31]=G):G=e[31];let Y;e[32]===Symbol.for("react.memo_cache_sentinel")?(Y=r.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"w-4 h-px bg-border my-1"}),e[32]=Y):Y=e[32];let te;e[33]===Symbol.for("react.memo_cache_sentinel")?(te=r.jsx(Ll,{className:"h-4 w-4"}),e[33]=te):te=e[33];let Z;e[34]!==l?(Z=r.jsx(Ht,{asChild:!0,children:r.jsx(tt,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":"Take a screenshot",onClick:l,children:te})}),e[34]=l,e[35]=Z):Z=e[35];let O;e[36]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(Bt,{side:"left",children:r.jsx(hr,{label:"Screenshot",keys:["⌘","S"]})}),e[36]=O):O=e[36];let z;e[37]!==Z?(z=r.jsxs(Ot,{children:[Z,O]}),e[37]=Z,e[38]=z):z=e[38];const se=o==="recording"&&"text-red-500 hover:text-red-500";let ge;e[39]!==se?(ge=Be("h-8 w-8 aria-disabled:opacity-50",se),e[39]=se,e[40]=ge):ge=e[40];const de=o==="recording"?"Stop recording":o==="uploading"?"Processing the recording":o==="done"?"Recording saved":"Start recording",X=o==="uploading",J=o==="uploading"||o==="done";let ue;e[41]!==s||e[42]!==o?(ue=()=>{(o==="idle"||o==="recording")&&s()},e[41]=s,e[42]=o,e[43]=ue):ue=e[43];let fe;e[44]!==o?(fe=o==="uploading"?r.jsx(or,{className:"h-4 w-4 animate-spin"}):o==="recording"?r.jsx(Ul,{className:"h-4 w-4 fill-current"}):r.jsx(hl,{className:"h-4 w-4"}),e[44]=o,e[45]=fe):fe=e[45];let $;e[46]!==m||e[47]!==ge||e[48]!==de||e[49]!==X||e[50]!==J||e[51]!==ue||e[52]!==fe?($=r.jsx(Ht,{asChild:!0,children:r.jsx(tt,{variant:"ghost",size:"icon",className:ge,"aria-label":de,"aria-busy":X,"aria-disabled":J,"aria-describedby":m,onClick:ue,children:fe})}),e[46]=m,e[47]=ge,e[48]=de,e[49]=X,e[50]=J,e[51]=ue,e[52]=fe,e[53]=$):$=e[53];let ne;e[54]!==o?(ne=o==="idle"?r.jsx(hr,{label:"Start recording",keys:["⌘","⇧","Y"]}):o==="recording"?r.jsx(hr,{label:"Stop recording",keys:["⌘","⇧","Y"]}):o==="done"?"Recording saved":"Processing the recording",e[54]=o,e[55]=ne):ne=e[55];let ye;e[56]!==ne?(ye=r.jsx(Bt,{side:"left",children:ne}),e[56]=ne,e[57]=ye):ye=e[57];let be;e[58]!==$||e[59]!==ye?(be=r.jsxs(Ot,{children:[$,ye]}),e[58]=$,e[59]=ye,e[60]=be):be=e[60];const Me=o==="recording"?"Recording.":o==="uploading"?"Processing the recording.":o==="done"?"Recording saved.":"";let M;e[61]!==m||e[62]!==Me?(M=r.jsx("span",{id:m,role:"status",className:"sr-only",children:Me}),e[61]=m,e[62]=Me,e[63]=M):M=e[63];let U;e[64]!==z||e[65]!==be||e[66]!==M?(U=r.jsxs("div",{role:"group","aria-label":"Capture",className:"flex flex-col items-center gap-0.5",children:[z,be,M]}),e[64]=z,e[65]=be,e[66]=M,e[67]=U):U=e[67];let we;e[68]!==b||e[69]!==p?(we=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:pe,className:Fe,status:$e}=li(p),Le=ii(p),qe=p.position==="waiting"||p.position==="unknown"||!p.steerable;return r.jsxs(Ot,{children:[r.jsx(Ht,{asChild:!0,children:r.jsx(tt,{variant:"ghost",size:"icon",className:Be("h-8 w-8",Fe),"aria-label":Le,"aria-busy":p.pending,"aria-disabled":p.pending,"aria-describedby":b,onClick:()=>{p.pending||p.onToggle()},children:p.pending?r.jsx(or,{className:"h-4 w-4 animate-spin"}):r.jsx(pe,{className:"h-4 w-4"})})}),r.jsx("span",{id:b,role:"status",className:"sr-only",children:p.pending?"Changing the network state.":$e}),r.jsx(Bt,{side:"left",children:qe?`${Le} — ${$e}`:Le})]})})()})]}),e[68]=b,e[69]=p,e[70]=we):we=e[70];let he;e[71]!==G||e[72]!==U||e[73]!==we||e[74]!==x?(he=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:[x,D,G,Y,U,we]}),e[71]=G,e[72]=U,e[73]=we,e[74]=x,e[75]=he):he=e[75];let ce;e[76]!==_||e[77]!==g?(ce=g&&r.jsx(tl,{open:_,onOpenChange:E,children:r.jsxs(nl,{children:[r.jsxs(rl,{children:[r.jsx(sl,{children:"Restart this device?"}),r.jsx(ol,{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(ll,{children:[r.jsx(il,{children:"Cancel"}),r.jsx(al,{onClick:()=>{E(!1),g.onReboot()},children:"Restart"})]})]})}),e[76]=_,e[77]=g,e[78]=ce):ce=e[78];let ke;return e[79]!==he||e[80]!==ce?(ke=r.jsxs(Ir,{delayDuration:400,children:[he,ce]}),e[79]=he,e[80]=ce,e[81]=ke):ke=e[81],ke}const ai=3e3,ci=8e3;function Vs(n){const e=ae.c(40),{sessionId:t,send:l,supported:s,deviceReady:o,handlerRef:a,onError:c}=n,[u,d]=i.useState("waiting"),[f,h]=i.useState(!0),[p,g]=i.useState(void 0),b=i.useRef(void 0),[w,C]=i.useState(!1),m=i.useRef(null);let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_=new Set,e[0]=_):_=e[0];const E=i.useRef(_),A=i.useRef(c);let L,T;e[1]!==c?(L=()=>{A.current=c},T=[c],e[1]=c,e[2]=L,e[3]=T):(L=e[2],T=e[3]),i.useEffect(L,T);const y=i.useRef(o);let x,D;e[4]!==o?(x=()=>{y.current=o},D=[o],e[4]=o,e[5]=x,e[6]=D):(x=e[5],D=e[6]),i.useEffect(x,D);const R=i.useRef(o),[I,F]=i.useState(t);I!==t&&(F(t),d("waiting"),h(!0),g(void 0),C(!1));let K;e[7]===Symbol.for("react.memo_cache_sentinel")?(K=()=>{b.current=void 0,m.current=null,R.current=y.current,E.current.clear()},e[7]=K):K=e[7];let H;e[8]!==t?(H=[t],e[8]=t,e[9]=H):H=e[9],i.useEffect(K,H);let ee,q;e[10]!==o?(ee=()=>{var $;if(o){R.current=!0,d("waiting");return}d(R.current?"unknown":"waiting"),h(!0),g(void 0),b.current=void 0,m.current&&(($=A.current)==null||$.call(A,"The device became unavailable before it answered. Its network state is unchanged as far as tapflow can tell."),E.current.add(m.current)),C(!1),m.current=null},q=[o],e[10]=o,e[11]=ee,e[12]=q):(ee=e[11],q=e[12]),i.useEffect(ee,q);let G,Y;e[13]!==a||e[14]!==s?(G=()=>{if(s)return a.current=$=>{var ye,be;if($.type==="network:error"){$.requestId===m.current&&(m.current=null,C(!1),(ye=A.current)==null||ye.call(A,$.message));return}if($.type!=="network:state"||!y.current||$.requestId!==void 0&&E.current.has($.requestId))return;const ne=$.payload.available?void 0:$.payload.reason;d($.payload.offline===void 0?"unknown":$.payload.offline?"offline":"online"),h($.payload.available),g(ne),ne==="enforcement-lost"&&b.current!=="enforcement-lost"&&((be=A.current)==null||be.call(A,"The device went back on the network before you took it off. Anything checked while it was offline needs checking again.")),b.current=ne,$.requestId!==void 0&&$.requestId===m.current&&(m.current=null,C(!1))},()=>{a.current=void 0}},Y=[a,s],e[13]=a,e[14]=s,e[15]=G,e[16]=Y):(G=e[15],Y=e[16]),i.useEffect(G,Y);let te,Z;e[17]!==o||e[18]!==u||e[19]!==s?(te=()=>{if(!s||!o||u!=="waiting")return;const $=setTimeout(()=>d(di),ai);return()=>clearTimeout($)},Z=[s,o,u],e[17]=o,e[18]=u,e[19]=s,e[20]=te,e[21]=Z):(te=e[20],Z=e[21]),i.useEffect(te,Z);let O;e[22]!==w||e[23]!==u||e[24]!==l||e[25]!==t||e[26]!==s?(O=()=>{if(!s||w)return;const $=je();m.current=$,C(!0),l({type:"network:set",sessionId:t,requestId:$,payload:{offline:u!=="offline"}})},e[22]=w,e[23]=u,e[24]=l,e[25]=t,e[26]=s,e[27]=O):O=e[27];const z=O,[se,ge]=i.useState(null);let de,X;e[28]!==w?(de=()=>{ge(w?m.current:null)},X=[w],e[28]=w,e[29]=de,e[30]=X):(de=e[29],X=e[30]),i.useEffect(de,X);let J,ue;e[31]!==se?(J=()=>{if(se===null)return;const $=setTimeout(()=>{var ne;m.current===se&&(m.current=null,C(!1),(ne=A.current)==null||ne.call(A,"The device did not answer. Its network state is unchanged as far as tapflow can tell."))},ci);return()=>clearTimeout($)},ue=[se],e[31]=se,e[32]=J,e[33]=ue):(J=e[32],ue=e[33]),i.useEffect(J,ue);let fe;return e[34]!==w||e[35]!==u||e[36]!==p||e[37]!==f||e[38]!==z?(fe={position:u,steerable:f,reason:p,pending:w,toggle:z},e[34]=w,e[35]=u,e[36]=p,e[37]=f,e[38]=z,e[39]=fe):fe=e[39],fe}function di(n){return n==="waiting"?"unknown":n}const ui="https://www.tapflow.dev/operate/https#pick-a-method";function fi(n){const e=ae.c(9),{open:t,onOpenChange:l}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx(js,{children:"Streaming in Standard mode"}),e[0]=s):s=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(pl,{children:[s,r.jsxs(ml,{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 a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx(tt,{variant:"outline",onClick:hi,children:"How to enable"}),e[2]=a):a=e[2];let c;e[3]!==l?(c=r.jsxs(ks,{className:"sm:max-w-[440px]",children:[o,r.jsxs(gl,{children:[a,r.jsx(tt,{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(Cs,{open:t,onOpenChange:l,children:c}),e[5]=l,e[6]=t,e[7]=c,e[8]=u):u=e[8],u}function hi(){return window.open(ui,"_blank","noopener,noreferrer")}const ns="tapflow.perfModeNoticeDismissed";function pi(n,e){return n==="standard"&&!e}const mi={high:"Smooth",standard:"Standard",unsupported:null};function gi(n){const{connected:e,joined:t,bootError:l,bootWaiting:s,deviceReady:o,installing:a,installError:c,agentAway:u,decoderUnsupported:d}=n;return e?t?u?"The agent went away — waiting for it to come back…":l?`Boot failed: ${l.length>40?l.slice(0,40)+"…":l}`:!o&&s==="host-memory-critical"?"This Mac is low on memory. Yours starts when it frees up…":!o&&s?"Another device is starting on this Mac. Yours starts next…":o?a?"Installing app…":c?`Install failed: ${c}`:d?"Streaming is not supported in this environment.":null:"Starting device…":"Joining session…":"Connecting…"}function $r(n){const e=ae.c(43),{joined:t,fps:l,keyboardActive:s}=n;let o;e[0]!==n?(o=gi(n),e[0]=n,e[1]=o):o=e[1];const a=o,c=l>15,u=c?"#10b981":"#94a3b8",d=c?"Active":"Idle";let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=Mo(),e[2]=f):f=e[2];const h=f,p=mi[h];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{let O=!1;try{O=localStorage.getItem(ns)==="1"}catch{}return pi(h,O)},e[3]=g):g=e[3];const[b,w]=i.useState(g);let C;e[4]===Symbol.for("react.memo_cache_sentinel")?(C=O=>{if(w(O),!O)try{localStorage.setItem(ns,"1")}catch{}},e[4]=C):C=e[4];const m=C,_=s?"text-emerald-500":"text-muted-foreground";let E;e[5]!==_?(E=Be("flex items-center",_),e[5]=_,e[6]=E):E=e[6];let A,L,T,y;e[7]===Symbol.for("react.memo_cache_sentinel")?(A={gap:6},L=r.jsx(zl,{className:"h-3.5 w-3.5 shrink-0"}),T=r.jsx("span",{className:"text-[12px] font-medium",children:"Focus"}),y=r.jsx("span",{"aria-hidden":"true",className:"text-[11px] text-muted-foreground/60",children:"·"}),e[7]=A,e[8]=L,e[9]=T,e[10]=y):(A=e[7],L=e[8],T=e[9],y=e[10]);const x=s?"text-emerald-500":"text-muted-foreground/60";let D;e[11]!==x?(D=Be("text-[11px]",x),e[11]=x,e[12]=D):D=e[12];const R=s?"On":"Off";let I;e[13]!==D||e[14]!==R?(I=r.jsx("span",{className:D,children:R}),e[13]=D,e[14]=R,e[15]=I):I=e[15];let F;e[16]!==I||e[17]!==E?(F=r.jsxs("div",{className:E,style:A,children:[L,T,y,I]}),e[16]=I,e[17]=E,e[18]=F):F=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:Be("text-[11px]",c?"text-emerald-500":"text-muted-foreground/60"),children:d})]}),p&&r.jsxs(r.Fragment,{children:[r.jsx(hs,{orientation:"vertical",className:"h-3"}),h==="standard"?r.jsx("button",{type:"button",onClick:()=>w(!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 H=a?void 0:"sr-only";let ee;e[25]!==a?(ee=a&&r.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed break-words",children:a}),e[25]=a,e[26]=ee):ee=e[26];let q;e[27]!==H||e[28]!==ee?(q=r.jsx("div",{role:"status",className:H,children:ee}),e[27]=H,e[28]=ee,e[29]=q):q=e[29];let G;e[30]!==n.servicesOff?(G=n.servicesOff&&r.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed break-words",children:"An automated run started this device with most background services off, apart from any it asked to keep. Restart the device to turn them back on."}),e[30]=n.servicesOff,e[31]=G):G=e[31];let Y;e[32]!==n.note?(Y=n.note&&r.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed break-words",children:n.note}),e[32]=n.note,e[33]=Y):Y=e[33];let te;e[34]!==b?(te=r.jsx(fi,{open:b,onOpenChange:m}),e[34]=b,e[35]=te):te=e[35];let Z;return e[36]!==F||e[37]!==K||e[38]!==q||e[39]!==G||e[40]!==Y||e[41]!==te?(Z=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:[F,K,q,G,Y,te]}),e[36]=F,e[37]=K,e[38]=q,e[39]=G,e[40]=Y,e[41]=te,e[42]=Z):Z=e[42],Z}function Ys(n){const e=ae.c(11),{open:t,onOpenChange:l,openUrl:s}=n,[o,a]=i.useState(0),[c,u]=i.useState(t);c!==t&&(u(t),t&&a(bi));let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(js,{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(ks,{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(xi,{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(Cs,{open:t,onOpenChange:l,children:h}),e[7]=l,e[8]=t,e[9]=h,e[10]=p):p=e[10],p}function bi(n){return n+1}function xi(n){const e=ae.c(21),{openUrl:t,close:l}=n,[s,o]=i.useState(""),a=i.useRef(null);let c,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{const E=setTimeout(()=>{var A;return(A=a.current)==null?void 0:A.focus()},0);return()=>clearTimeout(E)},u=[],e[0]=c,e[1]=u):(c=e[0],u=e[1]),i.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(bl,{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=E=>o(E.target.value),e[7]=p):p=e[7];let g;e[8]!==f?(g=E=>{E.key==="Enter"&&f()},e[8]=f,e[9]=g):g=e[9];let b;e[10]!==g||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:a,"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:g})]}),e[10]=g,e[11]=s,e[12]=b):b=e[12];let w;e[13]!==s?(w=s.trim(),e[13]=s,e[14]=w):w=e[14];const C=!w;let m;e[15]!==f||e[16]!==C?(m=r.jsx(tt,{size:"sm",disabled:C,onClick:f,className:"shrink-0 rounded-xl h-8 px-4",children:"Open"}),e[15]=f,e[16]=C,e[17]=m):m=e[17];let _;return e[18]!==m||e[19]!==b?(_=r.jsx(r.Fragment,{children:r.jsxs("div",{className:"flex items-center gap-3",children:[b,m]})}),e[18]=m,e[19]=b,e[20]=_):_=e[20],_}function Xs(n,e,t){const l=ae.c(14),[s,o]=i.useState(null),a=i.useRef(0),[c,u]=i.useState(null);let d;l[0]!==t||l[1]!==n||l[2]!==e?(d=C=>{a.current=Date.now()+8e3,o(C),u(yi(t,C)),n({type:"input:posture",sessionId:e,payload:{postureId:C}})},l[0]=t,l[1]=n,l[2]=e,l[3]=d):d=l[3];const f=d;let h;l[4]!==s||l[5]!==(t==null?void 0:t.currentId)?(h=()=>{if(s===null)return;const C=(t==null?void 0:t.currentId)===s,m=setTimeout(()=>o(null),C?0:xs(a.current,Date.now()));return()=>clearTimeout(m)},l[4]=s,l[5]=t==null?void 0:t.currentId,l[6]=h):h=l[6];let p;l[7]!==s||l[8]!==t?(p=[s,t],l[7]=s,l[8]=t,l[9]=p):p=l[9],i.useEffect(h,p);const g=s!==null,b=s===null?null:c;let w;return l[10]!==f||l[11]!==g||l[12]!==b?(w={pending:g,folding:b,select:f},l[10]=f,l[11]=g,l[12]=b,l[13]=w):w=l[13],w}function yi(n,e){const t=(n==null?void 0:n.postures.map(o=>o.id))??[],l=n!=null&&n.currentId?t.indexOf(n.currentId):-1,s=t.indexOf(e);return s<0||l===s?null:l<0?s===0?"fold":"unfold":s<l?"fold":"unfold"}const wi=3e3+5*300,vi=wi+500,Sr=8;function Si(){var n;return window.isSecureContext&&typeof ClipboardItem<"u"&&!!((n=navigator.clipboard)!=null&&n.write)}class pr extends Error{}function Ri(n){const e=n.then(t=>new Blob([t],{type:"text/plain"}));return navigator.clipboard.write([new ClipboardItem({"text/plain":e})])}function Or(n){return!(n.metaKey||n.ctrlKey)||n.altKey?!1:n.code==="KeyV"?!0:!n.shiftKey&&(n.code==="KeyC"||n.code==="KeyX")}const ji=1024*1024,ki=n=>new TextEncoder().encode(n).length,Ci=n=>{var e;return!!((e=n.payload)!=null&&e.unsupported)},_i=n=>{var e,t;return((e=n.payload)==null?void 0:e.sentinelParked)===!1||((t=n.payload)==null?void 0:t.unsupported)===!0};function Ni(){const n=window.getSelection();return!!n&&!n.isCollapsed&&n.toString().length>0}function rs(){const n=document.activeElement;return!!n&&(n.tagName==="INPUT"||n.tagName==="TEXTAREA"||n.isContentEditable)}function Gs(n){const e=ae.c(16),{sessionId:t,send:l,active:s,supported:o,handlerRef:a,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=i.useRef(d),h=i.useRef(null),p=i.useRef(u);let g;e[1]!==u?(g=()=>{p.current=u},e[1]=u,e[2]=g):g=e[2],i.useLayoutEffect(g);let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=T=>{var y;h.current!==T&&(h.current=T,(y=p.current)==null||y.call(p,T))},e[3]=b):b=e[3];const w=b;let C,m;e[4]!==a?(C=()=>(a.current=T=>{if(!T.requestId)return;const y=f.current.get(T.requestId);y&&(f.current.delete(T.requestId),y(T))},()=>{a.current=void 0}),m=[a],e[4]=a,e[5]=C,e[6]=m):(C=e[5],m=e[6]),i.useEffect(C,m);let _;e[7]!==l||e[8]!==t?(_=(...T)=>{const[y,x]=T,D=je();return new Promise(R=>{const I=setTimeout(()=>{f.current.delete(D),R(null)},vi);f.current.set(D,F=>{clearTimeout(I),R(F)}),l({type:y,sessionId:t,requestId:D,payload:x})})},e[7]=l,e[8]=t,e[9]=_):_=e[9];const E=_;let A,L;e[10]!==s||e[11]!==E||e[12]!==c||e[13]!==o?(A=()=>{if(!s||!o)return;const T=async x=>{if(x.code==="KeyV"||!Or(x))return;const D=x.code==="KeyX";if(rs()||Ni()||(x.preventDefault(),x.repeat))return;if(!Si()){c(D?"KeyX":"KeyC",Sr),w("Copied on the device. Serving the dashboard over HTTPS also brings it to your clipboard.");return}let R,I;const F=new Promise((q,G)=>{R=q,I=G});F.catch(Ti);const K=Ri(F).catch(q=>{q instanceof pr||w(q instanceof Error&&q.name==="NotAllowedError"?"Your browser blocked the clipboard write":"Could not write to your clipboard")}),H=await E("clipboard:read",{press:D?"cut":"copy"});if(!H){I(new pr("timeout")),w("The device is taking too long — try again");return}if(H.type==="clipboard:error"){I(new pr(H.message||"read failed")),w(H.message||"Clipboard read failed"),_i(H)&&c(D?"KeyX":"KeyC",Sr);return}if(H.type!=="clipboard:data"){I(new pr("unexpected reply")),w("Clipboard read failed");return}const{text:ee}=H.payload;if(h.current=null,!ee){I(new pr("empty"));return}R(ee),await K},y=x=>{var R;if(rs())return;const D=((R=x.clipboardData)==null?void 0:R.getData("text"))??"";if(x.preventDefault(),!D){c("KeyV",Sr);return}if(ki(D)>ji){w("That text is too large to send to the device");return}E("clipboard:write",{text:D,pasteAfter:!0}).then(I=>{if(!I){w("The device is taking too long — try again");return}if(I.type==="clipboard:write-done"){h.current=null;return}if(I.type!=="clipboard:error"){w("Clipboard write failed");return}w(I.message||"Clipboard write failed"),Ci(I)&&c("KeyV",Sr)})};return document.addEventListener("keydown",T),document.addEventListener("paste",y),()=>{document.removeEventListener("keydown",T),document.removeEventListener("paste",y)}},L=[s,o,E,c,w],e[10]=s,e[11]=E,e[12]=c,e[13]=o,e[14]=A,e[15]=L):(A=e[14],L=e[15]),i.useEffect(A,L)}function Ti(){}const kn=13,tr=8,ss=16,Ei=.02,os=350,Ii=8e3;function Pi(n){const e=ae.c(261),{sessionId:t,buildId:l,send:s,openUrl:o,launchApp:a,connected:c,joined:u,deviceReady:d,installing:f,installed:h,installError:p,bootError:g,bootWaiting:b,servicesOff:w,launching:C,chrome:m,formFactor:_,binaryFrameHandlerRef:E,clipboardHandlerRef:A,clipboardSupported:L,networkHandlerRef:T,networkSupported:y,onRecordingUploaded:x,swKeyboardVisible:D,swKeyboardPending:R,onKbdToggle:I,rebootPending:F,onReboot:K,restartButtonRef:H,perfHookRef:ee,onStreamSize:q,postures:G}=n,{fps:Y,frameCount:te}=ys();let Z;e[0]!==l||e[1]!==x||e[2]!==t?(Z={sessionId:t,buildId:l,onRecordingUploaded:x},e[0]=l,e[1]=x,e[2]=t,e[3]=Z):Z=e[3];const{recordState:O,recordCanvasRef:z,setComposeFrame:se,startClientRecording:ge,stopClientRecording:de}=Ws(Z),[X,J]=i.useState(!1),[ue,fe]=i.useState(!1),[$,ne]=i.useState(null),ye=i.useRef(null),be=i.useRef(0);let Me;e[4]===Symbol.for("react.memo_cache_sentinel")?(Me=new Map,e[4]=Me):Me=e[4];const M=i.useRef(Me);let U,we;e[5]===Symbol.for("react.memo_cache_sentinel")?(U=()=>{const S=M.current;return()=>{for(const[k,j]of S)clearTimeout(k),j()}},we=[],e[5]=U,e[6]=we):(U=e[5],we=e[6]),i.useEffect(U,we);const he=Xs(s,t,G),[ce,ke]=i.useState(!1),[Ue,pe]=i.useState(null),[Fe,$e]=i.useState(null),[Le,qe]=i.useState(!1),[De,Ie]=i.useState(null),Jt=i.useRef(De);let We,ct;e[7]!==De?(We=()=>{Jt.current=De},ct=[De],e[7]=De,e[8]=We,e[9]=ct):(We=e[8],ct=e[9]),i.useEffect(We,ct);const Ke=i.useRef(null);let Ft;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ft=new Set,e[10]=Ft):Ft=e[10];const Rt=i.useRef(Ft),st=i.useRef(null);let jt,kt;e[11]===Symbol.for("react.memo_cache_sentinel")?(jt=()=>()=>{st.current&&clearTimeout(st.current)},kt=[],e[11]=jt,e[12]=kt):(jt=e[11],kt=e[12]),i.useEffect(jt,kt);const Ve=i.useRef(null),Oe=i.useRef(!1),ot=i.useRef(!1),Ye=i.useRef(0),qt=i.useRef(null),gt=i.useRef(null),zt=i.useRef("idle"),Ce=i.useRef(null),Pe=i.useRef(null),bt=i.useRef(null);let en,Ct;e[13]!==m?(en=()=>{bt.current=m},Ct=[m],e[13]=m,e[14]=en,e[15]=Ct):(en=e[14],Ct=e[15]),i.useEffect(en,Ct);let Ut,ve;e[16]!==m.framePng?(Ut=()=>{const S=new Image;S.onload=()=>{Pe.current=S},S.src=`data:image/png;base64,${m.framePng}`},ve=[m.framePng],e[16]=m.framePng,e[17]=Ut,e[18]=ve):(Ut=e[17],ve=e[18]),i.useEffect(Ut,ve);let dt;e[19]!==q||e[20]!==z?(dt=S=>{if(q==null||q(S),!bt.current){const k=z.current;k&&(k.width=S.width,k.height=S.height)}},e[19]=q,e[20]=z,e[21]=dt):dt=e[21];let Xe;e[22]!==E||e[23]!==m||e[24]!==Y||e[25]!==te||e[26]!==ee||e[27]!==dt?(Xe={chrome:m,binaryFrameHandlerRef:E,perfHookRef:ee,fps:Y,frameCount:te,onCanvasResize:dt},e[22]=E,e[23]=m,e[24]=Y,e[25]=te,e[26]=ee,e[27]=dt,e[28]=Xe):Xe=e[28];const _t=$o(Xe),{canvasRef:xe,containerRef:_e,screenAreaRef:tn,decoderUnsupported:ut}=_t;let xt;e[29]!==m.streamRotation||e[30]!==ue||e[31]!==($==null?void 0:$.target)?(xt=($==null?void 0:$.target)??Oo(m.streamRotation,ue),e[29]=m.streamRotation,e[30]=ue,e[31]=$==null?void 0:$.target,e[32]=xt):xt=e[32];const Ge=xt;let nn;e[33]!==xe||e[34]!==_e||e[35]!==Ge?(nn=()=>{const S=_e.current;if(!S||S.clientWidth===0)return null;const k=xe.current,j=k&&k.clientWidth>0?Math.max(1,Math.max(k.width,k.height)/Math.max(k.clientWidth,k.clientHeight)):1;return qo(Pr(S.clientWidth*j,S.clientHeight*j,Ge))},e[33]=xe,e[34]=_e,e[35]=Ge,e[36]=nn):nn=e[36];const Qe=nn;let rn;e[37]!==z||e[38]!==O||e[39]!==Qe?(rn=()=>{const S=z.current,k=Qe();S&&k&&O!=="recording"&&(S.width=k.width,S.height=k.height)},e[37]=z,e[38]=O,e[39]=Qe,e[40]=rn):rn=e[40];let Wt;e[41]!==m||e[42]!==z||e[43]!==O||e[44]!==Qe?(Wt=[m,z,Qe,O],e[41]=m,e[42]=z,e[43]=O,e[44]=Qe,e[45]=Wt):Wt=e[45],i.useEffect(rn,Wt);let Nt;e[46]!==xe||e[47]!==_e||e[48]!==z||e[49]!==Ge?(Nt=()=>{const S=z.current,k=xe.current;if(!S||!k)return;const j=S.getContext("2d");if(!j)return;const me=bt.current;j.clearRect(0,0,S.width,S.height);const Ae=_e.current,V=(Ae==null?void 0:Ae.clientWidth)||S.width,ze=(Ae==null?void 0:Ae.clientHeight)||S.height,Ee=Ae!=null&&Ae.clientWidth?Ge:0,{picW:at,picH:cr,scale:vr,left:yo,top:wo}=ws(S.width,S.height,V,ze,Ee);if(j.save(),j.translate(yo+at*vr/2,wo+cr*vr/2),j.scale(vr,vr),j.rotate(Ee*Math.PI/180),j.translate(-V/2,-ze/2),me){Pe.current&&j.drawImage(Pe.current,0,0,V,ze);const Gt=vo=>Math.round(vo/2*(ze/(me.compositeHeight/2))),Bn=Gt(me.screenCornerRadius),Qt=me.screenCornerRadii;j.save(),j.beginPath(),Bn>0?j.roundRect(k.offsetLeft,k.offsetTop,k.clientWidth,k.clientHeight,Qt?[Gt(Qt.topLeft),Gt(Qt.topRight),Gt(Qt.bottomRight),Gt(Qt.bottomLeft)]:Bn):j.rect(k.offsetLeft,k.offsetTop,k.clientWidth,k.clientHeight),j.clip(),j.drawImage(k,k.offsetLeft,k.offsetTop,k.clientWidth,k.clientHeight),j.restore()}else j.drawImage(k,0,0,V,ze);const Nr=Jt.current;if(Nr)for(const Gt of[Nr.f0,Nr.f1]){const Bn=me?k.offsetLeft+Gt.x*k.clientWidth:Gt.x*V,Qt=me?k.offsetTop+Gt.y*k.clientHeight:Gt.y*ze;Oe.current?(j.beginPath(),j.arc(Bn,Qt,tr,0,Math.PI*2),j.fillStyle="rgba(255,255,255,0.92)",j.fill(),j.strokeStyle="rgba(0,0,0,0.2)",j.lineWidth=1,j.stroke()):(j.beginPath(),j.arc(Bn,Qt,kn,0,Math.PI*2),j.strokeStyle="rgba(0,0,0,0.3)",j.lineWidth=3,j.stroke(),j.beginPath(),j.arc(Bn,Qt,kn,0,Math.PI*2),j.strokeStyle="rgba(255,255,255,0.65)",j.lineWidth=1.5,j.stroke())}const Hn=gt.current;if(Hn){const Gt=zt.current,Bn=Ce.current;if(j.save(),Gt==="down")j.beginPath(),j.arc(Hn.x,Hn.y,tr,0,Math.PI*2),j.fillStyle="rgba(255,255,255,0.92)",j.fill(),j.strokeStyle="rgba(0,0,0,0.2)",j.lineWidth=1,j.stroke();else if(Gt==="release"&&Bn){const Qt=Math.min((performance.now()-Bn.startTime)/350,1);j.beginPath(),j.arc(Hn.x,Hn.y,tr+26*Qt,0,Math.PI*2),j.strokeStyle=`rgba(255,255,255,${(1-Qt)*.55})`,j.lineWidth=1.5,j.stroke(),Qt>=1&&(zt.current="idle",Ce.current=null)}else j.beginPath(),j.arc(Hn.x,Hn.y,kn,0,Math.PI*2),j.strokeStyle="rgba(0,0,0,0.3)",j.lineWidth=3,j.stroke(),j.beginPath(),j.arc(Hn.x,Hn.y,kn,0,Math.PI*2),j.strokeStyle="rgba(255,255,255,0.65)",j.lineWidth=1.5,j.stroke();j.restore()}j.restore()},e[46]=xe,e[47]=_e,e[48]=z,e[49]=Ge,e[50]=Nt):Nt=e[50];const sn=Nt;let Kt,lt;e[51]!==sn||e[52]!==se?(Kt=()=>{se(sn)},lt=[sn,se],e[51]=sn,e[52]=se,e[53]=Kt,e[54]=lt):(Kt=e[53],lt=e[54]),i.useLayoutEffect(Kt,lt);let Tt;e[55]!==xe?(Tt=()=>{const S=xe.current;if(!S)return;const k=document.createElement("canvas"),j=k.getContext("2d");j&&(k.width=S.width,k.height=S.height,j.drawImage(S,0,0),k.toBlob(Di,"image/png"))},e[55]=xe,e[56]=Tt):Tt=e[56];const it=Tt;let Et;e[57]!==xe||e[58]!==z||e[59]!==O||e[60]!==Qe||e[61]!==ge||e[62]!==de?(Et=()=>{if(O==="idle"){const S=z.current;if(!S)return;const k=Qe();if(k)S.width=k.width,S.height=k.height;else{const j=xe.current;if(j&&j.width>0)S.width=j.width,S.height=j.height;else return}ge()}else O==="recording"&&de()},e[57]=xe,e[58]=z,e[59]=O,e[60]=Qe,e[61]=ge,e[62]=de,e[63]=Et):Et=e[63];const Ze=Et,yt=i.useRef(!1);let It;e[64]!==s||e[65]!==t?(It=()=>{var j;be.current=performance.now()+os;const S=(j=bt.current)==null?void 0:j.streamRotation;if(S!==void 0){const me=ye.current,V={target:((me&&me.deadline>Date.now()?me.target:S)+90)%360,deadline:Date.now()+Ii};ye.current=V,ne(V);const ze=()=>s({type:"input:rotate",sessionId:t,payload:{direction:"clockwise"}}),Ee=setTimeout(()=>{M.current.delete(Ee),ze()},os);M.current.set(Ee,ze);return}const k=!yt.current;yt.current=k,fe(k),s({type:"input:rotate",sessionId:t,payload:{orientation:k?"landscape":"portrait"}})},e[64]=s,e[65]=t,e[66]=It):It=e[66];const nt=It,on=i.useRef(null);let ft,Je;e[67]!==s||e[68]!==t?(ft=()=>{on.current=()=>{var S;((S=bt.current)==null?void 0:S.streamRotation)===void 0&&yt.current&&s({type:"input:rotate",sessionId:t,payload:{orientation:"portrait"}})}},Je=[s,t],e[67]=s,e[68]=t,e[69]=ft,e[70]=Je):(ft=e[69],Je=e[70]),i.useEffect(ft,Je);let ht,Pt;e[71]===Symbol.for("react.memo_cache_sentinel")?(ht=()=>()=>{var S;(S=on.current)==null||S.call(on)},Pt=[],e[71]=ht,e[72]=Pt):(ht=e[71],Pt=e[72]),i.useEffect(ht,Pt);let v,Q;e[73]!==m.streamRotation||e[74]!==$?(v=()=>{if(!$)return;const S=m.streamRotation===$.target,k=setTimeout(()=>{ye.current===$&&(ye.current=null),ne(null)},S?0:xs($.deadline,Date.now()));return()=>clearTimeout(k)},Q=[$,m.streamRotation],e[73]=m.streamRotation,e[74]=$,e[75]=v,e[76]=Q):(v=e[75],Q=e[76]),i.useEffect(v,Q);let Se;e[77]!==s||e[78]!==t?(Se=(S,k)=>{s({type:"input:key",sessionId:t,requestId:je(),payload:{code:S,modifiers:k}})},e[77]=s,e[78]=t,e[79]=Se):Se=e[79];const Ne=Se;let Te;e[80]!==A||e[81]!==L||e[82]!==ce||e[83]!==s||e[84]!==Ne||e[85]!==t?(Te={sessionId:t,send:s,active:ce,supported:L,handlerRef:A,sendChord:Ne,onError:Li},e[80]=A,e[81]=L,e[82]=ce,e[83]=s,e[84]=Ne,e[85]=t,e[86]=Te):Te=e[86],Gs(Te);let oe;e[87]!==d||e[88]!==T||e[89]!==y||e[90]!==s||e[91]!==t?(oe={sessionId:t,send:s,supported:y,deviceReady:d,handlerRef:T,onError:Ai},e[87]=d,e[88]=T,e[89]=y,e[90]=s,e[91]=t,e[92]=oe):oe=e[92];const ie=Vs(oe);let _n,At;e[93]!==L||e[94]!==Ze||e[95]!==nt||e[96]!==it||e[97]!==ce||e[98]!==I||e[99]!==s||e[100]!==t||e[101]!==R?(_n=()=>{const S=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),k=V=>{if(V.code==="AltLeft"||V.code==="AltRight"){ot.current=!0;return}if(V.metaKey){const Ee=document.activeElement;if(!Ee||Ee.tagName!=="INPUT"&&Ee.tagName!=="TEXTAREA"){if(!V.shiftKey&&V.code==="KeyK"){V.preventDefault(),J(!0);return}if(!V.shiftKey&&V.code==="KeyS"){V.preventDefault(),it();return}if(V.shiftKey&&V.code==="KeyY"){V.preventDefault(),Ze();return}if(V.shiftKey&&V.code==="KeyO"){V.preventDefault(),V.repeat||nt();return}if(V.shiftKey&&V.code==="KeyU"){V.preventDefault(),s({type:"input:button",sessionId:t,requestId:je(),payload:{name:"home"}});return}if(V.shiftKey&&V.code==="KeyK"){V.preventDefault(),R||I();return}}}if(!ce||S.has(V.code)||L&&Or(V))return;V.preventDefault();const ze=(V.shiftKey?2:0)|(V.ctrlKey?1:0)|(V.metaKey?8:0);s({type:"input:key",sessionId:t,requestId:je(),payload:{code:V.code,modifiers:ze}})},j=()=>{Oe.current&&(Oe.current=!1,qe(!1),s({type:"input:pinch:end",sessionId:t,requestId:je()})),ot.current=!1,Ie(null)},me=V=>{(V.code==="AltLeft"||V.code==="AltRight")&&j()},Ae=()=>{ot.current&&j()};return window.addEventListener("keydown",k),window.addEventListener("keyup",me),window.addEventListener("blur",Ae),()=>{window.removeEventListener("keydown",k),window.removeEventListener("keyup",me),window.removeEventListener("blur",Ae)}},At=[ce,L,s,t,it,Ze,nt,I,R],e[93]=L,e[94]=Ze,e[95]=nt,e[96]=it,e[97]=ce,e[98]=I,e[99]=s,e[100]=t,e[101]=R,e[102]=_n,e[103]=At):(_n=e[102],At=e[103]),i.useEffect(_n,At);let Nn,ln;e[104]!==xe||e[105]!==_e||e[106]!==ce?(Nn=()=>{if(!ce)return;const S=k=>{const j=_e.current??xe.current;j&&!j.contains(k.target)&&ke(!1)};return document.addEventListener("pointerdown",S),()=>document.removeEventListener("pointerdown",S)},ln=[ce,_e,xe],e[104]=xe,e[105]=_e,e[106]=ce,e[107]=Nn,e[108]=ln):(Nn=e[107],ln=e[108]),i.useEffect(Nn,ln);let Tn;e[109]!==m.compositeHeight||e[110]!==m.compositeWidth||e[111]!==m.screenRect||e[112]!==_e||e[113]!==tn||e[114]!==Ge?(Tn=S=>{const k=Ge,j=(k!==0?tn.current:null)??_e.current;if(!j)return null;const me=j.getBoundingClientRect(),Ae=m.compositeWidth/2,V=m.compositeHeight/2,ze=m.screenRect.x/2,Ee=m.screenRect.y/2,at=m.screenRect.width/2,cr=m.screenRect.height/2;return zo({x:S.clientX,y:S.clientY},me,Ae,V,{x:ze,y:Ee,width:at,height:cr},k)},e[109]=m.compositeHeight,e[110]=m.compositeWidth,e[111]=m.screenRect,e[112]=_e,e[113]=tn,e[114]=Ge,e[115]=Tn):Tn=e[115];const Lt=Tn;let En;e[116]!==Lt?(En=S=>{const k=Lt(S);return k?Ar(k):null},e[116]=Lt,e[117]=En):En=e[117];const an=En;let In;e[118]!==xe||e[119]!==z?(In=S=>{const k=xe.current,j=z.current;return k&&k.clientWidth>0?{x:k.offsetLeft+S.x*k.clientWidth,y:k.offsetTop+S.y*k.clientHeight}:{x:S.x*((j==null?void 0:j.width)??1),y:S.y*((j==null?void 0:j.height)??1)}},e[118]=xe,e[119]=z,e[120]=In):In=e[120];const cn=In;let Pn;e[121]!==cn||e[122]!==s||e[123]!==t||e[124]!==Lt||e[125]!==an?(Pn=S=>{if(performance.now()<be.current)return;if(ke(!0),ot.current){const Ae=an(S);if(!Ae)return;Oe.current=!0,qe(!0),S.target.setPointerCapture(S.pointerId),Ie(Ae),s({type:"input:pinch:start",sessionId:t,payload:Ae});return}const k=Lt(S);if(!k)return;Ve.current=k,S.target.setPointerCapture(S.pointerId),gt.current=cn(k),zt.current="down",Ce.current=null;const j=S.currentTarget.getBoundingClientRect(),me=qt.current;me&&(me.style.display="block",me.style.left=`${S.clientX-j.left}px`,me.style.top=`${S.clientY-j.top}px`,me.style.width=`${tr*2}px`,me.style.height=`${tr*2}px`,me.style.background="rgba(255,255,255,0.92)",me.style.border="1.5px solid rgba(0,0,0,0.2)",me.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:k})},e[121]=cn,e[122]=s,e[123]=t,e[124]=Lt,e[125]=an,e[126]=Pn):Pn=e[126];const Jn=Pn;let An;e[127]!==s||e[128]!==t?(An=(S,k)=>{if(!(ot.current||performance.now()<be.current)){if(k.stopPropagation(),Ke.current){Rt.current.add(k.pointerId);return}ke(!0),st.current&&(clearTimeout(st.current),st.current=null),Ke.current={name:S,pointerId:k.pointerId},pe(S),k.currentTarget.setPointerCapture(k.pointerId),s({type:"input:button",sessionId:t,requestId:je(),payload:{name:S,phase:"down"}})}},e[127]=s,e[128]=t,e[129]=An):An=e[129];const fr=An;let dn;e[130]!==cn||e[131]!==s||e[132]!==t||e[133]!==Lt||e[134]!==an?(dn=S=>{var ze;if(Rt.current.has(S.pointerId))return;if(S.buttons===0){if(ot.current){Ie(an(S)),gt.current=null;const Ee=qt.current;Ee&&(Ee.style.display="none")}else{Ie(null);const Ee=Lt(S);gt.current=Ee?cn(Ee):null,zt.current!=="down"&&(zt.current="idle");const at=qt.current;if(at)if(Ee){const cr=S.currentTarget.getBoundingClientRect();at.style.display="block",at.style.left=`${S.clientX-cr.left}px`,at.style.top=`${S.clientY-cr.top}px`,at.style.width=`${kn*2}px`,at.style.height=`${kn*2}px`,at.style.background="transparent",at.style.border="1.5px solid rgba(255,255,255,0.6)",at.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"}else at.style.display="none"}return}if(Oe.current){const Ee=an(S);if(!Ee)return;const at=performance.now();if(at-Ye.current<ss)return;Ye.current=at,Ie(Ee),s({type:"input:pinch:move",sessionId:t,payload:Ee});return}if(((ze=Ke.current)==null?void 0:ze.pointerId)===S.pointerId||!Ve.current)return;const k=Lt(S);if(!k)return;const j=k.x-Ve.current.x,me=k.y-Ve.current.y;if(Math.sqrt(j*j+me*me)<Ei)return;const Ae=performance.now();if(Ae-Ye.current<ss)return;Ye.current=Ae,gt.current=cn(k);const V=qt.current;if(V&&V.style.display!=="none"){const Ee=S.currentTarget.getBoundingClientRect();V.style.left=`${S.clientX-Ee.left}px`,V.style.top=`${S.clientY-Ee.top}px`}s({type:"input:touch:move",sessionId:t,payload:k})},e[130]=cn,e[131]=s,e[132]=t,e[133]=Lt,e[134]=an,e[135]=dn):dn=e[135];const Wn=dn;let Kn;e[136]!==s||e[137]!==t?(Kn=S=>{var j;if(Rt.current.delete(S.pointerId))return;if(Oe.current){Oe.current=!1,qe(!1),Ie(null),s({type:"input:pinch:end",sessionId:t,requestId:je()});return}if(Ve.current=null,((j=Ke.current)==null?void 0:j.pointerId)===S.pointerId){s({type:"input:button",sessionId:t,requestId:je(),payload:{name:Ke.current.name,phase:"up"}}),Ke.current=null,st.current=setTimeout(()=>{st.current=null,pe(null)},100);return}zt.current="release",Ce.current={startTime:performance.now()};const k=qt.current;k&&(k.style.width=`${kn*2}px`,k.style.height=`${kn*2}px`,k.style.background="transparent",k.style.border="1.5px solid rgba(255,255,255,0.6)",k.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"),s({type:"input:touch:end",sessionId:t,requestId:je()})},e[136]=s,e[137]=t,e[138]=Kn):Kn=e[138];const Vn=Kn;let Yn;e[139]!==s||e[140]!==t?(Yn=S=>{var k;if(!Rt.current.delete(S.pointerId)){if(Oe.current){Oe.current=!1,qe(!1),Ie(null),s({type:"input:pinch:end",sessionId:t,requestId:je()});return}if(Ve.current=null,((k=Ke.current)==null?void 0:k.pointerId)===S.pointerId){s({type:"input:button",sessionId:t,requestId:je(),payload:{name:Ke.current.name,phase:"up"}}),Ke.current=null,pe(null);return}zt.current="release",Ce.current={startTime:performance.now()},s({type:"input:touch:end",sessionId:t,requestId:je()})}},e[139]=s,e[140]=t,e[141]=Yn):Yn=e[141];const Xn=Yn;let un;e[142]===Symbol.for("react.memo_cache_sentinel")?(un=()=>{$e(null),Ie(null),gt.current=null;const S=qt.current;S&&(S.style.display="none")},e[142]=un):un=e[142];const Gn=un;let Ln;e[143]!==m?(Ln=Ho(m),e[143]=m,e[144]=Ln):Ln=e[144];const{screenPctLeft:gn,screenPctTop:bn,screenPctW:xn,screenPctH:yn}=Ln;let Vt;e[145]!==s||e[146]!==t?(Vt=()=>s({type:"input:button",sessionId:t,requestId:je(),payload:{name:"home"}}),e[145]=s,e[146]=t,e[147]=Vt):Vt=e[147];let Dn;e[148]===Symbol.for("react.memo_cache_sentinel")?(Dn=r.jsx(Rs,{className:"h-4 w-4"}),e[148]=Dn):Dn=e[148];let Yt;e[149]!==Vt?(Yt=r.jsx(Ht,{asChild:!0,children:r.jsx(tt,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":"Home",onClick:Vt,children:Dn})}),e[149]=Vt,e[150]=Yt):Yt=e[150];let fn;e[151]===Symbol.for("react.memo_cache_sentinel")?(fn=r.jsx(Bt,{side:"left",children:r.jsxs("span",{className:"flex items-center gap-3",children:["Home ",r.jsxs(Lr,{children:[r.jsx(rr,{children:"⌘"}),r.jsx(rr,{children:"⇧"}),r.jsx(rr,{children:"U"})]})]})}),e[151]=fn):fn=e[151];let hn;e[152]!==Yt?(hn=r.jsx(r.Fragment,{children:r.jsxs(Ot,{children:[Yt,fn]})}),e[152]=Yt,e[153]=hn):hn=e[153];const wn=hn,Xt=i.useId(),Qn=R?"Changing the software keyboard.":D?"The software keyboard is up.":"The software keyboard is down.";let N;e[154]!==Xt||e[155]!==Qn?(N=r.jsx("span",{id:Xt,role:"status",className:"sr-only",children:Qn}),e[154]=Xt,e[155]=Qn,e[156]=N):N=e[156];const W=R?"Software keyboard — changing it":"Software keyboard";let re;e[157]!==I||e[158]!==R?(re=()=>{R||I()},e[157]=I,e[158]=R,e[159]=re):re=e[159];let P;e[160]!==R?(P=R?r.jsx(or,{className:"h-4 w-4 animate-spin"}):r.jsx(cl,{className:"h-4 w-4"}),e[160]=R,e[161]=P):P=e[161];let Re;e[162]!==Xt||e[163]!==R||e[164]!==D||e[165]!==W||e[166]!==re||e[167]!==P?(Re=r.jsx(Ht,{asChild:!0,children:r.jsx(tt,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":W,"aria-pressed":D,"aria-busy":R,"aria-disabled":R,"aria-describedby":Xt,onClick:re,"data-active":D,children:P})}),e[162]=Xt,e[163]=R,e[164]=D,e[165]=W,e[166]=re,e[167]=P,e[168]=Re):Re=e[168];let B;e[169]!==R?(B=r.jsx(Bt,{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(rr,{children:"⌘"}),r.jsx(rr,{children:"⇧"}),r.jsx(rr,{children:"K"})]})]})}),e[169]=R,e[170]=B):B=e[170];let He;e[171]!==Re||e[172]!==B?(He=r.jsxs(Ot,{children:[Re,B]}),e[171]=Re,e[172]=B,e[173]=He):He=e[173];let Dt;e[174]!==N||e[175]!==He?(Dt=r.jsxs(r.Fragment,{children:[N,He]}),e[174]=N,e[175]=He,e[176]=Dt):Dt=e[176];const Mt=Dt;let et;e[177]!==l||e[178]!==h||e[179]!==a||e[180]!==C?(et=h&&l?r.jsxs(Ot,{children:[r.jsx(Ht,{asChild:!0,children:r.jsx(tt,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:C,"aria-label":"Launch app",onClick:a,children:C?r.jsx(or,{className:"h-4 w-4 animate-spin"}):r.jsx(_s,{className:"h-4 w-4"})})}),r.jsx(Bt,{side:"left",children:C?"Launching…":"Launch app"})]}):null,e[177]=l,e[178]=h,e[179]=a,e[180]=C,e[181]=et):et=e[181];const rt=et;let vn;e[182]===Symbol.for("react.memo_cache_sentinel")?(vn={display:"none"},e[182]=vn):vn=e[182];let pt;e[183]!==z?(pt=r.jsx("canvas",{ref:z,style:vn}),e[183]=z,e[184]=pt):pt=e[184];let Mn;e[185]!==X||e[186]!==o?(Mn=r.jsx(Ys,{open:X,onOpenChange:J,openUrl:o}),e[185]=X,e[186]=o,e[187]=Mn):Mn=e[187];let wt;e[188]===Symbol.for("react.memo_cache_sentinel")?(wt=()=>J(!0),e[188]=wt):wt=e[188];let pn;e[189]!==he.pending||e[190]!==he.select||e[191]!==G?(pn=G&&G.postures.length>1?{postures:G.postures,currentId:G.currentId,pending:he.pending,onSelect:he.select}:void 0,e[189]=he.pending,e[190]=he.select,e[191]=G,e[192]=pn):pn=e[192];let Sn;e[193]!==ie||e[194]!==y?(Sn=y?{position:ie.position,steerable:ie.steerable,reason:ie.reason,pending:ie.pending,onToggle:ie.toggle}:void 0,e[193]=ie,e[194]=y,e[195]=Sn):Sn=e[195];let Rn;e[196]!==K||e[197]!==F||e[198]!==H?(Rn={pending:F,onReboot:K,buttonRef:H},e[196]=K,e[197]=F,e[198]=H,e[199]=Rn):Rn=e[199];let jn;e[200]!==Mt||e[201]!==Ze||e[202]!==nt||e[203]!==it||e[204]!==u||e[205]!==rt||e[206]!==wn||e[207]!==O||e[208]!==pn||e[209]!==Sn||e[210]!==Rn?(jn=r.jsx(Ks,{joined:u,onDeepLink:wt,onScreenshot:it,onRecordToggle:Ze,recordState:O,onRotate:nt,posture:pn,navigationSlot:wn,deviceSlot:Mt,launchSlot:rt,network:Sn,reboot:Rn}),e[200]=Mt,e[201]=Ze,e[202]=nt,e[203]=it,e[204]=u,e[205]=rt,e[206]=wn,e[207]=O,e[208]=pn,e[209]=Sn,e[210]=Rn,e[211]=jn):jn=e[211];let $n;e[212]!==Xn||e[213]!==Jn||e[214]!==Wn||e[215]!==Vn?($n={onPointerDown:Jn,onPointerMove:Wn,onPointerUp:Vn,onPointerCancel:Xn,onPointerLeave:Gn},e[212]=Xn,e[213]=Jn,e[214]=Wn,e[215]=Vn,e[216]=$n):$n=e[216];let $t;e[217]!==Ue||e[218]!==Fe||e[219]!==fr?($t={hovered:Fe,flashed:Ue,onHoverChange:$e,onPress:fr},e[217]=Ue,e[218]=Fe,e[219]=fr,e[220]=$t):$t=e[220];let vt;e[221]!==Le||e[222]!==De||e[223]!==yn||e[224]!==gn||e[225]!==bn||e[226]!==xn?(vt=De&&(()=>{const S=gn/100,k=bn/100,j=xn/100,me=yn/100,Ae=(V,ze)=>({left:`${(S+V*j)*100}%`,top:`${(k+ze*me)*100}%`});return r.jsx(r.Fragment,{children:[De.f0,De.f1].map((V,ze)=>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",...Le?{width:tr*2,height:tr*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:kn*2,height:kn*2,background:"transparent",border:"1.5px solid rgba(255,255,255,0.6)",boxShadow:"0 0 0 1px rgba(0,0,0,0.3)"},...Ae(V.x,V.y)}},ze))})})(),e[221]=Le,e[222]=De,e[223]=yn,e[224]=gn,e[225]=bn,e[226]=xn,e[227]=vt):vt=e[227];let mn;e[228]===Symbol.for("react.memo_cache_sentinel")?(mn=r.jsx("div",{ref:qt,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[228]=mn):mn=e[228];let On;e[229]!==m||e[230]!==_||e[231]!==Y||e[232]!==u||e[233]!==he.folding||e[234]!==_t||e[235]!==Ge||e[236]!==$n||e[237]!==$t||e[238]!==vt?(On=r.jsx(Bo,{screen:_t,chrome:m,formFactor:_,turn:Ge,folding:he.folding,joined:u,fps:Y,containerHandlers:$n,buttons:$t,overlay:vt,areaOverlay:mn}),e[229]=m,e[230]=_,e[231]=Y,e[232]=u,e[233]=he.folding,e[234]=_t,e[235]=Ge,e[236]=$n,e[237]=$t,e[238]=vt,e[239]=On):On=e[239];const er=Fo(m)?"The device frame couldn't be loaded, so its side buttons (lock, volume) are unavailable this session.":void 0;let ir;e[240]!==g||e[241]!==b||e[242]!==c||e[243]!==ut||e[244]!==d||e[245]!==Y||e[246]!==p||e[247]!==f||e[248]!==u||e[249]!==ce||e[250]!==w||e[251]!==er?(ir=r.jsx($r,{joined:u,fps:Y,connected:c,deviceReady:d,bootError:g,bootWaiting:b,servicesOff:w,installing:f,installError:p,decoderUnsupported:ut,keyboardActive:ce,note:er}),e[240]=g,e[241]=b,e[242]=c,e[243]=ut,e[244]=d,e[245]=Y,e[246]=p,e[247]=f,e[248]=u,e[249]=ce,e[250]=w,e[251]=er,e[252]=ir):ir=e[252];let ar;e[253]!==On||e[254]!==ir?(ar=r.jsxs("div",{className:"flex items-start gap-8",children:[On,ir]}),e[253]=On,e[254]=ir,e[255]=ar):ar=e[255];let wr;return e[256]!==pt||e[257]!==Mn||e[258]!==jn||e[259]!==ar?(wr=r.jsxs("div",{role:"region","aria-label":"Device screen",className:"flex items-start justify-center gap-16",children:[pt,Mn,jn,ar]}),e[256]=pt,e[257]=Mn,e[258]=jn,e[259]=ar,e[260]=wr):wr=e[260],wr}function Ai(n){return St.error(n)}function Li(n){return St.error(n)}function Di(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 nr=13,mr=8,ls=16,Mi=.02;function $i(n){const e=ae.c(207),{sessionId:t,buildId:l,send:s,openUrl:o,launchApp:a,connected:c,joined:u,deviceReady:d,installing:f,installed:h,installError:p,bootError:g,bootWaiting:b,servicesOff:w,launching:C,androidButtons:m,binaryFrameHandlerRef:_,clipboardHandlerRef:E,clipboardSupported:A,networkHandlerRef:L,networkSupported:T,onRecordingUploaded:y,rebootPending:x,onReboot:D,restartButtonRef:R,screenWidth:I,screenHeight:F,cornerRadius:K,postures:H,streamRotation:ee,bodyRotation:q,perfHookRef:G}=n,Y=ee===void 0?0:ee,{fps:te,frameCount:Z}=ys();let O;e[0]!==l||e[1]!==y||e[2]!==t?(O={sessionId:t,buildId:l,onRecordingUploaded:y},e[0]=l,e[1]=y,e[2]=t,e[3]=O):O=e[3];const{recordState:z,recordCanvasRef:se,setComposeFrame:ge,startClientRecording:de,stopClientRecording:X}=Ws(O),[J,ue]=i.useState(!1),[fe,$]=i.useState(!1),[ne,ye]=i.useState(!1),[be,Me]=i.useState(!1),[M,U]=i.useState(null),we=i.useRef(M);let he,ce;e[4]!==M?(he=()=>{we.current=M},ce=[M],e[4]=M,e[5]=he,e[6]=ce):(he=e[5],ce=e[6]),i.useEffect(he,ce);const ke=i.useRef(!1),Ue=i.useRef(!1),pe=i.useRef(null),Fe=i.useRef(0),$e=i.useRef(null),Le=i.useRef(null),qe=i.useRef("idle"),De=i.useRef(null),[Ie,Jt]=i.useState(!1),[We,ct]=i.useState(0);let Ke;e[7]===Symbol.for("react.memo_cache_sentinel")?(Ke=new Map,e[7]=Ke):Ke=e[7];const Ft=i.useRef(Ke);let Rt,st;e[8]===Symbol.for("react.memo_cache_sentinel")?(Rt=()=>{const N=Ft.current;return()=>{for(const[W,re]of N)clearTimeout(W),re()}},st=[],e[8]=Rt,e[9]=st):(Rt=e[8],st=e[9]),i.useEffect(Rt,st);let jt;e[10]!==_||e[11]!==q||e[12]!==K||e[13]!==Z||e[14]!==G||e[15]!==Ie||e[16]!==F||e[17]!==I||e[18]!==Y||e[19]!==We||e[20]!==fe?(jt={binaryFrameHandlerRef:_,perfHookRef:G,frameCount:Z,screenWidth:I,screenHeight:F,streamRotation:Y,cornerRadius:K,userWantsLandscape:fe,rotatePending:Ie,bodyRotation:q,turnsAsked:We},e[10]=_,e[11]=q,e[12]=K,e[13]=Z,e[14]=G,e[15]=Ie,e[16]=F,e[17]=I,e[18]=Y,e[19]=We,e[20]=fe,e[21]=jt):jt=e[21];const kt=Uo(jt),{surfaceHostRef:Ve,containerRef:Oe,decoderRef:ot,videoSizeRef:Ye,needsCSSRotationRef:qt,screenTurnRef:gt,screenTurn:zt,decoderUnsupported:Ce,totalTurn:Pe,spinning:bt}=kt,en=i.useRef(!1);let Ct,Ut;e[22]!==bt?(Ut=()=>{en.current=bt},Ct=[bt],e[22]=bt,e[23]=Ct,e[24]=Ut):(Ct=e[23],Ut=e[24]),i.useLayoutEffect(Ut,Ct);let ve;e[25]!==ot||e[26]!==se||e[27]!==Y||e[28]!==Pe||e[29]!==Ye?(ve=()=>{var $n;const N=se.current,W=($n=ot.current)==null?void 0:$n.surface,re=Ye.current;if(!N||!W||!re)return;const P=N.getContext("2d");if(!P)return;const Re=re.width,B=re.height,He=Pe,{picW:Dt,picH:Mt,scale:et,left:rt,top:vn}=ws(N.width,N.height,Re,B,He);P.clearRect(0,0,N.width,N.height),P.save(),P.translate(rt+Dt*et/2,vn+Mt*et/2),P.scale(et,et),P.rotate(He*Math.PI/180),P.drawImage(W,-Re/2,-B/2,Re,B),P.restore();const pt=Wo(Re,B,He,Y);P.save(),P.translate(rt+Dt*et/2,vn+Mt*et/2),P.scale(et,et),P.rotate(pt.turn*Math.PI/180),P.translate(-pt.width/2,-pt.height/2);const Mn=Math.max(pt.width,pt.height),wt=Mn>Vr?Mn/Vr:1,pn=nr*wt,Sn=mr*wt,Rn=we.current;if(Rn)for(const $t of[Rn.f0,Rn.f1]){const vt=$t.x*pt.width,mn=$t.y*pt.height;ke.current?(P.beginPath(),P.arc(vt,mn,Sn,0,Math.PI*2),P.fillStyle="rgba(255,255,255,0.92)",P.fill(),P.strokeStyle="rgba(0,0,0,0.2)",P.lineWidth=wt,P.stroke()):(P.beginPath(),P.arc(vt,mn,pn,0,Math.PI*2),P.strokeStyle="rgba(0,0,0,0.3)",P.lineWidth=3*wt,P.stroke(),P.beginPath(),P.arc(vt,mn,pn,0,Math.PI*2),P.strokeStyle="rgba(255,255,255,0.65)",P.lineWidth=1.5*wt,P.stroke())}const jn=Le.current;if(jn){const $t=jn.x*pt.width,vt=jn.y*pt.height,mn=qe.current,On=De.current;if(mn==="down")P.beginPath(),P.arc($t,vt,Sn,0,Math.PI*2),P.fillStyle="rgba(255,255,255,0.92)",P.fill(),P.strokeStyle="rgba(0,0,0,0.2)",P.lineWidth=wt,P.stroke();else if(mn==="release"&&On){const er=Math.min((performance.now()-On.startTime)/350,1);P.beginPath(),P.arc($t,vt,Sn+26*wt*er,0,Math.PI*2),P.strokeStyle=`rgba(255,255,255,${(1-er)*.55})`,P.lineWidth=1.5*wt,P.stroke(),er>=1&&(qe.current="idle",De.current=null)}else P.beginPath(),P.arc($t,vt,pn,0,Math.PI*2),P.strokeStyle="rgba(0,0,0,0.3)",P.lineWidth=3*wt,P.stroke(),P.beginPath(),P.arc($t,vt,pn,0,Math.PI*2),P.strokeStyle="rgba(255,255,255,0.65)",P.lineWidth=1.5*wt,P.stroke()}P.restore()},e[25]=ot,e[26]=se,e[27]=Y,e[28]=Pe,e[29]=Ye,e[30]=ve):ve=e[30];const dt=ve;let Xe,_t;e[31]!==dt||e[32]!==ge?(Xe=()=>{ge(dt)},_t=[dt,ge],e[31]=dt,e[32]=ge,e[33]=Xe,e[34]=_t):(Xe=e[33],_t=e[34]),i.useLayoutEffect(Xe,_t);let xe;e[35]!==ot||e[36]!==Pe||e[37]!==Ye?(xe=()=>{var He;const N=(He=ot.current)==null?void 0:He.surface,W=Ye.current;if(!N||!W)return;const re=document.createElement("canvas"),P=re.getContext("2d");if(!P)return;const Re=Pe,B=Pr(W.width,W.height,Re);re.width=B.width,re.height=B.height,P.translate(re.width/2,re.height/2),P.rotate(Re*Math.PI/180),P.drawImage(N,-W.width/2,-W.height/2,W.width,W.height),re.toBlob(zi,"image/png")},e[35]=ot,e[36]=Pe,e[37]=Ye,e[38]=xe):xe=e[38];const _e=xe;let tn;e[39]!==se||e[40]!==z||e[41]!==de||e[42]!==X||e[43]!==Pe||e[44]!==Ye?(tn=()=>{if(z==="idle"){const N=se.current;if(!N)return;const W=Ye.current;if(!W)return;const re=Pr(W.width,W.height,Pe);N.width=re.width,N.height=re.height,de()}else z==="recording"&&X()},e[39]=se,e[40]=z,e[41]=de,e[42]=X,e[43]=Pe,e[44]=Ye,e[45]=tn):tn=e[45];const ut=tn,{pending:xt,select:Ge}=Xs(s,t,H);let nn,Qe;e[46]!==Ie?(nn=()=>{if(!Ie)return;const N=setTimeout(()=>Jt(!1),400);return()=>clearTimeout(N)},Qe=[Ie],e[46]=Ie,e[47]=nn,e[48]=Qe):(nn=e[47],Qe=e[48]),i.useEffect(nn,Qe);const rn=i.useRef(!1);let Wt;e[49]===Symbol.for("react.memo_cache_sentinel")?(Wt=()=>{if(!rn.current){rn.current=!0;return}Jt(!1)},e[49]=Wt):Wt=e[49];let Nt;e[50]!==F||e[51]!==I||e[52]!==Y?(Nt=[Y,I,F],e[50]=F,e[51]=I,e[52]=Y,e[53]=Nt):Nt=e[53],i.useEffect(Wt,Nt);const sn=i.useRef(!1);let Kt;e[54]!==q||e[55]!==s||e[56]!==t?(Kt=()=>{if(q!==void 0){ct(qi);const W=()=>s({type:"input:rotate",sessionId:t,payload:{direction:"clockwise"}}),re=setTimeout(()=>{Ft.current.delete(re),W()},Ko);Ft.current.set(re,W);return}const N=!sn.current;sn.current=N,Jt(!0),s({type:"input:rotate",sessionId:t,payload:{orientation:N?"landscape":"portrait"}}),$(N)},e[54]=q,e[55]=s,e[56]=t,e[57]=Kt):Kt=e[57];const lt=Kt,Tt=i.useRef(null);let it,Et;e[58]!==s||e[59]!==t?(it=()=>{Tt.current=()=>{sn.current&&s({type:"input:rotate",sessionId:t,payload:{orientation:"portrait"}})}},Et=[s,t],e[58]=s,e[59]=t,e[60]=it,e[61]=Et):(it=e[60],Et=e[61]),i.useEffect(it,Et);let Ze,yt;e[62]===Symbol.for("react.memo_cache_sentinel")?(Ze=()=>()=>{var N;(N=Tt.current)==null||N.call(Tt)},yt=[],e[62]=Ze,e[63]=yt):(Ze=e[62],yt=e[63]),i.useEffect(Ze,yt);let It;e[64]!==s||e[65]!==t?(It=(N,W)=>{s({type:"input:key",sessionId:t,requestId:je(),payload:{code:N,modifiers:W}})},e[64]=s,e[65]=t,e[66]=It):It=e[66];const nt=It;let on;e[67]!==E||e[68]!==A||e[69]!==ne||e[70]!==s||e[71]!==nt||e[72]!==t?(on={sessionId:t,send:s,active:ne,supported:A,handlerRef:E,sendChord:nt,onError:Fi},e[67]=E,e[68]=A,e[69]=ne,e[70]=s,e[71]=nt,e[72]=t,e[73]=on):on=e[73],Gs(on);let ft;e[74]!==d||e[75]!==L||e[76]!==T||e[77]!==s||e[78]!==t?(ft={sessionId:t,send:s,supported:T,deviceReady:d,handlerRef:L,onError:Bi},e[74]=d,e[75]=L,e[76]=T,e[77]=s,e[78]=t,e[79]=ft):ft=e[79];const Je=Vs(ft);let ht,Pt;e[80]!==A||e[81]!==ut||e[82]!==lt||e[83]!==_e||e[84]!==ne||e[85]!==s||e[86]!==t?(ht=()=>{const N=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),W=B=>{if(B.code==="AltLeft"||B.code==="AltRight"){Ue.current=!0;return}if(B.metaKey){const Dt=document.activeElement;if(!Dt||Dt.tagName!=="INPUT"&&Dt.tagName!=="TEXTAREA"){if(!B.shiftKey&&B.code==="KeyK"){B.preventDefault(),ue(!0);return}if(!B.shiftKey&&B.code==="KeyS"){B.preventDefault(),_e();return}if(B.shiftKey&&B.code==="KeyY"){B.preventDefault(),ut();return}if(B.shiftKey&&B.code==="KeyO"){B.preventDefault(),B.repeat||lt();return}}}if(!ne||N.has(B.code)||A&&Or(B))return;B.preventDefault();const He=(B.shiftKey?2:0)|(B.ctrlKey?1:0)|(B.metaKey?8:0);s({type:"input:key",sessionId:t,requestId:je(),payload:{code:B.code,modifiers:He}})},re=()=>{ke.current&&(ke.current=!1,Me(!1),s({type:"input:pinch:end",sessionId:t,requestId:je()})),Ue.current=!1,U(null)},P=B=>{(B.code==="AltLeft"||B.code==="AltRight")&&re()},Re=()=>{Ue.current&&re()};return window.addEventListener("keydown",W),window.addEventListener("keyup",P),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",W),window.removeEventListener("keyup",P),window.removeEventListener("blur",Re)}},Pt=[ne,A,s,t,_e,ut,lt],e[80]=A,e[81]=ut,e[82]=lt,e[83]=_e,e[84]=ne,e[85]=s,e[86]=t,e[87]=ht,e[88]=Pt):(ht=e[87],Pt=e[88]),i.useEffect(ht,Pt);let v,Q;e[89]!==Oe||e[90]!==ne||e[91]!==Ve?(v=()=>{if(!ne)return;const N=W=>{const re=Oe.current??Ve.current;re&&!re.contains(W.target)&&ye(!1)};return document.addEventListener("pointerdown",N),()=>document.removeEventListener("pointerdown",N)},Q=[ne,Oe,Ve],e[89]=Oe,e[90]=ne,e[91]=Ve,e[92]=v,e[93]=Q):(v=e[92],Q=e[93]),i.useEffect(v,Q);let Se;e[94]!==qt||e[95]!==Ve?(Se=N=>{const W=Ve.current;return W?Vo({x:N.clientX,y:N.clientY},W.getBoundingClientRect(),qt.current):null},e[94]=qt,e[95]=Ve,e[96]=Se):Se=e[96];const Ne=Se;let Te;e[97]!==gt||e[98]!==Ne?(Te=N=>{const W=Ne(N);return W&&Kr(W,gt.current)},e[97]=gt,e[98]=Ne,e[99]=Te):Te=e[99];const oe=Te,ie=q!==void 0;let _n;e[100]!==ie||e[101]!==Ne||e[102]!==oe?(_n=N=>en.current?null:ie?Ne(N):oe(N),e[100]=ie,e[101]=Ne,e[102]=oe,e[103]=_n):_n=e[103];const At=_n;let Nn;e[104]!==At||e[105]!==oe?(Nn=N=>{const W=At(N),re=oe(N);return!W||!re?null:{sent:Ar(W),shown:Ar(re)}},e[104]=At,e[105]=oe,e[106]=Nn):Nn=e[106];const ln=Nn;let Tn;e[107]!==ie||e[108]!==s||e[109]!==t||e[110]!==At||e[111]!==ln||e[112]!==oe?(Tn=N=>{if(Ue.current){const Re=ln(N);if(!Re)return;ke.current=!0,Me(!0),N.target.setPointerCapture(N.pointerId);const B=$e.current;B&&(B.style.display="none"),U(Re.shown),s({type:"input:pinch:start",sessionId:t,payload:ie?{...Re.sent,space:"frame"}:Re.sent});return}const W=At(N);if(!W)return;ye(!0),pe.current=W,N.target.setPointerCapture(N.pointerId);const re=N.currentTarget.getBoundingClientRect();Le.current=oe(N),qe.current="down",De.current=null;const P=$e.current;P&&(P.style.display="block",P.style.left=`${N.clientX-re.left}px`,P.style.top=`${N.clientY-re.top}px`,P.style.width=`${mr*2}px`,P.style.height=`${mr*2}px`,P.style.background="rgba(255,255,255,0.92)",P.style.border="1.5px solid rgba(0,0,0,0.2)",P.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:ie?{...W,space:"frame"}:W})},e[107]=ie,e[108]=s,e[109]=t,e[110]=At,e[111]=ln,e[112]=oe,e[113]=Tn):Tn=e[113];const Lt=Tn;let En;e[114]!==ie||e[115]!==s||e[116]!==t||e[117]!==At||e[118]!==ln||e[119]!==oe?(En=N=>{var Dt;if(N.buttons===0){if(Ue.current){U(((Dt=ln(N))==null?void 0:Dt.shown)??null),Le.current=null;const vn=$e.current;vn&&(vn.style.display="none");return}const Mt=oe(N),et=N.currentTarget.getBoundingClientRect(),rt=$e.current;Mt?(Le.current=Mt,qe.current!=="down"&&(qe.current="idle"),rt&&(rt.style.display="block",rt.style.left=`${N.clientX-et.left}px`,rt.style.top=`${N.clientY-et.top}px`,rt.style.width=`${nr*2}px`,rt.style.height=`${nr*2}px`,rt.style.background="transparent",rt.style.border="1.5px solid rgba(255,255,255,0.6)",rt.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)")):(Le.current=null,rt&&(rt.style.display="none"));return}if(ke.current){const Mt=ln(N);if(!Mt)return;const et=performance.now();if(et-Fe.current<ls)return;Fe.current=et,U(Mt.shown),s({type:"input:pinch:move",sessionId:t,payload:ie?{...Mt.sent,space:"frame"}:Mt.sent});return}if(!pe.current)return;const W=At(N);if(!W)return;const re=W.x-pe.current.x,P=W.y-pe.current.y;if(Math.sqrt(re*re+P*P)<Mi)return;const Re=performance.now();if(Re-Fe.current<ls)return;Fe.current=Re;const B=N.currentTarget.getBoundingClientRect();Le.current=oe(N);const He=$e.current;He&&He.style.display!=="none"&&(He.style.left=`${N.clientX-B.left}px`,He.style.top=`${N.clientY-B.top}px`),s({type:"input:touch:move",sessionId:t,payload:ie?{...W,space:"frame"}:W})},e[114]=ie,e[115]=s,e[116]=t,e[117]=At,e[118]=ln,e[119]=oe,e[120]=En):En=e[120];const an=En;let In;e[121]!==s||e[122]!==t?(In=()=>{if(ke.current){ke.current=!1,Me(!1),U(null),s({type:"input:pinch:end",sessionId:t,requestId:je()});return}pe.current=null,qe.current="release",De.current={startTime:performance.now()};const N=$e.current;N&&(N.style.width=`${nr*2}px`,N.style.height=`${nr*2}px`,N.style.background="transparent",N.style.border="1.5px solid rgba(255,255,255,0.6)",N.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"),s({type:"input:touch:end",sessionId:t,requestId:je()})},e[121]=s,e[122]=t,e[123]=In):In=e[123];const cn=In;let Pn;e[124]!==s||e[125]!==t?(Pn=()=>{if(ke.current){ke.current=!1,Me(!1),U(null),s({type:"input:pinch:end",sessionId:t,requestId:je()});return}pe.current=null,qe.current="release",De.current={startTime:performance.now()},s({type:"input:touch:end",sessionId:t,requestId:je()})},e[124]=s,e[125]=t,e[126]=Pn):Pn=e[126];const Jn=Pn;let An;e[127]===Symbol.for("react.memo_cache_sentinel")?(An=()=>{U(null),Le.current=null;const N=$e.current;N&&(N.style.display="none")},e[127]=An):An=e[127];const fr=An;let dn,Wn;if(e[128]!==m||e[129]!==s||e[130]!==t){const N=["home","back","recent_apps"],W=["volume_up","volume_down","power"],re=Hi,P=Re=>r.jsx(r.Fragment,{children:Re.map(B=>m==null?void 0:m.find(He=>He.name===B)).filter(Oi).map(B=>r.jsxs(Ot,{children:[r.jsx(Ht,{asChild:!0,children:r.jsx(tt,{variant:"ghost",size:"icon",className:"h-8 w-8","aria-label":B.accessibilityTitle,onClick:()=>s({type:"input:button",sessionId:t,requestId:je(),payload:{name:B.name}}),children:re(B.name)})}),r.jsx(Bt,{side:"left",children:B.accessibilityTitle})]},B.name))});dn=P(N),Wn=P(W),e[128]=m,e[129]=s,e[130]=t,e[131]=dn,e[132]=Wn}else dn=e[131],Wn=e[132];const Kn=Wn;let Vn;e[133]!==l||e[134]!==h||e[135]!==f||e[136]!==a||e[137]!==C?(Vn=h&&l?r.jsxs(Ot,{children:[r.jsx(Ht,{asChild:!0,children:r.jsx(tt,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:C||f,"aria-label":"Launch app",onClick:a,children:C?r.jsx(or,{className:"h-4 w-4 animate-spin"}):r.jsx(_s,{className:"h-4 w-4"})})}),r.jsx(Bt,{side:"left",children:C?"Launching…":f?"Installing…":"Launch app"})]}):null,e[133]=l,e[134]=h,e[135]=f,e[136]=a,e[137]=C,e[138]=Vn):Vn=e[138];const Yn=Vn;let Xn;e[139]===Symbol.for("react.memo_cache_sentinel")?(Xn={display:"none"},e[139]=Xn):Xn=e[139];let un;e[140]!==se?(un=r.jsx("canvas",{ref:se,style:Xn}),e[140]=se,e[141]=un):un=e[141];let Gn;e[142]!==J||e[143]!==o?(Gn=r.jsx(Ys,{open:J,onOpenChange:ue,openUrl:o}),e[142]=J,e[143]=o,e[144]=Gn):Gn=e[144];let Ln;e[145]===Symbol.for("react.memo_cache_sentinel")?(Ln=()=>ue(!0),e[145]=Ln):Ln=e[145];let gn;e[146]!==Ge||e[147]!==xt||e[148]!==H?(gn=H&&H.postures.length>1?{postures:H.postures,currentId:H.currentId,pending:xt,onSelect:Ge}:void 0,e[146]=Ge,e[147]=xt,e[148]=H,e[149]=gn):gn=e[149];let bn;e[150]!==Je||e[151]!==T?(bn=T?{position:Je.position,steerable:Je.steerable,reason:Je.reason,pending:Je.pending,onToggle:Je.toggle}:void 0,e[150]=Je,e[151]=T,e[152]=bn):bn=e[152];let xn;e[153]!==D||e[154]!==x||e[155]!==R?(xn={pending:x,onReboot:D,buttonRef:R},e[153]=D,e[154]=x,e[155]=R,e[156]=xn):xn=e[156];let yn;e[157]!==Kn||e[158]!==ut||e[159]!==lt||e[160]!==_e||e[161]!==u||e[162]!==Yn||e[163]!==dn||e[164]!==z||e[165]!==gn||e[166]!==bn||e[167]!==xn?(yn=r.jsx(Ks,{joined:u,onDeepLink:Ln,onScreenshot:_e,onRecordToggle:ut,recordState:z,onRotate:lt,posture:gn,navigationSlot:dn,deviceSlot:Kn,launchSlot:Yn,network:bn,reboot:xn}),e[157]=Kn,e[158]=ut,e[159]=lt,e[160]=_e,e[161]=u,e[162]=Yn,e[163]=dn,e[164]=z,e[165]=gn,e[166]=bn,e[167]=xn,e[168]=yn):yn=e[168];let Vt;e[169]!==Jn||e[170]!==Lt||e[171]!==an||e[172]!==cn?(Vt={onPointerDown:Lt,onPointerMove:an,onPointerUp:cn,onPointerCancel:Jn,onPointerLeave:fr},e[169]=Jn,e[170]=Lt,e[171]=an,e[172]=cn,e[173]=Vt):Vt=e[173];let Dn;e[174]===Symbol.for("react.memo_cache_sentinel")?(Dn=r.jsx("div",{ref:$e,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[174]=Dn):Dn=e[174];let Yt;e[175]!==be||e[176]!==M||e[177]!==zt?(Yt=M&&r.jsx(r.Fragment,{children:[M.f0,M.f1].map(N=>Kr(N,(360-zt)%360)).map((N,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:`${N.x*100}%`,top:`${N.y*100}%`,...be?{width:mr*2,height:mr*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:nr*2,height:nr*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[175]=be,e[176]=M,e[177]=zt,e[178]=Yt):Yt=e[178];let fn;e[179]!==Yt?(fn=r.jsxs(r.Fragment,{children:[Dn,Yt]}),e[179]=Yt,e[180]=fn):fn=e[180];let hn;e[181]!==d||e[182]!==xt||e[183]!==kt||e[184]!==Vt||e[185]!==fn?(hn=r.jsx(Yo,{screen:kt,deviceReady:d,posturePending:xt,surfaceHandlers:Vt,overlay:fn}),e[181]=d,e[182]=xt,e[183]=kt,e[184]=Vt,e[185]=fn,e[186]=hn):hn=e[186];let wn;e[187]!==g||e[188]!==b||e[189]!==c||e[190]!==Ce||e[191]!==d||e[192]!==te||e[193]!==p||e[194]!==f||e[195]!==u||e[196]!==ne||e[197]!==w?(wn=r.jsx($r,{joined:u,fps:te,connected:c,deviceReady:d,bootError:g,bootWaiting:b,servicesOff:w,installing:f,installError:p,decoderUnsupported:Ce,keyboardActive:ne}),e[187]=g,e[188]=b,e[189]=c,e[190]=Ce,e[191]=d,e[192]=te,e[193]=p,e[194]=f,e[195]=u,e[196]=ne,e[197]=w,e[198]=wn):wn=e[198];let Xt;e[199]!==hn||e[200]!==wn?(Xt=r.jsxs("div",{className:"flex items-start gap-8",children:[hn,wn]}),e[199]=hn,e[200]=wn,e[201]=Xt):Xt=e[201];let Qn;return e[202]!==un||e[203]!==Gn||e[204]!==yn||e[205]!==Xt?(Qn=r.jsxs("div",{role:"region","aria-label":"Device screen",className:"flex items-start justify-center gap-16",children:[un,Gn,yn,Xt]}),e[202]=un,e[203]=Gn,e[204]=yn,e[205]=Xt,e[206]=Qn):Qn=e[206],Qn}function Oi(n){return n!==void 0}function Hi(n){return n==="back"?r.jsx(dl,{className:"h-4 w-4"}):n==="recent_apps"?r.jsx(Ro,{className:"h-4 w-4"}):n==="volume_up"?r.jsx(Vl,{className:"h-4 w-4"}):n==="volume_down"?r.jsx(Kl,{className:"h-4 w-4"}):n==="power"?r.jsx(Hl,{className:"h-4 w-4"}):r.jsx(Rs,{className:"h-4 w-4"})}function Bi(n){return St.error(n)}function Fi(n){return St.error(n)}function qi(n){return n+1}function zi(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 Ui(n,e){const t=new DataView(n),l=Math.floor(n.byteLength/2),s=Math.floor(l/e),o=[];for(let a=0;a<e;a++)o.push(new Float32Array(s));for(let a=0;a<s;a++)for(let c=0;c<e;c++){const u=t.getInt16((a*e+c)*2,!0);o[c][a]=u/32768}return o}const is=44100,Er=2,as=.06,Wi=.3;function Ki(){const n=ae.c(5),e=i.useRef(null),t=i.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({sampleRate:is}),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 _;const h=s();if(!h)return;h.state==="suspended"&&h.resume();const p=Ui(f,Er),g=((_=p[0])==null?void 0:_.length)??0;if(g===0)return;const b=h.createBuffer(Er,g,is);for(let E=0;E<Er;E++)b.getChannelData(E).set(p[E]);const w=h.createBufferSource();w.buffer=b,w.connect(h.destination);const C=h.currentTime;let m=t.current;(m<C+.005||m>C+Wi+as)&&(m=C+as),w.start(m),t.current=m+b.duration},n[1]=o):o=n[1];const a=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]),i.useEffect(c,u);let d;return n[4]===Symbol.for("react.memo_cache_sentinel")?(d={pushFrame:a},n[4]=d):d=n[4],d}const Vi=2e4;function Yi(n){const e=ae.c(32),{sessionId:t,deviceId:l,deviceReady:s,send:o,handlerRef:a,onShutdownComplete:c,onError:u}=n,[d,f]=i.useState(!1),h=i.useRef(null),p=i.useRef(c),g=i.useRef(u);let b,w;e[0]!==c?(b=()=>{p.current=c},w=[c],e[0]=c,e[1]=b,e[2]=w):(b=e[1],w=e[2]),i.useEffect(b,w);let C,m;e[3]!==u?(C=()=>{g.current=u},m=[u],e[3]=u,e[4]=C,e[5]=m):(C=e[4],m=e[5]),i.useEffect(C,m);let _;e[6]!==s||e[7]!==t?(_={sessionId:t,deviceReady:s},e[6]=s,e[7]=t,e[8]=_):_=e[8];const[E,A]=i.useState(_);(E.sessionId!==t||E.deviceReady!==s)&&(A({sessionId:t,deviceReady:s}),(E.sessionId!==t||!s)&&f(!1));let L;e[9]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{h.current=null},e[9]=L):L=e[9];let T;e[10]!==t?(T=[t],e[10]=t,e[11]=T):T=e[11],i.useEffect(L,T);let y,x;e[12]!==s?(y=()=>{s||(h.current=null)},x=[s],e[12]=s,e[13]=y,e[14]=x):(y=e[13],x=e[14]),i.useEffect(y,x);let D,R;e[15]!==a?(D=()=>(a.current=Z=>{if(Z.requestId===h.current){if(h.current=null,f(!1),Z.type==="device:shutdown-error"){g.current(`The device was not restarted. ${Z.message}`);return}p.current()}},()=>{a.current=void 0}),R=[a],e[15]=a,e[16]=D,e[17]=R):(D=e[16],R=e[17]),i.useEffect(D,R);const[I,F]=i.useState(null);let K,H;e[18]!==d?(K=()=>{F(d?h.current:null)},H=[d],e[18]=d,e[19]=K,e[20]=H):(K=e[19],H=e[20]),i.useEffect(K,H);let ee,q;e[21]!==I?(ee=()=>{if(I===null)return;const Z=setTimeout(()=>{h.current===I&&(f(!1),g.current("The device has not answered the restart yet. If its answer arrives tapflow will finish restarting it; if nothing changes, press Restart again."))},Vi);return()=>clearTimeout(Z)},q=[I],e[21]=I,e[22]=ee,e[23]=q):(ee=e[22],q=e[23]),i.useEffect(ee,q);let G;e[24]!==l||e[25]!==d||e[26]!==o||e[27]!==t?(G=()=>{if(d)return;const Z=je();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]=G):G=e[28];const Y=G;let te;return e[29]!==d||e[30]!==Y?(te={pending:d,reboot:Y},e[29]=d,e[30]=Y,e[31]=te):te=e[31],te}const cs={"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 Xi(n){const e=n!==void 0&&Object.hasOwn(cs,n)?n:"channel-unavailable";return{key:e,notice:cs[e]}}function Gi(n){const e=ae.c(130),{sessionId:t,deviceId:l,formFactor:s,platform:o,buildId:a,resetMode:c,onRecordingUploaded:u,onSessionEnded:d}=n,f=o===void 0?"ios":o,h=i.useRef(Ji),p=i.useRef(!1);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={pending:0,appInstalled:!1},e[0]=g):g=e[0];const b=i.useRef(g),{perfMode:w,visible:C}=ti(),m=i.useRef(null),_=i.useRef(null);let E;e[1]===Symbol.for("react.memo_cache_sentinel")?(E=[],e[1]=E):E=e[1];const A=i.useRef(E);let L;e[2]===Symbol.for("react.memo_cache_sentinel")?(L={onFrameBegin:()=>{var v;return(v=m.current)==null?void 0:v.onFrameBegin()},onFrameEnd:v=>{var Ne,Te;const Q=A.current.shift()??null,Se=Q?{...v,capturedAt:Q.capturedAt,relayedAt:Q.relayedAt}:v;(Ne=m.current)==null||Ne.onFrameEnd(Se),(Te=_.current)==null||Te.call(_,Se)}},e[2]=L):L=e[2],i.useRef(L);const[T,y]=i.useState(!1),[x,D]=i.useState(!1),[R,I]=i.useState(!1),[F,K]=i.useState(null),[H,ee]=i.useState(null);let q;e[3]===Symbol.for("react.memo_cache_sentinel")?(q=v=>{ee(Q=>Q&&Q.width===v.width&&Q.height===v.height?Q:v)},e[3]=q):q=e[3];const G=q;let Y;e[4]===Symbol.for("react.memo_cache_sentinel")?(Y={postures:[],currentId:null},e[4]=Y):Y=e[4];const[te,Z]=i.useState(Y),[O,z]=i.useState(!1),[se,ge]=i.useState(!1),[de,X]=i.useState(null),[J,ue]=i.useState(null),[fe,$]=i.useState(null),[ne,ye]=i.useState(!1),[be,Me]=i.useState(!1);let M;e[5]===Symbol.for("react.memo_cache_sentinel")?(M=[],e[5]=M):M=e[5];const[U,we]=i.useState(M);let he;e[6]===Symbol.for("react.memo_cache_sentinel")?(he=new Set,e[6]=he):he=e[6];const ce=i.useRef(he),ke=i.useRef(null);let Ue;e[7]===Symbol.for("react.memo_cache_sentinel")?(Ue=new Set,e[7]=Ue):Ue=e[7];const pe=i.useRef(Ue);let Fe;e[8]===Symbol.for("react.memo_cache_sentinel")?(Fe=new Set,e[8]=Fe):Fe=e[8];const $e=i.useRef(Fe);let Le;e[9]===Symbol.for("react.memo_cache_sentinel")?(Le=new Set,e[9]=Le):Le=e[9];const qe=i.useRef(Le),[De,Ie]=i.useState(!1),[Jt,We]=i.useState(!1),ct=i.useRef(null);let Ke,Ft;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ke=()=>()=>{ct.current&&clearTimeout(ct.current)},Ft=[],e[10]=Ke,e[11]=Ft):(Ke=e[10],Ft=e[11]),i.useEffect(Ke,Ft);const Rt=i.useRef(void 0),st=i.useRef(void 0),jt=i.useRef(void 0),kt=i.useRef(void 0);let Ve;e[12]!==l||e[13]!==t?(Ve=v=>{const Q=je();ce.current.add(Q),ke.current=Q,h.current({type:"device:boot",sessionId:t,requestId:Q,payload:{deviceId:l,resetMode:v,acceptH264:Go(),secureContext:window.isSecureContext}})},e[12]=l,e[13]=t,e[14]=Ve):Ve=e[14];const Oe=Ve,{pushFrame:ot}=Ki();let Ye;e[15]!==x||e[16]!==a||e[17]!==se||e[18]!==d||e[19]!==c||e[20]!==Oe||e[21]!==t?(Ye=v=>{var Q,Se,Ne,Te;if(!("sessionId"in v&&v.sessionId!==t)){if(v.type==="session:joined"){b.current={pending:0,appInstalled:!1},y(!0),D(!1),we(v.capabilities??[]);const oe=p.current?"app-only":c;p.current=!0,ce.current.clear(),Oe(oe)}if(v.type==="session:agent-away"){D(!0),K(null),I(!1);return}if(v.type==="session:terminated"){d==null||d(v.reason);return}if(v.type==="session:rebound"){I(!1),K(null),z(!1),X(null),ue(null),$(null),Me(!1),We(!1),ct.current&&clearTimeout(ct.current),Ie(!1),A.current=[],we(v.capabilities);const oe=x;D(!1),b.current={pending:b.current.pending+1,appInstalled:b.current.pending>0?b.current.appInstalled:se},p.current=!0,Oe("app-only"),oe||St.info("The agent restarted — reconnecting to the device.");return}if(v.type==="device:boot-error"){if(v.requestId!==void 0&&v.requestId!==ke.current||x)return;b.current={pending:0,appInstalled:!1},$(null),ue(v.message)}if(v.type==="device:boot-waiting"&&v.requestId===ke.current&&($(v.reason??"host-booting"),I(!1),ue(null)),v.type==="input:error"){if(x)return;const{key:oe,notice:ie}=Xi(v.reason);v.reason!==void 0&&v.reason!==oe&&console.debug(`[tapflow] unrecognised input:error reason "${v.reason}", treated as ${oe}`),ie?St.error(ie.title,{id:`input:${t}:${oe}`,description:v.message?`${ie.action} (${v.message})`:ie.action,duration:6e3}):console.debug(`[tapflow] input refused, shown nowhere: ${oe}${v.message?` — ${v.message}`:""}`)}if(v.type==="device:booting"&&($(null),ye(!1),I(!1),z(!1),ge(!1),X(null),ue(null),Z({postures:[],currentId:null}),$e.current.clear(),qe.current.clear(),K(null)),v.type==="device:ready"){if(I(!0),$(null),v.requestId!==void 0&&!ce.current.delete(v.requestId))return;const oe=(Q=v.payload)==null?void 0:Q.serviceTier;if(oe!==void 0&&ye(oe!=="unsupported"&&oe.name==="slim"),b.current.pending>0){const{appInstalled:ie}=b.current;if(b.current={pending:b.current.pending-1,appInstalled:ie},ie){ge(!0);return}}if(a){z(!0);const ie=je();$e.current.add(ie),h.current({type:"app:install",sessionId:t,requestId:ie,buildId:a})}}if(v.type==="app:install-done"||v.type==="app:install-error"){if(!$e.current.delete(v.requestId))return;z(!1),v.type==="app:install-done"?ge(!0):X(v.message)}if(v.type==="app:launch-done"||v.type==="app:launch-error"){if(!qe.current.delete(v.requestId))return;Me(!1),v.type==="app:launch-error"&&St.error("The app did not launch",{description:v.message})}if(v.type==="session:chrome"&&K(v.payload),v.type==="device:postures"&&Z(v.payload),v.type==="keyboard:toggled"){const{visible:oe}=v.payload;Ie(oe),We(!1),ct.current&&clearTimeout(ct.current)}if(v.type==="network:state"||v.type==="network:error"){(Se=jt.current)==null||Se.call(jt,v);return}if(v.type==="device:shutdown-done"||v.type==="device:shutdown-error"){(Ne=kt.current)==null||Ne.call(kt,v);return}if((v.type==="clipboard:data"||v.type==="clipboard:write-done"||v.type==="clipboard:error")&&((Te=st.current)==null||Te.call(st,v)),v.type==="open-url:done"||v.type==="open-url:error"){if(!pe.current.delete(v.requestId))return;v.type==="open-url:done"?St.success("Deeplink opened"):St.error(v.message)}if(v.type==="error")switch(v.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]=x,e[16]=a,e[17]=se,e[18]=d,e[19]=c,e[20]=Oe,e[21]=t,e[22]=Ye):Ye=e[22];const qt=Ye;let gt;e[23]!==ot?(gt=v=>{var Te;const Q=Qo(v);if(Q&&Q.codec===Zo){ot(v.slice(Yr));return}Q&&Q.codec===Jo||A.current.push(Q);const Se=Q?v.slice(Yr):v,Ne=Q?{codec:Q.codec,keyframe:Q.keyframe,capturedAt:Q.capturedAt,relayedAt:Q.relayedAt}:void 0;(Te=Rt.current)==null||Te.call(Rt,Se,Ne)},e[23]=ot,e[24]=gt):gt=e[24];const zt=gt,{send:Ce,connected:Pe}=bs(qt,zt);let bt;e[25]!==Ce?(bt=()=>{h.current=Ce},e[25]=Ce,e[26]=bt):bt=e[26],i.useLayoutEffect(bt);let en,Ct;e[27]!==Pe||e[28]!==Ce||e[29]!==t?(en=()=>{Pe&&Ce({type:"session:start",sessionId:t,clientKind:"dashboard"})},Ct=[Pe,Ce,t],e[27]=Pe,e[28]=Ce,e[29]=t,e[30]=en,e[31]=Ct):(en=e[30],Ct=e[31]),i.useEffect(en,Ct);const Ut=F!==null&&"framePng"in F?F:null,ve=F!==null&&!("framePng"in F)?F:null;let dt;e[32]!==ve||e[33]!==R||e[34]!==s||e[35]!==f||e[36]!==Ut||e[37]!==H?(dt=Ut??(R&&f==="ios"&&!ve?Xo(H??Xr(s,f)):null),e[32]=ve,e[33]=R,e[34]=s,e[35]=f,e[36]=Ut,e[37]=H,e[38]=dt):dt=e[38];const Xe=dt;let _t;e[39]!==Ce||e[40]!==t?(_t=()=>{We(!0),ct.current&&clearTimeout(ct.current),ct.current=setTimeout(()=>{We(!1),St.error("The device did not answer. The software keyboard is where it was, as far as tapflow can tell.")},8e3),Ce({type:"input:keyboard:toggle",sessionId:t})},e[39]=Ce,e[40]=t,e[41]=_t):_t=e[41];const xe=_t;let _e;e[42]!==t?(_e=v=>{const Q=je();pe.current.add(Q),h.current({type:"open-url",sessionId:t,requestId:Q,payload:{url:v}})},e[42]=t,e[43]=_e):_e=e[43];const tn=_e;let ut;e[44]!==a||e[45]!==t?(ut=()=>{if(a===void 0)return;const v=je();qe.current.add(v),Me(!0),h.current({type:"app:launch",sessionId:t,requestId:v,buildId:a})},e[44]=a,e[45]=t,e[46]=ut):ut=e[46];const xt=ut,Ge=i.useRef(null),nn=i.useRef(!1),Qe=i.useRef(!1);let rn;e[47]!==Oe?(rn=()=>{Qe.current=!0,Oe("app-only")},e[47]=Oe,e[48]=rn):rn=e[48];const Wt=rn;let Nt;e[49]!==l||e[50]!==R||e[51]!==Ce||e[52]!==t||e[53]!==Wt?(Nt={sessionId:t,deviceId:l,deviceReady:R,send:Ce,handlerRef:kt,onShutdownComplete:Wt,onError:Zi},e[49]=l,e[50]=R,e[51]=Ce,e[52]=t,e[53]=Wt,e[54]=Nt):Nt=e[54];const{pending:sn,reboot:Kt}=Yi(Nt);let lt,Tt;e[55]!==ve||e[56]!==Xe?(lt=()=>{var Se;const v=!!(Xe??ve),Q=!nn.current&&v;nn.current=v,!(!Q||!Qe.current)&&(Qe.current=!1,document.activeElement===document.body&&((Se=Ge.current)==null||Se.focus()))},Tt=[Xe,ve],e[55]=ve,e[56]=Xe,e[57]=lt,e[58]=Tt):(lt=e[57],Tt=e[58]),i.useEffect(lt,Tt);let it,Et;e[59]!==x||e[60]!==J?(it=()=>{(J||x)&&(Qe.current=!1)},Et=[J,x],e[59]=x,e[60]=J,e[61]=it,e[62]=Et):(it=e[61],Et=e[62]),i.useEffect(it,Et);let Ze;e[63]!==U?(Ze=U.includes("clipboard"),e[63]=U,e[64]=Ze):Ze=e[64];let yt;e[65]!==U?(yt=U.includes("network-control"),e[65]=U,e[66]=yt):yt=e[66];let It;e[67]!==J||e[68]!==fe||e[69]!==a||e[70]!==Pe||e[71]!==R||e[72]!==de||e[73]!==se||e[74]!==O||e[75]!==T||e[76]!==xt||e[77]!==be||e[78]!==xe||e[79]!==u||e[80]!==tn||e[81]!==Kt||e[82]!==sn||e[83]!==Ce||e[84]!==ne||e[85]!==t||e[86]!==Jt||e[87]!==De||e[88]!==Ze||e[89]!==yt?(It={sessionId:t,buildId:a,send:Ce,openUrl:tn,launchApp:xt,connected:Pe,joined:T,deviceReady:R,installing:O,installed:se,installError:de,bootError:J,bootWaiting:fe,servicesOff:ne,launching:be,binaryFrameHandlerRef:Rt,clipboardHandlerRef:st,clipboardSupported:Ze,networkHandlerRef:jt,networkSupported:yt,onRecordingUploaded:u,swKeyboardVisible:De,swKeyboardPending:Jt,onKbdToggle:xe,rebootPending:sn,onReboot:Kt,restartButtonRef:Ge},e[67]=J,e[68]=fe,e[69]=a,e[70]=Pe,e[71]=R,e[72]=de,e[73]=se,e[74]=O,e[75]=T,e[76]=xt,e[77]=be,e[78]=xe,e[79]=u,e[80]=tn,e[81]=Kt,e[82]=sn,e[83]=Ce,e[84]=ne,e[85]=t,e[86]=Jt,e[87]=De,e[88]=Ze,e[89]=yt,e[90]=It):It=e[90];const nt=It;if(!Xe&&!ve){let v;e[91]===Symbol.for("react.memo_cache_sentinel")?(v=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(Qi)}),e[91]=v):v=e[91];let Q;e[92]===Symbol.for("react.memo_cache_sentinel")?(Q={background:"#1c1c1e",borderRadius:"34px",padding:"12px",flexShrink:0},e[92]=Q):Q=e[92];let Se;e[93]!==s||e[94]!==f?(Se=Xr(s,f),e[93]=s,e[94]=f,e[95]=Se):Se=e[95];let Ne;e[96]!==Se?(Ne=r.jsx("div",{"aria-hidden":"true",style:Q,children:r.jsx("div",{"data-testid":"device-skeleton",className:"animate-pulse bg-zinc-700",style:{...Se,borderRadius:"22px"}})}),e[96]=Se,e[97]=Ne):Ne=e[97];let Te;e[98]!==x||e[99]!==J||e[100]!==fe||e[101]!==Pe||e[102]!==R||e[103]!==de||e[104]!==O||e[105]!==T||e[106]!==ne?(Te=r.jsx($r,{joined:T,fps:0,connected:Pe,deviceReady:R,bootError:J,bootWaiting:fe,servicesOff:ne,installing:O,installError:de,decoderUnsupported:!1,keyboardActive:!1,agentAway:x}),e[98]=x,e[99]=J,e[100]=fe,e[101]=Pe,e[102]=R,e[103]=de,e[104]=O,e[105]=T,e[106]=ne,e[107]=Te):Te=e[107];let oe;e[108]!==Ne||e[109]!==Te?(oe=r.jsxs("div",{className:"flex items-start gap-8",children:[Ne,Te]}),e[108]=Ne,e[109]=Te,e[110]=oe):oe=e[110];let ie;return e[111]!==v||e[112]!==oe?(ie=r.jsxs("div",{role:"region","aria-label":"Device screen",className:"flex items-start justify-center gap-16",children:[v,oe]}),e[111]=v,e[112]=oe,e[113]=ie):ie=e[113],ie}const on=void 0;let ft;e[114]!==nt||e[115]!==s||e[116]!==Xe||e[117]!==te?(ft=Xe&&r.jsx(Pi,{...nt,chrome:Xe,formFactor:s,postures:te,perfHookRef:on,onStreamSize:G}),e[114]=nt,e[115]=s,e[116]=Xe,e[117]=te,e[118]=ft):ft=e[118];let Je;e[119]!==ve||e[120]!==nt||e[121]!==te?(Je=ve&&r.jsx($i,{...nt,androidButtons:ve.buttons,screenWidth:ve.screenWidth,screenHeight:ve.screenHeight,cornerRadius:ve.cornerRadius,postures:te,streamRotation:ve.streamRotation,bodyRotation:ve.bodyRotation,perfHookRef:on}),e[119]=ve,e[120]=nt,e[121]=te,e[122]=Je):Je=e[122];let ht;e[123]!==w||e[124]!==C?(ht=!1,e[123]=w,e[124]=C,e[125]=ht):ht=e[125];let Pt;return e[126]!==ft||e[127]!==Je||e[128]!==ht?(Pt=r.jsxs(r.Fragment,{children:[ft,Je,ht]}),e[126]=ft,e[127]=Je,e[128]=ht,e[129]=Pt):Pt=e[129],Pt}function Qi(n,e){return r.jsx("div",{className:"h-8 w-8 rounded-md bg-muted animate-pulse"},e)}function Zi(n){St.error(n)}function Ji(){}const Qs=i.forwardRef((n,e)=>{const t=ae.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=Be("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 a;return t[5]!==s||t[6]!==e||t[7]!==o?(a=r.jsx("textarea",{className:o,ref:e,...s}),t[5]=s,t[6]=e,t[7]=o,t[8]=a):a=t[8],a});Qs.displayName="Textarea";var ea=Object.defineProperty,le=(n,e)=>ea(n,"name",{value:e,configurable:!0});function Zs(n,e){return i.useReducer((t,l)=>e[t][l]??t,n)}le(Zs,"useStateMachine");var dr={Auto:"auto",Always:"always",Scroll:"scroll",Hover:"hover"},ur={Vertical:"vertical",Horizontal:"horizontal"},Cn={LTR:"ltr",RTL:"rtl"},Js="ScrollArea",[eo,sc]=ps(Js),[ta,Zt]=eo(Js),to=i.forwardRef(le(function(e,t){const{__scopeScrollArea:l,type:s=dr.Hover,dir:o,scrollHideDelay:a=600,...c}=e,[u,d]=i.useState(null),[f,h]=i.useState(null),[p,g]=i.useState(null),[b,w]=i.useState(null),[C,m]=i.useState(null),[_,E]=i.useState(0),[A,L]=i.useState(0),[T,y]=i.useState(!1),[x,D]=i.useState(!1),R=qn(t,d),I=Co(o);return r.jsx(ta,{scope:l,type:s,dir:I,scrollHideDelay:a,scrollArea:u,viewport:f,onViewportChange:h,content:p,onContentChange:g,scrollbarX:b,onScrollbarXChange:w,scrollbarXEnabled:T,onScrollbarXEnabledChange:y,scrollbarY:C,onScrollbarYChange:m,scrollbarYEnabled:x,onScrollbarYEnabledChange:D,onCornerWidthChange:E,onCornerHeightChange:L,children:r.jsx(zn.div,{dir:I,...c,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":A+"px",...e.style}})})},"ScrollArea")),no="ScrollAreaViewport",ds=jo(no),na=i.forwardRef(le(function(e,t){const{__scopeScrollArea:l,children:s,nonce:o,disableImplicitContentElement:a,...c}=e,u=Zt(no,l),d=i.useRef(null),f=qn(t,d,u.onViewportChange),h=i.isValidElement(s);return r.jsxs(r.Fragment,{children:[r.jsx(ra,{nonce:o}),r.jsx(zn.div,{"data-radix-scroll-area-viewport":"",...c,ref:f,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a?s:h?r.jsx(ds,{child:s,children:p=>r.jsx(us,{__scopeScrollArea:l,children:p})}):r.jsx(ds,{children:r.jsx(us,{__scopeScrollArea:l,children:s})})})]})},"ScrollAreaViewport")),ra=i.memo(le(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),sa="ScrollAreaContent",us=i.forwardRef(le(function(e,t){const{__scopeScrollArea:l,children:s,...o}=e,a=Zt(sa,l),c=qn(t,a.onContentChange);return r.jsx(zn.div,{...o,ref:c,style:{minWidth:"100%",display:"table",...e.style},children:s})},"ScrollAreaContent")),Un="ScrollAreaScrollbar",ro=i.forwardRef(le(function(e,t){const{forceMount:l,...s}=e,o=Zt(Un,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:c}=o,u=e.orientation===ur.Horizontal;return i.useEffect(()=>(u?a(!0):c(!0),()=>{u?a(!1):c(!1)}),[u,a,c]),o.type===dr.Hover?r.jsx(oa,{...s,ref:t,forceMount:l}):o.type===dr.Scroll?r.jsx(la,{...s,ref:t,forceMount:l}):o.type===dr.Auto?r.jsx(so,{...s,ref:t,forceMount:l}):o.type===dr.Always?r.jsx(Hr,{...s,ref:t,"data-state":"visible"}):null},"ScrollAreaScrollbar")),oa=i.forwardRef(le(function(e,t){const{forceMount:l,...s}=e,o=Zt(Un,e.__scopeScrollArea),[a,c]=i.useState(!1);return i.useEffect(()=>{const u=o.scrollArea;let d=0;if(u){const f=le(()=>{window.clearTimeout(d),c(!0)},"handlePointerEnter"),h=le(()=>{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(_r,{present:l||a,children:r.jsx(so,{"data-state":a?"visible":"hidden",...s,ref:t})})},"ScrollAreaScrollbarHover")),la=i.forwardRef(le(function(e,t){const{forceMount:l,...s}=e,o=Zt(Un,e.__scopeScrollArea),a=e.orientation===ur.Horizontal,c=yr(()=>d("SCROLL_END"),100),[u,d]=Zs("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 i.useEffect(()=>{if(u==="idle"){const f=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(f)}},[u,o.scrollHideDelay,d]),i.useEffect(()=>{const f=o.viewport,h=a?"scrollLeft":"scrollTop";if(f){let p=f[h];const g=le(()=>{const b=f[h];p!==b&&(d("SCROLL"),c()),p=b},"handleScroll");return f.addEventListener("scroll",g),()=>f.removeEventListener("scroll",g)}},[o.viewport,a,d,c]),r.jsx(_r,{present:l||u!=="hidden",children:r.jsx(Hr,{"data-state":u==="hidden"?"hidden":"visible",...s,ref:t,onPointerEnter:Fn(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Fn(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),so=i.forwardRef(le(function(e,t){const l=Zt(Un,e.__scopeScrollArea),{forceMount:s,...o}=e,[a,c]=i.useState(!1),u=e.orientation===ur.Horizontal,d=yr(()=>{if(l.viewport){const f=l.viewport.offsetWidth<l.viewport.scrollWidth,h=l.viewport.offsetHeight<l.viewport.scrollHeight;c(u?f:h)}},10);return lr(l.viewport,d),lr(l.content,d),r.jsx(_r,{present:s||a,children:r.jsx(Hr,{"data-state":a?"visible":"hidden",...o,ref:t})})},"ScrollAreaScrollbarAuto")),Hr=i.forwardRef(le(function(e,t){const{orientation:l=ur.Vertical,...s}=e,o=Zt(Un,e.__scopeScrollArea),a=i.useRef(null),c=i.useRef(0),[u,d]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=Br(u.viewport,u.content),h={...s,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:le(g=>a.current=g,"onThumbChange"),onThumbPointerUp:le(()=>c.current=0,"onThumbPointerUp"),onThumbPointerDown:le(g=>c.current=g,"onThumbPointerDown")};function p(g,b){return ao(g,c.current,u,b)}return le(p,"getScrollPosition"),l===ur.Horizontal?r.jsx(ia,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const g=o.viewport.scrollLeft,b=Mr(g,u,o.dir);a.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollLeft=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollLeft=p(g,o.dir))}}):l===ur.Vertical?r.jsx(aa,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const g=o.viewport.scrollTop,b=Mr(g,u);a.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollTop=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollTop=p(g))}}):null},"ScrollAreaScrollbarVisible")),ia=i.forwardRef(le(function(e,t){const{sizes:l,onSizesChange:s,...o}=e,a=Zt(Un,e.__scopeScrollArea),[c,u]=i.useState(),d=i.useRef(null),f=qn(t,d,a.onScrollbarXChange);return i.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),r.jsx(lo,{"data-orientation":"horizontal",...o,ref:f,sizes:l,style:{bottom:0,left:a.dir===Cn.RTL?"var(--radix-scroll-area-corner-width)":0,right:a.dir===Cn.LTR?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":xr(l)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,p)=>{if(a.viewport){const g=a.viewport.scrollLeft+h.deltaX;e.onWheelScroll(g),qr(g,p)&&h.preventDefault()}},onResize:()=>{d.current&&a.viewport&&c&&s({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:br(c.paddingLeft),paddingEnd:br(c.paddingRight)}})}})},"ScrollAreaScrollbarX")),aa=i.forwardRef(le(function(e,t){const{sizes:l,onSizesChange:s,...o}=e,a=Zt(Un,e.__scopeScrollArea),[c,u]=i.useState(),d=i.useRef(null),f=qn(t,d,a.onScrollbarYChange);return i.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),r.jsx(lo,{"data-orientation":"vertical",...o,ref:f,sizes:l,style:{top:0,right:a.dir===Cn.LTR?0:void 0,left:a.dir===Cn.RTL?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":xr(l)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,p)=>{if(a.viewport){const g=a.viewport.scrollTop+h.deltaY;e.onWheelScroll(g),qr(g,p)&&h.preventDefault()}},onResize:()=>{d.current&&a.viewport&&c&&s({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:br(c.paddingTop),paddingEnd:br(c.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[ca,oo]=eo(Un),lo=i.forwardRef(le(function(e,t){const{__scopeScrollArea:l,sizes:s,hasThumb:o,onThumbChange:a,onThumbPointerUp:c,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:h,onResize:p,...g}=e,b=Zt(Un,l),[w,C]=i.useState(null),m=qn(t,C),_=i.useRef(null),E=i.useRef(""),A=b.viewport,L=s.content-s.viewport,T=sr(h),y=sr(d),x=yr(p,10);function D(R){if(_.current){const I=R.clientX-_.current.left,F=R.clientY-_.current.top;f({x:I,y:F})}}return le(D,"handleDragScroll"),i.useEffect(()=>{const R=le(I=>{const F=I.target;(w==null?void 0:w.contains(F))&&T(I,L)},"handleWheel");return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[A,w,L,T]),i.useEffect(y,[s,y]),lr(w,x),lr(b.content,x),r.jsx(ca,{scope:l,scrollbar:w,hasThumb:o,onThumbChange:sr(a),onThumbPointerUp:sr(c),onThumbPositionChange:y,onThumbPointerDown:sr(u),children:r.jsx(zn.div,{...g,ref:m,style:{position:"absolute",...g.style},onPointerDown:Fn(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),_.current=w.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),D(R))}),onPointerMove:Fn(e.onPointerMove,D),onPointerUp:Fn(e.onPointerUp,R=>{const I=R.target;I.hasPointerCapture(R.pointerId)&&I.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=E.current,b.viewport&&(b.viewport.style.scrollBehavior=""),_.current=null})})})},"ScrollAreaScrollbarImpl")),Dr="ScrollAreaThumb",da=i.forwardRef(le(function(e,t){const{forceMount:l,...s}=e,o=oo(Dr,e.__scopeScrollArea);return r.jsx(_r,{present:l||o.hasThumb,children:r.jsx(ua,{ref:t,...s})})},"ScrollAreaThumb")),ua=i.forwardRef(le(function(e,t){const{__scopeScrollArea:l,style:s,...o}=e,a=Zt(Dr,l),c=oo(Dr,l),{onThumbPositionChange:u}=c,d=qn(t,c.onThumbChange),f=i.useRef(void 0),h=yr(()=>{f.current&&(f.current(),f.current=void 0)},100);return i.useEffect(()=>{const p=a.viewport;if(p){const g=le(()=>{if(h(),!f.current){const b=pa(p,u);f.current=b,u()}},"handleScroll");return u(),p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[a.viewport,h,u]),r.jsx(zn.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:Fn(e.onPointerDownCapture,p=>{const b=p.target.getBoundingClientRect(),w=p.clientX-b.left,C=p.clientY-b.top;c.onThumbPointerDown({x:w,y:C})}),onPointerUp:Fn(e.onPointerUp,c.onThumbPointerUp)})},"ScrollAreaThumbImpl")),io="ScrollAreaCorner",fa=i.forwardRef(le(function(e,t){const l=Zt(io,e.__scopeScrollArea),s=!!(l.scrollbarX&&l.scrollbarY);return l.type!==dr.Scroll&&s?r.jsx(ha,{...e,ref:t}):null},"ScrollAreaCorner")),ha=i.forwardRef(le(function(e,t){const{__scopeScrollArea:l,...s}=e,o=Zt(io,l),[a,c]=i.useState(0),[u,d]=i.useState(0),f=!!(a&&u),{onCornerWidthChange:h,onCornerHeightChange:p}=o;return lr(o.scrollbarX,()=>{var b;const g=((b=o.scrollbarX)==null?void 0:b.offsetHeight)||0;o.onCornerHeightChange(g),d(g)}),lr(o.scrollbarY,()=>{var b;const g=((b=o.scrollbarY)==null?void 0:b.offsetWidth)||0;o.onCornerWidthChange(g),c(g)}),i.useEffect(()=>()=>{h(0),p(0)},[h,p]),f?r.jsx(zn.div,{...s,ref:t,style:{width:a,height:u,position:"absolute",right:o.dir===Cn.LTR?0:void 0,left:o.dir===Cn.RTL?0:void 0,bottom:0,...e.style}}):null},"ScrollAreaCornerImpl"));function br(n){return n?parseInt(n,10):0}le(br,"toInt");function Br(n,e){const t=n/e;return isNaN(t)?0:t}le(Br,"getThumbRatio");function xr(n){const e=Br(n.viewport,n.content),t=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,l=(n.scrollbar.size-t)*e;return Math.max(l,18)}le(xr,"getThumbSize");function ao(n,e,t,l=Cn.LTR){const s=xr(t),o=s/2,a=e||o,c=s-a,u=t.scrollbar.paddingStart+a,d=t.scrollbar.size-t.scrollbar.paddingEnd-c,f=t.content-t.viewport,h=l===Cn.LTR?[0,f]:[f*-1,0];return Fr([u,d],h)(n)}le(ao,"getScrollPositionFromPointer");function Mr(n,e,t=Cn.LTR){const l=xr(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-s,a=e.content-e.viewport,c=o-l,u=t===Cn.LTR?[0,a]:[a*-1,0],d=vl(n,u);return Fr([0,a],[0,c])(d)}le(Mr,"getThumbOffsetFromScroll");function Fr(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])}}le(Fr,"linearScale");function qr(n,e){return n>0&&n<e}le(qr,"isScrollingWithinScrollbarBounds");var pa=le((n,e=()=>{})=>{let t={left:n.scrollLeft,top:n.scrollTop},l=0;function s(){const o={left:n.scrollLeft,top:n.scrollTop},a=t.left!==o.left,c=t.top!==o.top;(a||c)&&e(),t=o,l=window.requestAnimationFrame(s)}return le(s,"loop"),s(),()=>window.cancelAnimationFrame(l)},"addUnlinkedScrollListener");function yr(n,e){const t=sr(n),l=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(l.current),[]),i.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(t,e)},[t,e])}le(yr,"useDebounceCallback");function lr(n,e){const t=sr(e);ko(()=>{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])}le(lr,"useResizeObserver");const co=i.forwardRef((n,e)=>{const t=ae.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 a;t[4]!==s?(a=Be("relative overflow-hidden",s),t[4]=s,t[5]=a):a=t[5];let c;t[6]!==l?(c=r.jsx(na,{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(uo,{}),d=r.jsx(fa,{}),t[8]=u,t[9]=d):(u=t[8],d=t[9]);let f;return t[10]!==o||t[11]!==e||t[12]!==a||t[13]!==c?(f=r.jsxs(to,{ref:e,className:a,...o,children:[c,u,d]}),t[10]=o,t[11]=e,t[12]=a,t[13]=c,t[14]=f):f=t[14],f});co.displayName=to.displayName;const uo=i.forwardRef((n,e)=>{const t=ae.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 a=o===void 0?"vertical":o,c=a==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",u=a==="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=Be("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(da,{className:"relative flex-1 rounded-full bg-border"}),t[8]=f):f=t[8];let h;return t[9]!==a||t[10]!==s||t[11]!==e||t[12]!==d?(h=r.jsx(ro,{ref:e,orientation:a,className:d,...s,children:f}),t[9]=a,t[10]=s,t[11]=e,t[12]=d,t[13]=h):h=t[13],h});uo.displayName=ro.displayName;function fo(n){return/[Zz]|[+-]\d{2}/.test(n)?new Date(n):new Date(n.replace(" ","T")+"Z")}function ma(n){const e=new Map;for(const s of n){const o=fo(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 a;if(s===t)a="Today";else if(s===l)a="Yesterday";else{const c=new Date(s);a=c.toLocaleDateString(void 0,{month:"short",day:"numeric",...c.getFullYear()!==new Date().getFullYear()?{year:"numeric"}:{}})}return{label:a,items:o}})}function ga(n){return fo(n).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}const ba=5*1024*1024,xa=["image/png","image/jpeg","image/webp"];function ya({buildId:n}){const e=i.useId(),[t,l]=i.useState(""),[s,o]=i.useState(null),[a,c]=i.useState(!1),[u,d]=i.useState(""),f=i.useRef(null),h=i.useRef(null),p=i.useRef(null),g=i.useRef({}),b=ms(),w=gs({queryKey:Cr.comments(n),queryFn:()=>_o(n)}),C=w.data??[],m=()=>{b.invalidateQueries({queryKey:Cr.comments(n)})};i.useEffect(()=>{const T=window.location.hash;if(!T.startsWith("#comment-"))return;const y=Number(T.replace("#comment-","")),x=g.current[y];if(!x)return;x.scrollIntoView({behavior:"smooth"});const D=document.documentElement.classList.contains("dark");x.style.backgroundColor=D?"rgb(0 112 243 / 0.18)":"#d3e5ff",setTimeout(()=>{x.style.backgroundColor=""},2e3)},[w.data]),i.useEffect(()=>{Zr()},[]);async function _(T){const{linkBase:y}=await Zr(),x=Sl(y,`${location.pathname}${location.search}#comment-${T}`);try{if(!navigator.clipboard)throw new Error("no clipboard");await navigator.clipboard.writeText(x),St.success("Link copied")}catch{St.error("Could not copy link")}}function E(T){if(d(""),!xa.includes(T.type)){o(null),d("Only png, jpg, webp allowed");return}if(T.size>ba){o(null),d("Max 5MB");return}o(T)}async function A(T){var x,D;if(T.preventDefault(),a||!t.trim()&&!s)return;c(!0);const y=new FormData;y.append("build_id",String(n)),y.append("body",t),s&&y.append("attachment",s);try{const R=await fetch("/api/v1/comments",{method:"POST",credentials:"include",body:y});if(!R.ok)throw new Error(String(R.status));l(""),o(null),d(""),m();const I=document.activeElement;(I===document.body||(x=p.current)!=null&&x.contains(I))&&((D=h.current)==null||D.focus())}catch{St.error("Could not post the comment. Try again.")}finally{c(!1)}}const L=ma(C);return r.jsxs("div",{className:"flex h-full flex-col gap-3 px-1",children:[r.jsx(co,{className:"flex-1 rounded-md border",children:r.jsx("div",{className:"p-3",children:w.isPending?r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"Loading comments…"}):w.isError&&!w.data?r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"Couldn't load comments."}):C.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:L.map(({label:T,items:y})=>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:T}),r.jsx("div",{className:"h-px flex-1 bg-border"})]}),r.jsx("div",{className:"flex flex-col gap-4",children:y.map(x=>r.jsxs("div",{id:`comment-${x.id}`,ref:D=>{g.current[x.id]=D},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(No,{name:x.author,avatarUrl:x.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:x.author}),r.jsx("span",{className:"text-[11px] text-muted-foreground leading-none",children:ga(x.created_at)}),r.jsx(tt,{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 _(x.id),children:r.jsx(Ss,{className:"h-3 w-3","aria-hidden":"true"})})]}),r.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap mt-1",children:x.body}),x.attachments.map(D=>{const R=decodeURIComponent(D.file_path.split("/").pop()??"image");return r.jsx("a",{href:D.file_path,target:"_blank",rel:"noreferrer",className:"mt-1.5 block","aria-label":`Open ${R} in a new tab`,children:r.jsx("img",{src:D.file_path,alt:R,className:"max-h-48 rounded border object-contain"})},D.id)})]})]},x.id))})]},T))})})}),r.jsx("div",{className:"pb-1",children:r.jsx("form",{ref:p,onSubmit:A,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(Qs,{ref:h,"aria-label":"Comment",placeholder:"Leave a comment…",value:t,onChange:T=>l(T.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(tt,{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 T;return(T=f.current)==null?void 0:T.click()},children:r.jsx($l,{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:T=>{var x;const y=(x=T.target.files)==null?void 0:x[0];T.target.value="",y&&E(y)}}),r.jsx("div",{className:"flex-1"}),r.jsx(tt,{type:"submit",size:"icon",className:"h-7 w-7 rounded-full aria-disabled:cursor-not-allowed aria-disabled:opacity-50","aria-label":"Post comment","aria-disabled":a,disabled:!a&&!t.trim()&&!s,children:r.jsx(Al,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})})})]})}function wa(n){return n<1024*1024?`${(n/1024).toFixed(0)} KB`:`${(n/1024/1024).toFixed(1)} MB`}function va(n){return new Date(n).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Sa(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 Ra(n){const e=ae.c(17),{buildId:t}=n;let l;e[0]!==t?(l=Cr.recordings(t),e[0]=t,e[1]=l):l=e[1];let s;e[2]!==t?(s=()=>To(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 a=gs(o);let c;e[7]!==a.data?(c=a.data??[],e[7]=a.data,e[8]=c):c=e[8];const u=c,d=Rl(a.isPending,250,t);if(a.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(a.isError&&!a.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(ja),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 ja(n){const e=Sa(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:va(n.createdAt)}),r.jsxs("span",{className:`text-xs ${e.urgent?"text-destructive":"text-muted-foreground"}`,children:[e.label," · ",wa(n.fileSize)]})]}),r.jsx(tt,{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(ul,{className:"h-3.5 w-3.5"})})]},n.id)}function ka(n){const e=ae.c(9),{buildId:t}=n;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsxs(Gr,{value:"comments",className:"flex-1 gap-1.5",children:[r.jsx(Ol,{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(yl,{className:"w-full",children:[l,r.jsxs(Gr,{value:"recordings",className:"flex-1 gap-1.5",children:[r.jsx(Dl,{className:"h-3.5 w-3.5"}),"Recordings"]})]})}),e[1]=s):s=e[1];let o;e[2]!==t?(o=r.jsx(Qr,{value:"comments",className:"mt-3 min-h-0 flex-1 overflow-hidden",children:r.jsx(ya,{buildId:t})}),e[2]=t,e[3]=o):o=e[3];let a;e[4]!==t?(a=r.jsx(Qr,{value:"recordings",className:"mt-3 min-h-0 flex-1 overflow-y-auto",children:r.jsx(Ra,{buildId:t})}),e[4]=t,e[5]=a):a=e[5];let c;return e[6]!==o||e[7]!==a?(c=r.jsxs(wl,{defaultValue:"comments",className:"flex h-full flex-col",children:[s,o,a]}),e[6]=o,e[7]=a,e[8]=c):c=e[8],c}const ho=i.forwardRef((n,e)=>{const t=ae.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});ho.displayName="Breadcrumb";const po=i.forwardRef((n,e)=>{const t=ae.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=Be("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 a;return t[5]!==s||t[6]!==e||t[7]!==o?(a=r.jsx("ol",{ref:e,className:o,...s}),t[5]=s,t[6]=e,t[7]=o,t[8]=a):a=t[8],a});po.displayName="BreadcrumbList";const gr=i.forwardRef((n,e)=>{const t=ae.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=Be("inline-flex items-center gap-1.5",l),t[3]=l,t[4]=o):o=t[4];let a;return t[5]!==s||t[6]!==e||t[7]!==o?(a=r.jsx("li",{ref:e,className:o,...s}),t[5]=s,t[6]=e,t[7]=o,t[8]=a):a=t[8],a});gr.displayName="BreadcrumbItem";const Rr=i.forwardRef((n,e)=>{const t=ae.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 a=l?Eo:"a";let c;t[4]!==s?(c=Be("transition-colors hover:text-foreground cursor-pointer",s),t[4]=s,t[5]=c):c=t[5];let u;return t[6]!==a||t[7]!==o||t[8]!==e||t[9]!==c?(u=r.jsx(a,{ref:e,className:c,...o}),t[6]=a,t[7]=o,t[8]=e,t[9]=c,t[10]=u):u=t[10],u});Rr.displayName="BreadcrumbLink";const jr=i.forwardRef((n,e)=>{const t=ae.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=Be("font-medium text-foreground",l),t[3]=l,t[4]=o):o=t[4];let a;return t[5]!==s||t[6]!==e||t[7]!==o?(a=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]=a):a=t[8],a});jr.displayName="BreadcrumbPage";const kr=n=>{const e=ae.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=Be("[&>svg]:h-3.5 [&>svg]:w-3.5",l),e[4]=l,e[5]=o):o=e[5];let a;e[6]!==t?(a=t??r.jsx(Io,{}),e[6]=t,e[7]=a):a=e[7];let c;return e[8]!==s||e[9]!==o||e[10]!==a?(c=r.jsx("li",{role:"presentation","aria-hidden":"true",className:o,...s,children:a}),e[8]=s,e[9]=o,e[10]=a,e[11]=c):c=e[11],c};kr.displayName="BreadcrumbSeparator";var Ca=Object.defineProperty,Zn=(n,e)=>Ca(n,"name",{value:e,configurable:!0}),zr="Switch",[_a,oc]=ps(zr),[Na,Ur]=_a(zr);function mo(n){const{__scopeSwitch:e,checked:t,children:l,defaultChecked:s,disabled:o,form:a,name:c,onCheckedChange:u,required:d,value:f="on",internal_do_not_use_render:h}=n,[p,g]=Ao({prop:t,defaultProp:s??!1,onChange:u,caller:zr}),[b,w]=i.useState(null),[C,m]=i.useState(null),[_,E]=i.useState(null),A=b?!!a||!!b.closest("form"):!0,L={checked:p,setChecked:g,disabled:o,control:b,setControl:w,name:c,form:a,value:f,userClick:_,onUserClick:E,required:d,defaultChecked:s,isFormControl:A,bubbleInput:C,setBubbleInput:m};return r.jsx(Na,{scope:e,...L,children:bo(h)?h(L):l})}Zn(mo,"SwitchProvider");var Ta="SwitchTrigger",Ea=i.forwardRef(Zn(function({__scopeSwitch:e,onClick:t,...l},s){const{control:o,form:a,value:c,disabled:u,checked:d,required:f,setControl:h,setChecked:p,onUserClick:g,isFormControl:b,bubbleInput:w}=Ur(Ta,e),C=qn(s,h),m=i.useRef(d);return i.useEffect(()=>{const _=a?o==null?void 0:o.ownerDocument.getElementById(a):o==null?void 0:o.form;if(_ instanceof HTMLFormElement){const E=Zn(()=>p(m.current),"reset");return _.addEventListener("reset",E),()=>_.removeEventListener("reset",E)}},[o,a,p]),r.jsx(zn.button,{type:"button",role:"switch","aria-checked":d,"aria-required":f,"data-state":Wr(d),"data-disabled":u?"":void 0,disabled:u,value:c,...l,ref:C,onClick:Fn(t,_=>{const E=_.isPropagationStopped();g({requestedChecked:!d,hasConsumerStoppedPropagation:E}),p(A=>!A),w&&b&&(E||_.stopPropagation())})})},"SwitchTrigger")),go=i.forwardRef(Zn(function(e,t){const{__scopeSwitch:l,name:s,checked:o,defaultChecked:a,required:c,disabled:u,value:d,onCheckedChange:f,form:h,...p}=e;return r.jsx(mo,{__scopeSwitch:l,checked:o,defaultChecked:a,disabled:u,required:c,onCheckedChange:f,name:s,form:h,value:d,internal_do_not_use_render:({isFormControl:g})=>r.jsxs(r.Fragment,{children:[r.jsx(Ea,{...p,ref:t,__scopeSwitch:l}),g&&r.jsx(La,{__scopeSwitch:l})]})})},"Switch")),Ia="SwitchThumb",Pa=i.forwardRef(Zn(function(e,t){const{__scopeSwitch:l,...s}=e,o=Ur(Ia,l);return r.jsx(zn.span,{"data-state":Wr(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})},"SwitchThumb")),Aa="SwitchBubbleInput",La=i.forwardRef(Zn(function({__scopeSwitch:e,onClick:t,...l},s){const{control:o,userClick:a,checked:c,defaultChecked:u,required:d,disabled:f,name:h,value:p,form:g,bubbleInput:b,setBubbleInput:w}=Ur(Aa,e),C=qn(s,w),m=Po(o),_=i.useRef(!1),E=i.useRef(c),A=i.useRef(a),L=i.useRef(null);i.useEffect(()=>{const y=b;if(!y)return;const x=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(x,"checked").set;if(!R)return;const I=E.current!==c;E.current=c;const F=a!==null&&a!==A.current;if(A.current=a,F)L.current=I?null:a,I&&R.call(y,c),y.dispatchEvent(new Event("click",{bubbles:!a.hasConsumerStoppedPropagation}));else if(I){const K=L.current;L.current=null;const H=(K==null?void 0:K.requestedChecked)===c;_.current=!0,R.call(y,c),y.dispatchEvent(new Event("click",{bubbles:!(H&&K.hasConsumerStoppedPropagation)})),_.current=!1}},[b,c,a]);const T=i.useRef(c);return r.jsx(zn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??T.current,required:d,disabled:f,name:h,value:p,form:g,...l,tabIndex:-1,ref:C,onClick:Fn(t,y=>{_.current&&y.stopPropagation()}),style:{...l.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function bo(n){return typeof n=="function"}Zn(bo,"isFunction");function Wr(n){return n?"checked":"unchecked"}Zn(Wr,"getState");const xo=i.forwardRef((n,e)=>{const t=ae.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=Be("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 a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx(Pa,{className:Be("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]=a):a=t[5];let c;return t[6]!==s||t[7]!==e||t[8]!==o?(c=r.jsx(go,{className:o,...s,ref:e,children:a}),t[6]=s,t[7]=e,t[8]=o,t[9]=c):c=t[9],c});xo.displayName=go.displayName;const Da={"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 lc(){const n=ae.c(62),[e]=vs(),t=el();let l;n[0]!==e?(l=e.get("id"),n[0]=e,n[1]=l):l=n[1];const s=l,{build:o}=Yl(s),a=ms(),c=(o==null?void 0:o.platform)??"ios",{sessions:u,activeFormFactor:d,selectedAgent:f,setSelectedAgent:h,activeSessionId:p,deviceId:g,booting:b,status:w,connected:C,agentGroups:m,startDevice:_,resetDevice:E,handleBack:A,handleBackToMacs:L,handleSessionEnded:T}=Xl(c);let y;if(n[2]!==m||n[3]!==f){let M;n[5]!==f?(M=U=>U.agentName===f,n[5]=f,n[6]=M):M=n[6],y=m.find(M),n[2]=m,n[3]=f,n[4]=y}else y=n[4];const x=y,{osVersions:D,osVersion:R,setOsVersion:I,deviceSearch:F,setDeviceSearch:K,versionedDevices:H,resetMode:ee,setResetMode:q,appliedResetMode:G,consumeResetMode:Y,fullResetSupported:te}=Ql(x,c);let Z;if(n[7]!==g||n[8]!==u){const M=u.flatMap($a);let U;n[10]!==g?(U=we=>we.id===g,n[10]=g,n[11]=U):U=n[11],Z=M.find(U),n[7]=g,n[8]=u,n[9]=Z}else Z=n[9];const O=Z,z=O?`${O.name}${O.osVersion?` · ${O.osVersion}`:""}`:"";let se;n[12]!==a?(se=()=>{a.invalidateQueries({queryKey:Cr.allRecordings})},n[12]=a,n[13]=se):se=n[13];const ge=se;let de;n[14]!==Y||n[15]!==_?(de=M=>{Y(),_(M)},n[14]=Y,n[15]=_,n[16]=de):de=n[16];const X=de;let J;n[17]!==T?(J=M=>{const U=Da[M];St.error(U.title,{description:U.description}),T()},n[17]=T,n[18]=J):J=n[18];const ue=J,{setNode:fe}=Lo();let $,ne;n[19]!==p||n[20]!==o||n[21]!==z||n[22]!==A||n[23]!==L||n[24]!==t||n[25]!==f||n[26]!==fe?($=()=>{if(o)return fe(r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(ho,{children:r.jsxs(po,{children:[r.jsx(gr,{children:r.jsx(Rr,{asChild:!0,children:r.jsx("button",{onClick:()=>t(`/app-center?appId=${o.app_id}`),children:o.name})})}),r.jsx(kr,{}),r.jsx(gr,{children:f?r.jsx(Rr,{asChild:!0,children:r.jsx("button",{onClick:L,children:Jr(o)})}):r.jsx(jr,{children:Jr(o)})}),f&&r.jsxs(r.Fragment,{children:[r.jsx(kr,{}),r.jsx(gr,{children:p?r.jsx(Rr,{asChild:!0,children:r.jsx("button",{onClick:A,children:f})}):r.jsx(jr,{children:f})})]}),p&&r.jsxs(r.Fragment,{children:[r.jsx(kr,{}),r.jsx(gr,{children:r.jsx(jr,{children:z})})]})]})}),!f&&o.status_label&&r.jsx(Nl,{tone:El[o.status_label],children:o.status_label})]})),()=>fe(null)},ne=[o,f,p,z,t,A,L,fe],n[19]=p,n[20]=o,n[21]=z,n[22]=A,n[23]=L,n[24]=t,n[25]=f,n[26]=fe,n[27]=$,n[28]=ne):($=n[27],ne=n[28]),i.useEffect($,ne);let ye;n[29]!==d||n[30]!==p||n[31]!==m||n[32]!==G||n[33]!==b||n[34]!==(o==null?void 0:o.id)||n[35]!==C||n[36]!==g||n[37]!==F||n[38]!==te||n[39]!==ge||n[40]!==X||n[41]!==ue||n[42]!==c||n[43]!==R||n[44]!==D||n[45]!==E||n[46]!==ee||n[47]!==f||n[48]!==(O==null?void 0:O.formFactor)||n[49]!==(x==null?void 0:x.admission)||n[50]!==K||n[51]!==I||n[52]!==q||n[53]!==h||n[54]!==w||n[55]!==H?(ye=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(Gi,{sessionId:p,deviceId:g,formFactor:(O==null?void 0:O.formFactor)??d,platform:c,buildId:o==null?void 0:o.id,resetMode:G,onRecordingUploaded:ge,onSessionEnded:ue})}):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(xl,{"aria-label":"Search devices",placeholder:"Search device…",value:F,onChange:K}),D.length>0&&r.jsxs(jl,{value:R||"__all__",onValueChange:M=>{I(M==="__all__"?"":M),E()},children:[r.jsx(kl,{className:"h-8 w-36 shrink-0","aria-label":"Filter by OS version",children:r.jsx(Cl,{})}),r.jsxs(_l,{children:[r.jsx(Ns,{value:"__all__",children:"Any version"}),D.map(Ma)]})]}),te&&r.jsx(Ir,{children:r.jsxs(Ot,{children:[r.jsx(Ht,{asChild:!0,children:r.jsxs("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:[r.jsx(Do,{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(xo,{id:"reset-mode","aria-describedby":"reset-mode-desc",checked:ee==="full-erase",onCheckedChange:M=>q(M?"full-erase":"app-only")})]})}),r.jsx(Bt,{children:ee==="full-erase"?"Erase all data on the next device you pick":"Keep existing data"})]})})]}),H.length===0?r.jsx("p",{className:"text-sm text-muted-foreground",children:C?"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:H.map(M=>{const U=M.status==="booted",we=M.busy,he=(x==null?void 0:x.admission.memoryRefuses.includes(M.id))??!1,ce=we?M.holder?`${fl(M.holder.kind)} is driving it`:"In use":he?"Not enough memory to start":U?"Booted":"Available",ke=we?"bg-amber-400":U?"bg-emerald-400":"bg-muted-foreground/40";return r.jsxs("button",{disabled:we||he||b||!C,onClick:()=>X(M),className:Be("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:M.name}),M.osVersion&&r.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:M.osVersion}),r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[r.jsx("span",{className:Be("inline-block h-1.5 w-1.5 rounded-full",ke)}),ce]}),U&&typeof M.serviceTier=="object"&&M.serviceTier.name==="slim"&&r.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Most services off"})]},M.id)})}),w&&r.jsx("p",{className:"text-sm text-muted-foreground",children:w})]}):r.jsxs("div",{className:"flex flex-col gap-5",children:[r.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Select Mac"}),m.length===0?r.jsx("p",{className:"text-sm text-muted-foreground",children:C?`No agents available for ${Tl[c]}.`:"Connecting to relay…"}):r.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-2",children:m.map(M=>{const U=M.resources,we=U?Date.now()-U.reportedAt>Il:!1,he=M.devices.filter(Fe=>Fe.platform===c).length,ce=(U==null?void 0:U.cpuPercent)??0,ke=U?U.memUsedMB/U.memTotalMB*100:0,Ue=Pl(U,we),pe=M.admission.overloaded;return r.jsx(Ir,{children:r.jsxs(Ot,{children:[r.jsx(Ht,{asChild:!0,children:r.jsx("span",{tabIndex:pe?0:void 0,className:pe?"cursor-not-allowed":void 0,children:r.jsxs("button",{disabled:pe,"aria-disabled":pe,onClick:()=>h(M.agentName??null),className:Be("flex flex-col gap-3 rounded-lg border p-3 text-left transition-colors min-h-[100px] w-full",pe?"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(Oa,{health:Ue}),r.jsx("span",{className:"text-sm font-medium leading-tight truncate",children:M.agentName??"Unknown"})]}),we?r.jsx("span",{className:"shrink-0 text-[10px] font-medium text-amber-500",children:"Stale"}):M.admission.booting&&r.jsx("span",{className:"shrink-0 text-[10px] font-medium text-muted-foreground",children:"Starting a device"})]}),r.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[r.jsxs("span",{children:[he," device",he!==1?"s":""]}),U&&r.jsxs(r.Fragment,{children:[r.jsx("span",{children:"·"}),r.jsxs("span",{children:[U.slotsAvailable,"/",U.slotsTotal," slots"]})]})]}),U&&!we&&r.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[r.jsx(fs,{label:"CPU",percent:ce,colorClass:"bg-blue-400"}),r.jsx(fs,{label:"RAM",percent:ke,colorClass:"bg-violet-400"})]})]})})}),pe&&r.jsx(Bt,{children:"This Mac is currently overloaded. Try again later."})]})},M.agentName)})})]})})}),n[29]=d,n[30]=p,n[31]=m,n[32]=G,n[33]=b,n[34]=o==null?void 0:o.id,n[35]=C,n[36]=g,n[37]=F,n[38]=te,n[39]=ge,n[40]=X,n[41]=ue,n[42]=c,n[43]=R,n[44]=D,n[45]=E,n[46]=ee,n[47]=f,n[48]=O==null?void 0:O.formFactor,n[49]=x==null?void 0:x.admission,n[50]=K,n[51]=I,n[52]=q,n[53]=h,n[54]=w,n[55]=H,n[56]=ye):ye=n[56];let be;n[57]!==s?(be=s&&r.jsxs(r.Fragment,{children:[r.jsx(hs,{orientation:"vertical",className:"h-auto"}),r.jsx("div",{className:"w-80 shrink-0 h-full",children:r.jsx(ka,{buildId:Number(s)})})]}),n[57]=s,n[58]=be):be=n[58];let Me;return n[59]!==ye||n[60]!==be?(Me=r.jsxs("div",{className:"flex h-full min-h-0 gap-6 p-6",children:[ye,be]}),n[59]=ye,n[60]=be,n[61]=Me):Me=n[61],Me}function Ma(n){return r.jsx(Ns,{value:n,children:n},n)}function $a(n){return n.devices}function Oa(n){const e=ae.c(6),{health:t}=n;let l,s;if(e[0]!==t){const a={unknown:"bg-muted-foreground/40",healthy:"bg-emerald-400",warning:"bg-amber-400",overloaded:"bg-red-500"}[t];l="resource-health-dot",s=Be("inline-block h-2 w-2 shrink-0 rounded-full",a),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 fs(n){const e=ae.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 a;e[2]!==l?(a=l.toFixed(0),e[2]=l,e[3]=a):a=e[3];let c;e[4]!==a?(c=r.jsxs("span",{children:[a,"%"]}),e[4]=a,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=Be("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 g;return e[16]!==u||e[17]!==p?(g=r.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,p]}),e[16]=u,e[17]=p,e[18]=g):g=e[18],g}export{lc as QASession};
@@ -1 +1 @@
1
- import{j as s}from"./vendor-react-DTSdA8m-.js";import{u as k,a as q,b as E,c as O,C as w,d as h,e as f,m as x,f as R,L as j,I as y,g as H,P as I,F as i,B as _,h as A,q as g,o as D,s as v,i as L,j as B,r as K}from"./index-C_3Q51YJ.js";import{F as Q}from"./field-hint-qmBa0qqN.js";import{a as W,c as G}from"./vendor-router-B1pQim9Z.js";const J=D({password:v().min(L,B),confirm:v()}).refine(a=>a.password===a.confirm,{message:"Passwords do not match",path:["confirm"]});function X(){var l,m,p;const a=W(),[b]=G(),r=b.get("token")??"",{register:o,handleSubmit:N,setError:t,formState:{errors:e,isSubmitting:n,submitCount:S}}=k({shouldFocusError:!1,resolver:q(J)}),C=E(),d=O({queryKey:g.resetToken(r),queryFn:()=>K(r),enabled:r!=="",staleTime:1/0}),c=!r||d.isError?"invalid":d.isPending?"loading":"valid";async function T(F){try{const u=await fetch("/api/v1/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:r,password:F.password})});if(!u.ok){const P=await u.json();t("root",{message:P.error??"Failed to reset password"});return}C.removeQueries({queryKey:g.resetToken(r)}),a("/login",{replace:!0})}catch{t("root",{message:"Network error. Please try again."})}}return c==="loading"?s.jsx("div",{className:"flex min-h-svh items-center justify-center"}):c==="invalid"?s.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:s.jsx(w,{level:4,className:"w-full max-w-sm text-center",children:s.jsxs(h,{children:[s.jsx(f,{children:"Link expired"}),s.jsx(x,{children:"This password reset link is invalid or has expired. Ask your admin to send a new one."})]})})}):s.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:s.jsxs(w,{level:4,className:"w-full max-w-sm",children:[s.jsxs(h,{className:"text-center",children:[s.jsx(f,{children:"Reset password"}),s.jsx(x,{children:"Enter your new password below."})]}),s.jsx(R,{children:s.jsxs("form",{onSubmit:N(T),className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(j,{htmlFor:"password",children:"New password"}),s.jsx(y,{id:"password",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!e.password,"aria-describedby":H("password-hint","password-error",!!e.password),...o("password")}),!e.password&&s.jsx(Q,{id:"password-hint",children:I}),s.jsx(i,{id:"password-error",message:(l=e.password)==null?void 0:l.message})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(j,{htmlFor:"confirm",children:"Confirm password"}),s.jsx(y,{id:"confirm",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!e.confirm,"aria-describedby":e.confirm?"confirm-error":void 0,...o("confirm")}),s.jsx(i,{id:"confirm-error",message:(m=e.confirm)==null?void 0:m.message})]}),s.jsx(i,{assertive:!0,id:"resetpassword-error",message:(p=e.root)==null?void 0:p.message}),s.jsx(_,{type:"submit",disabled:n,className:"w-full",children:n?"Saving…":"Set new password"}),s.jsx(A,{errors:e,submitCount:S})]})})]})})}export{X as ResetPassword};
1
+ import{j as s}from"./vendor-react-DTSdA8m-.js";import{u as k,a as q,b as E,c as O,C as w,d as h,e as f,m as x,f as R,L as j,I as y,g as H,P as I,F as i,B as _,h as A,q as g,o as D,s as v,i as L,j as B,r as K}from"./index-CiJwpDAf.js";import{F as Q}from"./field-hint-CIJmSABE.js";import{a as W,c as G}from"./vendor-router-B1pQim9Z.js";const J=D({password:v().min(L,B),confirm:v()}).refine(a=>a.password===a.confirm,{message:"Passwords do not match",path:["confirm"]});function X(){var l,m,p;const a=W(),[b]=G(),r=b.get("token")??"",{register:o,handleSubmit:N,setError:t,formState:{errors:e,isSubmitting:n,submitCount:S}}=k({shouldFocusError:!1,resolver:q(J)}),C=E(),d=O({queryKey:g.resetToken(r),queryFn:()=>K(r),enabled:r!=="",staleTime:1/0}),c=!r||d.isError?"invalid":d.isPending?"loading":"valid";async function T(F){try{const u=await fetch("/api/v1/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:r,password:F.password})});if(!u.ok){const P=await u.json();t("root",{message:P.error??"Failed to reset password"});return}C.removeQueries({queryKey:g.resetToken(r)}),a("/login",{replace:!0})}catch{t("root",{message:"Network error. Please try again."})}}return c==="loading"?s.jsx("div",{className:"flex min-h-svh items-center justify-center"}):c==="invalid"?s.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:s.jsx(w,{level:4,className:"w-full max-w-sm text-center",children:s.jsxs(h,{children:[s.jsx(f,{children:"Link expired"}),s.jsx(x,{children:"This password reset link is invalid or has expired. Ask your admin to send a new one."})]})})}):s.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:s.jsxs(w,{level:4,className:"w-full max-w-sm",children:[s.jsxs(h,{className:"text-center",children:[s.jsx(f,{children:"Reset password"}),s.jsx(x,{children:"Enter your new password below."})]}),s.jsx(R,{children:s.jsxs("form",{onSubmit:N(T),className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(j,{htmlFor:"password",children:"New password"}),s.jsx(y,{id:"password",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!e.password,"aria-describedby":H("password-hint","password-error",!!e.password),...o("password")}),!e.password&&s.jsx(Q,{id:"password-hint",children:I}),s.jsx(i,{id:"password-error",message:(l=e.password)==null?void 0:l.message})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(j,{htmlFor:"confirm",children:"Confirm password"}),s.jsx(y,{id:"confirm",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!e.confirm,"aria-describedby":e.confirm?"confirm-error":void 0,...o("confirm")}),s.jsx(i,{id:"confirm-error",message:(m=e.confirm)==null?void 0:m.message})]}),s.jsx(i,{assertive:!0,id:"resetpassword-error",message:(p=e.root)==null?void 0:p.message}),s.jsx(_,{type:"submit",disabled:n,className:"w-full",children:n?"Saving…":"Set new password"}),s.jsx(A,{errors:e,submitCount:S})]})})]})})}export{X as ResetPassword};
@@ -1,15 +1,15 @@
1
- import{c as B,r as S,j as t}from"./vendor-react-DTSdA8m-.js";import{G,c as ie,an as je,ao as ye,ap as Ne,aq as ve,T as be,K as ne,M as ae,ar as P,N as le,B as A,as as we,q as ce,at as ke,au as Se,ak as Me,av as Re,aw as $e,I as Ce,H as oe}from"./index-C_3Q51YJ.js";import{B as H}from"./badge-BjEnOmb0.js";import{T as F}from"./tech-label-KAwM5qZ_.js";import{r as de,d as Ie,f as ue,b as Te,s as Ee,a as qe,c as _e,p as Le,S as De,e as fe,U as Fe}from"./runs-CFQ6M4rx.js";import{S as Pe}from"./slider-tyb3JvL2.js";import{d as Ae,S as Be,a as ze,b as Ve,c as Ke}from"./select-CHbE6M4S.js";import{W as Oe}from"./WatchedDevice-CpaKHa1x.js";import{k as Ue,C as We,H as He}from"./AndroidDeviceScreen-C55msKfh.js";import{P as Qe}from"./play-Z1L2Eb91.js";import{V as Ge}from"./video-DdHH0Q0l.js";import{d as Ze,L as Q}from"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";/**
2
- * @license lucide-react v1.59.0 - ISC
1
+ import{c as B,r as S,j as t}from"./vendor-react-DTSdA8m-.js";import{G,c as ie,an as je,ao as ye,ap as Ne,aq as ve,T as be,K as ne,M as ae,ar as P,N as le,B as A,as as we,q as ce,at as ke,au as Se,ak as Me,av as Re,aw as $e,I as Ce,H as oe}from"./index-CiJwpDAf.js";import{B as H}from"./badge-Bjwwchrt.js";import{T as F}from"./tech-label-DpVGqU2Y.js";import{r as de,d as Ie,f as ue,b as Te,s as Ee,a as qe,c as _e,p as Le,S as De,e as fe,U as Fe}from"./runs-CFQ6M4rx.js";import{S as Pe}from"./slider-ifEFgQFt.js";import{d as Ae,S as Be,a as ze,b as Ve,c as Ke}from"./select-7EkQtxVy.js";import{W as Oe}from"./WatchedDevice-D-SfDxp8.js";import{n as Ue,C as We,H as He}from"./AndroidDeviceScreen-1RaPu10r.js";import{P as Qe}from"./play-BR_CdQzZ.js";import{V as Ge}from"./video-D1ajuM3p.js";import{d as Ze,L as Q}from"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";/**
2
+ * @license lucide-react v1.61.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
6
  */const me={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};me.node;const Je=G(me);/**
7
- * @license lucide-react v1.59.0 - ISC
7
+ * @license lucide-react v1.61.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
11
  */const xe={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};xe.node;const he=G(xe);/**
12
- * @license lucide-react v1.59.0 - ISC
12
+ * @license lucide-react v1.61.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
- import{c as xe,r as Z,j as l}from"./vendor-react-DTSdA8m-.js";import{G as Ke,ak as Oe,c as Ue,O as qe,q as Ge,al as He,$ as Ve,B as Ee,am as We}from"./index-C_3Q51YJ.js";import{B as Be}from"./badge-BjEnOmb0.js";import{S as ze}from"./search-input-B0s9mzRt.js";import{T as Re}from"./tech-label-KAwM5qZ_.js";import{a as Me,T as he,c as Qe}from"./tabs-Bf7ou-eS.js";import{S as Xe,a as Je,b as Ye,c as ke,d as Ze}from"./select-CHbE6M4S.js";import{l as et,T as tt,a as st,b as X,c as lt,d as De,e as J,L as at}from"./list-view-CyM0QUaH.js";import{u as rt}from"./useFocusAfterSwap-BdItkQCu.js";import{r as Fe,f as nt,a as Ce,b as it,c as ot,R as ct,p as ut}from"./runs-CFQ6M4rx.js";import{c as dt,a as ft,L as mt}from"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";import"./useShownAfter-By1Yxysz.js";/**
2
- * @license lucide-react v1.59.0 - ISC
1
+ import{c as xe,r as Z,j as l}from"./vendor-react-DTSdA8m-.js";import{G as Ke,ak as Oe,c as Ue,O as qe,q as Ge,al as He,$ as Ve,B as Ee,am as We}from"./index-CiJwpDAf.js";import{B as Be}from"./badge-Bjwwchrt.js";import{S as ze}from"./search-input-2MuvmbBR.js";import{T as Re}from"./tech-label-DpVGqU2Y.js";import{a as Me,T as he,c as Qe}from"./tabs-SLpwFQLx.js";import{S as Xe,a as Je,b as Ye,c as ke,d as Ze}from"./select-7EkQtxVy.js";import{l as et,T as tt,a as st,b as X,c as lt,d as De,e as J,L as at}from"./list-view-DpnCsTM-.js";import{u as rt}from"./useFocusAfterSwap-BdItkQCu.js";import{r as Fe,f as nt,a as Ce,b as it,c as ot,R as ct,p as ut}from"./runs-CFQ6M4rx.js";import{c as dt,a as ft,L as mt}from"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";import"./useShownAfter-By1Yxysz.js";/**
2
+ * @license lucide-react v1.61.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
@@ -1 +1 @@
1
- import{j as e}from"./vendor-react-DTSdA8m-.js";import{z as A,u as O,a as P,b as k,c as I,C as _,d as q,e as D,f as E,I as t,L as l,F as i,g as R,P as L,B as W,h as z,q as w,o as H,s as d,i as M,j as B,k as Q}from"./index-C_3Q51YJ.js";import{F as K}from"./field-hint-qmBa0qqN.js";import{a as G,N as J}from"./vendor-router-B1pQim9Z.js";const U=H({email:d().email("Enter a valid email"),password:d().min(M,B),confirm:d()}).refine(a=>a.password===a.confirm,{message:"Passwords do not match",path:["confirm"]});function $(){var u,p,h,x,f,g;const a=G(),{resolvedTheme:y}=A(),N=y==="dark"?"/logo-dark.svg":"/logo.svg",{register:o,handleSubmit:v,setError:m,formState:{errors:s,isSubmitting:c,submitCount:b}}=O({shouldFocusError:!1,resolver:P(U)}),S=k(),n=I({queryKey:w.authStatus,queryFn:Q,staleTime:1/0});async function C(r){try{const j=await fetch("/api/v1/auth/init",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r.email,password:r.password})});if(!j.ok){const T=await j.json();m("root",{message:T.error??"Failed to create account"});return}S.setQueryData(w.authStatus,{initialized:!0}),a("/login",{replace:!0})}catch{m("root",{message:"Network error. Please try again."})}}if((u=n.data)!=null&&u.initialized)return e.jsx(J,{to:"/login",replace:!0});if(n.isPending)return null;const F=((p=n.data)==null?void 0:p.canInitialize)===!1;return e.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:e.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:N,alt:"tapflow",className:"w-6 h-6"}),e.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),e.jsxs(_,{level:4,className:"w-full",children:[e.jsx(q,{className:"text-center",children:e.jsx(D,{className:"text-2xl tracking-display-md",children:"Set up tapflow"})}),e.jsx(E,{children:F?e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{id:"setup-remote-command",className:"text-sm text-muted-foreground",children:"The admin account can only be created on the machine running the relay. Run this there, then reload this page:"}),e.jsx(t,{readOnly:!0,value:"tapflow admin init","aria-labelledby":"setup-remote-command",onFocus:r=>r.currentTarget.select(),className:"font-mono"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Running the relay in Docker? Set ",e.jsx("code",{className:"text-xs",children:"TAPFLOW_ADMIN_EMAIL"})," and ",e.jsx("code",{className:"text-xs",children:"TAPFLOW_ADMIN_PASSWORD"})," on the container and recreate it, e.g. with ",e.jsx("code",{className:"text-xs",children:"docker compose up -d"}),". A restart keeps the old environment."]})]}):e.jsxs("form",{onSubmit:v(C),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"email",children:"Admin email"}),e.jsx(t,{id:"email",type:"email",placeholder:"admin@yourteam.com",autoComplete:"email","aria-required":"true","aria-invalid":!!s.email,"aria-describedby":s.email?"email-error":void 0,...o("email")}),e.jsx(i,{id:"email-error",message:(h=s.email)==null?void 0:h.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"password",children:"Password"}),e.jsx(t,{id:"password",type:"password",autoComplete:"new-password","aria-required":"true","aria-invalid":!!s.password,"aria-describedby":R("password-hint","password-error",!!s.password),...o("password")}),!s.password&&e.jsx(K,{id:"password-hint",children:L}),e.jsx(i,{id:"password-error",message:(x=s.password)==null?void 0:x.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"confirm",children:"Confirm password"}),e.jsx(t,{id:"confirm",type:"password",autoComplete:"new-password","aria-required":"true","aria-invalid":!!s.confirm,"aria-describedby":s.confirm?"confirm-error":void 0,...o("confirm")}),e.jsx(i,{id:"confirm-error",message:(f=s.confirm)==null?void 0:f.message})]}),e.jsx(i,{assertive:!0,id:"setup-error",message:(g=s.root)==null?void 0:g.message}),e.jsx(W,{type:"submit",size:"lg",disabled:c,className:"w-full mt-1",children:c?"Creating account…":"Create admin account"}),e.jsx(z,{errors:s,submitCount:b})]})})]})]})})}export{$ as Setup};
1
+ import{j as e}from"./vendor-react-DTSdA8m-.js";import{z as A,u as O,a as P,b as k,c as I,C as _,d as q,e as D,f as E,I as t,L as l,F as i,g as R,P as L,B as W,h as z,q as w,o as H,s as d,i as M,j as B,k as Q}from"./index-CiJwpDAf.js";import{F as K}from"./field-hint-CIJmSABE.js";import{a as G,N as J}from"./vendor-router-B1pQim9Z.js";const U=H({email:d().email("Enter a valid email"),password:d().min(M,B),confirm:d()}).refine(a=>a.password===a.confirm,{message:"Passwords do not match",path:["confirm"]});function $(){var u,p,h,x,f,g;const a=G(),{resolvedTheme:y}=A(),N=y==="dark"?"/logo-dark.svg":"/logo.svg",{register:o,handleSubmit:v,setError:m,formState:{errors:s,isSubmitting:c,submitCount:b}}=O({shouldFocusError:!1,resolver:P(U)}),S=k(),n=I({queryKey:w.authStatus,queryFn:Q,staleTime:1/0});async function C(r){try{const j=await fetch("/api/v1/auth/init",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r.email,password:r.password})});if(!j.ok){const T=await j.json();m("root",{message:T.error??"Failed to create account"});return}S.setQueryData(w.authStatus,{initialized:!0}),a("/login",{replace:!0})}catch{m("root",{message:"Network error. Please try again."})}}if((u=n.data)!=null&&u.initialized)return e.jsx(J,{to:"/login",replace:!0});if(n.isPending)return null;const F=((p=n.data)==null?void 0:p.canInitialize)===!1;return e.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:e.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:N,alt:"tapflow",className:"w-6 h-6"}),e.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),e.jsxs(_,{level:4,className:"w-full",children:[e.jsx(q,{className:"text-center",children:e.jsx(D,{className:"text-2xl tracking-display-md",children:"Set up tapflow"})}),e.jsx(E,{children:F?e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{id:"setup-remote-command",className:"text-sm text-muted-foreground",children:"The admin account can only be created on the machine running the relay. Run this there, then reload this page:"}),e.jsx(t,{readOnly:!0,value:"tapflow admin init","aria-labelledby":"setup-remote-command",onFocus:r=>r.currentTarget.select(),className:"font-mono"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Running the relay in Docker? Set ",e.jsx("code",{className:"text-xs",children:"TAPFLOW_ADMIN_EMAIL"})," and ",e.jsx("code",{className:"text-xs",children:"TAPFLOW_ADMIN_PASSWORD"})," on the container and recreate it, e.g. with ",e.jsx("code",{className:"text-xs",children:"docker compose up -d"}),". A restart keeps the old environment."]})]}):e.jsxs("form",{onSubmit:v(C),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"email",children:"Admin email"}),e.jsx(t,{id:"email",type:"email",placeholder:"admin@yourteam.com",autoComplete:"email","aria-required":"true","aria-invalid":!!s.email,"aria-describedby":s.email?"email-error":void 0,...o("email")}),e.jsx(i,{id:"email-error",message:(h=s.email)==null?void 0:h.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"password",children:"Password"}),e.jsx(t,{id:"password",type:"password",autoComplete:"new-password","aria-required":"true","aria-invalid":!!s.password,"aria-describedby":R("password-hint","password-error",!!s.password),...o("password")}),!s.password&&e.jsx(K,{id:"password-hint",children:L}),e.jsx(i,{id:"password-error",message:(x=s.password)==null?void 0:x.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"confirm",children:"Confirm password"}),e.jsx(t,{id:"confirm",type:"password",autoComplete:"new-password","aria-required":"true","aria-invalid":!!s.confirm,"aria-describedby":s.confirm?"confirm-error":void 0,...o("confirm")}),e.jsx(i,{id:"confirm-error",message:(f=s.confirm)==null?void 0:f.message})]}),e.jsx(i,{assertive:!0,id:"setup-error",message:(g=s.root)==null?void 0:g.message}),e.jsx(W,{type:"submit",size:"lg",disabled:c,className:"w-full mt-1",children:c?"Creating account…":"Create admin account"}),e.jsx(z,{errors:s,submitCount:b})]})})]})]})})}export{$ as Setup};
@@ -1,5 +1,5 @@
1
- import{r as a,j as e,c as je}from"./vendor-react-DTSdA8m-.js";import{G as ve,b as fe,c as ge,u as be,a as ye,B as k,L as _,I as ee,F as Q,n as ke,h as Ce,C as we,d as Se,e as De,f as Te,H as h,o as E,s as C,q as V,aJ as se,aK as Ne}from"./index-C_3Q51YJ.js";import{d as q,c as H,a as M,b as B,e as Re,D as Ae}from"./dialog-Cugbp1C4.js";import{g as Ee,d as Ie,A as $e,a as Fe,b as Oe,e as Le,c as Pe,f as _e}from"./alert-dialog-C0mRms8g.js";import{d as U,S as z,a as J,b as K,c as x}from"./select-CHbE6M4S.js";import{l as Qe,T as Ve,c as qe,d as G,e as S,a as He,L as Me,b as D}from"./list-view-CyM0QUaH.js";import{j as W,l as X}from"./publicLink-D6zKS_wu.js";import{u as Be}from"./useFocusAfterSwap-BdItkQCu.js";import"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";import"./useShownAfter-By1Yxysz.js";/**
2
- * @license lucide-react v1.59.0 - ISC
1
+ import{r as a,j as e,c as je}from"./vendor-react-DTSdA8m-.js";import{G as ve,b as fe,c as ge,u as be,a as ye,B as k,L as _,I as ee,F as Q,n as ke,h as Ce,C as we,d as Se,e as De,f as Te,H as h,o as E,s as C,q as V,aJ as se,aK as Ne}from"./index-CiJwpDAf.js";import{d as q,c as H,a as M,b as B,e as Re,D as Ae}from"./dialog-CrzZQwxn.js";import{g as Ee,d as Ie,A as $e,a as Fe,b as Oe,e as Le,c as Pe,f as _e}from"./alert-dialog-DPNbpxqG.js";import{d as U,S as z,a as J,b as K,c as x}from"./select-7EkQtxVy.js";import{l as Qe,T as Ve,c as qe,d as G,e as S,a as He,L as Me,b as D}from"./list-view-DpnCsTM-.js";import{j as W,l as X}from"./publicLink-D6zKS_wu.js";import{u as Be}from"./useFocusAfterSwap-BdItkQCu.js";import"./vendor-router-B1pQim9Z.js";import"./index-D17hSi50.js";import"./useShownAfter-By1Yxysz.js";/**
2
+ * @license lucide-react v1.61.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.