decocms 4.77.2 → 4.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/dist/client/assets/{AlertCircle-eG6Gc49G.js → AlertCircle-D6YyJJmm.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CdRNAaTW.js → AreaChart-CXzSMWrS.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-CdLsMjki.js → ArrowUp-D3YFKg7G.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-O8BszRRp.js → ArrowUpRight-DgvFsQng.js} +1 -1
  5. package/dist/client/assets/{Check-CYLXae3M.js → Check-Bf3Fz6mT.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-tljwuhuM.js → CheckCircle-DBI4XJwz.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-Ce0JNwG8.js → ChevronDown-TeMcV6Wa.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-Bf6_HJan.js → ChevronRight-QSLgw-q7.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-Cflkeqqz.js → ChevronUp-g5JVf1F_.js} +1 -1
  10. package/dist/client/assets/{Circle-DzHZa-kj.js → Circle-Cu4ym4Ez.js} +1 -1
  11. package/dist/client/assets/{Copy01-Du_M_0KX.js → Copy01-DgzGIIpj.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-xFAtxH3A.js → DotsVertical-yY90ybrp.js} +1 -1
  13. package/dist/client/assets/{Eye-D-54suMo.js → Eye-vRl0ZCJB.js} +1 -1
  14. package/dist/client/assets/{FilterLines-BgdIIHnR.js → FilterLines-BbWZ4lL4.js} +1 -1
  15. package/dist/client/assets/{Flag01-ugYNIxEK.js → Flag01-CXRHMIef.js} +1 -1
  16. package/dist/client/assets/{Globe01-UO2cBICu.js → Globe01-B7g_9reV.js} +1 -1
  17. package/dist/client/assets/{Globe04-DzUT07Cn.js → Globe04-C3Z6OIxj.js} +1 -1
  18. package/dist/client/assets/{HardDrive-bE1MoLDy.js → HardDrive-DymMXEyR.js} +1 -1
  19. package/dist/client/assets/{Image01-DKb2muBn.js → Image01-Bx4AOGxs.js} +1 -1
  20. package/dist/client/assets/{Key01-Cq-J9mZo.js → Key01-Cmvx37G1.js} +1 -1
  21. package/dist/client/assets/{LayoutLeft-B5__5XBq.js → LayoutLeft-q_h77zns.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-BvGijEfo.js → LinkExternal01-BEoe9Fb2.js} +1 -1
  23. package/dist/client/assets/{List-CIEQZx9S.js → List-5170zK7Q.js} +1 -1
  24. package/dist/client/assets/{Monitor01-C1p3z_f5.js → Monitor01-Kb5okFQS.js} +1 -1
  25. package/dist/client/assets/{Package-BjwszD_f.js → Package-yySHtAk6.js} +1 -1
  26. package/dist/client/assets/{Palette-B-oF6tIa.js → Palette-Dacxdv_I.js} +1 -1
  27. package/dist/client/assets/{Play-D-YRWYQr.js → Play-BoazbAxP.js} +1 -1
  28. package/dist/client/assets/{Plus-CizB5jQt.js → Plus-t7Jm0GJ3.js} +1 -1
  29. package/dist/client/assets/{SearchLg-CiDD8qnw.js → SearchLg-CB9_TW_3.js} +1 -1
  30. package/dist/client/assets/{SearchMd-CcQf_5lB.js → SearchMd-B8rhT4Rt.js} +1 -1
  31. package/dist/client/assets/{Settings02-CGoVxrYE.js → Settings02-D4nrXgvn.js} +1 -1
  32. package/dist/client/assets/{Shield01-nfrTF4Mw.js → Shield01-Y3jps5Gy.js} +1 -1
  33. package/dist/client/assets/{Star01-BVrjnnC8.js → Star01-DBp7dbGs.js} +1 -1
  34. package/dist/client/assets/{Stars01-DSPE0_0T.js → Stars01-BJhn7N1A.js} +1 -1
  35. package/dist/client/assets/{Stars02-C0mePgbQ.js → Stars02-BmKcMhZX.js} +1 -1
  36. package/dist/client/assets/{Sun-3gpGRkKw.js → Sun-DWvykssV.js} +1 -1
  37. package/dist/client/assets/{SwitchHorizontal01-BoKJqR3a.js → SwitchHorizontal01-DJDXmWgC.js} +1 -1
  38. package/dist/client/assets/{Tool01-Bm90mZCD.js → Tool01-Ct7fGWUY.js} +1 -1
  39. package/dist/client/assets/{Tool02-daiZ8ZdA.js → Tool02-Cr2Rz6tq.js} +1 -1
  40. package/dist/client/assets/{Trash01-oe1NMhcg.js → Trash01-C3QDvJF1.js} +1 -1
  41. package/dist/client/assets/{TrendUp01-DvuM4A6y.js → TrendUp01-WsDlxYhZ.js} +1 -1
  42. package/dist/client/assets/{Upload01-BXr1BH_I.js → Upload01-C2W1llVr.js} +1 -1
  43. package/dist/client/assets/{User01-C7ZuARbC.js → User01-Deo29J7j.js} +1 -1
  44. package/dist/client/assets/{UserPlus01-C0VtXGyN.js → UserPlus01-C_-L6kJr.js} +1 -1
  45. package/dist/client/assets/{Users01-DZyUR8Yh.js → Users01-CLZ2kdTu.js} +1 -1
  46. package/dist/client/assets/{Users03-CHK21j2b.js → Users03-uM7w0XRw.js} +1 -1
  47. package/dist/client/assets/{X-B6u4BYeS.js → X-DYT1GSz1.js} +1 -1
  48. package/dist/client/assets/{XCircle-DGI9dgcJ.js → XCircle-C965t8pI.js} +1 -1
  49. package/dist/client/assets/{XClose-lZsBUygk.js → XClose-D8I17tPk.js} +1 -1
  50. package/dist/client/assets/{Zap-CMeneH21.js → Zap-p_vD-N15.js} +1 -1
  51. package/dist/client/assets/{ZapSquare-B3ibL8nl.js → ZapSquare-r-I1hrGR.js} +1 -1
  52. package/dist/client/assets/{ZoomOut-CKfihzl3.js → ZoomOut-CyT94sXk.js} +1 -1
  53. package/dist/client/assets/{access-gate-BKjE-W72.js → access-gate-C5tHnpFu.js} +1 -1
  54. package/dist/client/assets/{add-section-modal-9hA4zHWa.js → add-section-modal-D3vMc3LK.js} +1 -1
  55. package/dist/client/assets/{agent-icon-B1DcT15_.js → agent-icon-jLUxIfUX.js} +1 -1
  56. package/dist/client/assets/agents-list-3dntZgUX.js +1 -0
  57. package/dist/client/assets/{ai-providers-DEZ-doQX.js → ai-providers-DUfJcGkX.js} +1 -1
  58. package/dist/client/assets/{alert-CKkliWEi.js → alert-JyDMBG9Y.js} +1 -1
  59. package/dist/client/assets/{alert-dialog-BHYtfpRM.js → alert-dialog-BZCxnnaY.js} +1 -1
  60. package/dist/client/assets/app-editor-BBLUJ0bm.js +1 -0
  61. package/dist/client/assets/{auth-BbW7SMY9.js → auth-B0oxX-rw.js} +1 -1
  62. package/dist/client/assets/{auth-catchall-DXOIAmHy.js → auth-catchall-BZvzipnV.js} +1 -1
  63. package/dist/client/assets/{auth-entry-Hxc9SX52.js → auth-entry-BLM6BHE1.js} +1 -1
  64. package/dist/client/assets/{auth-split-layout-Dfl544OM.js → auth-split-layout-CsaahkY7.js} +1 -1
  65. package/dist/client/assets/{authenticate-and-persist-oauth-SPitL5yD.js → authenticate-and-persist-oauth-DxQqW3T-.js} +1 -1
  66. package/dist/client/assets/{automation-list-row-Dn4IsiQT.js → automation-list-row-f7HB0lEO.js} +1 -1
  67. package/dist/client/assets/{automation-runs-BvQ_NpzR.js → automation-runs-C0bPxXfe.js} +1 -1
  68. package/dist/client/assets/automations-CZpHalR8.js +1 -0
  69. package/dist/client/assets/{autosend-qdJpe4iq.js → autosend-pcmp17-1.js} +1 -1
  70. package/dist/client/assets/{avatar-DMDa5Fmk.js → avatar-BaaCzkz5.js} +1 -1
  71. package/dist/client/assets/{badge-DGFRrczB.js → badge-DDX6uCig.js} +1 -1
  72. package/dist/client/assets/{block-document-DU-yWhvh.js → block-document-DivAhnA1.js} +1 -1
  73. package/dist/client/assets/{brand-context-B0F8ndWt.js → brand-context-BTW63ubn.js} +1 -1
  74. package/dist/client/assets/{buckets-Bz1zL6p_.js → buckets-dkoo4cSZ.js} +1 -1
  75. package/dist/client/assets/{bulk-category-panel-CrkZD2hX.js → bulk-category-panel-BKU51QgX.js} +1 -1
  76. package/dist/client/assets/{calendar-BmG3lShW.js → calendar-CtB-1ORd.js} +1 -1
  77. package/dist/client/assets/{capability-load-error-DjfRZU4K.js → capability-load-error-BQX8z6t0.js} +1 -1
  78. package/dist/client/assets/{card-B2cV3vAA.js → card-zqYafqG3.js} +1 -1
  79. package/dist/client/assets/category-editor-DIxkWtHT.js +1 -0
  80. package/dist/client/assets/{chat-context-D0hwm5HT.js → chat-context-C_Qfrzll.js} +1 -1
  81. package/dist/client/assets/{checkbox-n-zGS588.js → checkbox-D33J0J5s.js} +1 -1
  82. package/dist/client/assets/{cli-auth-success-Cpw6906n.js → cli-auth-success-a675Crj5.js} +1 -1
  83. package/dist/client/assets/{collection-detail-CoKiA3iG.js → collection-detail-DOr4XVAb.js} +1 -1
  84. package/dist/client/assets/{collection-display-button-Dd5IEnXv.js → collection-display-button-DRpwr1d2.js} +1 -1
  85. package/dist/client/assets/{collection-search-1EZ5z6Vc.js → collection-search-BBYUHwp3.js} +1 -1
  86. package/dist/client/assets/{collection-table-wrapper-CWw6WTgV.js → collection-table-wrapper-DG4oL_XO.js} +1 -1
  87. package/dist/client/assets/{collection-tabs-G10EJ6rD.js → collection-tabs-CM7SC5Ph.js} +1 -1
  88. package/dist/client/assets/{command-Bijkf_mr.js → command-BgHIgal-.js} +1 -1
  89. package/dist/client/assets/commerce-onboarding-DEDSkHug.js +1 -0
  90. package/dist/client/assets/companions-core-BKQjoMFT.js +1 -0
  91. package/dist/client/assets/{connect-desktop-dialog-Cl6dLVAA.js → connect-desktop-dialog-C3MAVbqi.js} +1 -1
  92. package/dist/client/assets/{connection-card--smrdlwg.js → connection-card-akwzMfSt.js} +1 -1
  93. package/dist/client/assets/{connection-detail-sQv6wR_D.js → connection-detail-CRcTfmPM.js} +1 -1
  94. package/dist/client/assets/{connection-form-helpers-Det9xziz.js → connection-form-helpers-D-nDOfy5.js} +1 -1
  95. package/dist/client/assets/{connections-b4dKpHip.js → connections-BpPH-rGd.js} +1 -1
  96. package/dist/client/assets/{decopilot-sse-pool-DDyGdbf8.js → decopilot-sse-pool-_1OoFfRR.js} +1 -1
  97. package/dist/client/assets/{dialog-7JXjpLzj.js → dialog-C_G4Nj_a.js} +1 -1
  98. package/dist/client/assets/{domain-settings-9SDv1Gy2.js → domain-settings-BU3PLHXT.js} +1 -1
  99. package/dist/client/assets/{drawer-975r1xgz.js → drawer-DIzHaW1L.js} +1 -1
  100. package/dist/client/assets/{dropdown-menu-CfwadO2Z.js → dropdown-menu-C3HeQI9N.js} +1 -1
  101. package/dist/client/assets/{empty-state-C2pMk4Io.js → empty-state-Bn6jIdxN.js} +1 -1
  102. package/dist/client/assets/{extract-connection-data-xHncf4eT.js → extract-connection-data-DoTSwnq5.js} +1 -1
  103. package/dist/client/assets/file-explorer-C7jnlKJt.js +2 -0
  104. package/dist/client/assets/{file-type-icon-C9w5Ssef.js → file-type-icon-Chdi7BrE.js} +1 -1
  105. package/dist/client/assets/{files-DmBu13F5.js → files-CDQzPvRQ.js} +1 -1
  106. package/dist/client/assets/{form-CoMC4z4E.js → form-CqMXK7Rg.js} +1 -1
  107. package/dist/client/assets/{general-BZsnVBNU.js → general-BHXdL9DJ.js} +1 -1
  108. package/dist/client/assets/github-repo-picker-iGTmhvfh.js +1 -0
  109. package/dist/client/assets/github-repo-scope-DjMZbiKa.js +1 -0
  110. package/dist/client/assets/{hooks-ChQF06R2.js → hooks-B2bKZJz3.js} +1 -1
  111. package/dist/client/assets/{index-C6ZXBMKy.js → index-94TmFXEM.js} +1 -1
  112. package/dist/client/assets/{index-CqeCI00R.js → index-B5PgsjuZ.js} +1 -1
  113. package/dist/client/assets/{index-CohYEXUC.js → index-BB5lA5jj.js} +3 -3
  114. package/dist/client/assets/{index-p-NZuQLL.js → index-BKb79pgL.js} +1 -1
  115. package/dist/client/assets/index-BcGQg-Kx.js +2 -0
  116. package/dist/client/assets/{index-C_fGiia9.js → index-Bvhurd-Z.js} +28 -28
  117. package/dist/client/assets/{index-DAFuG1kQ.js → index-CuPxvnMd.js} +1 -1
  118. package/dist/client/assets/{index-UpQsgScZ.js → index-DZrgCtW9.js} +1 -1
  119. package/dist/client/assets/index-DvVn4R_K.js +1 -0
  120. package/dist/client/assets/{index-CTi2LrxD.js → index-IeYTwdqM.js} +1 -1
  121. package/dist/client/assets/{index-e-E887bU.js → index-JYMtN_ka.js} +1 -1
  122. package/dist/client/assets/{index-CVhE6SCR.js → index-OTCSzql6.js} +1 -1
  123. package/dist/client/assets/{index-B421HVEM.js → index-nfm9K1x2.js} +1 -1
  124. package/dist/client/assets/{index-redirect-C0lMrFZb.js → index-redirect-9xlH9kRG.js} +1 -1
  125. package/dist/client/assets/{index-O25bDoG2.js → index-xN4b_CkF.js} +1 -1
  126. package/dist/client/assets/{input-DooN4jkj.js → input-CcKrVAr2.js} +1 -1
  127. package/dist/client/assets/{integration-icon-DouvCAyQ.js → integration-icon-BFsmKVHF.js} +1 -1
  128. package/dist/client/assets/{invite-member-dialog-GTEEDh2Y.js → invite-member-dialog-6XRVfRTx.js} +1 -1
  129. package/dist/client/assets/{label-CHVjglvp.js → label-CW15sZLz.js} +1 -1
  130. package/dist/client/assets/{layout-BvnbP4Dr.js → layout-C1yYJmDo.js} +1 -1
  131. package/dist/client/assets/{login-Cf5hKO0l.js → login-B35xc8Gt.js} +1 -1
  132. package/dist/client/assets/{mcp-oauth-DmLpmBfh.js → mcp-oauth-Bx9msuxY.js} +1 -1
  133. package/dist/client/assets/{members-TMJ-nd-l.js → members-CtdxOI6T.js} +1 -1
  134. package/dist/client/assets/{monaco-editor-DeHPBeZj.js → monaco-editor-tITHyCTj.js} +1 -1
  135. package/dist/client/assets/{monitoring-stats-row-q_qpqwCs.js → monitoring-stats-row-5NJQerF_.js} +1 -1
  136. package/dist/client/assets/{multi-select-oNBbk1hp.js → multi-select-DjU5xocW.js} +1 -1
  137. package/dist/client/assets/{oauth-callback-DrO3rGFl.js → oauth-callback-DMSxm1aa.js} +1 -1
  138. package/dist/client/assets/{oauth-callback-ai-provider-Uc-mSRYP.js → oauth-callback-ai-provider-DNKUFr1T.js} +1 -1
  139. package/dist/client/assets/{onboarding-Es5wNRlJ.js → onboarding-DhudMezE.js} +1 -1
  140. package/dist/client/assets/{org-install-DwAkYRpj.js → org-install-BI6Tqb8M.js} +1 -1
  141. package/dist/client/assets/{org-layout-BmXupHnR.js → org-layout-BzM8m0Yo.js} +1 -1
  142. package/dist/client/assets/{organization-choice-Wkdav7l-.js → organization-choice-CLoSaGiq.js} +1 -1
  143. package/dist/client/assets/{orgs-BiuhDQqw.js → orgs-BXyQQf2t.js} +1 -1
  144. package/dist/client/assets/{page-seo-form-BITO5Cwa.js → page-seo-form-b_KQgaAh.js} +1 -1
  145. package/dist/client/assets/page-seo-sheet-ClLCRUIN.js +1 -0
  146. package/dist/client/assets/{popover-CMMyXpPK.js → popover-BhnGTRIN.js} +1 -1
  147. package/dist/client/assets/post-editor-BftvN04C.js +1 -0
  148. package/dist/client/assets/{primitives-1GpjyhXb.js → primitives-ueS43w85.js} +1 -1
  149. package/dist/client/assets/{profile-Bx6jAFG3.js → profile-BQf3SBqt.js} +1 -1
  150. package/dist/client/assets/project-app-view-DjP2PmND.js +1 -0
  151. package/dist/client/assets/provision-repo-scoped-github-connection-2iDn-wQ1.js +1 -0
  152. package/dist/client/assets/record-editor-Du8LTIQ8.js +1 -0
  153. package/dist/client/assets/redirect-editor-CZu9GWo3.js +1 -0
  154. package/dist/client/assets/registry-g2WwGfcO.js +2 -0
  155. package/dist/client/assets/{registry-layout-DoohESD-.js → registry-layout-DupWO7LC.js} +1 -1
  156. package/dist/client/assets/{reports-DdIsDSQY.js → reports-BlIjKH8H.js} +1 -1
  157. package/dist/client/assets/{require-capability-DWNo_rvi.js → require-capability-D7ZefDTd.js} +1 -1
  158. package/dist/client/assets/{required-auth-layout-DrnK06MM.js → required-auth-layout-COJ1HesY.js} +1 -1
  159. package/dist/client/assets/{reset-password-CYwCkT5L.js → reset-password-ByTmxDaH.js} +1 -1
  160. package/dist/client/assets/{roles-DUIPd2E1.js → roles-Cgr1guoV.js} +1 -1
  161. package/dist/client/assets/{search-input-gI5YpJSI.js → search-input-IdLCT-wl.js} +1 -1
  162. package/dist/client/assets/{secrets-DbP1su7D.js → secrets-DF0jWkhd.js} +1 -1
  163. package/dist/client/assets/{sections-editor-BmcqZp-u.js → sections-editor-Br2ZrjF9.js} +2 -2
  164. package/dist/client/assets/{select-DLOarQAH.js → select-BDKopoZs.js} +1 -1
  165. package/dist/client/assets/{select-model-DgC0KhDX.js → select-model-DQ3GcF2Q.js} +1 -1
  166. package/dist/client/assets/{self-tool-result-BSbws4qP.js → self-tool-result-Dehaso5-.js} +1 -1
  167. package/dist/client/assets/seo-editor-DxU1V_q7.js +1 -0
  168. package/dist/client/assets/{settings-layout-CGbNh01L.js → settings-layout-BTr-31q1.js} +1 -1
  169. package/dist/client/assets/{settings-section-CSQS_fOd.js → settings-section-Bs2y0W38.js} +1 -1
  170. package/dist/client/assets/{shell-controls-r8aLrbK0.js → shell-controls-BNwC-U3m.js} +1 -1
  171. package/dist/client/assets/{shell-layout-DtOHLb0x.js → shell-layout-DBwpg5fa.js} +1 -1
  172. package/dist/client/assets/{sidebar-fRXLoYlv.js → sidebar-BiKcuUlz.js} +1 -1
  173. package/dist/client/assets/{skeleton-DrvCYvFD.js → skeleton-DO-zgL8S.js} +1 -1
  174. package/dist/client/assets/{sso-C9Vqlw8M.js → sso-BVw4m6Is.js} +1 -1
  175. package/dist/client/assets/{store-h6xQOgKK.js → store-BBq6XldJ.js} +1 -1
  176. package/dist/client/assets/store-registry-BIIvqrwe.js +2 -0
  177. package/dist/client/assets/{studio-tools-Cmxh51BW.js → studio-tools-QgTnVt0y.js} +1 -1
  178. package/dist/client/assets/{switch-CCu5HEzP.js → switch-7KE_HjZk.js} +1 -1
  179. package/dist/client/assets/{table-TsjPt8Gf.js → table-C23nDXu-.js} +1 -1
  180. package/dist/client/assets/{tabs-BhgZ3ZmW.js → tabs-B0oOCjef.js} +1 -1
  181. package/dist/client/assets/{textarea-DDxbxAIb.js → textarea-D3iFRZ9o.js} +1 -1
  182. package/dist/client/assets/{toggle-group-gGQTQIMA.js → toggle-group-MA_94m4S.js} +1 -1
  183. package/dist/client/assets/{toolbar-icon-button-Bw7f5O1p.js → toolbar-icon-button-Be0Xxrx6.js} +1 -1
  184. package/dist/client/assets/{toolbar-D-2K0Fk5.js → toolbar-w5KxuBt-.js} +1 -1
  185. package/dist/client/assets/{tooltip-owO6Fujv.js → tooltip-LRHFL41r.js} +1 -1
  186. package/dist/client/assets/{use-ai-providers-B919C25s.js → use-ai-providers-BeYG-EjG.js} +1 -1
  187. package/dist/client/assets/{use-automations-CJdJQaET.js → use-automations-CAUzSd8j.js} +1 -1
  188. package/dist/client/assets/{use-autosave-D09qjW1V.js → use-autosave-C6ffzJDR.js} +1 -1
  189. package/dist/client/assets/{use-capability-CiXd5r1-.js → use-capability-Dch03R8X.js} +1 -1
  190. package/dist/client/assets/{use-clock-tick-Bo5nmZlI.js → use-clock-tick-CVibzfL9.js} +1 -1
  191. package/dist/client/assets/{use-collections-X_sc34If.js → use-collections-D9omaJJu.js} +1 -1
  192. package/dist/client/assets/{use-connection-DuDkpb0e.js → use-connection-hO51hV8J.js} +1 -1
  193. package/dist/client/assets/{use-copy-Bx3m2rO-.js → use-copy-tGW1Vaes.js} +1 -1
  194. package/dist/client/assets/{use-create-virtual-mcp-ByH8ooeL.js → use-create-virtual-mcp-CdWTTl06.js} +1 -1
  195. package/dist/client/assets/{use-debounced-autosave-CjuwhAVQ.js → use-debounced-autosave-cTAMJ-st.js} +1 -1
  196. package/dist/client/assets/{use-debounced-value-L3f6T_5p.js → use-debounced-value-C8BZDtz1.js} +1 -1
  197. package/dist/client/assets/{use-deco-credits-C8loT1AO.js → use-deco-credits-D8dtxTPg.js} +1 -1
  198. package/dist/client/assets/{use-decopilot-events-CynGBvUt.js → use-decopilot-events-4o9NNSez.js} +1 -1
  199. package/dist/client/assets/{use-delete-connection-C0mv8dIz.js → use-delete-connection-BqJkmcK6.js} +1 -1
  200. package/dist/client/assets/{use-deployment-admin-DabPejE5.js → use-deployment-admin-D_HkirOy.js} +1 -1
  201. package/dist/client/assets/{use-file-configs-CIujnhhg.js → use-file-configs-CZiarNuS.js} +1 -1
  202. package/dist/client/assets/{use-infinite-scroll-Y2vLF9MQ.js → use-infinite-scroll-DgcSj6JD.js} +1 -1
  203. package/dist/client/assets/{use-join-requests-BzWPX9mp.js → use-join-requests-BqCHI8Zj.js} +1 -1
  204. package/dist/client/assets/{use-mcp-auth-status-CWMnl4kQ.js → use-mcp-auth-status-CLsbHDCg.js} +1 -1
  205. package/dist/client/assets/{use-mcp-client-CM7X9MZh.js → use-mcp-client-W9fEi0Ml.js} +1 -1
  206. package/dist/client/assets/{use-mcp-tools--4fgvczm.js → use-mcp-tools-uwmJZn0p.js} +1 -1
  207. package/dist/client/assets/{use-members-D9EO1Bhw.js → use-members-B6EJ964p.js} +1 -1
  208. package/dist/client/assets/{use-mobile-CA2wukFn.js → use-mobile-BQOMgKS3.js} +1 -1
  209. package/dist/client/assets/{use-navigate-to-agent-BQJR7hS-.js → use-navigate-to-agent-DqqHYLVD.js} +1 -1
  210. package/dist/client/assets/{use-org-auth-client-BBy-fA8U.js → use-org-auth-client-Y5-GC6qM.js} +1 -1
  211. package/dist/client/assets/{use-org-sso-_-9Ndxjg.js → use-org-sso-Dqg59TFA.js} +1 -1
  212. package/dist/client/assets/{use-organization-roles-DCK1gCYk.js → use-organization-roles-CeuO8sTI.js} +1 -1
  213. package/dist/client/assets/{use-organization-settings-STRgrAfE.js → use-organization-settings-CQJ8RPRh.js} +1 -1
  214. package/dist/client/assets/use-registry-app-DVOJoUv5.js +1 -0
  215. package/dist/client/assets/{use-registry-connections-B3SITFNT.js → use-registry-connections-DdQfbjwO.js} +1 -1
  216. package/dist/client/assets/{use-secrets-DeioiR_Q.js → use-secrets-CIsNwBX2.js} +1 -1
  217. package/dist/client/assets/{use-status-sounds-MPm8b7Px.js → use-status-sounds-DFGyya-5.js} +1 -1
  218. package/dist/client/assets/{use-view-mode-B-Z3o5Ts.js → use-view-mode-DJMiJaWa.js} +1 -1
  219. package/dist/client/assets/{use-virtual-mcp-aGmJHwFC.js → use-virtual-mcp-DpSXhS0n.js} +1 -1
  220. package/dist/client/assets/useInfiniteQuery-CyvFYQl8.js +1 -0
  221. package/dist/client/assets/{useRouterState-DzpKjEia.js → useRouterState-DpJ4EK7e.js} +1 -1
  222. package/dist/client/assets/useSuspenseInfiniteQuery-C33XLke-.js +1 -0
  223. package/dist/client/assets/{users-C5ACxEJi.js → users-EWx6DB7t.js} +1 -1
  224. package/dist/client/assets/{variant-calendar-BIM35rdy.js → variant-calendar-DchPOrHH.js} +1 -1
  225. package/dist/client/assets/{view-mode-toggle-CWwEb6HJ.js → view-mode-toggle-hMQMe6tZ.js} +1 -1
  226. package/dist/client/index.html +1 -1
  227. package/dist/server/cli.js +1 -1
  228. package/dist/server/server.js +1 -1
  229. package/package.json +1 -1
  230. package/dist/client/assets/agents-list-Df8i4rGT.js +0 -1
  231. package/dist/client/assets/app-editor-Dymjomoi.js +0 -1
  232. package/dist/client/assets/automations-Qkqzours.js +0 -1
  233. package/dist/client/assets/category-editor-BPpEoMdX.js +0 -1
  234. package/dist/client/assets/commerce-onboarding-yv2iV0vu.js +0 -1
  235. package/dist/client/assets/companions-core-D65XjKFb.js +0 -1
  236. package/dist/client/assets/file-explorer-C1XUdiUA.js +0 -2
  237. package/dist/client/assets/github-repo-picker-CD1HFBLK.js +0 -1
  238. package/dist/client/assets/index-CEvMb-yW.js +0 -1
  239. package/dist/client/assets/index-cJm4RNKA.js +0 -2
  240. package/dist/client/assets/page-seo-sheet-DVGxv6BI.js +0 -1
  241. package/dist/client/assets/post-editor-QO48PKJR.js +0 -1
  242. package/dist/client/assets/project-app-view-zZm-8Y4L.js +0 -1
  243. package/dist/client/assets/provision-repo-scoped-github-connection-CB4ICKHq.js +0 -1
  244. package/dist/client/assets/record-editor-DJy-LqeK.js +0 -1
  245. package/dist/client/assets/redirect-editor-BErOiRuY.js +0 -1
  246. package/dist/client/assets/registry-QdP3QwyG.js +0 -2
  247. package/dist/client/assets/seo-editor-1B33gCbJ.js +0 -1
  248. package/dist/client/assets/store-registry-BRCiwnTn.js +0 -2
  249. package/dist/client/assets/useInfiniteQuery-BVqkvkK2.js +0 -1
  250. package/dist/client/assets/useSuspenseInfiniteQuery-BXgDSTQv.js +0 -1
