@p4code/cli 0.8.33 → 0.8.34

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 (262) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/{binCli-CReSoYE2.mjs → binCli-CvWinVsO.mjs} +77 -21
  3. package/dist/client/.vite/manifest.json +2022 -2022
  4. package/dist/client/assets/{2NI2N5EU-Cq8AdBdr.js → 2NI2N5EU-Dlr3FZf7.js} +2 -2
  5. package/dist/client/assets/{4UO7MD6I-BtyHa2r8.js → 4UO7MD6I-Cy2sjs8O.js} +2 -2
  6. package/dist/client/assets/{5B3SVYGG-DJhrK_P7.js → 5B3SVYGG-DaCwFaTp.js} +2 -2
  7. package/dist/client/assets/{5GK6JWQ2-Di3oWVTL.js → 5GK6JWQ2-BVM9871F.js} +2 -2
  8. package/dist/client/assets/{5N7A7DKN-IYvb4i83.js → 5N7A7DKN-BVMU2dmG.js} +2 -2
  9. package/dist/client/assets/{5OC2THR4-C4L8eWnK.js → 5OC2THR4-2tkjJ38q.js} +2 -2
  10. package/dist/client/assets/{5S6HY5KT-CRP52QAR.js → 5S6HY5KT-BGTQzE2T.js} +2 -2
  11. package/dist/client/assets/{6IMQ5BUJ-CNHI0F6y.js → 6IMQ5BUJ-DMdx9ktL.js} +2 -2
  12. package/dist/client/assets/{6OLKWJ4F-B4vHLWw5.js → 6OLKWJ4F-B0TXT19U.js} +2 -2
  13. package/dist/client/assets/{74OO7NKP-Cy2GHTnO.js → 74OO7NKP-Cukz2OUS.js} +2 -2
  14. package/dist/client/assets/{75O6YZUN-DQlP5MhD.js → 75O6YZUN-D3k2sZNm.js} +2 -2
  15. package/dist/client/assets/{77XECAW3-DSSYRZCk.js → 77XECAW3-CjIq7P_x.js} +2 -2
  16. package/dist/client/assets/{ABYRPUBD-BKqULKA5.js → ABYRPUBD-hf0OeD7n.js} +2 -2
  17. package/dist/client/assets/AlertDialogRoot-BUODcEy9.js +2 -0
  18. package/dist/client/assets/{AnimatedHeight-CFR4EWDw.js → AnimatedHeight-CHpFDL1r.js} +2 -2
  19. package/dist/client/assets/{AuthSurfaceShell-X2oPejN8.js → AuthSurfaceShell-whDvSlDA.js} +2 -2
  20. package/dist/client/assets/{BB2UYUI2-C2iBTfII.js → BB2UYUI2-RUQPN7sp.js} +2 -2
  21. package/dist/client/assets/{BUM34MOA-D8LFlnDQ.js → BUM34MOA-f5Ez9vSp.js} +2 -2
  22. package/dist/client/assets/{CEQABKGZ-D15ZAT0K.js → CEQABKGZ-C2ZheKpY.js} +2 -2
  23. package/dist/client/assets/{CXAC5362-CicOZ45Z.js → CXAC5362-B0KvwGJk.js} +2 -2
  24. package/dist/client/assets/{ChatGptUsageButton-LQ3LzsF3.js → ChatGptUsageButton-CMIjZ66V.js} +2 -2
  25. package/dist/client/assets/{ChatMarkdown-DfVVLQX2.js → ChatMarkdown-C2KOLN1s.js} +5 -5
  26. package/dist/client/assets/{CheckboxIndicator-IpoyLEZ-.js → CheckboxIndicator-zwVHomgm.js} +2 -2
  27. package/dist/client/assets/{ClippedText-DTOlMbAH.js → ClippedText-Cx9jjhQp.js} +2 -2
  28. package/dist/client/assets/{CodexSetupSection.logic-B5cbwzh2.js → CodexSetupSection.logic-150217tr.js} +2 -2
  29. package/dist/client/assets/{ComboboxClear-DsPTusk5.js → ComboboxClear-tzFhNwrk.js} +2 -2
  30. package/dist/client/assets/{ComboboxGroupLabel-DqaoaBhS.js → ComboboxGroupLabel-C1Icd2UF.js} +2 -2
  31. package/dist/client/assets/{CommandBlock-Da9iVEid.js → CommandBlock-D9QqOlDX.js} +2 -2
  32. package/dist/client/assets/{ComposerPromptEditor-Bz4_w6ez.js → ComposerPromptEditor-D2ObH3Py.js} +4 -4
  33. package/dist/client/assets/{CompositeRoot-Dfl7FdSL.js → CompositeRoot-BD0GlRg8.js} +2 -2
  34. package/dist/client/assets/{ConnectionDiagnosisDetails-DCPX1JuG.js → ConnectionDiagnosisDetails-BQ3BFqRL.js} +2 -2
  35. package/dist/client/assets/{ConnectionStatusDot-DVkDejK1.js → ConnectionStatusDot-DLQm_zZ7.js} +2 -2
  36. package/dist/client/assets/{DRLTVNUE-BEVEy9Nb.js → DRLTVNUE-vgHnaBR1.js} +2 -2
  37. package/dist/client/assets/{DYY6UVD2-DtPiS3Ow.js → DYY6UVD2-BQAAF_8A.js} +2 -2
  38. package/dist/client/assets/{DevicePanel-B8KdDbzD.js → DevicePanel-Yd3YuPQd.js} +2 -2
  39. package/dist/client/assets/{DeviceSetup-5wa1rPPZ.js → DeviceSetup-DW4g9NNK.js} +2 -2
  40. package/dist/client/assets/{DialogTitle-JDa7kdjH.js → DialogTitle-DCMYEIWZ.js} +2 -2
  41. package/dist/client/assets/{DiffCommentAnnotation-Bp1MeIVC.js → DiffCommentAnnotation-BLItJ7Ia.js} +2 -2
  42. package/dist/client/assets/{DiffFileTree-b24emCci.js → DiffFileTree-B1-D1WV6.js} +2 -2
  43. package/dist/client/assets/{DiffPanel-bEjr64Vx.js → DiffPanel-BGnRzWM8.js} +2 -2
  44. package/dist/client/assets/{DiffWorkerPoolProvider-BoEAlLkf.js → DiffWorkerPoolProvider-BzkGX7xm.js} +2 -2
  45. package/dist/client/assets/{EmbeddedDesign-DmRjhA9k.js → EmbeddedDesign-BV_FcJ4l.js} +2 -2
  46. package/dist/client/assets/{EnvironmentMachineIcon-Emg7F_9r.js → EnvironmentMachineIcon-5-erc8l_.js} +2 -2
  47. package/dist/client/assets/{ExpandableText-CK6tzx1k.js → ExpandableText-D2jzDgm7.js} +2 -2
  48. package/dist/client/assets/{FNOVOB4O-C31Sm0mF.js → FNOVOB4O-CE98DPML.js} +2 -2
  49. package/dist/client/assets/{FieldControl-7KI8YfqD.js → FieldControl-CBMzQqd5.js} +2 -2
  50. package/dist/client/assets/{FileDiff-CXJUPm2t.js → FileDiff-2qSm00aV.js} +2 -2
  51. package/dist/client/assets/{FilePreviewPanel-BMID-IVR.js → FilePreviewPanel-Drpn6NuE.js} +2 -2
  52. package/dist/client/assets/{FoldedSettingsSection-Dzi9RecU.js → FoldedSettingsSection-Db7e_9rd.js} +2 -2
  53. package/dist/client/assets/{FormContext-DAP0MupI.js → FormContext-BGRz6hhb.js} +2 -2
  54. package/dist/client/assets/{HDGCDEEZ-DZ2nNieb.js → HDGCDEEZ-C0-Zci_l.js} +2 -2
  55. package/dist/client/assets/{HSJLKHB7-DlFBBKjs.js → HSJLKHB7-4e5L-KC4.js} +2 -2
  56. package/dist/client/assets/{Icons-aTRNsMJy.js → Icons-DwLGuyWf.js} +2 -2
  57. package/dist/client/assets/Input-DLaKk0qb.js +2 -0
  58. package/dist/client/assets/JZOYTAAL-SLYGD65P.js +1 -0
  59. package/dist/client/assets/{K3MD6TGW-Drb40Qks.js → K3MD6TGW-Gi4s7ooz.js} +2 -2
  60. package/dist/client/assets/{K7RP3OMA-C0M5Zt3R.js → K7RP3OMA-BVc6P2bZ.js} +2 -2
  61. package/dist/client/assets/{KeybindingsSettings.logic-mOtug0lc.js → KeybindingsSettings.logic-CU23l8mP.js} +2 -2
  62. package/dist/client/assets/{LHDIQX7Q-CdTAxECn.js → LHDIQX7Q-DbBCFdJr.js} +2 -2
  63. package/dist/client/assets/{LUXOKEGN-DtIPjv1z.js → LUXOKEGN-C4n0-A1h.js} +2 -2
  64. package/dist/client/assets/{MathTypeset-DTaIJ55e.js → MathTypeset--azkeKic.js} +2 -2
  65. package/dist/client/assets/{N3JZAHOW-C8Pvhbkj.js → N3JZAHOW-2wC96xvZ.js} +2 -2
  66. package/dist/client/assets/{NUIALGQ3-DY7_VZ5G.js → NUIALGQ3-Di1L_kRJ.js} +2 -2
  67. package/dist/client/assets/{NoProjectsHero-CDfuCTEv.js → NoProjectsHero-CC3oMKUV.js} +2 -2
  68. package/dist/client/assets/{O65XPQGZ-BH6EzDhm.js → O65XPQGZ-BeKB0m-p.js} +2 -2
  69. package/dist/client/assets/{O7XIQ6OM-BSPRvWV7.js → O7XIQ6OM-1wrcdCMc.js} +2 -2
  70. package/dist/client/assets/{OFQON5FD-VO8HiyY7.js → OFQON5FD-CsMmmhLT.js} +2 -2
  71. package/dist/client/assets/{P4ConnectAccountPages-Cbg00I7Q.js → P4ConnectAccountPages-BDxb29bY.js} +2 -2
  72. package/dist/client/assets/{P4ConnectSidebarSignIn-C9gBlkFF.js → P4ConnectSidebarSignIn-Dp5OsZBa.js} +2 -2
  73. package/dist/client/assets/{PJQHF43J-yTbK55y3.js → PJQHF43J-CY_GpbqJ.js} +2 -2
  74. package/dist/client/assets/{PanelLayoutControls-40ju6vkz.js → PanelLayoutControls-CqeL3uQz.js} +4 -4
  75. package/dist/client/assets/{PierreEntryIcon-HuUxlwtG.js → PierreEntryIcon-B5tjtDkE.js} +2 -2
  76. package/dist/client/assets/{PopoverHandle-CG975ng4.js → PopoverHandle-CZh3pqXt.js} +2 -2
  77. package/dist/client/assets/{PreviewPanel-Ljaq9IHA.js → PreviewPanel-CvBQAq3I.js} +2 -2
  78. package/dist/client/assets/{ProjectDefaultsSettings-DhwkzlK6.js → ProjectDefaultsSettings-DLJfUN7i.js} +2 -2
  79. package/dist/client/assets/{ProjectFavicon-UXGwc_-W.js → ProjectFavicon-CkSteHLT.js} +3 -3
  80. package/dist/client/assets/{ProjectIconPickerDialog-BAM7e1e5.js → ProjectIconPickerDialog-9heAZbVC.js} +2 -2
  81. package/dist/client/assets/{ProjectMonogram-f16fmYcx.js → ProjectMonogram-DIqp1OmB.js} +2 -2
  82. package/dist/client/assets/{ProviderAuthTerminal-e0ZkNHAb.js → ProviderAuthTerminal-BSsraub7.js} +2 -2
  83. package/dist/client/assets/{ProviderModelPicker-BviWI2wX.js → ProviderModelPicker-AkULlCAn.js} +2 -2
  84. package/dist/client/assets/{ProviderSettingsForm-CXMFT8YA.js → ProviderSettingsForm-CAFBbrfr.js} +2 -2
  85. package/dist/client/assets/{PullRequestCodeTab-Bm67cV34.js → PullRequestCodeTab-BamXVeZz.js} +2 -2
  86. package/dist/client/assets/{RHNBAITX-TQrYdbHC.js → RHNBAITX-BdiF8iR_.js} +2 -2
  87. package/dist/client/assets/{ReadOnlySourcePreview-xMB_y284.js → ReadOnlySourcePreview-BXDLfPcr.js} +2 -2
  88. package/dist/client/assets/{RenderErrorBoundary-C2ZkZ4DB.js → RenderErrorBoundary-CR2cHAQ5.js} +2 -2
  89. package/dist/client/assets/{SLD4V6NK-Bz1tyL2C.js → SLD4V6NK-Bo1z-c9S.js} +2 -2
  90. package/dist/client/assets/{ScheduledTasksSettings-D-GMMbJH.js → ScheduledTasksSettings-DF_KhqLx.js} +2 -2
  91. package/dist/client/assets/{ScopedSwitch-DBUAjY1n.js → ScopedSwitch-CX4FTGjy.js} +2 -2
  92. package/dist/client/assets/{ScrollAreaCorner-U1Zhpkdl.js → ScrollAreaCorner-BCdJHqsj.js} +2 -2
  93. package/dist/client/assets/{SecretInput-BxYmGvR5.js → SecretInput-BPPzPNI1.js} +2 -2
  94. package/dist/client/assets/{SelectScrollUpArrow-CJ4E0xi4.js → SelectScrollUpArrow-CR3Z6_pf.js} +2 -2
  95. package/dist/client/assets/{SettingsPanels-DRK5QQ04.js → SettingsPanels-DoJnxtp0.js} +2 -2
  96. package/dist/client/assets/{SettingsPanels.logic-Bdp6GzIj.js → SettingsPanels.logic-t7cG-B6z.js} +2 -2
  97. package/dist/client/assets/{SettingsScopeNotice-DYiUHoov.js → SettingsScopeNotice-DD4QFo3v.js} +2 -2
  98. package/dist/client/assets/{T3PCR2KE-DJwqsK9f.js → T3PCR2KE-Cg6A465M.js} +2 -2
  99. package/dist/client/assets/{TKWO2OVW-CRU32th0.js → TKWO2OVW-CWeCEb5C.js} +2 -2
  100. package/dist/client/assets/{TSHNXIZL-dMhDuHVe.js → TSHNXIZL-DTjzxHgA.js} +2 -2
  101. package/dist/client/assets/{ThemeEditorPanel-BIQc-w2Q.js → ThemeEditorPanel-BwydY72w.js} +2 -2
  102. package/dist/client/assets/{ThreadTerminalDrawer-BqO5rPzw.js → ThreadTerminalDrawer-QTFG89J_.js} +2 -2
  103. package/dist/client/assets/{TooltipViewport-Bz56sWCM.js → TooltipViewport-C14m3uB7.js} +2 -2
  104. package/dist/client/assets/{UQJE5E4I-DH2S3Hdw.js → UQJE5E4I-DS4MjKhw.js} +2 -2
  105. package/dist/client/assets/{USNYFO5S-Cfz4g-2W.js → USNYFO5S-Be1OZGok.js} +2 -2
  106. package/dist/client/assets/{Virtualizer-ChRGRE40.js → Virtualizer-BpizRoFL.js} +2 -2
  107. package/dist/client/assets/{WEVWDWVA-C55QWN7O.js → WEVWDWVA-oFS2VG1Y.js} +2 -2
  108. package/dist/client/assets/{WorkspaceBreadcrumb-8nBISaRF.js → WorkspaceBreadcrumb-ckARUoj9.js} +2 -2
  109. package/dist/client/assets/{WorkspacePageContainer-BGE_kHaP.js → WorkspacePageContainer-D5yW7_av.js} +2 -2
  110. package/dist/client/assets/{WorkspacePageHeader-D704geLh.js → WorkspacePageHeader-CTWcEH7d.js} +2 -2
  111. package/dist/client/assets/{X5RFHQXM-hmS6q1sh.js → X5RFHQXM-Bjw0rDxX.js} +2 -2
  112. package/dist/client/assets/{X62E3GBT-BhTtqjj4.js → X62E3GBT-BPHYY59t.js} +2 -2
  113. package/dist/client/assets/{XBNEOJTC-1paZyqxX.js → XBNEOJTC-W72qCYdc.js} +2 -2
  114. package/dist/client/assets/{YHV2MVVZ-DbfthGUh.js → YHV2MVVZ-DA_drdwk.js} +2 -2
  115. package/dist/client/assets/{YURCZMG2-D8tAzwGP.js → YURCZMG2-CsfrwNLG.js} +2 -2
  116. package/dist/client/assets/{YVG2LODB-DMSQWWQ_.js → YVG2LODB-dXCBipzg.js} +2 -2
  117. package/dist/client/assets/{_chat-CXVo1NVJ.js → _chat-BIqme2Hz.js} +5 -5
  118. package/dist/client/assets/{_chat.design-CdPf_wsA.js → _chat.design-KVMajkdX.js} +2 -2
  119. package/dist/client/assets/{_chat.index-BkTRJLOf.js → _chat.index-BknTP6QZ.js} +2 -2
  120. package/dist/client/assets/{_chat.new-CEmRJFEH.js → _chat.new-DLFV1XOJ.js} +2 -2
  121. package/dist/client/assets/{_chat.pull-requests-4M0tUrJ6.js → _chat.pull-requests-BDLRkW2A.js} +2 -2
  122. package/dist/client/assets/{alert-DiE1d01s.js → alert-Dh8AVuLe.js} +2 -2
  123. package/dist/client/assets/{assetUrls-BeScRf6b.js → assetUrls-C6W2_00u.js} +2 -2
  124. package/dist/client/assets/{assets-RdKoqY9e.js → assets-D-xsxvzf.js} +2 -2
  125. package/dist/client/assets/{browserHistoryStore-hrG24FfH.js → browserHistoryStore-CeBJcpoN.js} +2 -2
  126. package/dist/client/assets/{browserLinkTarget-D8HEmVsi.js → browserLinkTarget-D5ew8rLG.js} +2 -2
  127. package/dist/client/assets/{checkbox-CwFE3KXZ.js → checkbox-Y4v7A1IZ.js} +2 -2
  128. package/dist/client/assets/{color-picker-BKtR2mwD.js → color-picker-DEWeNc5K.js} +2 -2
  129. package/dist/client/assets/{combobox-DBUxcuwi.js → combobox-DGrx2JGy.js} +2 -2
  130. package/dist/client/assets/{command-NV0JEoGo.js → command-DR1GjC1a.js} +2 -2
  131. package/dist/client/assets/{composer-logic-BQdFVlkE.js → composer-logic-BW4G8aDL.js} +2 -2
  132. package/dist/client/assets/{composerDraftUploads-BmpBCVnP.js → composerDraftUploads-DK6jH0cB.js} +2 -2
  133. package/dist/client/assets/{connect-Bzgsrfe8.js → connect-B1NcR-kN.js} +2 -2
  134. package/dist/client/assets/{connect-agent-BCguLPkZ.js → connect-agent-BNrm24qs.js} +2 -2
  135. package/dist/client/assets/{design-BGLTZdWG.js → design-CbG6XJYX.js} +2 -2
  136. package/dist/client/assets/{device-D0-STSSP.js → device-6R-yC55P.js} +2 -2
  137. package/dist/client/assets/{dialog-pqqgtsKn.js → dialog-BwjzOzO6.js} +2 -2
  138. package/dist/client/assets/{diffRendering-eAJMSnXr.js → diffRendering-CG_sb5me.js} +2 -2
  139. package/dist/client/assets/{dist-KeWCSS5h.js → dist-CFar2AY1.js} +3 -3
  140. package/dist/client/assets/{draft-input-DrGl-qts.js → draft-input-CpqOZR5i.js} +2 -2
  141. package/dist/client/assets/{duoViewer-DKygyhUj.js → duoViewer-BhE8QUaC.js} +2 -2
  142. package/dist/client/assets/{dynamic-DKhgWyT6.js → dynamic-CIBySV57.js} +2 -2
  143. package/dist/client/assets/{embeddedScripts-WSYzbtcW.js → embeddedScripts-B0vXhhvs.js} +2 -2
  144. package/dist/client/assets/{empty-Du5F51Da.js → empty-C0oiFHy_.js} +2 -2
  145. package/dist/client/assets/{entities-n6SMnPE8.js → entities-Om5Klild.js} +2 -2
  146. package/dist/client/assets/{fileLinks-BEJjCE8r.js → fileLinks-CP5NWXaI.js} +2 -2
  147. package/dist/client/assets/{fileTreeExpansion-CCF3XVRn.js → fileTreeExpansion-BKVd4HrC.js} +2 -2
  148. package/dist/client/assets/{getDiffFileInput-Dkc1Whpr.js → getDiffFileInput-CIK5OMl_.js} +2 -2
  149. package/dist/client/assets/{guideRunStore-CVyie1IJ.js → guideRunStore-CegZr43-.js} +2 -2
  150. package/dist/client/assets/{htmlRender-fSOuRG49.js → htmlRender-NqJI2UJ2.js} +2 -2
  151. package/dist/client/assets/{index-RvCv9K-x.js → index-Czsz7nXH.js} +3 -3
  152. package/dist/client/assets/{input-GkmNnHh7.js → input-BCWES8Y7.js} +2 -2
  153. package/dist/client/assets/{input-group-Cql1yQRL.js → input-group-CfPOCEuC.js} +2 -2
  154. package/dist/client/assets/{kbd-D2OGhJqG.js → kbd-EDrgCOls.js} +2 -2
  155. package/dist/client/assets/{keybindings-1XWkWeQB.js → keybindings-BG7j7M7S.js} +2 -2
  156. package/dist/client/assets/{lazy-BUyZ03gL.js → lazy-D6W01WxZ.js} +4 -4
  157. package/dist/client/assets/{lazyRouteComponent-BXmOK9bz.js → lazyRouteComponent-B8CSLurY.js} +2 -2
  158. package/dist/client/assets/{link-BGMNeg05.js → link-COzhJ6br.js} +2 -2
  159. package/dist/client/assets/{linkedPrompt-B3l4m_6D.js → linkedPrompt-X4NBlFef.js} +2 -2
  160. package/dist/client/assets/{main-Dcfxjdkd.js → main-BGaSDXjP.js} +7 -7
  161. package/dist/client/assets/{mediaReference-CsA5Lv5E.js → mediaReference-CKap6oNP.js} +2 -2
  162. package/dist/client/assets/{mediaSource-BbYoxHZJ.js → mediaSource-DG5l5-5f.js} +2 -2
  163. package/dist/client/assets/{number-field-jauVDwvy.js → number-field-DGdBjQD2.js} +2 -2
  164. package/dist/client/assets/{observeResize-CNtO3VS7.js → observeResize-BUAH1dvA.js} +2 -2
  165. package/dist/client/assets/{onboarding-KXMrOHsw.js → onboarding-CnVH7A6c.js} +2 -2
  166. package/dist/client/assets/{openFileInPreview-BKTnNQFl.js → openFileInPreview-B0i3eZpu.js} +2 -2
  167. package/dist/client/assets/{p4ProjectFile-sAVjpCzn.js → p4ProjectFile-0RRo3hX4.js} +2 -2
  168. package/dist/client/assets/{pair-BIaVaT-B.js → pair-B4KNAPh5.js} +2 -2
  169. package/dist/client/assets/{pendingSendStore-CPz2p40W.js → pendingSendStore-Dzn7x7Cg.js} +2 -2
  170. package/dist/client/assets/{phoneViewer-DGKQHyy3.js → phoneViewer-RhpfiwR2.js} +2 -2
  171. package/dist/client/assets/{pierre-icons-6ByaxkH5.js → pierre-icons-Cisj4-__.js} +2 -2
  172. package/dist/client/assets/{popover-BIXQitBy.js → popover-BnqKHl4L.js} +2 -2
  173. package/dist/client/assets/{preview-BcEybEc8.js → preview-CiojYkh4.js} +2 -2
  174. package/dist/client/assets/{preview-C3ymkoAM.js → preview-Dwq2O7nm.js} +2 -2
  175. package/dist/client/assets/{previewMiniPlayerStore-DWw2A_gt.js → previewMiniPlayerStore-ByZNhmNc.js} +2 -2
  176. package/dist/client/assets/{primary-DD11poOa.js → primary-CMwTDEi1.js} +2 -2
  177. package/dist/client/assets/{primaryCloudLinkState-CD2_f6q-.js → primaryCloudLinkState-2j4MjqVh.js} +2 -2
  178. package/dist/client/assets/{projectFilesQueryState-C8dGr8oR.js → projectFilesQueryState-DXrTSOqg.js} +2 -2
  179. package/dist/client/assets/{projectScriptEditor-CNXQwWP8.js → projectScriptEditor-B4iSq27p.js} +2 -2
  180. package/dist/client/assets/{providerSkills-CNeLyiqf.js → providerSkills-C4Fu_qyq.js} +2 -2
  181. package/dist/client/assets/{pullRequestDetail.logic-BNpxef-3.js → pullRequestDetail.logic-BmYDDw_8.js} +2 -2
  182. package/dist/client/assets/{pullRequestIcons-CSs54zQk.js → pullRequestIcons-DFcQ9rtl.js} +2 -2
  183. package/dist/client/assets/{pullRequestReviewStore-BawbGhnx.js → pullRequestReviewStore-BGzKslrq.js} +2 -2
  184. package/dist/client/assets/{pullRequests-jsc4Hq78.js → pullRequests-DT0oG7tF.js} +2 -2
  185. package/dist/client/assets/{queries-DZV2RDc9.js → queries-CXgT6mki.js} +2 -2
  186. package/dist/client/assets/{query-BV3IuYff.js → query-DlK0I8Jc.js} +2 -2
  187. package/dist/client/assets/{radio-group-yq5YEgUO.js → radio-group-DOHTpBxX.js} +2 -2
  188. package/dist/client/assets/{renderScheduler--3RDWz9Z.js → renderScheduler-Df4T8RWh.js} +2 -2
  189. package/dist/client/assets/{rightPanelStore-CeZBJCMI.js → rightPanelStore-DXw7-xK3.js} +2 -2
  190. package/dist/client/assets/{runtime-DTUiqO10.js → runtime-BL7IF4n-.js} +3 -3
  191. package/dist/client/assets/{runtime-DSZ2mWrf.js → runtime-Dm3Pi31_.js} +3 -3
  192. package/dist/client/assets/{runtimeModeConfig-BwioIXVs.js → runtimeModeConfig-_-kQoAWi.js} +2 -2
  193. package/dist/client/assets/{scheduledTasksSettings.logic-DefawCwN.js → scheduledTasksSettings.logic-7E0KSnA7.js} +2 -2
  194. package/dist/client/assets/{scroll-area-CfW8fzQ8.js → scroll-area-B9LorBFb.js} +2 -2
  195. package/dist/client/assets/{select-C10oXKGz.js → select-Ctq0UILH.js} +2 -2
  196. package/dist/client/assets/{server-ztj8tD38.js → server-BvxyePeo.js} +2 -2
  197. package/dist/client/assets/{session-yxXjF8AQ.js → session-C7ckxjAM.js} +2 -2
  198. package/dist/client/assets/{session-logic-w7gGMFHb.js → session-logic-P8gC-UQc.js} +2 -2
  199. package/dist/client/assets/{settings-CgshkEb_.js → settings-BqhxEPKC.js} +2 -2
  200. package/dist/client/assets/{settings.appearance-yicuncxz.js → settings.appearance-DljtCz6-.js} +2 -2
  201. package/dist/client/assets/settings.archived-SsFK0IFf.js +2 -0
  202. package/dist/client/assets/{settings.computer-use-lOJg1Jos.js → settings.computer-use-CVmc70Ib.js} +2 -2
  203. package/dist/client/assets/{settings.connections-DSPQOd-W.js → settings.connections-BrPlTKQ_.js} +2 -2
  204. package/dist/client/assets/{settings.data-controls-CZ5aXdyA.js → settings.data-controls-Cdccmn63.js} +2 -2
  205. package/dist/client/assets/{settings.decisions-C8qxQCjl.js → settings.decisions-pkwqjsKP.js} +2 -2
  206. package/dist/client/assets/{settings.designs-j9E6N2pN.js → settings.designs-TeCw-uLf.js} +2 -2
  207. package/dist/client/assets/{settings.diagnostics-yio3SGbE.js → settings.diagnostics-BZD1uMGP.js} +2 -2
  208. package/dist/client/assets/{settings.general-BCrYSHkU.js → settings.general-uxwywmhh.js} +2 -2
  209. package/dist/client/assets/{settings.integrations-Dl-vtiOS.js → settings.integrations-Du282Gn7.js} +2 -2
  210. package/dist/client/assets/{settings.keybindings-BQ-LrcTn.js → settings.keybindings-C0FBNk1_.js} +2 -2
  211. package/dist/client/assets/{settings.open-source-licenses-BHiHgzgF.js → settings.open-source-licenses-wMwaYCss.js} +2 -2
  212. package/dist/client/assets/{settings.plugins-DavhWo4Q.js → settings.plugins-CFiDE3ms.js} +2 -2
  213. package/dist/client/assets/{settings.projects-uuJOwkSl.js → settings.projects-DN0n2td7.js} +3 -3
  214. package/dist/client/assets/{settings.providers-rZQTQdtf.js → settings.providers-DeUZZg7C.js} +3 -3
  215. package/dist/client/assets/{settings.scheduled-tasks-DoWHIDOp.js → settings.scheduled-tasks-uCL4Wgvt.js} +2 -2
  216. package/dist/client/assets/{settings.snap-shot-ClKlVUUJ.js → settings.snap-shot-C4OHP0nR.js} +2 -2
  217. package/dist/client/assets/{settings.source-control-o8jFa_Cr.js → settings.source-control-pMBspYC4.js} +2 -2
  218. package/dist/client/assets/{settings.storage-Bb-cW0xG.js → settings.storage-QCydiEyw.js} +2 -2
  219. package/dist/client/assets/{settingsLayout-DzBeWTUO.js → settingsLayout-DFYjWgKN.js} +2 -2
  220. package/dist/client/assets/{sidebar-Bd6PzVyD.js → sidebar-CRr8B41y.js} +2 -2
  221. package/dist/client/assets/{sidebarProjectGrouping-C13IyN_p.js → sidebarProjectGrouping-miDXfjI3.js} +2 -2
  222. package/dist/client/assets/{skeleton-pd7m2J5F.js → skeleton-C9J-Xl06.js} +2 -2
  223. package/dist/client/assets/{sourceControl-Y9v_vyKt.js → sourceControl-C8nJMDiL.js} +2 -2
  224. package/dist/client/assets/{sourceControlClients-KQ5315mN.js → sourceControlClients-DKONtKbZ.js} +2 -2
  225. package/dist/client/assets/{spinner-CW23--q5.js → spinner-CNva85zM.js} +2 -2
  226. package/dist/client/assets/{terminal-links-Bd9AoAyA.js → terminal-links-BJzLp7ix.js} +2 -2
  227. package/dist/client/assets/{terminalSessions-CF7f4A-6.js → terminalSessions-BPc8sBGR.js} +2 -2
  228. package/dist/client/assets/{textarea-DSS-lavF.js → textarea-DjRGRzMg.js} +2 -2
  229. package/dist/client/assets/{themePalette-C_1pk_Mi.js → themePalette-fhKYLCuU.js} +2 -2
  230. package/dist/client/assets/{toast-BFuAqla3.js → toast-BcjbmUtS.js} +2 -2
  231. package/dist/client/assets/{toggle-Cpfo0sMT.js → toggle-Bbnow7xY.js} +2 -2
  232. package/dist/client/assets/{toggle-group-FrArhs7R.js → toggle-group-Cilo8czD.js} +2 -2
  233. package/dist/client/assets/{tooltip-CSzrAm8M.js → tooltip-T5ePvxsH.js} +2 -2
  234. package/dist/client/assets/{uiStateStore-VHQ8vDs5.js → uiStateStore-D9r3BNZ-.js} +2 -2
  235. package/dist/client/assets/{usage-uwswTMhu.js → usage-QBPLx2wr.js} +2 -2
  236. package/dist/client/assets/{usageAccess-BDwH_c8I.js → usageAccess-DUfVA8nU.js} +2 -2
  237. package/dist/client/assets/{usageFormat-CKgwjLMR.js → usageFormat-C-mTuUS7.js} +2 -2
  238. package/dist/client/assets/{usageShortcuts-lXBRgPmi.js → usageShortcuts-CB6TvooP.js} +2 -2
  239. package/dist/client/assets/{use-atom-command-CSWaAmR7.js → use-atom-command-BNkv9iyk.js} +2 -2
  240. package/dist/client/assets/{useAriaLabelledBy-vgEmgPPR.js → useAriaLabelledBy-D5HM2KLM.js} +2 -2
  241. package/dist/client/assets/{useHandleNewThread-BVFM3SUe.js → useHandleNewThread-DntRaFvm.js} +2 -2
  242. package/dist/client/assets/{useLocation-FEfJrgGU.js → useLocation-DbWity7H.js} +2 -2
  243. package/dist/client/assets/{useNavigate-Lp_S-tAl.js → useNavigate-Cxh24teV.js} +2 -2
  244. package/dist/client/assets/{useNavigateBack-BTJoRrRy.js → useNavigateBack-B5mTfIHJ.js} +2 -2
  245. package/dist/client/assets/{useP4ConnectAuthPrompt-7Z8osIH2.js → useP4ConnectAuthPrompt-sjWWPvrn.js} +2 -2
  246. package/dist/client/assets/{useParams-8KxPyQmv.js → useParams-D9PdK0IA.js} +2 -2
  247. package/dist/client/assets/{usePermissionStatus-CyvlYHNs.js → usePermissionStatus-D6i3IaCj.js} +2 -2
  248. package/dist/client/assets/{usePullRequestActions-DfyxdDPg.js → usePullRequestActions-9274Vp3W.js} +2 -2
  249. package/dist/client/assets/{useRegisterFieldControl-Dj6RbECy.js → useRegisterFieldControl-DZyLTxKX.js} +2 -2
  250. package/dist/client/assets/{useScopedModelAvailability-BfFbT2DU.js → useScopedModelAvailability-CmlQi7Iz.js} +2 -2
  251. package/dist/client/assets/{useSettings-CPPvBMmM.js → useSettings-BL4ZWGQV.js} +2 -2
  252. package/dist/client/assets/{utils-BE5iQuUP.js → utils-CrFJwxSd.js} +2 -2
  253. package/dist/client/assets/{vcsRefInvalidation-DCdd2BDA.js → vcsRefInvalidation-BPy1eoDi.js} +2 -2
  254. package/dist/client/assets/{welcome-CIETplg9.js → welcome-DVusCS_L.js} +2 -2
  255. package/dist/client/index.html +1 -1
  256. package/dist/{renderer-D8FhaVWU.mjs → renderer-CJXpJ36b.mjs} +2 -2
  257. package/dist/{runtime-a3PrAU7n.mjs → runtime-EqYv-lrV.mjs} +2 -2
  258. package/package.json +1 -1
  259. package/dist/client/assets/AlertDialogRoot-B--i3imS.js +0 -2
  260. package/dist/client/assets/Input-rVh9fuLP.js +0 -2
  261. package/dist/client/assets/JZOYTAAL-DXVzZiqj.js +0 -1
  262. package/dist/client/assets/settings.archived-ZXG8lJ_T.js +0 -2
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PullRequestCodeTab-Bm67cV34.js","assets/react-DH3P2YXY.js","assets/jsx-runtime-BnjsACtP.js","assets/utils-BE5iQuUP.js","assets/activity-BT9zGwI4.js","assets/createLucideIcon-BRvysHna.js","assets/Icon-BiSXef-P.js","assets/alarm-clock-DLm_0oDD.js","assets/app-window-CBNJqZPl.js","assets/archive-D_14z4Xm.js","assets/arrow-down-up-Tu6B2hri.js","assets/arrow-down-Bo_WAMYh.js","assets/arrow-left-Ba8eq_9S.js","assets/arrow-right-left-DyJucsB1.js","assets/arrow-right-Bg4mlTrk.js","assets/arrow-up-down-AigUcA_4.js","assets/arrow-up-left-C6F8l2kC.js","assets/arrow-up-right-BNXlwlzJ.js","assets/arrow-up-D4kutFpL.js","assets/battery-DdftvRcq.js","assets/bell-4pS2DvJU.js","assets/blocks-N48yRCu0.js","assets/book-open-m1zikk07.js","assets/bookmark-DCumPe18.js","assets/bot-C71zefL3.js","assets/box-N7KHNXgQ.js","assets/bug-_77C5nd4.js","assets/calendar-arrow-down-tK2df2Gr.js","assets/calendar-arrow-up-DoqzmS-b.js","assets/calendar-clock-D24iG-gJ.js","assets/calendar-CuDpKI2e.js","assets/camera-CRxcom4Z.js","assets/chart-no-axes-column-CWRXr09M.js","assets/check-Cs_SSACZ.js","assets/chevron-down-Do9qqNbR.js","assets/chevron-left-D56AngEd.js","assets/chevron-right-CcbZ6PxZ.js","assets/chevron-up-CZEzk9UW.js","assets/chevrons-left-right-ellipsis-BuDdURW0.js","assets/chevrons-up-down-CMYBD15h.js","assets/chromium-IRgsGkxl.js","assets/circle-alert-Rh3WFq8P.js","assets/circle-arrow-up-CBkBThPI.js","assets/circle-check-Davl0yih.js","assets/circle-dashed-Divqvc3s.js","assets/circle-dot-DDXvyPkX.js","assets/circle-slash-BHppGVB2.js","assets/circle-x-DCG47j33.js","assets/circle-BXaepj2J.js","assets/clock-3-BjqRuWmx.js","assets/clock-BZce7MqL.js","assets/cloud-download-Cw2Qyeof.js","assets/cloud-upload-Bbq2IGQX.js","assets/cloud-Cnpuf424.js","assets/code-xml-C7_RVxwx.js","assets/code-C8ZFD3fi.js","assets/columns-2-R7e6oP5f.js","assets/copy-C6t_ZU58.js","assets/corner-left-up-CIgtHeD1.js","assets/corner-up-right-BWhPHx5s.js","assets/cpu-4YV41FL_.js","assets/database-0EoDfSWv.js","assets/download-CfEwtjBn.js","assets/earth-B0lYBmT1.js","assets/ellipsis-vertical-BM1Lc1f1.js","assets/ellipsis-CSD7gEuG.js","assets/external-link-Df6uBnqH.js","assets/eye-off-D5GkPp8X.js","assets/eye-DlWBkL1d.js","assets/file-braces-DycW5IfR.js","assets/file-code-corner-Bph0gpk_.js","assets/file-diff-uE_kfwjO.js","assets/file-search-BxZuGCW_.js","assets/file-spreadsheet-BDzNPY8g.js","assets/file-text-Bn72KOhu.js","assets/file-DHjVYhLT.js","assets/files-DsO7Sg8V.js","assets/film-Bbn0ceXE.js","assets/flask-conical-Cg6idKdH.js","assets/folder-closed-D6kbWc3q.js","assets/folder-cog-CBSQaLA2.js","assets/folder-git-2-n1sLmp_t.js","assets/folder-git-DCVI-R4l.js","assets/folder-open-Bu-nFCGY.js","assets/folder-plus-wg03g0vP.js","assets/folder-tree-FUExeKOH.js","assets/folder-Cieksypr.js","assets/gauge-Cgf0xSWC.js","assets/git-branch-plus-GXmZfN57.js","assets/git-branch-BWQfoO37.js","assets/git-commit-horizontal-BI_Z5Kib.js","assets/git-fork-CK2oK4JM.js","assets/git-merge-CH86CpaI.js","assets/git-pull-request-arrow-BYmuTHnq.js","assets/git-pull-request-closed-EzDnMgeA.js","assets/git-pull-request-draft-DbMmZ9EC.js","assets/globe-DHq8q48U.js","assets/grip-vertical-sTbvrVma.js","assets/hammer-BnFrycrq.js","assets/hard-drive-CnhXqMSu.js","assets/hat-glasses-C1sL_lJD.js","assets/history-BOloOry4.js","assets/house-LvUaI36y.js","assets/image-DFl_i29V.js","assets/inbox-Bfua4pqw.js","assets/info-Bwtivk15.js","assets/keyboard-C94dd8zf.js","assets/laptop-BJfWDOqH.js","assets/layers-BczY2xKh.js","assets/lightbulb-AbDNyk1F.js","assets/link-2-J9n7Ukgt.js","assets/link-iM9yOrD5.js","assets/list-checks--PgwqWme.js","assets/list-filter-C7uwdO5w.js","assets/list-ordered-JmJCtT6d.js","assets/list-todo-BOZtqLIw.js","assets/list-BNel2JmV.js","assets/loader-circle-DOPuwGUy.js","assets/lock-open-qdfB-3sG.js","assets/lock-CNeMaiIX.js","assets/log-in-DuxSLs9h.js","assets/mail-DrFNo5rr.js","assets/maximize-2-C4jSdiqI.js","assets/maximize-BKkQJR3r.js","assets/memory-stick-yVhfpVno.js","assets/message-circle-question-mark-qR5q6Xbi.js","assets/message-circle-qu3riBnu.js","assets/message-square-dashed-BDjE-epL.js","assets/message-square-off-BF3vA0b4.js","assets/message-square-text-CfjrqiSr.js","assets/message-square-warning-6MHWBWO6.js","assets/message-square-B2NO3ViY.js","assets/messages-square-BDA1tcVi.js","assets/minimize-2-D1qaBNiP.js","assets/minus-DVH2v7vL.js","assets/monitor-DYdSXGUQ.js","assets/moon-z0kk2bkY.js","assets/mouse-pointer-2-BzC5PGDm.js","assets/mouse-pointer-click-_zj1O0gg.js","assets/octagon-alert-BQp6gUkE.js","assets/package-plus-DaYcLmCH.js","assets/package-BDRaz7Ff.js","assets/paintbrush-Cd3ye7YJ.js","assets/palette-DWDYvvRF.js","assets/panel-bottom-DX8HINCH.js","assets/panel-left-aKsqIRJO.js","assets/panel-right-XrDzcWDK.js","assets/paperclip-BAtVoM2Q.js","assets/panels-top-left-ug17nD5b.js","assets/pen-line-BtsHFcuV.js","assets/pencil-ruler-u4ck96IX.js","assets/pencil-CS36_8K6.js","assets/picture-in-picture-2-CTTZM7s_.js","assets/pilcrow-B0pICPe4.js","assets/pin-B28emPdt.js","assets/play-utur7gJ1.js","assets/plug-2-BbsYUlrD.js","assets/plus-BFikiw2m.js","assets/plug-Cz_1a3P7.js","assets/power-lnBvrj1p.js","assets/presentation-DuhP07nk.js","assets/puzzle-_xVT2Tkf.js","assets/qr-code-8OyojaA-.js","assets/quote-CY1r_9f2.js","assets/radio-tower-CQ9UBgC-.js","assets/redo-2-CMJUpQN9.js","assets/refresh-cw-Bb4DfPZ_.js","assets/rotate-ccw-DIk8O74I.js","assets/rotate-cw-BCqL9vBU.js","assets/route-DDK4p_jp.js","assets/rows-3-KtFgL-bn.js","assets/scale-BWqluNv-.js","assets/search-2NYXmfL3.js","assets/send-Usbx4MSt.js","assets/server-C5VT7--0.js","assets/settings-2-CG9Vl9Oj.js","assets/settings-CSrjOUO8.js","assets/shield-check-BhnliHga.js","assets/shield-question-mark-DJzZ_XtG.js","assets/shield-Bo3bXsl5.js","assets/sliders-horizontal-CbQdxecl.js","assets/smartphone-DLXjLUvY.js","assets/smile-plus-B6sk7n9M.js","assets/sparkles-D72pVUsJ.js","assets/square-arrow-out-up-right-D4Y8_c2a.js","assets/square-pen-B9IATJSK.js","assets/square-split-horizontal-BEBi5lgX.js","assets/square-split-vertical-BvRRvh2L.js","assets/square-terminal-MebNo2O3.js","assets/square-ChD_5l-9.js","assets/star-BFGG9hcF.js","assets/sun-CV31Z7e1.js","assets/tag-DAyj5h5G.js","assets/target-DRkzkaHT.js","assets/terminal-Dbk8nKIT.js","assets/text-align-start-BlQ02nAY.js","assets/text-search-CmNwvT1W.js","assets/text-wrap-Y7SHIazH.js","assets/ticket-B3TOD4z9.js","assets/trash-2-vrfXuXSc.js","assets/trending-down-0HJRpRPf.js","assets/trending-up-B0AABrFJ.js","assets/triangle-alert-DcIYyjDc.js","assets/type-CcxvYAFU.js","assets/undo-2-CbzuoKHe.js","assets/unlink-2-Cu9CVRNc.js","assets/unplug-D0qX6EAT.js","assets/upload-_7gAV2BZ.js","assets/user-check-vIX5oc4W.js","assets/user-lock-Bz0imDJs.js","assets/user-plus-6mh3DQc1.js","assets/user-round-x-Dyi0-TdA.js","assets/user-round-CdU_AaX_.js","assets/users-CfjzCdxE.js","assets/wifi-off-DzVPlURa.js","assets/workflow-DbsdAT4Y.js","assets/wrench-Bjp_8iLx.js","assets/x-CJgPyqpa.js","assets/zap-C_GfNMdZ.js","assets/runtime-DSZ2mWrf.js","assets/runtime-DTUiqO10.js","assets/TooltipViewport-Bz56sWCM.js","assets/toast-BFuAqla3.js","assets/spinner-CW23--q5.js","assets/useParams-8KxPyQmv.js","assets/DiffFileTree-b24emCci.js","assets/useSettings-CPPvBMmM.js","assets/server-ztj8tD38.js","assets/session-yxXjF8AQ.js","assets/use-atom-command-CSWaAmR7.js","assets/themePalette-C_1pk_Mi.js","assets/diffRendering-eAJMSnXr.js","assets/index-RvCv9K-x.js","assets/fileTreeExpansion-CCF3XVRn.js","assets/pierre-icons-6ByaxkH5.js","assets/query-BV3IuYff.js","assets/DiffCommentAnnotation-Bp1MeIVC.js","assets/Virtualizer-ChRGRE40.js","assets/getDiffFileInput-Dkc1Whpr.js","assets/main-Dcfxjdkd.js","assets/vcsRefInvalidation-DCdd2BDA.js","assets/entities-n6SMnPE8.js","assets/number-field-jauVDwvy.js","assets/useRegisterFieldControl-Dj6RbECy.js","assets/FormContext-DAP0MupI.js","assets/CSPContext-DGVCKkcb.js","assets/select-C10oXKGz.js","assets/SelectScrollUpArrow-CJ4E0xi4.js","assets/link-BGMNeg05.js","assets/redirect-D3L17tzd.js","assets/lazyRouteComponent-BXmOK9bz.js","assets/useNavigate-Lp_S-tAl.js","assets/useLocation-FEfJrgGU.js","assets/rightPanelStore-CeZBJCMI.js","assets/toastHelpers-DxXYm50b.js","assets/queries-DZV2RDc9.js","assets/session-logic-w7gGMFHb.js","assets/htmlRender-fSOuRG49.js","assets/mediaSource-BbYoxHZJ.js","assets/fileLinks-BEJjCE8r.js","assets/mediaReference-CsA5Lv5E.js","assets/usageFormat-CKgwjLMR.js","assets/timestampFormat-wac2e_Jz.js","assets/env-wK1YYxA8.js","assets/tooltip-CSzrAm8M.js","assets/skeleton-pd7m2J5F.js","assets/useAriaLabelledBy-vgEmgPPR.js","assets/toggle-Cpfo0sMT.js","assets/toggle-group-FrArhs7R.js","assets/CompositeRoot-Dfl7FdSL.js","assets/input-GkmNnHh7.js","assets/Input-rVh9fuLP.js","assets/FieldControl-7KI8YfqD.js","assets/scroll-area-CfW8fzQ8.js","assets/ScrollAreaCorner-U1Zhpkdl.js","assets/dist-KeWCSS5h.js","assets/DialogTitle-JDa7kdjH.js","assets/dialog-pqqgtsKn.js","assets/sidebar-Bd6PzVyD.js","assets/useResizeDrag-Dc7crya0.js","assets/observeResize-CNtO3VS7.js","assets/AnimatedHeight-CFR4EWDw.js","assets/assets-RdKoqY9e.js","assets/sourceControl-Y9v_vyKt.js","assets/assetUrls-BeScRf6b.js","assets/browserHistoryStore-hrG24FfH.js","assets/preview-C3ymkoAM.js","assets/openFileInPreview-BKTnNQFl.js","assets/keybindings-1XWkWeQB.js","assets/Icons-aTRNsMJy.js","assets/preview-BcEybEc8.js","assets/PierreEntryIcon-HuUxlwtG.js","assets/RenderErrorBoundary-C2ZkZ4DB.js","assets/sourceControlClients-KQ5315mN.js","assets/browserLinkTarget-D8HEmVsi.js","assets/pullRequestIcons-CSs54zQk.js","assets/pullRequests-jsc4Hq78.js","assets/threadSort-Bd2rijEy.js","assets/popover-BIXQitBy.js","assets/PopoverHandle-CG975ng4.js","assets/ProjectFavicon-UXGwc_-W.js","assets/ProjectMonogram-f16fmYcx.js","assets/projectFilesQueryState-C8dGr8oR.js","assets/checkbox-CwFE3KXZ.js","assets/CheckboxIndicator-IpoyLEZ-.js","assets/FieldItemContext-BsKb7ObC.js","assets/terminalSessions-CF7f4A-6.js","assets/AlertDialogRoot-B--i3imS.js","assets/uiStateStore-VHQ8vDs5.js","assets/composer-logic-BQdFVlkE.js","assets/composerTrigger-BGi0iyhl.js","assets/useHandleNewThread-BVFM3SUe.js","assets/p4ProjectFile-sAVjpCzn.js","assets/composerDraftUploads-BmpBCVnP.js","assets/guideRunStore-CVyie1IJ.js","assets/pullRequestDetail.logic-BNpxef-3.js","assets/pullRequestReviewStore-BawbGhnx.js","assets/sidebarProjectGrouping-C13IyN_p.js","assets/EnvironmentMachineIcon-Emg7F_9r.js","assets/alert-DiE1d01s.js","assets/semver-CFbvOQKc.js","assets/ChatGptUsageButton-LQ3LzsF3.js","assets/kbd-D2OGhJqG.js","assets/settingsLayout-DzBeWTUO.js","assets/WorkspacePageContainer-BGE_kHaP.js","assets/KeybindingsSettings.logic-mOtug0lc.js","assets/usageShortcuts-lXBRgPmi.js","assets/primaryCloudLinkState-CD2_f6q-.js","assets/command-NV0JEoGo.js","assets/ComboboxClear-DsPTusk5.js","assets/ComboboxGroupLabel-DqaoaBhS.js","assets/ConnectionStatusDot-DVkDejK1.js","assets/standalone-page-3TM7ZX16.js","assets/primary-DD11poOa.js","assets/onboarding-KXMrOHsw.js","assets/scheduledTasksSettings.logic-DefawCwN.js","assets/main-BP1f3auf.css","assets/DiffWorkerPoolProvider-BoEAlLkf.js","assets/textarea-DSS-lavF.js"])))=>i.map(i=>d[i]);
2
- import{a as e,t}from"./react-DH3P2YXY.js";import{t as n}from"./index-RvCv9K-x.js";import{n as r,t as i}from"./jsx-runtime-BnjsACtP.js";import{$_ as a,$n as o,A as s,Ad as c,Bd as l,Bp as u,D as d,Df as f,El as p,F as m,Gp as h,Hy as g,If as _,Im as v,Ip as y,Jn as b,Jp as x,K_ as S,Ky as C,Md as w,Ms as T,Np as E,Od as D,Om as O,Pp as k,Qd as A,Qf as j,Qn as M,Qs as N,Rp as P,Xm as F,Xn as I,Yn as L,Zn as ee,Zo as R,Zs as z,_m as B,ab as te,ad as V,af as H,ar as ne,bf as re,cf as U,dr as W,ec as ie,eh as ae,ep as oe,fd as se,fp as ce,fr as le,gd as ue,hf as de,hp as fe,id as pe,if as me,jd as he,jm as ge,js as _e,kd as ve,kf as ye,ks as be,lf as xe,lm as Se,mg as Ce,nh as we,nm as Te,nr as Ee,od as De,of as Oe,or as ke,pp as Ae,qm as je,rm as Me,rr as Ne,t as G,th as Pe,tr as Fe,ts as Ie,uf as Le,ur as Re,vm as ze,wa as Be,wp as Ve,ym as He,zf as Ue,zm as We}from"./utils-BE5iQuUP.js";import{W as Ge}from"./runtime-DSZ2mWrf.js";import{A as Ke,T as qe,k as Je,w as Ye}from"./entities-n6SMnPE8.js";import{_n as Xe,fn as Ze,gn as Qe,hn as $e,sn as et,yn as tt}from"./runtime-DTUiqO10.js";import{F as nt,K as rt,P as it,V as at,_ as ot,l as st,q as ct,x as lt,y as ut}from"./TooltipViewport-Bz56sWCM.js";import{J as dt,L as ft,R as pt,n as mt}from"./ChatMarkdown-DfVVLQX2.js";import{a as ht,o as gt,s as _t,t as vt}from"./select-C10oXKGz.js";import{t as yt}from"./spinner-CW23--q5.js";import{i as bt,m as xt,p as St}from"./toast-BFuAqla3.js";import{E as Ct,J as wt,K as Tt,f as Et}from"./useSettings-CPPvBMmM.js";import{s as Dt}from"./server-ztj8tD38.js";import{i as Ot,n as kt}from"./session-yxXjF8AQ.js";import{n as At}from"./query-BV3IuYff.js";import{t as jt}from"./use-atom-command-CSWaAmR7.js";import{t as K,u as Mt}from"./rightPanelStore-CeZBJCMI.js";import{u as Nt}from"./queries-DZV2RDc9.js";import{C as Pt,Q as Ft,Z as It,_ as Lt,at as Rt,c as zt,d as Bt,ft as Vt,l as Ht,lt as Ut,nt as Wt,ot as Gt,s as Kt,t as qt,tt as Jt,u as Yt,v as Xt,w as Zt}from"./diffRendering-eAJMSnXr.js";import{C as Qt,E as $t,G as en,H as tn,K as nn,U as rn,V as an,W as on,d as sn,i as cn,u as ln}from"./Virtualizer-ChRGRE40.js";import{l as un,ut as dn}from"./getDiffFileInput-Dkc1Whpr.js";import{i as fn,r as pn,t as mn}from"./DiffWorkerPoolProvider-BoEAlLkf.js";import{t as hn}from"./cloneFileDiffMetadata-zVRGqYgv.js";import{n as gn,r as _n,t as vn}from"./FileDiff-CXJUPm2t.js";import{S as yn,a as bn,b as xn,i as Sn,n as Cn,r as wn,t as Tn}from"./DiffCommentAnnotation-Bp1MeIVC.js";import{r as En}from"./mediaSource-BbYoxHZJ.js";import{o as Dn}from"./timestampFormat-wac2e_Jz.js";import{t as On}from"./env-wK1YYxA8.js";import{a as q,n as J,r as kn,t as Y}from"./tooltip-CSzrAm8M.js";import{t as An}from"./skeleton-pd7m2J5F.js";import{t as jn}from"./textarea-DSS-lavF.js";import{t as Mn}from"./toggle-Cpfo0sMT.js";import{n as Nn,t as Pn}from"./toggle-group-FrArhs7R.js";import{i as Fn,l as In,o as Ln,r as Rn,s as zn,t as Bn}from"./combobox-DBUxcuwi.js";import{t as Vn}from"./input-GkmNnHh7.js";import{t as Hn}from"./scroll-area-CfW8fzQ8.js";import{a as Un,c as Wn,i as Gn,o as Kn,r as qn,s as Jn,t as Yn}from"./dialog-pqqgtsKn.js";import{t as Xn}from"./useResizeDrag-Dc7crya0.js";import{a as Zn,i as Qn,o as $n,r as er,t as tr}from"./empty-Du5F51Da.js";import{i as nr}from"./device-D0-STSSP.js";import{t as rr}from"./observeResize-CNtO3VS7.js";import{n as ir,t as ar}from"./assetUrls-BeScRf6b.js";import{f as or}from"./browserHistoryStore-hrG24FfH.js";import{_ as sr,y as cr}from"./keybindings-1XWkWeQB.js";import{i as lr,n as ur}from"./Icons-aTRNsMJy.js";import{t as dr}from"./PierreEntryIcon-HuUxlwtG.js";import{C as fr,S as pr,T as mr,_ as hr,a as gr,b as _r,c as vr,d as yr,g as br,h as xr,l as Sr,lt as Cr,m as wr,nt as Tr,o as Er,p as Dr,s as Or,u as kr,ut as Ar,v as jr,w as Mr,x as Nr,y as Pr}from"./RenderErrorBoundary-C2ZkZ4DB.js";import{n as Fr,r as Ir}from"./sourceControlClients-KQ5315mN.js";import{n as X}from"./pullRequestIcons-CSs54zQk.js";import{D as Lr,a as Rr,c as zr,i as Br,k as Vr,n as Hr,r as Ur,u as Wr}from"./pullRequests-jsc4Hq78.js";import{a as Gr,i as Kr,n as qr,o as Jr,t as Yr}from"./popover-BIXQitBy.js";import{A as Xr,B as Zr,C as Qr,D as $r,E as ei,G as ti,H as ni,I as ri,J as ii,K as ai,L as oi,M as si,N as ci,O as li,P as ui,R as di,S as fi,T as pi,U as mi,V as hi,Y as gi,_ as _i,a as vi,b as yi,c as bi,d as xi,f as Si,g as Ci,i as wi,j as Ti,k as Ei,l as Di,o as Oi,p as ki,r as Ai,s as ji,t as Mi,v as Ni,w as Pi,y as Fi,z as Ii}from"./pullRequestDetail.logic-BNpxef-3.js";import{i as Li,n as Ri,r as zi,t as Bi}from"./pullRequestReviewStore-BawbGhnx.js";import{t as Vi}from"./terminalLabels-BgLOlb2G.js";import{_ as Hi,c as Ui,f as Wi,g as Gi,i as Ki,o as qi,p as Ji,r as Yi,u as Xi,v as Zi}from"./uiStateStore-VHQ8vDs5.js";import{n as Qi}from"./useHandleNewThread-BVFM3SUe.js";import{i as $i,m as ea,n as ta,r as na,t as ra}from"./guideRunStore-CVyie1IJ.js";import{n as ia}from"./EnvironmentMachineIcon-Emg7F_9r.js";import{i as aa,n as oa,r as sa,t as ca}from"./alert-DiE1d01s.js";import{t as la}from"./kbd-D2OGhJqG.js";import{d as ua,l as da,t as fa,u as pa}from"./command-NV0JEoGo.js";import{$t as ma,Gi as ha,Jr as ga,Oa as _a,_a as va,ci as ya,ga as ba,ha as xa,qi as Sa,qr as Ca,si as wa,ya as Ta}from"./main-Dcfxjdkd.js";import"./WorkspacePageHeader-D704geLh.js";import{r as Ea,s as Da,t as Oa}from"./usePullRequestActions-DfyxdDPg.js";function ka(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function Aa(e,t){return e==null||t==null?e===t:e.header!==t.header||e.footer!==t.footer?!1:ja(e.items,t.items)}function ja(e,t){if(e==null||t==null)return e===t;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r==null||i==null||r.id!==i.id||r.type!==i.type||r.element!==i.element||r.instance!==i.instance||r.version!==i.version)return!1}return!0}function Ma(e,t,n){let r=document.createElement(`div`);return r.style.display=`flow-root`,e===`header`?(r.setAttribute(Ft,``),t.before(r)):(r.setAttribute(It,``),t.after(r)),n?.observe(r),r}function Na(e){let t=window.devicePixelRatio??1;return Math.round(e*t)/t}var Pa=1e5,Fa=`\`~!@#$%^&*()-=+[{]}\\|;:'",.<>/?`,Ia=`data-diffs-search`,La=`:host {
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PullRequestCodeTab-BamXVeZz.js","assets/react-DH3P2YXY.js","assets/jsx-runtime-BnjsACtP.js","assets/utils-CrFJwxSd.js","assets/activity-BT9zGwI4.js","assets/createLucideIcon-BRvysHna.js","assets/Icon-BiSXef-P.js","assets/alarm-clock-DLm_0oDD.js","assets/app-window-CBNJqZPl.js","assets/archive-D_14z4Xm.js","assets/arrow-down-up-Tu6B2hri.js","assets/arrow-down-Bo_WAMYh.js","assets/arrow-left-Ba8eq_9S.js","assets/arrow-right-left-DyJucsB1.js","assets/arrow-right-Bg4mlTrk.js","assets/arrow-up-down-AigUcA_4.js","assets/arrow-up-left-C6F8l2kC.js","assets/arrow-up-right-BNXlwlzJ.js","assets/arrow-up-D4kutFpL.js","assets/battery-DdftvRcq.js","assets/bell-4pS2DvJU.js","assets/blocks-N48yRCu0.js","assets/book-open-m1zikk07.js","assets/bookmark-DCumPe18.js","assets/bot-C71zefL3.js","assets/box-N7KHNXgQ.js","assets/bug-_77C5nd4.js","assets/calendar-arrow-down-tK2df2Gr.js","assets/calendar-arrow-up-DoqzmS-b.js","assets/calendar-clock-D24iG-gJ.js","assets/calendar-CuDpKI2e.js","assets/camera-CRxcom4Z.js","assets/chart-no-axes-column-CWRXr09M.js","assets/check-Cs_SSACZ.js","assets/chevron-down-Do9qqNbR.js","assets/chevron-left-D56AngEd.js","assets/chevron-right-CcbZ6PxZ.js","assets/chevron-up-CZEzk9UW.js","assets/chevrons-left-right-ellipsis-BuDdURW0.js","assets/chevrons-up-down-CMYBD15h.js","assets/chromium-IRgsGkxl.js","assets/circle-alert-Rh3WFq8P.js","assets/circle-arrow-up-CBkBThPI.js","assets/circle-check-Davl0yih.js","assets/circle-dashed-Divqvc3s.js","assets/circle-dot-DDXvyPkX.js","assets/circle-slash-BHppGVB2.js","assets/circle-x-DCG47j33.js","assets/circle-BXaepj2J.js","assets/clock-3-BjqRuWmx.js","assets/clock-BZce7MqL.js","assets/cloud-download-Cw2Qyeof.js","assets/cloud-upload-Bbq2IGQX.js","assets/cloud-Cnpuf424.js","assets/code-xml-C7_RVxwx.js","assets/code-C8ZFD3fi.js","assets/columns-2-R7e6oP5f.js","assets/copy-C6t_ZU58.js","assets/corner-left-up-CIgtHeD1.js","assets/corner-up-right-BWhPHx5s.js","assets/cpu-4YV41FL_.js","assets/database-0EoDfSWv.js","assets/download-CfEwtjBn.js","assets/earth-B0lYBmT1.js","assets/ellipsis-vertical-BM1Lc1f1.js","assets/ellipsis-CSD7gEuG.js","assets/external-link-Df6uBnqH.js","assets/eye-off-D5GkPp8X.js","assets/eye-DlWBkL1d.js","assets/file-braces-DycW5IfR.js","assets/file-code-corner-Bph0gpk_.js","assets/file-diff-uE_kfwjO.js","assets/file-search-BxZuGCW_.js","assets/file-spreadsheet-BDzNPY8g.js","assets/file-text-Bn72KOhu.js","assets/file-DHjVYhLT.js","assets/files-DsO7Sg8V.js","assets/film-Bbn0ceXE.js","assets/flask-conical-Cg6idKdH.js","assets/folder-closed-D6kbWc3q.js","assets/folder-cog-CBSQaLA2.js","assets/folder-git-2-n1sLmp_t.js","assets/folder-git-DCVI-R4l.js","assets/folder-open-Bu-nFCGY.js","assets/folder-plus-wg03g0vP.js","assets/folder-tree-FUExeKOH.js","assets/folder-Cieksypr.js","assets/gauge-Cgf0xSWC.js","assets/git-branch-plus-GXmZfN57.js","assets/git-branch-BWQfoO37.js","assets/git-commit-horizontal-BI_Z5Kib.js","assets/git-fork-CK2oK4JM.js","assets/git-merge-CH86CpaI.js","assets/git-pull-request-arrow-BYmuTHnq.js","assets/git-pull-request-closed-EzDnMgeA.js","assets/git-pull-request-draft-DbMmZ9EC.js","assets/globe-DHq8q48U.js","assets/grip-vertical-sTbvrVma.js","assets/hammer-BnFrycrq.js","assets/hard-drive-CnhXqMSu.js","assets/hat-glasses-C1sL_lJD.js","assets/history-BOloOry4.js","assets/house-LvUaI36y.js","assets/image-DFl_i29V.js","assets/inbox-Bfua4pqw.js","assets/info-Bwtivk15.js","assets/keyboard-C94dd8zf.js","assets/laptop-BJfWDOqH.js","assets/layers-BczY2xKh.js","assets/lightbulb-AbDNyk1F.js","assets/link-2-J9n7Ukgt.js","assets/link-iM9yOrD5.js","assets/list-checks--PgwqWme.js","assets/list-filter-C7uwdO5w.js","assets/list-ordered-JmJCtT6d.js","assets/list-todo-BOZtqLIw.js","assets/list-BNel2JmV.js","assets/loader-circle-DOPuwGUy.js","assets/lock-open-qdfB-3sG.js","assets/lock-CNeMaiIX.js","assets/log-in-DuxSLs9h.js","assets/mail-DrFNo5rr.js","assets/maximize-2-C4jSdiqI.js","assets/maximize-BKkQJR3r.js","assets/memory-stick-yVhfpVno.js","assets/message-circle-question-mark-qR5q6Xbi.js","assets/message-circle-qu3riBnu.js","assets/message-square-dashed-BDjE-epL.js","assets/message-square-off-BF3vA0b4.js","assets/message-square-text-CfjrqiSr.js","assets/message-square-warning-6MHWBWO6.js","assets/message-square-B2NO3ViY.js","assets/messages-square-BDA1tcVi.js","assets/minimize-2-D1qaBNiP.js","assets/minus-DVH2v7vL.js","assets/monitor-DYdSXGUQ.js","assets/moon-z0kk2bkY.js","assets/mouse-pointer-2-BzC5PGDm.js","assets/mouse-pointer-click-_zj1O0gg.js","assets/octagon-alert-BQp6gUkE.js","assets/package-plus-DaYcLmCH.js","assets/package-BDRaz7Ff.js","assets/paintbrush-Cd3ye7YJ.js","assets/palette-DWDYvvRF.js","assets/panel-bottom-DX8HINCH.js","assets/panel-left-aKsqIRJO.js","assets/panel-right-XrDzcWDK.js","assets/paperclip-BAtVoM2Q.js","assets/panels-top-left-ug17nD5b.js","assets/pen-line-BtsHFcuV.js","assets/pencil-ruler-u4ck96IX.js","assets/pencil-CS36_8K6.js","assets/picture-in-picture-2-CTTZM7s_.js","assets/pilcrow-B0pICPe4.js","assets/pin-B28emPdt.js","assets/play-utur7gJ1.js","assets/plug-2-BbsYUlrD.js","assets/plus-BFikiw2m.js","assets/plug-Cz_1a3P7.js","assets/power-lnBvrj1p.js","assets/presentation-DuhP07nk.js","assets/puzzle-_xVT2Tkf.js","assets/qr-code-8OyojaA-.js","assets/quote-CY1r_9f2.js","assets/radio-tower-CQ9UBgC-.js","assets/redo-2-CMJUpQN9.js","assets/refresh-cw-Bb4DfPZ_.js","assets/rotate-ccw-DIk8O74I.js","assets/rotate-cw-BCqL9vBU.js","assets/route-DDK4p_jp.js","assets/rows-3-KtFgL-bn.js","assets/scale-BWqluNv-.js","assets/search-2NYXmfL3.js","assets/send-Usbx4MSt.js","assets/server-C5VT7--0.js","assets/settings-2-CG9Vl9Oj.js","assets/settings-CSrjOUO8.js","assets/shield-check-BhnliHga.js","assets/shield-question-mark-DJzZ_XtG.js","assets/shield-Bo3bXsl5.js","assets/sliders-horizontal-CbQdxecl.js","assets/smartphone-DLXjLUvY.js","assets/smile-plus-B6sk7n9M.js","assets/sparkles-D72pVUsJ.js","assets/square-arrow-out-up-right-D4Y8_c2a.js","assets/square-pen-B9IATJSK.js","assets/square-split-horizontal-BEBi5lgX.js","assets/square-split-vertical-BvRRvh2L.js","assets/square-terminal-MebNo2O3.js","assets/square-ChD_5l-9.js","assets/star-BFGG9hcF.js","assets/sun-CV31Z7e1.js","assets/tag-DAyj5h5G.js","assets/target-DRkzkaHT.js","assets/terminal-Dbk8nKIT.js","assets/text-align-start-BlQ02nAY.js","assets/text-search-CmNwvT1W.js","assets/text-wrap-Y7SHIazH.js","assets/ticket-B3TOD4z9.js","assets/trash-2-vrfXuXSc.js","assets/trending-down-0HJRpRPf.js","assets/trending-up-B0AABrFJ.js","assets/triangle-alert-DcIYyjDc.js","assets/type-CcxvYAFU.js","assets/undo-2-CbzuoKHe.js","assets/unlink-2-Cu9CVRNc.js","assets/unplug-D0qX6EAT.js","assets/upload-_7gAV2BZ.js","assets/user-check-vIX5oc4W.js","assets/user-lock-Bz0imDJs.js","assets/user-plus-6mh3DQc1.js","assets/user-round-x-Dyi0-TdA.js","assets/user-round-CdU_AaX_.js","assets/users-CfjzCdxE.js","assets/wifi-off-DzVPlURa.js","assets/workflow-DbsdAT4Y.js","assets/wrench-Bjp_8iLx.js","assets/x-CJgPyqpa.js","assets/zap-C_GfNMdZ.js","assets/runtime-Dm3Pi31_.js","assets/runtime-BL7IF4n-.js","assets/TooltipViewport-C14m3uB7.js","assets/toast-BcjbmUtS.js","assets/spinner-CNva85zM.js","assets/useParams-D9PdK0IA.js","assets/DiffFileTree-B1-D1WV6.js","assets/useSettings-BL4ZWGQV.js","assets/server-BvxyePeo.js","assets/session-C7ckxjAM.js","assets/use-atom-command-BNkv9iyk.js","assets/themePalette-fhKYLCuU.js","assets/diffRendering-CG_sb5me.js","assets/index-Czsz7nXH.js","assets/fileTreeExpansion-BKVd4HrC.js","assets/pierre-icons-Cisj4-__.js","assets/query-DlK0I8Jc.js","assets/DiffCommentAnnotation-BLItJ7Ia.js","assets/Virtualizer-BpizRoFL.js","assets/getDiffFileInput-CIK5OMl_.js","assets/main-BGaSDXjP.js","assets/vcsRefInvalidation-BPy1eoDi.js","assets/entities-Om5Klild.js","assets/number-field-DGdBjQD2.js","assets/useRegisterFieldControl-DZyLTxKX.js","assets/FormContext-BGRz6hhb.js","assets/CSPContext-DGVCKkcb.js","assets/select-Ctq0UILH.js","assets/SelectScrollUpArrow-CR3Z6_pf.js","assets/link-COzhJ6br.js","assets/redirect-D3L17tzd.js","assets/lazyRouteComponent-B8CSLurY.js","assets/useNavigate-Cxh24teV.js","assets/useLocation-DbWity7H.js","assets/rightPanelStore-DXw7-xK3.js","assets/toastHelpers-DxXYm50b.js","assets/queries-CXgT6mki.js","assets/session-logic-P8gC-UQc.js","assets/htmlRender-NqJI2UJ2.js","assets/mediaSource-DG5l5-5f.js","assets/fileLinks-CP5NWXaI.js","assets/mediaReference-CKap6oNP.js","assets/usageFormat-C-mTuUS7.js","assets/timestampFormat-wac2e_Jz.js","assets/env-wK1YYxA8.js","assets/tooltip-T5ePvxsH.js","assets/skeleton-C9J-Xl06.js","assets/useAriaLabelledBy-D5HM2KLM.js","assets/toggle-Bbnow7xY.js","assets/toggle-group-Cilo8czD.js","assets/CompositeRoot-BD0GlRg8.js","assets/input-BCWES8Y7.js","assets/Input-DLaKk0qb.js","assets/FieldControl-CBMzQqd5.js","assets/scroll-area-B9LorBFb.js","assets/ScrollAreaCorner-BCdJHqsj.js","assets/dist-CFar2AY1.js","assets/DialogTitle-DCMYEIWZ.js","assets/dialog-BwjzOzO6.js","assets/sidebar-CRr8B41y.js","assets/useResizeDrag-Dc7crya0.js","assets/observeResize-BUAH1dvA.js","assets/AnimatedHeight-CHpFDL1r.js","assets/assets-D-xsxvzf.js","assets/sourceControl-C8nJMDiL.js","assets/assetUrls-C6W2_00u.js","assets/browserHistoryStore-CeBJcpoN.js","assets/preview-Dwq2O7nm.js","assets/openFileInPreview-B0i3eZpu.js","assets/keybindings-BG7j7M7S.js","assets/Icons-DwLGuyWf.js","assets/preview-CiojYkh4.js","assets/PierreEntryIcon-B5tjtDkE.js","assets/RenderErrorBoundary-CR2cHAQ5.js","assets/sourceControlClients-DKONtKbZ.js","assets/browserLinkTarget-D5ew8rLG.js","assets/pullRequestIcons-DFcQ9rtl.js","assets/pullRequests-DT0oG7tF.js","assets/threadSort-Bd2rijEy.js","assets/popover-BnqKHl4L.js","assets/PopoverHandle-CZh3pqXt.js","assets/ProjectFavicon-CkSteHLT.js","assets/ProjectMonogram-DIqp1OmB.js","assets/projectFilesQueryState-DXrTSOqg.js","assets/checkbox-Y4v7A1IZ.js","assets/CheckboxIndicator-zwVHomgm.js","assets/FieldItemContext-BsKb7ObC.js","assets/terminalSessions-BPc8sBGR.js","assets/AlertDialogRoot-BUODcEy9.js","assets/uiStateStore-D9r3BNZ-.js","assets/composer-logic-BW4G8aDL.js","assets/composerTrigger-BGi0iyhl.js","assets/useHandleNewThread-DntRaFvm.js","assets/p4ProjectFile-0RRo3hX4.js","assets/composerDraftUploads-DK6jH0cB.js","assets/guideRunStore-CegZr43-.js","assets/pullRequestDetail.logic-BmYDDw_8.js","assets/pullRequestReviewStore-BGzKslrq.js","assets/sidebarProjectGrouping-miDXfjI3.js","assets/EnvironmentMachineIcon-5-erc8l_.js","assets/alert-Dh8AVuLe.js","assets/semver-CFbvOQKc.js","assets/ChatGptUsageButton-CMIjZ66V.js","assets/kbd-EDrgCOls.js","assets/settingsLayout-DFYjWgKN.js","assets/WorkspacePageContainer-D5yW7_av.js","assets/KeybindingsSettings.logic-CU23l8mP.js","assets/usageShortcuts-CB6TvooP.js","assets/primaryCloudLinkState-2j4MjqVh.js","assets/command-DR1GjC1a.js","assets/ComboboxClear-tzFhNwrk.js","assets/ComboboxGroupLabel-C1Icd2UF.js","assets/ConnectionStatusDot-DLQm_zZ7.js","assets/standalone-page-3TM7ZX16.js","assets/primary-CMwTDEi1.js","assets/onboarding-CnVH7A6c.js","assets/scheduledTasksSettings.logic-7E0KSnA7.js","assets/main-BP1f3auf.css","assets/DiffWorkerPoolProvider-BzkGX7xm.js","assets/textarea-DjRGRzMg.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,t}from"./react-DH3P2YXY.js";import{t as n}from"./index-Czsz7nXH.js";import{n as r,t as i}from"./jsx-runtime-BnjsACtP.js";import{$_ as a,$n as o,A as s,Ad as c,Bd as l,Bp as u,D as d,Df as f,El as p,F as m,Gp as h,Hy as g,If as _,Im as v,Ip as y,Jn as b,Jp as x,K_ as S,Ky as C,Md as w,Ms as T,Np as E,Od as D,Om as O,Pp as k,Qd as A,Qf as j,Qn as M,Qs as N,Rp as P,Xm as F,Xn as I,Yn as L,Zn as ee,Zo as R,Zs as z,_m as B,ab as te,ad as V,af as H,ar as ne,bf as re,cf as U,dr as W,ec as ie,eh as ae,ep as oe,fd as se,fp as ce,fr as le,gd as ue,hf as de,hp as fe,id as pe,if as me,jd as he,jm as ge,js as _e,kd as ve,kf as ye,ks as be,lf as xe,lm as Se,mg as Ce,nh as we,nm as Te,nr as Ee,od as De,of as Oe,or as ke,pp as Ae,qm as je,rm as Me,rr as Ne,t as G,th as Pe,tr as Fe,ts as Ie,uf as Le,ur as Re,vm as ze,wa as Be,wp as Ve,ym as He,zf as Ue,zm as We}from"./utils-CrFJwxSd.js";import{W as Ge}from"./runtime-Dm3Pi31_.js";import{A as Ke,T as qe,k as Je,w as Ye}from"./entities-Om5Klild.js";import{_n as Xe,fn as Ze,gn as Qe,hn as $e,sn as et,yn as tt}from"./runtime-BL7IF4n-.js";import{F as nt,K as rt,P as it,V as at,_ as ot,l as st,q as ct,x as lt,y as ut}from"./TooltipViewport-C14m3uB7.js";import{J as dt,L as ft,R as pt,n as mt}from"./ChatMarkdown-C2KOLN1s.js";import{a as ht,o as gt,s as _t,t as vt}from"./select-Ctq0UILH.js";import{t as yt}from"./spinner-CNva85zM.js";import{i as bt,m as xt,p as St}from"./toast-BcjbmUtS.js";import{E as Ct,J as wt,K as Tt,f as Et}from"./useSettings-BL4ZWGQV.js";import{s as Dt}from"./server-BvxyePeo.js";import{i as Ot,n as kt}from"./session-C7ckxjAM.js";import{n as At}from"./query-DlK0I8Jc.js";import{t as jt}from"./use-atom-command-BNkv9iyk.js";import{t as K,u as Mt}from"./rightPanelStore-DXw7-xK3.js";import{u as Nt}from"./queries-CXgT6mki.js";import{C as Pt,Q as Ft,Z as It,_ as Lt,at as Rt,c as zt,d as Bt,ft as Vt,l as Ht,lt as Ut,nt as Wt,ot as Gt,s as Kt,t as qt,tt as Jt,u as Yt,v as Xt,w as Zt}from"./diffRendering-CG_sb5me.js";import{C as Qt,E as $t,G as en,H as tn,K as nn,U as rn,V as an,W as on,d as sn,i as cn,u as ln}from"./Virtualizer-BpizRoFL.js";import{l as un,ut as dn}from"./getDiffFileInput-CIK5OMl_.js";import{i as fn,r as pn,t as mn}from"./DiffWorkerPoolProvider-BzkGX7xm.js";import{t as hn}from"./cloneFileDiffMetadata-zVRGqYgv.js";import{n as gn,r as _n,t as vn}from"./FileDiff-2qSm00aV.js";import{S as yn,a as bn,b as xn,i as Sn,n as Cn,r as wn,t as Tn}from"./DiffCommentAnnotation-BLItJ7Ia.js";import{r as En}from"./mediaSource-DG5l5-5f.js";import{o as Dn}from"./timestampFormat-wac2e_Jz.js";import{t as On}from"./env-wK1YYxA8.js";import{a as q,n as J,r as kn,t as Y}from"./tooltip-T5ePvxsH.js";import{t as An}from"./skeleton-C9J-Xl06.js";import{t as jn}from"./textarea-DjRGRzMg.js";import{t as Mn}from"./toggle-Bbnow7xY.js";import{n as Nn,t as Pn}from"./toggle-group-Cilo8czD.js";import{i as Fn,l as In,o as Ln,r as Rn,s as zn,t as Bn}from"./combobox-DGrx2JGy.js";import{t as Vn}from"./input-BCWES8Y7.js";import{t as Hn}from"./scroll-area-B9LorBFb.js";import{a as Un,c as Wn,i as Gn,o as Kn,r as qn,s as Jn,t as Yn}from"./dialog-BwjzOzO6.js";import{t as Xn}from"./useResizeDrag-Dc7crya0.js";import{a as Zn,i as Qn,o as $n,r as er,t as tr}from"./empty-C0oiFHy_.js";import{i as nr}from"./device-6R-yC55P.js";import{t as rr}from"./observeResize-BUAH1dvA.js";import{n as ir,t as ar}from"./assetUrls-C6W2_00u.js";import{f as or}from"./browserHistoryStore-CeBJcpoN.js";import{_ as sr,y as cr}from"./keybindings-BG7j7M7S.js";import{i as lr,n as ur}from"./Icons-DwLGuyWf.js";import{t as dr}from"./PierreEntryIcon-B5tjtDkE.js";import{C as fr,S as pr,T as mr,_ as hr,a as gr,b as _r,c as vr,d as yr,g as br,h as xr,l as Sr,lt as Cr,m as wr,nt as Tr,o as Er,p as Dr,s as Or,u as kr,ut as Ar,v as jr,w as Mr,x as Nr,y as Pr}from"./RenderErrorBoundary-CR2cHAQ5.js";import{n as Fr,r as Ir}from"./sourceControlClients-DKONtKbZ.js";import{n as X}from"./pullRequestIcons-DFcQ9rtl.js";import{D as Lr,a as Rr,c as zr,i as Br,k as Vr,n as Hr,r as Ur,u as Wr}from"./pullRequests-DT0oG7tF.js";import{a as Gr,i as Kr,n as qr,o as Jr,t as Yr}from"./popover-BnqKHl4L.js";import{A as Xr,B as Zr,C as Qr,D as $r,E as ei,G as ti,H as ni,I as ri,J as ii,K as ai,L as oi,M as si,N as ci,O as li,P as ui,R as di,S as fi,T as pi,U as mi,V as hi,Y as gi,_ as _i,a as vi,b as yi,c as bi,d as xi,f as Si,g as Ci,i as wi,j as Ti,k as Ei,l as Di,o as Oi,p as ki,r as Ai,s as ji,t as Mi,v as Ni,w as Pi,y as Fi,z as Ii}from"./pullRequestDetail.logic-BmYDDw_8.js";import{i as Li,n as Ri,r as zi,t as Bi}from"./pullRequestReviewStore-BGzKslrq.js";import{t as Vi}from"./terminalLabels-BgLOlb2G.js";import{_ as Hi,c as Ui,f as Wi,g as Gi,i as Ki,o as qi,p as Ji,r as Yi,u as Xi,v as Zi}from"./uiStateStore-D9r3BNZ-.js";import{n as Qi}from"./useHandleNewThread-DntRaFvm.js";import{i as $i,m as ea,n as ta,r as na,t as ra}from"./guideRunStore-CegZr43-.js";import{n as ia}from"./EnvironmentMachineIcon-5-erc8l_.js";import{i as aa,n as oa,r as sa,t as ca}from"./alert-Dh8AVuLe.js";import{t as la}from"./kbd-EDrgCOls.js";import{d as ua,l as da,t as fa,u as pa}from"./command-DR1GjC1a.js";import{$t as ma,Gi as ha,Jr as ga,Oa as _a,_a as va,ci as ya,ga as ba,ha as xa,qi as Sa,qr as Ca,si as wa,ya as Ta}from"./main-BGaSDXjP.js";import"./WorkspacePageHeader-CTWcEH7d.js";import{r as Ea,s as Da,t as Oa}from"./usePullRequestActions-9274Vp3W.js";function ka(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function Aa(e,t){return e==null||t==null?e===t:e.header!==t.header||e.footer!==t.footer?!1:ja(e.items,t.items)}function ja(e,t){if(e==null||t==null)return e===t;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r==null||i==null||r.id!==i.id||r.type!==i.type||r.element!==i.element||r.instance!==i.instance||r.version!==i.version)return!1}return!0}function Ma(e,t,n){let r=document.createElement(`div`);return r.style.display=`flow-root`,e===`header`?(r.setAttribute(Ft,``),t.before(r)):(r.setAttribute(It,``),t.after(r)),n?.observe(r),r}function Na(e){let t=window.devicePixelRatio??1;return Math.round(e*t)/t}var Pa=1e5,Fa=`\`~!@#$%^&*()-=+[{]}\\|;:'",.<>/?`,Ia=`data-diffs-search`,La=`:host {
3
3
  display: block;
4
4
  position: sticky;
5
5
  z-index: 100;
@@ -211,6 +211,6 @@ import{a as e,t}from"./react-DH3P2YXY.js";import{t as n}from"./index-RvCv9K-x.js
211
211
  [data-code]::-webkit-scrollbar-thumb {
212
212
  background-color: var(--diffs-bg-context);
213
213
  }
214
- `;function ud(e){let t=(0,Q.c)(60),{excerpt:n,file:r,loading:i,notes:a,commenting:o,loadDiffFiles:c,onOpenFile:l}=e,[u,d]=(0,Z.useState)(null),{resolvedTheme:f}=Tt(),p;if(t[0]!==n||t[1]!==r){bb0:{if(r===null){p=null;break bb0}let e=Zu(r),i=Qu(e,n);if(i.length===0){p=null;break bb0}let a=zt(ed(n.path,Bt(r),i),`pull-request-guide-excerpt:${n.path}:${n.side}:${n.start}-${n.end}`),o=a?.kind===`files`?a.files[0]:void 0;if(o===void 0){p=null;break bb0}let s={additions:new Set(i.flatMap(md)),deletions:new Set(i.flatMap(pd))},c;t[3]!==s||t[4]!==o||t[5]!==e||t[6]!==i?(c={fileDiff:o,rows:i,shown:i.length,total:e.length,drawn:s},t[3]=s,t[4]=o,t[5]=e,t[6]=i,t[7]=c):c=t[7],p=c}t[0]=n,t[1]=r,t[2]=p}else p=t[2];let h=p,g=h?.rows??null,_;bb1:{if(g===null||g.some(e=>e.hunk!==g[0]?.hunk)){_=null;break bb1}let e;t[8]!==n.end||t[9]!==n.side||t[10]!==n.start||t[11]!==c||t[12]!==g?(e=async e=>{let t=await c(e),r=td(t.newFile.contents,g);return r===null?t:{newFile:t.newFile,oldFile:{name:t.oldFile?.name??t.newFile.name,contents:r,cacheKey:`${t.newFile.cacheKey??t.newFile.name}:excerpt:${n.side}:${n.start}-${n.end}`}}},t[8]=n.end,t[9]=n.side,t[10]=n.start,t[11]=c,t[12]=g,t[13]=e):e=t[13],_=e}let v=_,y;t[14]!==o?.pending||t[15]!==u||t[16]!==n.path||t[17]!==n.side||t[18]!==a||t[19]!==h?.drawn?(y=()=>{let e=new Map,t=(t,n)=>{let r=`${t}:${n}`,i=e.get(r);if(i!==void 0)return i;let a={side:t,lineNumber:n,metadata:{markers:[],pending:[],draft:!1}};return e.set(r,a),a},r=(n,r,i)=>{let a=t(n,r);e.set(`${n}:${r}`,{...a,metadata:i(a.metadata)})},i=n.side===`new`?`additions`:`deletions`;for(let e of a)r(i,e.line,t=>({...t,markers:[...t.markers,...e.markers]}));for(let e of o?.pending??[]){if(e.path!==n.path)continue;let t=mc(e.position),i=pc(t.side);h?.drawn[i].has(t.line)&&r(i,t.line,t=>({...t,pending:[...t.pending,e]}))}if(u!==null){let e=mc(u.position);r(pc(e.side),e.line,fd)}return[...e.values()]},t[14]=o?.pending,t[15]=u,t[16]=n.path,t[17]=n.side,t[18]=a,t[19]=h?.drawn,t[20]=y):y=t[20],o?.pending;let b;t[21]===y?b=t[22]:(b=y(),t[21]=y,t[22]=b);let x=b,S;t[23]===r?S=t[24]:(S=e=>{if(e===null||r===null)return;let t=m(r,e.end,e.endSide??e.side);t!==null&&d({range:e,position:t})},t[23]=r,t[24]=S);let C=S,w=o!==null&&u===null,T=o?.onAskAgent??null,E;t[25]!==u||t[26]!==n.path||t[27]!==r||t[28]!==T?(E=e=>{if(u===null||r===null||T===null)return;let t=s({id:`pull-request-guide:${n.path}:${u.range.start}:${u.range.end}`,sectionId:`pull-request-guide:${n.path}`,sectionTitle:`Review guide`,filePath:n.path,fileDiff:r,range:u.range,text:e});d(null),t!==null&&T(t,e)},t[25]=u,t[26]=n.path,t[27]=r,t[28]=T,t[29]=E):E=t[29];let D=E,O;t[30]===f?O=t[31]:(O=Ht(f),t[30]=f,t[31]=O);let k;t[32]===v?k=t[33]:(k=v===null?{hunkSeparators:`simple`}:{loadDiffFiles:v},t[32]=v,t[33]=k);let A;t[34]!==C||t[35]!==w||t[36]!==f||t[37]!==O||t[38]!==k?(A={diffStyle:`unified`,lineDiffType:`none`,overflow:`scroll`,theme:O,themeType:f,preferredHighlighter:Ta,unsafeCSS:ld,enableGutterUtility:w,enableLineSelection:w,onGutterUtilityClick:C,onLineSelectionEnd:C,...k},t[34]=C,t[35]=w,t[36]=f,t[37]=O,t[38]=k,t[39]=A):A=t[39];let j=A,M;t[40]===n.caption?M=t[41]:(M=n.caption.trim()===``?null:(0,$.jsx)(`figcaption`,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(Ku,{text:n.caption,plain:!0})}),t[40]=n.caption,t[41]=M);let N;t[42]!==x||t[43]!==D||t[44]!==o||t[45]!==u||t[46]!==n.end||t[47]!==n.path||t[48]!==n.side||t[49]!==n.start||t[50]!==r||t[51]!==i||t[52]!==T||t[53]!==l||t[54]!==j||t[55]!==h?(N=h===null?i?(0,$.jsxs)(`p`,{className:`rounded-lg border border-border/60 px-3 py-2 text-xs text-muted-foreground`,children:[`Loading `,n.path,`...`]}):(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg border border-border/60 px-3 py-2 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{className:`min-w-0 truncate`,children:[(0,$.jsx)(`span`,{className:`font-mono text-foreground`,children:n.path}),` lines `,n.start,`-`,n.end,` are not in the loaded diff.`]}),(0,$.jsx)(W,{size:`xs`,variant:`outline`,onClick:()=>l(n.path),children:`Open in Code`})]}):(0,$.jsx)(`div`,{className:`min-w-0 overflow-hidden rounded-lg border border-border/60`,children:(0,$.jsx)(vn,{fileDiff:h.fileDiff,options:j,lineAnnotations:x,selectedLines:u?.range??null,renderAnnotation:e=>(0,$.jsxs)(`div`,{className:`font-sans`,children:[e.metadata.markers.length>0?(0,$.jsx)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-1 text-xs`,children:e.metadata.markers.map(dd)}):null,e.metadata.pending.map(e=>(0,$.jsx)(hc,{comment:e,onRemove:()=>o?.onRemove(e.id)},e.id)),e.metadata.draft&&u!==null&&o!==null?(0,$.jsx)(Tn,{kind:`draft`,rangeLabel:`${n.path}:${mc(u.position).line}`,text:``,placeholder:o.canComment?`Add a comment…`:`Ask the agent about these lines…`,submitLabel:o.canComment?`Add to review`:`Ask agent`,...o.canComment&&T!==null?{secondaryAction:{label:`Ask agent`,onAction:e=>D(e)}}:{},onCancel:()=>d(null),onComment:e=>{if(!o.canComment){D(e);return}o.onComment({path:n.path,oldPath:r===null?null:hd(r,n.path),position:u.position,body:e}),d(null)}}):null]}),renderHeaderMetadata:()=>(0,$.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{className:`tabular-nums`,children:[n.side===`old`?`removed code, `:``,`showing `,h.shown,` of`,` `,h.total,` diff lines`]}),(0,$.jsx)(W,{size:`icon-xs`,variant:`ghost-muted`,"aria-label":`Open ${n.path} in Code`,onClick:()=>l(n.path),children:(0,$.jsx)(se,{"aria-hidden":!0})})]})})}),t[42]=x,t[43]=D,t[44]=o,t[45]=u,t[46]=n.end,t[47]=n.path,t[48]=n.side,t[49]=n.start,t[50]=r,t[51]=i,t[52]=T,t[53]=l,t[54]=j,t[55]=h,t[56]=N):N=t[56];let P;return t[57]!==M||t[58]!==N?(P=(0,$.jsxs)(`figure`,{className:`flex min-w-0 flex-col gap-1.5`,children:[M,N]}),t[57]=M,t[58]=N,t[59]=P):P=t[59],P}function dd(e){return(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(od,{marker:e.marker}),(0,$.jsx)(`span`,{className:`text-foreground`,children:e.title})]},e.marker)}function fd(e){return{...e,draft:!0}}function pd(e){return e.oldLine===null?[]:[e.oldLine]}function md(e){return e.newLine===null?[]:[e.newLine]}function hd(e,t){let n=Bt(e);return n===t?null:n}function gd(e){let t=(0,Q.c)(11),{file:n,loadDiffFiles:r}=e,{resolvedTheme:i}=Tt(),a;t[0]===n?a=t[1]:(a=hn(n),t[0]=n,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s=Ht(i),t[2]=i,t[3]=s);let c;t[4]!==r||t[5]!==i||t[6]!==s?(c={diffStyle:`unified`,lineDiffType:`none`,overflow:`scroll`,disableFileHeader:!0,theme:s,themeType:i,preferredHighlighter:Ta,unsafeCSS:Jo,loadDiffFiles:r},t[4]=r,t[5]=i,t[6]=s,t[7]=c):c=t[7];let l=c,u;return t[8]!==o||t[9]!==l?(u=(0,$.jsx)(`div`,{className:`border-t border-border/60`,children:(0,$.jsx)(vn,{fileDiff:o,options:l})}),t[8]=o,t[9]=l,t[10]=u):u=t[10],u}var _d={tradeoff:`A tradeoff to weigh`,contract:`A contract to check`,product:`A product call`,risk:`A risk to judge`,accessibility:`An accessibility call`};function vd(e){let t=(0,Q.c)(122),{stop:n,index:r,stopCount:i,railOpen:a,onRailOpenChange:o,stopList:s,nextTitle:c,files:l,loadDiffFiles:u,diffLoading:d,commenting:f,onStep:p,onAsk:m,onFinish:h,onOpenFile:g}=e,_;t[0]===n?_=t[1]:(_=nd(n),t[0]=n,t[1]=_);let{lettered:v,byExcerpt:y}=_,b;t[2]===n.excerpts?b=t[3]:(b=new Set(n.excerpts.map(yd)),t[2]=n.excerpts,t[3]=b);let x=b,S,C,T,E,D,O,k,A,j;if(t[4]!==y||t[5]!==f||t[6]!==d||t[7]!==x||t[8]!==l||t[9]!==r||t[10]!==v||t[11]!==u||t[12]!==g||t[13]!==o||t[14]!==p||t[15]!==a||t[16]!==n.attention||t[17]!==n.excerpts||t[18]!==n.files||t[19]!==n.summary||t[20]!==n.title||t[21]!==i||t[22]!==s){let e;t[32]===x?e=t[33]:(e=e=>!x.has(e.path),t[32]=x,t[33]=e);let c=n.files.filter(e);S=v.length>0;let m=S&&`@min-[90rem]/guide:grid-cols-[minmax(0,1fr)_20rem]`;t[34]===m?C=t[35]:(C=G(`grid gap-8`,m),t[34]=m,t[35]=C),T=`flex min-w-0 flex-col gap-5`;let h=r+1,_;t[36]!==i||t[37]!==h?(_=(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground tabular-nums @max-[56rem]/guide:hidden`,children:[`Stop `,h,` of `,i]}),t[36]=i,t[37]=h,t[38]=_):_=t[38];let b;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(W,{size:`xs`,variant:`ghost-muted`,className:`@min-[56rem]/guide:hidden`}),t[39]=b):b=t[39];let M=r+1,N;t[40]!==i||t[41]!==M?(N=(0,$.jsxs)(`span`,{className:`tabular-nums`,children:[`Stop `,M,` of `,i]}),t[40]=i,t[41]=M,t[42]=N):N=t[42];let P=a&&`rotate-180`,F;t[43]===P?F=t[44]:(F=G(P),t[43]=P,t[44]=F);let I;t[45]===F?I=t[46]:(I=(0,$.jsx)(ve,{"aria-hidden":!0,className:F}),t[45]=F,t[46]=I);let L;t[47]!==N||t[48]!==I?(L=(0,$.jsxs)(va,{render:b,children:[N,I]}),t[47]=N,t[48]=I,t[49]=L):L=t[49];let ee=r===0,R;t[50]===p?R=t[51]:(R=()=>p(-1),t[50]=p,t[51]=R);let z;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(w,{"aria-hidden":!0}),t[52]=z):z=t[52];let B;t[53]!==ee||t[54]!==R?(B=(0,$.jsx)(W,{size:`icon-xs`,variant:`outline`,"aria-label":`Previous stop`,disabled:ee,onClick:R,children:z}),t[53]=ee,t[54]=R,t[55]=B):B=t[55];let te=r===i-1,V;t[56]===p?V=t[57]:(V=()=>p(1),t[56]=p,t[57]=V);let H;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(ve,{"aria-hidden":!0}),t[58]=H):H=t[58];let ne;t[59]!==te||t[60]!==V?(ne=(0,$.jsx)(W,{size:`icon-xs`,variant:`outline`,"aria-label":`Next stop`,disabled:te,onClick:V,children:H}),t[59]=te,t[60]=V,t[61]=ne):ne=t[61];let re;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,$.jsxs)(`span`,{"aria-hidden":!0,className:`ml-1 flex items-center gap-0.5 @max-[30rem]/guide:hidden`,children:[(0,$.jsx)(la,{children:`J`}),(0,$.jsx)(la,{children:`K`})]}),t[62]=re):re=t[62];let U;t[63]!==B||t[64]!==ne?(U=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[B,ne,re]}),t[63]=B,t[64]=ne,t[65]=U):U=t[65];let ie;t[66]!==_||t[67]!==L||t[68]!==U?(ie=(0,$.jsxs)(`header`,{className:`flex items-center justify-between gap-2`,children:[_,L,U]}),t[66]=_,t[67]=L,t[68]=U,t[69]=ie):ie=t[69];let ae;t[70]===s?ae=t[71]:(ae=(0,$.jsx)(ba,{className:`@min-[56rem]/guide:hidden`,children:(0,$.jsx)(`div`,{className:`pt-3`,children:s})}),t[70]=s,t[71]=ae),t[72]!==o||t[73]!==a||t[74]!==ie||t[75]!==ae?(E=(0,$.jsxs)(xa,{open:a,onOpenChange:o,children:[ie,ae]}),t[72]=o,t[73]=a,t[74]=ie,t[75]=ae,t[76]=E):E=t[76];let oe;t[77]===n.title?oe=t[78]:(oe=(0,$.jsx)(`h2`,{className:`text-lg font-semibold text-foreground`,children:n.title}),t[77]=n.title,t[78]=oe);let se;t[79]===n.summary?se=t[80]:(se=n.summary.trim()===``?null:(0,$.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(Ku,{text:n.summary})}),t[79]=n.summary,t[80]=se),t[81]!==oe||t[82]!==se?(D=(0,$.jsxs)(`div`,{className:`flex max-w-[60rem] flex-col gap-2`,children:[oe,se]}),t[81]=oe,t[82]=se,t[83]=D):D=t[83],t[84]===n.attention?O=t[85]:(O=n.attention===null?null:(0,$.jsxs)(ca,{controlAlignment:`first-line`,children:[(0,$.jsx)(Oe,{}),(0,$.jsx)(aa,{children:_d[n.attention.kind]}),(0,$.jsx)(sa,{children:(0,$.jsx)(`div`,{children:(0,$.jsx)(Ku,{text:n.attention.note})})})]}),t[84]=n.attention,t[85]=O),t[86]!==y||t[87]!==f||t[88]!==d||t[89]!==l||t[90]!==u||t[91]!==g||t[92]!==n.excerpts?(k=n.excerpts.length>0?(0,$.jsx)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:(0,$.jsx)(mn,{children:n.excerpts.map((e,t)=>(0,$.jsx)(ud,{excerpt:e,file:l.get(e.path)??null,loading:d,notes:y[t]??[],commenting:f,loadDiffFiles:u,onOpenFile:g},`${e.path}:${e.side}:${e.start}-${e.end}`))})}):null,t[86]=y,t[87]=f,t[88]=d,t[89]=l,t[90]=u,t[91]=g,t[92]=n.excerpts,t[93]=k):k=t[93],t[94]===v?A=t[95]:(A=(0,$.jsx)(sd,{notes:v,className:`@min-[90rem]/guide:hidden`}),t[94]=v,t[95]=A),j=c.length>0?(0,$.jsxs)(`section`,{className:`flex flex-col gap-1.5`,children:[(0,$.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:n.excerpts.length>0?`Also in this stop`:`Files in this stop`}),(0,$.jsx)(mn,{children:(0,$.jsx)(`ul`,{className:`flex flex-col overflow-hidden rounded-lg border border-border/60`,children:c.map(e=>{let t=l.get(e.path),n=t===void 0?null:Kt([t]);return(0,$.jsx)(`li`,{className:`border-border/60 not-first:border-t`,children:(0,$.jsxs)(xa,{children:[(0,$.jsxs)(va,{className:`group flex w-full min-w-0 items-center gap-2 px-3 py-2 text-left text-xs outline-none hover:bg-accent/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,children:[(0,$.jsx)(he,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-muted-foreground group-data-panel-open:rotate-90`}),(0,$.jsx)(Le,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,$.jsx)(`span`,{className:`min-w-0 truncate font-mono text-foreground`,children:e.path}),e.note!==void 0&&e.note.trim()!==``?(0,$.jsx)(`span`,{className:`ml-auto min-w-0 truncate text-muted-foreground @max-[30rem]/guide:hidden`,children:(0,$.jsx)(Ku,{text:e.note,plain:!0})}):null,n===null?null:(0,$.jsx)(Sr,{additions:n.additions,deletions:n.deletions,className:`shrink-0 font-mono`})]}),(0,$.jsx)(ba,{animate:!1,children:t===void 0?(0,$.jsx)(`p`,{className:`px-3 py-2 text-xs text-muted-foreground`,children:d?`Loading the diff...`:`This file is not in the loaded diff.`}):(0,$.jsx)(gd,{file:t,loadDiffFiles:u})})]})},e.path)})})})]}):null,t[4]=y,t[5]=f,t[6]=d,t[7]=x,t[8]=l,t[9]=r,t[10]=v,t[11]=u,t[12]=g,t[13]=o,t[14]=p,t[15]=a,t[16]=n.attention,t[17]=n.excerpts,t[18]=n.files,t[19]=n.summary,t[20]=n.title,t[21]=i,t[22]=s,t[23]=S,t[24]=C,t[25]=T,t[26]=E,t[27]=D,t[28]=O,t[29]=k,t[30]=A,t[31]=j}else S=t[23],C=t[24],T=t[25],E=t[26],D=t[27],O=t[28],k=t[29],A=t[30],j=t[31];let M;t[96]!==m||t[97]!==n.questions?(M=n.questions.length>0||m!==null?(0,$.jsxs)(`section`,{className:`flex flex-col gap-1.5`,children:[n.questions.length>0?(0,$.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:`Questions to consider`}):null,(0,$.jsxs)(`div`,{className:`flex flex-col items-start gap-1.5`,children:[n.questions.map(e=>m===null?(0,$.jsx)(`div`,{className:`text-sm text-foreground`,children:(0,$.jsx)(Ku,{text:e})},e):(0,$.jsxs)(`button`,{type:`button`,onClick:()=>m(e),className:`flex min-w-0 items-start gap-2 rounded-lg border border-border/60 px-3 py-1.5 text-left text-sm text-foreground outline-none hover:bg-accent/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,children:[(0,$.jsx)(Ae,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),(0,$.jsx)(`span`,{className:`sr-only`,children:`Ask an agent: `}),(0,$.jsx)(`span`,{children:(0,$.jsx)(Ku,{text:e,plain:!0})})]},e)),m===null?null:(0,$.jsxs)(W,{size:`sm`,variant:`ghost-muted`,onClick:()=>m(``),children:[(0,$.jsx)(Ae,{"aria-hidden":!0}),`Ask about this stop`]})]})]}):null,t[96]=m,t[97]=n.questions,t[98]=M):M=t[98];let N;t[99]!==c||t[100]!==h||t[101]!==p?(N=c===null?h===null?null:(0,$.jsxs)(W,{onClick:h,children:[(0,$.jsx)(fe,{"aria-hidden":!0}),`Finish review`]}):(0,$.jsxs)(W,{className:`min-w-0`,onClick:()=>p(1),children:[(0,$.jsxs)(`span`,{className:`min-w-0 truncate`,children:[`Next: `,c]}),(0,$.jsx)(De,{"aria-hidden":!0})]}),t[99]=c,t[100]=h,t[101]=p,t[102]=N):N=t[102];let P;t[103]===N?P=t[104]:(P=(0,$.jsx)(`footer`,{className:`flex flex-wrap items-center justify-end gap-3 border-t border-border/60 pt-4`,children:N}),t[103]=N,t[104]=P);let F;t[105]!==M||t[106]!==P||t[107]!==T||t[108]!==E||t[109]!==D||t[110]!==O||t[111]!==k||t[112]!==A||t[113]!==j?(F=(0,$.jsxs)(`article`,{className:T,children:[E,D,O,k,A,j,M,P]}),t[105]=M,t[106]=P,t[107]=T,t[108]=E,t[109]=D,t[110]=O,t[111]=k,t[112]=A,t[113]=j,t[114]=F):F=t[114];let I;t[115]!==S||t[116]!==v?(I=S?(0,$.jsx)(`aside`,{className:`hidden @min-[90rem]/guide:block @min-[90rem]/guide:sticky @min-[90rem]/guide:top-4 @min-[90rem]/guide:self-start`,children:(0,$.jsx)(sd,{notes:v})}):null,t[115]=S,t[116]=v,t[117]=I):I=t[117];let L;return t[118]!==C||t[119]!==F||t[120]!==I?(L=(0,$.jsxs)(`div`,{className:C,children:[F,I]}),t[118]=C,t[119]=F,t[120]=I,t[121]=L):L=t[121],L}function yd(e){return e.path}var bd=new Map;function xd(e){let t=(0,Q.c)(23),{environmentId:n,reference:r,headSha:i,wantedPaths:a}=e,o;t[0]===r?o=t[1]:(o=Ri(r),t[0]=r,t[1]=o);let s=`${n}:${o}:${i}`,c;t[2]===s?c=t[3]:(c={key:s,cursor:null,done:!1,files:bd},t[2]=s,t[3]=c);let[l,u]=(0,Z.useState)(c),d,f,p,m;t[4]!==n||t[5]!==s||t[6]!==l||t[7]!==r||t[8]!==a?(d=l.key===s?l:{key:s,cursor:null,done:!1,files:bd},f=a.some(e=>!d.files.has(e))&&!d.done,p=At,m=f?Ur.diff({environmentId:n,input:{...r,...d.cursor===null?{}:{cursor:d.cursor}}}):null,t[4]=n,t[5]=s,t[6]=l,t[7]=r,t[8]=a,t[9]=d,t[10]=f,t[11]=p,t[12]=m):(d=t[9],f=t[10],p=t[11],m=t[12]);let h=p(m),g=h.data,_=d.cursor,v,y;t[13]!==_||t[14]!==g||t[15]!==s?(v=()=>{g!==null&&u(e=>{let t=e.key===s?e:{key:s,cursor:null,done:!1,files:bd};if(t.cursor!==_||t.done)return t;let n=zt(g.patch,`pull-request-guide:${s}:${_??`first`}`),r=new Map(t.files);if(n?.kind===`files`)for(let e of n.files)r.set(Yt(e),e);return{key:s,cursor:g.nextCursor,done:g.nextCursor===null,files:r}})},y=[_,g,s],t[13]=_,t[14]=g,t[15]=s,t[16]=v,t[17]=y):(v=t[16],y=t[17]),(0,Z.useEffect)(v,y);let b=f&&h.error===null,x=f?h.error:null,S;return t[18]!==d.files||t[19]!==h.refresh||t[20]!==b||t[21]!==x?(S={files:d.files,loading:b,error:x,retry:h.refresh},t[18]=d.files,t[19]=h.refresh,t[20]=b,t[21]=x,t[22]=S):S=t[22],S}function Sd(e){let t=(0,Q.c)(63),{environmentId:n,reference:r,guide:i,banner:a,active:o,commenting:s,onAsk:c,onFinish:l,onOpenFile:u}=e,d;t[0]!==n||t[1]!==i.headSha||t[2]!==r?(d=ra(ta(n,r),i.headSha),t[0]=n,t[1]=i.headSha,t[2]=r,t[3]=d):d=t[3];let f=d,p=na(f),m;t[4]===f?m=t[5]:(m=e=>$i.getState().setProgress(f,t=>({...t,...e(t)})),t[4]=f,t[5]=m);let h=m,[g,_]=(0,Z.useState)(!1),v=i.stops.length,y=Math.max(Math.min(p.position,v-1),0),b=i.stops[y]??null,x;t[6]===b?x=t[7]:(x=b===null?[]:Ju(b),t[6]=b,t[7]=x);let S=x,C;t[8]!==n||t[9]!==i.headSha||t[10]!==r||t[11]!==S?(C={environmentId:n,reference:r,headSha:i.headSha,wantedPaths:S},t[8]=n,t[9]=i.headSha,t[10]=r,t[11]=S,t[12]=C):C=t[12];let w=xd(C),T=jt(Ur.diffFileContents),E=`pull-request-guide:${f}`,D;t[13]!==n||t[14]!==T||t[15]!==r||t[16]!==E?(D=Qo(T,{environmentId:n,reference:r,commit:null,cacheKey:E}),t[13]=n,t[14]=T,t[15]=r,t[16]=E,t[17]=D):D=t[17];let O=D,k=(0,Z.useRef)(null),A;t[18]!==y||t[19]!==h?(A=e=>{h(t=>({position:e,seen:e>y?new Set(t.seen).add(y):t.seen})),_(!1),k.current?.scrollTo({top:0})},t[18]=y,t[19]=h,t[20]=A):A=t[20];let j=A,M;t[21]!==j||t[22]!==y||t[23]!==v?(M=e=>j(qu(y,e,v)),t[21]=j,t[22]=y,t[23]=v,t[24]=M):M=t[24];let N=M,P;t[25]===N?P=t[26]:(P=e=>{e.defaultPrevented||e.isComposing||Ca()||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey||(e.key===`j`||e.key===`k`)&&(ea(e.target)||(e.preventDefault(),N(e.key===`j`?1:-1)))},t[25]=N,t[26]=P);let F=(0,Z.useEffectEvent)(P),I;t[27]!==o||t[28]!==F?(I=()=>{if(!o)return;let e=e=>F(e);return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},t[27]=o,t[28]=F,t[29]=I):I=t[29];let L;t[30]===o?L=t[31]:(L=[o],t[30]=o,t[31]=L),(0,Z.useEffect)(I,L);let ee;t[32]!==j||t[33]!==i.stops||t[34]!==y||t[35]!==p.seen?(ee=(0,$.jsx)(`aside`,{className:`sticky top-4 self-start @max-[56rem]/guide:hidden`,children:(0,$.jsx)(rd,{stops:i.stops,position:y,seen:p.seen,onSelect:j})}),t[32]=j,t[33]=i.stops,t[34]=y,t[35]=p.seen,t[36]=ee):ee=t[36];let R;t[37]===w.error?R=t[38]:(R=w.error===null?null:(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`The diff could not be loaded, so excerpts are missing: `,w.error]}),t[37]=w.error,t[38]=R);let z;t[39]!==s||t[40]!==w.files||t[41]!==w.loading||t[42]!==j||t[43]!==i.stops||t[44]!==O||t[45]!==c||t[46]!==l||t[47]!==u||t[48]!==y||t[49]!==g||t[50]!==N||t[51]!==b||t[52]!==v||t[53]!==p.seen||t[54]!==h?(z=b===null?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This change has no files to tour.`}):(0,$.jsx)(vd,{stop:b,index:y,stopCount:v,railOpen:g,onRailOpenChange:_,stopList:(0,$.jsx)(rd,{stops:i.stops,position:y,seen:p.seen,onSelect:j}),nextTitle:i.stops[y+1]?.title??null,files:w.files,loadDiffFiles:O,diffLoading:w.loading,commenting:s,onStep:N,onAsk:c===null?null:e=>c(y,e),onFinish:l===null?null:()=>{h(e=>({seen:new Set(e.seen).add(y)})),l()},onOpenFile:u},y),t[39]=s,t[40]=w.files,t[41]=w.loading,t[42]=j,t[43]=i.stops,t[44]=O,t[45]=c,t[46]=l,t[47]=u,t[48]=y,t[49]=g,t[50]=N,t[51]=b,t[52]=v,t[53]=p.seen,t[54]=h,t[55]=z):z=t[55];let B;t[56]!==a||t[57]!==R||t[58]!==z?(B=(0,$.jsxs)(`main`,{className:`flex min-w-0 flex-col gap-4`,children:[a,R,z]}),t[56]=a,t[57]=R,t[58]=z,t[59]=B):B=t[59];let te;return t[60]!==ee||t[61]!==B?(te=(0,$.jsx)(`div`,{ref:k,className:`@container/guide h-full overflow-y-auto scrollbar-gutter-both`,children:(0,$.jsxs)(`div`,{className:`mx-auto grid max-w-[100rem] gap-6 px-4 py-4 @min-[56rem]/guide:grid-cols-[16rem_minmax(0,1fr)] @min-[90rem]/guide:gap-8 @min-[90rem]/guide:px-6`,children:[ee,B]})}),t[60]=ee,t[61]=B,t[62]=te):te=t[62],te}function Cd(e){let t=(0,Q.c)(28),{environmentId:n,reference:r,title:i}=e,a;t[0]!==n||t[1]!==r?(a=Ur.reviewGuide({environmentId:n,input:r}),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=At(a),s;t[3]===n?s=t[4]:(s=Ur.generateReviewGuide.permissionAtom(n),t[3]=n,t[4]=s);let c=Ie(s),l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l={reportFailure:!1},t[5]=l):l=t[5];let u=jt(Ur.generateReviewGuide,l),[d,f]=(0,Z.useState)(!1),p=o.data,m=d||p?.run?._tag===`Running`,h;t[6]!==p||t[7]!==n||t[8]!==r||t[9]!==i?(h=()=>$i.getState().watch({environmentId:n,reference:r,title:i,previousGuideAt:p?.guide?.generatedAt??null,previousFailedAt:p?.run?._tag===`Failed`?p.run.failedAt:null,since:Date.now()}),t[6]=p,t[7]=n,t[8]=r,t[9]=i,t[10]=h):h=t[10];let g=(0,Z.useEffectEvent)(h),_;t[11]!==p?.run?._tag||t[12]!==g?(_=()=>{p?.run?._tag===`Running`&&g()},t[11]=p?.run?._tag,t[12]=g,t[13]=_):_=t[13];let v=p?.run?._tag,y;t[14]===v?y=t[15]:(y=[v],t[14]=v,t[15]=y),(0,Z.useEffect)(_,y);let b;t[16]!==n||t[17]!==u||t[18]!==r||t[19]!==m||t[20]!==g?(b=async()=>{if(m)return;f(!0),g();let e=await u({environmentId:n,input:r});f(!1),e._tag===`Failure`&&($i.getState().settle(ta(n,r)),bt.add({type:`error`,title:`Could not start a review guide`,description:di(Ge(e),`Check the review guide model in Settings → Source Control.`)}))},t[16]=n,t[17]=u,t[18]=r,t[19]=m,t[20]=g,t[21]=b):b=t[21];let x=b,S;return t[22]!==c||t[23]!==p||t[24]!==o||t[25]!==m||t[26]!==x?(S={query:o,data:p,running:m,canWrite:c,write:x},t[22]=c,t[23]=p,t[24]=o,t[25]=m,t[26]=x,t[27]=S):S=t[27],S}function wd(e){let t=(0,Q.c)(68),{environmentId:n,reference:r,title:i,workspaceRoot:a,active:o,canComment:s,onAskAboutLines:c,onAskAboutStop:l,onFinishReview:u,onOpenFile:d,onTourShown:f}=e,p;t[0]!==n||t[1]!==r||t[2]!==i?(p={environmentId:n,reference:r,title:i},t[0]=n,t[1]=r,t[2]=i,t[3]=p):p=t[3];let{query:m,data:h,running:g,canWrite:_,write:v}=Cd(p),y;t[4]!==n||t[5]!==r?(y=ta(n,r),t[4]=n,t[5]=r,t[6]=y):y=t[6];let b=y,x;t[7]===r?x=t[8]:(x=Ri(r),t[7]=r,t[8]=x);let S=x,C=zi(r),w=Li(Ed),T=Li(Td),E;t[9]!==w||t[10]!==s||t[11]!==c||t[12]!==C||t[13]!==T||t[14]!==S?(E=!s&&c===null?null:{canComment:s,pending:C,onComment:e=>{let{path:t,oldPath:n,position:r,body:i}=e;return w(S,{id:Bi(),path:t,...n===null?{}:{oldPath:n},position:r,body:i})},onRemove:e=>T(S,e),onAskAgent:c},t[9]=w,t[10]=s,t[11]=c,t[12]=C,t[13]=T,t[14]=S,t[15]=E):E=t[15];let D=E,O,k;t[16]!==o||t[17]!==b?(O=()=>{if(o)return $i.getState().setShown(b),()=>{$i.getState().shownKey===b&&$i.getState().setShown(null)}},k=[o,b],t[16]=o,t[17]=b,t[18]=O,t[19]=k):(O=t[18],k=t[19]),(0,Z.useEffect)(O,k);let A=h?.guide??null,j=o&&A!==null,M;t[20]===f?M=t[21]:(M=()=>f?.(),t[20]=f,t[21]=M);let N=(0,Z.useEffectEvent)(M),P;t[22]!==N||t[23]!==j?(P=()=>{j&&N()},t[22]=N,t[23]=j,t[24]=P):P=t[24];let F;t[25]===j?F=t[26]:(F=[j],t[25]=j,t[26]=F),(0,Z.useEffect)(P,F);let I=h?.run??null,L=h?.currentHeadSha??null,ee=A!==null&&L!==null&&L!==A.headSha,R=I?._tag===`Failed`&&I.headSha===L?I.detail:null,z;t[27]!==_||t[28]!==g||t[29]!==v?(z=(e,t)=>_?(0,$.jsxs)(W,{size:t,variant:`outline`,disabled:g,onClick:()=>void v(),children:[g?(0,$.jsx)(yt,{}):(0,$.jsx)(He,{"aria-hidden":!0,className:`size-3.5`}),g?`Reading the change...`:e]}):null,t[27]=_,t[28]=g,t[29]=v,t[30]=z):z=t[30];let B=z;if(A===null){if(m.isPending&&h===null){let e;return t[31]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`div`,{className:`flex min-h-48 items-center justify-center`,children:(0,$.jsx)(yt,{})}),t[31]=e):e=t[31],e}let e=g?`Writing a review guide`:`No review guide yet`,n;t[32]===e?n=t[33]:(n=(0,$.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:e}),t[32]=e,t[33]=n);let r=R??m.error??(g?`An agent is reading the change. A large one takes a few minutes. You can leave; you will be told when it is ready.`:`A guide is a tour of the change: stops through the code in reading order, with the calls only a maintainer can make.`),i;t[34]===r?i=t[35]:(i=(0,$.jsx)(`p`,{className:`max-w-md text-xs text-muted-foreground`,children:r}),t[34]=r,t[35]=i);let a=R===null?`Write guide`:`Try again`,o;t[36]!==a||t[37]!==B?(o=B(a,`sm`),t[36]=a,t[37]=B,t[38]=o):o=t[38];let s;return t[39]!==n||t[40]!==i||t[41]!==o?(s=(0,$.jsxs)(`div`,{className:`flex min-h-48 flex-col items-center justify-center gap-2 px-4 py-10 text-center`,children:[n,i,o]}),t[39]=n,t[40]=i,t[41]=o,t[42]=s):s=t[42],s}let te;t[43]!==_||t[44]!==R||t[45]!==g||t[46]!==ee||t[47]!==B?(te=ee||R!==null||g?(0,$.jsxs)(ca,{variant:g?`info`:`warning`,children:[g?(0,$.jsx)(yt,{}):(0,$.jsx)(We,{}),(0,$.jsx)(sa,{children:g?`Rewriting this guide. You will be told when the new one is ready.`:R??`Written before the latest push.`}),!g&&_?(0,$.jsx)(oa,{children:B(`Rewrite`,`xs`)}):null]}):null,t[43]=_,t[44]=R,t[45]=g,t[46]=ee,t[47]=B,t[48]=te):te=t[48];let V=te,H;t[49]!==n||t[50]!==a?(H={environmentId:n,cwd:a},t[49]=n,t[50]=a,t[51]=H):H=t[51];let ne;t[52]!==A||t[53]!==l?(ne=l===null?null:(e,t)=>{let n=A.stops[e];n!==void 0&&l(n,e,t)},t[52]=A,t[53]=l,t[54]=ne):ne=t[54];let re;t[55]!==o||t[56]!==V||t[57]!==D||t[58]!==n||t[59]!==A||t[60]!==u||t[61]!==d||t[62]!==r||t[63]!==ne?(re=(0,$.jsx)(Sd,{environmentId:n,reference:r,guide:A,banner:V,active:o,commenting:D,onAsk:ne,onFinish:u,onOpenFile:d}),t[55]=o,t[56]=V,t[57]=D,t[58]=n,t[59]=A,t[60]=u,t[61]=d,t[62]=r,t[63]=ne,t[64]=re):re=t[64];let U;return t[65]!==H||t[66]!==re?(U=(0,$.jsx)(Gu,{value:H,children:re}),t[65]=H,t[66]=re,t[67]=U):U=t[67],U}function Td(e){return e.removeComment}function Ed(e){return e.addComment}function Dd(e){let t=(0,Q.c)(12),[n,r]=(0,Z.useState)(null),i=n?.scopeKey===e?n:null,a,o;t[0]!==n||t[1]!==e?(a=()=>{if(!n)return;let t=()=>r(null);if(n.scopeKey!==e){t();return}let i=e=>{e.target instanceof Node&&!n.element.contains(e.target)&&t()},a=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),t())},o=window.setTimeout(t,3e3);return document.addEventListener(`pointerdown`,i,!0),window.addEventListener(`keydown`,a,!0),window.addEventListener(`blur`,t),()=>{window.clearTimeout(o),document.removeEventListener(`pointerdown`,i,!0),window.removeEventListener(`keydown`,a,!0),window.removeEventListener(`blur`,t)}},o=[n,e],t[0]=n,t[1]=e,t[2]=a,t[3]=o):(a=t[2],o=t[3]),(0,Z.useEffect)(a,o);let s;t[4]===i?.action?s=t[5]:(s=e=>i?.action===e,t[4]=i?.action,t[5]=s);let c;t[6]!==i||t[7]!==e?(c=(t,n)=>({onClick:a=>{i?.action===t&&i.element===a.currentTarget?(r(null),n()):r({scopeKey:e,action:t,element:a.currentTarget})},onBlur:()=>r(null)}),t[6]=i,t[7]=e,t[8]=c):c=t[8];let l;return t[9]!==s||t[10]!==c?(l={isArmed:s,props:c},t[9]=s,t[10]=c,t[11]=l):l=t[11],l}var Od={merge:`Could not merge this pull request`,ready:`Could not mark this ready for review`,draft:`Could not convert this to a draft`,close:`Could not close this pull request`,reopen:`Could not reopen this pull request`,"update-branch":`Could not update this branch`,"enable-auto-merge":`Could not turn on auto-merge`,"disable-auto-merge":`Could not turn off auto-merge`,revert:`Could not open a revert pull request`,"delete-branch":`Could not delete this branch`,"approve-workflows":`Could not approve workflows`},kd={merge:`The host refused the merge. Check that you have write access, that the checks it requires have passed, and that the branch is not conflicting.`,ready:`The host refused it. Check that you have write access to this repository.`,draft:`The host refused it. Check that you have write access to this repository.`,close:`The host refused it. Check that you have write access, or that you opened it.`,reopen:`The host refused it. Check that you have write access, and that the branch still exists.`,"update-branch":`The host refused it. Check that you have write access to the branch — one from a fork also needs its author to allow edits from maintainers — and that it does not conflict with the base.`,"enable-auto-merge":`The host refused it. Check that this repository allows auto-merge, that you have write access, and that there is something left for it to wait on.`,"disable-auto-merge":`The host refused it. Check that you have write access, and that the merge has not already happened.`,revert:`The host refused it. Check that you have write access and that this pull request was merged on the host.`,"delete-branch":`The host refused it. Check that you have write access to the source repository and that the branch has not moved since this page loaded.`,"approve-workflows":`The host refused it. Check that you have Actions write access and that these workflow runs are still awaiting approval.`},Ad=`The host refused it. A rebase stops at the first commit that does not apply cleanly; updating with a merge commit may still work.`,jd=[{value:`summary`,label:`Summary`},{value:`guide`,label:`Guide`},{value:`timeline`,label:`Timeline`},{value:`code`,label:`Code`}],Md=()=>n(()=>import(`./PullRequestCodeTab-Bm67cV34.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338])),Nd=(0,Z.lazy)(Md),Pd=new Map,Fd=e=>typeof e==`string`?e:ie(e);function Id(e){let t=(0,Q.c)(12),{environments:n,value:r,onChange:i,disabled:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(ne,{}),t[0]=o):o=t[0];let s;t[1]===i?s=t[2]:(s=e=>i(e),t[1]=i,t[2]=s);let c;if(t[3]!==a||t[4]!==n){let e;t[6]===a?e=t[7]:(e=e=>(0,$.jsx)(Ne,{value:e.environmentId,disabled:a,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(ia,{kind:e.machine??`server`,className:`size-3.5 shrink-0`}),(0,$.jsx)(`span`,{className:`truncate`,children:e.label})]})},e.environmentId),t[6]=a,t[7]=e),c=n.map(e),t[3]=a,t[4]=n,t[5]=c}else c=t[5];let l;return t[8]!==s||t[9]!==c||t[10]!==r?(l=(0,$.jsxs)($.Fragment,{children:[o,(0,$.jsx)(Ee,{value:r,onValueChange:s,children:c})]}),t[8]=s,t[9]=c,t[10]=r,t[11]=l):l=t[11],l}var Ld=(e,t)=>{e.preventDefault(),e.stopPropagation(),jl({url:t.url,openLabel:kl(Fr.get(t.provider)),position:{x:e.clientX,y:e.clientY}})};function Rd(e){let t=(0,Q.c)(28),{baseBranch:n,freshness:r,pending:i,onUpdate:a,iconClassName:o,className:s,children:c}=e,l;t[0]===r.behindBy?l=t[1]:(l=r.behindBy===null?``:` by ${r.behindBy.toLocaleString()} ${r.behindBy===1?`commit`:`commits`}`,t[0]=r.behindBy,t[1]=l);let u=`This branch is out-of-date with ${n}${l}.`,d;t[2]===s?d=t[3]:(d=G(`inline-flex min-w-0 shrink-0 cursor-help items-center gap-1 rounded-sm text-warning-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,s),t[2]=s,t[3]=d);let f;t[4]!==u||t[5]!==d?(f=(0,$.jsx)(`button`,{type:`button`,"aria-label":u,className:d}),t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;t[7]===o?p=t[8]:(p=G(`size-3.5 shrink-0`,o),t[7]=o,t[8]=p);let m;t[9]===p?m=t[10]:(m=(0,$.jsx)(We,{"aria-hidden":!0,className:p}),t[9]=p,t[10]=m);let h;t[11]!==c||t[12]!==f||t[13]!==m?(h=(0,$.jsxs)(Jr,{openOnHover:!0,delay:0,closeDelay:120,render:f,children:[c,m]}),t[11]=c,t[12]=f,t[13]=m,t[14]=h):h=t[14];let g;t[15]===u?g=t[16]:(g=(0,$.jsx)(`p`,{className:`text-xs text-foreground`,children:u}),t[15]=u,t[16]=g);let _;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:`Changes can be cleanly merged.`}),t[17]=_):_=t[17];let v;t[18]!==r.methods||t[19]!==a||t[20]!==i?(v=r.methods.length>0?(0,$.jsx)(`span`,{className:`mt-2 flex flex-wrap items-center gap-1.5`,children:r.methods.map(e=>(0,$.jsxs)(W,{size:`xs`,variant:`outline`,disabled:i,onClick:()=>a(e),children:[(0,$.jsx)(X.merged,{"aria-hidden":!0,className:`size-3`}),e===`rebase`?`Update with rebase`:`Update branch`]},e))}):null,t[18]=r.methods,t[19]=a,t[20]=i,t[21]=v):v=t[21];let y;t[22]!==g||t[23]!==v?(y=(0,$.jsxs)(Kr,{align:`start`,side:`bottom`,className:`max-w-80`,padding:`compact`,children:[g,_,v]}),t[22]=g,t[23]=v,t[24]=y):y=t[24];let b;return t[25]!==y||t[26]!==h?(b=(0,$.jsxs)(Yr,{children:[h,y]}),t[25]=y,t[26]=h,t[27]=b):b=t[27],b}function zd({environmentId:e,shortcutsEnabled:t,getShortcutContext:n,threadRef:r=null,reference:i,listEntry:s=null,refreshToken:c=0,onActed:u,onClose:m,context:g=`page`,composerDraftTarget:_,onBack:x,onSelectPullRequest:C,onGuideShown:w}){let T=qe(),E=Ye(),O=E.find(t=>t.id===i.projectId&&t.environmentId===e),k=O?.repositoryIdentity,M=T.get(e)?.environment.capabilities.threadPullRequests===!0,P=(0,Z.useMemo)(()=>M?mi(i,k):{projectId:i.projectId,repository:i.repository,number:i.number},[i,k,M]),F=`${P.projectId}:${P.host??``}:${P.repository}#${P.number}`,I=s?.projectId===P.projectId&&s.repository.toLowerCase()===P.repository.toLowerCase()&&(P.host===void 0||s.host.toLowerCase()===P.host.toLowerCase())&&s.number===P.number?s:null,[ee,R]=(0,Z.useState)(!1),[B,te]=(0,Z.useState)(0),[U,ie]=(0,Z.useState)(`summary`),[ae,oe]=(0,Z.useState)(`newest`),[ce,le]=(0,Z.useState)(()=>({pullRequestKey:F,oid:null})),de=ce.pullRequestKey===F?ce.oid:null,me=e=>{le({pullRequestKey:F,oid:e})},he=e=>{me(e),ie(`code`)},[ge,_e]=(0,Z.useState)(null),be=e=>{me(null),_e(t=>({path:e,nonce:(t?.nonce??0)+1})),Md(),ie(`code`)},Se=$i(t=>t.openRequestKey===ta(e,P));Se&&U!==`guide`&&ie(`guide`),(0,Z.useEffect)(()=>{Se&&$i.getState().requestOpen(null)},[Se]);let Ce=`${e}:${F}`,[we,Te]=(0,Z.useState)(()=>({key:Ce,tabs:new Set([`summary`])})),De=we.key===Ce?we.tabs:new Set([U]);(0,Z.useEffect)(()=>{Te(e=>e.key===Ce?e.tabs.has(U)?e:{key:Ce,tabs:new Set(e.tabs).add(U)}:{key:Ce,tabs:new Set([U])})},[U,Ce]);let[Oe,je]=(0,Z.useState)(!1),Pe=(0,Z.useRef)({});(0,Z.useEffect)(()=>{je(Pe.current[U]??!1)},[U]);let Le=Oe,ze=(0,Z.useRef)({}),Be=(0,Z.useMemo)(()=>({summary:e=>{ze.current.summary=e},timeline:e=>{ze.current.timeline=e},code:e=>{ze.current.code=e}}),[]),We=(0,Z.useRef)(null),Ke=(0,Z.useRef)(null),Je=(0,Z.useRef)(null);(0,Z.useLayoutEffect)(()=>{let e=Je.current;e!==null&&(Je.current=null,Le&&e.tab===U&&ze.current[U]===e.scroller&&(e.scroller.scrollTop=Math.max(0,e.scroller.scrollTop+e.delta)))},[Le,U]);let Ze=Yi(e=>e.pullRequestMergeMethod),$e=Yi(e=>e.setPullRequestMergeMethod),et=Ea(e,P.projectId),nt=(0,Z.useMemo)(()=>et(),[et]),[rt,it]=(0,Z.useState)(null),at=e=>{it({pullRequestKey:F,method:e})},ot=Dd(F),[st,ct]=(0,Z.useState)(null),lt=Ot(e,a),ut=At(Ur.detail({environmentId:e,input:P})),dt=At(Ur.activity({environmentId:e,input:P})),ft=zr(e),[pt,mt]=(0,Z.useState)(()=>oi(typeof window>`u`?void 0:window.localStorage,e,P));(0,Z.useEffect)(()=>{mt(oi(typeof window>`u`?void 0:window.localStorage,e,P))},[e,F,P.projectId,P.repository,P.number]),(0,Z.useEffect)(()=>{ut.data!==null&&(gi(typeof window>`u`?void 0:window.localStorage,e,P,ut.data),mt(ut.data))},[ut.data,e,F,P.projectId,P.repository,P.number]);let ht=Zr({live:ut.data,cached:pt,reference:P}),gt=(0,Z.useMemo)(()=>I===null?null:Br(I),[I]),_t=(0,Z.useMemo)(()=>ut.data===null?null:{...ut.data,checksState:hr(ut.data.checks)},[ut.data]),vt=Wr(e,P,_t,ut.dataUpdatedAt),yt=(0,Z.useMemo)(()=>Hr(ht,Hr(vt,gt)),[ht,vt,gt]),xt=(0,Z.useMemo)(()=>ht===null||yt===null||yt===ht?ht:{...ht,title:yt.title,state:yt.state,headBranch:yt.headBranch,baseBranch:yt.baseBranch,updatedAt:yt.updatedAt,author:yt.author??ht.author,additions:yt.additions??ht.additions,deletions:yt.deletions??ht.deletions,changedFiles:yt.changedFiles??ht.changedFiles,mergeability:yt.mergeability??ht.mergeability,closedAt:yt.closedAt===void 0?ht.closedAt:yt.closedAt,mergedAt:yt.mergedAt===void 0?ht.mergedAt:yt.mergedAt,isDraft:yt.isDraft??ht.isDraft},[ht,yt]),Tt=dt.data,K=(0,Z.useMemo)(()=>xt===null?null:{...xt,capabilities:lt?xt.capabilities:{...xt.capabilities,reactions:!1,edit:{changeRequest:!1,comment:!1}},viewerPermissions:lt?xt.viewerPermissions:{...xt.viewerPermissions,actions:[],comment:!1,resolve:!1,verdicts:[],requestReviewers:!1,updateMethods:[],labels:!1},author:Tt?.author??xt.author,reviewers:Tt?.reviewers??xt.reviewers,comments:Tt?.comments??[],commentCount:Tt?.commentCount??0,commentsTruncated:Tt?.commentsTruncated??!1,reviewThreads:Tt?.reviewThreads??[],commits:Tt?.commits??[],reactions:Tt?.reactions??[]},[Tt,lt,xt]),Pt=K??yt,Ft=Ie(Dt),{copyToClipboard:It}=St({target:`pull request reference`,onCopy:e=>bt.add({type:`success`,title:`${e} copied`}),onError:(e,t)=>bt.add({type:`error`,title:`Failed to copy ${t}`,description:e.message})}),Lt=(0,Z.useEffectEvent)(e=>{!t||e.defaultPrevented||Ca()||sr(e,Ft,{context:n()})===`pullRequest.copyNumber`&&(e.preventDefault(),e.stopPropagation(),e.repeat||It(`#${P.number}`,`PR number`))});(0,Z.useEffect)(()=>{let e=e=>Lt(e);return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[]),(0,Z.useEffect)(()=>{K?.autoMergeMethod!==void 0&&at(K.autoMergeMethod)},[K?.autoMergeMethod,F]);let Rt=K===null?null:Qe(K.url),zt=Fr.get(K?.provider),Bt=(0,Z.useMemo)(()=>({repositoryUrl:Rt===null?null:zt.referenceAutolinkRepositoryUrl(Rt),threadRef:r}),[zt,Rt,r]),Vt=K?.author&&Rt!==null?zt.authorProfileUrl(K.author.login,Rt):null,Ht=Pt?si(Pt.provider,Pt.number,Pt.headBranch,K?.headRepositoryNameWithOwner,Qe(Pt.url)):ei(P,k),Ut=(0,Z.useCallback)(e=>{bt.add({type:`error`,title:`Could not copy checkout command`,description:e.message})},[]),Wt=At(K===null?null:Nt.listRefs({environmentId:e,input:{cwd:K.workspaceRoot,includeMatchingRemoteRefs:!0,limit:2}})),Gt=K!==null&&Pi(K.baseBranch,Wt.data?.refs??[]),Kt=Cc(e,(0,Z.useMemo)(()=>K===null||K.capabilities.stacks!==!0||!M?null:{...P,host:P.host??tt(K.url)?.host},[K,P,M])),qt=Kt.data,Jt=M&&K?.capabilities.stacks===!0&&K.capabilities.stackActions===!0&&T.get(e)?.environment.capabilities.pullRequestStackActions===!0,Yt=Ai({supportsStackActions:Jt,hasStack:qt!==null,stackPending:!Kt.isFresh,stackError:Kt.error}),Xt=dt.isPending&&Tt===null,Zt=Tt===null?dt.error:null,Qt=(0,Z.useCallback)(()=>{ut.refresh(),dt.refresh(),Kt.refresh()},[dt.refresh,ut.refresh,Kt.refresh]),[$t,en]=(0,Z.useState)(0),tn=$t+(ft??0),nn=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{if(!xt)return;let e={key:Ce,updatedAt:xt.updatedAt};if(ti(nn.current,e)){if(dt.isPending)return;dt.refresh(),en(e=>e+1)}nn.current=e},[dt.isPending,dt.refresh,xt,Ce]),Lc(()=>{ut.refresh()},{key:`pull-request:${e}:${F}`});let rn=jt(Ur.invalidate,{reportFailure:!1}),[an,on]=(0,Z.useState)(!1),sn=an||ut.isPending,cn=(0,Z.useCallback)(async()=>{on(!0);try{await rn({environmentId:e,input:{reference:P}}),Qt(),en(e=>e+1)}finally{on(!1)}},[e,rn,P,Qt]),ln=(0,Z.useRef)(c);(0,Z.useEffect)(()=>{ln.current!==c&&(ln.current=c,cn())},[c,cn]);let un=jt(Ur.runAction,{reportFailure:!1}),dn=jt(Ur.comment,{reportFailure:!1}),[fn,pn]=(0,Z.useState)(null),mn=fn!==null,hn=jt(Ur.update,{reportFailure:!1}),[gn,_n]=(0,Z.useState)(null),vn=gn?.pullRequestKey===F?gn.text:null,[yn,bn]=(0,Z.useState)(!1),xn=Qi(),{environments:Sn}=Ct(),Cn=(0,Z.useMemo)(()=>{let t=E.find(t=>t.id===P.projectId&&t.environmentId===e)?.repositoryIdentity;return Xe(t,P.repository,P.number)},[e,E,P.number,P.projectId,P.repository]),wn=(0,Z.useMemo)(()=>g===`page`?bc({environmentId:e,projectId:P.projectId},E,Sn.map(e=>({environmentId:e.environmentId,label:e.label,machine:p(e.serverConfig)}))):[],[g,e,Sn,E,P.projectId]),[Tn,En]=(0,Z.useState)(null),On=Tn?.pullRequestKey===F?Tn.environmentId:e,An=wn.find(e=>e.environmentId===On)??null,jn=An?.environmentId??e,Mn=An?.workspaceRoot??K?.workspaceRoot??O?.workspaceRoot??null,Nn=Ot(jn,S),Pn=Da({environmentId:jn,cwd:Mn}),Fn=async(t,n,r)=>{u?.(t,`sent`);let i=await un({environmentId:e,input:{...P,action:t,...n?{mergeMethod:n}:{},...r?{updateMethod:r}:{}}});if(pn(null),i._tag===`Failure`){let e=Ge(i),n=r===`rebase`?Ad:kd[t];return bt.add({type:`error`,title:Od[t],description:di(e,n)}),u?.(t,`failed`),!1}return t===`revert`&&bt.add({type:`success`,title:`Revert pull request opened`}),t===`delete-branch`&&bt.add({type:`success`,title:`Branch deleted`}),Ti(t)?cn():Qt(),u?.(t,`done`),!0},In=async(e,t,n)=>!lt||fn!==null?!1:(pn(e),Fn(e,t,n)),Ln=async(t,n)=>!lt||fn!==null?{commentPosted:!1}:(pn(n),(await dn({environmentId:e,input:{...P,body:t}}))._tag===`Failure`?(pn(null),bt.add({type:`error`,title:`Could not post the comment`}),{commentPosted:!1}):(await Fn(n)||Qt(),{commentPosted:!0})),Rn=async t=>{let n=t.trim();if(!lt||K===null||yn)return;if(n.length===0||n===K.title){_n(null);return}bn(!0);let r=await hn({environmentId:e,input:{...P,title:n}});if(bn(!1),r._tag===`Failure`){bt.add({type:`error`,title:`The title could not be saved`,description:di(Ge(r),`The host refused the new title.`)});return}_n(null),Qt()},zn=_??null,Bn=Pn.isAllowed&&Nn,Hn=zn!==null||Bn,Un=ui(zn!==null),Wn=Cd({environmentId:e,reference:P,title:K?.title??null}),Gn=()=>{Wn.write(),Wn.data?.guide??ie(`guide`)},Kn=(e,t)=>{let n=d.getState(),r=n.getComposerDraft(e),i=Fd(e),a=new Set((r?.reviewComments??[]).map(e=>e.id)),o=new Set((t.reviewComments??[]).filter(e=>a.has(e.id)).map(e=>e.id)),s=ai(r?.prompt??``,r?.reviewComments??[],o),c=Fi({prompt:s,lastHandoffPrompt:Pd.get(i)},t.prompt);Pd.set(i,t.prompt),n.setPrompt(e,c),n.setReviewComments(e,yi(r?.reviewComments??[],t.reviewComments??[]));for(let r of t.reviewComments??[])o.has(r.id)&&n.addReviewComment(e,r,{allowDuplicateReference:!0,insertAtCaret:!1})},qn=async(e,t,n)=>{let r=n??await xn(e).then(e=>e,()=>null);return r===null?null:(t===null||Kn(r.draftId,t),r)},Jn=async(t,n,r)=>{if(!K||st!==null)return;if(zn!==null){Kn(zn,n),bt.add({type:`success`,title:`Added to the composer`,description:n.prompt.length>0?`The question is in the composer — read it over, then send.`:`The pull request is in the composer — type your question, then send.`});return}ct(t);let i=z(jn,An?.projectId??K.projectId),a=await qn(i,n);if(ct(null),a!==null&&r?.keepGuide===!0){let t=d.getState().getDraftSession(a.draftId);t!==null&&(Mt.getState().openPullRequest(N(t.environmentId,t.threadId),{environmentId:e,projectId:P.projectId,...P.host===void 0?{}:{host:P.host},repository:P.repository,number:P.number,url:K.url}),$i.getState().requestOpen(ta(e,P)))}if(a===null){bt.add({type:`error`,title:`Could not open a thread`,description:`Try again from the project, or open a thread first.`});return}bt.add({type:`success`,title:`Asked in a thread`,description:n.prompt.length>0?`The question is in the composer — read it over, then send.`:`The pull request is in the composer — type your question, then send.`})},Yn=async(e,t,n=`worktree`)=>{if(!Pt||st!==null)return;if(zn!==null&&t!==null){Kn(zn,t),bt.add({type:`success`,title:`Added to the composer`,description:`The task is in the composer — read it over, then send.`});return}if(Mn===null||!Pn.isAllowed||!kt(jn,`source-control:write`)||n===`worktree`&&!kt(jn,`orchestration:operate`))return;ct(e);let r=bt.add({type:`loading`,title:`Preparing the pull request checkout...`}),i=z(jn,An?.projectId??Pt.projectId),a=await xn(i).then(e=>e,()=>null);if(a===null){ct(null),bt.update(r,{type:`error`,title:`Could not open a thread for the checkout`,description:`Try again from the project, or open a thread first.`});return}let o=await Pn.run({reference:Pt.url,mode:n,threadId:a.threadId});if(o._tag===`Failure`){ct(null);let e=Pn.error instanceof Error?Pn.error.message:null;bt.update(r,{type:`error`,title:`Could not prepare the pull request checkout`,...e?{description:e}:{}});return}if(!await xn(i,{branch:o.value.branch,worktreePath:o.value.worktreePath,envMode:o.value.worktreePath===null?`local`:`worktree`}).then(e=>e!==null,()=>!1)){ct(null),bt.update(r,{type:`error`,title:`Checked out, but the thread stayed where it was`,description:`The checkout is ready on \`${o.value.branch}\`. Point a thread at it from the branch picker, then ask again.`});return}ct(null);let s={type:`warning`,title:`Checked out, but not on the latest commits`,description:`The checkout could not be moved onto the pull request's latest commits, so the code there is older than the pull request. Uncommitted work or local commits keep it where it is.`};if(t===null){bt.update(r,o.value.isOnPullRequestHead?{type:`success`,title:n===`local`?`Checked out here`:`Checked out`,description:n===`local`?`This repository is on the pull request's branch, with a thread open on it.`:`The pull request is in its own worktree, with a thread open on it.`}:s);return}await qn(i,t,a),bt.update(r,o.value.isOnPullRequestHead?{type:`success`,title:`Checkout ready`,description:`The task is in the composer — read it over, then send.`}:s)},Xn=()=>{K&&Jn(`ask`,{...Oi({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,state:K.state,isDraft:K.isDraft})})},Zn=()=>{K&&Jn(`explain`,{...ji({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,state:K.state,isDraft:K.isDraft})})},Qn=(e,t,n)=>{K&&Jn(`guide-stop:${t}`,vi({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,state:K.state,isDraft:K.isDraft,stop:{index:t,title:e.title,summary:e.summary,attention:e.attention?.note??null,excerpts:e.excerpts},question:n}),{keepGuide:!0})},$n=(e,t)=>{K&&Jn(`selection:${e.comment.id}`,wi({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,state:K.state,isDraft:K.isDraft,comment:e.comment,request:e.request}),t)},er=e=>{Pt&&Yn(`checkout:${e}`,null,e)},tr=e=>{K&&Yn(ci(e),bi({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,finding:e}))},nr=()=>{K&&Yn(`findings`,Di({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,reviewThreads:K.reviewThreads,comments:K.comments,checks:kr?[]:K.checks,commentsTruncated:K.commentsTruncated}))},rr=()=>{Pt&&Yn(`conflicts`,{prompt:Si({number:Pt.number,url:Pt.url,headBranch:Pt.headBranch,baseBranch:Pt.baseBranch})})},ir=K?K.capabilities.mergeMethods.filter(e=>K.mergeCapabilities[e]):[],ar=rt?.pullRequestKey===F?rt.method:null,or=hi(ir,ar,nt,Ze),lr=Mi[or],ur=`Auto-merge (${lr.toLowerCase()})`,dr=K?.state===`open`&&K.mergeability===`conflicting`,mr=K?.state===`open`&&K.autoMergeEnabled===!0,gr=K?.autoMergeMethod,_r=gr?`Auto-merge (${Mi[gr].toLowerCase()})`:`Auto-merge`,vr=K?.state===`open`?K.workflowApprovalsRequired??0:0,br=K===null?null:Ii(K),xr=Et(e,e=>e.reviewGuidesEnabled),Sr=jd.filter(e=>(e.value!==`code`||K===null||K.capabilities.diff)&&(e.value!==`guide`||xr));(0,Z.useEffect)(()=>{Sr.some(e=>e.value===U)||ie(`summary`)},[U,Sr]);let Cr=e=>K?.capabilities.actions.includes(e)===!0&&K.viewerPermissions.actions.includes(e),Tr=K?hr(K.checks):null,Dr=yt?.checksState===void 0?Tr:yt.checksState,Or=Dr!==`failing`&&K?.checks.some(e=>e.status===`action-required`)?`pending`:Dr,kr=Or!==Tr,Ar=K?ni({state:K.state,isDraft:K.isDraft,mergeability:K.mergeability,checksState:Or,autoMergeEnabled:K.autoMergeEnabled,hasMergeMethod:ir.length>0,canMerge:Yt&&Cr(`merge`),canMarkReady:Cr(`ready`),canEnableAutoMerge:Yt&&Cr(`enable-auto-merge`)}):null,Nr=K?.state===`open`&&Cr(K.isDraft?`ready`:`draft`)&&!(K.isDraft&&Ar===`ready`),Pr=Yt&&K?.state===`open`&&(mr&&Cr(`disable-auto-merge`)||!mr&&Ar!==`enable-auto-merge`&&!K.isDraft&&!dr&&Cr(`enable-auto-merge`)&&ir.length>0),Ir=Yt&&K?.state===`open`&&(Ar===`enable-auto-merge`||Ar===`auto-merge-armed`)&&Cr(`merge`)&&!K.isDraft&&!dr&&ir.length>0,Lr=K?.state===`open`&&Cr(`merge`)&&!K.isDraft&&!dr&&ir.length>1,Rr=K?fr({state:K.state,isDraft:K.isDraft}):null,Vr=K!==null&&ki(K),Gr=Sn.some(t=>t.environmentId===e&&t.connection.phase===`connected`),Kr=async()=>{K!==null&&await wt()?.dialogs.confirm([`Delete branch ${K.headBranch}?`,`This deletes ${K.headBranch} from ${K.headRepositoryNameWithOwner??K.repository}. Local branches and worktrees are not changed.`].join(`
214
+ `;function ud(e){let t=(0,Q.c)(60),{excerpt:n,file:r,loading:i,notes:a,commenting:o,loadDiffFiles:c,onOpenFile:l}=e,[u,d]=(0,Z.useState)(null),{resolvedTheme:f}=Tt(),p;if(t[0]!==n||t[1]!==r){bb0:{if(r===null){p=null;break bb0}let e=Zu(r),i=Qu(e,n);if(i.length===0){p=null;break bb0}let a=zt(ed(n.path,Bt(r),i),`pull-request-guide-excerpt:${n.path}:${n.side}:${n.start}-${n.end}`),o=a?.kind===`files`?a.files[0]:void 0;if(o===void 0){p=null;break bb0}let s={additions:new Set(i.flatMap(md)),deletions:new Set(i.flatMap(pd))},c;t[3]!==s||t[4]!==o||t[5]!==e||t[6]!==i?(c={fileDiff:o,rows:i,shown:i.length,total:e.length,drawn:s},t[3]=s,t[4]=o,t[5]=e,t[6]=i,t[7]=c):c=t[7],p=c}t[0]=n,t[1]=r,t[2]=p}else p=t[2];let h=p,g=h?.rows??null,_;bb1:{if(g===null||g.some(e=>e.hunk!==g[0]?.hunk)){_=null;break bb1}let e;t[8]!==n.end||t[9]!==n.side||t[10]!==n.start||t[11]!==c||t[12]!==g?(e=async e=>{let t=await c(e),r=td(t.newFile.contents,g);return r===null?t:{newFile:t.newFile,oldFile:{name:t.oldFile?.name??t.newFile.name,contents:r,cacheKey:`${t.newFile.cacheKey??t.newFile.name}:excerpt:${n.side}:${n.start}-${n.end}`}}},t[8]=n.end,t[9]=n.side,t[10]=n.start,t[11]=c,t[12]=g,t[13]=e):e=t[13],_=e}let v=_,y;t[14]!==o?.pending||t[15]!==u||t[16]!==n.path||t[17]!==n.side||t[18]!==a||t[19]!==h?.drawn?(y=()=>{let e=new Map,t=(t,n)=>{let r=`${t}:${n}`,i=e.get(r);if(i!==void 0)return i;let a={side:t,lineNumber:n,metadata:{markers:[],pending:[],draft:!1}};return e.set(r,a),a},r=(n,r,i)=>{let a=t(n,r);e.set(`${n}:${r}`,{...a,metadata:i(a.metadata)})},i=n.side===`new`?`additions`:`deletions`;for(let e of a)r(i,e.line,t=>({...t,markers:[...t.markers,...e.markers]}));for(let e of o?.pending??[]){if(e.path!==n.path)continue;let t=mc(e.position),i=pc(t.side);h?.drawn[i].has(t.line)&&r(i,t.line,t=>({...t,pending:[...t.pending,e]}))}if(u!==null){let e=mc(u.position);r(pc(e.side),e.line,fd)}return[...e.values()]},t[14]=o?.pending,t[15]=u,t[16]=n.path,t[17]=n.side,t[18]=a,t[19]=h?.drawn,t[20]=y):y=t[20],o?.pending;let b;t[21]===y?b=t[22]:(b=y(),t[21]=y,t[22]=b);let x=b,S;t[23]===r?S=t[24]:(S=e=>{if(e===null||r===null)return;let t=m(r,e.end,e.endSide??e.side);t!==null&&d({range:e,position:t})},t[23]=r,t[24]=S);let C=S,w=o!==null&&u===null,T=o?.onAskAgent??null,E;t[25]!==u||t[26]!==n.path||t[27]!==r||t[28]!==T?(E=e=>{if(u===null||r===null||T===null)return;let t=s({id:`pull-request-guide:${n.path}:${u.range.start}:${u.range.end}`,sectionId:`pull-request-guide:${n.path}`,sectionTitle:`Review guide`,filePath:n.path,fileDiff:r,range:u.range,text:e});d(null),t!==null&&T(t,e)},t[25]=u,t[26]=n.path,t[27]=r,t[28]=T,t[29]=E):E=t[29];let D=E,O;t[30]===f?O=t[31]:(O=Ht(f),t[30]=f,t[31]=O);let k;t[32]===v?k=t[33]:(k=v===null?{hunkSeparators:`simple`}:{loadDiffFiles:v},t[32]=v,t[33]=k);let A;t[34]!==C||t[35]!==w||t[36]!==f||t[37]!==O||t[38]!==k?(A={diffStyle:`unified`,lineDiffType:`none`,overflow:`scroll`,theme:O,themeType:f,preferredHighlighter:Ta,unsafeCSS:ld,enableGutterUtility:w,enableLineSelection:w,onGutterUtilityClick:C,onLineSelectionEnd:C,...k},t[34]=C,t[35]=w,t[36]=f,t[37]=O,t[38]=k,t[39]=A):A=t[39];let j=A,M;t[40]===n.caption?M=t[41]:(M=n.caption.trim()===``?null:(0,$.jsx)(`figcaption`,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(Ku,{text:n.caption,plain:!0})}),t[40]=n.caption,t[41]=M);let N;t[42]!==x||t[43]!==D||t[44]!==o||t[45]!==u||t[46]!==n.end||t[47]!==n.path||t[48]!==n.side||t[49]!==n.start||t[50]!==r||t[51]!==i||t[52]!==T||t[53]!==l||t[54]!==j||t[55]!==h?(N=h===null?i?(0,$.jsxs)(`p`,{className:`rounded-lg border border-border/60 px-3 py-2 text-xs text-muted-foreground`,children:[`Loading `,n.path,`...`]}):(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg border border-border/60 px-3 py-2 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{className:`min-w-0 truncate`,children:[(0,$.jsx)(`span`,{className:`font-mono text-foreground`,children:n.path}),` lines `,n.start,`-`,n.end,` are not in the loaded diff.`]}),(0,$.jsx)(W,{size:`xs`,variant:`outline`,onClick:()=>l(n.path),children:`Open in Code`})]}):(0,$.jsx)(`div`,{className:`min-w-0 overflow-hidden rounded-lg border border-border/60`,children:(0,$.jsx)(vn,{fileDiff:h.fileDiff,options:j,lineAnnotations:x,selectedLines:u?.range??null,renderAnnotation:e=>(0,$.jsxs)(`div`,{className:`font-sans`,children:[e.metadata.markers.length>0?(0,$.jsx)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-1 text-xs`,children:e.metadata.markers.map(dd)}):null,e.metadata.pending.map(e=>(0,$.jsx)(hc,{comment:e,onRemove:()=>o?.onRemove(e.id)},e.id)),e.metadata.draft&&u!==null&&o!==null?(0,$.jsx)(Tn,{kind:`draft`,rangeLabel:`${n.path}:${mc(u.position).line}`,text:``,placeholder:o.canComment?`Add a comment…`:`Ask the agent about these lines…`,submitLabel:o.canComment?`Add to review`:`Ask agent`,...o.canComment&&T!==null?{secondaryAction:{label:`Ask agent`,onAction:e=>D(e)}}:{},onCancel:()=>d(null),onComment:e=>{if(!o.canComment){D(e);return}o.onComment({path:n.path,oldPath:r===null?null:hd(r,n.path),position:u.position,body:e}),d(null)}}):null]}),renderHeaderMetadata:()=>(0,$.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{className:`tabular-nums`,children:[n.side===`old`?`removed code, `:``,`showing `,h.shown,` of`,` `,h.total,` diff lines`]}),(0,$.jsx)(W,{size:`icon-xs`,variant:`ghost-muted`,"aria-label":`Open ${n.path} in Code`,onClick:()=>l(n.path),children:(0,$.jsx)(se,{"aria-hidden":!0})})]})})}),t[42]=x,t[43]=D,t[44]=o,t[45]=u,t[46]=n.end,t[47]=n.path,t[48]=n.side,t[49]=n.start,t[50]=r,t[51]=i,t[52]=T,t[53]=l,t[54]=j,t[55]=h,t[56]=N):N=t[56];let P;return t[57]!==M||t[58]!==N?(P=(0,$.jsxs)(`figure`,{className:`flex min-w-0 flex-col gap-1.5`,children:[M,N]}),t[57]=M,t[58]=N,t[59]=P):P=t[59],P}function dd(e){return(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(od,{marker:e.marker}),(0,$.jsx)(`span`,{className:`text-foreground`,children:e.title})]},e.marker)}function fd(e){return{...e,draft:!0}}function pd(e){return e.oldLine===null?[]:[e.oldLine]}function md(e){return e.newLine===null?[]:[e.newLine]}function hd(e,t){let n=Bt(e);return n===t?null:n}function gd(e){let t=(0,Q.c)(11),{file:n,loadDiffFiles:r}=e,{resolvedTheme:i}=Tt(),a;t[0]===n?a=t[1]:(a=hn(n),t[0]=n,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s=Ht(i),t[2]=i,t[3]=s);let c;t[4]!==r||t[5]!==i||t[6]!==s?(c={diffStyle:`unified`,lineDiffType:`none`,overflow:`scroll`,disableFileHeader:!0,theme:s,themeType:i,preferredHighlighter:Ta,unsafeCSS:Jo,loadDiffFiles:r},t[4]=r,t[5]=i,t[6]=s,t[7]=c):c=t[7];let l=c,u;return t[8]!==o||t[9]!==l?(u=(0,$.jsx)(`div`,{className:`border-t border-border/60`,children:(0,$.jsx)(vn,{fileDiff:o,options:l})}),t[8]=o,t[9]=l,t[10]=u):u=t[10],u}var _d={tradeoff:`A tradeoff to weigh`,contract:`A contract to check`,product:`A product call`,risk:`A risk to judge`,accessibility:`An accessibility call`};function vd(e){let t=(0,Q.c)(122),{stop:n,index:r,stopCount:i,railOpen:a,onRailOpenChange:o,stopList:s,nextTitle:c,files:l,loadDiffFiles:u,diffLoading:d,commenting:f,onStep:p,onAsk:m,onFinish:h,onOpenFile:g}=e,_;t[0]===n?_=t[1]:(_=nd(n),t[0]=n,t[1]=_);let{lettered:v,byExcerpt:y}=_,b;t[2]===n.excerpts?b=t[3]:(b=new Set(n.excerpts.map(yd)),t[2]=n.excerpts,t[3]=b);let x=b,S,C,T,E,D,O,k,A,j;if(t[4]!==y||t[5]!==f||t[6]!==d||t[7]!==x||t[8]!==l||t[9]!==r||t[10]!==v||t[11]!==u||t[12]!==g||t[13]!==o||t[14]!==p||t[15]!==a||t[16]!==n.attention||t[17]!==n.excerpts||t[18]!==n.files||t[19]!==n.summary||t[20]!==n.title||t[21]!==i||t[22]!==s){let e;t[32]===x?e=t[33]:(e=e=>!x.has(e.path),t[32]=x,t[33]=e);let c=n.files.filter(e);S=v.length>0;let m=S&&`@min-[90rem]/guide:grid-cols-[minmax(0,1fr)_20rem]`;t[34]===m?C=t[35]:(C=G(`grid gap-8`,m),t[34]=m,t[35]=C),T=`flex min-w-0 flex-col gap-5`;let h=r+1,_;t[36]!==i||t[37]!==h?(_=(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground tabular-nums @max-[56rem]/guide:hidden`,children:[`Stop `,h,` of `,i]}),t[36]=i,t[37]=h,t[38]=_):_=t[38];let b;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(W,{size:`xs`,variant:`ghost-muted`,className:`@min-[56rem]/guide:hidden`}),t[39]=b):b=t[39];let M=r+1,N;t[40]!==i||t[41]!==M?(N=(0,$.jsxs)(`span`,{className:`tabular-nums`,children:[`Stop `,M,` of `,i]}),t[40]=i,t[41]=M,t[42]=N):N=t[42];let P=a&&`rotate-180`,F;t[43]===P?F=t[44]:(F=G(P),t[43]=P,t[44]=F);let I;t[45]===F?I=t[46]:(I=(0,$.jsx)(ve,{"aria-hidden":!0,className:F}),t[45]=F,t[46]=I);let L;t[47]!==N||t[48]!==I?(L=(0,$.jsxs)(va,{render:b,children:[N,I]}),t[47]=N,t[48]=I,t[49]=L):L=t[49];let ee=r===0,R;t[50]===p?R=t[51]:(R=()=>p(-1),t[50]=p,t[51]=R);let z;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(w,{"aria-hidden":!0}),t[52]=z):z=t[52];let B;t[53]!==ee||t[54]!==R?(B=(0,$.jsx)(W,{size:`icon-xs`,variant:`outline`,"aria-label":`Previous stop`,disabled:ee,onClick:R,children:z}),t[53]=ee,t[54]=R,t[55]=B):B=t[55];let te=r===i-1,V;t[56]===p?V=t[57]:(V=()=>p(1),t[56]=p,t[57]=V);let H;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(ve,{"aria-hidden":!0}),t[58]=H):H=t[58];let ne;t[59]!==te||t[60]!==V?(ne=(0,$.jsx)(W,{size:`icon-xs`,variant:`outline`,"aria-label":`Next stop`,disabled:te,onClick:V,children:H}),t[59]=te,t[60]=V,t[61]=ne):ne=t[61];let re;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,$.jsxs)(`span`,{"aria-hidden":!0,className:`ml-1 flex items-center gap-0.5 @max-[30rem]/guide:hidden`,children:[(0,$.jsx)(la,{children:`J`}),(0,$.jsx)(la,{children:`K`})]}),t[62]=re):re=t[62];let U;t[63]!==B||t[64]!==ne?(U=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[B,ne,re]}),t[63]=B,t[64]=ne,t[65]=U):U=t[65];let ie;t[66]!==_||t[67]!==L||t[68]!==U?(ie=(0,$.jsxs)(`header`,{className:`flex items-center justify-between gap-2`,children:[_,L,U]}),t[66]=_,t[67]=L,t[68]=U,t[69]=ie):ie=t[69];let ae;t[70]===s?ae=t[71]:(ae=(0,$.jsx)(ba,{className:`@min-[56rem]/guide:hidden`,children:(0,$.jsx)(`div`,{className:`pt-3`,children:s})}),t[70]=s,t[71]=ae),t[72]!==o||t[73]!==a||t[74]!==ie||t[75]!==ae?(E=(0,$.jsxs)(xa,{open:a,onOpenChange:o,children:[ie,ae]}),t[72]=o,t[73]=a,t[74]=ie,t[75]=ae,t[76]=E):E=t[76];let oe;t[77]===n.title?oe=t[78]:(oe=(0,$.jsx)(`h2`,{className:`text-lg font-semibold text-foreground`,children:n.title}),t[77]=n.title,t[78]=oe);let se;t[79]===n.summary?se=t[80]:(se=n.summary.trim()===``?null:(0,$.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(Ku,{text:n.summary})}),t[79]=n.summary,t[80]=se),t[81]!==oe||t[82]!==se?(D=(0,$.jsxs)(`div`,{className:`flex max-w-[60rem] flex-col gap-2`,children:[oe,se]}),t[81]=oe,t[82]=se,t[83]=D):D=t[83],t[84]===n.attention?O=t[85]:(O=n.attention===null?null:(0,$.jsxs)(ca,{controlAlignment:`first-line`,children:[(0,$.jsx)(Oe,{}),(0,$.jsx)(aa,{children:_d[n.attention.kind]}),(0,$.jsx)(sa,{children:(0,$.jsx)(`div`,{children:(0,$.jsx)(Ku,{text:n.attention.note})})})]}),t[84]=n.attention,t[85]=O),t[86]!==y||t[87]!==f||t[88]!==d||t[89]!==l||t[90]!==u||t[91]!==g||t[92]!==n.excerpts?(k=n.excerpts.length>0?(0,$.jsx)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:(0,$.jsx)(mn,{children:n.excerpts.map((e,t)=>(0,$.jsx)(ud,{excerpt:e,file:l.get(e.path)??null,loading:d,notes:y[t]??[],commenting:f,loadDiffFiles:u,onOpenFile:g},`${e.path}:${e.side}:${e.start}-${e.end}`))})}):null,t[86]=y,t[87]=f,t[88]=d,t[89]=l,t[90]=u,t[91]=g,t[92]=n.excerpts,t[93]=k):k=t[93],t[94]===v?A=t[95]:(A=(0,$.jsx)(sd,{notes:v,className:`@min-[90rem]/guide:hidden`}),t[94]=v,t[95]=A),j=c.length>0?(0,$.jsxs)(`section`,{className:`flex flex-col gap-1.5`,children:[(0,$.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:n.excerpts.length>0?`Also in this stop`:`Files in this stop`}),(0,$.jsx)(mn,{children:(0,$.jsx)(`ul`,{className:`flex flex-col overflow-hidden rounded-lg border border-border/60`,children:c.map(e=>{let t=l.get(e.path),n=t===void 0?null:Kt([t]);return(0,$.jsx)(`li`,{className:`border-border/60 not-first:border-t`,children:(0,$.jsxs)(xa,{children:[(0,$.jsxs)(va,{className:`group flex w-full min-w-0 items-center gap-2 px-3 py-2 text-left text-xs outline-none hover:bg-accent/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,children:[(0,$.jsx)(he,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-muted-foreground group-data-panel-open:rotate-90`}),(0,$.jsx)(Le,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,$.jsx)(`span`,{className:`min-w-0 truncate font-mono text-foreground`,children:e.path}),e.note!==void 0&&e.note.trim()!==``?(0,$.jsx)(`span`,{className:`ml-auto min-w-0 truncate text-muted-foreground @max-[30rem]/guide:hidden`,children:(0,$.jsx)(Ku,{text:e.note,plain:!0})}):null,n===null?null:(0,$.jsx)(Sr,{additions:n.additions,deletions:n.deletions,className:`shrink-0 font-mono`})]}),(0,$.jsx)(ba,{animate:!1,children:t===void 0?(0,$.jsx)(`p`,{className:`px-3 py-2 text-xs text-muted-foreground`,children:d?`Loading the diff...`:`This file is not in the loaded diff.`}):(0,$.jsx)(gd,{file:t,loadDiffFiles:u})})]})},e.path)})})})]}):null,t[4]=y,t[5]=f,t[6]=d,t[7]=x,t[8]=l,t[9]=r,t[10]=v,t[11]=u,t[12]=g,t[13]=o,t[14]=p,t[15]=a,t[16]=n.attention,t[17]=n.excerpts,t[18]=n.files,t[19]=n.summary,t[20]=n.title,t[21]=i,t[22]=s,t[23]=S,t[24]=C,t[25]=T,t[26]=E,t[27]=D,t[28]=O,t[29]=k,t[30]=A,t[31]=j}else S=t[23],C=t[24],T=t[25],E=t[26],D=t[27],O=t[28],k=t[29],A=t[30],j=t[31];let M;t[96]!==m||t[97]!==n.questions?(M=n.questions.length>0||m!==null?(0,$.jsxs)(`section`,{className:`flex flex-col gap-1.5`,children:[n.questions.length>0?(0,$.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:`Questions to consider`}):null,(0,$.jsxs)(`div`,{className:`flex flex-col items-start gap-1.5`,children:[n.questions.map(e=>m===null?(0,$.jsx)(`div`,{className:`text-sm text-foreground`,children:(0,$.jsx)(Ku,{text:e})},e):(0,$.jsxs)(`button`,{type:`button`,onClick:()=>m(e),className:`flex min-w-0 items-start gap-2 rounded-lg border border-border/60 px-3 py-1.5 text-left text-sm text-foreground outline-none hover:bg-accent/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,children:[(0,$.jsx)(Ae,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),(0,$.jsx)(`span`,{className:`sr-only`,children:`Ask an agent: `}),(0,$.jsx)(`span`,{children:(0,$.jsx)(Ku,{text:e,plain:!0})})]},e)),m===null?null:(0,$.jsxs)(W,{size:`sm`,variant:`ghost-muted`,onClick:()=>m(``),children:[(0,$.jsx)(Ae,{"aria-hidden":!0}),`Ask about this stop`]})]})]}):null,t[96]=m,t[97]=n.questions,t[98]=M):M=t[98];let N;t[99]!==c||t[100]!==h||t[101]!==p?(N=c===null?h===null?null:(0,$.jsxs)(W,{onClick:h,children:[(0,$.jsx)(fe,{"aria-hidden":!0}),`Finish review`]}):(0,$.jsxs)(W,{className:`min-w-0`,onClick:()=>p(1),children:[(0,$.jsxs)(`span`,{className:`min-w-0 truncate`,children:[`Next: `,c]}),(0,$.jsx)(De,{"aria-hidden":!0})]}),t[99]=c,t[100]=h,t[101]=p,t[102]=N):N=t[102];let P;t[103]===N?P=t[104]:(P=(0,$.jsx)(`footer`,{className:`flex flex-wrap items-center justify-end gap-3 border-t border-border/60 pt-4`,children:N}),t[103]=N,t[104]=P);let F;t[105]!==M||t[106]!==P||t[107]!==T||t[108]!==E||t[109]!==D||t[110]!==O||t[111]!==k||t[112]!==A||t[113]!==j?(F=(0,$.jsxs)(`article`,{className:T,children:[E,D,O,k,A,j,M,P]}),t[105]=M,t[106]=P,t[107]=T,t[108]=E,t[109]=D,t[110]=O,t[111]=k,t[112]=A,t[113]=j,t[114]=F):F=t[114];let I;t[115]!==S||t[116]!==v?(I=S?(0,$.jsx)(`aside`,{className:`hidden @min-[90rem]/guide:block @min-[90rem]/guide:sticky @min-[90rem]/guide:top-4 @min-[90rem]/guide:self-start`,children:(0,$.jsx)(sd,{notes:v})}):null,t[115]=S,t[116]=v,t[117]=I):I=t[117];let L;return t[118]!==C||t[119]!==F||t[120]!==I?(L=(0,$.jsxs)(`div`,{className:C,children:[F,I]}),t[118]=C,t[119]=F,t[120]=I,t[121]=L):L=t[121],L}function yd(e){return e.path}var bd=new Map;function xd(e){let t=(0,Q.c)(23),{environmentId:n,reference:r,headSha:i,wantedPaths:a}=e,o;t[0]===r?o=t[1]:(o=Ri(r),t[0]=r,t[1]=o);let s=`${n}:${o}:${i}`,c;t[2]===s?c=t[3]:(c={key:s,cursor:null,done:!1,files:bd},t[2]=s,t[3]=c);let[l,u]=(0,Z.useState)(c),d,f,p,m;t[4]!==n||t[5]!==s||t[6]!==l||t[7]!==r||t[8]!==a?(d=l.key===s?l:{key:s,cursor:null,done:!1,files:bd},f=a.some(e=>!d.files.has(e))&&!d.done,p=At,m=f?Ur.diff({environmentId:n,input:{...r,...d.cursor===null?{}:{cursor:d.cursor}}}):null,t[4]=n,t[5]=s,t[6]=l,t[7]=r,t[8]=a,t[9]=d,t[10]=f,t[11]=p,t[12]=m):(d=t[9],f=t[10],p=t[11],m=t[12]);let h=p(m),g=h.data,_=d.cursor,v,y;t[13]!==_||t[14]!==g||t[15]!==s?(v=()=>{g!==null&&u(e=>{let t=e.key===s?e:{key:s,cursor:null,done:!1,files:bd};if(t.cursor!==_||t.done)return t;let n=zt(g.patch,`pull-request-guide:${s}:${_??`first`}`),r=new Map(t.files);if(n?.kind===`files`)for(let e of n.files)r.set(Yt(e),e);return{key:s,cursor:g.nextCursor,done:g.nextCursor===null,files:r}})},y=[_,g,s],t[13]=_,t[14]=g,t[15]=s,t[16]=v,t[17]=y):(v=t[16],y=t[17]),(0,Z.useEffect)(v,y);let b=f&&h.error===null,x=f?h.error:null,S;return t[18]!==d.files||t[19]!==h.refresh||t[20]!==b||t[21]!==x?(S={files:d.files,loading:b,error:x,retry:h.refresh},t[18]=d.files,t[19]=h.refresh,t[20]=b,t[21]=x,t[22]=S):S=t[22],S}function Sd(e){let t=(0,Q.c)(63),{environmentId:n,reference:r,guide:i,banner:a,active:o,commenting:s,onAsk:c,onFinish:l,onOpenFile:u}=e,d;t[0]!==n||t[1]!==i.headSha||t[2]!==r?(d=ra(ta(n,r),i.headSha),t[0]=n,t[1]=i.headSha,t[2]=r,t[3]=d):d=t[3];let f=d,p=na(f),m;t[4]===f?m=t[5]:(m=e=>$i.getState().setProgress(f,t=>({...t,...e(t)})),t[4]=f,t[5]=m);let h=m,[g,_]=(0,Z.useState)(!1),v=i.stops.length,y=Math.max(Math.min(p.position,v-1),0),b=i.stops[y]??null,x;t[6]===b?x=t[7]:(x=b===null?[]:Ju(b),t[6]=b,t[7]=x);let S=x,C;t[8]!==n||t[9]!==i.headSha||t[10]!==r||t[11]!==S?(C={environmentId:n,reference:r,headSha:i.headSha,wantedPaths:S},t[8]=n,t[9]=i.headSha,t[10]=r,t[11]=S,t[12]=C):C=t[12];let w=xd(C),T=jt(Ur.diffFileContents),E=`pull-request-guide:${f}`,D;t[13]!==n||t[14]!==T||t[15]!==r||t[16]!==E?(D=Qo(T,{environmentId:n,reference:r,commit:null,cacheKey:E}),t[13]=n,t[14]=T,t[15]=r,t[16]=E,t[17]=D):D=t[17];let O=D,k=(0,Z.useRef)(null),A;t[18]!==y||t[19]!==h?(A=e=>{h(t=>({position:e,seen:e>y?new Set(t.seen).add(y):t.seen})),_(!1),k.current?.scrollTo({top:0})},t[18]=y,t[19]=h,t[20]=A):A=t[20];let j=A,M;t[21]!==j||t[22]!==y||t[23]!==v?(M=e=>j(qu(y,e,v)),t[21]=j,t[22]=y,t[23]=v,t[24]=M):M=t[24];let N=M,P;t[25]===N?P=t[26]:(P=e=>{e.defaultPrevented||e.isComposing||Ca()||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey||(e.key===`j`||e.key===`k`)&&(ea(e.target)||(e.preventDefault(),N(e.key===`j`?1:-1)))},t[25]=N,t[26]=P);let F=(0,Z.useEffectEvent)(P),I;t[27]!==o||t[28]!==F?(I=()=>{if(!o)return;let e=e=>F(e);return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},t[27]=o,t[28]=F,t[29]=I):I=t[29];let L;t[30]===o?L=t[31]:(L=[o],t[30]=o,t[31]=L),(0,Z.useEffect)(I,L);let ee;t[32]!==j||t[33]!==i.stops||t[34]!==y||t[35]!==p.seen?(ee=(0,$.jsx)(`aside`,{className:`sticky top-4 self-start @max-[56rem]/guide:hidden`,children:(0,$.jsx)(rd,{stops:i.stops,position:y,seen:p.seen,onSelect:j})}),t[32]=j,t[33]=i.stops,t[34]=y,t[35]=p.seen,t[36]=ee):ee=t[36];let R;t[37]===w.error?R=t[38]:(R=w.error===null?null:(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`The diff could not be loaded, so excerpts are missing: `,w.error]}),t[37]=w.error,t[38]=R);let z;t[39]!==s||t[40]!==w.files||t[41]!==w.loading||t[42]!==j||t[43]!==i.stops||t[44]!==O||t[45]!==c||t[46]!==l||t[47]!==u||t[48]!==y||t[49]!==g||t[50]!==N||t[51]!==b||t[52]!==v||t[53]!==p.seen||t[54]!==h?(z=b===null?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This change has no files to tour.`}):(0,$.jsx)(vd,{stop:b,index:y,stopCount:v,railOpen:g,onRailOpenChange:_,stopList:(0,$.jsx)(rd,{stops:i.stops,position:y,seen:p.seen,onSelect:j}),nextTitle:i.stops[y+1]?.title??null,files:w.files,loadDiffFiles:O,diffLoading:w.loading,commenting:s,onStep:N,onAsk:c===null?null:e=>c(y,e),onFinish:l===null?null:()=>{h(e=>({seen:new Set(e.seen).add(y)})),l()},onOpenFile:u},y),t[39]=s,t[40]=w.files,t[41]=w.loading,t[42]=j,t[43]=i.stops,t[44]=O,t[45]=c,t[46]=l,t[47]=u,t[48]=y,t[49]=g,t[50]=N,t[51]=b,t[52]=v,t[53]=p.seen,t[54]=h,t[55]=z):z=t[55];let B;t[56]!==a||t[57]!==R||t[58]!==z?(B=(0,$.jsxs)(`main`,{className:`flex min-w-0 flex-col gap-4`,children:[a,R,z]}),t[56]=a,t[57]=R,t[58]=z,t[59]=B):B=t[59];let te;return t[60]!==ee||t[61]!==B?(te=(0,$.jsx)(`div`,{ref:k,className:`@container/guide h-full overflow-y-auto scrollbar-gutter-both`,children:(0,$.jsxs)(`div`,{className:`mx-auto grid max-w-[100rem] gap-6 px-4 py-4 @min-[56rem]/guide:grid-cols-[16rem_minmax(0,1fr)] @min-[90rem]/guide:gap-8 @min-[90rem]/guide:px-6`,children:[ee,B]})}),t[60]=ee,t[61]=B,t[62]=te):te=t[62],te}function Cd(e){let t=(0,Q.c)(28),{environmentId:n,reference:r,title:i}=e,a;t[0]!==n||t[1]!==r?(a=Ur.reviewGuide({environmentId:n,input:r}),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=At(a),s;t[3]===n?s=t[4]:(s=Ur.generateReviewGuide.permissionAtom(n),t[3]=n,t[4]=s);let c=Ie(s),l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l={reportFailure:!1},t[5]=l):l=t[5];let u=jt(Ur.generateReviewGuide,l),[d,f]=(0,Z.useState)(!1),p=o.data,m=d||p?.run?._tag===`Running`,h;t[6]!==p||t[7]!==n||t[8]!==r||t[9]!==i?(h=()=>$i.getState().watch({environmentId:n,reference:r,title:i,previousGuideAt:p?.guide?.generatedAt??null,previousFailedAt:p?.run?._tag===`Failed`?p.run.failedAt:null,since:Date.now()}),t[6]=p,t[7]=n,t[8]=r,t[9]=i,t[10]=h):h=t[10];let g=(0,Z.useEffectEvent)(h),_;t[11]!==p?.run?._tag||t[12]!==g?(_=()=>{p?.run?._tag===`Running`&&g()},t[11]=p?.run?._tag,t[12]=g,t[13]=_):_=t[13];let v=p?.run?._tag,y;t[14]===v?y=t[15]:(y=[v],t[14]=v,t[15]=y),(0,Z.useEffect)(_,y);let b;t[16]!==n||t[17]!==u||t[18]!==r||t[19]!==m||t[20]!==g?(b=async()=>{if(m)return;f(!0),g();let e=await u({environmentId:n,input:r});f(!1),e._tag===`Failure`&&($i.getState().settle(ta(n,r)),bt.add({type:`error`,title:`Could not start a review guide`,description:di(Ge(e),`Check the review guide model in Settings → Source Control.`)}))},t[16]=n,t[17]=u,t[18]=r,t[19]=m,t[20]=g,t[21]=b):b=t[21];let x=b,S;return t[22]!==c||t[23]!==p||t[24]!==o||t[25]!==m||t[26]!==x?(S={query:o,data:p,running:m,canWrite:c,write:x},t[22]=c,t[23]=p,t[24]=o,t[25]=m,t[26]=x,t[27]=S):S=t[27],S}function wd(e){let t=(0,Q.c)(68),{environmentId:n,reference:r,title:i,workspaceRoot:a,active:o,canComment:s,onAskAboutLines:c,onAskAboutStop:l,onFinishReview:u,onOpenFile:d,onTourShown:f}=e,p;t[0]!==n||t[1]!==r||t[2]!==i?(p={environmentId:n,reference:r,title:i},t[0]=n,t[1]=r,t[2]=i,t[3]=p):p=t[3];let{query:m,data:h,running:g,canWrite:_,write:v}=Cd(p),y;t[4]!==n||t[5]!==r?(y=ta(n,r),t[4]=n,t[5]=r,t[6]=y):y=t[6];let b=y,x;t[7]===r?x=t[8]:(x=Ri(r),t[7]=r,t[8]=x);let S=x,C=zi(r),w=Li(Ed),T=Li(Td),E;t[9]!==w||t[10]!==s||t[11]!==c||t[12]!==C||t[13]!==T||t[14]!==S?(E=!s&&c===null?null:{canComment:s,pending:C,onComment:e=>{let{path:t,oldPath:n,position:r,body:i}=e;return w(S,{id:Bi(),path:t,...n===null?{}:{oldPath:n},position:r,body:i})},onRemove:e=>T(S,e),onAskAgent:c},t[9]=w,t[10]=s,t[11]=c,t[12]=C,t[13]=T,t[14]=S,t[15]=E):E=t[15];let D=E,O,k;t[16]!==o||t[17]!==b?(O=()=>{if(o)return $i.getState().setShown(b),()=>{$i.getState().shownKey===b&&$i.getState().setShown(null)}},k=[o,b],t[16]=o,t[17]=b,t[18]=O,t[19]=k):(O=t[18],k=t[19]),(0,Z.useEffect)(O,k);let A=h?.guide??null,j=o&&A!==null,M;t[20]===f?M=t[21]:(M=()=>f?.(),t[20]=f,t[21]=M);let N=(0,Z.useEffectEvent)(M),P;t[22]!==N||t[23]!==j?(P=()=>{j&&N()},t[22]=N,t[23]=j,t[24]=P):P=t[24];let F;t[25]===j?F=t[26]:(F=[j],t[25]=j,t[26]=F),(0,Z.useEffect)(P,F);let I=h?.run??null,L=h?.currentHeadSha??null,ee=A!==null&&L!==null&&L!==A.headSha,R=I?._tag===`Failed`&&I.headSha===L?I.detail:null,z;t[27]!==_||t[28]!==g||t[29]!==v?(z=(e,t)=>_?(0,$.jsxs)(W,{size:t,variant:`outline`,disabled:g,onClick:()=>void v(),children:[g?(0,$.jsx)(yt,{}):(0,$.jsx)(He,{"aria-hidden":!0,className:`size-3.5`}),g?`Reading the change...`:e]}):null,t[27]=_,t[28]=g,t[29]=v,t[30]=z):z=t[30];let B=z;if(A===null){if(m.isPending&&h===null){let e;return t[31]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`div`,{className:`flex min-h-48 items-center justify-center`,children:(0,$.jsx)(yt,{})}),t[31]=e):e=t[31],e}let e=g?`Writing a review guide`:`No review guide yet`,n;t[32]===e?n=t[33]:(n=(0,$.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:e}),t[32]=e,t[33]=n);let r=R??m.error??(g?`An agent is reading the change. A large one takes a few minutes. You can leave; you will be told when it is ready.`:`A guide is a tour of the change: stops through the code in reading order, with the calls only a maintainer can make.`),i;t[34]===r?i=t[35]:(i=(0,$.jsx)(`p`,{className:`max-w-md text-xs text-muted-foreground`,children:r}),t[34]=r,t[35]=i);let a=R===null?`Write guide`:`Try again`,o;t[36]!==a||t[37]!==B?(o=B(a,`sm`),t[36]=a,t[37]=B,t[38]=o):o=t[38];let s;return t[39]!==n||t[40]!==i||t[41]!==o?(s=(0,$.jsxs)(`div`,{className:`flex min-h-48 flex-col items-center justify-center gap-2 px-4 py-10 text-center`,children:[n,i,o]}),t[39]=n,t[40]=i,t[41]=o,t[42]=s):s=t[42],s}let te;t[43]!==_||t[44]!==R||t[45]!==g||t[46]!==ee||t[47]!==B?(te=ee||R!==null||g?(0,$.jsxs)(ca,{variant:g?`info`:`warning`,children:[g?(0,$.jsx)(yt,{}):(0,$.jsx)(We,{}),(0,$.jsx)(sa,{children:g?`Rewriting this guide. You will be told when the new one is ready.`:R??`Written before the latest push.`}),!g&&_?(0,$.jsx)(oa,{children:B(`Rewrite`,`xs`)}):null]}):null,t[43]=_,t[44]=R,t[45]=g,t[46]=ee,t[47]=B,t[48]=te):te=t[48];let V=te,H;t[49]!==n||t[50]!==a?(H={environmentId:n,cwd:a},t[49]=n,t[50]=a,t[51]=H):H=t[51];let ne;t[52]!==A||t[53]!==l?(ne=l===null?null:(e,t)=>{let n=A.stops[e];n!==void 0&&l(n,e,t)},t[52]=A,t[53]=l,t[54]=ne):ne=t[54];let re;t[55]!==o||t[56]!==V||t[57]!==D||t[58]!==n||t[59]!==A||t[60]!==u||t[61]!==d||t[62]!==r||t[63]!==ne?(re=(0,$.jsx)(Sd,{environmentId:n,reference:r,guide:A,banner:V,active:o,commenting:D,onAsk:ne,onFinish:u,onOpenFile:d}),t[55]=o,t[56]=V,t[57]=D,t[58]=n,t[59]=A,t[60]=u,t[61]=d,t[62]=r,t[63]=ne,t[64]=re):re=t[64];let U;return t[65]!==H||t[66]!==re?(U=(0,$.jsx)(Gu,{value:H,children:re}),t[65]=H,t[66]=re,t[67]=U):U=t[67],U}function Td(e){return e.removeComment}function Ed(e){return e.addComment}function Dd(e){let t=(0,Q.c)(12),[n,r]=(0,Z.useState)(null),i=n?.scopeKey===e?n:null,a,o;t[0]!==n||t[1]!==e?(a=()=>{if(!n)return;let t=()=>r(null);if(n.scopeKey!==e){t();return}let i=e=>{e.target instanceof Node&&!n.element.contains(e.target)&&t()},a=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),t())},o=window.setTimeout(t,3e3);return document.addEventListener(`pointerdown`,i,!0),window.addEventListener(`keydown`,a,!0),window.addEventListener(`blur`,t),()=>{window.clearTimeout(o),document.removeEventListener(`pointerdown`,i,!0),window.removeEventListener(`keydown`,a,!0),window.removeEventListener(`blur`,t)}},o=[n,e],t[0]=n,t[1]=e,t[2]=a,t[3]=o):(a=t[2],o=t[3]),(0,Z.useEffect)(a,o);let s;t[4]===i?.action?s=t[5]:(s=e=>i?.action===e,t[4]=i?.action,t[5]=s);let c;t[6]!==i||t[7]!==e?(c=(t,n)=>({onClick:a=>{i?.action===t&&i.element===a.currentTarget?(r(null),n()):r({scopeKey:e,action:t,element:a.currentTarget})},onBlur:()=>r(null)}),t[6]=i,t[7]=e,t[8]=c):c=t[8];let l;return t[9]!==s||t[10]!==c?(l={isArmed:s,props:c},t[9]=s,t[10]=c,t[11]=l):l=t[11],l}var Od={merge:`Could not merge this pull request`,ready:`Could not mark this ready for review`,draft:`Could not convert this to a draft`,close:`Could not close this pull request`,reopen:`Could not reopen this pull request`,"update-branch":`Could not update this branch`,"enable-auto-merge":`Could not turn on auto-merge`,"disable-auto-merge":`Could not turn off auto-merge`,revert:`Could not open a revert pull request`,"delete-branch":`Could not delete this branch`,"approve-workflows":`Could not approve workflows`},kd={merge:`The host refused the merge. Check that you have write access, that the checks it requires have passed, and that the branch is not conflicting.`,ready:`The host refused it. Check that you have write access to this repository.`,draft:`The host refused it. Check that you have write access to this repository.`,close:`The host refused it. Check that you have write access, or that you opened it.`,reopen:`The host refused it. Check that you have write access, and that the branch still exists.`,"update-branch":`The host refused it. Check that you have write access to the branch — one from a fork also needs its author to allow edits from maintainers — and that it does not conflict with the base.`,"enable-auto-merge":`The host refused it. Check that this repository allows auto-merge, that you have write access, and that there is something left for it to wait on.`,"disable-auto-merge":`The host refused it. Check that you have write access, and that the merge has not already happened.`,revert:`The host refused it. Check that you have write access and that this pull request was merged on the host.`,"delete-branch":`The host refused it. Check that you have write access to the source repository and that the branch has not moved since this page loaded.`,"approve-workflows":`The host refused it. Check that you have Actions write access and that these workflow runs are still awaiting approval.`},Ad=`The host refused it. A rebase stops at the first commit that does not apply cleanly; updating with a merge commit may still work.`,jd=[{value:`summary`,label:`Summary`},{value:`guide`,label:`Guide`},{value:`timeline`,label:`Timeline`},{value:`code`,label:`Code`}],Md=()=>n(()=>import(`./PullRequestCodeTab-BamXVeZz.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338])),Nd=(0,Z.lazy)(Md),Pd=new Map,Fd=e=>typeof e==`string`?e:ie(e);function Id(e){let t=(0,Q.c)(12),{environments:n,value:r,onChange:i,disabled:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(ne,{}),t[0]=o):o=t[0];let s;t[1]===i?s=t[2]:(s=e=>i(e),t[1]=i,t[2]=s);let c;if(t[3]!==a||t[4]!==n){let e;t[6]===a?e=t[7]:(e=e=>(0,$.jsx)(Ne,{value:e.environmentId,disabled:a,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(ia,{kind:e.machine??`server`,className:`size-3.5 shrink-0`}),(0,$.jsx)(`span`,{className:`truncate`,children:e.label})]})},e.environmentId),t[6]=a,t[7]=e),c=n.map(e),t[3]=a,t[4]=n,t[5]=c}else c=t[5];let l;return t[8]!==s||t[9]!==c||t[10]!==r?(l=(0,$.jsxs)($.Fragment,{children:[o,(0,$.jsx)(Ee,{value:r,onValueChange:s,children:c})]}),t[8]=s,t[9]=c,t[10]=r,t[11]=l):l=t[11],l}var Ld=(e,t)=>{e.preventDefault(),e.stopPropagation(),jl({url:t.url,openLabel:kl(Fr.get(t.provider)),position:{x:e.clientX,y:e.clientY}})};function Rd(e){let t=(0,Q.c)(28),{baseBranch:n,freshness:r,pending:i,onUpdate:a,iconClassName:o,className:s,children:c}=e,l;t[0]===r.behindBy?l=t[1]:(l=r.behindBy===null?``:` by ${r.behindBy.toLocaleString()} ${r.behindBy===1?`commit`:`commits`}`,t[0]=r.behindBy,t[1]=l);let u=`This branch is out-of-date with ${n}${l}.`,d;t[2]===s?d=t[3]:(d=G(`inline-flex min-w-0 shrink-0 cursor-help items-center gap-1 rounded-sm text-warning-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,s),t[2]=s,t[3]=d);let f;t[4]!==u||t[5]!==d?(f=(0,$.jsx)(`button`,{type:`button`,"aria-label":u,className:d}),t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;t[7]===o?p=t[8]:(p=G(`size-3.5 shrink-0`,o),t[7]=o,t[8]=p);let m;t[9]===p?m=t[10]:(m=(0,$.jsx)(We,{"aria-hidden":!0,className:p}),t[9]=p,t[10]=m);let h;t[11]!==c||t[12]!==f||t[13]!==m?(h=(0,$.jsxs)(Jr,{openOnHover:!0,delay:0,closeDelay:120,render:f,children:[c,m]}),t[11]=c,t[12]=f,t[13]=m,t[14]=h):h=t[14];let g;t[15]===u?g=t[16]:(g=(0,$.jsx)(`p`,{className:`text-xs text-foreground`,children:u}),t[15]=u,t[16]=g);let _;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:`Changes can be cleanly merged.`}),t[17]=_):_=t[17];let v;t[18]!==r.methods||t[19]!==a||t[20]!==i?(v=r.methods.length>0?(0,$.jsx)(`span`,{className:`mt-2 flex flex-wrap items-center gap-1.5`,children:r.methods.map(e=>(0,$.jsxs)(W,{size:`xs`,variant:`outline`,disabled:i,onClick:()=>a(e),children:[(0,$.jsx)(X.merged,{"aria-hidden":!0,className:`size-3`}),e===`rebase`?`Update with rebase`:`Update branch`]},e))}):null,t[18]=r.methods,t[19]=a,t[20]=i,t[21]=v):v=t[21];let y;t[22]!==g||t[23]!==v?(y=(0,$.jsxs)(Kr,{align:`start`,side:`bottom`,className:`max-w-80`,padding:`compact`,children:[g,_,v]}),t[22]=g,t[23]=v,t[24]=y):y=t[24];let b;return t[25]!==y||t[26]!==h?(b=(0,$.jsxs)(Yr,{children:[h,y]}),t[25]=y,t[26]=h,t[27]=b):b=t[27],b}function zd({environmentId:e,shortcutsEnabled:t,getShortcutContext:n,threadRef:r=null,reference:i,listEntry:s=null,refreshToken:c=0,onActed:u,onClose:m,context:g=`page`,composerDraftTarget:_,onBack:x,onSelectPullRequest:C,onGuideShown:w}){let T=qe(),E=Ye(),O=E.find(t=>t.id===i.projectId&&t.environmentId===e),k=O?.repositoryIdentity,M=T.get(e)?.environment.capabilities.threadPullRequests===!0,P=(0,Z.useMemo)(()=>M?mi(i,k):{projectId:i.projectId,repository:i.repository,number:i.number},[i,k,M]),F=`${P.projectId}:${P.host??``}:${P.repository}#${P.number}`,I=s?.projectId===P.projectId&&s.repository.toLowerCase()===P.repository.toLowerCase()&&(P.host===void 0||s.host.toLowerCase()===P.host.toLowerCase())&&s.number===P.number?s:null,[ee,R]=(0,Z.useState)(!1),[B,te]=(0,Z.useState)(0),[U,ie]=(0,Z.useState)(`summary`),[ae,oe]=(0,Z.useState)(`newest`),[ce,le]=(0,Z.useState)(()=>({pullRequestKey:F,oid:null})),de=ce.pullRequestKey===F?ce.oid:null,me=e=>{le({pullRequestKey:F,oid:e})},he=e=>{me(e),ie(`code`)},[ge,_e]=(0,Z.useState)(null),be=e=>{me(null),_e(t=>({path:e,nonce:(t?.nonce??0)+1})),Md(),ie(`code`)},Se=$i(t=>t.openRequestKey===ta(e,P));Se&&U!==`guide`&&ie(`guide`),(0,Z.useEffect)(()=>{Se&&$i.getState().requestOpen(null)},[Se]);let Ce=`${e}:${F}`,[we,Te]=(0,Z.useState)(()=>({key:Ce,tabs:new Set([`summary`])})),De=we.key===Ce?we.tabs:new Set([U]);(0,Z.useEffect)(()=>{Te(e=>e.key===Ce?e.tabs.has(U)?e:{key:Ce,tabs:new Set(e.tabs).add(U)}:{key:Ce,tabs:new Set([U])})},[U,Ce]);let[Oe,je]=(0,Z.useState)(!1),Pe=(0,Z.useRef)({});(0,Z.useEffect)(()=>{je(Pe.current[U]??!1)},[U]);let Le=Oe,ze=(0,Z.useRef)({}),Be=(0,Z.useMemo)(()=>({summary:e=>{ze.current.summary=e},timeline:e=>{ze.current.timeline=e},code:e=>{ze.current.code=e}}),[]),We=(0,Z.useRef)(null),Ke=(0,Z.useRef)(null),Je=(0,Z.useRef)(null);(0,Z.useLayoutEffect)(()=>{let e=Je.current;e!==null&&(Je.current=null,Le&&e.tab===U&&ze.current[U]===e.scroller&&(e.scroller.scrollTop=Math.max(0,e.scroller.scrollTop+e.delta)))},[Le,U]);let Ze=Yi(e=>e.pullRequestMergeMethod),$e=Yi(e=>e.setPullRequestMergeMethod),et=Ea(e,P.projectId),nt=(0,Z.useMemo)(()=>et(),[et]),[rt,it]=(0,Z.useState)(null),at=e=>{it({pullRequestKey:F,method:e})},ot=Dd(F),[st,ct]=(0,Z.useState)(null),lt=Ot(e,a),ut=At(Ur.detail({environmentId:e,input:P})),dt=At(Ur.activity({environmentId:e,input:P})),ft=zr(e),[pt,mt]=(0,Z.useState)(()=>oi(typeof window>`u`?void 0:window.localStorage,e,P));(0,Z.useEffect)(()=>{mt(oi(typeof window>`u`?void 0:window.localStorage,e,P))},[e,F,P.projectId,P.repository,P.number]),(0,Z.useEffect)(()=>{ut.data!==null&&(gi(typeof window>`u`?void 0:window.localStorage,e,P,ut.data),mt(ut.data))},[ut.data,e,F,P.projectId,P.repository,P.number]);let ht=Zr({live:ut.data,cached:pt,reference:P}),gt=(0,Z.useMemo)(()=>I===null?null:Br(I),[I]),_t=(0,Z.useMemo)(()=>ut.data===null?null:{...ut.data,checksState:hr(ut.data.checks)},[ut.data]),vt=Wr(e,P,_t,ut.dataUpdatedAt),yt=(0,Z.useMemo)(()=>Hr(ht,Hr(vt,gt)),[ht,vt,gt]),xt=(0,Z.useMemo)(()=>ht===null||yt===null||yt===ht?ht:{...ht,title:yt.title,state:yt.state,headBranch:yt.headBranch,baseBranch:yt.baseBranch,updatedAt:yt.updatedAt,author:yt.author??ht.author,additions:yt.additions??ht.additions,deletions:yt.deletions??ht.deletions,changedFiles:yt.changedFiles??ht.changedFiles,mergeability:yt.mergeability??ht.mergeability,closedAt:yt.closedAt===void 0?ht.closedAt:yt.closedAt,mergedAt:yt.mergedAt===void 0?ht.mergedAt:yt.mergedAt,isDraft:yt.isDraft??ht.isDraft},[ht,yt]),Tt=dt.data,K=(0,Z.useMemo)(()=>xt===null?null:{...xt,capabilities:lt?xt.capabilities:{...xt.capabilities,reactions:!1,edit:{changeRequest:!1,comment:!1}},viewerPermissions:lt?xt.viewerPermissions:{...xt.viewerPermissions,actions:[],comment:!1,resolve:!1,verdicts:[],requestReviewers:!1,updateMethods:[],labels:!1},author:Tt?.author??xt.author,reviewers:Tt?.reviewers??xt.reviewers,comments:Tt?.comments??[],commentCount:Tt?.commentCount??0,commentsTruncated:Tt?.commentsTruncated??!1,reviewThreads:Tt?.reviewThreads??[],commits:Tt?.commits??[],reactions:Tt?.reactions??[]},[Tt,lt,xt]),Pt=K??yt,Ft=Ie(Dt),{copyToClipboard:It}=St({target:`pull request reference`,onCopy:e=>bt.add({type:`success`,title:`${e} copied`}),onError:(e,t)=>bt.add({type:`error`,title:`Failed to copy ${t}`,description:e.message})}),Lt=(0,Z.useEffectEvent)(e=>{!t||e.defaultPrevented||Ca()||sr(e,Ft,{context:n()})===`pullRequest.copyNumber`&&(e.preventDefault(),e.stopPropagation(),e.repeat||It(`#${P.number}`,`PR number`))});(0,Z.useEffect)(()=>{let e=e=>Lt(e);return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[]),(0,Z.useEffect)(()=>{K?.autoMergeMethod!==void 0&&at(K.autoMergeMethod)},[K?.autoMergeMethod,F]);let Rt=K===null?null:Qe(K.url),zt=Fr.get(K?.provider),Bt=(0,Z.useMemo)(()=>({repositoryUrl:Rt===null?null:zt.referenceAutolinkRepositoryUrl(Rt),threadRef:r}),[zt,Rt,r]),Vt=K?.author&&Rt!==null?zt.authorProfileUrl(K.author.login,Rt):null,Ht=Pt?si(Pt.provider,Pt.number,Pt.headBranch,K?.headRepositoryNameWithOwner,Qe(Pt.url)):ei(P,k),Ut=(0,Z.useCallback)(e=>{bt.add({type:`error`,title:`Could not copy checkout command`,description:e.message})},[]),Wt=At(K===null?null:Nt.listRefs({environmentId:e,input:{cwd:K.workspaceRoot,includeMatchingRemoteRefs:!0,limit:2}})),Gt=K!==null&&Pi(K.baseBranch,Wt.data?.refs??[]),Kt=Cc(e,(0,Z.useMemo)(()=>K===null||K.capabilities.stacks!==!0||!M?null:{...P,host:P.host??tt(K.url)?.host},[K,P,M])),qt=Kt.data,Jt=M&&K?.capabilities.stacks===!0&&K.capabilities.stackActions===!0&&T.get(e)?.environment.capabilities.pullRequestStackActions===!0,Yt=Ai({supportsStackActions:Jt,hasStack:qt!==null,stackPending:!Kt.isFresh,stackError:Kt.error}),Xt=dt.isPending&&Tt===null,Zt=Tt===null?dt.error:null,Qt=(0,Z.useCallback)(()=>{ut.refresh(),dt.refresh(),Kt.refresh()},[dt.refresh,ut.refresh,Kt.refresh]),[$t,en]=(0,Z.useState)(0),tn=$t+(ft??0),nn=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{if(!xt)return;let e={key:Ce,updatedAt:xt.updatedAt};if(ti(nn.current,e)){if(dt.isPending)return;dt.refresh(),en(e=>e+1)}nn.current=e},[dt.isPending,dt.refresh,xt,Ce]),Lc(()=>{ut.refresh()},{key:`pull-request:${e}:${F}`});let rn=jt(Ur.invalidate,{reportFailure:!1}),[an,on]=(0,Z.useState)(!1),sn=an||ut.isPending,cn=(0,Z.useCallback)(async()=>{on(!0);try{await rn({environmentId:e,input:{reference:P}}),Qt(),en(e=>e+1)}finally{on(!1)}},[e,rn,P,Qt]),ln=(0,Z.useRef)(c);(0,Z.useEffect)(()=>{ln.current!==c&&(ln.current=c,cn())},[c,cn]);let un=jt(Ur.runAction,{reportFailure:!1}),dn=jt(Ur.comment,{reportFailure:!1}),[fn,pn]=(0,Z.useState)(null),mn=fn!==null,hn=jt(Ur.update,{reportFailure:!1}),[gn,_n]=(0,Z.useState)(null),vn=gn?.pullRequestKey===F?gn.text:null,[yn,bn]=(0,Z.useState)(!1),xn=Qi(),{environments:Sn}=Ct(),Cn=(0,Z.useMemo)(()=>{let t=E.find(t=>t.id===P.projectId&&t.environmentId===e)?.repositoryIdentity;return Xe(t,P.repository,P.number)},[e,E,P.number,P.projectId,P.repository]),wn=(0,Z.useMemo)(()=>g===`page`?bc({environmentId:e,projectId:P.projectId},E,Sn.map(e=>({environmentId:e.environmentId,label:e.label,machine:p(e.serverConfig)}))):[],[g,e,Sn,E,P.projectId]),[Tn,En]=(0,Z.useState)(null),On=Tn?.pullRequestKey===F?Tn.environmentId:e,An=wn.find(e=>e.environmentId===On)??null,jn=An?.environmentId??e,Mn=An?.workspaceRoot??K?.workspaceRoot??O?.workspaceRoot??null,Nn=Ot(jn,S),Pn=Da({environmentId:jn,cwd:Mn}),Fn=async(t,n,r)=>{u?.(t,`sent`);let i=await un({environmentId:e,input:{...P,action:t,...n?{mergeMethod:n}:{},...r?{updateMethod:r}:{}}});if(pn(null),i._tag===`Failure`){let e=Ge(i),n=r===`rebase`?Ad:kd[t];return bt.add({type:`error`,title:Od[t],description:di(e,n)}),u?.(t,`failed`),!1}return t===`revert`&&bt.add({type:`success`,title:`Revert pull request opened`}),t===`delete-branch`&&bt.add({type:`success`,title:`Branch deleted`}),Ti(t)?cn():Qt(),u?.(t,`done`),!0},In=async(e,t,n)=>!lt||fn!==null?!1:(pn(e),Fn(e,t,n)),Ln=async(t,n)=>!lt||fn!==null?{commentPosted:!1}:(pn(n),(await dn({environmentId:e,input:{...P,body:t}}))._tag===`Failure`?(pn(null),bt.add({type:`error`,title:`Could not post the comment`}),{commentPosted:!1}):(await Fn(n)||Qt(),{commentPosted:!0})),Rn=async t=>{let n=t.trim();if(!lt||K===null||yn)return;if(n.length===0||n===K.title){_n(null);return}bn(!0);let r=await hn({environmentId:e,input:{...P,title:n}});if(bn(!1),r._tag===`Failure`){bt.add({type:`error`,title:`The title could not be saved`,description:di(Ge(r),`The host refused the new title.`)});return}_n(null),Qt()},zn=_??null,Bn=Pn.isAllowed&&Nn,Hn=zn!==null||Bn,Un=ui(zn!==null),Wn=Cd({environmentId:e,reference:P,title:K?.title??null}),Gn=()=>{Wn.write(),Wn.data?.guide??ie(`guide`)},Kn=(e,t)=>{let n=d.getState(),r=n.getComposerDraft(e),i=Fd(e),a=new Set((r?.reviewComments??[]).map(e=>e.id)),o=new Set((t.reviewComments??[]).filter(e=>a.has(e.id)).map(e=>e.id)),s=ai(r?.prompt??``,r?.reviewComments??[],o),c=Fi({prompt:s,lastHandoffPrompt:Pd.get(i)},t.prompt);Pd.set(i,t.prompt),n.setPrompt(e,c),n.setReviewComments(e,yi(r?.reviewComments??[],t.reviewComments??[]));for(let r of t.reviewComments??[])o.has(r.id)&&n.addReviewComment(e,r,{allowDuplicateReference:!0,insertAtCaret:!1})},qn=async(e,t,n)=>{let r=n??await xn(e).then(e=>e,()=>null);return r===null?null:(t===null||Kn(r.draftId,t),r)},Jn=async(t,n,r)=>{if(!K||st!==null)return;if(zn!==null){Kn(zn,n),bt.add({type:`success`,title:`Added to the composer`,description:n.prompt.length>0?`The question is in the composer — read it over, then send.`:`The pull request is in the composer — type your question, then send.`});return}ct(t);let i=z(jn,An?.projectId??K.projectId),a=await qn(i,n);if(ct(null),a!==null&&r?.keepGuide===!0){let t=d.getState().getDraftSession(a.draftId);t!==null&&(Mt.getState().openPullRequest(N(t.environmentId,t.threadId),{environmentId:e,projectId:P.projectId,...P.host===void 0?{}:{host:P.host},repository:P.repository,number:P.number,url:K.url}),$i.getState().requestOpen(ta(e,P)))}if(a===null){bt.add({type:`error`,title:`Could not open a thread`,description:`Try again from the project, or open a thread first.`});return}bt.add({type:`success`,title:`Asked in a thread`,description:n.prompt.length>0?`The question is in the composer — read it over, then send.`:`The pull request is in the composer — type your question, then send.`})},Yn=async(e,t,n=`worktree`)=>{if(!Pt||st!==null)return;if(zn!==null&&t!==null){Kn(zn,t),bt.add({type:`success`,title:`Added to the composer`,description:`The task is in the composer — read it over, then send.`});return}if(Mn===null||!Pn.isAllowed||!kt(jn,`source-control:write`)||n===`worktree`&&!kt(jn,`orchestration:operate`))return;ct(e);let r=bt.add({type:`loading`,title:`Preparing the pull request checkout...`}),i=z(jn,An?.projectId??Pt.projectId),a=await xn(i).then(e=>e,()=>null);if(a===null){ct(null),bt.update(r,{type:`error`,title:`Could not open a thread for the checkout`,description:`Try again from the project, or open a thread first.`});return}let o=await Pn.run({reference:Pt.url,mode:n,threadId:a.threadId});if(o._tag===`Failure`){ct(null);let e=Pn.error instanceof Error?Pn.error.message:null;bt.update(r,{type:`error`,title:`Could not prepare the pull request checkout`,...e?{description:e}:{}});return}if(!await xn(i,{branch:o.value.branch,worktreePath:o.value.worktreePath,envMode:o.value.worktreePath===null?`local`:`worktree`}).then(e=>e!==null,()=>!1)){ct(null),bt.update(r,{type:`error`,title:`Checked out, but the thread stayed where it was`,description:`The checkout is ready on \`${o.value.branch}\`. Point a thread at it from the branch picker, then ask again.`});return}ct(null);let s={type:`warning`,title:`Checked out, but not on the latest commits`,description:`The checkout could not be moved onto the pull request's latest commits, so the code there is older than the pull request. Uncommitted work or local commits keep it where it is.`};if(t===null){bt.update(r,o.value.isOnPullRequestHead?{type:`success`,title:n===`local`?`Checked out here`:`Checked out`,description:n===`local`?`This repository is on the pull request's branch, with a thread open on it.`:`The pull request is in its own worktree, with a thread open on it.`}:s);return}await qn(i,t,a),bt.update(r,o.value.isOnPullRequestHead?{type:`success`,title:`Checkout ready`,description:`The task is in the composer — read it over, then send.`}:s)},Xn=()=>{K&&Jn(`ask`,{...Oi({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,state:K.state,isDraft:K.isDraft})})},Zn=()=>{K&&Jn(`explain`,{...ji({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,state:K.state,isDraft:K.isDraft})})},Qn=(e,t,n)=>{K&&Jn(`guide-stop:${t}`,vi({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,state:K.state,isDraft:K.isDraft,stop:{index:t,title:e.title,summary:e.summary,attention:e.attention?.note??null,excerpts:e.excerpts},question:n}),{keepGuide:!0})},$n=(e,t)=>{K&&Jn(`selection:${e.comment.id}`,wi({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,state:K.state,isDraft:K.isDraft,comment:e.comment,request:e.request}),t)},er=e=>{Pt&&Yn(`checkout:${e}`,null,e)},tr=e=>{K&&Yn(ci(e),bi({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,finding:e}))},nr=()=>{K&&Yn(`findings`,Di({number:K.number,title:K.title,url:K.url,headBranch:K.headBranch,baseBranch:K.baseBranch,reviewThreads:K.reviewThreads,comments:K.comments,checks:kr?[]:K.checks,commentsTruncated:K.commentsTruncated}))},rr=()=>{Pt&&Yn(`conflicts`,{prompt:Si({number:Pt.number,url:Pt.url,headBranch:Pt.headBranch,baseBranch:Pt.baseBranch})})},ir=K?K.capabilities.mergeMethods.filter(e=>K.mergeCapabilities[e]):[],ar=rt?.pullRequestKey===F?rt.method:null,or=hi(ir,ar,nt,Ze),lr=Mi[or],ur=`Auto-merge (${lr.toLowerCase()})`,dr=K?.state===`open`&&K.mergeability===`conflicting`,mr=K?.state===`open`&&K.autoMergeEnabled===!0,gr=K?.autoMergeMethod,_r=gr?`Auto-merge (${Mi[gr].toLowerCase()})`:`Auto-merge`,vr=K?.state===`open`?K.workflowApprovalsRequired??0:0,br=K===null?null:Ii(K),xr=Et(e,e=>e.reviewGuidesEnabled),Sr=jd.filter(e=>(e.value!==`code`||K===null||K.capabilities.diff)&&(e.value!==`guide`||xr));(0,Z.useEffect)(()=>{Sr.some(e=>e.value===U)||ie(`summary`)},[U,Sr]);let Cr=e=>K?.capabilities.actions.includes(e)===!0&&K.viewerPermissions.actions.includes(e),Tr=K?hr(K.checks):null,Dr=yt?.checksState===void 0?Tr:yt.checksState,Or=Dr!==`failing`&&K?.checks.some(e=>e.status===`action-required`)?`pending`:Dr,kr=Or!==Tr,Ar=K?ni({state:K.state,isDraft:K.isDraft,mergeability:K.mergeability,checksState:Or,autoMergeEnabled:K.autoMergeEnabled,hasMergeMethod:ir.length>0,canMerge:Yt&&Cr(`merge`),canMarkReady:Cr(`ready`),canEnableAutoMerge:Yt&&Cr(`enable-auto-merge`)}):null,Nr=K?.state===`open`&&Cr(K.isDraft?`ready`:`draft`)&&!(K.isDraft&&Ar===`ready`),Pr=Yt&&K?.state===`open`&&(mr&&Cr(`disable-auto-merge`)||!mr&&Ar!==`enable-auto-merge`&&!K.isDraft&&!dr&&Cr(`enable-auto-merge`)&&ir.length>0),Ir=Yt&&K?.state===`open`&&(Ar===`enable-auto-merge`||Ar===`auto-merge-armed`)&&Cr(`merge`)&&!K.isDraft&&!dr&&ir.length>0,Lr=K?.state===`open`&&Cr(`merge`)&&!K.isDraft&&!dr&&ir.length>1,Rr=K?fr({state:K.state,isDraft:K.isDraft}):null,Vr=K!==null&&ki(K),Gr=Sn.some(t=>t.environmentId===e&&t.connection.phase===`connected`),Kr=async()=>{K!==null&&await wt()?.dialogs.confirm([`Delete branch ${K.headBranch}?`,`This deletes ${K.headBranch} from ${K.headRepositoryNameWithOwner??K.repository}. Local branches and worktrees are not changed.`].join(`
215
215
  `),{variant:`destructive`})&&In(`delete-branch`)},qr=vr>0&&!kr&&Cr(`approve-workflows`),Jr=kr?Or===null?`No checks reported`:jr(Or).label:K?Mr(K.checks):null,Yr=K&&!K.commentsTruncated?pi(K.comments,K.commits).filter(e=>e.outcome===`approved`&&!e.stale).length:0,Qr=g===`page`?(0,$.jsxs)(L,{children:[(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(Re,{disabled:st!==null||Mn===null,render:(0,$.jsxs)(W,{size:`xs`,variant:`outline`,"aria-label":st?.startsWith(`checkout`)?`Checking out...`:`Check out`,children:[(0,$.jsx)(f,{"aria-hidden":!0,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`@max-[35rem]/pr-header:hidden`,children:st?.startsWith(`checkout`)?`Checking out...`:`Check out`}),(0,$.jsx)(ve,{"aria-hidden":!0,className:`size-3.5 text-muted-foreground`})]})})}),(0,$.jsx)(J,{children:`Check out this pull request`})]}),(0,$.jsxs)(Fe,{align:`end`,side:`bottom`,children:[(0,$.jsxs)(o,{disabled:!Bn,onClick:()=>er(`worktree`),children:[(0,$.jsx)(f,{className:`mt-1 size-3.5 shrink-0 self-start`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,$.jsx)(`span`,{children:`In a separate worktree`}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Its own folder and thread. Nothing you have open moves.`})]})]}),(0,$.jsxs)(o,{disabled:!Pn.isAllowed,onClick:()=>er(`local`),children:[(0,$.jsx)(re,{className:`mt-1 size-3.5 shrink-0 self-start`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,$.jsx)(`span`,{children:`In this repository`}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:"Switches the branch you are working in, like `gh pr checkout`."})]})]}),wn.length>0?(0,$.jsx)(Id,{environments:wn,value:jn,onChange:e=>En({pullRequestKey:F,environmentId:e}),disabled:st!==null}):null]})]}):null,$r=(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`span`,{className:`inline-flex shrink-0`,children:(0,$.jsxs)(W,{size:`xs`,variant:`destructive-outline`,disabled:st!==null||zn===null&&Mn===null,onClick:rr,"aria-label":st===`conflicts`?`Preparing...`:`Resolve conflicts`,children:[(0,$.jsx)(X.conflicting,{"aria-hidden":!0,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`@max-[30rem]/pr-header:hidden`,children:st===`conflicts`?`Preparing...`:`Resolve conflicts`})]})})}),(0,$.jsx)(J,{side:`top`,children:st===`conflicts`?`Preparing...`:`Resolve conflicts`})]});return ut.isPending&&!K?(0,$.jsx)(yl,{seed:I,summary:yt,checkoutCommand:Ht,onCheckoutError:Ut,number:P.number,tabs:Sr,activeTab:U,...x?{onBack:x}:{},...m?{onClose:m}:{},actions:Pt?(0,$.jsxs)(kn,{delay:150,closeDelay:150,timeout:400,children:[Pt.state===`open`&&Pt.mergeability===`conflicting`?$r:null,Qr]}):void 0}):(0,$.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-col bg-background`,children:[ee&&K?(0,$.jsx)(rl,{display:`picker`,environmentId:e,reference:P,url:K.url,threadRef:null,onPickerOpenChange:R},`${e}:${K.url}`):null,(0,$.jsxs)(`div`,{className:G(`@container/pr-header grid min-w-0 shrink-0 grid-cols-[minmax(0,1fr)_auto] items-start gap-x-2`,K&&`border-b border-border/60`,!K&&!m&&`hidden`),children:[(0,$.jsxs)(`div`,{className:`pl-4 grid h-7 min-w-0 items-center overflow-hidden`,children:[(0,$.jsx)(`div`,{"aria-hidden":Le,inert:Le,className:G(`col-start-1 row-start-1 flex min-w-0 items-center gap-1 text-sm text-muted-foreground transition-[opacity,transform] ease-out motion-reduce:transform-none motion-reduce:transition-none sm:text-xs`,Le?`pointer-events-none -translate-y-1 opacity-0 duration-100`:`translate-y-0 opacity-100 delay-50 duration-150`),children:K&&Rr?(0,$.jsxs)($.Fragment,{children:[x?(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(W,{size:`icon-micro`,variant:`ghost-muted`,onClick:x,className:`-ml-1.5`,"aria-label":`Back to this thread's pull requests`,children:(0,$.jsx)(V,{"aria-hidden":!0,className:`size-3.5`})})}),(0,$.jsx)(J,{side:`top`,children:`Back to pull requests`})]}):null,(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:Rt?(0,$.jsx)(`button`,{type:`button`,onClick:()=>void wt()?.shell.openExternal(Rt),className:`min-w-0 cursor-pointer truncate text-left font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,children:K.repository}):(0,$.jsx)(`span`,{className:`min-w-0 truncate font-medium text-muted-foreground`,children:K.repository})}),(0,$.jsx)(J,{side:`top`,children:Rt?`Open ${K.repository} repository`:K.repository})]}),(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsxs)(`button`,{type:`button`,onClick:()=>void wt()?.shell.openExternal(K.url),onContextMenu:e=>Ld(e,K),className:G(`inline-flex shrink-0 cursor-pointer items-center gap-0.5 font-medium underline-offset-2 hover:underline`,Rr.toneClassName),"aria-label":`Open pull request #${K.number} on host`,children:[`#`,K.number,(0,$.jsx)(H,{"aria-hidden":!0,className:`size-2.5`})]})}),(0,$.jsx)(J,{side:`top`,children:kl(zt)})]})]}):null}),(0,$.jsx)(`div`,{"aria-hidden":!Le,inert:!Le,className:G(`col-start-1 row-start-1 flex min-w-0 items-center gap-1 text-sm text-muted-foreground transition-[opacity,transform] ease-out motion-reduce:transform-none motion-reduce:transition-none sm:text-xs`,Le?`translate-y-0 opacity-100 delay-50 duration-150`:`pointer-events-none translate-y-1 opacity-0 duration-100`),children:K&&Rr?(0,$.jsxs)($.Fragment,{children:[x?(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(W,{size:`icon-micro`,variant:`ghost-muted`,tabIndex:Le?0:-1,onClick:x,className:`-ml-1.5`,"aria-label":`Back to this thread's pull requests`,children:(0,$.jsx)(V,{"aria-hidden":!0,className:`size-3.5`})})}),(0,$.jsx)(J,{side:`top`,children:`Back to pull requests`})]}):null,(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsxs)(`button`,{type:`button`,tabIndex:Le?0:-1,onClick:()=>void wt()?.shell.openExternal(K.url),onContextMenu:e=>Ld(e,K),className:G(`inline-flex shrink-0 cursor-pointer items-center gap-0.5 font-medium underline-offset-2 hover:underline`,Rr.toneClassName),"aria-label":`Open pull request #${K.number} on host`,children:[`#`,K.number,(0,$.jsx)(H,{"aria-hidden":!0,className:`size-2.5`})]})}),(0,$.jsx)(J,{side:`top`,children:kl(zt)})]}),(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground`,children:K.title})}),(0,$.jsx)(J,{side:`top`,children:K.title})]})]}):null})]}),(0,$.jsxs)(`div`,{className:`mr-4 flex h-7 shrink-0 items-center justify-end gap-1`,children:[K?(0,$.jsxs)(kn,{delay:150,closeDelay:150,timeout:400,children:[!qt&&Jt&&Kt.error?(0,$.jsx)(W,{variant:`ghost`,size:`xs`,onClick:Kt.refresh,children:`Retry stack lookup`}):null,qt?(0,$.jsx)(Vc,{hostLabel:zt.label,stack:qt,notice:Kt.notice,onRetry:Kt.error?Kt.refresh:void 0,reference:P,environmentId:e,onSelect:C,mergeMethod:or,canMerge:Kt.isFresh&&Jt&&Cr(`merge`)&&ir.length>0,canRebase:Kt.isFresh&&Jt&&K.viewerPermissions.stackRebase===!0,onActed:()=>{Qt(),u?.()}}):null,g===`page`?(0,$.jsx)(rl,{display:`count`,environmentId:e,reference:P,url:K.url,threadRef:null}):null,mr&&Ar!==`auto-merge-armed`?(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsxs)(b,{size:`control`,variant:`info`,role:`img`,"aria-label":_r,children:[(0,$.jsx)(X.merged,{"aria-hidden":!0,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`@max-[30rem]/pr-header:hidden`,children:_r})]})}),(0,$.jsxs)(J,{side:`top`,children:[_r,`: the host will merge this on its own once its requirements are met`]})]}):null,Ar===`resolve`?$r:Ar===`ready`?(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`span`,{className:`inline-flex shrink-0`,children:(0,$.jsxs)(W,{size:`xs`,variant:`default`,disabled:mn,onClick:()=>void In(`ready`),"aria-label":`Ready for review`,children:[(0,$.jsx)(X.pullRequest,{"aria-hidden":!0,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`@max-[30rem]/pr-header:hidden`,children:`Ready for review`})]})})}),(0,$.jsx)(J,{side:`top`,children:`Ready for review`})]}):Ar===`enable-auto-merge`?(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`span`,{className:`inline-flex shrink-0`,children:(0,$.jsxs)(W,{size:`xs`,variant:`default`,disabled:mn,...ot.props(`enable-auto-merge`,()=>void In(`enable-auto-merge`,or)),"aria-label":fn===`enable-auto-merge`?`Enabling...`:ot.isArmed(`enable-auto-merge`)?`Confirm auto-merge?`:ur,children:[ot.isArmed(`enable-auto-merge`)?(0,$.jsx)(D,{"aria-hidden":!0,className:`size-3.5`}):(0,$.jsx)(X.merged,{"aria-hidden":!0,className:`size-3.5`}),(0,$.jsx)(Tc,{className:`@max-[30rem]/pr-header:hidden`,children:(0,$.jsxs)(`span`,{className:`grid`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`invisible col-start-1 row-start-1`,children:ur}),(0,$.jsx)(`span`,{className:`col-start-1 row-start-1`,children:fn===`enable-auto-merge`?`Enabling...`:ot.isArmed(`enable-auto-merge`)?`Confirm auto-merge?`:ur})]})})]})})}),(0,$.jsx)(J,{side:`top`,children:fn===`enable-auto-merge`?`Enabling...`:ot.isArmed(`enable-auto-merge`)?`Confirm auto-merge?`:ur})]}):Ar===`auto-merge-armed`?(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsxs)(b,{size:`control`,variant:`info`,role:`img`,"aria-label":_r,children:[(0,$.jsx)(X.merged,{"aria-hidden":!0,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`@max-[30rem]/pr-header:hidden`,children:_r})]})}),(0,$.jsxs)(J,{side:`top`,children:[_r,`: the host will merge this on its own once its requirements are met`]})]}):Ar===`merge`?(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`span`,{className:`inline-flex shrink-0`,children:(0,$.jsxs)(W,{size:`xs`,variant:`default`,disabled:mn,...ot.props(`merge`,()=>void In(`merge`,or)),"aria-label":fn===`merge`?`Merging...`:ot.isArmed(`merge`)?`Confirm merge?`:lr,children:[ot.isArmed(`merge`)?(0,$.jsx)(D,{"aria-hidden":!0,className:`size-3.5`}):(0,$.jsx)(X.merged,{"aria-hidden":!0,className:`size-3.5`}),(0,$.jsx)(Tc,{className:`@max-[30rem]/pr-header:hidden`,children:(0,$.jsxs)(`span`,{className:`grid`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`invisible col-start-1 row-start-1`,children:lr}),(0,$.jsx)(`span`,{className:`col-start-1 row-start-1`,children:fn===`merge`?`Merging...`:ot.isArmed(`merge`)?`Confirm merge?`:lr})]})})]})})}),(0,$.jsx)(J,{side:`top`,children:fn===`merge`?`Merging...`:ot.isArmed(`merge`)?`Confirm merge?`:lr})]}):(Ar===`merged`||Ar===`closed`)&&Rr!==null?(0,$.jsx)(b,{size:`control`,variant:`outline`,children:(0,$.jsxs)(`span`,{className:G(`flex items-center gap-1`,Rr.toneClassName),children:[(0,$.jsx)(Rr.Icon,{className:`size-3.5`}),Rr.label]})}):null,Qr,(0,$.jsxs)(L,{children:[(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(Re,{render:(0,$.jsx)(W,{"aria-label":sn?`Refreshing pull request`:`More pull request actions`,size:`icon-xs`,variant:`ghost-muted`}),children:sn?(0,$.jsx)(_a,{refreshing:!0,size:`md`}):(0,$.jsx)(Ve,{className:`size-4`})})}),(0,$.jsx)(J,{children:sn?`Refreshing pull request`:`More pull request actions`})]}),(0,$.jsxs)(Fe,{align:`end`,side:`bottom`,children:[(0,$.jsx)(rl,{display:`menu-item`,environmentId:e,reference:P,url:K.url,threadRef:r??(typeof _==`object`?_:null),onPickerOpenChange:R}),(0,$.jsxs)(o,{disabled:sn,onClick:()=>void cn(),children:[(0,$.jsx)(_a,{size:`sm`,refreshing:sn}),`Refresh`]}),(0,$.jsxs)(o,{disabled:st!==null,onClick:Xn,children:[(0,$.jsx)(Ae,{className:`mt-1 size-3.5 shrink-0 self-start`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,$.jsx)(`span`,{children:st===`ask`?`Opening...`:`Ask a question`}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:zn===null?`Opens a thread that knows which pull request you mean.`:`Adds the pull request to this thread's composer.`})]})]}),(0,$.jsxs)(o,{disabled:st!==null,onClick:Zn,children:[(0,$.jsx)(ue,{className:`mt-1 size-3.5 shrink-0 self-start`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,$.jsx)(`span`,{children:st===`explain`?`Opening...`:`Explain this PR`}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`A walk through the diff and what to read closely.`})]})]}),(0,$.jsxs)(o,{disabled:st!==null||!Hn,onClick:nr,children:[(0,$.jsx)(Ue,{className:`size-3.5`}),st===`findings`?`Preparing...`:Un.fixFindings]}),xr&&Wn.canWrite?(0,$.jsxs)(o,{disabled:Wn.running,onClick:Gn,children:[(0,$.jsx)(He,{className:`size-3.5`}),Wn.running?`Writing guide...`:Wn.data?.guide==null?`Write guide`:`Rewrite guide`]}):null,wn.length>0?(0,$.jsx)(Id,{environments:wn,value:jn,onChange:e=>En({pullRequestKey:F,environmentId:e}),disabled:st!==null}):null,(0,$.jsx)(ne,{}),K.state===`open`?(0,$.jsxs)($.Fragment,{children:[Nr?(0,$.jsxs)(o,{disabled:mn,onClick:()=>void In(K.isDraft?`ready`:`draft`),children:[K.isDraft?(0,$.jsx)(X.pullRequest,{className:`size-3.5`}):(0,$.jsx)(X.draft,{className:`size-3.5`}),K.isDraft?`Ready for review`:`Convert to draft`]}):null,Ir?(0,$.jsxs)(o,{closeOnClick:ot.isArmed(`merge`),"aria-label":ot.isArmed(`merge`)?`Confirm merge?`:`Merge now`,disabled:mn,...ot.props(`merge`,()=>void In(`merge`,or)),children:[(0,$.jsx)(X.merged,{className:`size-3.5`}),ot.isArmed(`merge`)?`Confirm merge?`:`Merge now`]}):null,mr&&Cr(`disable-auto-merge`)?(0,$.jsxs)(o,{disabled:mn,onClick:()=>void In(`disable-auto-merge`),children:[(0,$.jsx)(X.merged,{className:`size-3.5`}),`Disable auto-merge`]}):Pr?(0,$.jsxs)(o,{closeOnClick:ot.isArmed(`enable-auto-merge`),"aria-label":ot.isArmed(`enable-auto-merge`)?`Confirm auto-merge?`:`Enable auto-merge`,disabled:mn,...ot.props(`enable-auto-merge`,()=>void In(`enable-auto-merge`,or)),children:[(0,$.jsx)(X.merged,{className:`size-3.5`}),ot.isArmed(`enable-auto-merge`)?`Confirm auto-merge?`:`Enable auto-merge`]}):null,Lr?(0,$.jsxs)($.Fragment,{children:[Nr||Ir||Pr?(0,$.jsx)(ne,{}):null,(0,$.jsx)(Ee,{value:or,onValueChange:e=>{let t=e;at(t),$e(t)},children:ir.map(e=>(0,$.jsx)(Ne,{value:e,disabled:mn,closeOnClick:!0,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(X.merged,{className:`size-3.5`}),(0,$.jsx)(`span`,{children:Mi[e]})]})},e))})]}):null,Xr(Nr,Pr||Ir,Lr)?(0,$.jsx)(ne,{}):null]}):null,(0,$.jsxs)(o,{onClick:()=>void wt()?.shell.openExternal(K.url),children:[(0,$.jsx)(se,{className:`size-3.5`}),kl(zt)]}),(0,$.jsxs)(o,{onClick:()=>It(K.url,`PR link`),children:[(0,$.jsx)(j,{className:`size-3.5`}),`Copy link`,(0,$.jsx)(ke,{children:cr(Ft,`thread.copyReference`)})]}),(0,$.jsxs)(o,{onClick:()=>It(`#${P.number}`,`PR number`),children:[(0,$.jsx)(A,{className:`size-3.5`}),`Copy PR number`,(0,$.jsx)(ke,{children:cr(Ft,`pullRequest.copyNumber`)})]}),K.state===`open`&&Cr(`close`)?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ne,{}),(0,$.jsxs)(o,{closeOnClick:ot.isArmed(`close`),"aria-label":ot.isArmed(`close`)?`Confirm close?`:`Close pull request`,variant:`destructive`,disabled:mn,...ot.props(`close`,()=>void In(`close`)),children:[(0,$.jsx)(X.closed,{className:`size-3.5`}),ot.isArmed(`close`)?`Confirm close?`:`Close pull request`]})]}):K.state===`closed`&&Cr(`reopen`)?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ne,{}),(0,$.jsxs)(o,{disabled:mn,onClick:()=>void In(`reopen`),children:[(0,$.jsx)(X.reopen,{className:`size-3.5`}),`Reopen pull request`]})]}):K.state===`merged`&&Cr(`revert`)?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ne,{}),(0,$.jsxs)(o,{closeOnClick:ot.isArmed(`revert`),"aria-label":ot.isArmed(`revert`)?`Confirm revert?`:`Revert changes`,variant:ot.isArmed(`revert`)?`destructive`:`default`,disabled:mn,...ot.props(`revert`,()=>void In(`revert`)),children:[(0,$.jsx)(Me,{className:`size-3.5`}),ot.isArmed(`revert`)?`Confirm revert?`:`Revert changes`]})]}):null,Vr?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ne,{}),(0,$.jsxs)(o,{variant:`destructive`,disabled:mn||!Gr,onClick:()=>void Kr(),children:[(0,$.jsx)(v,{className:`mt-1 size-3.5 shrink-0 self-start`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,$.jsx)(`span`,{children:fn===`delete-branch`?`Deleting branch...`:`Delete branch`}),(0,$.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:Gr?K.headBranch:`Reconnect to delete this branch`})]})]})]}):null]})]})]}):null,m?(0,$.jsx)(W,{size:`icon-xs`,variant:`ghost`,"aria-label":`Collapse pull request panel`,onClick:m,children:(0,$.jsx)(y,{className:`size-3.5`})}):null]}),(0,$.jsx)(`div`,{className:G(`col-span-2 grid`,Le?`grid-rows-[1fr]`:`grid-rows-[0fr] transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none`),children:(0,$.jsx)(`div`,{ref:Ke,className:G(`min-h-0 overflow-hidden transition-[opacity,transform] duration-150 ease-out motion-reduce:transform-none motion-reduce:transition-none`,Le?`translate-y-0 opacity-100 delay-50`:`translate-y-1 opacity-0 duration-100`),inert:!Le,children:K?(0,$.jsx)(`div`,{className:`col-span-2 min-w-0 px-4 pb-2 pt-1`,children:(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 shrink items-center gap-1.5 overflow-hidden text-xs text-muted-foreground`,children:[(0,$.jsx)(Er,{actor:K.author,profileUrl:Vt,variant:`avatar`,className:`shrink-0`}),(0,$.jsx)(`span`,{className:`shrink-0`,children:Dn(K.updatedAt)})]}),(0,$.jsx)(`span`,{"aria-hidden":!0,className:`h-3 w-px shrink-0 bg-border/70`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5 font-mono text-2xs text-muted-foreground/65`,children:[br?(0,$.jsxs)(Rd,{baseBranch:K.baseBranch,freshness:br,pending:mn,onUpdate:e=>void In(`update-branch`,void 0,e),iconClassName:`size-3`,className:`max-w-[40%]`,children:[Gt?(0,$.jsx)(X.stack,{"aria-label":`Stacked pull request`,className:`size-3 shrink-0`}):null,(0,$.jsx)(`code`,{className:`flex min-w-0`,children:(0,$.jsx)(ma,{value:K.baseBranch,showTitle:!1})})]}):(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-[40%] shrink-0 items-center gap-1`,children:[Gt?(0,$.jsx)(X.stack,{"aria-label":`Stacked pull request`,className:`size-3 shrink-0`}):null,(0,$.jsx)(`code`,{className:`flex min-w-0`,children:(0,$.jsx)(ma,{value:K.baseBranch,showTitle:!1})})]})}),(0,$.jsx)(J,{side:`top`,children:Gt?`Stacked on ${K.baseBranch}`:K.baseBranch})]}),(0,$.jsx)(V,{"aria-label":`receives changes from`,className:`size-3 shrink-0 opacity-60`}),(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`code`,{className:`flex min-w-0 flex-1`,children:(0,$.jsx)(ma,{value:K.headBranch,showTitle:!1})})}),(0,$.jsx)(J,{side:`top`,children:K.headBranch})]})]}),(0,$.jsxs)(`span`,{className:`ml-auto inline-flex shrink-0 items-center justify-end gap-2 text-2xs`,children:[(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 tabular-nums`,"aria-label":`${K.changedFiles.toLocaleString()} changed ${K.changedFiles===1?`file`:`files`}`,children:[(0,$.jsx)(xe,{"aria-hidden":!0,className:`size-3`}),K.changedFiles.toLocaleString()]}),(0,$.jsx)($c,{environmentId:e,reference:P,additions:K.additions,deletions:K.deletions,className:`shrink-0 font-mono text-2xs`,eager:!0})]})]})}):null})}),(0,$.jsx)(`div`,{className:G(`col-span-2 grid`,Le?`grid-rows-[0fr]`:`grid-rows-[1fr] transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none`),children:(0,$.jsx)(`div`,{ref:We,className:G(`min-h-0 overflow-hidden transition-[opacity,transform] duration-150 ease-out motion-reduce:transform-none motion-reduce:transition-none`,Le?`-translate-y-1 opacity-0 duration-100`:`translate-y-0 opacity-100 delay-50`),inert:Le,children:K?(0,$.jsx)(cl,{title:vn===null?(0,$.jsxs)(ll,{className:`group gap-1`,children:[(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`h1`,{className:`min-w-0 flex-1 truncate text-base font-semibold leading-snug`,children:K.title})}),(0,$.jsx)(J,{side:`top`,children:K.title})]}),Cs(K)?(0,$.jsx)(Es,{"aria-label":`Edit title`,onClick:()=>_n({pullRequestKey:F,text:K.title})}):null]}):(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(Vn,{autoFocus:!0,size:`sm`,disabled:yn,value:vn,"aria-label":`Pull request title`,onChange:e=>_n({pullRequestKey:F,text:e.target.value}),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),Rn(vn)):e.key===`Escape`&&(e.preventDefault(),_n(null))}}),(0,$.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,$.jsx)(W,{size:`xs`,variant:`ghost`,disabled:yn,onClick:()=>_n(null),children:`Cancel`}),(0,$.jsx)(W,{size:`xs`,variant:`outline`,disabled:!lt||yn||vn.trim().length===0,onClick:()=>void Rn(vn),children:yn?`Saving...`:`Save`})]})]}),author:(0,$.jsx)(Er,{actor:K.author,profileUrl:Vt}),updated:(0,$.jsxs)(`span`,{children:[`updated `,Dn(K.updatedAt)]}),checkout:Ht?(0,$.jsx)(fl,{value:Ht,target:`pull request checkout command`,copyLabel:`Copy checkout command`,copiedLabel:`Checkout command copied`,className:`ml-auto font-mono`,tooltipSide:`bottom`,onError:Ut},Ht):null,base:br?(0,$.jsxs)(Rd,{baseBranch:K.baseBranch,freshness:br,pending:mn,onUpdate:e=>void In(`update-branch`,void 0,e),className:`max-w-[40%]`,children:[Gt?(0,$.jsx)(X.stack,{"aria-label":`Stacked pull request`,className:`size-3 shrink-0`}):null,(0,$.jsx)(`code`,{className:`flex min-w-0`,children:(0,$.jsx)(ma,{value:K.baseBranch,showTitle:!1})})]}):(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-[40%] shrink-0 items-center gap-1`,children:[Gt?(0,$.jsx)(X.stack,{"aria-label":`Stacked pull request`,className:`size-3 shrink-0`}):null,(0,$.jsx)(`code`,{className:`flex min-w-0`,children:(0,$.jsx)(ma,{value:K.baseBranch,showTitle:!1})})]})}),(0,$.jsx)(J,{side:`top`,children:Gt?`Stacked on ${K.baseBranch}`:K.baseBranch})]}),head:(0,$.jsx)(fl,{value:K.headBranch,target:`branch name`,copyLabel:`Copy pull request branch`,copiedLabel:`Branch name copied`},K.headBranch),files:`${K.changedFiles.toLocaleString()} ${K.changedFiles===1?`file`:`files`}`,diffStat:(0,$.jsx)($c,{environmentId:e,reference:P,additions:K.additions,deletions:K.deletions,className:`shrink-0 font-mono text-xs`,eager:!0})}):null})}),K?(0,$.jsx)(ul,{tabs:Sr,value:U,onValueChange:ie,onTabIntent:e=>{e===`code`&&Md()},children:U===`summary`?qr?(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`span`,{className:`ml-auto inline-flex shrink-0`,children:(0,$.jsxs)(W,{size:`xs`,variant:`warning-outline`,disabled:mn,...ot.props(`approve-workflows`,()=>void In(`approve-workflows`)),"aria-label":fn===`approve-workflows`?`Approving...`:ot.isArmed(`approve-workflows`)?`Confirm approve?`:`Approve workflows to run`,children:[(0,$.jsx)(h,{"aria-hidden":!0,className:`size-3.5`}),(0,$.jsxs)(`span`,{className:`inline-grid`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`invisible col-start-1 row-start-1`,children:`Approve workflows to run`}),(0,$.jsx)(`span`,{"aria-hidden":!0,className:`invisible col-start-1 row-start-1`,children:`Confirm approve?`}),(0,$.jsx)(`span`,{className:`col-start-1 row-start-1`,children:fn===`approve-workflows`?`Approving...`:ot.isArmed(`approve-workflows`)?`Confirm approve?`:`Approve workflows to run`})]})]})})}),(0,$.jsx)(J,{side:`top`,children:fn===`approve-workflows`?`Approving...`:ot.isArmed(`approve-workflows`)?`Confirm approve?`:`Approve workflows to run`})]}):(0,$.jsx)(dl,{className:`text-muted-foreground`,"aria-label":Jr?`Checks: ${Jr}`:`Checks`,icon:Or===null?(0,$.jsx)(l,{"aria-hidden":!0,className:`size-3.5`}):(0,$.jsx)(Vu,{checks:K.checks,stale:kr,checksState:Or,threadRef:r}),label:Jr}):U===`timeline`?(0,$.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-2 text-xs text-muted-foreground`,children:[(0,$.jsxs)(yr,{className:G(`whitespace-nowrap text-2xs transition-opacity`,(Xt||Zt)&&`opacity-35`),children:[(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1`,"aria-label":Zt?`Comments unavailable`:`${K.commentCount.toLocaleString()} ${K.commentCount===1?`comment`:`comments`}`,children:[(0,$.jsx)(fe,{"aria-hidden":!0,className:`size-3`}),Zt?`—`:Xt?`…`:K.commentCount.toLocaleString()]}),(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1`,"aria-label":Zt?`Commits unavailable`:`${K.commits.length.toLocaleString()} ${K.commits.length===1?`commit`:`commits`}`,children:[(0,$.jsx)(ye,{"aria-hidden":!0,className:`size-3`}),Zt?`—`:Xt?`…`:K.commits.length.toLocaleString()]}),Yr>0?(0,$.jsxs)(`span`,{className:G(`inline-flex items-center gap-1`,pr(`approved`)),children:[(0,$.jsx)(wr,{outcome:`approved`,className:`size-3`}),Yr.toLocaleString(),(0,$.jsx)(`span`,{className:`sr-only`,children:Yr===1?`approval`:`approvals`})]}):null]}),(0,$.jsxs)(W,{size:`xs`,variant:`ghost-muted`,"aria-label":ae===`newest`?`Show oldest activity first`:`Show newest activity first`,onClick:()=>oe(e=>e===`newest`?`oldest`:`newest`),children:[(0,$.jsx)(pe,{"aria-hidden":!0,className:`size-3`}),ae===`newest`?`Newest first`:`Oldest first`]})]}):null}):null]}),(0,$.jsx)(`div`,{className:`relative flex min-h-0 flex-1 flex-col overflow-hidden`,onScrollCapture:e=>{let t=ze.current[U];if(e.target!==t||t==null)return;let n=t.scrollTop;je(e=>{let r=e,i=We.current?.scrollHeight??0,a=i-(Ke.current?.scrollHeight??0);return e?n<4&&i>0&&(r=!1):i>0&&n>i+32&&(Je.current={tab:U,scroller:t,delta:-a},r=!0),Pe.current[U]=r,r})},children:ut.error&&!K?(0,$.jsx)(Ol,{...fi(ut.failure)?{title:`Pull request #${P.number} not found`,error:`It may be an issue rather than a pull request, or this account can't see it.`}:{error:ut.error},refreshing:ut.isPending,onRetry:Qt,...Cn?{gitHubUrl:Cn}:{}}):K?(0,$.jsxs)(qs,{value:Bt,children:[De.has(`summary`)?(0,$.jsx)(`div`,{className:G(`absolute inset-0`,U!==`summary`&&`invisible`),children:(0,$.jsx)(fu,{scrollerRef:Be.summary,environmentId:e,threadRef:r,reference:P,detail:K,activityPending:Xt,checksStale:kr,activityError:Zt,pendingFinding:st,fixFindingLabel:Un.fixFinding,fixCheckLabel:Un.fixCheck,...Hn?{onFixFinding:tr}:{},onRefresh:Qt,onRefreshChecks:cn})}):null,De.has(`guide`)?(0,$.jsx)(`div`,{className:G(`absolute inset-0`,U!==`guide`&&`invisible`),children:(0,$.jsx)(wd,{environmentId:e,reference:P,active:U===`guide`,title:K.title,workspaceRoot:K.workspaceRoot,canComment:K.capabilities.review.inlineComment&&K.viewerPermissions.comment,onAskAboutLines:(e,t)=>$n({comment:e,request:t},{keepGuide:!0}),onAskAboutStop:Qn,onFinishReview:K.capabilities.review.verdicts.some(e=>K.viewerPermissions.verdicts.includes(e))?()=>te(e=>e+1):null,onOpenFile:be,onTourShown:w})}):null,De.has(`timeline`)?(0,$.jsx)(`div`,{className:G(`absolute inset-0`,U!==`timeline`&&`invisible`),children:Xt?(0,$.jsx)(Cl,{}):Zt?(0,$.jsx)(Dl,{error:Zt,onRetry:dt.refresh}):(0,$.jsx)(Fu,{scrollerRef:Be.timeline,detail:K,environmentId:e,threadRef:r,reference:P,order:ae,onOpenCommit:he,onRefresh:Qt})}):null,De.has(`code`)?(0,$.jsx)(`div`,{className:G(`absolute inset-0`,U!==`code`&&`invisible`),children:(0,$.jsx)(Z.Suspense,{fallback:(0,$.jsx)(Po,{label:`Loading pull request diff...`}),children:(0,$.jsx)(Nd,{scrollerRef:Be.code,onAddToAgentSelection:$n,environmentId:e,reference:P,detail:K,selectedCommitOid:de,onSelectedCommitChange:me,pendingFinding:st,fixFindingLabel:Un.fixFinding,...Hn?{onFixFinding:tr}:{},onRefresh:Qt,refreshToken:tn,revealRequest:ge})})}):null]}):null}),K?(0,$.jsx)(`div`,{className:`absolute right-4 bottom-3 z-20`,children:(0,$.jsx)(Bl,{environmentId:e,reference:P,detail:K,actionPending:mn,onCommentAction:Ln,onCommented:Qt,onReviewSubmitted:Qt,openReviewRequest:B},JSON.stringify([e,P.projectId,P.host,P.repository,P.number]))}):null]})}function Bd(e){let t=(0,Q.c)(36),{entry:n,hostActions:r,visible:i,onActed:a,closing:o,sweeping:s,onCloseSweepStart:c}=e,l=o!==void 0&&o,u=s!==void 0&&s,d;t[0]===n.environmentId?d=t[1]:(d=Ur.runAction.permissionAtom(n.environmentId),t[0]=n.environmentId,t[1]=d);let f=Ie(d),p=Ea(n.environmentId,n.projectId),m;t[2]!==n.host||t[3]!==n.number||t[4]!==n.projectId||t[5]!==n.repository?(m={projectId:n.projectId,host:n.host,repository:n.repository,number:n.number},t[2]=n.host,t[3]=n.number,t[4]=n.projectId,t[5]=n.repository,t[6]=m):m=t[6];let h=m,g;t[7]!==n||t[8]!==a?(g=e=>a?.({entry:n,action:e}),t[7]=n,t[8]=a,t[9]=g):g=t[9];let _;t[10]===p?_=t[11]:(_=e=>{let t=e.capabilities.mergeMethods.filter(t=>e.mergeCapabilities[t]);if(t.length===0)throw Error(`No merge method is available for this repository.`);return hi(t,null,p(),Yi.getState().pullRequestMergeMethod)},t[10]=p,t[11]=_);let v;t[12]!==n.environmentId||t[13]!==h||t[14]!==g||t[15]!==_?(v={environmentId:n.environmentId,reference:h,onSuccess:g,resolveMergeMethod:_},t[12]=n.environmentId,t[13]=h,t[14]=g,t[15]=_,t[16]=v):v=t[16];let{actionPending:y,perform:b}=Oa(v),x,S;if(t[17]!==y||t[18]!==f||t[19]!==l||t[20]!==n||t[21]!==r||t[22]!==c||t[23]!==b||t[24]!==u||t[25]!==i){S=Symbol.for(`react.early_return_sentinel`);bb0:{let e=Vr(n,r),a=y||l||u;if(e.length===0){S=null;break bb0}let o=i||a?`flex`:`none`,s;t[28]===o?s=t[29]:(s={display:o},t[28]=o,t[29]=s);let d;t[30]!==a||t[31]!==f||t[32]!==n||t[33]!==c||t[34]!==b?(d=e=>{let t=Vd[e].label,r=Vd[e].Icon;return(0,$.jsxs)(Y,{children:[(0,$.jsxs)(q,{render:(0,$.jsx)(W,{variant:e===`close`?`destructive-outline`:`outline`,size:`xs`,disabled:!f||a||e===`merge`&&n.stack!==void 0,"aria-label":`${t} #${n.number}`,onClick:()=>void b(e),onPointerDown:t=>{e===`close`&&t.isPrimary&&t.button===0&&(t.stopPropagation(),c?.(n,t.nativeEvent))}}),children:[a?(0,$.jsx)(yt,{size:`xs`}):(0,$.jsx)(r,{"aria-hidden":!0,className:`size-3`}),t]}),(0,$.jsx)(J,{children:e===`merge`&&n.stack?`Open this pull request to merge its stack`:e===`close`&&c?`Close immediately, or drag across rows to close several`:`${t} immediately`})]},e)},t[30]=a,t[31]=f,t[32]=n,t[33]=c,t[34]=b,t[35]=d):d=t[35],x=(0,$.jsx)(`div`,{className:`shrink-0 items-center gap-1 pr-3`,style:s,role:`group`,"aria-label":`Quick actions for pull request #${n.number}`,"data-pull-request-action-pending":y||l,children:e.map(d)})}t[17]=y,t[18]=f,t[19]=l,t[20]=n,t[21]=r,t[22]=c,t[23]=b,t[24]=u,t[25]=i,t[26]=x,t[27]=S}else x=t[26],S=t[27];return S===Symbol.for(`react.early_return_sentinel`)?x:S}var Vd={close:{label:`Close`,Icon:X.closed},merge:{label:`Merge`,Icon:X.merged},ready:{label:`Ready for review`,Icon:X.pullRequest},reopen:{label:`Reopen`,Icon:X.reopen}},Hd=`group/pr-row flex w-full items-center gap-2 rounded-md py-1 pr-1 text-left`,Ud=`shrink-0 font-mono text-xs tabular-nums text-muted-foreground`;function Wd(e){let t=(0,Q.c)(23),{state:n,isDraft:r,mergeability:i,baseBranch:a,below:o,className:s}=e,c;t[0]===s?c=t[1]:(c=G(`flex w-4 shrink-0 flex-col items-center gap-0.5`,s),t[0]=s,t[1]=c);let l;t[2]!==r||t[3]!==n?(l=(0,$.jsx)(xr,{state:n,isDraft:r}),t[2]=r,t[3]=n,t[4]=l):l=t[4];let u;t[5]===i?u=t[6]:(u=i===void 0?{}:{mergeability:i},t[5]=i,t[6]=u);let d;t[7]===a?d=t[8]:(d=a===void 0?{}:{baseBranch:a},t[7]=a,t[8]=d);let f;t[9]!==r||t[10]!==n||t[11]!==u||t[12]!==d?(f=(0,$.jsx)(`span`,{className:`absolute -right-1 -bottom-1 inline-flex`,children:(0,$.jsx)(vr,{state:n,isDraft:r,...u,...d,className:`size-3 fill-background [stroke-width:2.5]`})}),t[9]=r,t[10]=n,t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;t[14]!==l||t[15]!==f?(p=(0,$.jsxs)(`span`,{className:`relative inline-flex`,children:[l,f]}),t[14]=l,t[15]=f,t[16]=p):p=t[16];let m;t[17]===o?m=t[18]:(m=o?(0,$.jsx)(`span`,{className:`inline-flex text-2xs`,children:o}):null,t[17]=o,t[18]=m);let h;return t[19]!==c||t[20]!==p||t[21]!==m?(h=(0,$.jsxs)(`span`,{className:c,children:[p,m]}),t[19]=c,t[20]=p,t[21]=m,t[22]=h):h=t[22],h}function Gd(e){let t=(0,Q.c)(22),{number:n,title:r,status:i,signals:a,meta:o,metaClassName:s,updatedAt:c}=e,l;t[0]===r?l=t[1]:(l=(0,$.jsx)(`span`,{className:`min-w-0 truncate text-sm`,children:r}),t[0]=r,t[1]=l);let u;t[2]===a?u=t[3]:(u=a?(0,$.jsx)(`span`,{className:`flex shrink-0 items-center gap-1 text-2xs`,children:a}):null,t[2]=a,t[3]=u);let d;t[4]===i?d=t[5]:(d=i?(0,$.jsx)(`span`,{className:`ml-auto flex shrink-0 items-center gap-1.5 text-2xs`,children:i}):null,t[4]=i,t[5]=d);let f;t[6]!==n||t[7]!==l||t[8]!==u||t[9]!==d?(f=(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[n,l,u,d]}),t[6]=n,t[7]=l,t[8]=u,t[9]=d,t[10]=f):f=t[10];let p;t[11]===s?p=t[12]:(p=G(`flex min-w-0 items-center gap-1.5 overflow-hidden text-2xs text-muted-foreground`,s),t[11]=s,t[12]=p);let m;t[13]===c?m=t[14]:(m=c?(0,$.jsx)(`span`,{className:`ml-auto shrink-0 whitespace-nowrap tabular-nums`,children:Dn(c)}):null,t[13]=c,t[14]=m);let h;t[15]!==o||t[16]!==p||t[17]!==m?(h=(0,$.jsxs)(`span`,{className:p,children:[o,m]}),t[15]=o,t[16]=p,t[17]=m,t[18]=h):h=t[18];let g;return t[19]!==f||t[20]!==h?(g=(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[f,h]}),t[19]=f,t[20]=h,t[21]=g):g=t[21],g}function Kd(e){let t=(0,Q.c)(20),{actor:n,className:r,labelClassName:i}=e,a=n?.login??`ghost`,o;t[0]===r?o=t[1]:(o=G(`inline-flex min-w-0 items-center gap-1`,r),t[0]=r,t[1]=o);let s;t[2]===o?s=t[3]:(s=(0,$.jsx)(`span`,{className:o}),t[2]=o,t[3]=s);let c;t[4]===n?c=t[5]:(c=(0,$.jsx)(gr,{actor:n,className:`size-3.5`}),t[4]=n,t[5]=c);let l;t[6]===i?l=t[7]:(l=G(`truncate`,i),t[6]=i,t[7]=l);let u;t[8]!==a||t[9]!==l?(u=(0,$.jsx)(`span`,{className:l,children:a}),t[8]=a,t[9]=l,t[10]=u):u=t[10];let d;t[11]!==s||t[12]!==c||t[13]!==u?(d=(0,$.jsxs)(q,{render:s,children:[c,u]}),t[11]=s,t[12]=c,t[13]=u,t[14]=d):d=t[14];let f=n?.name&&n.name!==a?`${n.name} (@${a})`:a,p;t[15]===f?p=t[16]:(p=(0,$.jsx)(J,{side:`top`,children:f}),t[15]=f,t[16]=p);let m;return t[17]!==d||t[18]!==p?(m=(0,$.jsxs)(Y,{children:[d,p]}),t[17]=d,t[18]=p,t[19]=m):m=t[19],m}function qd(e){let t=(0,Q.c)(8),{head:n,base:r}=e,i;t[0]===n?i=t[1]:(i=(0,$.jsx)(ma,{value:n}),t[0]=n,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(`span`,{className:`shrink-0`,children:`→`}),t[2]=a):a=t[2];let o;t[3]===r?o=t[4]:(o=(0,$.jsx)(ma,{value:r,className:`max-w-[45%] shrink-0`}),t[3]=r,t[4]=o);let s;return t[5]!==i||t[6]!==o?(s=(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 font-mono`,children:[i,a,o]}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s}var Jd=[`[data-slot="dialog-popup"]`,`[data-slot="alert-dialog-popup"]`,`[data-slot="command-dialog-popup"]`,`[data-slot="menu-popup"]`,`[data-slot="select-popup"]`,`[data-slot="popover-popup"]`,`[data-slot="combobox-popup"]`,`[data-slot="autocomplete-popup"]`].join(`,`),Yd={browser:`Only available in the desktop app.`,terminal:`Available when a project is open.`,files:`Available when a project is open.`,diff:`Available for Git repositories.`,pullRequest:`No pull request on this branch yet.`,pullRequests:`No linked pull requests available.`,device:`Available from a thread.`},Xd=1,Zd=[ya,wa];function Qd(e){return e?.querySelector(`[data-slot="scroll-area-viewport"]`)??null}function $d(e,t){return e.kind!==`preview`||!e.resourceId?null:t[e.resourceId]?.tabId??null}function ef(e){return{label:e.overlay?.audioMuted??!1?`Unmute tab`:`Mute tab`,disabled:e.overlay===null||!e.canResolveRuntimeTabId}}function tf(e){return e?.audible?e.audioMuted?`muted`:`audible`:`none`}function nf(e,t){return t.defaultPrevented||t.isComposing||t.metaKey||t.ctrlKey||t.altKey?null:e.find(e=>e.available&&e.shortcut.toLowerCase()===t.key.toLowerCase())??null}function rf(e){return e?.closest(`input, textarea, select, [contenteditable]:not([contenteditable="false"])`)!=null}function af(e){let t=(0,Q.c)(7),n;t[0]===e.trigger?n=t[1]:(n=(0,$.jsx)(q,{render:e.trigger}),t[0]=e.trigger,t[1]=n);let r;t[2]===e.reason?r=t[3]:(r=(0,$.jsx)(J,{side:`top`,children:e.reason}),t[2]=e.reason,t[3]=r);let i;return t[4]!==n||t[5]!==r?(i=(0,$.jsxs)(Y,{children:[n,r]}),t[4]=n,t[5]=r,t[6]=i):i=t[6],i}function of(e){let t=(0,Q.c)(14),[n,r]=(0,Z.useState)(-1),i=[{label:`Browser`,icon:_,shortcut:`B`,available:e.browserAvailable,disabledReason:Yd.browser,onClick:e.onAddBrowser},{label:`Terminal`,icon:ge,shortcut:`T`,available:e.terminalAvailable,disabledReason:Yd.terminal,onClick:e.onAddTerminal},{label:`Files`,icon:de,shortcut:`F`,available:e.filesAvailable,disabledReason:Yd.files,onClick:e.onAddFiles},...e.onAddDesign?[{label:`Design`,icon:E,shortcut:`G`,available:e.filesAvailable,disabledReason:`Open a project to use Design.`,onClick:e.onAddDesign}]:[],{label:`Diff`,icon:xe,shortcut:`D`,available:e.diffAvailable,disabledReason:Yd.diff,onClick:e.onAddDiff},{label:`Pull request`,icon:X.pullRequest,shortcut:`P`,available:e.pullRequestAvailable,disabledReason:Yd.pullRequest,onClick:e.onAddPullRequest},{label:`Linked pull requests`,icon:X.link,shortcut:`L`,available:e.pullRequestsAvailable,disabledReason:Yd.pullRequests,onClick:e.onAddPullRequests},{label:`Device`,description:`Watch an iOS Simulator or Android Emulator.`,icon:B,shortcut:`M`,available:e.deviceAvailable,disabledReason:Yd.device,onClick:e.onAddDevice}],a=i.filter(uf),s=a.length===0?-1:Math.min(n,a.length-1),c=(0,Z.useRef)(a);(0,Z.useEffect)(()=>{c.current=a});let l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=[],t[0]=l):l=t[0],(0,Z.useEffect)(()=>{let e=e=>{let t=nf(c.current,e);if(!t||document.querySelector(Jd))return;let n=e.composedPath()[0]??e.target;n instanceof Element&&rf(n)||(e.preventDefault(),e.stopPropagation(),t.onClick())};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},l);let u=e=>{if(!(e.defaultPrevented||e.metaKey||e.ctrlKey||e.altKey)&&a.length!==0){if(e.key===`ArrowDown`||e.key===`ArrowRight`){e.preventDefault(),r((s+1)%a.length);return}if(e.key===`ArrowUp`||e.key===`ArrowLeft`){e.preventDefault(),r(s===-1?a.length-1:(s-1+a.length)%a.length);return}if(e.key===`Enter`){if(e.target!==e.currentTarget)return;let t=a[s];if(!t)return;e.preventDefault(),t.onClick()}}},d=lf,f=e=>s!==-1&&a[s]===e,p=cf,m;t[1]===a?m=t[2]:(m=a.map(sf),t[1]=a,t[2]=m);let h=m.join(``),g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`h3`,{className:`mb-3 font-medium text-foreground text-sm`,children:`Tools`}),t[3]=g):g=t[3];let v=i.map(t=>t.available?(0,$.jsxs)(`div`,{className:`group relative`,onMouseEnter:()=>r(a.indexOf(t)),onMouseLeave:()=>r(e=>e===a.indexOf(t)?-1:e),children:[(0,$.jsxs)(`button`,{type:`button`,onClick:t.onClick,className:G(`flex h-10 w-full cursor-pointer items-center gap-3 rounded-lg bg-card px-3.5 text-left text-sm transition-colors group-hover:bg-card/60`,f(t)&&`bg-card/60`),children:[p(t,`size-4`),(0,$.jsx)(`span`,{className:G(`min-w-0 flex-1 truncate`,t.label===`Browser`&&e.browserProfiles.length>1&&`pr-8`),children:t.label}),(0,$.jsx)(la,{variant:`pill`,children:t.shortcut})]}),t.label===`Browser`&&e.browserProfiles.length>1?(0,$.jsxs)(L,{children:[(0,$.jsx)(Re,{render:(0,$.jsx)(W,{"aria-label":`Open browser in a profile`,className:`absolute top-1/2 right-10 -translate-y-1/2`,size:`icon-xs`,variant:`ghost-muted`}),children:(0,$.jsx)(ve,{className:`size-3.5`})}),(0,$.jsx)(Fe,{align:`end`,side:`bottom`,sideOffset:6,className:`max-w-56`,children:e.browserProfiles.map(t=>(0,$.jsx)(o,{onClick:()=>e.onAddBrowserInProfile(t.id),children:(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:t.name})},t.id))})]}):null]},t.label):(0,$.jsx)(af,{reason:t.disabledReason,trigger:(0,$.jsxs)(`div`,{tabIndex:0,"aria-disabled":`true`,className:`flex h-10 w-full cursor-default items-center gap-3 rounded-lg bg-card px-3.5 text-left text-sm opacity-50`,children:[p(t,`size-4`),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t.label}),(0,$.jsx)(la,{variant:`pill`,children:t.shortcut})]})},t.label)),y;t[4]===v?y=t[5]:(y=(0,$.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(14rem,1fr))] gap-x-3 gap-y-2`,children:v}),t[4]=v,t[5]=y);let b;t[6]!==y||t[7]!==g?(b=(0,$.jsxs)(`div`,{className:`w-full max-w-3xl`,children:[g,y]}),t[6]=y,t[7]=g,t[8]=b):b=t[8];let x;return t[9]!==d||t[10]!==u||t[11]!==b||t[12]!==h?(x=(0,$.jsx)(`div`,{ref:d,tabIndex:0,onKeyDown:u,"aria-label":`Open a surface`,"data-surface-launcher-keys":h,className:`scrollbar-gutter-both flex min-h-0 flex-1 flex-col overflow-y-auto bg-muted px-5 py-6 outline-none`,children:b}),t[9]=d,t[10]=u,t[11]=b,t[12]=h,t[13]=x):x=t[13],x}function sf(e){return e.shortcut}function cf(e,t){let n=t===void 0?`size-4`:t,r=e.icon;return(0,$.jsx)(`span`,{className:`relative inline-flex shrink-0 text-muted-foreground`,children:(0,$.jsx)(r,{className:n})})}function lf(e){e?.focus()}function uf(e){return e.available}function df(e,t,n,r){switch(e.kind){case`diff`:return`Diff`;case`design`:return`Design`;case`files`:return`Files`;case`file`:return e.relativePath.slice(Math.max(e.relativePath.lastIndexOf(`/`),e.relativePath.lastIndexOf(`\\`))+1);case`terminal`:return n.get(e.activeTerminalId)??Vi(e.activeTerminalId);case`pull-request`:return`#${e.number}`;case`pull-requests`:return`Pull requests`;case`tools`:return`Tools`;case`aside`:return r?.get(e.threadId)??`Side chat`;case`device`:return e.title??e.target?.name??`Device`;case`preview`:{let n=e.resourceId?t[e.resourceId]:null;if(!n||n.navStatus._tag===`Idle`)return`New tab`;if(n.navStatus.title.trim().length>0)return n.navStatus.title;try{return new URL(n.navStatus.url).host||`Browser`}catch{return`Browser`}}}}function ff(e){let t=(0,Q.c)(8),{capturedUrl:n,url:r}=e,i;t[0]===r?i=t[1]:(i=pt(r,32),t[0]=r,t[1]=i);let a=i,o;t[2]!==n||t[3]!==a?(o=[n,a],t[2]=n,t[3]=a,t[4]=o):o=t[4];let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(_,{className:`size-3 shrink-0`}),t[5]=s):s=t[5];let c;return t[6]===o?c=t[7]:(c=(0,$.jsx)(_s,{sources:o,fallback:s,className:`size-3 shrink-0 rounded-sm object-contain`}),t[6]=o,t[7]=c),c}function pf(e,t){try{return new URL(e).origin===new URL(t).origin}catch{return!1}}function mf(e){let t=(0,Q.c)(19),{surface:n,sessions:r,desktopByTabId:i,theme:a,environmentId:o,pullRequestStatusSeeds:s}=e;switch(n.kind){case`preview`:{let e=n.resourceId?r[n.resourceId]:null,a=!e||e.navStatus._tag===`Idle`?null:e.navStatus.url,o=e?i[e.tabId]?.favicon??null:null,s=o&&a&&pf(o.pageUrl,a)?o.dataUrl:null,c;return t[0]!==s||t[1]!==a?(c=(0,$.jsx)(ff,{capturedUrl:s,url:a}),t[0]=s,t[1]=a,t[2]=c):c=t[2],c}case`diff`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(xe,{className:`size-3 shrink-0`}),t[3]=e):e=t[3],e}case`design`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(E,{className:`size-3 shrink-0`}),t[4]=e):e=t[4],e}case`files`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(de,{className:`size-3 shrink-0`}),t[5]=e):e=t[5],e}case`file`:{let e;return t[6]!==n.relativePath||t[7]!==a?(e=(0,$.jsx)(dr,{pathValue:n.relativePath,kind:`file`,theme:a,className:`size-3`}),t[6]=n.relativePath,t[7]=a,t[8]=e):e=t[8],e}case`terminal`:{let e;return t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(ge,{className:`size-3 shrink-0`}),t[9]=e):e=t[9],e}case`pull-request`:{let e=s?.[n.id],r;return t[10]!==o||t[11]!==n||t[12]!==e?(r=(0,$.jsx)(gf,{surface:n,environmentId:o,seed:e}),t[10]=o,t[11]=n,t[12]=e,t[13]=r):r=t[13],r}case`pull-requests`:{let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(X.link,{className:`size-3 shrink-0`}),t[14]=e):e=t[14],e}case`tools`:{let e;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(ae,{className:`size-3 shrink-0`}),t[15]=e):e=t[15],e}case`aside`:{let e;return t[16]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(ce,{className:`size-3 shrink-0`}),t[16]=e):e=t[16],e}case`device`:{let e;return t[17]===n.target?.platform?e=t[18]:(e=n.target?.platform===`ios`?(0,$.jsx)(lr,{className:`size-3 shrink-0`}):n.target?.platform===`android`?(0,$.jsx)(ur,{className:`size-3 shrink-0`}):(0,$.jsx)(B,{className:`size-3 shrink-0`}),t[17]=n.target?.platform,t[18]=e),e}}}function hf(e,t,n,r){if(t===null||n===null)return;let i;for(let a of e)if(a.environmentId===t)for(let e of $e(a.pullRequests))Ze(e,{host:n,repository:r.repository,number:r.number})&&(i===void 0||(e.snapshot?.syncedAt??``)>(i.snapshot?.syncedAt??``))&&(i=e);return i}function gf(e){let t=(0,Q.c)(11),{surface:n,environmentId:r,seed:i}=e,a=n.environmentId??r,o=Ye(),s=Ke(),c;t[0]!==a||t[1]!==n.projectId?(c=e=>e.environmentId===a&&e.id===n.projectId,t[0]=a,t[1]=n.projectId,t[2]=c):c=t[2];let l=o.find(c)?.repositoryIdentity,u=n.host??(l?.provider?Ce(l,l.provider):null),d=qe(),f=a===null?void 0:d.get(a)?.environment.capabilities,p=f?.threadPullRequests===!0?hf(s,a,u,n)?.snapshot??null:null,m=At(a===null||f?.pullRequests!==!0||p!==null?null:Ur.detail({environmentId:a,input:{projectId:n.projectId,...f?.threadPullRequests===!0&&n.host!==void 0?{host:n.host}:{},repository:n.repository,number:n.number}})).data,h=n.projectId,g;t[3]!==n.number||t[4]!==n.repository||t[5]!==h?(g={projectId:h,repository:n.repository,number:n.number},t[3]=n.number,t[4]=n.repository,t[5]=h,t[6]=g):g=t[6];let _=Wr(a,g,null),v=p??Hr(m,_)??i??null;if(v===null){let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(X.pullRequest,{className:`size-3 shrink-0 text-muted-foreground`}),t[7]=e):e=t[7],e}let y=fr({state:v.state,isDraft:v.isDraft??m?.isDraft??i?.isDraft??!1}),b=y.Icon,x=G(`size-3 shrink-0`,y.toneClassName),S;return t[8]!==y||t[9]!==x?(S=(0,$.jsx)(b,{className:x}),t[8]=y,t[9]=x,t[10]=S):S=t[10],S}function _f(e){let t=(0,Q.c)(13),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={activationConstraint:{distance:6}},t[0]=n):n=t[0];let r=Hi(Gi(Wi,n)),i;t[1]===e.surfaces?i=t[2]:(i=e.surfaces.map(vf),t[1]=e.surfaces,t[2]=i);let a=i,{onMove:o,surfaces:s}=e,c;t[3]!==o||t[4]!==s?(c=e=>{let{active:t,over:n}=e;if(!n||t.id===n.id)return;let r=s.findIndex(e=>e.id===n.id);r>=0&&o?.(String(t.id),r)},t[3]=o,t[4]=s,t[5]=c):c=t[5];let l=c,u;t[6]!==e.children||t[7]!==a?(u=(0,$.jsx)(Ki,{items:a,strategy:qi,children:e.children}),t[6]=e.children,t[7]=a,t[8]=u):u=t[8];let d;return t[9]!==l||t[10]!==r||t[11]!==u?(d=(0,$.jsx)(Xi,{sensors:r,collisionDetection:Ji,modifiers:Zd,onDragEnd:l,children:u}),t[9]=l,t[10]=r,t[11]=u,t[12]=d):d=t[12],d}function vf(e){return e.id}function yf(e){let t=(0,Q.c)(22),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({surfaceId:a,disabled:r,className:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]!==r||t[6]!==a?(o={id:a,disabled:r},t[5]=r,t[6]=a,t[7]=o):o=t[7];let{listeners:s,setNodeRef:c,transform:l,transition:u,isDragging:d}=Ui(o),f;t[8]===l?f=t[9]:(f=Zi.Translate.toString(l),t[8]=l,t[9]=f);let p;t[10]!==f||t[11]!==u?(p={transform:f,transition:u},t[10]=f,t[11]=u,t[12]=p):p=t[12];let m=d&&`relative z-10`,h;t[13]!==n||t[14]!==m?(h=G(n,m),t[13]=n,t[14]=m,t[15]=h):h=t[15];let g;return t[16]!==s||t[17]!==i||t[18]!==c||t[19]!==p||t[20]!==h?(g=(0,$.jsx)(`div`,{...i,...s,ref:c,style:p,className:h}),t[16]=s,t[17]=i,t[18]=c,t[19]=p,t[20]=h,t[21]=g):g=t[21],g}function bf(e){let t=(0,Q.c)(102),n=On&&e.mode===`inline`,r=or().profiles,{resolvedTheme:i}=Tt(),a=(0,Z.useRef)(null),[o,s]=(0,Z.useState)(null),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={hasOverflow:!1,canScrollLeft:!1,canScrollRight:!1},t[0]=l):l=t[0];let[u,d]=(0,Z.useState)(l),f=e.open!==!1&&e.surfaces.length>0,p=f&&e.onAddTools!==void 0,m;t[1]!==f||t[2]!==p||t[3]!==e?(m=t=>{if(!(t.defaultPrevented||t.isComposing)&&sr(t,e.keybindings,{context:{...e.getShortcutContext(),rightPanelOpen:!0}})===`rightPanel.new`&&!document.querySelector(Jd)&&(!f||p&&e.browserAvailable)&&(t.preventDefault(),t.stopPropagation(),!t.repeat)){if(!p){document.querySelector(`[data-surface-launcher-keys]`)?.focus();return}e.onAddTools?.()}},t[1]=f,t[2]=p,t[3]=e,t[4]=m):m=t[4];let h=(0,Z.useEffectEvent)(m),g;t[5]!==h||t[6]!==e.open?(g=()=>{if(e.open!==!1)return document.addEventListener(`keydown`,h,!0),()=>document.removeEventListener(`keydown`,h,!0)},t[5]=h,t[6]=e.open,t[7]=g):g=t[7];let _;t[8]===e.open?_=t[9]:(_=[e.open],t[8]=e.open,t[9]=_),(0,Z.useEffect)(g,_);let v;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>{let e=Qd(a.current);if(!e)return;let t=e.scrollWidth-e.clientWidth>Xd,n=t&&e.scrollLeft>Xd,r=t&&e.scrollLeft+e.clientWidth<e.scrollWidth-Xd;d(e=>e.hasOverflow===t&&e.canScrollLeft===n&&e.canScrollRight===r?e:{hasOverflow:t,canScrollLeft:n,canScrollRight:r})},t[10]=v):v=t[10];let y=v,b;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>{let t=Qd(a.current);if(!t)return;let n=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;t.scrollBy({left:e*Math.max(120,t.clientWidth*.75),behavior:n?`auto`:`smooth`})},t[11]=b):b=t[11];let S=b,C;t[12]===e?C=t[13]:(C=async(t,n)=>{t.preventDefault(),t.stopPropagation();let r=wt();if(!r)return;let i=e.surfaces.findIndex(e=>e.id===n.id);if(i<0)return;let a=[];n.kind===`device`&&e.onRenameDevice&&a.push({id:`rename`,label:`Rename`}),n.kind===`file`&&n.attachment===void 0&&a.push({id:`copy-path`,label:`Copy path`});let o=$d(n,e.previewSessions),c=o?e.desktopByTabId[o]??null:null,l=c?.audioMuted??!1;n.kind===`preview`&&a.push({id:`toggle-mute`,...ef({overlay:c,canResolveRuntimeTabId:e.previewRuntimeTabId!==void 0})}),a.push({id:`close`,label:`Close`},{id:`close-others`,label:`Close others`,disabled:e.surfaces.length<=1},{id:`close-to-right`,label:`Close to the right`,disabled:i>=e.surfaces.length-1},{id:`close-all`,label:`Close all`,disabled:e.surfaces.length===0});let u=await r.contextMenu.show(a,{x:t.clientX,y:t.clientY});bb134:switch(u){case`rename`:s(n.id);break bb134;case`copy-path`:n.kind===`file`&&n.attachment===void 0&&e.onCopyFilePath(n.relativePath);break bb134;case`toggle-mute`:{let t=o&&c?e.previewRuntimeTabId?.(o)??null:null;t&&Sa?.setAudioMuted(t,!l).catch(wf);break bb134}case`close`:e.onCloseSurface(n);break bb134;case`close-others`:e.onCloseOtherSurfaces(n);break bb134;case`close-to-right`:e.onCloseSurfacesToRight(n);break bb134;case`close-all`:e.onCloseAllSurfaces();break bb134}},t[12]=e,t[13]=C);let w=C,T=Cf,E;t[14]===e?E=t[15]:(E=(t,n)=>{t.button===1&&(t.preventDefault(),t.stopPropagation(),e.onCloseSurface(n))},t[14]=e,t[15]=E);let D=E,O,k;t[16]!==e.activeSurfaceId||t[17]!==u.hasOverflow?(O=()=>{e.activeSurfaceId&&u.hasOverflow&&(a.current?.querySelector(`[data-active-tab='true']`))?.scrollIntoView({block:`nearest`,inline:`nearest`})},k=[e.activeSurfaceId,u.hasOverflow],t[16]=e.activeSurfaceId,t[17]=u.hasOverflow,t[18]=O,t[19]=k):(O=t[18],k=t[19]),(0,Z.useEffect)(O,k);let A,j;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>{let e=Qd(a.current);if(!e)return;let t=e.firstElementChild,n=rr(t?[e,t]:e,y);return e.addEventListener(`scroll`,y,{passive:!0}),y(),()=>{n(),e.removeEventListener(`scroll`,y)}},j=[y],t[20]=A,t[21]=j):(A=t[20],j=t[21]),(0,Z.useEffect)(A,j);let M,N;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>{let e=Qd(a.current);if(!e)return;let t=t=>{if(t.ctrlKey)return;let n=Math.abs(t.deltaX)>Math.abs(t.deltaY)?t.deltaX:t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=16),t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=e.clientWidth),n===0)return;let r=e.scrollLeft;e.scrollLeft+=n,e.scrollLeft!==r&&(t.preventDefault(),y())};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},N=[y],t[22]=M,t[23]=N):(M=t[22],N=t[23]),(0,Z.useEffect)(M,N);let P=e.mode,F;t[24]===e.maximized?F=t[25]:(F=e.maximized===void 0?{}:{maximized:e.maximized},t[24]=e.maximized,t[25]=F);let I;t[26]===e.open?I=t[27]:(I=e.open===void 0?{}:{open:e.open},t[26]=e.open,t[27]=I);let L;t[28]===e.widthStorageKey?L=t[29]:(L=e.widthStorageKey===void 0?{}:{widthStorageKey:e.widthStorageKey},t[28]=e.widthStorageKey,t[29]=L);let ee;t[30]===e.defaultWidth?ee=t[31]:(ee=e.defaultWidth===void 0?{}:{defaultWidth:e.defaultWidth},t[30]=e.defaultWidth,t[31]=ee);let R;t[32]===e.inlineSize?R=t[33]:(R=e.inlineSize?{inlineSize:e.inlineSize}:{},t[32]=e.inlineSize,t[33]=R);let z=e.mode===`inline`&&!e.layoutControls?`pr-28`:`pr-3`,B=n&&`drag-region`,te=n&&`wco:pr-(--workspace-native-controls-inset)`,V=e.mode===`inline`&&e.maximized&&`[[data-sidebar-state=collapsed]_&]:pl-[var(--workspace-titlebar-content-left)] max-md:[[data-sidebar-state=expanded]_&]:pl-[var(--workspace-titlebar-content-left)]`,H;t[34]!==z||t[35]!==B||t[36]!==te||t[37]!==V?(H=G(`flex h-[var(--workspace-topbar-height)] min-h-[var(--workspace-topbar-height)] shrink-0 items-center gap-1 bg-(--app-chrome-background) pl-2`,z,B,te,V),t[34]=z,t[35]=B,t[36]=te,t[37]=V,t[38]=H):H=t[38];let ne=e.surfaces,re=e.onMoveSurface,U;t[39]!==D||t[40]!==w||t[41]!==n||t[42]!==e||t[43]!==o||t[44]!==i?(U=e.surfaces.map(t=>{let r=t.id===e.activeSurfaceId,a=e.pendingSurfaceIds.has(t.id),c=df(t,e.previewSessions,e.terminalLabelsById,e.asideTitlesByThreadId),l=$d(t,e.previewSessions),u=tf(l?e.desktopByTabId[l]??null:null),d=l?e.previewRuntimeTabId?.(l)??null:null;return(0,$.jsxs)(yf,{surfaceId:t.id,disabled:!e.onMoveSurface||o===t.id,"data-active-tab":r,onMouseDown:T,onAuxClick:e=>D(e,t),onContextMenu:e=>void w(e,t),className:G(`cursor-pointer group/tab flex h-7 w-52 shrink-0 items-center gap-2 rounded-md pr-1 pl-2.5 text-sm transition-colors duration-150`,n&&`[-webkit-app-region:no-drag]`,r?`bg-background text-foreground shadow-xs`:`text-muted-foreground hover:bg-accent/60 hover:text-foreground`),children:[(0,$.jsxs)(`span`,{className:`relative flex size-4 shrink-0 items-center justify-center [&_img]:size-3.5 [&_svg]:size-3.5`,children:[(0,$.jsx)(mf,{surface:t,sessions:e.previewSessions,desktopByTabId:e.desktopByTabId,theme:i,environmentId:e.environmentId,pullRequestStatusSeeds:e.pullRequestStatusSeeds}),a?(0,$.jsx)(`span`,{className:`absolute -right-0.5 -bottom-0.5 size-1.5 rounded-full bg-current`,"aria-hidden":!0}):null]}),u===`none`||!d?null:(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`button`,{type:`button`,className:`cursor-pointer flex size-4 shrink-0 items-center justify-center rounded-sm hover:bg-muted`,"aria-label":u===`muted`?`Unmute ${c}`:`Mute ${c}`,onClick:e=>{e.stopPropagation(),Sa?.setAudioMuted(d,u!==`muted`).catch(Sf)},children:(0,$.jsx)(st,{className:`size-3`,icon:u===`muted`?ct:rt})})}),(0,$.jsx)(J,{children:u===`muted`?`Unmute tab`:`Mute tab`})]}),o===t.id?(0,$.jsx)(`input`,{"aria-label":`Device tab name`,className:`min-w-0 flex-1 rounded-sm bg-background px-1 outline-none ring-1 ring-inset ring-ring`,defaultValue:c,ref:xf,onBlur:n=>{e.onRenameDevice?.(t.id,n.currentTarget.value),s(null)},onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`&&e.currentTarget.blur(),e.key===`Escape`&&(e.currentTarget.value=c,e.currentTarget.blur())}}):(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`button`,{type:`button`,onDoubleClick:()=>{t.kind===`device`&&e.onRenameDevice&&s(t.id)},className:`cursor-pointer flex h-full min-w-0 flex-1 items-center`,onClick:()=>e.onActivate(t),children:(0,$.jsx)(`span`,{className:`truncate`,children:c})})}),(0,$.jsx)(J,{children:t.kind===`device`?(0,$.jsx)(Tf,{surface:t,environmentId:e.environmentId,title:c}):c})]}),(0,$.jsx)(`button`,{type:`button`,"aria-label":`Close ${c}`,className:G(`cursor-pointer flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-opacity duration-150 hover:bg-muted hover:text-foreground focus-visible:opacity-100 pointer-coarse:opacity-100 motion-reduce:transition-none`,r?`opacity-100`:`opacity-0 group-hover/tab:opacity-100`),onClick:()=>e.onCloseSurface(t),children:(0,$.jsx)(we,{className:`size-3.5`})})]},t.id)}),t[39]=D,t[40]=w,t[41]=n,t[42]=e,t[43]=o,t[44]=i,t[45]=U):U=t[45];let ie;t[46]!==e.onMoveSurface||t[47]!==e.surfaces||t[48]!==U?(ie=(0,$.jsx)(Hn,{radius:`none`,ref:a,hideScrollbars:!0,scrollFade:!0,className:`w-fit min-w-0 flex-initial`,"data-right-panel-tab-list":!0,children:(0,$.jsx)(`div`,{className:`flex h-full w-max min-w-full items-center gap-1`,children:(0,$.jsx)(_f,{surfaces:ne,onMove:re,children:U})})}),t[46]=e.onMoveSurface,t[47]=e.surfaces,t[48]=U,t[49]=ie):ie=t[49];let ae;t[50]!==u.canScrollLeft||t[51]!==u.canScrollRight||t[52]!==u.hasOverflow?(ae=u.hasOverflow?(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 [-webkit-app-region:no-drag]`,role:`group`,"aria-label":`Scroll panel tabs`,children:[(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`span`,{className:`inline-flex`,children:(0,$.jsx)(W,{"aria-label":`Scroll tabs left`,disabled:!u.canScrollLeft,onClick:()=>S(-1),size:`icon-xs`,variant:`ghost`,children:(0,$.jsx)(c,{})})})}),(0,$.jsx)(J,{children:`Scroll tabs left`})]}),(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`span`,{className:`inline-flex`,children:(0,$.jsx)(W,{"aria-label":`Scroll tabs right`,disabled:!u.canScrollRight,onClick:()=>S(1),size:`icon-xs`,variant:`ghost`,children:(0,$.jsx)(he,{})})})}),(0,$.jsx)(J,{children:`Scroll tabs right`})]})]}):null,t[50]=u.canScrollLeft,t[51]=u.canScrollRight,t[52]=u.hasOverflow,t[53]=ae):ae=t[53];let oe;t[54]!==p||t[55]!==e.onAddTools?(oe=p?(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(W,{"aria-label":`New tab`,className:`shrink-0 [-webkit-app-region:no-drag]`,onClick:e.onAddTools,size:`icon-xs`,variant:`ghost-muted`}),children:(0,$.jsx)(x,{className:`size-4`})}),(0,$.jsx)(J,{children:`New tab`})]}):null,t[54]=p,t[55]=e.onAddTools,t[56]=oe):oe=t[56];let se;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,$.jsx)(`span`,{"aria-hidden":!0,className:`min-w-0 flex-1`}),t[57]=se):se=t[57];let ce;t[58]!==n||t[59]!==e.layoutControls?(ce=n&&!e.layoutControls?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`hidden w-24 shrink-0 wco:block`}):null,t[58]=n,t[59]=e.layoutControls,t[60]=ce):ce=t[60];let le;t[61]===n?le=t[62]:(le=n?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none fixed top-[var(--workspace-controls-top)] right-[var(--workspace-controls-right)] h-[var(--workspace-topbar-height)] w-28 [-webkit-app-region:no-drag]`}):null,t[61]=n,t[62]=le);let ue;t[63]!==e.layoutControls||t[64]!==H||t[65]!==ie||t[66]!==ae||t[67]!==oe||t[68]!==ce||t[69]!==le?(ue=(0,$.jsxs)(`div`,{className:H,"data-right-panel-tabbar":!0,children:[ie,ae,oe,se,e.layoutControls,ce,le]}),t[63]=e.layoutControls,t[64]=H,t[65]=ie,t[66]=ae,t[67]=oe,t[68]=ce,t[69]=le,t[70]=ue):ue=t[70];let de;t[71]!==r||t[72]!==e.activeSurfaceId||t[73]!==e.browserAvailable||t[74]!==e.children||t[75]!==e.deviceAvailable||t[76]!==e.diffAvailable||t[77]!==e.filesAvailable||t[78]!==e.onAddBrowser||t[79]!==e.onAddBrowserInProfile||t[80]!==e.onAddDesign||t[81]!==e.onAddDevice||t[82]!==e.onAddDiff||t[83]!==e.onAddFiles||t[84]!==e.onAddPullRequest||t[85]!==e.onAddPullRequests||t[86]!==e.onAddTerminal||t[87]!==e.pullRequestAvailable||t[88]!==e.pullRequestsAvailable||t[89]!==e.terminalAvailable?(de=e.activeSurfaceId===null||e.activeSurfaceId===`tools`?(0,$.jsx)(of,{onAddBrowser:e.onAddBrowser,onAddBrowserInProfile:e.onAddBrowserInProfile,browserProfiles:r,onAddTerminal:e.onAddTerminal,onAddDiff:e.onAddDiff,onAddFiles:e.onAddFiles,...e.onAddDesign?{onAddDesign:e.onAddDesign}:{},onAddPullRequest:e.onAddPullRequest,onAddPullRequests:e.onAddPullRequests,onAddDevice:e.onAddDevice,browserAvailable:e.browserAvailable,terminalAvailable:e.terminalAvailable,diffAvailable:e.diffAvailable,filesAvailable:e.filesAvailable,pullRequestAvailable:e.pullRequestAvailable,pullRequestsAvailable:e.pullRequestsAvailable,deviceAvailable:e.deviceAvailable}):e.children,t[71]=r,t[72]=e.activeSurfaceId,t[73]=e.browserAvailable,t[74]=e.children,t[75]=e.deviceAvailable,t[76]=e.diffAvailable,t[77]=e.filesAvailable,t[78]=e.onAddBrowser,t[79]=e.onAddBrowserInProfile,t[80]=e.onAddDesign,t[81]=e.onAddDevice,t[82]=e.onAddDiff,t[83]=e.onAddFiles,t[84]=e.onAddPullRequest,t[85]=e.onAddPullRequests,t[86]=e.onAddTerminal,t[87]=e.pullRequestAvailable,t[88]=e.pullRequestsAvailable,t[89]=e.terminalAvailable,t[90]=de):de=t[90];let fe;t[91]===de?fe=t[92]:(fe=(0,$.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,"data-right-panel-surface-content":!0,children:de}),t[91]=de,t[92]=fe);let pe;return t[93]!==e.mode||t[94]!==F||t[95]!==I||t[96]!==L||t[97]!==ee||t[98]!==R||t[99]!==ue||t[100]!==fe?(pe=(0,$.jsxs)(fs,{mode:P,...F,...I,...L,...ee,...R,children:[ue,fe]}),t[93]=e.mode,t[94]=F,t[95]=I,t[96]=L,t[97]=ee,t[98]=R,t[99]=ue,t[100]=fe,t[101]=pe):pe=t[101],pe}function xf(e){e?.focus(),e?.select()}function Sf(){}function Cf(e){e.button===1&&e.preventDefault()}function wf(){}function Tf(e){let t=(0,Q.c)(15),n=e.surface.target,{state:r}=nr(n?e.environmentId:null),i;t[0]!==r||t[1]!==n?(i=n?r.devices.find(e=>e.hostId===n.hostId&&e.id===n.deviceId):void 0,t[0]=r,t[1]=n,t[2]=i):i=t[2];let a=i,o;t[3]!==r||t[4]!==n?(o=n?r.hosts.find(e=>e.id===n.hostId):void 0,t[3]=r,t[4]=n,t[5]=o):o=t[5];let s=o,c;t[6]===e.title?c=t[7]:(c=(0,$.jsx)(`span`,{children:e.title}),t[6]=e.title,t[7]=c);let l;t[8]!==a?.version||t[9]!==s?.label||t[10]!==n?(l=n?(0,$.jsxs)(`span`,{className:`text-muted-foreground`,children:[s?.label??`Device host`,` ·`,` `,a?.version??(n.platform===`ios`?`iOS`:`Android`)]}):null,t[8]=a?.version,t[9]=s?.label,t[10]=n,t[11]=l):l=t[11];let u;return t[12]!==c||t[13]!==l?(u=(0,$.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[c,l]}),t[12]=c,t[13]=l,t[14]=u):u=t[14],u}var Ef=(0,Z.memo)(function(e){let t=(0,Q.c)(31),{showThreadPanelControl:n,showTerminalControl:r,showRightPanelControl:i,terminalAvailable:a,terminalOpen:o,terminalShortcutLabel:s,threadPanelOpen:c,threadPanelPresentation:l,threadPanelPopoverHandle:u,threadPanelShortcutLabel:d,rightPanelAvailable:f,rightPanelOpen:p,rightPanelShortcutLabel:m,rightPanelUnavailableLabel:h,rightPanelTabCount:g,onToggleTerminal:_,onToggleThreadPanel:v,onToggleRightPanel:y}=e,b=n===void 0||n,x=r===void 0||r,S=i===void 0||i,C=h===void 0?`Right panel is unavailable`:h,w=g===void 0?0:g,T;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(kf,{}),t[0]=T):T=t[0];let E;t[1]===c?E=t[2]:(E=(0,$.jsx)(Mn,{className:`relative shrink-0 [-webkit-app-region:no-drag]`,pressed:c,"aria-label":`Toggle thread details panel`,variant:`ghost`,size:`sm`,children:T}),t[1]=c,t[2]=E);let D=E,O;t[3]!==v||t[4]!==l||t[5]!==d?(O=e=>(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:e,...l===`popover`?{}:{onClick:v}}),(0,$.jsxs)(J,{side:`bottom`,children:[`Toggle thread details`,d?` (${d})`:``]})]}),t[3]=v,t[4]=l,t[5]=d,t[6]=O):O=t[6];let A=O,j;t[7]!==b||t[8]!==u||t[9]!==l||t[10]!==D||t[11]!==A?(j=b?A(l===`popover`?(0,$.jsx)(Jr,{handle:u,render:D}):D):null,t[7]=b,t[8]=u,t[9]=l,t[10]=D,t[11]=A,t[12]=j):j=t[12];let M;t[13]!==_||t[14]!==x||t[15]!==a||t[16]!==o||t[17]!==s?(M=x?(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`span`,{className:`flex shrink-0`}),children:(0,$.jsx)(Mn,{className:`shrink-0 [-webkit-app-region:no-drag]`,pressed:o,onPressedChange:_,"aria-label":`Toggle terminal drawer`,variant:`ghost`,size:`sm`,disabled:!a,children:(0,$.jsx)(k,{className:`size-4`})})}),(0,$.jsx)(J,{side:`bottom`,children:a?`Toggle terminal drawer${s?` (${s})`:``}`:`Terminal drawer is unavailable`})]}):null,t[13]=_,t[14]=x,t[15]=a,t[16]=o,t[17]=s,t[18]=M):M=t[18];let N;t[19]!==y||t[20]!==f||t[21]!==p||t[22]!==m||t[23]!==w||t[24]!==C||t[25]!==S?(N=S?(0,$.jsxs)(Y,{children:[(0,$.jsx)(q,{render:(0,$.jsx)(`span`,{className:`flex shrink-0`}),children:(0,$.jsx)(Mn,{className:`shrink-0 [-webkit-app-region:no-drag]`,pressed:p,onPressedChange:y,"aria-label":w>0?`Toggle right panel, ${w} ${w===1?`tab`:`tabs`}`:`Toggle right panel`,variant:`ghost`,size:`sm`,disabled:!f,children:w>0?(0,$.jsx)(Df,{count:w}):(0,$.jsx)(st,{className:`size-4`,icon:p?lt:at})})}),(0,$.jsx)(J,{side:`bottom`,children:f?`Toggle right panel${m?` (${m})`:``}`:C})]}):null,t[19]=y,t[20]=f,t[21]=p,t[22]=m,t[23]=w,t[24]=C,t[25]=S,t[26]=N):N=t[26];let P;return t[27]!==M||t[28]!==N||t[29]!==j?(P=(0,$.jsxs)(`div`,{className:`flex h-full shrink-0 items-center gap-1 [-webkit-app-region:no-drag]`,"data-panel-layout-controls":!0,children:[j,M,N]}),t[27]=M,t[28]=N,t[29]=j,t[30]=P):P=t[30],P});function Df(e){let t=(0,Q.c)(4),{count:n}=e,r=n>99?`∞`:String(n),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}),t[0]=i):i=t[0];let a=r.length>1?11:13,o;return t[1]!==r||t[2]!==a?(o=(0,$.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`size-4`,children:[i,(0,$.jsx)(`text`,{x:`12`,y:`12.5`,fill:`currentColor`,stroke:`none`,fontSize:a,fontWeight:600,textAnchor:`middle`,dominantBaseline:`central`,className:`tabular-nums`,children:r})]}),t[1]=r,t[2]=a,t[3]=o):o=t[3],o}var Of=(0,Z.memo)(function(e){let t=(0,Q.c)(12),{maximized:n,onToggle:r}=e,i=n?`Restore panel size`:`Maximize panel`,a=n?nt:it,o;t[0]===a?o=t[1]:(o=(0,$.jsx)(st,{className:`size-3.5`,icon:a}),t[0]=a,t[1]=o);let s;t[2]!==i||t[3]!==n||t[4]!==r||t[5]!==o?(s=(0,$.jsx)(q,{render:(0,$.jsx)(Mn,{className:`shrink-0 [-webkit-app-region:no-drag]`,pressed:n,onPressedChange:r,"aria-label":i,variant:`ghost`,size:`sm`,children:o})}),t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=s):s=t[6];let c;t[7]===i?c=t[8]:(c=(0,$.jsx)(J,{side:`bottom`,children:i}),t[7]=i,t[8]=c);let l;return t[9]!==s||t[10]!==c?(l=(0,$.jsxs)(Y,{children:[s,c]}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l});function kf(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,className:`size-4`,children:[(0,$.jsx)(`circle`,{cx:`6`,cy:`7.5`,r:`2.5`}),(0,$.jsx)(`circle`,{cx:`6`,cy:`16.5`,r:`2.5`}),(0,$.jsx)(`path`,{d:`M12 7.5h8`}),(0,$.jsx)(`path`,{d:`M12 16.5h8`})]}),e[0]=t):t=e[0],t}export{Ts as A,Cc as C,mc as D,_c as E,Qo as F,Yo as I,Mo as L,fs as M,ss as N,pc as O,Zo as P,Po as R,Lc as S,hc as T,_l as _,Ud as a,Bc as b,Wd as c,zd as d,Vu as f,yl as g,Ol as h,Hd as i,xs as j,ws as k,Gd as l,jl as m,Of as n,Kd as o,kl as p,bf as r,qd as s,Ef as t,Bd as u,el as v,yc as w,zc as x,$c as y,jo as z};
216
- //# sourceMappingURL=PanelLayoutControls-40ju6vkz.js.map
216
+ //# sourceMappingURL=PanelLayoutControls-CqeL3uQz.js.map
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-DH3P2YXY.js";import{n,t as r}from"./jsx-runtime-BnjsACtP.js";import{Qg as i,Sf as a,Uc as o,t as s,uf as c}from"./utils-BE5iQuUP.js";import{B as l,L as u,M as d,W as f}from"./runtime-DSZ2mWrf.js";import{a as p,r as m}from"./pierre-icons-6ByaxkH5.js";function h(e){return{createUploadUrl:d(e,{label:`environment-command:attachments:create-upload-url`,tag:o.attachmentsCreateUploadUrl}),remove:d(e,{label:`environment-command:attachments:delete`,tag:o.attachmentsDelete})}}function g(e){return typeof e==`object`&&!!e&&`_tag`in e&&e._tag===`AssetAttachmentNotFoundError`}async function _(e){let t=await u(e.registry,e.createAssetUrl({environmentId:e.environmentId,input:{resource:{_tag:`attachment`,attachmentId:e.attachmentId}}}),{reportFailure:!1,reportDefect:!1,refresh:!0});if(t._tag===`Success`)return{status:`verified`};let n=f(t);return g(n)?{status:`missing`}:{status:`failed`,error:n}}function v(e){l(e.registry,e.remove,{environmentId:e.environmentId,input:{attachmentId:e.attachmentId}},{reportFailure:!1,reportDefect:!1})}async function y(e){let t=await l(e.registry,e.createUploadUrl,{environmentId:e.environmentId,input:e.upload},{reportFailure:!1});if(t._tag!==`Success`)return{status:`failed`,step:`mint`,attachmentId:null,error:f(t)};let n=t.value.attachmentId;if(e.onMinted?.(n)===`cancel`)return v({registry:e.registry,remove:e.remove,environmentId:e.environmentId,attachmentId:n}),{status:`cancelled`,attachmentId:n};let r=e.resolveUploadUrl(t.value.relativeUrl);if(!r)return{status:`failed`,step:`resolve-url`,attachmentId:n,error:Error(`The environment is not connected.`)};let i=e.transport(r);e.onTransferStart?.(i.abort);try{await i.done}catch(e){return{status:`failed`,step:`transfer`,attachmentId:n,error:e}}return{status:`uploaded`,attachmentId:n}}function b(e){return Math.min(e,i)}function x(e){return e>=1048576?`${(e/1048576).toFixed(1)} MB`:`${Math.max(1,Math.ceil(e/1024))} KB`}function S(e,t){return`'${e}' exceeds the ${t>=1048576&&t%1048576==0?`${t/1048576} MB`:t>=1024&&t%1024==0?`${t/1024} KB`:`${t} ${t===1?`byte`:`bytes`}`} attachment limit.`}var C=n(),w=e(t(),1),T=e(r(),1),E={astro:[`#a631be`,`#d568ea`],babel:[`#d5a910`,`#ffd452`],bash:[`#199f43`,`#5ecc71`],biome:[`#1a85d4`,`#69b1ff`],bootstrap:[`#693acf`,`#9d6afb`],browserslist:[`#d5a910`,`#ffd452`],bun:[`#594c5b`,`#79697b`],c:[`#1a85d4`,`#69b1ff`],claude:[`#d47628`,`#ffa359`],cpp:[`#1a85d4`,`#69b1ff`],css:[`#693acf`,`#9d6afb`],database:[`#a631be`,`#d568ea`],default:[`#84848a`,`#adadb1`],docker:[`#1a85d4`,`#69b1ff`],eslint:[`#693acf`,`#9d6afb`],git:[`#ff8c5b`,`#d5512f`],go:[`#1ca1c7`,`#68cdf2`],graphql:[`#d32a61`,`#ff678d`],html:[`#d47628`,`#ffa359`],image:[`#d32a61`,`#ff678d`],javascript:[`#d5a910`,`#ffd452`],json:[`#d47628`,`#ffa359`],markdown:[`#199f43`,`#5ecc71`],mcp:[`#17a5af`,`#64d1db`],nextjs:[`#84848a`,`#adadb1`],npm:[`#d52c36`,`#ff6762`],oxc:[`#1ca1c7`,`#68cdf2`],postcss:[`#d52c36`,`#ff6762`],prettier:[`#17a5af`,`#64d1db`],python:[`#1a85d4`,`#69b1ff`],react:[`#1ca1c7`,`#68cdf2`],ruby:[`#d52c36`,`#ff6762`],rust:[`#d47628`,`#ffa359`],sass:[`#d32a61`,`#ff678d`],stylelint:[`#84848a`,`#adadb1`],svelte:[`#d52c36`,`#ff6762`],svg:[`#d47628`,`#ffa359`],svgo:[`#199f43`,`#5ecc71`],swift:[`#d47628`,`#ffa359`],table:[`#17a5af`,`#64d1db`],tailwind:[`#1ca1c7`,`#68cdf2`],terraform:[`#693acf`,`#9d6afb`],text:[`#84848a`,`#adadb1`],typescript:[`#1a85d4`,`#69b1ff`],vite:[`#a631be`,`#d568ea`],vscode:[`#1a85d4`,`#69b1ff`],vue:[`#199f43`,`#5ecc71`],wasm:[`#693acf`,`#9d6afb`],webpack:[`#1a85d4`,`#69b1ff`],yml:[`#d52c36`,`#ff6762`],zig:[`#d47628`,`#ffa359`],zip:[`#d47628`,`#ffa359`]},D=(0,w.memo)(function(e){let t=(0,C.c)(20),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],t[0]=n):n=t[0],(0,w.useInsertionEffect)(m,n);let r;t[1]!==e.kind||t[2]!==e.mimeType||t[3]!==e.pathValue?(r=p(e.pathValue,e.kind,e.mimeType),t[1]=e.kind,t[2]=e.mimeType,t[3]=e.pathValue,t[4]=r):r=t[4];let i=r;if(!i){let n;return t[5]!==e.className||t[6]!==e.kind?(n=e.kind===`directory`?(0,T.jsx)(a,{className:s(`size-4 text-icon-muted`,e.className)}):(0,T.jsx)(c,{className:s(`size-4 text-icon-muted`,e.className)}),t[5]=e.className,t[6]=e.kind,t[7]=n):n=t[7],n}let o=E[i.token??`default`]??E.default,l=i.name,u=i.token,d;t[8]===e.className?d=t[9]:(d=s(`size-4 shrink-0`,e.className),t[8]=e.className,t[9]=d);let f=o?.[e.theme===`light`?0:1],h;t[10]===f?h=t[11]:(h={color:f},t[10]=f,t[11]=h);let g=`#${i.name}`,_;t[12]===g?_=t[13]:(_=(0,T.jsx)(`use`,{href:g}),t[12]=g,t[13]=_);let v;return t[14]!==i.name||t[15]!==i.token||t[16]!==d||t[17]!==h||t[18]!==_?(v=(0,T.jsx)(`svg`,{"aria-hidden":`true`,"data-pierre-icon":l,"data-icon-token":u,className:d,style:h,viewBox:`0 0 16 16`,children:_}),t[14]=i.name,t[15]=i.token,t[16]=d,t[17]=h,t[18]=_,t[19]=v):v=t[19],v});export{S as a,_ as c,v as i,b as n,x as o,h as r,y as s,D as t};
2
- //# sourceMappingURL=PierreEntryIcon-HuUxlwtG.js.map
1
+ import{a as e,t}from"./react-DH3P2YXY.js";import{n,t as r}from"./jsx-runtime-BnjsACtP.js";import{Qg as i,Sf as a,Uc as o,t as s,uf as c}from"./utils-CrFJwxSd.js";import{B as l,L as u,M as d,W as f}from"./runtime-Dm3Pi31_.js";import{a as p,r as m}from"./pierre-icons-Cisj4-__.js";function h(e){return{createUploadUrl:d(e,{label:`environment-command:attachments:create-upload-url`,tag:o.attachmentsCreateUploadUrl}),remove:d(e,{label:`environment-command:attachments:delete`,tag:o.attachmentsDelete})}}function g(e){return typeof e==`object`&&!!e&&`_tag`in e&&e._tag===`AssetAttachmentNotFoundError`}async function _(e){let t=await u(e.registry,e.createAssetUrl({environmentId:e.environmentId,input:{resource:{_tag:`attachment`,attachmentId:e.attachmentId}}}),{reportFailure:!1,reportDefect:!1,refresh:!0});if(t._tag===`Success`)return{status:`verified`};let n=f(t);return g(n)?{status:`missing`}:{status:`failed`,error:n}}function v(e){l(e.registry,e.remove,{environmentId:e.environmentId,input:{attachmentId:e.attachmentId}},{reportFailure:!1,reportDefect:!1})}async function y(e){let t=await l(e.registry,e.createUploadUrl,{environmentId:e.environmentId,input:e.upload},{reportFailure:!1});if(t._tag!==`Success`)return{status:`failed`,step:`mint`,attachmentId:null,error:f(t)};let n=t.value.attachmentId;if(e.onMinted?.(n)===`cancel`)return v({registry:e.registry,remove:e.remove,environmentId:e.environmentId,attachmentId:n}),{status:`cancelled`,attachmentId:n};let r=e.resolveUploadUrl(t.value.relativeUrl);if(!r)return{status:`failed`,step:`resolve-url`,attachmentId:n,error:Error(`The environment is not connected.`)};let i=e.transport(r);e.onTransferStart?.(i.abort);try{await i.done}catch(e){return{status:`failed`,step:`transfer`,attachmentId:n,error:e}}return{status:`uploaded`,attachmentId:n}}function b(e){return Math.min(e,i)}function x(e){return e>=1048576?`${(e/1048576).toFixed(1)} MB`:`${Math.max(1,Math.ceil(e/1024))} KB`}function S(e,t){return`'${e}' exceeds the ${t>=1048576&&t%1048576==0?`${t/1048576} MB`:t>=1024&&t%1024==0?`${t/1024} KB`:`${t} ${t===1?`byte`:`bytes`}`} attachment limit.`}var C=n(),w=e(t(),1),T=e(r(),1),E={astro:[`#a631be`,`#d568ea`],babel:[`#d5a910`,`#ffd452`],bash:[`#199f43`,`#5ecc71`],biome:[`#1a85d4`,`#69b1ff`],bootstrap:[`#693acf`,`#9d6afb`],browserslist:[`#d5a910`,`#ffd452`],bun:[`#594c5b`,`#79697b`],c:[`#1a85d4`,`#69b1ff`],claude:[`#d47628`,`#ffa359`],cpp:[`#1a85d4`,`#69b1ff`],css:[`#693acf`,`#9d6afb`],database:[`#a631be`,`#d568ea`],default:[`#84848a`,`#adadb1`],docker:[`#1a85d4`,`#69b1ff`],eslint:[`#693acf`,`#9d6afb`],git:[`#ff8c5b`,`#d5512f`],go:[`#1ca1c7`,`#68cdf2`],graphql:[`#d32a61`,`#ff678d`],html:[`#d47628`,`#ffa359`],image:[`#d32a61`,`#ff678d`],javascript:[`#d5a910`,`#ffd452`],json:[`#d47628`,`#ffa359`],markdown:[`#199f43`,`#5ecc71`],mcp:[`#17a5af`,`#64d1db`],nextjs:[`#84848a`,`#adadb1`],npm:[`#d52c36`,`#ff6762`],oxc:[`#1ca1c7`,`#68cdf2`],postcss:[`#d52c36`,`#ff6762`],prettier:[`#17a5af`,`#64d1db`],python:[`#1a85d4`,`#69b1ff`],react:[`#1ca1c7`,`#68cdf2`],ruby:[`#d52c36`,`#ff6762`],rust:[`#d47628`,`#ffa359`],sass:[`#d32a61`,`#ff678d`],stylelint:[`#84848a`,`#adadb1`],svelte:[`#d52c36`,`#ff6762`],svg:[`#d47628`,`#ffa359`],svgo:[`#199f43`,`#5ecc71`],swift:[`#d47628`,`#ffa359`],table:[`#17a5af`,`#64d1db`],tailwind:[`#1ca1c7`,`#68cdf2`],terraform:[`#693acf`,`#9d6afb`],text:[`#84848a`,`#adadb1`],typescript:[`#1a85d4`,`#69b1ff`],vite:[`#a631be`,`#d568ea`],vscode:[`#1a85d4`,`#69b1ff`],vue:[`#199f43`,`#5ecc71`],wasm:[`#693acf`,`#9d6afb`],webpack:[`#1a85d4`,`#69b1ff`],yml:[`#d52c36`,`#ff6762`],zig:[`#d47628`,`#ffa359`],zip:[`#d47628`,`#ffa359`]},D=(0,w.memo)(function(e){let t=(0,C.c)(20),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],t[0]=n):n=t[0],(0,w.useInsertionEffect)(m,n);let r;t[1]!==e.kind||t[2]!==e.mimeType||t[3]!==e.pathValue?(r=p(e.pathValue,e.kind,e.mimeType),t[1]=e.kind,t[2]=e.mimeType,t[3]=e.pathValue,t[4]=r):r=t[4];let i=r;if(!i){let n;return t[5]!==e.className||t[6]!==e.kind?(n=e.kind===`directory`?(0,T.jsx)(a,{className:s(`size-4 text-icon-muted`,e.className)}):(0,T.jsx)(c,{className:s(`size-4 text-icon-muted`,e.className)}),t[5]=e.className,t[6]=e.kind,t[7]=n):n=t[7],n}let o=E[i.token??`default`]??E.default,l=i.name,u=i.token,d;t[8]===e.className?d=t[9]:(d=s(`size-4 shrink-0`,e.className),t[8]=e.className,t[9]=d);let f=o?.[e.theme===`light`?0:1],h;t[10]===f?h=t[11]:(h={color:f},t[10]=f,t[11]=h);let g=`#${i.name}`,_;t[12]===g?_=t[13]:(_=(0,T.jsx)(`use`,{href:g}),t[12]=g,t[13]=_);let v;return t[14]!==i.name||t[15]!==i.token||t[16]!==d||t[17]!==h||t[18]!==_?(v=(0,T.jsx)(`svg`,{"aria-hidden":`true`,"data-pierre-icon":l,"data-icon-token":u,className:d,style:h,viewBox:`0 0 16 16`,children:_}),t[14]=i.name,t[15]=i.token,t[16]=d,t[17]=h,t[18]=_,t[19]=v):v=t[19],v});export{S as a,_ as c,v as i,b as n,x as o,h as r,y as s,D as t};
2
+ //# sourceMappingURL=PierreEntryIcon-B5tjtDkE.js.map