decocms 4.107.2 → 4.107.3

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 (234) hide show
  1. package/dist/client/assets/{AlertCircle-DVPMzTJo.js → AlertCircle-B6hX93KI.js} +1 -1
  2. package/dist/client/assets/{AreaChart-EKwqISLg.js → AreaChart-ROOnCYW3.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-BxFdRcE2.js → ArrowRight-B6ckpLTL.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-Dg4BH5gY.js → ArrowUp-COAMRATp.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-BR3mm8VV.js → ArrowUpRight-PZnmkzzV.js} +1 -1
  6. package/dist/client/assets/{Check-FOKBd2_P.js → Check-C0G51sNz.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-ejVjxvPY.js → CheckCircle-4TRHZuRv.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-CoyYIWpI.js → ChevronDown-COGdEgJp.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-BNo_XNEJ.js → ChevronRight-IOSajAy2.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-DDw2lZkt.js → ChevronUp-Dw2tI_6B.js} +1 -1
  11. package/dist/client/assets/{Copy01-UC6mksFo.js → Copy01-CKqR5lah.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-BQO6BAWZ.js → DotsVertical-CQEtMq-p.js} +1 -1
  13. package/dist/client/assets/{Eye-DR5hUQrk.js → Eye-DComvKGa.js} +1 -1
  14. package/dist/client/assets/{FilterLines-DxSlHQXV.js → FilterLines-I6MLmlS1.js} +1 -1
  15. package/dist/client/assets/{Globe01-CzNuZIl8.js → Globe01-BxptDTGo.js} +1 -1
  16. package/dist/client/assets/{Globe04-DXyZ_H2T.js → Globe04-CRf5ebSS.js} +1 -1
  17. package/dist/client/assets/{HardDrive-KBkvdmbP.js → HardDrive-DTaKwCr7.js} +1 -1
  18. package/dist/client/assets/{Image01-CVV8-dAe.js → Image01-CYCaCbxZ.js} +1 -1
  19. package/dist/client/assets/{Key01-DwDbzCRd.js → Key01-fWoLmo0D.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-CfyciU-s.js → LayoutLeft-D8qTu8EH.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-BlOkjQhr.js → LinkExternal01-Cv4NH-l5.js} +1 -1
  22. package/dist/client/assets/{Monitor01-BY-pfYrq.js → Monitor01-C7xjPpyj.js} +1 -1
  23. package/dist/client/assets/{Package-14vIaywi.js → Package-Jkr04fuN.js} +1 -1
  24. package/dist/client/assets/{Palette-CwADfUJC.js → Palette-CvjVak83.js} +1 -1
  25. package/dist/client/assets/{Play-CZ9_zcZq.js → Play-DTPot6h0.js} +1 -1
  26. package/dist/client/assets/{Plus-DK-R0eMw.js → Plus-B22hr3lf.js} +1 -1
  27. package/dist/client/assets/{SearchLg-rv94wyM7.js → SearchLg-Crd4V90n.js} +1 -1
  28. package/dist/client/assets/{SearchMd-BKcF4O7J.js → SearchMd-BMssuo7v.js} +1 -1
  29. package/dist/client/assets/{Settings02-DEO-GnOc.js → Settings02-C18Fq1ND.js} +1 -1
  30. package/dist/client/assets/{Shield01-DLJynAqM.js → Shield01-BJr30oDl.js} +1 -1
  31. package/dist/client/assets/{Star01-D082PWzp.js → Star01-DwfPnx33.js} +1 -1
  32. package/dist/client/assets/{Stars01-CVZqisYd.js → Stars01-DCVVx3TP.js} +1 -1
  33. package/dist/client/assets/{Stars02-C7Dle8Yx.js → Stars02-DHMQYOZ1.js} +1 -1
  34. package/dist/client/assets/{Sun-Bsa1ekzw.js → Sun-D3gkPyYI.js} +1 -1
  35. package/dist/client/assets/{SwitchHorizontal01-CX_-149r.js → SwitchHorizontal01-B7LYi84o.js} +1 -1
  36. package/dist/client/assets/{Tool01-Il0NyvQC.js → Tool01-BkbpDA9x.js} +1 -1
  37. package/dist/client/assets/{Tool02-BorSPRdA.js → Tool02-DQHDZ3O3.js} +1 -1
  38. package/dist/client/assets/{Trash01-D-Q_t1S9.js → Trash01-C44WMjtC.js} +1 -1
  39. package/dist/client/assets/{TrendUp01-Cuv8OiuG.js → TrendUp01-BSkgDJpK.js} +1 -1
  40. package/dist/client/assets/{Upload01-K00xNi7k.js → Upload01-BNk3vUe2.js} +1 -1
  41. package/dist/client/assets/{User01-Cuw_nDP_.js → User01-E6FvG8tc.js} +1 -1
  42. package/dist/client/assets/{Users01-DACezAov.js → Users01-C1ZJq87h.js} +1 -1
  43. package/dist/client/assets/{Users03-xoei_rso.js → Users03-Jyr0zodk.js} +1 -1
  44. package/dist/client/assets/{X-9b5270Kw.js → X-Dr2OxAp4.js} +1 -1
  45. package/dist/client/assets/{XCircle-BX1rJO34.js → XCircle-B7t3G5FM.js} +1 -1
  46. package/dist/client/assets/{XClose-BRfYNzbj.js → XClose-DGMRr9zn.js} +1 -1
  47. package/dist/client/assets/{Zap-COR8GYRR.js → Zap-DwoEu757.js} +1 -1
  48. package/dist/client/assets/{ZapSquare-Bywrc9sp.js → ZapSquare-8UABLi0x.js} +1 -1
  49. package/dist/client/assets/{ZoomOut-By5DUB7q.js → ZoomOut-BWyriAeg.js} +1 -1
  50. package/dist/client/assets/{access-gate-DQaDnwJU.js → access-gate-JWzDbqYZ.js} +1 -1
  51. package/dist/client/assets/{add-section-modal-D763OaeO.js → add-section-modal-DeI8NAnv.js} +1 -1
  52. package/dist/client/assets/{agent-icon-C1yhAjA6.js → agent-icon-Cb5Kw36r.js} +1 -1
  53. package/dist/client/assets/{agents-list-BvOtm2ZX.js → agents-list-DjaVsmb1.js} +1 -1
  54. package/dist/client/assets/{ai-providers-CC8KpVDA.js → ai-providers-BUbLvA3G.js} +1 -1
  55. package/dist/client/assets/{alert-C673phcc.js → alert-D6M7_CFJ.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-CuMkmai1.js → alert-dialog-C6az9lRx.js} +1 -1
  57. package/dist/client/assets/{app-editor-CweeLHKU.js → app-editor-GKj-hQeX.js} +1 -1
  58. package/dist/client/assets/{auth-BdsC7srT.js → auth-ZBXBGL4G.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-BXxbgStA.js → auth-catchall-DFZvLybB.js} +1 -1
  60. package/dist/client/assets/{auth-entry-Bb_Lj-I0.js → auth-entry-dt_eRusO.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-8MdpG5-J.js → auth-split-layout-BHmVKloP.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-DR-wOO85.js → authenticate-and-persist-oauth-CyWCudBv.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-vZ8YE4NA.js → automation-list-row-CEv2Y-C0.js} +1 -1
  64. package/dist/client/assets/{automation-runs-CWk2mLgr.js → automation-runs-D13EOJoP.js} +2 -2
  65. package/dist/client/assets/{automations-DPhUHgVH.js → automations-BG6tRrEp.js} +1 -1
  66. package/dist/client/assets/{autosend-C0Neffdx.js → autosend-BT7_pxka.js} +1 -1
  67. package/dist/client/assets/{avatar-DVZ7QVhb.js → avatar-DdE_FCeU.js} +1 -1
  68. package/dist/client/assets/{badge-gGz283dj.js → badge-D4GDvYs3.js} +1 -1
  69. package/dist/client/assets/{block-document-D1aJ7xHL.js → block-document-Dak-ilz_.js} +1 -1
  70. package/dist/client/assets/{brand-context-3KgpLU5H.js → brand-context-DdmF8MwD.js} +1 -1
  71. package/dist/client/assets/{buckets-Dwvf03CZ.js → buckets-Bo_H3W5S.js} +1 -1
  72. package/dist/client/assets/{bulk-category-panel-Bk2YjyFQ.js → bulk-category-panel-C1pnMYSm.js} +1 -1
  73. package/dist/client/assets/{calendar-7BrT_JzW.js → calendar-CJCjPlRb.js} +1 -1
  74. package/dist/client/assets/{capability-load-error-BWv1ebjq.js → capability-load-error-CIHxXPRM.js} +1 -1
  75. package/dist/client/assets/{card-DBxOngCY.js → card-C55IeOmV.js} +1 -1
  76. package/dist/client/assets/{category-editor-D-qGYACl.js → category-editor-BYu6PzF_.js} +1 -1
  77. package/dist/client/assets/{chat-context-DAg01jzf.js → chat-context-CyDOwUem.js} +1 -1
  78. package/dist/client/assets/{checkbox-DCDfy-uW.js → checkbox-Bkqcx2Gf.js} +1 -1
  79. package/dist/client/assets/{cli-auth-success-CEZL5s64.js → cli-auth-success-Qf8bH8PR.js} +1 -1
  80. package/dist/client/assets/{collection-detail-BmR-Hp9L.js → collection-detail-DbwFMWa1.js} +1 -1
  81. package/dist/client/assets/{collection-display-button-BiEWyK1b.js → collection-display-button-dh9xaQe5.js} +1 -1
  82. package/dist/client/assets/{collection-search-BlHcpz8p.js → collection-search-BPbGyO6X.js} +1 -1
  83. package/dist/client/assets/{collection-table-wrapper-BAcazrq1.js → collection-table-wrapper-Ppr-rDyM.js} +1 -1
  84. package/dist/client/assets/{collection-tabs-DuhmFdee.js → collection-tabs-ka8uFVp2.js} +1 -1
  85. package/dist/client/assets/{command-DskMJY5B.js → command-BbqtaVDQ.js} +1 -1
  86. package/dist/client/assets/{commerce-onboarding-iY34gtZe.js → commerce-onboarding-DsGkzT_8.js} +1 -1
  87. package/dist/client/assets/{companions-core-VB0lBtGL.js → companions-core-Dux1eCuk.js} +1 -1
  88. package/dist/client/assets/{connect-BzGIMYXJ.js → connect-CXf-1Slr.js} +1 -1
  89. package/dist/client/assets/{connect-desktop-dialog-DQhu09E1.js → connect-desktop-dialog-CCcKhodg.js} +1 -1
  90. package/dist/client/assets/{connection-card-BJ7FpFPm.js → connection-card-DEI-NB2P.js} +1 -1
  91. package/dist/client/assets/{connection-detail-B5ySsrTb.js → connection-detail-Ck5yNpWk.js} +1 -1
  92. package/dist/client/assets/{connection-form-helpers-CZjPDGsj.js → connection-form-helpers-CU-7Z_i7.js} +1 -1
  93. package/dist/client/assets/{connections-QbTK7v-e.js → connections-669fJRYZ.js} +1 -1
  94. package/dist/client/assets/{decopilot-sse-pool-4TW_pQZZ.js → decopilot-sse-pool-CmKk_7Yy.js} +1 -1
  95. package/dist/client/assets/{dialog-C8poGW_g.js → dialog-CKx91Chj.js} +1 -1
  96. package/dist/client/assets/{domain-settings-DuejMV0N.js → domain-settings-CREdDjrJ.js} +1 -1
  97. package/dist/client/assets/{drawer-nu9lIO4E.js → drawer-yBIfU6ff.js} +1 -1
  98. package/dist/client/assets/{dropdown-menu-DG0tXO1d.js → dropdown-menu-DZINRqk1.js} +1 -1
  99. package/dist/client/assets/{empty-state-CySOei1g.js → empty-state-Bro0tVaU.js} +1 -1
  100. package/dist/client/assets/{extract-connection-data-BiK8KoKv.js → extract-connection-data-Dul2DPHu.js} +1 -1
  101. package/dist/client/assets/file-explorer-iIw3ALI2.js +2 -0
  102. package/dist/client/assets/{file-type-icon-C7UFyUxg.js → file-type-icon-4ZBz_Vii.js} +1 -1
  103. package/dist/client/assets/{files-DFdSDK1L.js → files-BWlvESV9.js} +1 -1
  104. package/dist/client/assets/{form-CT-oNqCe.js → form-CP_wb5qW.js} +1 -1
  105. package/dist/client/assets/{general-CZFwr_c3.js → general-BfH6zn2j.js} +1 -1
  106. package/dist/client/assets/{github-repo-picker-D2S0GJFl.js → github-repo-picker-C6PI1Ynd.js} +1 -1
  107. package/dist/client/assets/{hooks-Dy2M5XTO.js → hooks-CnZUr3OX.js} +1 -1
  108. package/dist/client/assets/{index-Bc0jH8AX.js → index-3aGydbx2.js} +5 -5
  109. package/dist/client/assets/{index-CAonCuKz.js → index-BJOSf9ol.js} +1 -1
  110. package/dist/client/assets/{index-DIMWNmXZ.js → index-BnBs_B3l.js} +3 -3
  111. package/dist/client/assets/{index-DuymBIik.js → index-CAh51G0Z.js} +29 -29
  112. package/dist/client/assets/{index-Q4KTpZzF.js → index-CBE0ke3n.js} +1 -1
  113. package/dist/client/assets/{index-CHC5kHWE.js → index-CQk14tmw.js} +1 -1
  114. package/dist/client/assets/{index-DchPmGr7.js → index-Cettjk3S.js} +1 -1
  115. package/dist/client/assets/{index-D8kVC9_Q.js → index-CjOKp-Kq.js} +1 -1
  116. package/dist/client/assets/{index-Cacwr4UE.js → index-D1_6Zx0D.js} +1 -1
  117. package/dist/client/assets/{index-DmXMr1st.js → index-D5ggxKlt.js} +1 -1
  118. package/dist/client/assets/{index-NwFZBTxV.js → index-DLDnlI2n.js} +1 -1
  119. package/dist/client/assets/{index-Bx3uSn3r.js → index-DlHJtvZ7.js} +1 -1
  120. package/dist/client/assets/{index-CnzrmMSm.js → index-j9xlj-U7.js} +1 -1
  121. package/dist/client/assets/{index-redirect-Co0Oph-p.js → index-redirect-Dud0_aNT.js} +1 -1
  122. package/dist/client/assets/{input-BLntXd-c.js → input-CvjXMWzE.js} +1 -1
  123. package/dist/client/assets/{integration-icon-X2t3UGM1.js → integration-icon-ChOLiQ9P.js} +1 -1
  124. package/dist/client/assets/{invite-member-dialog-DboYju4L.js → invite-member-dialog-Cc2WCi6t.js} +1 -1
  125. package/dist/client/assets/{label-BesBP85G.js → label-CQP0tQqN.js} +1 -1
  126. package/dist/client/assets/{layout-GNtSDDzi.js → layout-Bk9r4Wrc.js} +1 -1
  127. package/dist/client/assets/{login-DkYhLD8j.js → login-B_LE4TxR.js} +1 -1
  128. package/dist/client/assets/{mcp-oauth-DVgDNgSa.js → mcp-oauth-CNMhJDmu.js} +1 -1
  129. package/dist/client/assets/{members-CUlUur2C.js → members-SoA7DN3I.js} +1 -1
  130. package/dist/client/assets/{monaco-editor-BCXNTdig.js → monaco-editor-Dgx-jLrW.js} +1 -1
  131. package/dist/client/assets/{monitoring-stats-row-tENfTzx-.js → monitoring-stats-row-DXQ6PqsR.js} +1 -1
  132. package/dist/client/assets/{multi-select-CFhjKXEn.js → multi-select-DgGk0iFo.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-ai-provider-D-WwO4me.js → oauth-callback-ai-provider-DMPf9xla.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-tpSnqVCD.js → oauth-callback-bjbsGrSb.js} +1 -1
  135. package/dist/client/assets/{onboarding-BXl5Ahys.js → onboarding-DyxYTab-.js} +1 -1
  136. package/dist/client/assets/{org-install-C8OzckCN.js → org-install-DPpbpJds.js} +1 -1
  137. package/dist/client/assets/{org-layout-Bh-zJAvT.js → org-layout-DNg3nq1t.js} +1 -1
  138. package/dist/client/assets/{organization-choice-P7Im2H9y.js → organization-choice-DeY6V84T.js} +1 -1
  139. package/dist/client/assets/{orgs-DjMIkMGS.js → orgs-BNLplGHe.js} +1 -1
  140. package/dist/client/assets/{page-seo-form-BiaE5V4z.js → page-seo-form-BGz1QRD-.js} +1 -1
  141. package/dist/client/assets/page-seo-sheet-DTtfn6RW.js +1 -0
  142. package/dist/client/assets/{popover-xTSimTat.js → popover-buEwT374.js} +1 -1
  143. package/dist/client/assets/{post-editor-ChWR9UIL.js → post-editor-yySqAIyz.js} +1 -1
  144. package/dist/client/assets/{primitives-RGtcOwrI.js → primitives-C_mLxp8V.js} +1 -1
  145. package/dist/client/assets/{profile-47SdLlVL.js → profile-ogefC_3X.js} +1 -1
  146. package/dist/client/assets/project-app-view-CmnxYj_E.js +1 -0
  147. package/dist/client/assets/record-editor-pZgAdMFp.js +1 -0
  148. package/dist/client/assets/redirect-editor-C4M5P2JF.js +1 -0
  149. package/dist/client/assets/registry-l4WkUeyk.js +2 -0
  150. package/dist/client/assets/{registry-layout-Cqmfo2hI.js → registry-layout-Cf3NcOKq.js} +1 -1
  151. package/dist/client/assets/{reports-n58kxQAq.js → reports-B5XFUOTn.js} +1 -1
  152. package/dist/client/assets/{require-capability-iP09YZwt.js → require-capability-DhX8B5R9.js} +1 -1
  153. package/dist/client/assets/{required-auth-layout-bfC8acaX.js → required-auth-layout-BVLlhoRa.js} +1 -1
  154. package/dist/client/assets/{reset-password-DbZtgKr9.js → reset-password-Dqx1vL-C.js} +1 -1
  155. package/dist/client/assets/{roles-aRG-QN60.js → roles-4kJRgoOO.js} +1 -1
  156. package/dist/client/assets/{search-input-DoJacT2j.js → search-input-CsR45mDs.js} +1 -1
  157. package/dist/client/assets/{secrets-DO4g_oLx.js → secrets-Bj8YajKu.js} +1 -1
  158. package/dist/client/assets/{sections-editor-zT3zj576.js → sections-editor-B5JrTvT8.js} +1 -1
  159. package/dist/client/assets/{select-T8A9ONsw.js → select-D-psbbZp.js} +1 -1
  160. package/dist/client/assets/{select-model-BQ10MK1B.js → select-model-CegjDpzH.js} +1 -1
  161. package/dist/client/assets/{self-tool-result-e0VXvS20.js → self-tool-result-BiZYiG6Y.js} +1 -1
  162. package/dist/client/assets/{seo-editor-h_4rU8H9.js → seo-editor-DGP90ea5.js} +1 -1
  163. package/dist/client/assets/{settings-layout-DG9ytt1E.js → settings-layout-_Ctf8vej.js} +1 -1
  164. package/dist/client/assets/{settings-section-CIwLHY3B.js → settings-section-DcSxLZCe.js} +1 -1
  165. package/dist/client/assets/{shell-controls-JOe9Jln5.js → shell-controls-CK4aaIqv.js} +1 -1
  166. package/dist/client/assets/{shell-layout-SU4wu4yK.js → shell-layout-CZPKRkNK.js} +1 -1
  167. package/dist/client/assets/{sidebar-DPvLhEuy.js → sidebar-kakKWETX.js} +1 -1
  168. package/dist/client/assets/{skeleton-OUpugRl_.js → skeleton-42ZosXGf.js} +1 -1
  169. package/dist/client/assets/{sso-eS9I0Ctn.js → sso-CO71rf2Y.js} +1 -1
  170. package/dist/client/assets/{store-Ca7btOc-.js → store-BCOcp378.js} +1 -1
  171. package/dist/client/assets/store-registry-D9FSfT2O.js +2 -0
  172. package/dist/client/assets/{studio-tools-CovYHVyK.js → studio-tools-gJOUlCsR.js} +1 -1
  173. package/dist/client/assets/{switch-Bq57t7zq.js → switch-Dz_8unx5.js} +1 -1
  174. package/dist/client/assets/{table-DJQVA69b.js → table-BCxpylwT.js} +1 -1
  175. package/dist/client/assets/{tabs-ByWXKf-5.js → tabs-DWwahcys.js} +1 -1
  176. package/dist/client/assets/{textarea-DOK4Ro0N.js → textarea-CYbhzTEm.js} +1 -1
  177. package/dist/client/assets/{toggle-group-Be1sEgdg.js → toggle-group-D77kRhQY.js} +1 -1
  178. package/dist/client/assets/{toolbar-CJKaDr5i.js → toolbar-DCkV6nNW.js} +1 -1
  179. package/dist/client/assets/{toolbar-icon-button-54q9bCpj.js → toolbar-icon-button-CXn8SeER.js} +1 -1
  180. package/dist/client/assets/{tooltip-AF70XTGt.js → tooltip-DMrC-6qQ.js} +1 -1
  181. package/dist/client/assets/{use-ai-providers-CKu37J2y.js → use-ai-providers-zsxvi5ub.js} +1 -1
  182. package/dist/client/assets/{use-api-keys-By3CiT9I.js → use-api-keys-DqKyt1eZ.js} +1 -1
  183. package/dist/client/assets/{use-automations-Ci5un47e.js → use-automations-kK22B2yX.js} +1 -1
  184. package/dist/client/assets/{use-autosave-C7bxumNP.js → use-autosave-CSbuAxRS.js} +1 -1
  185. package/dist/client/assets/{use-capability-DQZYrrf1.js → use-capability-BzZJQvQX.js} +1 -1
  186. package/dist/client/assets/{use-clock-tick-LHG4N82c.js → use-clock-tick-Cm8APnF9.js} +1 -1
  187. package/dist/client/assets/{use-connection-CWqGN4Dl.js → use-connection-BN71vOOR.js} +1 -1
  188. package/dist/client/assets/{use-copy-B7esISOp.js → use-copy-72S1mrsw.js} +1 -1
  189. package/dist/client/assets/{use-create-virtual-mcp-DqjjAgFQ.js → use-create-virtual-mcp-8H0Pf-B4.js} +1 -1
  190. package/dist/client/assets/{use-debounced-autosave-fX75MRyK.js → use-debounced-autosave-BSywpq42.js} +1 -1
  191. package/dist/client/assets/{use-debounced-value-CQfXn2Hm.js → use-debounced-value-C8J4HIdj.js} +1 -1
  192. package/dist/client/assets/{use-deco-credits-BzVBUf6l.js → use-deco-credits-D9jYGiRH.js} +1 -1
  193. package/dist/client/assets/{use-decopilot-events-YXV0qTH9.js → use-decopilot-events-DXcsv7mc.js} +1 -1
  194. package/dist/client/assets/{use-delete-connection-YNMMWMof.js → use-delete-connection-DqK7ntLx.js} +1 -1
  195. package/dist/client/assets/{use-deployment-admin-vSr129h-.js → use-deployment-admin-By2OADuN.js} +1 -1
  196. package/dist/client/assets/{use-file-configs-CZj8TMQN.js → use-file-configs-BSrWzA4k.js} +1 -1
  197. package/dist/client/assets/{use-infinite-scroll-Dn0iDW50.js → use-infinite-scroll-BMiAVduv.js} +1 -1
  198. package/dist/client/assets/{use-join-requests-Co5S8hHR.js → use-join-requests-CiujfTsD.js} +1 -1
  199. package/dist/client/assets/{use-mcp-auth-status-CPi7pdhA.js → use-mcp-auth-status-CkLj0tpV.js} +1 -1
  200. package/dist/client/assets/{use-mcp-client-1y5yaek9.js → use-mcp-client-CwTQdIm_.js} +1 -1
  201. package/dist/client/assets/{use-mcp-tools-CGWZ4Di7.js → use-mcp-tools-CKxc_sfI.js} +1 -1
  202. package/dist/client/assets/{use-members-s9eNgR70.js → use-members-CRCSlbAE.js} +1 -1
  203. package/dist/client/assets/{use-mobile-BP_lYuRj.js → use-mobile-BBEujCmt.js} +1 -1
  204. package/dist/client/assets/{use-navigate-to-agent-BRYuqT7o.js → use-navigate-to-agent-CFh2psZa.js} +1 -1
  205. package/dist/client/assets/{use-org-auth-client-BRZwr2Lx.js → use-org-auth-client-DNeQqieu.js} +1 -1
  206. package/dist/client/assets/{use-org-sso-DD8hYeUd.js → use-org-sso-B547vE3F.js} +1 -1
  207. package/dist/client/assets/{use-organization-roles-DFzFWOCS.js → use-organization-roles-CtCl8dxK.js} +1 -1
  208. package/dist/client/assets/{use-organization-settings-BC4wiWdJ.js → use-organization-settings-BL6_EI0G.js} +1 -1
  209. package/dist/client/assets/{use-registry-app-HQ2eh3Mu.js → use-registry-app-Doj3o6UT.js} +1 -1
  210. package/dist/client/assets/{use-registry-connections-B7ga1F4b.js → use-registry-connections-uco70Vv5.js} +1 -1
  211. package/dist/client/assets/{use-secrets-BWeGJW1a.js → use-secrets-CdBld6BN.js} +1 -1
  212. package/dist/client/assets/{use-status-sounds-D6SXRNkF.js → use-status-sounds-B3cvfToG.js} +1 -1
  213. package/dist/client/assets/{use-view-mode-DIpiqIKS.js → use-view-mode-DIBpWGpR.js} +1 -1
  214. package/dist/client/assets/{use-virtual-mcp-CyMMeH1E.js → use-virtual-mcp-2SSOo9n9.js} +1 -1
  215. package/dist/client/assets/useInfiniteQuery-B0ZAU1xu.js +1 -0
  216. package/dist/client/assets/{useQueries-CHtX9-Kl.js → useQueries-CE0TRWeJ.js} +1 -1
  217. package/dist/client/assets/{useRouterState-BobMUY88.js → useRouterState-8OYl7JnP.js} +1 -1
  218. package/dist/client/assets/useSuspenseInfiniteQuery-DhtJItxQ.js +1 -0
  219. package/dist/client/assets/{users-DewC8qLr.js → users-NwR8uK7r.js} +1 -1
  220. package/dist/client/assets/{variant-calendar-R1foW0tg.js → variant-calendar-ZTOKJMgG.js} +1 -1
  221. package/dist/client/assets/{view-mode-toggle-T8qXAaGx.js → view-mode-toggle-C1OUrhBQ.js} +1 -1
  222. package/dist/client/index.html +1 -1
  223. package/dist/server/cli.js +1 -1
  224. package/dist/server/server.js +1 -1
  225. package/package.json +1 -1
  226. package/dist/client/assets/file-explorer-Djp3VKLs.js +0 -2
  227. package/dist/client/assets/page-seo-sheet-Df4EFhA-.js +0 -1
  228. package/dist/client/assets/project-app-view-qHnBmgeQ.js +0 -1
  229. package/dist/client/assets/record-editor-CVChQI1I.js +0 -1
  230. package/dist/client/assets/redirect-editor-Kzyt-T62.js +0 -1
  231. package/dist/client/assets/registry-DUj7kIDl.js +0 -2
  232. package/dist/client/assets/store-registry-BK9rT0jH.js +0 -2
  233. package/dist/client/assets/useInfiniteQuery-DNDbu7fW.js +0 -1
  234. package/dist/client/assets/useSuspenseInfiniteQuery-DA7RrTe1.js +0 -1
