decocms 4.76.76 → 4.76.77

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 (235) hide show
  1. package/dist/client/assets/{AlertCircle-BVlB73Gd.js → AlertCircle-BOjfsBF0.js} +1 -1
  2. package/dist/client/assets/{AreaChart-C1SgmDdh.js → AreaChart-Cm1mxrGl.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-BcoNWaDn.js → ArrowUp-C7K1YLks.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-COlnzfbE.js → ArrowUpRight-BgtforoR.js} +1 -1
  5. package/dist/client/assets/{Check-ylcp47jh.js → Check-G0F_u8Bs.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-jaIqf58w.js → CheckCircle-DWRkWgNw.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-DorDM-K-.js → ChevronDown-Dklvfb_j.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-NJ1RHqa7.js → ChevronRight-Bl7k6L7n.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-C85SxyPM.js → ChevronUp-nh84F3SM.js} +1 -1
  10. package/dist/client/assets/{Circle-BGJOKhru.js → Circle-DkvNI_jV.js} +1 -1
  11. package/dist/client/assets/{Copy01-C5M0y3sD.js → Copy01-CySaexEv.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-Ckk9mZsT.js → DotsVertical-CdcblV7p.js} +1 -1
  13. package/dist/client/assets/{Eye-ByzbJOuX.js → Eye-B3zgSnf-.js} +1 -1
  14. package/dist/client/assets/{FilterLines-hGzDxUbQ.js → FilterLines-zCjeVg3J.js} +1 -1
  15. package/dist/client/assets/{Flag01-D6FA8Gqb.js → Flag01-DeTGoOw3.js} +1 -1
  16. package/dist/client/assets/{Globe01-DwjnaG3m.js → Globe01-DaJqvzZX.js} +1 -1
  17. package/dist/client/assets/{Globe04-KMRfe3Ap.js → Globe04-Bhjom9-b.js} +1 -1
  18. package/dist/client/assets/{HardDrive-BLW7r-EP.js → HardDrive-Ds6kKHaa.js} +1 -1
  19. package/dist/client/assets/{Image01-DID7YK1H.js → Image01-Bf6zvxAh.js} +1 -1
  20. package/dist/client/assets/{Key01-BNdv9d9e.js → Key01-DNsdbcfH.js} +1 -1
  21. package/dist/client/assets/{LayoutLeft-DP-M8mno.js → LayoutLeft-DO-n67Hm.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-CJELREUW.js → LinkExternal01-Dzpoty7I.js} +1 -1
  23. package/dist/client/assets/{List-B6zsWjbc.js → List-Bn1Ac2KN.js} +1 -1
  24. package/dist/client/assets/{Monitor01-DGMiqS2G.js → Monitor01-DF6A0cVy.js} +1 -1
  25. package/dist/client/assets/{Package-Cys9wdnk.js → Package-BqBGAhR-.js} +1 -1
  26. package/dist/client/assets/{Palette-CjpYx7Ii.js → Palette-CAc9zvoy.js} +1 -1
  27. package/dist/client/assets/{Play-BIDZ3Qx4.js → Play-DR2wGmeE.js} +1 -1
  28. package/dist/client/assets/{Plus-OGxa0fdn.js → Plus-tTP_UdeD.js} +1 -1
  29. package/dist/client/assets/{SearchLg-BkGBAC6u.js → SearchLg-KVwjsQl5.js} +1 -1
  30. package/dist/client/assets/{SearchMd-DhGVvJ2r.js → SearchMd-B6ZwMmAg.js} +1 -1
  31. package/dist/client/assets/{Settings02-s4dN6VnR.js → Settings02-Be48EyR2.js} +1 -1
  32. package/dist/client/assets/{Shield01-C2gwqyT0.js → Shield01-C85fTgPM.js} +1 -1
  33. package/dist/client/assets/{Star01-CdWOUCGL.js → Star01-BoUaMRQM.js} +1 -1
  34. package/dist/client/assets/{Stars01-Ce7N7beA.js → Stars01-Bx32X1K8.js} +1 -1
  35. package/dist/client/assets/{Stars02-Brbdnmc2.js → Stars02-C_1z8ZZv.js} +1 -1
  36. package/dist/client/assets/{Sun-DrhefHVP.js → Sun-DZ5eLQ9M.js} +1 -1
  37. package/dist/client/assets/{SwitchHorizontal01-CQC-VHSM.js → SwitchHorizontal01-DgZGh7W9.js} +1 -1
  38. package/dist/client/assets/{Tool01-CQ5Yi4Y5.js → Tool01-CFRCagXC.js} +1 -1
  39. package/dist/client/assets/{Tool02-B5mtXP4w.js → Tool02-BXOnFYfP.js} +1 -1
  40. package/dist/client/assets/{Trash01-9Yhy1NDp.js → Trash01-BK9bN1g9.js} +1 -1
  41. package/dist/client/assets/{TrendUp01-CUYb4fKq.js → TrendUp01-bXobHjjQ.js} +1 -1
  42. package/dist/client/assets/{Upload01-BGaIkl8C.js → Upload01-BRYn0JzU.js} +1 -1
  43. package/dist/client/assets/{User01-DY8EdPzH.js → User01-BPv-NsEb.js} +1 -1
  44. package/dist/client/assets/{UserPlus01-ByXfLuOW.js → UserPlus01-DGEEuaug.js} +1 -1
  45. package/dist/client/assets/{Users01-DnUyZ4sc.js → Users01-DsK3My_q.js} +1 -1
  46. package/dist/client/assets/{Users03-DQHSM-ip.js → Users03-BvRjNSg2.js} +1 -1
  47. package/dist/client/assets/{X-8dZUy9dd.js → X-ixAJccZt.js} +1 -1
  48. package/dist/client/assets/{XCircle-DY5ehXOb.js → XCircle-DsWgRsJq.js} +1 -1
  49. package/dist/client/assets/{XClose-IT2oT79e.js → XClose-CjUdxCxb.js} +1 -1
  50. package/dist/client/assets/{Zap-UNZ6wjOU.js → Zap-CH80sMR9.js} +1 -1
  51. package/dist/client/assets/{ZapSquare-CIT8HcpR.js → ZapSquare-DTHIppNH.js} +1 -1
  52. package/dist/client/assets/{ZoomOut-DoDMe5dD.js → ZoomOut-B-oRMoEs.js} +1 -1
  53. package/dist/client/assets/{access-gate-BjqlcKiO.js → access-gate-DWSQg9oj.js} +1 -1
  54. package/dist/client/assets/{add-section-modal-C8E813YY.js → add-section-modal-C6HQ_CI3.js} +1 -1
  55. package/dist/client/assets/{agent-icon-DCK7PpQ3.js → agent-icon-BzJUdPiS.js} +1 -1
  56. package/dist/client/assets/{agents-list-Bwjyc61n.js → agents-list-DI9jAQKL.js} +1 -1
  57. package/dist/client/assets/{ai-providers-peEIA4y0.js → ai-providers-nWRl6cCp.js} +1 -1
  58. package/dist/client/assets/{alert-CMPxdRHq.js → alert-1SVRAmaW.js} +1 -1
  59. package/dist/client/assets/{alert-dialog-iGippWYX.js → alert-dialog-CsK5Fy3G.js} +1 -1
  60. package/dist/client/assets/{app-editor-CuUlGlJd.js → app-editor-vSCIndI4.js} +1 -1
  61. package/dist/client/assets/{auth-BBryGktV.js → auth-9nVkbaZd.js} +1 -1
  62. package/dist/client/assets/{auth-catchall-CVb1uch8.js → auth-catchall-C0wVp9LW.js} +1 -1
  63. package/dist/client/assets/{auth-entry-C6Y1Coh9.js → auth-entry-DQF53gGg.js} +1 -1
  64. package/dist/client/assets/{auth-split-layout-C7bMt_tF.js → auth-split-layout-C2g4OR69.js} +1 -1
  65. package/dist/client/assets/{authenticate-and-persist-oauth-BVhm4ZHQ.js → authenticate-and-persist-oauth-C3t87EAj.js} +1 -1
  66. package/dist/client/assets/{automation-list-row-CW2Mr4ne.js → automation-list-row-D88048LW.js} +1 -1
  67. package/dist/client/assets/{automation-runs-DtF_plhA.js → automation-runs-Crbs7GQx.js} +1 -1
  68. package/dist/client/assets/automations-CphS5WIy.js +1 -0
  69. package/dist/client/assets/{autosend-YOQ-CO-z.js → autosend-D00jlKCX.js} +1 -1
  70. package/dist/client/assets/{avatar-6ZpKSJQ1.js → avatar-qb3xnlcx.js} +1 -1
  71. package/dist/client/assets/{badge-Brm7dRFm.js → badge-CbP9K2Qf.js} +1 -1
  72. package/dist/client/assets/{block-document-BE7E93rt.js → block-document-CFXV-AcB.js} +1 -1
  73. package/dist/client/assets/{brand-context-CMCsnbCM.js → brand-context-jHuTIhlL.js} +1 -1
  74. package/dist/client/assets/{buckets-sTBT-mWR.js → buckets-GN4Lutnq.js} +1 -1
  75. package/dist/client/assets/{bulk-category-panel-CnXvOLen.js → bulk-category-panel-C3ir644A.js} +1 -1
  76. package/dist/client/assets/{calendar-C8mrI2UH.js → calendar-DdSK5WB3.js} +1 -1
  77. package/dist/client/assets/{capability-load-error-u8-vFMPG.js → capability-load-error-e_UwVlzK.js} +1 -1
  78. package/dist/client/assets/{card-DmJEBNvh.js → card-BUiCTEhj.js} +1 -1
  79. package/dist/client/assets/{category-editor-BS7auS6b.js → category-editor-D-Irtnlz.js} +1 -1
  80. package/dist/client/assets/{chat-context-DeX0VT17.js → chat-context-ZCcA6IYU.js} +1 -1
  81. package/dist/client/assets/{checkbox-YjFOYgvp.js → checkbox-DmLBBGuQ.js} +1 -1
  82. package/dist/client/assets/{cli-auth-success-CYFaZSY8.js → cli-auth-success-D6Laugig.js} +1 -1
  83. package/dist/client/assets/{collection-detail-DM2ekT5E.js → collection-detail-mmNkvfAo.js} +1 -1
  84. package/dist/client/assets/{collection-display-button-B5vJJ8M2.js → collection-display-button-C5YR_iYM.js} +1 -1
  85. package/dist/client/assets/{collection-search-BebQySxJ.js → collection-search-Dn5IKvmR.js} +1 -1
  86. package/dist/client/assets/{collection-table-wrapper-D1lST78v.js → collection-table-wrapper-l1A732CI.js} +1 -1
  87. package/dist/client/assets/{collection-tabs-DhPjZGgE.js → collection-tabs-eIy28e5k.js} +1 -1
  88. package/dist/client/assets/{command-DgNLNLpt.js → command-MWcxJ-fg.js} +1 -1
  89. package/dist/client/assets/{commerce-onboarding-Di2Fzvlr.js → commerce-onboarding-DQ3fzQk-.js} +1 -1
  90. package/dist/client/assets/{companions-core-BXSVQzy2.js → companions-core-D0u84jOR.js} +1 -1
  91. package/dist/client/assets/{connect-desktop-dialog-BFe8wpxN.js → connect-desktop-dialog-CBgL0NB-.js} +1 -1
  92. package/dist/client/assets/{connection-card-B0Odymge.js → connection-card-RbNDFwrC.js} +1 -1
  93. package/dist/client/assets/{connection-detail-B00fRni_.js → connection-detail-ywlB13Xi.js} +1 -1
  94. package/dist/client/assets/{connection-form-helpers-Cfzc9ntz.js → connection-form-helpers-BVJD93en.js} +1 -1
  95. package/dist/client/assets/{connections-CDGkbkgV.js → connections-CKX0JP-R.js} +1 -1
  96. package/dist/client/assets/{decopilot-sse-pool-DpwU6Fnw.js → decopilot-sse-pool-BkT6q_ZN.js} +1 -1
  97. package/dist/client/assets/{dialog-C6_0qLBU.js → dialog-CXSGGmH2.js} +1 -1
  98. package/dist/client/assets/{domain-settings-Bhf5R19l.js → domain-settings-C7K4S9Xa.js} +1 -1
  99. package/dist/client/assets/{drawer-BtRJAb0M.js → drawer-0CUwOTGM.js} +1 -1
  100. package/dist/client/assets/{dropdown-menu-96rpJkjm.js → dropdown-menu-DXrRvc-i.js} +1 -1
  101. package/dist/client/assets/{empty-state-jjn-bhGa.js → empty-state-Dg6IPABi.js} +1 -1
  102. package/dist/client/assets/{extract-connection-data-BKfZXo3n.js → extract-connection-data-Bc9EJMAu.js} +1 -1
  103. package/dist/client/assets/{file-explorer-CeKeprFE.js → file-explorer-DO30VFqW.js} +1 -1
  104. package/dist/client/assets/{file-type-icon-cPIVgg9x.js → file-type-icon-C9qt39n2.js} +1 -1
  105. package/dist/client/assets/{files-Bn3ru1FT.js → files-n0DeCSZA.js} +1 -1
  106. package/dist/client/assets/{form-BLqlEubb.js → form-BJNunTSt.js} +1 -1
  107. package/dist/client/assets/{general-CKz0uKhP.js → general-Bfzyz03R.js} +1 -1
  108. package/dist/client/assets/{github-repo-picker-CiS_eOYq.js → github-repo-picker-C_AcGGUu.js} +1 -1
  109. package/dist/client/assets/{hooks-B5swj9vo.js → hooks-CoNthXh6.js} +1 -1
  110. package/dist/client/assets/{index-BUWOf6-H.js → index-2zrh5v4q.js} +3 -3
  111. package/dist/client/assets/{index-CM-AY9Fy.js → index-BKoG2KsK.js} +1 -1
  112. package/dist/client/assets/{index-BdUl5bJN.js → index-CiX7itoV.js} +1 -1
  113. package/dist/client/assets/{index-Qvw8OnY1.js → index-D25E0vRj.js} +1 -1
  114. package/dist/client/assets/{index-C9TMdwOy.js → index-DE5D869p.js} +1 -1
  115. package/dist/client/assets/{index-C_fgqMB7.js → index-DXHOyim_.js} +2 -2
  116. package/dist/client/assets/{index-CWxmaANj.js → index-DeIJS0Ka.js} +1 -1
  117. package/dist/client/assets/{index-CqkHhPgZ.js → index-Djl2oe8w.js} +1 -1
  118. package/dist/client/assets/{index-Bb3luPLV.js → index-DlRPH55i.js} +1 -1
  119. package/dist/client/assets/{index-BYdleGn4.js → index-Dr9L6WbN.js} +1 -1
  120. package/dist/client/assets/{index-Dliz359x.js → index-OegfMESD.js} +1 -1
  121. package/dist/client/assets/{index-DPSWF_0V.js → index-bIYBdyqw.js} +1 -1
  122. package/dist/client/assets/{index-_AfOMAmM.js → index-keKlSjN0.js} +1 -1
  123. package/dist/client/assets/{index-redirect-CmPVrw8O.js → index-redirect-oqVdHwCA.js} +1 -1
  124. package/dist/client/assets/{index-gNz_kq5D.js → index-uRKPcatu.js} +28 -28
  125. package/dist/client/assets/{input-C2XNQcRH.js → input-szG-lwZi.js} +1 -1
  126. package/dist/client/assets/{integration-icon-IezBYdjm.js → integration-icon-D8vCtGKi.js} +1 -1
  127. package/dist/client/assets/{invite-member-dialog-DdEYWFzF.js → invite-member-dialog--nmkwaUC.js} +1 -1
  128. package/dist/client/assets/{label-CK1XiDPB.js → label-D_cPa32z.js} +1 -1
  129. package/dist/client/assets/{layout-DdW7yJtW.js → layout-C0WKuSjv.js} +1 -1
  130. package/dist/client/assets/{login-dKsCPJDm.js → login-CUxMxmwj.js} +1 -1
  131. package/dist/client/assets/{mcp-oauth-BtnOcT8N.js → mcp-oauth-ooCkC9eU.js} +1 -1
  132. package/dist/client/assets/{members-OHD_cH5V.js → members-BuHBcecc.js} +1 -1
  133. package/dist/client/assets/{monaco-editor-45RX9-wa.js → monaco-editor-hhG9oALw.js} +1 -1
  134. package/dist/client/assets/{monitoring-stats-row-Pf0PyiYb.js → monitoring-stats-row-Cke2rM4d.js} +1 -1
  135. package/dist/client/assets/{multi-select-B1IegP8Y.js → multi-select-CUjLHupH.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-NJnfVzCp.js → oauth-callback--cixWXog.js} +1 -1
  137. package/dist/client/assets/{oauth-callback-ai-provider-CTrqu6Je.js → oauth-callback-ai-provider-CFiUNXeE.js} +1 -1
  138. package/dist/client/assets/{onboarding-VNgiRiDL.js → onboarding-DznPIBwL.js} +1 -1
  139. package/dist/client/assets/{org-install-DH3udQUZ.js → org-install-Drf5-QBJ.js} +1 -1
  140. package/dist/client/assets/{org-layout-BwVt-wlI.js → org-layout-BVGjx3wZ.js} +1 -1
  141. package/dist/client/assets/{organization-choice-CA519nnl.js → organization-choice-ouNuJUrG.js} +1 -1
  142. package/dist/client/assets/{orgs-CyzbToZq.js → orgs-kQe3eruu.js} +1 -1
  143. package/dist/client/assets/{page-seo-form-txb12Kn3.js → page-seo-form-CSWLC6Kj.js} +1 -1
  144. package/dist/client/assets/page-seo-sheet-GEEfvMP9.js +1 -0
  145. package/dist/client/assets/{popover-B2zk9niv.js → popover-Dj2H4Cfu.js} +1 -1
  146. package/dist/client/assets/{post-editor-DrrNmiiH.js → post-editor-CG1MMi8Q.js} +1 -1
  147. package/dist/client/assets/{primitives-DlChEJzy.js → primitives-BjzUPYeP.js} +1 -1
  148. package/dist/client/assets/{profile-Ds0StJLd.js → profile-DfqTN4eM.js} +1 -1
  149. package/dist/client/assets/project-app-view-CS8D2unO.js +1 -0
  150. package/dist/client/assets/record-editor-Nfzrvny-.js +1 -0
  151. package/dist/client/assets/redirect-editor-7Fx6x1vi.js +1 -0
  152. package/dist/client/assets/registry-BMV_7O0A.js +2 -0
  153. package/dist/client/assets/{registry-layout-Dalyr-dX.js → registry-layout-D50D5nV7.js} +1 -1
  154. package/dist/client/assets/{reports-zmHYxym4.js → reports-DR_Om2Q7.js} +1 -1
  155. package/dist/client/assets/{require-capability-qkGmH7NG.js → require-capability-BynCY9-h.js} +1 -1
  156. package/dist/client/assets/{required-auth-layout-DJSVKequ.js → required-auth-layout-Eq0Mq8pL.js} +1 -1
  157. package/dist/client/assets/{reset-password-BQvQW_Yc.js → reset-password-DvUquWik.js} +1 -1
  158. package/dist/client/assets/{roles-BO1zYp8H.js → roles-9NKxC4MN.js} +1 -1
  159. package/dist/client/assets/{search-input-DoQewDAM.js → search-input-TnQv-9eX.js} +1 -1
  160. package/dist/client/assets/{secrets-CwEm2qB4.js → secrets-DsA8qdp2.js} +1 -1
  161. package/dist/client/assets/{sections-editor-CeZVcic7.js → sections-editor-BrwVJDNO.js} +1 -1
  162. package/dist/client/assets/{select-BVg_AKhS.js → select-DV4XrWOt.js} +1 -1
  163. package/dist/client/assets/{select-model-w8ZEBOqQ.js → select-model-BKFYAJdB.js} +1 -1
  164. package/dist/client/assets/{self-tool-result-8XOi1iaO.js → self-tool-result-BJ7QtZ0K.js} +1 -1
  165. package/dist/client/assets/{seo-editor-Ctu5yT8I.js → seo-editor-smx__BaR.js} +1 -1
  166. package/dist/client/assets/{settings-layout-Dpo54nzI.js → settings-layout-Bh5NScfT.js} +1 -1
  167. package/dist/client/assets/{settings-section-Cd7MHbmE.js → settings-section-ui7p-DEy.js} +1 -1
  168. package/dist/client/assets/{shell-controls-IB_xzFFr.js → shell-controls-CNcarVKp.js} +1 -1
  169. package/dist/client/assets/{shell-layout-BDvpeGAX.js → shell-layout-CfvZ0fDo.js} +1 -1
  170. package/dist/client/assets/{sidebar-Bg21lFNS.js → sidebar-D9bnVPLR.js} +1 -1
  171. package/dist/client/assets/{skeleton-JjNP43lD.js → skeleton-Cd-S2HeR.js} +1 -1
  172. package/dist/client/assets/{sso-C_5vX52P.js → sso-BaEhLott.js} +1 -1
  173. package/dist/client/assets/{store-DDBShmzT.js → store-BinzkdtH.js} +1 -1
  174. package/dist/client/assets/store-registry-_CTv732-.js +2 -0
  175. package/dist/client/assets/{studio-tools-JGMjsS9V.js → studio-tools-Y8y5OadJ.js} +1 -1
  176. package/dist/client/assets/{switch-Dbe5CgqQ.js → switch-C4nwCCCe.js} +1 -1
  177. package/dist/client/assets/{table-kChvW90I.js → table-DcCuZpg0.js} +1 -1
  178. package/dist/client/assets/{tabs-D6exMqkv.js → tabs-DWvOQAMd.js} +1 -1
  179. package/dist/client/assets/{textarea-C-upgcvq.js → textarea-CfAMDlYi.js} +1 -1
  180. package/dist/client/assets/{toggle-group-CSfYzN1e.js → toggle-group-DxIjTwL-.js} +1 -1
  181. package/dist/client/assets/{toolbar-CdhDSP7U.js → toolbar-DuhSTY3W.js} +1 -1
  182. package/dist/client/assets/{toolbar-icon-button--2c5nPA5.js → toolbar-icon-button-BdL7a57M.js} +1 -1
  183. package/dist/client/assets/{tooltip-cXMPTvhQ.js → tooltip-SR8VERcH.js} +1 -1
  184. package/dist/client/assets/{use-ai-providers-cFLtai6A.js → use-ai-providers-BeDORmMd.js} +1 -1
  185. package/dist/client/assets/{use-automations-ljR2TnPA.js → use-automations-ES0gn_cV.js} +1 -1
  186. package/dist/client/assets/{use-autosave-hI5b40ec.js → use-autosave-BNFWFevu.js} +1 -1
  187. package/dist/client/assets/{use-capability-BI2Ao-_m.js → use-capability-CUVgBn-w.js} +1 -1
  188. package/dist/client/assets/{use-clock-tick-BJ7X5vRI.js → use-clock-tick-QY1_clmR.js} +1 -1
  189. package/dist/client/assets/{use-collections-7ERyEkIU.js → use-collections-BpCD42c-.js} +1 -1
  190. package/dist/client/assets/{use-connection-CD2Fnptb.js → use-connection-BDf5JCk0.js} +1 -1
  191. package/dist/client/assets/{use-copy-BhzNp8tf.js → use-copy-Dr05c3St.js} +1 -1
  192. package/dist/client/assets/{use-create-virtual-mcp-C-AFRt9S.js → use-create-virtual-mcp-CkWKAk-9.js} +1 -1
  193. package/dist/client/assets/{use-debounced-autosave-CZ0xTx2w.js → use-debounced-autosave-Bg6kPddl.js} +1 -1
  194. package/dist/client/assets/{use-debounced-value-B52whIH7.js → use-debounced-value-lYoqfMQ9.js} +1 -1
  195. package/dist/client/assets/{use-deco-credits-Cfgq3ZjW.js → use-deco-credits-BNjohkTx.js} +1 -1
  196. package/dist/client/assets/{use-decopilot-events-BNjf3dpu.js → use-decopilot-events-B1lmrW6a.js} +1 -1
  197. package/dist/client/assets/{use-delete-connection-zsTP85HZ.js → use-delete-connection-DI59B_It.js} +1 -1
  198. package/dist/client/assets/{use-deployment-admin-C6GJURpg.js → use-deployment-admin-DT7ePT-K.js} +1 -1
  199. package/dist/client/assets/{use-file-configs-1u4ZUq9F.js → use-file-configs-BxbYtDOg.js} +1 -1
  200. package/dist/client/assets/{use-infinite-scroll-DiSaAQPl.js → use-infinite-scroll-CGaTfOyC.js} +1 -1
  201. package/dist/client/assets/{use-join-requests-U5r9xSzr.js → use-join-requests-BzPflAt5.js} +1 -1
  202. package/dist/client/assets/{use-mcp-auth-status-dq4wRd85.js → use-mcp-auth-status-CvcbOgu8.js} +1 -1
  203. package/dist/client/assets/{use-mcp-client-qnk43eG1.js → use-mcp-client-B9NPxBrU.js} +1 -1
  204. package/dist/client/assets/{use-mcp-tools-SncKc9ct.js → use-mcp-tools-BCQu9ktT.js} +1 -1
  205. package/dist/client/assets/{use-members-Dey3M7mC.js → use-members-C_A2VI7N.js} +1 -1
  206. package/dist/client/assets/{use-mobile-oSorlQMv.js → use-mobile-RtBQr8Gf.js} +1 -1
  207. package/dist/client/assets/{use-navigate-to-agent-7gJqLFkE.js → use-navigate-to-agent-CScCdIke.js} +1 -1
  208. package/dist/client/assets/{use-org-auth-client-aAeyG-Cs.js → use-org-auth-client-Cimp8Wf1.js} +1 -1
  209. package/dist/client/assets/{use-org-sso-De26T__u.js → use-org-sso-BFAqZIbB.js} +1 -1
  210. package/dist/client/assets/{use-organization-roles-DNlG9eUj.js → use-organization-roles-Ctc5_Zz0.js} +1 -1
  211. package/dist/client/assets/{use-organization-settings-DrhRsJWG.js → use-organization-settings-C_QqqhIc.js} +1 -1
  212. package/dist/client/assets/{use-registry-connections-CmItta1b.js → use-registry-connections-CBA4SGMN.js} +1 -1
  213. package/dist/client/assets/{use-secrets-DDzz0qxd.js → use-secrets-Cg783540.js} +1 -1
  214. package/dist/client/assets/{use-status-sounds-4kB8txsU.js → use-status-sounds-C8WUkNh9.js} +1 -1
  215. package/dist/client/assets/{use-view-mode-CtgJ6di_.js → use-view-mode-4-X5h05L.js} +1 -1
  216. package/dist/client/assets/{use-virtual-mcp-BJxeG1T-.js → use-virtual-mcp-BSnkPfsL.js} +1 -1
  217. package/dist/client/assets/useInfiniteQuery-CrGOZ848.js +1 -0
  218. package/dist/client/assets/{useRouterState-DRz1wrvb.js → useRouterState-BgwVlThW.js} +1 -1
  219. package/dist/client/assets/useSuspenseInfiniteQuery-CWHb2aME.js +1 -0
  220. package/dist/client/assets/{users-CUTUKT6m.js → users-Cx0nG_bS.js} +1 -1
  221. package/dist/client/assets/{variant-calendar-HHl2ENnf.js → variant-calendar-DgivdW7z.js} +1 -1
  222. package/dist/client/assets/{view-mode-toggle-DqoxH_gE.js → view-mode-toggle-BrMgwy8k.js} +1 -1
  223. package/dist/client/index.html +1 -1
  224. package/dist/server/cli.js +1 -1
  225. package/dist/server/server.js +1 -1
  226. package/package.json +1 -1
  227. package/dist/client/assets/automations-TF-uE_JU.js +0 -1
  228. package/dist/client/assets/page-seo-sheet-B7-vAcY0.js +0 -1
  229. package/dist/client/assets/project-app-view-Dtfecj3R.js +0 -1
  230. package/dist/client/assets/record-editor-5g7SCJ1d.js +0 -1
  231. package/dist/client/assets/redirect-editor-BVp57v49.js +0 -1
  232. package/dist/client/assets/registry-ddiHAuZI.js +0 -2
  233. package/dist/client/assets/store-registry-D43DIoAy.js +0 -2
  234. package/dist/client/assets/useInfiniteQuery-C6UXsGIP.js +0 -1
  235. package/dist/client/assets/useSuspenseInfiniteQuery-Cn5B2KcA.js +0 -1
