decocms 4.23.0 → 4.23.2

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 (225) hide show
  1. package/README.md +1 -5
  2. package/dist/README.md +1 -5
  3. package/dist/client/assets/{AlertCircle-CLapFvcx.js → AlertCircle-DP0nsq1e.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-DYI4ZFTv.js → ArrowUpRight-3SkCtZ7K.js} +1 -1
  5. package/dist/client/assets/{Check-CWR2GX_4.js → Check-CUC1zRnb.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-BJr7jKsb.js → CheckCircle-BsrExj4H.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-BOnFs3ZP.js → ChevronDown-B1mct1yp.js} +1 -1
  8. package/dist/client/assets/{ChevronRight--Sw9cfbS.js → ChevronRight-C_4FW4NO.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-CkMhjJB_.js → ChevronUp-Bu7-a85r.js} +1 -1
  10. package/dist/client/assets/{Circle-CSNCa0Ai.js → Circle-D65-cV8s.js} +1 -1
  11. package/dist/client/assets/{Copy01-C_vDrK62.js → Copy01-C-7fHSay.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CVxu5D2B.js → DotsVertical-BaKPV3I-.js} +1 -1
  13. package/dist/client/assets/{Eye-DCiEQJIv.js → Eye-BD5GpDZ-.js} +1 -1
  14. package/dist/client/assets/{FilterLines-YtMlMBJN.js → FilterLines-DFbyXaVS.js} +1 -1
  15. package/dist/client/assets/{Globe01-pYyw4zjF.js → Globe01-Dz7J456-.js} +1 -1
  16. package/dist/client/assets/{Globe04-B5LRDZX0.js → Globe04-ninCQ4l6.js} +1 -1
  17. package/dist/client/assets/{HardDrive-Bt_8Ilkp.js → HardDrive-DghaQYox.js} +1 -1
  18. package/dist/client/assets/{Key01-BGm5x2_7.js → Key01-DBAS-H0R.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-WEbo8J87.js → LayoutLeft-PT-KYBVh.js} +1 -1
  20. package/dist/client/assets/{LinkExternal01-C9wAno25.js → LinkExternal01-DYdIsix1.js} +1 -1
  21. package/dist/client/assets/{List-wZrVQa3Y.js → List-CR20iQn1.js} +1 -1
  22. package/dist/client/assets/{Loading02-BY5Z_ytL.js → Loading02-1-7GqxDm.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CjaozmNA.js → Monitor01-CsiKf4Vb.js} +1 -1
  24. package/dist/client/assets/{Palette-DX20ptpQ.js → Palette-Bh8DSKBB.js} +1 -1
  25. package/dist/client/assets/{Play-DrXY2oRx.js → Play-BZWHu6vA.js} +1 -1
  26. package/dist/client/assets/{Plus-j1oUcvSs.js → Plus-CToP0bbt.js} +1 -1
  27. package/dist/client/assets/{SearchLg-Dt-H4O3z.js → SearchLg-YHk3bRUf.js} +1 -1
  28. package/dist/client/assets/{SearchMd-Cmh57xGa.js → SearchMd-Dx8opdKE.js} +1 -1
  29. package/dist/client/assets/{Settings02-CtgBTtnW.js → Settings02-DszLgCXG.js} +1 -1
  30. package/dist/client/assets/{Shield01-BsAF4snY.js → Shield01-DTqhedHO.js} +1 -1
  31. package/dist/client/assets/{Star01-DgFqZM1H.js → Star01-CVsItQ1u.js} +1 -1
  32. package/dist/client/assets/{Stars01-Ch3VikRv.js → Stars01-CsOhgCzT.js} +1 -1
  33. package/dist/client/assets/{Stars02-C0LkLtPv.js → Stars02-CJRC9WOX.js} +1 -1
  34. package/dist/client/assets/{Sun-D-D5LZ02.js → Sun-CfFmz0ui.js} +1 -1
  35. package/dist/client/assets/{SwitchHorizontal01-DAV6AujY.js → SwitchHorizontal01-BSA9bywH.js} +1 -1
  36. package/dist/client/assets/{Tool01-Csfd8Wry.js → Tool01-MTiJaetc.js} +1 -1
  37. package/dist/client/assets/{Trash01-Bf3SN1nH.js → Trash01-BDWbYvcu.js} +1 -1
  38. package/dist/client/assets/{Upload01-BYEqY1Ay.js → Upload01-DNJ4y_co.js} +1 -1
  39. package/dist/client/assets/{User01-C7pBq15o.js → User01-BnV8b2oc.js} +1 -1
  40. package/dist/client/assets/{Users01-9SoD8uT4.js → Users01-CeDec9Hr.js} +1 -1
  41. package/dist/client/assets/{Users03-kFy3UJPi.js → Users03-tyWJCIG0.js} +1 -1
  42. package/dist/client/assets/{X-C0ZgGoQb.js → X-CFM-EaJf.js} +1 -1
  43. package/dist/client/assets/{XCircle-DRgrnFcC.js → XCircle-DMTLazaF.js} +1 -1
  44. package/dist/client/assets/{XClose-CmJ8_Kxi.js → XClose-CQ7XxXz6.js} +1 -1
  45. package/dist/client/assets/{Zap-CjHl9Hth.js → Zap-B6Y5QNOW.js} +1 -1
  46. package/dist/client/assets/{ZapSquare-BtUSi6w5.js → ZapSquare-DfDf_Qdm.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-B4weRH-H.js → ZoomOut-Dt1g7vVy.js} +1 -1
  48. package/dist/client/assets/{access-gate-DPOW1JQt.js → access-gate-twsl8uHV.js} +1 -1
  49. package/dist/client/assets/{add-section-modal-2t6y9pJq.js → add-section-modal-t4oPoTDi.js} +1 -1
  50. package/dist/client/assets/{agent-capabilities-UH4_NDRB.js → agent-capabilities-B7x2s3UT.js} +1 -1
  51. package/dist/client/assets/{agent-icon-CRPqtjX6.js → agent-icon-BBTxD8Vr.js} +1 -1
  52. package/dist/client/assets/{agents-list-C3JbHbWL.js → agents-list-CK40xLox.js} +1 -1
  53. package/dist/client/assets/{ai-providers-KhClLvY9.js → ai-providers-rL0xevFD.js} +1 -1
  54. package/dist/client/assets/{alert-BSFVY_ft.js → alert-BZSGiHUj.js} +1 -1
  55. package/dist/client/assets/{alert-dialog-DseQ_eoR.js → alert-dialog-zbSvd7Ki.js} +1 -1
  56. package/dist/client/assets/{app-editor-C9SM21Xh.js → app-editor-BorTeTSs.js} +1 -1
  57. package/dist/client/assets/{auth-YT0L3u0f.js → auth-BALlir75.js} +1 -1
  58. package/dist/client/assets/{auth-catchall-Ch0KjyC5.js → auth-catchall-3cvSdKqi.js} +1 -1
  59. package/dist/client/assets/{auth-entry-BpZO7T6i.js → auth-entry-Bdr5OSFj.js} +1 -1
  60. package/dist/client/assets/{auth-split-layout-C37u8WlO.js → auth-split-layout-Coen5GKi.js} +1 -1
  61. package/dist/client/assets/{authenticate-and-persist-oauth-D8TojuXv.js → authenticate-and-persist-oauth-Ag6OuiCi.js} +1 -1
  62. package/dist/client/assets/{automation-list-row-d7ebkZcP.js → automation-list-row-DGvZjGai.js} +1 -1
  63. package/dist/client/assets/{automation-runs-Bo90h8_b.js → automation-runs-98bvfxso.js} +1 -1
  64. package/dist/client/assets/{automations-COxs7MJo.js → automations-Bhn16K_m.js} +1 -1
  65. package/dist/client/assets/{avatar-DN0SQ2YP.js → avatar-qkTmk1tF.js} +1 -1
  66. package/dist/client/assets/{badge-CYqiGv_0.js → badge-Dxl2nD6L.js} +1 -1
  67. package/dist/client/assets/{block-document-Tux1C7cf.js → block-document-CUqxuHG8.js} +1 -1
  68. package/dist/client/assets/{brand-context-DYaR7ozG.js → brand-context-CJQ5LxFU.js} +1 -1
  69. package/dist/client/assets/{breadcrumb-Ca0mTftR.js → breadcrumb-MwtTl_lp.js} +1 -1
  70. package/dist/client/assets/{buckets-DwYOYKjz.js → buckets-C2nu8S-i.js} +1 -1
  71. package/dist/client/assets/{bulk-category-panel-IzdJ5QQ_.js → bulk-category-panel-CVHecRlh.js} +1 -1
  72. package/dist/client/assets/{capability-load-error-DIVlJMVm.js → capability-load-error-BRk5Albu.js} +1 -1
  73. package/dist/client/assets/{card-D9G2yXrJ.js → card-BmfGcj0O.js} +1 -1
  74. package/dist/client/assets/{category-editor-9mLUM1gN.js → category-editor-oS-NNjmT.js} +1 -1
  75. package/dist/client/assets/{chat-context-DIUSa9Jr.js → chat-context-DvCifsaP.js} +1 -1
  76. package/dist/client/assets/{checkbox-DCa6681A.js → checkbox-CfEEJY30.js} +1 -1
  77. package/dist/client/assets/{cli-auth-success-Dlh4FD0T.js → cli-auth-success-BdUdOc4f.js} +1 -1
  78. package/dist/client/assets/{collection-detail-BqYrcVNr.js → collection-detail-CZ3ry4YY.js} +1 -1
  79. package/dist/client/assets/{collection-display-button-C5acvrDe.js → collection-display-button-DqTRIqF7.js} +1 -1
  80. package/dist/client/assets/{collection-search-DT12aqMT.js → collection-search-B2eeAfCm.js} +1 -1
  81. package/dist/client/assets/{collection-table-wrapper-DroBY1GW.js → collection-table-wrapper-BnMijIQA.js} +1 -1
  82. package/dist/client/assets/{collection-tabs-2clxo3lG.js → collection-tabs-ChhCmRrP.js} +1 -1
  83. package/dist/client/assets/{command-qHaitSxv.js → command-D2GI_S2n.js} +1 -1
  84. package/dist/client/assets/{commerce-onboarding-zByXwUoa.js → commerce-onboarding-BfGk9igR.js} +1 -1
  85. package/dist/client/assets/{connect-desktop-dialog-RWUM4LPN.js → connect-desktop-dialog-DQ_-hvKq.js} +1 -1
  86. package/dist/client/assets/{connection-card-COE4b4Kl.js → connection-card-Dea6GcsD.js} +1 -1
  87. package/dist/client/assets/{connection-detail-B4q53uMa.js → connection-detail-Cb6Qyuc4.js} +1 -1
  88. package/dist/client/assets/{connection-form-helpers-D9d9jQ9S.js → connection-form-helpers-CfJCI7YZ.js} +1 -1
  89. package/dist/client/assets/{connections--zriX-8H.js → connections-BRxZlKLF.js} +1 -1
  90. package/dist/client/assets/{decopilot-BmUbIKrs.js → decopilot-CGLmwUQj.js} +1 -1
  91. package/dist/client/assets/{decopilot-sse-pool-Ct1_UW6D.js → decopilot-sse-pool-DKy1YCA-.js} +1 -1
  92. package/dist/client/assets/{dialog-fRprLEhn.js → dialog-xw_WZv6d.js} +1 -1
  93. package/dist/client/assets/{domain-settings-z8x2a3yI.js → domain-settings-BfzAzzbX.js} +1 -1
  94. package/dist/client/assets/{drawer-BK13Nuy8.js → drawer-B_-kTqsl.js} +1 -1
  95. package/dist/client/assets/{dropdown-menu-sPU_Xw0y.js → dropdown-menu-WR1NGNoR.js} +1 -1
  96. package/dist/client/assets/{empty-state-D4vz7sAz.js → empty-state-xwWZSkhQ.js} +1 -1
  97. package/dist/client/assets/{extract-connection-data-UsNBmqW8.js → extract-connection-data-BuuPL_TW.js} +1 -1
  98. package/dist/client/assets/{file-explorer-Bd_22RPw.js → file-explorer-CPtK8hz_.js} +1 -1
  99. package/dist/client/assets/{file-type-icon-QdIQBEjI.js → file-type-icon-B6nuKI0W.js} +1 -1
  100. package/dist/client/assets/{files-BkGmR0AO.js → files-Y6_iOEZN.js} +1 -1
  101. package/dist/client/assets/{form-Cciq6tIX.js → form-BDEEsjow.js} +1 -1
  102. package/dist/client/assets/{general-DcAHMO7L.js → general-BlUoHTsV.js} +1 -1
  103. package/dist/client/assets/{github-repo-picker-Bo3EK1uO.js → github-repo-picker-CyJ9CV9M.js} +1 -1
  104. package/dist/client/assets/{hooks-G0kJppE-.js → hooks-C1eaKJ5l.js} +1 -1
  105. package/dist/client/assets/{index-BOeQzDmj.js → index-BfM-TSSf.js} +1 -1
  106. package/dist/client/assets/{index-CMw-30pH.js → index-C465jsM1.js} +1 -1
  107. package/dist/client/assets/{index-BURNjU1u.js → index-CALTfboW.js} +1 -1
  108. package/dist/client/assets/{index-B4ybF-Jh.js → index-CDriDNRl.js} +1 -1
  109. package/dist/client/assets/{index-CG-jn-0q.js → index-CW0ySYG0.js} +1 -1
  110. package/dist/client/assets/{index-B1h3Rb7u.js → index-D67BUGMx.js} +1 -1
  111. package/dist/client/assets/{index-D8DZXmXW.js → index-D_GlPX1k.js} +1 -1
  112. package/dist/client/assets/{index-SinsnlPg.js → index-DqJ75_8G.js} +1 -1
  113. package/dist/client/assets/{index-5tWfdRb-.js → index-KOgLnEuj.js} +1 -1
  114. package/dist/client/assets/{index-C8pUNf9d.js → index-VN20CUPz.js} +1 -1
  115. package/dist/client/assets/{index-CLM-5yf3.js → index-XZSYHZ-t.js} +5 -5
  116. package/dist/client/assets/{index-BzYmCclH.js → index-_iuA_jeM.js} +1 -1
  117. package/dist/client/assets/{index-BUtSNxMV.js → index-pPjXkMWO.js} +3 -3
  118. package/dist/client/assets/{index-redirect-CnIqCBs5.js → index-redirect-Cxaa1dXz.js} +1 -1
  119. package/dist/client/assets/{index-BJ4F5Cgi.js → index-yPrRyIJq.js} +1 -1
  120. package/dist/client/assets/{input-CVpmA2Kz.js → input-D3oAzmpd.js} +1 -1
  121. package/dist/client/assets/{integration-icon-DN2_9kxR.js → integration-icon-ChiNtR71.js} +1 -1
  122. package/dist/client/assets/{invite-member-dialog-DoItRcGW.js → invite-member-dialog-DnRVC4fh.js} +1 -1
  123. package/dist/client/assets/{label-CHYsX_t_.js → label-CN7heivZ.js} +1 -1
  124. package/dist/client/assets/{library-tab-Bsgpjy35.js → library-tab-BET5pVoI.js} +1 -1
  125. package/dist/client/assets/{login-eX2LrEPi.js → login-BiLI_tpo.js} +1 -1
  126. package/dist/client/assets/{mcp-oauth-SYbSLgYN.js → mcp-oauth-DaQytGE0.js} +1 -1
  127. package/dist/client/assets/{members-DdtN3bGm.js → members-D0A9fM5h.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-DdObp8MJ.js → monaco-editor-mtUMAQ2f.js} +1 -1
  129. package/dist/client/assets/{monitoring-stats-row-CLTH09T0.js → monitoring-stats-row-cGUx_q_d.js} +1 -1
  130. package/dist/client/assets/{oauth-callback-CTAFn26d.js → oauth-callback-B4i97ziL.js} +1 -1
  131. package/dist/client/assets/{oauth-callback-ai-provider-Ba2WeI6r.js → oauth-callback-ai-provider-Cu0nrtvv.js} +1 -1
  132. package/dist/client/assets/{onboarding-DlHZ-Su3.js → onboarding-DJWXhtuH.js} +1 -1
  133. package/dist/client/assets/{org-install-DI0N3Yqx.js → org-install-BuMuLlYj.js} +1 -1
  134. package/dist/client/assets/{org-layout-CsvIFjMG.js → org-layout-DKktVS01.js} +1 -1
  135. package/dist/client/assets/{organization-choice-uMvBpR1W.js → organization-choice-DhWinyOA.js} +1 -1
  136. package/dist/client/assets/{page-seo-form-DkJGxvT4.js → page-seo-form-CR8dQi-b.js} +1 -1
  137. package/dist/client/assets/page-seo-sheet-CyOPB7pW.js +1 -0
  138. package/dist/client/assets/{popover-leYVnzzq.js → popover-B9_4d9Hb.js} +1 -1
  139. package/dist/client/assets/{post-editor-BbMPNeY8.js → post-editor-C3XxuEgn.js} +1 -1
  140. package/dist/client/assets/{primitives-BMqbH9T1.js → primitives-C09eM3XN.js} +1 -1
  141. package/dist/client/assets/{profile-DJtsX_gg.js → profile-C8YgAq9j.js} +1 -1
  142. package/dist/client/assets/project-app-view-BtBAh_Rd.js +1 -0
  143. package/dist/client/assets/record-editor-DSO_SqwI.js +1 -0
  144. package/dist/client/assets/registry-DMCevnrE.js +2 -0
  145. package/dist/client/assets/{registry-layout-DUqvgFRD.js → registry-layout-8seznd3d.js} +1 -1
  146. package/dist/client/assets/{require-capability-B4WZYZM4.js → require-capability-BpL4yVhr.js} +1 -1
  147. package/dist/client/assets/{required-auth-layout-BGUbgKtE.js → required-auth-layout-Cc06WCjO.js} +1 -1
  148. package/dist/client/assets/{reset-password-BmozYPOY.js → reset-password-Bbsumr-T.js} +1 -1
  149. package/dist/client/assets/{roles-DaQkY_HN.js → roles-CoM0WPdI.js} +1 -1
  150. package/dist/client/assets/{scroll-area-dCf_ML-5.js → scroll-area-BwQt66gB.js} +1 -1
  151. package/dist/client/assets/{search-input-CgRadFHi.js → search-input-Br6kvm4V.js} +1 -1
  152. package/dist/client/assets/{secrets-BK3hZvS4.js → secrets-CjhBbgUZ.js} +1 -1
  153. package/dist/client/assets/{sections-editor-CRAmv7O4.js → sections-editor-BjBW6cix.js} +1 -1
  154. package/dist/client/assets/{select-CRwP8DNI.js → select-CNB5fe3p.js} +1 -1
  155. package/dist/client/assets/{select-model-vYsEfmhg.js → select-model-8hRE4pUt.js} +1 -1
  156. package/dist/client/assets/{seo-editor-sG5N6UB0.js → seo-editor-Bgt_LAws.js} +1 -1
  157. package/dist/client/assets/{settings-layout-CkBMH0P4.js → settings-layout-2WW5-L0X.js} +1 -1
  158. package/dist/client/assets/{settings-section-uwWu-APP.js → settings-section-B6HW8SMd.js} +1 -1
  159. package/dist/client/assets/{sheet-DtNuWaQa.js → sheet-1qlQOBan.js} +1 -1
  160. package/dist/client/assets/{shell-controls-BF0ZsNdF.js → shell-controls-BRktGnmo.js} +1 -1
  161. package/dist/client/assets/{shell-layout-CFR90kZQ.js → shell-layout-D5fv0Gnj.js} +1 -1
  162. package/dist/client/assets/{sidebar-IpepvLp_.js → sidebar-qR7l9LGc.js} +1 -1
  163. package/dist/client/assets/{skeleton-Dp2Vqkiu.js → skeleton-CMqpP0rC.js} +1 -1
  164. package/dist/client/assets/{sso-DVCuwIPw.js → sso-BL-5oYVD.js} +1 -1
  165. package/dist/client/assets/{store-DdDejNZs.js → store-C8vWeX45.js} +1 -1
  166. package/dist/client/assets/store-registry-Y117ABln.js +2 -0
  167. package/dist/client/assets/{studio-tools-BBJKqBLb.js → studio-tools-D16Iabf3.js} +1 -1
  168. package/dist/client/assets/{switch-CGRWKftH.js → switch-Czifg4wP.js} +1 -1
  169. package/dist/client/assets/{table-CES495US.js → table-DPQQ4yes.js} +1 -1
  170. package/dist/client/assets/{tabs-CF8uQ85g.js → tabs-C01VKZPn.js} +1 -1
  171. package/dist/client/assets/{task-row-Bh0ziHfN.js → task-row-Dq5f6UoU.js} +1 -1
  172. package/dist/client/assets/{task-status-BgxqbUD3.js → task-status-BfQFLXYY.js} +1 -1
  173. package/dist/client/assets/{textarea-DXtj6szK.js → textarea-_7jiD7tD.js} +1 -1
  174. package/dist/client/assets/{toggle-group-D2VkNZ7z.js → toggle-group-Cr9Sd28-.js} +1 -1
  175. package/dist/client/assets/{toolbar-BL6j7wlL.js → toolbar-DEctTAZS.js} +1 -1
  176. package/dist/client/assets/{toolbar-icon-button-zRIr6s4s.js → toolbar-icon-button-DMS2W-_l.js} +1 -1
  177. package/dist/client/assets/{tools-list-XTSk446L.js → tools-list-DzdxUwY0.js} +1 -1
  178. package/dist/client/assets/{tooltip-PSiaLaWJ.js → tooltip-BSvDzA5F.js} +1 -1
  179. package/dist/client/assets/{types-dxyE9Hx8.js → types-DSpLZCss.js} +1 -1
  180. package/dist/client/assets/{use-ai-providers-BfSwDb4T.js → use-ai-providers-BlK26Pak.js} +1 -1
  181. package/dist/client/assets/{use-automations-b_vrwPQ_.js → use-automations-DS7x_Yka.js} +1 -1
  182. package/dist/client/assets/{use-capability-BrY7n9pF.js → use-capability-DXxanrFU.js} +1 -1
  183. package/dist/client/assets/{use-clock-tick-DCObx26s.js → use-clock-tick-CqbmcogF.js} +1 -1
  184. package/dist/client/assets/{use-collections-BkB7fOzG.js → use-collections-E89pjH-z.js} +1 -1
  185. package/dist/client/assets/{use-connection-BTrFuX_N.js → use-connection-HPYIB1L_.js} +1 -1
  186. package/dist/client/assets/{use-copy-CUt0RcPi.js → use-copy-BucqFRkh.js} +1 -1
  187. package/dist/client/assets/{use-create-virtual-mcp-FIJSHCtF.js → use-create-virtual-mcp-Bi4kWXxr.js} +1 -1
  188. package/dist/client/assets/{use-debounced-autosave-DT9RTx36.js → use-debounced-autosave-eXbj54WV.js} +1 -1
  189. package/dist/client/assets/{use-debounced-value-tBjolHlG.js → use-debounced-value-DwsMvXCK.js} +1 -1
  190. package/dist/client/assets/{use-decopilot-events-CB_ilHxh.js → use-decopilot-events-DnA17lg1.js} +1 -1
  191. package/dist/client/assets/{use-delete-connection-DRxNkjYZ.js → use-delete-connection-D9oA_Iuw.js} +1 -1
  192. package/dist/client/assets/{use-file-configs-B_Y4Bta1.js → use-file-configs-77JsXLRJ.js} +1 -1
  193. package/dist/client/assets/{use-infinite-scroll-ziAI3qTA.js → use-infinite-scroll-BGEZaC_d.js} +1 -1
  194. package/dist/client/assets/{use-join-requests-Cw33iAqx.js → use-join-requests-BDqL8m1v.js} +1 -1
  195. package/dist/client/assets/{use-mcp-client-ytX3rIBe.js → use-mcp-client-CrFimBIE.js} +1 -1
  196. package/dist/client/assets/{use-mcp-prompts-DGlgK9Vf.js → use-mcp-prompts-BLaH_phU.js} +1 -1
  197. package/dist/client/assets/{use-mcp-tools-Pie2rBqX.js → use-mcp-tools-2qGpGfQT.js} +1 -1
  198. package/dist/client/assets/{use-members-BFNAbzwS.js → use-members-BRBh_r2f.js} +1 -1
  199. package/dist/client/assets/{use-mobile-dwrFF7Ga.js → use-mobile-CcaXr_ZY.js} +1 -1
  200. package/dist/client/assets/{use-navigate-to-agent-3AMa0O2a.js → use-navigate-to-agent-hUrzXW4j.js} +1 -1
  201. package/dist/client/assets/{use-org-auth-client-BUcY_yRN.js → use-org-auth-client-CuoSRLLT.js} +1 -1
  202. package/dist/client/assets/{use-org-sso--qDPTafN.js → use-org-sso-DOBO5bz0.js} +1 -1
  203. package/dist/client/assets/{use-organization-roles-DDZE7ylp.js → use-organization-roles-BcLIOVcj.js} +1 -1
  204. package/dist/client/assets/{use-organization-settings-DLQ_RcCc.js → use-organization-settings-DKhFQzFb.js} +1 -1
  205. package/dist/client/assets/{use-registry-connections-CE2j8i_H.js → use-registry-connections-5ggPsOFj.js} +1 -1
  206. package/dist/client/assets/{use-secrets-BcayTN5e.js → use-secrets-DrpewLw2.js} +1 -1
  207. package/dist/client/assets/{use-status-sounds-DqsU9cpf.js → use-status-sounds-rsB3nf6f.js} +1 -1
  208. package/dist/client/assets/{use-view-mode-DaspnYvg.js → use-view-mode-Dkyy6VOo.js} +1 -1
  209. package/dist/client/assets/{use-virtual-mcp-DoBqiTt8.js → use-virtual-mcp-Bc1u53Yq.js} +1 -1
  210. package/dist/client/assets/useInfiniteQuery-B0z5w_RI.js +1 -0
  211. package/dist/client/assets/useSuspenseInfiniteQuery-HmJ78SJB.js +1 -0
  212. package/dist/client/assets/{useSuspenseQueries-BeEuUcyy.js → useSuspenseQueries-BFTEv8fq.js} +1 -1
  213. package/dist/client/assets/{variant-calendar-Czyjsj57.js → variant-calendar-CWcsCSui.js} +1 -1
  214. package/dist/client/assets/{view-mode-toggle-Bl026rsL.js → view-mode-toggle-CBb3Uw1q.js} +1 -1
  215. package/dist/client/index.html +1 -1
  216. package/dist/server/cli.js +432 -433
  217. package/dist/server/server.js +289 -289
  218. package/package.json +1 -1
  219. package/dist/client/assets/page-seo-sheet-e5hks3lZ.js +0 -1
  220. package/dist/client/assets/project-app-view-4fI2e2P9.js +0 -1
  221. package/dist/client/assets/record-editor-DuRqUeJW.js +0 -1
  222. package/dist/client/assets/registry-BOBWp4Rn.js +0 -2
  223. package/dist/client/assets/store-registry-BcIIOkiT.js +0 -2
  224. package/dist/client/assets/useInfiniteQuery-DX_yJgCV.js +0 -1
  225. package/dist/client/assets/useSuspenseInfiniteQuery-COveRdn6.js +0 -1