@@ -1 +1 @@
1
- import{c as oe,b as ae,F as re,o as de,r as ce,K as ie,n as me,e as X,q as ge,t as N,j as s,B as te}from"./index-DuymBIik.js";import{u as ue}from"./studio-tools-CovYHVyK.js";import{b as fe,a as xe,S as Se}from"./settings-section-CIwLHY3B.js";import{B as ne}from"./badge-gGz283dj.js";import{I as je}from"./input-BLntXd-c.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-T8A9ONsw.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function Re(){const e=oe.c(101),t=ae(),{org:o}=re(),p=de(),i=ue(),[r,v]=ce.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=me(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ge("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const d=X(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let b;e[27]!==t?(b=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=b):b=e[28];let U;e[29]!==b||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:b},e[29]=b,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=X(U);let O;e[33]!==i?(O=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=O):O=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==O||e[41]!==y||e[42]!==E?(Y={mutationFn:O,onSuccess:y,onError:E},e[40]=O,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=X(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=X($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let q;e[59]!==t?(q=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=q):q=e[60];let F;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],F=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=F}else F=e[66];let J;e[72]===Symbol.for("react.memo_cache_sentinel")?(J=n=>v(n.target.value),e[72]=J):J=e[72];let k;e[73]!==t?(k=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=k):k=e[74];let z;e[75]!==r||e[76]!==k?(z=s.jsx(je,{value:r,onChange:J,placeholder:k,className:"max-w-xs"}),e[75]=r,e[76]=k,e[77]=z):z=e[77];let w;e[78]!==d||e[79]!==r?(w=()=>d.mutate(r.trim()),e[78]=d,e[79]=r,e[80]=w):w=e[80];let G;e[81]!==d.isPending||e[82]!==r?(G=!r.trim()||d.isPending,e[81]=d.isPending,e[82]=r,e[83]=G):G=e[83];let Z;e[84]!==d.isPending||e[85]!==t?(Z=d.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=d.isPending,e[85]=t,e[86]=Z):Z=e[86];let B;e[87]!==w||e[88]!==G||e[89]!==Z?(B=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:Z}),e[87]=w,e[88]=G,e[89]=Z,e[90]=B):B=e[90];let H;e[91]!==z||e[92]!==B?(H=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[z,B]}),e[91]=z,e[92]=B,e[93]=H):H=e[93];let K;e[94]!==F||e[95]!==H?(K=s.jsxs(xe,{children:[F,H]}),e[94]=F,e[95]=H,e[96]=K):K=e[96];let W;return e[97]!==V||e[98]!==q||e[99]!==K?(W=s.jsx(Se,{title:V,description:q,children:K}),e[97]=V,e[98]=q,e[99]=K,e[100]=W):W=e[100],W}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let r;t[0]!==i?(r=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=r):r=t[1];const v=r;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let d;return t[31]!==j||t[32]!==m?(d=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=d):d=t[33],d}export{Re as D};
1
+ import{c as oe,b as ae,F as re,o as de,r as ce,K as ie,n as me,e as X,q as ge,t as N,j as s,B as te}from"./index-CAh51G0Z.js";import{u as ue}from"./studio-tools-gJOUlCsR.js";import{b as fe,a as xe,S as Se}from"./settings-section-DcSxLZCe.js";import{B as ne}from"./badge-D4GDvYs3.js";import{I as je}from"./input-CvjXMWzE.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-D-psbbZp.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function Re(){const e=oe.c(101),t=ae(),{org:o}=re(),p=de(),i=ue(),[r,v]=ce.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=me(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ge("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const d=X(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let b;e[27]!==t?(b=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=b):b=e[28];let U;e[29]!==b||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:b},e[29]=b,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=X(U);let O;e[33]!==i?(O=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=O):O=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==O||e[41]!==y||e[42]!==E?(Y={mutationFn:O,onSuccess:y,onError:E},e[40]=O,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=X(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=X($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let q;e[59]!==t?(q=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=q):q=e[60];let F;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],F=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=F}else F=e[66];let J;e[72]===Symbol.for("react.memo_cache_sentinel")?(J=n=>v(n.target.value),e[72]=J):J=e[72];let k;e[73]!==t?(k=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=k):k=e[74];let z;e[75]!==r||e[76]!==k?(z=s.jsx(je,{value:r,onChange:J,placeholder:k,className:"max-w-xs"}),e[75]=r,e[76]=k,e[77]=z):z=e[77];let w;e[78]!==d||e[79]!==r?(w=()=>d.mutate(r.trim()),e[78]=d,e[79]=r,e[80]=w):w=e[80];let G;e[81]!==d.isPending||e[82]!==r?(G=!r.trim()||d.isPending,e[81]=d.isPending,e[82]=r,e[83]=G):G=e[83];let Z;e[84]!==d.isPending||e[85]!==t?(Z=d.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=d.isPending,e[85]=t,e[86]=Z):Z=e[86];let B;e[87]!==w||e[88]!==G||e[89]!==Z?(B=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:Z}),e[87]=w,e[88]=G,e[89]=Z,e[90]=B):B=e[90];let H;e[91]!==z||e[92]!==B?(H=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[z,B]}),e[91]=z,e[92]=B,e[93]=H):H=e[93];let K;e[94]!==F||e[95]!==H?(K=s.jsxs(xe,{children:[F,H]}),e[94]=F,e[95]=H,e[96]=K):K=e[96];let W;return e[97]!==V||e[98]!==q||e[99]!==K?(W=s.jsx(Se,{title:V,description:q,children:K}),e[97]=V,e[98]=q,e[99]=K,e[100]=W):W=e[100],W}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let r;t[0]!==i?(r=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=r):r=t[1];const v=r;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let d;return t[31]!==j||t[32]!==m?(d=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=d):d=t[33],d}export{Re as D};
@@ -1 +1 @@
1
- import{c as d,j as s,cv as i,m as c}from"./index-DuymBIik.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 m(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 w(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(w,{}),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(m,{"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,cv as i,m as c}from"./index-CAh51G0Z.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 m(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 w(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(w,{}),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(m,{"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,dH as f,dI as m,m as u,dJ as g,dK as x,dL as v,dM as b,dN as h,dO as w,dP as j,dQ as N,dR as z,dS as _,dT as y,dU as p}from"./index-DuymBIik.js";import{i as $}from"./Check-FOKBd2_P.js";import{i as D}from"./ChevronRight-BNo_XNEJ.js";import{i as M}from"./DotsVertical-BQO6BAWZ.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 L(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 O(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 E(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 G(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 H(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 J(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 K(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 Q(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 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-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{T as D,O as a,L as b,C as c,H as d,K as e,Q as f,U as g,G as h,P as i,J as j,E as k};
1
+ import{c,j as i,dH as f,dI as m,m as u,dJ as g,dK as x,dL as v,dM as b,dN as h,dO as w,dP as j,dQ as N,dR as z,dS as _,dT as y,dU as p}from"./index-CAh51G0Z.js";import{i as $}from"./Check-C0G51sNz.js";import{i as D}from"./ChevronRight-IOSajAy2.js";import{i as M}from"./DotsVertical-CQEtMq-p.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 L(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 O(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 E(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 G(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 H(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 J(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 K(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 Q(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 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-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{T as D,O as a,L as b,C as c,H as d,K as e,Q as f,U as g,G as h,P as i,J as j,E as k};
@@ -1 +1 @@
1
- import{c as v,m as N,j as t}from"./index-DuymBIik.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-center 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,m as N,j as t}from"./index-CAh51G0Z.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-center 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-DuymBIik.js";import{W as T,j as O}from"./use-mcp-client-1y5yaek9.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 q(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function B(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 J(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 Q(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 j="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",G=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=j[n[t]&63];return e};function $(t){return`${t}_${G()}`}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 X(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:$("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,Q as c,J as d,X as e,B as f,$ as g,q as i};
1
+ import"./index-CAh51G0Z.js";import{W as T,j as O}from"./use-mcp-client-CwTQdIm_.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 q(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function B(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 J(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 Q(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 j="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",G=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=j[n[t]&63];return e};function $(t){return`${t}_${G()}`}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 X(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:$("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,Q as c,J as d,X as e,B as f,$ as g,q as i};
@@ -0,0 +1,2 @@
1
+ import{c as se,b as Me,r as u,j as r,k as fe,B as De,e5 as Yt,aE as Jt,aK as xe,e6 as Zt,e7 as en,e8 as tn,e9 as nn,bO as rn,ea as on,eb as lt,aG as sn,ec as an,ed as ln,ee as cn,ef as dn,eg as un,eh as fn,ei as pn,ej as mn,ek as xn,m as le,o as hn,t as ne,K as Ze}from"./index-CAh51G0Z.js";import{F as gn,l as bn}from"./index-BJOSf9ol.js";import{h as yn,aM as vn,aN as Cn}from"./agent-icon-Cb5Kw36r.js";import{s as wn}from"./XClose-DGMRr9zn.js";import{m as Nn}from"./automation-runs-D13EOJoP.js";import{b as et,T as tt,a as nt}from"./tooltip-DMrC-6qQ.js";import{b as jn}from"./chat-context-CyDOwUem.js";import{u as En}from"./shell-layout-CZPKRkNK.js";import{s as we,a as rt,f as Sn}from"./index-3aGydbx2.js";import{b as Dn,h as Mn,a as Rn,c as Tn,d as Pn,e as kn}from"./dialog-CKx91Chj.js";import{I as ot}from"./input-CvjXMWzE.js";import{A as Fn,a as An,b as On,c as Ln,g as In,d as Kn,e as $n,f as zn}from"./alert-dialog-C6az9lRx.js";import{t as _n}from"./ChevronDown-COGdEgJp.js";import{i as Gn}from"./ChevronRight-IOSajAy2.js";import{a as Bn}from"./ZoomOut-BWyriAeg.js";import{w as Vn,E as Un,x as Ae,y as Oe,z as Hn,A as Wn,C as qn,D as Qn,G as re,I as Ne,J as Le,K as je,g as Ie,M as Ke,N as Xn,s as Yn,O as Jn,P as Ee,Q as $e,U as Zn,V as er,W as tr,X as nr}from"./index-DLDnlI2n.js";import"./AlertCircle-B6hX93KI.js";import"./Tool01-BkbpDA9x.js";import"./ArrowUp-COAMRATp.js";import"./Settings02-C18Fq1ND.js";import"./Tool02-DQHDZ3O3.js";import"./ArrowRight-B6ckpLTL.js";import"./ArrowUpRight-PZnmkzzV.js";import"./TrendUp01-BSkgDJpK.js";import"./ZapSquare-8UABLi0x.js";import"./Users03-Jyr0zodk.js";import"./CheckCircle-4TRHZuRv.js";import"./Check-C0G51sNz.js";import"./ChevronUp-Dw2tI_6B.js";import"./DotsVertical-CQEtMq-p.js";import"./Stars02-DHMQYOZ1.js";import"./Copy01-CKqR5lah.js";import"./Globe01-BxptDTGo.js";import"./Eye-DComvKGa.js";import"./FilterLines-I6MLmlS1.js";import"./Star01-DwfPnx33.js";import"./Globe04-CRf5ebSS.js";import"./SwitchHorizontal01-B7LYi84o.js";import"./HardDrive-DTaKwCr7.js";import"./Image01-CYCaCbxZ.js";import"./Key01-fWoLmo0D.js";import"./LayoutLeft-D8qTu8EH.js";import"./XCircle-B7t3G5FM.js";import"./LinkExternal01-Cv4NH-l5.js";import"./Monitor01-C7xjPpyj.js";import"./Sun-D3gkPyYI.js";import"./Package-Jkr04fuN.js";import"./Palette-CvjVak83.js";import"./Play-DTPot6h0.js";import"./Plus-B22hr3lf.js";import"./SearchLg-Crd4V90n.js";import"./SearchMd-BMssuo7v.js";import"./Shield01-BJr30oDl.js";import"./Stars01-DCVVx3TP.js";import"./Trash01-C44WMjtC.js";import"./Upload01-BNk3vUe2.js";import"./User01-E6FvG8tc.js";import"./Users01-C1ZJq87h.js";import"./X-Dr2OxAp4.js";import"./Zap-DwoEu757.js";import"./select-D-psbbZp.js";import"./useInfiniteQuery-B0ZAU1xu.js";import"./use-infinite-scroll-BMiAVduv.js";import"./use-connection-BN71vOOR.js";import"./use-mcp-client-CwTQdIm_.js";import"./auth-ZBXBGL4G.js";import"./use-virtual-mcp-2SSOo9n9.js";import"./card-C55IeOmV.js";import"./sidebar-kakKWETX.js";import"./use-mobile-BBEujCmt.js";import"./table-BCxpylwT.js";import"./empty-state-Bro0tVaU.js";import"./use-members-CRCSlbAE.js";import"./use-org-auth-client-DNeQqieu.js";import"./use-clock-tick-Cm8APnF9.js";import"./use-automations-kK22B2yX.js";import"./studio-tools-gJOUlCsR.js";import"./useSuspenseInfiniteQuery-DhtJItxQ.js";import"./avatar-DdE_FCeU.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-72S1mrsw.js";import"./file-type-icon-4ZBz_Vii.js";import"./tab-id-BijBBRwE.js";import"./hooks-CnZUr3OX.js";import"./decopilot-sse-pool-CmKk_7Yy.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-Dgx-jLrW.js";import"./index-D5ggxKlt.js";import"./calendar-CJCjPlRb.js";import"./integration-icon-ChOLiQ9P.js";import"./use-navigate-to-agent-CFh2psZa.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-ROOnCYW3.js";import"./form-CP_wb5qW.js";import"./label-CQP0tQqN.js";import"./autosend-BT7_pxka.js";import"./use-ai-providers-zsxvi5ub.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-DXcsv7mc.js";import"./use-organization-settings-BL6_EI0G.js";import"./required-auth-layout-BVLlhoRa.js";import"./use-org-sso-B547vE3F.js";import"./drawer-yBIfU6ff.js";import"./collection-search-BPbGyO6X.js";import"./index-BnBs_B3l.js";import"./get-initials-D-f_fDFw.js";import"./popover-buEwT374.js";import"./use-registry-app-Doj3o6UT.js";import"./use-mcp-tools-CKxc_sfI.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-CyWCudBv.js";import"./mcp-oauth-CNMhJDmu.js";import"./extract-connection-data-Dul2DPHu.js";import"./dropdown-menu-DZINRqk1.js";import"./command-BbqtaVDQ.js";import"./index-j9xlj-U7.js";import"./companions-core-Dux1eCuk.js";import"./tabs-DWwahcys.js";import"./toggle-group-D77kRhQY.js";import"./use-deco-credits-D9jYGiRH.js";import"./connection-card-DEI-NB2P.js";import"./use-registry-connections-uco70Vv5.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CYbhzTEm.js";import"./connection-form-helpers-CU-7Z_i7.js";import"./collection-tabs-ka8uFVp2.js";import"./badge-D4GDvYs3.js";import"./connect-desktop-dialog-CCcKhodg.js";import"./select-model-CegjDpzH.js";import"./checkbox-Bkqcx2Gf.js";import"./skeleton-42ZosXGf.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DcSxLZCe.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B3cvfToG.js";import"./toolbar-DCkV6nNW.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-BzZJQvQX.js";import"./toolbar-icon-button-CXn8SeER.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-CkLj0tpV.js";import"./use-debounced-autosave-BSywpq42.js";import"./index-Cettjk3S.js";import"./search-input-CsR45mDs.js";import"./switch-Dz_8unx5.js";import"./github-repo-picker-C6PI1Ynd.js";import"./use-debounced-value-C8J4HIdj.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-CdBld6BN.js";import"./useQueries-CE0TRWeJ.js";import"./use-file-configs-BSrWzA4k.js";import"./automation-list-row-CEv2Y-C0.js";const rr={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function or(a){const e=se.c(71),{open:s,mode:i,initialName:l,parentLabel:m,isPending:h,onSubmit:f,onOpenChange:v}=a,j=l===void 0?"":l,d=h===void 0?!1:h,x=Me(),[g,k]=u.useState(j),[Z,W]=u.useState(s),y=rr[i];s!==Z&&(W(s),s&&k(j));let b;e[0]!==d||e[1]!==v?(b=_=>{!_&&!d&&v(!1)},e[0]=d,e[1]=v,e[2]=b):b=e[2];const F=b;let A;e[3]!==d||e[4]!==g||e[5]!==f?(A=async _=>{_.preventDefault();const te=g.trim();!te||d||await f(te)},e[3]=d,e[4]=g,e[5]=f,e[6]=A):A=e[6];const I=A;let S;e[7]!==y.titleKey||e[8]!==x?(S=x(y.titleKey),e[7]=y.titleKey,e[8]=x,e[9]=S):S=e[9];let P;e[10]!==S?(P=r.jsx(Dn,{children:S}),e[10]=S,e[11]=P):P=e[11];let D;e[12]!==y.descriptionKey||e[13]!==x?(D=x(y.descriptionKey),e[12]=y.descriptionKey,e[13]=x,e[14]=D):D=e[14];let M;e[15]!==D?(M=r.jsx(Mn,{children:D}),e[15]=D,e[16]=M):M=e[16];let N;e[17]!==P||e[18]!==M?(N=r.jsxs(Rn,{children:[P,M]}),e[17]=P,e[18]=M,e[19]=N):N=e[19];let R;e[20]!==m||e[21]!==x?(R=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x("sandbox.fileExplorerNameDialog.location")}),r.jsx(ot,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=m,e[21]=x,e[22]=R):R=e[22];let E;e[23]!==x?(E=x("sandbox.fileExplorerNameDialog.name"),e[23]=x,e[24]=E):E=e[24];let T;e[25]!==E?(T=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:E}),e[25]=E,e[26]=T):T=e[26];let Q;e[27]===Symbol.for("react.memo_cache_sentinel")?(Q=_=>k(_.target.value),e[27]=Q):Q=e[27];let X;e[28]!==y.placeholderKey||e[29]!==x?(X=x(y.placeholderKey),e[28]=y.placeholderKey,e[29]=x,e[30]=X):X=e[30];let Y;e[31]!==d||e[32]!==g||e[33]!==X?(Y=r.jsx(ot,{id:"file-explorer-name",value:g,onChange:Q,placeholder:X,autoFocus:!0,disabled:d}),e[31]=d,e[32]=g,e[33]=X,e[34]=Y):Y=e[34];let G;e[35]!==T||e[36]!==Y?(G=r.jsxs("div",{className:"space-y-1.5",children:[T,Y]}),e[35]=T,e[36]=Y,e[37]=G):G=e[37];let K;e[38]!==R||e[39]!==G?(K=r.jsxs("div",{className:"space-y-4 py-4",children:[R,G]}),e[38]=R,e[39]=G,e[40]=K):K=e[40];let q;e[41]!==v?(q=()=>v(!1),e[41]=v,e[42]=q):q=e[42];let $;e[43]!==x?($=x("sandbox.fileExplorerNameDialog.cancel"),e[43]=x,e[44]=$):$=e[44];let z;e[45]!==d||e[46]!==q||e[47]!==$?(z=r.jsx(De,{type:"button",variant:"outline",onClick:q,disabled:d,children:$}),e[45]=d,e[46]=q,e[47]=$,e[48]=z):z=e[48];let B;e[49]!==d||e[50]!==g?(B=!g.trim()||d,e[49]=d,e[50]=g,e[51]=B):B=e[51];let O;e[52]!==y.submitKey||e[53]!==d||e[54]!==x?(O=d?r.jsxs(r.Fragment,{children:[r.jsx(fe,{size:14,className:"animate-spin"}),x("sandbox.fileExplorerNameDialog.saving")]}):x(y.submitKey),e[52]=y.submitKey,e[53]=d,e[54]=x,e[55]=O):O=e[55];let V;e[56]!==B||e[57]!==O?(V=r.jsx(De,{type:"submit",disabled:B,children:O}),e[56]=B,e[57]=O,e[58]=V):V=e[58];let L;e[59]!==z||e[60]!==V?(L=r.jsxs(Tn,{children:[z,V]}),e[59]=z,e[60]=V,e[61]=L):L=e[61];let U;e[62]!==I||e[63]!==K||e[64]!==L||e[65]!==N?(U=r.jsx(Pn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:I,children:[N,K,L]})}),e[62]=I,e[63]=K,e[64]=L,e[65]=N,e[66]=U):U=e[66];let ee;return e[67]!==F||e[68]!==s||e[69]!==U?(ee=r.jsx(kn,{open:s,onOpenChange:F,children:U}),e[67]=F,e[68]=s,e[69]=U,e[70]=ee):ee=e[70],ee}function sr(a){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:i,fsActionPending:l,onOpenChange:m,onConfirm:h}=a,f=Me(),v=s?.kind==="directory",j=s!==null,d=v?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let x;e[0]!==f||e[1]!==d?(x=f(d),e[0]=f,e[1]=d,e[2]=x):x=e[2];let g;e[3]!==x?(g=r.jsx(Fn,{children:x}),e[3]=x,e[4]=g):g=e[4];let k;e[5]!==f?(k=f("sandbox.fileExplorerDeleteDialog.description"),e[5]=f,e[6]=k):k=e[6];const Z=s?.name;let W;e[7]!==Z?(W=r.jsx("span",{className:"font-mono",children:Z}),e[7]=Z,e[8]=W):W=e[8];let y;e[9]!==v||e[10]!==f?(y=v?f("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=v,e[10]=f,e[11]=y):y=e[11];let b;e[12]!==i.length||e[13]!==f?(b=i.length>0&&r.jsxs(r.Fragment,{children:[" ",i.length===1?f("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):f("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:i.length})]}),e[12]=i.length,e[13]=f,e[14]=b):b=e[14];let F;e[15]!==k||e[16]!==W||e[17]!==y||e[18]!==b?(F=r.jsxs(An,{children:[k," ",W,y,b]}),e[15]=k,e[16]=W,e[17]=y,e[18]=b,e[19]=F):F=e[19];let A;e[20]!==F||e[21]!==g?(A=r.jsxs(On,{children:[g,F]}),e[20]=F,e[21]=g,e[22]=A):A=e[22];let I;e[23]!==f?(I=f("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=f,e[24]=I):I=e[24];let S;e[25]!==l||e[26]!==I?(S=r.jsx(Ln,{disabled:l,children:I}),e[25]=l,e[26]=I,e[27]=S):S=e[27];const P=l||!s;let D;e[28]!==s||e[29]!==h?(D=Q=>{Q.preventDefault(),s&&h(s)},e[28]=s,e[29]=h,e[30]=D):D=e[30];let M;e[31]!==f?(M=f("sandbox.fileExplorerDeleteDialog.delete"),e[31]=f,e[32]=M):M=e[32];let N;e[33]!==P||e[34]!==D||e[35]!==M?(N=r.jsx(In,{disabled:P,onClick:D,children:M}),e[33]=P,e[34]=D,e[35]=M,e[36]=N):N=e[36];let R;e[37]!==S||e[38]!==N?(R=r.jsxs(Kn,{children:[S,N]}),e[37]=S,e[38]=N,e[39]=R):R=e[39];let E;e[40]!==A||e[41]!==R?(E=r.jsxs($n,{children:[A,R]}),e[40]=A,e[41]=R,e[42]=E):E=e[42];let T;return e[43]!==m||e[44]!==j||e[45]!==E?(T=r.jsx(zn,{open:j,onOpenChange:m,children:E}),e[43]=m,e[44]=j,e[45]=E,e[46]=T):T=e[46],T}var ze="ContextMenu",[ir]=sn(ze,[lt]),J=lt(),[ar,ct]=ir(ze),dt=a=>{const{__scopeContextMenu:e,children:s,onOpenChange:i,dir:l,modal:m=!0}=a,[h,f]=u.useState(!1),v=J(e),j=rn(i),d=u.useCallback(x=>{f(x),j(x)},[j]);return r.jsx(ar,{scope:e,open:h,onOpenChange:d,modal:m,children:r.jsx(on,{...v,dir:l,open:h,onOpenChange:d,modal:m,children:s})})};dt.displayName=ze;var ut="ContextMenuTrigger",ft=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,disabled:i=!1,...l}=a,m=ct(ut,s),h=J(s),f=u.useRef({x:0,y:0}),v=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...f.current})}),j=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(j.current),[]),x=g=>{f.current={x:g.clientX,y:g.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{i&&d()},[i,d]),r.jsxs(r.Fragment,{children:[r.jsx(Yt,{...h,virtualRef:v}),r.jsx(Jt.span,{"data-state":m.open?"open":"closed","data-disabled":i?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...a.style},onContextMenu:i?a.onContextMenu:xe(a.onContextMenu,g=>{d(),x(g),g.preventDefault()}),onPointerDown:i?a.onPointerDown:xe(a.onPointerDown,Se(g=>{d(),j.current=window.setTimeout(()=>x(g),700)})),onPointerMove:i?a.onPointerMove:xe(a.onPointerMove,Se(d)),onPointerCancel:i?a.onPointerCancel:xe(a.onPointerCancel,Se(d)),onPointerUp:i?a.onPointerUp:xe(a.onPointerUp,Se(d))})]})});ft.displayName=ut;var lr="ContextMenuPortal",pt=a=>{const{__scopeContextMenu:e,...s}=a,i=J(e);return r.jsx(tn,{...i,...s})};pt.displayName=lr;var mt="ContextMenuContent",xt=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=ct(mt,s),m=J(s),h=u.useRef(!1);return r.jsx(nn,{...m,...i,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:f=>{a.onCloseAutoFocus?.(f),!f.defaultPrevented&&h.current&&f.preventDefault(),h.current=!1},onInteractOutside:f=>{a.onInteractOutside?.(f),!f.defaultPrevented&&!l.modal&&(h.current=!0)},style:{...a.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)"}})});xt.displayName=mt;var cr="ContextMenuGroup",dr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(an,{...l,...i,ref:e})});dr.displayName=cr;var ur="ContextMenuLabel",fr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(ln,{...l,...i,ref:e})});fr.displayName=ur;var pr="ContextMenuItem",ht=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(Zt,{...l,...i,ref:e})});ht.displayName=pr;var mr="ContextMenuCheckboxItem",xr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(cn,{...l,...i,ref:e})});xr.displayName=mr;var hr="ContextMenuRadioGroup",gr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(dn,{...l,...i,ref:e})});gr.displayName=hr;var br="ContextMenuRadioItem",yr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(un,{...l,...i,ref:e})});yr.displayName=br;var vr="ContextMenuItemIndicator",Cr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(fn,{...l,...i,ref:e})});Cr.displayName=vr;var wr="ContextMenuSeparator",gt=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(en,{...l,...i,ref:e})});gt.displayName=wr;var Nr="ContextMenuArrow",jr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(pn,{...l,...i,ref:e})});jr.displayName=Nr;var Er="ContextMenuSubTrigger",Sr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(mn,{...l,...i,ref:e})});Sr.displayName=Er;var Dr="ContextMenuSubContent",Mr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(xn,{...l,...i,ref:e,style:{...a.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)"}})});Mr.displayName=Dr;function Se(a){return e=>e.pointerType!=="mouse"?a(e):void 0}var Rr=dt,Tr=ft,Pr=pt,kr=xt,Fr=ht,Ar=gt;function Or(a){const e=se.c(4);let s;e[0]!==a?({...s}=a,e[0]=a,e[1]=s):s=e[1];let i;return e[2]!==s?(i=r.jsx(Rr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=i):i=e[3],i}function Lr(a){const e=se.c(4);let s;e[0]!==a?({...s}=a,e[0]=a,e[1]=s):s=e[1];let i;return e[2]!==s?(i=r.jsx(Tr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=i):i=e[3],i}function Ir(a){const e=se.c(8);let s,i;e[0]!==a?({className:s,...i}=a,e[0]=a,e[1]=s,e[2]=i):(s=e[1],i=e[2]);let l;e[3]!==s?(l=le("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",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==i||e[6]!==l?(m=r.jsx(Pr,{children:r.jsx(kr,{"data-slot":"context-menu-content",className:l,...i})}),e[5]=i,e[6]=l,e[7]=m):m=e[7],m}function ue(a){const e=se.c(12);let s,i,l,m;e[0]!==a?({className:s,inset:i,variant:m,...l}=a,e[0]=a,e[1]=s,e[2]=i,e[3]=l,e[4]=m):(s=e[1],i=e[2],l=e[3],m=e[4]);const h=m===void 0?"default":m;let f;e[5]!==s?(f=le("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",s),e[5]=s,e[6]=f):f=e[6];let v;return e[7]!==i||e[8]!==l||e[9]!==f||e[10]!==h?(v=r.jsx(Fr,{"data-slot":"context-menu-item","data-inset":i,"data-variant":h,className:f,...l}),e[7]=i,e[8]=l,e[9]=f,e[10]=h,e[11]=v):v=e[11],v}function st(a){const e=se.c(8);let s,i;e[0]!==a?({className:s,...i}=a,e[0]=a,e[1]=s,e[2]=i):(s=e[1],i=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==i||e[6]!==l?(m=r.jsx(Ar,{"data-slot":"context-menu-separator",className:l,...i}),e[5]=i,e[6]=l,e[7]=m):m=e[7],m}const Kr="#d9a441";function $r(a){const e=se.c(63),{node:s,depth:i,isExpanded:l,isSelected:m,isLoading:h,fileVisual:f,onOpen:v,onSelect:j,onNewFile:d,onNewFolder:x,onCopyPath:g,onCopyRelativePath:k,onRename:Z,onDelete:W}=a,y=h===void 0?!1:h,b=Me(),F=s.kind==="directory",{Icon:A,color:I}=f,S=m&&"bg-accent";let P;e[0]!==S?(P=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",S),e[0]=S,e[1]=P):P=e[1];const D=`${i*14+8}px`;let M;e[2]!==D?(M={paddingLeft:D},e[2]=D,e[3]=M):M=e[3];let N;e[4]!==v||e[5]!==j?(N=()=>{j(),v()},e[4]=v,e[5]=j,e[6]=N):N=e[6];let R;e[7]!==A||e[8]!==I||e[9]!==F||e[10]!==l||e[11]!==y?(R=F?r.jsxs(r.Fragment,{children:[y?r.jsx(fe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(_n,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(Gn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Bn,{size:16,className:"shrink-0",style:{color:Kr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(A,{size:16,className:"shrink-0",style:{color:I}})]}),e[7]=A,e[8]=I,e[9]=F,e[10]=l,e[11]=y,e[12]=R):R=e[12];let E;e[13]!==s.name?(E=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=E):E=e[14];let T;e[15]!==P||e[16]!==M||e[17]!==N||e[18]!==R||e[19]!==E?(T=r.jsx(Lr,{asChild:!0,children:r.jsxs("button",{type:"button",className:P,style:M,onClick:N,children:[R,E]})}),e[15]=P,e[16]=M,e[17]=N,e[18]=R,e[19]=E,e[20]=T):T=e[20];let Q;e[21]!==b?(Q=b("sandbox.fileTreeRow.newFile"),e[21]=b,e[22]=Q):Q=e[22];let X;e[23]!==d||e[24]!==Q?(X=r.jsx(ue,{onSelect:d,children:Q}),e[23]=d,e[24]=Q,e[25]=X):X=e[25];let Y;e[26]!==b?(Y=b("sandbox.fileTreeRow.newFolder"),e[26]=b,e[27]=Y):Y=e[27];let G;e[28]!==x||e[29]!==Y?(G=r.jsx(ue,{onSelect:x,children:Y}),e[28]=x,e[29]=Y,e[30]=G):G=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=r.jsx(st,{}),e[31]=K):K=e[31];let q;e[32]!==b?(q=b("sandbox.fileTreeRow.copyPath"),e[32]=b,e[33]=q):q=e[33];let $;e[34]!==g||e[35]!==q?($=r.jsx(ue,{onSelect:g,children:q}),e[34]=g,e[35]=q,e[36]=$):$=e[36];let z;e[37]!==b?(z=b("sandbox.fileTreeRow.copyRelativePath"),e[37]=b,e[38]=z):z=e[38];let B;e[39]!==k||e[40]!==z?(B=r.jsx(ue,{onSelect:k,children:z}),e[39]=k,e[40]=z,e[41]=B):B=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(st,{}),e[42]=O):O=e[42];let V;e[43]!==b?(V=b("sandbox.fileTreeRow.rename"),e[43]=b,e[44]=V):V=e[44];let L;e[45]!==Z||e[46]!==V?(L=r.jsx(ue,{onSelect:Z,children:V}),e[45]=Z,e[46]=V,e[47]=L):L=e[47];let U;e[48]!==b?(U=b("sandbox.fileTreeRow.delete"),e[48]=b,e[49]=U):U=e[49];let ee;e[50]!==W||e[51]!==U?(ee=r.jsx(ue,{variant:"destructive",onSelect:W,children:U}),e[50]=W,e[51]=U,e[52]=ee):ee=e[52];let _;e[53]!==X||e[54]!==G||e[55]!==$||e[56]!==B||e[57]!==L||e[58]!==ee?(_=r.jsxs(Ir,{className:"w-52",children:[X,G,K,$,B,O,L,ee]}),e[53]=X,e[54]=G,e[55]=$,e[56]=B,e[57]=L,e[58]=ee,e[59]=_):_=e[59];let te;return e[60]!==_||e[61]!==T?(te=r.jsxs(Or,{children:[T,_]}),e[60]=_,e[61]=T,e[62]=te):te=e[62],te}bn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const it=200,zr=2,_r=250,at=200;function Gr(a,e,s,i){return`/api/${a}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${i}`}function Br(a){const e=se.c(9),{text:s,query:i}=a;let l,m,h;if(e[0]!==i||e[1]!==s){const{leadingEllipsis:v,segments:j}=Xn(s,i);l="truncate font-mono text-muted-foreground",m=v&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),h=j.map(Vr),e[0]=i,e[1]=s,e[2]=l,e[3]=m,e[4]=h}else l=e[2],m=e[3],h=e[4];let f;return e[5]!==l||e[6]!==m||e[7]!==h?(f=r.jsxs("span",{className:l,children:[m,h]}),e[5]=l,e[6]=m,e[7]=h,e[8]=f):f=e[8],f}function Vr(a,e){return a.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:a.text},e):r.jsx("span",{children:a.text},e)}function $i({orgSlug:a,virtualMcpId:e,branch:s,openPath:i}){const[l,m]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:f}=l,[v,j]=u.useState(new Set),[d,x]=u.useState(null),[g,k]=u.useState(null),[Z,W]=u.useState([]),[y,b]=u.useState(""),[F,A]=u.useState(null),[I,S]=u.useState(null),[P,D]=u.useState(!1),[M,N]=u.useState(!1),[R,E]=u.useState(!1),[T,Q]=u.useState(!1),[,X]=u.useState(new Set),[Y,G]=u.useState(new Set),K=u.useRef(0),q=u.useRef(null),$=u.useRef(new Set),z=u.useRef(new Map),B=u.useRef(null),O=u.useRef(0),V=u.useRef(null),L=u.useRef(null),U=u.useRef(null);function ee(t){X(n=>{const o=typeof t=="function"?t(n):t;return $.current=o,o})}const[_,te]=u.useState(new Map),Re=u.useRef(null),[ie,he]=u.useState(null),{sendMessage:bt}=jn(),{openSidePanel:yt}=En(),ge=hn(),[H,oe]=u.useState(null),[Te,Pe]=u.useState(null),[be,ye]=u.useState(!1);async function ae(t,n){const o=await fetch(Gr(a,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function ve(){ge.invalidateQueries({queryKey:rt(a,e,s)})}function _e(t,n,o){navigator.clipboard.writeText(o).then(()=>ne.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ne.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function vt(t){const n=tr(t);if(!n)return;const o=`${a}/${e}/${s}`;ge.setQueryData(Ze.decofile(o),c=>{if(!c)return c;const{[n]:p,...C}=c;return C}),ge.invalidateQueries({queryKey:Ze.liveMeta(a,e,s)})}function Ct(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>Ne(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)vt(o)}function wt(t){const n=Ne(t);return Z.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=_.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ge(t){W(n=>n.map(o=>t(o)).filter(o=>o!==null)),x(n=>n&&t(n)),te(n=>{const o=new Map;for(const[c,p]of n){const C=t(c);C&&o.set(C,p)}return o}),k(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=Ne(t);k(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ge(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t,n){if(!H)return;const o=Ee(H.parentDir,n);if($e(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ae("write",{path:re(o),content:""}),await pe(),await ve(),oe(null),me(o)}async function Et(t,n){if(!H)return;const o=Ee(H.parentDir,n);if($e(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ae("mkdir",{path:c}),m(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await pe(),await ve(),oe(null),j(p=>{const C=new Set(p);for(const ce of Oe(o))C.add(ce);return C.add(o),C}),k({name:n,path:o,kind:"directory",children:[]})}async function St(t,n){if(!H)return;const o=H.node.path,c=je(o),p=Ee(c,n);if(p===o){oe(null);return}if($e(p,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ae("rename",{from:re(o),to:re(p)}),Ge(C=>C===o?p:C.startsWith(`${o}/`)?Ee(p,C.slice(o.length+1)):C),await pe(),await ve(),oe(null)}async function Dt(t,n){ye(!0);try{await ae("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Ct(n),Nt(n.path),await pe(),await ve(),Pe(null),ne.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){ne.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function Mt(t,n){const o=Jn(n);if(o){ne.error(o);return}ye(!0);try{H?.mode==="new-file"?(await jt(t,n),ne.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):H?.mode==="new-folder"?(await Et(t,n),ne.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):H?.mode==="rename"&&(await St(t,n),ne.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){ne.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Be=u.useRef(!1);Be.current||(Be.current=!0,q.current=pe());const[Rt,Tt]=u.useState(null),w=Me();if(i&&i!==Rt){Tt(i);const t=i;queueMicrotask(()=>{Vn(t)&&me(t).catch(n=>{ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})})}async function ke(t){const n=await ae("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,o){if(o!==K.current)return!1;let c=!1;return m(p=>{const C=n?nr(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!C.truncated,{files:C.files,directories:C.directories,truncated:c}}),c&&ne.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function Pt(t){const n=z.current.get(t);if(n)return n;const o=K.current,c=(async()=>{const p=await ke({pattern:"**/*",path:re(t),limit:Ae}),C=Ve(p,!0,o);return!C&&o===K.current&&ee(ce=>{const Ce=new Set(ce);return Ce.add(t),Ce}),C})();z.current.set(t,c);try{return await c}finally{z.current.delete(t)}}async function Ue(t){if(!Ke(t,$.current))return!1;G(n=>new Set(n).add(t));try{return await Pt(t)}finally{G(n=>{const o=new Set(n);return o.delete(t),o})}}async function kt(t,n){const o=new Set($.current);for(const c of Oe(n)){if(!Ke(c,o))continue;if(await Ue(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function pe(){const t=++K.current;V.current=null,L.current=null,z.current.clear(),E(!0),ee(new Set),j(new Set),G(new Set);try{const n=await ke({pattern:"**/*",limit:Ae,maxDepth:Un});Ve(n,!1,t),Q(!0)}catch{T&&ne.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{E(!1)}}async function He(t){if(!_.get(t)?.loaded){te(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ae("read",{path:re(t),full:!0}),c=Yn(o.content??"");te(p=>{const C=new Map(p);return C.set(t,{savedContent:c,editorValue:c,loaded:!0}),C})}catch{}}}function Ft(){O.current++,A(null),S(null),D(!1),N(!1)}async function At(){const t=K.current,n=V.current;if(n&&n.generation===t)return n.files;const o=L.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await ke({pattern:"**/*",limit:Ae});return K.current===t&&(V.current={generation:t,files:p.files}),p.files})();L.current={generation:t,promise:c};try{return await c}finally{L.current?.generation===t&&(L.current=null)}}async function Ot(t,n){try{const o=await At();if(n!==O.current)return;A(Zn(o,t,at))}catch{if(n!==O.current)return;A([])}}async function Lt(t,n){D(!0);try{const o=await ae("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:it});if(n!==O.current)return;S(er(o.results??"")),N((o.matchCount??0)>=it)}catch{if(n!==O.current)return;S([]),N(!1)}finally{n===O.current&&D(!1)}}function It(t){const n=t.trim(),o=++O.current;Ot(n,o),n.length<zr?(S(null),D(!1),N(!1)):Lt(n,o)}function Kt(t){if(b(t),B.current&&clearTimeout(B.current),!t.trim()){Ft();return}B.current=setTimeout(()=>{It(t)},_r)}function We(t){const n=U.current;if(!n||n.path!==d)return;U.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function $t(t){U.current={path:t.path,line:t.line};const n=d===t.path&&_.get(t.path)?.loaded;me(t.path),n&&Re.current&&We(Re.current)}async function zt(t,n){try{await ae("write",{path:re(t),content:n}),we("file saved via sandbox /write",{path:t}),ge.invalidateQueries({queryKey:rt(a,e,s)});try{const o=await Sn(a,e,s);we("git status after save",o)}catch(o){we("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}te(o=>{const c=new Map(o),p=c.get(t);return p&&c.set(t,{...p,savedContent:n}),c})}catch(o){we("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){x(t),k({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),he(null),Z.includes(t)||W(n=>[...n,t]),He(t)}function Gt(t){W(n=>{const o=n.filter(c=>c!==t);return d===t&&x(o[o.length-1]??null),o}),te(n=>{const o=new Map(n);return o.delete(t),o})}function qe(t){j(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Bt(t){if(Ke(t,$.current))try{if(await Ue(t))return}catch(n){ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}qe(t)}async function Vt(t,n){if(n){qe(t);return}await Bt(t)}async function me(t){await q.current,await kt(w,t);const n=Oe(t);j(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),_t(t)}function Ut(){return g?.kind==="directory"?g.path:g?.kind==="file"?je(g.path):d?je(d):"/"}function Qe(t){const n=Ut();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Ht=Hn(h,f),Xe=Wn(Ht,v),Fe=F?.length??0,Ye=qn(I??[]),Je=I?.length??0,de=d?_.get(d):null,Wt=de?.loaded&&de.editorValue!==de.savedContent,qt=Te?wt(Te.path):[],Qt=(t,n)=>{Re.current=t,We(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await zt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!d)return;const p=c.getValueInRange(o);he({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Xt(t){if(!ie)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ie.filePath}\``,`**Lines:** ${ie.lineStart}–${ie.lineEnd}`];if(ie.selectedCode){const o=Ie(ie.filePath),c=ie.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),yt("chat"),bt({parts:[{type:"text",text:n.join(`
2
+ `)}]}),he(null)}return R&&!T?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{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(yn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:y,onChange:t=>Kt(t.target.value),placeholder:w("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":w("sandbox.fileExplorer.searchFilesLabel"),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(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:r.jsx(vn,{size:14})})}),r.jsx(nt,{side:"bottom",children:w("sandbox.fileExplorer.newFile")})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:r.jsx(Cn,{size:14})})}),r.jsx(nt,{side:"bottom",children:w("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(Nn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!y&&Xe.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",p=v.has(n.path),C=g?.path===n.path,ce=Qn(n.path,n.kind),Ce=c&&Y.has(n.path);return r.jsx($r,{node:n,depth:o,isExpanded:p,isSelected:C,isLoading:Ce,fileVisual:Le(n.name),onSelect:()=>k(n),onOpen:()=>{c?Vt(n.path,p):me(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>_e(w,"Path",Ne(n.path)),onCopyRelativePath:()=>_e(w,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>Pe(n)},n.path)}),!y&&T&&Xe.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFilesFound")}),y&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.files")}),Fe>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Fe,Fe>=at?"+":""]})]}),F!==null&&F.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFileNamesMatch")}),F?.map(t=>{const n=t.split("/").pop()??t,o=je(t),{Icon:c,color:p}=Le(n),C=d===t;return r.jsxs("button",{type:"button",onClick:()=>{me(t)},title:t,className:le("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",C&&"bg-accent"),children:[r.jsx(c,{size:14,className:le("shrink-0",p)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),y&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.inFiles")}),Je>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Je,M?"+":""]}),P&&r.jsx(fe,{size:10,className:"animate-spin"})]}),!P&&I!==null&&Ye.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noMatchesInFileContents")}),Ye.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Le(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:le("shrink-0",c)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(p=>r.jsxs("button",{type:"button",onClick:()=>$t(p),title:`${t.path}:${p.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:p.line}),r.jsx(Br,{text:p.text,query:y})]},`${t.path}:${p.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[Z.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:Z.map(t=>{const n=_.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=d===t,p=t.split("/").pop()??t;return r.jsxs("div",{className:le("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",c?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{x(t),He(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":c,children:[r.jsx("span",{className:"truncate max-w-32",children:p}),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:C=>{C.stopPropagation(),Gt(t)},children:r.jsx(wn,{size:12})})]},t)})}),ie&&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()&&Xt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:w("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&he(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:w("sandbox.fileExplorer.send"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:w("sandbox.fileExplorer.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&&de?.loaded?r.jsx(gn,{language:Ie(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:de.editorValue,path:d,onChange:t=>{const n=d;n&&te(o=>{const c=new Map(o),p=c.get(n);return p&&c.set(n,{...p,editorValue:t??""}),c})},onMount:Qt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{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&&!de?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{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:w("sandbox.fileExplorer.selectFileToEdit")})}),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:[w(Wt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Ie(d)]})]})]}),r.jsx(or,{open:H!==null,mode:H?.mode??"new-file",initialName:H?.mode==="rename"?H.node.name:"",parentLabel:H&&H.mode!=="rename"?H.parentDir==="/"?"/":re(H.parentDir):void 0,isPending:be,onSubmit:t=>Mt(w,t),onOpenChange:t=>{!t&&!be&&oe(null)}}),r.jsx(sr,{deleteTarget:Te,deleteDirtyPaths:qt,fsActionPending:be,onOpenChange:t=>{!t&&!be&&Pe(null)},onConfirm:t=>{Dt(w,t)}})]})}export{$i as FileExplorer};
@@ -1,4 +1,4 @@
1
- import{bw as jl,j as q,aC as lt,bP as jn,b as _n,r as Ve,H as E0,m as $b,c as Ye,d as T0,f as S0,B as zb}from"./index-DuymBIik.js";import{i as jb}from"./Check-FOKBd2_P.js";import{a as Vb}from"./Copy01-UC6mksFo.js";import{e as y0,g as A0,f as _0,b as I0}from"./dialog-C8poGW_g.js";import{n as k0}from"./Globe01-CzNuZIl8.js";import{k as R0,n as N0}from"./ZoomOut-By5DUB7q.js";import{u as C0}from"./use-mobile-BP_lYuRj.js";import{h as v0}from"./tab-id-BijBBRwE.js";function Vl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=Vl();function Yb(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")},w0=/^(?:[ \t]*(?:\n|$))+/,x0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,O0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,In=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,L0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yl=/(?:[*+-]|\d{1,9}[.)])/,Wb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kb=le(Wb).replace(/bull/g,Yl).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(),D0=le(Wb).replace(/bull/g,Yl).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(),Wl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,M0=/^[^\n]+/,Kl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,P0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Kl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),F0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yl).getRegex(),tr="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",Xl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,B0=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",Xl).replace("tag",tr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xb=le(Wl).replace("hr",In).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",tr).getRegex(),U0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xb).getRegex(),Zl={blockquote:U0,code:x0,def:P0,fences:O0,heading:L0,hr:In,html:B0,lheading:Kb,list:F0,newline:w0,paragraph:Xb,table:ln,text:M0},Pc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",In).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",tr).getRegex(),H0={...Zl,lheading:D0,table:Pc,paragraph:le(Wl).replace("hr",In).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Pc).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",tr).getRegex()},q0={...Zl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xl).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(Wl).replace("hr",In).replace("heading",` *#{1,6} *[^
1
+ import{bw as jl,j as q,aC as lt,bP as jn,b as _n,r as Ve,H as E0,m as $b,c as Ye,d as T0,f as S0,B as zb}from"./index-CAh51G0Z.js";import{i as jb}from"./Check-C0G51sNz.js";import{a as Vb}from"./Copy01-CKqR5lah.js";import{e as y0,g as A0,f as _0,b as I0}from"./dialog-CKx91Chj.js";import{n as k0}from"./Globe01-BxptDTGo.js";import{k as R0,n as N0}from"./ZoomOut-BWyriAeg.js";import{u as C0}from"./use-mobile-BBEujCmt.js";import{h as v0}from"./tab-id-BijBBRwE.js";function Vl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=Vl();function Yb(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")},w0=/^(?:[ \t]*(?:\n|$))+/,x0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,O0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,In=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,L0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yl=/(?:[*+-]|\d{1,9}[.)])/,Wb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kb=le(Wb).replace(/bull/g,Yl).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(),D0=le(Wb).replace(/bull/g,Yl).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(),Wl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,M0=/^[^\n]+/,Kl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,P0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Kl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),F0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yl).getRegex(),tr="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",Xl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,B0=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",Xl).replace("tag",tr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xb=le(Wl).replace("hr",In).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",tr).getRegex(),U0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xb).getRegex(),Zl={blockquote:U0,code:x0,def:P0,fences:O0,heading:L0,hr:In,html:B0,lheading:Kb,list:F0,newline:w0,paragraph:Xb,table:ln,text:M0},Pc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",In).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",tr).getRegex(),H0={...Zl,lheading:D0,table:Pc,paragraph:le(Wl).replace("hr",In).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Pc).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",tr).getRegex()},q0={...Zl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xl).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(Wl).replace("hr",In).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Kb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},G0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Zb=/^( {2,}|\\)\n(?!\s*$)/,z0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,nr=/[\p{P}\p{S}]/u,Ql=/[\s\p{P}\p{S}]/u,Qb=/[^\s\p{P}\p{S}]/u,j0=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ql).getRegex(),Jb=/(?!~)[\p{P}\p{S}]/u,V0=/(?!~)[\s\p{P}\p{S}]/u,Y0=/(?:[^\s\p{P}\p{S}]|~)/u,W0=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,eE=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,K0=le(eE,"u").replace(/punct/g,nr).getRegex(),X0=le(eE,"u").replace(/punct/g,Jb).getRegex(),tE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Z0=le(tE,"gu").replace(/notPunctSpace/g,Qb).replace(/punctSpace/g,Ql).replace(/punct/g,nr).getRegex(),Q0=le(tE,"gu").replace(/notPunctSpace/g,Y0).replace(/punctSpace/g,V0).replace(/punct/g,Jb).getRegex(),J0=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Qb).replace(/punctSpace/g,Ql).replace(/punct/g,nr).getRegex(),eS=le(/\\(punct)/,"gu").replace(/punct/g,nr).getRegex(),tS=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(),nS=le(Xl).replace("(?:-->|$)","-->").getRegex(),rS=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",nS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Vn=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,aS=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Vn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),nE=le(/^!?\[(label)\]\[(ref)\]/).replace("label",Vn).replace("ref",Kl).getRegex(),rE=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",Kl).getRegex(),iS=le("reflink|nolink(?!\\()","g").replace("reflink",nE).replace("nolink",rE).getRegex(),Jl={_backpedal:ln,anyPunctuation:eS,autolink:tS,blockSkip:W0,br:Zb,code:$0,del:ln,emStrongLDelim:K0,emStrongRDelimAst:Z0,emStrongRDelimUnd:J0,escape:G0,link:aS,nolink:rE,punctuation:j0,reflink:nE,reflinkSearch:iS,tag:rS,text:z0,url:ln},oS={...Jl,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",Vn).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Vn).getRegex()},Il={...Jl,emStrongRDelimAst:Q0,emStrongLDelim:X0,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.!#$%&'*+\/=?_`{\|}~-]+@)))/},sS={...Il,br:le(Zb).replace("{2,}","*").getRegex(),text:le(Il.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},On={normal:Zl,gfm:H0,pedantic:q0},Jt={normal:Jl,gfm:Il,breaks:sS,pedantic:oS},uS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Fc=e=>uS[e];function Je(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,Fc)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,Fc);return e}function Bc(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function Uc(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 lS(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 Hc(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 cS(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 Yn=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,f as o,j as i,N as l}from"./index-DuymBIik.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,f as o,j as i,N as l}from"./index-CAh51G0Z.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{dV as C,c as d,j as c,a6 as j,r as f,m as p,bd as b,dW as v,dX as h}from"./index-DuymBIik.js";import{L as N}from"./label-BesBP85G.js";const E=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}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(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,E as a,w as b,L as c,P as d,y as e,R as f};
1
+ import{dV as C,c as d,j as c,a6 as j,r as f,m as p,bd as b,dW as v,dX as h}from"./index-CAh51G0Z.js";import{L as N}from"./label-CQP0tQqN.js";const E=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}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(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,E as a,w as b,L as c,P as d,y as e,R as f};
@@ -1 +1 @@
1
- import{c as G,F as te,r as Z,j as i,B as X,L as ge,J as de,M as W,b as Y,d as me,o as ue,R as fe,P as pe,e as oe,q as ee,t as B,K as ie,a6 as se,G as ne,w as he}from"./index-DuymBIik.js";import{P as M}from"./index-DchPmGr7.js";import{A as xe,b as je}from"./alert-C673phcc.js";import{i as Se}from"./ArrowRight-BxFdRcE2.js";import{n as ze}from"./LinkExternal01-BlOkjQhr.js";import{s as ve}from"./XClose-BRfYNzbj.js";import{u as be}from"./use-org-auth-client-BRZwr2Lx.js";import{u as ye}from"./use-debounced-autosave-fX75MRyK.js";import{A as Oe}from"./avatar-DVZ7QVhb.js";import{I as ae}from"./input-BLntXd-c.js";import{S as re,a as le,b as Q,c as Ce}from"./settings-section-CIwLHY3B.js";import{D as we}from"./domain-settings-DuejMV0N.js";import{u as De}from"./studio-tools-CovYHVyK.js";import{A as _e,a as Ae,b as Ne,c as Fe,g as Te,d as Ee,e as Pe,f as Re}from"./alert-dialog-CuMkmai1.js";import{R as ke}from"./require-capability-iP09YZwt.js";import"./sidebar-DPvLhEuy.js";import"./LayoutLeft-CfyciU-s.js";import"./use-mobile-BP_lYuRj.js";import"./X-9b5270Kw.js";import"./tooltip-AF70XTGt.js";import"./User01-Cuw_nDP_.js";import"./card-DBxOngCY.js";import"./ArrowUpRight-BR3mm8VV.js";import"./badge-gGz283dj.js";import"./select-T8A9ONsw.js";import"./Check-FOKBd2_P.js";import"./ChevronDown-CoyYIWpI.js";import"./ChevronUp-DDw2lZkt.js";import"./use-capability-DQZYrrf1.js";import"./access-gate-DQaDnwJU.js";import"./capability-load-error-BWv1ebjq.js";function ce(e){return`connect-banner-dismissed:${e}`}function Le(e){if(typeof window>"u")return!0;try{return localStorage.getItem(ce(e))==="1"}catch{return!1}}function Ie(){const e=G.c(17),{org:t}=te();let n;e[0]!==t.id?(n=()=>Le(t.id),e[0]=t.id,e[1]=n):n=e[1];const[u,p]=Z.useState(n);if(u)return null;let o;e[2]!==t.id?(o=()=>{p(!0);try{localStorage.setItem(ce(t.id),"1")}catch{}},e[2]=t.id,e[3]=o):o=e[3];const g=o;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(ze,{}),e[4]=d):d=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=l):l=e[5];let c;e[6]!==t.slug?(c={org:t.slug},e[6]=t.slug,e[7]=c):c=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Se,{size:12}),e[8]=m):m=e[8];let s;e[9]!==c?(s=i.jsx(X,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(ge,{to:"/$org/settings/connect",params:c,children:["Connect to clients ",m]})}),e[9]=c,e[10]=s):s=e[10];let a;e[11]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(ve,{size:14}),e[11]=a):a=e[11];let r;e[12]!==g?(r=i.jsx(X,{variant:"ghost",size:"icon",className:"size-7",onClick:g,"aria-label":"Dismiss",children:a}),e[12]=g,e[13]=r):r=e[13];let f;return e[14]!==s||e[15]!==r?(f=i.jsxs(xe,{variant:"info",className:"items-center",children:[d,i.jsxs(je,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[l,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s,r]})]})]}),e[14]=s,e[15]=r,e[16]=f):f=e[16],f}const $e=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 qe(e){return typeof e=="string"&&$e.has(e.trim().toLowerCase())}const Be=de({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().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=>!qe(e),"This organization URL is reserved by Studio"),logo:W().optional()});function Ge(e){const t=G.c(17),{value:n,onChange:u,name:p,disabled:o}=e,g=Y(),d=Z.useRef(null);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>d.current?.click(),t[0]=l):l=t[0];const c=l;let m;t[1]!==u||t[2]!==g?(m=H=>{const S=H.target.files?.[0];if(!S)return;if(S.size>2097152){B.error(g("settings.organizationForm.imageTooLarge"));return}const x=new FileReader;x.onerror=()=>B.error(g("settings.organizationForm.failedToReadImage")),x.onloadend=()=>{x.result&&u(x.result),d.current&&(d.current.value="")},x.readAsDataURL(S)},t[1]=u,t[2]=g,t[3]=m):m=t[3];const s=m;let a;t[4]!==g?(a=g("settings.organizationForm.uploadLogoLabel"),t[4]=g,t[5]=a):a=t[5];let r;t[6]!==o||t[7]!==s?(r=i.jsx("input",{ref:d,type:"file",accept:"image/*",onChange:s,className:"hidden",disabled:o}),t[6]=o,t[7]=s,t[8]=r):r=t[8];const f=n||void 0,j=p??"?";let h;t[9]!==f||t[10]!==j?(h=i.jsx(Oe,{url:f,fallback:j,shape:"square",size:"base"}),t[9]=f,t[10]=j,t[11]=h):h=t[11];let z;return t[12]!==o||t[13]!==a||t[14]!==r||t[15]!==h?(z=i.jsxs("button",{type:"button",onClick:c,disabled:o,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":a,children:[r,h]}),t[12]=o,t[13]=a,t[14]=r,t[15]=h,t[16]=z):z=t[16],z}function Ve(){const e=Y(),t=me(),{org:n}=te(),u=be(),p=ue(),o=fe({resolver:pe(Be),values:{name:n.name??"",slug:n.slug??"",logo:n.logo??""}}),g=oe({mutationFn:async s=>{const a={name:s.name,slug:s.slug};s.logo&&(a.logo=s.logo);const r=await u.organization.update({data:a});if(r?.error)throw new Error(r.error.message||e("settings.organizationForm.failedToUpdateOrg"));return r},onSuccess:(s,a)=>{ee("organization_settings_updated",{organization_id:n.id,fields:Object.keys(a)}),p.invalidateQueries({queryKey:ie.organizations()}),p.invalidateQueries({queryKey:ie.activeOrganization(n.slug)}),B.success(e("settings.organizationForm.updateSuccess")),s?.data?.slug&&s.data.slug!==n.slug&&t({to:"/$org/settings/general",params:{org:s.data.slug}})},onError:(s,a)=>{ee("organization_settings_update_failed",{organization_id:n.id,fields:Object.keys(a),error:s instanceof Error?s.message:String(s)}),B.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:l}=ye({save:async()=>{const s=o.control._formState.dirtyFields;if(Object.keys(s).length===0||!await o.trigger())return;const r=o.getValues(),f=o.control._defaultValues;o.reset(r,{keepValues:!0});try{await g.mutateAsync(r)}catch{o.reset(f,{keepValues:!0})}}}),c=o.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(re,{children:i.jsxs(le,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ge,{value:o.watch("logo"),onChange:s=>{o.setValue("logo",s??"",{shouldDirty:!0}),l()},name:o.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(se,{control:o.control,name:"name",render:({field:s})=>i.jsx(ae,{id:"org-name",...s,onChange:a=>{s.onChange(a),d()},onBlur:()=>{s.onBlur(),l()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),action:i.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&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),i.jsx(se,{control:o.control,name:"slug",render:({field:s})=>i.jsx("input",{id:"org-slug",value:s.value??"",name:s.name,ref:s.ref,placeholder:e("settings.organizationForm.slugPlaceholder"),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:a=>{const r=a.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");o.setValue("slug",r,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),d()},onBlur:()=>{s.onBlur(),l()}})})]})}),(c.name||c.slug||c.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[c.name&&i.jsx("p",{className:"text-xs text-destructive",children:c.name.message}),c.slug&&i.jsx("p",{className:"text-xs text-destructive",children:c.slug.message}),c.logo&&i.jsx("p",{className:"text-xs text-destructive",children:c.logo.message})]})]})})}function Ue(){const e=G.c(86),t=Y(),{org:n}=te(),[u,p]=Z.useState(!1),[o,g]=Z.useState(""),d=De();let l;e[0]!==n.id||e[1]!==d?(l=async()=>{await d.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=d,e[2]=l):l=e[2];let c;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(c=()=>{ee("organization_deleted",{organization_id:n.id}),localStorage.getItem(ne.lastOrgSlug())===n.slug&&localStorage.removeItem(ne.lastOrgSlug()),he(),B.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=c):c=e[6];let m;e[7]!==t?(m=v=>{B.error(v instanceof Error?v.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=m):m=e[8];let s;e[9]!==l||e[10]!==c||e[11]!==m?(s={mutationFn:l,onSuccess:c,onError:m},e[9]=l,e[10]=c,e[11]=m,e[12]=s):s=e[12];const a=oe(s);let r;e[13]!==t?(r=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=r):r=e[14];let f;e[15]!==t?(f=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=f):f=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let h;e[19]!==t?(h=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=h):h=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=()=>p(!0),e[21]=z):z=e[21];const H=a.isPending;let S;e[22]!==t?(S=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=S):S=e[23];let x;e[24]!==a.isPending||e[25]!==S?(x=i.jsx(X,{variant:"destructive",size:"sm",onClick:z,disabled:H,children:S}),e[24]=a.isPending,e[25]=S,e[26]=x):x=e[26];let b;e[27]!==x||e[28]!==j||e[29]!==h?(b=i.jsx(le,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:h,action:x})}),e[27]=x,e[28]=j,e[29]=h,e[30]=b):b=e[30];let y;e[31]!==b||e[32]!==r||e[33]!==f?(y=i.jsx(re,{title:r,description:f,children:b}),e[31]=b,e[32]=r,e[33]=f,e[34]=y):y=e[34];let V;e[35]===Symbol.for("react.memo_cache_sentinel")?(V=v=>{p(v),v||g("")},e[35]=V):V=e[35];let O;e[36]!==t?(O=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=O):O=e[37];let C;e[38]!==O?(C=i.jsx(_e,{children:O}),e[38]=O,e[39]=C):C=e[39];let w;e[40]!==n.name||e[41]!==t?(w=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=w):w=e[42];let D;e[43]!==w?(D=i.jsx("p",{children:w}),e[43]=w,e[44]=D):D=e[44];let _;e[45]!==n.name||e[46]!==t?(_=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=_):_=e[47];let A;e[48]!==_?(A=i.jsx("p",{className:"mt-3 mb-1.5",children:_}),e[48]=_,e[49]=A):A=e[49];let U;e[50]===Symbol.for("react.memo_cache_sentinel")?(U=v=>g(v.target.value),e[50]=U):U=e[50];let N;e[51]!==o||e[52]!==n.name?(N=i.jsx(ae,{value:o,onChange:U,placeholder:n.name,autoFocus:!0}),e[51]=o,e[52]=n.name,e[53]=N):N=e[53];let F;e[54]!==D||e[55]!==A||e[56]!==N?(F=i.jsx(Ae,{asChild:!0,children:i.jsxs("div",{children:[D,A,N]})}),e[54]=D,e[55]=A,e[56]=N,e[57]=F):F=e[57];let T;e[58]!==C||e[59]!==F?(T=i.jsxs(Ne,{children:[C,F]}),e[58]=C,e[59]=F,e[60]=T):T=e[60];let E;e[61]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=E):E=e[62];let P;e[63]!==E?(P=i.jsx(Fe,{children:E}),e[63]=E,e[64]=P):P=e[64];let R;e[65]!==a?(R=()=>a.mutate(),e[65]=a,e[66]=R):R=e[66];const J=o!==n.name||a.isPending;let k;e[67]!==a.isPending||e[68]!==t?(k=a.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=a.isPending,e[68]=t,e[69]=k):k=e[69];let L;e[70]!==R||e[71]!==J||e[72]!==k?(L=i.jsx(Te,{onClick:R,disabled:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=R,e[71]=J,e[72]=k,e[73]=L):L=e[73];let I;e[74]!==P||e[75]!==L?(I=i.jsxs(Ee,{children:[P,L]}),e[74]=P,e[75]=L,e[76]=I):I=e[76];let $;e[77]!==T||e[78]!==I?($=i.jsxs(Pe,{children:[T,I]}),e[77]=T,e[78]=I,e[79]=$):$=e[79];let q;e[80]!==u||e[81]!==$?(q=i.jsx(Re,{open:u,onOpenChange:V,children:$}),e[80]=u,e[81]=$,e[82]=q):q=e[82];let K;return e[83]!==y||e[84]!==q?(K=i.jsxs(i.Fragment,{children:[y,q]}),e[83]=y,e[84]=q,e[85]=K):K=e[85],K}function Ke(){const e=G.c(10),t=Y();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let u;e[2]!==n?(u=i.jsx(M.Title,{children:n}),e[2]=n,e[3]=u):u=e[3];let p,o,g,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(Ie,{}),o=i.jsx(Ve,{}),g=i.jsx(we,{}),d=i.jsx(Ue,{}),e[4]=p,e[5]=o,e[6]=g,e[7]=d):(p=e[4],o=e[5],g=e[6],d=e[7]);let l;return e[8]!==u?(l=i.jsx(M,{children:i.jsx(M.Content,{children:i.jsx(M.Body,{children:i.jsxs(Ce,{children:[u,p,o,g,d]})})})}),e[8]=u,e[9]=l):l=e[9],l}function yt(){const e=G.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(ke,{capability:"org:manage",area:"general settings",children:i.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{yt as default};
1
+ import{c as G,F as te,r as Z,j as i,B as X,L as ge,J as de,M as W,b as Y,d as me,o as ue,R as fe,P as pe,e as oe,q as ee,t as B,K as ie,a6 as se,G as ne,w as he}from"./index-CAh51G0Z.js";import{P as M}from"./index-Cettjk3S.js";import{A as xe,b as je}from"./alert-D6M7_CFJ.js";import{i as Se}from"./ArrowRight-B6ckpLTL.js";import{n as ze}from"./LinkExternal01-Cv4NH-l5.js";import{s as ve}from"./XClose-DGMRr9zn.js";import{u as be}from"./use-org-auth-client-DNeQqieu.js";import{u as ye}from"./use-debounced-autosave-BSywpq42.js";import{A as Oe}from"./avatar-DdE_FCeU.js";import{I as ae}from"./input-CvjXMWzE.js";import{S as re,a as le,b as Q,c as Ce}from"./settings-section-DcSxLZCe.js";import{D as we}from"./domain-settings-CREdDjrJ.js";import{u as De}from"./studio-tools-gJOUlCsR.js";import{A as _e,a as Ae,b as Ne,c as Fe,g as Te,d as Ee,e as Pe,f as Re}from"./alert-dialog-C6az9lRx.js";import{R as ke}from"./require-capability-DhX8B5R9.js";import"./sidebar-kakKWETX.js";import"./LayoutLeft-D8qTu8EH.js";import"./use-mobile-BBEujCmt.js";import"./X-Dr2OxAp4.js";import"./tooltip-DMrC-6qQ.js";import"./User01-E6FvG8tc.js";import"./card-C55IeOmV.js";import"./ArrowUpRight-PZnmkzzV.js";import"./badge-D4GDvYs3.js";import"./select-D-psbbZp.js";import"./Check-C0G51sNz.js";import"./ChevronDown-COGdEgJp.js";import"./ChevronUp-Dw2tI_6B.js";import"./use-capability-BzZJQvQX.js";import"./access-gate-JWzDbqYZ.js";import"./capability-load-error-CIHxXPRM.js";function ce(e){return`connect-banner-dismissed:${e}`}function Le(e){if(typeof window>"u")return!0;try{return localStorage.getItem(ce(e))==="1"}catch{return!1}}function Ie(){const e=G.c(17),{org:t}=te();let n;e[0]!==t.id?(n=()=>Le(t.id),e[0]=t.id,e[1]=n):n=e[1];const[u,p]=Z.useState(n);if(u)return null;let o;e[2]!==t.id?(o=()=>{p(!0);try{localStorage.setItem(ce(t.id),"1")}catch{}},e[2]=t.id,e[3]=o):o=e[3];const g=o;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(ze,{}),e[4]=d):d=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=l):l=e[5];let c;e[6]!==t.slug?(c={org:t.slug},e[6]=t.slug,e[7]=c):c=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Se,{size:12}),e[8]=m):m=e[8];let s;e[9]!==c?(s=i.jsx(X,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(ge,{to:"/$org/settings/connect",params:c,children:["Connect to clients ",m]})}),e[9]=c,e[10]=s):s=e[10];let a;e[11]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(ve,{size:14}),e[11]=a):a=e[11];let r;e[12]!==g?(r=i.jsx(X,{variant:"ghost",size:"icon",className:"size-7",onClick:g,"aria-label":"Dismiss",children:a}),e[12]=g,e[13]=r):r=e[13];let f;return e[14]!==s||e[15]!==r?(f=i.jsxs(xe,{variant:"info",className:"items-center",children:[d,i.jsxs(je,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[l,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s,r]})]})]}),e[14]=s,e[15]=r,e[16]=f):f=e[16],f}const $e=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 qe(e){return typeof e=="string"&&$e.has(e.trim().toLowerCase())}const Be=de({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().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=>!qe(e),"This organization URL is reserved by Studio"),logo:W().optional()});function Ge(e){const t=G.c(17),{value:n,onChange:u,name:p,disabled:o}=e,g=Y(),d=Z.useRef(null);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>d.current?.click(),t[0]=l):l=t[0];const c=l;let m;t[1]!==u||t[2]!==g?(m=H=>{const S=H.target.files?.[0];if(!S)return;if(S.size>2097152){B.error(g("settings.organizationForm.imageTooLarge"));return}const x=new FileReader;x.onerror=()=>B.error(g("settings.organizationForm.failedToReadImage")),x.onloadend=()=>{x.result&&u(x.result),d.current&&(d.current.value="")},x.readAsDataURL(S)},t[1]=u,t[2]=g,t[3]=m):m=t[3];const s=m;let a;t[4]!==g?(a=g("settings.organizationForm.uploadLogoLabel"),t[4]=g,t[5]=a):a=t[5];let r;t[6]!==o||t[7]!==s?(r=i.jsx("input",{ref:d,type:"file",accept:"image/*",onChange:s,className:"hidden",disabled:o}),t[6]=o,t[7]=s,t[8]=r):r=t[8];const f=n||void 0,j=p??"?";let h;t[9]!==f||t[10]!==j?(h=i.jsx(Oe,{url:f,fallback:j,shape:"square",size:"base"}),t[9]=f,t[10]=j,t[11]=h):h=t[11];let z;return t[12]!==o||t[13]!==a||t[14]!==r||t[15]!==h?(z=i.jsxs("button",{type:"button",onClick:c,disabled:o,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":a,children:[r,h]}),t[12]=o,t[13]=a,t[14]=r,t[15]=h,t[16]=z):z=t[16],z}function Ve(){const e=Y(),t=me(),{org:n}=te(),u=be(),p=ue(),o=fe({resolver:pe(Be),values:{name:n.name??"",slug:n.slug??"",logo:n.logo??""}}),g=oe({mutationFn:async s=>{const a={name:s.name,slug:s.slug};s.logo&&(a.logo=s.logo);const r=await u.organization.update({data:a});if(r?.error)throw new Error(r.error.message||e("settings.organizationForm.failedToUpdateOrg"));return r},onSuccess:(s,a)=>{ee("organization_settings_updated",{organization_id:n.id,fields:Object.keys(a)}),p.invalidateQueries({queryKey:ie.organizations()}),p.invalidateQueries({queryKey:ie.activeOrganization(n.slug)}),B.success(e("settings.organizationForm.updateSuccess")),s?.data?.slug&&s.data.slug!==n.slug&&t({to:"/$org/settings/general",params:{org:s.data.slug}})},onError:(s,a)=>{ee("organization_settings_update_failed",{organization_id:n.id,fields:Object.keys(a),error:s instanceof Error?s.message:String(s)}),B.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:l}=ye({save:async()=>{const s=o.control._formState.dirtyFields;if(Object.keys(s).length===0||!await o.trigger())return;const r=o.getValues(),f=o.control._defaultValues;o.reset(r,{keepValues:!0});try{await g.mutateAsync(r)}catch{o.reset(f,{keepValues:!0})}}}),c=o.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(re,{children:i.jsxs(le,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ge,{value:o.watch("logo"),onChange:s=>{o.setValue("logo",s??"",{shouldDirty:!0}),l()},name:o.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(se,{control:o.control,name:"name",render:({field:s})=>i.jsx(ae,{id:"org-name",...s,onChange:a=>{s.onChange(a),d()},onBlur:()=>{s.onBlur(),l()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),action:i.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&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),i.jsx(se,{control:o.control,name:"slug",render:({field:s})=>i.jsx("input",{id:"org-slug",value:s.value??"",name:s.name,ref:s.ref,placeholder:e("settings.organizationForm.slugPlaceholder"),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:a=>{const r=a.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");o.setValue("slug",r,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),d()},onBlur:()=>{s.onBlur(),l()}})})]})}),(c.name||c.slug||c.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[c.name&&i.jsx("p",{className:"text-xs text-destructive",children:c.name.message}),c.slug&&i.jsx("p",{className:"text-xs text-destructive",children:c.slug.message}),c.logo&&i.jsx("p",{className:"text-xs text-destructive",children:c.logo.message})]})]})})}function Ue(){const e=G.c(86),t=Y(),{org:n}=te(),[u,p]=Z.useState(!1),[o,g]=Z.useState(""),d=De();let l;e[0]!==n.id||e[1]!==d?(l=async()=>{await d.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=d,e[2]=l):l=e[2];let c;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(c=()=>{ee("organization_deleted",{organization_id:n.id}),localStorage.getItem(ne.lastOrgSlug())===n.slug&&localStorage.removeItem(ne.lastOrgSlug()),he(),B.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=c):c=e[6];let m;e[7]!==t?(m=v=>{B.error(v instanceof Error?v.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=m):m=e[8];let s;e[9]!==l||e[10]!==c||e[11]!==m?(s={mutationFn:l,onSuccess:c,onError:m},e[9]=l,e[10]=c,e[11]=m,e[12]=s):s=e[12];const a=oe(s);let r;e[13]!==t?(r=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=r):r=e[14];let f;e[15]!==t?(f=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=f):f=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let h;e[19]!==t?(h=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=h):h=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=()=>p(!0),e[21]=z):z=e[21];const H=a.isPending;let S;e[22]!==t?(S=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=S):S=e[23];let x;e[24]!==a.isPending||e[25]!==S?(x=i.jsx(X,{variant:"destructive",size:"sm",onClick:z,disabled:H,children:S}),e[24]=a.isPending,e[25]=S,e[26]=x):x=e[26];let b;e[27]!==x||e[28]!==j||e[29]!==h?(b=i.jsx(le,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:h,action:x})}),e[27]=x,e[28]=j,e[29]=h,e[30]=b):b=e[30];let y;e[31]!==b||e[32]!==r||e[33]!==f?(y=i.jsx(re,{title:r,description:f,children:b}),e[31]=b,e[32]=r,e[33]=f,e[34]=y):y=e[34];let V;e[35]===Symbol.for("react.memo_cache_sentinel")?(V=v=>{p(v),v||g("")},e[35]=V):V=e[35];let O;e[36]!==t?(O=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=O):O=e[37];let C;e[38]!==O?(C=i.jsx(_e,{children:O}),e[38]=O,e[39]=C):C=e[39];let w;e[40]!==n.name||e[41]!==t?(w=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=w):w=e[42];let D;e[43]!==w?(D=i.jsx("p",{children:w}),e[43]=w,e[44]=D):D=e[44];let _;e[45]!==n.name||e[46]!==t?(_=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=_):_=e[47];let A;e[48]!==_?(A=i.jsx("p",{className:"mt-3 mb-1.5",children:_}),e[48]=_,e[49]=A):A=e[49];let U;e[50]===Symbol.for("react.memo_cache_sentinel")?(U=v=>g(v.target.value),e[50]=U):U=e[50];let N;e[51]!==o||e[52]!==n.name?(N=i.jsx(ae,{value:o,onChange:U,placeholder:n.name,autoFocus:!0}),e[51]=o,e[52]=n.name,e[53]=N):N=e[53];let F;e[54]!==D||e[55]!==A||e[56]!==N?(F=i.jsx(Ae,{asChild:!0,children:i.jsxs("div",{children:[D,A,N]})}),e[54]=D,e[55]=A,e[56]=N,e[57]=F):F=e[57];let T;e[58]!==C||e[59]!==F?(T=i.jsxs(Ne,{children:[C,F]}),e[58]=C,e[59]=F,e[60]=T):T=e[60];let E;e[61]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=E):E=e[62];let P;e[63]!==E?(P=i.jsx(Fe,{children:E}),e[63]=E,e[64]=P):P=e[64];let R;e[65]!==a?(R=()=>a.mutate(),e[65]=a,e[66]=R):R=e[66];const J=o!==n.name||a.isPending;let k;e[67]!==a.isPending||e[68]!==t?(k=a.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=a.isPending,e[68]=t,e[69]=k):k=e[69];let L;e[70]!==R||e[71]!==J||e[72]!==k?(L=i.jsx(Te,{onClick:R,disabled:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=R,e[71]=J,e[72]=k,e[73]=L):L=e[73];let I;e[74]!==P||e[75]!==L?(I=i.jsxs(Ee,{children:[P,L]}),e[74]=P,e[75]=L,e[76]=I):I=e[76];let $;e[77]!==T||e[78]!==I?($=i.jsxs(Pe,{children:[T,I]}),e[77]=T,e[78]=I,e[79]=$):$=e[79];let q;e[80]!==u||e[81]!==$?(q=i.jsx(Re,{open:u,onOpenChange:V,children:$}),e[80]=u,e[81]=$,e[82]=q):q=e[82];let K;return e[83]!==y||e[84]!==q?(K=i.jsxs(i.Fragment,{children:[y,q]}),e[83]=y,e[84]=q,e[85]=K):K=e[85],K}function Ke(){const e=G.c(10),t=Y();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let u;e[2]!==n?(u=i.jsx(M.Title,{children:n}),e[2]=n,e[3]=u):u=e[3];let p,o,g,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(Ie,{}),o=i.jsx(Ve,{}),g=i.jsx(we,{}),d=i.jsx(Ue,{}),e[4]=p,e[5]=o,e[6]=g,e[7]=d):(p=e[4],o=e[5],g=e[6],d=e[7]);let l;return e[8]!==u?(l=i.jsx(M,{children:i.jsx(M.Content,{children:i.jsx(M.Body,{children:i.jsxs(Ce,{children:[u,p,o,g,d]})})})}),e[8]=u,e[9]=l):l=e[9],l}function yt(){const e=G.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(ke,{capability:"org:manage",area:"general settings",children:i.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{yt as default};
@@ -1 +1 @@
1
- import{F as xe,a as ye,o as me,r as $,$ as oe,c as se,b as ee,j as t,k as X,e as ge,t as le,dZ as Ne,K as te,n as ve,m as ue,B as ce,x as ke,y as Ce}from"./index-DuymBIik.js";import{a as we,b as Re,d as Se,e as Pe}from"./dialog-C8poGW_g.js";import{C as Ie}from"./collection-search-BlHcpz8p.js";import{u as _e}from"./use-debounced-value-CQfXn2Hm.js";import{b as pe,u as Ee}from"./use-connection-CWqGN4Dl.js";import{u as re,S as he}from"./use-mcp-client-1y5yaek9.js";import{a as be}from"./authenticate-and-persist-oauth-DR-wOO85.js";import{b as de}from"./Settings02-DEO-GnOc.js";import{n as Te}from"./LinkExternal01-BlOkjQhr.js";import{Q as Ae}from"./agent-icon-C1yhAjA6.js";import{u as ze,G as q}from"./use-registry-app-HQ2eh3Mu.js";import{e as Le}from"./extract-connection-data-BiK8KoKv.js";import{c as Fe}from"./use-navigate-to-agent-BRYuqT7o.js";import{p as fe,f as Ge}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as Oe}from"./github-repo-scope-DjMZbiKa.js";const Ue="deco/mcp-github";function De(P){const{org:e}=xe(),{data:u}=ye.useSession(),p=pe(),k=me(),[l,r]=$.useState("idle"),[o,s]=$.useState(null),[f,v]=$.useState(null),{data:j,isLoading:w}=ze(Ue,{enabled:P.enabled}),d=$.useRef(!1);P.enabled&&j&&!w&&!d.current&&u?.user?.id&&l==="idle"&&(d.current=!0,c());async function c(){if(!(!j||!u?.user?.id||!e))try{r("installing"),s(null);const i=Le(j,e.id,u.user.id,{remoteIndex:0});if(!i.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:x}=await p.create.mutateAsync(i);r("authenticating");const b=await be({connectionId:x,orgId:e.id,orgSlug:e.slug,persistFallback:m=>p.update.mutateAsync({id:x,data:{connection_token:m}}).then(()=>{})});if(b.ran&&!b.ok){try{await p.delete.mutateAsync(x)}catch{}throw new Error(b.error&&b.error!=="no token received"?b.error:"No token received from GitHub")}oe(k,e.id),v(i),r("ready")}catch(i){s(i instanceof Error?i.message:String(i)),r("error")}}function a(){r("idle"),s(null),v(null),d.current=!1}return P.enabled&&w&&l==="idle"?{status:"installing",error:null,connection:null,retry:a}:{status:l,error:o,connection:f,retry:a}}function ct(P){const e=se.c(27),{open:u,onOpenChange:p,title:k,onImportComplete:l,mode:r}=P,o=r===void 0?"agent":r,s=ee();let f;e[0]!==o||e[1]!==s||e[2]!==k?(f=k??s(o==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=o,e[1]=s,e[2]=k,e[3]=f):f=e[3];const v=f,[j,w]=$.useState(null);let d;e[4]!==v?(d=t.jsx(we,{className:"sr-only",children:t.jsx(Re,{children:v})}),e[4]=v,e[5]=d):d=e[5];let c;e[6]!==v||e[7]!==j||e[8]!==s?(c=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:j?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>w(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(de,{size:16})}),t.jsx("img",{src:j.avatarUrl,alt:j.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:j.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(q,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v})]})}),e[6]=v,e[7]=j,e[8]=s,e[9]=c):c=e[9];let a;e[10]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=a):a=e[10];let i;e[11]!==p?(i=()=>p(!1),e[11]=p,e[12]=i):i=e[12];let g;e[13]!==o||e[14]!==l||e[15]!==u||e[16]!==j||e[17]!==i?(g=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx($.Suspense,{fallback:a,children:t.jsx($e,{open:u,onComplete:i,selectedInstallation:j,onSelectInstallation:w,onImportComplete:l,mode:o})})}),e[13]=o,e[14]=l,e[15]=u,e[16]=j,e[17]=i,e[18]=g):g=e[18];let x;e[19]!==d||e[20]!==c||e[21]!==g?(x=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[d,c,g]}),e[19]=d,e[20]=c,e[21]=g,e[22]=x):x=e[22];let b;return e[23]!==p||e[24]!==u||e[25]!==x?(b=t.jsx(Pe,{open:u,onOpenChange:p,children:x}),e[23]=p,e[24]=u,e[25]=x,e[26]=b):b=e[26],b}function $e({open:P,onComplete:e,selectedInstallation:u,onSelectInstallation:p,onImportComplete:k,mode:l="agent"}){const r=ee(),{org:o}=xe(),s=me(),f=Fe(),[v,j]=$.useState(null),w=Ee({slug:"mcp-github"}),d=Oe(w),c=De({enabled:P&&d.length===0}),a=d.length===1?d[0]??null:v,i=re({connectionId:a?.id??"",orgId:o.id,orgSlug:o.slug}),g=re({connectionId:he,orgId:o.id,orgSlug:o.slug}),x=async(n,y)=>{try{const R=await i.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:y}});if(R.isError)return null;const S=R.content?.find(I=>I.type==="resource")?.resource?.text;if(!S)return null;try{const I=JSON.parse(S);return typeof I=="string"?I:JSON.stringify(I)}catch{return S}}catch{return null}},b=(n,y)=>{Promise.all([x(y,"AGENTS.md"),x(y,"CLAUDE.md")]).then(async([N,R])=>{const C=N??R??null;C&&(await g.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:C}}}}),oe(s,o.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},m=ge({mutationFn:async n=>{if(!a||!u)throw new Error("No GitHub connection or installation");const y=u.installationId;if(l==="connection"){const{childConnectionId:C}=await fe({orgSlug:o.slug,sourceConnection:a,installationId:y,owner:n.owner,repo:n.name,githubCallTool:S=>i.callTool(S),selfCallTool:S=>g.callTool(S),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:C,item:null}}const{childConnectionId:N}=await fe({orgSlug:o.slug,sourceConnection:a,installationId:y,owner:n.owner,repo:n.name,githubCallTool:C=>i.callTool(C),selfCallTool:C=>g.callTool(C)});let R=null;try{const C=await g.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:y,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),S=C.structuredContent??C,I=S.item?.id;if(!S.item||!I)throw new Error("Failed to create the imported agent");return R=I,{virtualMcpId:I,repo:n,connectionId:N,item:S.item}}catch(C){throw R&&await g.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:R}}).catch(()=>{}),await g.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),C}},onSuccess:({virtualMcpId:n,repo:y,connectionId:N,item:R})=>{if(l==="connection"||!n||!R){oe(s,o.id),Ne(s,o.id),le.success(r("common.githubRepoPicker.addedRepo",{name:y.name})),e();return}if(s.setQueryData(te.collectionItem(g,o.id,"","VIRTUAL_MCP",n),{item:R}),oe(s,o.id),b(n,y),k){k({virtualMcpId:n,repo:y,connectionId:N});return}le.success(r("common.githubRepoPicker.importedRepo",{name:y.name})),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),f(n)},onError:n=>{le.error(r("common.githubRepoPicker.failedImport",{error:n instanceof Error?n.message:r("common.githubRepoPicker.unknownError")}))}});return c.status==="installing"||c.status==="authenticating"?t.jsx(ae,{status:c.status,error:null,retry:c.retry}):c.status==="error"?t.jsx(ae,{status:"error",error:c.error,retry:c.retry}):d.length===0&&c.status==="idle"?t.jsx(ae,{status:"installing",error:null,retry:c.retry}):d.length>1&&!a?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:r("common.githubRepoPicker.selectConnection")})}),d.map(n=>t.jsxs("button",{type:"button",onClick:()=>j(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.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(q,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):a?u?t.jsx(Qe,{connectionId:a.id,orgId:o.id,orgSlug:o.slug,installation:u,onSelectRepo:n=>m.mutate(n),isSaving:m.isPending}):t.jsx(He,{connectionId:a.id,orgId:o.id,orgSlug:o.slug,onSelect:p,showBackButton:d.length>1,onBack:()=>j(null)}):null}function He(P){const e=se.c(126),{connectionId:u,orgId:p,orgSlug:k,onSelect:l,showBackButton:r,onBack:o}=P,s=ee();let f;e[0]!==p||e[1]!==k?(f={connectionId:he,orgId:p,orgSlug:k},e[0]=p,e[1]=k,e[2]=f):f=e[2];const v=re(f),j=me(),w=pe();let d;e[3]!==u||e[4]!==p?(d=te.githubUserOrgs(p,u),e[3]=u,e[4]=p,e[5]=d):d=e[5];let c;e[6]!==u||e[7]!==v?(c=()=>Ge(h=>v.callTool(h),u),e[6]=u,e[7]=v,e[8]=c):c=e[8];let a;e[9]!==d||e[10]!==c?(a={queryKey:d,queryFn:c},e[9]=d,e[10]=c,e[11]=a):a=e[11];const i=ve(a);let g;e[12]!==w||e[13]!==u||e[14]!==i||e[15]!==p||e[16]!==k||e[17]!==j?(g=async()=>{const h=await be({connectionId:u,orgId:p,orgSlug:k,persistFallback:A=>w.update.mutateAsync({id:u,data:{connection_token:A}}).then(qe)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const _=new URL(`/api/${k}/mcp/${u}`,window.location.origin);await j.invalidateQueries({queryKey:te.isMCPAuthenticated(_.href,null)}),await j.invalidateQueries({queryKey:te.mcpClientPrefix()}),await i.refetch()},e[12]=w,e[13]=u,e[14]=i,e[15]=p,e[16]=k,e[17]=j,e[18]=g):g=e[18];let x;e[19]!==s?(x=h=>{le.error(s("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=x):x=e[20];let b;e[21]!==g||e[22]!==x?(b={mutationFn:g,onError:x},e[21]=g,e[22]=x,e[23]=b):b=e[23];const m=ge(b);if(i.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(i.isError){let h;e[25]!==s?(h=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=h):h=e[26];let _;e[27]!==h?(_=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=_):_=e[28];let A;e[29]!==s?(A=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=A):A=e[30];let z;e[31]!==A?(z=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:A}),e[31]=A,e[32]=z):z=e[32];let L;e[33]!==m?(L=()=>m.mutate(),e[33]=m,e[34]=L):L=e[34];const H=m.isPending;let F;e[35]!==m.isPending?(F=m.isPending?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(q,{className:"size-3.5"}),e[35]=m.isPending,e[36]=F):F=e[36];let G;e[37]!==s?(G=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=G):G=e[38];let O;e[39]!==m.isPending||e[40]!==L||e[41]!==F||e[42]!==G?(O=t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:L,disabled:H,children:[F,G]}),e[39]=m.isPending,e[40]=L,e[41]=F,e[42]=G,e[43]=O):O=e[43];let D;return e[44]!==z||e[45]!==O||e[46]!==_?(D=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[_,z,O]}),e[44]=z,e[45]=O,e[46]=_,e[47]=D):D=e[47],D}const n=i.data;if(!n)return null;const y=n.appSlug?`https://github.com/apps/${n.appSlug}/installations/new`:"https://github.com/settings/installations";if(n.installations.length===0){let h;e[48]!==o||e[49]!==r||e[50]!==s?(h=r&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(de,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=o,e[49]=r,e[50]=s,e[51]=h):h=e[51];let _;e[52]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(q,{className:"size-8 text-foreground"})}),e[52]=_):_=e[52];let A;e[53]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=A):A=e[53];let z;e[54]!==s?(z=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=z):z=e[55];let L;e[56]!==z?(L=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[A,z]}),e[56]=z,e[57]=L):L=e[57];let H;e[58]!==s?(H=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=H):H=e[59];let F;e[60]!==H?(F=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=F):F=e[61];let G;e[62]!==s?(G=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let D;e[66]!==s?(D=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=D):D=e[67];let ne;e[68]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(Te,{size:14}),e[68]=ne):ne=e[68];let Q;e[69]!==y||e[70]!==D?(Q=t.jsx(ce,{asChild:!0,size:"sm",children:t.jsxs("a",{href:y,target:"_blank",rel:"noopener noreferrer",children:[D,ne]})}),e[69]=y,e[70]=D,e[71]=Q):Q=e[71];let M;e[72]!==i?(M=()=>{i.refetch()},e[72]=i,e[73]=M):M=e[73];const je=i.isFetching;let B;e[74]!==i.isFetching?(B=i.isFetching&&t.jsx(X,{size:14,className:"animate-spin"}),e[74]=i.isFetching,e[75]=B):B=e[75];let V;e[76]!==s?(V=s("common.githubRepoPicker.checkAgain"),e[76]=s,e[77]=V):V=e[77];let K;e[78]!==i.isFetching||e[79]!==M||e[80]!==B||e[81]!==V?(K=t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:M,disabled:je,children:[B,V]}),e[78]=i.isFetching,e[79]=M,e[80]=B,e[81]=V,e[82]=K):K=e[82];let J;e[83]!==Q||e[84]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[Q,K]}),e[83]=Q,e[84]=K,e[85]=J):J=e[85];let W;e[86]!==s?(W=s("common.githubRepoPicker.repositoryAccessNote"),e[86]=s,e[87]=W):W=e[87];let Y;e[88]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[88]=W,e[89]=Y):Y=e[89];let Z;e[90]!==L||e[91]!==F||e[92]!==O||e[93]!==J||e[94]!==Y?(Z=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[_,L,F,O,J,Y]}),e[90]=L,e[91]=F,e[92]=O,e[93]=J,e[94]=Y,e[95]=Z):Z=e[95];let ie;return e[96]!==Z||e[97]!==h?(ie=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,Z]}),e[96]=Z,e[97]=h,e[98]=ie):ie=e[98],ie}let N;e[99]!==o||e[100]!==r||e[101]!==s?(N=r&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(de,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[99]=o,e[100]=r,e[101]=s,e[102]=N):N=e[102];let R;if(e[103]!==n.installations||e[104]!==l||e[105]!==s){let h;e[107]!==l||e[108]!==s?(h=_=>t.jsxs("button",{type:"button",onClick:()=>l(_),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:_.avatarUrl,alt:_.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:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},_.installationId),e[107]=l,e[108]=s,e[109]=h):h=e[109],R=n.installations.map(h),e[103]=n.installations,e[104]=l,e[105]=s,e[106]=R}else R=e[106];let C;e[110]!==R?(C=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:R}),e[110]=R,e[111]=C):C=e[111];let S;e[112]!==s?(S=s("common.githubRepoPicker.accountNotListed"),e[112]=s,e[113]=S):S=e[113];let I;e[114]!==s?(I=s("common.githubRepoPicker.installGitHubApp"),e[114]=s,e[115]=I):I=e[115];let E;e[116]!==I?(E=t.jsx("span",{className:"underline underline-offset-2",children:I}),e[116]=I,e[117]=E):E=e[117];let T;e[118]!==y||e[119]!==S||e[120]!==E?(T=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[S," ",E]})}),e[118]=y,e[119]=S,e[120]=E,e[121]=T):T=e[121];let U;return e[122]!==C||e[123]!==T||e[124]!==N?(U=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[N,C,T]}),e[122]=C,e[123]=T,e[124]=N,e[125]=U):U=e[125],U}function qe(){}function Qe(P){const e=se.c(23),{connectionId:u,orgId:p,orgSlug:k,installation:l,onSelectRepo:r,isSaving:o}=P,s=ee(),[f,v]=$.useState(""),j=_e(f,300),w=$.useDeferredValue(j),d=f!==w;let c;e[0]!==s?(c=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=c):c=e[1];let a;e[2]!==d||e[3]!==f||e[4]!==c?(a=t.jsx(Ie,{placeholder:c,value:f,onChange:v,isSearching:d}),e[2]=d,e[3]=f,e[4]=c,e[5]=a):a=e[5];const i=d?"opacity-40":"opacity-100";let g;e[6]!==i?(g=ue("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",i),e[6]=i,e[7]=g):g=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=x):x=e[8];let b;e[9]!==u||e[10]!==w||e[11]!==l||e[12]!==o||e[13]!==r||e[14]!==p||e[15]!==k?(b=t.jsx($.Suspense,{fallback:x,children:t.jsx(Me,{connectionId:u,orgId:p,orgSlug:k,installation:l,query:w,onSelectRepo:r,isSaving:o})}),e[9]=u,e[10]=w,e[11]=l,e[12]=o,e[13]=r,e[14]=p,e[15]=k,e[16]=b):b=e[16];let m;e[17]!==g||e[18]!==b?(m=t.jsx("div",{className:g,children:b}),e[17]=g,e[18]=b,e[19]=m):m=e[19];let n;return e[20]!==a||e[21]!==m?(n=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[a,m]}),e[20]=a,e[21]=m,e[22]=n):n=e[22],n}function Me(P){const e=se.c(36),{connectionId:u,orgId:p,orgSlug:k,installation:l,query:r,onSelectRepo:o,isSaving:s}=P,f=ee();let v;e[0]!==u||e[1]!==p||e[2]!==k?(v={connectionId:u,orgId:p,orgSlug:k},e[0]=u,e[1]=p,e[2]=k,e[3]=v):v=e[3];const j=re(v),w=l.type==="User"?"user":"org",d=r?`${w}:${l.login} ${r} in:name`:`${w}:${l.login}`;let c;e[4]!==u||e[5]!==l.login||e[6]!==p||e[7]!==r?(c=te.githubOrgRepos(p,u,l.login,r),e[4]=u,e[5]=l.login,e[6]=p,e[7]=r,e[8]=c):c=e[8];let a;e[9]!==j||e[10]!==d?(a=async m=>{const{signal:n}=m,N=(await j.callTool({name:"search_repositories",arguments:{query:d,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(Be)},e[9]=j,e[10]=d,e[11]=a):a=e[11];let i;e[12]!==c||e[13]!==a?(i={queryKey:c,queryFn:a},e[12]=c,e[13]=a,e[14]=i):i=e[14];const{data:g}=ke(i);if(g.length===0){let m;e[15]!==f?(m=f("common.githubRepoPicker.noRepositoriesFound"),e[15]=f,e[16]=m):m=e[16];let n;e[17]!==m?(n=t.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[17]=m,e[18]=n):n=e[18];let y;e[19]!==r||e[20]!==f?(y=r&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:f("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=r,e[20]=f,e[21]=y):y=e[21];let N;return e[22]!==n||e[23]!==y?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[n,y]}),e[22]=n,e[23]=y,e[24]=N):N=e[24],N}let x;if(e[25]!==s||e[26]!==o||e[27]!==g||e[28]!==f){let m;e[30]!==s||e[31]!==o||e[32]!==f?(m=n=>t.jsxs("button",{type:"button",onClick:()=>o(n),disabled:s,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(q,{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:n.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:[n.private?t.jsx(Ce,{size:10}):t.jsx(Ae,{size:10}),n.private?f("common.githubRepoPicker.private"):f("common.githubRepoPicker.public")]})]},n.fullName),e[30]=s,e[31]=o,e[32]=f,e[33]=m):m=e[33],x=g.map(m),e[25]=s,e[26]=o,e[27]=g,e[28]=f,e[29]=x}else x=e[29];let b;return e[34]!==x?(b=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:x}),e[34]=x,e[35]=b):b=e[35],b}function Be(P){return{name:P.name,fullName:P.full_name,owner:P.full_name.split("/")[0]??"",url:P.html_url,private:P.private,description:P.description,updatedAt:P.updated_at}}function ae(P){const e=se.c(51),{status:u,error:p,retry:k}=P,l=ee();if(u==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(q,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let R;e[1]!==l?(R=l("common.githubRepoPicker.connectionFailed"),e[1]=l,e[2]=R):R=e[2];let C;e[3]!==R?(C=t.jsx("p",{className:"text-sm font-medium",children:R}),e[3]=R,e[4]=C):C=e[4];let S;e[5]!==p||e[6]!==l?(S=p??l("common.githubRepoPicker.somethingWentWrong"),e[5]=p,e[6]=l,e[7]=S):S=e[7];let I;e[8]!==S?(I=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:S}),e[8]=S,e[9]=I):I=e[9];let E;e[10]!==C||e[11]!==I?(E=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[C,I]}),e[10]=C,e[11]=I,e[12]=E):E=e[12];let T;e[13]!==l?(T=l("common.githubRepoPicker.tryAgain"),e[13]=l,e[14]=T):T=e[14];let U;e[15]!==k||e[16]!==T?(U=t.jsx("button",{type:"button",onClick:k,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:T}),e[15]=k,e[16]=T,e[17]=U):U=e[17];let h;return e[18]!==E||e[19]!==U?(h=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,E,U]}),e[18]=E,e[19]=U,e[20]=h):h=e[20],h}const r=u==="authenticating";let o;e[21]===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(q,{className:"size-5 text-foreground"})}),e[21]=o):o=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=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(X,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let f;e[23]!==r||e[24]!==l?(f=l(r?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=r,e[24]=l,e[25]=f):f=e[25];let v;e[26]!==f?(v=t.jsx("p",{className:"text-sm font-medium",children:f}),e[26]=f,e[27]=v):v=e[27];let j;e[28]!==r||e[29]!==l?(j=l(r?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=r,e[29]=l,e[30]=j):j=e[30];let w;e[31]!==j?(w=t.jsx("p",{className:"text-xs text-muted-foreground",children:j}),e[31]=j,e[32]=w):w=e[32];let d;e[33]!==v||e[34]!==w?(d=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[v,w]}),e[33]=v,e[34]=w,e[35]=d):d=e[35];const c=r?"bg-muted-foreground/30":"bg-foreground animate-pulse";let a;e[36]!==c?(a=ue("size-1.5 rounded-full",c),e[36]=c,e[37]=a):a=e[37];let i;e[38]!==a?(i=t.jsx("span",{className:a}),e[38]=a,e[39]=i):i=e[39];const g=r?"bg-foreground animate-pulse":"bg-muted-foreground/30";let x;e[40]!==g?(x=ue("size-1.5 rounded-full",g),e[40]=g,e[41]=x):x=e[41];let b;e[42]!==x?(b=t.jsx("span",{className:x}),e[42]=x,e[43]=b):b=e[43];let m;e[44]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=m):m=e[44];let n;e[45]!==i||e[46]!==b?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[i,b,m]}),e[45]=i,e[46]=b,e[47]=n):n=e[47];let y;return e[48]!==n||e[49]!==d?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,d,n]}),e[48]=n,e[49]=d,e[50]=y):y=e[50],y}export{ct as G,De as u};
1
+ import{F as xe,a as ye,o as me,r as $,$ as oe,c as se,b as ee,j as t,k as X,e as ge,t as le,dZ as Ne,K as te,n as ve,m as ue,B as ce,x as ke,y as Ce}from"./index-CAh51G0Z.js";import{a as we,b as Re,d as Se,e as Pe}from"./dialog-CKx91Chj.js";import{C as Ie}from"./collection-search-BPbGyO6X.js";import{u as _e}from"./use-debounced-value-C8J4HIdj.js";import{b as pe,u as Ee}from"./use-connection-BN71vOOR.js";import{u as re,S as he}from"./use-mcp-client-CwTQdIm_.js";import{a as be}from"./authenticate-and-persist-oauth-CyWCudBv.js";import{b as de}from"./Settings02-C18Fq1ND.js";import{n as Te}from"./LinkExternal01-Cv4NH-l5.js";import{Q as Ae}from"./agent-icon-Cb5Kw36r.js";import{u as ze,G as q}from"./use-registry-app-Doj3o6UT.js";import{e as Le}from"./extract-connection-data-Dul2DPHu.js";import{c as Fe}from"./use-navigate-to-agent-CFh2psZa.js";import{p as fe,f as Ge}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as Oe}from"./github-repo-scope-DjMZbiKa.js";const Ue="deco/mcp-github";function De(P){const{org:e}=xe(),{data:u}=ye.useSession(),p=pe(),k=me(),[l,r]=$.useState("idle"),[o,s]=$.useState(null),[f,v]=$.useState(null),{data:j,isLoading:w}=ze(Ue,{enabled:P.enabled}),d=$.useRef(!1);P.enabled&&j&&!w&&!d.current&&u?.user?.id&&l==="idle"&&(d.current=!0,c());async function c(){if(!(!j||!u?.user?.id||!e))try{r("installing"),s(null);const i=Le(j,e.id,u.user.id,{remoteIndex:0});if(!i.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:x}=await p.create.mutateAsync(i);r("authenticating");const b=await be({connectionId:x,orgId:e.id,orgSlug:e.slug,persistFallback:m=>p.update.mutateAsync({id:x,data:{connection_token:m}}).then(()=>{})});if(b.ran&&!b.ok){try{await p.delete.mutateAsync(x)}catch{}throw new Error(b.error&&b.error!=="no token received"?b.error:"No token received from GitHub")}oe(k,e.id),v(i),r("ready")}catch(i){s(i instanceof Error?i.message:String(i)),r("error")}}function a(){r("idle"),s(null),v(null),d.current=!1}return P.enabled&&w&&l==="idle"?{status:"installing",error:null,connection:null,retry:a}:{status:l,error:o,connection:f,retry:a}}function ct(P){const e=se.c(27),{open:u,onOpenChange:p,title:k,onImportComplete:l,mode:r}=P,o=r===void 0?"agent":r,s=ee();let f;e[0]!==o||e[1]!==s||e[2]!==k?(f=k??s(o==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=o,e[1]=s,e[2]=k,e[3]=f):f=e[3];const v=f,[j,w]=$.useState(null);let d;e[4]!==v?(d=t.jsx(we,{className:"sr-only",children:t.jsx(Re,{children:v})}),e[4]=v,e[5]=d):d=e[5];let c;e[6]!==v||e[7]!==j||e[8]!==s?(c=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:j?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>w(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(de,{size:16})}),t.jsx("img",{src:j.avatarUrl,alt:j.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:j.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(q,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v})]})}),e[6]=v,e[7]=j,e[8]=s,e[9]=c):c=e[9];let a;e[10]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=a):a=e[10];let i;e[11]!==p?(i=()=>p(!1),e[11]=p,e[12]=i):i=e[12];let g;e[13]!==o||e[14]!==l||e[15]!==u||e[16]!==j||e[17]!==i?(g=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx($.Suspense,{fallback:a,children:t.jsx($e,{open:u,onComplete:i,selectedInstallation:j,onSelectInstallation:w,onImportComplete:l,mode:o})})}),e[13]=o,e[14]=l,e[15]=u,e[16]=j,e[17]=i,e[18]=g):g=e[18];let x;e[19]!==d||e[20]!==c||e[21]!==g?(x=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[d,c,g]}),e[19]=d,e[20]=c,e[21]=g,e[22]=x):x=e[22];let b;return e[23]!==p||e[24]!==u||e[25]!==x?(b=t.jsx(Pe,{open:u,onOpenChange:p,children:x}),e[23]=p,e[24]=u,e[25]=x,e[26]=b):b=e[26],b}function $e({open:P,onComplete:e,selectedInstallation:u,onSelectInstallation:p,onImportComplete:k,mode:l="agent"}){const r=ee(),{org:o}=xe(),s=me(),f=Fe(),[v,j]=$.useState(null),w=Ee({slug:"mcp-github"}),d=Oe(w),c=De({enabled:P&&d.length===0}),a=d.length===1?d[0]??null:v,i=re({connectionId:a?.id??"",orgId:o.id,orgSlug:o.slug}),g=re({connectionId:he,orgId:o.id,orgSlug:o.slug}),x=async(n,y)=>{try{const R=await i.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:y}});if(R.isError)return null;const S=R.content?.find(I=>I.type==="resource")?.resource?.text;if(!S)return null;try{const I=JSON.parse(S);return typeof I=="string"?I:JSON.stringify(I)}catch{return S}}catch{return null}},b=(n,y)=>{Promise.all([x(y,"AGENTS.md"),x(y,"CLAUDE.md")]).then(async([N,R])=>{const C=N??R??null;C&&(await g.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:C}}}}),oe(s,o.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},m=ge({mutationFn:async n=>{if(!a||!u)throw new Error("No GitHub connection or installation");const y=u.installationId;if(l==="connection"){const{childConnectionId:C}=await fe({orgSlug:o.slug,sourceConnection:a,installationId:y,owner:n.owner,repo:n.name,githubCallTool:S=>i.callTool(S),selfCallTool:S=>g.callTool(S),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:C,item:null}}const{childConnectionId:N}=await fe({orgSlug:o.slug,sourceConnection:a,installationId:y,owner:n.owner,repo:n.name,githubCallTool:C=>i.callTool(C),selfCallTool:C=>g.callTool(C)});let R=null;try{const C=await g.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:y,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),S=C.structuredContent??C,I=S.item?.id;if(!S.item||!I)throw new Error("Failed to create the imported agent");return R=I,{virtualMcpId:I,repo:n,connectionId:N,item:S.item}}catch(C){throw R&&await g.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:R}}).catch(()=>{}),await g.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),C}},onSuccess:({virtualMcpId:n,repo:y,connectionId:N,item:R})=>{if(l==="connection"||!n||!R){oe(s,o.id),Ne(s,o.id),le.success(r("common.githubRepoPicker.addedRepo",{name:y.name})),e();return}if(s.setQueryData(te.collectionItem(g,o.id,"","VIRTUAL_MCP",n),{item:R}),oe(s,o.id),b(n,y),k){k({virtualMcpId:n,repo:y,connectionId:N});return}le.success(r("common.githubRepoPicker.importedRepo",{name:y.name})),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),f(n)},onError:n=>{le.error(r("common.githubRepoPicker.failedImport",{error:n instanceof Error?n.message:r("common.githubRepoPicker.unknownError")}))}});return c.status==="installing"||c.status==="authenticating"?t.jsx(ae,{status:c.status,error:null,retry:c.retry}):c.status==="error"?t.jsx(ae,{status:"error",error:c.error,retry:c.retry}):d.length===0&&c.status==="idle"?t.jsx(ae,{status:"installing",error:null,retry:c.retry}):d.length>1&&!a?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:r("common.githubRepoPicker.selectConnection")})}),d.map(n=>t.jsxs("button",{type:"button",onClick:()=>j(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.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(q,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):a?u?t.jsx(Qe,{connectionId:a.id,orgId:o.id,orgSlug:o.slug,installation:u,onSelectRepo:n=>m.mutate(n),isSaving:m.isPending}):t.jsx(He,{connectionId:a.id,orgId:o.id,orgSlug:o.slug,onSelect:p,showBackButton:d.length>1,onBack:()=>j(null)}):null}function He(P){const e=se.c(126),{connectionId:u,orgId:p,orgSlug:k,onSelect:l,showBackButton:r,onBack:o}=P,s=ee();let f;e[0]!==p||e[1]!==k?(f={connectionId:he,orgId:p,orgSlug:k},e[0]=p,e[1]=k,e[2]=f):f=e[2];const v=re(f),j=me(),w=pe();let d;e[3]!==u||e[4]!==p?(d=te.githubUserOrgs(p,u),e[3]=u,e[4]=p,e[5]=d):d=e[5];let c;e[6]!==u||e[7]!==v?(c=()=>Ge(h=>v.callTool(h),u),e[6]=u,e[7]=v,e[8]=c):c=e[8];let a;e[9]!==d||e[10]!==c?(a={queryKey:d,queryFn:c},e[9]=d,e[10]=c,e[11]=a):a=e[11];const i=ve(a);let g;e[12]!==w||e[13]!==u||e[14]!==i||e[15]!==p||e[16]!==k||e[17]!==j?(g=async()=>{const h=await be({connectionId:u,orgId:p,orgSlug:k,persistFallback:A=>w.update.mutateAsync({id:u,data:{connection_token:A}}).then(qe)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const _=new URL(`/api/${k}/mcp/${u}`,window.location.origin);await j.invalidateQueries({queryKey:te.isMCPAuthenticated(_.href,null)}),await j.invalidateQueries({queryKey:te.mcpClientPrefix()}),await i.refetch()},e[12]=w,e[13]=u,e[14]=i,e[15]=p,e[16]=k,e[17]=j,e[18]=g):g=e[18];let x;e[19]!==s?(x=h=>{le.error(s("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=x):x=e[20];let b;e[21]!==g||e[22]!==x?(b={mutationFn:g,onError:x},e[21]=g,e[22]=x,e[23]=b):b=e[23];const m=ge(b);if(i.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(i.isError){let h;e[25]!==s?(h=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=h):h=e[26];let _;e[27]!==h?(_=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=_):_=e[28];let A;e[29]!==s?(A=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=A):A=e[30];let z;e[31]!==A?(z=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:A}),e[31]=A,e[32]=z):z=e[32];let L;e[33]!==m?(L=()=>m.mutate(),e[33]=m,e[34]=L):L=e[34];const H=m.isPending;let F;e[35]!==m.isPending?(F=m.isPending?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(q,{className:"size-3.5"}),e[35]=m.isPending,e[36]=F):F=e[36];let G;e[37]!==s?(G=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=G):G=e[38];let O;e[39]!==m.isPending||e[40]!==L||e[41]!==F||e[42]!==G?(O=t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:L,disabled:H,children:[F,G]}),e[39]=m.isPending,e[40]=L,e[41]=F,e[42]=G,e[43]=O):O=e[43];let D;return e[44]!==z||e[45]!==O||e[46]!==_?(D=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[_,z,O]}),e[44]=z,e[45]=O,e[46]=_,e[47]=D):D=e[47],D}const n=i.data;if(!n)return null;const y=n.appSlug?`https://github.com/apps/${n.appSlug}/installations/new`:"https://github.com/settings/installations";if(n.installations.length===0){let h;e[48]!==o||e[49]!==r||e[50]!==s?(h=r&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(de,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=o,e[49]=r,e[50]=s,e[51]=h):h=e[51];let _;e[52]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(q,{className:"size-8 text-foreground"})}),e[52]=_):_=e[52];let A;e[53]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=A):A=e[53];let z;e[54]!==s?(z=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=z):z=e[55];let L;e[56]!==z?(L=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[A,z]}),e[56]=z,e[57]=L):L=e[57];let H;e[58]!==s?(H=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=H):H=e[59];let F;e[60]!==H?(F=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=F):F=e[61];let G;e[62]!==s?(G=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let D;e[66]!==s?(D=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=D):D=e[67];let ne;e[68]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(Te,{size:14}),e[68]=ne):ne=e[68];let Q;e[69]!==y||e[70]!==D?(Q=t.jsx(ce,{asChild:!0,size:"sm",children:t.jsxs("a",{href:y,target:"_blank",rel:"noopener noreferrer",children:[D,ne]})}),e[69]=y,e[70]=D,e[71]=Q):Q=e[71];let M;e[72]!==i?(M=()=>{i.refetch()},e[72]=i,e[73]=M):M=e[73];const je=i.isFetching;let B;e[74]!==i.isFetching?(B=i.isFetching&&t.jsx(X,{size:14,className:"animate-spin"}),e[74]=i.isFetching,e[75]=B):B=e[75];let V;e[76]!==s?(V=s("common.githubRepoPicker.checkAgain"),e[76]=s,e[77]=V):V=e[77];let K;e[78]!==i.isFetching||e[79]!==M||e[80]!==B||e[81]!==V?(K=t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:M,disabled:je,children:[B,V]}),e[78]=i.isFetching,e[79]=M,e[80]=B,e[81]=V,e[82]=K):K=e[82];let J;e[83]!==Q||e[84]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[Q,K]}),e[83]=Q,e[84]=K,e[85]=J):J=e[85];let W;e[86]!==s?(W=s("common.githubRepoPicker.repositoryAccessNote"),e[86]=s,e[87]=W):W=e[87];let Y;e[88]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[88]=W,e[89]=Y):Y=e[89];let Z;e[90]!==L||e[91]!==F||e[92]!==O||e[93]!==J||e[94]!==Y?(Z=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[_,L,F,O,J,Y]}),e[90]=L,e[91]=F,e[92]=O,e[93]=J,e[94]=Y,e[95]=Z):Z=e[95];let ie;return e[96]!==Z||e[97]!==h?(ie=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,Z]}),e[96]=Z,e[97]=h,e[98]=ie):ie=e[98],ie}let N;e[99]!==o||e[100]!==r||e[101]!==s?(N=r&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(de,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[99]=o,e[100]=r,e[101]=s,e[102]=N):N=e[102];let R;if(e[103]!==n.installations||e[104]!==l||e[105]!==s){let h;e[107]!==l||e[108]!==s?(h=_=>t.jsxs("button",{type:"button",onClick:()=>l(_),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:_.avatarUrl,alt:_.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:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},_.installationId),e[107]=l,e[108]=s,e[109]=h):h=e[109],R=n.installations.map(h),e[103]=n.installations,e[104]=l,e[105]=s,e[106]=R}else R=e[106];let C;e[110]!==R?(C=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:R}),e[110]=R,e[111]=C):C=e[111];let S;e[112]!==s?(S=s("common.githubRepoPicker.accountNotListed"),e[112]=s,e[113]=S):S=e[113];let I;e[114]!==s?(I=s("common.githubRepoPicker.installGitHubApp"),e[114]=s,e[115]=I):I=e[115];let E;e[116]!==I?(E=t.jsx("span",{className:"underline underline-offset-2",children:I}),e[116]=I,e[117]=E):E=e[117];let T;e[118]!==y||e[119]!==S||e[120]!==E?(T=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[S," ",E]})}),e[118]=y,e[119]=S,e[120]=E,e[121]=T):T=e[121];let U;return e[122]!==C||e[123]!==T||e[124]!==N?(U=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[N,C,T]}),e[122]=C,e[123]=T,e[124]=N,e[125]=U):U=e[125],U}function qe(){}function Qe(P){const e=se.c(23),{connectionId:u,orgId:p,orgSlug:k,installation:l,onSelectRepo:r,isSaving:o}=P,s=ee(),[f,v]=$.useState(""),j=_e(f,300),w=$.useDeferredValue(j),d=f!==w;let c;e[0]!==s?(c=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=c):c=e[1];let a;e[2]!==d||e[3]!==f||e[4]!==c?(a=t.jsx(Ie,{placeholder:c,value:f,onChange:v,isSearching:d}),e[2]=d,e[3]=f,e[4]=c,e[5]=a):a=e[5];const i=d?"opacity-40":"opacity-100";let g;e[6]!==i?(g=ue("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",i),e[6]=i,e[7]=g):g=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=x):x=e[8];let b;e[9]!==u||e[10]!==w||e[11]!==l||e[12]!==o||e[13]!==r||e[14]!==p||e[15]!==k?(b=t.jsx($.Suspense,{fallback:x,children:t.jsx(Me,{connectionId:u,orgId:p,orgSlug:k,installation:l,query:w,onSelectRepo:r,isSaving:o})}),e[9]=u,e[10]=w,e[11]=l,e[12]=o,e[13]=r,e[14]=p,e[15]=k,e[16]=b):b=e[16];let m;e[17]!==g||e[18]!==b?(m=t.jsx("div",{className:g,children:b}),e[17]=g,e[18]=b,e[19]=m):m=e[19];let n;return e[20]!==a||e[21]!==m?(n=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[a,m]}),e[20]=a,e[21]=m,e[22]=n):n=e[22],n}function Me(P){const e=se.c(36),{connectionId:u,orgId:p,orgSlug:k,installation:l,query:r,onSelectRepo:o,isSaving:s}=P,f=ee();let v;e[0]!==u||e[1]!==p||e[2]!==k?(v={connectionId:u,orgId:p,orgSlug:k},e[0]=u,e[1]=p,e[2]=k,e[3]=v):v=e[3];const j=re(v),w=l.type==="User"?"user":"org",d=r?`${w}:${l.login} ${r} in:name`:`${w}:${l.login}`;let c;e[4]!==u||e[5]!==l.login||e[6]!==p||e[7]!==r?(c=te.githubOrgRepos(p,u,l.login,r),e[4]=u,e[5]=l.login,e[6]=p,e[7]=r,e[8]=c):c=e[8];let a;e[9]!==j||e[10]!==d?(a=async m=>{const{signal:n}=m,N=(await j.callTool({name:"search_repositories",arguments:{query:d,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(Be)},e[9]=j,e[10]=d,e[11]=a):a=e[11];let i;e[12]!==c||e[13]!==a?(i={queryKey:c,queryFn:a},e[12]=c,e[13]=a,e[14]=i):i=e[14];const{data:g}=ke(i);if(g.length===0){let m;e[15]!==f?(m=f("common.githubRepoPicker.noRepositoriesFound"),e[15]=f,e[16]=m):m=e[16];let n;e[17]!==m?(n=t.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[17]=m,e[18]=n):n=e[18];let y;e[19]!==r||e[20]!==f?(y=r&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:f("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=r,e[20]=f,e[21]=y):y=e[21];let N;return e[22]!==n||e[23]!==y?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[n,y]}),e[22]=n,e[23]=y,e[24]=N):N=e[24],N}let x;if(e[25]!==s||e[26]!==o||e[27]!==g||e[28]!==f){let m;e[30]!==s||e[31]!==o||e[32]!==f?(m=n=>t.jsxs("button",{type:"button",onClick:()=>o(n),disabled:s,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(q,{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:n.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:[n.private?t.jsx(Ce,{size:10}):t.jsx(Ae,{size:10}),n.private?f("common.githubRepoPicker.private"):f("common.githubRepoPicker.public")]})]},n.fullName),e[30]=s,e[31]=o,e[32]=f,e[33]=m):m=e[33],x=g.map(m),e[25]=s,e[26]=o,e[27]=g,e[28]=f,e[29]=x}else x=e[29];let b;return e[34]!==x?(b=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:x}),e[34]=x,e[35]=b):b=e[35],b}function Be(P){return{name:P.name,fullName:P.full_name,owner:P.full_name.split("/")[0]??"",url:P.html_url,private:P.private,description:P.description,updatedAt:P.updated_at}}function ae(P){const e=se.c(51),{status:u,error:p,retry:k}=P,l=ee();if(u==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(q,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let R;e[1]!==l?(R=l("common.githubRepoPicker.connectionFailed"),e[1]=l,e[2]=R):R=e[2];let C;e[3]!==R?(C=t.jsx("p",{className:"text-sm font-medium",children:R}),e[3]=R,e[4]=C):C=e[4];let S;e[5]!==p||e[6]!==l?(S=p??l("common.githubRepoPicker.somethingWentWrong"),e[5]=p,e[6]=l,e[7]=S):S=e[7];let I;e[8]!==S?(I=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:S}),e[8]=S,e[9]=I):I=e[9];let E;e[10]!==C||e[11]!==I?(E=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[C,I]}),e[10]=C,e[11]=I,e[12]=E):E=e[12];let T;e[13]!==l?(T=l("common.githubRepoPicker.tryAgain"),e[13]=l,e[14]=T):T=e[14];let U;e[15]!==k||e[16]!==T?(U=t.jsx("button",{type:"button",onClick:k,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:T}),e[15]=k,e[16]=T,e[17]=U):U=e[17];let h;return e[18]!==E||e[19]!==U?(h=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,E,U]}),e[18]=E,e[19]=U,e[20]=h):h=e[20],h}const r=u==="authenticating";let o;e[21]===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(q,{className:"size-5 text-foreground"})}),e[21]=o):o=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=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(X,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let f;e[23]!==r||e[24]!==l?(f=l(r?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=r,e[24]=l,e[25]=f):f=e[25];let v;e[26]!==f?(v=t.jsx("p",{className:"text-sm font-medium",children:f}),e[26]=f,e[27]=v):v=e[27];let j;e[28]!==r||e[29]!==l?(j=l(r?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=r,e[29]=l,e[30]=j):j=e[30];let w;e[31]!==j?(w=t.jsx("p",{className:"text-xs text-muted-foreground",children:j}),e[31]=j,e[32]=w):w=e[32];let d;e[33]!==v||e[34]!==w?(d=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[v,w]}),e[33]=v,e[34]=w,e[35]=d):d=e[35];const c=r?"bg-muted-foreground/30":"bg-foreground animate-pulse";let a;e[36]!==c?(a=ue("size-1.5 rounded-full",c),e[36]=c,e[37]=a):a=e[37];let i;e[38]!==a?(i=t.jsx("span",{className:a}),e[38]=a,e[39]=i):i=e[39];const g=r?"bg-foreground animate-pulse":"bg-muted-foreground/30";let x;e[40]!==g?(x=ue("size-1.5 rounded-full",g),e[40]=g,e[41]=x):x=e[41];let b;e[42]!==x?(b=t.jsx("span",{className:x}),e[42]=x,e[43]=b):b=e[43];let m;e[44]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=m):m=e[44];let n;e[45]!==i||e[46]!==b?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[i,b,m]}),e[45]=i,e[46]=b,e[47]=n):n=e[47];let y;return e[48]!==n||e[49]!==d?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,d,n]}),e[48]=n,e[49]=d,e[50]=y):y=e[50],y}export{ct as G,De as u};