@@ -1 +1 @@
1
- import{c as X,C as H,n as U,r as W,K as J,m as ee,d as Z,p as te,t as p,j as i,B as $}from"./index-BUWOf6-H.js";import{u as ie}from"./studio-tools-JGMjsS9V.js";import{b as se,S as ne,a as oe}from"./settings-section-Cd7MHbmE.js";import{B as Q}from"./badge-Brm7dRFm.js";import{I as ae}from"./input-C2XNQcRH.js";import{S as re,a as le,b as ce,c as de,d as me}from"./select-BVg_AKhS.js";const ue={off:"Off",auto:"Auto-join",request:"Require approval"};function fe(e,t){switch(e){case"auto":return`Anyone with a verified @${t} email joins automatically.`;case"request":return`People with a verified @${t} email can request to join; an admin approves.`;default:return"Not discoverable — no one can find or join through this domain."}}function be(){const e=X.c(69),{org:t}=H(),u=U(),s=ie(),[l,x]=W.useState("");let r;e[0]!==t.id?(r=J.organizationDomains(t.id),e[0]=t.id,e[1]=r):r=e[1];let c;e[2]!==s?(c=()=>s.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==r||e[5]!==c?(d={queryKey:r,queryFn:c},e[4]=r,e[5]=c,e[6]=d):d=e[6];const{data:f,isPending:j}=ee(d);let m;e[7]!==t.id||e[8]!==u?(m=()=>u.invalidateQueries({queryKey:J.organizationDomains(t.id)}),e[7]=t.id,e[8]=u,e[9]=m):m=e[9];const n=m;let N;e[10]!==s?(N=o=>s.call("ORGANIZATION_DOMAIN_ADD",{domain:o}),e[10]=s,e[11]=N):N=e[11];let v;e[12]!==n||e[13]!==t.id?(v=()=>{te("organization_domain_added",{organization_id:t.id}),x(""),n(),p.success("Domain added")},e[12]=n,e[13]=t.id,e[14]=v):v=e[14];let R;e[15]!==N||e[16]!==v?(R={mutationFn:N,onSuccess:v,onError:je},e[15]=N,e[16]=v,e[17]=R):R=e[17];const h=Z(R);let S;e[18]!==s?(S=o=>{const{id:a,joinMode:g}=o;return s.call("ORGANIZATION_DOMAIN_UPDATE",{id:a,joinMode:g})},e[18]=s,e[19]=S):S=e[19];let y;e[20]!==n?(y=()=>{n(),p.success("Join mode updated")},e[20]=n,e[21]=y):y=e[21];let V;e[22]!==S||e[23]!==y?(V={mutationFn:S,onSuccess:y,onError:ge},e[22]=S,e[23]=y,e[24]=V):V=e[24];const P=Z(V);let _;e[25]!==s?(_=o=>s.call("ORGANIZATION_DOMAIN_VERIFY",{id:o}),e[25]=s,e[26]=_):_=e[26];let A;e[27]!==n?(A=o=>{n(),o.verified?p.success("Domain verified"):p.error("TXT record not found yet — DNS can take a few minutes.")},e[27]=n,e[28]=A):A=e[28];let k;e[29]!==_||e[30]!==A?(k={mutationFn:_,onSuccess:A,onError:he},e[29]=_,e[30]=A,e[31]=k):k=e[31];const D=Z(k);let I;e[32]!==s?(I=o=>s.call("ORGANIZATION_DOMAIN_REMOVE",{id:o}),e[32]=s,e[33]=I):I=e[33];let b;e[34]!==n?(b=()=>{n(),p.success("Domain removed")},e[34]=n,e[35]=b):b=e[35];let q;e[36]!==I||e[37]!==b?(q={mutationFn:I,onSuccess:b,onError:xe},e[36]=I,e[37]=b,e[38]=q):q=e[38];const E=Z(q);if(j)return null;let z;e[39]!==f?.domains?(z=f?.domains??[],e[39]=f?.domains,e[40]=z):z=e[40];const K=z;let O;if(e[41]!==K||e[42]!==E||e[43]!==P||e[44]!==D){let o;e[46]!==E||e[47]!==P||e[48]!==D?(o=a=>{const g=a.verificationStatus==="verified";return i.jsx(se,{title:i.jsxs("span",{className:"flex items-center gap-2",children:[a.domain,g?i.jsx(Q,{variant:"secondary",children:"Verified"}):i.jsx(Q,{variant:"outline",children:"Pending"})]}),description:g?fe(a.joinMode,a.domain):"Add the DNS record below, then verify.",action:i.jsxs("div",{className:"flex items-center gap-2",children:[g&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-xs text-muted-foreground",children:"Join mode"}),i.jsxs(re,{value:a.joinMode,onValueChange:Y=>P.mutate({id:a.id,joinMode:Y}),children:[i.jsx(le,{className:"w-44",size:"sm",children:i.jsx(ce,{})}),i.jsx(de,{children:["off","auto","request"].map(pe)})]})]}),!g&&i.jsx($,{size:"sm",variant:"outline",onClick:()=>D.mutate(a.id),disabled:D.isPending,children:"Verify"}),i.jsx($,{size:"sm",variant:"ghost",onClick:()=>E.mutate(a.id),disabled:E.isPending,children:"Remove"})]}),children:!g&&a.recordName&&a.recordValue&&i.jsx(Ne,{recordName:a.recordName,recordValue:a.recordValue})},a.id)},e[46]=E,e[47]=P,e[48]=D,e[49]=o):o=e[49],O=K.map(o),e[41]=K,e[42]=E,e[43]=P,e[44]=D,e[45]=O}else O=e[45];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=o=>x(o.target.value),e[50]=B):B=e[50];let M;e[51]!==l?(M=i.jsx(ae,{value:l,onChange:B,placeholder:"acme.com",className:"max-w-xs"}),e[51]=l,e[52]=M):M=e[52];let T;e[53]!==h||e[54]!==l?(T=()=>h.mutate(l.trim()),e[53]=h,e[54]=l,e[55]=T):T=e[55];let C;e[56]!==h.isPending||e[57]!==l?(C=!l.trim()||h.isPending,e[56]=h.isPending,e[57]=l,e[58]=C):C=e[58];const L=h.isPending?"Adding…":"Add domain";let w;e[59]!==T||e[60]!==C||e[61]!==L?(w=i.jsx($,{size:"sm",onClick:T,disabled:C,children:L}),e[59]=T,e[60]=C,e[61]=L,e[62]=w):w=e[62];let F;e[63]!==M||e[64]!==w?(F=i.jsxs("div",{className:"flex items-center gap-2 p-4",children:[M,w]}),e[63]=M,e[64]=w,e[65]=F):F=e[65];let G;return e[66]!==O||e[67]!==F?(G=i.jsx(ne,{title:"Email domains",description:"Let people with a matching email domain discover and join this organization.",children:i.jsxs(oe,{children:[O,F]})}),e[66]=O,e[67]=F,e[68]=G):G=e[68],G}function pe(e){return i.jsx(me,{value:e,children:ue[e]},e)}function xe(e){return p.error(e instanceof Error?e.message:"Failed to remove")}function he(e){return p.error(e instanceof Error?e.message:"Failed to verify")}function ge(e){return p.error(e instanceof Error?e.message:"Failed to update")}function je(e){return p.error(e instanceof Error?e.message:"Failed to add domain")}function Ne(e){const t=X.c(16),{recordName:u,recordValue:s}=e,l=ve;let x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x=i.jsx("p",{className:"text-muted-foreground",children:"Add this TXT record at your DNS provider, then click Verify:"}),t[0]=x):x=t[0];let r;t[1]!==u?(r=()=>l(u),t[1]=u,t[2]=r):r=t[2];let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("span",{className:"text-muted-foreground",children:"TXT "}),t[3]=c):c=t[3];let d;t[4]!==u||t[5]!==r?(d=i.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:r,children:[c,u]}),t[4]=u,t[5]=r,t[6]=d):d=t[6];let f;t[7]!==s?(f=()=>l(s),t[7]=s,t[8]=f):f=t[8];let j;t[9]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsx("span",{className:"text-muted-foreground",children:"value "}),t[9]=j):j=t[9];let m;t[10]!==s||t[11]!==f?(m=i.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:f,children:[j,s]}),t[10]=s,t[11]=f,t[12]=m):m=t[12];let n;return t[13]!==d||t[14]!==m?(n=i.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[x,i.jsxs("div",{className:"grid gap-1",children:[d,m]})]}),t[13]=d,t[14]=m,t[15]=n):n=t[15],n}function ve(e){navigator.clipboard?.writeText(e),p.success("Copied")}export{be as D};
1
+ import{c as X,C as H,n as U,r as W,K as J,m as ee,d as Z,p as te,t as p,j as i,B as $}from"./index-2zrh5v4q.js";import{u as ie}from"./studio-tools-Y8y5OadJ.js";import{b as se,S as ne,a as oe}from"./settings-section-ui7p-DEy.js";import{B as Q}from"./badge-CbP9K2Qf.js";import{I as ae}from"./input-szG-lwZi.js";import{S as re,a as le,b as ce,c as de,d as me}from"./select-DV4XrWOt.js";const ue={off:"Off",auto:"Auto-join",request:"Require approval"};function fe(e,t){switch(e){case"auto":return`Anyone with a verified @${t} email joins automatically.`;case"request":return`People with a verified @${t} email can request to join; an admin approves.`;default:return"Not discoverable — no one can find or join through this domain."}}function be(){const e=X.c(69),{org:t}=H(),u=U(),s=ie(),[l,x]=W.useState("");let r;e[0]!==t.id?(r=J.organizationDomains(t.id),e[0]=t.id,e[1]=r):r=e[1];let c;e[2]!==s?(c=()=>s.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==r||e[5]!==c?(d={queryKey:r,queryFn:c},e[4]=r,e[5]=c,e[6]=d):d=e[6];const{data:f,isPending:j}=ee(d);let m;e[7]!==t.id||e[8]!==u?(m=()=>u.invalidateQueries({queryKey:J.organizationDomains(t.id)}),e[7]=t.id,e[8]=u,e[9]=m):m=e[9];const n=m;let N;e[10]!==s?(N=o=>s.call("ORGANIZATION_DOMAIN_ADD",{domain:o}),e[10]=s,e[11]=N):N=e[11];let v;e[12]!==n||e[13]!==t.id?(v=()=>{te("organization_domain_added",{organization_id:t.id}),x(""),n(),p.success("Domain added")},e[12]=n,e[13]=t.id,e[14]=v):v=e[14];let R;e[15]!==N||e[16]!==v?(R={mutationFn:N,onSuccess:v,onError:je},e[15]=N,e[16]=v,e[17]=R):R=e[17];const h=Z(R);let S;e[18]!==s?(S=o=>{const{id:a,joinMode:g}=o;return s.call("ORGANIZATION_DOMAIN_UPDATE",{id:a,joinMode:g})},e[18]=s,e[19]=S):S=e[19];let y;e[20]!==n?(y=()=>{n(),p.success("Join mode updated")},e[20]=n,e[21]=y):y=e[21];let V;e[22]!==S||e[23]!==y?(V={mutationFn:S,onSuccess:y,onError:ge},e[22]=S,e[23]=y,e[24]=V):V=e[24];const P=Z(V);let _;e[25]!==s?(_=o=>s.call("ORGANIZATION_DOMAIN_VERIFY",{id:o}),e[25]=s,e[26]=_):_=e[26];let A;e[27]!==n?(A=o=>{n(),o.verified?p.success("Domain verified"):p.error("TXT record not found yet — DNS can take a few minutes.")},e[27]=n,e[28]=A):A=e[28];let k;e[29]!==_||e[30]!==A?(k={mutationFn:_,onSuccess:A,onError:he},e[29]=_,e[30]=A,e[31]=k):k=e[31];const D=Z(k);let I;e[32]!==s?(I=o=>s.call("ORGANIZATION_DOMAIN_REMOVE",{id:o}),e[32]=s,e[33]=I):I=e[33];let b;e[34]!==n?(b=()=>{n(),p.success("Domain removed")},e[34]=n,e[35]=b):b=e[35];let q;e[36]!==I||e[37]!==b?(q={mutationFn:I,onSuccess:b,onError:xe},e[36]=I,e[37]=b,e[38]=q):q=e[38];const E=Z(q);if(j)return null;let z;e[39]!==f?.domains?(z=f?.domains??[],e[39]=f?.domains,e[40]=z):z=e[40];const K=z;let O;if(e[41]!==K||e[42]!==E||e[43]!==P||e[44]!==D){let o;e[46]!==E||e[47]!==P||e[48]!==D?(o=a=>{const g=a.verificationStatus==="verified";return i.jsx(se,{title:i.jsxs("span",{className:"flex items-center gap-2",children:[a.domain,g?i.jsx(Q,{variant:"secondary",children:"Verified"}):i.jsx(Q,{variant:"outline",children:"Pending"})]}),description:g?fe(a.joinMode,a.domain):"Add the DNS record below, then verify.",action:i.jsxs("div",{className:"flex items-center gap-2",children:[g&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-xs text-muted-foreground",children:"Join mode"}),i.jsxs(re,{value:a.joinMode,onValueChange:Y=>P.mutate({id:a.id,joinMode:Y}),children:[i.jsx(le,{className:"w-44",size:"sm",children:i.jsx(ce,{})}),i.jsx(de,{children:["off","auto","request"].map(pe)})]})]}),!g&&i.jsx($,{size:"sm",variant:"outline",onClick:()=>D.mutate(a.id),disabled:D.isPending,children:"Verify"}),i.jsx($,{size:"sm",variant:"ghost",onClick:()=>E.mutate(a.id),disabled:E.isPending,children:"Remove"})]}),children:!g&&a.recordName&&a.recordValue&&i.jsx(Ne,{recordName:a.recordName,recordValue:a.recordValue})},a.id)},e[46]=E,e[47]=P,e[48]=D,e[49]=o):o=e[49],O=K.map(o),e[41]=K,e[42]=E,e[43]=P,e[44]=D,e[45]=O}else O=e[45];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=o=>x(o.target.value),e[50]=B):B=e[50];let M;e[51]!==l?(M=i.jsx(ae,{value:l,onChange:B,placeholder:"acme.com",className:"max-w-xs"}),e[51]=l,e[52]=M):M=e[52];let T;e[53]!==h||e[54]!==l?(T=()=>h.mutate(l.trim()),e[53]=h,e[54]=l,e[55]=T):T=e[55];let C;e[56]!==h.isPending||e[57]!==l?(C=!l.trim()||h.isPending,e[56]=h.isPending,e[57]=l,e[58]=C):C=e[58];const L=h.isPending?"Adding…":"Add domain";let w;e[59]!==T||e[60]!==C||e[61]!==L?(w=i.jsx($,{size:"sm",onClick:T,disabled:C,children:L}),e[59]=T,e[60]=C,e[61]=L,e[62]=w):w=e[62];let F;e[63]!==M||e[64]!==w?(F=i.jsxs("div",{className:"flex items-center gap-2 p-4",children:[M,w]}),e[63]=M,e[64]=w,e[65]=F):F=e[65];let G;return e[66]!==O||e[67]!==F?(G=i.jsx(ne,{title:"Email domains",description:"Let people with a matching email domain discover and join this organization.",children:i.jsxs(oe,{children:[O,F]})}),e[66]=O,e[67]=F,e[68]=G):G=e[68],G}function pe(e){return i.jsx(me,{value:e,children:ue[e]},e)}function xe(e){return p.error(e instanceof Error?e.message:"Failed to remove")}function he(e){return p.error(e instanceof Error?e.message:"Failed to verify")}function ge(e){return p.error(e instanceof Error?e.message:"Failed to update")}function je(e){return p.error(e instanceof Error?e.message:"Failed to add domain")}function Ne(e){const t=X.c(16),{recordName:u,recordValue:s}=e,l=ve;let x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x=i.jsx("p",{className:"text-muted-foreground",children:"Add this TXT record at your DNS provider, then click Verify:"}),t[0]=x):x=t[0];let r;t[1]!==u?(r=()=>l(u),t[1]=u,t[2]=r):r=t[2];let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("span",{className:"text-muted-foreground",children:"TXT "}),t[3]=c):c=t[3];let d;t[4]!==u||t[5]!==r?(d=i.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:r,children:[c,u]}),t[4]=u,t[5]=r,t[6]=d):d=t[6];let f;t[7]!==s?(f=()=>l(s),t[7]=s,t[8]=f):f=t[8];let j;t[9]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsx("span",{className:"text-muted-foreground",children:"value "}),t[9]=j):j=t[9];let m;t[10]!==s||t[11]!==f?(m=i.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:f,children:[j,s]}),t[10]=s,t[11]=f,t[12]=m):m=t[12];let n;return t[13]!==d||t[14]!==m?(n=i.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[x,i.jsxs("div",{className:"grid gap-1",children:[d,m]})]}),t[13]=d,t[14]=m,t[15]=n):n=t[15],n}function ve(e){navigator.clipboard?.writeText(e),p.success("Copied")}export{be as D};
@@ -1 +1 @@
1
- import{c as d,j as s,cr as i,l as c}from"./index-BUWOf6-H.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
1
+ import{c as d,j as s,cr as i,l as c}from"./index-2zrh5v4q.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
@@ -1 +1 @@
1
- import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-BUWOf6-H.js";import{i as $}from"./Check-ylcp47jh.js";import{i as D}from"./ChevronRight-NJ1RHqa7.js";import{i as M}from"./Circle-BGJOKhru.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function O(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function E(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function G(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function L(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function Q(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function V(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function W(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function X(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{C as D,T as a,Q as b,O as c,E as d,V as e,W as f,X as g,L as h,P as i,U as j,G as k};
1
+ import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-2zrh5v4q.js";import{i as $}from"./Check-G0F_u8Bs.js";import{i as D}from"./ChevronRight-Bl7k6L7n.js";import{i as M}from"./Circle-DkvNI_jV.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function O(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function E(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function G(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function L(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function Q(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function V(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function W(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function X(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{C as D,T as a,Q as b,O as c,E as d,V as e,W as f,X as g,L as h,P as i,U as j,G as k};
@@ -1 +1 @@
1
- import{c as v,l as N,j as t}from"./index-BUWOf6-H.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
1
+ import{c as v,l as N,j as t}from"./index-2zrh5v4q.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
@@ -1 +1 @@
1
- import"./index-BUWOf6-H.js";import{c as O}from"./use-mcp-client-qnk43eG1.js";import{W as T}from"./constants-D_FQAPnt.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function B(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function J(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function Q(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function X(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let G="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=G[n[t]&63];return e};function j(t){return`${t}_${$()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function Z(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];let u,f,_=null;if(c){const h=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:j("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:_,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,X as c,Q as d,Z as e,J as f,j as g,B as i};
1
+ import"./index-2zrh5v4q.js";import{c as O}from"./use-mcp-client-B9NPxBrU.js";import{W as T}from"./constants-D_FQAPnt.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function B(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function J(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function Q(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function X(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let G="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=G[n[t]&63];return e};function j(t){return`${t}_${$()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function Z(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];let u,f,_=null;if(c){const h=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:j("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:_,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,X as c,Q as d,Z as e,J as f,j as g,B as i};
@@ -1,2 +1,2 @@
1
- import{c as Y,r as u,j as r,i as oe,B as pe,d$ as jt,aO as Nt,aU as re,e0 as St,e1 as Mt,e2 as Dt,e3 as Rt,bO as Pt,e4 as Et,e5 as Be,aQ as kt,e6 as Tt,e7 as Ot,e8 as At,e9 as Lt,ea as Ft,eb as $t,ec as It,ed as _t,ee as zt,l as ie,n as Gt,t as Q,K as Le}from"./index-BUWOf6-H.js";import{F as Kt,l as Bt}from"./index-Qvw8OnY1.js";import{d as Vt,ax as Ut,ay as Wt}from"./agent-icon-DCK7PpQ3.js";import{s as Qt}from"./XClose-IT2oT79e.js";import{A as qt}from"./automation-runs-DtF_plhA.js";import{b as Fe,T as $e,a as Ie}from"./tooltip-cXMPTvhQ.js";import{b as Ht}from"./chat-context-DeX0VT17.js";import{u as Xt}from"./shell-layout-BDvpeGAX.js";import{s as de,a as _e,f as Yt}from"./index-gNz_kq5D.js";import{a as Jt,h as Zt,D as en,c as tn,d as nn,e as rn}from"./dialog-C6_0qLBU.js";import{I as ze}from"./input-C2XNQcRH.js";import{c as on,d as an,b as sn,A as ln,g as cn,e as dn,a as un,f as fn}from"./alert-dialog-iGippWYX.js";import{t as mn}from"./ChevronDown-DorDM-K-.js";import{i as pn}from"./ChevronRight-NJ1RHqa7.js";import{a as xn}from"./ZoomOut-DoDMe5dD.js";import{v as hn,E as gn,w as Ge,x as ve,y as vn,z as yn,A as Cn,C as H,D as ue,G as wn,g as ye,I as Ce,J as bn,K as jn,M as we,N as fe,O as be,P as Nn,Q as Sn}from"./index-DPSWF_0V.js";import"./AlertCircle-BVlB73Gd.js";import"./UserPlus01-ByXfLuOW.js";import"./Tool01-CQ5Yi4Y5.js";import"./ArrowUp-BcoNWaDn.js";import"./Settings02-s4dN6VnR.js";import"./Tool02-B5mtXP4w.js";import"./XCircle-DY5ehXOb.js";import"./ArrowUpRight-COlnzfbE.js";import"./TrendUp01-CUYb4fKq.js";import"./ZapSquare-CIT8HcpR.js";import"./Users03-DQHSM-ip.js";import"./CheckCircle-jaIqf58w.js";import"./Check-ylcp47jh.js";import"./ChevronUp-C85SxyPM.js";import"./Circle-BGJOKhru.js";import"./Stars02-Brbdnmc2.js";import"./Copy01-C5M0y3sD.js";import"./DotsVertical-Ckk9mZsT.js";import"./Globe01-DwjnaG3m.js";import"./Eye-ByzbJOuX.js";import"./FilterLines-hGzDxUbQ.js";import"./Flag01-D6FA8Gqb.js";import"./Star01-CdWOUCGL.js";import"./Globe04-KMRfe3Ap.js";import"./SwitchHorizontal01-CQC-VHSM.js";import"./HardDrive-BLW7r-EP.js";import"./Image01-DID7YK1H.js";import"./Key01-BNdv9d9e.js";import"./LayoutLeft-DP-M8mno.js";import"./LinkExternal01-CJELREUW.js";import"./List-B6zsWjbc.js";import"./Monitor01-DGMiqS2G.js";import"./Sun-DrhefHVP.js";import"./Package-Cys9wdnk.js";import"./Palette-CjpYx7Ii.js";import"./Play-BIDZ3Qx4.js";import"./Plus-OGxa0fdn.js";import"./SearchLg-BkGBAC6u.js";import"./SearchMd-DhGVvJ2r.js";import"./Shield01-C2gwqyT0.js";import"./Stars01-Ce7N7beA.js";import"./Trash01-9Yhy1NDp.js";import"./Upload01-BGaIkl8C.js";import"./User01-DY8EdPzH.js";import"./Users01-DnUyZ4sc.js";import"./X-8dZUy9dd.js";import"./Zap-UNZ6wjOU.js";import"./select-BVg_AKhS.js";import"./useInfiniteQuery-C6UXsGIP.js";import"./use-infinite-scroll-DiSaAQPl.js";import"./use-connection-CD2Fnptb.js";import"./use-collections-7ERyEkIU.js";import"./use-mcp-client-qnk43eG1.js";import"./constants-D_FQAPnt.js";import"./auth-BBryGktV.js";import"./use-virtual-mcp-BJxeG1T-.js";import"./card-DmJEBNvh.js";import"./sidebar-Bg21lFNS.js";import"./use-mobile-oSorlQMv.js";import"./table-kChvW90I.js";import"./empty-state-jjn-bhGa.js";import"./use-members-Dey3M7mC.js";import"./use-org-auth-client-aAeyG-Cs.js";import"./use-clock-tick-BJ7X5vRI.js";import"./use-automations-ljR2TnPA.js";import"./studio-tools-JGMjsS9V.js";import"./useSuspenseInfiniteQuery-Cn5B2KcA.js";import"./avatar-6ZpKSJQ1.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BhzNp8tf.js";import"./file-type-icon-cPIVgg9x.js";import"./tab-id-BijBBRwE.js";import"./hooks-B5swj9vo.js";import"./decopilot-sse-pool-DpwU6Fnw.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-45RX9-wa.js";import"./index-Dliz359x.js";import"./integration-icon-IezBYdjm.js";import"./use-navigate-to-agent-7gJqLFkE.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-C1SgmDdh.js";import"./form-BLqlEubb.js";import"./label-CK1XiDPB.js";import"./autosend-YOQ-CO-z.js";import"./use-ai-providers-cFLtai6A.js";import"./use-decopilot-events-BNjf3dpu.js";import"./use-organization-settings-DrhRsJWG.js";import"./required-auth-layout-DJSVKequ.js";import"./use-org-sso-De26T__u.js";import"./drawer-BtRJAb0M.js";import"./collection-search-BebQySxJ.js";import"./tabs-D6exMqkv.js";import"./toggle-group-CSfYzN1e.js";import"./use-deco-credits-Cfgq3ZjW.js";import"./extract-connection-data-BKfZXo3n.js";import"./connection-card-B0Odymge.js";import"./use-registry-connections-CmItta1b.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-C-upgcvq.js";import"./connection-form-helpers-Cfzc9ntz.js";import"./authenticate-and-persist-oauth-BVhm4ZHQ.js";import"./mcp-oauth-BtnOcT8N.js";import"./collection-tabs-DhPjZGgE.js";import"./badge-Brm7dRFm.js";import"./connect-desktop-dialog-BFe8wpxN.js";import"./select-model-w8ZEBOqQ.js";import"./checkbox-YjFOYgvp.js";import"./skeleton-JjNP43lD.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Cd7MHbmE.js";import"./command-DgNLNLpt.js";import"./index-CqkHhPgZ.js";import"./popover-B2zk9niv.js";import"./dropdown-menu-96rpJkjm.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-4kB8txsU.js";import"./toolbar-CdhDSP7U.js";import"./use-mcp-tools-SncKc9ct.js";import"./use-capability-BI2Ao-_m.js";import"./use-debounced-autosave-CZ0xTx2w.js";import"./index-BdUl5bJN.js";import"./search-input-DoQewDAM.js";import"./use-mcp-auth-status-dq4wRd85.js";import"./switch-Dbe5CgqQ.js";import"./github-repo-picker-CiS_eOYq.js";import"./use-debounced-value-B52whIH7.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-DDzz0qxd.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-BXSVQzy2.js";import"./index-C_fgqMB7.js";import"./get-initials-D-f_fDFw.js";import"./calendar-C8mrI2UH.js";import"./toolbar-icon-button--2c5nPA5.js";import"./use-file-configs-1u4ZUq9F.js";import"./automation-list-row-CW2Mr4ne.js";const Mn={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function Dn(s){const e=Y.c(51),{open:i,mode:a,initialName:c,parentLabel:f,isPending:h,onSubmit:p,onOpenChange:v}=s,y=c===void 0?"":c,d=h===void 0?!1:h,[x,C]=u.useState(y),[D,k]=u.useState(i),g=Mn[a];i!==D&&(k(i),i&&C(y));let b;e[0]!==d||e[1]!==v?(b=V=>{!V&&!d&&v(!1)},e[0]=d,e[1]=v,e[2]=b):b=e[2];const U=b;let T;e[3]!==d||e[4]!==x||e[5]!==p?(T=async V=>{V.preventDefault();const q=x.trim();!q||d||await p(q)},e[3]=d,e[4]=x,e[5]=p,e[6]=T):T=e[6];const O=T;let j;e[7]!==g.title?(j=r.jsx(Jt,{children:g.title}),e[7]=g.title,e[8]=j):j=e[8];let w;e[9]!==g.description?(w=r.jsx(Zt,{children:g.description}),e[9]=g.description,e[10]=w):w=e[10];let A;e[11]!==j||e[12]!==w?(A=r.jsxs(en,{children:[j,w]}),e[11]=j,e[12]=w,e[13]=A):A=e[13];let L;e[14]!==f?(L=f&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(ze,{value:f,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=f,e[15]=L):L=e[15];let G;e[16]===Symbol.for("react.memo_cache_sentinel")?(G=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=G):G=e[16];let $;e[17]===Symbol.for("react.memo_cache_sentinel")?($=V=>C(V.target.value),e[17]=$):$=e[17];let I;e[18]!==g.placeholder||e[19]!==d||e[20]!==x?(I=r.jsxs("div",{className:"space-y-1.5",children:[G,r.jsx(ze,{id:"file-explorer-name",value:x,onChange:$,placeholder:g.placeholder,autoFocus:!0,disabled:d})]}),e[18]=g.placeholder,e[19]=d,e[20]=x,e[21]=I):I=e[21];let R;e[22]!==I||e[23]!==L?(R=r.jsxs("div",{className:"space-y-4 py-4",children:[L,I]}),e[22]=I,e[23]=L,e[24]=R):R=e[24];let P;e[25]!==v?(P=()=>v(!1),e[25]=v,e[26]=P):P=e[26];let _;e[27]!==d||e[28]!==P?(_=r.jsx(pe,{type:"button",variant:"outline",onClick:P,disabled:d,children:"Cancel"}),e[27]=d,e[28]=P,e[29]=_):_=e[29];let z;e[30]!==d||e[31]!==x?(z=!x.trim()||d,e[30]=d,e[31]=x,e[32]=z):z=e[32];let N;e[33]!==g.submit||e[34]!==d?(N=d?r.jsxs(r.Fragment,{children:[r.jsx(oe,{size:14,className:"animate-spin"}),"Saving…"]}):g.submit,e[33]=g.submit,e[34]=d,e[35]=N):N=e[35];let K;e[36]!==z||e[37]!==N?(K=r.jsx(pe,{type:"submit",disabled:z,children:N}),e[36]=z,e[37]=N,e[38]=K):K=e[38];let S;e[39]!==_||e[40]!==K?(S=r.jsxs(tn,{children:[_,K]}),e[39]=_,e[40]=K,e[41]=S):S=e[41];let E;e[42]!==O||e[43]!==R||e[44]!==S||e[45]!==A?(E=r.jsx(nn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:O,children:[A,R,S]})}),e[42]=O,e[43]=R,e[44]=S,e[45]=A,e[46]=E):E=e[46];let W;return e[47]!==U||e[48]!==i||e[49]!==E?(W=r.jsx(rn,{open:i,onOpenChange:U,children:E}),e[47]=U,e[48]=i,e[49]=E,e[50]=W):W=e[50],W}function Rn(s){const e=Y.c(31),{deleteTarget:i,deleteDirtyPaths:a,fsActionPending:c,onOpenChange:f,onConfirm:h}=s,p=i!==null,v=i?.kind==="directory"?"folder":"file";let y;e[0]!==v?(y=r.jsxs(on,{children:["Delete ",v,"?"]}),e[0]=v,e[1]=y):y=e[1];const d=i?.name;let x;e[2]!==d?(x=r.jsx("span",{className:"font-mono",children:d}),e[2]=d,e[3]=x):x=e[3];const C=i?.kind==="directory"?" and everything inside it.":".";let D;e[4]!==a.length?(D=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?"One open file has unsaved changes that will be lost.":`${a.length} open files have unsaved changes that will be lost.`]}),e[4]=a.length,e[5]=D):D=e[5];let k;e[6]!==x||e[7]!==C||e[8]!==D?(k=r.jsxs(an,{children:["This will permanently delete"," ",x,C,D]}),e[6]=x,e[7]=C,e[8]=D,e[9]=k):k=e[9];let g;e[10]!==y||e[11]!==k?(g=r.jsxs(sn,{children:[y,k]}),e[10]=y,e[11]=k,e[12]=g):g=e[12];let b;e[13]!==c?(b=r.jsx(ln,{disabled:c,children:"Cancel"}),e[13]=c,e[14]=b):b=e[14];const U=c||!i;let T;e[15]!==i||e[16]!==h?(T=L=>{L.preventDefault(),i&&h(i)},e[15]=i,e[16]=h,e[17]=T):T=e[17];let O;e[18]!==U||e[19]!==T?(O=r.jsx(cn,{disabled:U,onClick:T,children:"Delete"}),e[18]=U,e[19]=T,e[20]=O):O=e[20];let j;e[21]!==b||e[22]!==O?(j=r.jsxs(dn,{children:[b,O]}),e[21]=b,e[22]=O,e[23]=j):j=e[23];let w;e[24]!==j||e[25]!==g?(w=r.jsxs(un,{children:[g,j]}),e[24]=j,e[25]=g,e[26]=w):w=e[26];let A;return e[27]!==f||e[28]!==p||e[29]!==w?(A=r.jsx(fn,{open:p,onOpenChange:f,children:w}),e[27]=f,e[28]=p,e[29]=w,e[30]=A):A=e[30],A}var je="ContextMenu",[Pn]=kt(je,[Be]),B=Be(),[En,Ve]=Pn(je),Ue=s=>{const{__scopeContextMenu:e,children:i,onOpenChange:a,dir:c,modal:f=!0}=s,[h,p]=u.useState(!1),v=B(e),y=Pt(a),d=u.useCallback(x=>{p(x),y(x)},[y]);return r.jsx(En,{scope:e,open:h,onOpenChange:d,modal:f,children:r.jsx(Et,{...v,dir:c,open:h,onOpenChange:d,modal:f,children:i})})};Ue.displayName=je;var We="ContextMenuTrigger",Qe=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,disabled:a=!1,...c}=s,f=Ve(We,i),h=B(i),p=u.useRef({x:0,y:0}),v=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),y=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(y.current),[]),x=C=>{p.current={x:C.clientX,y:C.clientY},f.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(jt,{...h,virtualRef:v}),r.jsx(Nt.span,{"data-state":f.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...s.style},onContextMenu:a?s.onContextMenu:re(s.onContextMenu,C=>{d(),x(C),C.preventDefault()}),onPointerDown:a?s.onPointerDown:re(s.onPointerDown,me(C=>{d(),y.current=window.setTimeout(()=>x(C),700)})),onPointerMove:a?s.onPointerMove:re(s.onPointerMove,me(d)),onPointerCancel:a?s.onPointerCancel:re(s.onPointerCancel,me(d)),onPointerUp:a?s.onPointerUp:re(s.onPointerUp,me(d))})]})});Qe.displayName=We;var kn="ContextMenuPortal",qe=s=>{const{__scopeContextMenu:e,...i}=s,a=B(e);return r.jsx(Dt,{...a,...i})};qe.displayName=kn;var He="ContextMenuContent",Xe=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=Ve(He,i),f=B(i),h=u.useRef(!1);return r.jsx(Rt,{...f,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{s.onCloseAutoFocus?.(p),!p.defaultPrevented&&h.current&&p.preventDefault(),h.current=!1},onInteractOutside:p=>{s.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(h.current=!0)},style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Xe.displayName=He;var Tn="ContextMenuGroup",On=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Tt,{...c,...a,ref:e})});On.displayName=Tn;var An="ContextMenuLabel",Ln=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Ot,{...c,...a,ref:e})});Ln.displayName=An;var Fn="ContextMenuItem",Ye=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(St,{...c,...a,ref:e})});Ye.displayName=Fn;var $n="ContextMenuCheckboxItem",In=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(At,{...c,...a,ref:e})});In.displayName=$n;var _n="ContextMenuRadioGroup",zn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Lt,{...c,...a,ref:e})});zn.displayName=_n;var Gn="ContextMenuRadioItem",Kn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Ft,{...c,...a,ref:e})});Kn.displayName=Gn;var Bn="ContextMenuItemIndicator",Vn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx($t,{...c,...a,ref:e})});Vn.displayName=Bn;var Un="ContextMenuSeparator",Je=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Mt,{...c,...a,ref:e})});Je.displayName=Un;var Wn="ContextMenuArrow",Qn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(It,{...c,...a,ref:e})});Qn.displayName=Wn;var qn="ContextMenuSubTrigger",Hn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(_t,{...c,...a,ref:e})});Hn.displayName=qn;var Xn="ContextMenuSubContent",Yn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(zt,{...c,...a,ref:e,style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Yn.displayName=Xn;function me(s){return e=>e.pointerType!=="mouse"?s(e):void 0}var Jn=Ue,Zn=Qe,er=qe,tr=Xe,nr=Ye,rr=Je;function or(s){const e=Y.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(Jn,{"data-slot":"context-menu",...i}),e[2]=i,e[3]=a):a=e[3],a}function ir(s){const e=Y.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(Zn,{"data-slot":"context-menu-trigger",...i}),e[2]=i,e[3]=a):a=e[3],a}function ar(s){const e=Y.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",i),e[3]=i,e[4]=c):c=e[4];let f;return e[5]!==a||e[6]!==c?(f=r.jsx(er,{children:r.jsx(tr,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=f):f=e[7],f}function ee(s){const e=Y.c(12);let i,a,c,f;e[0]!==s?({className:i,inset:a,variant:f,...c}=s,e[0]=s,e[1]=i,e[2]=a,e[3]=c,e[4]=f):(i=e[1],a=e[2],c=e[3],f=e[4]);const h=f===void 0?"default":f;let p;e[5]!==i?(p=ie("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=p):p=e[6];let v;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==h?(v=r.jsx(nr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=h,e[11]=v):v=e[11],v}function Ke(s){const e=Y.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ie("bg-border -mx-1 my-1 h-px",i),e[3]=i,e[4]=c):c=e[4];let f;return e[5]!==a||e[6]!==c?(f=r.jsx(rr,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=f):f=e[7],f}const sr="#d9a441";function lr(s){const e=Y.c(45),{node:i,depth:a,isExpanded:c,isSelected:f,isLoading:h,fileVisual:p,onOpen:v,onSelect:y,onNewFile:d,onNewFolder:x,onCopyPath:C,onCopyRelativePath:D,onRename:k,onDelete:g}=s,b=h===void 0?!1:h,U=i.kind==="directory",{Icon:T,color:O}=p,j=f&&"bg-accent";let w;e[0]!==j?(w=ie("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",j),e[0]=j,e[1]=w):w=e[1];const A=`${a*14+8}px`;let L;e[2]!==A?(L={paddingLeft:A},e[2]=A,e[3]=L):L=e[3];let G;e[4]!==v||e[5]!==y?(G=()=>{y(),v()},e[4]=v,e[5]=y,e[6]=G):G=e[6];let $;e[7]!==T||e[8]!==O||e[9]!==U||e[10]!==c||e[11]!==b?($=U?r.jsxs(r.Fragment,{children:[b?r.jsx(oe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(mn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(pn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(xn,{size:16,className:"shrink-0",style:{color:sr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(T,{size:16,className:"shrink-0",style:{color:O}})]}),e[7]=T,e[8]=O,e[9]=U,e[10]=c,e[11]=b,e[12]=$):$=e[12];let I;e[13]!==i.name?(I=r.jsx("span",{className:"truncate",children:i.name}),e[13]=i.name,e[14]=I):I=e[14];let R;e[15]!==w||e[16]!==L||e[17]!==G||e[18]!==$||e[19]!==I?(R=r.jsx(ir,{asChild:!0,children:r.jsxs("button",{type:"button",className:w,style:L,onClick:G,children:[$,I]})}),e[15]=w,e[16]=L,e[17]=G,e[18]=$,e[19]=I,e[20]=R):R=e[20];let P;e[21]!==d?(P=r.jsx(ee,{onSelect:d,children:"New File"}),e[21]=d,e[22]=P):P=e[22];let _;e[23]!==x?(_=r.jsx(ee,{onSelect:x,children:"New Folder"}),e[23]=x,e[24]=_):_=e[24];let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=r.jsx(Ke,{}),e[25]=z):z=e[25];let N;e[26]!==C?(N=r.jsx(ee,{onSelect:C,children:"Copy Path"}),e[26]=C,e[27]=N):N=e[27];let K;e[28]!==D?(K=r.jsx(ee,{onSelect:D,children:"Copy Relative Path"}),e[28]=D,e[29]=K):K=e[29];let S;e[30]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(Ke,{}),e[30]=S):S=e[30];let E;e[31]!==k?(E=r.jsx(ee,{onSelect:k,children:"Rename"}),e[31]=k,e[32]=E):E=e[32];let W;e[33]!==g?(W=r.jsx(ee,{variant:"destructive",onSelect:g,children:"Delete"}),e[33]=g,e[34]=W):W=e[34];let V;e[35]!==P||e[36]!==_||e[37]!==N||e[38]!==K||e[39]!==E||e[40]!==W?(V=r.jsxs(ar,{className:"w-52",children:[P,_,z,N,K,S,E,W]}),e[35]=P,e[36]=_,e[37]=N,e[38]=K,e[39]=E,e[40]=W,e[41]=V):V=e[41];let q;return e[42]!==V||e[43]!==R?(q=r.jsxs(or,{children:[R,V]}),e[42]=V,e[43]=R,e[44]=q):q=e[44],q}Bt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function cr(s,e,i,a){return`/api/${s}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(i)}/${a}`}function oa({orgSlug:s,virtualMcpId:e,branch:i,openPath:a}){const[c,f]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:p}=c,[v,y]=u.useState(new Set),[d,x]=u.useState(null),[C,D]=u.useState(null),[k,g]=u.useState([]),[b,U]=u.useState(""),[T,O]=u.useState(!1),[j,w]=u.useState(!1),[,A]=u.useState(new Set),[L,G]=u.useState(new Set),$=u.useRef(0),I=u.useRef(null),R=u.useRef(new Set),P=u.useRef(new Map);function _(t){A(n=>{const o=typeof t=="function"?t(n):t;return R.current=o,o})}const[z,N]=u.useState(new Map),K=u.useRef(null),[S,E]=u.useState(null),{sendMessage:W}=Ht(),{openSidePanel:V}=Xt(),q=Gt(),[F,X]=u.useState(null),[xe,he]=u.useState(null),[ae,se]=u.useState(!1);async function J(t,n){const o=await fetch(cr(s,e,i,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function le(){q.invalidateQueries({queryKey:_e(s,e,i)})}function Ne(t,n){navigator.clipboard.writeText(n).then(()=>Q.success(`${t} copied`),()=>Q.error(`Failed to copy ${t.toLowerCase()}`))}function Ze(t){const n=Nn(t);if(!n)return;const o=`${s}/${e}/${i}`;q.setQueryData(Le.decofile(o),l=>{if(!l)return l;const{[n]:m,...M}=l;return M}),q.invalidateQueries({queryKey:Le.liveMeta(s,e,i)})}function et(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>ue(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)Ze(o)}function tt(t){const n=ue(t);return k.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=z.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function Se(t){g(n=>n.map(o=>t(o)).filter(o=>o!==null)),x(n=>n&&t(n)),N(n=>{const o=new Map;for(const[l,m]of n){const M=t(l);M&&o.set(M,m)}return o}),D(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function nt(t){const n=ue(t);D(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Se(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function rt(t){if(!F)return;const n=fe(F.parentDir,t);if(be(n,h,p))throw new Error(`"${t}" already exists`);await J("write",{path:H(n),content:""}),await te(),await le(),X(null),ge(n)}async function ot(t){if(!F)return;const n=fe(F.parentDir,t);if(be(n,h,p))throw new Error(`"${t}" already exists`);const o=H(n);await J("mkdir",{path:o}),f(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await te(),await le(),X(null),y(l=>{const m=new Set(l);for(const M of ve(n))m.add(M);return m.add(n),m}),D({name:t,path:n,kind:"directory",children:[]})}async function it(t){if(!F)return;const n=F.node.path,o=we(n),l=fe(o,t);if(l===n){X(null);return}if(be(l,h,p))throw new Error(`"${t}" already exists`);await J("rename",{from:H(n),to:H(l)}),Se(m=>m===n?l:m.startsWith(`${n}/`)?fe(l,m.slice(n.length+1)):m),await te(),await le(),X(null)}async function at(t){se(!0);try{await J("unlink",{path:H(t.path),recursive:t.kind==="directory"}),et(t),nt(t.path),await te(),await le(),he(null),Q.success(`Deleted "${t.name}"`)}catch(n){Q.error(n instanceof Error?n.message:"Delete failed")}finally{se(!1)}}async function st(t){const n=jn(t);if(n){Q.error(n);return}se(!0);try{F?.mode==="new-file"?(await rt(t),Q.success(`Created "${t}"`)):F?.mode==="new-folder"?(await ot(t),Q.success(`Created folder "${t}"`)):F?.mode==="rename"&&(await it(t),Q.success(`Renamed to "${t}"`))}catch(o){Q.error(o instanceof Error?o.message:"Operation failed")}finally{se(!1)}}const Me=u.useRef(!1);Me.current||(Me.current=!0,I.current=te());const[lt,ct]=u.useState(null);if(a&&a!==lt){ct(a);const t=a;queueMicrotask(()=>{hn(t)&&ge(t).catch(n=>{Q.error(n instanceof Error?n.message:"Failed to open file")})})}async function De(t){const n=await J("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Re(t,n,o){if(o!==$.current)return!1;let l=!1;return f(m=>{const M=n?Sn(m.files,m.directories,t,m.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!M.truncated,{files:M.files,directories:M.directories,truncated:l}}),l&&Q.warning("File list truncated — some files may be hidden"),l}async function dt(t){const n=P.current.get(t);if(n)return n;const o=$.current,l=(async()=>{const m=await De({pattern:"**/*",path:H(t),limit:Ge}),M=Re(m,!0,o);return!M&&o===$.current&&_(ne=>{const ce=new Set(ne);return ce.add(t),ce}),M})();P.current.set(t,l);try{return await l}finally{P.current.delete(t)}}async function Pe(t){if(!Ce(t,R.current))return!1;G(n=>new Set(n).add(t));try{return await dt(t)}finally{G(n=>{const o=new Set(n);return o.delete(t),o})}}async function ut(t){const n=new Set(R.current);for(const o of ve(t)){if(!Ce(o,n))continue;if(await Pe(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function te(){const t=++$.current;P.current.clear(),O(!0),_(new Set),y(new Set),G(new Set);try{const n=await De({pattern:"**/*",limit:Ge,maxDepth:gn});Re(n,!1,t),w(!0)}catch{j&&Q.error("Failed to refresh file tree")}finally{O(!1)}}async function Ee(t){if(!z.get(t)?.loaded){N(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await J("read",{path:H(t),full:!0}),l=bn(o.content??"");N(m=>{const M=new Map(m);return M.set(t,{savedContent:l,editorValue:l,loaded:!0}),M})}catch{}}}async function ft(t,n){try{await J("write",{path:H(t),content:n}),de("file saved via sandbox /write",{path:t}),q.invalidateQueries({queryKey:_e(s,e,i)});try{const o=await Yt(s,e,i);de("git status after save",o)}catch(o){de("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}N(o=>{const l=new Map(o),m=l.get(t);return m&&l.set(t,{...m,savedContent:n}),l})}catch(o){de("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function mt(t){x(t),D({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),E(null),k.includes(t)||g(n=>[...n,t]),Ee(t)}function pt(t){g(n=>{const o=n.filter(l=>l!==t);return d===t&&x(o[o.length-1]??null),o}),N(n=>{const o=new Map(n);return o.delete(t),o})}function ke(t){y(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function xt(t){if(Ce(t,R.current))try{if(await Pe(t))return}catch(n){Q.error(n instanceof Error?n.message:"Failed to load folder");return}ke(t)}async function ht(t,n){if(n){ke(t);return}await xt(t)}async function ge(t){await I.current,await ut(t);const n=ve(t);y(o=>{const l=new Set(o);for(const m of n)l.add(m);return l}),mt(t)}function gt(){return C?.kind==="directory"?C.path:C?.kind==="file"?we(C.path):d?we(d):"/"}function Te(t){const n=gt();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const vt=vn(h,p),Oe=yn(vt,v),Ae=b?Oe.filter(t=>t.node.name.toLowerCase().includes(b.toLowerCase())):Oe,Z=d?z.get(d):null,yt=Z?.loaded&&Z.editorValue!==Z.savedContent,Ct=xe?tt(xe.path):[],wt=(t,n)=>{K.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await ft(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const m=l.getValueInRange(o);E({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:m})})};function bt(t){if(!S)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${S.filePath}\``,`**Lines:** ${S.lineStart}–${S.lineEnd}`];if(S.selectedCode){const o=ye(S.filePath),l=S.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),V("chat"),W({parts:[{type:"text",text:n.join(`
1
+ import{c as Y,r as u,j as r,i as oe,B as pe,d$ as jt,aO as Nt,aU as re,e0 as St,e1 as Mt,e2 as Dt,e3 as Rt,bO as Pt,e4 as Et,e5 as Be,aQ as kt,e6 as Tt,e7 as Ot,e8 as At,e9 as Lt,ea as Ft,eb as $t,ec as It,ed as _t,ee as zt,l as ie,n as Gt,t as Q,K as Le}from"./index-2zrh5v4q.js";import{F as Kt,l as Bt}from"./index-D25E0vRj.js";import{d as Vt,ax as Ut,ay as Wt}from"./agent-icon-BzJUdPiS.js";import{s as Qt}from"./XClose-CjUdxCxb.js";import{A as qt}from"./automation-runs-Crbs7GQx.js";import{b as Fe,T as $e,a as Ie}from"./tooltip-SR8VERcH.js";import{b as Ht}from"./chat-context-ZCcA6IYU.js";import{u as Xt}from"./shell-layout-CfvZ0fDo.js";import{s as de,a as _e,f as Yt}from"./index-uRKPcatu.js";import{a as Jt,h as Zt,D as en,c as tn,d as nn,e as rn}from"./dialog-CXSGGmH2.js";import{I as ze}from"./input-szG-lwZi.js";import{c as on,d as an,b as sn,A as ln,g as cn,e as dn,a as un,f as fn}from"./alert-dialog-CsK5Fy3G.js";import{t as mn}from"./ChevronDown-Dklvfb_j.js";import{i as pn}from"./ChevronRight-Bl7k6L7n.js";import{a as xn}from"./ZoomOut-B-oRMoEs.js";import{v as hn,E as gn,w as Ge,x as ve,y as vn,z as yn,A as Cn,C as H,D as ue,G as wn,g as ye,I as Ce,J as bn,K as jn,M as we,N as fe,O as be,P as Nn,Q as Sn}from"./index-bIYBdyqw.js";import"./AlertCircle-BOjfsBF0.js";import"./UserPlus01-DGEEuaug.js";import"./Tool01-CFRCagXC.js";import"./ArrowUp-C7K1YLks.js";import"./Settings02-Be48EyR2.js";import"./Tool02-BXOnFYfP.js";import"./XCircle-DsWgRsJq.js";import"./ArrowUpRight-BgtforoR.js";import"./TrendUp01-bXobHjjQ.js";import"./ZapSquare-DTHIppNH.js";import"./Users03-BvRjNSg2.js";import"./CheckCircle-DWRkWgNw.js";import"./Check-G0F_u8Bs.js";import"./ChevronUp-nh84F3SM.js";import"./Circle-DkvNI_jV.js";import"./Stars02-C_1z8ZZv.js";import"./Copy01-CySaexEv.js";import"./DotsVertical-CdcblV7p.js";import"./Globe01-DaJqvzZX.js";import"./Eye-B3zgSnf-.js";import"./FilterLines-zCjeVg3J.js";import"./Flag01-DeTGoOw3.js";import"./Star01-BoUaMRQM.js";import"./Globe04-Bhjom9-b.js";import"./SwitchHorizontal01-DgZGh7W9.js";import"./HardDrive-Ds6kKHaa.js";import"./Image01-Bf6zvxAh.js";import"./Key01-DNsdbcfH.js";import"./LayoutLeft-DO-n67Hm.js";import"./LinkExternal01-Dzpoty7I.js";import"./List-Bn1Ac2KN.js";import"./Monitor01-DF6A0cVy.js";import"./Sun-DZ5eLQ9M.js";import"./Package-BqBGAhR-.js";import"./Palette-CAc9zvoy.js";import"./Play-DR2wGmeE.js";import"./Plus-tTP_UdeD.js";import"./SearchLg-KVwjsQl5.js";import"./SearchMd-B6ZwMmAg.js";import"./Shield01-C85fTgPM.js";import"./Stars01-Bx32X1K8.js";import"./Trash01-BK9bN1g9.js";import"./Upload01-BRYn0JzU.js";import"./User01-BPv-NsEb.js";import"./Users01-DsK3My_q.js";import"./X-ixAJccZt.js";import"./Zap-CH80sMR9.js";import"./select-DV4XrWOt.js";import"./useInfiniteQuery-CrGOZ848.js";import"./use-infinite-scroll-CGaTfOyC.js";import"./use-connection-BDf5JCk0.js";import"./use-collections-BpCD42c-.js";import"./use-mcp-client-B9NPxBrU.js";import"./constants-D_FQAPnt.js";import"./auth-9nVkbaZd.js";import"./use-virtual-mcp-BSnkPfsL.js";import"./card-BUiCTEhj.js";import"./sidebar-D9bnVPLR.js";import"./use-mobile-RtBQr8Gf.js";import"./table-DcCuZpg0.js";import"./empty-state-Dg6IPABi.js";import"./use-members-C_A2VI7N.js";import"./use-org-auth-client-Cimp8Wf1.js";import"./use-clock-tick-QY1_clmR.js";import"./use-automations-ES0gn_cV.js";import"./studio-tools-Y8y5OadJ.js";import"./useSuspenseInfiniteQuery-CWHb2aME.js";import"./avatar-qb3xnlcx.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Dr05c3St.js";import"./file-type-icon-C9qt39n2.js";import"./tab-id-BijBBRwE.js";import"./hooks-CoNthXh6.js";import"./decopilot-sse-pool-BkT6q_ZN.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-hhG9oALw.js";import"./index-OegfMESD.js";import"./integration-icon-D8vCtGKi.js";import"./use-navigate-to-agent-CScCdIke.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-Cm1mxrGl.js";import"./form-BJNunTSt.js";import"./label-D_cPa32z.js";import"./autosend-D00jlKCX.js";import"./use-ai-providers-BeDORmMd.js";import"./use-decopilot-events-B1lmrW6a.js";import"./use-organization-settings-C_QqqhIc.js";import"./required-auth-layout-Eq0Mq8pL.js";import"./use-org-sso-BFAqZIbB.js";import"./drawer-0CUwOTGM.js";import"./collection-search-Dn5IKvmR.js";import"./tabs-DWvOQAMd.js";import"./toggle-group-DxIjTwL-.js";import"./use-deco-credits-BNjohkTx.js";import"./extract-connection-data-Bc9EJMAu.js";import"./connection-card-RbNDFwrC.js";import"./use-registry-connections-CBA4SGMN.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CfAMDlYi.js";import"./connection-form-helpers-BVJD93en.js";import"./authenticate-and-persist-oauth-C3t87EAj.js";import"./mcp-oauth-ooCkC9eU.js";import"./collection-tabs-eIy28e5k.js";import"./badge-CbP9K2Qf.js";import"./connect-desktop-dialog-CBgL0NB-.js";import"./select-model-BKFYAJdB.js";import"./checkbox-DmLBBGuQ.js";import"./skeleton-Cd-S2HeR.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-ui7p-DEy.js";import"./command-MWcxJ-fg.js";import"./index-Djl2oe8w.js";import"./popover-Dj2H4Cfu.js";import"./dropdown-menu-DXrRvc-i.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C8WUkNh9.js";import"./toolbar-DuhSTY3W.js";import"./use-mcp-tools-BCQu9ktT.js";import"./use-capability-CUVgBn-w.js";import"./use-debounced-autosave-Bg6kPddl.js";import"./index-CiX7itoV.js";import"./search-input-TnQv-9eX.js";import"./use-mcp-auth-status-CvcbOgu8.js";import"./switch-C4nwCCCe.js";import"./github-repo-picker-C_AcGGUu.js";import"./use-debounced-value-lYoqfMQ9.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-Cg783540.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-D0u84jOR.js";import"./index-DXHOyim_.js";import"./get-initials-D-f_fDFw.js";import"./calendar-DdSK5WB3.js";import"./toolbar-icon-button-BdL7a57M.js";import"./use-file-configs-BxbYtDOg.js";import"./automation-list-row-D88048LW.js";const Mn={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function Dn(s){const e=Y.c(51),{open:i,mode:a,initialName:c,parentLabel:f,isPending:h,onSubmit:p,onOpenChange:v}=s,y=c===void 0?"":c,d=h===void 0?!1:h,[x,C]=u.useState(y),[D,k]=u.useState(i),g=Mn[a];i!==D&&(k(i),i&&C(y));let b;e[0]!==d||e[1]!==v?(b=V=>{!V&&!d&&v(!1)},e[0]=d,e[1]=v,e[2]=b):b=e[2];const U=b;let T;e[3]!==d||e[4]!==x||e[5]!==p?(T=async V=>{V.preventDefault();const q=x.trim();!q||d||await p(q)},e[3]=d,e[4]=x,e[5]=p,e[6]=T):T=e[6];const O=T;let j;e[7]!==g.title?(j=r.jsx(Jt,{children:g.title}),e[7]=g.title,e[8]=j):j=e[8];let w;e[9]!==g.description?(w=r.jsx(Zt,{children:g.description}),e[9]=g.description,e[10]=w):w=e[10];let A;e[11]!==j||e[12]!==w?(A=r.jsxs(en,{children:[j,w]}),e[11]=j,e[12]=w,e[13]=A):A=e[13];let L;e[14]!==f?(L=f&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(ze,{value:f,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=f,e[15]=L):L=e[15];let G;e[16]===Symbol.for("react.memo_cache_sentinel")?(G=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=G):G=e[16];let $;e[17]===Symbol.for("react.memo_cache_sentinel")?($=V=>C(V.target.value),e[17]=$):$=e[17];let I;e[18]!==g.placeholder||e[19]!==d||e[20]!==x?(I=r.jsxs("div",{className:"space-y-1.5",children:[G,r.jsx(ze,{id:"file-explorer-name",value:x,onChange:$,placeholder:g.placeholder,autoFocus:!0,disabled:d})]}),e[18]=g.placeholder,e[19]=d,e[20]=x,e[21]=I):I=e[21];let R;e[22]!==I||e[23]!==L?(R=r.jsxs("div",{className:"space-y-4 py-4",children:[L,I]}),e[22]=I,e[23]=L,e[24]=R):R=e[24];let P;e[25]!==v?(P=()=>v(!1),e[25]=v,e[26]=P):P=e[26];let _;e[27]!==d||e[28]!==P?(_=r.jsx(pe,{type:"button",variant:"outline",onClick:P,disabled:d,children:"Cancel"}),e[27]=d,e[28]=P,e[29]=_):_=e[29];let z;e[30]!==d||e[31]!==x?(z=!x.trim()||d,e[30]=d,e[31]=x,e[32]=z):z=e[32];let N;e[33]!==g.submit||e[34]!==d?(N=d?r.jsxs(r.Fragment,{children:[r.jsx(oe,{size:14,className:"animate-spin"}),"Saving…"]}):g.submit,e[33]=g.submit,e[34]=d,e[35]=N):N=e[35];let K;e[36]!==z||e[37]!==N?(K=r.jsx(pe,{type:"submit",disabled:z,children:N}),e[36]=z,e[37]=N,e[38]=K):K=e[38];let S;e[39]!==_||e[40]!==K?(S=r.jsxs(tn,{children:[_,K]}),e[39]=_,e[40]=K,e[41]=S):S=e[41];let E;e[42]!==O||e[43]!==R||e[44]!==S||e[45]!==A?(E=r.jsx(nn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:O,children:[A,R,S]})}),e[42]=O,e[43]=R,e[44]=S,e[45]=A,e[46]=E):E=e[46];let W;return e[47]!==U||e[48]!==i||e[49]!==E?(W=r.jsx(rn,{open:i,onOpenChange:U,children:E}),e[47]=U,e[48]=i,e[49]=E,e[50]=W):W=e[50],W}function Rn(s){const e=Y.c(31),{deleteTarget:i,deleteDirtyPaths:a,fsActionPending:c,onOpenChange:f,onConfirm:h}=s,p=i!==null,v=i?.kind==="directory"?"folder":"file";let y;e[0]!==v?(y=r.jsxs(on,{children:["Delete ",v,"?"]}),e[0]=v,e[1]=y):y=e[1];const d=i?.name;let x;e[2]!==d?(x=r.jsx("span",{className:"font-mono",children:d}),e[2]=d,e[3]=x):x=e[3];const C=i?.kind==="directory"?" and everything inside it.":".";let D;e[4]!==a.length?(D=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?"One open file has unsaved changes that will be lost.":`${a.length} open files have unsaved changes that will be lost.`]}),e[4]=a.length,e[5]=D):D=e[5];let k;e[6]!==x||e[7]!==C||e[8]!==D?(k=r.jsxs(an,{children:["This will permanently delete"," ",x,C,D]}),e[6]=x,e[7]=C,e[8]=D,e[9]=k):k=e[9];let g;e[10]!==y||e[11]!==k?(g=r.jsxs(sn,{children:[y,k]}),e[10]=y,e[11]=k,e[12]=g):g=e[12];let b;e[13]!==c?(b=r.jsx(ln,{disabled:c,children:"Cancel"}),e[13]=c,e[14]=b):b=e[14];const U=c||!i;let T;e[15]!==i||e[16]!==h?(T=L=>{L.preventDefault(),i&&h(i)},e[15]=i,e[16]=h,e[17]=T):T=e[17];let O;e[18]!==U||e[19]!==T?(O=r.jsx(cn,{disabled:U,onClick:T,children:"Delete"}),e[18]=U,e[19]=T,e[20]=O):O=e[20];let j;e[21]!==b||e[22]!==O?(j=r.jsxs(dn,{children:[b,O]}),e[21]=b,e[22]=O,e[23]=j):j=e[23];let w;e[24]!==j||e[25]!==g?(w=r.jsxs(un,{children:[g,j]}),e[24]=j,e[25]=g,e[26]=w):w=e[26];let A;return e[27]!==f||e[28]!==p||e[29]!==w?(A=r.jsx(fn,{open:p,onOpenChange:f,children:w}),e[27]=f,e[28]=p,e[29]=w,e[30]=A):A=e[30],A}var je="ContextMenu",[Pn]=kt(je,[Be]),B=Be(),[En,Ve]=Pn(je),Ue=s=>{const{__scopeContextMenu:e,children:i,onOpenChange:a,dir:c,modal:f=!0}=s,[h,p]=u.useState(!1),v=B(e),y=Pt(a),d=u.useCallback(x=>{p(x),y(x)},[y]);return r.jsx(En,{scope:e,open:h,onOpenChange:d,modal:f,children:r.jsx(Et,{...v,dir:c,open:h,onOpenChange:d,modal:f,children:i})})};Ue.displayName=je;var We="ContextMenuTrigger",Qe=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,disabled:a=!1,...c}=s,f=Ve(We,i),h=B(i),p=u.useRef({x:0,y:0}),v=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),y=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(y.current),[]),x=C=>{p.current={x:C.clientX,y:C.clientY},f.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(jt,{...h,virtualRef:v}),r.jsx(Nt.span,{"data-state":f.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...s.style},onContextMenu:a?s.onContextMenu:re(s.onContextMenu,C=>{d(),x(C),C.preventDefault()}),onPointerDown:a?s.onPointerDown:re(s.onPointerDown,me(C=>{d(),y.current=window.setTimeout(()=>x(C),700)})),onPointerMove:a?s.onPointerMove:re(s.onPointerMove,me(d)),onPointerCancel:a?s.onPointerCancel:re(s.onPointerCancel,me(d)),onPointerUp:a?s.onPointerUp:re(s.onPointerUp,me(d))})]})});Qe.displayName=We;var kn="ContextMenuPortal",qe=s=>{const{__scopeContextMenu:e,...i}=s,a=B(e);return r.jsx(Dt,{...a,...i})};qe.displayName=kn;var He="ContextMenuContent",Xe=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=Ve(He,i),f=B(i),h=u.useRef(!1);return r.jsx(Rt,{...f,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{s.onCloseAutoFocus?.(p),!p.defaultPrevented&&h.current&&p.preventDefault(),h.current=!1},onInteractOutside:p=>{s.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(h.current=!0)},style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Xe.displayName=He;var Tn="ContextMenuGroup",On=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Tt,{...c,...a,ref:e})});On.displayName=Tn;var An="ContextMenuLabel",Ln=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Ot,{...c,...a,ref:e})});Ln.displayName=An;var Fn="ContextMenuItem",Ye=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(St,{...c,...a,ref:e})});Ye.displayName=Fn;var $n="ContextMenuCheckboxItem",In=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(At,{...c,...a,ref:e})});In.displayName=$n;var _n="ContextMenuRadioGroup",zn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Lt,{...c,...a,ref:e})});zn.displayName=_n;var Gn="ContextMenuRadioItem",Kn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Ft,{...c,...a,ref:e})});Kn.displayName=Gn;var Bn="ContextMenuItemIndicator",Vn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx($t,{...c,...a,ref:e})});Vn.displayName=Bn;var Un="ContextMenuSeparator",Je=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Mt,{...c,...a,ref:e})});Je.displayName=Un;var Wn="ContextMenuArrow",Qn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(It,{...c,...a,ref:e})});Qn.displayName=Wn;var qn="ContextMenuSubTrigger",Hn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(_t,{...c,...a,ref:e})});Hn.displayName=qn;var Xn="ContextMenuSubContent",Yn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(zt,{...c,...a,ref:e,style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Yn.displayName=Xn;function me(s){return e=>e.pointerType!=="mouse"?s(e):void 0}var Jn=Ue,Zn=Qe,er=qe,tr=Xe,nr=Ye,rr=Je;function or(s){const e=Y.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(Jn,{"data-slot":"context-menu",...i}),e[2]=i,e[3]=a):a=e[3],a}function ir(s){const e=Y.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(Zn,{"data-slot":"context-menu-trigger",...i}),e[2]=i,e[3]=a):a=e[3],a}function ar(s){const e=Y.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",i),e[3]=i,e[4]=c):c=e[4];let f;return e[5]!==a||e[6]!==c?(f=r.jsx(er,{children:r.jsx(tr,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=f):f=e[7],f}function ee(s){const e=Y.c(12);let i,a,c,f;e[0]!==s?({className:i,inset:a,variant:f,...c}=s,e[0]=s,e[1]=i,e[2]=a,e[3]=c,e[4]=f):(i=e[1],a=e[2],c=e[3],f=e[4]);const h=f===void 0?"default":f;let p;e[5]!==i?(p=ie("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=p):p=e[6];let v;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==h?(v=r.jsx(nr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=h,e[11]=v):v=e[11],v}function Ke(s){const e=Y.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ie("bg-border -mx-1 my-1 h-px",i),e[3]=i,e[4]=c):c=e[4];let f;return e[5]!==a||e[6]!==c?(f=r.jsx(rr,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=f):f=e[7],f}const sr="#d9a441";function lr(s){const e=Y.c(45),{node:i,depth:a,isExpanded:c,isSelected:f,isLoading:h,fileVisual:p,onOpen:v,onSelect:y,onNewFile:d,onNewFolder:x,onCopyPath:C,onCopyRelativePath:D,onRename:k,onDelete:g}=s,b=h===void 0?!1:h,U=i.kind==="directory",{Icon:T,color:O}=p,j=f&&"bg-accent";let w;e[0]!==j?(w=ie("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",j),e[0]=j,e[1]=w):w=e[1];const A=`${a*14+8}px`;let L;e[2]!==A?(L={paddingLeft:A},e[2]=A,e[3]=L):L=e[3];let G;e[4]!==v||e[5]!==y?(G=()=>{y(),v()},e[4]=v,e[5]=y,e[6]=G):G=e[6];let $;e[7]!==T||e[8]!==O||e[9]!==U||e[10]!==c||e[11]!==b?($=U?r.jsxs(r.Fragment,{children:[b?r.jsx(oe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(mn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(pn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(xn,{size:16,className:"shrink-0",style:{color:sr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(T,{size:16,className:"shrink-0",style:{color:O}})]}),e[7]=T,e[8]=O,e[9]=U,e[10]=c,e[11]=b,e[12]=$):$=e[12];let I;e[13]!==i.name?(I=r.jsx("span",{className:"truncate",children:i.name}),e[13]=i.name,e[14]=I):I=e[14];let R;e[15]!==w||e[16]!==L||e[17]!==G||e[18]!==$||e[19]!==I?(R=r.jsx(ir,{asChild:!0,children:r.jsxs("button",{type:"button",className:w,style:L,onClick:G,children:[$,I]})}),e[15]=w,e[16]=L,e[17]=G,e[18]=$,e[19]=I,e[20]=R):R=e[20];let P;e[21]!==d?(P=r.jsx(ee,{onSelect:d,children:"New File"}),e[21]=d,e[22]=P):P=e[22];let _;e[23]!==x?(_=r.jsx(ee,{onSelect:x,children:"New Folder"}),e[23]=x,e[24]=_):_=e[24];let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=r.jsx(Ke,{}),e[25]=z):z=e[25];let N;e[26]!==C?(N=r.jsx(ee,{onSelect:C,children:"Copy Path"}),e[26]=C,e[27]=N):N=e[27];let K;e[28]!==D?(K=r.jsx(ee,{onSelect:D,children:"Copy Relative Path"}),e[28]=D,e[29]=K):K=e[29];let S;e[30]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(Ke,{}),e[30]=S):S=e[30];let E;e[31]!==k?(E=r.jsx(ee,{onSelect:k,children:"Rename"}),e[31]=k,e[32]=E):E=e[32];let W;e[33]!==g?(W=r.jsx(ee,{variant:"destructive",onSelect:g,children:"Delete"}),e[33]=g,e[34]=W):W=e[34];let V;e[35]!==P||e[36]!==_||e[37]!==N||e[38]!==K||e[39]!==E||e[40]!==W?(V=r.jsxs(ar,{className:"w-52",children:[P,_,z,N,K,S,E,W]}),e[35]=P,e[36]=_,e[37]=N,e[38]=K,e[39]=E,e[40]=W,e[41]=V):V=e[41];let q;return e[42]!==V||e[43]!==R?(q=r.jsxs(or,{children:[R,V]}),e[42]=V,e[43]=R,e[44]=q):q=e[44],q}Bt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function cr(s,e,i,a){return`/api/${s}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(i)}/${a}`}function oa({orgSlug:s,virtualMcpId:e,branch:i,openPath:a}){const[c,f]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:p}=c,[v,y]=u.useState(new Set),[d,x]=u.useState(null),[C,D]=u.useState(null),[k,g]=u.useState([]),[b,U]=u.useState(""),[T,O]=u.useState(!1),[j,w]=u.useState(!1),[,A]=u.useState(new Set),[L,G]=u.useState(new Set),$=u.useRef(0),I=u.useRef(null),R=u.useRef(new Set),P=u.useRef(new Map);function _(t){A(n=>{const o=typeof t=="function"?t(n):t;return R.current=o,o})}const[z,N]=u.useState(new Map),K=u.useRef(null),[S,E]=u.useState(null),{sendMessage:W}=Ht(),{openSidePanel:V}=Xt(),q=Gt(),[F,X]=u.useState(null),[xe,he]=u.useState(null),[ae,se]=u.useState(!1);async function J(t,n){const o=await fetch(cr(s,e,i,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function le(){q.invalidateQueries({queryKey:_e(s,e,i)})}function Ne(t,n){navigator.clipboard.writeText(n).then(()=>Q.success(`${t} copied`),()=>Q.error(`Failed to copy ${t.toLowerCase()}`))}function Ze(t){const n=Nn(t);if(!n)return;const o=`${s}/${e}/${i}`;q.setQueryData(Le.decofile(o),l=>{if(!l)return l;const{[n]:m,...M}=l;return M}),q.invalidateQueries({queryKey:Le.liveMeta(s,e,i)})}function et(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>ue(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)Ze(o)}function tt(t){const n=ue(t);return k.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=z.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function Se(t){g(n=>n.map(o=>t(o)).filter(o=>o!==null)),x(n=>n&&t(n)),N(n=>{const o=new Map;for(const[l,m]of n){const M=t(l);M&&o.set(M,m)}return o}),D(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function nt(t){const n=ue(t);D(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Se(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function rt(t){if(!F)return;const n=fe(F.parentDir,t);if(be(n,h,p))throw new Error(`"${t}" already exists`);await J("write",{path:H(n),content:""}),await te(),await le(),X(null),ge(n)}async function ot(t){if(!F)return;const n=fe(F.parentDir,t);if(be(n,h,p))throw new Error(`"${t}" already exists`);const o=H(n);await J("mkdir",{path:o}),f(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await te(),await le(),X(null),y(l=>{const m=new Set(l);for(const M of ve(n))m.add(M);return m.add(n),m}),D({name:t,path:n,kind:"directory",children:[]})}async function it(t){if(!F)return;const n=F.node.path,o=we(n),l=fe(o,t);if(l===n){X(null);return}if(be(l,h,p))throw new Error(`"${t}" already exists`);await J("rename",{from:H(n),to:H(l)}),Se(m=>m===n?l:m.startsWith(`${n}/`)?fe(l,m.slice(n.length+1)):m),await te(),await le(),X(null)}async function at(t){se(!0);try{await J("unlink",{path:H(t.path),recursive:t.kind==="directory"}),et(t),nt(t.path),await te(),await le(),he(null),Q.success(`Deleted "${t.name}"`)}catch(n){Q.error(n instanceof Error?n.message:"Delete failed")}finally{se(!1)}}async function st(t){const n=jn(t);if(n){Q.error(n);return}se(!0);try{F?.mode==="new-file"?(await rt(t),Q.success(`Created "${t}"`)):F?.mode==="new-folder"?(await ot(t),Q.success(`Created folder "${t}"`)):F?.mode==="rename"&&(await it(t),Q.success(`Renamed to "${t}"`))}catch(o){Q.error(o instanceof Error?o.message:"Operation failed")}finally{se(!1)}}const Me=u.useRef(!1);Me.current||(Me.current=!0,I.current=te());const[lt,ct]=u.useState(null);if(a&&a!==lt){ct(a);const t=a;queueMicrotask(()=>{hn(t)&&ge(t).catch(n=>{Q.error(n instanceof Error?n.message:"Failed to open file")})})}async function De(t){const n=await J("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Re(t,n,o){if(o!==$.current)return!1;let l=!1;return f(m=>{const M=n?Sn(m.files,m.directories,t,m.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!M.truncated,{files:M.files,directories:M.directories,truncated:l}}),l&&Q.warning("File list truncated — some files may be hidden"),l}async function dt(t){const n=P.current.get(t);if(n)return n;const o=$.current,l=(async()=>{const m=await De({pattern:"**/*",path:H(t),limit:Ge}),M=Re(m,!0,o);return!M&&o===$.current&&_(ne=>{const ce=new Set(ne);return ce.add(t),ce}),M})();P.current.set(t,l);try{return await l}finally{P.current.delete(t)}}async function Pe(t){if(!Ce(t,R.current))return!1;G(n=>new Set(n).add(t));try{return await dt(t)}finally{G(n=>{const o=new Set(n);return o.delete(t),o})}}async function ut(t){const n=new Set(R.current);for(const o of ve(t)){if(!Ce(o,n))continue;if(await Pe(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function te(){const t=++$.current;P.current.clear(),O(!0),_(new Set),y(new Set),G(new Set);try{const n=await De({pattern:"**/*",limit:Ge,maxDepth:gn});Re(n,!1,t),w(!0)}catch{j&&Q.error("Failed to refresh file tree")}finally{O(!1)}}async function Ee(t){if(!z.get(t)?.loaded){N(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await J("read",{path:H(t),full:!0}),l=bn(o.content??"");N(m=>{const M=new Map(m);return M.set(t,{savedContent:l,editorValue:l,loaded:!0}),M})}catch{}}}async function ft(t,n){try{await J("write",{path:H(t),content:n}),de("file saved via sandbox /write",{path:t}),q.invalidateQueries({queryKey:_e(s,e,i)});try{const o=await Yt(s,e,i);de("git status after save",o)}catch(o){de("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}N(o=>{const l=new Map(o),m=l.get(t);return m&&l.set(t,{...m,savedContent:n}),l})}catch(o){de("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function mt(t){x(t),D({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),E(null),k.includes(t)||g(n=>[...n,t]),Ee(t)}function pt(t){g(n=>{const o=n.filter(l=>l!==t);return d===t&&x(o[o.length-1]??null),o}),N(n=>{const o=new Map(n);return o.delete(t),o})}function ke(t){y(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function xt(t){if(Ce(t,R.current))try{if(await Pe(t))return}catch(n){Q.error(n instanceof Error?n.message:"Failed to load folder");return}ke(t)}async function ht(t,n){if(n){ke(t);return}await xt(t)}async function ge(t){await I.current,await ut(t);const n=ve(t);y(o=>{const l=new Set(o);for(const m of n)l.add(m);return l}),mt(t)}function gt(){return C?.kind==="directory"?C.path:C?.kind==="file"?we(C.path):d?we(d):"/"}function Te(t){const n=gt();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const vt=vn(h,p),Oe=yn(vt,v),Ae=b?Oe.filter(t=>t.node.name.toLowerCase().includes(b.toLowerCase())):Oe,Z=d?z.get(d):null,yt=Z?.loaded&&Z.editorValue!==Z.savedContent,Ct=xe?tt(xe.path):[],wt=(t,n)=>{K.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await ft(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const m=l.getValueInRange(o);E({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:m})})};function bt(t){if(!S)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${S.filePath}\``,`**Lines:** ${S.lineStart}–${S.lineEnd}`];if(S.selectedCode){const o=ye(S.filePath),l=S.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),V("chat"),W({parts:[{type:"text",text:n.join(`
2
2
  `)}]}),E(null)}return T&&!j?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(oe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(Vt,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:b,onChange:t=>U(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(Fe,{children:[r.jsx($e,{asChild:!0,children:r.jsx(pe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Te("new-file"),children:r.jsx(Ut,{size:14})})}),r.jsx(Ie,{side:"bottom",children:"New file"})]}),r.jsxs(Fe,{children:[r.jsx($e,{asChild:!0,children:r.jsx(pe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Te("new-folder"),children:r.jsx(Wt,{size:14})})}),r.jsx(Ie,{side:"bottom",children:"New folder"})]})]}),r.jsx(qt,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[Ae.map(t=>{const{node:n,depth:o}=t,l=n.kind==="directory",m=v.has(n.path),M=C?.path===n.path,ne=Cn(n.path,n.kind),ce=l&&L.has(n.path);return r.jsx(lr,{node:n,depth:o,isExpanded:m,isSelected:M,isLoading:ce,fileVisual:wn(n.name),onSelect:()=>D(n),onOpen:()=>{l?ht(n.path,m):ge(n.path)},onNewFile:()=>X({mode:"new-file",node:n,parentDir:ne}),onNewFolder:()=>X({mode:"new-folder",node:n,parentDir:ne}),onCopyPath:()=>Ne("Path",ue(n.path)),onCopyRelativePath:()=>Ne("Relative path",H(n.path)),onRename:()=>X({mode:"rename",node:n,parentDir:ne}),onDelete:()=>he(n)},n.path)}),j&&Ae.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:b?`No files match "${b}"`:"No files found"})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[k.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:k.map(t=>{const n=z.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,l=d===t,m=t.split("/").pop()??t;return r.jsxs("div",{className:ie("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",l?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{x(t),Ee(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":l,children:[r.jsx("span",{className:"truncate max-w-32",children:m}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:M=>{M.stopPropagation(),pt(t)},children:r.jsx(Qt,{size:12})})]},t)})}),S&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&bt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&E(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:"Send"}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&Z?.loaded?r.jsx(Kt,{language:ye(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:Z.editorValue,path:d,onChange:t=>{const n=d;n&&N(o=>{const l=new Map(o),m=l.get(n);return m&&l.set(n,{...m,editorValue:t??""}),l})},onMount:wt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(oe,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!Z?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(oe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[yt?"Modified":"Saved"," ·"," ",ye(d)]})]})]}),r.jsx(Dn,{open:F!==null,mode:F?.mode??"new-file",initialName:F?.mode==="rename"?F.node.name:"",parentLabel:F&&F.mode!=="rename"?F.parentDir==="/"?"/":H(F.parentDir):void 0,isPending:ae,onSubmit:st,onOpenChange:t=>{!t&&!ae&&X(null)}}),r.jsx(Rn,{deleteTarget:xe,deleteDirtyPaths:Ct,fsActionPending:ae,onOpenChange:t=>{!t&&!ae&&he(null)},onConfirm:t=>{at(t)}})]})}export{oa as FileExplorer};
@@ -1,4 +1,4 @@
1
- import{bx as zl,j as q,aM as lt,bP as zn,r as Ve,F as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-BUWOf6-H.js";import{i as zb}from"./Check-ylcp47jh.js";import{a as jb}from"./Copy01-C5M0y3sD.js";import{e as S0,g as y0,f as A0,a as _0}from"./dialog-C6_0qLBU.js";import{n as I0}from"./Globe01-DwjnaG3m.js";import{k as k0,n as R0}from"./ZoomOut-DoDMe5dD.js";import{u as N0}from"./use-mobile-oSorlQMv.js";import{h as C0}from"./tab-id-BijBBRwE.js";function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=jl();function Vb(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},v0=/^(?:[ \t]*(?:\n|$))+/,w0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_n=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,O0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,Yb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wb=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),L0=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,D0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vl).getRegex(),er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,F0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kl).replace("tag",er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kb=le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),B0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kb).getRegex(),Xl={blockquote:B0,code:w0,def:M0,fences:x0,heading:O0,hr:_n,html:F0,lheading:Wb,list:P0,newline:v0,paragraph:Kb,table:ln,text:D0},Mc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),U0={...Xl,lheading:L0,table:Mc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex()},H0={...Xl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Yl).replace("hr",_n).replace("heading",` *#{1,6} *[^
1
+ import{bx as zl,j as q,aM as lt,bP as zn,r as Ve,F as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-2zrh5v4q.js";import{i as zb}from"./Check-G0F_u8Bs.js";import{a as jb}from"./Copy01-CySaexEv.js";import{e as S0,g as y0,f as A0,a as _0}from"./dialog-CXSGGmH2.js";import{n as I0}from"./Globe01-DaJqvzZX.js";import{k as k0,n as R0}from"./ZoomOut-B-oRMoEs.js";import{u as N0}from"./use-mobile-RtBQr8Gf.js";import{h as C0}from"./tab-id-BijBBRwE.js";function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=jl();function Vb(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},v0=/^(?:[ \t]*(?:\n|$))+/,w0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_n=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,O0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,Yb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wb=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),L0=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,D0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vl).getRegex(),er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,F0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kl).replace("tag",er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kb=le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),B0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kb).getRegex(),Xl={blockquote:B0,code:w0,def:M0,fences:x0,heading:O0,hr:_n,html:F0,lheading:Wb,list:P0,newline:v0,paragraph:Kb,table:ln,text:D0},Mc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),U0={...Xl,lheading:L0,table:Mc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex()},H0={...Xl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Yl).replace("hr",_n).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Wb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},q0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,G0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xb=/^( {2,}|\\)\n(?!\s*$)/,$0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tr=/[\p{P}\p{S}]/u,Zl=/[\s\p{P}\p{S}]/u,Zb=/[^\s\p{P}\p{S}]/u,z0=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zl).getRegex(),Qb=/(?!~)[\p{P}\p{S}]/u,j0=/(?!~)[\s\p{P}\p{S}]/u,V0=/(?:[^\s\p{P}\p{S}]|~)/u,Y0=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Jb=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,W0=le(Jb,"u").replace(/punct/g,tr).getRegex(),K0=le(Jb,"u").replace(/punct/g,Qb).getRegex(),eE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",X0=le(eE,"gu").replace(/notPunctSpace/g,Zb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),Z0=le(eE,"gu").replace(/notPunctSpace/g,V0).replace(/punctSpace/g,j0).replace(/punct/g,Qb).getRegex(),Q0=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Zb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),J0=le(/\\(punct)/,"gu").replace(/punct/g,tr).getRegex(),eS=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),tS=le(Kl).replace("(?:-->|$)","-->").getRegex(),nS=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",tS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jn=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rS=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",jn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tE=le(/^!?\[(label)\]\[(ref)\]/).replace("label",jn).replace("ref",Wl).getRegex(),nE=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wl).getRegex(),aS=le("reflink|nolink(?!\\()","g").replace("reflink",tE).replace("nolink",nE).getRegex(),Ql={_backpedal:ln,anyPunctuation:J0,autolink:eS,blockSkip:Y0,br:Xb,code:G0,del:ln,emStrongLDelim:W0,emStrongRDelimAst:X0,emStrongRDelimUnd:Q0,escape:q0,link:rS,nolink:nE,punctuation:z0,reflink:tE,reflinkSearch:aS,tag:nS,text:$0,url:ln},iS={...Ql,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",jn).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jn).getRegex()},_l={...Ql,emStrongRDelimAst:Z0,emStrongLDelim:K0,url:le(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},oS={..._l,br:le(Xb).replace("{2,}","*").getRegex(),text:le(_l.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xn={normal:Xl,gfm:U0,pedantic:H0},Jt={normal:Ql,gfm:_l,breaks:oS,pedantic:iS},sS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Pc=e=>sS[e];function Je(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,Pc)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,Pc);return e}function Fc(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function Bc(e,t){const n=e.replace(xe.findPipe,(i,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),r=n.split(xe.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(xe.slashPipe,"|");return r}function en(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function uS(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Uc(e,t,n,r,a){const i=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,u}function lS(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
3
3
  `).map(i=>{const o=i.match(n.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=a.length?i.slice(a.length):i}).join(`
4
4
  `)}var Vn=class{options;rules;lexer;constructor(e){this.options=e||Nt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:en(n,`
@@ -1 +1 @@
1
- import{c as a,e as o,j as i,N as l}from"./index-BUWOf6-H.js";function m(){const e=a.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{org:r}=o(t);let s;return e[1]!==r?(s=i.jsx(l,{to:"/$org/files",params:{org:r},replace:!0}),e[1]=r,e[2]=s):s=e[2],s}export{m as default};
1
+ import{c as a,e as o,j as i,N as l}from"./index-2zrh5v4q.js";function m(){const e=a.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{org:r}=o(t);let s;return e[1]!==r?(s=i.jsx(l,{to:"/$org/files",params:{org:r},replace:!0}),e[1]=r,e[2]=s):s=e[2],s}export{m as default};
@@ -1 +1 @@
1
- import{dE as C,c as d,j as c,ah as j,r as f,l as p,bd as b,dF as h,dG as v}from"./index-BUWOf6-H.js";import{L as N}from"./label-CK1XiDPB.js";const D=C,g=f.createContext({}),M=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=h();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=v(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=f.createContext({});function w(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,D as a,w as b,L as c,P as d,y as e,R as f};
1
+ import{dE as C,c as d,j as c,ah as j,r as f,l as p,bd as b,dF as h,dG as v}from"./index-2zrh5v4q.js";import{L as N}from"./label-D_cPa32z.js";const D=C,g=f.createContext({}),M=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=h();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=v(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=f.createContext({});function w(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,D as a,w as b,L as c,P as d,y as e,R as f};
@@ -1 +1 @@
1
- import{b as K,C as V,n as M,M as Q,J as Z,d as U,p as F,t as w,K as L,j as n,ah as $,H,I as T,c as D,r as B,B as Y,D as q,s as J}from"./index-BUWOf6-H.js";import{P as k}from"./index-BdUl5bJN.js";import{u as W}from"./use-org-auth-client-aAeyG-Cs.js";import{u as X}from"./use-debounced-autosave-CZ0xTx2w.js";import{A as ee}from"./avatar-6ZpKSJQ1.js";import{I as G}from"./input-C2XNQcRH.js";import{S as P,a as I,b as _,c as te}from"./settings-section-Cd7MHbmE.js";import{D as ne}from"./domain-settings-Bhf5R19l.js";import{S as ae}from"./switch-Dbe5CgqQ.js";import{c as se,f as oe}from"./use-organization-settings-DrhRsJWG.js";import{u as ie}from"./studio-tools-JGMjsS9V.js";import{c as re,b as le,d as ce,A as de,e as ue,g as me,a as ge,f as fe}from"./alert-dialog-iGippWYX.js";import{R as pe}from"./require-capability-qkGmH7NG.js";import"./sidebar-Bg21lFNS.js";import"./LayoutLeft-DP-M8mno.js";import"./use-mobile-oSorlQMv.js";import"./X-8dZUy9dd.js";import"./tooltip-cXMPTvhQ.js";import"./User01-DY8EdPzH.js";import"./card-DmJEBNvh.js";import"./ArrowUpRight-COlnzfbE.js";import"./badge-Brm7dRFm.js";import"./select-BVg_AKhS.js";import"./Check-ylcp47jh.js";import"./ChevronDown-DorDM-K-.js";import"./ChevronUp-C85SxyPM.js";import"./constants-D_FQAPnt.js";import"./use-capability-BI2Ao-_m.js";import"./access-gate-BjqlcKiO.js";import"./capability-load-error-u8-vFMPG.js";const he=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function xe(e){return typeof e=="string"&&he.has(e.trim().toLowerCase())}const je=H({name:T().min(1,"Name is required").max(255,"Name is too long"),slug:T().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens").refine(e=>!xe(e),"This organization URL is reserved by Studio"),logo:T().optional()});function be(e){const t=D.c(13),{value:f,onChange:d,name:s,disabled:l}=e,u=B.useRef(null);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>u.current?.click(),t[0]=c):c=t[0];const r=c;let m;t[1]!==d?(m=j=>{const b=j.target.files?.[0];if(!b)return;if(b.size>2097152){w.error("Image must be smaller than 2MB");return}const g=new FileReader;g.onerror=ye,g.onloadend=()=>{g.result&&d(g.result),u.current&&(u.current.value="")},g.readAsDataURL(b)},t[1]=d,t[2]=m):m=t[2];const a=m;let o;t[3]!==l||t[4]!==a?(o=n.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:l}),t[3]=l,t[4]=a,t[5]=o):o=t[5];const i=f||void 0,x=s??"?";let p;t[6]!==i||t[7]!==x?(p=n.jsx(ee,{url:i,fallback:x,shape:"square",size:"base"}),t[6]=i,t[7]=x,t[8]=p):p=t[8];let h;return t[9]!==l||t[10]!==o||t[11]!==p?(h=n.jsxs("button",{type:"button",onClick:r,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[o,p]}),t[9]=l,t[10]=o,t[11]=p,t[12]=h):h=t[12],h}function ye(){return w.error("Failed to read image")}function ve(){const e=K(),{org:t}=V(),f=W(),d=M(),s=Q({resolver:Z(je),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),l=U({mutationFn:async a=>{const o={name:a.name,slug:a.slug};a.logo&&(o.logo=a.logo);const i=await f.organization.update({data:o});if(i?.error)throw new Error(i.error.message||"Failed to update organization");return i},onSuccess:(a,o)=>{F("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),d.invalidateQueries({queryKey:L.organizations()}),d.invalidateQueries({queryKey:L.activeOrganization(t.slug)}),w.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,o)=>{F("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:a instanceof Error?a.message:String(a)}),w.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:u,flush:c}=X({save:async()=>{const a=s.control._formState.dirtyFields;if(Object.keys(a).length===0||!await s.trigger())return;const i=s.getValues(),x=s.control._defaultValues;s.reset(i,{keepValues:!0});try{await l.mutateAsync(i)}catch{s.reset(x,{keepValues:!0})}}}),r=s.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(P,{children:n.jsxs(I,{children:[n.jsx(_,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(be,{value:s.watch("logo"),onChange:a=>{s.setValue("logo",a??"",{shouldDirty:!0}),c()},name:s.watch("name")})}),n.jsx(_,{title:"Name",action:n.jsx($,{control:s.control,name:"name",render:({field:a})=>n.jsx(G,{id:"org-name",...a,onChange:o=>{a.onChange(o),u()},onBlur:()=>{a.onBlur(),c()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(_,{title:"URL",action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[m&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),n.jsx($,{control:s.control,name:"slug",render:({field:a})=>n.jsx("input",{id:"org-slug",value:a.value??"",name:a.name,ref:a.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const i=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");s.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),u()},onBlur:()=>{a.onBlur(),c()}})})]})}),(r.name||r.slug||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&n.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Se(){const e=D.c(6),t=se(),{mutate:f,isPending:d}=oe();let s;e[0]!==f?(s=u=>f(u),e[0]=f,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==d||e[4]!==s?(l=n.jsx(P,{title:"Task board",description:"A board for tracking org tasks by status, priority, and assignee.",children:n.jsx(I,{children:n.jsx(_,{title:"Enable task board",description:"Adds a Board entry to the sidebar for this organization.",action:n.jsx(ae,{checked:t,disabled:d,onCheckedChange:s})})})}),e[2]=t,e[3]=d,e[4]=s,e[5]=l):l=e[5],l}function ze(){const e=D.c(42),{org:t}=V(),[f,d]=B.useState(!1),[s,l]=B.useState(""),u=ie();let c;e[0]!==t.id||e[1]!==u?(c=async()=>{await u.call("ORGANIZATION_DELETE",{id:t.id})},e[0]=t.id,e[1]=u,e[2]=c):c=e[2];let r;e[3]!==t.id||e[4]!==t.slug?(r=()=>{F("organization_deleted",{organization_id:t.id}),localStorage.getItem(q.lastOrgSlug())===t.slug&&localStorage.removeItem(q.lastOrgSlug()),J(),w.success("Organization deleted"),window.location.href="/"},e[3]=t.id,e[4]=t.slug,e[5]=r):r=e[5];let m;e[6]!==c||e[7]!==r?(m={mutationFn:c,onSuccess:r,onError:Ce},e[6]=c,e[7]=r,e[8]=m):m=e[8];const a=U(m);let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=()=>d(!0),e[9]=o):o=e[9];let i;e[10]!==a.isPending?(i=n.jsx(P,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(I,{className:"border-destructive/40",children:n.jsx(_,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(Y,{variant:"destructive",size:"sm",onClick:o,disabled:a.isPending,children:"Delete"})})})}),e[10]=a.isPending,e[11]=i):i=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=N=>{d(N),N||l("")},e[12]=x):x=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(re,{children:"Delete Organization?"}),e[13]=p):p=e[13];let h;e[14]!==t.name?(h=n.jsxs("p",{children:["This will permanently delete all data associated with"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name}),". This action cannot be undone."]}),e[14]=t.name,e[15]=h):h=e[15];let j;e[16]!==t.name?(j=n.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name})," ","to confirm:"]}),e[16]=t.name,e[17]=j):j=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=N=>l(N.target.value),e[18]=b):b=e[18];let g;e[19]!==s||e[20]!==t.name?(g=n.jsx(G,{value:s,onChange:b,placeholder:t.name,autoFocus:!0}),e[19]=s,e[20]=t.name,e[21]=g):g=e[21];let y;e[22]!==g||e[23]!==h||e[24]!==j?(y=n.jsxs(le,{children:[p,n.jsx(ce,{asChild:!0,children:n.jsxs("div",{children:[h,j,g]})})]}),e[22]=g,e[23]=h,e[24]=j,e[25]=y):y=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(de,{children:"Cancel"}),e[26]=O):O=e[26];let v;e[27]!==a?(v=()=>a.mutate(),e[27]=a,e[28]=v):v=e[28];const E=s!==t.name||a.isPending,R=a.isPending?"Deleting…":"Delete organization";let S;e[29]!==v||e[30]!==E||e[31]!==R?(S=n.jsxs(ue,{children:[O,n.jsx(me,{onClick:v,disabled:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:R})]}),e[29]=v,e[30]=E,e[31]=R,e[32]=S):S=e[32];let z;e[33]!==y||e[34]!==S?(z=n.jsxs(ge,{children:[y,S]}),e[33]=y,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==f||e[37]!==z?(C=n.jsx(fe,{open:f,onOpenChange:x,children:z}),e[36]=f,e[37]=z,e[38]=C):C=e[38];let A;return e[39]!==C||e[40]!==i?(A=n.jsxs(n.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=A):A=e[41],A}function Ce(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function we(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(k,{children:n.jsx(k.Content,{children:n.jsx(k.Body,{children:n.jsxs(te,{children:[n.jsx(k.Title,{children:"Organization"}),n.jsx(ve,{}),n.jsx(ne,{}),n.jsx(Se,{}),n.jsx(ze,{})]})})})}),e[0]=t):t=e[0],t}function nt(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(pe,{capability:"org:manage",area:"general settings",children:n.jsx(we,{})}),e[0]=t):t=e[0],t}export{nt as default};
1
+ import{b as K,C as V,n as M,M as Q,J as Z,d as U,p as F,t as w,K as L,j as n,ah as $,H,I as T,c as D,r as B,B as Y,D as q,s as J}from"./index-2zrh5v4q.js";import{P as k}from"./index-CiX7itoV.js";import{u as W}from"./use-org-auth-client-Cimp8Wf1.js";import{u as X}from"./use-debounced-autosave-Bg6kPddl.js";import{A as ee}from"./avatar-qb3xnlcx.js";import{I as G}from"./input-szG-lwZi.js";import{S as P,a as I,b as _,c as te}from"./settings-section-ui7p-DEy.js";import{D as ne}from"./domain-settings-C7K4S9Xa.js";import{S as ae}from"./switch-C4nwCCCe.js";import{c as se,f as oe}from"./use-organization-settings-C_QqqhIc.js";import{u as ie}from"./studio-tools-Y8y5OadJ.js";import{c as re,b as le,d as ce,A as de,e as ue,g as me,a as ge,f as fe}from"./alert-dialog-CsK5Fy3G.js";import{R as pe}from"./require-capability-BynCY9-h.js";import"./sidebar-D9bnVPLR.js";import"./LayoutLeft-DO-n67Hm.js";import"./use-mobile-RtBQr8Gf.js";import"./X-ixAJccZt.js";import"./tooltip-SR8VERcH.js";import"./User01-BPv-NsEb.js";import"./card-BUiCTEhj.js";import"./ArrowUpRight-BgtforoR.js";import"./badge-CbP9K2Qf.js";import"./select-DV4XrWOt.js";import"./Check-G0F_u8Bs.js";import"./ChevronDown-Dklvfb_j.js";import"./ChevronUp-nh84F3SM.js";import"./constants-D_FQAPnt.js";import"./use-capability-CUVgBn-w.js";import"./access-gate-DWSQg9oj.js";import"./capability-load-error-e_UwVlzK.js";const he=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function xe(e){return typeof e=="string"&&he.has(e.trim().toLowerCase())}const je=H({name:T().min(1,"Name is required").max(255,"Name is too long"),slug:T().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens").refine(e=>!xe(e),"This organization URL is reserved by Studio"),logo:T().optional()});function be(e){const t=D.c(13),{value:f,onChange:d,name:s,disabled:l}=e,u=B.useRef(null);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>u.current?.click(),t[0]=c):c=t[0];const r=c;let m;t[1]!==d?(m=j=>{const b=j.target.files?.[0];if(!b)return;if(b.size>2097152){w.error("Image must be smaller than 2MB");return}const g=new FileReader;g.onerror=ye,g.onloadend=()=>{g.result&&d(g.result),u.current&&(u.current.value="")},g.readAsDataURL(b)},t[1]=d,t[2]=m):m=t[2];const a=m;let o;t[3]!==l||t[4]!==a?(o=n.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:l}),t[3]=l,t[4]=a,t[5]=o):o=t[5];const i=f||void 0,x=s??"?";let p;t[6]!==i||t[7]!==x?(p=n.jsx(ee,{url:i,fallback:x,shape:"square",size:"base"}),t[6]=i,t[7]=x,t[8]=p):p=t[8];let h;return t[9]!==l||t[10]!==o||t[11]!==p?(h=n.jsxs("button",{type:"button",onClick:r,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[o,p]}),t[9]=l,t[10]=o,t[11]=p,t[12]=h):h=t[12],h}function ye(){return w.error("Failed to read image")}function ve(){const e=K(),{org:t}=V(),f=W(),d=M(),s=Q({resolver:Z(je),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),l=U({mutationFn:async a=>{const o={name:a.name,slug:a.slug};a.logo&&(o.logo=a.logo);const i=await f.organization.update({data:o});if(i?.error)throw new Error(i.error.message||"Failed to update organization");return i},onSuccess:(a,o)=>{F("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),d.invalidateQueries({queryKey:L.organizations()}),d.invalidateQueries({queryKey:L.activeOrganization(t.slug)}),w.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,o)=>{F("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:a instanceof Error?a.message:String(a)}),w.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:u,flush:c}=X({save:async()=>{const a=s.control._formState.dirtyFields;if(Object.keys(a).length===0||!await s.trigger())return;const i=s.getValues(),x=s.control._defaultValues;s.reset(i,{keepValues:!0});try{await l.mutateAsync(i)}catch{s.reset(x,{keepValues:!0})}}}),r=s.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(P,{children:n.jsxs(I,{children:[n.jsx(_,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(be,{value:s.watch("logo"),onChange:a=>{s.setValue("logo",a??"",{shouldDirty:!0}),c()},name:s.watch("name")})}),n.jsx(_,{title:"Name",action:n.jsx($,{control:s.control,name:"name",render:({field:a})=>n.jsx(G,{id:"org-name",...a,onChange:o=>{a.onChange(o),u()},onBlur:()=>{a.onBlur(),c()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(_,{title:"URL",action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[m&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),n.jsx($,{control:s.control,name:"slug",render:({field:a})=>n.jsx("input",{id:"org-slug",value:a.value??"",name:a.name,ref:a.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const i=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");s.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),u()},onBlur:()=>{a.onBlur(),c()}})})]})}),(r.name||r.slug||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&n.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Se(){const e=D.c(6),t=se(),{mutate:f,isPending:d}=oe();let s;e[0]!==f?(s=u=>f(u),e[0]=f,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==d||e[4]!==s?(l=n.jsx(P,{title:"Task board",description:"A board for tracking org tasks by status, priority, and assignee.",children:n.jsx(I,{children:n.jsx(_,{title:"Enable task board",description:"Adds a Board entry to the sidebar for this organization.",action:n.jsx(ae,{checked:t,disabled:d,onCheckedChange:s})})})}),e[2]=t,e[3]=d,e[4]=s,e[5]=l):l=e[5],l}function ze(){const e=D.c(42),{org:t}=V(),[f,d]=B.useState(!1),[s,l]=B.useState(""),u=ie();let c;e[0]!==t.id||e[1]!==u?(c=async()=>{await u.call("ORGANIZATION_DELETE",{id:t.id})},e[0]=t.id,e[1]=u,e[2]=c):c=e[2];let r;e[3]!==t.id||e[4]!==t.slug?(r=()=>{F("organization_deleted",{organization_id:t.id}),localStorage.getItem(q.lastOrgSlug())===t.slug&&localStorage.removeItem(q.lastOrgSlug()),J(),w.success("Organization deleted"),window.location.href="/"},e[3]=t.id,e[4]=t.slug,e[5]=r):r=e[5];let m;e[6]!==c||e[7]!==r?(m={mutationFn:c,onSuccess:r,onError:Ce},e[6]=c,e[7]=r,e[8]=m):m=e[8];const a=U(m);let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=()=>d(!0),e[9]=o):o=e[9];let i;e[10]!==a.isPending?(i=n.jsx(P,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(I,{className:"border-destructive/40",children:n.jsx(_,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(Y,{variant:"destructive",size:"sm",onClick:o,disabled:a.isPending,children:"Delete"})})})}),e[10]=a.isPending,e[11]=i):i=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=N=>{d(N),N||l("")},e[12]=x):x=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(re,{children:"Delete Organization?"}),e[13]=p):p=e[13];let h;e[14]!==t.name?(h=n.jsxs("p",{children:["This will permanently delete all data associated with"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name}),". This action cannot be undone."]}),e[14]=t.name,e[15]=h):h=e[15];let j;e[16]!==t.name?(j=n.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name})," ","to confirm:"]}),e[16]=t.name,e[17]=j):j=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=N=>l(N.target.value),e[18]=b):b=e[18];let g;e[19]!==s||e[20]!==t.name?(g=n.jsx(G,{value:s,onChange:b,placeholder:t.name,autoFocus:!0}),e[19]=s,e[20]=t.name,e[21]=g):g=e[21];let y;e[22]!==g||e[23]!==h||e[24]!==j?(y=n.jsxs(le,{children:[p,n.jsx(ce,{asChild:!0,children:n.jsxs("div",{children:[h,j,g]})})]}),e[22]=g,e[23]=h,e[24]=j,e[25]=y):y=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(de,{children:"Cancel"}),e[26]=O):O=e[26];let v;e[27]!==a?(v=()=>a.mutate(),e[27]=a,e[28]=v):v=e[28];const E=s!==t.name||a.isPending,R=a.isPending?"Deleting…":"Delete organization";let S;e[29]!==v||e[30]!==E||e[31]!==R?(S=n.jsxs(ue,{children:[O,n.jsx(me,{onClick:v,disabled:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:R})]}),e[29]=v,e[30]=E,e[31]=R,e[32]=S):S=e[32];let z;e[33]!==y||e[34]!==S?(z=n.jsxs(ge,{children:[y,S]}),e[33]=y,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==f||e[37]!==z?(C=n.jsx(fe,{open:f,onOpenChange:x,children:z}),e[36]=f,e[37]=z,e[38]=C):C=e[38];let A;return e[39]!==C||e[40]!==i?(A=n.jsxs(n.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=A):A=e[41],A}function Ce(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function we(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(k,{children:n.jsx(k.Content,{children:n.jsx(k.Body,{children:n.jsxs(te,{children:[n.jsx(k.Title,{children:"Organization"}),n.jsx(ve,{}),n.jsx(ne,{}),n.jsx(Se,{}),n.jsx(ze,{})]})})})}),e[0]=t):t=e[0],t}function nt(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(pe,{capability:"org:manage",area:"general settings",children:n.jsx(we,{})}),e[0]=t):t=e[0],t}export{nt as default};
@@ -1 +1 @@
1
- import{c as A,j as t,C as F,a as Y,n as M,r as T,ac as H,i as z,d as B,t as U,dH as W,K as R,m as X,B as Z,l as D,v as ee,w as te}from"./index-BUWOf6-H.js";import{D as ne,a as se,d as oe,e as ie}from"./dialog-C6_0qLBU.js";import{C as le}from"./collection-search-BebQySxJ.js";import{u as re}from"./use-debounced-value-B52whIH7.js";import{b as Q,u as ae}from"./use-connection-CD2Fnptb.js";import{u as L}from"./use-mcp-client-qnk43eG1.js";import{W as ce,S as V}from"./constants-D_FQAPnt.js";import{a as K}from"./authenticate-and-persist-oauth-BVhm4ZHQ.js";import{b as J}from"./Settings02-s4dN6VnR.js";import{I as ue}from"./agent-icon-DCK7PpQ3.js";import{u as de}from"./use-mcp-tools-SncKc9ct.js";import{e as me}from"./extract-connection-data-BKfZXo3n.js";import{c as fe}from"./use-navigate-to-agent-7gJqLFkE.js";import{g as xe,p as q,f as ge}from"./provision-repo-scoped-github-connection-CB4ICKHq.js";function G(y){const e=A.c(4),{size:n,className:i}=y;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=h):h=e[0];let r;return e[1]!==i||e[2]!==n?(r=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:i,children:h}),e[1]=i,e[2]=n,e[3]=r):r=e[3],r}function he(y,e){const n=A.c(12),{org:i}=F();let h;n[0]!==i.id?(h=ce.REGISTRY(i.id),n[0]=i.id,n[1]=h):h=n[1];const r=h;let o;n[2]!==i.id||n[3]!==i.slug||n[4]!==r?(o={connectionId:r,orgId:i.id,orgSlug:i.slug},n[2]=i.id,n[3]=i.slug,n[4]=r,n[5]=o):o=n[5];const p=L(o);let c;n[6]!==y?(c={name:y},n[6]=y,n[7]=c):c=n[7];const b=e?.enabled??!0;let C;return n[8]!==p||n[9]!==c||n[10]!==b?(C={client:p,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:c,enabled:b,staleTime:3e5,select:pe},n[8]=p,n[9]=c,n[10]=b,n[11]=C):C=n[11],de(C)}function pe(y){return y.structuredContent?.item??null}const be="deco/mcp-github";function ye(y){const{org:e}=F(),{data:n}=Y.useSession(),i=Q(),h=M(),[r,o]=T.useState("idle"),[p,c]=T.useState(null),[b,C]=T.useState(null),{data:j,isLoading:u}=he(be,{enabled:y.enabled}),l=T.useRef(!1);y.enabled&&j&&!u&&!l.current&&n?.user?.id&&r==="idle"&&(l.current=!0,d());async function d(){if(!(!j||!n?.user?.id||!e))try{o("installing"),c(null);const a=me(j,e.id,n.user.id,{remoteIndex:0});if(!a.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:N}=await i.create.mutateAsync(a);o("authenticating");const x=await K({connectionId:N,orgId:e.id,orgSlug:e.slug,persistFallback:s=>i.update.mutateAsync({id:N,data:{connection_token:s}}).then(()=>{})});if(x.ran&&!x.ok){try{await i.delete.mutateAsync(N)}catch{}throw new Error(x.error&&x.error!=="no token received"?x.error:"No token received from GitHub")}H(h,e.id),C(a),o("ready")}catch(a){c(a instanceof Error?a.message:String(a)),o("error")}}function m(){o("idle"),c(null),C(null),l.current=!1}return y.enabled&&u&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:p,connection:b,retry:m}}function De(y){const e=A.c(22),{open:n,onOpenChange:i,title:h,onImportComplete:r,mode:o}=y,p=o===void 0?"agent":o,c=h??(p==="connection"?"Add repo":"Import from GitHub"),[b,C]=T.useState(null);let j;e[0]!==c?(j=t.jsx(ne,{className:"sr-only",children:t.jsx(se,{children:c})}),e[0]=c,e[1]=j):j=e[1];let u;e[2]!==c||e[3]!==b?(u=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:b?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(J,{size:16})}),t.jsx("img",{src:b.avatarUrl,alt:b.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:b.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(G,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:c})]})}),e[2]=c,e[3]=b,e[4]=u):u=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=l):l=e[5];let d;e[6]!==i?(d=()=>i(!1),e[6]=i,e[7]=d):d=e[7];let m;e[8]!==p||e[9]!==r||e[10]!==n||e[11]!==b||e[12]!==d?(m=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:l,children:t.jsx(je,{open:n,onComplete:d,selectedInstallation:b,onSelectInstallation:C,onImportComplete:r,mode:p})})}),e[8]=p,e[9]=r,e[10]=n,e[11]=b,e[12]=d,e[13]=m):m=e[13];let a;e[14]!==j||e[15]!==u||e[16]!==m?(a=t.jsxs(oe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[j,u,m]}),e[14]=j,e[15]=u,e[16]=m,e[17]=a):a=e[17];let f;return e[18]!==i||e[19]!==n||e[20]!==a?(f=t.jsx(ie,{open:n,onOpenChange:i,children:a}),e[18]=i,e[19]=n,e[20]=a,e[21]=f):f=e[21],f}function je({open:y,onComplete:e,selectedInstallation:n,onSelectInstallation:i,onImportComplete:h,mode:r="agent"}){const{org:o}=F(),p=M(),c=fe(),[b,C]=T.useState(null),j=ae({slug:"mcp-github"}),u=xe(j),l=ye({enabled:y&&u.length===0}),d=u.length===1?u[0]??null:b,m=L({connectionId:d?.id??"",orgId:o.id,orgSlug:o.slug}),a=L({connectionId:V,orgId:o.id,orgSlug:o.slug}),f=async(s,v)=>{try{const _=await m.callTool({name:"get_file_contents",arguments:{owner:s.owner,repo:s.name,path:v}});if(_.isError)return null;const I=_.content?.find(g=>g.type==="resource")?.resource?.text;if(!I)return null;try{const g=JSON.parse(I);return typeof g=="string"?g:JSON.stringify(g)}catch{return I}}catch{return null}},N=(s,v)=>{Promise.all([f(v,"AGENTS.md"),f(v,"CLAUDE.md")]).then(async([S,_])=>{const w=S??_??null;w&&(await a.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s,data:{metadata:{instructions:w}}}}),H(p,o.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},x=B({mutationFn:async s=>{if(!d||!n)throw new Error("No GitHub connection or installation");const v=n.installationId;if(r==="connection"){const{childConnectionId:w}=await q({orgSlug:o.slug,sourceConnection:d,installationId:v,owner:s.owner,repo:s.name,githubCallTool:I=>m.callTool(I),selfCallTool:I=>a.callTool(I),orgShared:!0});return{virtualMcpId:null,repo:s,connectionId:w,item:null}}const{childConnectionId:S}=await q({orgSlug:o.slug,sourceConnection:d,installationId:v,owner:s.owner,repo:s.name,githubCallTool:w=>m.callTool(w),selfCallTool:w=>a.callTool(w)});let _=null;try{const w=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s.name,description:s.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:s.owner,name:s.name,url:s.url,installationId:v,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),I=w.structuredContent??w,g=I.item?.id;if(!I.item||!g)throw new Error("Failed to create the imported agent");return _=g,{virtualMcpId:g,repo:s,connectionId:S,item:I.item}}catch(w){throw _&&await a.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:_}}).catch(()=>{}),await a.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),w}},onSuccess:({virtualMcpId:s,repo:v,connectionId:S,item:_})=>{if(r==="connection"||!s||!_){H(p,o.id),W(p,o.id),U.success(`Added ${v.name}`),e();return}if(p.setQueryData(R.collectionItem(a,o.id,"","VIRTUAL_MCP",s),{item:_}),H(p,o.id),N(s,v),h){h({virtualMcpId:s,repo:v,connectionId:S});return}U.success(`Imported ${v.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),c(s)},onError:s=>{U.error("Failed to import repo: "+(s instanceof Error?s.message:"Unknown error"))}});return l.status==="installing"||l.status==="authenticating"?t.jsx($,{status:l.status,error:null,retry:l.retry}):l.status==="error"?t.jsx($,{status:"error",error:l.error,retry:l.retry}):u.length===0&&l.status==="idle"?t.jsx($,{status:"installing",error:null,retry:l.retry}):u.length>1&&!d?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),u.map(s=>t.jsxs("button",{type:"button",onClick:()=>C(s),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?t.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(G,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}):d?n?t.jsx(we,{connectionId:d.id,orgId:o.id,orgSlug:o.slug,installation:n,onSelectRepo:s=>x.mutate(s),isSaving:x.isPending}):t.jsx(Ne,{connectionId:d.id,orgId:o.id,orgSlug:o.slug,onSelect:i,showBackButton:u.length>1,onBack:()=>C(null)}):null}function Ne(y){const e=A.c(47),{connectionId:n,orgId:i,orgSlug:h,onSelect:r,showBackButton:o,onBack:p}=y;let c;e[0]!==i||e[1]!==h?(c={connectionId:V,orgId:i,orgSlug:h},e[0]=i,e[1]=h,e[2]=c):c=e[2];const b=L(c),C=M(),j=Q();let u;e[3]!==n||e[4]!==i?(u=R.githubUserOrgs(i,n),e[3]=n,e[4]=i,e[5]=u):u=e[5];let l;e[6]!==n||e[7]!==b?(l=()=>ge(g=>b.callTool(g),n),e[6]=n,e[7]=b,e[8]=l):l=e[8];let d;e[9]!==u||e[10]!==l?(d={queryKey:u,queryFn:l},e[9]=u,e[10]=l,e[11]=d):d=e[11];const m=X(d);let a;e[12]!==j||e[13]!==n||e[14]!==m||e[15]!==i||e[16]!==h||e[17]!==C?(a={mutationFn:async()=>{const g=await K({connectionId:n,orgId:i,orgSlug:h,persistFallback:E=>j.update.mutateAsync({id:n,data:{connection_token:E}}).then(Ce)});if(g.ran&&!g.ok)throw new Error(g.error??"no token received");const k=new URL(`/api/${h}/mcp/${n}`,window.location.origin);await C.invalidateQueries({queryKey:R.isMCPAuthenticated(k.href,null)}),await C.invalidateQueries({queryKey:R.mcpClientPrefix()}),await m.refetch()},onError:ve},e[12]=j,e[13]=n,e[14]=m,e[15]=i,e[16]=h,e[17]=C,e[18]=a):a=e[18];const f=B(a);if(m.isLoading){let g;return e[19]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=g):g=e[19],g}if(m.isError){let g,k;e[20]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),k=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=g,e[21]=k):(g=e[20],k=e[21]);let E;e[22]!==f?(E=()=>f.mutate(),e[22]=f,e[23]=E):E=e[23];let P;e[24]!==f.isPending?(P=f.isPending?t.jsx(z,{size:14,className:"animate-spin"}):t.jsx(G,{className:"size-3.5"}),e[24]=f.isPending,e[25]=P):P=e[25];let O;return e[26]!==f.isPending||e[27]!==E||e[28]!==P?(O=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[g,k,t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:E,disabled:f.isPending,children:[P,"Reconnect GitHub"]})]}),e[26]=f.isPending,e[27]=E,e[28]=P,e[29]=O):O=e[29],O}const N=m.data;if(!N)return null;let x;e[30]!==p||e[31]!==o?(x=o&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(J,{size:12}),"Change connection"]})}),e[30]=p,e[31]=o,e[32]=x):x=e[32];let s;if(e[33]!==N.installations||e[34]!==r){let g;e[36]!==r?(g=k=>t.jsxs("button",{type:"button",onClick:()=>r(k),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:k.avatarUrl,alt:k.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:k.login}),k.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},k.installationId),e[36]=r,e[37]=g):g=e[37],s=N.installations.map(g),e[33]=N.installations,e[34]=r,e[35]=s}else s=e[35];let v;e[38]!==s?(v=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:s}),e[38]=s,e[39]=v):v=e[39];const S=N.appSlug?`https://github.com/apps/${N.appSlug}/installations/new`:"https://github.com/settings/installations";let _;e[40]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=_):_=e[40];let w;e[41]!==S?(w=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",_]})}),e[41]=S,e[42]=w):w=e[42];let I;return e[43]!==w||e[44]!==x||e[45]!==v?(I=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[x,v,w]}),e[43]=w,e[44]=x,e[45]=v,e[46]=I):I=e[46],I}function ve(y){U.error("Failed to reconnect GitHub: "+(y instanceof Error?y.message:"Unknown error"))}function Ce(){}function we(y){const e=A.c(20),{connectionId:n,orgId:i,orgSlug:h,installation:r,onSelectRepo:o,isSaving:p}=y,[c,b]=T.useState(""),C=re(c,300),j=T.useDeferredValue(C),u=c!==j;let l;e[0]!==u||e[1]!==c?(l=t.jsx(le,{placeholder:"Search repositories...",value:c,onChange:b,isSearching:u}),e[0]=u,e[1]=c,e[2]=l):l=e[2];const d=u?"opacity-40":"opacity-100";let m;e[3]!==d?(m=D("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",d),e[3]=d,e[4]=m):m=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=a):a=e[5];let f;e[6]!==n||e[7]!==j||e[8]!==r||e[9]!==p||e[10]!==o||e[11]!==i||e[12]!==h?(f=t.jsx(T.Suspense,{fallback:a,children:t.jsx(Se,{connectionId:n,orgId:i,orgSlug:h,installation:r,query:j,onSelectRepo:o,isSaving:p})}),e[6]=n,e[7]=j,e[8]=r,e[9]=p,e[10]=o,e[11]=i,e[12]=h,e[13]=f):f=e[13];let N;e[14]!==m||e[15]!==f?(N=t.jsx("div",{className:m,children:f}),e[14]=m,e[15]=f,e[16]=N):N=e[16];let x;return e[17]!==l||e[18]!==N?(x=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[l,N]}),e[17]=l,e[18]=N,e[19]=x):x=e[19],x}function Se(y){const e=A.c(29),{connectionId:n,orgId:i,orgSlug:h,installation:r,query:o,onSelectRepo:p,isSaving:c}=y;let b;e[0]!==n||e[1]!==i||e[2]!==h?(b={connectionId:n,orgId:i,orgSlug:h},e[0]=n,e[1]=i,e[2]=h,e[3]=b):b=e[3];const C=L(b),j=r.type==="User"?"user":"org",u=o?`${j}:${r.login} ${o} in:name`:`${j}:${r.login}`;let l;e[4]!==n||e[5]!==r.login||e[6]!==i||e[7]!==o?(l=R.githubOrgRepos(i,n,r.login,o),e[4]=n,e[5]=r.login,e[6]=i,e[7]=o,e[8]=l):l=e[8];let d;e[9]!==C||e[10]!==u?(d=async x=>{const{signal:s}=x,S=(await C.callTool({name:"search_repositories",arguments:{query:u,page:1,perPage:30}},void 0,{signal:s})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(Ie)},e[9]=C,e[10]=u,e[11]=d):d=e[11];let m;e[12]!==l||e[13]!==d?(m={queryKey:l,queryFn:d},e[12]=l,e[13]=d,e[14]=m):m=e[14];const{data:a}=ee(m);if(a.length===0){let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=x):x=e[15];let s;e[16]!==o?(s=o&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=o,e[17]=s):s=e[17];let v;return e[18]!==s?(v=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[x,s]}),e[18]=s,e[19]=v):v=e[19],v}let f;if(e[20]!==c||e[21]!==p||e[22]!==a){let x;e[24]!==c||e[25]!==p?(x=s=>t.jsxs("button",{type:"button",onClick:()=>p(s),disabled:c,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(G,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:s.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[s.private?t.jsx(te,{size:10}):t.jsx(ue,{size:10}),s.private?"Private":"Public"]})]},s.fullName),e[24]=c,e[25]=p,e[26]=x):x=e[26],f=a.map(x),e[20]=c,e[21]=p,e[22]=a,e[23]=f}else f=e[23];let N;return e[27]!==f?(N=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:f}),e[27]=f,e[28]=N):N=e[28],N}function Ie(y){return{name:y.name,fullName:y.full_name,owner:y.full_name.split("/")[0]??"",url:y.html_url,private:y.private,description:y.description,updatedAt:y.updated_at}}function $(y){const e=A.c(33),{status:n,error:i,retry:h}=y;if(n==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(G,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=_):_=e[1];const w=i??"Something went wrong while connecting to GitHub.";let I;e[2]!==w?(I=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[_,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=I):I=e[3];let g;e[4]!==h?(g=t.jsx("button",{type:"button",onClick:h,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=h,e[5]=g):g=e[5];let k;return e[6]!==I||e[7]!==g?(k=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,I,g]}),e[6]=I,e[7]=g,e[8]=k):k=e[8],k}const r=n==="authenticating";let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(G,{className:"size-5 text-foreground"})}),e[9]=o):o=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs("div",{className:"relative size-10",children:[o,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=p):p=e[10];const c=r?"Authenticating with GitHub":"Setting up GitHub";let b;e[11]!==c?(b=t.jsx("p",{className:"text-sm font-medium",children:c}),e[11]=c,e[12]=b):b=e[12];const C=r?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let j;e[13]!==C?(j=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=j):j=e[14];let u;e[15]!==b||e[16]!==j?(u=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[b,j]}),e[15]=b,e[16]=j,e[17]=u):u=e[17];const l=r?"bg-muted-foreground/30":"bg-foreground animate-pulse";let d;e[18]!==l?(d=D("size-1.5 rounded-full",l),e[18]=l,e[19]=d):d=e[19];let m;e[20]!==d?(m=t.jsx("span",{className:d}),e[20]=d,e[21]=m):m=e[21];const a=r?"bg-foreground animate-pulse":"bg-muted-foreground/30";let f;e[22]!==a?(f=D("size-1.5 rounded-full",a),e[22]=a,e[23]=f):f=e[23];let N;e[24]!==f?(N=t.jsx("span",{className:f}),e[24]=f,e[25]=N):N=e[25];let x;e[26]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=x):x=e[26];let s;e[27]!==m||e[28]!==N?(s=t.jsxs("div",{className:"flex items-center gap-1.5",children:[m,N,x]}),e[27]=m,e[28]=N,e[29]=s):s=e[29];let v;return e[30]!==s||e[31]!==u?(v=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[p,u,s]}),e[30]=s,e[31]=u,e[32]=v):v=e[32],v}export{De as G,G as a,ye as b,he as u};
1
+ import{c as A,j as t,C as F,a as Y,n as M,r as T,ac as H,i as z,d as B,t as U,dH as W,K as R,m as X,B as Z,l as D,v as ee,w as te}from"./index-2zrh5v4q.js";import{D as ne,a as se,d as oe,e as ie}from"./dialog-CXSGGmH2.js";import{C as le}from"./collection-search-Dn5IKvmR.js";import{u as re}from"./use-debounced-value-lYoqfMQ9.js";import{b as Q,u as ae}from"./use-connection-BDf5JCk0.js";import{u as L}from"./use-mcp-client-B9NPxBrU.js";import{W as ce,S as V}from"./constants-D_FQAPnt.js";import{a as K}from"./authenticate-and-persist-oauth-C3t87EAj.js";import{b as J}from"./Settings02-Be48EyR2.js";import{I as ue}from"./agent-icon-BzJUdPiS.js";import{u as de}from"./use-mcp-tools-BCQu9ktT.js";import{e as me}from"./extract-connection-data-Bc9EJMAu.js";import{c as fe}from"./use-navigate-to-agent-CScCdIke.js";import{g as xe,p as q,f as ge}from"./provision-repo-scoped-github-connection-CB4ICKHq.js";function G(y){const e=A.c(4),{size:n,className:i}=y;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=h):h=e[0];let r;return e[1]!==i||e[2]!==n?(r=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:i,children:h}),e[1]=i,e[2]=n,e[3]=r):r=e[3],r}function he(y,e){const n=A.c(12),{org:i}=F();let h;n[0]!==i.id?(h=ce.REGISTRY(i.id),n[0]=i.id,n[1]=h):h=n[1];const r=h;let o;n[2]!==i.id||n[3]!==i.slug||n[4]!==r?(o={connectionId:r,orgId:i.id,orgSlug:i.slug},n[2]=i.id,n[3]=i.slug,n[4]=r,n[5]=o):o=n[5];const p=L(o);let c;n[6]!==y?(c={name:y},n[6]=y,n[7]=c):c=n[7];const b=e?.enabled??!0;let C;return n[8]!==p||n[9]!==c||n[10]!==b?(C={client:p,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:c,enabled:b,staleTime:3e5,select:pe},n[8]=p,n[9]=c,n[10]=b,n[11]=C):C=n[11],de(C)}function pe(y){return y.structuredContent?.item??null}const be="deco/mcp-github";function ye(y){const{org:e}=F(),{data:n}=Y.useSession(),i=Q(),h=M(),[r,o]=T.useState("idle"),[p,c]=T.useState(null),[b,C]=T.useState(null),{data:j,isLoading:u}=he(be,{enabled:y.enabled}),l=T.useRef(!1);y.enabled&&j&&!u&&!l.current&&n?.user?.id&&r==="idle"&&(l.current=!0,d());async function d(){if(!(!j||!n?.user?.id||!e))try{o("installing"),c(null);const a=me(j,e.id,n.user.id,{remoteIndex:0});if(!a.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:N}=await i.create.mutateAsync(a);o("authenticating");const x=await K({connectionId:N,orgId:e.id,orgSlug:e.slug,persistFallback:s=>i.update.mutateAsync({id:N,data:{connection_token:s}}).then(()=>{})});if(x.ran&&!x.ok){try{await i.delete.mutateAsync(N)}catch{}throw new Error(x.error&&x.error!=="no token received"?x.error:"No token received from GitHub")}H(h,e.id),C(a),o("ready")}catch(a){c(a instanceof Error?a.message:String(a)),o("error")}}function m(){o("idle"),c(null),C(null),l.current=!1}return y.enabled&&u&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:p,connection:b,retry:m}}function De(y){const e=A.c(22),{open:n,onOpenChange:i,title:h,onImportComplete:r,mode:o}=y,p=o===void 0?"agent":o,c=h??(p==="connection"?"Add repo":"Import from GitHub"),[b,C]=T.useState(null);let j;e[0]!==c?(j=t.jsx(ne,{className:"sr-only",children:t.jsx(se,{children:c})}),e[0]=c,e[1]=j):j=e[1];let u;e[2]!==c||e[3]!==b?(u=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:b?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(J,{size:16})}),t.jsx("img",{src:b.avatarUrl,alt:b.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:b.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(G,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:c})]})}),e[2]=c,e[3]=b,e[4]=u):u=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=l):l=e[5];let d;e[6]!==i?(d=()=>i(!1),e[6]=i,e[7]=d):d=e[7];let m;e[8]!==p||e[9]!==r||e[10]!==n||e[11]!==b||e[12]!==d?(m=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:l,children:t.jsx(je,{open:n,onComplete:d,selectedInstallation:b,onSelectInstallation:C,onImportComplete:r,mode:p})})}),e[8]=p,e[9]=r,e[10]=n,e[11]=b,e[12]=d,e[13]=m):m=e[13];let a;e[14]!==j||e[15]!==u||e[16]!==m?(a=t.jsxs(oe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[j,u,m]}),e[14]=j,e[15]=u,e[16]=m,e[17]=a):a=e[17];let f;return e[18]!==i||e[19]!==n||e[20]!==a?(f=t.jsx(ie,{open:n,onOpenChange:i,children:a}),e[18]=i,e[19]=n,e[20]=a,e[21]=f):f=e[21],f}function je({open:y,onComplete:e,selectedInstallation:n,onSelectInstallation:i,onImportComplete:h,mode:r="agent"}){const{org:o}=F(),p=M(),c=fe(),[b,C]=T.useState(null),j=ae({slug:"mcp-github"}),u=xe(j),l=ye({enabled:y&&u.length===0}),d=u.length===1?u[0]??null:b,m=L({connectionId:d?.id??"",orgId:o.id,orgSlug:o.slug}),a=L({connectionId:V,orgId:o.id,orgSlug:o.slug}),f=async(s,v)=>{try{const _=await m.callTool({name:"get_file_contents",arguments:{owner:s.owner,repo:s.name,path:v}});if(_.isError)return null;const I=_.content?.find(g=>g.type==="resource")?.resource?.text;if(!I)return null;try{const g=JSON.parse(I);return typeof g=="string"?g:JSON.stringify(g)}catch{return I}}catch{return null}},N=(s,v)=>{Promise.all([f(v,"AGENTS.md"),f(v,"CLAUDE.md")]).then(async([S,_])=>{const w=S??_??null;w&&(await a.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s,data:{metadata:{instructions:w}}}}),H(p,o.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},x=B({mutationFn:async s=>{if(!d||!n)throw new Error("No GitHub connection or installation");const v=n.installationId;if(r==="connection"){const{childConnectionId:w}=await q({orgSlug:o.slug,sourceConnection:d,installationId:v,owner:s.owner,repo:s.name,githubCallTool:I=>m.callTool(I),selfCallTool:I=>a.callTool(I),orgShared:!0});return{virtualMcpId:null,repo:s,connectionId:w,item:null}}const{childConnectionId:S}=await q({orgSlug:o.slug,sourceConnection:d,installationId:v,owner:s.owner,repo:s.name,githubCallTool:w=>m.callTool(w),selfCallTool:w=>a.callTool(w)});let _=null;try{const w=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s.name,description:s.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:s.owner,name:s.name,url:s.url,installationId:v,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),I=w.structuredContent??w,g=I.item?.id;if(!I.item||!g)throw new Error("Failed to create the imported agent");return _=g,{virtualMcpId:g,repo:s,connectionId:S,item:I.item}}catch(w){throw _&&await a.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:_}}).catch(()=>{}),await a.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),w}},onSuccess:({virtualMcpId:s,repo:v,connectionId:S,item:_})=>{if(r==="connection"||!s||!_){H(p,o.id),W(p,o.id),U.success(`Added ${v.name}`),e();return}if(p.setQueryData(R.collectionItem(a,o.id,"","VIRTUAL_MCP",s),{item:_}),H(p,o.id),N(s,v),h){h({virtualMcpId:s,repo:v,connectionId:S});return}U.success(`Imported ${v.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),c(s)},onError:s=>{U.error("Failed to import repo: "+(s instanceof Error?s.message:"Unknown error"))}});return l.status==="installing"||l.status==="authenticating"?t.jsx($,{status:l.status,error:null,retry:l.retry}):l.status==="error"?t.jsx($,{status:"error",error:l.error,retry:l.retry}):u.length===0&&l.status==="idle"?t.jsx($,{status:"installing",error:null,retry:l.retry}):u.length>1&&!d?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),u.map(s=>t.jsxs("button",{type:"button",onClick:()=>C(s),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?t.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(G,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}):d?n?t.jsx(we,{connectionId:d.id,orgId:o.id,orgSlug:o.slug,installation:n,onSelectRepo:s=>x.mutate(s),isSaving:x.isPending}):t.jsx(Ne,{connectionId:d.id,orgId:o.id,orgSlug:o.slug,onSelect:i,showBackButton:u.length>1,onBack:()=>C(null)}):null}function Ne(y){const e=A.c(47),{connectionId:n,orgId:i,orgSlug:h,onSelect:r,showBackButton:o,onBack:p}=y;let c;e[0]!==i||e[1]!==h?(c={connectionId:V,orgId:i,orgSlug:h},e[0]=i,e[1]=h,e[2]=c):c=e[2];const b=L(c),C=M(),j=Q();let u;e[3]!==n||e[4]!==i?(u=R.githubUserOrgs(i,n),e[3]=n,e[4]=i,e[5]=u):u=e[5];let l;e[6]!==n||e[7]!==b?(l=()=>ge(g=>b.callTool(g),n),e[6]=n,e[7]=b,e[8]=l):l=e[8];let d;e[9]!==u||e[10]!==l?(d={queryKey:u,queryFn:l},e[9]=u,e[10]=l,e[11]=d):d=e[11];const m=X(d);let a;e[12]!==j||e[13]!==n||e[14]!==m||e[15]!==i||e[16]!==h||e[17]!==C?(a={mutationFn:async()=>{const g=await K({connectionId:n,orgId:i,orgSlug:h,persistFallback:E=>j.update.mutateAsync({id:n,data:{connection_token:E}}).then(Ce)});if(g.ran&&!g.ok)throw new Error(g.error??"no token received");const k=new URL(`/api/${h}/mcp/${n}`,window.location.origin);await C.invalidateQueries({queryKey:R.isMCPAuthenticated(k.href,null)}),await C.invalidateQueries({queryKey:R.mcpClientPrefix()}),await m.refetch()},onError:ve},e[12]=j,e[13]=n,e[14]=m,e[15]=i,e[16]=h,e[17]=C,e[18]=a):a=e[18];const f=B(a);if(m.isLoading){let g;return e[19]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=g):g=e[19],g}if(m.isError){let g,k;e[20]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),k=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=g,e[21]=k):(g=e[20],k=e[21]);let E;e[22]!==f?(E=()=>f.mutate(),e[22]=f,e[23]=E):E=e[23];let P;e[24]!==f.isPending?(P=f.isPending?t.jsx(z,{size:14,className:"animate-spin"}):t.jsx(G,{className:"size-3.5"}),e[24]=f.isPending,e[25]=P):P=e[25];let O;return e[26]!==f.isPending||e[27]!==E||e[28]!==P?(O=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[g,k,t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:E,disabled:f.isPending,children:[P,"Reconnect GitHub"]})]}),e[26]=f.isPending,e[27]=E,e[28]=P,e[29]=O):O=e[29],O}const N=m.data;if(!N)return null;let x;e[30]!==p||e[31]!==o?(x=o&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(J,{size:12}),"Change connection"]})}),e[30]=p,e[31]=o,e[32]=x):x=e[32];let s;if(e[33]!==N.installations||e[34]!==r){let g;e[36]!==r?(g=k=>t.jsxs("button",{type:"button",onClick:()=>r(k),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:k.avatarUrl,alt:k.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:k.login}),k.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},k.installationId),e[36]=r,e[37]=g):g=e[37],s=N.installations.map(g),e[33]=N.installations,e[34]=r,e[35]=s}else s=e[35];let v;e[38]!==s?(v=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:s}),e[38]=s,e[39]=v):v=e[39];const S=N.appSlug?`https://github.com/apps/${N.appSlug}/installations/new`:"https://github.com/settings/installations";let _;e[40]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=_):_=e[40];let w;e[41]!==S?(w=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",_]})}),e[41]=S,e[42]=w):w=e[42];let I;return e[43]!==w||e[44]!==x||e[45]!==v?(I=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[x,v,w]}),e[43]=w,e[44]=x,e[45]=v,e[46]=I):I=e[46],I}function ve(y){U.error("Failed to reconnect GitHub: "+(y instanceof Error?y.message:"Unknown error"))}function Ce(){}function we(y){const e=A.c(20),{connectionId:n,orgId:i,orgSlug:h,installation:r,onSelectRepo:o,isSaving:p}=y,[c,b]=T.useState(""),C=re(c,300),j=T.useDeferredValue(C),u=c!==j;let l;e[0]!==u||e[1]!==c?(l=t.jsx(le,{placeholder:"Search repositories...",value:c,onChange:b,isSearching:u}),e[0]=u,e[1]=c,e[2]=l):l=e[2];const d=u?"opacity-40":"opacity-100";let m;e[3]!==d?(m=D("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",d),e[3]=d,e[4]=m):m=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=a):a=e[5];let f;e[6]!==n||e[7]!==j||e[8]!==r||e[9]!==p||e[10]!==o||e[11]!==i||e[12]!==h?(f=t.jsx(T.Suspense,{fallback:a,children:t.jsx(Se,{connectionId:n,orgId:i,orgSlug:h,installation:r,query:j,onSelectRepo:o,isSaving:p})}),e[6]=n,e[7]=j,e[8]=r,e[9]=p,e[10]=o,e[11]=i,e[12]=h,e[13]=f):f=e[13];let N;e[14]!==m||e[15]!==f?(N=t.jsx("div",{className:m,children:f}),e[14]=m,e[15]=f,e[16]=N):N=e[16];let x;return e[17]!==l||e[18]!==N?(x=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[l,N]}),e[17]=l,e[18]=N,e[19]=x):x=e[19],x}function Se(y){const e=A.c(29),{connectionId:n,orgId:i,orgSlug:h,installation:r,query:o,onSelectRepo:p,isSaving:c}=y;let b;e[0]!==n||e[1]!==i||e[2]!==h?(b={connectionId:n,orgId:i,orgSlug:h},e[0]=n,e[1]=i,e[2]=h,e[3]=b):b=e[3];const C=L(b),j=r.type==="User"?"user":"org",u=o?`${j}:${r.login} ${o} in:name`:`${j}:${r.login}`;let l;e[4]!==n||e[5]!==r.login||e[6]!==i||e[7]!==o?(l=R.githubOrgRepos(i,n,r.login,o),e[4]=n,e[5]=r.login,e[6]=i,e[7]=o,e[8]=l):l=e[8];let d;e[9]!==C||e[10]!==u?(d=async x=>{const{signal:s}=x,S=(await C.callTool({name:"search_repositories",arguments:{query:u,page:1,perPage:30}},void 0,{signal:s})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(Ie)},e[9]=C,e[10]=u,e[11]=d):d=e[11];let m;e[12]!==l||e[13]!==d?(m={queryKey:l,queryFn:d},e[12]=l,e[13]=d,e[14]=m):m=e[14];const{data:a}=ee(m);if(a.length===0){let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=x):x=e[15];let s;e[16]!==o?(s=o&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=o,e[17]=s):s=e[17];let v;return e[18]!==s?(v=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[x,s]}),e[18]=s,e[19]=v):v=e[19],v}let f;if(e[20]!==c||e[21]!==p||e[22]!==a){let x;e[24]!==c||e[25]!==p?(x=s=>t.jsxs("button",{type:"button",onClick:()=>p(s),disabled:c,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(G,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:s.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[s.private?t.jsx(te,{size:10}):t.jsx(ue,{size:10}),s.private?"Private":"Public"]})]},s.fullName),e[24]=c,e[25]=p,e[26]=x):x=e[26],f=a.map(x),e[20]=c,e[21]=p,e[22]=a,e[23]=f}else f=e[23];let N;return e[27]!==f?(N=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:f}),e[27]=f,e[28]=N):N=e[28],N}function Ie(y){return{name:y.name,fullName:y.full_name,owner:y.full_name.split("/")[0]??"",url:y.html_url,private:y.private,description:y.description,updatedAt:y.updated_at}}function $(y){const e=A.c(33),{status:n,error:i,retry:h}=y;if(n==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(G,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=_):_=e[1];const w=i??"Something went wrong while connecting to GitHub.";let I;e[2]!==w?(I=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[_,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=I):I=e[3];let g;e[4]!==h?(g=t.jsx("button",{type:"button",onClick:h,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=h,e[5]=g):g=e[5];let k;return e[6]!==I||e[7]!==g?(k=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,I,g]}),e[6]=I,e[7]=g,e[8]=k):k=e[8],k}const r=n==="authenticating";let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(G,{className:"size-5 text-foreground"})}),e[9]=o):o=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs("div",{className:"relative size-10",children:[o,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=p):p=e[10];const c=r?"Authenticating with GitHub":"Setting up GitHub";let b;e[11]!==c?(b=t.jsx("p",{className:"text-sm font-medium",children:c}),e[11]=c,e[12]=b):b=e[12];const C=r?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let j;e[13]!==C?(j=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=j):j=e[14];let u;e[15]!==b||e[16]!==j?(u=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[b,j]}),e[15]=b,e[16]=j,e[17]=u):u=e[17];const l=r?"bg-muted-foreground/30":"bg-foreground animate-pulse";let d;e[18]!==l?(d=D("size-1.5 rounded-full",l),e[18]=l,e[19]=d):d=e[19];let m;e[20]!==d?(m=t.jsx("span",{className:d}),e[20]=d,e[21]=m):m=e[21];const a=r?"bg-foreground animate-pulse":"bg-muted-foreground/30";let f;e[22]!==a?(f=D("size-1.5 rounded-full",a),e[22]=a,e[23]=f):f=e[23];let N;e[24]!==f?(N=t.jsx("span",{className:f}),e[24]=f,e[25]=N):N=e[25];let x;e[26]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=x):x=e[26];let s;e[27]!==m||e[28]!==N?(s=t.jsxs("div",{className:"flex items-center gap-1.5",children:[m,N,x]}),e[27]=m,e[28]=N,e[29]=s):s=e[29];let v;return e[30]!==s||e[31]!==u?(v=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[p,u,s]}),e[30]=s,e[31]=u,e[32]=v):v=e[32],v}export{De as G,G as a,ye as b,he as u};