@@ -1,4 +1,4 @@
1
- import{bt as zl,j as q,a3 as lt,bM as zn,r as Ve,bN as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-BUtSNxMV.js";import{i as zb}from"./Check-CWR2GX_4.js";import{a as jb}from"./Copy01-C_vDrK62.js";import{e as S0,g as y0,h as A0,a as _0}from"./dialog-fRprLEhn.js";import{n as I0}from"./Globe01-pYyw4zjF.js";import{j as k0,n as R0}from"./ZoomOut-B4weRH-H.js";import{u as N0}from"./use-mobile-dwrFF7Ga.js";import{m as C0}from"./tab-id-CLpu897Q.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{bt as zl,j as q,a3 as lt,bM as zn,r as Ve,bN as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-pPjXkMWO.js";import{i as zb}from"./Check-CUC1zRnb.js";import{a as jb}from"./Copy01-C-7fHSay.js";import{e as S0,g as y0,h as A0,a as _0}from"./dialog-xw_WZv6d.js";import{n as I0}from"./Globe01-Dz7J456-.js";import{j as k0,n as R0}from"./ZoomOut-Dt1g7vVy.js";import{u as N0}from"./use-mobile-CcaXr_ZY.js";import{m as C0}from"./tab-id-CLpu897Q.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-BUtSNxMV.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-pPjXkMWO.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{cA as C,c as f,j as c,a1 as j,r as d,l as p,b9 as b,cB as v,cC as h}from"./index-BUtSNxMV.js";import{L as N}from"./label-CHYsX_t_.js";const E=C,g=d.createContext({}),M=t=>{const e=f.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=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.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=d.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=f.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=f.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=f.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=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,R as e,y as f};
1
+ import{cA as C,c as f,j as c,a1 as j,r as d,l as p,b9 as b,cB as v,cC as h}from"./index-pPjXkMWO.js";import{L as N}from"./label-CN7heivZ.js";const E=C,g=d.createContext({}),M=t=>{const e=f.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=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.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=d.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=f.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=f.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=f.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=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,R as e,y as f};
@@ -1 +1 @@
1
- import{b as G,D as V,m as M,p as Q,n as Y,d as K,v as B,t as w,K as I,j as a,a1 as $,o as Z,s as F,c as _,r as P,B as H,L as q,y as J}from"./index-BUtSNxMV.js";import{P as k}from"./index-B4ybF-Jh.js";import{u as W}from"./use-org-auth-client-BUcY_yRN.js";import{u as X}from"./use-debounced-autosave-DT9RTx36.js";import{A as ee}from"./avatar-DN0SQ2YP.js";import{I as U}from"./input-CVpmA2Kz.js";import{S as R,a as L,b as D,c as te}from"./settings-section-uwWu-APP.js";import{D as ae}from"./domain-settings-z8x2a3yI.js";import{S as se}from"./switch-CGRWKftH.js";import{u as ne,e as oe}from"./use-organization-settings-DLQ_RcCc.js";import{u as ie}from"./studio-tools-BBJKqBLb.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-DseQ_eoR.js";import{R as pe}from"./require-capability-B4WZYZM4.js";import"./sidebar-IpepvLp_.js";import"./LayoutLeft-WEbo8J87.js";import"./use-mobile-dwrFF7Ga.js";import"./sheet-DtNuWaQa.js";import"./X-C0ZgGoQb.js";import"./tooltip-PSiaLaWJ.js";import"./User01-C7pBq15o.js";import"./card-D9G2yXrJ.js";import"./ArrowUpRight-DYI4ZFTv.js";import"./badge-CYqiGv_0.js";import"./select-CRwP8DNI.js";import"./Check-CWR2GX_4.js";import"./ChevronDown-BOnFs3ZP.js";import"./ChevronUp-CkMhjJB_.js";import"./constants-C8_Swa4x.js";import"./use-capability-BrY7n9pF.js";import"./access-gate-DPOW1JQt.js";import"./capability-load-error-DIVlJMVm.js";const he=Z({name:F().min(1,"Name is required").max(255,"Name is too long"),slug:F().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:F().optional()});function xe(e){const t=_.c(13),{value:f,onChange:d,name:n,disabled:l}=e,u=P.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=je,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 s=m;let o;t[3]!==l||t[4]!==s?(o=a.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:s,className:"hidden",disabled:l}),t[3]=l,t[4]=s,t[5]=o):o=t[5];const i=f||void 0,x=n??"?";let p;t[6]!==i||t[7]!==x?(p=a.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=a.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 je(){return w.error("Failed to read image")}function be(){const e=G(),{org:t}=V(),f=W(),d=M(),n=Q({resolver:Y(he),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),l=K({mutationFn:async s=>{const o={name:s.name,slug:s.slug};s.logo&&(o.logo=s.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:(s,o)=>{B("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),d.invalidateQueries({queryKey:I.organizations()}),d.invalidateQueries({queryKey:I.activeOrganization(t.slug)}),w.success("Organization updated successfully"),s?.data?.slug&&s.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:s.data.slug}})},onError:(s,o)=>{B("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:s instanceof Error?s.message:String(s)}),w.error(s instanceof Error?s.message:"Failed to update organization")}}),{schedule:u,flush:c}=X({save:async()=>{const s=n.control._formState.dirtyFields;if(Object.keys(s).length===0||!await n.trigger())return;const i=n.getValues(),x=n.control._defaultValues;n.reset(i,{keepValues:!0});try{await l.mutateAsync(i)}catch{n.reset(x,{keepValues:!0})}}}),r=n.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return a.jsx(R,{children:a.jsxs(L,{children:[a.jsx(D,{title:"Logo",description:"Recommended size is 256x256px",action:a.jsx(xe,{value:n.watch("logo"),onChange:s=>{n.setValue("logo",s??"",{shouldDirty:!0}),c()},name:n.watch("name")})}),a.jsx(D,{title:"Name",action:a.jsx($,{control:n.control,name:"name",render:({field:s})=>a.jsx(U,{id:"org-name",...s,onChange:o=>{s.onChange(o),u()},onBlur:()=>{s.onBlur(),c()},placeholder:"Organization name",className:"w-[280px]"})})}),a.jsx(D,{title:"URL",action:a.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&&a.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),a.jsx($,{control:n.control,name:"slug",render:({field:s})=>a.jsx("input",{id:"org-slug",value:s.value??"",name:s.name,ref:s.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,"");n.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),u()},onBlur:()=>{s.onBlur(),c()}})})]})}),(r.name||r.slug||r.logo)&&a.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&a.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&a.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&a.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function ve(){const e=_.c(6),t=ne(),{mutate:f,isPending:d}=oe();let n;e[0]!==f?(n=u=>f(u),e[0]=f,e[1]=n):n=e[1];let l;return e[2]!==t||e[3]!==d||e[4]!==n?(l=a.jsx(R,{title:"Task board",description:"A board for tracking org tasks by status, priority, and assignee.",children:a.jsx(L,{children:a.jsx(D,{title:"Enable task board",description:"Adds a Board entry to the sidebar for this organization.",action:a.jsx(se,{checked:t,disabled:d,onCheckedChange:n})})})}),e[2]=t,e[3]=d,e[4]=n,e[5]=l):l=e[5],l}function ye(){const e=_.c(42),{org:t}=V(),[f,d]=P.useState(!1),[n,l]=P.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=()=>{B("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:Se},e[6]=c,e[7]=r,e[8]=m):m=e[8];const s=K(m);let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=()=>d(!0),e[9]=o):o=e[9];let i;e[10]!==s.isPending?(i=a.jsx(R,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:a.jsx(L,{className:"border-destructive/40",children:a.jsx(D,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:a.jsx(H,{variant:"destructive",size:"sm",onClick:o,disabled:s.isPending,children:"Delete"})})})}),e[10]=s.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=a.jsx(re,{children:"Delete Organization?"}),e[13]=p):p=e[13];let h;e[14]!==t.name?(h=a.jsxs("p",{children:["This will permanently delete all data associated with"," ",a.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=a.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",a.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]!==n||e[20]!==t.name?(g=a.jsx(U,{value:n,onChange:b,placeholder:t.name,autoFocus:!0}),e[19]=n,e[20]=t.name,e[21]=g):g=e[21];let v;e[22]!==g||e[23]!==h||e[24]!==j?(v=a.jsxs(le,{children:[p,a.jsx(ce,{asChild:!0,children:a.jsxs("div",{children:[h,j,g]})})]}),e[22]=g,e[23]=h,e[24]=j,e[25]=v):v=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=a.jsx(de,{children:"Cancel"}),e[26]=O):O=e[26];let y;e[27]!==s?(y=()=>s.mutate(),e[27]=s,e[28]=y):y=e[28];const E=n!==t.name||s.isPending,T=s.isPending?"Deleting…":"Delete organization";let S;e[29]!==y||e[30]!==E||e[31]!==T?(S=a.jsxs(ue,{children:[O,a.jsx(me,{onClick:y,disabled:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:T})]}),e[29]=y,e[30]=E,e[31]=T,e[32]=S):S=e[32];let z;e[33]!==v||e[34]!==S?(z=a.jsxs(ge,{children:[v,S]}),e[33]=v,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==f||e[37]!==z?(C=a.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=a.jsxs(a.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=A):A=e[41],A}function Se(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function ze(){const e=_.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=a.jsx(k,{children:a.jsx(k.Content,{children:a.jsx(k.Body,{children:a.jsxs(te,{children:[a.jsx(k.Title,{children:"Organization"}),a.jsx(be,{}),a.jsx(ae,{}),a.jsx(ve,{}),a.jsx(ye,{})]})})})}),e[0]=t):t=e[0],t}function tt(){const e=_.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=a.jsx(pe,{capability:"org:manage",area:"general settings",children:a.jsx(ze,{})}),e[0]=t):t=e[0],t}export{tt as default};
1
+ import{b as G,D as V,m as M,p as Q,n as Y,d as K,v as B,t as w,K as I,j as a,a1 as $,o as Z,s as F,c as _,r as P,B as H,L as q,y as J}from"./index-pPjXkMWO.js";import{P as k}from"./index-CDriDNRl.js";import{u as W}from"./use-org-auth-client-CuoSRLLT.js";import{u as X}from"./use-debounced-autosave-eXbj54WV.js";import{A as ee}from"./avatar-qkTmk1tF.js";import{I as U}from"./input-D3oAzmpd.js";import{S as R,a as L,b as D,c as te}from"./settings-section-B6HW8SMd.js";import{D as ae}from"./domain-settings-BfzAzzbX.js";import{S as se}from"./switch-Czifg4wP.js";import{u as ne,e as oe}from"./use-organization-settings-DKhFQzFb.js";import{u as ie}from"./studio-tools-D16Iabf3.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-zbSvd7Ki.js";import{R as pe}from"./require-capability-BpL4yVhr.js";import"./sidebar-qR7l9LGc.js";import"./LayoutLeft-PT-KYBVh.js";import"./use-mobile-CcaXr_ZY.js";import"./sheet-1qlQOBan.js";import"./X-CFM-EaJf.js";import"./tooltip-BSvDzA5F.js";import"./User01-BnV8b2oc.js";import"./card-BmfGcj0O.js";import"./ArrowUpRight-3SkCtZ7K.js";import"./badge-Dxl2nD6L.js";import"./select-CNB5fe3p.js";import"./Check-CUC1zRnb.js";import"./ChevronDown-B1mct1yp.js";import"./ChevronUp-Bu7-a85r.js";import"./constants-C8_Swa4x.js";import"./use-capability-DXxanrFU.js";import"./access-gate-twsl8uHV.js";import"./capability-load-error-BRk5Albu.js";const he=Z({name:F().min(1,"Name is required").max(255,"Name is too long"),slug:F().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:F().optional()});function xe(e){const t=_.c(13),{value:f,onChange:d,name:n,disabled:l}=e,u=P.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=je,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 s=m;let o;t[3]!==l||t[4]!==s?(o=a.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:s,className:"hidden",disabled:l}),t[3]=l,t[4]=s,t[5]=o):o=t[5];const i=f||void 0,x=n??"?";let p;t[6]!==i||t[7]!==x?(p=a.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=a.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 je(){return w.error("Failed to read image")}function be(){const e=G(),{org:t}=V(),f=W(),d=M(),n=Q({resolver:Y(he),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),l=K({mutationFn:async s=>{const o={name:s.name,slug:s.slug};s.logo&&(o.logo=s.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:(s,o)=>{B("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),d.invalidateQueries({queryKey:I.organizations()}),d.invalidateQueries({queryKey:I.activeOrganization(t.slug)}),w.success("Organization updated successfully"),s?.data?.slug&&s.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:s.data.slug}})},onError:(s,o)=>{B("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:s instanceof Error?s.message:String(s)}),w.error(s instanceof Error?s.message:"Failed to update organization")}}),{schedule:u,flush:c}=X({save:async()=>{const s=n.control._formState.dirtyFields;if(Object.keys(s).length===0||!await n.trigger())return;const i=n.getValues(),x=n.control._defaultValues;n.reset(i,{keepValues:!0});try{await l.mutateAsync(i)}catch{n.reset(x,{keepValues:!0})}}}),r=n.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return a.jsx(R,{children:a.jsxs(L,{children:[a.jsx(D,{title:"Logo",description:"Recommended size is 256x256px",action:a.jsx(xe,{value:n.watch("logo"),onChange:s=>{n.setValue("logo",s??"",{shouldDirty:!0}),c()},name:n.watch("name")})}),a.jsx(D,{title:"Name",action:a.jsx($,{control:n.control,name:"name",render:({field:s})=>a.jsx(U,{id:"org-name",...s,onChange:o=>{s.onChange(o),u()},onBlur:()=>{s.onBlur(),c()},placeholder:"Organization name",className:"w-[280px]"})})}),a.jsx(D,{title:"URL",action:a.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&&a.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),a.jsx($,{control:n.control,name:"slug",render:({field:s})=>a.jsx("input",{id:"org-slug",value:s.value??"",name:s.name,ref:s.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,"");n.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),u()},onBlur:()=>{s.onBlur(),c()}})})]})}),(r.name||r.slug||r.logo)&&a.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&a.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&a.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&a.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function ve(){const e=_.c(6),t=ne(),{mutate:f,isPending:d}=oe();let n;e[0]!==f?(n=u=>f(u),e[0]=f,e[1]=n):n=e[1];let l;return e[2]!==t||e[3]!==d||e[4]!==n?(l=a.jsx(R,{title:"Task board",description:"A board for tracking org tasks by status, priority, and assignee.",children:a.jsx(L,{children:a.jsx(D,{title:"Enable task board",description:"Adds a Board entry to the sidebar for this organization.",action:a.jsx(se,{checked:t,disabled:d,onCheckedChange:n})})})}),e[2]=t,e[3]=d,e[4]=n,e[5]=l):l=e[5],l}function ye(){const e=_.c(42),{org:t}=V(),[f,d]=P.useState(!1),[n,l]=P.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=()=>{B("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:Se},e[6]=c,e[7]=r,e[8]=m):m=e[8];const s=K(m);let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=()=>d(!0),e[9]=o):o=e[9];let i;e[10]!==s.isPending?(i=a.jsx(R,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:a.jsx(L,{className:"border-destructive/40",children:a.jsx(D,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:a.jsx(H,{variant:"destructive",size:"sm",onClick:o,disabled:s.isPending,children:"Delete"})})})}),e[10]=s.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=a.jsx(re,{children:"Delete Organization?"}),e[13]=p):p=e[13];let h;e[14]!==t.name?(h=a.jsxs("p",{children:["This will permanently delete all data associated with"," ",a.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=a.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",a.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]!==n||e[20]!==t.name?(g=a.jsx(U,{value:n,onChange:b,placeholder:t.name,autoFocus:!0}),e[19]=n,e[20]=t.name,e[21]=g):g=e[21];let v;e[22]!==g||e[23]!==h||e[24]!==j?(v=a.jsxs(le,{children:[p,a.jsx(ce,{asChild:!0,children:a.jsxs("div",{children:[h,j,g]})})]}),e[22]=g,e[23]=h,e[24]=j,e[25]=v):v=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=a.jsx(de,{children:"Cancel"}),e[26]=O):O=e[26];let y;e[27]!==s?(y=()=>s.mutate(),e[27]=s,e[28]=y):y=e[28];const E=n!==t.name||s.isPending,T=s.isPending?"Deleting…":"Delete organization";let S;e[29]!==y||e[30]!==E||e[31]!==T?(S=a.jsxs(ue,{children:[O,a.jsx(me,{onClick:y,disabled:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:T})]}),e[29]=y,e[30]=E,e[31]=T,e[32]=S):S=e[32];let z;e[33]!==v||e[34]!==S?(z=a.jsxs(ge,{children:[v,S]}),e[33]=v,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==f||e[37]!==z?(C=a.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=a.jsxs(a.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=A):A=e[41],A}function Se(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function ze(){const e=_.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=a.jsx(k,{children:a.jsx(k.Content,{children:a.jsx(k.Body,{children:a.jsxs(te,{children:[a.jsx(k.Title,{children:"Organization"}),a.jsx(be,{}),a.jsx(ae,{}),a.jsx(ve,{}),a.jsx(ye,{})]})})})}),e[0]=t):t=e[0],t}function tt(){const e=_.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=a.jsx(pe,{capability:"org:manage",area:"general settings",children:a.jsx(ze,{})}),e[0]=t):t=e[0],t}export{tt as default};
@@ -1 +1 @@
1
- import{c as H,j as t,D as J,a as ie,m as Y,r as $,P as q,i as U,d as ee,t as L,dV as ae,K as F,k as le,B as ce,l as V,q as ue,a2 as de}from"./index-BUtSNxMV.js";import{c as me,a as fe,d as pe,e as ge}from"./dialog-fRprLEhn.js";import{C as W}from"./checkbox-DCa6681A.js";import{C as xe}from"./collection-search-DT12aqMT.js";import{u as he}from"./use-debounced-value-tBjolHlG.js";import{b as te,u as ye}from"./use-connection-BTrFuX_N.js";import{u as D}from"./use-mcp-client-ytX3rIBe.js";import{W as be,S as ne}from"./constants-C8_Swa4x.js";import{a as se}from"./authenticate-and-persist-oauth-D8TojuXv.js";import{b as oe}from"./Settings02-CtgBTtnW.js";import{z as we}from"./agent-icon-CRPqtjX6.js";import{u as Ne}from"./use-mcp-tools-Pie2rBqX.js";import{e as Ce}from"./extract-connection-data-UsNBmqW8.js";import{u as je}from"./use-navigate-to-agent-3AMa0O2a.js";import{f as Ie}from"./github-installations-DzN1UQ4x.js";const B={contents:"write",metadata:"read",pull_requests:"write",issues:"write"};function Se(s){if(!s||typeof s!="object"||Array.isArray(s))return B;const e=s;return Object.values(e).some(n=>typeof n!="string")?B:e}function ve(s){if(!(typeof s!="number"||!Number.isFinite(s)||!Number.isInteger(s)||s<=0))return s}function Ee(s){const e=s.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=ve(e.repositoryId);return{sourceConnectionId:typeof e.sourceConnectionId=="string"?e.sourceConnectionId:void 0,installationId:e.installationId,repositoryId:n,owner:e.owner,repo:e.repo,permissions:Se(e.permissions),grantProvider:e.grantProvider==="github-mcp"?"github-mcp":void 0}}function Te(s){return(s??[]).filter(e=>Ee(e)===null)}function rt(s){return s.metadata?.orgShared===!0}function z(s){const e=H.c(4),{size:n,className:o}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=l):l=e[0];let d;return e[1]!==o||e[2]!==n?(d=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:o,children:l}),e[1]=o,e[2]=n,e[3]=d):d=e[3],d}function ke(s,e){const n=H.c(12),{org:o}=J();let l;n[0]!==o.id?(l=be.REGISTRY(o.id),n[0]=o.id,n[1]=l):l=n[1];const d=l;let f;n[2]!==o.id||n[3]!==o.slug||n[4]!==d?(f={connectionId:d,orgId:o.id,orgSlug:o.slug},n[2]=o.id,n[3]=o.slug,n[4]=d,n[5]=f):f=n[5];const m=D(f);let p;n[6]!==s?(p={name:s},n[6]=s,n[7]=p):p=n[7];const b=e?.enabled??!0;let i;return n[8]!==m||n[9]!==p||n[10]!==b?(i={client:m,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:p,enabled:b,staleTime:3e5,select:_e},n[8]=m,n[9]=p,n[10]=b,n[11]=i):i=n[11],Ne(i)}function _e(s){return s.structuredContent?.item??null}const Ae="deco/mcp-github";function Re(s){const{org:e}=J(),{data:n}=ie.useSession(),o=te(),l=Y(),[d,f]=$.useState("idle"),[m,p]=$.useState(null),[b,i]=$.useState(null),{data:h,isLoading:c}=ke(Ae,{enabled:s.enabled}),g=$.useRef(!1);s.enabled&&h&&!c&&!g.current&&n?.user?.id&&d==="idle"&&(g.current=!0,w());async function w(){if(!(!h||!n?.user?.id||!e))try{f("installing"),p(null);const N=Ce(h,e.id,n.user.id,{remoteIndex:0});if(!N.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:x}=await o.create.mutateAsync(N);f("authenticating");const u=await se({connectionId:x,orgId:e.id,orgSlug:e.slug,persistFallback:a=>o.update.mutateAsync({id:x,data:{connection_token:a}}).then(()=>{})});if(u.ran&&!u.ok){try{await o.delete.mutateAsync(x)}catch{}throw new Error(u.error&&u.error!=="no token received"?u.error:"No token received from GitHub")}q(l,e.id),i(N),f("ready")}catch(N){p(N instanceof Error?N.message:String(N)),f("error")}}function j(){f("idle"),p(null),i(null),g.current=!1}return s.enabled&&c&&d==="idle"?{status:"installing",error:null,connection:null,retry:j}:{status:d,error:m,connection:b,retry:j}}const K=[{key:"auto-respond-to-issues",triggerType:"github.issues.opened",nameSuffix:"auto-respond to issues",label:"Auto-respond to new issues",defaultEnabled:!0,instructions:({owner:s,name:e})=>`A new GitHub issue has been opened in ${s}/${e}. Read the issue, explore relevant code, create a branch, implement the fix, and open a PR referencing the issue number.`},{key:"review-incoming-prs",triggerType:"github.pull_request.opened",nameSuffix:"review incoming PRs",label:"Review incoming pull requests",defaultEnabled:!0,instructions:({owner:s,name:e})=>`A pull request was opened in ${s}/${e}. Read the diff, summarize what changed, flag risks (security, perf, breaking changes), and leave a review comment.`},{key:"note-merged-prs",triggerType:"github.pull_request.closed",nameSuffix:"note merged/closed PRs",label:"Note merged or closed PRs",defaultEnabled:!1,instructions:({owner:s,name:e})=>`A pull request was closed in ${s}/${e}. If it was merged, update changelog/release notes as appropriate.`}];function Oe(s,e){const n=new Set;if(s.paramsSchema)for(const l of Object.keys(s.paramsSchema))n.add(l);if(Array.isArray(s.params))for(const l of s.params)n.add(l.name);else if(s.params&&typeof s.params=="object")for(const l of Object.keys(s.params))n.add(l);if(n.has("repo"))return{repo:`${e.owner}/${e.name}`};const o={};return n.has("owner")&&(o.owner=e.owner),n.has("name")&&(o.name=e.name),n.has("repository")&&(o.repository=`${e.owner}/${e.name}`),o}async function Ge({githubCallTool:s,selfCallTool:e,virtualMcpId:n,repo:o,connectionId:l,selectedKeys:d}){const f=await s({name:"TRIGGER_LIST",arguments:{}}),m=f.structuredContent??f,p=new Map((m.triggers??[]).map(c=>[c.type,c])),b=K.filter(c=>d.has(c.key)),i=await Promise.allSettled(b.map(async c=>{const g=p.get(c.triggerType);if(!g)throw new Error(`Trigger ${c.triggerType} not exposed`);const w=await e({name:"AUTOMATION_CREATE",arguments:{name:`${o.name}: ${c.nameSuffix}`,virtual_mcp_id:n,messages:c.instructions(o),active:!0}}),j=(w.structuredContent??w).id;if(!j)throw new Error(`AUTOMATION_CREATE returned no id for ${c.key}`);await e({name:"AUTOMATION_TRIGGER_ADD",arguments:{automation_id:j,type:"event",connection_id:l,event_type:c.triggerType,params:Oe(g,o)}})})),h=i.filter(c=>c.status==="rejected").length;return h>0&&console.error("Some GitHub automations failed to set up:",i.filter(c=>c.status==="rejected")),{total:i.length,failed:h}}const X="GitHub MCP did not return refreshable repo grant metadata";function M(s){if(typeof s!="string")return null;const e=s.trim();return e.length>0?e:null}function Pe(s){try{const e=new URL(s);return(e.protocol==="http:"||e.protocol==="https:")&&!e.username&&!e.password}catch{return!1}}function $e(s){return typeof s=="number"&&Number.isFinite(s)&&Number.isInteger(s)&&s>0?s:void 0}async function Z(s){const{orgSlug:e,sourceConnection:n,installationId:o,owner:l,repo:d,githubCallTool:f,selfCallTool:m,orgShared:p}=s,b=await f({name:"MINT_REPO_TOKEN",arguments:{installationId:o,owner:l,repo:d,permissions:B}}),i=b.structuredContent;if(b.isError||!i?.token){const y=b.content?.find(T=>T.type==="text")?.text;throw new Error(y?`Failed to mint a repo-scoped GitHub token: ${y}`:"Failed to mint a repo-scoped GitHub token")}const h=M(i.refreshToken),c=M(i.tokenEndpoint),g=M(i.clientId);if(!h||!c||!g)throw new Error(X);if(!Pe(c))throw new Error(X);const w=M(i.repository?.owner),j=M(i.repository?.name),N="GitHub MCP returned refresh metadata for a different repository";if(i.repository?.owner!==void 0&&(!w||w.toLowerCase()!==l.toLowerCase()))throw new Error(N);if(i.repository?.name!==void 0&&(!j||j.toLowerCase()!==d.toLowerCase()))throw new Error(N);const C=$e(i.repository?.id),x=i.expiresAt?Date.parse(i.expiresAt):NaN,u=Number.isFinite(x)?Math.max(0,Math.floor((x-Date.now())/1e3)):null,I=(typeof i.expiresIn=="number"&&Number.isFinite(i.expiresIn)&&Number.isInteger(i.expiresIn)&&i.expiresIn>0?i.expiresIn:null)??u,v=await m({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:{title:`GitHub: ${l}/${d}`,description:`Repo-scoped GitHub access for ${l}/${d}`,icon:n.icon,app_name:n.app_name,app_id:n.app_id,connection_type:n.connection_type,connection_url:n.connection_url,metadata:{...p?{orgShared:!0}:{},repoScope:{installationId:o,repositoryId:C,owner:l,repo:d,permissions:B,grantProvider:"github-mcp"}}}}}),S=v.structuredContent??v,E=S.item?.id??S.id;if(!E)throw new Error("Failed to create the repo-scoped GitHub connection");if(!(await fetch(`/api/${e}/connections/${E}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:i.token,refreshToken:h,expiresIn:I,scope:i.scope??null,clientId:g,tokenEndpoint:c})})).ok)throw await m({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:E,force:!0}}).catch(()=>{}),new Error("Failed to persist the repo-scoped token");return{childConnectionId:E}}function it(s){const e=H.c(23),{open:n,onOpenChange:o,title:l,hideAutoRespondCheckbox:d,onImportComplete:f,mode:m}=s,p=d===void 0?!1:d,b=m===void 0?"agent":m,i=l??(b==="connection"?"Add repo":"Import from GitHub"),[h,c]=$.useState(null);let g;e[0]!==i?(g=t.jsx(me,{className:"sr-only",children:t.jsx(fe,{children:i})}),e[0]=i,e[1]=g):g=e[1];let w;e[2]!==i||e[3]!==h?(w=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(oe,{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(z,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:i})]})}),e[2]=i,e[3]=h,e[4]=w):w=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(U,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=j):j=e[5];let N;e[6]!==o?(N=()=>o(!1),e[6]=o,e[7]=N):N=e[7];const C=p||b==="connection";let x;e[8]!==b||e[9]!==f||e[10]!==n||e[11]!==h||e[12]!==N||e[13]!==C?(x=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx($.Suspense,{fallback:j,children:t.jsx(He,{open:n,onComplete:N,selectedInstallation:h,onSelectInstallation:c,hideAutoRespondCheckbox:C,onImportComplete:f,mode:b})})}),e[8]=b,e[9]=f,e[10]=n,e[11]=h,e[12]=N,e[13]=C,e[14]=x):x=e[14];let u;e[15]!==g||e[16]!==w||e[17]!==x?(u=t.jsxs(pe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[g,w,x]}),e[15]=g,e[16]=w,e[17]=x,e[18]=u):u=e[18];let a;return e[19]!==o||e[20]!==n||e[21]!==u?(a=t.jsx(ge,{open:n,onOpenChange:o,children:u}),e[19]=o,e[20]=n,e[21]=u,e[22]=a):a=e[22],a}function He({open:s,onComplete:e,selectedInstallation:n,onSelectInstallation:o,hideAutoRespondCheckbox:l,onImportComplete:d,mode:f="agent"}){const{org:m}=J(),p=Y(),b=je(),[i,h]=$.useState(null),[c,g]=$.useState(!0),[w,j]=$.useState(()=>new Set(K.filter(r=>r.defaultEnabled).map(r=>r.key))),N=K.filter(r=>r.defaultEnabled).map(r=>r.key),C=l?new Set(N):c?w:new Set,x=ye({slug:"mcp-github"}),u=Te(x),a=Re({enabled:s&&u.length===0}),I=u.length===1?u[0]??null:i,v=D({connectionId:I?.id??"",orgId:m.id,orgSlug:m.slug}),S=D({connectionId:ne,orgId:m.id,orgSlug:m.slug}),E=async(r,k)=>{try{const P=await v.callTool({name:"get_file_contents",arguments:{owner:r.owner,repo:r.name,path:k}});if(P.isError)return null;const O=P.content?.find(G=>G.type==="resource")?.resource?.text;if(!O)return null;try{const G=JSON.parse(O);return typeof G=="string"?G:JSON.stringify(G)}catch{return O}}catch{return null}},_=(r,k)=>{Promise.all([E(k,"AGENTS.md"),E(k,"CLAUDE.md")]).then(async([A,P])=>{const R=A??P??null;R&&(await S.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:r,data:{metadata:{instructions:R}}}}),q(p,m.id))}).catch(A=>{console.error("GitHub instructions fetch failed:",A)})},y=async({virtualMcpId:r,repo:k,connectionId:A,selectedKeys:P})=>{const{total:R,failed:O}=await Ge({githubCallTool:G=>v.callTool(G),selfCallTool:G=>S.callTool(G),virtualMcpId:r,repo:k,connectionId:A,selectedKeys:P});O>0&&L.warning(`Set up ${R-O}/${R} GitHub automations. Add the rest from the automations view.`)},T=ee({mutationFn:async r=>{if(!I||!n)throw new Error("No GitHub connection or installation");const k=n.installationId;if(f==="connection"){const{childConnectionId:R}=await Z({orgSlug:m.slug,sourceConnection:I,installationId:k,owner:r.owner,repo:r.name,githubCallTool:O=>v.callTool(O),selfCallTool:O=>S.callTool(O),orgShared:!0});return{virtualMcpId:null,repo:r,connectionId:R,item:null}}const{childConnectionId:A}=await Z({orgSlug:m.slug,sourceConnection:I,installationId:k,owner:r.owner,repo:r.name,githubCallTool:R=>v.callTool(R),selfCallTool:R=>S.callTool(R)});let P=null;try{const R=await S.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:r.name,description:r.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:r.owner,name:r.name,url:r.url,installationId:k,connectionId:A},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:A}]}}}),O=R.structuredContent??R,G=O.item?.id;if(!O.item||!G)throw new Error("Failed to create the imported agent");return P=G,C.size>0&&await y({virtualMcpId:G,repo:r,connectionId:A,selectedKeys:C}).catch(re=>{console.error("Failed to set up GitHub automations:",re),L.warning("Imported repo, but failed to set up GitHub automations. You can add triggers manually from the automations view.")}),{virtualMcpId:G,repo:r,connectionId:A,item:O.item}}catch(R){throw P&&await S.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:P}}).catch(()=>{}),await S.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:A,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:r,repo:k,connectionId:A,item:P})=>{if(f==="connection"||!r||!P){q(p,m.id),ae(p,m.id),L.success(`Added ${k.name}`),e();return}if(p.setQueryData(F.collectionItem(S,m.id,"","VIRTUAL_MCP",r),{item:P}),q(p,m.id),_(r,k),d){d({virtualMcpId:r,repo:k,connectionId:A});return}L.success(`Imported ${k.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),b(r)},onError:r=>{L.error("Failed to import repo: "+(r instanceof Error?r.message:"Unknown error"))}});return a.status==="installing"||a.status==="authenticating"?t.jsx(Q,{status:a.status,error:null,retry:a.retry}):a.status==="error"?t.jsx(Q,{status:"error",error:a.error,retry:a.retry}):u.length===0&&a.status==="idle"?t.jsx(Q,{status:"installing",error:null,retry:a.retry}):u.length>1&&!I?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),u.map(r=>t.jsxs("button",{type:"button",onClick:()=>h(r),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[r.icon?t.jsx("img",{src:r.icon,alt:r.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(z,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:r.title})]},r.id))]}):I?n?t.jsx(Fe,{connectionId:I.id,orgId:m.id,orgSlug:m.slug,installation:n,onSelectRepo:r=>T.mutate(r),isSaving:T.isPending,autoRespondEnabled:c,onAutoRespondChange:g,selectedAutomationKeys:w,onAutomationKeysChange:j,hideAutoRespondCheckbox:l}):t.jsx(Le,{connectionId:I.id,orgId:m.id,orgSlug:m.slug,onSelect:o,showBackButton:u.length>1,onBack:()=>h(null)}):null}function Le(s){const e=H.c(47),{connectionId:n,orgId:o,orgSlug:l,onSelect:d,showBackButton:f,onBack:m}=s;let p;e[0]!==o||e[1]!==l?(p={connectionId:ne,orgId:o,orgSlug:l},e[0]=o,e[1]=l,e[2]=p):p=e[2];const b=D(p),i=Y(),h=te();let c;e[3]!==n||e[4]!==o?(c=F.githubUserOrgs(o,n),e[3]=n,e[4]=o,e[5]=c):c=e[5];let g;e[6]!==n||e[7]!==b?(g=()=>Ie(y=>b.callTool(y),n),e[6]=n,e[7]=b,e[8]=g):g=e[8];let w;e[9]!==c||e[10]!==g?(w={queryKey:c,queryFn:g},e[9]=c,e[10]=g,e[11]=w):w=e[11];const j=le(w);let N;e[12]!==h||e[13]!==n||e[14]!==j||e[15]!==o||e[16]!==l||e[17]!==i?(N={mutationFn:async()=>{const y=await se({connectionId:n,orgId:o,orgSlug:l,persistFallback:r=>h.update.mutateAsync({id:n,data:{connection_token:r}}).then(Me)});if(y.ran&&!y.ok)throw new Error(y.error??"no token received");const T=new URL(`/api/${l}/mcp/${n}`,window.location.origin);await i.invalidateQueries({queryKey:F.isMCPAuthenticated(T.href,null)}),await i.invalidateQueries({queryKey:F.mcpClientPrefix()}),await j.refetch()},onError:ze},e[12]=h,e[13]=n,e[14]=j,e[15]=o,e[16]=l,e[17]=i,e[18]=N):N=e[18];const C=ee(N);if(j.isLoading){let y;return e[19]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(U,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=y):y=e[19],y}if(j.isError){let y,T;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),T=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]=y,e[21]=T):(y=e[20],T=e[21]);let r;e[22]!==C?(r=()=>C.mutate(),e[22]=C,e[23]=r):r=e[23];let k;e[24]!==C.isPending?(k=C.isPending?t.jsx(U,{size:14,className:"animate-spin"}):t.jsx(z,{className:"size-3.5"}),e[24]=C.isPending,e[25]=k):k=e[25];let A;return e[26]!==C.isPending||e[27]!==r||e[28]!==k?(A=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[y,T,t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:r,disabled:C.isPending,children:[k,"Reconnect GitHub"]})]}),e[26]=C.isPending,e[27]=r,e[28]=k,e[29]=A):A=e[29],A}const x=j.data;if(!x)return null;let u;e[30]!==m||e[31]!==f?(u=f&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(oe,{size:12}),"Change connection"]})}),e[30]=m,e[31]=f,e[32]=u):u=e[32];let a;if(e[33]!==x.installations||e[34]!==d){let y;e[36]!==d?(y=T=>t.jsxs("button",{type:"button",onClick:()=>d(T),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:T.avatarUrl,alt:T.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:T.login}),T.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 →"})]},T.installationId),e[36]=d,e[37]=y):y=e[37],a=x.installations.map(y),e[33]=x.installations,e[34]=d,e[35]=a}else a=e[35];let I;e[38]!==a?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:a}),e[38]=a,e[39]=I):I=e[39];const v=x.appSlug?`https://github.com/apps/${x.appSlug}/installations/new`:"https://github.com/settings/installations";let S;e[40]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=S):S=e[40];let E;e[41]!==v?(E=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",S]})}),e[41]=v,e[42]=E):E=e[42];let _;return e[43]!==E||e[44]!==u||e[45]!==I?(_=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[u,I,E]}),e[43]=E,e[44]=u,e[45]=I,e[46]=_):_=e[46],_}function ze(s){L.error("Failed to reconnect GitHub: "+(s instanceof Error?s.message:"Unknown error"))}function Me(){}function Fe(s){const e=H.c(27),{connectionId:n,orgId:o,orgSlug:l,installation:d,onSelectRepo:f,isSaving:m,autoRespondEnabled:p,onAutoRespondChange:b,selectedAutomationKeys:i,onAutomationKeysChange:h,hideAutoRespondCheckbox:c}=s,[g,w]=$.useState(""),j=he(g,300),N=$.useDeferredValue(j),C=g!==N;let x;e[0]!==C||e[1]!==g?(x=t.jsx(xe,{placeholder:"Search repositories...",value:g,onChange:w,isSearching:C}),e[0]=C,e[1]=g,e[2]=x):x=e[2];const u=C?"opacity-40":"opacity-100";let a;e[3]!==u?(a=V("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",u),e[3]=u,e[4]=a):a=e[4];let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(U,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=I):I=e[5];let v;e[6]!==n||e[7]!==N||e[8]!==d||e[9]!==m||e[10]!==f||e[11]!==o||e[12]!==l?(v=t.jsx($.Suspense,{fallback:I,children:t.jsx(Ue,{connectionId:n,orgId:o,orgSlug:l,installation:d,query:N,onSelectRepo:f,isSaving:m})}),e[6]=n,e[7]=N,e[8]=d,e[9]=m,e[10]=f,e[11]=o,e[12]=l,e[13]=v):v=e[13];let S;e[14]!==a||e[15]!==v?(S=t.jsx("div",{className:a,children:v}),e[14]=a,e[15]=v,e[16]=S):S=e[16];let E;e[17]!==p||e[18]!==c||e[19]!==b||e[20]!==h||e[21]!==i?(E=!c&&t.jsxs("div",{className:"border-t border-border shrink-0",children:[t.jsxs("label",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer select-none",children:[t.jsx(W,{checked:p,onCheckedChange:y=>b(y===!0)}),t.jsx("span",{className:"text-xs text-foreground",children:"Set up GitHub automations for this repo"})]}),p&&t.jsx("div",{className:"px-4 pb-3 pl-9 flex flex-col gap-1.5",children:K.map(y=>t.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[t.jsx(W,{checked:i.has(y.key),onCheckedChange:T=>{const r=new Set(i);T===!0?r.add(y.key):r.delete(y.key),h(r)}}),t.jsx("span",{className:"text-xs text-muted-foreground",children:y.label})]},y.key))})]}),e[17]=p,e[18]=c,e[19]=b,e[20]=h,e[21]=i,e[22]=E):E=e[22];let _;return e[23]!==x||e[24]!==S||e[25]!==E?(_=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[x,S,E]}),e[23]=x,e[24]=S,e[25]=E,e[26]=_):_=e[26],_}function Ue(s){const e=H.c(29),{connectionId:n,orgId:o,orgSlug:l,installation:d,query:f,onSelectRepo:m,isSaving:p}=s;let b;e[0]!==n||e[1]!==o||e[2]!==l?(b={connectionId:n,orgId:o,orgSlug:l},e[0]=n,e[1]=o,e[2]=l,e[3]=b):b=e[3];const i=D(b),h=d.type==="User"?"user":"org",c=f?`${h}:${d.login} ${f} in:name`:`${h}:${d.login}`;let g;e[4]!==n||e[5]!==d.login||e[6]!==o||e[7]!==f?(g=F.githubOrgRepos(o,n,d.login,f),e[4]=n,e[5]=d.login,e[6]=o,e[7]=f,e[8]=g):g=e[8];let w;e[9]!==i||e[10]!==c?(w=async u=>{const{signal:a}=u,v=(await i.callTool({name:"search_repositories",arguments:{query:c,page:1,perPage:30}},void 0,{signal:a})).content?.[0]?.text;if(!v)throw new Error("No response from search_repositories");return(JSON.parse(v).items??[]).map(De)},e[9]=i,e[10]=c,e[11]=w):w=e[11];let j;e[12]!==g||e[13]!==w?(j={queryKey:g,queryFn:w},e[12]=g,e[13]=w,e[14]=j):j=e[14];const{data:N}=ue(j);if(N.length===0){let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=u):u=e[15];let a;e[16]!==f?(a=f&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=f,e[17]=a):a=e[17];let I;return e[18]!==a?(I=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[u,a]}),e[18]=a,e[19]=I):I=e[19],I}let C;if(e[20]!==p||e[21]!==m||e[22]!==N){let u;e[24]!==p||e[25]!==m?(u=a=>t.jsxs("button",{type:"button",onClick:()=>m(a),disabled:p,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(z,{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:a.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:[a.private?t.jsx(de,{size:10}):t.jsx(we,{size:10}),a.private?"Private":"Public"]})]},a.fullName),e[24]=p,e[25]=m,e[26]=u):u=e[26],C=N.map(u),e[20]=p,e[21]=m,e[22]=N,e[23]=C}else C=e[23];let x;return e[27]!==C?(x=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:C}),e[27]=C,e[28]=x):x=e[28],x}function De(s){return{name:s.name,fullName:s.full_name,owner:s.full_name.split("/")[0]??"",url:s.html_url,private:s.private,description:s.description,updatedAt:s.updated_at}}function Q(s){const e=H.c(33),{status:n,error:o,retry:l}=s;if(n==="error"){let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(z,{className:"size-5 text-destructive"})}),e[0]=v):v=e[0];let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=S):S=e[1];const E=o??"Something went wrong while connecting to GitHub.";let _;e[2]!==E?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[S,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:E})]}),e[2]=E,e[3]=_):_=e[3];let y;e[4]!==l?(y=t.jsx("button",{type:"button",onClick:l,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]=l,e[5]=y):y=e[5];let T;return e[6]!==_||e[7]!==y?(T=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[v,_,y]}),e[6]=_,e[7]=y,e[8]=T):T=e[8],T}const d=n==="authenticating";let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(z,{className:"size-5 text-foreground"})}),e[9]=f):f=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"relative size-10",children:[f,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(U,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=m):m=e[10];const p=d?"Authenticating with GitHub":"Setting up GitHub";let b;e[11]!==p?(b=t.jsx("p",{className:"text-sm font-medium",children:p}),e[11]=p,e[12]=b):b=e[12];const i=d?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let h;e[13]!==i?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:i}),e[13]=i,e[14]=h):h=e[14];let c;e[15]!==b||e[16]!==h?(c=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[b,h]}),e[15]=b,e[16]=h,e[17]=c):c=e[17];const g=d?"bg-muted-foreground/30":"bg-foreground animate-pulse";let w;e[18]!==g?(w=V("size-1.5 rounded-full",g),e[18]=g,e[19]=w):w=e[19];let j;e[20]!==w?(j=t.jsx("span",{className:w}),e[20]=w,e[21]=j):j=e[21];const N=d?"bg-foreground animate-pulse":"bg-muted-foreground/30";let C;e[22]!==N?(C=V("size-1.5 rounded-full",N),e[22]=N,e[23]=C):C=e[23];let x;e[24]!==C?(x=t.jsx("span",{className:C}),e[24]=C,e[25]=x):x=e[25];let u;e[26]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=u):u=e[26];let a;e[27]!==j||e[28]!==x?(a=t.jsxs("div",{className:"flex items-center gap-1.5",children:[j,x,u]}),e[27]=j,e[28]=x,e[29]=a):a=e[29];let I;return e[30]!==a||e[31]!==c?(I=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[m,c,a]}),e[30]=a,e[31]=c,e[32]=I):I=e[32],I}export{it as G,z as a,Te as b,Ee as g,rt as i,Z as p,Re as u};
1
+ import{c as H,j as t,D as J,a as ie,m as Y,r as $,P as q,i as U,d as ee,t as L,dV as ae,K as F,k as le,B as ce,l as V,q as ue,a2 as de}from"./index-pPjXkMWO.js";import{c as me,a as fe,d as pe,e as ge}from"./dialog-xw_WZv6d.js";import{C as W}from"./checkbox-CfEEJY30.js";import{C as xe}from"./collection-search-B2eeAfCm.js";import{u as he}from"./use-debounced-value-DwsMvXCK.js";import{b as te,u as ye}from"./use-connection-HPYIB1L_.js";import{u as D}from"./use-mcp-client-CrFimBIE.js";import{W as be,S as ne}from"./constants-C8_Swa4x.js";import{a as se}from"./authenticate-and-persist-oauth-Ag6OuiCi.js";import{b as oe}from"./Settings02-DszLgCXG.js";import{z as we}from"./agent-icon-BBTxD8Vr.js";import{u as Ne}from"./use-mcp-tools-2qGpGfQT.js";import{e as Ce}from"./extract-connection-data-BuuPL_TW.js";import{u as je}from"./use-navigate-to-agent-hUrzXW4j.js";import{f as Ie}from"./github-installations-DzN1UQ4x.js";const B={contents:"write",metadata:"read",pull_requests:"write",issues:"write"};function Se(s){if(!s||typeof s!="object"||Array.isArray(s))return B;const e=s;return Object.values(e).some(n=>typeof n!="string")?B:e}function ve(s){if(!(typeof s!="number"||!Number.isFinite(s)||!Number.isInteger(s)||s<=0))return s}function Ee(s){const e=s.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=ve(e.repositoryId);return{sourceConnectionId:typeof e.sourceConnectionId=="string"?e.sourceConnectionId:void 0,installationId:e.installationId,repositoryId:n,owner:e.owner,repo:e.repo,permissions:Se(e.permissions),grantProvider:e.grantProvider==="github-mcp"?"github-mcp":void 0}}function Te(s){return(s??[]).filter(e=>Ee(e)===null)}function rt(s){return s.metadata?.orgShared===!0}function z(s){const e=H.c(4),{size:n,className:o}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=l):l=e[0];let d;return e[1]!==o||e[2]!==n?(d=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:o,children:l}),e[1]=o,e[2]=n,e[3]=d):d=e[3],d}function ke(s,e){const n=H.c(12),{org:o}=J();let l;n[0]!==o.id?(l=be.REGISTRY(o.id),n[0]=o.id,n[1]=l):l=n[1];const d=l;let f;n[2]!==o.id||n[3]!==o.slug||n[4]!==d?(f={connectionId:d,orgId:o.id,orgSlug:o.slug},n[2]=o.id,n[3]=o.slug,n[4]=d,n[5]=f):f=n[5];const m=D(f);let p;n[6]!==s?(p={name:s},n[6]=s,n[7]=p):p=n[7];const b=e?.enabled??!0;let i;return n[8]!==m||n[9]!==p||n[10]!==b?(i={client:m,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:p,enabled:b,staleTime:3e5,select:_e},n[8]=m,n[9]=p,n[10]=b,n[11]=i):i=n[11],Ne(i)}function _e(s){return s.structuredContent?.item??null}const Ae="deco/mcp-github";function Re(s){const{org:e}=J(),{data:n}=ie.useSession(),o=te(),l=Y(),[d,f]=$.useState("idle"),[m,p]=$.useState(null),[b,i]=$.useState(null),{data:h,isLoading:c}=ke(Ae,{enabled:s.enabled}),g=$.useRef(!1);s.enabled&&h&&!c&&!g.current&&n?.user?.id&&d==="idle"&&(g.current=!0,w());async function w(){if(!(!h||!n?.user?.id||!e))try{f("installing"),p(null);const N=Ce(h,e.id,n.user.id,{remoteIndex:0});if(!N.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:x}=await o.create.mutateAsync(N);f("authenticating");const u=await se({connectionId:x,orgId:e.id,orgSlug:e.slug,persistFallback:a=>o.update.mutateAsync({id:x,data:{connection_token:a}}).then(()=>{})});if(u.ran&&!u.ok){try{await o.delete.mutateAsync(x)}catch{}throw new Error(u.error&&u.error!=="no token received"?u.error:"No token received from GitHub")}q(l,e.id),i(N),f("ready")}catch(N){p(N instanceof Error?N.message:String(N)),f("error")}}function j(){f("idle"),p(null),i(null),g.current=!1}return s.enabled&&c&&d==="idle"?{status:"installing",error:null,connection:null,retry:j}:{status:d,error:m,connection:b,retry:j}}const K=[{key:"auto-respond-to-issues",triggerType:"github.issues.opened",nameSuffix:"auto-respond to issues",label:"Auto-respond to new issues",defaultEnabled:!0,instructions:({owner:s,name:e})=>`A new GitHub issue has been opened in ${s}/${e}. Read the issue, explore relevant code, create a branch, implement the fix, and open a PR referencing the issue number.`},{key:"review-incoming-prs",triggerType:"github.pull_request.opened",nameSuffix:"review incoming PRs",label:"Review incoming pull requests",defaultEnabled:!0,instructions:({owner:s,name:e})=>`A pull request was opened in ${s}/${e}. Read the diff, summarize what changed, flag risks (security, perf, breaking changes), and leave a review comment.`},{key:"note-merged-prs",triggerType:"github.pull_request.closed",nameSuffix:"note merged/closed PRs",label:"Note merged or closed PRs",defaultEnabled:!1,instructions:({owner:s,name:e})=>`A pull request was closed in ${s}/${e}. If it was merged, update changelog/release notes as appropriate.`}];function Oe(s,e){const n=new Set;if(s.paramsSchema)for(const l of Object.keys(s.paramsSchema))n.add(l);if(Array.isArray(s.params))for(const l of s.params)n.add(l.name);else if(s.params&&typeof s.params=="object")for(const l of Object.keys(s.params))n.add(l);if(n.has("repo"))return{repo:`${e.owner}/${e.name}`};const o={};return n.has("owner")&&(o.owner=e.owner),n.has("name")&&(o.name=e.name),n.has("repository")&&(o.repository=`${e.owner}/${e.name}`),o}async function Ge({githubCallTool:s,selfCallTool:e,virtualMcpId:n,repo:o,connectionId:l,selectedKeys:d}){const f=await s({name:"TRIGGER_LIST",arguments:{}}),m=f.structuredContent??f,p=new Map((m.triggers??[]).map(c=>[c.type,c])),b=K.filter(c=>d.has(c.key)),i=await Promise.allSettled(b.map(async c=>{const g=p.get(c.triggerType);if(!g)throw new Error(`Trigger ${c.triggerType} not exposed`);const w=await e({name:"AUTOMATION_CREATE",arguments:{name:`${o.name}: ${c.nameSuffix}`,virtual_mcp_id:n,messages:c.instructions(o),active:!0}}),j=(w.structuredContent??w).id;if(!j)throw new Error(`AUTOMATION_CREATE returned no id for ${c.key}`);await e({name:"AUTOMATION_TRIGGER_ADD",arguments:{automation_id:j,type:"event",connection_id:l,event_type:c.triggerType,params:Oe(g,o)}})})),h=i.filter(c=>c.status==="rejected").length;return h>0&&console.error("Some GitHub automations failed to set up:",i.filter(c=>c.status==="rejected")),{total:i.length,failed:h}}const X="GitHub MCP did not return refreshable repo grant metadata";function M(s){if(typeof s!="string")return null;const e=s.trim();return e.length>0?e:null}function Pe(s){try{const e=new URL(s);return(e.protocol==="http:"||e.protocol==="https:")&&!e.username&&!e.password}catch{return!1}}function $e(s){return typeof s=="number"&&Number.isFinite(s)&&Number.isInteger(s)&&s>0?s:void 0}async function Z(s){const{orgSlug:e,sourceConnection:n,installationId:o,owner:l,repo:d,githubCallTool:f,selfCallTool:m,orgShared:p}=s,b=await f({name:"MINT_REPO_TOKEN",arguments:{installationId:o,owner:l,repo:d,permissions:B}}),i=b.structuredContent;if(b.isError||!i?.token){const y=b.content?.find(T=>T.type==="text")?.text;throw new Error(y?`Failed to mint a repo-scoped GitHub token: ${y}`:"Failed to mint a repo-scoped GitHub token")}const h=M(i.refreshToken),c=M(i.tokenEndpoint),g=M(i.clientId);if(!h||!c||!g)throw new Error(X);if(!Pe(c))throw new Error(X);const w=M(i.repository?.owner),j=M(i.repository?.name),N="GitHub MCP returned refresh metadata for a different repository";if(i.repository?.owner!==void 0&&(!w||w.toLowerCase()!==l.toLowerCase()))throw new Error(N);if(i.repository?.name!==void 0&&(!j||j.toLowerCase()!==d.toLowerCase()))throw new Error(N);const C=$e(i.repository?.id),x=i.expiresAt?Date.parse(i.expiresAt):NaN,u=Number.isFinite(x)?Math.max(0,Math.floor((x-Date.now())/1e3)):null,I=(typeof i.expiresIn=="number"&&Number.isFinite(i.expiresIn)&&Number.isInteger(i.expiresIn)&&i.expiresIn>0?i.expiresIn:null)??u,v=await m({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:{title:`GitHub: ${l}/${d}`,description:`Repo-scoped GitHub access for ${l}/${d}`,icon:n.icon,app_name:n.app_name,app_id:n.app_id,connection_type:n.connection_type,connection_url:n.connection_url,metadata:{...p?{orgShared:!0}:{},repoScope:{installationId:o,repositoryId:C,owner:l,repo:d,permissions:B,grantProvider:"github-mcp"}}}}}),S=v.structuredContent??v,E=S.item?.id??S.id;if(!E)throw new Error("Failed to create the repo-scoped GitHub connection");if(!(await fetch(`/api/${e}/connections/${E}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:i.token,refreshToken:h,expiresIn:I,scope:i.scope??null,clientId:g,tokenEndpoint:c})})).ok)throw await m({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:E,force:!0}}).catch(()=>{}),new Error("Failed to persist the repo-scoped token");return{childConnectionId:E}}function it(s){const e=H.c(23),{open:n,onOpenChange:o,title:l,hideAutoRespondCheckbox:d,onImportComplete:f,mode:m}=s,p=d===void 0?!1:d,b=m===void 0?"agent":m,i=l??(b==="connection"?"Add repo":"Import from GitHub"),[h,c]=$.useState(null);let g;e[0]!==i?(g=t.jsx(me,{className:"sr-only",children:t.jsx(fe,{children:i})}),e[0]=i,e[1]=g):g=e[1];let w;e[2]!==i||e[3]!==h?(w=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(oe,{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(z,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:i})]})}),e[2]=i,e[3]=h,e[4]=w):w=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(U,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=j):j=e[5];let N;e[6]!==o?(N=()=>o(!1),e[6]=o,e[7]=N):N=e[7];const C=p||b==="connection";let x;e[8]!==b||e[9]!==f||e[10]!==n||e[11]!==h||e[12]!==N||e[13]!==C?(x=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx($.Suspense,{fallback:j,children:t.jsx(He,{open:n,onComplete:N,selectedInstallation:h,onSelectInstallation:c,hideAutoRespondCheckbox:C,onImportComplete:f,mode:b})})}),e[8]=b,e[9]=f,e[10]=n,e[11]=h,e[12]=N,e[13]=C,e[14]=x):x=e[14];let u;e[15]!==g||e[16]!==w||e[17]!==x?(u=t.jsxs(pe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[g,w,x]}),e[15]=g,e[16]=w,e[17]=x,e[18]=u):u=e[18];let a;return e[19]!==o||e[20]!==n||e[21]!==u?(a=t.jsx(ge,{open:n,onOpenChange:o,children:u}),e[19]=o,e[20]=n,e[21]=u,e[22]=a):a=e[22],a}function He({open:s,onComplete:e,selectedInstallation:n,onSelectInstallation:o,hideAutoRespondCheckbox:l,onImportComplete:d,mode:f="agent"}){const{org:m}=J(),p=Y(),b=je(),[i,h]=$.useState(null),[c,g]=$.useState(!0),[w,j]=$.useState(()=>new Set(K.filter(r=>r.defaultEnabled).map(r=>r.key))),N=K.filter(r=>r.defaultEnabled).map(r=>r.key),C=l?new Set(N):c?w:new Set,x=ye({slug:"mcp-github"}),u=Te(x),a=Re({enabled:s&&u.length===0}),I=u.length===1?u[0]??null:i,v=D({connectionId:I?.id??"",orgId:m.id,orgSlug:m.slug}),S=D({connectionId:ne,orgId:m.id,orgSlug:m.slug}),E=async(r,k)=>{try{const P=await v.callTool({name:"get_file_contents",arguments:{owner:r.owner,repo:r.name,path:k}});if(P.isError)return null;const O=P.content?.find(G=>G.type==="resource")?.resource?.text;if(!O)return null;try{const G=JSON.parse(O);return typeof G=="string"?G:JSON.stringify(G)}catch{return O}}catch{return null}},_=(r,k)=>{Promise.all([E(k,"AGENTS.md"),E(k,"CLAUDE.md")]).then(async([A,P])=>{const R=A??P??null;R&&(await S.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:r,data:{metadata:{instructions:R}}}}),q(p,m.id))}).catch(A=>{console.error("GitHub instructions fetch failed:",A)})},y=async({virtualMcpId:r,repo:k,connectionId:A,selectedKeys:P})=>{const{total:R,failed:O}=await Ge({githubCallTool:G=>v.callTool(G),selfCallTool:G=>S.callTool(G),virtualMcpId:r,repo:k,connectionId:A,selectedKeys:P});O>0&&L.warning(`Set up ${R-O}/${R} GitHub automations. Add the rest from the automations view.`)},T=ee({mutationFn:async r=>{if(!I||!n)throw new Error("No GitHub connection or installation");const k=n.installationId;if(f==="connection"){const{childConnectionId:R}=await Z({orgSlug:m.slug,sourceConnection:I,installationId:k,owner:r.owner,repo:r.name,githubCallTool:O=>v.callTool(O),selfCallTool:O=>S.callTool(O),orgShared:!0});return{virtualMcpId:null,repo:r,connectionId:R,item:null}}const{childConnectionId:A}=await Z({orgSlug:m.slug,sourceConnection:I,installationId:k,owner:r.owner,repo:r.name,githubCallTool:R=>v.callTool(R),selfCallTool:R=>S.callTool(R)});let P=null;try{const R=await S.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:r.name,description:r.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:r.owner,name:r.name,url:r.url,installationId:k,connectionId:A},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:A}]}}}),O=R.structuredContent??R,G=O.item?.id;if(!O.item||!G)throw new Error("Failed to create the imported agent");return P=G,C.size>0&&await y({virtualMcpId:G,repo:r,connectionId:A,selectedKeys:C}).catch(re=>{console.error("Failed to set up GitHub automations:",re),L.warning("Imported repo, but failed to set up GitHub automations. You can add triggers manually from the automations view.")}),{virtualMcpId:G,repo:r,connectionId:A,item:O.item}}catch(R){throw P&&await S.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:P}}).catch(()=>{}),await S.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:A,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:r,repo:k,connectionId:A,item:P})=>{if(f==="connection"||!r||!P){q(p,m.id),ae(p,m.id),L.success(`Added ${k.name}`),e();return}if(p.setQueryData(F.collectionItem(S,m.id,"","VIRTUAL_MCP",r),{item:P}),q(p,m.id),_(r,k),d){d({virtualMcpId:r,repo:k,connectionId:A});return}L.success(`Imported ${k.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),b(r)},onError:r=>{L.error("Failed to import repo: "+(r instanceof Error?r.message:"Unknown error"))}});return a.status==="installing"||a.status==="authenticating"?t.jsx(Q,{status:a.status,error:null,retry:a.retry}):a.status==="error"?t.jsx(Q,{status:"error",error:a.error,retry:a.retry}):u.length===0&&a.status==="idle"?t.jsx(Q,{status:"installing",error:null,retry:a.retry}):u.length>1&&!I?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),u.map(r=>t.jsxs("button",{type:"button",onClick:()=>h(r),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[r.icon?t.jsx("img",{src:r.icon,alt:r.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(z,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:r.title})]},r.id))]}):I?n?t.jsx(Fe,{connectionId:I.id,orgId:m.id,orgSlug:m.slug,installation:n,onSelectRepo:r=>T.mutate(r),isSaving:T.isPending,autoRespondEnabled:c,onAutoRespondChange:g,selectedAutomationKeys:w,onAutomationKeysChange:j,hideAutoRespondCheckbox:l}):t.jsx(Le,{connectionId:I.id,orgId:m.id,orgSlug:m.slug,onSelect:o,showBackButton:u.length>1,onBack:()=>h(null)}):null}function Le(s){const e=H.c(47),{connectionId:n,orgId:o,orgSlug:l,onSelect:d,showBackButton:f,onBack:m}=s;let p;e[0]!==o||e[1]!==l?(p={connectionId:ne,orgId:o,orgSlug:l},e[0]=o,e[1]=l,e[2]=p):p=e[2];const b=D(p),i=Y(),h=te();let c;e[3]!==n||e[4]!==o?(c=F.githubUserOrgs(o,n),e[3]=n,e[4]=o,e[5]=c):c=e[5];let g;e[6]!==n||e[7]!==b?(g=()=>Ie(y=>b.callTool(y),n),e[6]=n,e[7]=b,e[8]=g):g=e[8];let w;e[9]!==c||e[10]!==g?(w={queryKey:c,queryFn:g},e[9]=c,e[10]=g,e[11]=w):w=e[11];const j=le(w);let N;e[12]!==h||e[13]!==n||e[14]!==j||e[15]!==o||e[16]!==l||e[17]!==i?(N={mutationFn:async()=>{const y=await se({connectionId:n,orgId:o,orgSlug:l,persistFallback:r=>h.update.mutateAsync({id:n,data:{connection_token:r}}).then(Me)});if(y.ran&&!y.ok)throw new Error(y.error??"no token received");const T=new URL(`/api/${l}/mcp/${n}`,window.location.origin);await i.invalidateQueries({queryKey:F.isMCPAuthenticated(T.href,null)}),await i.invalidateQueries({queryKey:F.mcpClientPrefix()}),await j.refetch()},onError:ze},e[12]=h,e[13]=n,e[14]=j,e[15]=o,e[16]=l,e[17]=i,e[18]=N):N=e[18];const C=ee(N);if(j.isLoading){let y;return e[19]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(U,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=y):y=e[19],y}if(j.isError){let y,T;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),T=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]=y,e[21]=T):(y=e[20],T=e[21]);let r;e[22]!==C?(r=()=>C.mutate(),e[22]=C,e[23]=r):r=e[23];let k;e[24]!==C.isPending?(k=C.isPending?t.jsx(U,{size:14,className:"animate-spin"}):t.jsx(z,{className:"size-3.5"}),e[24]=C.isPending,e[25]=k):k=e[25];let A;return e[26]!==C.isPending||e[27]!==r||e[28]!==k?(A=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[y,T,t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:r,disabled:C.isPending,children:[k,"Reconnect GitHub"]})]}),e[26]=C.isPending,e[27]=r,e[28]=k,e[29]=A):A=e[29],A}const x=j.data;if(!x)return null;let u;e[30]!==m||e[31]!==f?(u=f&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(oe,{size:12}),"Change connection"]})}),e[30]=m,e[31]=f,e[32]=u):u=e[32];let a;if(e[33]!==x.installations||e[34]!==d){let y;e[36]!==d?(y=T=>t.jsxs("button",{type:"button",onClick:()=>d(T),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:T.avatarUrl,alt:T.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:T.login}),T.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 →"})]},T.installationId),e[36]=d,e[37]=y):y=e[37],a=x.installations.map(y),e[33]=x.installations,e[34]=d,e[35]=a}else a=e[35];let I;e[38]!==a?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:a}),e[38]=a,e[39]=I):I=e[39];const v=x.appSlug?`https://github.com/apps/${x.appSlug}/installations/new`:"https://github.com/settings/installations";let S;e[40]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=S):S=e[40];let E;e[41]!==v?(E=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",S]})}),e[41]=v,e[42]=E):E=e[42];let _;return e[43]!==E||e[44]!==u||e[45]!==I?(_=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[u,I,E]}),e[43]=E,e[44]=u,e[45]=I,e[46]=_):_=e[46],_}function ze(s){L.error("Failed to reconnect GitHub: "+(s instanceof Error?s.message:"Unknown error"))}function Me(){}function Fe(s){const e=H.c(27),{connectionId:n,orgId:o,orgSlug:l,installation:d,onSelectRepo:f,isSaving:m,autoRespondEnabled:p,onAutoRespondChange:b,selectedAutomationKeys:i,onAutomationKeysChange:h,hideAutoRespondCheckbox:c}=s,[g,w]=$.useState(""),j=he(g,300),N=$.useDeferredValue(j),C=g!==N;let x;e[0]!==C||e[1]!==g?(x=t.jsx(xe,{placeholder:"Search repositories...",value:g,onChange:w,isSearching:C}),e[0]=C,e[1]=g,e[2]=x):x=e[2];const u=C?"opacity-40":"opacity-100";let a;e[3]!==u?(a=V("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",u),e[3]=u,e[4]=a):a=e[4];let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(U,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=I):I=e[5];let v;e[6]!==n||e[7]!==N||e[8]!==d||e[9]!==m||e[10]!==f||e[11]!==o||e[12]!==l?(v=t.jsx($.Suspense,{fallback:I,children:t.jsx(Ue,{connectionId:n,orgId:o,orgSlug:l,installation:d,query:N,onSelectRepo:f,isSaving:m})}),e[6]=n,e[7]=N,e[8]=d,e[9]=m,e[10]=f,e[11]=o,e[12]=l,e[13]=v):v=e[13];let S;e[14]!==a||e[15]!==v?(S=t.jsx("div",{className:a,children:v}),e[14]=a,e[15]=v,e[16]=S):S=e[16];let E;e[17]!==p||e[18]!==c||e[19]!==b||e[20]!==h||e[21]!==i?(E=!c&&t.jsxs("div",{className:"border-t border-border shrink-0",children:[t.jsxs("label",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer select-none",children:[t.jsx(W,{checked:p,onCheckedChange:y=>b(y===!0)}),t.jsx("span",{className:"text-xs text-foreground",children:"Set up GitHub automations for this repo"})]}),p&&t.jsx("div",{className:"px-4 pb-3 pl-9 flex flex-col gap-1.5",children:K.map(y=>t.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[t.jsx(W,{checked:i.has(y.key),onCheckedChange:T=>{const r=new Set(i);T===!0?r.add(y.key):r.delete(y.key),h(r)}}),t.jsx("span",{className:"text-xs text-muted-foreground",children:y.label})]},y.key))})]}),e[17]=p,e[18]=c,e[19]=b,e[20]=h,e[21]=i,e[22]=E):E=e[22];let _;return e[23]!==x||e[24]!==S||e[25]!==E?(_=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[x,S,E]}),e[23]=x,e[24]=S,e[25]=E,e[26]=_):_=e[26],_}function Ue(s){const e=H.c(29),{connectionId:n,orgId:o,orgSlug:l,installation:d,query:f,onSelectRepo:m,isSaving:p}=s;let b;e[0]!==n||e[1]!==o||e[2]!==l?(b={connectionId:n,orgId:o,orgSlug:l},e[0]=n,e[1]=o,e[2]=l,e[3]=b):b=e[3];const i=D(b),h=d.type==="User"?"user":"org",c=f?`${h}:${d.login} ${f} in:name`:`${h}:${d.login}`;let g;e[4]!==n||e[5]!==d.login||e[6]!==o||e[7]!==f?(g=F.githubOrgRepos(o,n,d.login,f),e[4]=n,e[5]=d.login,e[6]=o,e[7]=f,e[8]=g):g=e[8];let w;e[9]!==i||e[10]!==c?(w=async u=>{const{signal:a}=u,v=(await i.callTool({name:"search_repositories",arguments:{query:c,page:1,perPage:30}},void 0,{signal:a})).content?.[0]?.text;if(!v)throw new Error("No response from search_repositories");return(JSON.parse(v).items??[]).map(De)},e[9]=i,e[10]=c,e[11]=w):w=e[11];let j;e[12]!==g||e[13]!==w?(j={queryKey:g,queryFn:w},e[12]=g,e[13]=w,e[14]=j):j=e[14];const{data:N}=ue(j);if(N.length===0){let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=u):u=e[15];let a;e[16]!==f?(a=f&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=f,e[17]=a):a=e[17];let I;return e[18]!==a?(I=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[u,a]}),e[18]=a,e[19]=I):I=e[19],I}let C;if(e[20]!==p||e[21]!==m||e[22]!==N){let u;e[24]!==p||e[25]!==m?(u=a=>t.jsxs("button",{type:"button",onClick:()=>m(a),disabled:p,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(z,{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:a.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:[a.private?t.jsx(de,{size:10}):t.jsx(we,{size:10}),a.private?"Private":"Public"]})]},a.fullName),e[24]=p,e[25]=m,e[26]=u):u=e[26],C=N.map(u),e[20]=p,e[21]=m,e[22]=N,e[23]=C}else C=e[23];let x;return e[27]!==C?(x=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:C}),e[27]=C,e[28]=x):x=e[28],x}function De(s){return{name:s.name,fullName:s.full_name,owner:s.full_name.split("/")[0]??"",url:s.html_url,private:s.private,description:s.description,updatedAt:s.updated_at}}function Q(s){const e=H.c(33),{status:n,error:o,retry:l}=s;if(n==="error"){let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(z,{className:"size-5 text-destructive"})}),e[0]=v):v=e[0];let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=S):S=e[1];const E=o??"Something went wrong while connecting to GitHub.";let _;e[2]!==E?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[S,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:E})]}),e[2]=E,e[3]=_):_=e[3];let y;e[4]!==l?(y=t.jsx("button",{type:"button",onClick:l,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]=l,e[5]=y):y=e[5];let T;return e[6]!==_||e[7]!==y?(T=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[v,_,y]}),e[6]=_,e[7]=y,e[8]=T):T=e[8],T}const d=n==="authenticating";let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(z,{className:"size-5 text-foreground"})}),e[9]=f):f=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"relative size-10",children:[f,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(U,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=m):m=e[10];const p=d?"Authenticating with GitHub":"Setting up GitHub";let b;e[11]!==p?(b=t.jsx("p",{className:"text-sm font-medium",children:p}),e[11]=p,e[12]=b):b=e[12];const i=d?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let h;e[13]!==i?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:i}),e[13]=i,e[14]=h):h=e[14];let c;e[15]!==b||e[16]!==h?(c=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[b,h]}),e[15]=b,e[16]=h,e[17]=c):c=e[17];const g=d?"bg-muted-foreground/30":"bg-foreground animate-pulse";let w;e[18]!==g?(w=V("size-1.5 rounded-full",g),e[18]=g,e[19]=w):w=e[19];let j;e[20]!==w?(j=t.jsx("span",{className:w}),e[20]=w,e[21]=j):j=e[21];const N=d?"bg-foreground animate-pulse":"bg-muted-foreground/30";let C;e[22]!==N?(C=V("size-1.5 rounded-full",N),e[22]=N,e[23]=C):C=e[23];let x;e[24]!==C?(x=t.jsx("span",{className:C}),e[24]=C,e[25]=x):x=e[25];let u;e[26]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=u):u=e[26];let a;e[27]!==j||e[28]!==x?(a=t.jsxs("div",{className:"flex items-center gap-1.5",children:[j,x,u]}),e[27]=j,e[28]=x,e[29]=a):a=e[29];let I;return e[30]!==a||e[31]!==c?(I=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[m,c,a]}),e[30]=a,e[31]=c,e[32]=I):I=e[32],I}export{it as G,z as a,Te as b,Ee as g,rt as i,Z as p,Re as u};
@@ -1,4 +1,4 @@
1
- import{L as St,cq as Et,cr as It,be as R,s as c,cs as de,bk as ze,br as Tt,bd as wt,ac as At,az as O,ay as q,aw as oe,o as _,bf as f,a$ as F,ct as Mt,cu as E,ax as Ot,t as ve,r as Y,c as Ie,D as Ct,j as Rt}from"./index-BUtSNxMV.js";import{u as Nt}from"./use-mcp-client-ytX3rIBe.js";import{S as xt}from"./constants-C8_Swa4x.js";import{d as Pt,D as Dt}from"./decopilot-sse-pool-Ct1_UW6D.js";import{d as Lt}from"./delay-CnY5UFtP.js";import{e as kt}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 Me;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Me||(Me={}));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={}));const jt=1e4,Hr="true";function fe(t,e){return St.chatAutosend(t,e)}function Zt(t){return t==="pending"||t==="sending"}function $t(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}return!e||typeof e!="object"||typeof e.createdAt!="number"||typeof e.message!="object"||!Zt(e.status)?null:e}function Gr(t,e,a,r,s=Date.now()){const o={message:r,createdAt:s,status:"pending"};return t.setItem(fe(e,a),JSON.stringify(o)),o}function Ut(t,e,a){const r=fe(e,a),s=$t(t.getItem(r));return s||(t.removeItem(r),null)}function Xr(t,e,a,r=Date.now()){const s=fe(e,a),o=Ut(t,e,a);return!o||o.status!=="pending"?null:r-o.createdAt>=jt?(t.removeItem(s),null):(t.setItem(s,JSON.stringify({...o,status:"sending"})),{message:o.message,createdAt:o.createdAt})}function Qr(t,e,a){t.removeItem(fe(e,a))}var Je="vercel.ai.error",Ft=Symbol.for(Je),Ce,Re,Z=class Ye extends(Re=Error,Ce=Ft,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ye.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 qe(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var We="AI_InvalidArgumentError",He=`vercel.ai.error.${We}`,Bt=Symbol.for(He),Ne,xe,Vt=class extends(xe=Z,Ne=Bt,xe){constructor({message:t,cause:e,argument:a}){super({name:We,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,He)}},Ge="AI_JSONParseError",Xe=`vercel.ai.error.${Ge}`,zt=Symbol.for(Xe),Pe,De,Le=class extends(De=Z,Pe=zt,De){constructor({text:t,cause:e}){super({name:Ge,message:`JSON parsing failed: Text: ${t}.
1
+ import{L as St,cq as Et,cr as It,be as R,s as c,cs as de,bk as ze,br as Tt,bd as wt,ac as At,az as O,ay as q,aw as oe,o as _,bf as f,a$ as F,ct as Mt,cu as E,ax as Ot,t as ve,r as Y,c as Ie,D as Ct,j as Rt}from"./index-pPjXkMWO.js";import{u as Nt}from"./use-mcp-client-CrFimBIE.js";import{S as xt}from"./constants-C8_Swa4x.js";import{d as Pt,D as Dt}from"./decopilot-sse-pool-DKy1YCA-.js";import{d as Lt}from"./delay-CnY5UFtP.js";import{e as kt}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 Me;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Me||(Me={}));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={}));const jt=1e4,Hr="true";function fe(t,e){return St.chatAutosend(t,e)}function Zt(t){return t==="pending"||t==="sending"}function $t(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}return!e||typeof e!="object"||typeof e.createdAt!="number"||typeof e.message!="object"||!Zt(e.status)?null:e}function Gr(t,e,a,r,s=Date.now()){const o={message:r,createdAt:s,status:"pending"};return t.setItem(fe(e,a),JSON.stringify(o)),o}function Ut(t,e,a){const r=fe(e,a),s=$t(t.getItem(r));return s||(t.removeItem(r),null)}function Xr(t,e,a,r=Date.now()){const s=fe(e,a),o=Ut(t,e,a);return!o||o.status!=="pending"?null:r-o.createdAt>=jt?(t.removeItem(s),null):(t.setItem(s,JSON.stringify({...o,status:"sending"})),{message:o.message,createdAt:o.createdAt})}function Qr(t,e,a){t.removeItem(fe(e,a))}var Je="vercel.ai.error",Ft=Symbol.for(Je),Ce,Re,Z=class Ye extends(Re=Error,Ce=Ft,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ye.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 qe(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var We="AI_InvalidArgumentError",He=`vercel.ai.error.${We}`,Bt=Symbol.for(He),Ne,xe,Vt=class extends(xe=Z,Ne=Bt,xe){constructor({message:t,cause:e,argument:a}){super({name:We,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,He)}},Ge="AI_JSONParseError",Xe=`vercel.ai.error.${Ge}`,zt=Symbol.for(Xe),Pe,De,Le=class extends(De=Z,Pe=zt,De){constructor({text:t,cause:e}){super({name:Ge,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${qe(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}`,Jt=Symbol.for(Ke),ke,je,X=class ye extends(je=Z,ke=Jt,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: ${qe(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 ye.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 ye({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 Vt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Yt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,qt=/"(?: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"||Yt.test(t)===!1&&qt.test(t)===!1?e:Wt(e)}function Wt(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 Ht(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 Gt=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"},Xt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Qt(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 Kt(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 ea(){return{type:"boolean"}}function et(t,e){return b(t.type._def,e)}var ta=(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 aa(t)}}var aa=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 ra(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function sa(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function na(t){return{type:"string",enum:Array.from(t.values)}}var oa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ia(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(oa(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 la(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 he=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:()=>(he===void 0&&(he=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),he),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":M(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":M(a,r.regex,r.message,e);break;case"cuid":M(a,P.cuid,r.message,e);break;case"cuid2":M(a,P.cuid2,r.message,e);break;case"startsWith":M(a,RegExp(`^${ge(r.value,e)}`),r.message,e);break;case"endsWith":M(a,RegExp(`${ge(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":{M(a,RegExp(ge(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":M(a,P.base64url,r.message,e);break;case"jwt":M(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&M(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&M(a,P.ipv6Cidr,r.message,e);break}case"emoji":M(a,P.emoji(),r.message,e);break;case"ulid":{M(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":{M(a,P.base64,r.message,e);break}}break}case"nanoid":M(a,P.nanoid,r.message,e)}return a}function ge(t,e){return e.patternStrategy==="escape"?da(t):t}var ua=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function da(t){let e="";for(let a=0;a<t.length;a++)ua.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 M(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
@@ -1,4 +1,4 @@
1
- import{r as a,a3 as R}from"./index-BUtSNxMV.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as a,a3 as R}from"./index-pPjXkMWO.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oe(e,t){if(e==null)return{};var r,n,o=je(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function je(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Me(e,t){return me(e)||ye(e,t)||Ee(e,t)||we()}function Pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Se(e){var t=Pe(e,"string");return typeof t=="symbol"?t:t+""}function Ee(e,t){if(e){if(typeof e=="string")return re(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function Re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(n){Re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function A(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function F(e){return{}.toString.call(e).includes("Object")}function Te(e){return!Object.keys(e).length}function D(e){return typeof e=="function"}function Ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Le(e,t){return F(t)||P("changeType"),Object.keys(t).some(function(r){return!Ce(e,r)})&&P("changeField"),t}function Ae(e){D(e)||P("selectorType")}function $e(e){D(e)||F(e)||P("handlerType"),F(e)&&Object.values(e).some(function(t){return!D(t)})&&P("handlersType")}function De(e){e||P("initialIsRequired"),F(e)||P("initialType"),Te(e)&&P("initialContent")}function Ve(e,t){throw new Error(e[t]||e.default)}var xe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},P=A(Ve)(xe),q={changes:Le,selector:Ae,handler:$e,initial:De};function Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};q.initial(e),q.handler(t);var r={current:e},n=A(Fe)(r,t),o=A(ze)(r),i=A(q.changes)(e),c=A(qe)(r);function s(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return q.selector(p),p(r.current)}function f(p){Ie(n,o,i,c)(p)}return[s,f]}function qe(e,t){return D(t)?t(e.current):t}function ze(e,t){return e.current=ae(ae({},e.current),t),t}function Fe(e,t,r){return D(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ue={create:Ne},He={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function We(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function Be(e){return{}.toString.call(e).includes("Object")}function Ke(e){return e||ue("configIsRequired"),Be(e)||ue("configType"),e.urls?(Ge(),{paths:{vs:e.urls.monacoBase}}):e}function Ge(){console.warn(ce.deprecation)}function Ye(e,t){throw new Error(e[t]||e.default)}var ce={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
3
3
  You are using deprecated way of configuration.
4
4
 
@@ -1,4 +1,4 @@
1
- import{c as oe,r as K,b as yt,D as Be,j as t,B as Z,t as Se,l as de,K as it,k as wt,W as rs,u as os,v as xt,E as ls}from"./index-BUtSNxMV.js";import{S as as}from"./search-input-CgRadFHi.js";import{P as De}from"./index-B4ybF-Jh.js";import{E as St}from"./empty-state-D4vz7sAz.js";import{R as ns}from"./require-capability-B4WZYZM4.js";import{K as Tt,S as is}from"./scroll-area-dCf_ML-5.js";import{u as vt}from"./use-connection-BTrFuX_N.js";import{g as Pt}from"./connection-slug-eyAPH6o3.js";import{B as rt}from"./badge-CYqiGv_0.js";import{P as ct,a as dt,b as mt}from"./popover-leYVnzzq.js";import{T as Ze,a as et,b as tt}from"./tooltip-PSiaLaWJ.js";import{i as ft}from"./Check-CWR2GX_4.js";import{a as Xe}from"./Copy01-C_vDrK62.js";import{n as Mt}from"./Globe01-pYyw4zjF.js";import{i as At}from"./FilterLines-YtMlMBJN.js";import{i as cs}from"./Key01-BGm5x2_7.js";import{i as ds}from"./Play-DrXY2oRx.js";import{aq as ms,Y as us,L as xs}from"./agent-icon-CRPqtjX6.js";import{M as _t}from"./monaco-editor-DdObp8MJ.js";import{u as fs}from"./use-members-BFNAbzwS.js";import{u as ps}from"./use-mcp-client-ytX3rIBe.js";import{u as hs}from"./use-virtual-mcp-DoBqiTt8.js";import{S as gs,W as js}from"./constants-C8_Swa4x.js";import{n as Qe}from"./XCircle-DRgrnFcC.js";import{c as vs}from"./SwitchHorizontal01-DAV6AujY.js";import{s as Ns}from"./Plus-j1oUcvSs.js";import{s as bs}from"./Trash01-Bf3SN1nH.js";import{I as Ge}from"./input-CVpmA2Kz.js";import{C as ys,g as ws,b as Dt,f as st,a as Vt,c as pt,d as Ss,e as Lt,h as Ut,A as Is,T as Cs,i as ks,M as ht}from"./automation-runs-Bo90h8_b.js";import{S as ot,a as lt,b as at,c as $e,d as nt}from"./select-CRwP8DNI.js";import{t as Kt}from"./ChevronDown-BOnFs3ZP.js";import{s as Ts}from"./Stars02-C0LkLtPv.js";import{T as Ms}from"./textarea-DXtj6szK.js";import{C as qt}from"./collection-tabs-2clxo3lG.js";import{S as _s}from"./switch-CGRWKftH.js";import{L as Ds}from"./label-CHYsX_t_.js";import{I as qe}from"./integration-icon-DN2_9kxR.js";import{A as Bt}from"./avatar-DN0SQ2YP.js";import{A as Ls,a as Fs,b as Rs}from"./alert-BSFVY_ft.js";import{C as Ht}from"./card-D9G2yXrJ.js";import{K as Me}from"./monitoring-stats-row-CLTH09T0.js";import{u as Jt}from"./studio-tools-BBJKqBLb.js";import{u as $s}from"./useSuspenseInfiniteQuery-COveRdn6.js";import{b as zs,S as Os,c as Es,d as Ps}from"./sheet-DtNuWaQa.js";import{T as Fe,a as ut,b as Gt,c as Qt,d as Wt,e as ae}from"./table-CES495US.js";import{n as As}from"./ChevronUp-CkMhjJB_.js";import{u as Vs}from"./use-infinite-scroll-ziAI3qTA.js";import{c as Us,b as Ks}from"./use-automations-b_vrwPQ_.js";import"./SearchMd-Cmh57xGa.js";import"./sidebar-IpepvLp_.js";import"./LayoutLeft-WEbo8J87.js";import"./use-mobile-dwrFF7Ga.js";import"./use-capability-BrY7n9pF.js";import"./access-gate-DPOW1JQt.js";import"./capability-load-error-DIVlJMVm.js";import"./Stars01-Ch3VikRv.js";import"./ChevronRight--Sw9cfbS.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CUt0RcPi.js";import"./file-type-icon-QdIQBEjI.js";import"./dialog-fRprLEhn.js";import"./X-C0ZgGoQb.js";import"./ZoomOut-B4weRH-H.js";import"./tab-id-CLpu897Q.js";import"./content-blocks-o63cs2vh.js";import"./types-dxyE9Hx8.js";import"./chat-context-DIUSa9Jr.js";import"./hooks-G0kJppE-.js";import"./decopilot-sse-pool-Ct1_UW6D.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-BfSwDb4T.js";import"./use-decopilot-events-CB_ilHxh.js";import"./use-organization-settings-DLQ_RcCc.js";import"./AlertCircle-CLapFvcx.js";import"./Eye-DCiEQJIv.js";import"./Star01-DgFqZM1H.js";import"./XClose-CmJ8_Kxi.js";import"./ZapSquare-BtUSi6w5.js";import"./Tool01-Csfd8Wry.js";import"./Monitor01-CjaozmNA.js";import"./Upload01-BYEqY1Ay.js";import"./use-clock-tick-DCObx26s.js";import"./shell-layout-CFR90kZQ.js";import"./Users03-kFy3UJPi.js";import"./SearchLg-Dt-H4O3z.js";import"./CheckCircle-BJr7jKsb.js";import"./Zap-CjHl9Hth.js";import"./alert-dialog-DseQ_eoR.js";import"./required-auth-layout-BGUbgKtE.js";import"./use-org-sso--qDPTafN.js";import"./LinkExternal01-C9wAno25.js";import"./ArrowUpRight-DYI4ZFTv.js";import"./Palette-DX20ptpQ.js";import"./use-navigate-to-agent-3AMa0O2a.js";import"./use-mcp-prompts-DGlgK9Vf.js";import"./form-Cciq6tIX.js";import"./use-collections-BkB7fOzG.js";import"./Settings02-CtgBTtnW.js";import"./Circle-CSNCa0Ai.js";import"./Loading02-BY5Z_ytL.js";import"./DotsVertical-CVxu5D2B.js";import"./Globe04-B5LRDZX0.js";import"./HardDrive-Bt_8Ilkp.js";import"./List-wZrVQa3Y.js";import"./Sun-D-D5LZ02.js";import"./Shield01-BsAF4snY.js";import"./User01-C7pBq15o.js";import"./Users01-9SoD8uT4.js";import"./index-BOeQzDmj.js";import"./use-org-auth-client-BUcY_yRN.js";import"./auth-YT0L3u0f.js";import"./useInfiniteQuery-DX_yJgCV.js";import"./task-status-BgxqbUD3.js";import"./checkbox-DCa6681A.js";import"./command-qHaitSxv.js";import"./index-BJ4F5Cgi.js";import"./index-C8pUNf9d.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Re(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),o=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${o}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,o,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:o||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{c as oe,r as K,b as yt,D as Be,j as t,B as Z,t as Se,l as de,K as it,k as wt,W as rs,u as os,v as xt,E as ls}from"./index-pPjXkMWO.js";import{S as as}from"./search-input-Br6kvm4V.js";import{P as De}from"./index-CDriDNRl.js";import{E as St}from"./empty-state-xwWZSkhQ.js";import{R as ns}from"./require-capability-BpL4yVhr.js";import{K as Tt,S as is}from"./scroll-area-BwQt66gB.js";import{u as vt}from"./use-connection-HPYIB1L_.js";import{g as Pt}from"./connection-slug-eyAPH6o3.js";import{B as rt}from"./badge-Dxl2nD6L.js";import{P as ct,a as dt,b as mt}from"./popover-B9_4d9Hb.js";import{T as Ze,a as et,b as tt}from"./tooltip-BSvDzA5F.js";import{i as ft}from"./Check-CUC1zRnb.js";import{a as Xe}from"./Copy01-C-7fHSay.js";import{n as Mt}from"./Globe01-Dz7J456-.js";import{i as At}from"./FilterLines-DFbyXaVS.js";import{i as cs}from"./Key01-DBAS-H0R.js";import{i as ds}from"./Play-BZWHu6vA.js";import{aq as ms,Y as us,L as xs}from"./agent-icon-BBTxD8Vr.js";import{M as _t}from"./monaco-editor-mtUMAQ2f.js";import{u as fs}from"./use-members-BRBh_r2f.js";import{u as ps}from"./use-mcp-client-CrFimBIE.js";import{u as hs}from"./use-virtual-mcp-Bc1u53Yq.js";import{S as gs,W as js}from"./constants-C8_Swa4x.js";import{n as Qe}from"./XCircle-DMTLazaF.js";import{c as vs}from"./SwitchHorizontal01-BSA9bywH.js";import{s as Ns}from"./Plus-CToP0bbt.js";import{s as bs}from"./Trash01-BDWbYvcu.js";import{I as Ge}from"./input-D3oAzmpd.js";import{C as ys,g as ws,b as Dt,f as st,a as Vt,c as pt,d as Ss,e as Lt,h as Ut,A as Is,T as Cs,i as ks,M as ht}from"./automation-runs-98bvfxso.js";import{S as ot,a as lt,b as at,c as $e,d as nt}from"./select-CNB5fe3p.js";import{t as Kt}from"./ChevronDown-B1mct1yp.js";import{s as Ts}from"./Stars02-CJRC9WOX.js";import{T as Ms}from"./textarea-_7jiD7tD.js";import{C as qt}from"./collection-tabs-ChhCmRrP.js";import{S as _s}from"./switch-Czifg4wP.js";import{L as Ds}from"./label-CN7heivZ.js";import{I as qe}from"./integration-icon-ChiNtR71.js";import{A as Bt}from"./avatar-qkTmk1tF.js";import{A as Ls,a as Fs,b as Rs}from"./alert-BZSGiHUj.js";import{C as Ht}from"./card-BmfGcj0O.js";import{K as Me}from"./monitoring-stats-row-cGUx_q_d.js";import{u as Jt}from"./studio-tools-D16Iabf3.js";import{u as $s}from"./useSuspenseInfiniteQuery-HmJ78SJB.js";import{b as zs,S as Os,c as Es,d as Ps}from"./sheet-1qlQOBan.js";import{T as Fe,a as ut,b as Gt,c as Qt,d as Wt,e as ae}from"./table-DPQQ4yes.js";import{n as As}from"./ChevronUp-Bu7-a85r.js";import{u as Vs}from"./use-infinite-scroll-BGEZaC_d.js";import{c as Us,b as Ks}from"./use-automations-DS7x_Yka.js";import"./SearchMd-Dx8opdKE.js";import"./sidebar-qR7l9LGc.js";import"./LayoutLeft-PT-KYBVh.js";import"./use-mobile-CcaXr_ZY.js";import"./use-capability-DXxanrFU.js";import"./access-gate-twsl8uHV.js";import"./capability-load-error-BRk5Albu.js";import"./Stars01-CsOhgCzT.js";import"./ChevronRight-C_4FW4NO.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BucqFRkh.js";import"./file-type-icon-B6nuKI0W.js";import"./dialog-xw_WZv6d.js";import"./X-CFM-EaJf.js";import"./ZoomOut-Dt1g7vVy.js";import"./tab-id-CLpu897Q.js";import"./content-blocks-o63cs2vh.js";import"./types-DSpLZCss.js";import"./chat-context-DvCifsaP.js";import"./hooks-C1eaKJ5l.js";import"./decopilot-sse-pool-DKy1YCA-.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-BlK26Pak.js";import"./use-decopilot-events-DnA17lg1.js";import"./use-organization-settings-DKhFQzFb.js";import"./AlertCircle-DP0nsq1e.js";import"./Eye-BD5GpDZ-.js";import"./Star01-CVsItQ1u.js";import"./XClose-CQ7XxXz6.js";import"./ZapSquare-DfDf_Qdm.js";import"./Tool01-MTiJaetc.js";import"./Monitor01-CsiKf4Vb.js";import"./Upload01-DNJ4y_co.js";import"./use-clock-tick-CqbmcogF.js";import"./shell-layout-D5fv0Gnj.js";import"./Users03-tyWJCIG0.js";import"./SearchLg-YHk3bRUf.js";import"./CheckCircle-BsrExj4H.js";import"./Zap-B6Y5QNOW.js";import"./alert-dialog-zbSvd7Ki.js";import"./required-auth-layout-Cc06WCjO.js";import"./use-org-sso-DOBO5bz0.js";import"./LinkExternal01-DYdIsix1.js";import"./ArrowUpRight-3SkCtZ7K.js";import"./Palette-Bh8DSKBB.js";import"./use-navigate-to-agent-hUrzXW4j.js";import"./use-mcp-prompts-BLaH_phU.js";import"./form-BDEEsjow.js";import"./use-collections-E89pjH-z.js";import"./Settings02-DszLgCXG.js";import"./Circle-D65-cV8s.js";import"./Loading02-1-7GqxDm.js";import"./DotsVertical-BaKPV3I-.js";import"./Globe04-ninCQ4l6.js";import"./HardDrive-DghaQYox.js";import"./List-CR20iQn1.js";import"./Sun-CfFmz0ui.js";import"./Shield01-DTqhedHO.js";import"./User01-BnV8b2oc.js";import"./Users01-CeDec9Hr.js";import"./index-BfM-TSSf.js";import"./use-org-auth-client-CuoSRLLT.js";import"./auth-BALlir75.js";import"./useInfiniteQuery-B0z5w_RI.js";import"./task-status-BfQFLXYY.js";import"./checkbox-CfEEJY30.js";import"./command-D2GI_S2n.js";import"./index-yPrRyIJq.js";import"./index-VN20CUPz.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Re(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),o=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${o}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,o,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:o||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function Ft(s){return s.trim()?s.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[r,...o]=e.split("=");return{key:r||"",operator:"eq",value:o.join("=")}}if(e.includes("~")){const[r,...o]=e.split("~");return{key:r||"",operator:"contains",value:o.join("~")}}if(e.includes("@")){const[r,...o]=e.split("@");return{key:r||"",operator:"in",value:o.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Bs(s){const e={},r={},o=[],a={};for(const l of s)if(l.key.trim())switch(l.operator){case"eq":l.value&&(e[l.key]=l.value);break;case"contains":l.value&&(r[l.key]=`%${l.value}%`);break;case"exists":o.push(l.key);break;case"in":l.value&&(a[l.key]=l.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(r).length>0?r:void 0,propertyKeys:o.length>0?o:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function Rt(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof s._decocms_truncated=="string")return{content:s._decocms_truncated,isTruncated:!0,originalSize:s._decocms_truncated.length};const e=JSON.stringify(s,null,2),r=e.length;return r<=Nt.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:r}:{content:e.slice(0,Nt.maxJsonRenderSize)+`
4
4
 
@@ -1 +1 @@
1
- import{r as h}from"./index-BUtSNxMV.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
1
+ import{r as h}from"./index-pPjXkMWO.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
@@ -1 +1 @@
1
- import{c as f,l as d,r as p,j as r}from"./index-BUtSNxMV.js";import{m as w}from"./sidebar-IpepvLp_.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
1
+ import{c as f,l as d,r as p,j as r}from"./index-pPjXkMWO.js";import{m as w}from"./sidebar-qR7l9LGc.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};