@p4code/cli 0.9.13 → 0.9.15

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 (388) hide show
  1. package/dist/{AcpMcpStdioBridge-DGUY2q8q.mjs → AcpMcpStdioBridge-BPNHFfTr.mjs} +11 -4
  2. package/dist/AcpMcpStdioBridge-CtXfvrFO.mjs +3 -0
  3. package/dist/{Effect-Cus50zSB.mjs → Effect-COOccdaU.mjs} +25 -2
  4. package/dist/{Schema-B1iWvOKX.mjs → Schema-BXiVImR2.mjs} +2 -2
  5. package/dist/{Stream-XZd8srjf.mjs → Stream-D2XZdzH6.mjs} +45 -3
  6. package/dist/bin.mjs +15 -2
  7. package/dist/{binCli-D22yxtxv.mjs → binCli-06acKUH_.mjs} +7990 -4896
  8. package/dist/claude-history-worker.mjs +1 -1
  9. package/dist/{claudeHistoryWorker-Ew_jxLJH.mjs → claudeHistoryWorker-BJKXFgWC.mjs} +4 -4
  10. package/dist/client/.vite/manifest.json +2120 -2104
  11. package/dist/client/assets/{2NI2N5EU-DBKJSvEQ.js → 2NI2N5EU-CzVcbH89.js} +2 -2
  12. package/dist/client/assets/{4UO7MD6I-1JuY3zN7.js → 4UO7MD6I-DS3UFSUE.js} +2 -2
  13. package/dist/client/assets/{5B3SVYGG-CwgmePuE.js → 5B3SVYGG-lbor_c4_.js} +2 -2
  14. package/dist/client/assets/{5GK6JWQ2-D9VJsozU.js → 5GK6JWQ2-DufacBFC.js} +2 -2
  15. package/dist/client/assets/{5N7A7DKN-CFgZoUw5.js → 5N7A7DKN-B3iWX-TC.js} +2 -2
  16. package/dist/client/assets/{5OC2THR4-Cx6keXWX.js → 5OC2THR4-DoDDWXtD.js} +2 -2
  17. package/dist/client/assets/{5S6HY5KT-Ce1reKKv.js → 5S6HY5KT-7n94quvm.js} +2 -2
  18. package/dist/client/assets/{6IMQ5BUJ-D7X0q9kf.js → 6IMQ5BUJ-CqcR9lZq.js} +2 -2
  19. package/dist/client/assets/{6OLKWJ4F-YLfMA9aH.js → 6OLKWJ4F-BeCI6be_.js} +2 -2
  20. package/dist/client/assets/{74OO7NKP-Wm5pZPTC.js → 74OO7NKP-XWvi4Kgp.js} +2 -2
  21. package/dist/client/assets/{75O6YZUN-D2He6_fp.js → 75O6YZUN-BbbGiqdI.js} +2 -2
  22. package/dist/client/assets/{77XECAW3-CV_JLSeU.js → 77XECAW3-BVGMXOi_.js} +2 -2
  23. package/dist/client/assets/{ABYRPUBD-D0xOVN1A.js → ABYRPUBD-D4oehH5y.js} +2 -2
  24. package/dist/client/assets/AlertDialogRoot-BI19p1Pb.js +2 -0
  25. package/dist/client/assets/{AnimatedHeight-yuTG4G03.js → AnimatedHeight-DT585xP0.js} +2 -2
  26. package/dist/client/assets/{AuthSurfaceShell-CCBOJP5G.js → AuthSurfaceShell-C312CXz7.js} +2 -2
  27. package/dist/client/assets/{BB2UYUI2-BdXGRPif.js → BB2UYUI2-BkFcdWkE.js} +2 -2
  28. package/dist/client/assets/{BUM34MOA-isqGnSvm.js → BUM34MOA-DK6xDbTB.js} +2 -2
  29. package/dist/client/assets/{CEQABKGZ-DE0PWXRq.js → CEQABKGZ-rLn9wSBN.js} +2 -2
  30. package/dist/client/assets/{CXAC5362-0Zr5tv4C.js → CXAC5362-C1eQCQMX.js} +2 -2
  31. package/dist/client/assets/ChatGptUsageButton-BldpBXxU.js +2 -0
  32. package/dist/client/assets/ChatMarkdown-BUoR67CT.js +49 -0
  33. package/dist/client/assets/CheckboxIndicator-C4iAbUMh.js +2 -0
  34. package/dist/client/assets/ClippedText-TtLeyAVc.js +2 -0
  35. package/dist/client/assets/CodexSetupSection.logic-BO6ZAijp.js +2 -0
  36. package/dist/client/assets/ComboboxClear-CtNsa8Al.js +2 -0
  37. package/dist/client/assets/ComboboxGroupLabel-vQ7y8c50.js +2 -0
  38. package/dist/client/assets/{CommandBlock-CluJmhVo.js → CommandBlock-40eSIrOe.js} +2 -2
  39. package/dist/client/assets/CompositeRoot-CL7X20MU.js +2 -0
  40. package/dist/client/assets/ConnectAgentSurface-B_AYPHWs.js +2 -0
  41. package/dist/client/assets/{ConnectionStatusDot-CpmZ8NE5.js → ConnectionStatusDot-7Tjfknn6.js} +2 -2
  42. package/dist/client/assets/{DRLTVNUE-Dttc5MrD.js → DRLTVNUE-BPoomdQn.js} +2 -2
  43. package/dist/client/assets/{DYY6UVD2-DTrZAR1D.js → DYY6UVD2-BVvdA84B.js} +2 -2
  44. package/dist/client/assets/DevicePanel-Cqexcbm2.js +2 -0
  45. package/dist/client/assets/DeviceSetup-Cdyw5Z9a.js +2 -0
  46. package/dist/client/assets/DialogTitle-CFYK6V6-.js +2 -0
  47. package/dist/client/assets/{DiffCommentAnnotation-6V9nI3Cm.js → DiffCommentAnnotation-C28NAT6f.js} +3 -3
  48. package/dist/client/assets/{DiffFileTree-CBEjDul5.js → DiffFileTree-DNP9E3To.js} +2 -2
  49. package/dist/client/assets/DiffPanel-CrswOKS6.js +2 -0
  50. package/dist/client/assets/{DiffWorkerPoolProvider-f4-YQsHo.js → DiffWorkerPoolProvider-TgqbZJCv.js} +3 -3
  51. package/dist/client/assets/{EmbeddedDesign-DSEjf0KK.js → EmbeddedDesign-Bdq5oAfI.js} +8 -8
  52. package/dist/client/assets/{EnvironmentMachineIcon-B6wAZat7.js → EnvironmentMachineIcon-B81Bujkx.js} +2 -2
  53. package/dist/client/assets/{ExpandableText-Cjat32hh.js → ExpandableText-CViqRFUp.js} +2 -2
  54. package/dist/client/assets/{FNOVOB4O-LisHSqAM.js → FNOVOB4O-CmMgcKnc.js} +2 -2
  55. package/dist/client/assets/FieldControl-95mCsa0m.js +2 -0
  56. package/dist/client/assets/{FileDiff-Bj9kBLN2.js → FileDiff-BnZVGRTP.js} +2 -2
  57. package/dist/client/assets/FilePreviewPanel-BUTTBdpa.js +34 -0
  58. package/dist/client/assets/{FoldedSettingsSection-DIlgxayr.js → FoldedSettingsSection-CioXtXIT.js} +2 -2
  59. package/dist/client/assets/FormContext-BcA1kdFD.js +2 -0
  60. package/dist/client/assets/{HDGCDEEZ-Bn1jLSys.js → HDGCDEEZ-BsN0BbNt.js} +2 -2
  61. package/dist/client/assets/{HSJLKHB7-CHpiqxlA.js → HSJLKHB7-Bn8VFRt5.js} +2 -2
  62. package/dist/client/assets/{Icons-Be1TL1sN.js → Icons-D_LFMxsj.js} +2 -2
  63. package/dist/client/assets/Input-C9KIhPlP.js +2 -0
  64. package/dist/client/assets/JZOYTAAL-B8H2VC7A.js +1 -0
  65. package/dist/client/assets/{K3MD6TGW-D5oCFPkP.js → K3MD6TGW-BEaTend7.js} +2 -2
  66. package/dist/client/assets/{K7RP3OMA-ZIPW--CU.js → K7RP3OMA-Ca837W6z.js} +2 -2
  67. package/dist/client/assets/KeybindingsSettings.logic-DwMUZYvv.js +2 -0
  68. package/dist/client/assets/{LHDIQX7Q-BkDTNH4X.js → LHDIQX7Q-kLYZmy22.js} +2 -2
  69. package/dist/client/assets/{LUXOKEGN-BMFFLlMk.js → LUXOKEGN-C6-9ARpy.js} +2 -2
  70. package/dist/client/assets/LinkMachineSelect-BVNnYUBb.js +2 -0
  71. package/dist/client/assets/{MathTypeset-DpXMOBGY.js → MathTypeset-CO0wlzDm.js} +2 -2
  72. package/dist/client/assets/{N3JZAHOW-CV9TIlCo.js → N3JZAHOW-BFAKVTw8.js} +2 -2
  73. package/dist/client/assets/{NUIALGQ3-WBqakHka.js → NUIALGQ3-DJg3tvBl.js} +2 -2
  74. package/dist/client/assets/{NoProjectsHero-BfU7AxbB.js → NoProjectsHero-ClDVFY0-.js} +2 -2
  75. package/dist/client/assets/{O65XPQGZ-CYhr2tYZ.js → O65XPQGZ-C5dkxqix.js} +2 -2
  76. package/dist/client/assets/{O7XIQ6OM-D2JMbFqc.js → O7XIQ6OM-BUT403yQ.js} +2 -2
  77. package/dist/client/assets/{OFQON5FD-B1aTfx9o.js → OFQON5FD-BPK3FXUG.js} +2 -2
  78. package/dist/client/assets/P4ConnectAccountPages-ChT866qO.js +2 -0
  79. package/dist/client/assets/{P4ConnectSidebarSignIn-Bc4xlsJh.js → P4ConnectSidebarSignIn-D7BBbl_u.js} +2 -2
  80. package/dist/client/assets/{PJQHF43J-Dm3RMjWi.js → PJQHF43J-DrfICuu-.js} +2 -2
  81. package/dist/client/assets/PanelLayoutControls-DMUv135M.js +216 -0
  82. package/dist/client/assets/PierreEntryIcon-DLXDEcqA.js +2 -0
  83. package/dist/client/assets/PopoverHandle-D8JhsX32.js +2 -0
  84. package/dist/client/assets/PreviewPanel-D7YWnWZS.js +2 -0
  85. package/dist/client/assets/ProjectDefaultsSettings-BZSw74tU.js +2 -0
  86. package/dist/client/assets/ProjectFavicon-BbtNdeB8.js +3 -0
  87. package/dist/client/assets/{ProjectIconPickerDialog-D03-Jrsi.js → ProjectIconPickerDialog-7vur_TCX.js} +2 -2
  88. package/dist/client/assets/{ProjectMonogram-C8FlNLaU.js → ProjectMonogram-CjAGnMXr.js} +2 -2
  89. package/dist/client/assets/{ProviderAuthTerminal-DMTbKboR.js → ProviderAuthTerminal-83vDClUK.js} +2 -2
  90. package/dist/client/assets/ProviderModelPicker-af7MWLPO.js +2 -0
  91. package/dist/client/assets/{ProviderSettingsForm-DrCFln8c.js → ProviderSettingsForm-B4N4tsxv.js} +2 -2
  92. package/dist/client/assets/PullRequestCodeTab-B07M_QW4.js +6 -0
  93. package/dist/client/assets/{RHNBAITX-C7mnxleL.js → RHNBAITX-CzAdLNMd.js} +2 -2
  94. package/dist/client/assets/ReadOnlySourcePreview-CRy5hHfx.js +2 -0
  95. package/dist/client/assets/{RedactedSensitiveText-DACYfm7e.js → RedactedSensitiveText-B-u4PB3I.js} +2 -2
  96. package/dist/client/assets/RenderErrorBoundary-BbxLD-66.js +23 -0
  97. package/dist/client/assets/RightPanelResizeHandle-BODMyZa6.js +2 -0
  98. package/dist/client/assets/{SLD4V6NK-BkeVs7gb.js → SLD4V6NK-DIFaAadw.js} +2 -2
  99. package/dist/client/assets/ScheduledTasksSettings-BTi69FRq.js +6 -0
  100. package/dist/client/assets/{ScopedSwitch-D1uscoF8.js → ScopedSwitch-sSIKDf2q.js} +2 -2
  101. package/dist/client/assets/ScrollAreaCorner-CsKGemsf.js +2 -0
  102. package/dist/client/assets/{SecretInput-ZW3hnCoN.js → SecretInput-DxjaAnSE.js} +2 -2
  103. package/dist/client/assets/SelectScrollUpArrow-BMZtcPXM.js +2 -0
  104. package/dist/client/assets/SelfImproveSettingsSection-Dx6spJXh.js +2 -0
  105. package/dist/client/assets/SettingsPanels-DhuEF0_Y.js +46 -0
  106. package/dist/client/assets/{SettingsPanels.logic-H5v8FTnu.js → SettingsPanels.logic-D5Fnq4gS.js} +2 -2
  107. package/dist/client/assets/{SettingsScopeNotice-gFtgpybO.js → SettingsScopeNotice-B1JDmqM6.js} +2 -2
  108. package/dist/client/assets/{SidebarStageBackdrop-DSuAw8Ob.js → SidebarStageBackdrop-Bbv3JBlJ.js} +2 -2
  109. package/dist/client/assets/{T3PCR2KE-D6MHoseG.js → T3PCR2KE-CACWvOHn.js} +2 -2
  110. package/dist/client/assets/{TKWO2OVW-gZK7dLQZ.js → TKWO2OVW-DpiGaVko.js} +2 -2
  111. package/dist/client/assets/{TSHNXIZL-BKUmF3Cu.js → TSHNXIZL-Cs6g4gXN.js} +2 -2
  112. package/dist/client/assets/ThemeEditorPanel-w-RJEK3t.js +5 -0
  113. package/dist/client/assets/{ComposerPromptEditor-DR1WsmjD.js → ThreadDetailsItemsMenu-DEwUOoLt.js} +60 -60
  114. package/dist/client/assets/ThreadTerminalDrawer-CY2qHldP.js +5 -0
  115. package/dist/client/assets/TooltipProvider-Czzm7ro-.js +2 -0
  116. package/dist/client/assets/{UQJE5E4I-D6av033t.js → UQJE5E4I-C2gKDRv_.js} +2 -2
  117. package/dist/client/assets/{USNYFO5S-Cy6sDMEU.js → USNYFO5S-CQ8LfY6F.js} +2 -2
  118. package/dist/client/assets/{Virtualizer-B_IsUzcr.js → Virtualizer-DsEq6qUF.js} +2 -2
  119. package/dist/client/assets/{WEVWDWVA-Cq1fZcng.js → WEVWDWVA-DK2GTAKk.js} +2 -2
  120. package/dist/client/assets/{WorkspaceBreadcrumb-DbQW7iNE.js → WorkspaceBreadcrumb-BImJJpuo.js} +2 -2
  121. package/dist/client/assets/{WorkspacePageContainer-BxI-x0oV.js → WorkspacePageContainer-BlYFBUKE.js} +2 -2
  122. package/dist/client/assets/{WorkspacePageHeader-Bc_F6Uog.js → WorkspacePageHeader-B7O16593.js} +2 -2
  123. package/dist/client/assets/{X5RFHQXM-DdtKPA-W.js → X5RFHQXM-sPxDCIwv.js} +2 -2
  124. package/dist/client/assets/{X62E3GBT-C7OjB5pB.js → X62E3GBT-DVWr270S.js} +2 -2
  125. package/dist/client/assets/{XBNEOJTC-_Tbl2Kwh.js → XBNEOJTC-C4ZNtSrU.js} +2 -2
  126. package/dist/client/assets/{YHV2MVVZ-CA4YS5f4.js → YHV2MVVZ-aSYUfq9n.js} +2 -2
  127. package/dist/client/assets/{YURCZMG2-DSnhUUsH.js → YURCZMG2-fnxZxUja.js} +2 -2
  128. package/dist/client/assets/{YVG2LODB-D-qFsH5t.js → YVG2LODB-DxaZKaXT.js} +2 -2
  129. package/dist/client/assets/_chat-BeJoXsdK.js +47 -0
  130. package/dist/client/assets/{_chat.design-SX7SShjI.js → _chat.design-AJz30uXq.js} +2 -2
  131. package/dist/client/assets/_chat.index-D1csjyRQ.js +2 -0
  132. package/dist/client/assets/_chat.new-IhhWgwNo.js +4 -0
  133. package/dist/client/assets/_chat.pull-requests-B84LUHIv.js +2 -0
  134. package/dist/client/assets/{alert-BOVMKHDy.js → alert-D6MFRWZv.js} +2 -2
  135. package/dist/client/assets/{alert-dialog-Du3fYY3I.js → alert-dialog-BCq0Qme9.js} +2 -2
  136. package/dist/client/assets/assetUrls-CpRsTTqn.js +2 -0
  137. package/dist/client/assets/assets-Dh1LFwqL.js +2 -0
  138. package/dist/client/assets/browserHistoryStore-BVEWgOnh.js +2 -0
  139. package/dist/client/assets/{browserLinkTarget-Bf9H9UVe.js → browserLinkTarget-IOprEiHF.js} +2 -2
  140. package/dist/client/assets/{checkbox-d50pgAVe.js → checkbox-CGhJug34.js} +2 -2
  141. package/dist/client/assets/{color-picker-zcQshxaE.js → color-picker-CRaqqL5F.js} +2 -2
  142. package/dist/client/assets/{combobox-BrCd1kH5.js → combobox-5RzytEjd.js} +2 -2
  143. package/dist/client/assets/{command-DFkhX6wm.js → command-06bu9QoQ.js} +2 -2
  144. package/dist/client/assets/{connect-DkH09d_M.js → connect-7OV1IEwO.js} +2 -2
  145. package/dist/client/assets/connect-agent-B6pgZuy8.js +2 -0
  146. package/dist/client/assets/design-DSoix9e1.js +2 -0
  147. package/dist/client/assets/device-DQmQm4GC.js +2 -0
  148. package/dist/client/assets/{dialog-BpR3dRVS.js → dialog-DTVhbEqi.js} +2 -2
  149. package/dist/client/assets/{diffRendering-BuOJdnZ8.js → diffRendering-DAzPanqh.js} +3 -3
  150. package/dist/client/assets/{dist-CMJL98Oz.js → dist-BuxsAlG0.js} +3 -3
  151. package/dist/client/assets/draft-input-BTetoXSt.js +2 -0
  152. package/dist/client/assets/{duoViewer-ChrCWcjO.js → duoViewer-DxmaOmHS.js} +2 -2
  153. package/dist/client/assets/{dynamic-CVt07u2H.js → dynamic-wBSCLNxy.js} +3 -3
  154. package/dist/client/assets/{embeddedScripts-BWqMWwOU.js → embeddedScripts-ZebptRJ0.js} +2 -2
  155. package/dist/client/assets/{empty-Cy-8us9l.js → empty-B4h5DyMQ.js} +2 -2
  156. package/dist/client/assets/entities-CWtNgawi.js +2 -0
  157. package/dist/client/assets/env-BfPir1X4.js +2 -0
  158. package/dist/client/assets/{fileLinks-BgHa8yE4.js → fileLinks-BfcK2bJU.js} +2 -2
  159. package/dist/client/assets/{fileTreeExpansion-CBn1SzSX.js → fileTreeExpansion-DjiK1m5s.js} +2 -2
  160. package/dist/client/assets/{getDiffFileInput-IQ1TDM4E.js → getDiffFileInput-XE3jyXxK.js} +2 -2
  161. package/dist/client/assets/{guideRunStore-DfNfJUIu.js → guideRunStore-CzF0q6A8.js} +2 -2
  162. package/dist/client/assets/{htmlRender-lwQ3HyqS.js → htmlRender-DGe3WaPg.js} +2 -2
  163. package/dist/client/assets/index-CurDuwfz.js +3 -0
  164. package/dist/client/assets/{input-FUjAUGXY.js → input-CQaedaQh.js} +2 -2
  165. package/dist/client/assets/{input-group-BdZ_CKvG.js → input-group-BQ_2ox-w.js} +2 -2
  166. package/dist/client/assets/{kbd-CGgmav-Q.js → kbd-DQRicdHu.js} +2 -2
  167. package/dist/client/assets/key-round-POn1aRXW.js +2 -0
  168. package/dist/client/assets/{keybindings-DuCyi9aT.js → keybindings-tgj8XFFz.js} +2 -2
  169. package/dist/client/assets/{lazy-Bs2SFpYS.js → lazy-DmPH_lNd.js} +4 -4
  170. package/dist/client/assets/{lazyRouteComponent-CYNRqeNP.js → lazyRouteComponent-CE6uW_5p.js} +2 -2
  171. package/dist/client/assets/{link-DW1IQk5s.js → link-CKfckeju.js} +2 -2
  172. package/dist/client/assets/{linkedPrompt-yo2xi4Z8.js → linkedPrompt-68_t5vwh.js} +2 -2
  173. package/dist/client/assets/main-B1sXOjZZ.js +37 -0
  174. package/dist/client/assets/main-CbkvDRKP.css +2 -0
  175. package/dist/client/assets/{mediaReference-BQ9J-tjl.js → mediaReference-DQ6GIZY7.js} +2 -2
  176. package/dist/client/assets/mediaSource-DfTsMdqm.js +2 -0
  177. package/dist/client/assets/number-field-xEi5ylvp.js +2 -0
  178. package/dist/client/assets/{observeResize-CZuDzlcZ.js → observeResize-BbXolq6K.js} +2 -2
  179. package/dist/client/assets/onboarding-CkdZxdNL.js +2 -0
  180. package/dist/client/assets/openFileInPreview-BHhDd-id.js +2 -0
  181. package/dist/client/assets/{p4ProjectFile-jwYvYDE-.js → p4ProjectFile-5VDI-yAx.js} +2 -2
  182. package/dist/client/assets/{pair-OPslYcM9.js → pair-BpCo33SH.js} +2 -2
  183. package/dist/client/assets/{pendingSendStore-CLwMM17y.js → pendingSendStore-Ba--K6cH.js} +2 -2
  184. package/dist/client/assets/{phoneViewer-CkTxyA9N.js → phoneViewer-C1aGY-h1.js} +2 -2
  185. package/dist/client/assets/{pierre-icons-DY8ZeGCr.js → pierre-icons-BdcegjLq.js} +3 -3
  186. package/dist/client/assets/popover-BB2K1---.js +2 -0
  187. package/dist/client/assets/preview-B4_sjsUX.js +2 -0
  188. package/dist/client/assets/preview-DgXn94k5.js +2 -0
  189. package/dist/client/assets/{previewMiniPlayerStore-DUPe1gGI.js → previewMiniPlayerStore-DguWdL1f.js} +2 -2
  190. package/dist/client/assets/primary-BDoRkJqU.js +2 -0
  191. package/dist/client/assets/primaryCloudLinkState-Cc0Xobh6.js +2 -0
  192. package/dist/client/assets/projectFilesQueryState-BdfD5cZ2.js +2 -0
  193. package/dist/client/assets/projectScriptEditor-faOsFlds.js +2 -0
  194. package/dist/client/assets/{providerSkills-Ca_7EbAx.js → providerSkills-C8PrnHb-.js} +2 -2
  195. package/dist/client/assets/{pullRequestDetail.logic-DYx7bEwE.js → pullRequestDetail.logic-kOhR5jr9.js} +4 -4
  196. package/dist/client/assets/{pullRequestIcons-csprKuju.js → pullRequestIcons-CbDg0o8q.js} +2 -2
  197. package/dist/client/assets/{pullRequestReviewStore-_uEYgfaW.js → pullRequestReviewStore-0WIH92NQ.js} +2 -2
  198. package/dist/client/assets/pullRequests-Cf9E2kW-.js +2 -0
  199. package/dist/client/assets/queries-Cl508kPw.js +2 -0
  200. package/dist/client/assets/query-D3KVoW9G.js +2 -0
  201. package/dist/client/assets/radio-group-BnZVD-CO.js +2 -0
  202. package/dist/client/assets/relay-Do9UB5iT.js +2 -0
  203. package/dist/client/assets/{renderScheduler-DR2WAtIH.js → renderScheduler-DsjkE3rh.js} +2 -2
  204. package/dist/client/assets/rightPanelStore-DB1OP4MT.js +2 -0
  205. package/dist/client/assets/runtime-BBYIQ0f-.js +7 -0
  206. package/dist/client/assets/runtimeModeConfig-CRXk0H6e.js +2 -0
  207. package/dist/client/assets/scheduledTasksSettings.logic-Dw_swg_M.js +3 -0
  208. package/dist/client/assets/{scroll-area-Cf7uLi_s.js → scroll-area-Cm9XZdHp.js} +2 -2
  209. package/dist/client/assets/{select-vBkqTMKL.js → select-Cz_1ByI4.js} +2 -2
  210. package/dist/client/assets/{selfImproveFindings-4GGN9cRm.js → selfImproveFindings-DtoTFNL_.js} +2 -2
  211. package/dist/client/assets/semver-BoU8Be_3.js +2 -0
  212. package/dist/client/assets/server-Dkj4NeYG.js +2 -0
  213. package/dist/client/assets/session-CBEVNHld.js +2 -0
  214. package/dist/client/assets/{session-logic-D8FbVFDm.js → session-logic-DB_ei-pn.js} +4 -4
  215. package/dist/client/assets/{settings-C58Y7hMl.js → settings-Yvo1RMvg.js} +2 -2
  216. package/dist/client/assets/{settings.appearance-C9ZmuG-n.js → settings.appearance-ONDNW-gc.js} +2 -2
  217. package/dist/client/assets/settings.archived-CjdyCMyi.js +2 -0
  218. package/dist/client/assets/{settings.computer-use-CeIs-8zf.js → settings.computer-use-97ffp9C_.js} +2 -2
  219. package/dist/client/assets/settings.connections-w3qKRKGa.js +2 -0
  220. package/dist/client/assets/settings.data-controls-C8ozSexu.js +2 -0
  221. package/dist/client/assets/{settings.decisions-DagsCV4K.js → settings.decisions-BvR3_OTv.js} +2 -2
  222. package/dist/client/assets/{settings.designs-DEThhuEj.js → settings.designs-CB8PWHwW.js} +2 -2
  223. package/dist/client/assets/settings.diagnostics-DdInPrq0.js +2 -0
  224. package/dist/client/assets/{settings.general-RgU1jNmB.js → settings.general-Cf_bIbyH.js} +2 -2
  225. package/dist/client/assets/settings.integrations-pj9KVvtd.js +2 -0
  226. package/dist/client/assets/settings.keybindings-3diGciV1.js +2 -0
  227. package/dist/client/assets/{settings.open-source-licenses-rG8Neftl.js → settings.open-source-licenses-DlqO6HBa.js} +2 -2
  228. package/dist/client/assets/{settings.plugins-Dr0VpcPy.js → settings.plugins-DpaJJH_J.js} +4 -4
  229. package/dist/client/assets/settings.projects-Bfh3CJ1a.js +4 -0
  230. package/dist/client/assets/settings.providers-DNiEeQYT.js +3 -0
  231. package/dist/client/assets/{settings.scheduled-tasks-DwUd14Xj.js → settings.scheduled-tasks-BIaHEXVF.js} +2 -2
  232. package/dist/client/assets/settings.secrets-BSNXem5A.js +2 -0
  233. package/dist/client/assets/{settings.snap-shot-CTMJRtJe.js → settings.snap-shot-Ds0ywKhE.js} +2 -2
  234. package/dist/client/assets/settings.source-control-C41AVNSm.js +2 -0
  235. package/dist/client/assets/settings.storage-B-Hm5vEC.js +2 -0
  236. package/dist/client/assets/settingsLayout-BbEwQ6Fy.js +3 -0
  237. package/dist/client/assets/{sidebar-O52WtiJv.js → sidebar-B70J7v16.js} +2 -2
  238. package/dist/client/assets/{sidebarProjectGrouping-BYVdJp_w.js → sidebarProjectGrouping-Cy06FqQF.js} +2 -2
  239. package/dist/client/assets/{skeleton-PlPtYr_f.js → skeleton-BavPX8IL.js} +2 -2
  240. package/dist/client/assets/sourceControl-De64nxc-.js +2 -0
  241. package/dist/client/assets/{sourceControlClients-CtMx7u86.js → sourceControlClients-BofXnV5S.js} +2 -2
  242. package/dist/client/assets/{spinner-BZ5ohCyO.js → spinner-BiCpg0TU.js} +2 -2
  243. package/dist/client/assets/terminal-links-DkNuyYrs.js +2 -0
  244. package/dist/client/assets/terminalSessions-BLnAzTpE.js +2 -0
  245. package/dist/client/assets/{textarea-DIg__-Gi.js → textarea-DPWqoJRQ.js} +2 -2
  246. package/dist/client/assets/themePalette-1UQmJk98.js +5 -0
  247. package/dist/client/assets/threadCheckpoints-C5aLz9nv.js +2 -0
  248. package/dist/client/assets/{toggle-DJ8KOwn5.js → toggle-DERKSGyC.js} +2 -2
  249. package/dist/client/assets/{toggle-group-2e3XGJdx.js → toggle-group-DYSJFIn3.js} +2 -2
  250. package/dist/client/assets/tooltip-C7NAkYG3.js +2 -0
  251. package/dist/client/assets/{uiStateStore-4i21PZUL.js → uiStateStore-FYiLqqos.js} +2 -2
  252. package/dist/client/assets/usage-CtcqAwlu.js +2 -0
  253. package/dist/client/assets/{usageAccess-CsMv6eC9.js → usageAccess-2Wks5kIN.js} +2 -2
  254. package/dist/client/assets/{usageFormat-DhefL58S.js → usageFormat-BZJ9qCn4.js} +2 -2
  255. package/dist/client/assets/{usageShortcuts-CREc0FBr.js → usageShortcuts-BJyp1xT6.js} +2 -2
  256. package/dist/client/assets/use-atom-command-BbFDhw_c.js +2 -0
  257. package/dist/client/assets/useAriaLabelledBy-BJnK5b5h.js +2 -0
  258. package/dist/client/assets/useHandleNewThread-C6MtV3AM.js +2 -0
  259. package/dist/client/assets/{useLocation-DHd-KBb-.js → useLocation-NTw9A5XQ.js} +2 -2
  260. package/dist/client/assets/{useNavigate-AZUCIeU4.js → useNavigate-DV9bXnWr.js} +2 -2
  261. package/dist/client/assets/{useNavigateBack-C7DkQuEE.js → useNavigateBack-D62rsj_4.js} +2 -2
  262. package/dist/client/assets/{useP4ConnectAuthPrompt-u1GHgwlc.js → useP4ConnectAuthPrompt-Bj5GIxgy.js} +2 -2
  263. package/dist/client/assets/{useParams-rbhXoEw9.js → useParams-jklHVL7l.js} +2 -2
  264. package/dist/client/assets/{usePermissionStatus-DHzE_VGG.js → usePermissionStatus-DaCu90iN.js} +2 -2
  265. package/dist/client/assets/usePopupViewport-D1lXH2SQ.js +2 -0
  266. package/dist/client/assets/usePreviousValue-Dx4Nv0v8.js +2 -0
  267. package/dist/client/assets/usePullRequestActions-WFmep5Tm.js +3 -0
  268. package/dist/client/assets/useRegisterFieldControl-BtJcyaxh.js +2 -0
  269. package/dist/client/assets/{useScopedModelAvailability-D6cbxQLl.js → useScopedModelAvailability-hsJL85Tg.js} +2 -2
  270. package/dist/client/assets/useSettings-EYJbJzT3.js +3 -0
  271. package/dist/client/assets/utils-DjbLtxuo.js +37 -0
  272. package/dist/client/assets/vcsRefInvalidation-DkXoQApH.js +2 -0
  273. package/dist/client/assets/welcome-uKSqaFeK.js +2 -0
  274. package/dist/client/index.html +1 -1
  275. package/dist/client/third-party-licenses.json +1 -1
  276. package/dist/pele-RvfyfJB5.mjs +29609 -0
  277. package/dist/{renderer-CuqsXHrO.mjs → renderer-D9dDeERN.mjs} +68 -13
  278. package/dist/resource-monitor/darwin-arm64/p4-resource-monitor +0 -0
  279. package/dist/{runtime-CWPUW_8Y.mjs → runtime-C3UJDGLb.mjs} +159 -19
  280. package/package.json +1 -1
  281. package/dist/AcpMcpStdioBridge-BFMDWrrj.mjs +0 -3
  282. package/dist/client/assets/AlertDialogRoot-DaczVYX9.js +0 -2
  283. package/dist/client/assets/ChatGptUsageButton-w6RkBCUH.js +0 -2
  284. package/dist/client/assets/ChatMarkdown-CFUfXlYp.js +0 -48
  285. package/dist/client/assets/CheckboxIndicator-lkbFKbE7.js +0 -2
  286. package/dist/client/assets/ClippedText-Bf8FSQkX.js +0 -2
  287. package/dist/client/assets/CodexSetupSection.logic-SHExnMKR.js +0 -2
  288. package/dist/client/assets/ComboboxClear-B0HJXjbz.js +0 -2
  289. package/dist/client/assets/ComboboxGroupLabel-CMc5xUrd.js +0 -2
  290. package/dist/client/assets/CompositeRoot-BMHKb-nN.js +0 -2
  291. package/dist/client/assets/ConnectAgentSurface-CNWdh9ck.js +0 -2
  292. package/dist/client/assets/DevicePanel-CRFuAv_j.js +0 -2
  293. package/dist/client/assets/DeviceSetup-DRzepax4.js +0 -2
  294. package/dist/client/assets/DialogTitle-pLX9Mw1n.js +0 -2
  295. package/dist/client/assets/DiffPanel-CM5Rvb_z.js +0 -2
  296. package/dist/client/assets/FieldControl-DwBVFJAI.js +0 -2
  297. package/dist/client/assets/FilePreviewPanel-z6NirC2y.js +0 -34
  298. package/dist/client/assets/FormContext-DcnLkh-4.js +0 -2
  299. package/dist/client/assets/Input-BZ1XdBC0.js +0 -2
  300. package/dist/client/assets/JZOYTAAL-BZEjBuKj.js +0 -1
  301. package/dist/client/assets/KeybindingsSettings.logic-Ctmq4InP.js +0 -2
  302. package/dist/client/assets/LinkMachineSelect-DGm4EDKi.js +0 -2
  303. package/dist/client/assets/P4ConnectAccountPages-J205rNHS.js +0 -2
  304. package/dist/client/assets/PanelLayoutControls-BQZYES2T.js +0 -216
  305. package/dist/client/assets/PierreEntryIcon-CHy821MU.js +0 -2
  306. package/dist/client/assets/PopoverHandle-BkzqaTB6.js +0 -2
  307. package/dist/client/assets/PreviewPanel-D8V2zDl4.js +0 -2
  308. package/dist/client/assets/ProjectDefaultsSettings-6UkudkKP.js +0 -2
  309. package/dist/client/assets/ProjectFavicon-LcyFYpHB.js +0 -3
  310. package/dist/client/assets/ProviderModelPicker-CpWE-Lfx.js +0 -2
  311. package/dist/client/assets/PullRequestCodeTab-CjBrGNWY.js +0 -6
  312. package/dist/client/assets/ReadOnlySourcePreview-BasbTHVd.js +0 -2
  313. package/dist/client/assets/RenderErrorBoundary-CIVNp8r9.js +0 -23
  314. package/dist/client/assets/ScheduledTasksSettings-DpYigye5.js +0 -4
  315. package/dist/client/assets/ScrollAreaCorner-DBtks1xb.js +0 -2
  316. package/dist/client/assets/SelectScrollUpArrow-Bq-GYRhT.js +0 -2
  317. package/dist/client/assets/SelfImproveSettingsSection-CDIhJO4P.js +0 -2
  318. package/dist/client/assets/SettingsPanels-Co5mks6X.js +0 -46
  319. package/dist/client/assets/ThemeEditorPanel-lI_9CbBH.js +0 -5
  320. package/dist/client/assets/ThreadTerminalDrawer-CD3plt2C.js +0 -5
  321. package/dist/client/assets/TooltipViewport-Be_gbUW1.js +0 -2
  322. package/dist/client/assets/_chat-Cnc6rxt6.js +0 -47
  323. package/dist/client/assets/_chat.index-Bz1lJLpv.js +0 -2
  324. package/dist/client/assets/_chat.new-BEqc5oJc.js +0 -4
  325. package/dist/client/assets/_chat.pull-requests-A3IwVYWs.js +0 -2
  326. package/dist/client/assets/assetUrls-CYjvy6P4.js +0 -2
  327. package/dist/client/assets/assets-JgE2I_Ix.js +0 -2
  328. package/dist/client/assets/browserHistoryStore-CdncPjG8.js +0 -2
  329. package/dist/client/assets/connect-agent-DJHm1Ubj.js +0 -2
  330. package/dist/client/assets/design-DrpehYJf.js +0 -2
  331. package/dist/client/assets/device-Nh7DArH7.js +0 -2
  332. package/dist/client/assets/draft-input-CzfhM72Z.js +0 -2
  333. package/dist/client/assets/entities-aKdRyfsJ.js +0 -2
  334. package/dist/client/assets/env-wK1YYxA8.js +0 -2
  335. package/dist/client/assets/index-BXvrSYK3.js +0 -3
  336. package/dist/client/assets/key-round-CoEmBzzZ.js +0 -2
  337. package/dist/client/assets/main-BD4pReCY.css +0 -2
  338. package/dist/client/assets/main-C0z861OK.js +0 -37
  339. package/dist/client/assets/mediaSource-BLpxwEw3.js +0 -2
  340. package/dist/client/assets/number-field-Pve745k3.js +0 -2
  341. package/dist/client/assets/onboarding-CE8pzS12.js +0 -2
  342. package/dist/client/assets/openFileInPreview-Dns9tPaB.js +0 -2
  343. package/dist/client/assets/popover-hYAmvSJj.js +0 -2
  344. package/dist/client/assets/preview-CI9HEdfV.js +0 -2
  345. package/dist/client/assets/preview-YhZE3kRt.js +0 -2
  346. package/dist/client/assets/primary-BlS2rEKe.js +0 -2
  347. package/dist/client/assets/primaryCloudLinkState-CyPf4N0F.js +0 -2
  348. package/dist/client/assets/projectFilesQueryState-BdWJ4WwI.js +0 -2
  349. package/dist/client/assets/projectScriptEditor-C0FBhCbn.js +0 -2
  350. package/dist/client/assets/pullRequests-B85p5Xnw.js +0 -2
  351. package/dist/client/assets/queries-B0FvRKmk.js +0 -2
  352. package/dist/client/assets/query-B2_Td0ad.js +0 -2
  353. package/dist/client/assets/radio-group-IyWHDcIP.js +0 -2
  354. package/dist/client/assets/rightPanelStore-rZSIb-5z.js +0 -2
  355. package/dist/client/assets/runtime-BK2Lh1vB.js +0 -3
  356. package/dist/client/assets/runtime-BVmDVuJ-.js +0 -6
  357. package/dist/client/assets/runtimeModeConfig-DFxXOIlV.js +0 -2
  358. package/dist/client/assets/scheduledTasksSettings.logic-W9AQpJk4.js +0 -3
  359. package/dist/client/assets/semver-CFbvOQKc.js +0 -2
  360. package/dist/client/assets/server-DwkxciXh.js +0 -2
  361. package/dist/client/assets/session-BIwsf8Q4.js +0 -2
  362. package/dist/client/assets/settings.archived-BxqS4kuW.js +0 -2
  363. package/dist/client/assets/settings.connections-CEr4PdrJ.js +0 -2
  364. package/dist/client/assets/settings.data-controls-BbzJxjBi.js +0 -2
  365. package/dist/client/assets/settings.diagnostics-DdsecwWn.js +0 -2
  366. package/dist/client/assets/settings.integrations-CO-aLXSC.js +0 -2
  367. package/dist/client/assets/settings.keybindings-CU8fBQaI.js +0 -2
  368. package/dist/client/assets/settings.projects-hxwk8_7r.js +0 -4
  369. package/dist/client/assets/settings.providers-D5-Kj1jY.js +0 -3
  370. package/dist/client/assets/settings.source-control-BHD5KE8W.js +0 -2
  371. package/dist/client/assets/settings.storage-Bhd9ragP.js +0 -2
  372. package/dist/client/assets/settingsLayout-WhjsCfB6.js +0 -3
  373. package/dist/client/assets/sourceControl-BkJeQRrv.js +0 -2
  374. package/dist/client/assets/terminal-links-UI2UJn0y.js +0 -2
  375. package/dist/client/assets/terminalSessions-C1xOLG3i.js +0 -2
  376. package/dist/client/assets/themePalette-BMlBfFUx.js +0 -5
  377. package/dist/client/assets/toast-BZ96uuab.js +0 -2
  378. package/dist/client/assets/tooltip-BPiLl1TV.js +0 -2
  379. package/dist/client/assets/usage-uuNPbJve.js +0 -2
  380. package/dist/client/assets/use-atom-command-CdV5BZYB.js +0 -2
  381. package/dist/client/assets/useAriaLabelledBy-CYRfRdAq.js +0 -2
  382. package/dist/client/assets/useHandleNewThread-BsnMrEPr.js +0 -2
  383. package/dist/client/assets/usePullRequestActions-Cv12eqOn.js +0 -3
  384. package/dist/client/assets/useRegisterFieldControl-D4FG4i3_.js +0 -2
  385. package/dist/client/assets/useSettings-B09a3zie.js +0 -3
  386. package/dist/client/assets/utils-C5GGWTfe.js +0 -37
  387. package/dist/client/assets/vcsRefInvalidation-B66hRx4g.js +0 -2
  388. package/dist/client/assets/welcome-D2-tjFV3.js +0 -2
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Af as i,D as a,Dm as o,Gp as s,Mf as c,Ms as l,Pf as u,Qf as d,Tm as f,b as p,cs as m,fr as h,hE as g,im as _,ld as v,nc as y,ns as b,tc as x,vd as S}from"./utils-C5GGWTfe.js";import{C,k as w}from"./entities-aKdRyfsJ.js";import{a as T,c as E,o as D,s as O,t as k}from"./select-vBkqTMKL.js";import{t as A}from"./useNavigate-AZUCIeU4.js";import{o as j}from"./toast-BZ96uuab.js";import{n as M}from"./query-B2_Td0ad.js";import{u as N}from"./rightPanelStore-rZSIb-5z.js";import{t as P}from"./ClippedText-Bf8FSQkX.js";import{t as F}from"./env-wK1YYxA8.js";import{t as I}from"./textarea-DIg__-Gi.js";import{t as ee}from"./toggle-DJ8KOwn5.js";import{o as L}from"./sidebar-O52WtiJv.js";import{a as R,c as z,n as B,o as V}from"./design-DrpehYJf.js";import{D as H,n as U}from"./useHandleNewThread-BsnMrEPr.js";import{si as W}from"./main-C0z861OK.js";import{t as G}from"./pendingSendStore-CLwMM17y.js";import{t as K}from"./WorkspacePageHeader-Bc_F6Uog.js";var q=n(),J=e(t(),1),Y=e(r(),1),X=[{label:`Landing page`,icon:s,ask:`a landing page`},{label:`Mobile app`,icon:f,ask:`a mobile app screen`},{label:`Web app`,icon:v,ask:`a web app screen`},{label:`Slides`,icon:_,ask:`a slide deck`},{label:`Dashboard`,icon:u,ask:`a dashboard`},{label:`Something else`,icon:o,ask:``}],Z=12;function Q(e,t){return[e?`Design ${e}.`:null,t.trim(),`Create it as a P4 Design document: read design_guide, then design_apply, validate, and render it for review.`].filter(Boolean).join(` `)}function te(e){let t=(0,q.c)(2),n;return t[0]===e?n=t[1]:(n=m(t=>e.map(e=>{let n=t(B({environmentId:e.environmentId,projectId:e.id})),r=g(l(n));return{project:e,entries:(r?.entries??[]).filter(ne),loading:n.waiting&&!r}})),t[0]=e,t[1]=n),b(n)}function ne(e){return!e.secondary}function re(){let e=(0,q.c)(4),t=A(),n=U(),r=w(),i;return e[0]!==n||e[1]!==t||e[2]!==r?(i=async(e,i)=>{let a=i===null?void 0:r.filter(t=>t.environmentId===e.environmentId&&t.projectId===e.id&&t.archivedAt===null&&t.deletedAt===null&&!t.worktreePath&&t.designs.some(e=>e.path===i)).toSorted(ie)[0],o=e=>{let t=N.getState();i===null?t.open(e,`design`):t.openFile(e,i),t.setMaximized(e,!0)};if(a){let e=y(a.environmentId,a.id);o(e),await t({to:`/$environmentId/$threadId`,params:j(e)});return}let s=await n(x(e.environmentId,e.id),{envMode:`local`,worktreePath:null});s&&o(y(e.environmentId,s.threadId))},e[0]=n,e[1]=t,e[2]=r,e[3]=i):i=e[3],i}function ie(e,t){return t.updatedAt.localeCompare(e.updatedAt)}function ae({projects:e}){let t=U(),[n,r]=(0,J.useState)(null),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(null),[u,d]=(0,J.useState)(!1),f=e=>`${e.environmentId}:${e.id}`,m=e.find(e=>f(e)===c)??e[0]??null,g=X.find(e=>e.label===n)?.ask??``,_=m!==null&&o.trim().length>0&&!u,v=async()=>{if(_&&m!==null){d(!0);try{let e=await t(x(m.environmentId,m.id),{envMode:`local`,worktreePath:null});if(!e)return;a.getState().setPrompt(e.draftId,Q(g,o));let n=y(m.environmentId,e.threadId);N.getState().open(n,`design`),N.getState().setMaximized(n,!0),G.getState().request(p(e.draftId))}finally{d(!1)}}};return(0,Y.jsxs)(`section`,{"aria-label":`Start a design`,className:`flex flex-col items-center gap-4`,children:[(0,Y.jsx)(`div`,{role:`group`,"aria-label":`What are you designing?`,className:`flex flex-wrap justify-center gap-2`,children:X.map(e=>(0,Y.jsxs)(ee,{variant:`outline`,pressed:n===e.label,onPressedChange:t=>r(t?e.label:null),children:[(0,Y.jsx)(e.icon,{"aria-hidden":!0}),e.label]},e.label))}),(0,Y.jsxs)(`form`,{className:`w-full max-w-3xl rounded-2xl border border-border bg-card p-3 shadow-sm focus-within:border-ring`,onSubmit:e=>{e.preventDefault(),v()},children:[(0,Y.jsx)(I,{unstyled:!0,"aria-label":`Describe a design`,placeholder:`Design anything…`,value:o,onChange:e=>s(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),v())},className:`w-full`}),(0,Y.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[e.length?(0,Y.jsxs)(k,{value:m?f(m):null,onValueChange:e=>e&&l(e),children:[(0,Y.jsxs)(O,{"aria-label":`Save in`,size:`sm`,className:`w-auto max-w-56`,children:[(0,Y.jsx)(i,{"aria-hidden":!0}),(0,Y.jsx)(E,{children:()=>(0,Y.jsx)(`span`,{className:`truncate`,children:m?.title??`Choose project`})})]}),(0,Y.jsx)(D,{children:e.map(e=>(0,Y.jsx)(T,{value:f(e),children:e.title},f(e)))})]}):null,(0,Y.jsx)(`span`,{className:`flex-1`}),(0,Y.jsx)(h,{type:`submit`,size:`icon-sm`,"aria-label":`Start design`,disabled:!_,children:(0,Y.jsx)(S,{"aria-hidden":!0})})]})]}),e.length===0?(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Add a project to start designing.`}):null]})}function oe(e){let t=(0,q.c)(23),{recent:n,now:r,onOpen:i}=e,a;t[0]!==n.modifiedAt||t[1]!==n.path||t[2]!==n.project.environmentId||t[3]!==n.project.id?(a=R({environmentId:n.project.environmentId,projectId:n.project.id},n.path,n.modifiedAt),t[0]=n.modifiedAt,t[1]=n.path,t[2]=n.project.environmentId,t[3]=n.project.id,t[4]=a):a=t[4];let o=M(a),s=o.error?null:o.data?.dataUrl??null,c;t[5]!==r||t[6]!==n.modifiedAt?(c=V(n.modifiedAt,r),t[5]=r,t[6]=n.modifiedAt,t[7]=c):c=t[7];let l=c,u;t[8]===s?u=t[9]:(u=(0,Y.jsx)(`span`,{className:`flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted`,children:s?(0,Y.jsx)(`img`,{src:s,alt:``,loading:`lazy`,decoding:`async`,className:`size-full object-contain`}):(0,Y.jsx)(d,{"aria-hidden":!0,className:`size-6 text-muted-foreground`})}),t[8]=s,t[9]=u);let f;t[10]===n.path?f=t[11]:(f=z(n.path),t[10]=n.path,t[11]=f);let p;t[12]===f?p=t[13]:(p=(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium`,children:(0,Y.jsx)(P,{children:f})}),t[12]=f,t[13]=p);let m=l?`${n.project.title} · edited ${l}`:n.project.title,h;t[14]===m?h=t[15]:(h=(0,Y.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:(0,Y.jsx)(P,{children:m})}),t[14]=m,t[15]=h);let g;t[16]!==p||t[17]!==h?(g=(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5 border-t border-border px-3 py-2`,children:[p,h]}),t[16]=p,t[17]=h,t[18]=g):g=t[18];let _;return t[19]!==i||t[20]!==u||t[21]!==g?(_=(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{type:`button`,onClick:i,className:`group flex w-full cursor-pointer flex-col overflow-hidden rounded-xl border border-border bg-card text-left transition-colors hover:border-ring focus-visible:outline-2 focus-visible:outline-ring`,children:[u,g]})}),t[19]=i,t[20]=u,t[21]=g,t[22]=_):_=t[22],_}function $(){let e=(0,q.c)(44),t=C(),n=w(),r;e[0]!==t||e[1]!==n?(r=H(t,n,`updated_at`),e[0]=t,e[1]=n,e[2]=r):r=e[2];let a=r,o=te(a),s=re(),l;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=Date.now(),e[3]=l):l=e[3];let u=l,d,f,p,m,g,_,v,y,b;if(e[4]!==o||e[5]!==s||e[6]!==a){let t=o.flatMap(ue).toSorted(le).slice(0,Z),n;e[16]===o?n=e[17]:(n=new Map(o.map(ce)),e[16]=o,e[17]=n),f=n,d=L,b=`h-dvh min-h-0 overflow-hidden overscroll-y-none`,v=`flex min-h-0 min-w-0 flex-1 flex-col bg-background`,e[18]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Y.jsx)(K,{electron:F,className:`border-b border-border`,children:(0,Y.jsx)(`span`,{className:`text-sm font-medium`,children:`P4 Design`})}),e[18]=y):y=e[18],_=`scrollbar-gutter-both min-h-0 flex-1 overflow-y-auto`,p=`mx-auto flex w-full max-w-5xl flex-col gap-12 px-6 py-12`,e[19]===a?m=e[20]:(m=(0,Y.jsx)(ae,{projects:a}),e[19]=a,e[20]=m),g=t.length?(0,Y.jsxs)(`section`,{"aria-labelledby":`design-recents`,className:`flex flex-col gap-3`,children:[(0,Y.jsx)(`h2`,{id:`design-recents`,className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Recents`}),(0,Y.jsx)(`ul`,{className:`grid grid-cols-[repeat(auto-fill,minmax(13rem,1fr))] gap-4`,children:t.map(e=>(0,Y.jsx)(oe,{recent:e,now:u,onOpen:()=>void s(e.project,e.path)},`${e.project.environmentId}:${e.project.id}:${e.path}`))})]}):null,e[4]=o,e[5]=s,e[6]=a,e[7]=d,e[8]=f,e[9]=p,e[10]=m,e[11]=g,e[12]=_,e[13]=v,e[14]=y,e[15]=b}else d=e[7],f=e[8],p=e[9],m=e[10],g=e[11],_=e[12],v=e[13],y=e[14],b=e[15];let x,S;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Y.jsx)(`h2`,{id:`design-projects`,className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Projects`}),x=(0,Y.jsx)(`span`,{className:`flex-1`}),e[21]=x,e[22]=S):(x=e[21],S=e[22]);let T;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[S,x,(0,Y.jsxs)(h,{size:`sm`,variant:`outline`,onClick:se,children:[(0,Y.jsx)(c,{"aria-hidden":!0}),`Add project`]})]}),e[23]=T):T=e[23];let E;e[24]!==f||e[25]!==s||e[26]!==a?(E=(0,Y.jsxs)(`section`,{"aria-labelledby":`design-projects`,className:`flex flex-col gap-3`,children:[T,a.length?(0,Y.jsx)(`ul`,{className:`overflow-hidden rounded-xl border border-border bg-card`,children:a.map(e=>{let t=f.get(`${e.environmentId}:${e.id}`)??0;return(0,Y.jsx)(`li`,{className:`border-t border-border first:border-t-0`,children:(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>void s(e,null),className:`flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-accent/50 focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,Y.jsx)(i,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted-foreground`}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.title}),(0,Y.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.workspaceRoot})]}),(0,Y.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[t,` `,t===1?`design`:`designs`]})]})},`${e.environmentId}:${e.id}`)})}):(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Add a project, usually a repo, so agents can design with its code.`})]}),e[24]=f,e[25]=s,e[26]=a,e[27]=E):E=e[27];let D;e[28]!==E||e[29]!==p||e[30]!==m||e[31]!==g?(D=(0,Y.jsxs)(`div`,{className:p,children:[m,g,E]}),e[28]=E,e[29]=p,e[30]=m,e[31]=g,e[32]=D):D=e[32];let O;e[33]!==D||e[34]!==_?(O=(0,Y.jsx)(`main`,{className:_,children:D}),e[33]=D,e[34]=_,e[35]=O):O=e[35];let k;e[36]!==O||e[37]!==v||e[38]!==y?(k=(0,Y.jsxs)(`div`,{className:v,children:[y,O]}),e[36]=O,e[37]=v,e[38]=y,e[39]=k):k=e[39];let A;return e[40]!==d||e[41]!==k||e[42]!==b?(A=(0,Y.jsx)(d,{className:b,children:k}),e[40]=d,e[41]=k,e[42]=b,e[43]=A):A=e[43],A}function se(){return W({open:`add-project`})}function ce(e){let{project:t,entries:n}=e;return[`${t.environmentId}:${t.id}`,n.length]}function le(e,t){return t.modifiedAt.localeCompare(e.modifiedAt)}function ue(e){let{project:t,entries:n}=e;return n.flatMap(e=>e.modifiedAt?[{project:t,path:e.path,modifiedAt:e.modifiedAt,pageCount:e.pageCount??null}]:[])}var de=$;export{de as component};
2
- //# sourceMappingURL=_chat.design-SX7SShjI.js.map
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Cd as i,D as a,Ff as o,Lf as s,Nm as c,OE as l,Ps as u,Zp as d,b as f,ic as p,is as m,jm as h,md as g,mr as _,rc as v,rp as y,um as b,us as x,zf as S}from"./utils-DjbLtxuo.js";import{C,k as w}from"./entities-CWtNgawi.js";import{a as T,c as E,o as D,s as O,t as k}from"./select-Cz_1ByI4.js";import{t as A}from"./useNavigate-DV9bXnWr.js";import{s as j}from"./relay-Do9UB5iT.js";import{n as M}from"./query-D3KVoW9G.js";import{u as N}from"./rightPanelStore-DB1OP4MT.js";import{t as P}from"./ClippedText-TtLeyAVc.js";import{t as F}from"./env-BfPir1X4.js";import{t as I}from"./textarea-DPWqoJRQ.js";import{t as ee}from"./toggle-DERKSGyC.js";import{o as L}from"./sidebar-B70J7v16.js";import{a as R,c as z,n as B,o as V}from"./design-DSoix9e1.js";import{D as H,n as U}from"./useHandleNewThread-C6MtV3AM.js";import{li as W}from"./main-B1sXOjZZ.js";import{t as G}from"./pendingSendStore-Ba--K6cH.js";import{t as K}from"./WorkspacePageHeader-B7O16593.js";var q=n(),J=e(t(),1),Y=e(r(),1),X=[{label:`Landing page`,icon:d,ask:`a landing page`},{label:`Mobile app`,icon:h,ask:`a mobile app screen`},{label:`Web app`,icon:g,ask:`a web app screen`},{label:`Slides`,icon:b,ask:`a slide deck`},{label:`Dashboard`,icon:S,ask:`a dashboard`},{label:`Something else`,icon:c,ask:``}],Z=12;function Q(e,t){return[e?`Design ${e}.`:null,t.trim(),`Create it as a P4 Design document: read design_guide, then design_apply, validate, and render it for review.`].filter(Boolean).join(` `)}function te(e){let t=(0,q.c)(2),n;return t[0]===e?n=t[1]:(n=x(t=>e.map(e=>{let n=t(B({environmentId:e.environmentId,projectId:e.id})),r=l(u(n));return{project:e,entries:(r?.entries??[]).filter(ne),loading:n.waiting&&!r}})),t[0]=e,t[1]=n),m(n)}function ne(e){return!e.secondary}function re(){let e=(0,q.c)(4),t=A(),n=U(),r=w(),i;return e[0]!==n||e[1]!==t||e[2]!==r?(i=async(e,i)=>{let a=i===null?void 0:r.filter(t=>t.environmentId===e.environmentId&&t.projectId===e.id&&t.archivedAt===null&&t.deletedAt===null&&!t.worktreePath&&t.designs.some(e=>e.path===i)).toSorted(ie)[0],o=e=>{let t=N.getState();i===null?t.open(e,`design`):t.openFile(e,i),t.setMaximized(e,!0)};if(a){let e=p(a.environmentId,a.id);o(e),await t({to:`/$environmentId/$threadId`,params:j(e)});return}let s=await n(v(e.environmentId,e.id),{envMode:`local`,worktreePath:null});s&&o(p(e.environmentId,s.threadId))},e[0]=n,e[1]=t,e[2]=r,e[3]=i):i=e[3],i}function ie(e,t){return t.updatedAt.localeCompare(e.updatedAt)}function ae({projects:e}){let t=U(),[n,r]=(0,J.useState)(null),[s,c]=(0,J.useState)(``),[l,u]=(0,J.useState)(null),[d,m]=(0,J.useState)(!1),h=e=>`${e.environmentId}:${e.id}`,g=e.find(e=>h(e)===l)??e[0]??null,y=X.find(e=>e.label===n)?.ask??``,b=g!==null&&s.trim().length>0&&!d,x=async()=>{if(b&&g!==null){m(!0);try{let e=await t(v(g.environmentId,g.id),{envMode:`local`,worktreePath:null});if(!e)return;a.getState().setPrompt(e.draftId,Q(y,s));let n=p(g.environmentId,e.threadId);N.getState().open(n,`design`),N.getState().setMaximized(n,!0),G.getState().request(f(e.draftId))}finally{m(!1)}}};return(0,Y.jsxs)(`section`,{"aria-label":`Start a design`,className:`flex flex-col items-center gap-4`,children:[(0,Y.jsx)(`div`,{role:`group`,"aria-label":`What are you designing?`,className:`flex flex-wrap justify-center gap-2`,children:X.map(e=>(0,Y.jsxs)(ee,{variant:`outline`,pressed:n===e.label,onPressedChange:t=>r(t?e.label:null),children:[(0,Y.jsx)(e.icon,{"aria-hidden":!0}),e.label]},e.label))}),(0,Y.jsxs)(`form`,{className:`w-full max-w-3xl rounded-2xl border border-border bg-card p-3 shadow-sm focus-within:border-ring`,onSubmit:e=>{e.preventDefault(),x()},children:[(0,Y.jsx)(I,{unstyled:!0,"aria-label":`Describe a design`,placeholder:`Design anything…`,value:s,onChange:e=>c(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),x())},className:`w-full`}),(0,Y.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[e.length?(0,Y.jsxs)(k,{value:g?h(g):null,onValueChange:e=>e&&u(e),children:[(0,Y.jsxs)(O,{"aria-label":`Save in`,size:`sm`,className:`w-auto max-w-56`,children:[(0,Y.jsx)(o,{"aria-hidden":!0}),(0,Y.jsx)(E,{children:()=>(0,Y.jsx)(`span`,{className:`truncate`,children:g?.title??`Choose project`})})]}),(0,Y.jsx)(D,{children:e.map(e=>(0,Y.jsx)(T,{value:h(e),children:e.title},h(e)))})]}):null,(0,Y.jsx)(`span`,{className:`flex-1`}),(0,Y.jsx)(_,{type:`submit`,size:`icon-sm`,"aria-label":`Start design`,disabled:!b,children:(0,Y.jsx)(i,{"aria-hidden":!0})})]})]}),e.length===0?(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Add a project to start designing.`}):null]})}function oe(e){let t=(0,q.c)(23),{recent:n,now:r,onOpen:i}=e,a;t[0]!==n.modifiedAt||t[1]!==n.path||t[2]!==n.project.environmentId||t[3]!==n.project.id?(a=R({environmentId:n.project.environmentId,projectId:n.project.id},n.path,n.modifiedAt),t[0]=n.modifiedAt,t[1]=n.path,t[2]=n.project.environmentId,t[3]=n.project.id,t[4]=a):a=t[4];let o=M(a),s=o.error?null:o.data?.dataUrl??null,c;t[5]!==r||t[6]!==n.modifiedAt?(c=V(n.modifiedAt,r),t[5]=r,t[6]=n.modifiedAt,t[7]=c):c=t[7];let l=c,u;t[8]===s?u=t[9]:(u=(0,Y.jsx)(`span`,{className:`flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted`,children:s?(0,Y.jsx)(`img`,{src:s,alt:``,loading:`lazy`,decoding:`async`,className:`size-full object-contain`}):(0,Y.jsx)(y,{"aria-hidden":!0,className:`size-6 text-muted-foreground`})}),t[8]=s,t[9]=u);let d;t[10]===n.path?d=t[11]:(d=z(n.path),t[10]=n.path,t[11]=d);let f;t[12]===d?f=t[13]:(f=(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium`,children:(0,Y.jsx)(P,{children:d})}),t[12]=d,t[13]=f);let p=l?`${n.project.title} · edited ${l}`:n.project.title,m;t[14]===p?m=t[15]:(m=(0,Y.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:(0,Y.jsx)(P,{children:p})}),t[14]=p,t[15]=m);let h;t[16]!==f||t[17]!==m?(h=(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5 border-t border-border px-3 py-2`,children:[f,m]}),t[16]=f,t[17]=m,t[18]=h):h=t[18];let g;return t[19]!==i||t[20]!==u||t[21]!==h?(g=(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{type:`button`,onClick:i,className:`group flex w-full cursor-pointer flex-col overflow-hidden rounded-xl border border-border bg-card text-left transition-colors hover:border-ring focus-visible:outline-2 focus-visible:outline-ring`,children:[u,h]})}),t[19]=i,t[20]=u,t[21]=h,t[22]=g):g=t[22],g}function $(){let e=(0,q.c)(44),t=C(),n=w(),r;e[0]!==t||e[1]!==n?(r=H(t,n,`updated_at`),e[0]=t,e[1]=n,e[2]=r):r=e[2];let i=r,a=te(i),c=re(),l;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=Date.now(),e[3]=l):l=e[3];let u=l,d,f,p,m,h,g,v,y,b;if(e[4]!==a||e[5]!==c||e[6]!==i){let t=a.flatMap(ue).toSorted(le).slice(0,Z),n;e[16]===a?n=e[17]:(n=new Map(a.map(ce)),e[16]=a,e[17]=n),f=n,d=L,b=`h-dvh min-h-0 overflow-hidden overscroll-y-none`,v=`flex min-h-0 min-w-0 flex-1 flex-col bg-background`,e[18]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Y.jsx)(K,{electron:F,className:`border-b border-border`,children:(0,Y.jsx)(`span`,{className:`text-sm font-medium`,children:`P4 Design`})}),e[18]=y):y=e[18],g=`scrollbar-gutter-both min-h-0 flex-1 overflow-y-auto`,p=`mx-auto flex w-full max-w-5xl flex-col gap-12 px-6 py-12`,e[19]===i?m=e[20]:(m=(0,Y.jsx)(ae,{projects:i}),e[19]=i,e[20]=m),h=t.length?(0,Y.jsxs)(`section`,{"aria-labelledby":`design-recents`,className:`flex flex-col gap-3`,children:[(0,Y.jsx)(`h2`,{id:`design-recents`,className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Recents`}),(0,Y.jsx)(`ul`,{className:`grid grid-cols-[repeat(auto-fill,minmax(13rem,1fr))] gap-4`,children:t.map(e=>(0,Y.jsx)(oe,{recent:e,now:u,onOpen:()=>void c(e.project,e.path)},`${e.project.environmentId}:${e.project.id}:${e.path}`))})]}):null,e[4]=a,e[5]=c,e[6]=i,e[7]=d,e[8]=f,e[9]=p,e[10]=m,e[11]=h,e[12]=g,e[13]=v,e[14]=y,e[15]=b}else d=e[7],f=e[8],p=e[9],m=e[10],h=e[11],g=e[12],v=e[13],y=e[14],b=e[15];let x,S;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Y.jsx)(`h2`,{id:`design-projects`,className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Projects`}),x=(0,Y.jsx)(`span`,{className:`flex-1`}),e[21]=x,e[22]=S):(x=e[21],S=e[22]);let T;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[S,x,(0,Y.jsxs)(_,{size:`sm`,variant:`outline`,onClick:se,children:[(0,Y.jsx)(s,{"aria-hidden":!0}),`Add project`]})]}),e[23]=T):T=e[23];let E;e[24]!==f||e[25]!==c||e[26]!==i?(E=(0,Y.jsxs)(`section`,{"aria-labelledby":`design-projects`,className:`flex flex-col gap-3`,children:[T,i.length?(0,Y.jsx)(`ul`,{className:`overflow-hidden rounded-xl border border-border bg-card`,children:i.map(e=>{let t=f.get(`${e.environmentId}:${e.id}`)??0;return(0,Y.jsx)(`li`,{className:`border-t border-border first:border-t-0`,children:(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>void c(e,null),className:`flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-accent/50 focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,Y.jsx)(o,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted-foreground`}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.title}),(0,Y.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.workspaceRoot})]}),(0,Y.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[t,` `,t===1?`design`:`designs`]})]})},`${e.environmentId}:${e.id}`)})}):(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Add a project, usually a repo, so agents can design with its code.`})]}),e[24]=f,e[25]=c,e[26]=i,e[27]=E):E=e[27];let D;e[28]!==E||e[29]!==p||e[30]!==m||e[31]!==h?(D=(0,Y.jsxs)(`div`,{className:p,children:[m,h,E]}),e[28]=E,e[29]=p,e[30]=m,e[31]=h,e[32]=D):D=e[32];let O;e[33]!==D||e[34]!==g?(O=(0,Y.jsx)(`main`,{className:g,children:D}),e[33]=D,e[34]=g,e[35]=O):O=e[35];let k;e[36]!==O||e[37]!==v||e[38]!==y?(k=(0,Y.jsxs)(`div`,{className:v,children:[y,O]}),e[36]=O,e[37]=v,e[38]=y,e[39]=k):k=e[39];let A;return e[40]!==d||e[41]!==k||e[42]!==b?(A=(0,Y.jsx)(d,{className:b,children:k}),e[40]=d,e[41]=k,e[42]=b,e[43]=A):A=e[43],A}function se(){return W({open:`add-project`})}function ce(e){let{project:t,entries:n}=e;return[`${t.environmentId}:${t.id}`,n.length]}function le(e,t){return t.modifiedAt.localeCompare(e.modifiedAt)}function ue(e){let{project:t,entries:n}=e;return n.flatMap(e=>e.modifiedAt?[{project:t,path:e.path,modifiedAt:e.modifiedAt,pageCount:e.pageCount??null}]:[])}var de=$;export{de as component};
2
+ //# sourceMappingURL=_chat.design-AJz30uXq.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{cm as i,fp as a,mr as o,rc as s}from"./utils-DjbLtxuo.js";import{N as c,W as l,at as u}from"./runtime-BBYIQ0f-.js";import{C as d,g as f,k as p,l as m}from"./entities-CWtNgawi.js";import{t as h}from"./link-CKfckeju.js";import{a as g}from"./useParams-jklHVL7l.js";import{D as _}from"./useSettings-EYJbJzT3.js";import{t as v}from"./env-BfPir1X4.js";import{o as y}from"./sidebar-B70J7v16.js";import{i as b,o as x,r as S,t as C}from"./empty-B4h5DyMQ.js";import{D as w,n as T}from"./useHandleNewThread-C6MtV3AM.js";import{Ao as E,a as D}from"./main-B1sXOjZZ.js";import{t as O}from"./WorkspacePageHeader-B7O16593.js";import{t as k}from"./NoProjectsHero-ClDVFY0-.js";var A=n(),j=e(t()),M=e(r());function N(){let e=(0,A.c)(2),{authGateState:t}=D.useRouteContext(),{environments:n,isReady:r}=_();if(t.status===`hosted-static`){if(!r)return null;if(n.length===0){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,M.jsx)(z,{}),e[0]=t):t=e[0],t}}let i;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(P,{}),e[1]=i):i=e[1],i}function P(){let e=(0,A.c)(18),t=d(),n=p(),r=f(),i=T(),a=g(),o;e[0]===a.state.location.pathname?o=e[1]:(o=()=>a.state.location.pathname===`/`,e[0]=a.state.location.pathname,e[1]=o);let c=(0,j.useEffectEvent)(o),l=(0,j.useRef)(!1),u;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(u={failed:!1,retryRequest:0},e[2]=u):u=e[2];let[h,_]=(0,j.useState)(u),v;e[3]!==r||e[4]!==t||e[5]!==n?(v=r?w(t,n,`updated_at`)[0]??null:null,e[3]=r,e[4]=t,e[5]=n,e[6]=v):v=e[6];let y=v,b;e[7]!==i||e[8]!==c||e[9]!==y?(b=()=>{if(y===null||l.current||!c())return;let e=s(y.environmentId,y.id);m(e)!==null&&(l.current=!0,i(e,{replace:!0}).then(e=>{e===null&&(l.current=!1,_(L))}).catch(()=>{l.current=!1,_(I)}))},e[7]=i,e[8]=c,e[9]=y,e[10]=b):b=e[10];let x;if(e[11]!==i||e[12]!==y||e[13]!==h.retryRequest?(x=[i,y,h.retryRequest],e[11]=i,e[12]=y,e[13]=h.retryRequest,e[14]=x):x=e[14],(0,j.useEffect)(b,x),!r)return null;if(y!==null){let t;return e[15]===h.failed?t=e[16]:(t=h.failed?(0,M.jsx)(R,{onRetry:()=>{_(F)}}):null,e[15]=h.failed,e[16]=t),t}let S;return e[17]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,M.jsx)(k,{}),e[17]=S):S=e[17],S}function F(e){return{failed:!1,retryRequest:e.retryRequest+1}}function I(e){return{...e,failed:!0}}function L(e){return{...e,retryRequest:e.retryRequest+1}}function R(e){let t=(0,A.c)(6),{onRetry:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=v?(0,M.jsx)(O,{electron:!0}):null,t[0]=r):r=t[0];let i,a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(x,{children:`Couldn’t start a new thread`}),a=(0,M.jsx)(S,{children:`The project is still available. Try opening the draft again.`}),t[1]=i,t[2]=a):(i=t[1],a=t[2]);let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,M.jsx)(E,{size:`md`}),t[3]=s):s=t[3];let c;return t[4]===n?c=t[5]:(c=(0,M.jsxs)(y,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:[r,(0,M.jsx)(C,{className:`flex-1`,children:(0,M.jsxs)(b,{className:`max-w-md`,children:[i,a,(0,M.jsx)(`div`,{className:`mt-5 flex justify-center`,children:(0,M.jsxs)(o,{size:`sm`,onClick:n,children:[s,`Try again`]})})]})})]}),t[4]=n,t[5]=c),c}function z(){let e=(0,A.c)(7),t=l(),n=u()?`The local environment is turned off. Connect a remote environment, or turn the local environment back on in Connections.`:t?`Enable P4 Connect on that machine, then open Connections here to sign in with the same account. You can also add the machine using a pairing link.`:`Open Connections and add that machine using its pairing link. This app must be able to reach it.`,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,M.jsx)(O,{electron:v,className:`border-b border-border`,children:(0,M.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,M.jsx)(`span`,{className:`text-sm font-medium text-foreground md:text-muted-foreground/60`,children:c})})}),e[0]=r):r=e[0];let s,d,f,p;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,M.jsx)(`div`,{className:`mx-auto mb-5 flex size-11 items-center justify-center rounded-xl border border-border/70 bg-background/70 text-muted-foreground`,children:(0,M.jsx)(a,{className:`size-5`})}),d=(0,M.jsx)(x,{children:`Connect to a computer running P4 Code`}),f=(0,M.jsx)(S,{children:`This app connects to P4 Code running on your computer or a server. Start the P4 Code desktop app or command-line server on that machine and keep it running.`}),p=(0,M.jsx)(S,{children:n}),e[1]=s,e[2]=d,e[3]=f,e[4]=p):(s=e[1],d=e[2],f=e[3],p=e[4]);let m;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,M.jsx)(h,{to:`/settings/connections`}),e[5]=m):m=e[5];let g;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,M.jsx)(y,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:(0,M.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background`,children:[r,(0,M.jsx)(C,{className:`flex-1`,children:(0,M.jsx)(`div`,{className:`w-full max-w-xl rounded-3xl border border-border/55 bg-card/20 px-8 py-12 shadow-sm/5`,children:(0,M.jsxs)(b,{className:`max-w-none`,children:[s,d,f,p,(0,M.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,M.jsxs)(o,{render:m,size:`sm`,children:[(0,M.jsx)(i,{className:`size-4`}),`Open Connections`]})})]})})})]})}),e[6]=g):g=e[6],g}export{N as component};
2
+ //# sourceMappingURL=_chat.index-D1csjyRQ.js.map
@@ -0,0 +1,4 @@
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$s as i,D as a,G_ as o,ic as s,is as c,mr as l,o as u,rc as d}from"./utils-DjbLtxuo.js";import{Hn as f,Rn as p,Tr as m,Vn as h,br as g}from"./runtime-BBYIQ0f-.js";import{C as ee,G as te,N as _,k as v}from"./entities-CWtNgawi.js";import{t as y}from"./useNavigate-DV9bXnWr.js";import{t as b}from"./useLocation-NTw9A5XQ.js";import{a as x}from"./relay-Do9UB5iT.js";import{D as S,k as ne}from"./useSettings-EYJbJzT3.js";import{t as re}from"./use-atom-command-BbFDhw_c.js";import{t as ie}from"./toastHelpers-DxXYm50b.js";import{t as C}from"./env-BfPir1X4.js";import{o as w}from"./sidebar-B70J7v16.js";import{i as T,o as E,r as D,t as O}from"./empty-B4h5DyMQ.js";import{t as ae}from"./sourceControl-De64nxc-.js";import{D as oe,n as se}from"./useHandleNewThread-C6MtV3AM.js";import{$n as ce,Jn as k,Xn as le,zn as ue}from"./main-B1sXOjZZ.js";import{t as A}from"./WorkspacePageHeader-B7O16593.js";import{i as j}from"./usePullRequestActions-WFmep5Tm.js";import{n as M,t as N}from"./linkedPrompt-68_t5vwh.js";var P=n(),F=[`github.com`,`git.cafe`,`staging.git.cafe`];function de(e,t){let n=`${t.owner}/${t.name}`.toLowerCase(),r=new Set(F.map(e=>`${e}/${n}`));return e.find(e=>e.repositoryIdentity!=null&&r.has(o(e.repositoryIdentity).toLowerCase()))}function fe(e,t){let n=p({host:`github.com`,repository:`${t.owner}/${t.name}`,number:t.number}),r;for(let t of e)r!==void 0&&t.updatedAt<=r.updatedAt||f(h(t)).some(e=>p(e)===n)&&(r=t);return r}var I={claude:`claudeagent`};function pe(e,t){let n=I[t.provider]??t.provider,r=e.filter(e=>e.driver.toLowerCase()===n&&e.enabled&&e.availability!==`unavailable`),a=r.find(e=>e.status===`ready`)??r.find(e=>e.status===`warning`);if(a===void 0)return null;let o=t.model===null?null:i(a.driver,t.model,a.models),s=o??(a.models.find(e=>e.isDefault)??a.models[0])?.slug;return s===void 0?null:{selection:{instanceId:a.instanceId,model:s},exact:t.model===null||o!==null}}var L=e(t(),1),R=e(r(),1),z=new Set;function B(e){let t=(0,P.c)(62),{link:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:_e},t[0]=r):r=t[0];let i=b(r),o=y(),f=c(te),p=ee(),h=v(),{environments:C}=S(),w=ne(),T=se(),{scratchEnvironmentId:E,openScratchProject:D}=ue(),O;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(O={reportFailure:!1},t[1]=O):O=t[1];let k=re(ae.startProjectClone,O),A;t[2]===i?A=t[3]:(A=()=>z.has(i)?{status:`opened`}:{status:`opening`},t[2]=i,t[3]=A);let[j,M]=(0,L.useState)(A),F=(0,L.useRef)(!1),I;t[4]!==p||t[5]!==h?(I=()=>oe(p.filter(ge),h,`updated_at`),t[4]=p,t[5]=h,t[6]=I):I=t[6];let B=I,H;t[7]!==w||t[8]!==h?(H=()=>{let e;for(let t of h)(e===void 0||t.updatedAt>e.updatedAt)&&(e=t);return e?.environmentId??w},t[7]=w,t[8]=h,t[9]=H):H=t[9];let U=H,W;t[10]!==C||t[11]!==T||t[12]!==n?(W=async(e,t)=>{let r=await T(d(e.environmentId,e.id),{replace:!0}).catch(he);if(r===null){M({status:`failed`,message:`P4 Code could not open a new thread.`});return}M({status:`opened`});let i=[];if(n.kind===`new`&&n.provider!==null){let t=pe(C.find(t=>t.environmentId===e.environmentId)?.serverConfig?.providers??[],{provider:n.provider,model:n.model});t!==null&&a.getState().setModelSelection(r.draftId,t.selection,{explicit:!0,replaceOptions:!0}),t!==null&&t.exact||i.push(t===null?`The link asked for ${n.provider}, which is not set up here, so your default model is used.`:`The link asked for ${n.model}, which ${n.provider} does not offer here, so its default model is used.`)}let o=[n.prompt?.text,t].filter(Boolean).join(`
2
+
3
+ `);o.length!==0&&N(r.draftId,{text:o,hiddenCharacters:n.prompt?.hiddenCharacters??0},i)},t[10]=C,t[11]=T,t[12]=n,t[13]=W):W=t[13];let G=W,K;t[14]!==U||t[15]!==n||t[16]!==G||t[17]!==D||t[18]!==E?(K=async()=>{M({status:`opening`});let e=E(U())??E(null),t=e===null?null:await D(e);t===null?M({status:`failed`,message:`None of your machines can start a thread without a project right now.`}):await G(t,n.kind===`pull-request`?le(n.pullRequest):void 0)},t[14]=U,t[15]=n,t[16]=G,t[17]=D,t[18]=E,t[19]=K):K=t[19];let q=K,J;t[20]!==C||t[21]!==U||t[22]!==n||t[23]!==G||t[24]!==k?(J=async e=>{let t=U(),r=C.find(e=>e.environmentId===t),i=r?.serverConfig?.newProjectsRoot??null;if(t===null||i===null||r?.serverConfig?.environment.capabilities.projectCloneTracking!==!0){M({status:`failed`,message:`This machine cannot clone from a link. Update P4 Code on it, or clone the repository from the command palette.`});return}M({status:`opening`});let a=u(),o=await k({environmentId:t,input:{projectId:a,title:e.name,createdAt:new Date().toISOString(),remoteUrl:`https://github.com/${e.owner}/${e.name}.git`,destinationPath:ce(i,e.name)}});if(o._tag===`Failure`){if(!g(o)){let e=m(o);x.add(ie({type:`error`,title:`Clone failed`,description:e instanceof Error?e.message:`An error occurred.`}))}M({status:`missing-repository`,repository:e});return}let s=await _(d(t,a),5e3).catch(me);s===null?M({status:`failed`,message:`The clone started, but its project did not appear.`}):n.kind===`pull-request`?M({status:`failed`,title:`Cloning ${e.owner}/${e.name}`,message:`Open this link again when the clone finishes.`}):await G(s)},t[20]=C,t[21]=U,t[22]=n,t[23]=G,t[24]=k,t[25]=J):J=t[25];let Y=J,X;t[26]!==n||t[27]!==i||t[28]!==o||t[29]!==G||t[30]!==q||t[31]!==B||t[32]!==h?(X=()=>{if(F.current)return;if(F.current=!0,z.add(i),n.kind===`pull-request`){let e=fe(h,n.pullRequest);if(e!==void 0){M({status:`opened`});let t=s(e.environmentId,e.id);n.prompt!==null&&N(t,n.prompt),o({to:`/$environmentId/$threadId`,params:{environmentId:e.environmentId,threadId:e.id},replace:!0});return}}let e=n.kind===`new`?n.repository:n.pullRequest;if(e===null){q();return}let t=de(B(),e);t===void 0?M({status:`missing-repository`,repository:e}):n.kind===`pull-request`?M({status:`pull-request-checkout`,project:t}):G(t)},t[26]=n,t[27]=i,t[28]=o,t[29]=G,t[30]=q,t[31]=B,t[32]=h,t[33]=X):X=t[33];let Z=(0,L.useEffectEvent)(X),Q;t[34]!==f||t[35]!==Z||t[36]!==j.status?(Q=()=>{f&&j.status===`opening`&&Z()},t[34]=f,t[35]=Z,t[36]=j.status,t[37]=Q):Q=t[37];let $;switch(t[38]!==f||t[39]!==j.status?($=[f,j.status],t[38]=f,t[39]=j.status,t[40]=$):$=t[40],(0,L.useEffect)(Q,$),j.status){case`opening`:{let e;return t[41]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,R.jsx)(V,{title:`Opening the link...`}),t[41]=e):e=t[41],e}case`opened`:{let e;return t[42]===i?e=t[43]:(e=(0,R.jsx)(V,{title:`This link is open`,children:(0,R.jsx)(l,{size:`sm`,variant:`outline`,onClick:()=>{z.delete(i),F.current=!1,M({status:`opening`})},children:`Open it again`})}),t[42]=i,t[43]=e),e}case`failed`:{let e=j.title??`Could not open the link`,n;return t[44]!==j.message||t[45]!==e?(n=(0,R.jsx)(V,{title:e,description:j.message}),t[44]=j.message,t[45]=e,t[46]=n):n=t[46],n}case`missing-repository`:{let e=`${j.repository.owner}/${j.repository.name}`,n=`You don't have ${e}`,r;t[47]!==Y||t[48]!==j.repository?(r=()=>void Y(j.repository),t[47]=Y,t[48]=j.repository,t[49]=r):r=t[49];let i;t[50]!==e||t[51]!==r?(i=(0,R.jsxs)(l,{size:`sm`,onClick:r,children:[`Clone `,e]}),t[50]=e,t[51]=r,t[52]=i):i=t[52];let a;t[53]===q?a=t[54]:(a=(0,R.jsx)(l,{size:`sm`,variant:`outline`,onClick:()=>void q(),children:`Use without project`}),t[53]=q,t[54]=a);let o;return t[55]!==n||t[56]!==i||t[57]!==a?(o=(0,R.jsxs)(V,{title:n,description:`Clone it to work on it here, or start without a project.`,children:[i,a]}),t[55]=n,t[56]=i,t[57]=a,t[58]=o):o=t[58],o}case`pull-request-checkout`:{let e;return t[59]!==n||t[60]!==j.project?(e=n.kind===`pull-request`?(0,R.jsx)(ve,{link:n,project:j.project}):null,t[59]=n,t[60]=j.project,t[61]=e):e=t[61],e}}}function me(){return null}function he(){return null}function ge(e){return e.isScratch!==!0}function _e(e){return e.state.__TSR_key??``}function ve(e){let t=(0,P.c)(22),{link:n,project:r}=e,i=r.environmentId,a=r.id,o=r.workspaceRoot,s;t[0]===n.pullRequest?s=t[1]:(s=le(n.pullRequest),t[0]=n.pullRequest,t[1]=s);let c;t[2]!==r.id||t[3]!==r.workspaceRoot||t[4]!==s?(c={projectId:a,workspaceRoot:o,url:s},t[2]=r.id,t[3]=r.workspaceRoot,t[4]=s,t[5]=c):c=t[5];let u;t[6]!==r.environmentId||t[7]!==c?(u={environmentId:i,detail:c},t[6]=r.environmentId,t[7]=c,t[8]=u):u=t[8];let{handoff:d,startHandoff:f}=j(u),p=(0,L.useRef)(!1),m,h;t[9]===n.prompt?(m=t[10],h=t[11]):(m=()=>{p.current||n.prompt===null||(p.current=!0,M(n.prompt))},h=[n.prompt],t[9]=n.prompt,t[10]=m,t[11]=h),(0,L.useEffect)(m,h);let{owner:g,name:ee,number:te}=n.pullRequest,_=`Check out ${g}/${ee}#${te}?`,v=d!==null,y;t[12]!==n.prompt||t[13]!==f?(y=()=>void f(`prompt-link`,n.prompt===null?null:{prompt:n.prompt.text}),t[12]=n.prompt,t[13]=f,t[14]=y):y=t[14];let b=d===null?`Check out`:`Checking out...`,x;t[15]!==v||t[16]!==y||t[17]!==b?(x=(0,R.jsx)(l,{size:`sm`,disabled:v,onClick:y,children:b}),t[15]=v,t[16]=y,t[17]=b,t[18]=x):x=t[18];let S;return t[19]!==x||t[20]!==_?(S=(0,R.jsx)(V,{title:_,description:`This puts the pull request's code in a new worktree and runs your project's setup script on it.`,children:x}),t[19]=x,t[20]=_,t[21]=S):S=t[21],S}function V(e){let t=(0,P.c)(11),{title:n,description:r,children:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=C?(0,R.jsx)(A,{electron:!0}):null,t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=(0,R.jsx)(E,{children:n}),t[1]=n,t[2]=o);let s;t[3]===r?s=t[4]:(s=r?(0,R.jsx)(D,{children:r}):null,t[3]=r,t[4]=s);let c;t[5]===i?c=t[6]:(c=i?(0,R.jsx)(`div`,{className:`mt-5 flex justify-center gap-2`,children:i}):null,t[5]=i,t[6]=c);let l;return t[7]!==o||t[8]!==s||t[9]!==c?(l=(0,R.jsxs)(w,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:[a,(0,R.jsx)(O,{className:`flex-1`,children:(0,R.jsxs)(T,{className:`max-w-md`,children:[o,s,c]})})]}),t[7]=o,t[8]=s,t[9]=c,t[10]=l):l=t[10],l}function H(){let e=(0,P.c)(9),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:U},e[0]=t):t=e[0];let n=b(t),r;e[1]===n?r=e[2]:(r=k(n),e[1]=n,e[2]=r);let i=r;if(!i.ok){let t;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,R.jsx)(E,{children:`Could not open the link`}),e[3]=t):t=e[3];let n;return e[4]===i.error?n=e[5]:(n=(0,R.jsx)(w,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:(0,R.jsx)(O,{className:`flex-1`,children:(0,R.jsxs)(T,{className:`max-w-md`,children:[t,(0,R.jsx)(D,{children:i.error})]})})}),e[4]=i.error,e[5]=n),n}let a;return e[6]!==i.value||e[7]!==n?(a=(0,R.jsx)(B,{link:i.value},n),e[6]=i.value,e[7]=n,e[8]=a):a=e[8],a}function U(e){return e.searchStr}export{H as component};
4
+ //# sourceMappingURL=_chat.new-IhhWgwNo.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$n as i,$p as a,Hm as o,Ig as s,Nf as c,Qn as l,Sm as u,Sn as d,Vd as f,Xd as p,Zd as m,Zn as h,_d as g,ar as _,bf as v,ch as y,cm as b,dr as x,ef as S,er as C,fr as w,ir as T,is as E,lp as D,lr as O,mp as ee,mr as k,nf as A,om as te,or as j,rr as M,sr as N,t as ne,tr as P,uh as F,ur as I,yf as L,zl as re}from"./utils-DjbLtxuo.js";import{C as R,g as ie,k as z,v as B}from"./entities-CWtNgawi.js";import{t as V}from"./spinner-BiCpg0TU.js";import{t as ae}from"./useNavigate-DV9bXnWr.js";import{t as oe}from"./useNavigateBack-D62rsj_4.js";import{a as se,h as ce}from"./relay-Do9UB5iT.js";import{D as le,k as H,s as U,w as W}from"./useSettings-EYJbJzT3.js";import{s as ue}from"./server-Dkj4NeYG.js";import{t as de}from"./use-atom-command-BbFDhw_c.js";import{l as fe,o as pe,r as me,s as he,t as ge,u as G}from"./rightPanelStore-DB1OP4MT.js";import{r as _e}from"./queries-Cl508kPw.js";import{C as ve,S as ye,T as be,a as xe,b as Se,d as Ce,f as we,g as Te,h as K,l as Ee,m as De,n as Oe,o as ke,p as Ae,r as je,s as Me,t as Ne,u as Pe,v as Fe,w as Ie,x as Le}from"./PanelLayoutControls-DMUv135M.js";import{t as Re}from"./env-BfPir1X4.js";import{a as ze,n as Be,t as Ve}from"./tooltip-C7NAkYG3.js";import{o as He}from"./sidebar-B70J7v16.js";import{i as Ue,n as We,o as Ge,r as Ke,t as qe}from"./empty-B4h5DyMQ.js";import{_ as Je,y as Ye}from"./keybindings-tgj8XFFz.js";import{a as Xe,f as q,u as Ze}from"./RenderErrorBoundary-BbxLD-66.js";import{n as Qe}from"./sourceControlClients-BofXnV5S.js";import{n as $e}from"./pullRequestIcons-CbDg0o8q.js";import{A as et,B as tt,C as nt,D as rt,E as it,F as at,H as ot,I as st,L as ct,M as lt,N as ut,O as dt,P as ft,R as pt,S as mt,T as ht,U as gt,V as _t,_ as vt,b as yt,d as bt,f as xt,g as St,h as Ct,j as wt,l as Tt,m as Et,o as Dt,p as Ot,r as kt,s as At,v as jt,w as Mt,x as Nt,y as Pt,z as Ft}from"./pullRequests-Cf9E2kW-.js";import{t as It}from"./ProjectFavicon-BbtNdeB8.js";import{n as Lt,r as Rt,t as J}from"./input-group-BQ_2ox-w.js";import{O as zt,b as Bt,h as Y}from"./useHandleNewThread-C6MtV3AM.js";import{d as Vt,f as Ht,p as Ut}from"./p4ProjectFile-5VDI-yAx.js";import{r as Wt,t as Gt}from"./uiStateStore-FYiLqqos.js";import{a as Kt,d as qt,l as Jt,o as Yt,p as Xt}from"./guideRunStore-CzF0q6A8.js";import{r as Zt}from"./sidebarProjectGrouping-Cy06FqQF.js";import{r as Qt}from"./EnvironmentMachineIcon-B81Bujkx.js";import{t as $t}from"./WorkspacePageContainer-BlYFBUKE.js";import{Ao as en,Bi as tn,ai as nn,ci as rn,li as an,n as on,oi as sn,t as cn,wn as ln,zi as un}from"./main-B1sXOjZZ.js";import{t as dn}from"./WorkspacePageHeader-B7O16593.js";import{n as fn}from"./usePullRequestActions-WFmep5Tm.js";import{n as pn,r as mn,t as X}from"./WorkspaceBreadcrumb-BImJJpuo.js";var Z=n(),hn=class{props;static activators=[{eventName:`onPointerDown`,handler:({nativeEvent:e})=>e.isPrimary&&e.button===0}];autoScrollEnabled=!0;phase=`pending`;pointer;document;window;constructor(e){this.props=e,this.pointer=e.event,this.document=un(this.pointer.target),this.window=tn(this.pointer.target),this.document.addEventListener(`pointermove`,this.move,{passive:!1,capture:!0}),this.document.addEventListener(`pointerup`,this.end,{capture:!0}),this.document.addEventListener(`pointercancel`,this.pointerCancel,{capture:!0}),this.document.addEventListener(`keydown`,this.keydown,{capture:!0}),this.document.addEventListener(`visibilitychange`,this.visibilityChange),this.window.addEventListener(`blur`,this.cancel),this.window.addEventListener(`pagehide`,this.cancel),this.window.addEventListener(`resize`,this.cancel),this.document.addEventListener(`dragstart`,this.preventDefault),this.document.addEventListener(`contextmenu`,this.preventDefault),e.options.onAttach(this),e.onPending(e.active,{distance:e.options.distance},this.coordinates())}coordinates=()=>({x:this.pointer.clientX,y:this.pointer.clientY});preventDefault=e=>e.preventDefault();clearClickSuppression=()=>{this.document.removeEventListener(`click`,this.suppressClick,{capture:!0}),this.document.removeEventListener(`pointerdown`,this.clearClickSuppression,{capture:!0})};suppressClick=e=>{e.stopPropagation(),this.clearClickSuppression()};clearSelection=()=>this.document.getSelection()?.removeAllRanges();move=e=>{if(this.phase===`finished`||e.pointerId!==this.pointer.pointerId)return;let t={x:e.clientX,y:e.clientY};if(!(e.buttons&1))return this.phase===`dragging`&&this.props.options.onDrop?.(t),this.cancel();if(this.phase===`pending`){let t={x:e.clientX-this.pointer.clientX,y:e.clientY-this.pointer.clientY};if(Math.hypot(t.x,t.y)<=this.props.options.distance){this.props.onPending(this.props.active,{distance:this.props.options.distance},this.coordinates(),t);return}this.phase=`dragging`,this.document.addEventListener(`click`,this.suppressClick,{capture:!0}),this.document.addEventListener(`selectionchange`,this.clearSelection),this.clearSelection(),this.props.onStart(this.coordinates())}if(this.phase===`dragging`){if(e.cancelable&&e.preventDefault(),this.props.options.onMove?.(t)===!0)return;this.props.onMove(t)}};end=e=>{if(e.pointerId!==this.pointer.pointerId)return;let t=this.phase===`dragging`&&this.props.options.onDrop?.({x:e.clientX,y:e.clientY})===!0;this.finish(t)};pointerCancel=e=>{e.pointerId===this.pointer.pointerId&&this.cancel()};keydown=e=>{e.code===`Escape`&&this.cancel()};visibilityChange=()=>{this.document.hidden&&this.cancel()};cancel=()=>this.finish(!0);finish(e){if(this.phase===`finished`)return;let t=this.phase===`pending`;this.phase=`finished`,this.document.removeEventListener(`pointermove`,this.move,{capture:!0}),this.document.removeEventListener(`pointerup`,this.end,{capture:!0}),this.document.removeEventListener(`pointercancel`,this.pointerCancel,{capture:!0}),this.document.removeEventListener(`keydown`,this.keydown,{capture:!0}),this.document.removeEventListener(`visibilitychange`,this.visibilityChange),this.window.removeEventListener(`blur`,this.cancel),this.window.removeEventListener(`pagehide`,this.cancel),this.window.removeEventListener(`resize`,this.cancel),this.document.removeEventListener(`dragstart`,this.preventDefault),this.document.removeEventListener(`contextmenu`,this.preventDefault),this.document.removeEventListener(`selectionchange`,this.clearSelection),(!t||e)&&(this.document.addEventListener(`click`,this.suppressClick,{capture:!0}),this.document.addEventListener(`pointerdown`,this.clearClickSuppression,{capture:!0}));try{this.props.options.onFinish(!t)}finally{t&&this.props.onAbort(this.props.active),e?this.props.onCancel():this.props.onEnd()}}},Q=e(t(),1);function gn(e,t){let n=new Map;for(let t of e)n.set(t.title,(n.get(t.title)??0)+1);return e.map(e=>(n.get(e.title)??0)>1?{...e,title:`${e.title} · ${t(e)}`}:e)}function _n(e,t,n){let r=new Map;for(let t of e){let e=t.repositoryIdentity?.canonicalKey?.toLowerCase(),i=JSON.stringify([t.environmentId,e?[`repository`,e]:[`project`,t.id]]),a=t.id===n?.id&&t.environmentId===n.environmentId;(!r.has(i)||a)&&r.set(i,t)}return gn(gn(gn(gn([...r.values()],e=>t.get(e.environmentId)??e.environmentId),e=>e.workspaceRoot),e=>e.environmentId),e=>e.id).sort((e,t)=>e.title.localeCompare(t.title))}var $=e(r(),1);function vn(e){let t=(0,Z.c)(3),{option:n}=e,r;return t[0]!==n.Icon||t[1]!==n.project?(r=n.project?(0,$.jsx)(It,{project:n.project,className:`size-3.5`}):(0,$.jsx)(n.Icon,{"aria-hidden":!0,className:`size-3.5`}),t[0]=n.Icon,t[1]=n.project,t[2]=r):r=t[2],r}function yn(e,t){return e.filter(e=>e.kind===t.kind).length>1?t.host:ln(t.kind).providerName}function bn(e){let t=(0,Z.c)(14),{value:n,busy:r,onChange:i}=e,[a,o]=(0,Q.useState)(null),s;t[0]===r?s=t[1]:(s=(0,$.jsx)(Lt,{children:r?(0,$.jsx)(V,{"aria-hidden":!0}):(0,$.jsx)(u,{"aria-hidden":!0})}),t[0]=r,t[1]=s);let c=a??n,l;t[2]===n?l=t[3]:(l=()=>o(n),t[2]=n,t[3]=l);let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>o(null),t[4]=d):d=t[4];let f;t[5]===i?f=t[6]:(f=e=>{o(e.currentTarget.value),i(e.currentTarget.value)},t[5]=i,t[6]=f);let p;t[7]!==c||t[8]!==l||t[9]!==f?(p=(0,$.jsx)(Rt,{type:`search`,value:c,onFocus:l,onBlur:d,onChange:f,placeholder:`Search pull requests, or label:bug`,"aria-label":`Search pull requests`}),t[7]=c,t[8]=l,t[9]=f,t[10]=p):p=t[10];let m;return t[11]!==s||t[12]!==p?(m=(0,$.jsxs)(J,{className:`min-w-0 flex-1 **:[input]:h-9 sm:**:[input]:h-8`,children:[s,p]}),t[11]=s,t[12]=p,t[13]=m):m=t[13],m}var xn=`all`,Sn=``,Cn=``,wn=`all`,Tn=e=>JSON.stringify([e.environmentId,e.id]),En=[{value:wn,label:`All`,Icon:D},{value:`only`,label:`Drafts only`,Icon:$e.draft},{value:`hide`,label:`Hide drafts`,Icon:v}],Dn=[{value:wn,label:`All`,Icon:D},{value:`approved`,label:`Approved`,Icon:p},{value:`changes-requested`,label:`Changes requested`,Icon:A},{value:`review-required`,label:`Review required`,Icon:m},{value:`none`,label:`No reviews`,Icon:S}],On=[{value:wn,label:`All`,Icon:D},{value:`passing`,label:`Passing`,Icon:p},{value:`failing`,label:`Failing`,Icon:A}];function kn(e){let t=(0,Z.c)(12),{label:n,value:r,options:i,onChange:a}=e,o;t[0]!==a||t[1]!==r?(o=e=>{e!==r&&a(e)},t[0]=a,t[1]=r,t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,$.jsx)(C,{children:n}),t[3]=n,t[4]=s);let c;t[5]===i?c=t[6]:(c=i.map(An),t[5]=i,t[6]=c);let l;return t[7]!==o||t[8]!==s||t[9]!==c||t[10]!==r?(l=(0,$.jsxs)(T,{value:r,onValueChange:o,children:[s,c]}),t[7]=o,t[8]=s,t[9]=c,t[10]=r,t[11]=l):l=t[11],l}function An(e){let t=(0,$.jsx)(_,{value:e.value,className:e.unavailable?`data-disabled:pointer-events-auto`:void 0,disabled:e.unavailable!==void 0,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(vn,{option:e}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),e.unavailable?(0,$.jsx)(`span`,{className:`shrink-0`,children:`· Unavailable`}):null,(0,$.jsx)(j,{})]})},e.value);return e.unavailable?(0,$.jsxs)(Ve,{children:[(0,$.jsx)(ze,{render:t}),(0,$.jsx)(Be,{side:`top`,children:e.unavailable})]},e.value):t}function jn(e){let t=(0,Z.c)(21),{label:n,value:r,options:i,onChange:a}=e,o;t[0]!==i||t[1]!==r?(o=i.find(e=>e.value===r)??i[0],t[0]=i,t[1]=r,t[2]=o):o=t[2];let s=o;if(!s)return null;let c;t[3]===s?c=t[4]:(c=(0,$.jsx)(vn,{option:s}),t[3]=s,t[4]=c);let l;t[5]===n?l=t[6]:(l=(0,$.jsx)(`span`,{className:`flex-1`,children:n}),t[5]=n,t[6]=l);let u;t[7]===s.label?u=t[8]:(u=(0,$.jsx)(`span`,{className:`min-w-0 max-w-32 truncate text-xs text-muted-foreground`,children:s.label}),t[7]=s.label,t[8]=u);let d;t[9]!==c||t[10]!==l||t[11]!==u?(d=(0,$.jsxs)(x,{children:[c,l,u]}),t[9]=c,t[10]=l,t[11]=u,t[12]=d):d=t[12];let f;t[13]!==n||t[14]!==a||t[15]!==i||t[16]!==r?(f=(0,$.jsx)(I,{children:(0,$.jsx)(kn,{label:n,value:r,options:i,onChange:a})}),t[13]=n,t[14]=a,t[15]=i,t[16]=r,t[17]=f):f=t[17];let p;return t[18]!==d||t[19]!==f?(p=(0,$.jsxs)(O,{children:[d,f]}),t[18]=d,t[19]=f,t[20]=p):p=t[20],p}function Mn(e){let t=(0,Z.c)(47),{value:n,options:r,onChange:i}=e,[a,o]=(0,Q.useState)(``),s,c,l,d,f,p,m,h,g,v;if(t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n){let e=a.trim().toLowerCase(),b;t[14]===n?b=t[15]:(b=n?.toLowerCase()??``,t[14]=n,t[15]=b);let S=b,C;t[16]===S?C=t[17]:(C=e=>e.actor.login.toLowerCase()===S,t[16]=S,t[17]=C);let w=r.find(C);v=[...w?[w]:[],...r.filter(t=>t!==w&&(e.length===0||t.actor.login.toLowerCase().includes(e)||t.actor.name?.toLowerCase().includes(e)))].slice(0,10);let E;t[18]!==S||t[19]!==i?(E=e=>e.toLowerCase()!==S&&i(e||void 0),t[18]=S,t[19]=i,t[20]=E):E=t[20];let ee=E;l=O;let k,A;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(y,{"aria-hidden":!0,className:`size-3.5`}),A=(0,$.jsx)(`span`,{className:`flex-1`,children:`Author`}),t[21]=k,t[22]=A):(k=t[21],A=t[22]);let te=n??`Anyone`;t[23]===te?g=t[24]:(g=(0,$.jsxs)(x,{children:[k,A,(0,$.jsx)(`span`,{className:`min-w-0 max-w-32 truncate text-xs text-muted-foreground`,children:te})]}),t[23]=te,t[24]=g),c=I;let j;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(Lt,{children:(0,$.jsx)(u,{"aria-hidden":!0})}),t[25]=j):j=t[25];let M;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(M=e=>o(e.currentTarget.value),t[26]=M):M=t[26],t[27]===a?h=t[28]:(h=(0,$.jsx)(`div`,{className:`p-1 pb-2`,children:(0,$.jsxs)(J,{children:[j,(0,$.jsx)(Rt,{autoFocus:!0,size:`compact`,value:a,onChange:M,onKeyDown:Pn,placeholder:`Search authors`,"aria-label":`Search authors`})]})}),t[27]=a,t[28]=h),s=T,d=w?.actor.login??n??``,f=ee,t[29]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(_,{value:``,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(D,{"aria-hidden":!0,className:`size-3.5`}),`Anyone`]})}),t[29]=p):p=t[29],m=v.map(Nn),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s,t[5]=c,t[6]=l,t[7]=d,t[8]=f,t[9]=p,t[10]=m,t[11]=h,t[12]=g,t[13]=v}else s=t[4],c=t[5],l=t[6],d=t[7],f=t[8],p=t[9],m=t[10],h=t[11],g=t[12],v=t[13];let b;t[30]===v.length?b=t[31]:(b=v.length===0?(0,$.jsx)(P,{disabled:!0,children:`No authors found`}):null,t[30]=v.length,t[31]=b);let S;t[32]!==s||t[33]!==d||t[34]!==f||t[35]!==p||t[36]!==m||t[37]!==b?(S=(0,$.jsxs)(s,{value:d,onValueChange:f,children:[p,m,b]}),t[32]=s,t[33]=d,t[34]=f,t[35]=p,t[36]=m,t[37]=b,t[38]=S):S=t[38];let C;t[39]!==c||t[40]!==h||t[41]!==S?(C=(0,$.jsxs)(c,{children:[h,S]}),t[39]=c,t[40]=h,t[41]=S,t[42]=C):C=t[42];let w;return t[43]!==l||t[44]!==g||t[45]!==C?(w=(0,$.jsxs)(l,{children:[g,C]}),t[43]=l,t[44]=g,t[45]=C,t[46]=w):w=t[46],w}function Nn(e){return(0,$.jsx)(_,{value:e.actor.login,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(Xe,{actor:e.actor}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.actor.login}),(0,$.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:[e.mergedCount,` merges loaded`]})]})},e.actor.login.toLowerCase())}function Pn(e){e.key!==`ArrowDown`&&e.key!==`Escape`&&e.stopPropagation()}function Fn(e){let t=(0,Z.c)(21),{value:n,options:r,onChange:i}=e,a;t[0]===n?a=t[1]:(a=new Set(n.map(Ln)),t[0]=n,t[1]=a);let s=a,c,u,d,f;if(t[2]!==i||t[3]!==r||t[4]!==s||t[5]!==n){let e=[...n.filter(e=>!r.some(t=>t.name.toLowerCase()===e.toLowerCase())).map(In),...r];u=O;let a,p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(o,{"aria-hidden":!0,className:`size-3.5`}),p=(0,$.jsx)(`span`,{className:`flex-1`,children:`Labels`}),t[10]=a,t[11]=p):(a=t[10],p=t[11]);let m=n.length===0?`Any`:`${n.length} selected`;t[12]===m?f=t[13]:(f=(0,$.jsxs)(x,{children:[a,p,(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:m})]}),t[12]=m,t[13]=f),c=I,d=e.length===0?(0,$.jsx)(P,{disabled:!0,children:`No labels in this view`}):e.map(e=>{let t=e.name.toLowerCase(),r=s.has(t),a=rt(e.color);return(0,$.jsx)(l,{checked:r,onCheckedChange:t=>i(t?[...n,e.name]:n.filter(t=>t.toLowerCase()!==e.name.toLowerCase())),children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-2.5 shrink-0 rounded-full bg-muted-foreground`,...a?{style:{backgroundColor:a}}:{}}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:e.count})]})},t)}),t[2]=i,t[3]=r,t[4]=s,t[5]=n,t[6]=c,t[7]=u,t[8]=d,t[9]=f}else c=t[6],u=t[7],d=t[8],f=t[9];let p;t[14]!==c||t[15]!==d?(p=(0,$.jsx)(c,{children:d}),t[14]=c,t[15]=d,t[16]=p):p=t[16];let m;return t[17]!==u||t[18]!==f||t[19]!==p?(m=(0,$.jsxs)(u,{children:[f,p]}),t[17]=u,t[18]=f,t[19]=p,t[20]=m):m=t[20],m}function In(e){return{name:e,color:null,count:0}}function Ln(e){return e.toLowerCase()}function Rn(e){let t=(0,Z.c)(107),{onOpenChange:n,state:r,stateOptions:i,onState:a,involvement:o,involvementOptions:s,onInvolvement:l,filters:u,onFilters:d,authorOptions:f,labelOptions:p,host:m,hostOptions:g,onHost:_,server:v,serverOptions:y,onServer:b,projects:x,projectId:S,projectEnvironmentId:C,unavailable:T,onProject:E}=e,O;t[0]===f?O=t[1]:(O=f===void 0?[]:f,t[0]=f,t[1]=O);let A=O,te;t[2]===p?te=t[3]:(te=p===void 0?[]:p,t[2]=p,t[3]=te);let j=te,ne,P;t[4]!==u.author||t[5]!==u.checks||t[6]!==u.draft||t[7]!==u.labels||t[8]!==u.review||t[9]!==m||t[10]!==o||t[11]!==S||t[12]!==v||t[13]!==r?(ne=(u.labels??[]).flatMap(Vn),P=[r!==`open`,o!==`all`,m,v,S,u.draft,u.review,u.checks,u.author,...ne].filter(Boolean),t[4]=u.author,t[5]=u.checks,t[6]=u.draft,t[7]=u.labels,t[8]=u.review,t[9]=m,t[10]=o,t[11]=S,t[12]=v,t[13]=r,t[14]=ne,t[15]=P):(ne=t[14],P=t[15]);let F=P.length,I;t[16]!==u||t[17]!==d?(I=e=>d(Object.fromEntries(Object.entries({...u,...e}).filter(Bn))),t[16]=u,t[17]=d,t[18]=I):I=t[18];let L=I,re;t[19]===L?re=t[20]:(re=(e,t)=>L({[e]:t===wn?void 0:t}),t[19]=L,t[20]=re);let R=re,ie;t[21]!==C||t[22]!==S?(ie=S===void 0||C===void 0?xn:Tn({id:S,environmentId:C}),t[21]=C,t[22]=S,t[23]=ie):ie=t[23];let z=ie,B;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(B={value:xn,label:`All projects`,Icon:D},t[24]=B):B=t[24];let V;if(t[25]!==x||t[26]!==T){let e;t[28]===T?e=t[29]:(e=(e,t)=>Number(T.has(Tn(e)))-Number(T.has(Tn(t))),t[28]=T,t[29]=e);let n;t[30]===T?n=t[31]:(n=e=>({value:Tn(e),label:e.title,Icon:c,project:e,...T.has(Tn(e))?{unavailable:T.get(Tn(e))}:{}}),t[30]=T,t[31]=n),V=[B,...x.toSorted(e).map(n)],t[25]=x,t[26]=T,t[27]=V}else V=t[27];let ae=V,oe,se,ce;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,$.jsx)(k,{variant:`outline`}),se=(0,$.jsx)(ee,{className:`size-4`}),ce=(0,$.jsx)(`span`,{children:`Filters`}),t[32]=oe,t[33]=se,t[34]=ce):(oe=t[32],se=t[33],ce=t[34]);let le;t[35]===F?le=t[36]:(le=F>0?(0,$.jsx)(`span`,{className:`rounded-full bg-muted px-1.5 text-xs text-muted-foreground tabular-nums`,children:F}):null,t[35]=F,t[36]=le);let H;t[37]===le?H=t[38]:(H=(0,$.jsxs)(w,{render:oe,children:[se,ce,le]}),t[37]=le,t[38]=H);let U;t[39]!==a||t[40]!==r||t[41]!==i?(U=(0,$.jsx)(jn,{label:`State`,value:r,options:i,onChange:a}),t[39]=a,t[40]=r,t[41]=i,t[42]=U):U=t[42];let W;t[43]!==o||t[44]!==s||t[45]!==l?(W=(0,$.jsx)(jn,{label:`Involvement`,value:o,options:s,onChange:l}),t[43]=o,t[44]=s,t[45]=l,t[46]=W):W=t[46];let ue;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,$.jsx)(N,{}),t[47]=ue):ue=t[47];let de;t[48]===L?de=t[49]:(de=e=>L({author:e}),t[48]=L,t[49]=de);let fe;t[50]!==A||t[51]!==u.author||t[52]!==de?(fe=(0,$.jsx)(Mn,{value:u.author,options:A,onChange:de}),t[50]=A,t[51]=u.author,t[52]=de,t[53]=fe):fe=t[53];let pe;t[54]===L?pe=t[55]:(pe=e=>L({labels:e.length===0?void 0:e.slice(0,10).map(zn)}),t[54]=L,t[55]=pe);let me;t[56]!==j||t[57]!==ne||t[58]!==pe?(me=(0,$.jsx)(Fn,{value:ne,options:j,onChange:pe}),t[56]=j,t[57]=ne,t[58]=pe,t[59]=me):me=t[59];let he=u.draft??wn,ge;t[60]===R?ge=t[61]:(ge=e=>R(`draft`,e),t[60]=R,t[61]=ge);let G;t[62]!==he||t[63]!==ge?(G=(0,$.jsx)(jn,{label:`Draft`,value:he,options:En,onChange:ge}),t[62]=he,t[63]=ge,t[64]=G):G=t[64];let _e=u.review??wn,ve;t[65]===R?ve=t[66]:(ve=e=>R(`review`,e),t[65]=R,t[66]=ve);let ye;t[67]!==_e||t[68]!==ve?(ye=(0,$.jsx)(jn,{label:`Review`,value:_e,options:Dn,onChange:ve}),t[67]=_e,t[68]=ve,t[69]=ye):ye=t[69];let be=u.checks??wn,xe;t[70]===R?xe=t[71]:(xe=e=>R(`checks`,e),t[70]=R,t[71]=xe);let Se;t[72]!==be||t[73]!==xe?(Se=(0,$.jsx)(jn,{label:`Checks`,value:be,options:On,onChange:xe}),t[72]=be,t[73]=xe,t[74]=Se):Se=t[74];let Ce;t[75]!==m||t[76]!==g||t[77]!==_?(Ce=g.length>2?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(N,{}),(0,$.jsx)(jn,{label:`Host`,value:m??Sn,options:g,onChange:e=>_(e===Sn?void 0:e)})]}):null,t[75]=m,t[76]=g,t[77]=_,t[78]=Ce):Ce=t[78];let we;t[79]!==b||t[80]!==v||t[81]!==y?(we=y.length>2?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(N,{}),(0,$.jsx)(jn,{label:`Server`,value:v??Cn,options:y,onChange:e=>b(e===Cn?void 0:e)})]}):null,t[79]=b,t[80]=v,t[81]=y,t[82]=we):we=t[82];let Te;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,$.jsx)(N,{}),t[83]=Te):Te=t[83];let K;t[84]!==E||t[85]!==S||t[86]!==x?(K=e=>{let t=x.find(t=>Tn(t)===e);t?E(t.id,t.environmentId):S!==void 0&&E(void 0,void 0)},t[84]=E,t[85]=S,t[86]=x,t[87]=K):K=t[87];let Ee;t[88]!==ae||t[89]!==z||t[90]!==K?(Ee=(0,$.jsx)(jn,{label:`Project`,value:z,options:ae,onChange:K}),t[88]=ae,t[89]=z,t[90]=K,t[91]=Ee):Ee=t[91];let De;t[92]!==U||t[93]!==W||t[94]!==fe||t[95]!==me||t[96]!==G||t[97]!==ye||t[98]!==Se||t[99]!==Ce||t[100]!==we||t[101]!==Ee?(De=(0,$.jsxs)(M,{align:`end`,side:`bottom`,children:[U,W,ue,fe,me,G,ye,Se,Ce,we,Te,Ee]}),t[92]=U,t[93]=W,t[94]=fe,t[95]=me,t[96]=G,t[97]=ye,t[98]=Se,t[99]=Ce,t[100]=we,t[101]=Ee,t[102]=De):De=t[102];let Oe;return t[103]!==n||t[104]!==H||t[105]!==De?(Oe=(0,$.jsxs)(h,{onOpenChange:n,children:[H,De]}),t[103]=n,t[104]=H,t[105]=De,t[106]=Oe):Oe=t[106],Oe}function zn(e){return[e]}function Bn(e){let[,t]=e;return t!==void 0}function Vn(e){return e}function Hn(e){let t=(0,Z.c)(12),{joined:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`path`,{d:`M10 58h100`,className:`text-muted-foreground/30`,stroke:`currentColor`}),i=(0,$.jsx)(`circle`,{cx:`10`,cy:`58`,r:`5`,fill:`currentColor`,fillOpacity:.25}),a=(0,$.jsx)(`circle`,{cx:`110`,cy:`58`,r:`5`,fill:`currentColor`,fillOpacity:.25}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;t[3]===n?o=t[4]:(o=n?(0,$.jsx)(`path`,{d:`M30 58c0-18 8-26 24-26h12c16 0 24 8 24 26`}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`path`,{d:`M30 58c0-18 8-26 24-26h4`}),(0,$.jsx)(`path`,{d:`M90 58c0-18-8-26-24-26h-4`,strokeDasharray:`2 7`,className:`text-muted-foreground/50`})]}),t[3]=n,t[4]=o);let s=n?5:4,c=n?`currentColor`:`none`,l=n?void 0:`text-muted-foreground/45`,u;t[5]!==s||t[6]!==c||t[7]!==l?(u=(0,$.jsx)(`circle`,{cx:`60`,cy:`32`,r:s,fill:c,fillOpacity:.25,className:l}),t[5]=s,t[6]=c,t[7]=l,t[8]=u):u=t[8];let d;return t[9]!==o||t[10]!==u?(d=(0,$.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 120 72`,className:`h-20 w-32 text-muted-foreground/60`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,children:[r,i,a,o,u]}),t[9]=o,t[10]=u,t[11]=d):d=t[11],d}function Un(e){let t=(0,Z.c)(56),{query:n,filtered:r,searching:i,hasProjects:a,canLoadMore:o,loadingMore:s,refreshing:c,onClearQuery:l,onLoadMore:d,onRefresh:f}=e;if(!a){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Hn,{joined:!1}),t[0]=e):e=t[0];let n;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(Ue,{children:[(0,$.jsx)(Ge,{children:`No projects in this workspace`}),(0,$.jsx)(Ke,{children:`Add a project, and the pull requests from its repository appear here.`})]}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(qe,{children:[e,n,(0,$.jsx)(We,{children:(0,$.jsxs)(k,{size:`sm`,onClick:Wn,children:[(0,$.jsx)(b,{className:`size-3.5`}),`Add project`]})})]}),t[2]=r):r=t[2],r}if(i){let e;t[3]===n?e=t[4]:(e=n.length>48?`${n.slice(0,48)}…`:n,t[3]=n,t[4]=e);let r=`Searching every host for “${e}”`,i;return t[5]===r?i=t[6]:(i=(0,$.jsx)(Fe,{rows:5,caption:r}),t[5]=r,t[6]=i),i}if(n.length>0){let e;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Hn,{joined:!1}),t[7]=e):e=t[7];let r;t[8]===n?r=t[9]:(r=n.length>48?`${n.slice(0,48)}…`:n,t[8]=n,t[9]=r);let i;t[10]===r?i=t[11]:(i=(0,$.jsxs)(Ge,{children:[`Nothing matches “`,r,`”`]}),t[10]=r,t[11]=i);let a;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(Ke,{children:`The hosts were searched for it. Try fewer words, or search by number, author or branch.`}),t[12]=a):a=t[12];let o;t[13]===i?o=t[14]:(o=(0,$.jsxs)(Ue,{children:[i,a]}),t[13]=i,t[14]=o);let s;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(u,{className:`size-3.5`}),t[15]=s):s=t[15];let d;t[16]===l?d=t[17]:(d=(0,$.jsxs)(k,{size:`sm`,variant:`outline`,onClick:l,children:[s,`Clear search`]}),t[16]=l,t[17]=d);let p;t[18]===c?p=t[19]:(p=(0,$.jsx)(en,{size:`sm`,refreshing:c}),t[18]=c,t[19]=p);let m=c?`Checking...`:`Check again`,h;t[20]!==f||t[21]!==c||t[22]!==p||t[23]!==m?(h=(0,$.jsxs)(k,{size:`sm`,variant:`outline`,disabled:c,onClick:f,children:[p,m]}),t[20]=f,t[21]=c,t[22]=p,t[23]=m,t[24]=h):h=t[24];let g;t[25]!==h||t[26]!==d?(g=(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[d,h]}),t[25]=h,t[26]=d,t[27]=g):g=t[27];let _;return t[28]!==g||t[29]!==o?(_=(0,$.jsxs)(qe,{children:[e,o,g]}),t[28]=g,t[29]=o,t[30]=_):_=t[30],_}let p;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(Hn,{joined:!1}),t[31]=p):p=t[31];let m=r?`Nothing under these filters`:`No pull requests`,h;t[32]===m?h=t[33]:(h=(0,$.jsx)(Ge,{children:m}),t[32]=m,t[33]=h);let g=r?`Widen the state, involvement or project filter to see more.`:`Pull requests from every project in this workspace appear here.`,_;t[34]===g?_=t[35]:(_=(0,$.jsx)(Ke,{children:g}),t[34]=g,t[35]=_);let v;t[36]!==h||t[37]!==_?(v=(0,$.jsxs)(Ue,{children:[h,_]}),t[36]=h,t[37]=_,t[38]=v):v=t[38];let y;t[39]!==o||t[40]!==s||t[41]!==d?(y=o?(0,$.jsx)(k,{size:`sm`,variant:`outline`,disabled:s,onClick:d,children:s?`Loading...`:`Load more pull requests`}):null,t[39]=o,t[40]=s,t[41]=d,t[42]=y):y=t[42];let x;t[43]===c?x=t[44]:(x=(0,$.jsx)(en,{size:`sm`,refreshing:c}),t[43]=c,t[44]=x);let S=c?`Checking...`:`Check again`,C;t[45]!==f||t[46]!==c||t[47]!==x||t[48]!==S?(C=(0,$.jsxs)(k,{size:`sm`,variant:`outline`,disabled:c,onClick:f,children:[x,S]}),t[45]=f,t[46]=c,t[47]=x,t[48]=S,t[49]=C):C=t[49];let w;t[50]!==C||t[51]!==y?(w=(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[y,C]}),t[50]=C,t[51]=y,t[52]=w):w=t[52];let T;return t[53]!==w||t[54]!==v?(T=(0,$.jsxs)(qe,{children:[p,v,w]}),t[53]=w,t[54]=v,t[55]=T):T=t[55],T}function Wn(){return an({open:`add-project`})}function Gn(e){let t=(0,Z.c)(22),{environmentId:n,reference:r,onSelect:i,stackNumber:a}=e,o=Ie(n,r);if(o.data!==null){let e=!!o.error,n;t[0]!==o.data.number||t[1]!==o.notice||t[2]!==e?(n=(0,$.jsx)(Le,{number:o.data.number,notice:o.notice,stale:e}),t[0]=o.data.number,t[1]=o.notice,t[2]=e,t[3]=n):n=t[3];let a;t[4]!==o.error||t[5]!==o.refresh?(a=o.error?(0,$.jsx)(P,{onClick:o.refresh,children:`Retry stack refresh`}):null,t[4]=o.error,t[5]=o.refresh,t[6]=a):a=t[6];let s;t[7]!==i||t[8]!==o.data||t[9]!==r?(s=(0,$.jsx)(ye,{stack:o.data,reference:r,onSelect:i}),t[7]=i,t[8]=o.data,t[9]=r,t[10]=s):s=t[10];let c;return t[11]!==n||t[12]!==a||t[13]!==s?(c=(0,$.jsxs)($.Fragment,{children:[n,a,s]}),t[11]=n,t[12]=a,t[13]=s,t[14]=c):c=t[14],c}let s;t[15]===a?s=t[16]:(s=(0,$.jsx)(Le,{number:a}),t[15]=a,t[16]=s);let c=o.error??(o.isPending?`Loading stack…`:`This pull request is no longer in a stack.`),l;t[17]===c?l=t[18]:(l=(0,$.jsx)(C,{children:c}),t[17]=c,t[18]=l);let u;return t[19]!==s||t[20]!==l?(u=(0,$.jsxs)($.Fragment,{children:[s,l]}),t[19]=s,t[20]=l,t[21]=u):u=t[21],u}function Kn(e){let t=(0,Z.c)(25),{environmentId:n,reference:r,membership:a,onSelect:o}=e,[s,c]=(0,Q.useState)(!1),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(`span`,{role:`button`,tabIndex:0,className:`inline-flex shrink-0 cursor-pointer items-center gap-1 text-xs font-normal text-muted-foreground`}),t[0]=l):l=t[0];let u=`Stack ${a.number}, layer ${a.position} of ${a.size}`,d;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)($e.stack,{"aria-hidden":!0,className:`size-3`}),t[1]=d):d=t[1];let f;t[2]!==a.position||t[3]!==a.size||t[4]!==u?(f=(0,$.jsx)(ze,{render:(0,$.jsxs)(w,{nativeButton:!1,render:l,"aria-label":u,onClick:Xn,onKeyDown:Yn,children:[d,a.position,`/`,a.size]})}),t[2]=a.position,t[3]=a.size,t[4]=u,t[5]=f):f=t[5];let p;t[6]!==a.number||t[7]!==a.position||t[8]!==a.size?(p=(0,$.jsxs)(Be,{children:[`View stack #`,a.number,`, layer `,a.position,` of `,a.size]}),t[6]=a.number,t[7]=a.position,t[8]=a.size,t[9]=p):p=t[9];let m;t[10]!==f||t[11]!==p?(m=(0,$.jsxs)(Ve,{children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12];let g;t[13]!==n||t[14]!==a.number||t[15]!==o||t[16]!==s||t[17]!==r?(g=s?(0,$.jsx)(Gn,{environmentId:n,reference:r,stackNumber:a.number,onSelect:e=>{c(!1),o(e)}}):null,t[13]=n,t[14]=a.number,t[15]=o,t[16]=s,t[17]=r,t[18]=g):g=t[18];let _;t[19]===g?_=t[20]:(_=(0,$.jsx)(M,{align:`start`,onClick:Jn,onKeyDown:qn,children:(0,$.jsx)(i,{children:g})}),t[19]=g,t[20]=_);let v;return t[21]!==s||t[22]!==m||t[23]!==_?(v=(0,$.jsxs)(h,{open:s,onOpenChange:c,children:[m,_]}),t[21]=s,t[22]=m,t[23]=_,t[24]=v):v=t[24],v}function qn(e){return e.stopPropagation()}function Jn(e){return e.stopPropagation()}function Yn(e){return e.stopPropagation()}function Xn(e){return e.stopPropagation()}var Zn=[{overflow:`@xl/pr-row-meta:hidden`},{overflow:`@3xl/pr-row-meta:hidden`},{overflow:``}];function Qn(e){let t=(0,Z.c)(4),{labels:n}=e;if(n.length===0)return null;let r;t[0]===n?r=t[1]:(r=Zn.map((e,t)=>{let r=n[t];if(!r)return null;let i=n.length-t-1;return(0,$.jsx)(Ze,{label:r,className:t===0?``:t===1?`hidden @xl/pr-row-meta:inline-flex`:`hidden @3xl/pr-row-meta:inline-flex`,children:i>0?(0,$.jsxs)(`span`,{className:ne(`shrink-0`,e.overflow),children:[`+`,i]}):null},r.name)}),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,$.jsx)(`span`,{className:`flex min-w-0 items-center gap-1`,children:r}),t[2]=r,t[3]=i),i}var $n=`px-3 py-2.5`;function er(e){let t=(0,Z.c)(99),{entry:n,selected:r,showProjectTitle:i,showProvider:a,environmentLabel:o,matchedElsewhere:s,statsKey:c,statsRef:l,onSelect:d,speedMode:f,hostActions:p,onActed:m,closing:h,sweeping:g,onCloseSweepStart:_}=e,v=h!==void 0&&h,y=g!==void 0&&g,b;t[0]===n.provider?b=t[1]:(b=ln(n.provider),t[0]=n.provider,t[1]=b);let{Icon:x,providerName:S}=b,C=r?`bg-accent`:`hover:bg-accent/60`,w;t[2]===C?w=t[3]:(w=ne(`flex items-center rounded-md [content-visibility:auto] [contain-intrinsic-block-size:56.5px]`,C),t[2]=C,t[3]=w);let T=r?`true`:void 0,E;t[4]!==n||t[5]!==d?(E=()=>d(n),t[4]=n,t[5]=d,t[6]=E):E=t[6];let D;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(D=ne(xe,$n,`min-w-0 flex-1 cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring`),t[7]=D):D=t[7];let O;t[8]!==n.baseBranch||t[9]!==n.isDraft||t[10]!==n.mergeability||t[11]!==n.state?(O=(0,$.jsx)(Ee,{state:n.state,isDraft:n.isDraft,mergeability:n.mergeability,baseBranch:n.baseBranch,className:`mt-0.75 self-start`}),t[8]=n.baseBranch,t[9]=n.isDraft,t[10]=n.mergeability,t[11]=n.state,t[12]=O):O=t[12];let ee;t[13]!==n.provider||t[14]!==n.url?(ee=e=>{e.preventDefault(),e.stopPropagation(),K({url:n.url,openLabel:De(Qe.get(n.provider)),position:{x:e.clientX,y:e.clientY}})},t[13]=n.provider,t[14]=n.url,t[15]=ee):ee=t[15];let k;t[16]!==n.number||t[17]!==ee?(k=(0,$.jsxs)(`span`,{className:ke,onContextMenu:ee,children:[`#`,n.number]}),t[16]=n.number,t[17]=ee,t[18]=k):k=t[18];let A;t[19]!==n.checksState||t[20]!==n.environmentId||t[21]!==n.number||t[22]!==n.projectId||t[23]!==n.repository?(A=n.checksState===void 0?null:(0,$.jsx)(Ae,{checksState:n.checksState,environmentId:n.environmentId,reference:{projectId:n.projectId,repository:n.repository,number:n.number}}),t[19]=n.checksState,t[20]=n.environmentId,t[21]=n.number,t[22]=n.projectId,t[23]=n.repository,t[24]=A):A=t[24];let te;t[25]===n.reviewDecision?te=t[26]:(te=n.reviewDecision===void 0?null:(0,$.jsx)(q,{decision:n.reviewDecision}),t[25]=n.reviewDecision,t[26]=te);let j;t[27]!==A||t[28]!==te?(j=(0,$.jsxs)($.Fragment,{children:[A,te]}),t[27]=A,t[28]=te,t[29]=j):j=t[29];let M;t[30]!==n.environmentId||t[31]!==n.host||t[32]!==n.number||t[33]!==n.projectId||t[34]!==n.repository||t[35]!==n.stack||t[36]!==d?(M=n.stack?(0,$.jsx)(Kn,{environmentId:n.environmentId,reference:{projectId:n.projectId,host:n.host,repository:n.repository,number:n.number},membership:n.stack,onSelect:e=>d({...e,host:n.host,environmentId:n.environmentId})}):null,t[30]=n.environmentId,t[31]=n.host,t[32]=n.number,t[33]=n.projectId,t[34]=n.repository,t[35]=n.stack,t[36]=d,t[37]=M):M=t[37];let N;t[38]!==n.host||t[39]!==n.number||t[40]!==n.projectId||t[41]!==n.repository?(N={projectId:n.projectId,host:n.host,repository:n.repository,number:n.number},t[38]=n.host,t[39]=n.number,t[40]=n.projectId,t[41]=n.repository,t[42]=N):N=t[42];let P;t[43]!==n.additions||t[44]!==n.deletions||t[45]!==n.environmentId||t[46]!==N?(P=(0,$.jsx)(Se,{environmentId:n.environmentId,reference:N,additions:n.additions,deletions:n.deletions,className:`font-mono`}),t[43]=n.additions,t[44]=n.deletions,t[45]=n.environmentId,t[46]=N,t[47]=P):P=t[47];let F;t[48]!==M||t[49]!==P?(F=(0,$.jsxs)($.Fragment,{children:[M,P]}),t[48]=M,t[49]=P,t[50]=F):F=t[50];let I;t[51]===s?I=t[52]:(I=s?(0,$.jsxs)(Ve,{children:[(0,$.jsxs)(ze,{render:(0,$.jsx)(`span`,{className:`flex min-w-6 items-center gap-1 overflow-hidden rounded-full border border-border/60 px-1 text-3xs`}),children:[(0,$.jsx)(`span`,{className:`sr-only`,children:`matched in the description`}),(0,$.jsx)(u,{"aria-hidden":!0,className:`size-3 shrink-0`}),(0,$.jsx)(`span`,{"aria-hidden":!0,className:`hidden truncate @xs/pr-row-meta:block`,children:`matched in the description`})]}),(0,$.jsx)(Be,{side:`top`,children:`Matched in the description`})]}):null,t[51]=s,t[52]=I);let L;t[53]!==x||t[54]!==S||t[55]!==a?(L=a?(0,$.jsxs)(Ve,{children:[(0,$.jsx)(ze,{render:(0,$.jsx)(`span`,{className:`inline-flex shrink-0`}),children:(0,$.jsx)(x,{"aria-label":S,className:`size-3`})}),(0,$.jsx)(Be,{children:S})]}):null,t[53]=x,t[54]=S,t[55]=a,t[56]=L):L=t[56];let re;t[57]===n.author?re=t[58]:(re=(0,$.jsx)(Me,{actor:n.author,className:`min-w-3.5 max-w-40`,labelClassName:`sr-only @xs/pr-row-meta:not-sr-only @xs/pr-row-meta:truncate`}),t[57]=n.author,t[58]=re);let R;t[59]!==n.repository||t[60]!==i?(R=i?(0,$.jsx)(`span`,{className:`truncate`,children:n.repository}):null,t[59]=n.repository,t[60]=i,t[61]=R):R=t[61];let ie;t[62]===o?ie=t[63]:(ie=o?(0,$.jsx)(`span`,{className:`min-w-0 max-w-32 truncate`,children:o}):null,t[62]=o,t[63]=ie);let z;t[64]===n.labels?z=t[65]:(z=n.labels.length>0?(0,$.jsx)(Qn,{labels:n.labels}):null,t[64]=n.labels,t[65]=z);let B;t[66]!==I||t[67]!==L||t[68]!==re||t[69]!==R||t[70]!==ie||t[71]!==z?(B=(0,$.jsxs)($.Fragment,{children:[I,L,re,R,ie,z]}),t[66]=I,t[67]=L,t[68]=re,t[69]=R,t[70]=ie,t[71]=z,t[72]=B):B=t[72];let V;t[73]!==n.title||t[74]!==n.updatedAt||t[75]!==k||t[76]!==j||t[77]!==F||t[78]!==B?(V=(0,$.jsx)(Pe,{number:k,title:n.title,signals:j,status:F,metaClassName:`@container/pr-row-meta`,meta:B,updatedAt:n.updatedAt}),t[73]=n.title,t[74]=n.updatedAt,t[75]=k,t[76]=j,t[77]=F,t[78]=B,t[79]=V):V=t[79];let ae;t[80]!==V||t[81]!==T||t[82]!==E||t[83]!==O?(ae=(0,$.jsxs)(`button`,{type:`button`,"aria-current":T,onClick:E,className:D,children:[O,V]}),t[80]=V,t[81]=T,t[82]=E,t[83]=O,t[84]=ae):ae=t[84];let oe;t[85]!==v||t[86]!==n||t[87]!==p||t[88]!==m||t[89]!==_||t[90]!==f||t[91]!==y?(oe=p.size>0?(0,$.jsx)(Ce,{entry:n,hostActions:p,visible:f,onActed:m,closing:v,sweeping:y,..._?{onCloseSweepStart:_}:{}}):null,t[85]=v,t[86]=n,t[87]=p,t[88]=m,t[89]=_,t[90]=f,t[91]=y,t[92]=oe):oe=t[92];let se;return t[93]!==c||t[94]!==l||t[95]!==ae||t[96]!==oe||t[97]!==w?(se=(0,$.jsxs)(`div`,{ref:l,"data-pull-request-stats-key":c,"data-pull-request-key":c,className:w,children:[ae,oe]}),t[93]=c,t[94]=l,t[95]=ae,t[96]=oe,t[97]=w,t[98]=se):se=t[98],se}var tr=(0,Q.memo)(er);function nr(){let e=(0,Z.c)(15),t=R(),n=z(),r=B(),i=Wt(or),a=U(ar),o=U(Ht),s=W(),c=H(),l;e[0]!==i||e[1]!==t?(l=Y({items:t,preferredIds:i,getId:Vt,getPreferenceIds:ir}),e[0]=i,e[1]=t,e[2]=l):l=e[2];let u=l,d;if(e[3]!==s||e[4]!==o||e[5]!==u||e[6]!==c||e[7]!==t||e[8]!==a){let n=new Map(s.map(rr));d=Zt({projects:a===`manual`?u:t,groupScratchProjects:!0,settings:o,primaryEnvironmentId:c,resolveEnvironmentLabel:e=>n.get(e)??null}),e[3]=s,e[4]=o,e[5]=u,e[6]=c,e[7]=t,e[8]=a,e[9]=d}else d=e[9];let f=d,p;return e[10]!==r||e[11]!==a||e[12]!==n||e[13]!==f?(p=zt(f,n,a,r),e[10]=r,e[11]=a,e[12]=n,e[13]=f,e[14]=p):p=e[14],p}function rr(e){return[e.environmentId,e.label]}function ir(e){return[Vt(e),Gt(e.workspaceRoot)]}function ar(e){return e.sidebarProjectSortOrder}function or(e){return e.projectOrder}function sr(){return{terminalFocus:Xt(),terminalOpen:!1,previewFocus:!1,previewOpen:!1,modelPickerOpen:!1,isWeb:!Re,isDesktop:Re}}var cr={authored:a,reviewRequested:L,others:F};function lr(e){let t=(0,Z.c)(11),{group:n}=e,r=cr[n.key]??D,i;t[0]===r?i=t[1]:(i=(0,$.jsx)(r,{"aria-hidden":!0,className:`size-3.5 shrink-0`}),t[0]=r,t[1]=i);let a;t[2]===n.label?a=t[3]:(a=(0,$.jsx)(`h2`,{className:`shrink-0`,children:n.label}),t[2]=n.label,t[3]=a);let o;t[4]===n.entries.length?o=t[5]:(o=(0,$.jsx)(`span`,{className:`shrink-0 tabular-nums text-muted-foreground/50`,children:n.entries.length}),t[4]=n.entries.length,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(d,{className:`min-w-2 flex-1`}),t[6]=s):s=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==o?(c=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pb-1 text-xs font-medium text-muted-foreground/70`,children:[i,a,o,s]}),t[7]=i,t[8]=a,t[9]=o,t[10]=c):c=t[10],c}var ur=[{value:`all`,label:`All`,Icon:D},{value:`reviewing`,label:`Reviewing`,Icon:L},{value:`authored`,label:`Authored`,Icon:a}],dr=[{value:`all`,label:`All`,Icon:D},{value:`open`,label:`Open`,Icon:$e.pullRequest},{value:`closed`,label:`Closed`,Icon:$e.closed},{value:`merged`,label:`Merged`,Icon:$e.merged}],fr=250,pr=10,mr=99,hr=500,gr={},_r=[],vr={},yr={},br=new Map,xr=new Set,Sr=e=>me({...e,repository:e.repository.toLowerCase()});function Cr(){oe();let e=Yt(!0),t=e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey,n=cn.useSearch(),r=n.sort??`ready`,i=r===`ready`||r===`largest`||r===`smallest`?`eager`:`visible`,a=ae({from:cn.fullPath}),o=E(ue),{environments:c}=le(),l=(0,Q.useMemo)(()=>c.filter(e=>e.serverConfig?.environment.capabilities.pullRequests===!0).toSorted((e,t)=>e.environmentId.localeCompare(t.environmentId)),[c]),u=l.find(e=>e.environmentId===n.environmentId)?.environmentId??null,d=(0,Q.useMemo)(()=>new Set(c.map(e=>e.environmentId)),[c]),f=(0,Q.useMemo)(()=>l.filter(e=>u===null||e.environmentId===u).map(e=>e.environmentId),[l,u]),p=(0,Q.useMemo)(()=>ht(f),[f]),m=c.some(e=>e.serverConfig!==null),h=f.length>0,_=R(),v=ie(),y=(0,Q.useMemo)(()=>_.filter(e=>!e.isScratch&&f.includes(e.environmentId)),[_,f]),b=(0,Q.useMemo)(()=>new Map(c.map(e=>[e.environmentId,e.label])),[c]),x=(0,Q.useMemo)(()=>ft(n.projectId,y,v),[y,v,n.projectId]),S=(0,Q.useMemo)(()=>Et(y,u,x),[y,u,x]),C=(0,Q.useMemo)(()=>_n(y,b,S),[b,y,S]),w=n.selectedHost??n.host,T=(0,Q.useMemo)(()=>{let e=n.repository?.toLowerCase();if(e!==void 0)return y.find(t=>t.repositoryIdentity?.owner&&t.repositoryIdentity.name&&`${t.repositoryIdentity.owner}/${t.repositoryIdentity.name}`.toLowerCase()===e&&(w===void 0||s(t.repositoryIdentity,t.repositoryIdentity.provider)===w.toLowerCase()))?.id},[y,w,n.repository]),O=(0,Q.useMemo)(()=>ft(n.selectedProjectId,y,v),[y,v,n.selectedProjectId])??T??x,ee=st(n.selectedEnvironmentId,d,u),A=(0,Q.useMemo)(()=>Et(y,ee,O),[y,ee,O]),j=l.length===0?null:ge,M=Kt(j),N=G(e=>fe(e.byThreadKey,j)),P=G(e=>he(e.byThreadKey,j)),F=P?.kind===`pull-request`?P:null,I=N.isOpen?F:null,{active:L,durationMs:z}=Jt(),B=(0,Q.useMemo)(()=>({activeSurface:F,surfaces:N.surfaces}),[N.surfaces,F]),H=qt(N.isOpen&&F!==null,B,L,j?.threadId??null,z),U=H.present,W=H.value?.activeSurface??null,ye=H.value?.surfaces??[],xe=W?.environmentId??A?.environmentId??null,Se=(0,Q.useCallback)(e=>void a({search:t=>{let n={...t,...e};return{involvement:n.involvement??t.involvement,state:n.state??t.state,...n.sort&&n.sort!==`ready`?{sort:n.sort}:{},...n.repository?{repository:n.repository}:{},...n.number?{number:n.number}:{},...n.projectId?{projectId:n.projectId}:{},...n.environmentId?{environmentId:n.environmentId}:{},...n.host?{host:n.host}:{},...n.selectedHost?{selectedHost:n.selectedHost}:{},...n.selectedProjectId?{selectedProjectId:n.selectedProjectId}:{},...n.selectedEnvironmentId?{selectedEnvironmentId:n.selectedEnvironmentId}:{},...n.q?{q:n.q}:{},...n.draft?{draft:n.draft}:{},...n.review?{review:n.review}:{},...n.checks?{checks:n.checks}:{},...n.author?{author:n.author}:{},...n.labels&&n.labels.length>0?{labels:n.labels}:{}}},replace:!0}),[a]),Ce={repository:void 0,number:void 0,selectedProjectId:void 0,selectedEnvironmentId:void 0,selectedHost:void 0},K=e=>{let t=nn({...n,...e,involvement:e.involvement??n.involvement,state:e.state??n.state});sn(t),Se(e)},Ee=(n.q??``).trim(),[De,ke]=(0,Q.useState)(!1),Ae=_e(Ee,fr),Me=Ee===Ae,Pe=(0,Q.useMemo)(()=>yt(Ee),[Ee]),Ie=(0,Q.useMemo)(()=>yt(Ae),[Ae]),Le=(0,Q.useMemo)(()=>({...n.draft?{draft:n.draft}:{},...n.review?{review:n.review}:{},...n.checks?{checks:n.checks}:{},...n.author?{author:n.author}:{},...n.labels?{labels:n.labels.map(e=>[e])}:{}}),[n.author,n.checks,n.draft,n.labels,n.review]),Re=Object.keys(Le).length>0,ze=(0,Q.useMemo)(()=>({...Le,...Ie.filters}),[Le,Ie.filters]),Be=Object.keys(ze).length>0,Ve=(0,Q.useMemo)(()=>({...Le,...Pe.filters}),[Le,Pe.filters]),Ue=Object.keys(Ve).length>0,We=(0,Q.useMemo)(()=>at(f,y,S,x,v),[f,y,v,S,x]),Ge=(0,Q.useMemo)(()=>{let e=We.map(e=>({environmentId:e}));if(!v||x!==void 0)return e;let t=be(y,We,We[0]),n=new Map;for(let e of y)n.set(e.environmentId,(n.get(e.environmentId)??0)+1);return We.flatMap(e=>{let r=t.get(e);return r===void 0?[]:r.length===(n.get(e)??0)?[{environmentId:e}]:[{environmentId:e,projectIds:r}]})},[y,v,We,x]),Ke=(0,Q.useMemo)(()=>Ge.map(({environmentId:e,projectIds:t})=>`${e}#${t?.join(`+`)??`*`}`).join(`|`),[Ge]),qe=Tt(Ge.map(({environmentId:e})=>e)).map(([e,t])=>`${e}:${t}`).join(`|`),Xe=`${p}:${Ke}:${n.state}:${n.involvement}:${x??``}:${n.host??``}:${n.draft??``}:${n.review??``}:${n.checks??``}:${n.author??``}:${n.labels?.join(`\0`)??``}`,q=`${Xe}:${Ae}`,Ze=(0,Q.useRef)({key:q,policy:i});Ze.current={key:q,policy:i};let[Qe,$e]=(0,Q.useState)({key:q,size:mr,cursors:null,regrown:[]}),rt=Qe.key===q?Qe.size:mr,It=Qe.key===q?Qe.cursors:null,Lt=Qe.key===q?Qe.regrown:[];(0,Q.useEffect)(()=>{$e({key:q,size:mr,cursors:null,regrown:[]})},[q]);let Rt=(0,Q.useMemo)(()=>Ge.flatMap(({environmentId:e,projectIds:t})=>{let r=It?.[e];return It!==null&&r===void 0&&!Lt.includes(e)?[]:[{environmentId:e,input:{state:n.state,involvement:n.involvement,limit:rt,...x?{projectId:x}:{},...t?{projectIds:t}:{},...n.host?{host:n.host}:{},...Be?{filters:ze}:{},...Ie.text?{query:Ie.text}:{},...r===void 0?{}:{cursors:r}}}]}),[ze,Be,rt,Ge,x,n.host,n.involvement,n.state,It,Lt,Ie.text]),J=Dt(Rt),zt=(0,Q.useMemo)(()=>Ge.map(({environmentId:e,projectIds:t})=>({environmentId:e,input:{state:n.state,involvement:n.involvement,limit:mr,...x?{projectId:x}:{},...t?{projectIds:t}:{},...n.host?{host:n.host}:{},...Re?{filters:Le}:{}}})),[Re,Le,Ge,x,n.host,n.involvement,n.state]),Y=Dt(zt),Vt=Y.data?.entries.length===0&&Y.data.errors.length===0&&!Y.isPending&&Y.error===null,Ht=(0,Q.useMemo)(()=>De?Ge.map(({environmentId:e,projectIds:t})=>({environmentId:e,input:{state:`all`,involvement:n.involvement,limit:mr,...x?{projectId:x}:{},...t?{projectIds:t}:{},...n.host?{host:n.host}:{}}})):_r,[Ge,De,x,n.host,n.involvement]),Ut=Dt(Ht),Wt=n.involvement===`all`&&Ee.length===0,Gt=(0,Q.useMemo)(()=>{if(!Wt||Y.data===null||Y.data.entries.length===0)return{authored:_r,reviewing:_r};let e=e=>Ge.map(({environmentId:t,projectIds:r})=>({environmentId:t,input:{state:n.state,involvement:e,limit:mr,...x?{projectId:x}:{},...r?{projectIds:r}:{},...n.host?{host:n.host}:{},...Re?{filters:Le}:{}}}));return{authored:e(`authored`),reviewing:e(`reviewing`)}},[Re,Le,Wt,Y.data,Ge,x,n.host,n.state]),Xt=Dt(Gt.authored),Zt=Dt(Gt.reviewing),$t=de(kt.invalidate,{reportFailure:!1}),[en,tn]=(0,Q.useState)(0),[an,un]=(0,Q.useState)(!1),dn=(e=Ze.current,t)=>{Gn(!0,t);let n=ir.current,r=et({requestedScope:e,currentScope:Ze.current,entriesByKey:rr.current,candidateKeys:n.key===e.key?n.values:new Set,statsByRow:cr.current});r!==null&&(Er({key:e.key,batches:r}),Fr.refresh(r.filter(({environmentId:e})=>t===void 0||e===t).map(({environmentId:e,input:t})=>({environmentId:e,input:t}))))},pn=async()=>{let e=Ze.current;un(!0);try{await Promise.all(We.map(e=>$t({environmentId:e,input:{}})))}finally{un(!1)}dn(e),tn(e=>e+1)},mn=an||J.isPending,[X,Z]=(0,Q.useState)(null),[gn,vn]=(0,Q.useState)(null),[xn,Sn]=(0,Q.useState)(()=>new Map),Cn=(0,Q.useRef)(0),wn=(e,t)=>{let n=++Cn.current,r=dt(e,t,new Date,n);return r===null?null:(Sn(t=>new Map(t).set(nt(e),r)),n)},En=(e,t)=>{t!==null&&Sn(n=>{if(n.get(e)?.token!==t)return n;let r=new Map(n);return r.delete(e),r})},Dn=(0,Q.useRef)(new Map),On=(0,Q.useRef)(()=>{});On.current=({entry:e,action:t})=>{t!==`merge`&&wn(e,t)};let kn=(0,Q.useCallback)(e=>{On.current(e)},[]),An=(0,Q.useCallback)(e=>{On.current({entry:e,action:`close`})},[]),{close:jn,closingKeys:Mn}=fn(An);(0,Q.useEffect)(()=>{p.length!==0&&Z(e=>{if(e!==null&&e.environmentKey===p)return e;let t=ut(typeof window>`u`?void 0:window.localStorage,p);return t===null?null:{environmentKey:p,scope:t.scope,query:``,data:t.data,...t.partitions===void 0?{}:{partitions:t.partitions}}})},[p]),(0,Q.useEffect)(()=>{if(!J.data||J.isPending)return;let e=J.data;Z(t=>{let n=Wt&&Vt?{authored:[],reviewing:[]}:Wt&&Xt.data!==null&&Zt.data!==null?{authored:Xt.data.entries,reviewing:Zt.data.entries}:t!==null&&t.environmentKey===p&&t.scope===Xe?t.partitions:void 0;if(p.length>0&&Ae.length===0){let t=gn?.key===q?gn.entries:e.entries;gt(typeof window>`u`?void 0:window.localStorage,p,{scope:Xe,data:{...e,entries:t,viewers:Y.data?.viewers??e.viewers,providers:Y.data?.providers??e.providers},...n===void 0?{}:{partitions:n}})}return{environmentKey:p,scope:Xe,query:Ae,data:{...e,entries:gn?.key===q?gn.entries:e.entries},...n===void 0?{}:{partitions:n}}})},[p,Xe,Ae,J.data,J.isPending,Vt,Wt,Xt.data,Zt.data,gn,q,Y.data]);let Nn=(0,Q.useMemo)(()=>{if(X===null||X.environmentKey!==p||X.scope===Xe)return null;let e=Pt(X.data.entries,{state:n.state,projectId:x,host:n.host});return e.length===0?null:{...X.data,entries:e}},[p,X,Xe,x,n.host,n.state]),Pn=(Ae.length===0&&It===null&&rt===mr?Y.data:J.data)??(X?.scope===Xe&&X.query===Ae?X.data:null),Fn=(Ae.length===0?Y.data:void 0)??(X?.scope===Xe?X.data:null)??Nn,In=Pn??Fn,Ln=Pn===null&&Fn!==null,Rn=J.isPending&&In!==null,zn=J.isPending&&In===null;(0,Q.useEffect)(()=>{!Pn||J.isPending||J.error&&J.data===null||(vn(e=>{if(e===null||e.key!==q)return{key:q,entries:lt(Pn.entries,Ie.text)};if(It!==null){let t=new Set(e.entries.map(nt)),n=Pn.entries.filter(e=>!t.has(nt(e))),r=lt(n.toSorted((e,t)=>t.updatedAt.localeCompare(e.updatedAt)),Ie.text);return{key:q,entries:[...e.entries,...r]}}return{key:q,entries:pt(e.entries,lt(Pn.entries,Ie.text),nt)}}),Sn(e=>tt(e,Pn.entries,nt,Date.now())))},[Pn,q,It,Ie.text,J.isPending,J.error,J.data]);let Bn=Pn?.nextCursors??{},Vn=(Pn?.truncatedEnvironments??[]).filter(e=>Bn[e]===void 0),Hn=!Ln&&Object.keys(Bn).length>0,Wn=()=>{$e(Hn?{key:q,size:Vn.length===0?rt:Math.min(rt+mr,hr),cursors:Bn,regrown:Vn}:{key:q,size:Math.min(rt+mr,hr),cursors:null,regrown:[]})},Gn=(e=!1,t)=>{let n=(e?[...zt,...Ht,...Gt.authored,...Gt.reviewing]:[]).filter(({environmentId:e})=>t===void 0||e===t);if(It===null){J.refresh([...Rt.filter(({environmentId:e})=>t===void 0||e===t),...n]);return}n.length>0&&J.refresh(n);let r=gn?.key===q?gn.entries.length:rt;$e({key:q,regrown:[],size:Math.min(Math.max(rt,Math.ceil(r/mr)*mr),hr),cursors:null})},Kn=(0,Q.useRef)(``),qn=(0,Q.useEffectEvent)(()=>{It!==null&&Gn()});(0,Q.useEffect)(()=>{qe.length!==0&&Kn.current!==qe&&(Kn.current=qe,qn())},[qe]),ve(()=>{Gn(!0)},{enabled:h});let Jn=Y.data?.viewers??In?.viewers??gr,Yn=Y.data?.errors??In?.errors??[],Xn=(0,Q.useMemo)(()=>xt([...Ut.data?.entries??[],...Y.data?.entries??In?.entries??[]],n.state),[Y.data?.entries,Ut.data?.entries,In?.entries,n.state]),Zn=(0,Q.useMemo)(()=>new Set((Y.data?.providers??In?.providers??[]).flatMap(e=>e.searchesOnHost?[e.host]:[])),[Y.data?.providers,In?.providers]),Qn=(0,Q.useMemo)(()=>{let e=gn?.key===q?gn.entries:In?.entries??[],t=Ot(e,Jn,n.involvement),r=Ue?t.filter(e=>St(e,Ve,Mt(e,Jn))):t;if(Pe.text.length===0)return r.toSorted((e,t)=>t.updatedAt.localeCompare(e.updatedAt));let i=Me&&!Ln;return r.filter(e=>i&&Zn.has(e.host)||vt(e,Pe.text))},[q,Ue,Ve,In,gn,Me,n.involvement,Zn,Ln,Pe.text,Jn]),$n=(0,Q.useMemo)(()=>Object.fromEntries(Qn.map(e=>[me(e),{state:e.state,isDraft:e.isDraft}])),[Qn]),er=(0,Q.useRef)(null),nr=(0,Q.useMemo)(()=>{if(n.involvement!==`all`)return[{key:`others`,label:``,entries:Qn}];if(Vt)return Ct(Qn,Jn);let e=X!==null&&X.environmentKey===p&&X.scope===Xe?X.partitions:void 0,t=e=>e===void 0||!Ue?e:e.filter(e=>St(e,Ve,Mt(e,Jn))),r=t(Wt?Xt.data?.entries??e?.authored:void 0),i=t(Wt?Zt.data?.entries??e?.reviewing:void 0);return r===void 0||i===void 0?Ct(Qn,Jn):Nt(Qn,r,i)},[Ue,Vt,Ve,Xt.data?.entries,Qn,p,X,Wt,Zt.data?.entries,Xe,n.involvement,Jn]),rr=(0,Q.useRef)(new Map);rr.current=new Map(nr.flatMap(e=>e.entries.map(e=>[nt(e),e])));let ir=(0,Q.useRef)({key:q,values:new Set}),[ar,or]=(0,Q.useState)(()=>new Map),cr=(0,Q.useRef)(ar);cr.current=ar;let[Cr,Er]=(0,Q.useState)({key:q,batches:[]}),Dr=Cr.key===q?Cr.batches:[],kr=(0,Q.useMemo)(()=>Dr.map(({environmentId:e,input:t})=>({environmentId:e,input:t})),[Dr]),Ar=(0,Q.useRef)(null),jr=(0,Q.useRef)(new Set),Mr=(0,Q.useRef)(!0),Nr=(0,Q.useRef)(i);Nr.current=i;let Pr=(0,Q.useCallback)(e=>{if(e!==null&&typeof IntersectionObserver<`u`)return jr.current.add(e),Ar.current?.observe(e),()=>{jr.current.delete(e),Ar.current?.unobserve(e);let t=e.dataset.pullRequestStatsKey,n=ir.current;Nr.current===`visible`&&t!==void 0&&n.values.delete(t)&&!Mr.current&&Er(e=>{if(e.key!==n.key)return e;let t=ct(e.batches,n.values);return t.length===e.batches.length?e:{key:e.key,batches:t}})}},[]);(0,Q.useEffect)(()=>{i===`eager`&&Er(e=>{let t=e.key===q?e.batches:[],n=wt({entriesByKey:rr.current,candidateKeys:ir.current.values,policy:i,activeBatches:t,statsByRow:cr.current});return n.length===0&&e.key===q?e:{key:q,batches:[...t,...n]}})},[q,nr,i]),(0,Q.useEffect)(()=>{if(i!==`visible`||typeof IntersectionObserver>`u`)return;ir.current={key:q,values:new Set};let e=new IntersectionObserver(e=>{let t=ir.current;if(t.key!==q)return;let n=!1,r=new Set;for(let i of e){let e=i.target.dataset.pullRequestStatsKey;if(e===void 0)continue;let a=t.values.has(e);i.isIntersecting&&rr.current.has(e)?(t.values.add(e),a||r.add(e)):t.values.delete(e),n||=a!==t.values.has(e)}n&&Er(e=>{let n=e.key===q?e.batches:[],a=Mr.current?n:ct(n,t.values),o=wt({entriesByKey:rr.current,candidateKeys:r,policy:i,activeBatches:n,statsByRow:cr.current});return o.length===0&&a.length===n.length?e:{key:q,batches:[...a,...o]}})},{root:er.current,rootMargin:`480px`});Ar.current=e;for(let t of jr.current)e.observe(t);return()=>{e.disconnect(),Ar.current===e&&(Ar.current=null)}},[q,i]);let Fr=At(kr);Mr.current=Fr.isPending,(0,Q.useEffect)(()=>{if(i!==`visible`||Fr.isPending)return;let e=ir.current;Er(t=>{if(t.key!==q||e.key!==q)return t;let n=ct(t.batches,e.values);return n.length===t.batches.length?t:{key:t.key,batches:n}})},[q,i,Fr.isPending]),(0,Q.useEffect)(()=>{let e=Fr.stats;e!==null&&or(t=>jt(t,e))},[Fr.stats]);let Ir=(0,Q.useMemo)(()=>{let e=nr.map(e=>{let t=bt(e.entries.map(e=>ot(e,ar)),xn,nt,n.state);return{...e,entries:Ue&&xn.size>0?t.filter(e=>!xn.has(nt(e))||St(e,Ve,Mt(e,Jn))):t}});return _t(e,r,Pe.text,e=>e.additions+e.deletions>0||ar.has(mt(e)),n.involvement)},[nr,Ue,Ve,xn,n.involvement,n.state,r,ar,Pe.text,Jn]),Lr=Ir.reduce((e,t)=>e+t.entries.length,0),[Rr,zr]=(0,Q.useState)([]);(0,Q.useEffect)(()=>{Pn!==null&&zr(e=>n.host===void 0||e.length===0?Pn.providers:e)},[Pn,n.host]);let Br=Rr.length>1,Vr=(0,Q.useMemo)(()=>it(Rr),[Rr]),[Hr,Ur]=(0,Q.useState)(()=>new Set),Wr=(0,Q.useRef)(null),Gr=(0,Q.useMemo)(()=>new Map(Ir.flatMap(e=>e.entries.map(t=>[nt(t),{entry:t,groupKey:e.key}]))),[Ir]),Kr=(0,Q.useRef)({displayGroups:Ir,closeSweepRows:Gr,closingKeys:Mn,closeBatch:jn,hostActionsOf:Vr});Kr.current={displayGroups:Ir,closeSweepRows:Gr,closingKeys:Mn,closeBatch:jn,hostActionsOf:Vr},(0,Q.useEffect)(()=>()=>Wr.current?.cancel(),[q,n.q,r]),(0,Q.useEffect)(()=>{let e=e=>{e.key===`Escape`&&Wr.current!==null&&(e.preventDefault(),Wr.current.cancel())};return document.addEventListener(`keydown`,e,!0),()=>document.removeEventListener(`keydown`,e,!0)},[]);let qr=(0,Q.useCallback)((e,t)=>{Wr.current?.cancel();let n=nt(e),r=Kr.current.displayGroups.find(e=>e.entries.some(e=>nt(e)===n));if(!r||Kr.current.closingKeys.has(n))return;let i=Kr.current.displayGroups.flatMap(e=>e.entries.map(nt)),a=e=>{let t=Kr.current.closeSweepRows.get(e);return t?.groupKey===r.key&&t.entry.state===`open`&&Kr.current.hostActionsOf(t.entry).has(`close`)&&!Kr.current.closingKeys.has(e)&&!er.current?.querySelector(`[data-pull-request-key="${CSS.escape(e)}"] [data-pull-request-action-pending="true"]`)},o=[],s=null,c=e=>{e!==s&&(s=e,o=Bt(i,n,e,a),Ur(new Set(o)))};Wr.current=new hn({active:n,event:t,options:{distance:6,onAttach:()=>{},onFinish:()=>{Wr.current=null,Ur(new Set)}},onPending:()=>{},onStart:()=>c(n),onMove:({y:e})=>{let t=er.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.min(Math.max(e,n.top),n.bottom-1),i=null;for(let e of t.querySelectorAll(`[data-pull-request-key]`)){if(i!==null&&e.getBoundingClientRect().top>r)break;i=e.dataset.pullRequestKey??null}i!==null&&c(i)},onEnd:()=>{let e=o.filter(a).flatMap(e=>{let t=Kr.current.closeSweepRows.get(e);return t?[t.entry]:[]});Kr.current.closeBatch(e)},onCancel:()=>{},onAbort:()=>{}})},[]),Jr=(0,Q.useMemo)(()=>new Map(nr.flatMap(e=>e.entries.map(e=>[Sr(e),e]))),[nr]),Yr=(0,Q.useMemo)(()=>new Map(Ir.flatMap(e=>e.entries.map(e=>[Sr(e),e]))),[Ir]),Xr=(0,Q.useMemo)(()=>n.repository&&n.number&&A?{environmentId:A.environmentId,repository:n.repository,number:n.number,projectId:A.id,...w?{host:w}:{}}:null,[n.number,n.repository,A,w]),Zr=F!==null,[Qr,$r]=(0,Q.useState)(!1),ei=N.isOpen&&Qr;!N.isOpen&&Qr&&$r(!1);let ti=()=>{N.isOpen&&$r(e=>!e)},ni=(0,Q.useCallback)(()=>$r(!0),[]);(0,Q.useEffect)(()=>{h&&j!==null&&Xr!==null&&G.getState().openPullRequest(j,Xr)},[Xr,h,j]);let ri=N.isOpen&&I!==null?{environmentId:I.environmentId,repository:I.repository,number:I.number,projectId:I.projectId,host:I.host??(A?.repositoryIdentity?s(A.repositoryIdentity,A.repositoryIdentity.provider):void 0)}:null,ii=e=>Se(e===null?Ce:{repository:e.repository,number:e.number,selectedProjectId:e.projectId,selectedHost:e.host,...e.environmentId===void 0?{}:{selectedEnvironmentId:e.environmentId}}),ai=()=>{j!==null&&(N.isOpen?(G.getState().close(j),Se(Ce)):F!==null&&(G.getState().show(j),ii(F)))},oi=(0,Q.useMemo)(()=>{let e=new Map;for(let t of y){let n=t.repositoryIdentity?.provider;if(n===void 0)continue;let r=s(t.repositoryIdentity,n);e.has(r)||e.set(r,{host:r,kind:n})}return[...e.values()]},[y]),si=(0,Q.useMemo)(()=>new Map(Yn.map(e=>[Tn({id:e.projectId,environmentId:e.environmentId}),e.message])),[Yn]),ci=(0,Q.useCallback)(e=>{j!==null&&(G.getState().openPullRequest(j,e),Se({repository:e.repository,number:e.number,selectedProjectId:e.projectId,selectedEnvironmentId:e.environmentId,selectedHost:e.host}))},[j,Se]),li=(0,$.jsx)(bn,{value:n.q??``,busy:Ee.length>0&&(!Me||Ln),onChange:e=>K({q:e||void 0})}),ui=(0,$.jsx)(Ne,{showTerminalControl:!1,showThreadPanelControl:!1,terminalAvailable:!1,terminalOpen:!1,terminalShortcutLabel:null,threadPanelOpen:!1,threadPanelPresentation:`inline`,threadPanelShortcutLabel:null,onToggleThreadPanel:()=>void 0,rightPanelAvailable:Zr,rightPanelOpen:N.isOpen,rightPanelShortcutLabel:Ye(o,`rightPanel.toggle`),rightPanelUnavailableLabel:`Select a pull request first`,rightPanelTabCount:N.surfaces.length,onToggleTerminal:()=>void 0,onToggleRightPanel:ai}),di=(0,$.jsxs)(`div`,{className:`absolute top-[var(--workspace-controls-top)] right-[var(--workspace-controls-right)] z-50 mr-px flex h-[var(--workspace-topbar-height)] items-center gap-1 [-webkit-app-region:no-drag]`,"data-workspace-titlebar-controls":!0,children:[N.isOpen?(0,$.jsx)(Oe,{maximized:ei,onToggle:ti}):null,ui]}),fi=Ln&&J.isPending&&Lr===0&&Ee.length===0,pi=(0,$.jsxs)($.Fragment,{children:[m?h?zn?(0,$.jsx)(Fe,{rows:7}):J.error&&Lr===0?(0,$.jsx)(Te,{error:J.error,refreshing:J.isPending,onRetry:()=>J.refresh()}):fi?(0,$.jsx)(Fe,{rows:7}):Lr===0?(0,$.jsx)(Un,{hasProjects:!v||y.length>0,refreshing:mn,onRefresh:()=>void pn(),query:Ee,filtered:Re||n.state!==`open`||n.involvement!==`all`||x!==void 0||n.host!==void 0,searching:Ee.length>0&&(!Me||Ln),canLoadMore:In?.truncated===!0&&(Hn||rt<hr),loadingMore:Rn,onClearQuery:()=>K({q:void 0}),onLoadMore:Wn}):(0,$.jsx)(`div`,{className:ne(`space-y-3`,Hr.size>0&&`**:pointer-events-none`),children:Ir.map(e=>(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[e.label?(0,$.jsx)(lr,{group:e}):null,e.entries.map(e=>{let n=nt(e);return(0,$.jsx)(tr,{statsKey:n,statsRef:Pr,entry:e,showProjectTitle:!0,showProvider:Br,...l.length>1&&b.get(e.environmentId)!==void 0?{environmentLabel:b.get(e.environmentId)}:{},matchedElsewhere:Pe.text.length>0&&Ft(e,Pe.text)<=pr,selected:ri?.environmentId===e.environmentId&&ri.repository===e.repository&&ri.host?.toLowerCase()===e.host.toLowerCase()&&ri.number===e.number,onSelect:ci,speedMode:t,hostActions:Vr(e),onActed:kn,closing:Mn.has(n),sweeping:Hr.has(n),onCloseSweepStart:qr},n)})]},e.key))}):(0,$.jsx)(Te,{title:`Pull requests unavailable`,error:`Update your P4 Code servers to browse pull requests.`}):(0,$.jsx)(Fe,{rows:7}),J.error&&Lr>0?(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg border border-warning/30 bg-warning-surface px-3 py-2 text-xs`,children:[(0,$.jsxs)(`span`,{children:[J.error,` Showing the last pull requests loaded.`]}),(0,$.jsx)(k,{size:`xs`,variant:`outline`,onClick:()=>J.refresh(),children:`Retry`})]}):null,In?.truncated&&Qn.length>0?(0,$.jsx)(`div`,{className:`flex justify-center py-3 text-xs text-muted-foreground`,children:Rn?(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(V,{"aria-hidden":!0,size:`sm`}),It===null?`Updating pull requests`:`Loading more`]}):Hn||rt<hr?(0,$.jsx)(k,{size:`sm`,variant:`outline`,onClick:Wn,disabled:J.isPending||Ln,children:`Load more pull requests`}):(0,$.jsx)(`span`,{children:`Narrow your search to find more pull requests.`})}):null]}),mi=Rr.length>0?Rr:oi,hi=[{value:``,label:`All`,Icon:te},...mi.map(e=>{let t=Rr.find(t=>t.host===e.host);return{value:e.host,label:yn(mi,e),Icon:ln(e.kind).Icon,...t===void 0||t.configured?{}:{unavailable:t.detail??`This host could not be read.`}}})],gi=[{value:``,label:`All servers`,Icon:D},...l.map(e=>({value:e.environmentId,label:e.label,Icon:Qt(re(e.serverConfig))}))],_i=(0,$.jsx)(Tr,{label:`Sort pull requests`,triggerIcon:(0,$.jsx)(g,{"aria-hidden":!0,className:`size-4`}),triggerLabel:`Sort`,outlined:!0,value:r,options:on,onChange:e=>K({sort:e})}),vi=(0,$.jsx)(wr,{onOpenChange:ke,state:n.state,stateOptions:dr,onState:e=>K({state:e}),involvement:n.involvement,involvementOptions:ur,onInvolvement:e=>K({involvement:e}),filters:Le,onFilters:e=>K({draft:e.draft,review:e.review,checks:e.checks,author:e.author,labels:e.labels?.flatMap(e=>e)}),authorOptions:Xn.authors,labelOptions:Xn.labels,host:n.host,hostOptions:hi,onHost:e=>K({host:e}),server:u??void 0,serverOptions:gi,onServer:e=>K({environmentId:e,projectId:void 0}),projects:C,projectId:x,projectEnvironmentId:S?.environmentId,unavailable:si,onProject:(e,t)=>K(t===void 0?{projectId:e}:{projectId:e,environmentId:t})}),yi={refreshing:mn,onRefresh:()=>void pn(),searchValue:n.q??``,involvement:n.involvement,state:n.state,host:n.host,hostMenuOptions:hi,onInvolvement:e=>K({involvement:e}),onState:e=>K({state:e}),onHost:e=>K({host:e}),searchInput:li,sortMenu:_i,filtersMenu:vi,rightPanelControl:h?(0,$.jsx)(`span`,{"aria-hidden":!0,className:ne(`shrink-0`,N.isOpen?`-ml-3 w-0`:`w-7 sm:w-5`,L&&`transition-[width,margin] ease-out`),style:L?{transitionDuration:`${z}ms`}:void 0}):null,titlebarControls:h?U?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-y-0 left-full w-7 [-webkit-app-region:no-drag]`}):di:null,rightPanelOpen:N.isOpen,maximizedAway:ei,listBody:pi,scrollRef:er},bi=e=>{j!==null&&(G.getState().activateSurface(j,e.id),ii(e))},xi=e=>{if(j===null)return;G.getState().closeSurface(j,e.id);let t=pe(G.getState().byThreadKey,j);ii(t?.kind===`pull-request`?t:null)},Si=e=>{j!==null&&(G.getState().closeOtherSurfaces(j,e.id),ii(e))},Ci=e=>{if(j===null)return;G.getState().closeSurfacesToRight(j,e.id);let t=pe(G.getState().byThreadKey,j);ii(t?.kind===`pull-request`?t:null)},wi=()=>{j!==null&&(G.getState().closeAllSurfaces(j),ii(null))},Ti=(0,Q.useEffectEvent)(e=>{if(!M||(e.preventDefault(),e.stopPropagation(),e.repeat))return;let t=M;ce(t,`pull request link`).then(e=>{e&&se.add({type:`success`,title:`PR link copied`,description:t})},e=>{se.add({type:`error`,title:`Failed to copy PR link`,description:e instanceof Error?e.message:`An error occurred.`})})}),Ei=(0,Q.useEffectEvent)(e=>{I!==null&&(e.preventDefault(),e.stopPropagation(),e.repeat||xi(I))}),Di=(0,Q.useEffectEvent)(e=>{Zr&&(e.preventDefault(),e.stopPropagation(),e.repeat||ai())}),Oi=(0,Q.useEffectEvent)(e=>{N.isOpen&&(e.preventDefault(),e.stopPropagation(),e.repeat||ti())});return(0,Q.useEffect)(()=>{let e=e=>{if(e.defaultPrevented||rn())return;let t=Je(e,o,{context:sr()});t===`rightPanel.close`&&Ei(e),t===`rightPanel.toggle`&&Di(e),t===`rightPanel.toggleMaximized`&&Oi(e),t===`thread.copyReference`&&Ti(e)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[o]),(0,$.jsx)(He,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:(0,$.jsxs)(`div`,{className:`relative flex min-h-0 flex-1`,children:[h&&U?di:null,(0,$.jsx)(Or,{...yi}),U&&W&&xe!==null?(0,$.jsx)(je,{mode:`inline`,open:N.isOpen,maximized:ei,keybindings:o,getShortcutContext:sr,widthStorageKey:`p4code:pull-request-panel-width`,defaultWidth:typeof window>`u`?640:Math.floor(window.innerWidth/2),surfaces:ye,environmentId:xe,activeSurfaceId:W.id,pendingSurfaceIds:xr,previewSessions:vr,desktopByTabId:yr,terminalLabelsById:br,onActivate:e=>{e.kind===`pull-request`&&bi(e)},onCloseSurface:e=>{e.kind===`pull-request`&&xi(e)},onCloseOtherSurfaces:e=>{e.kind===`pull-request`&&Si(e)},onCloseSurfacesToRight:e=>{e.kind===`pull-request`&&Ci(e)},onCloseAllSurfaces:wi,onMoveSurface:(e,t)=>{j!==null&&G.getState().moveSurface(j,e,t)},onCopyFilePath:()=>void 0,onAddBrowser:()=>void 0,onAddBrowserInProfile:()=>void 0,onAddTerminal:()=>void 0,onAddDiff:()=>void 0,onAddFiles:()=>void 0,onAddPullRequest:()=>void 0,onAddPullRequests:()=>void 0,onAddDevice:()=>void 0,browserAvailable:!1,terminalAvailable:!1,diffAvailable:!1,filesAvailable:!1,pullRequestAvailable:!1,pullRequestsAvailable:!1,deviceAvailable:!1,pullRequestStatusSeeds:$n,children:(0,$.jsx)(we,{getShortcutContext:sr,shortcutsEnabled:I?.id===W.id,environmentId:xe,onGuideShown:ni,onSelectPullRequest:e=>{j!==null&&(G.getState().openPullRequest(j,{projectId:e.projectId,repository:e.repository,number:e.number,...e.host?{host:e.host}:{},environmentId:xe}),Se({repository:e.repository,number:e.number,selectedHost:e.host,selectedProjectId:e.projectId,selectedEnvironmentId:xe}))},reference:{projectId:W.projectId,repository:W.repository,number:W.number,...W.host?{host:W.host}:{}},listEntry:Yr.get(Sr(W))??null,refreshToken:en,onActed:(e,t=`done`)=>{let n=Jr.get(Sr(W));if(e!==void 0&&n!==void 0&&dt(n,e,new Date,0)!==null){let r=nt(n);t===`sent`&&e!==`merge`&&Dn.current.set(r,wn(n,e)),t===`failed`&&e!==`merge`&&En(r,Dn.current.get(r)??null),t!==`sent`&&Dn.current.delete(r),t===`done`&&e===`merge`&&(wn(n,e),dn(void 0,xe))}else t===`done`&&dn(void 0,xe)}},W.id)}):null]})})}function wr(e){let t=(0,Z.c)(6),n=nr(),r;t[0]!==e.projects||t[1]!==n?(r=Ut(e.projects,n),t[0]=e.projects,t[1]=n,t[2]=r):r=t[2];let i=r,a;return t[3]!==i||t[4]!==e?(a=(0,$.jsx)(Rn,{...e,projects:i}),t[3]=i,t[4]=e,t[5]=a):a=t[5],a}function Tr(e){let t=(0,Z.c)(30),{label:n,triggerIcon:r,triggerLabel:i,outlined:a,iconOnly:o,value:s,options:c,onChange:l,className:u}=e,d=a!==void 0&&a,p=o!==void 0&&o,m;t[0]!==c||t[1]!==s?(m=c.find(e=>e.value===s)??c[0],t[0]=c,t[1]=s,t[2]=m):m=t[2];let g=m;if(!g)return null;let _=i||p?`${n}: ${g.label}`:n,v=p?`${n}: ${g.label}`:void 0,y;t[3]!==p||t[4]!==d?(y=d?(0,$.jsx)(k,{variant:`outline`,size:p?`icon`:`default`}):(0,$.jsx)(k,{variant:`ghost-muted`,size:`sm`}),t[3]=p,t[4]=d,t[5]=y):y=t[5];let b;t[6]===u?b=t[7]:(b=ne(`min-w-0`,u),t[6]=u,t[7]=b);let x;t[8]!==g||t[9]!==p||t[10]!==r||t[11]!==i?(x=p?(0,$.jsx)(g.Icon,{"aria-hidden":!0,className:`size-4`}):i?(0,$.jsxs)($.Fragment,{children:[r,(0,$.jsx)(`span`,{children:i})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`truncate`,children:g.label}),(0,$.jsx)(f,{"aria-hidden":!0,className:`size-3 shrink-0 text-muted-foreground/70`})]}),t[8]=g,t[9]=p,t[10]=r,t[11]=i,t[12]=x):x=t[12];let S;t[13]!==_||t[14]!==v||t[15]!==y||t[16]!==b||t[17]!==x?(S=(0,$.jsx)(w,{"aria-label":_,title:v,render:y,className:b,children:x}),t[13]=_,t[14]=v,t[15]=y,t[16]=b,t[17]=x,t[18]=S):S=t[18];let C;t[19]===l?C=t[20]:(C=e=>l(e),t[19]=l,t[20]=C);let E;t[21]===c?E=t[22]:(E=c.map(Er),t[21]=c,t[22]=E);let D;t[23]!==C||t[24]!==E||t[25]!==s?(D=(0,$.jsx)(M,{align:`start`,side:`bottom`,children:(0,$.jsx)(T,{value:s,onValueChange:C,children:E})}),t[23]=C,t[24]=E,t[25]=s,t[26]=D):D=t[26];let O;return t[27]!==D||t[28]!==S?(O=(0,$.jsxs)(h,{children:[S,D]}),t[27]=D,t[28]=S,t[29]=O):O=t[29],O}function Er(e){let t=(0,$.jsx)(_,{value:e.value,disabled:e.unavailable!==void 0,className:`data-disabled:pointer-events-auto`,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(vn,{option:e}),e.label]})},e.value);return e.unavailable===void 0?t:(0,$.jsxs)(Ve,{children:[(0,$.jsx)(ze,{render:t}),(0,$.jsx)(Be,{side:`right`,children:e.unavailable})]},e.value)}function Dr(e){let t=(0,Z.c)(21),{searchInput:n,searchValue:r,open:i,onOpenChange:a,focusToken:o,onFocusWithin:s}=e,c=(0,Q.useRef)(null),l,d;t[0]===i?(l=t[1],d=t[2]):(l=()=>{i&&c.current?.querySelector(`input`)?.focus()},d=[i],t[0]=i,t[1]=l,t[2]=d),(0,Q.useEffect)(l,d);let f=(0,Q.useRef)(o),p,m;if(t[3]===o?(p=t[4],m=t[5]):(p=()=>{if(f.current===o)return;f.current=o;let e=c.current?.querySelector(`input`);e?.focus(),e?.select()},m=[o],t[3]=o,t[4]=p,t[5]=m),(0,Q.useEffect)(p,m),i||r.length>0){let e;t[6]===s?e=t[7]:(e=()=>s?.(!0),t[6]=s,t[7]=e);let i;t[8]!==s||t[9]!==a||t[10]!==r.length?(i=()=>{s?.(!1),r.length===0&&a(!1)},t[8]=s,t[9]=a,t[10]=r.length,t[11]=i):i=t[11];let o;return t[12]!==n||t[13]!==e||t[14]!==i?(o=(0,$.jsx)(`div`,{ref:c,className:`w-56 min-w-24 shrink`,onFocus:e,onBlur:i,children:n}),t[12]=n,t[13]=e,t[14]=i,t[15]=o):o=t[15],o}let h;t[16]===a?h=t[17]:(h=()=>a(!0),t[16]=a,t[17]=h);let g;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(u,{className:`size-4`}),t[18]=g):g=t[18];let _;return t[19]===h?_=t[20]:(_=(0,$.jsx)(k,{size:`icon-sm`,variant:`ghost`,"aria-label":`Search pull requests`,onClick:h,children:g}),t[19]=h,t[20]=_),_}function Or(e){let t=(0,Z.c)(69),{refreshing:n,onRefresh:r,searchValue:i,involvement:a,state:o,host:s,hostMenuOptions:c,onInvolvement:l,onState:u,onHost:d,searchInput:f,sortMenu:p,filtersMenu:m,rightPanelControl:h,titlebarControls:g,rightPanelOpen:_,maximizedAway:v,listBody:y,scrollRef:b}=e,x=(0,Q.useRef)(null),[S,C]=(0,Q.useState)(!1),w;t[0]===b?w=t[1]:(w=()=>{let e=x.current;if(!e)return;let t=new IntersectionObserver(e=>{let[t]=e;return C(t?!t.isIntersecting:!1)},{root:b.current});return t.observe(e),()=>t.disconnect()},t[0]=b,t[1]=w);let T;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(T=[],t[2]=T):T=t[2],(0,Q.useEffect)(w,T);let E=(0,Q.useRef)(!1),D=(0,Q.useRef)(null),[O,ee]=(0,Q.useState)(!1),[k,A]=(0,Q.useState)(0),j=O||i.length>0,M,N;t[3]===S?(M=t[4],N=t[5]):(M=()=>{let e=e=>{if(e.defaultPrevented||e.key.toLowerCase()!==`f`||!(e.metaKey||e.ctrlKey)||e.altKey||e.shiftKey)return;if(e.preventDefault(),S){ee(!0),A(kr);return}let t=D.current?.querySelector(`input`);t?.focus(),t?.select()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},N=[S],t[3]=S,t[4]=M,t[5]=N),(0,Q.useEffect)(M,N);let P,F;t[6]===S?(P=t[7],F=t[8]):(P=()=>{if(S||(ee(!1),!E.current))return;E.current=!1;let e=D.current?.querySelector(`input`);e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},F=[S],t[6]=S,t[7]=P,t[8]=F),(0,Q.useEffect)(P,F);let I=v?`w-0 flex-none`:`flex-1`,L;t[9]===I?L=t[10]:(L=ne(`@container/pr-list flex min-h-0 min-w-0 flex-col overflow-x-hidden bg-background`,I),t[9]=I,t[10]=L);let re=!_,R;t[11]!==S||t[12]!==s||t[13]!==c||t[14]!==a||t[15]!==d||t[16]!==l||t[17]!==u||t[18]!==j||t[19]!==o?(R=S?(0,$.jsxs)(X,{ariaLabel:`Pull request scope`,className:`overflow-hidden`,children:[(0,$.jsx)(pn,{current:!0,className:ne(j&&`sr-only`),children:(0,$.jsx)(`h1`,{className:`truncate`,children:`Pull Requests`})}),j?null:(0,$.jsx)(mn,{}),(0,$.jsxs)(pn,{className:`shrink gap-1.5`,children:[(0,$.jsx)(Tr,{label:`Filter by state`,value:o,options:dr,onChange:u,className:`shrink-0`}),(0,$.jsx)(Tr,{label:`Filter by involvement`,value:a,options:ur,onChange:l}),c.length>2?(0,$.jsx)(Tr,{label:`Filter by host`,value:s??``,options:c,onChange:e=>d(e===``?void 0:e)}):null]})]}):(0,$.jsx)(X,{ariaLabel:`Pull requests breadcrumb`,children:(0,$.jsx)(pn,{current:!0,children:(0,$.jsx)(`h1`,{className:`truncate`,children:`Pull Requests`})})}),t[11]=S,t[12]=s,t[13]=c,t[14]=a,t[15]=d,t[16]=l,t[17]=u,t[18]=j,t[19]=o,t[20]=R):R=t[20];let ie;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,$.jsx)(`div`,{className:`min-w-0 flex-1`}),t[21]=ie):ie=t[21];let z;t[22]!==S||t[23]!==r||t[24]!==n||t[25]!==k||t[26]!==f||t[27]!==O||t[28]!==i?(z=S?(0,$.jsxs)(`div`,{className:`flex shrink items-center gap-1.5`,children:[(0,$.jsx)(Dr,{searchInput:f,searchValue:i,open:O,onOpenChange:ee,focusToken:k,onFocusWithin:e=>{E.current=e}}),(0,$.jsx)(Ar,{compact:!0,refreshing:n,onRefresh:r})]}):null,t[22]=S,t[23]=r,t[24]=n,t[25]=k,t[26]=f,t[27]=O,t[28]=i,t[29]=z):z=t[29];let B;t[30]!==h||t[31]!==R||t[32]!==z||t[33]!==re||t[34]!==g?(B=(0,$.jsxs)(dn,{electron:Re,reserveNativeControls:re,className:`relative bg-background`,children:[g,R,ie,z,h]}),t[30]=h,t[31]=R,t[32]=z,t[33]=re,t[34]=g,t[35]=B):B=t[35];let V;t[36]===f?V=t[37]:(V=(0,$.jsx)(`div`,{className:`min-w-0 basis-full @lg/pr-list:basis-0 @lg/pr-list:flex-1`,children:f}),t[36]=f,t[37]=V);let ae=s!==void 0,oe;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,$.jsx)(te,{"aria-hidden":!0,className:`size-4`}),t[38]=oe):oe=t[38];let se=s??``,ce;t[39]===d?ce=t[40]:(ce=e=>d(e===``?void 0:e),t[39]=d,t[40]=ce);let le;t[41]!==c||t[42]!==ae||t[43]!==se||t[44]!==ce?(le=(0,$.jsx)(Tr,{label:`Filter by provider`,outlined:!0,iconOnly:ae,triggerIcon:oe,triggerLabel:`All`,value:se,options:c,onChange:ce}),t[41]=c,t[42]=ae,t[43]=se,t[44]=ce,t[45]=le):le=t[45];let H;t[46]!==S||t[47]!==r||t[48]!==n?(H=S?null:(0,$.jsx)(Ar,{refreshing:n,onRefresh:r}),t[46]=S,t[47]=r,t[48]=n,t[49]=H):H=t[49];let U;t[50]!==m||t[51]!==p||t[52]!==V||t[53]!==le||t[54]!==H?(U=(0,$.jsxs)(`div`,{ref:D,className:`flex flex-wrap items-center gap-2`,children:[V,p,m,le,H]}),t[50]=m,t[51]=p,t[52]=V,t[53]=le,t[54]=H,t[55]=U):U=t[55];let W;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsx)(`div`,{ref:x,"aria-hidden":!0,className:`-mt-3 h-px w-full`}),t[56]=W):W=t[56];let ue;t[57]===U?ue=t[58]:(ue=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[U,W]}),t[57]=U,t[58]=ue);let de;t[59]!==y||t[60]!==ue?(de=(0,$.jsxs)($t,{width:`expanded`,className:`min-h-full gap-4`,children:[ue,y]}),t[59]=y,t[60]=ue,t[61]=de):de=t[61];let fe;t[62]!==b||t[63]!==de?(fe=(0,$.jsx)(`div`,{ref:b,className:`topbar-scroll-fade scrollbar-gutter-both min-h-0 flex-1 overflow-y-auto`,children:de}),t[62]=b,t[63]=de,t[64]=fe):fe=t[64];let pe;return t[65]!==B||t[66]!==fe||t[67]!==L?(pe=(0,$.jsxs)(`div`,{className:L,children:[B,fe]}),t[65]=B,t[66]=fe,t[67]=L,t[68]=pe):pe=t[68],pe}function kr(e){return e+1}function Ar(e){let t=(0,Z.c)(8),{compact:n,refreshing:r,onRefresh:i}=e,a=n!==void 0&&n,o=a?`icon-sm`:`icon`,s=a?`ghost`:`outline`,c;t[0]===r?c=t[1]:(c=(0,$.jsx)(en,{size:`md`,refreshing:r}),t[0]=r,t[1]=c);let l;return t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==s||t[6]!==c?(l=(0,$.jsx)(k,{size:o,variant:s,"aria-label":`Refresh pull requests`,onClick:i,disabled:r,children:c}),t[2]=i,t[3]=r,t[4]=o,t[5]=s,t[6]=c,t[7]=l):l=t[7],l}export{Cr as component};
2
+ //# sourceMappingURL=_chat.pull-requests-B84LUHIv.js.map
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{id as i,t as a}from"./utils-C5GGWTfe.js";var o=n(),s=e(t(),1),c=e(r(),1),l=i(`relative rounded-xl border px-3.5 py-3 text-card-foreground text-sm`,{defaultVariants:{surface:`default`,variant:`default`},variants:{surface:{default:``,glass:`alert-glass`},variant:{default:`bg-transparent dark:bg-input/32 [&_svg]:text-muted-foreground`,sidebar:`rounded-lg border-sidebar-border bg-sidebar-control-surface px-2 py-1.5 text-[11px] leading-4 [&_[data-slot=alert-description]]:block [&_[data-slot=alert-description]]:text-sidebar-muted-foreground`,error:`border-error/32 bg-error-surface text-error-foreground [&_[data-slot=alert-description]]:text-error-foreground/80 [&_svg]:text-error`,info:`border-info/32 bg-info/4 [&_svg]:text-info`,success:`border-success/32 bg-success/4 [&_svg]:text-success`,warning:`border-warning/32 bg-warning-surface text-warning-foreground [&_[data-slot=alert-description]]:text-warning-foreground/80 [&_svg]:text-warning`}}});function u(e){let t=e.props[`data-slot`];if(t)return t;let n=e.type;switch(n.displayName??n.name){case`AlertAction`:return`alert-action`;case`AlertTitle`:return`alert-title`;case`AlertDescription`:return`alert-description`;default:return}}function d(e){let t=(0,o.c)(36),n,r,i,d,f,p;t[0]===e?(n=t[1],r=t[2],i=t[3],d=t[4],f=t[5],p=t[6]):({className:r,variant:p,surface:d,controlAlignment:f,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=d,t[5]=f,t[6]=p);let m=f===void 0?`center`:f,h,g,_;t[7]===n?(h=t[8],g=t[9],_=t[10]):(_=[],g=[],h=[],s.Children.forEach(n,e=>{if(!(0,s.isValidElement)(e)){g.push(e);return}let t=u(e);t===`alert-action`?h.push(e):t===`alert-title`||t===`alert-description`?g.push(e):_.push(e)}),t[7]=n,t[8]=h,t[9]=g,t[10]=_);let v;t[11]!==r||t[12]!==d||t[13]!==p?(v=a(l({surface:d,variant:p}),r),t[11]=r,t[12]=d,t[13]=p,t[14]=v):v=t[14];let y=p??`default`,b=m===`first-line`?`items-start`:`items-center`,x=m===`first-line`&&h.length>0&&`min-h-7 pt-1 sm:min-h-6 sm:pt-0.5`,S;t[15]!==b||t[16]!==x?(S=a(`flex gap-2`,b,x),t[15]=b,t[16]=x,t[17]=S):S=t[17];let C;t[18]!==m||t[19]!==_?(C=_.length>0&&(0,c.jsx)(`div`,{className:a(`flex shrink-0 items-center justify-center`,m===`first-line`?`h-lh w-4 [&>svg]:size-4`:`size-4 [&>svg]:size-full`),children:_}),t[18]=m,t[19]=_,t[20]=C):C=t[20];let w;t[21]===g?w=t[22]:(w=g.length>0&&(0,c.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:g}),t[21]=g,t[22]=w);let T;t[23]!==h||t[24]!==m?(T=h.length>0&&(0,c.jsx)(`div`,{className:a(`flex shrink-0 items-center`,m===`first-line`?`h-lh self-start`:`self-center`),children:h}),t[23]=h,t[24]=m,t[25]=T):T=t[25];let E;t[26]!==S||t[27]!==C||t[28]!==w||t[29]!==T?(E=(0,c.jsxs)(`div`,{className:S,children:[C,w,T]}),t[26]=S,t[27]=C,t[28]=w,t[29]=T,t[30]=E):E=t[30];let D;return t[31]!==i||t[32]!==E||t[33]!==v||t[34]!==y?(D=(0,c.jsx)(`div`,{className:v,"data-slot":`alert`,"data-variant":y,role:`alert`,...i,children:E}),t[31]=i,t[32]=E,t[33]=v,t[34]=y,t[35]=D):D=t[35],D}function f(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`font-medium`,n),t[3]=n,t[4]=i);let s;return t[5]!==r||t[6]!==i?(s=(0,c.jsx)(`div`,{className:i,"data-slot":`alert-title`,...r}),t[5]=r,t[6]=i,t[7]=s):s=t[7],s}function p(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`flex flex-col gap-2.5 text-muted-foreground`,n),t[3]=n,t[4]=i);let s;return t[5]!==r||t[6]!==i?(s=(0,c.jsx)(`div`,{className:i,"data-slot":`alert-description`,...r}),t[5]=r,t[6]=i,t[7]=s):s=t[7],s}function m(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`flex gap-1`,n),t[3]=n,t[4]=i);let s;return t[5]!==r||t[6]!==i?(s=(0,c.jsx)(`div`,{className:i,"data-slot":`alert-action`,...r}),t[5]=r,t[6]=i,t[7]=s):s=t[7],s}f.displayName=`AlertTitle`,p.displayName=`AlertDescription`,m.displayName=`AlertAction`;export{f as i,m as n,p as r,d as t};
2
- //# sourceMappingURL=alert-BOVMKHDy.js.map
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{ld as i,t as a}from"./utils-DjbLtxuo.js";var o=n(),s=e(t(),1),c=e(r(),1),l=i(`relative rounded-xl border px-3.5 py-3 text-card-foreground text-sm`,{defaultVariants:{surface:`default`,variant:`default`},variants:{surface:{default:``,glass:`alert-glass`},variant:{default:`bg-transparent dark:bg-input/32 [&_svg]:text-muted-foreground`,sidebar:`rounded-lg border-sidebar-border bg-sidebar-control-surface px-2 py-1.5 text-[11px] leading-4 [&_[data-slot=alert-description]]:block [&_[data-slot=alert-description]]:text-sidebar-muted-foreground`,error:`border-error/32 bg-error-surface text-error-foreground [&_[data-slot=alert-description]]:text-error-foreground/80 [&_svg]:text-error`,info:`border-info/32 bg-info/4 [&_svg]:text-info`,success:`border-success/32 bg-success/4 [&_svg]:text-success`,warning:`border-warning/32 bg-warning-surface text-warning-foreground [&_[data-slot=alert-description]]:text-warning-foreground/80 [&_svg]:text-warning`}}});function u(e){let t=e.props[`data-slot`];if(t)return t;let n=e.type;switch(n.displayName??n.name){case`AlertAction`:return`alert-action`;case`AlertTitle`:return`alert-title`;case`AlertDescription`:return`alert-description`;default:return}}function d(e){let t=(0,o.c)(36),n,r,i,d,f,p;t[0]===e?(n=t[1],r=t[2],i=t[3],d=t[4],f=t[5],p=t[6]):({className:r,variant:p,surface:d,controlAlignment:f,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=d,t[5]=f,t[6]=p);let m=f===void 0?`center`:f,h,g,_;t[7]===n?(h=t[8],g=t[9],_=t[10]):(_=[],g=[],h=[],s.Children.forEach(n,e=>{if(!(0,s.isValidElement)(e)){g.push(e);return}let t=u(e);t===`alert-action`?h.push(e):t===`alert-title`||t===`alert-description`?g.push(e):_.push(e)}),t[7]=n,t[8]=h,t[9]=g,t[10]=_);let v;t[11]!==r||t[12]!==d||t[13]!==p?(v=a(l({surface:d,variant:p}),r),t[11]=r,t[12]=d,t[13]=p,t[14]=v):v=t[14];let y=p??`default`,b=m===`first-line`?`items-start`:`items-center`,x=m===`first-line`&&h.length>0&&`min-h-7 pt-1 sm:min-h-6 sm:pt-0.5`,S;t[15]!==b||t[16]!==x?(S=a(`flex gap-2`,b,x),t[15]=b,t[16]=x,t[17]=S):S=t[17];let C;t[18]!==m||t[19]!==_?(C=_.length>0&&(0,c.jsx)(`div`,{className:a(`flex shrink-0 items-center justify-center`,m===`first-line`?`h-lh w-4 [&>svg]:size-4`:`size-4 [&>svg]:size-full`),children:_}),t[18]=m,t[19]=_,t[20]=C):C=t[20];let w;t[21]===g?w=t[22]:(w=g.length>0&&(0,c.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:g}),t[21]=g,t[22]=w);let T;t[23]!==h||t[24]!==m?(T=h.length>0&&(0,c.jsx)(`div`,{className:a(`flex shrink-0 items-center`,m===`first-line`?`h-lh self-start`:`self-center`),children:h}),t[23]=h,t[24]=m,t[25]=T):T=t[25];let E;t[26]!==S||t[27]!==C||t[28]!==w||t[29]!==T?(E=(0,c.jsxs)(`div`,{className:S,children:[C,w,T]}),t[26]=S,t[27]=C,t[28]=w,t[29]=T,t[30]=E):E=t[30];let D;return t[31]!==i||t[32]!==E||t[33]!==v||t[34]!==y?(D=(0,c.jsx)(`div`,{className:v,"data-slot":`alert`,"data-variant":y,role:`alert`,...i,children:E}),t[31]=i,t[32]=E,t[33]=v,t[34]=y,t[35]=D):D=t[35],D}function f(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`font-medium`,n),t[3]=n,t[4]=i);let s;return t[5]!==r||t[6]!==i?(s=(0,c.jsx)(`div`,{className:i,"data-slot":`alert-title`,...r}),t[5]=r,t[6]=i,t[7]=s):s=t[7],s}function p(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`flex flex-col gap-2.5 text-muted-foreground`,n),t[3]=n,t[4]=i);let s;return t[5]!==r||t[6]!==i?(s=(0,c.jsx)(`div`,{className:i,"data-slot":`alert-description`,...r}),t[5]=r,t[6]=i,t[7]=s):s=t[7],s}function m(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`flex gap-1`,n),t[3]=n,t[4]=i);let s;return t[5]!==r||t[6]!==i?(s=(0,c.jsx)(`div`,{className:i,"data-slot":`alert-action`,...r}),t[5]=r,t[6]=i,t[7]=s):s=t[7],s}f.displayName=`AlertTitle`,p.displayName=`AlertDescription`,m.displayName=`AlertAction`;export{f as i,m as n,p as r,d as t};
2
+ //# sourceMappingURL=alert-D6MFRWZv.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-C5GGWTfe.js";import{c as i,l as a,n as o,o as s,s as c,t as l,u}from"./DialogTitle-pLX9Mw1n.js";import{f as d,u as f}from"./dialog-BpR3dRVS.js";import{t as p}from"./AlertDialogRoot-DaczVYX9.js";var m=t(),h=e(n(),1),g=p,_=s;function v(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(f,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(u,{forceRender:!0,className:a,"data-slot":`alert-dialog-backdrop`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function y(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center p-4`,n),t[3]=n,t[4]=a);let s;return t[5]!==i||t[6]!==a?(s=(0,h.jsx)(o,{className:a,"data-slot":`alert-dialog-viewport`,...i}),t[5]=i,t[6]=a,t[7]=s):s=t[7],s}function b(e){let t=(0,m.c)(20),n,i,a,o;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4]):({className:n,bottomStickOnMobile:o,portalContainer:i,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o);let s=o===void 0||o,l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,h.jsx)(v,{}),t[5]=l):l=t[5];let u=s&&`max-sm:grid-rows-[1fr_auto] max-sm:p-0 max-sm:pt-12`,f;t[6]===u?f=t[7]:(f=r(u),t[6]=u,t[7]=f);let p=s&&`max-sm:max-w-none max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4`,g;t[8]!==n||t[9]!==p?(g=r(d,`row-start-2 max-h-full max-w-lg text-popover-foreground`,p,n),t[8]=n,t[9]=p,t[10]=g):g=t[10];let b;t[11]!==a||t[12]!==g?(b=(0,h.jsx)(c,{className:g,"data-slot":`alert-dialog-popup`,...a}),t[11]=a,t[12]=g,t[13]=b):b=t[13];let x;t[14]!==f||t[15]!==b?(x=(0,h.jsx)(y,{className:f,children:b}),t[14]=f,t[15]=b,t[16]=x):x=t[16];let S;return t[17]!==i||t[18]!==x?(S=(0,h.jsxs)(_,{container:i,children:[l,x]}),t[17]=i,t[18]=x,t[19]=S):S=t[19],S}function x(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`flex min-h-0 flex-col gap-2 p-6 text-center max-sm:pb-4 sm:text-left`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(`div`,{className:a,"data-slot":`alert-dialog-header`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function S(e){let t=(0,m.c)(11),n,i,a;t[0]===e?(n=t[1],i=t[2],a=t[3]):({className:n,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a);let o=a===void 0?`default`:a,s=o==="default"&&`border-t bg-muted/72 py-4`,c=o===`bare`&&`pb-6`,l;t[4]!==n||t[5]!==s||t[6]!==c?(l=r(`flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]`,s,c,n),t[4]=n,t[5]=s,t[6]=c,t[7]=l):l=t[7];let u;return t[8]!==i||t[9]!==l?(u=(0,h.jsx)(`div`,{className:l,"data-slot":`alert-dialog-footer`,...i}),t[8]=i,t[9]=l,t[10]=u):u=t[10],u}function C(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`wrap-anywhere shrink-0 font-semibold text-xl leading-none`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(l,{className:a,"data-slot":`alert-dialog-title`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function w(e){let t=(0,m.c)(8),n,a;t[0]===e?(n=t[1],a=t[2]):({className:n,...a}=e,t[0]=e,t[1]=n,t[2]=a);let o;t[3]===n?o=t[4]:(o=r(`wrap-anywhere max-h-[min(24rem,60dvh)] min-h-0 overflow-y-auto overscroll-contain text-muted-foreground text-sm select-text`,n),t[3]=n,t[4]=o);let s;return t[5]!==a||t[6]!==o?(s=(0,h.jsx)(i,{className:o,"data-slot":`alert-dialog-description`,...a}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function T(e){let t=(0,m.c)(2),n;return t[0]===e?n=t[1]:(n=(0,h.jsx)(a,{"data-slot":`alert-dialog-close`,...e}),t[0]=e,t[1]=n),n}export{x as a,S as i,T as n,b as o,w as r,C as s,g as t};
2
- //# sourceMappingURL=alert-dialog-Du3fYY3I.js.map
1
+ import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-DjbLtxuo.js";import{c as i,l as a,n as o,o as s,s as c,t as l,u}from"./DialogTitle-CFYK6V6-.js";import{f as d,u as f}from"./dialog-DTVhbEqi.js";import{t as p}from"./AlertDialogRoot-BI19p1Pb.js";var m=t(),h=e(n(),1),g=p,_=s;function v(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(f,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(u,{forceRender:!0,className:a,"data-slot":`alert-dialog-backdrop`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function y(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center p-4`,n),t[3]=n,t[4]=a);let s;return t[5]!==i||t[6]!==a?(s=(0,h.jsx)(o,{className:a,"data-slot":`alert-dialog-viewport`,...i}),t[5]=i,t[6]=a,t[7]=s):s=t[7],s}function b(e){let t=(0,m.c)(20),n,i,a,o;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4]):({className:n,bottomStickOnMobile:o,portalContainer:i,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o);let s=o===void 0||o,l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,h.jsx)(v,{}),t[5]=l):l=t[5];let u=s&&`max-sm:grid-rows-[1fr_auto] max-sm:p-0 max-sm:pt-12`,f;t[6]===u?f=t[7]:(f=r(u),t[6]=u,t[7]=f);let p=s&&`max-sm:max-w-none max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4`,g;t[8]!==n||t[9]!==p?(g=r(d,`row-start-2 max-h-full max-w-lg text-popover-foreground`,p,n),t[8]=n,t[9]=p,t[10]=g):g=t[10];let b;t[11]!==a||t[12]!==g?(b=(0,h.jsx)(c,{className:g,"data-slot":`alert-dialog-popup`,...a}),t[11]=a,t[12]=g,t[13]=b):b=t[13];let x;t[14]!==f||t[15]!==b?(x=(0,h.jsx)(y,{className:f,children:b}),t[14]=f,t[15]=b,t[16]=x):x=t[16];let S;return t[17]!==i||t[18]!==x?(S=(0,h.jsxs)(_,{container:i,children:[l,x]}),t[17]=i,t[18]=x,t[19]=S):S=t[19],S}function x(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`flex min-h-0 flex-col gap-2 p-6 text-center max-sm:pb-4 sm:text-left`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(`div`,{className:a,"data-slot":`alert-dialog-header`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function S(e){let t=(0,m.c)(11),n,i,a;t[0]===e?(n=t[1],i=t[2],a=t[3]):({className:n,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a);let o=a===void 0?`default`:a,s=o==="default"&&`border-t bg-muted/72 py-4`,c=o===`bare`&&`pb-6`,l;t[4]!==n||t[5]!==s||t[6]!==c?(l=r(`flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]`,s,c,n),t[4]=n,t[5]=s,t[6]=c,t[7]=l):l=t[7];let u;return t[8]!==i||t[9]!==l?(u=(0,h.jsx)(`div`,{className:l,"data-slot":`alert-dialog-footer`,...i}),t[8]=i,t[9]=l,t[10]=u):u=t[10],u}function C(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`wrap-anywhere shrink-0 font-semibold text-xl leading-none`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(l,{className:a,"data-slot":`alert-dialog-title`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function w(e){let t=(0,m.c)(8),n,a;t[0]===e?(n=t[1],a=t[2]):({className:n,...a}=e,t[0]=e,t[1]=n,t[2]=a);let o;t[3]===n?o=t[4]:(o=r(`wrap-anywhere max-h-[min(24rem,60dvh)] min-h-0 overflow-y-auto overscroll-contain text-muted-foreground text-sm select-text`,n),t[3]=n,t[4]=o);let s;return t[5]!==a||t[6]!==o?(s=(0,h.jsx)(i,{className:o,"data-slot":`alert-dialog-description`,...a}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function T(e){let t=(0,m.c)(2),n;return t[0]===e?n=t[1]:(n=(0,h.jsx)(a,{"data-slot":`alert-dialog-close`,...e}),t[0]=e,t[1]=n),n}export{x as a,S as i,T as n,b as o,w as r,C as s,g as t};
2
+ //# sourceMappingURL=alert-dialog-BCq0Qme9.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{as as r,is as i,js as a}from"./utils-DjbLtxuo.js";import{Tr as o,yr as s}from"./runtime-BBYIQ0f-.js";import{s as c}from"./vcsRefInvalidation-DkXoQApH.js";import{s as l}from"./session-CBEVNHld.js";import{c as u,l as d,o as f,t as p,u as m}from"./assets-Dh1LFwqL.js";var h=n(),g=e(t(),1);function _(e,t){let n=(0,h.c)(7),i=(0,g.useContext)(r),a=typeof t==`string`?t:t?.label,o=typeof t==`string`?!0:t?.reportFailure??!0,c=typeof t==`string`?!0:t?.reportDefect??!0,l=typeof t==`string`?!1:t?.refresh??!1,u;return n[0]!==a||n[1]!==e||n[2]!==l||n[3]!==i||n[4]!==c||n[5]!==o?(u=t=>{let n=e(t);return s(i,n,{label:a??n.label?.[0]??`atom query`,reportFailure:o,reportDefect:c,refresh:l})},n[0]=a,n[1]=e,n[2]=l,n[3]=i,n[4]=c,n[5]=o,n[6]=u):u=n[6],u}function v(e,t){let n=(0,h.c)(10),r=c(e),a;n[0]!==t||n[1]!==r?(a=d(t,r),n[0]=t,n[1]=r,n[2]=a):a=n[2];let o=a,s=l(e),m;n[3]!==o||n[4]!==e||n[5]!==t?(m=o!==null||e===null||t===null?f:p.createUrl({environmentId:e,input:{resource:t}}),n[3]=o,n[4]=e,n[5]=t,n[6]=m):m=n[6];let g=i(m);if(o!==null)return o;let _=s._tag===`Some`?s.value.httpBaseUrl:null,v;return n[7]!==g||n[8]!==_?(v=u(g,_),n[7]=g,n[8]=_,n[9]=v):v=n[9],v}function y(e,t){let n=(0,h.c)(6),r=l(e),i=r._tag===`Some`?r.value.httpBaseUrl:null,a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1,refresh:!0},n[0]=a):a=n[0];let s=_(p.createUrl,a),c;return n[1]!==e||n[2]!==i||n[3]!==s||n[4]!==t?(c=async()=>{if(e===null||t===null||i===null)return null;let n=await s({environmentId:e,input:{resource:t}});if(n._tag===`Failure`)throw o(n);return m(i,n.value.relativeUrl)},n[1]=e,n[2]=i,n[3]=s,n[4]=t,n[5]=c):c=n[5],c}function b(e,t){let n=l(e),{canReadFiles:r}=c(e),o=(0,g.useMemo)(()=>r?t:t.filter(e=>e._tag!==`workspace-file`&&e._tag!==`media-file`&&e._tag!==`draft-workspace-file`),[r,t]),s=i(p.createUrls({environmentId:e,resources:o}));return(0,g.useMemo)(()=>{if(n._tag===`None`)return t.map(()=>null);let e=0;return t.map(t=>{if(!r&&(t._tag===`workspace-file`||t._tag===`media-file`||t._tag===`draft-workspace-file`))return null;let i=s[e++];return i&&a(i)?m(n.value.httpBaseUrl,i.value.relativeUrl):null})},[r,n,t,s])}export{_ as i,v as n,b as r,y as t};
2
+ //# sourceMappingURL=assetUrls-CpRsTTqn.js.map
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Ab as t,As as n,DE as r,Eb as i,Gb as a,ME as o,OE as s,Ps as c,Sb as l,Ss as u,_E as d,_l as f,aC as p,ac as m,ds as h,eb as g,el as _,hs as v,is as y,jb as b,pC as ee,pb as te,ss as x,tc as S,ub as C,us as w,wS as ne,ys as T}from"./utils-DjbLtxuo.js";import{Br as re,Or as E,a as ie,h as D,i as O,n as k,nr as A,pr as j,t as M,zr as N}from"./runtime-BBYIQ0f-.js";import{m as P,n as F}from"./server-Dkj4NeYG.js";import{t as I}from"./session-CBEVNHld.js";import{t as L}from"./env-BfPir1X4.js";import{t as R}from"./sourceControl-De64nxc-.js";var z=18e5,B=3e5,V=36e5,H=class extends t()(`InvalidAssetCollectionKeyError`,{key:i,cause:te()}){get message(){return`Invalid asset collection atom key: ${JSON.stringify(this.key)}.`}},ae=a(b([g,C(f)]));function U(e){try{return ae(JSON.parse(e))}catch(t){throw new H({key:e,cause:t})}}function W(e,t){try{return new URL(t,e).toString()}catch{return null}}var G=w(n(!1)).pipe(T(`asset-url:empty`)),K=`This connection cannot read host files. Pair again with a new link to view it.`;function q(e,t){return e===null||t.canReadFiles||e._tag!==`workspace-file`&&e._tag!==`media-file`&&e._tag!==`draft-workspace-file`?null:t.isPending?{_tag:`Loading`}:t.error===null?{_tag:`Failure`,reason:`missing-file-access`}:{_tag:`Failure`}}function J(e,t){if(e._tag===`Failure`)return{_tag:`Failure`};if(t===null||e._tag!==`Success`)return{_tag:`Loading`};let n=W(t,e.value.relativeUrl);return n===null?{_tag:`Failure`}:{_tag:`Success`,url:n,expiresAt:e.value.expiresAt,...e.value.sourcePath===void 0?{}:{sourcePath:e.value.sourcePath},...e.value.imageDimensions===void 0?{}:{imageDimensions:e.value.imageDimensions}}}function oe(e,t){let n=ne(`assets.createUrl`)(function*(e){let n=yield*E(_.assetsCreateUrl,e).pipe(ee);if(d(n))return n.success;let r=n.failure,i=e.resource,a=t?(yield*u).get(t):null,o=yield*re;if(!a||a.environmentId===o.target.environmentId||r._tag!==`AssetWorkspaceAssetNotFoundError`&&r._tag!==`AssetWorkspaceAssetInspectionError`&&r._tag!==`AssetWorkspaceContextNotFoundError`||i._tag!==`media-file`||!(i.path.startsWith(`/`)||A(i.path))||D(i.path.slice(i.path.lastIndexOf(`.`)))===null)return yield*r;let s=yield*(yield*N).run(a.environmentId,E(_.assetsCreateUrl,e));return{...s,relativeUrl:new URL(s.relativeUrl,a.httpBaseUrl).href}}),r=j(e,{label:`environment-data:assets:create-url`,execute:n,staleTimeMs:B,idleTtlMs:V,refreshIntervalMs:z,refreshTrigger:({input:e})=>e.resource._tag===`media-file`?t:void 0}),i=x(e=>{let[t,n]=U(e);return w(e=>n.map(n=>e(r({environmentId:t,input:{resource:n}})))).pipe(v(V),T(`environment-data:assets:create-urls:${e}`))});return{createUrl:r,createUrls:e=>i(JSON.stringify([e.environmentId,e.resources]))}}function se(e){let t=a(b([g,i,l(i)])),n=e.projectClones,u=x(i=>{let[a,l,u]=t(JSON.parse(i)),d={_tag:`project-favicon`,cwd:l,...u?{path:u}:{}},f=e.createUrl({environmentId:a,input:{resource:d}}),m=n?f.pipe(h(w(e=>e(n(a)).find(e=>e.destinationPath===l)?.phase??null))):f,g=w(t=>{let n=t(m),r=t(e.preparedConnection(a)),i=J(n,o(r)?r.value.httpBaseUrl:null);return i._tag===`Success`?i.url:s(t.self())}).pipe(v(V)),_=e.imageCache;if(!_)return g;let y={environmentId:a,cwd:l,faviconPath:u},b=w(e=>{e(m);let t=e(g);return p(e=>_.resolve(y,t,e))}).pipe(v(V));return w(e=>{let t=e(b);return ie(e(g))?null:r(c(t),()=>_.peek(y))}).pipe(v(V))});return e=>u(O(e.environmentId,e.cwd,e.faviconPath))}var Y=e(),X=[],ce=w(null).pipe(T(`web-project-clone:empty`)),Z=x(e=>w(t=>{if(t(F).get(e)?.environment.capabilities.projectCloneTracking!==!0)return X;let n=t(R.projectClones({environmentId:e,input:{}}));return r(c(n),()=>X)}).pipe(T(`web-project-clones:${e}`))),le=x(e=>{let t=S(e);return w(e=>t===null?null:e(Z(t.environmentId)).find(e=>e.projectId===t.projectId)??null).pipe(T(`web-project-clone:${e}`))});function ue(e){let t=(0,Y.c)(2),n;return t[0]===e?n=t[1]:(n=e===null?ce:le(m(e)),t[0]=e,t[1]=n),y(n)}function Q(e){let t=(0,Y.c)(2),n;return t[0]===e?n=t[1]:(n=Z(e),t[0]=e,t[1]=n),y(n)}var de=w(e=>{if(!L)return null;let t=e(P);if(t===null)return null;let n=e(I.preparedConnectionValueAtom(t)),r=e(I.initialConfigValueAtom(t));return n._tag===`None`||r===null?null:{environmentId:t,httpBaseUrl:n.value.httpBaseUrl}}),$=oe(M,de),fe=se({imageCache:k,createUrl:$.createUrl,preparedConnection:I.preparedConnectionValueAtom,projectClones:Z});export{ue as a,J as c,Q as i,q as l,fe as n,G as o,Z as r,K as s,$ as t,W as u};
2
+ //# sourceMappingURL=assets-Dh1LFwqL.js.map
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{$g as t,B as n,H as r,R as i,U as a,W as o,Wo as s,__ as c,e_ as l,es as u,is as d,oc as f}from"./utils-DjbLtxuo.js";import{$r as p,Xr as m,Zr as ee,_ as h}from"./runtime-BBYIQ0f-.js";import{i as g,y as te}from"./entities-CWtNgawi.js";import{n as _,r as v,s as ne}from"./useSettings-EYJbJzT3.js";import{m as y}from"./server-Dkj4NeYG.js";import{r as b}from"./session-CBEVNHld.js";import{t as x}from"./env-BfPir1X4.js";import{i as S,t as re}from"./preview-B4_sjsUX.js";var C=e();function ie(e){if(g(e)&&!(s()&&e!==u.get(y)))return`server`}function ae(e,t,n,r){return!r||!n||!s()||e===t?null:r.runtime===`server`?`desktop`:`server`}function oe(e){return s()||g(e)}function w(e){let t=(0,C.c)(2),n=te(e),r;return t[0]===n?r=t[1]:(r=s()||n,t[0]=n,t[1]=r),r}function T(e,t,n){return x&&n?.runtime===`server`&&!n.headless&&t!==null&&e===t}function E(e,t){let n=(0,C.c)(4),r=d(y),i;return n[0]!==e||n[1]!==t||n[2]!==r?(i=T(e,r,t),n[0]=e,n[1]=t,n[2]=r,n[3]=i):i=n[3],i}var se=e=>e._tag===`fill`?`fill`:`${e._tag}:${e.width}:${e.height}:${e._tag===`preset`?e.presetId:``}`,D=e=>Number.isFinite(e)&&e>0?e:1;function ce(e,t,n=1){if(e._tag!==`fill`)return e;let r=D(n);return t?{_tag:`freeform`,width:Math.max(1,Math.round(t.width/t.scale/r)),height:Math.max(1,Math.round(t.height/t.scale/r))}:{_tag:`freeform`,width:1280,height:800}}function O(e){return{width:Math.max(1,e.width-20),height:Math.max(1,e.height-38-10)}}function k(e,t,n=1){let r=Math.max(1,Math.round(e.width)),i=Math.max(1,Math.round(e.height));if(t._tag===`fill`)return{canvasWidth:r,canvasHeight:i,viewportX:0,viewportY:0,viewportWidth:r,viewportHeight:i,viewportScale:1,fillsPanel:!0};let a=D(n),o=t.width*a,s=t.height*a,c=Math.min(1,r/o,i/s),l=o*c,u=s*c;return{canvasWidth:r,canvasHeight:i,viewportX:Math.max(0,Math.round((r-l)/2)),viewportY:Math.max(0,Math.round((i-u)/2)),viewportWidth:l,viewportHeight:u,viewportScale:c,fillsPanel:!1}}function le(e,t,n=1){let r=k(O(e),t,n);return{...r,canvasWidth:Math.max(1,Math.round(e.width)),canvasHeight:Math.max(1,Math.round(e.height)),viewportX:r.viewportX+10,viewportY:r.viewportY+38}}var A=e=>Math.min(l,Math.max(240,e)),ue=e=>e!==void 0&&Number.isFinite(e)&&e>0;function j(e,n,r){if(r===`width`){let r=Math.ceil(Math.max(240,240*n)),i=Math.floor(Math.min(l,l*n,Math.sqrt(t*n))),a=Math.min(i,Math.max(r,Math.round(e))),o=Math.round(a/n);for(;a*o>8294400&&a>r;)--a,o=Math.round(a/n);return{width:a,height:o}}let i=Math.ceil(Math.max(240,240/n)),a=Math.floor(Math.min(l,l/n,Math.sqrt(t/n))),o=Math.min(a,Math.max(i,Math.round(e))),s=Math.round(o*n);for(;s*o>8294400&&o>i;)--o,s=Math.round(o*n);return{width:s,height:o}}function M(e,n,r=1,i=`southeast`,a){let o=D(r),s=i.includes(`east`)?n.x:i.includes(`west`)?-n.x:0,c=i.includes(`south`)?n.y:i.includes(`north`)?-n.y:0,l=e.width+s/o,u=e.height+c/o;if(ue(a)){let t=s!==0||i===`east`||i===`west`,n=c!==0||i===`north`||i===`south`,r=t&&!n?`width`:n&&!t?`height`:Math.abs(l-e.width)/e.width>=Math.abs(u-e.height)/e.height?`width`:`height`;return j(r===`width`?l:u,a,r)}let d=A(Math.round(l)),f=A(Math.round(u));return d*f<=8294400||(Math.abs(s)>=Math.abs(c)?d=Math.max(240,Math.floor(t/f)):f=Math.max(240,Math.floor(t/d))),{width:d,height:f}}var N=(e,t,n)=>{let r=(e<n?(n+e)/2:e)+t;return r<=n?r*2-n:r},P=(e,t,n)=>{if(e>n){let r=e-n;return t<=r?e-t:n-(t-r)*2}let r=(n-e)/2+t;return r>=0?n-r*2:n-r};function F(e,t,n,r=1,i=`southeast`,a){let o=D(r),s=e.width*o,c=e.height*o,l=i.includes(`east`)?N(s,t.x,n.width):i.includes(`west`)?P(s,t.x,n.width):s,u=i.includes(`south`)?N(c,t.y,n.height):i.includes(`north`)?P(c,t.y,n.height):c,d=l-s,f=u-c;return M(e,{x:i.includes(`west`)?-d:d,y:i.includes(`north`)?-f:f},o,i,a)}function I(e,t=1){let n=O(e),r=D(t);return M({width:n.width/r,height:n.height/r},{x:0,y:0})}var L=e=>{let t=c(e.browserProfiles);return{viewport:e.browserDefaultViewport,zoomFactor:e.browserDefaultZoomFactor,appearance:e.browserDefaultAppearance,autoShowFloatingPreview:e.browserAutoShowFloatingPreview,profiles:t,profileId:t.find(t=>t.id===e.browserDefaultProfileId&&t.kind!==`incognito`)?.id??`default`}};function R(){return L(v())}async function z(){return await _(),R()}function B(){return ne(L)}function V(e=R()){return{zoomFactor:e.zoomFactor,colorScheme:e.appearance}}function H(e=R()){return e.viewport}function U(e=R()){return e.profileId}var de={width:1024,height:768};function fe(e){let t=e.defaults??R();return t.viewport._tag===`fill`?{_tag:`freeform`,...e.panelRect?I(e.panelRect,e.zoomFactor):de}:t.viewport}var pe=e=>{let t=b(e);if(!t)throw Error(`Environment ${e} is not connected.`);return new URL(t.httpBaseUrl)},me=(e,t,n,r,i)=>{if(!ee(n.hostname))throw Error(`This environment port needs the planned authenticated preview gateway; its server address is not directly private-network reachable.`);let a=t.protocol??`http`,o=t.path?.startsWith(`/`)?t.path:`/${t.path??``}`,s=n.hostname.replace(/^\[|\]$/g,``),c=m(s)?`localhost`:s.includes(`:`)?`[${s}]`:s,l=i?new URL(i):new URL(o,`${a}://${c}:${t.port}`);return i&&(l.hostname=c,l.port=String(t.port)),{requestedUrl:r??`${a}://localhost:${t.port}${o}`,resolvedUrl:l.toString(),resolutionKind:m(s)?`direct`:`direct-private-network`,environmentId:e}},he=e=>x&&(e._tag===`PrimaryConnectionTarget`||h(e));function W(e,t){try{let n=S(t),r=new URL(n);if(!re(r.hostname))return n;let i=b(e)?.target;return i&&he(i)?n:me(e,{kind:`environment-port`,port:Number(r.port||(r.protocol===`https:`?443:80)),protocol:r.protocol===`https:`?`https`:`http`,path:`${r.pathname}${r.search}${r.hash}`},pe(e),t,r).resolvedUrl}catch{return t}}var ge=2048,_e=864e13;function G(e){return typeof e==`number`&&Number.isFinite(e)&&Math.abs(e)<=_e}function K(e){let t;try{t=new URL(S(e))}catch{return null}return t.username=t.password=``,t.href.length>ge?null:t.href}function q(e,t){let n=new URL(J(e,t));return n.pathname!==`/`&&n.pathname.endsWith(`/`)&&(n.pathname=n.pathname.slice(0,-1)),n.href}function J(e,t){let n=new URL(e),r=p(n.hostname),i=t&&p(t);return(m(r)||r===`0.0.0.0`||r===i)&&(n.hostname=`local`),n.href}function Y(e){let t=p(new URL(e).hostname);return m(t)||t===`0.0.0.0`}function ve(e,t,n,r){let i=J(t,r?.environmentHostname),a=e.find(e=>J(e.url,r?.environmentHostname)===i),o=e.filter(e=>J(e.url,r?.environmentHostname)!==i),s=r?.insertOrdered&&a&&a.lastVisitedAt>n?a.lastVisitedAt:n,c=a&&(Y(a.url)||!Y(t))?a.url:t,l=a?{...a,url:c,lastVisitedAt:s}:{url:t,lastVisitedAt:s};if(!r?.insertOrdered)return[l,...o].slice(0,50);let u=o.findIndex(e=>e.lastVisitedAt<l.lastVisitedAt);return(u===-1?[...o,l]:o.toSpliced(u,0,l)).slice(0,50)}function X(e){let t=Object.keys(e);if(t.length<=20)return e;let n=t.toSorted((t,n)=>(e[n]?.[0]?.lastVisitedAt??0)-(e[t]?.[0]?.lastVisitedAt??0)).slice(0,20);return Object.fromEntries(n.map(t=>[t,e[t]??[]]))}function Z(e){if(!e||typeof e!=`object`)return{byProjectKey:{}};let t=e.byProjectKey;if(!t||typeof t!=`object`||Array.isArray(t))return{byProjectKey:{}};let n={};for(let[e,r]of Object.entries(t)){if(!Array.isArray(r))continue;let t=new Set,i=r.flatMap(e=>{if(!e||typeof e!=`object`)return[];let{url:t,lastVisitedAt:n,title:r}=e;if(typeof t!=`string`)return[];let i=K(t);return!i||!G(n)?[]:[{url:i,lastVisitedAt:n,...typeof r==`string`&&r.length>0?{title:r.slice(0,512)}:{}}]}).toSorted((e,t)=>t.lastVisitedAt-e.lastVisitedAt).filter(e=>{let n=J(e.url);return!t.has(n)&&(t.add(n),!0)}).slice(0,50);i.length>0&&(n[e]=i)}return{byProjectKey:X(n)}}var ye=`p4code:browser-history:v1`,be=20;function Q(e,t,n){let r=e[t]??[],i={...e};i[t]=[...r,n].slice(-10);let a=Object.keys(i);if(a.length>be){let e=a[0];e!==void 0&&e!==t&&delete i[e]}return i}var $=o()(a((e,t)=>({byProjectKey:{},projectKeyByThreadKey:{},pendingVisitsByThreadKey:{},pendingTitlesByThreadKey:{},recordVisit:(t,n,r,i)=>{let a=K(n);a&&e(e=>({byProjectKey:X({...e.byProjectKey,[t]:ve(e.byProjectKey[t]??[],a,r,i)})}))},setTitleForUrl:(n,r,i,a)=>{let o=K(r),s=t(),c=s.byProjectKey[n],l=i.trim().slice(0,512);if(!o||!c||l.length===0)return;let u=q(o,a),d=c.findIndex(e=>q(e.url,a)===u);d!==-1&&c[d]?.title!==l&&e({byProjectKey:{...s.byProjectKey,[n]:c.map((e,t)=>t===d?{...e,title:l}:e)}})},removeUrl:(n,r)=>{let i=K(r),a=t(),o=a.byProjectKey[n];if(!i||!o)return;let s=o.filter(e=>e.url!==i);if(s.length!==o.length){if(s.length===0){let{[n]:t,...r}=a.byProjectKey;e({byProjectKey:r})}else e({byProjectKey:{...a.byProjectKey,[n]:s}})}},registerThreadProject:(n,r)=>{let i=f(n),a=t(),o=a.pendingVisitsByThreadKey[i],s=a.pendingTitlesByThreadKey[i];if(a.projectKeyByThreadKey[i]===r&&!o&&!s)return;let c={...a.pendingVisitsByThreadKey},l={...a.pendingTitlesByThreadKey};delete c[i],delete l[i],e({projectKeyByThreadKey:{...a.projectKeyByThreadKey,[i]:r},pendingVisitsByThreadKey:c,pendingTitlesByThreadKey:l});for(let e of o??[])t().recordVisit(r,e.url,e.at,{insertOrdered:!0,environmentHostname:e.environmentHostname});for(let e of s??[])t().setTitleForUrl(r,e.url,e.title,e.environmentHostname)}}),{name:ye,version:1,storage:r(()=>i(typeof window<`u`?window.localStorage:void 0)),partialize:e=>({byProjectKey:e.byProjectKey,projectKeyByThreadKey:e.projectKeyByThreadKey}),migrate:Z,merge:xe}));function xe(e,t){let n=Z(e);return{...t,...n,projectKeyByThreadKey:Se(e,n.byProjectKey),pendingVisitsByThreadKey:{},pendingTitlesByThreadKey:{}}}function Se(e,t){if(!e||typeof e!=`object`)return{};let n=e.projectKeyByThreadKey;return!n||typeof n!=`object`||Array.isArray(n)?{}:Object.fromEntries(Object.entries(n).filter(e=>typeof e[1]==`string`&&e[1]in t).slice(-100))}function Ce(e,t,n){let r=f(e),i=$.getState(),a=i.projectKeyByThreadKey[r],o=n??Date.now(),s=b(e.environmentId),c=s?new URL(s.httpBaseUrl).hostname:null;a?i.recordVisit(a,t,o,{environmentHostname:c}):$.setState({pendingVisitsByThreadKey:Q(i.pendingVisitsByThreadKey,r,{url:t,at:o,environmentHostname:c})})}function we(e,t,n,r){let i=f(e),a=$.getState(),o=a.projectKeyByThreadKey[i];o?a.setTitleForUrl(o,t,n,r):$.setState({pendingTitlesByThreadKey:Q(a.pendingTitlesByThreadKey,i,{url:t,title:n,environmentHostname:r})})}function Te(e,t){let n=$.getState(),r=n.projectKeyByThreadKey[f(e)];r&&n.removeUrl(r,t)}var Ee=[];function De(e,t){let r=(0,C.c)(3),i;return r[0]!==t||r[1]!==e?(i=n=>{let r=n.projectKeyByThreadKey[f(e)],i=r?n.byProjectKey[r]:void 0;return i&&i.length>0?i.slice(0,t):Ee},r[0]=t,r[1]=e,r[2]=i):i=r[2],$(n(i))}export{T as C,ie as S,E as T,le as _,De as a,ae as b,H as c,z as d,B as f,O as g,M as h,we as i,V as l,F as m,Ce as n,W as o,se as p,Te as r,U as s,G as t,fe as u,k as v,w,oe as x,ce as y};
2
+ //# sourceMappingURL=browserHistoryStore-BVEWgOnh.js.map
@@ -1,2 +1,2 @@
1
- import{n as e,r as t}from"./useSettings-B09a3zie.js";import{x as n}from"./browserHistoryStore-CdncPjG8.js";function r(e){return e.event.metaKey||e.event.ctrlKey||e.preference!==`app`||!e.canOpenInApp||!i(e.url)?`system`:`app`}function i(e){try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}async function a(){return await e(),t().browserLinkTarget}function o(e){return e!=null&&n(e.environmentId)}export{r as i,i as n,a as r,o as t};
2
- //# sourceMappingURL=browserLinkTarget-Bf9H9UVe.js.map
1
+ import{n as e,r as t}from"./useSettings-EYJbJzT3.js";import{x as n}from"./browserHistoryStore-BVEWgOnh.js";function r(e){return e.event.metaKey||e.event.ctrlKey||e.preference!==`app`||!e.canOpenInApp||!i(e.url)?`system`:`app`}function i(e){try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}async function a(){return await e(),t().browserLinkTarget}function o(e){return e!=null&&n(e.environmentId)}export{r as i,i as n,a as r,o as t};
2
+ //# sourceMappingURL=browserLinkTarget-IOprEiHF.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-C5GGWTfe.js";import{n as i,t as a}from"./CheckboxIndicator-lkbFKbE7.js";var o=t(),s=e(n(),1);function c(e){let t=(0,o.c)(9),n,c;t[0]===e?(n=t[1],c=t[2]):({className:n,...c}=e,t[0]=e,t[1]=n,t[2]=c);let u;t[3]===n?u=t[4]:(u=r(`relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-[.25rem] border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[3px] not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:outline-destructive/48 data-disabled:opacity-64 sm:size-4 dark:not-data-checked:bg-input/32 dark:focus-visible:aria-invalid:outline-destructive/24 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none`,n),t[3]=n,t[4]=u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,s.jsx)(a,{className:`-inset-px absolute flex items-center justify-center rounded-[.25rem] text-primary-foreground data-unchecked:hidden data-checked:bg-primary data-indeterminate:text-foreground in-[[data-slot=checkbox]:focus-visible]:inset-shadow-[0_0_0_3px_var(--background)] in-[[data-slot=checkbox]:focus-visible]:outline-2 in-[[data-slot=checkbox]:focus-visible]:outline-solid in-[[data-slot=checkbox]:focus-visible]:-outline-offset-2 in-[[data-slot=checkbox]:focus-visible]:outline-inherit`,"data-slot":`checkbox-indicator`,render:l}),t[5]=d):d=t[5];let f;return t[6]!==c||t[7]!==u?(f=(0,s.jsx)(i,{className:u,"data-slot":`checkbox`,...c,children:d}),t[6]=c,t[7]=u,t[8]=f):f=t[8],f}function l(e,t){return(0,s.jsx)(`span`,{...e,children:t.indeterminate?(0,s.jsx)(`svg`,{className:`size-3.5 text-current sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.jsx)(`path`,{d:`M5.252 12h13.496`})}):(0,s.jsx)(`svg`,{className:`size-3.5 text-current sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})})}export{c as t};
2
- //# sourceMappingURL=checkbox-d50pgAVe.js.map
1
+ import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-DjbLtxuo.js";import{n as i,t as a}from"./CheckboxIndicator-C4iAbUMh.js";var o=t(),s=e(n(),1);function c(e){let t=(0,o.c)(9),n,c;t[0]===e?(n=t[1],c=t[2]):({className:n,...c}=e,t[0]=e,t[1]=n,t[2]=c);let u;t[3]===n?u=t[4]:(u=r(`relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-[.25rem] border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[3px] not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:outline-destructive/48 data-disabled:opacity-64 sm:size-4 dark:not-data-checked:bg-input/32 dark:focus-visible:aria-invalid:outline-destructive/24 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none`,n),t[3]=n,t[4]=u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,s.jsx)(a,{className:`-inset-px absolute flex items-center justify-center rounded-[.25rem] text-primary-foreground data-unchecked:hidden data-checked:bg-primary data-indeterminate:text-foreground in-[[data-slot=checkbox]:focus-visible]:inset-shadow-[0_0_0_3px_var(--background)] in-[[data-slot=checkbox]:focus-visible]:outline-2 in-[[data-slot=checkbox]:focus-visible]:outline-solid in-[[data-slot=checkbox]:focus-visible]:-outline-offset-2 in-[[data-slot=checkbox]:focus-visible]:outline-inherit`,"data-slot":`checkbox-indicator`,render:l}),t[5]=d):d=t[5];let f;return t[6]!==c||t[7]!==u?(f=(0,s.jsx)(i,{className:u,"data-slot":`checkbox`,...c,children:d}),t[6]=c,t[7]=u,t[8]=f):f=t[8],f}function l(e,t){return(0,s.jsx)(`span`,{...e,children:t.indeterminate?(0,s.jsx)(`svg`,{className:`size-3.5 text-current sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.jsx)(`path`,{d:`M5.252 12h13.496`})}):(0,s.jsx)(`svg`,{className:`size-3.5 text-current sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})})}export{c as t};
2
+ //# sourceMappingURL=checkbox-CGhJug34.js.map
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./utils-C5GGWTfe.js";function a(e){let t=Number.parseInt(e.slice(1),16),n=(t>>16&255)/255,r=(t>>8&255)/255,i=(t&255)/255,a=Math.max(n,r,i),o=a-Math.min(n,r,i),s=0;return o!==0&&(s=a===n?(r-i)/o%6:a===r?(i-n)/o+2:(n-r)/o+4,s*=60,s<0&&(s+=360)),{h:s,s:a===0?0:o/a,v:a}}function o(e,t,n){let r=(e%360+360)%360,i=n*t,a=i*(1-Math.abs(r/60%2-1)),o=n-i,[s,c,l]=r<60?[i,a,0]:r<120?[a,i,0]:r<180?[0,i,a]:r<240?[0,a,i]:r<300?[a,0,i]:[i,0,a];return`#${[s,c,l].map(e=>Math.round((e+o)*255).toString(16).padStart(2,`0`)).join(``)}`}var s=n(),c=e(t(),1),l=e(r(),1);function u(e){return Math.min(1,Math.max(0,e))}function d(e,t,n){let r=(0,s.c)(9),[i,a]=(0,c.useState)(!1),o=(0,c.useRef)(null),l;r[0]===t?l=r[1]:(l=e=>{o.current===e.pointerId&&(o.current=null,a(!1),t?.())},r[0]=t,r[1]=l);let u=l,d=i?void 0:`left 80ms linear, top 80ms linear, background-color 80ms linear`,f;r[2]!==n?.current||r[3]!==u||r[4]!==e?(f={onPointerDown(t){o.current===null&&t.button===0&&(o.current=t.pointerId,(n?.current??t.currentTarget).focus({preventScroll:!0}),t.currentTarget.setPointerCapture(t.pointerId),a(!0),e(t))},onPointerMove(t){o.current===t.pointerId&&e(t)},onPointerUp:u,onPointerCancel:u,onLostPointerCapture:u},r[2]=n?.current,r[3]=u,r[4]=e,r[5]=f):f=r[5];let p;return r[6]!==d||r[7]!==f?(p={thumbTransition:d,handlers:f},r[6]=d,r[7]=f,r[8]=p):p=r[8],p}function f(e){let t=(0,s.c)(31),{label:n,value:r,onChange:a,onInteractionEnd:o,className:f,variant:p}=e,m=p===void 0?`inset`:p,h=(0,c.useId)(),g=(0,c.useRef)(null),_;t[0]!==a||t[1]!==r?(_=e=>{let t=e.currentTarget.getBoundingClientRect();t.width&&t.height&&a({...r,s:u((e.clientX-t.left)/t.width),v:1-u((e.clientY-t.top)/t.height)})},t[0]=a,t[1]=r,t[2]=_):_=t[2];let{handlers:v,thumbTransition:y}=d(_,o,g),b;t[3]!==a||t[4]!==r?(b=(e,t)=>{let n=e.shiftKey?.1:.02,i;bb18:switch(e.key){case`ArrowRight`:case`ArrowUp`:i=u(r[t]+n);break bb18;case`ArrowLeft`:case`ArrowDown`:i=u(r[t]-n);break bb18;case`Home`:i=0;break bb18;case`End`:i=1;break bb18;default:return}e.preventDefault(),a({...r,[t]:i})},t[3]=a,t[4]=r,t[5]=b):b=t[5];let x=b,S=`${n} saturation and brightness`,C=m===`edge`?`h-36 rounded-none`:`h-32 rounded-lg`,w;t[6]!==f||t[7]!==C?(w=i(`relative cursor-crosshair touch-none overflow-hidden bg-[linear-gradient(to_top,#000,transparent),linear-gradient(to_right,#fff,transparent)] has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-inset has-[:focus-visible]:ring-ring has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-popover`,C,f),t[6]=f,t[7]=C,t[8]=w):w=t[8];let T=`hsl(${r.h} 100% 50%)`,E;t[9]===T?E=t[10]:(E={backgroundColor:T},t[9]=T,t[10]=E);let D;t[11]===h?D=t[12]:(D=(0,l.jsx)(`span`,{id:h,className:`sr-only`,children:`Use arrow keys to adjust the focused value. Hold Shift for larger steps. Use Home and End for the minimum and maximum. Press Tab to move between saturation and brightness.`}),t[11]=h,t[12]=D);let O;t[13]!==x||t[14]!==h||t[15]!==n||t[16]!==a||t[17]!==r?(O=[[`s`,`Saturation`],[`v`,`Brightness`]].map(e=>{let[t,i]=e;return(0,l.jsxs)(`label`,{className:`contents`,children:[(0,l.jsx)(`input`,{ref:t===`s`?g:void 0,type:`range`,min:0,max:100,step:`any`,value:r[t]*100,"aria-label":`${n} ${i.toLowerCase()}`,"aria-describedby":h,"aria-valuetext":`${Math.round(r[t]*100)}%`,className:`peer sr-only`,onKeyDown:e=>x(e,t),onChange:e=>a({...r,[t]:e.currentTarget.valueAsNumber/100})}),(0,l.jsxs)(`span`,{"aria-hidden":!0,className:`pointer-events-none invisible absolute bottom-2 left-2 z-10 rounded bg-popover px-1.5 py-0.5 text-xs text-popover-foreground peer-focus-visible:visible`,children:[i,` `,Math.round(r[t]*100),`%`]})]},t)}),t[13]=x,t[14]=h,t[15]=n,t[16]=a,t[17]=r,t[18]=O):O=t[18];let k=`calc(${r.s} * (100% - 0.75rem) + 0.375rem)`,A=`calc(${1-r.v} * (100% - 0.75rem) + 0.375rem)`,j;t[19]!==k||t[20]!==A||t[21]!==y?(j=(0,l.jsx)(`span`,{className:`pointer-events-none absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgb(0_0_0/0.4)]`,style:{left:k,top:A,transition:y}}),t[19]=k,t[20]=A,t[21]=y,t[22]=j):j=t[22];let M;return t[23]!==v||t[24]!==O||t[25]!==j||t[26]!==S||t[27]!==w||t[28]!==E||t[29]!==D?(M=(0,l.jsxs)(`div`,{"aria-label":S,role:`group`,className:w,style:E,...v,children:[D,O,j]}),t[23]=v,t[24]=O,t[25]=j,t[26]=S,t[27]=w,t[28]=E,t[29]=D,t[30]=M):M=t[30],M}function p(e){let t=(0,s.c)(21),{label:n,value:r,onChange:a,onInteractionEnd:o,className:c}=e,f;t[0]===a?f=t[1]:(f=e=>{let t=e.currentTarget.getBoundingClientRect();t.width&&a(u((e.clientX-t.left)/t.width)*360)},t[0]=a,t[1]=f);let{handlers:p,thumbTransition:m}=d(f,o),h;t[2]!==a||t[3]!==r?(h=e=>{if(![`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`].includes(e.key))return;e.preventDefault();let t=e.shiftKey?10:1,n=e.key===`ArrowRight`||e.key===`ArrowUp`?1:-1;a((r+n*t+360)%360)},t[2]=a,t[3]=r,t[4]=h):h=t[4];let g=h,_;t[5]===r?_=t[6]:(_=Math.round(r),t[5]=r,t[6]=_);let v;t[7]===c?v=t[8]:(v=i(`relative flex h-6 cursor-pointer touch-none items-center rounded-full outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-popover`,c),t[7]=c,t[8]=v);let y;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,l.jsx)(`span`,{"aria-hidden":!0,className:`h-2.5 w-full rounded-full bg-[linear-gradient(to_right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)] shadow-[inset_0_0_0_1px_rgb(0_0_0_/_12%)]`}),t[9]=y):y=t[9];let b=`calc(${r/360} * (100% - 1rem) + 0.5rem)`,x=`hsl(${r} 100% 50%)`,S;t[10]!==b||t[11]!==x||t[12]!==m?(S=(0,l.jsx)(`span`,{className:`pointer-events-none absolute top-1/2 size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgb(0_0_0/0.4)]`,style:{left:b,backgroundColor:x,transition:m}}),t[10]=b,t[11]=x,t[12]=m,t[13]=S):S=t[13];let C;return t[14]!==g||t[15]!==p||t[16]!==n||t[17]!==_||t[18]!==v||t[19]!==S?(C=(0,l.jsxs)(`div`,{"aria-label":n,"aria-valuemax":360,"aria-valuemin":0,"aria-valuenow":_,className:v,role:`slider`,tabIndex:0,onKeyDown:g,...p,children:[y,S]}),t[14]=g,t[15]=p,t[16]=n,t[17]=_,t[18]=v,t[19]=S,t[20]=C):C=t[20],C}export{o as i,f as n,a as r,p as t};
2
- //# sourceMappingURL=color-picker-zcQshxaE.js.map
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./utils-DjbLtxuo.js";function a(e){let t=Number.parseInt(e.slice(1),16),n=(t>>16&255)/255,r=(t>>8&255)/255,i=(t&255)/255,a=Math.max(n,r,i),o=a-Math.min(n,r,i),s=0;return o!==0&&(s=a===n?(r-i)/o%6:a===r?(i-n)/o+2:(n-r)/o+4,s*=60,s<0&&(s+=360)),{h:s,s:a===0?0:o/a,v:a}}function o(e,t,n){let r=(e%360+360)%360,i=n*t,a=i*(1-Math.abs(r/60%2-1)),o=n-i,[s,c,l]=r<60?[i,a,0]:r<120?[a,i,0]:r<180?[0,i,a]:r<240?[0,a,i]:r<300?[a,0,i]:[i,0,a];return`#${[s,c,l].map(e=>Math.round((e+o)*255).toString(16).padStart(2,`0`)).join(``)}`}var s=n(),c=e(t(),1),l=e(r(),1);function u(e){return Math.min(1,Math.max(0,e))}function d(e,t,n){let r=(0,s.c)(9),[i,a]=(0,c.useState)(!1),o=(0,c.useRef)(null),l;r[0]===t?l=r[1]:(l=e=>{o.current===e.pointerId&&(o.current=null,a(!1),t?.())},r[0]=t,r[1]=l);let u=l,d=i?void 0:`left 80ms linear, top 80ms linear, background-color 80ms linear`,f;r[2]!==n?.current||r[3]!==u||r[4]!==e?(f={onPointerDown(t){o.current===null&&t.button===0&&(o.current=t.pointerId,(n?.current??t.currentTarget).focus({preventScroll:!0}),t.currentTarget.setPointerCapture(t.pointerId),a(!0),e(t))},onPointerMove(t){o.current===t.pointerId&&e(t)},onPointerUp:u,onPointerCancel:u,onLostPointerCapture:u},r[2]=n?.current,r[3]=u,r[4]=e,r[5]=f):f=r[5];let p;return r[6]!==d||r[7]!==f?(p={thumbTransition:d,handlers:f},r[6]=d,r[7]=f,r[8]=p):p=r[8],p}function f(e){let t=(0,s.c)(31),{label:n,value:r,onChange:a,onInteractionEnd:o,className:f,variant:p}=e,m=p===void 0?`inset`:p,h=(0,c.useId)(),g=(0,c.useRef)(null),_;t[0]!==a||t[1]!==r?(_=e=>{let t=e.currentTarget.getBoundingClientRect();t.width&&t.height&&a({...r,s:u((e.clientX-t.left)/t.width),v:1-u((e.clientY-t.top)/t.height)})},t[0]=a,t[1]=r,t[2]=_):_=t[2];let{handlers:v,thumbTransition:y}=d(_,o,g),b;t[3]!==a||t[4]!==r?(b=(e,t)=>{let n=e.shiftKey?.1:.02,i;bb18:switch(e.key){case`ArrowRight`:case`ArrowUp`:i=u(r[t]+n);break bb18;case`ArrowLeft`:case`ArrowDown`:i=u(r[t]-n);break bb18;case`Home`:i=0;break bb18;case`End`:i=1;break bb18;default:return}e.preventDefault(),a({...r,[t]:i})},t[3]=a,t[4]=r,t[5]=b):b=t[5];let x=b,S=`${n} saturation and brightness`,C=m===`edge`?`h-36 rounded-none`:`h-32 rounded-lg`,w;t[6]!==f||t[7]!==C?(w=i(`relative cursor-crosshair touch-none overflow-hidden bg-[linear-gradient(to_top,#000,transparent),linear-gradient(to_right,#fff,transparent)] has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-inset has-[:focus-visible]:ring-ring has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-popover`,C,f),t[6]=f,t[7]=C,t[8]=w):w=t[8];let T=`hsl(${r.h} 100% 50%)`,E;t[9]===T?E=t[10]:(E={backgroundColor:T},t[9]=T,t[10]=E);let D;t[11]===h?D=t[12]:(D=(0,l.jsx)(`span`,{id:h,className:`sr-only`,children:`Use arrow keys to adjust the focused value. Hold Shift for larger steps. Use Home and End for the minimum and maximum. Press Tab to move between saturation and brightness.`}),t[11]=h,t[12]=D);let O;t[13]!==x||t[14]!==h||t[15]!==n||t[16]!==a||t[17]!==r?(O=[[`s`,`Saturation`],[`v`,`Brightness`]].map(e=>{let[t,i]=e;return(0,l.jsxs)(`label`,{className:`contents`,children:[(0,l.jsx)(`input`,{ref:t===`s`?g:void 0,type:`range`,min:0,max:100,step:`any`,value:r[t]*100,"aria-label":`${n} ${i.toLowerCase()}`,"aria-describedby":h,"aria-valuetext":`${Math.round(r[t]*100)}%`,className:`peer sr-only`,onKeyDown:e=>x(e,t),onChange:e=>a({...r,[t]:e.currentTarget.valueAsNumber/100})}),(0,l.jsxs)(`span`,{"aria-hidden":!0,className:`pointer-events-none invisible absolute bottom-2 left-2 z-10 rounded bg-popover px-1.5 py-0.5 text-xs text-popover-foreground peer-focus-visible:visible`,children:[i,` `,Math.round(r[t]*100),`%`]})]},t)}),t[13]=x,t[14]=h,t[15]=n,t[16]=a,t[17]=r,t[18]=O):O=t[18];let k=`calc(${r.s} * (100% - 0.75rem) + 0.375rem)`,A=`calc(${1-r.v} * (100% - 0.75rem) + 0.375rem)`,j;t[19]!==k||t[20]!==A||t[21]!==y?(j=(0,l.jsx)(`span`,{className:`pointer-events-none absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgb(0_0_0/0.4)]`,style:{left:k,top:A,transition:y}}),t[19]=k,t[20]=A,t[21]=y,t[22]=j):j=t[22];let M;return t[23]!==v||t[24]!==O||t[25]!==j||t[26]!==S||t[27]!==w||t[28]!==E||t[29]!==D?(M=(0,l.jsxs)(`div`,{"aria-label":S,role:`group`,className:w,style:E,...v,children:[D,O,j]}),t[23]=v,t[24]=O,t[25]=j,t[26]=S,t[27]=w,t[28]=E,t[29]=D,t[30]=M):M=t[30],M}function p(e){let t=(0,s.c)(21),{label:n,value:r,onChange:a,onInteractionEnd:o,className:c}=e,f;t[0]===a?f=t[1]:(f=e=>{let t=e.currentTarget.getBoundingClientRect();t.width&&a(u((e.clientX-t.left)/t.width)*360)},t[0]=a,t[1]=f);let{handlers:p,thumbTransition:m}=d(f,o),h;t[2]!==a||t[3]!==r?(h=e=>{if(e.key===`Home`||e.key===`End`){e.preventDefault(),a(e.key===`Home`?0:360);return}if(![`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`].includes(e.key))return;e.preventDefault();let t=e.shiftKey?10:1,n=e.key===`ArrowRight`||e.key===`ArrowUp`?1:-1;a((r+n*t+360)%360)},t[2]=a,t[3]=r,t[4]=h):h=t[4];let g=h,_;t[5]===r?_=t[6]:(_=Math.round(r),t[5]=r,t[6]=_);let v;t[7]===c?v=t[8]:(v=i(`relative flex h-6 cursor-pointer touch-none items-center rounded-full outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-popover`,c),t[7]=c,t[8]=v);let y;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,l.jsx)(`span`,{"aria-hidden":!0,className:`h-2.5 w-full rounded-full bg-[linear-gradient(to_right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)] shadow-[inset_0_0_0_1px_rgb(0_0_0_/_12%)]`}),t[9]=y):y=t[9];let b=`calc(${r/360} * (100% - 1rem) + 0.5rem)`,x=`hsl(${r} 100% 50%)`,S;t[10]!==b||t[11]!==x||t[12]!==m?(S=(0,l.jsx)(`span`,{className:`pointer-events-none absolute top-1/2 size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgb(0_0_0/0.4)]`,style:{left:b,backgroundColor:x,transition:m}}),t[10]=b,t[11]=x,t[12]=m,t[13]=S):S=t[13];let C;return t[14]!==g||t[15]!==p||t[16]!==n||t[17]!==_||t[18]!==v||t[19]!==S?(C=(0,l.jsxs)(`div`,{"aria-label":n,"aria-valuemax":360,"aria-valuemin":0,"aria-valuenow":_,className:v,role:`slider`,tabIndex:0,onKeyDown:g,...p,children:[y,S]}),t[14]=g,t[15]=p,t[16]=n,t[17]=_,t[18]=v,t[19]=S,t[20]=C):C=t[20],C}export{o as i,f as n,a as r,p as t};
2
+ //# sourceMappingURL=color-picker-CRaqqL5F.js.map
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{To as i,Vd as a,gm as o,t as s,uh as c}from"./utils-C5GGWTfe.js";import{a as l,c as u,f as d,h as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x}from"./ComboboxClear-B0HJXjbz.js";import{t as S}from"./input-FUjAUGXY.js";import{t as C}from"./scroll-area-Cf7uLi_s.js";var w=e(t()),T=e(r());function E(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,T.jsx)(h,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var D=w.forwardRef(function(e,t){let{render:n,className:r,style:a,children:o,...s}=e,c=u();return i(`div`,e,{ref:[t,c],props:[{children:o,role:`status`,"aria-live":`polite`,"aria-atomic":!0},s]})}),O=n(),k=w.createContext({chipsRef:null,multiple:!1});function A(e){let t=(0,O.c)(7),n=w.useRef(null),r=!!e.multiple,i;t[0]===r?i=t[1]:(i={chipsRef:n,multiple:r},t[0]=r,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o=(0,T.jsx)(E,{...e}),t[2]=e,t[3]=o);let s;return t[4]!==o||t[5]!==a?(s=(0,T.jsx)(k,{value:a,children:o}),t[4]=o,t[5]=a,t[6]=s):s=t[6],s}function j(e){let t=(0,O.c)(35),n,r,i,o,l,u,d;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4],l=t[5],u=t[6],d=t[7]):({className:n,showTrigger:l,showClear:u,startAddon:o,size:i,unstyled:d,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=l,t[6]=u,t[7]=d);let f=l===void 0||l,m=u!==void 0&&u,h=d!==void 0&&d,g=i??`default`,_;t[8]===o?_=t[9]:(_=o&&(0,T.jsx)(`div`,{"aria-hidden":`true`,className:`[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,"data-slot":`combobox-start-addon`,children:o}),t[8]=o,t[9]=_);let y=o&&`data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]`,b=g===`sm`?`has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-6.5`:`has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-7`,x;t[10]!==n||t[11]!==y||t[12]!==b?(x=s(y,b,n),t[10]=n,t[11]=y,t[12]=b,t[13]=x):x=t[13];let C=h&&`rounded-none bg-transparent text-sm`,w;t[14]===C?w=t[15]:(w=s(`has-disabled:opacity-100`,C),t[14]=C,t[15]=w);let E;t[16]!==g||t[17]!==w||t[18]!==h?(E=(0,T.jsx)(S,{className:w,nativeInput:!0,size:g,unstyled:h}),t[16]=g,t[17]=w,t[18]=h,t[19]=E):E=t[19];let D;t[20]!==r||t[21]!==E||t[22]!==x?(D=(0,T.jsx)(v,{className:x,"data-slot":`combobox-input`,render:E,...r}),t[20]=r,t[21]=E,t[22]=x,t[23]=D):D=t[23];let k;t[24]!==f||t[25]!==g?(k=f&&(0,T.jsx)(N,{className:s(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,g===`sm`?`end-0`:`end-0.5`),children:(0,T.jsx)(p,{"data-slot":`combobox-icon`,children:(0,T.jsx)(a,{})})}),t[24]=f,t[25]=g,t[26]=k):k=t[26];let A;t[27]!==m||t[28]!==g?(A=m&&(0,T.jsx)(z,{className:s(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,g===`sm`?`end-0`:`end-0.5`),children:(0,T.jsx)(c,{})}),t[27]=m,t[28]=g,t[29]=A):A=t[29];let j;return t[30]!==D||t[31]!==k||t[32]!==A||t[33]!==_?(j=(0,T.jsxs)(`div`,{className:`relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64`,children:[_,D,k,A]}),t[30]=D,t[31]=k,t[32]=A,t[33]=_,t[34]=j):j=t[34],j}function M(e){let t=(0,O.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,T.jsx)(o,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1.5 left-0 size-4 shrink-0 text-muted-foreground/55`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,T.jsx)(`div`,{className:`min-w-0 shrink-0 px-3 pt-2.5`,children:(0,T.jsxs)(`div`,{className:`relative -translate-y-px border-b border-border/70 pb-1.5 transition-colors focus-within:border-ring`,children:[n,(0,T.jsx)(j,{...e,className:`[&_input]:h-6.5 [&_input]:ps-5 [&_input]:font-sans [&_input]:leading-6.5`,showTrigger:!1,size:`sm`,unstyled:!0})]})}),t[1]=e,t[2]=r),r}function N(e){let t=(0,O.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a=(0,T.jsx)(d,{className:r,"data-slot":`combobox-trigger`,...i,children:n}),t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function P(e){let t=(0,O.c)(24),n,r,i,a,o,c,u,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],c=t[6],u=t[7],d=t[8]):({className:a,children:i,side:c,sideOffset:u,alignOffset:n,align:d,anchor:r,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=c,t[7]=u,t[8]=d);let f=c===void 0?`bottom`:c,p=u===void 0?4:u,m=d===void 0?`start`:d,{chipsRef:h,multiple:g}=w.use(k),v=r??(g?h:void 0),y;t[9]===a?y=t[10]:(y=s(`dropdown-glass relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-2xl shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] transition-[scale,opacity] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]`,a),t[9]=a,t[10]=y);let x;t[11]!==i||t[12]!==o?(x=(0,T.jsx)(l,{className:`flex min-w-0 max-h-[min(var(--available-height),23rem)] flex-1 flex-col overflow-hidden text-foreground`,"data-slot":`combobox-popup`,...o,children:i}),t[11]=i,t[12]=o,t[13]=x):x=t[13];let S;t[14]!==y||t[15]!==x?(S=(0,T.jsx)(`span`,{className:y,children:x}),t[14]=y,t[15]=x,t[16]=S):S=t[16];let C;return t[17]!==m||t[18]!==n||t[19]!==v||t[20]!==f||t[21]!==p||t[22]!==S?(C=(0,T.jsx)(b,{children:(0,T.jsx)(_,{align:m,alignOffset:n,anchor:v,className:`z-[130] select-none`,"data-slot":`combobox-positioner`,side:f,sideOffset:p,children:S})}),t[17]=m,t[18]=n,t[19]=v,t[20]=f,t[21]=p,t[22]=S,t[23]=C):C=t[23],C}function F(e){let t=(0,O.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,hideIndicator:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=s(`flex min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-pointer items-center rounded-xl px-2 py-1 text-base outline-none not-data-disabled:hover:bg-accent data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-selected:bg-accent data-selected:text-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground [&[data-highlighted][data-selected]]:bg-accent [&[data-highlighted][data-selected]]:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,r),t[5]=r,t[6]=o);let c;t[7]===n?c=t[8]:(c=(0,T.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 [&_svg:not([class*='text-'])]:text-muted-foreground`,"data-slot":`combobox-item-content`,children:n}),t[7]=n,t[8]=c);let l;return t[9]!==i||t[10]!==o||t[11]!==c?(l=(0,T.jsx)(y,{className:o,"data-slot":`combobox-item`,...i,children:c}),t[9]=i,t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function I(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(g,{className:i,"data-slot":`combobox-empty`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function L(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(C,{scrollbarGutter:!0,scrollFade:!0,children:(0,T.jsx)(m,{className:i,"data-slot":`combobox-list`,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function R(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`size-full min-w-0 not-empty:px-1 not-empty:py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(m,{className:i,"data-slot":`combobox-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function z(e){let t=(0,O.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,T.jsx)(x,{className:n,"data-slot":`combobox-clear`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function B(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(D,{className:i,"data-slot":`combobox-status`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var V=f;export{R as a,B as c,E as d,L as i,N as l,I as n,P as o,F as r,M as s,A as t,V as u};
2
- //# sourceMappingURL=combobox-BrCd1kH5.js.map
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Do as i,Kd as a,Sm as o,gh as s,t as c}from"./utils-DjbLtxuo.js";import{a as l,c as u,f as d,h as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x}from"./ComboboxClear-CtNsa8Al.js";import{t as S}from"./input-CQaedaQh.js";import{t as C}from"./scroll-area-Cm9XZdHp.js";var w=e(t()),T=e(r());function E(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,T.jsx)(h,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var D=w.forwardRef(function(e,t){let{render:n,className:r,style:a,children:o,...s}=e,c=u();return i(`div`,e,{ref:[t,c],props:[{children:o,role:`status`,"aria-live":`polite`,"aria-atomic":!0},s]})}),O=n(),k=w.createContext({chipsRef:null,multiple:!1});function A(e){let t=(0,O.c)(7),n=w.useRef(null),r=!!e.multiple,i;t[0]===r?i=t[1]:(i={chipsRef:n,multiple:r},t[0]=r,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o=(0,T.jsx)(E,{...e}),t[2]=e,t[3]=o);let s;return t[4]!==o||t[5]!==a?(s=(0,T.jsx)(k,{value:a,children:o}),t[4]=o,t[5]=a,t[6]=s):s=t[6],s}function j(e){let t=(0,O.c)(35),n,r,i,o,l,u,d;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4],l=t[5],u=t[6],d=t[7]):({className:n,showTrigger:l,showClear:u,startAddon:o,size:i,unstyled:d,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=l,t[6]=u,t[7]=d);let f=l===void 0||l,m=u!==void 0&&u,h=d!==void 0&&d,g=i??`default`,_;t[8]===o?_=t[9]:(_=o&&(0,T.jsx)(`div`,{"aria-hidden":`true`,className:`[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,"data-slot":`combobox-start-addon`,children:o}),t[8]=o,t[9]=_);let y=o&&`data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]`,b=g===`sm`?`has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-6.5`:`has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-7`,x;t[10]!==n||t[11]!==y||t[12]!==b?(x=c(y,b,n),t[10]=n,t[11]=y,t[12]=b,t[13]=x):x=t[13];let C=h&&`rounded-none bg-transparent text-sm`,w;t[14]===C?w=t[15]:(w=c(`has-disabled:opacity-100`,C),t[14]=C,t[15]=w);let E;t[16]!==g||t[17]!==w||t[18]!==h?(E=(0,T.jsx)(S,{className:w,nativeInput:!0,size:g,unstyled:h}),t[16]=g,t[17]=w,t[18]=h,t[19]=E):E=t[19];let D;t[20]!==r||t[21]!==E||t[22]!==x?(D=(0,T.jsx)(v,{className:x,"data-slot":`combobox-input`,render:E,...r}),t[20]=r,t[21]=E,t[22]=x,t[23]=D):D=t[23];let k;t[24]!==f||t[25]!==g?(k=f&&(0,T.jsx)(N,{className:c(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,g===`sm`?`end-0`:`end-0.5`),children:(0,T.jsx)(p,{"data-slot":`combobox-icon`,children:(0,T.jsx)(a,{})})}),t[24]=f,t[25]=g,t[26]=k):k=t[26];let A;t[27]!==m||t[28]!==g?(A=m&&(0,T.jsx)(z,{className:c(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,g===`sm`?`end-0`:`end-0.5`),children:(0,T.jsx)(s,{})}),t[27]=m,t[28]=g,t[29]=A):A=t[29];let j;return t[30]!==D||t[31]!==k||t[32]!==A||t[33]!==_?(j=(0,T.jsxs)(`div`,{className:`relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64`,children:[_,D,k,A]}),t[30]=D,t[31]=k,t[32]=A,t[33]=_,t[34]=j):j=t[34],j}function M(e){let t=(0,O.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,T.jsx)(o,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1.5 left-0 size-4 shrink-0 text-muted-foreground/55`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,T.jsx)(`div`,{className:`min-w-0 shrink-0 px-3 pt-2.5`,children:(0,T.jsxs)(`div`,{className:`relative -translate-y-px border-b border-border/70 pb-1.5 transition-colors focus-within:border-ring`,children:[n,(0,T.jsx)(j,{...e,className:`[&_input]:h-6.5 [&_input]:ps-5 [&_input]:font-sans [&_input]:leading-6.5`,showTrigger:!1,size:`sm`,unstyled:!0})]})}),t[1]=e,t[2]=r),r}function N(e){let t=(0,O.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a=(0,T.jsx)(d,{className:r,"data-slot":`combobox-trigger`,...i,children:n}),t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function P(e){let t=(0,O.c)(24),n,r,i,a,o,s,u,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],u=t[7],d=t[8]):({className:a,children:i,side:s,sideOffset:u,alignOffset:n,align:d,anchor:r,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=u,t[8]=d);let f=s===void 0?`bottom`:s,p=u===void 0?4:u,m=d===void 0?`start`:d,{chipsRef:h,multiple:g}=w.use(k),v=r??(g?h:void 0),y;t[9]===a?y=t[10]:(y=c(`dropdown-glass relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-2xl shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] transition-[scale,opacity] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]`,a),t[9]=a,t[10]=y);let x;t[11]!==i||t[12]!==o?(x=(0,T.jsx)(l,{className:`flex min-w-0 max-h-[min(var(--available-height),23rem)] flex-1 flex-col overflow-hidden text-foreground`,"data-slot":`combobox-popup`,...o,children:i}),t[11]=i,t[12]=o,t[13]=x):x=t[13];let S;t[14]!==y||t[15]!==x?(S=(0,T.jsx)(`span`,{className:y,children:x}),t[14]=y,t[15]=x,t[16]=S):S=t[16];let C;return t[17]!==m||t[18]!==n||t[19]!==v||t[20]!==f||t[21]!==p||t[22]!==S?(C=(0,T.jsx)(b,{children:(0,T.jsx)(_,{align:m,alignOffset:n,anchor:v,className:`z-[130] select-none`,"data-slot":`combobox-positioner`,side:f,sideOffset:p,children:S})}),t[17]=m,t[18]=n,t[19]=v,t[20]=f,t[21]=p,t[22]=S,t[23]=C):C=t[23],C}function F(e){let t=(0,O.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,hideIndicator:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=c(`flex min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-pointer items-center rounded-xl px-2 py-1 text-base outline-none not-data-disabled:hover:bg-accent data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-selected:bg-accent data-selected:text-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground [&[data-highlighted][data-selected]]:bg-accent [&[data-highlighted][data-selected]]:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,r),t[5]=r,t[6]=o);let s;t[7]===n?s=t[8]:(s=(0,T.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 [&_svg:not([class*='text-'])]:text-muted-foreground`,"data-slot":`combobox-item-content`,children:n}),t[7]=n,t[8]=s);let l;return t[9]!==i||t[10]!==o||t[11]!==s?(l=(0,T.jsx)(y,{className:o,"data-slot":`combobox-item`,...i,children:s}),t[9]=i,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}function I(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(g,{className:i,"data-slot":`combobox-empty`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function L(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(C,{scrollbarGutter:!0,scrollFade:!0,children:(0,T.jsx)(m,{className:i,"data-slot":`combobox-list`,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function R(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`size-full min-w-0 not-empty:px-1 not-empty:py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(m,{className:i,"data-slot":`combobox-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function z(e){let t=(0,O.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,T.jsx)(x,{className:n,"data-slot":`combobox-clear`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function B(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(D,{className:i,"data-slot":`combobox-status`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var V=f;export{R as a,B as c,E as d,L as i,N as l,I as n,P as o,F as r,M as s,A as t,V as u};
2
+ //# sourceMappingURL=combobox-5RzytEjd.js.map
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{An as i,Vd as a,fr as o,gm as s,t as c,uh as l}from"./utils-C5GGWTfe.js";import{a as u,f as d,g as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x,u as S}from"./ComboboxClear-B0HJXjbz.js";import{n as C,t as w}from"./ComboboxGroupLabel-CMc5xUrd.js";import{t as ee}from"./input-FUjAUGXY.js";import{t as T}from"./scroll-area-Cf7uLi_s.js";import{n as E,o as D,r as O,s as k,u as A}from"./DialogTitle-pLX9Mw1n.js";import{f as j,u as M}from"./dialog-BpR3dRVS.js";var N=e(t()),P=e(r());function F(e){let{openOnInputClick:t=!1,value:n,defaultValue:r,onValueChange:a,mode:o=`list`,itemToStringValue:s,...c}=e,l=o===`inline`||o===`both`,u=o===`inline`||o===`none`,d=n!==void 0,[p,m]=N.useState(r??``),[g,_]=N.useState(``);N.useEffect(()=>{d&&_(``)},[n,d]);let v;v=l&&g!==``?g:d?n??``:p;let y=f(),b=N.useMemo(()=>c.filter===void 0?y.contains:c.filter,[c.filter,y]),x=String(d?n:p).trim(),S=N.useMemo(()=>o===`both`?b===null?null:(e,t,n)=>b(e,x,n):u?null:b,[b,o,x,u]);function C(e,t){_(``),d||m(e),a?.(e,t)}function w(t,n){e.onItemHighlighted?.(t,n),n.reason!==`pointer`&&_(l?t==null?``:i(t,s):``)}return(0,P.jsx)(h,{...c,itemToStringLabel:s,openOnInputClick:t,selectionMode:`none`,fillInputOnItemPress:!0,filter:S,autoComplete:o,inputValue:v,defaultInputValue:r,onInputValueChange:C,onItemHighlighted:w})}var I=d,L=y,R=n(),z=F;function B(e){let t=(0,R.c)(30),n,r,i,o,s,u;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4],s=t[5],u=t[6]):({className:n,showTrigger:s,showClear:u,startAddon:o,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s,t[6]=u);let d=s!==void 0&&s,f=u!==void 0&&u,m=i??`default`,h;t[7]===o?h=t[8]:(h=o&&(0,P.jsx)(`div`,{"aria-hidden":`true`,className:`[&_svg]:-mx-0.5 pointer-events-none has-[button]:pointer-events-auto absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,"data-slot":`autocomplete-start-addon`,children:o}),t[7]=o,t[8]=h);let g=o&&`data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=autocomplete-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(8)-1px)]`,_=m===`sm`?`has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-6.5`:`has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-7`,y;t[9]!==n||t[10]!==g||t[11]!==_?(y=c(g,_,n),t[9]=n,t[10]=g,t[11]=_,t[12]=y):y=t[12];let b;t[13]===m?b=t[14]:(b=(0,P.jsx)(ee,{nativeInput:!0,size:m}),t[13]=m,t[14]=b);let x;t[15]!==r||t[16]!==y||t[17]!==b?(x=(0,P.jsx)(v,{className:y,"data-slot":`autocomplete-input`,render:b,...r}),t[15]=r,t[16]=y,t[17]=b,t[18]=x):x=t[18];let S;t[19]!==d||t[20]!==m?(S=d&&(0,P.jsx)(Q,{className:c(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-colors pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,m===`sm`?`end-0`:`end-0.5`),children:(0,P.jsx)(p,{"data-slot":`autocomplete-icon`,children:(0,P.jsx)(a,{})})}),t[19]=d,t[20]=m,t[21]=S):S=t[21];let C;t[22]!==f||t[23]!==m?(C=f&&(0,P.jsx)(X,{className:c(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-colors pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,m===`sm`?`end-0`:`end-0.5`),children:(0,P.jsx)(l,{})}),t[22]=f,t[23]=m,t[24]=C):C=t[24];let w;return t[25]!==C||t[26]!==h||t[27]!==x||t[28]!==S?(w=(0,P.jsxs)(`div`,{className:`relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64`,children:[h,x,S,C]}),t[25]=C,t[26]=h,t[27]=x,t[28]=S,t[29]=w):w=t[29],w}function V(e){let t=(0,R.c)(24),n,r,i,a,o,s,l,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],d=t[8]):({className:a,children:i,side:s,sideOffset:l,alignOffset:n,align:d,anchor:r,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=d);let f=s===void 0?`bottom`:s,p=l===void 0?4:l,m=d===void 0?`start`:d,h;t[9]===a?h=t[10]:(h=c(`relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]`,a),t[9]=a,t[10]=h);let g;t[11]!==i||t[12]!==o?(g=(0,P.jsx)(u,{className:`flex max-h-[min(var(--available-height),23rem)] flex-1 flex-col text-foreground`,"data-slot":`autocomplete-popup`,...o,children:i}),t[11]=i,t[12]=o,t[13]=g):g=t[13];let v;t[14]!==h||t[15]!==g?(v=(0,P.jsx)(`span`,{className:h,children:g}),t[14]=h,t[15]=g,t[16]=v):v=t[16];let y;return t[17]!==m||t[18]!==n||t[19]!==r||t[20]!==f||t[21]!==p||t[22]!==v?(y=(0,P.jsx)(b,{children:(0,P.jsx)(_,{align:m,alignOffset:n,anchor:r,className:`z-[130] select-none`,"data-slot":`autocomplete-positioner`,side:f,sideOffset:p,children:v})}),t[17]=m,t[18]=n,t[19]=r,t[20]=f,t[21]=p,t[22]=v,t[23]=y):y=t[23],y}function H(e){let t=(0,R.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=c(`flex min-h-8 cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base outline-none hover:bg-accent data-disabled:pointer-events-none data-selected:bg-accent/50 data-selected:text-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground [&[data-highlighted][data-selected]]:bg-accent [&[data-highlighted][data-selected]]:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='text-'])]:text-muted-foreground`,r),t[4]=r,t[5]=a);let o;return t[6]!==n||t[7]!==i||t[8]!==a?(o=(0,P.jsx)(L,{className:a,"data-slot":`autocomplete-item`,...i,children:n}),t[6]=n,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function U(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`[[role=group]+&]:mt-1.5`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(C,{className:i,"data-slot":`autocomplete-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var W=`px-2 py-1.5 font-medium text-muted-foreground text-xs`;function G(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(W,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(w,{className:i,"data-slot":`autocomplete-group-label`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function K(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(W,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`div`,{className:i,"data-slot":`autocomplete-group-label`,role:`presentation`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function q(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`size-full min-w-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(m,{className:i,"data-slot":`autocomplete-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function J(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(g,{className:i,"data-slot":`autocomplete-empty`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Y(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`not-empty:scroll-py-1 not-empty:p-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(T,{scrollbarGutter:!0,scrollFade:!0,children:(0,P.jsx)(m,{className:i,"data-slot":`autocomplete-list`,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function X(e){let t=(0,R.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`-translate-y-1/2 absolute end-0.5 top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-[color,background-color,box-shadow,opacity] pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,P.jsx)(l,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,P.jsx)(x,{className:i,"data-slot":`autocomplete-clear`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function Z(e){let t=(0,R.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,P.jsx)(S,{"data-slot":`autocomplete-collection`,...n}),t[2]=n,t[3]=r),r}function Q(e){let t=(0,R.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a=(0,P.jsx)(I,{className:r,"data-slot":`autocomplete-trigger`,...i,children:n}),t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var $=O,te=D;function ne(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(M,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(A,{className:i,"data-slot":`command-dialog-backdrop`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function re(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`pointer-events-none fixed inset-0 z-50 flex flex-col items-center px-4 py-[max(--spacing(4),4vh)] sm:py-[10vh]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(E,{className:i,"data-slot":`command-dialog-viewport`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ie(e){let t=(0,R.c)(16),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,onBackdropPointerDown:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===i?o=t[6]:(o=(0,P.jsx)(ne,{onPointerDown:i}),t[5]=i,t[6]=o);let s;t[7]===r?s=t[8]:(s=c(j,`pointer-events-auto max-h-105 max-w-xl text-foreground`,r),t[7]=r,t[8]=s);let l;t[9]!==n||t[10]!==a||t[11]!==s?(l=(0,P.jsx)(re,{children:(0,P.jsx)(k,{className:s,"data-slot":`command-dialog-popup`,...a,children:n})}),t[9]=n,t[10]=a,t[11]=s,t[12]=l):l=t[12];let u;return t[13]!==o||t[14]!==l?(u=(0,P.jsxs)(te,{children:[o,l]}),t[13]=o,t[14]=l,t[15]=u):u=t[15],u}function ae(e){let t=(0,R.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({autoHighlight:r,keepHighlight:i,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=r===void 0?`always`:r,o=i===void 0||i,s;return t[4]!==a||t[5]!==o||t[6]!==n?(s=(0,P.jsx)(z,{autoHighlight:a,inline:!0,keepHighlight:o,open:!0,...n}),t[4]=a,t[5]=o,t[6]=n,t[7]=s):s=t[7],s}function oe(e){let t=(0,R.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,placeholder:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=c(`border-transparent! bg-transparent! shadow-none before:hidden has-focus-visible:ring-0 placeholder:text-placeholder *:data-[slot=autocomplete-input]:ps-9! sm:*:data-[slot=autocomplete-input]:ps-[calc(var(--command-shell-inset)+1.5rem)]!`,n),t[4]=n,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,P.jsx)(s,{className:`translate-x-0.5 text-icon-muted`}),t[6]=o):o=t[6];let l;return t[7]!==r||t[8]!==i||t[9]!==a?(l=(0,P.jsx)(`div`,{className:`px-[var(--command-shell-inset)] py-1.5 [&_[data-slot=autocomplete-start-addon]]:ps-[calc(var(--command-shell-inset)+0.0625rem)]`,children:(0,P.jsx)(B,{autoFocus:!0,className:a,placeholder:r,size:`lg`,startAddon:o,...i})}),t[7]=r,t[8]=i,t[9]=a,t[10]=l):l=t[10],l}function se(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`not-empty:scroll-py-2 not-empty:p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(Y,{className:i,"data-slot":`command-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ce(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`flex max-h-[inherit] flex-col`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(q,{className:i,"data-slot":`command-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function le(e){let t=(0,R.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,P.jsx)(K,{className:n,"data-slot":`command-group-label`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ue(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`relative min-h-0 overflow-hidden rounded-t-xl not-has-[+[data-slot=command-footer]]:rounded-b-2xl bg-transparent **:data-[slot=scroll-area-scrollbar]:mt-2 [touch-action:pan-y]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`div`,{className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function de(e){let t=(0,R.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,P.jsx)(U,{className:n,"data-slot":`command-group`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function fe(e){let t=(0,R.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,P.jsx)(G,{className:n,"data-slot":`command-group-label`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function pe(e){let t=(0,R.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,P.jsx)(Z,{"data-slot":`command-collection`,...n}),t[2]=n,t[3]=r),r}function me(e){let t=(0,R.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,active:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=n!==void 0&&`cursor-pointer hover:bg-transparent hover:text-inherit data-highlighted:bg-transparent data-highlighted:text-inherit data-selected:bg-transparent data-selected:text-inherit [&[data-highlighted][data-selected]]:bg-transparent [&[data-highlighted][data-selected]]:text-inherit`,o=n&&`bg-accent! text-accent-foreground!`,s;t[4]!==r||t[5]!==a||t[6]!==o?(s=c(`py-1.5 data-selected:bg-foreground/[0.06] data-highlighted:bg-foreground/[0.09] data-highlighted:text-foreground [&[data-highlighted][data-selected]]:bg-foreground/[0.09] [&[data-highlighted][data-selected]]:text-foreground`,a,o,r),t[4]=r,t[5]=a,t[6]=o,t[7]=s):s=t[7];let l=n||void 0,u;return t[8]!==i||t[9]!==s||t[10]!==l?(u=(0,P.jsx)(H,{className:s,"data-active":l,"data-slot":`command-item`,...i}),t[8]=i,t[9]=s,t[10]=l,t[11]=u):u=t[11],u}function he(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`ms-auto font-medium font-sans text-secondary-label text-xs tracking-widest`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`kbd`,{className:i,"data-slot":`command-shortcut`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ge(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`relative flex items-center justify-between gap-2 rounded-b-[calc(var(--radius-2xl)-1px)] bg-foreground/[0.025] px-[var(--command-content-inset)] py-2.5 font-medium text-sm text-muted-foreground [&_[data-slot=kbd-group]]:font-sans [&_[data-slot=kbd]]:bg-foreground/[0.08] [&_[data-slot=kbd]]:text-foreground [&_[data-slot=kbd]]:ring-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`div`,{className:i,"data-slot":`command-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _e(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=c(`h-auto px-2 text-xs hover:bg-transparent`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(o,{...r,variant:`ghost-muted`,size:`xs`,className:i}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{J as _,ge as a,Y as b,fe as c,se as d,le as f,z as g,he as h,ie as i,oe as l,ue as m,pe as n,_e as o,ce as p,$ as r,de as s,ae as t,me as u,B as v,V as x,H as y};
2
- //# sourceMappingURL=command-DFkhX6wm.js.map
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Kd as i,Sm as a,gh as o,jn as s,mr as c,t as l}from"./utils-DjbLtxuo.js";import{a as u,f as d,g as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x,u as S}from"./ComboboxClear-CtNsa8Al.js";import{n as C,t as w}from"./ComboboxGroupLabel-vQ7y8c50.js";import{t as ee}from"./input-CQaedaQh.js";import{t as T}from"./scroll-area-Cm9XZdHp.js";import{n as E,o as D,r as O,s as k,u as A}from"./DialogTitle-CFYK6V6-.js";import{f as j,u as M}from"./dialog-DTVhbEqi.js";var N=e(t()),P=e(r());function F(e){let{openOnInputClick:t=!1,value:n,defaultValue:r,onValueChange:i,mode:a=`list`,itemToStringValue:o,...c}=e,l=a===`inline`||a===`both`,u=a===`inline`||a===`none`,d=n!==void 0,[p,m]=N.useState(r??``),[g,_]=N.useState(``);N.useEffect(()=>{d&&_(``)},[n,d]);let v;v=l&&g!==``?g:d?n??``:p;let y=f(),b=N.useMemo(()=>c.filter===void 0?y.contains:c.filter,[c.filter,y]),x=String(d?n:p).trim(),S=N.useMemo(()=>a===`both`?b===null?null:(e,t,n)=>b(e,x,n):u?null:b,[b,a,x,u]);function C(e,t){_(``),d||m(e),i?.(e,t)}function w(t,n){e.onItemHighlighted?.(t,n),n.reason!==`pointer`&&_(l?t==null?``:s(t,o):``)}return(0,P.jsx)(h,{...c,itemToStringLabel:o,openOnInputClick:t,selectionMode:`none`,fillInputOnItemPress:!0,filter:S,autoComplete:a,inputValue:v,defaultInputValue:r,onInputValueChange:C,onItemHighlighted:w})}var I=d,L=y,R=n(),z=F;function B(e){let t=(0,R.c)(30),n,r,a,s,c,u;t[0]===e?(n=t[1],r=t[2],a=t[3],s=t[4],c=t[5],u=t[6]):({className:n,showTrigger:c,showClear:u,startAddon:s,size:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=s,t[5]=c,t[6]=u);let d=c!==void 0&&c,f=u!==void 0&&u,m=a??`default`,h;t[7]===s?h=t[8]:(h=s&&(0,P.jsx)(`div`,{"aria-hidden":`true`,className:`[&_svg]:-mx-0.5 pointer-events-none has-[button]:pointer-events-auto absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,"data-slot":`autocomplete-start-addon`,children:s}),t[7]=s,t[8]=h);let g=s&&`data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=autocomplete-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(8)-1px)]`,_=m===`sm`?`has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-6.5`:`has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-7`,y;t[9]!==n||t[10]!==g||t[11]!==_?(y=l(g,_,n),t[9]=n,t[10]=g,t[11]=_,t[12]=y):y=t[12];let b;t[13]===m?b=t[14]:(b=(0,P.jsx)(ee,{nativeInput:!0,size:m}),t[13]=m,t[14]=b);let x;t[15]!==r||t[16]!==y||t[17]!==b?(x=(0,P.jsx)(v,{className:y,"data-slot":`autocomplete-input`,render:b,...r}),t[15]=r,t[16]=y,t[17]=b,t[18]=x):x=t[18];let S;t[19]!==d||t[20]!==m?(S=d&&(0,P.jsx)(Q,{className:l(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-colors pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,m===`sm`?`end-0`:`end-0.5`),children:(0,P.jsx)(p,{"data-slot":`autocomplete-icon`,children:(0,P.jsx)(i,{})})}),t[19]=d,t[20]=m,t[21]=S):S=t[21];let C;t[22]!==f||t[23]!==m?(C=f&&(0,P.jsx)(X,{className:l(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-colors pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,m===`sm`?`end-0`:`end-0.5`),children:(0,P.jsx)(o,{})}),t[22]=f,t[23]=m,t[24]=C):C=t[24];let w;return t[25]!==C||t[26]!==h||t[27]!==x||t[28]!==S?(w=(0,P.jsxs)(`div`,{className:`relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64`,children:[h,x,S,C]}),t[25]=C,t[26]=h,t[27]=x,t[28]=S,t[29]=w):w=t[29],w}function V(e){let t=(0,R.c)(24),n,r,i,a,o,s,c,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],d=t[8]):({className:a,children:i,side:s,sideOffset:c,alignOffset:n,align:d,anchor:r,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=d);let f=s===void 0?`bottom`:s,p=c===void 0?4:c,m=d===void 0?`start`:d,h;t[9]===a?h=t[10]:(h=l(`relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]`,a),t[9]=a,t[10]=h);let g;t[11]!==i||t[12]!==o?(g=(0,P.jsx)(u,{className:`flex max-h-[min(var(--available-height),23rem)] flex-1 flex-col text-foreground`,"data-slot":`autocomplete-popup`,...o,children:i}),t[11]=i,t[12]=o,t[13]=g):g=t[13];let v;t[14]!==h||t[15]!==g?(v=(0,P.jsx)(`span`,{className:h,children:g}),t[14]=h,t[15]=g,t[16]=v):v=t[16];let y;return t[17]!==m||t[18]!==n||t[19]!==r||t[20]!==f||t[21]!==p||t[22]!==v?(y=(0,P.jsx)(b,{children:(0,P.jsx)(_,{align:m,alignOffset:n,anchor:r,className:`z-[130] select-none`,"data-slot":`autocomplete-positioner`,side:f,sideOffset:p,children:v})}),t[17]=m,t[18]=n,t[19]=r,t[20]=f,t[21]=p,t[22]=v,t[23]=y):y=t[23],y}function H(e){let t=(0,R.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=l(`flex min-h-8 cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base outline-none hover:bg-accent data-disabled:pointer-events-none data-selected:bg-accent/50 data-selected:text-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground [&[data-highlighted][data-selected]]:bg-accent [&[data-highlighted][data-selected]]:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='text-'])]:text-muted-foreground`,r),t[4]=r,t[5]=a);let o;return t[6]!==n||t[7]!==i||t[8]!==a?(o=(0,P.jsx)(L,{className:a,"data-slot":`autocomplete-item`,...i,children:n}),t[6]=n,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function U(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`[[role=group]+&]:mt-1.5`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(C,{className:i,"data-slot":`autocomplete-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var W=`px-2 py-1.5 font-medium text-muted-foreground text-xs`;function G(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(W,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(w,{className:i,"data-slot":`autocomplete-group-label`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function K(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(W,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`div`,{className:i,"data-slot":`autocomplete-group-label`,role:`presentation`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function q(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`size-full min-w-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(m,{className:i,"data-slot":`autocomplete-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function J(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(g,{className:i,"data-slot":`autocomplete-empty`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Y(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`not-empty:scroll-py-1 not-empty:p-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(T,{scrollbarGutter:!0,scrollFade:!0,children:(0,P.jsx)(m,{className:i,"data-slot":`autocomplete-list`,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function X(e){let t=(0,R.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`-translate-y-1/2 absolute end-0.5 top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-[color,background-color,box-shadow,opacity] pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,P.jsx)(o,{}),t[5]=a):a=t[5];let s;return t[6]!==r||t[7]!==i?(s=(0,P.jsx)(x,{className:i,"data-slot":`autocomplete-clear`,...r,children:a}),t[6]=r,t[7]=i,t[8]=s):s=t[8],s}function Z(e){let t=(0,R.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,P.jsx)(S,{"data-slot":`autocomplete-collection`,...n}),t[2]=n,t[3]=r),r}function Q(e){let t=(0,R.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a=(0,P.jsx)(I,{className:r,"data-slot":`autocomplete-trigger`,...i,children:n}),t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var $=O,te=D;function ne(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(M,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(A,{className:i,"data-slot":`command-dialog-backdrop`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function re(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`pointer-events-none fixed inset-0 z-50 flex flex-col items-center px-4 py-[max(--spacing(4),4vh)] sm:py-[10vh]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(E,{className:i,"data-slot":`command-dialog-viewport`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ie(e){let t=(0,R.c)(16),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,onBackdropPointerDown:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===i?o=t[6]:(o=(0,P.jsx)(ne,{onPointerDown:i}),t[5]=i,t[6]=o);let s;t[7]===r?s=t[8]:(s=l(j,`pointer-events-auto max-h-105 max-w-xl text-foreground`,r),t[7]=r,t[8]=s);let c;t[9]!==n||t[10]!==a||t[11]!==s?(c=(0,P.jsx)(re,{children:(0,P.jsx)(k,{className:s,"data-slot":`command-dialog-popup`,...a,children:n})}),t[9]=n,t[10]=a,t[11]=s,t[12]=c):c=t[12];let u;return t[13]!==o||t[14]!==c?(u=(0,P.jsxs)(te,{children:[o,c]}),t[13]=o,t[14]=c,t[15]=u):u=t[15],u}function ae(e){let t=(0,R.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({autoHighlight:r,keepHighlight:i,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=r===void 0?`always`:r,o=i===void 0||i,s;return t[4]!==a||t[5]!==o||t[6]!==n?(s=(0,P.jsx)(z,{autoHighlight:a,inline:!0,keepHighlight:o,open:!0,...n}),t[4]=a,t[5]=o,t[6]=n,t[7]=s):s=t[7],s}function oe(e){let t=(0,R.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,placeholder:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o;t[4]===n?o=t[5]:(o=l(`border-transparent! bg-transparent! shadow-none before:hidden has-focus-visible:ring-0 placeholder:text-placeholder *:data-[slot=autocomplete-input]:ps-9! sm:*:data-[slot=autocomplete-input]:ps-[calc(var(--command-shell-inset)+1.5rem)]!`,n),t[4]=n,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,P.jsx)(a,{className:`translate-x-0.5 text-icon-muted`}),t[6]=s):s=t[6];let c;return t[7]!==r||t[8]!==i||t[9]!==o?(c=(0,P.jsx)(`div`,{className:`px-[var(--command-shell-inset)] py-1.5 [&_[data-slot=autocomplete-start-addon]]:ps-[calc(var(--command-shell-inset)+0.0625rem)]`,children:(0,P.jsx)(B,{autoFocus:!0,className:o,placeholder:r,size:`lg`,startAddon:s,...i})}),t[7]=r,t[8]=i,t[9]=o,t[10]=c):c=t[10],c}function se(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`not-empty:scroll-py-2 not-empty:p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(Y,{className:i,"data-slot":`command-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ce(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`flex max-h-[inherit] flex-col`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(q,{className:i,"data-slot":`command-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function le(e){let t=(0,R.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,P.jsx)(K,{className:n,"data-slot":`command-group-label`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ue(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`relative min-h-0 overflow-hidden rounded-t-xl not-has-[+[data-slot=command-footer]]:rounded-b-2xl bg-transparent **:data-[slot=scroll-area-scrollbar]:mt-2 [touch-action:pan-y]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`div`,{className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function de(e){let t=(0,R.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,P.jsx)(U,{className:n,"data-slot":`command-group`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function fe(e){let t=(0,R.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,P.jsx)(G,{className:n,"data-slot":`command-group-label`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function pe(e){let t=(0,R.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,P.jsx)(Z,{"data-slot":`command-collection`,...n}),t[2]=n,t[3]=r),r}function me(e){let t=(0,R.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,active:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=n!==void 0&&`cursor-pointer hover:bg-transparent hover:text-inherit data-highlighted:bg-transparent data-highlighted:text-inherit data-selected:bg-transparent data-selected:text-inherit [&[data-highlighted][data-selected]]:bg-transparent [&[data-highlighted][data-selected]]:text-inherit`,o=n&&`bg-accent! text-accent-foreground!`,s;t[4]!==r||t[5]!==a||t[6]!==o?(s=l(`py-1.5 data-selected:bg-foreground/[0.06] data-highlighted:bg-foreground/[0.09] data-highlighted:text-foreground [&[data-highlighted][data-selected]]:bg-foreground/[0.09] [&[data-highlighted][data-selected]]:text-foreground`,a,o,r),t[4]=r,t[5]=a,t[6]=o,t[7]=s):s=t[7];let c=n||void 0,u;return t[8]!==i||t[9]!==s||t[10]!==c?(u=(0,P.jsx)(H,{className:s,"data-active":c,"data-slot":`command-item`,...i}),t[8]=i,t[9]=s,t[10]=c,t[11]=u):u=t[11],u}function he(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`ms-auto font-medium font-sans text-secondary-label text-xs tracking-widest`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`kbd`,{className:i,"data-slot":`command-shortcut`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ge(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`relative flex items-center justify-between gap-2 rounded-b-[calc(var(--radius-2xl)-1px)] bg-foreground/[0.025] px-[var(--command-content-inset)] py-2.5 font-medium text-sm text-muted-foreground [&_[data-slot=kbd-group]]:font-sans [&_[data-slot=kbd]]:bg-foreground/[0.08] [&_[data-slot=kbd]]:text-foreground [&_[data-slot=kbd]]:ring-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`div`,{className:i,"data-slot":`command-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _e(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`h-auto px-2 text-xs hover:bg-transparent`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(c,{...r,variant:`ghost-muted`,size:`xs`,className:i}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{J as _,ge as a,Y as b,fe as c,se as d,le as f,z as g,he as h,ie as i,oe as l,ue as m,pe as n,_e as o,ce as p,$ as r,de as s,ae as t,me as u,B as v,V as x,H as y};
2
+ //# sourceMappingURL=command-06bu9QoQ.js.map