@@ -1 +1 @@
1
- import{c as d,j as s,cr as i,l as c}from"./index-CohYEXUC.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
1
+ import{c as d,j as s,cr as i,l as c}from"./index-BB5lA5jj.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
@@ -1 +1 @@
1
- import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-CohYEXUC.js";import{i as $}from"./Check-CYLXae3M.js";import{i as D}from"./ChevronRight-Bf6_HJan.js";import{i as M}from"./Circle-DzHZa-kj.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function O(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function E(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function G(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function L(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function Q(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function V(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function W(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function X(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{C as D,T as a,Q as b,O as c,E as d,V as e,W as f,X as g,L as h,P as i,U as j,G as k};
1
+ import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-BB5lA5jj.js";import{i as $}from"./Check-Bf3Fz6mT.js";import{i as D}from"./ChevronRight-QSLgw-q7.js";import{i as M}from"./Circle-Cu4ym4Ez.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function O(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function E(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function G(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function L(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function Q(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function V(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function W(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function X(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{C as D,T as a,Q as b,O as c,E as d,V as e,W as f,X as g,L as h,P as i,U as j,G as k};
@@ -1 +1 @@
1
- import{c as v,l as N,j as t}from"./index-CohYEXUC.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
1
+ import{c as v,l as N,j as t}from"./index-BB5lA5jj.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
@@ -1 +1 @@
1
- import"./index-CohYEXUC.js";import{c as O}from"./use-mcp-client-CM7X9MZh.js";import{W as T}from"./constants-D_FQAPnt.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function B(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function J(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function Q(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function X(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let G="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=G[n[t]&63];return e};function j(t){return`${t}_${$()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function Z(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];let u,f,_=null;if(c){const h=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:j("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:_,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,X as c,Q as d,Z as e,J as f,j as g,B as i};
1
+ import"./index-BB5lA5jj.js";import{c as O}from"./use-mcp-client-W9fEi0Ml.js";import{W as T}from"./constants-D_FQAPnt.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function B(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function J(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function Q(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function X(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let G="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=G[n[t]&63];return e};function j(t){return`${t}_${$()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function Z(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];let u,f,_=null;if(c){const h=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:j("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:_,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,X as c,Q as d,Z as e,J as f,j as g,B as i};
@@ -0,0 +1,2 @@
1
+ import{c as Y,r as u,j as r,i as oe,B as pe,d$ as jt,aO as Nt,aU as re,e0 as St,e1 as Mt,e2 as Dt,e3 as Rt,bO as Pt,e4 as Et,e5 as Be,aQ as kt,e6 as Tt,e7 as Ot,e8 as At,e9 as Lt,ea as Ft,eb as $t,ec as It,ed as _t,ee as zt,l as ie,n as Gt,t as Q,K as Le}from"./index-BB5lA5jj.js";import{F as Kt,l as Bt}from"./index-DZrgCtW9.js";import{d as Vt,ax as Ut,ay as Wt}from"./agent-icon-jLUxIfUX.js";import{s as Qt}from"./XClose-D8I17tPk.js";import{A as qt}from"./automation-runs-C0bPxXfe.js";import{b as Fe,T as $e,a as Ie}from"./tooltip-LRHFL41r.js";import{b as Ht}from"./chat-context-C_Qfrzll.js";import{u as Xt}from"./shell-layout-DBwpg5fa.js";import{s as de,a as _e,f as Yt}from"./index-Bvhurd-Z.js";import{a as Jt,h as Zt,D as en,c as tn,d as nn,e as rn}from"./dialog-C_G4Nj_a.js";import{I as ze}from"./input-CcKrVAr2.js";import{c as on,d as an,b as sn,A as ln,g as cn,e as dn,a as un,f as fn}from"./alert-dialog-BZCxnnaY.js";import{t as mn}from"./ChevronDown-TeMcV6Wa.js";import{i as pn}from"./ChevronRight-QSLgw-q7.js";import{a as xn}from"./ZoomOut-CyT94sXk.js";import{v as hn,E as gn,w as Ge,x as ve,y as vn,z as yn,A as Cn,C as H,D as ue,G as wn,g as ye,I as Ce,J as bn,K as jn,M as we,N as fe,O as be,P as Nn,Q as Sn}from"./index-JYMtN_ka.js";import"./AlertCircle-D6YyJJmm.js";import"./UserPlus01-C_-L6kJr.js";import"./Tool01-Ct7fGWUY.js";import"./ArrowUp-D3YFKg7G.js";import"./Settings02-D4nrXgvn.js";import"./Tool02-Cr2Rz6tq.js";import"./XCircle-C965t8pI.js";import"./ArrowUpRight-DgvFsQng.js";import"./TrendUp01-WsDlxYhZ.js";import"./ZapSquare-r-I1hrGR.js";import"./Users03-uM7w0XRw.js";import"./CheckCircle-DBI4XJwz.js";import"./Check-Bf3Fz6mT.js";import"./ChevronUp-g5JVf1F_.js";import"./Circle-Cu4ym4Ez.js";import"./Stars02-BmKcMhZX.js";import"./Copy01-DgzGIIpj.js";import"./DotsVertical-yY90ybrp.js";import"./Globe01-B7g_9reV.js";import"./Eye-vRl0ZCJB.js";import"./FilterLines-BbWZ4lL4.js";import"./Flag01-CXRHMIef.js";import"./Star01-DBp7dbGs.js";import"./Globe04-C3Z6OIxj.js";import"./SwitchHorizontal01-DJDXmWgC.js";import"./HardDrive-DymMXEyR.js";import"./Image01-Bx4AOGxs.js";import"./Key01-Cmvx37G1.js";import"./LayoutLeft-q_h77zns.js";import"./LinkExternal01-BEoe9Fb2.js";import"./List-5170zK7Q.js";import"./Monitor01-Kb5okFQS.js";import"./Sun-DWvykssV.js";import"./Package-yySHtAk6.js";import"./Palette-Dacxdv_I.js";import"./Play-BoazbAxP.js";import"./Plus-t7Jm0GJ3.js";import"./SearchLg-CB9_TW_3.js";import"./SearchMd-B8rhT4Rt.js";import"./Shield01-Y3jps5Gy.js";import"./Stars01-BJhn7N1A.js";import"./Trash01-C3QDvJF1.js";import"./Upload01-C2W1llVr.js";import"./User01-Deo29J7j.js";import"./Users01-CLZ2kdTu.js";import"./X-DYT1GSz1.js";import"./Zap-p_vD-N15.js";import"./select-BDKopoZs.js";import"./useInfiniteQuery-CyvFYQl8.js";import"./use-infinite-scroll-DgcSj6JD.js";import"./use-connection-hO51hV8J.js";import"./use-collections-D9omaJJu.js";import"./use-mcp-client-W9fEi0Ml.js";import"./constants-D_FQAPnt.js";import"./auth-B0oxX-rw.js";import"./use-virtual-mcp-DpSXhS0n.js";import"./card-zqYafqG3.js";import"./sidebar-BiKcuUlz.js";import"./use-mobile-BQOMgKS3.js";import"./table-C23nDXu-.js";import"./empty-state-Bn6jIdxN.js";import"./use-members-B6EJ964p.js";import"./use-org-auth-client-Y5-GC6qM.js";import"./use-clock-tick-CVibzfL9.js";import"./use-automations-CAUzSd8j.js";import"./studio-tools-QgTnVt0y.js";import"./useSuspenseInfiniteQuery-C33XLke-.js";import"./avatar-BaaCzkz5.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-tGW1Vaes.js";import"./file-type-icon-Chdi7BrE.js";import"./tab-id-BijBBRwE.js";import"./hooks-B2bKZJz3.js";import"./decopilot-sse-pool-_1OoFfRR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-tITHyCTj.js";import"./index-xN4b_CkF.js";import"./integration-icon-BFsmKVHF.js";import"./use-navigate-to-agent-DqqHYLVD.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CXzSMWrS.js";import"./form-CqMXK7Rg.js";import"./label-CW15sZLz.js";import"./autosend-pcmp17-1.js";import"./use-ai-providers-BeYG-EjG.js";import"./use-decopilot-events-4o9NNSez.js";import"./use-organization-settings-CQJ8RPRh.js";import"./required-auth-layout-COJ1HesY.js";import"./use-org-sso-Dqg59TFA.js";import"./drawer-DIzHaW1L.js";import"./collection-search-BBYUHwp3.js";import"./tabs-B0oOCjef.js";import"./toggle-group-MA_94m4S.js";import"./use-deco-credits-D8dtxTPg.js";import"./extract-connection-data-DoTSwnq5.js";import"./connection-card-akwzMfSt.js";import"./use-registry-connections-DdQfbjwO.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-D3iFRZ9o.js";import"./connection-form-helpers-D-nDOfy5.js";import"./authenticate-and-persist-oauth-DxQqW3T-.js";import"./mcp-oauth-Bx9msuxY.js";import"./collection-tabs-CM7SC5Ph.js";import"./badge-DDX6uCig.js";import"./connect-desktop-dialog-C3MAVbqi.js";import"./select-model-DQ3GcF2Q.js";import"./checkbox-D33J0J5s.js";import"./skeleton-DO-zgL8S.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Bs2y0W38.js";import"./command-BgHIgal-.js";import"./index-OTCSzql6.js";import"./popover-BhnGTRIN.js";import"./dropdown-menu-C3HeQI9N.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DFGyya-5.js";import"./toolbar-w5KxuBt-.js";import"./use-mcp-tools-uwmJZn0p.js";import"./use-capability-Dch03R8X.js";import"./use-debounced-autosave-cTAMJ-st.js";import"./index-CuPxvnMd.js";import"./search-input-IdLCT-wl.js";import"./use-mcp-auth-status-CLsbHDCg.js";import"./switch-7KE_HjZk.js";import"./use-registry-app-DVOJoUv5.js";import"./github-repo-picker-iGTmhvfh.js";import"./use-debounced-value-C8BZDtz1.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./github-repo-scope-DjMZbiKa.js";import"./use-secrets-CIsNwBX2.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-BKQjoMFT.js";import"./index-BcGQg-Kx.js";import"./get-initials-D-f_fDFw.js";import"./calendar-CtB-1ORd.js";import"./toolbar-icon-button-Be0Xxrx6.js";import"./use-file-configs-CZiarNuS.js";import"./automation-list-row-f7HB0lEO.js";const Mn={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function Dn(s){const e=Y.c(51),{open:i,mode:a,initialName:c,parentLabel:f,isPending:h,onSubmit:p,onOpenChange:v}=s,y=c===void 0?"":c,d=h===void 0?!1:h,[x,C]=u.useState(y),[D,k]=u.useState(i),g=Mn[a];i!==D&&(k(i),i&&C(y));let b;e[0]!==d||e[1]!==v?(b=V=>{!V&&!d&&v(!1)},e[0]=d,e[1]=v,e[2]=b):b=e[2];const U=b;let T;e[3]!==d||e[4]!==x||e[5]!==p?(T=async V=>{V.preventDefault();const q=x.trim();!q||d||await p(q)},e[3]=d,e[4]=x,e[5]=p,e[6]=T):T=e[6];const O=T;let j;e[7]!==g.title?(j=r.jsx(Jt,{children:g.title}),e[7]=g.title,e[8]=j):j=e[8];let w;e[9]!==g.description?(w=r.jsx(Zt,{children:g.description}),e[9]=g.description,e[10]=w):w=e[10];let A;e[11]!==j||e[12]!==w?(A=r.jsxs(en,{children:[j,w]}),e[11]=j,e[12]=w,e[13]=A):A=e[13];let L;e[14]!==f?(L=f&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(ze,{value:f,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=f,e[15]=L):L=e[15];let G;e[16]===Symbol.for("react.memo_cache_sentinel")?(G=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=G):G=e[16];let $;e[17]===Symbol.for("react.memo_cache_sentinel")?($=V=>C(V.target.value),e[17]=$):$=e[17];let I;e[18]!==g.placeholder||e[19]!==d||e[20]!==x?(I=r.jsxs("div",{className:"space-y-1.5",children:[G,r.jsx(ze,{id:"file-explorer-name",value:x,onChange:$,placeholder:g.placeholder,autoFocus:!0,disabled:d})]}),e[18]=g.placeholder,e[19]=d,e[20]=x,e[21]=I):I=e[21];let R;e[22]!==I||e[23]!==L?(R=r.jsxs("div",{className:"space-y-4 py-4",children:[L,I]}),e[22]=I,e[23]=L,e[24]=R):R=e[24];let P;e[25]!==v?(P=()=>v(!1),e[25]=v,e[26]=P):P=e[26];let _;e[27]!==d||e[28]!==P?(_=r.jsx(pe,{type:"button",variant:"outline",onClick:P,disabled:d,children:"Cancel"}),e[27]=d,e[28]=P,e[29]=_):_=e[29];let z;e[30]!==d||e[31]!==x?(z=!x.trim()||d,e[30]=d,e[31]=x,e[32]=z):z=e[32];let N;e[33]!==g.submit||e[34]!==d?(N=d?r.jsxs(r.Fragment,{children:[r.jsx(oe,{size:14,className:"animate-spin"}),"Saving…"]}):g.submit,e[33]=g.submit,e[34]=d,e[35]=N):N=e[35];let K;e[36]!==z||e[37]!==N?(K=r.jsx(pe,{type:"submit",disabled:z,children:N}),e[36]=z,e[37]=N,e[38]=K):K=e[38];let S;e[39]!==_||e[40]!==K?(S=r.jsxs(tn,{children:[_,K]}),e[39]=_,e[40]=K,e[41]=S):S=e[41];let E;e[42]!==O||e[43]!==R||e[44]!==S||e[45]!==A?(E=r.jsx(nn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:O,children:[A,R,S]})}),e[42]=O,e[43]=R,e[44]=S,e[45]=A,e[46]=E):E=e[46];let W;return e[47]!==U||e[48]!==i||e[49]!==E?(W=r.jsx(rn,{open:i,onOpenChange:U,children:E}),e[47]=U,e[48]=i,e[49]=E,e[50]=W):W=e[50],W}function Rn(s){const e=Y.c(31),{deleteTarget:i,deleteDirtyPaths:a,fsActionPending:c,onOpenChange:f,onConfirm:h}=s,p=i!==null,v=i?.kind==="directory"?"folder":"file";let y;e[0]!==v?(y=r.jsxs(on,{children:["Delete ",v,"?"]}),e[0]=v,e[1]=y):y=e[1];const d=i?.name;let x;e[2]!==d?(x=r.jsx("span",{className:"font-mono",children:d}),e[2]=d,e[3]=x):x=e[3];const C=i?.kind==="directory"?" and everything inside it.":".";let D;e[4]!==a.length?(D=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?"One open file has unsaved changes that will be lost.":`${a.length} open files have unsaved changes that will be lost.`]}),e[4]=a.length,e[5]=D):D=e[5];let k;e[6]!==x||e[7]!==C||e[8]!==D?(k=r.jsxs(an,{children:["This will permanently delete"," ",x,C,D]}),e[6]=x,e[7]=C,e[8]=D,e[9]=k):k=e[9];let g;e[10]!==y||e[11]!==k?(g=r.jsxs(sn,{children:[y,k]}),e[10]=y,e[11]=k,e[12]=g):g=e[12];let b;e[13]!==c?(b=r.jsx(ln,{disabled:c,children:"Cancel"}),e[13]=c,e[14]=b):b=e[14];const U=c||!i;let T;e[15]!==i||e[16]!==h?(T=L=>{L.preventDefault(),i&&h(i)},e[15]=i,e[16]=h,e[17]=T):T=e[17];let O;e[18]!==U||e[19]!==T?(O=r.jsx(cn,{disabled:U,onClick:T,children:"Delete"}),e[18]=U,e[19]=T,e[20]=O):O=e[20];let j;e[21]!==b||e[22]!==O?(j=r.jsxs(dn,{children:[b,O]}),e[21]=b,e[22]=O,e[23]=j):j=e[23];let w;e[24]!==j||e[25]!==g?(w=r.jsxs(un,{children:[g,j]}),e[24]=j,e[25]=g,e[26]=w):w=e[26];let A;return e[27]!==f||e[28]!==p||e[29]!==w?(A=r.jsx(fn,{open:p,onOpenChange:f,children:w}),e[27]=f,e[28]=p,e[29]=w,e[30]=A):A=e[30],A}var je="ContextMenu",[Pn]=kt(je,[Be]),B=Be(),[En,Ve]=Pn(je),Ue=s=>{const{__scopeContextMenu:e,children:i,onOpenChange:a,dir:c,modal:f=!0}=s,[h,p]=u.useState(!1),v=B(e),y=Pt(a),d=u.useCallback(x=>{p(x),y(x)},[y]);return r.jsx(En,{scope:e,open:h,onOpenChange:d,modal:f,children:r.jsx(Et,{...v,dir:c,open:h,onOpenChange:d,modal:f,children:i})})};Ue.displayName=je;var We="ContextMenuTrigger",Qe=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,disabled:a=!1,...c}=s,f=Ve(We,i),h=B(i),p=u.useRef({x:0,y:0}),v=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),y=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(y.current),[]),x=C=>{p.current={x:C.clientX,y:C.clientY},f.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(jt,{...h,virtualRef:v}),r.jsx(Nt.span,{"data-state":f.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...s.style},onContextMenu:a?s.onContextMenu:re(s.onContextMenu,C=>{d(),x(C),C.preventDefault()}),onPointerDown:a?s.onPointerDown:re(s.onPointerDown,me(C=>{d(),y.current=window.setTimeout(()=>x(C),700)})),onPointerMove:a?s.onPointerMove:re(s.onPointerMove,me(d)),onPointerCancel:a?s.onPointerCancel:re(s.onPointerCancel,me(d)),onPointerUp:a?s.onPointerUp:re(s.onPointerUp,me(d))})]})});Qe.displayName=We;var kn="ContextMenuPortal",qe=s=>{const{__scopeContextMenu:e,...i}=s,a=B(e);return r.jsx(Dt,{...a,...i})};qe.displayName=kn;var He="ContextMenuContent",Xe=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=Ve(He,i),f=B(i),h=u.useRef(!1);return r.jsx(Rt,{...f,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{s.onCloseAutoFocus?.(p),!p.defaultPrevented&&h.current&&p.preventDefault(),h.current=!1},onInteractOutside:p=>{s.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(h.current=!0)},style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Xe.displayName=He;var Tn="ContextMenuGroup",On=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Tt,{...c,...a,ref:e})});On.displayName=Tn;var An="ContextMenuLabel",Ln=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Ot,{...c,...a,ref:e})});Ln.displayName=An;var Fn="ContextMenuItem",Ye=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(St,{...c,...a,ref:e})});Ye.displayName=Fn;var $n="ContextMenuCheckboxItem",In=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(At,{...c,...a,ref:e})});In.displayName=$n;var _n="ContextMenuRadioGroup",zn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Lt,{...c,...a,ref:e})});zn.displayName=_n;var Gn="ContextMenuRadioItem",Kn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Ft,{...c,...a,ref:e})});Kn.displayName=Gn;var Bn="ContextMenuItemIndicator",Vn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx($t,{...c,...a,ref:e})});Vn.displayName=Bn;var Un="ContextMenuSeparator",Je=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Mt,{...c,...a,ref:e})});Je.displayName=Un;var Wn="ContextMenuArrow",Qn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(It,{...c,...a,ref:e})});Qn.displayName=Wn;var qn="ContextMenuSubTrigger",Hn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(_t,{...c,...a,ref:e})});Hn.displayName=qn;var Xn="ContextMenuSubContent",Yn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(zt,{...c,...a,ref:e,style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Yn.displayName=Xn;function me(s){return e=>e.pointerType!=="mouse"?s(e):void 0}var Jn=Ue,Zn=Qe,er=qe,tr=Xe,nr=Ye,rr=Je;function or(s){const e=Y.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(Jn,{"data-slot":"context-menu",...i}),e[2]=i,e[3]=a):a=e[3],a}function ir(s){const e=Y.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(Zn,{"data-slot":"context-menu-trigger",...i}),e[2]=i,e[3]=a):a=e[3],a}function ar(s){const e=Y.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",i),e[3]=i,e[4]=c):c=e[4];let f;return e[5]!==a||e[6]!==c?(f=r.jsx(er,{children:r.jsx(tr,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=f):f=e[7],f}function ee(s){const e=Y.c(12);let i,a,c,f;e[0]!==s?({className:i,inset:a,variant:f,...c}=s,e[0]=s,e[1]=i,e[2]=a,e[3]=c,e[4]=f):(i=e[1],a=e[2],c=e[3],f=e[4]);const h=f===void 0?"default":f;let p;e[5]!==i?(p=ie("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=p):p=e[6];let v;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==h?(v=r.jsx(nr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=h,e[11]=v):v=e[11],v}function Ke(s){const e=Y.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ie("bg-border -mx-1 my-1 h-px",i),e[3]=i,e[4]=c):c=e[4];let f;return e[5]!==a||e[6]!==c?(f=r.jsx(rr,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=f):f=e[7],f}const sr="#d9a441";function lr(s){const e=Y.c(45),{node:i,depth:a,isExpanded:c,isSelected:f,isLoading:h,fileVisual:p,onOpen:v,onSelect:y,onNewFile:d,onNewFolder:x,onCopyPath:C,onCopyRelativePath:D,onRename:k,onDelete:g}=s,b=h===void 0?!1:h,U=i.kind==="directory",{Icon:T,color:O}=p,j=f&&"bg-accent";let w;e[0]!==j?(w=ie("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",j),e[0]=j,e[1]=w):w=e[1];const A=`${a*14+8}px`;let L;e[2]!==A?(L={paddingLeft:A},e[2]=A,e[3]=L):L=e[3];let G;e[4]!==v||e[5]!==y?(G=()=>{y(),v()},e[4]=v,e[5]=y,e[6]=G):G=e[6];let $;e[7]!==T||e[8]!==O||e[9]!==U||e[10]!==c||e[11]!==b?($=U?r.jsxs(r.Fragment,{children:[b?r.jsx(oe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(mn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(pn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(xn,{size:16,className:"shrink-0",style:{color:sr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(T,{size:16,className:"shrink-0",style:{color:O}})]}),e[7]=T,e[8]=O,e[9]=U,e[10]=c,e[11]=b,e[12]=$):$=e[12];let I;e[13]!==i.name?(I=r.jsx("span",{className:"truncate",children:i.name}),e[13]=i.name,e[14]=I):I=e[14];let R;e[15]!==w||e[16]!==L||e[17]!==G||e[18]!==$||e[19]!==I?(R=r.jsx(ir,{asChild:!0,children:r.jsxs("button",{type:"button",className:w,style:L,onClick:G,children:[$,I]})}),e[15]=w,e[16]=L,e[17]=G,e[18]=$,e[19]=I,e[20]=R):R=e[20];let P;e[21]!==d?(P=r.jsx(ee,{onSelect:d,children:"New File"}),e[21]=d,e[22]=P):P=e[22];let _;e[23]!==x?(_=r.jsx(ee,{onSelect:x,children:"New Folder"}),e[23]=x,e[24]=_):_=e[24];let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=r.jsx(Ke,{}),e[25]=z):z=e[25];let N;e[26]!==C?(N=r.jsx(ee,{onSelect:C,children:"Copy Path"}),e[26]=C,e[27]=N):N=e[27];let K;e[28]!==D?(K=r.jsx(ee,{onSelect:D,children:"Copy Relative Path"}),e[28]=D,e[29]=K):K=e[29];let S;e[30]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(Ke,{}),e[30]=S):S=e[30];let E;e[31]!==k?(E=r.jsx(ee,{onSelect:k,children:"Rename"}),e[31]=k,e[32]=E):E=e[32];let W;e[33]!==g?(W=r.jsx(ee,{variant:"destructive",onSelect:g,children:"Delete"}),e[33]=g,e[34]=W):W=e[34];let V;e[35]!==P||e[36]!==_||e[37]!==N||e[38]!==K||e[39]!==E||e[40]!==W?(V=r.jsxs(ar,{className:"w-52",children:[P,_,z,N,K,S,E,W]}),e[35]=P,e[36]=_,e[37]=N,e[38]=K,e[39]=E,e[40]=W,e[41]=V):V=e[41];let q;return e[42]!==V||e[43]!==R?(q=r.jsxs(or,{children:[R,V]}),e[42]=V,e[43]=R,e[44]=q):q=e[44],q}Bt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function cr(s,e,i,a){return`/api/${s}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(i)}/${a}`}function aa({orgSlug:s,virtualMcpId:e,branch:i,openPath:a}){const[c,f]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:p}=c,[v,y]=u.useState(new Set),[d,x]=u.useState(null),[C,D]=u.useState(null),[k,g]=u.useState([]),[b,U]=u.useState(""),[T,O]=u.useState(!1),[j,w]=u.useState(!1),[,A]=u.useState(new Set),[L,G]=u.useState(new Set),$=u.useRef(0),I=u.useRef(null),R=u.useRef(new Set),P=u.useRef(new Map);function _(t){A(n=>{const o=typeof t=="function"?t(n):t;return R.current=o,o})}const[z,N]=u.useState(new Map),K=u.useRef(null),[S,E]=u.useState(null),{sendMessage:W}=Ht(),{openSidePanel:V}=Xt(),q=Gt(),[F,X]=u.useState(null),[xe,he]=u.useState(null),[ae,se]=u.useState(!1);async function J(t,n){const o=await fetch(cr(s,e,i,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function le(){q.invalidateQueries({queryKey:_e(s,e,i)})}function Ne(t,n){navigator.clipboard.writeText(n).then(()=>Q.success(`${t} copied`),()=>Q.error(`Failed to copy ${t.toLowerCase()}`))}function Ze(t){const n=Nn(t);if(!n)return;const o=`${s}/${e}/${i}`;q.setQueryData(Le.decofile(o),l=>{if(!l)return l;const{[n]:m,...M}=l;return M}),q.invalidateQueries({queryKey:Le.liveMeta(s,e,i)})}function et(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>ue(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)Ze(o)}function tt(t){const n=ue(t);return k.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=z.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function Se(t){g(n=>n.map(o=>t(o)).filter(o=>o!==null)),x(n=>n&&t(n)),N(n=>{const o=new Map;for(const[l,m]of n){const M=t(l);M&&o.set(M,m)}return o}),D(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function nt(t){const n=ue(t);D(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Se(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function rt(t){if(!F)return;const n=fe(F.parentDir,t);if(be(n,h,p))throw new Error(`"${t}" already exists`);await J("write",{path:H(n),content:""}),await te(),await le(),X(null),ge(n)}async function ot(t){if(!F)return;const n=fe(F.parentDir,t);if(be(n,h,p))throw new Error(`"${t}" already exists`);const o=H(n);await J("mkdir",{path:o}),f(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await te(),await le(),X(null),y(l=>{const m=new Set(l);for(const M of ve(n))m.add(M);return m.add(n),m}),D({name:t,path:n,kind:"directory",children:[]})}async function it(t){if(!F)return;const n=F.node.path,o=we(n),l=fe(o,t);if(l===n){X(null);return}if(be(l,h,p))throw new Error(`"${t}" already exists`);await J("rename",{from:H(n),to:H(l)}),Se(m=>m===n?l:m.startsWith(`${n}/`)?fe(l,m.slice(n.length+1)):m),await te(),await le(),X(null)}async function at(t){se(!0);try{await J("unlink",{path:H(t.path),recursive:t.kind==="directory"}),et(t),nt(t.path),await te(),await le(),he(null),Q.success(`Deleted "${t.name}"`)}catch(n){Q.error(n instanceof Error?n.message:"Delete failed")}finally{se(!1)}}async function st(t){const n=jn(t);if(n){Q.error(n);return}se(!0);try{F?.mode==="new-file"?(await rt(t),Q.success(`Created "${t}"`)):F?.mode==="new-folder"?(await ot(t),Q.success(`Created folder "${t}"`)):F?.mode==="rename"&&(await it(t),Q.success(`Renamed to "${t}"`))}catch(o){Q.error(o instanceof Error?o.message:"Operation failed")}finally{se(!1)}}const Me=u.useRef(!1);Me.current||(Me.current=!0,I.current=te());const[lt,ct]=u.useState(null);if(a&&a!==lt){ct(a);const t=a;queueMicrotask(()=>{hn(t)&&ge(t).catch(n=>{Q.error(n instanceof Error?n.message:"Failed to open file")})})}async function De(t){const n=await J("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Re(t,n,o){if(o!==$.current)return!1;let l=!1;return f(m=>{const M=n?Sn(m.files,m.directories,t,m.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!M.truncated,{files:M.files,directories:M.directories,truncated:l}}),l&&Q.warning("File list truncated — some files may be hidden"),l}async function dt(t){const n=P.current.get(t);if(n)return n;const o=$.current,l=(async()=>{const m=await De({pattern:"**/*",path:H(t),limit:Ge}),M=Re(m,!0,o);return!M&&o===$.current&&_(ne=>{const ce=new Set(ne);return ce.add(t),ce}),M})();P.current.set(t,l);try{return await l}finally{P.current.delete(t)}}async function Pe(t){if(!Ce(t,R.current))return!1;G(n=>new Set(n).add(t));try{return await dt(t)}finally{G(n=>{const o=new Set(n);return o.delete(t),o})}}async function ut(t){const n=new Set(R.current);for(const o of ve(t)){if(!Ce(o,n))continue;if(await Pe(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function te(){const t=++$.current;P.current.clear(),O(!0),_(new Set),y(new Set),G(new Set);try{const n=await De({pattern:"**/*",limit:Ge,maxDepth:gn});Re(n,!1,t),w(!0)}catch{j&&Q.error("Failed to refresh file tree")}finally{O(!1)}}async function Ee(t){if(!z.get(t)?.loaded){N(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await J("read",{path:H(t),full:!0}),l=bn(o.content??"");N(m=>{const M=new Map(m);return M.set(t,{savedContent:l,editorValue:l,loaded:!0}),M})}catch{}}}async function ft(t,n){try{await J("write",{path:H(t),content:n}),de("file saved via sandbox /write",{path:t}),q.invalidateQueries({queryKey:_e(s,e,i)});try{const o=await Yt(s,e,i);de("git status after save",o)}catch(o){de("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}N(o=>{const l=new Map(o),m=l.get(t);return m&&l.set(t,{...m,savedContent:n}),l})}catch(o){de("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function mt(t){x(t),D({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),E(null),k.includes(t)||g(n=>[...n,t]),Ee(t)}function pt(t){g(n=>{const o=n.filter(l=>l!==t);return d===t&&x(o[o.length-1]??null),o}),N(n=>{const o=new Map(n);return o.delete(t),o})}function ke(t){y(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function xt(t){if(Ce(t,R.current))try{if(await Pe(t))return}catch(n){Q.error(n instanceof Error?n.message:"Failed to load folder");return}ke(t)}async function ht(t,n){if(n){ke(t);return}await xt(t)}async function ge(t){await I.current,await ut(t);const n=ve(t);y(o=>{const l=new Set(o);for(const m of n)l.add(m);return l}),mt(t)}function gt(){return C?.kind==="directory"?C.path:C?.kind==="file"?we(C.path):d?we(d):"/"}function Te(t){const n=gt();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const vt=vn(h,p),Oe=yn(vt,v),Ae=b?Oe.filter(t=>t.node.name.toLowerCase().includes(b.toLowerCase())):Oe,Z=d?z.get(d):null,yt=Z?.loaded&&Z.editorValue!==Z.savedContent,Ct=xe?tt(xe.path):[],wt=(t,n)=>{K.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await ft(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const m=l.getValueInRange(o);E({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:m})})};function bt(t){if(!S)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${S.filePath}\``,`**Lines:** ${S.lineStart}–${S.lineEnd}`];if(S.selectedCode){const o=ye(S.filePath),l=S.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),V("chat"),W({parts:[{type:"text",text:n.join(`
2
+ `)}]}),E(null)}return T&&!j?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(oe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(Vt,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:b,onChange:t=>U(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(Fe,{children:[r.jsx($e,{asChild:!0,children:r.jsx(pe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Te("new-file"),children:r.jsx(Ut,{size:14})})}),r.jsx(Ie,{side:"bottom",children:"New file"})]}),r.jsxs(Fe,{children:[r.jsx($e,{asChild:!0,children:r.jsx(pe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Te("new-folder"),children:r.jsx(Wt,{size:14})})}),r.jsx(Ie,{side:"bottom",children:"New folder"})]})]}),r.jsx(qt,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[Ae.map(t=>{const{node:n,depth:o}=t,l=n.kind==="directory",m=v.has(n.path),M=C?.path===n.path,ne=Cn(n.path,n.kind),ce=l&&L.has(n.path);return r.jsx(lr,{node:n,depth:o,isExpanded:m,isSelected:M,isLoading:ce,fileVisual:wn(n.name),onSelect:()=>D(n),onOpen:()=>{l?ht(n.path,m):ge(n.path)},onNewFile:()=>X({mode:"new-file",node:n,parentDir:ne}),onNewFolder:()=>X({mode:"new-folder",node:n,parentDir:ne}),onCopyPath:()=>Ne("Path",ue(n.path)),onCopyRelativePath:()=>Ne("Relative path",H(n.path)),onRename:()=>X({mode:"rename",node:n,parentDir:ne}),onDelete:()=>he(n)},n.path)}),j&&Ae.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:b?`No files match "${b}"`:"No files found"})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[k.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:k.map(t=>{const n=z.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,l=d===t,m=t.split("/").pop()??t;return r.jsxs("div",{className:ie("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",l?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{x(t),Ee(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":l,children:[r.jsx("span",{className:"truncate max-w-32",children:m}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:M=>{M.stopPropagation(),pt(t)},children:r.jsx(Qt,{size:12})})]},t)})}),S&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&bt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&E(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:"Send"}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&Z?.loaded?r.jsx(Kt,{language:ye(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:Z.editorValue,path:d,onChange:t=>{const n=d;n&&N(o=>{const l=new Map(o),m=l.get(n);return m&&l.set(n,{...m,editorValue:t??""}),l})},onMount:wt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(oe,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!Z?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(oe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[yt?"Modified":"Saved"," ·"," ",ye(d)]})]})]}),r.jsx(Dn,{open:F!==null,mode:F?.mode??"new-file",initialName:F?.mode==="rename"?F.node.name:"",parentLabel:F&&F.mode!=="rename"?F.parentDir==="/"?"/":H(F.parentDir):void 0,isPending:ae,onSubmit:st,onOpenChange:t=>{!t&&!ae&&X(null)}}),r.jsx(Rn,{deleteTarget:xe,deleteDirtyPaths:Ct,fsActionPending:ae,onOpenChange:t=>{!t&&!ae&&he(null)},onConfirm:t=>{at(t)}})]})}export{aa as FileExplorer};
@@ -1,4 +1,4 @@
1
- import{bx as zl,j as q,aM as lt,bP as zn,r as Ve,F as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-CohYEXUC.js";import{i as zb}from"./Check-CYLXae3M.js";import{a as jb}from"./Copy01-Du_M_0KX.js";import{e as S0,g as y0,f as A0,a as _0}from"./dialog-7JXjpLzj.js";import{n as I0}from"./Globe01-UO2cBICu.js";import{k as k0,n as R0}from"./ZoomOut-CKfihzl3.js";import{u as N0}from"./use-mobile-CA2wukFn.js";import{h as C0}from"./tab-id-BijBBRwE.js";function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=jl();function Vb(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},v0=/^(?:[ \t]*(?:\n|$))+/,w0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_n=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,O0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,Yb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wb=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),L0=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,D0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vl).getRegex(),er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,F0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kl).replace("tag",er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kb=le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),B0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kb).getRegex(),Xl={blockquote:B0,code:w0,def:M0,fences:x0,heading:O0,hr:_n,html:F0,lheading:Wb,list:P0,newline:v0,paragraph:Kb,table:ln,text:D0},Mc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),U0={...Xl,lheading:L0,table:Mc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex()},H0={...Xl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Yl).replace("hr",_n).replace("heading",` *#{1,6} *[^
1
+ import{bx as zl,j as q,aM as lt,bP as zn,r as Ve,F as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-BB5lA5jj.js";import{i as zb}from"./Check-Bf3Fz6mT.js";import{a as jb}from"./Copy01-DgzGIIpj.js";import{e as S0,g as y0,f as A0,a as _0}from"./dialog-C_G4Nj_a.js";import{n as I0}from"./Globe01-B7g_9reV.js";import{k as k0,n as R0}from"./ZoomOut-CyT94sXk.js";import{u as N0}from"./use-mobile-BQOMgKS3.js";import{h as C0}from"./tab-id-BijBBRwE.js";function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=jl();function Vb(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},v0=/^(?:[ \t]*(?:\n|$))+/,w0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_n=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,O0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,Yb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wb=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),L0=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,D0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vl).getRegex(),er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,F0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kl).replace("tag",er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kb=le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),B0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kb).getRegex(),Xl={blockquote:B0,code:w0,def:M0,fences:x0,heading:O0,hr:_n,html:F0,lheading:Wb,list:P0,newline:v0,paragraph:Kb,table:ln,text:D0},Mc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),U0={...Xl,lheading:L0,table:Mc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex()},H0={...Xl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Yl).replace("hr",_n).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Wb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},q0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,G0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xb=/^( {2,}|\\)\n(?!\s*$)/,$0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tr=/[\p{P}\p{S}]/u,Zl=/[\s\p{P}\p{S}]/u,Zb=/[^\s\p{P}\p{S}]/u,z0=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zl).getRegex(),Qb=/(?!~)[\p{P}\p{S}]/u,j0=/(?!~)[\s\p{P}\p{S}]/u,V0=/(?:[^\s\p{P}\p{S}]|~)/u,Y0=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Jb=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,W0=le(Jb,"u").replace(/punct/g,tr).getRegex(),K0=le(Jb,"u").replace(/punct/g,Qb).getRegex(),eE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",X0=le(eE,"gu").replace(/notPunctSpace/g,Zb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),Z0=le(eE,"gu").replace(/notPunctSpace/g,V0).replace(/punctSpace/g,j0).replace(/punct/g,Qb).getRegex(),Q0=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Zb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),J0=le(/\\(punct)/,"gu").replace(/punct/g,tr).getRegex(),eS=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),tS=le(Kl).replace("(?:-->|$)","-->").getRegex(),nS=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",tS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jn=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rS=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",jn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tE=le(/^!?\[(label)\]\[(ref)\]/).replace("label",jn).replace("ref",Wl).getRegex(),nE=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wl).getRegex(),aS=le("reflink|nolink(?!\\()","g").replace("reflink",tE).replace("nolink",nE).getRegex(),Ql={_backpedal:ln,anyPunctuation:J0,autolink:eS,blockSkip:Y0,br:Xb,code:G0,del:ln,emStrongLDelim:W0,emStrongRDelimAst:X0,emStrongRDelimUnd:Q0,escape:q0,link:rS,nolink:nE,punctuation:z0,reflink:tE,reflinkSearch:aS,tag:nS,text:$0,url:ln},iS={...Ql,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",jn).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jn).getRegex()},_l={...Ql,emStrongRDelimAst:Z0,emStrongLDelim:K0,url:le(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},oS={..._l,br:le(Xb).replace("{2,}","*").getRegex(),text:le(_l.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xn={normal:Xl,gfm:U0,pedantic:H0},Jt={normal:Ql,gfm:_l,breaks:oS,pedantic:iS},sS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Pc=e=>sS[e];function Je(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,Pc)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,Pc);return e}function Fc(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function Bc(e,t){const n=e.replace(xe.findPipe,(i,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),r=n.split(xe.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(xe.slashPipe,"|");return r}function en(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function uS(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Uc(e,t,n,r,a){const i=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,u}function lS(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
3
3
  `).map(i=>{const o=i.match(n.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=a.length?i.slice(a.length):i}).join(`
4
4
  `)}var Vn=class{options;rules;lexer;constructor(e){this.options=e||Nt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:en(n,`
@@ -1 +1 @@
1
- import{c as a,e as o,j as i,N as l}from"./index-CohYEXUC.js";function m(){const e=a.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{org:r}=o(t);let s;return e[1]!==r?(s=i.jsx(l,{to:"/$org/files",params:{org:r},replace:!0}),e[1]=r,e[2]=s):s=e[2],s}export{m as default};
1
+ import{c as a,e as o,j as i,N as l}from"./index-BB5lA5jj.js";function m(){const e=a.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{org:r}=o(t);let s;return e[1]!==r?(s=i.jsx(l,{to:"/$org/files",params:{org:r},replace:!0}),e[1]=r,e[2]=s):s=e[2],s}export{m as default};
@@ -1 +1 @@
1
- import{dE as C,c as d,j as c,ah as j,r as f,l as p,bd as b,dF as h,dG as v}from"./index-CohYEXUC.js";import{L as N}from"./label-CHVjglvp.js";const D=C,g=f.createContext({}),M=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=h();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=v(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=f.createContext({});function w(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,D as a,w as b,L as c,P as d,y as e,R as f};
1
+ import{dE as C,c as d,j as c,ah as j,r as f,l as p,bd as b,dF as h,dG as v}from"./index-BB5lA5jj.js";import{L as N}from"./label-CW15sZLz.js";const D=C,g=f.createContext({}),M=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=h();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=v(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=f.createContext({});function w(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,D as a,w as b,L as c,P as d,y as e,R as f};
@@ -1 +1 @@
1
- import{b as K,C as V,n as M,M as Q,J as Z,d as U,p as F,t as w,K as L,j as n,ah as $,H,I as T,c as D,r as B,B as Y,D as q,s as J}from"./index-CohYEXUC.js";import{P as k}from"./index-DAFuG1kQ.js";import{u as W}from"./use-org-auth-client-BBy-fA8U.js";import{u as X}from"./use-debounced-autosave-CjuwhAVQ.js";import{A as ee}from"./avatar-DMDa5Fmk.js";import{I as G}from"./input-DooN4jkj.js";import{S as P,a as I,b as _,c as te}from"./settings-section-CSQS_fOd.js";import{D as ne}from"./domain-settings-9SDv1Gy2.js";import{S as ae}from"./switch-CCu5HEzP.js";import{c as se,f as oe}from"./use-organization-settings-STRgrAfE.js";import{u as ie}from"./studio-tools-Cmxh51BW.js";import{c as re,b as le,d as ce,A as de,e as ue,g as me,a as ge,f as fe}from"./alert-dialog-BHYtfpRM.js";import{R as pe}from"./require-capability-DWNo_rvi.js";import"./sidebar-fRXLoYlv.js";import"./LayoutLeft-B5__5XBq.js";import"./use-mobile-CA2wukFn.js";import"./X-B6u4BYeS.js";import"./tooltip-owO6Fujv.js";import"./User01-C7ZuARbC.js";import"./card-B2cV3vAA.js";import"./ArrowUpRight-O8BszRRp.js";import"./badge-DGFRrczB.js";import"./select-DLOarQAH.js";import"./Check-CYLXae3M.js";import"./ChevronDown-Ce0JNwG8.js";import"./ChevronUp-Cflkeqqz.js";import"./constants-D_FQAPnt.js";import"./use-capability-CiXd5r1-.js";import"./access-gate-BKjE-W72.js";import"./capability-load-error-DjfRZU4K.js";const he=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function xe(e){return typeof e=="string"&&he.has(e.trim().toLowerCase())}const je=H({name:T().min(1,"Name is required").max(255,"Name is too long"),slug:T().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens").refine(e=>!xe(e),"This organization URL is reserved by Studio"),logo:T().optional()});function be(e){const t=D.c(13),{value:f,onChange:d,name:s,disabled:l}=e,u=B.useRef(null);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>u.current?.click(),t[0]=c):c=t[0];const r=c;let m;t[1]!==d?(m=j=>{const b=j.target.files?.[0];if(!b)return;if(b.size>2097152){w.error("Image must be smaller than 2MB");return}const g=new FileReader;g.onerror=ye,g.onloadend=()=>{g.result&&d(g.result),u.current&&(u.current.value="")},g.readAsDataURL(b)},t[1]=d,t[2]=m):m=t[2];const a=m;let o;t[3]!==l||t[4]!==a?(o=n.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:l}),t[3]=l,t[4]=a,t[5]=o):o=t[5];const i=f||void 0,x=s??"?";let p;t[6]!==i||t[7]!==x?(p=n.jsx(ee,{url:i,fallback:x,shape:"square",size:"base"}),t[6]=i,t[7]=x,t[8]=p):p=t[8];let h;return t[9]!==l||t[10]!==o||t[11]!==p?(h=n.jsxs("button",{type:"button",onClick:r,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[o,p]}),t[9]=l,t[10]=o,t[11]=p,t[12]=h):h=t[12],h}function ye(){return w.error("Failed to read image")}function ve(){const e=K(),{org:t}=V(),f=W(),d=M(),s=Q({resolver:Z(je),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),l=U({mutationFn:async a=>{const o={name:a.name,slug:a.slug};a.logo&&(o.logo=a.logo);const i=await f.organization.update({data:o});if(i?.error)throw new Error(i.error.message||"Failed to update organization");return i},onSuccess:(a,o)=>{F("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),d.invalidateQueries({queryKey:L.organizations()}),d.invalidateQueries({queryKey:L.activeOrganization(t.slug)}),w.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,o)=>{F("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:a instanceof Error?a.message:String(a)}),w.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:u,flush:c}=X({save:async()=>{const a=s.control._formState.dirtyFields;if(Object.keys(a).length===0||!await s.trigger())return;const i=s.getValues(),x=s.control._defaultValues;s.reset(i,{keepValues:!0});try{await l.mutateAsync(i)}catch{s.reset(x,{keepValues:!0})}}}),r=s.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(P,{children:n.jsxs(I,{children:[n.jsx(_,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(be,{value:s.watch("logo"),onChange:a=>{s.setValue("logo",a??"",{shouldDirty:!0}),c()},name:s.watch("name")})}),n.jsx(_,{title:"Name",action:n.jsx($,{control:s.control,name:"name",render:({field:a})=>n.jsx(G,{id:"org-name",...a,onChange:o=>{a.onChange(o),u()},onBlur:()=>{a.onBlur(),c()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(_,{title:"URL",action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[m&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),n.jsx($,{control:s.control,name:"slug",render:({field:a})=>n.jsx("input",{id:"org-slug",value:a.value??"",name:a.name,ref:a.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const i=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");s.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),u()},onBlur:()=>{a.onBlur(),c()}})})]})}),(r.name||r.slug||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&n.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Se(){const e=D.c(6),t=se(),{mutate:f,isPending:d}=oe();let s;e[0]!==f?(s=u=>f(u),e[0]=f,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==d||e[4]!==s?(l=n.jsx(P,{title:"Task board",description:"A board for tracking org tasks by status, priority, and assignee.",children:n.jsx(I,{children:n.jsx(_,{title:"Enable task board",description:"Adds a Board entry to the sidebar for this organization.",action:n.jsx(ae,{checked:t,disabled:d,onCheckedChange:s})})})}),e[2]=t,e[3]=d,e[4]=s,e[5]=l):l=e[5],l}function ze(){const e=D.c(42),{org:t}=V(),[f,d]=B.useState(!1),[s,l]=B.useState(""),u=ie();let c;e[0]!==t.id||e[1]!==u?(c=async()=>{await u.call("ORGANIZATION_DELETE",{id:t.id})},e[0]=t.id,e[1]=u,e[2]=c):c=e[2];let r;e[3]!==t.id||e[4]!==t.slug?(r=()=>{F("organization_deleted",{organization_id:t.id}),localStorage.getItem(q.lastOrgSlug())===t.slug&&localStorage.removeItem(q.lastOrgSlug()),J(),w.success("Organization deleted"),window.location.href="/"},e[3]=t.id,e[4]=t.slug,e[5]=r):r=e[5];let m;e[6]!==c||e[7]!==r?(m={mutationFn:c,onSuccess:r,onError:Ce},e[6]=c,e[7]=r,e[8]=m):m=e[8];const a=U(m);let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=()=>d(!0),e[9]=o):o=e[9];let i;e[10]!==a.isPending?(i=n.jsx(P,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(I,{className:"border-destructive/40",children:n.jsx(_,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(Y,{variant:"destructive",size:"sm",onClick:o,disabled:a.isPending,children:"Delete"})})})}),e[10]=a.isPending,e[11]=i):i=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=N=>{d(N),N||l("")},e[12]=x):x=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(re,{children:"Delete Organization?"}),e[13]=p):p=e[13];let h;e[14]!==t.name?(h=n.jsxs("p",{children:["This will permanently delete all data associated with"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name}),". This action cannot be undone."]}),e[14]=t.name,e[15]=h):h=e[15];let j;e[16]!==t.name?(j=n.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name})," ","to confirm:"]}),e[16]=t.name,e[17]=j):j=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=N=>l(N.target.value),e[18]=b):b=e[18];let g;e[19]!==s||e[20]!==t.name?(g=n.jsx(G,{value:s,onChange:b,placeholder:t.name,autoFocus:!0}),e[19]=s,e[20]=t.name,e[21]=g):g=e[21];let y;e[22]!==g||e[23]!==h||e[24]!==j?(y=n.jsxs(le,{children:[p,n.jsx(ce,{asChild:!0,children:n.jsxs("div",{children:[h,j,g]})})]}),e[22]=g,e[23]=h,e[24]=j,e[25]=y):y=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(de,{children:"Cancel"}),e[26]=O):O=e[26];let v;e[27]!==a?(v=()=>a.mutate(),e[27]=a,e[28]=v):v=e[28];const E=s!==t.name||a.isPending,R=a.isPending?"Deleting…":"Delete organization";let S;e[29]!==v||e[30]!==E||e[31]!==R?(S=n.jsxs(ue,{children:[O,n.jsx(me,{onClick:v,disabled:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:R})]}),e[29]=v,e[30]=E,e[31]=R,e[32]=S):S=e[32];let z;e[33]!==y||e[34]!==S?(z=n.jsxs(ge,{children:[y,S]}),e[33]=y,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==f||e[37]!==z?(C=n.jsx(fe,{open:f,onOpenChange:x,children:z}),e[36]=f,e[37]=z,e[38]=C):C=e[38];let A;return e[39]!==C||e[40]!==i?(A=n.jsxs(n.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=A):A=e[41],A}function Ce(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function we(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(k,{children:n.jsx(k.Content,{children:n.jsx(k.Body,{children:n.jsxs(te,{children:[n.jsx(k.Title,{children:"Organization"}),n.jsx(ve,{}),n.jsx(ne,{}),n.jsx(Se,{}),n.jsx(ze,{})]})})})}),e[0]=t):t=e[0],t}function nt(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(pe,{capability:"org:manage",area:"general settings",children:n.jsx(we,{})}),e[0]=t):t=e[0],t}export{nt as default};
1
+ import{b as K,C as V,n as M,M as Q,J as Z,d as U,p as F,t as w,K as L,j as n,ah as $,H,I as T,c as D,r as B,B as Y,D as q,s as J}from"./index-BB5lA5jj.js";import{P as k}from"./index-CuPxvnMd.js";import{u as W}from"./use-org-auth-client-Y5-GC6qM.js";import{u as X}from"./use-debounced-autosave-cTAMJ-st.js";import{A as ee}from"./avatar-BaaCzkz5.js";import{I as G}from"./input-CcKrVAr2.js";import{S as P,a as I,b as _,c as te}from"./settings-section-Bs2y0W38.js";import{D as ne}from"./domain-settings-BU3PLHXT.js";import{S as ae}from"./switch-7KE_HjZk.js";import{c as se,f as oe}from"./use-organization-settings-CQJ8RPRh.js";import{u as ie}from"./studio-tools-QgTnVt0y.js";import{c as re,b as le,d as ce,A as de,e as ue,g as me,a as ge,f as fe}from"./alert-dialog-BZCxnnaY.js";import{R as pe}from"./require-capability-D7ZefDTd.js";import"./sidebar-BiKcuUlz.js";import"./LayoutLeft-q_h77zns.js";import"./use-mobile-BQOMgKS3.js";import"./X-DYT1GSz1.js";import"./tooltip-LRHFL41r.js";import"./User01-Deo29J7j.js";import"./card-zqYafqG3.js";import"./ArrowUpRight-DgvFsQng.js";import"./badge-DDX6uCig.js";import"./select-BDKopoZs.js";import"./Check-Bf3Fz6mT.js";import"./ChevronDown-TeMcV6Wa.js";import"./ChevronUp-g5JVf1F_.js";import"./constants-D_FQAPnt.js";import"./use-capability-Dch03R8X.js";import"./access-gate-C5tHnpFu.js";import"./capability-load-error-BQX8z6t0.js";const he=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function xe(e){return typeof e=="string"&&he.has(e.trim().toLowerCase())}const je=H({name:T().min(1,"Name is required").max(255,"Name is too long"),slug:T().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens").refine(e=>!xe(e),"This organization URL is reserved by Studio"),logo:T().optional()});function be(e){const t=D.c(13),{value:f,onChange:d,name:s,disabled:l}=e,u=B.useRef(null);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>u.current?.click(),t[0]=c):c=t[0];const r=c;let m;t[1]!==d?(m=j=>{const b=j.target.files?.[0];if(!b)return;if(b.size>2097152){w.error("Image must be smaller than 2MB");return}const g=new FileReader;g.onerror=ye,g.onloadend=()=>{g.result&&d(g.result),u.current&&(u.current.value="")},g.readAsDataURL(b)},t[1]=d,t[2]=m):m=t[2];const a=m;let o;t[3]!==l||t[4]!==a?(o=n.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:l}),t[3]=l,t[4]=a,t[5]=o):o=t[5];const i=f||void 0,x=s??"?";let p;t[6]!==i||t[7]!==x?(p=n.jsx(ee,{url:i,fallback:x,shape:"square",size:"base"}),t[6]=i,t[7]=x,t[8]=p):p=t[8];let h;return t[9]!==l||t[10]!==o||t[11]!==p?(h=n.jsxs("button",{type:"button",onClick:r,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[o,p]}),t[9]=l,t[10]=o,t[11]=p,t[12]=h):h=t[12],h}function ye(){return w.error("Failed to read image")}function ve(){const e=K(),{org:t}=V(),f=W(),d=M(),s=Q({resolver:Z(je),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),l=U({mutationFn:async a=>{const o={name:a.name,slug:a.slug};a.logo&&(o.logo=a.logo);const i=await f.organization.update({data:o});if(i?.error)throw new Error(i.error.message||"Failed to update organization");return i},onSuccess:(a,o)=>{F("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),d.invalidateQueries({queryKey:L.organizations()}),d.invalidateQueries({queryKey:L.activeOrganization(t.slug)}),w.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,o)=>{F("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:a instanceof Error?a.message:String(a)}),w.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:u,flush:c}=X({save:async()=>{const a=s.control._formState.dirtyFields;if(Object.keys(a).length===0||!await s.trigger())return;const i=s.getValues(),x=s.control._defaultValues;s.reset(i,{keepValues:!0});try{await l.mutateAsync(i)}catch{s.reset(x,{keepValues:!0})}}}),r=s.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(P,{children:n.jsxs(I,{children:[n.jsx(_,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(be,{value:s.watch("logo"),onChange:a=>{s.setValue("logo",a??"",{shouldDirty:!0}),c()},name:s.watch("name")})}),n.jsx(_,{title:"Name",action:n.jsx($,{control:s.control,name:"name",render:({field:a})=>n.jsx(G,{id:"org-name",...a,onChange:o=>{a.onChange(o),u()},onBlur:()=>{a.onBlur(),c()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(_,{title:"URL",action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[m&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),n.jsx($,{control:s.control,name:"slug",render:({field:a})=>n.jsx("input",{id:"org-slug",value:a.value??"",name:a.name,ref:a.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const i=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");s.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),u()},onBlur:()=>{a.onBlur(),c()}})})]})}),(r.name||r.slug||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&n.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Se(){const e=D.c(6),t=se(),{mutate:f,isPending:d}=oe();let s;e[0]!==f?(s=u=>f(u),e[0]=f,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==d||e[4]!==s?(l=n.jsx(P,{title:"Task board",description:"A board for tracking org tasks by status, priority, and assignee.",children:n.jsx(I,{children:n.jsx(_,{title:"Enable task board",description:"Adds a Board entry to the sidebar for this organization.",action:n.jsx(ae,{checked:t,disabled:d,onCheckedChange:s})})})}),e[2]=t,e[3]=d,e[4]=s,e[5]=l):l=e[5],l}function ze(){const e=D.c(42),{org:t}=V(),[f,d]=B.useState(!1),[s,l]=B.useState(""),u=ie();let c;e[0]!==t.id||e[1]!==u?(c=async()=>{await u.call("ORGANIZATION_DELETE",{id:t.id})},e[0]=t.id,e[1]=u,e[2]=c):c=e[2];let r;e[3]!==t.id||e[4]!==t.slug?(r=()=>{F("organization_deleted",{organization_id:t.id}),localStorage.getItem(q.lastOrgSlug())===t.slug&&localStorage.removeItem(q.lastOrgSlug()),J(),w.success("Organization deleted"),window.location.href="/"},e[3]=t.id,e[4]=t.slug,e[5]=r):r=e[5];let m;e[6]!==c||e[7]!==r?(m={mutationFn:c,onSuccess:r,onError:Ce},e[6]=c,e[7]=r,e[8]=m):m=e[8];const a=U(m);let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=()=>d(!0),e[9]=o):o=e[9];let i;e[10]!==a.isPending?(i=n.jsx(P,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(I,{className:"border-destructive/40",children:n.jsx(_,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(Y,{variant:"destructive",size:"sm",onClick:o,disabled:a.isPending,children:"Delete"})})})}),e[10]=a.isPending,e[11]=i):i=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=N=>{d(N),N||l("")},e[12]=x):x=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(re,{children:"Delete Organization?"}),e[13]=p):p=e[13];let h;e[14]!==t.name?(h=n.jsxs("p",{children:["This will permanently delete all data associated with"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name}),". This action cannot be undone."]}),e[14]=t.name,e[15]=h):h=e[15];let j;e[16]!==t.name?(j=n.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name})," ","to confirm:"]}),e[16]=t.name,e[17]=j):j=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=N=>l(N.target.value),e[18]=b):b=e[18];let g;e[19]!==s||e[20]!==t.name?(g=n.jsx(G,{value:s,onChange:b,placeholder:t.name,autoFocus:!0}),e[19]=s,e[20]=t.name,e[21]=g):g=e[21];let y;e[22]!==g||e[23]!==h||e[24]!==j?(y=n.jsxs(le,{children:[p,n.jsx(ce,{asChild:!0,children:n.jsxs("div",{children:[h,j,g]})})]}),e[22]=g,e[23]=h,e[24]=j,e[25]=y):y=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(de,{children:"Cancel"}),e[26]=O):O=e[26];let v;e[27]!==a?(v=()=>a.mutate(),e[27]=a,e[28]=v):v=e[28];const E=s!==t.name||a.isPending,R=a.isPending?"Deleting…":"Delete organization";let S;e[29]!==v||e[30]!==E||e[31]!==R?(S=n.jsxs(ue,{children:[O,n.jsx(me,{onClick:v,disabled:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:R})]}),e[29]=v,e[30]=E,e[31]=R,e[32]=S):S=e[32];let z;e[33]!==y||e[34]!==S?(z=n.jsxs(ge,{children:[y,S]}),e[33]=y,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==f||e[37]!==z?(C=n.jsx(fe,{open:f,onOpenChange:x,children:z}),e[36]=f,e[37]=z,e[38]=C):C=e[38];let A;return e[39]!==C||e[40]!==i?(A=n.jsxs(n.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=A):A=e[41],A}function Ce(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function we(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(k,{children:n.jsx(k.Content,{children:n.jsx(k.Body,{children:n.jsxs(te,{children:[n.jsx(k.Title,{children:"Organization"}),n.jsx(ve,{}),n.jsx(ne,{}),n.jsx(Se,{}),n.jsx(ze,{})]})})})}),e[0]=t):t=e[0],t}function nt(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(pe,{capability:"org:manage",area:"general settings",children:n.jsx(we,{})}),e[0]=t):t=e[0],t}export{nt as default};
@@ -0,0 +1 @@
1
+ import{C as B,a as Y,n as F,r as T,ac as H,c as R,j as t,i as z,d as Q,t as O,dH as W,K as G,m as X,B as Z,l as $,v as ee,w as te}from"./index-BB5lA5jj.js";import{D as ne,a as se,d as oe,e as ie}from"./dialog-C_G4Nj_a.js";import{C as re}from"./collection-search-BBYUHwp3.js";import{u as le}from"./use-debounced-value-C8BZDtz1.js";import{b as M,u as ae}from"./use-connection-hO51hV8J.js";import{u as U}from"./use-mcp-client-W9fEi0Ml.js";import{S as V}from"./constants-D_FQAPnt.js";import{a as K}from"./authenticate-and-persist-oauth-DxQqW3T-.js";import{b as J}from"./Settings02-D4nrXgvn.js";import{I as ce}from"./agent-icon-jLUxIfUX.js";import{u as ue,G as P}from"./use-registry-app-DVOJoUv5.js";import{e as de}from"./extract-connection-data-DoTSwnq5.js";import{c as me}from"./use-navigate-to-agent-DqqHYLVD.js";import{p as q,f as fe}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as xe}from"./github-repo-scope-DjMZbiKa.js";const ge="deco/mcp-github";function pe(N){const{org:e}=B(),{data:i}=Y.useSession(),f=M(),v=F(),[g,s]=T.useState("idle"),[p,x]=T.useState(null),[h,C]=T.useState(null),{data:b,isLoading:l}=ue(ge,{enabled:N.enabled}),o=T.useRef(!1);N.enabled&&b&&!l&&!o.current&&i?.user?.id&&g==="idle"&&(o.current=!0,a());async function a(){if(!(!b||!i?.user?.id||!e))try{s("installing"),x(null);const r=de(b,e.id,i.user.id,{remoteIndex:0});if(!r.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:y}=await f.create.mutateAsync(r);s("authenticating");const d=await K({connectionId:y,orgId:e.id,orgSlug:e.slug,persistFallback:n=>f.update.mutateAsync({id:y,data:{connection_token:n}}).then(()=>{})});if(d.ran&&!d.ok){try{await f.delete.mutateAsync(y)}catch{}throw new Error(d.error&&d.error!=="no token received"?d.error:"No token received from GitHub")}H(v,e.id),C(r),s("ready")}catch(r){x(r instanceof Error?r.message:String(r)),s("error")}}function c(){s("idle"),x(null),C(null),o.current=!1}return N.enabled&&l&&g==="idle"?{status:"installing",error:null,connection:null,retry:c}:{status:g,error:p,connection:h,retry:c}}function Ue(N){const e=R.c(22),{open:i,onOpenChange:f,title:v,onImportComplete:g,mode:s}=N,p=s===void 0?"agent":s,x=v??(p==="connection"?"Add repo":"Import from GitHub"),[h,C]=T.useState(null);let b;e[0]!==x?(b=t.jsx(ne,{className:"sr-only",children:t.jsx(se,{children:x})}),e[0]=x,e[1]=b):b=e[1];let l;e[2]!==x||e[3]!==h?(l=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:h?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(J,{size:16})}),t.jsx("img",{src:h.avatarUrl,alt:h.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:h.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(P,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:x})]})}),e[2]=x,e[3]=h,e[4]=l):l=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=o):o=e[5];let a;e[6]!==f?(a=()=>f(!1),e[6]=f,e[7]=a):a=e[7];let c;e[8]!==p||e[9]!==g||e[10]!==i||e[11]!==h||e[12]!==a?(c=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:o,children:t.jsx(he,{open:i,onComplete:a,selectedInstallation:h,onSelectInstallation:C,onImportComplete:g,mode:p})})}),e[8]=p,e[9]=g,e[10]=i,e[11]=h,e[12]=a,e[13]=c):c=e[13];let r;e[14]!==b||e[15]!==l||e[16]!==c?(r=t.jsxs(oe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[b,l,c]}),e[14]=b,e[15]=l,e[16]=c,e[17]=r):r=e[17];let u;return e[18]!==f||e[19]!==i||e[20]!==r?(u=t.jsx(ie,{open:i,onOpenChange:f,children:r}),e[18]=f,e[19]=i,e[20]=r,e[21]=u):u=e[21],u}function he({open:N,onComplete:e,selectedInstallation:i,onSelectInstallation:f,onImportComplete:v,mode:g="agent"}){const{org:s}=B(),p=F(),x=me(),[h,C]=T.useState(null),b=ae({slug:"mcp-github"}),l=xe(b),o=pe({enabled:N&&l.length===0}),a=l.length===1?l[0]??null:h,c=U({connectionId:a?.id??"",orgId:s.id,orgSlug:s.slug}),r=U({connectionId:V,orgId:s.id,orgSlug:s.slug}),u=async(n,j)=>{try{const k=await c.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:j}});if(k.isError)return null;const I=k.content?.find(m=>m.type==="resource")?.resource?.text;if(!I)return null;try{const m=JSON.parse(I);return typeof m=="string"?m:JSON.stringify(m)}catch{return I}}catch{return null}},y=(n,j)=>{Promise.all([u(j,"AGENTS.md"),u(j,"CLAUDE.md")]).then(async([S,k])=>{const w=S??k??null;w&&(await r.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:w}}}}),H(p,s.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},d=Q({mutationFn:async n=>{if(!a||!i)throw new Error("No GitHub connection or installation");const j=i.installationId;if(g==="connection"){const{childConnectionId:w}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:I=>c.callTool(I),selfCallTool:I=>r.callTool(I),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:w,item:null}}const{childConnectionId:S}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>r.callTool(w)});let k=null;try{const w=await r.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:j,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),I=w.structuredContent??w,m=I.item?.id;if(!I.item||!m)throw new Error("Failed to create the imported agent");return k=m,{virtualMcpId:m,repo:n,connectionId:S,item:I.item}}catch(w){throw k&&await r.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:k}}).catch(()=>{}),await r.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),w}},onSuccess:({virtualMcpId:n,repo:j,connectionId:S,item:k})=>{if(g==="connection"||!n||!k){H(p,s.id),W(p,s.id),O.success(`Added ${j.name}`),e();return}if(p.setQueryData(G.collectionItem(r,s.id,"","VIRTUAL_MCP",n),{item:k}),H(p,s.id),y(n,j),v){v({virtualMcpId:n,repo:j,connectionId:S});return}O.success(`Imported ${j.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),x(n)},onError:n=>{O.error("Failed to import repo: "+(n instanceof Error?n.message:"Unknown error"))}});return o.status==="installing"||o.status==="authenticating"?t.jsx(D,{status:o.status,error:null,retry:o.retry}):o.status==="error"?t.jsx(D,{status:"error",error:o.error,retry:o.retry}):l.length===0&&o.status==="idle"?t.jsx(D,{status:"installing",error:null,retry:o.retry}):l.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:"Select a connection"})}),l.map(n=>t.jsxs("button",{type:"button",onClick:()=>C(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(P,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):a?i?t.jsx(Ne,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,installation:i,onSelectRepo:n=>d.mutate(n),isSaving:d.isPending}):t.jsx(be,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,onSelect:f,showBackButton:l.length>1,onBack:()=>C(null)}):null}function be(N){const e=R.c(47),{connectionId:i,orgId:f,orgSlug:v,onSelect:g,showBackButton:s,onBack:p}=N;let x;e[0]!==f||e[1]!==v?(x={connectionId:V,orgId:f,orgSlug:v},e[0]=f,e[1]=v,e[2]=x):x=e[2];const h=U(x),C=F(),b=M();let l;e[3]!==i||e[4]!==f?(l=G.githubUserOrgs(f,i),e[3]=i,e[4]=f,e[5]=l):l=e[5];let o;e[6]!==i||e[7]!==h?(o=()=>fe(m=>h.callTool(m),i),e[6]=i,e[7]=h,e[8]=o):o=e[8];let a;e[9]!==l||e[10]!==o?(a={queryKey:l,queryFn:o},e[9]=l,e[10]=o,e[11]=a):a=e[11];const c=X(a);let r;e[12]!==b||e[13]!==i||e[14]!==c||e[15]!==f||e[16]!==v||e[17]!==C?(r={mutationFn:async()=>{const m=await K({connectionId:i,orgId:f,orgSlug:v,persistFallback:E=>b.update.mutateAsync({id:i,data:{connection_token:E}}).then(je)});if(m.ran&&!m.ok)throw new Error(m.error??"no token received");const _=new URL(`/api/${v}/mcp/${i}`,window.location.origin);await C.invalidateQueries({queryKey:G.isMCPAuthenticated(_.href,null)}),await C.invalidateQueries({queryKey:G.mcpClientPrefix()}),await c.refetch()},onError:ye},e[12]=b,e[13]=i,e[14]=c,e[15]=f,e[16]=v,e[17]=C,e[18]=r):r=e[18];const u=Q(r);if(c.isLoading){let m;return e[19]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=m):m=e[19],m}if(c.isError){let m,_;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),_=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=m,e[21]=_):(m=e[20],_=e[21]);let E;e[22]!==u?(E=()=>u.mutate(),e[22]=u,e[23]=E):E=e[23];let A;e[24]!==u.isPending?(A=u.isPending?t.jsx(z,{size:14,className:"animate-spin"}):t.jsx(P,{className:"size-3.5"}),e[24]=u.isPending,e[25]=A):A=e[25];let L;return e[26]!==u.isPending||e[27]!==E||e[28]!==A?(L=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[m,_,t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:E,disabled:u.isPending,children:[A,"Reconnect GitHub"]})]}),e[26]=u.isPending,e[27]=E,e[28]=A,e[29]=L):L=e[29],L}const y=c.data;if(!y)return null;let d;e[30]!==p||e[31]!==s?(d=s&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(J,{size:12}),"Change connection"]})}),e[30]=p,e[31]=s,e[32]=d):d=e[32];let n;if(e[33]!==y.installations||e[34]!==g){let m;e[36]!==g?(m=_=>t.jsxs("button",{type:"button",onClick:()=>g(_),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:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},_.installationId),e[36]=g,e[37]=m):m=e[37],n=y.installations.map(m),e[33]=y.installations,e[34]=g,e[35]=n}else n=e[35];let j;e[38]!==n?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:n}),e[38]=n,e[39]=j):j=e[39];const S=y.appSlug?`https://github.com/apps/${y.appSlug}/installations/new`:"https://github.com/settings/installations";let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=k):k=e[40];let w;e[41]!==S?(w=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",k]})}),e[41]=S,e[42]=w):w=e[42];let I;return e[43]!==w||e[44]!==d||e[45]!==j?(I=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[d,j,w]}),e[43]=w,e[44]=d,e[45]=j,e[46]=I):I=e[46],I}function ye(N){O.error("Failed to reconnect GitHub: "+(N instanceof Error?N.message:"Unknown error"))}function je(){}function Ne(N){const e=R.c(20),{connectionId:i,orgId:f,orgSlug:v,installation:g,onSelectRepo:s,isSaving:p}=N,[x,h]=T.useState(""),C=le(x,300),b=T.useDeferredValue(C),l=x!==b;let o;e[0]!==l||e[1]!==x?(o=t.jsx(re,{placeholder:"Search repositories...",value:x,onChange:h,isSearching:l}),e[0]=l,e[1]=x,e[2]=o):o=e[2];const a=l?"opacity-40":"opacity-100";let c;e[3]!==a?(c=$("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",a),e[3]=a,e[4]=c):c=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=r):r=e[5];let u;e[6]!==i||e[7]!==b||e[8]!==g||e[9]!==p||e[10]!==s||e[11]!==f||e[12]!==v?(u=t.jsx(T.Suspense,{fallback:r,children:t.jsx(ve,{connectionId:i,orgId:f,orgSlug:v,installation:g,query:b,onSelectRepo:s,isSaving:p})}),e[6]=i,e[7]=b,e[8]=g,e[9]=p,e[10]=s,e[11]=f,e[12]=v,e[13]=u):u=e[13];let y;e[14]!==c||e[15]!==u?(y=t.jsx("div",{className:c,children:u}),e[14]=c,e[15]=u,e[16]=y):y=e[16];let d;return e[17]!==o||e[18]!==y?(d=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[o,y]}),e[17]=o,e[18]=y,e[19]=d):d=e[19],d}function ve(N){const e=R.c(29),{connectionId:i,orgId:f,orgSlug:v,installation:g,query:s,onSelectRepo:p,isSaving:x}=N;let h;e[0]!==i||e[1]!==f||e[2]!==v?(h={connectionId:i,orgId:f,orgSlug:v},e[0]=i,e[1]=f,e[2]=v,e[3]=h):h=e[3];const C=U(h),b=g.type==="User"?"user":"org",l=s?`${b}:${g.login} ${s} in:name`:`${b}:${g.login}`;let o;e[4]!==i||e[5]!==g.login||e[6]!==f||e[7]!==s?(o=G.githubOrgRepos(f,i,g.login,s),e[4]=i,e[5]=g.login,e[6]=f,e[7]=s,e[8]=o):o=e[8];let a;e[9]!==C||e[10]!==l?(a=async d=>{const{signal:n}=d,S=(await C.callTool({name:"search_repositories",arguments:{query:l,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(we)},e[9]=C,e[10]=l,e[11]=a):a=e[11];let c;e[12]!==o||e[13]!==a?(c={queryKey:o,queryFn:a},e[12]=o,e[13]=a,e[14]=c):c=e[14];const{data:r}=ee(c);if(r.length===0){let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=d):d=e[15];let n;e[16]!==s?(n=s&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=s,e[17]=n):n=e[17];let j;return e[18]!==n?(j=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[d,n]}),e[18]=n,e[19]=j):j=e[19],j}let u;if(e[20]!==x||e[21]!==p||e[22]!==r){let d;e[24]!==x||e[25]!==p?(d=n=>t.jsxs("button",{type:"button",onClick:()=>p(n),disabled:x,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(P,{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(te,{size:10}):t.jsx(ce,{size:10}),n.private?"Private":"Public"]})]},n.fullName),e[24]=x,e[25]=p,e[26]=d):d=e[26],u=r.map(d),e[20]=x,e[21]=p,e[22]=r,e[23]=u}else u=e[23];let y;return e[27]!==u?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:u}),e[27]=u,e[28]=y):y=e[28],y}function we(N){return{name:N.name,fullName:N.full_name,owner:N.full_name.split("/")[0]??"",url:N.html_url,private:N.private,description:N.description,updatedAt:N.updated_at}}function D(N){const e=R.c(33),{status:i,error:f,retry:v}=N;if(i==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let k;e[1]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=k):k=e[1];const w=f??"Something went wrong while connecting to GitHub.";let I;e[2]!==w?(I=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=I):I=e[3];let m;e[4]!==v?(m=t.jsx("button",{type:"button",onClick:v,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=v,e[5]=m):m=e[5];let _;return e[6]!==I||e[7]!==m?(_=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,I,m]}),e[6]=I,e[7]=m,e[8]=_):_=e[8],_}const g=i==="authenticating";let s;e[9]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-foreground"})}),e[9]=s):s=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs("div",{className:"relative size-10",children:[s,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=p):p=e[10];const x=g?"Authenticating with GitHub":"Setting up GitHub";let h;e[11]!==x?(h=t.jsx("p",{className:"text-sm font-medium",children:x}),e[11]=x,e[12]=h):h=e[12];const C=g?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let b;e[13]!==C?(b=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=b):b=e[14];let l;e[15]!==h||e[16]!==b?(l=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[h,b]}),e[15]=h,e[16]=b,e[17]=l):l=e[17];const o=g?"bg-muted-foreground/30":"bg-foreground animate-pulse";let a;e[18]!==o?(a=$("size-1.5 rounded-full",o),e[18]=o,e[19]=a):a=e[19];let c;e[20]!==a?(c=t.jsx("span",{className:a}),e[20]=a,e[21]=c):c=e[21];const r=g?"bg-foreground animate-pulse":"bg-muted-foreground/30";let u;e[22]!==r?(u=$("size-1.5 rounded-full",r),e[22]=r,e[23]=u):u=e[23];let y;e[24]!==u?(y=t.jsx("span",{className:u}),e[24]=u,e[25]=y):y=e[25];let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=d):d=e[26];let n;e[27]!==c||e[28]!==y?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,d]}),e[27]=c,e[28]=y,e[29]=n):n=e[29];let j;return e[30]!==n||e[31]!==l?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[p,l,n]}),e[30]=n,e[31]=l,e[32]=j):j=e[32],j}export{Ue as G,pe as u};
@@ -0,0 +1 @@
1
+ const r={contents:"write",metadata:"read",pull_requests:"write",issues:"write"};function i(t){if(!t||typeof t!="object"||Array.isArray(t))return r;const e=t;return Object.values(e).some(n=>typeof n!="string")?r:e}function o(t){if(!(typeof t!="number"||!Number.isFinite(t)||!Number.isInteger(t)||t<=0))return t}function s(t){const e=t.metadata?.repoScope;if(!e||typeof e.installationId!="number"||!Number.isFinite(e.installationId)||!Number.isInteger(e.installationId)||e.installationId<=0||typeof e.owner!="string"||typeof e.repo!="string"||e.owner.length===0||e.repo.length===0)return null;const n=o(e.repositoryId);return{sourceConnectionId:typeof e.sourceConnectionId=="string"?e.sourceConnectionId:void 0,installationId:e.installationId,repositoryId:n,owner:e.owner,repo:e.repo,permissions:i(e.permissions),grantProvider:e.grantProvider==="github-mcp"?"github-mcp":void 0}}function u(t){return(t??[]).filter(e=>s(e)===null)}export{r as G,s as a,u as g};
@@ -1,4 +1,4 @@
1
- import{dx as St,dy as It,bi as R,I as c,dz as de,bo as ze,bv as Et,bh as Tt,aW as wt,ag as O,af as G,ad as oe,H as _,bj as m,b3 as F,dA as Mt,dB as I,ae as At,t as ge,c as Ee,r as W,C as Ot,j as Ct}from"./index-CohYEXUC.js";import{u as Rt}from"./use-mcp-client-CM7X9MZh.js";import{S as Nt}from"./constants-D_FQAPnt.js";import{d as xt,D as Pt}from"./decopilot-sse-pool-DDyGdbf8.js";import{d as Dt}from"./delay-CnY5UFtP.js";import{e as Lt}from"./backoff-CrEUbyZT.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(n=>typeof s[s[n]]!="number"),i={};for(const n of o)i[n]=s[n];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var Je="vercel.ai.error",kt=Symbol.for(Je),Ce,Re,Z=class We extends(Re=Error,Ce=kt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return We.hasMarker(e,Je)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ge(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ye="AI_InvalidArgumentError",qe=`vercel.ai.error.${Ye}`,jt=Symbol.for(qe),Ne,xe,Zt=class extends(xe=Z,Ne=jt,xe){constructor({message:t,cause:e,argument:a}){super({name:Ye,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},He="AI_JSONParseError",Xe=`vercel.ai.error.${He}`,$t=Symbol.for(Xe),Pe,De,Le=class extends(De=Z,Pe=$t,De){constructor({text:t,cause:e}){super({name:He,message:`JSON parsing failed: Text: ${t}.
1
+ import{dx as St,dy as It,bi as R,I as c,dz as de,bo as ze,bv as Et,bh as Tt,aW as wt,ag as O,af as G,ad as oe,H as _,bj as m,b3 as F,dA as Mt,dB as I,ae as At,t as ge,c as Ee,r as W,C as Ot,j as Ct}from"./index-BB5lA5jj.js";import{u as Rt}from"./use-mcp-client-W9fEi0Ml.js";import{S as Nt}from"./constants-D_FQAPnt.js";import{d as xt,D as Pt}from"./decopilot-sse-pool-_1OoFfRR.js";import{d as Dt}from"./delay-CnY5UFtP.js";import{e as Lt}from"./backoff-CrEUbyZT.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(n=>typeof s[s[n]]!="number"),i={};for(const n of o)i[n]=s[n];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var Je="vercel.ai.error",kt=Symbol.for(Je),Ce,Re,Z=class We extends(Re=Error,Ce=kt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return We.hasMarker(e,Je)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ge(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ye="AI_InvalidArgumentError",qe=`vercel.ai.error.${Ye}`,jt=Symbol.for(qe),Ne,xe,Zt=class extends(xe=Z,Ne=jt,xe){constructor({message:t,cause:e,argument:a}){super({name:Ye,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},He="AI_JSONParseError",Xe=`vercel.ai.error.${He}`,$t=Symbol.for(Xe),Pe,De,Le=class extends(De=Z,Pe=$t,De){constructor({text:t,cause:e}){super({name:He,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${Ge(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Xe)}},Qe="AI_TypeValidationError",Ke=`vercel.ai.error.${Qe}`,Ut=Symbol.for(Ke),ke,je,X=class ve extends(je=Z,ke=Ut,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),s+=o.join(", "),s+=")"}super({name:Qe,message:`${s}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${Ge(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,Ke)}static wrap({value:e,cause:a,context:r}){var s,o,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new Zt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Ft=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Bt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Ft.test(t)===!1&&Bt.test(t)===!1?e:Vt(e)}function Vt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const o=r[s];o&&typeof o=="object"&&e.push(o)}}}return t}function zt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Te(t)}var Jt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Wt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Gt(t,e){var a,r,s;const o={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(o.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Yt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function et(t,e){return b(t.type._def,e)}var Ht=(t,e)=>b(t.innerType._def,e);function tt(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,o)=>tt(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Xt(t)}}var Xt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Qt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function Kt(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ea(t){return{type:"string",enum:Array.from(t.values)}}var ta=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function aa(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ta(s))r.push(...s.allOf);else{let o=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...n}=s;o=n}r.push(o)}}),r.length?{allOf:r}:void 0}function ra(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function at(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?na(t):t}var sa=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function na(t){let e="";for(let a=0;a<t.length;a++)sa.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,p=!1;for(let u=0;u<s.length;u++){if(i){o+=s[u],i=!1;continue}if(r.i){if(n){if(s[u].match(/[a-z]/)){p?(o+=s[u],o+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(o+=s[u],p=!0):o+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){o+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){o+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(s[u]==="$"){o+=`($|(?=[\r