decocms 4.92.3 → 4.94.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/dist/client/assets/{AlertCircle-B9GlbKHh.js → AlertCircle-C1QMMByE.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DHN9bK0l.js → AreaChart-q7Xrveeh.js} +1 -1
  3. package/dist/client/assets/ArrowRight-CMDrgznR.js +1 -0
  4. package/dist/client/assets/{ArrowUp-DNZsq7Zt.js → ArrowUp-DH3o_6rV.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-DZZygrAi.js → ArrowUpRight-ChAriHcE.js} +1 -1
  6. package/dist/client/assets/Check-CfdDVvTz.js +1 -0
  7. package/dist/client/assets/{CheckCircle-BEcdXH7-.js → CheckCircle-DLrShk9W.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-BSRiDjXd.js → ChevronDown-BRbMyZ1B.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-YmTewr_B.js → ChevronRight-Ck0jEpLN.js} +1 -1
  10. package/dist/client/assets/ChevronUp-BT9WG4FQ.js +1 -0
  11. package/dist/client/assets/{Copy01-BkGYkmm-.js → Copy01-Du_h2a2a.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-BmTi7wpl.js → DotsVertical-DuorjQq1.js} +1 -1
  13. package/dist/client/assets/{Eye-B-ZfWIGj.js → Eye-IdG-7KTy.js} +1 -1
  14. package/dist/client/assets/{FilterLines-BwWG7tAk.js → FilterLines-VrXrRt9f.js} +1 -1
  15. package/dist/client/assets/{Globe01-D3vBqhI7.js → Globe01-FT_j78GO.js} +1 -1
  16. package/dist/client/assets/{Globe04-pvxBukgJ.js → Globe04-BktKmpI1.js} +1 -1
  17. package/dist/client/assets/{HardDrive-DutZPQFL.js → HardDrive-y6RDSyxS.js} +1 -1
  18. package/dist/client/assets/{Image01-PIeYnf-K.js → Image01-jwttKGpp.js} +1 -1
  19. package/dist/client/assets/{Key01-DhLD806C.js → Key01-CTHo646W.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-BI-sXAac.js → LayoutLeft-DDdEDKm1.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-DO3QnLus.js → LinkExternal01-Dw89NskH.js} +1 -1
  22. package/dist/client/assets/{Monitor01-BOILvS2u.js → Monitor01-D8aw2U1c.js} +1 -1
  23. package/dist/client/assets/{Package-DbEcG94t.js → Package-Bl4wI6gQ.js} +1 -1
  24. package/dist/client/assets/{Palette-CyZvWKmI.js → Palette-Bb5lq-lb.js} +1 -1
  25. package/dist/client/assets/{Play-B8fWmOst.js → Play-h_GYgW2i.js} +1 -1
  26. package/dist/client/assets/{Plus-2c1jULco.js → Plus-DW8HTiM4.js} +1 -1
  27. package/dist/client/assets/{SearchLg-XmvudKlH.js → SearchLg-CuxPI6CH.js} +1 -1
  28. package/dist/client/assets/{SearchMd-lwIiBODG.js → SearchMd-B_vHLGSV.js} +1 -1
  29. package/dist/client/assets/{Settings02-DMpqOK24.js → Settings02-DkDTX6wF.js} +1 -1
  30. package/dist/client/assets/{Shield01-gTFc9c17.js → Shield01-BTjWMfyt.js} +1 -1
  31. package/dist/client/assets/{Star01-DoUbKevt.js → Star01-IywRndO8.js} +1 -1
  32. package/dist/client/assets/{Stars01-CJsm_THn.js → Stars01-awBCSC7p.js} +1 -1
  33. package/dist/client/assets/{Stars02-B08FvcHQ.js → Stars02-CWszz6x7.js} +1 -1
  34. package/dist/client/assets/{Sun-nDXz4jeM.js → Sun-CKE25B6W.js} +1 -1
  35. package/dist/client/assets/{SwitchHorizontal01-Rgis0XWf.js → SwitchHorizontal01-mvedp9Fy.js} +1 -1
  36. package/dist/client/assets/{Tool01-BR3IBeV9.js → Tool01-CiB1AgGO.js} +1 -1
  37. package/dist/client/assets/{Tool02-B0-a0UMl.js → Tool02-DatlcCMD.js} +1 -1
  38. package/dist/client/assets/{Trash01-Ba6bCbNY.js → Trash01-BFrDxOoF.js} +1 -1
  39. package/dist/client/assets/{TrendUp01-CeRF_789.js → TrendUp01-CtjoH8ZL.js} +1 -1
  40. package/dist/client/assets/{Upload01-B14IruoN.js → Upload01-BbY627dR.js} +1 -1
  41. package/dist/client/assets/{User01-ByIE6k8L.js → User01-JYrKFpRC.js} +1 -1
  42. package/dist/client/assets/{Users01-BdldAr7H.js → Users01-C_vPeB-O.js} +1 -1
  43. package/dist/client/assets/{Users03-Bx4g7VTC.js → Users03-uSqerTaX.js} +1 -1
  44. package/dist/client/assets/{X-Dif5I5BD.js → X-BWhzmnUU.js} +1 -1
  45. package/dist/client/assets/XCircle-C1KpQxmr.js +1 -0
  46. package/dist/client/assets/{XClose-DomD4542.js → XClose-CVT1rN5P.js} +1 -1
  47. package/dist/client/assets/{Zap-CEUVQQOc.js → Zap-yAX2Kmmw.js} +1 -1
  48. package/dist/client/assets/{ZapSquare-EvC2T9CP.js → ZapSquare-BrF3B-Lj.js} +1 -1
  49. package/dist/client/assets/{ZoomOut-BprgOfkE.js → ZoomOut-HpkK_jz9.js} +1 -1
  50. package/dist/client/assets/{access-gate-NCJKEJqO.js → access-gate-DNuevEtG.js} +1 -1
  51. package/dist/client/assets/add-section-modal-WI9lCqFk.js +1 -0
  52. package/dist/client/assets/agent-icon-C6bqiv4x.js +1 -0
  53. package/dist/client/assets/agents-list-CE_MFd_Q.js +1 -0
  54. package/dist/client/assets/ai-providers-Mqj9mjNl.js +1 -0
  55. package/dist/client/assets/{alert-C_4AvGUo.js → alert-C26tfGUe.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-DDtUbhoS.js → alert-dialog-BeSbCM7Y.js} +2 -2
  57. package/dist/client/assets/app-editor-YNDE1p_g.js +1 -0
  58. package/dist/client/assets/{auth-CsHQFHV_.js → auth-C9enaQvD.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-_TQy6GDd.js → auth-catchall-v4deh7e8.js} +1 -1
  60. package/dist/client/assets/{auth-entry-_ePf9_J1.js → auth-entry-C5zoJOD9.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-D9UYTbxy.js → auth-split-layout-Fi3vrH81.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-CEv4KtcH.js → authenticate-and-persist-oauth-pF30Ku2c.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-CyDHI_uf.js → automation-list-row-CAdX-w7a.js} +1 -1
  64. package/dist/client/assets/{automation-runs-D8v8nlly.js → automation-runs-CA0Zbin0.js} +5 -5
  65. package/dist/client/assets/automations-B-DWN4QS.js +1 -0
  66. package/dist/client/assets/{autosend-BgYoPuWD.js → autosend-CxPf5RKw.js} +1 -1
  67. package/dist/client/assets/{avatar-BVdHZbMN.js → avatar-CMlDI2D-.js} +1 -1
  68. package/dist/client/assets/{badge-C_9mnuBd.js → badge-BIKuZNrQ.js} +1 -1
  69. package/dist/client/assets/{block-document-CcMdXbqY.js → block-document-BioV5ZZf.js} +1 -1
  70. package/dist/client/assets/{brand-context-B-nZCoNx.js → brand-context-BphHJ3m4.js} +1 -1
  71. package/dist/client/assets/buckets-DhtwEFa3.js +1 -0
  72. package/dist/client/assets/bulk-category-panel-ChriKUsA.js +1 -0
  73. package/dist/client/assets/{calendar-Bxkf6gvE.js → calendar-CcmR6PZG.js} +1 -1
  74. package/dist/client/assets/{capability-load-error-i6NCyxxk.js → capability-load-error-Bn3urkKl.js} +1 -1
  75. package/dist/client/assets/{card-C3gg1LtP.js → card-Dd8gUiG_.js} +1 -1
  76. package/dist/client/assets/category-editor-DI3VJHNG.js +1 -0
  77. package/dist/client/assets/{chat-context-DSveBxCg.js → chat-context-Bn6Q6CeX.js} +12 -12
  78. package/dist/client/assets/checkbox-D0oew71k.js +1 -0
  79. package/dist/client/assets/{cli-auth-success-Cc2B25iW.js → cli-auth-success-ejQ9leoQ.js} +1 -1
  80. package/dist/client/assets/collection-detail-BwkpwNjs.js +1 -0
  81. package/dist/client/assets/collection-display-button-C1K9dOzY.js +1 -0
  82. package/dist/client/assets/{collection-search-TcSAZpqK.js → collection-search-B_OixFPO.js} +1 -1
  83. package/dist/client/assets/{collection-table-wrapper-H4bzUKoO.js → collection-table-wrapper-CKE2AAdw.js} +1 -1
  84. package/dist/client/assets/{collection-tabs-CIRa_M2W.js → collection-tabs-BbylyFFO.js} +1 -1
  85. package/dist/client/assets/{command-3z1R7bvy.js → command-CBlINdWQ.js} +1 -1
  86. package/dist/client/assets/commerce-onboarding-DOHVN1dn.js +1 -0
  87. package/dist/client/assets/{companions-core-C68sN4Wc.js → companions-core-CBtA8C2P.js} +1 -1
  88. package/dist/client/assets/connect-B_w51Pf2.js +8 -0
  89. package/dist/client/assets/connect-desktop-dialog-CS8xcpUf.js +1 -0
  90. package/dist/client/assets/{connection-card-D_K36Swx.js → connection-card-DgbR5Mwx.js} +1 -1
  91. package/dist/client/assets/connection-detail-BOoPBRpC.js +1 -0
  92. package/dist/client/assets/{connection-form-helpers-DyOAEqE9.js → connection-form-helpers-DKOWpJ-1.js} +1 -1
  93. package/dist/client/assets/connections-C4oqxMQG.js +1 -0
  94. package/dist/client/assets/{decopilot-sse-pool-CEQrv8Fn.js → decopilot-sse-pool-D92X3fNc.js} +1 -1
  95. package/dist/client/assets/{dialog-DUqhzGiD.js → dialog-a73gSkG2.js} +1 -1
  96. package/dist/client/assets/{domain-settings-CRIqu0Bs.js → domain-settings-DkMlfYSa.js} +1 -1
  97. package/dist/client/assets/{drawer-DvhdIHph.js → drawer-BU_sOAKq.js} +1 -1
  98. package/dist/client/assets/dropdown-menu-QheVZMJA.js +1 -0
  99. package/dist/client/assets/{empty-state-BHuw6cM9.js → empty-state-CMGZe-XE.js} +1 -1
  100. package/dist/client/assets/{extract-connection-data-_NDoBHMa.js → extract-connection-data-DB1JAVkl.js} +1 -1
  101. package/dist/client/assets/file-explorer-BjIj9REP.js +2 -0
  102. package/dist/client/assets/{file-type-icon-BOCZKON3.js → file-type-icon-D7Qv-wcj.js} +1 -1
  103. package/dist/client/assets/{files-CelFf8dg.js → files-BSWFZOxo.js} +1 -1
  104. package/dist/client/assets/{form-C9InGmo4.js → form-hOrojcOx.js} +1 -1
  105. package/dist/client/assets/general-CNP1ZbZe.js +1 -0
  106. package/dist/client/assets/{github-repo-picker-Biy9UFu8.js → github-repo-picker-BlPGLfgP.js} +1 -1
  107. package/dist/client/assets/{hooks-DU-2h9eZ.js → hooks-Ck4NS0BB.js} +1 -1
  108. package/dist/client/assets/index-B5Jok_EG.js +1 -0
  109. package/dist/client/assets/index-B7jBuFkn.css +1 -0
  110. package/dist/client/assets/index-BK8i2815.js +1 -0
  111. package/dist/client/assets/{index-f6gbzJ8b.js → index-BPUUTwje.js} +1 -1
  112. package/dist/client/assets/{index-DBhNC4I_.js → index-BZIMlfJW.js} +1 -1
  113. package/dist/client/assets/{index-DnrPO2j2.js → index-Bm76WXPR.js} +1 -1
  114. package/dist/client/assets/{index-DmhdwAgP.js → index-CIFSbzEF.js} +14 -14
  115. package/dist/client/assets/{index-BOgwoJjn.js → index-CISUQ4JK.js} +1 -1
  116. package/dist/client/assets/{index-CbhDnqOu.js → index-CSvkeXqd.js} +1 -1
  117. package/dist/client/assets/{index-Du80fsxC.js → index-Cotl-Dca.js} +5 -5
  118. package/dist/client/assets/index-CufVwosA.js +8 -0
  119. package/dist/client/assets/{index-CO3868Cu.js → index-D1R93mn_.js} +1 -1
  120. package/dist/client/assets/{index-DivFugQC.js → index-DPgVKNjM.js} +1 -1
  121. package/dist/client/assets/{index-nNhZx5bw.js → index-QQfVHF6c.js} +14 -14
  122. package/dist/client/assets/{index-Cs6hIS7C.js → index-UORAMw49.js} +3 -3
  123. package/dist/client/assets/{index-redirect-hJFu02mm.js → index-redirect-B3FtJ7Sm.js} +1 -1
  124. package/dist/client/assets/{input-TkvVVsQL.js → input-COKCWjWn.js} +1 -1
  125. package/dist/client/assets/{integration-icon-CWb3OXTV.js → integration-icon-8ogu7iqA.js} +1 -1
  126. package/dist/client/assets/{invite-member-dialog-BA1mFY2X.js → invite-member-dialog-BSRSJdKr.js} +1 -1
  127. package/dist/client/assets/{label-CB2o7dZ2.js → label-BCtHDi1-.js} +1 -1
  128. package/dist/client/assets/{layout-CqMMMVMm.js → layout-D82AWRF8.js} +1 -1
  129. package/dist/client/assets/{login-B0EX352Z.js → login-CmLx6gdY.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-B5rKpHdd.js → mcp-oauth-C4qKLSfa.js} +1 -1
  131. package/dist/client/assets/members-CdsfSF6n.js +1 -0
  132. package/dist/client/assets/{monaco-editor-DfuNvLfy.js → monaco-editor-1CxGfHM9.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-B43TP1bq.js → monitoring-stats-row-CJ1mx9EI.js} +1 -1
  134. package/dist/client/assets/{multi-select-DhXl88EK.js → multi-select-vlgbaYWz.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-CZ8I3e9V.js → oauth-callback-Dd9QqvGA.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-ai-provider-BiKjtCpj.js → oauth-callback-ai-provider-LKEqTcag.js} +1 -1
  137. package/dist/client/assets/{onboarding-U4YqP9I9.js → onboarding-Nyzpe9OQ.js} +1 -1
  138. package/dist/client/assets/{org-install-BYDat95r.js → org-install-CAemO7c_.js} +1 -1
  139. package/dist/client/assets/{org-layout-CVqWtNQa.js → org-layout-CYeMTDG5.js} +1 -1
  140. package/dist/client/assets/{organization-choice-CkG6QFWH.js → organization-choice-Bzsmy-ch.js} +1 -1
  141. package/dist/client/assets/orgs-C7gQBiuA.js +1 -0
  142. package/dist/client/assets/{page-seo-form-8ToiuKnD.js → page-seo-form-DPU2cMFP.js} +1 -1
  143. package/dist/client/assets/page-seo-sheet-Cxffc7Ri.js +1 -0
  144. package/dist/client/assets/{popover-DwV6WXHS.js → popover-MfTivQME.js} +1 -1
  145. package/dist/client/assets/post-editor-CzEfCRc6.js +1 -0
  146. package/dist/client/assets/{primitives-RdkZFzQM.js → primitives-CVKcZIrh.js} +1 -1
  147. package/dist/client/assets/profile-CZryQHJW.js +1 -0
  148. package/dist/client/assets/project-app-view-KvrG1kMx.js +1 -0
  149. package/dist/client/assets/record-editor-DXTrMUwZ.js +1 -0
  150. package/dist/client/assets/redirect-editor-Dk0CLnfu.js +1 -0
  151. package/dist/client/assets/{registry-layout-C2NoRJs0.js → registry-layout-t2McDRi7.js} +3 -3
  152. package/dist/client/assets/registry-tfN1hupx.js +2 -0
  153. package/dist/client/assets/{reports-J4B5GOoc.js → reports-C-ToD_ro.js} +2 -2
  154. package/dist/client/assets/{require-capability-DnfzULDW.js → require-capability-rAgzBn6-.js} +1 -1
  155. package/dist/client/assets/{required-auth-layout-ABsqitxw.js → required-auth-layout-KO0-1qXO.js} +1 -1
  156. package/dist/client/assets/{reset-password-CbrThkFS.js → reset-password-D1ZwK8Ps.js} +1 -1
  157. package/dist/client/assets/roles-B_p27MMh.js +1 -0
  158. package/dist/client/assets/{search-input-B-RkAjzQ.js → search-input-U68dcFxI.js} +1 -1
  159. package/dist/client/assets/secrets-Dw7rULfb.js +1 -0
  160. package/dist/client/assets/{sections-editor-BW9cZUKJ.js → sections-editor-BG6Wp1nc.js} +2 -2
  161. package/dist/client/assets/select-mGmKPAXK.js +1 -0
  162. package/dist/client/assets/{select-model-BAk08l-M.js → select-model-DTW46aHa.js} +1 -1
  163. package/dist/client/assets/self-tool-result-DYhJcSqy.js +1 -0
  164. package/dist/client/assets/seo-editor-BGid8G-R.js +1 -0
  165. package/dist/client/assets/settings-layout-BZgySvrP.js +1 -0
  166. package/dist/client/assets/{settings-section-CNVe03BK.js → settings-section-BrZlvNfy.js} +1 -1
  167. package/dist/client/assets/{shell-controls-5d4ZCRmi.js → shell-controls-nL7hKmbL.js} +1 -1
  168. package/dist/client/assets/{shell-layout-6KUu0MA6.js → shell-layout-wwtr-wuO.js} +1 -1
  169. package/dist/client/assets/{sidebar-DnKMI8jz.js → sidebar-BssgvH2v.js} +1 -1
  170. package/dist/client/assets/{skeleton-xDZ5Iwb8.js → skeleton-bahy-09d.js} +1 -1
  171. package/dist/client/assets/sso-lxqjliao.js +1 -0
  172. package/dist/client/assets/{store-BoCHTDSB.js → store-Cu8mkiNg.js} +1 -1
  173. package/dist/client/assets/store-registry-_FBAHxHd.js +2 -0
  174. package/dist/client/assets/{studio-tools-DIWsVaKg.js → studio-tools-DvzlcJzu.js} +1 -1
  175. package/dist/client/assets/{switch-DS9vYGS-.js → switch-ChtDpIb1.js} +1 -1
  176. package/dist/client/assets/{table-DnoPpUup.js → table-ClDYVeNV.js} +1 -1
  177. package/dist/client/assets/{tabs-2srR2H7A.js → tabs-Byd14nsc.js} +1 -1
  178. package/dist/client/assets/{textarea-DjtAtA2l.js → textarea-Duro92xh.js} +1 -1
  179. package/dist/client/assets/{toggle-group-DGvoaiio.js → toggle-group--i6PYyQg.js} +1 -1
  180. package/dist/client/assets/{toolbar-CvkbyWaX.js → toolbar-C7-EzPT_.js} +1 -1
  181. package/dist/client/assets/{toolbar-icon-button-Cr-N30KB.js → toolbar-icon-button-VdYqoEpj.js} +1 -1
  182. package/dist/client/assets/{tooltip-cvFTpZ9W.js → tooltip-B6N5kQd7.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-ZLuBEaKb.js → use-ai-providers-kGXTar-o.js} +1 -1
  184. package/dist/client/assets/use-api-keys-DFJm_Sct.js +1 -0
  185. package/dist/client/assets/{use-automations-COcieFX-.js → use-automations-lLiWCOOl.js} +1 -1
  186. package/dist/client/assets/{use-autosave-C46oRXRb.js → use-autosave-BHdnAdy7.js} +1 -1
  187. package/dist/client/assets/{use-capability-3dRU8tE2.js → use-capability-n8ljqiDB.js} +1 -1
  188. package/dist/client/assets/{use-clock-tick-BzcS25hV.js → use-clock-tick-CEJuEsd_.js} +1 -1
  189. package/dist/client/assets/{use-collections-DaXoNaLL.js → use-collections-B-IkeUFK.js} +1 -1
  190. package/dist/client/assets/{use-connection-DM1ROgj3.js → use-connection-DpPEk8aM.js} +1 -1
  191. package/dist/client/assets/{use-copy-DC217syR.js → use-copy-DkMO92nk.js} +1 -1
  192. package/dist/client/assets/{use-create-virtual-mcp-Clu62lnk.js → use-create-virtual-mcp-DCIBpgEW.js} +1 -1
  193. package/dist/client/assets/{use-debounced-autosave-DYog9M6N.js → use-debounced-autosave-bRNiU42w.js} +1 -1
  194. package/dist/client/assets/{use-debounced-value-CSp0_yRg.js → use-debounced-value-DMJgrRLy.js} +1 -1
  195. package/dist/client/assets/use-deco-credits-CipyX0UT.js +1 -0
  196. package/dist/client/assets/{use-decopilot-events-CX_EuT5c.js → use-decopilot-events-BlazccAI.js} +1 -1
  197. package/dist/client/assets/{use-delete-connection-CxGr7t4A.js → use-delete-connection-BvPMAZ_W.js} +1 -1
  198. package/dist/client/assets/{use-deployment-admin-C6-1CBki.js → use-deployment-admin-CXmYBDRU.js} +1 -1
  199. package/dist/client/assets/{use-file-configs-DASxzk9O.js → use-file-configs-39QQNDS5.js} +1 -1
  200. package/dist/client/assets/{use-infinite-scroll-XidGSyic.js → use-infinite-scroll-DVSx3Rq1.js} +1 -1
  201. package/dist/client/assets/{use-join-requests-CjypbTMc.js → use-join-requests-DAnhRtlt.js} +1 -1
  202. package/dist/client/assets/{use-mcp-auth-status-BpAt0IbR.js → use-mcp-auth-status-BMkT9EZ9.js} +1 -1
  203. package/dist/client/assets/{use-mcp-client-DseZ3Mea.js → use-mcp-client-CJ_CTOi-.js} +4 -4
  204. package/dist/client/assets/{use-mcp-tools-DJGNLf9H.js → use-mcp-tools-CS9HoteL.js} +1 -1
  205. package/dist/client/assets/{use-members-CncY3QG2.js → use-members-CgnYyzxD.js} +1 -1
  206. package/dist/client/assets/{use-mobile-D8w2xyip.js → use-mobile-48jgjwiy.js} +1 -1
  207. package/dist/client/assets/{use-navigate-to-agent-YScxPu5L.js → use-navigate-to-agent-BuwUdTe3.js} +1 -1
  208. package/dist/client/assets/{use-org-auth-client-DjREcL_I.js → use-org-auth-client-C7loj_lF.js} +1 -1
  209. package/dist/client/assets/{use-org-sso-diAgeADE.js → use-org-sso-Bs00unXo.js} +1 -1
  210. package/dist/client/assets/{use-organization-roles-BuFi-QNO.js → use-organization-roles-DZJy3wYG.js} +1 -1
  211. package/dist/client/assets/{use-organization-settings-bBY4klS6.js → use-organization-settings-lcyinZ9M.js} +1 -1
  212. package/dist/client/assets/{use-registry-app-Cy7ipz7c.js → use-registry-app-MQ7-Pl5L.js} +1 -1
  213. package/dist/client/assets/{use-registry-connections-BZ0Z0jCg.js → use-registry-connections-By2otvi-.js} +1 -1
  214. package/dist/client/assets/{use-secrets-q_kPvC5B.js → use-secrets-BgDsFD4-.js} +1 -1
  215. package/dist/client/assets/{use-status-sounds-DG0Zyz9B.js → use-status-sounds-Lt_bZnJO.js} +1 -1
  216. package/dist/client/assets/{use-t-BjZG1zRp.js → use-t-DfEf5oHx.js} +1 -1
  217. package/dist/client/assets/{use-view-mode-B02hzmMj.js → use-view-mode-DAFf8-q-.js} +1 -1
  218. package/dist/client/assets/{use-virtual-mcp-urYy02xb.js → use-virtual-mcp-GqxJcvwl.js} +1 -1
  219. package/dist/client/assets/useInfiniteQuery-2fWwANBn.js +1 -0
  220. package/dist/client/assets/{useRouterState-C7tRHRC7.js → useRouterState-C7j1zaEX.js} +1 -1
  221. package/dist/client/assets/useSuspenseInfiniteQuery-BFB3UBwe.js +1 -0
  222. package/dist/client/assets/{users-CZVOiXsq.js → users-WIzFyPzI.js} +1 -1
  223. package/dist/client/assets/variant-calendar-BmeiXwwQ.js +1 -0
  224. package/dist/client/assets/{view-mode-toggle-DziN7a9n.js → view-mode-toggle-zUY6pa7X.js} +1 -1
  225. package/dist/client/index.html +2 -2
  226. package/dist/server/cli.js +488 -488
  227. package/dist/server/server.js +313 -313
  228. package/package.json +1 -1
  229. package/dist/client/assets/ChevronUp-D5F6V6Tm.js +0 -1
  230. package/dist/client/assets/XCircle-C0OdV3N_.js +0 -1
  231. package/dist/client/assets/add-section-modal-DBjaDtzc.js +0 -1
  232. package/dist/client/assets/agent-icon-DicjSkHu.js +0 -1
  233. package/dist/client/assets/agents-list-Bt1R4ueI.js +0 -1
  234. package/dist/client/assets/ai-providers-TK1CCOpK.js +0 -1
  235. package/dist/client/assets/app-editor-ptKJtHHM.js +0 -1
  236. package/dist/client/assets/automations-BoSNNWPc.js +0 -1
  237. package/dist/client/assets/buckets-DcRE1RUQ.js +0 -1
  238. package/dist/client/assets/bulk-category-panel-BkJQrEio.js +0 -1
  239. package/dist/client/assets/category-editor-CaGAyBNX.js +0 -1
  240. package/dist/client/assets/checkbox-Ba2-hx8r.js +0 -1
  241. package/dist/client/assets/collection-detail-D9ZCPDhA.js +0 -1
  242. package/dist/client/assets/collection-display-button-D_kIgil2.js +0 -1
  243. package/dist/client/assets/commerce-onboarding-DbQ0hYyA.js +0 -1
  244. package/dist/client/assets/connect-desktop-dialog-DEEL81vf.js +0 -1
  245. package/dist/client/assets/connection-detail-CKGrDl_p.js +0 -1
  246. package/dist/client/assets/connections-BJO0R_-8.js +0 -1
  247. package/dist/client/assets/dropdown-menu-D5BTIZvH.js +0 -1
  248. package/dist/client/assets/file-explorer-CUr9mfMv.js +0 -2
  249. package/dist/client/assets/general-DlHL1tW3.js +0 -1
  250. package/dist/client/assets/index-629FAmzK.js +0 -1
  251. package/dist/client/assets/index-BQK4XWOD.js +0 -2
  252. package/dist/client/assets/index-Cb_X1LK0.js +0 -1
  253. package/dist/client/assets/index-oE__K1ye.css +0 -1
  254. package/dist/client/assets/members-Ds_Onv02.js +0 -1
  255. package/dist/client/assets/orgs-B4DrO8iC.js +0 -1
  256. package/dist/client/assets/page-seo-sheet-BTyypxho.js +0 -1
  257. package/dist/client/assets/post-editor-j9JAXwQN.js +0 -1
  258. package/dist/client/assets/profile-DwVJzm_R.js +0 -1
  259. package/dist/client/assets/project-app-view-e40sJb24.js +0 -1
  260. package/dist/client/assets/record-editor-BBPLTix7.js +0 -1
  261. package/dist/client/assets/redirect-editor-C8EDxpmx.js +0 -1
  262. package/dist/client/assets/registry-CFSvMZwJ.js +0 -2
  263. package/dist/client/assets/roles-BqueMkJJ.js +0 -1
  264. package/dist/client/assets/secrets-CEZOniOS.js +0 -1
  265. package/dist/client/assets/select-AzuoAc3H.js +0 -1
  266. package/dist/client/assets/self-tool-result-C94YNykg.js +0 -1
  267. package/dist/client/assets/seo-editor-CR8P7sfk.js +0 -1
  268. package/dist/client/assets/settings-layout-9yQD_m0n.js +0 -1
  269. package/dist/client/assets/sso-DNsZ7Hie.js +0 -1
  270. package/dist/client/assets/store-registry-WZUtBjlh.js +0 -2
  271. package/dist/client/assets/use-deco-credits-Bm6Hzrca.js +0 -1
  272. package/dist/client/assets/useInfiniteQuery-nK_JPgM8.js +0 -1
  273. package/dist/client/assets/useSuspenseInfiniteQuery-_ObcRUnC.js +0 -1
  274. package/dist/client/assets/variant-calendar-DibyF3zD.js +0 -1
@@ -1 +1 @@
1
- import{c as oe,C as re,n as de,r as ce,K as ie,m as me,d as X,p as ge,t as N,j as s,B as te}from"./index-DmhdwAgP.js";import{u as ue}from"./studio-tools-DIWsVaKg.js";import{u as ae}from"./use-t-BjZG1zRp.js";import{b as fe,a as xe,S as Se}from"./settings-section-CNVe03BK.js";import{B as ne}from"./badge-C_9mnuBd.js";import{I as je}from"./input-TkvVVsQL.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-AzuoAc3H.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function Ce(){const e=oe.c(101),t=ae(),{org:o}=re(),p=de(),i=ue(),[r,v]=ce.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=me(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ge("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const d=X(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let O;e[27]!==t?(O=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=O):O=e[28];let U;e[29]!==O||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:O},e[29]=O,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=X(U);let b;e[33]!==i?(b=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==b||e[41]!==y||e[42]!==E?(Y={mutationFn:b,onSuccess:y,onError:E},e[40]=b,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=X(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=X($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let k;e[59]!==t?(k=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=k):k=e[60];let q;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],q=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=q}else q=e[66];let J;e[72]===Symbol.for("react.memo_cache_sentinel")?(J=n=>v(n.target.value),e[72]=J):J=e[72];let z;e[73]!==t?(z=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=z):z=e[74];let F;e[75]!==r||e[76]!==z?(F=s.jsx(je,{value:r,onChange:J,placeholder:z,className:"max-w-xs"}),e[75]=r,e[76]=z,e[77]=F):F=e[77];let w;e[78]!==d||e[79]!==r?(w=()=>d.mutate(r.trim()),e[78]=d,e[79]=r,e[80]=w):w=e[80];let G;e[81]!==d.isPending||e[82]!==r?(G=!r.trim()||d.isPending,e[81]=d.isPending,e[82]=r,e[83]=G):G=e[83];let Z;e[84]!==d.isPending||e[85]!==t?(Z=d.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=d.isPending,e[85]=t,e[86]=Z):Z=e[86];let B;e[87]!==w||e[88]!==G||e[89]!==Z?(B=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:Z}),e[87]=w,e[88]=G,e[89]=Z,e[90]=B):B=e[90];let H;e[91]!==F||e[92]!==B?(H=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[F,B]}),e[91]=F,e[92]=B,e[93]=H):H=e[93];let K;e[94]!==q||e[95]!==H?(K=s.jsxs(xe,{children:[q,H]}),e[94]=q,e[95]=H,e[96]=K):K=e[96];let W;return e[97]!==V||e[98]!==k||e[99]!==K?(W=s.jsx(Se,{title:V,description:k,children:K}),e[97]=V,e[98]=k,e[99]=K,e[100]=W):W=e[100],W}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let r;t[0]!==i?(r=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=r):r=t[1];const v=r;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let d;return t[31]!==j||t[32]!==m?(d=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=d):d=t[33],d}export{Ce as D};
1
+ import{c as oe,C as re,n as de,r as ce,K as ie,m as me,d as X,p as ge,t as N,j as s,B as te}from"./index-CIFSbzEF.js";import{u as ue}from"./studio-tools-DvzlcJzu.js";import{u as ae}from"./use-t-DfEf5oHx.js";import{b as fe,a as xe,S as Se}from"./settings-section-BrZlvNfy.js";import{B as ne}from"./badge-BIKuZNrQ.js";import{I as je}from"./input-COKCWjWn.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-mGmKPAXK.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function Ce(){const e=oe.c(101),t=ae(),{org:o}=re(),p=de(),i=ue(),[r,v]=ce.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=me(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ge("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const d=X(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let O;e[27]!==t?(O=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=O):O=e[28];let U;e[29]!==O||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:O},e[29]=O,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=X(U);let b;e[33]!==i?(b=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==b||e[41]!==y||e[42]!==E?(Y={mutationFn:b,onSuccess:y,onError:E},e[40]=b,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=X(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=X($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let k;e[59]!==t?(k=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=k):k=e[60];let q;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],q=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=q}else q=e[66];let J;e[72]===Symbol.for("react.memo_cache_sentinel")?(J=n=>v(n.target.value),e[72]=J):J=e[72];let z;e[73]!==t?(z=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=z):z=e[74];let F;e[75]!==r||e[76]!==z?(F=s.jsx(je,{value:r,onChange:J,placeholder:z,className:"max-w-xs"}),e[75]=r,e[76]=z,e[77]=F):F=e[77];let w;e[78]!==d||e[79]!==r?(w=()=>d.mutate(r.trim()),e[78]=d,e[79]=r,e[80]=w):w=e[80];let G;e[81]!==d.isPending||e[82]!==r?(G=!r.trim()||d.isPending,e[81]=d.isPending,e[82]=r,e[83]=G):G=e[83];let Z;e[84]!==d.isPending||e[85]!==t?(Z=d.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=d.isPending,e[85]=t,e[86]=Z):Z=e[86];let B;e[87]!==w||e[88]!==G||e[89]!==Z?(B=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:Z}),e[87]=w,e[88]=G,e[89]=Z,e[90]=B):B=e[90];let H;e[91]!==F||e[92]!==B?(H=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[F,B]}),e[91]=F,e[92]=B,e[93]=H):H=e[93];let K;e[94]!==q||e[95]!==H?(K=s.jsxs(xe,{children:[q,H]}),e[94]=q,e[95]=H,e[96]=K):K=e[96];let W;return e[97]!==V||e[98]!==k||e[99]!==K?(W=s.jsx(Se,{title:V,description:k,children:K}),e[97]=V,e[98]=k,e[99]=K,e[100]=W):W=e[100],W}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let r;t[0]!==i?(r=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=r):r=t[1];const v=r;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let d;return t[31]!==j||t[32]!==m?(d=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=d):d=t[33],d}export{Ce as D};
@@ -1 +1 @@
1
- import{c as d,j as s,cq as i,l as c}from"./index-DmhdwAgP.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
1
+ import{c as d,j as s,cq as i,l as c}from"./index-CIFSbzEF.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
@@ -0,0 +1 @@
1
+ import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-CIFSbzEF.js";import{i as $}from"./Check-CfdDVvTz.js";import{i as D}from"./ChevronRight-Ck0jEpLN.js";import{a as M}from"./DotsVertical-DuorjQq1.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function O(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function E(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function G(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function L(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function Q(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function V(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function W(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function X(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{C as D,T as a,Q as b,O as c,E as d,V as e,W as f,X as g,L as h,P as i,U as j,G as k};
@@ -1 +1 @@
1
- import{c as v,l as N,j as t}from"./index-DmhdwAgP.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-center text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
1
+ import{c as v,l as N,j as t}from"./index-CIFSbzEF.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-center text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
@@ -1 +1 @@
1
- import"./index-DmhdwAgP.js";import{W as T,j as O}from"./use-mcp-client-DseZ3Mea.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function q(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function B(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function J(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function Q(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let j="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",G=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=j[n[t]&63];return e};function $(t){return`${t}_${G()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function X(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];let u,f,_=null;if(c){const h=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:$("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:_,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,Q as c,J as d,X as e,B as f,$ as g,q as i};
1
+ import"./index-CIFSbzEF.js";import{W as T,j as O}from"./use-mcp-client-CJ_CTOi-.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function q(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function B(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function J(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function Q(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let j="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",G=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=j[n[t]&63];return e};function $(t){return`${t}_${G()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function X(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];let u,f,_=null;if(c){const h=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:$("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:_,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,Q as c,J as d,X as e,B as f,$ as g,q as i};
@@ -0,0 +1,2 @@
1
+ import{c as Y,r as u,j as r,i as se,B as Ne,d$ as Qt,aO as Xt,aU as ue,e0 as Yt,e1 as Jt,e2 as Zt,e3 as en,bH as tn,e4 as nn,e5 as at,aQ as rn,e6 as on,e7 as sn,e8 as an,e9 as ln,ea as cn,eb as dn,ec as un,ed as fn,ee as mn,l as ee,n as pn,t as W,K as Ye}from"./index-CIFSbzEF.js";import{F as xn,l as hn}from"./index-Bm76WXPR.js";import{g as gn,aM as vn,aN as yn}from"./agent-icon-C6bqiv4x.js";import{s as Cn}from"./XClose-CVT1rN5P.js";import{m as wn}from"./automation-runs-CA0Zbin0.js";import{b as Je,T as Ze,a as et}from"./tooltip-B6N5kQd7.js";import{b as jn}from"./chat-context-Bn6Q6CeX.js";import{u as Nn}from"./shell-layout-wwtr-wuO.js";import{s as ve,a as tt,f as bn}from"./index-QQfVHF6c.js";import{a as Sn,h as Mn,D as Rn,c as Dn,d as Pn,e as En}from"./dialog-a73gSkG2.js";import{I as nt}from"./input-COKCWjWn.js";import{c as kn,d as Tn,b as An,A as On,g as Fn,e as In,a as Ln,f as $n}from"./alert-dialog-BeSbCM7Y.js";import{t as _n}from"./ChevronDown-BRbMyZ1B.js";import{i as zn}from"./ChevronRight-Ck0jEpLN.js";import{a as Gn}from"./ZoomOut-HpkK_jz9.js";import{w as Kn,E as Bn,x as ke,y as Te,z as Un,A as Vn,C as Hn,D as Wn,G as Q,I as ye,J as Ae,K as Ce,g as Oe,M as Fe,N as qn,s as Qn,O as Xn,P as we,Q as Ie,U as Yn,V as Jn,W as Zn,X as er}from"./index-Cotl-Dca.js";import"./AlertCircle-C1QMMByE.js";import"./Tool01-CiB1AgGO.js";import"./ArrowUp-DH3o_6rV.js";import"./Settings02-DkDTX6wF.js";import"./Tool02-DatlcCMD.js";import"./ArrowRight-CMDrgznR.js";import"./ArrowUpRight-ChAriHcE.js";import"./TrendUp01-CtjoH8ZL.js";import"./ZapSquare-BrF3B-Lj.js";import"./Users03-uSqerTaX.js";import"./CheckCircle-DLrShk9W.js";import"./Check-CfdDVvTz.js";import"./ChevronUp-BT9WG4FQ.js";import"./DotsVertical-DuorjQq1.js";import"./Stars02-CWszz6x7.js";import"./Copy01-Du_h2a2a.js";import"./Globe01-FT_j78GO.js";import"./Eye-IdG-7KTy.js";import"./FilterLines-VrXrRt9f.js";import"./Star01-IywRndO8.js";import"./Globe04-BktKmpI1.js";import"./SwitchHorizontal01-mvedp9Fy.js";import"./HardDrive-y6RDSyxS.js";import"./Image01-jwttKGpp.js";import"./Key01-CTHo646W.js";import"./LayoutLeft-DDdEDKm1.js";import"./XCircle-C1KpQxmr.js";import"./LinkExternal01-Dw89NskH.js";import"./Monitor01-D8aw2U1c.js";import"./Sun-CKE25B6W.js";import"./Package-Bl4wI6gQ.js";import"./Palette-Bb5lq-lb.js";import"./Play-h_GYgW2i.js";import"./Plus-DW8HTiM4.js";import"./SearchLg-CuxPI6CH.js";import"./SearchMd-B_vHLGSV.js";import"./Shield01-BTjWMfyt.js";import"./Stars01-awBCSC7p.js";import"./Trash01-BFrDxOoF.js";import"./Upload01-BbY627dR.js";import"./User01-JYrKFpRC.js";import"./Users01-C_vPeB-O.js";import"./X-BWhzmnUU.js";import"./Zap-yAX2Kmmw.js";import"./select-mGmKPAXK.js";import"./useInfiniteQuery-2fWwANBn.js";import"./use-infinite-scroll-DVSx3Rq1.js";import"./use-connection-DpPEk8aM.js";import"./use-collections-B-IkeUFK.js";import"./use-mcp-client-CJ_CTOi-.js";import"./auth-C9enaQvD.js";import"./use-virtual-mcp-GqxJcvwl.js";import"./card-Dd8gUiG_.js";import"./sidebar-BssgvH2v.js";import"./use-mobile-48jgjwiy.js";import"./table-ClDYVeNV.js";import"./empty-state-CMGZe-XE.js";import"./use-members-CgnYyzxD.js";import"./use-org-auth-client-C7loj_lF.js";import"./use-clock-tick-CEJuEsd_.js";import"./use-automations-lLiWCOOl.js";import"./studio-tools-DvzlcJzu.js";import"./useSuspenseInfiniteQuery-BFB3UBwe.js";import"./avatar-CMlDI2D-.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DkMO92nk.js";import"./file-type-icon-D7Qv-wcj.js";import"./tab-id-BijBBRwE.js";import"./hooks-Ck4NS0BB.js";import"./decopilot-sse-pool-D92X3fNc.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-1CxGfHM9.js";import"./index-BPUUTwje.js";import"./calendar-CcmR6PZG.js";import"./use-t-DfEf5oHx.js";import"./integration-icon-8ogu7iqA.js";import"./use-navigate-to-agent-BuwUdTe3.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-q7Xrveeh.js";import"./form-hOrojcOx.js";import"./label-BCtHDi1-.js";import"./autosend-CxPf5RKw.js";import"./use-ai-providers-kGXTar-o.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-BlazccAI.js";import"./use-organization-settings-lcyinZ9M.js";import"./required-auth-layout-KO0-1qXO.js";import"./use-org-sso-Bs00unXo.js";import"./drawer-BU_sOAKq.js";import"./collection-search-B_OixFPO.js";import"./index-CufVwosA.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-MQ7-Pl5L.js";import"./use-mcp-tools-CS9HoteL.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-pF30Ku2c.js";import"./mcp-oauth-C4qKLSfa.js";import"./extract-connection-data-DB1JAVkl.js";import"./dropdown-menu-QheVZMJA.js";import"./popover-MfTivQME.js";import"./command-CBlINdWQ.js";import"./index-D1R93mn_.js";import"./companions-core-CBtA8C2P.js";import"./tabs-Byd14nsc.js";import"./toggle-group--i6PYyQg.js";import"./use-deco-credits-CipyX0UT.js";import"./connection-card-DgbR5Mwx.js";import"./use-registry-connections-By2otvi-.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-Duro92xh.js";import"./connection-form-helpers-DKOWpJ-1.js";import"./collection-tabs-BbylyFFO.js";import"./badge-BIKuZNrQ.js";import"./connect-desktop-dialog-CS8xcpUf.js";import"./select-model-DTW46aHa.js";import"./checkbox-D0oew71k.js";import"./skeleton-bahy-09d.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BrZlvNfy.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Lt_bZnJO.js";import"./toolbar-C7-EzPT_.js";import"./use-capability-n8ljqiDB.js";import"./toolbar-icon-button-VdYqoEpj.js";import"./use-debounced-autosave-bRNiU42w.js";import"./index-BZIMlfJW.js";import"./search-input-U68dcFxI.js";import"./use-mcp-auth-status-BMkT9EZ9.js";import"./switch-ChtDpIb1.js";import"./github-repo-picker-BlPGLfgP.js";import"./use-debounced-value-DMJgrRLy.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-BgDsFD4-.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./use-file-configs-39QQNDS5.js";import"./automation-list-row-CAdX-w7a.js";const tr={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function nr(i){const e=Y.c(51),{open:s,mode:a,initialName:c,parentLabel:m,isPending:x,onSubmit:p,onOpenChange:g}=i,y=c===void 0?"":c,d=x===void 0?!1:x,[h,w]=u.useState(y),[R,k]=u.useState(s),v=tr[a];s!==R&&(k(s),s&&w(y));let j;e[0]!==d||e[1]!==g?(j=O=>{!O&&!d&&g(!1)},e[0]=d,e[1]=g,e[2]=j):j=e[2];const U=j;let S;e[3]!==d||e[4]!==h||e[5]!==p?(S=async O=>{O.preventDefault();const q=h.trim();!q||d||await p(q)},e[3]=d,e[4]=h,e[5]=p,e[6]=S):S=e[6];const D=S;let b;e[7]!==v.title?(b=r.jsx(Sn,{children:v.title}),e[7]=v.title,e[8]=b):b=e[8];let C;e[9]!==v.description?(C=r.jsx(Mn,{children:v.description}),e[9]=v.description,e[10]=C):C=e[10];let P;e[11]!==b||e[12]!==C?(P=r.jsxs(Rn,{children:[b,C]}),e[11]=b,e[12]=C,e[13]=P):P=e[13];let M;e[14]!==m?(M=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(nt,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=m,e[15]=M):M=e[15];let V;e[16]===Symbol.for("react.memo_cache_sentinel")?(V=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=V):V=e[16];let I;e[17]===Symbol.for("react.memo_cache_sentinel")?(I=O=>w(O.target.value),e[17]=I):I=e[17];let z;e[18]!==v.placeholder||e[19]!==d||e[20]!==h?(z=r.jsxs("div",{className:"space-y-1.5",children:[V,r.jsx(nt,{id:"file-explorer-name",value:h,onChange:I,placeholder:v.placeholder,autoFocus:!0,disabled:d})]}),e[18]=v.placeholder,e[19]=d,e[20]=h,e[21]=z):z=e[21];let L;e[22]!==z||e[23]!==M?(L=r.jsxs("div",{className:"space-y-4 py-4",children:[M,z]}),e[22]=z,e[23]=M,e[24]=L):L=e[24];let T;e[25]!==g?(T=()=>g(!1),e[25]=g,e[26]=T):T=e[26];let G;e[27]!==d||e[28]!==T?(G=r.jsx(Ne,{type:"button",variant:"outline",onClick:T,disabled:d,children:"Cancel"}),e[27]=d,e[28]=T,e[29]=G):G=e[29];let H;e[30]!==d||e[31]!==h?(H=!h.trim()||d,e[30]=d,e[31]=h,e[32]=H):H=e[32];let K;e[33]!==v.submit||e[34]!==d?(K=d?r.jsxs(r.Fragment,{children:[r.jsx(se,{size:14,className:"animate-spin"}),"Saving…"]}):v.submit,e[33]=v.submit,e[34]=d,e[35]=K):K=e[35];let A;e[36]!==H||e[37]!==K?(A=r.jsx(Ne,{type:"submit",disabled:H,children:K}),e[36]=H,e[37]=K,e[38]=A):A=e[38];let E;e[39]!==G||e[40]!==A?(E=r.jsxs(Dn,{children:[G,A]}),e[39]=G,e[40]=A,e[41]=E):E=e[41];let $;e[42]!==D||e[43]!==L||e[44]!==E||e[45]!==P?($=r.jsx(Pn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:D,children:[P,L,E]})}),e[42]=D,e[43]=L,e[44]=E,e[45]=P,e[46]=$):$=e[46];let _;return e[47]!==U||e[48]!==s||e[49]!==$?(_=r.jsx(En,{open:s,onOpenChange:U,children:$}),e[47]=U,e[48]=s,e[49]=$,e[50]=_):_=e[50],_}function rr(i){const e=Y.c(31),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:c,onOpenChange:m,onConfirm:x}=i,p=s!==null,g=s?.kind==="directory"?"folder":"file";let y;e[0]!==g?(y=r.jsxs(kn,{children:["Delete ",g,"?"]}),e[0]=g,e[1]=y):y=e[1];const d=s?.name;let h;e[2]!==d?(h=r.jsx("span",{className:"font-mono",children:d}),e[2]=d,e[3]=h):h=e[3];const w=s?.kind==="directory"?" and everything inside it.":".";let R;e[4]!==a.length?(R=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?"One open file has unsaved changes that will be lost.":`${a.length} open files have unsaved changes that will be lost.`]}),e[4]=a.length,e[5]=R):R=e[5];let k;e[6]!==h||e[7]!==w||e[8]!==R?(k=r.jsxs(Tn,{children:["This will permanently delete"," ",h,w,R]}),e[6]=h,e[7]=w,e[8]=R,e[9]=k):k=e[9];let v;e[10]!==y||e[11]!==k?(v=r.jsxs(An,{children:[y,k]}),e[10]=y,e[11]=k,e[12]=v):v=e[12];let j;e[13]!==c?(j=r.jsx(On,{disabled:c,children:"Cancel"}),e[13]=c,e[14]=j):j=e[14];const U=c||!s;let S;e[15]!==s||e[16]!==x?(S=M=>{M.preventDefault(),s&&x(s)},e[15]=s,e[16]=x,e[17]=S):S=e[17];let D;e[18]!==U||e[19]!==S?(D=r.jsx(Fn,{disabled:U,onClick:S,children:"Delete"}),e[18]=U,e[19]=S,e[20]=D):D=e[20];let b;e[21]!==j||e[22]!==D?(b=r.jsxs(In,{children:[j,D]}),e[21]=j,e[22]=D,e[23]=b):b=e[23];let C;e[24]!==b||e[25]!==v?(C=r.jsxs(Ln,{children:[v,b]}),e[24]=b,e[25]=v,e[26]=C):C=e[26];let P;return e[27]!==m||e[28]!==p||e[29]!==C?(P=r.jsx($n,{open:p,onOpenChange:m,children:C}),e[27]=m,e[28]=p,e[29]=C,e[30]=P):P=e[30],P}var Le="ContextMenu",[or]=rn(Le,[at]),B=at(),[sr,it]=or(Le),lt=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:c,modal:m=!0}=i,[x,p]=u.useState(!1),g=B(e),y=tn(a),d=u.useCallback(h=>{p(h),y(h)},[y]);return r.jsx(sr,{scope:e,open:x,onOpenChange:d,modal:m,children:r.jsx(nn,{...g,dir:c,open:x,onOpenChange:d,modal:m,children:s})})};lt.displayName=Le;var ct="ContextMenuTrigger",dt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...c}=i,m=it(ct,s),x=B(s),p=u.useRef({x:0,y:0}),g=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),y=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(y.current),[]),h=w=>{p.current={x:w.clientX,y:w.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Qt,{...x,virtualRef:g}),r.jsx(Xt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:ue(i.onContextMenu,w=>{d(),h(w),w.preventDefault()}),onPointerDown:a?i.onPointerDown:ue(i.onPointerDown,je(w=>{d(),y.current=window.setTimeout(()=>h(w),700)})),onPointerMove:a?i.onPointerMove:ue(i.onPointerMove,je(d)),onPointerCancel:a?i.onPointerCancel:ue(i.onPointerCancel,je(d)),onPointerUp:a?i.onPointerUp:ue(i.onPointerUp,je(d))})]})});dt.displayName=ct;var ar="ContextMenuPortal",ut=i=>{const{__scopeContextMenu:e,...s}=i,a=B(e);return r.jsx(Zt,{...a,...s})};ut.displayName=ar;var ft="ContextMenuContent",mt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=it(ft,s),m=B(s),x=u.useRef(!1);return r.jsx(en,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{i.onCloseAutoFocus?.(p),!p.defaultPrevented&&x.current&&p.preventDefault(),x.current=!1},onInteractOutside:p=>{i.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(x.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mt.displayName=ft;var ir="ContextMenuGroup",lr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(on,{...c,...a,ref:e})});lr.displayName=ir;var cr="ContextMenuLabel",dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(sn,{...c,...a,ref:e})});dr.displayName=cr;var ur="ContextMenuItem",pt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(Yt,{...c,...a,ref:e})});pt.displayName=ur;var fr="ContextMenuCheckboxItem",mr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(an,{...c,...a,ref:e})});mr.displayName=fr;var pr="ContextMenuRadioGroup",xr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(ln,{...c,...a,ref:e})});xr.displayName=pr;var hr="ContextMenuRadioItem",gr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(cn,{...c,...a,ref:e})});gr.displayName=hr;var vr="ContextMenuItemIndicator",yr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(dn,{...c,...a,ref:e})});yr.displayName=vr;var Cr="ContextMenuSeparator",xt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(Jt,{...c,...a,ref:e})});xt.displayName=Cr;var wr="ContextMenuArrow",jr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(un,{...c,...a,ref:e})});jr.displayName=wr;var Nr="ContextMenuSubTrigger",br=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(fn,{...c,...a,ref:e})});br.displayName=Nr;var Sr="ContextMenuSubContent",Mr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(mn,{...c,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Mr.displayName=Sr;function je(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var Rr=lt,Dr=dt,Pr=ut,Er=mt,kr=pt,Tr=xt;function Ar(i){const e=Y.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Rr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function Or(i){const e=Y.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Dr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Fr(i){const e=Y.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let c;e[3]!==s?(c=ee("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(Pr,{children:r.jsx(Er,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}function oe(i){const e=Y.c(12);let s,a,c,m;e[0]!==i?({className:s,inset:a,variant:m,...c}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=c,e[4]=m):(s=e[1],a=e[2],c=e[3],m=e[4]);const x=m===void 0?"default":m;let p;e[5]!==s?(p=ee("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=p):p=e[6];let g;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==x?(g=r.jsx(kr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":x,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=x,e[11]=g):g=e[11],g}function rt(i){const e=Y.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let c;e[3]!==s?(c=ee("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(Tr,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}const Ir="#d9a441";function Lr(i){const e=Y.c(45),{node:s,depth:a,isExpanded:c,isSelected:m,isLoading:x,fileVisual:p,onOpen:g,onSelect:y,onNewFile:d,onNewFolder:h,onCopyPath:w,onCopyRelativePath:R,onRename:k,onDelete:v}=i,j=x===void 0?!1:x,U=s.kind==="directory",{Icon:S,color:D}=p,b=m&&"bg-accent";let C;e[0]!==b?(C=ee("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",b),e[0]=b,e[1]=C):C=e[1];const P=`${a*14+8}px`;let M;e[2]!==P?(M={paddingLeft:P},e[2]=P,e[3]=M):M=e[3];let V;e[4]!==g||e[5]!==y?(V=()=>{y(),g()},e[4]=g,e[5]=y,e[6]=V):V=e[6];let I;e[7]!==S||e[8]!==D||e[9]!==U||e[10]!==c||e[11]!==j?(I=U?r.jsxs(r.Fragment,{children:[j?r.jsx(se,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(_n,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(zn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Gn,{size:16,className:"shrink-0",style:{color:Ir}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(S,{size:16,className:"shrink-0",style:{color:D}})]}),e[7]=S,e[8]=D,e[9]=U,e[10]=c,e[11]=j,e[12]=I):I=e[12];let z;e[13]!==s.name?(z=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=z):z=e[14];let L;e[15]!==C||e[16]!==M||e[17]!==V||e[18]!==I||e[19]!==z?(L=r.jsx(Or,{asChild:!0,children:r.jsxs("button",{type:"button",className:C,style:M,onClick:V,children:[I,z]})}),e[15]=C,e[16]=M,e[17]=V,e[18]=I,e[19]=z,e[20]=L):L=e[20];let T;e[21]!==d?(T=r.jsx(oe,{onSelect:d,children:"New File"}),e[21]=d,e[22]=T):T=e[22];let G;e[23]!==h?(G=r.jsx(oe,{onSelect:h,children:"New Folder"}),e[23]=h,e[24]=G):G=e[24];let H;e[25]===Symbol.for("react.memo_cache_sentinel")?(H=r.jsx(rt,{}),e[25]=H):H=e[25];let K;e[26]!==w?(K=r.jsx(oe,{onSelect:w,children:"Copy Path"}),e[26]=w,e[27]=K):K=e[27];let A;e[28]!==R?(A=r.jsx(oe,{onSelect:R,children:"Copy Relative Path"}),e[28]=R,e[29]=A):A=e[29];let E;e[30]===Symbol.for("react.memo_cache_sentinel")?(E=r.jsx(rt,{}),e[30]=E):E=e[30];let $;e[31]!==k?($=r.jsx(oe,{onSelect:k,children:"Rename"}),e[31]=k,e[32]=$):$=e[32];let _;e[33]!==v?(_=r.jsx(oe,{variant:"destructive",onSelect:v,children:"Delete"}),e[33]=v,e[34]=_):_=e[34];let O;e[35]!==T||e[36]!==G||e[37]!==K||e[38]!==A||e[39]!==$||e[40]!==_?(O=r.jsxs(Fr,{className:"w-52",children:[T,G,H,K,A,E,$,_]}),e[35]=T,e[36]=G,e[37]=K,e[38]=A,e[39]=$,e[40]=_,e[41]=O):O=e[41];let q;return e[42]!==O||e[43]!==L?(q=r.jsxs(Ar,{children:[L,O]}),e[42]=O,e[43]=L,e[44]=q):q=e[44],q}hn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const ot=200,$r=2,_r=250,st=200;function zr(i,e,s,a){return`/api/${i}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${a}`}function Gr(i){const e=Y.c(9),{text:s,query:a}=i;let c,m,x;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:g,segments:y}=qn(s,a);c="truncate font-mono text-muted-foreground",m=g&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),x=y.map(Kr),e[0]=a,e[1]=s,e[2]=c,e[3]=m,e[4]=x}else c=e[2],m=e[3],x=e[4];let p;return e[5]!==c||e[6]!==m||e[7]!==x?(p=r.jsxs("span",{className:c,children:[m,x]}),e[5]=c,e[6]=m,e[7]=x,e[8]=p):p=e[8],p}function Kr(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function La({orgSlug:i,virtualMcpId:e,branch:s,openPath:a}){const[c,m]=u.useState({files:[],directories:[],truncated:!1}),{files:x,directories:p}=c,[g,y]=u.useState(new Set),[d,h]=u.useState(null),[w,R]=u.useState(null),[k,v]=u.useState([]),[j,U]=u.useState(""),[S,D]=u.useState(null),[b,C]=u.useState(null),[P,M]=u.useState(!1),[V,I]=u.useState(!1),[z,L]=u.useState(!1),[T,G]=u.useState(!1),[,H]=u.useState(new Set),[K,A]=u.useState(new Set),E=u.useRef(0),$=u.useRef(null),_=u.useRef(new Set),O=u.useRef(new Map),q=u.useRef(null),te=u.useRef(0),be=u.useRef(null),ae=u.useRef(null),Se=u.useRef(null);function $e(t){H(n=>{const o=typeof t=="function"?t(n):t;return _.current=o,o})}const[ie,ne]=u.useState(new Map),Me=u.useRef(null),[J,fe]=u.useState(null),{sendMessage:ht}=jn(),{openSidePanel:gt}=Nn(),me=pn(),[F,X]=u.useState(null),[Re,De]=u.useState(null),[pe,xe]=u.useState(!1);async function Z(t,n){const o=await fetch(zr(i,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function he(){me.invalidateQueries({queryKey:tt(i,e,s)})}function _e(t,n){navigator.clipboard.writeText(n).then(()=>W.success(`${t} copied`),()=>W.error(`Failed to copy ${t.toLowerCase()}`))}function vt(t){const n=Zn(t);if(!n)return;const o=`${i}/${e}/${s}`;me.setQueryData(Ye.decofile(o),l=>{if(!l)return l;const{[n]:f,...N}=l;return N}),me.invalidateQueries({queryKey:Ye.liveMeta(i,e,s)})}function yt(t){const n=t.kind==="file"?[t.path]:x.filter(o=>o.startsWith(".deco/blocks/")).map(o=>ye(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)vt(o)}function Ct(t){const n=ye(t);return k.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=ie.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function ze(t){v(n=>n.map(o=>t(o)).filter(o=>o!==null)),h(n=>n&&t(n)),ne(n=>{const o=new Map;for(const[l,f]of n){const N=t(l);N&&o.set(N,f)}return o}),R(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function wt(t){const n=ye(t);R(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),ze(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t){if(!F)return;const n=we(F.parentDir,t);if(Ie(n,x,p))throw new Error(`"${t}" already exists`);await Z("write",{path:Q(n),content:""}),await le(),await he(),X(null),ce(n)}async function Nt(t){if(!F)return;const n=we(F.parentDir,t);if(Ie(n,x,p))throw new Error(`"${t}" already exists`);const o=Q(n);await Z("mkdir",{path:o}),m(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await le(),await he(),X(null),y(l=>{const f=new Set(l);for(const N of Te(n))f.add(N);return f.add(n),f}),R({name:t,path:n,kind:"directory",children:[]})}async function bt(t){if(!F)return;const n=F.node.path,o=Ce(n),l=we(o,t);if(l===n){X(null);return}if(Ie(l,x,p))throw new Error(`"${t}" already exists`);await Z("rename",{from:Q(n),to:Q(l)}),ze(f=>f===n?l:f.startsWith(`${n}/`)?we(l,f.slice(n.length+1)):f),await le(),await he(),X(null)}async function St(t){xe(!0);try{await Z("unlink",{path:Q(t.path),recursive:t.kind==="directory"}),yt(t),wt(t.path),await le(),await he(),De(null),W.success(`Deleted "${t.name}"`)}catch(n){W.error(n instanceof Error?n.message:"Delete failed")}finally{xe(!1)}}async function Mt(t){const n=Xn(t);if(n){W.error(n);return}xe(!0);try{F?.mode==="new-file"?(await jt(t),W.success(`Created "${t}"`)):F?.mode==="new-folder"?(await Nt(t),W.success(`Created folder "${t}"`)):F?.mode==="rename"&&(await bt(t),W.success(`Renamed to "${t}"`))}catch(o){W.error(o instanceof Error?o.message:"Operation failed")}finally{xe(!1)}}const Ge=u.useRef(!1);Ge.current||(Ge.current=!0,$.current=le());const[Rt,Dt]=u.useState(null);if(a&&a!==Rt){Dt(a);const t=a;queueMicrotask(()=>{Kn(t)&&ce(t).catch(n=>{W.error(n instanceof Error?n.message:"Failed to open file")})})}async function Pe(t){const n=await Z("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ke(t,n,o){if(o!==E.current)return!1;let l=!1;return m(f=>{const N=n?er(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!N.truncated,{files:N.files,directories:N.directories,truncated:l}}),l&&W.warning("File list truncated — some files may be hidden"),l}async function Pt(t){const n=O.current.get(t);if(n)return n;const o=E.current,l=(async()=>{const f=await Pe({pattern:"**/*",path:Q(t),limit:ke}),N=Ke(f,!0,o);return!N&&o===E.current&&$e(de=>{const ge=new Set(de);return ge.add(t),ge}),N})();O.current.set(t,l);try{return await l}finally{O.current.delete(t)}}async function Be(t){if(!Fe(t,_.current))return!1;A(n=>new Set(n).add(t));try{return await Pt(t)}finally{A(n=>{const o=new Set(n);return o.delete(t),o})}}async function Et(t){const n=new Set(_.current);for(const o of Te(t)){if(!Fe(o,n))continue;if(await Be(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function le(){const t=++E.current;be.current=null,ae.current=null,O.current.clear(),L(!0),$e(new Set),y(new Set),A(new Set);try{const n=await Pe({pattern:"**/*",limit:ke,maxDepth:Bn});Ke(n,!1,t),G(!0)}catch{T&&W.error("Failed to refresh file tree")}finally{L(!1)}}async function Ue(t){if(!ie.get(t)?.loaded){ne(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await Z("read",{path:Q(t),full:!0}),l=Qn(o.content??"");ne(f=>{const N=new Map(f);return N.set(t,{savedContent:l,editorValue:l,loaded:!0}),N})}catch{}}}function kt(){te.current++,D(null),C(null),M(!1),I(!1)}async function Tt(){const t=E.current,n=be.current;if(n&&n.generation===t)return n.files;const o=ae.current;if(o&&o.generation===t)return o.promise;const l=(async()=>{const f=await Pe({pattern:"**/*",limit:ke});return E.current===t&&(be.current={generation:t,files:f.files}),f.files})();ae.current={generation:t,promise:l};try{return await l}finally{ae.current?.generation===t&&(ae.current=null)}}async function At(t,n){try{const o=await Tt();if(n!==te.current)return;D(Yn(o,t,st))}catch{if(n!==te.current)return;D([])}}async function Ot(t,n){M(!0);try{const o=await Z("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:ot});if(n!==te.current)return;C(Jn(o.results??"")),I((o.matchCount??0)>=ot)}catch{if(n!==te.current)return;C([]),I(!1)}finally{n===te.current&&M(!1)}}function Ft(t){const n=t.trim(),o=++te.current;At(n,o),n.length<$r?(C(null),M(!1),I(!1)):Ot(n,o)}function It(t){if(U(t),q.current&&clearTimeout(q.current),!t.trim()){kt();return}q.current=setTimeout(()=>{Ft(t)},_r)}function Ve(t){const n=Se.current;if(!n||n.path!==d)return;Se.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function Lt(t){Se.current={path:t.path,line:t.line};const n=d===t.path&&ie.get(t.path)?.loaded;ce(t.path),n&&Me.current&&Ve(Me.current)}async function $t(t,n){try{await Z("write",{path:Q(t),content:n}),ve("file saved via sandbox /write",{path:t}),me.invalidateQueries({queryKey:tt(i,e,s)});try{const o=await bn(i,e,s);ve("git status after save",o)}catch(o){ve("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}ne(o=>{const l=new Map(o),f=l.get(t);return f&&l.set(t,{...f,savedContent:n}),l})}catch(o){ve("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){h(t),R({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),fe(null),k.includes(t)||v(n=>[...n,t]),Ue(t)}function zt(t){v(n=>{const o=n.filter(l=>l!==t);return d===t&&h(o[o.length-1]??null),o}),ne(n=>{const o=new Map(n);return o.delete(t),o})}function He(t){y(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Gt(t){if(Fe(t,_.current))try{if(await Be(t))return}catch(n){W.error(n instanceof Error?n.message:"Failed to load folder");return}He(t)}async function Kt(t,n){if(n){He(t);return}await Gt(t)}async function ce(t){await $.current,await Et(t);const n=Te(t);y(o=>{const l=new Set(o);for(const f of n)l.add(f);return l}),_t(t)}function Bt(){return w?.kind==="directory"?w.path:w?.kind==="file"?Ce(w.path):d?Ce(d):"/"}function We(t){const n=Bt();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Ut=Un(x,p),qe=Vn(Ut,g),Ee=S?.length??0,Qe=Hn(b??[]),Xe=b?.length??0,re=d?ie.get(d):null,Vt=re?.loaded&&re.editorValue!==re.savedContent,Ht=Re?Ct(Re.path):[],Wt=(t,n)=>{Me.current=t,Ve(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await $t(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const f=l.getValueInRange(o);fe({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function qt(t){if(!J)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${J.filePath}\``,`**Lines:** ${J.lineStart}–${J.lineEnd}`];if(J.selectedCode){const o=Oe(J.filePath),l=J.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),gt("chat"),ht({parts:[{type:"text",text:n.join(`
2
+ `)}]}),fe(null)}return z&&!T?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(gn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:j,onChange:t=>It(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(Je,{children:[r.jsx(Ze,{asChild:!0,children:r.jsx(Ne,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>We("new-file"),children:r.jsx(vn,{size:14})})}),r.jsx(et,{side:"bottom",children:"New file"})]}),r.jsxs(Je,{children:[r.jsx(Ze,{asChild:!0,children:r.jsx(Ne,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>We("new-folder"),children:r.jsx(yn,{size:14})})}),r.jsx(et,{side:"bottom",children:"New folder"})]})]}),r.jsx(wn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!j&&qe.map(t=>{const{node:n,depth:o}=t,l=n.kind==="directory",f=g.has(n.path),N=w?.path===n.path,de=Wn(n.path,n.kind),ge=l&&K.has(n.path);return r.jsx(Lr,{node:n,depth:o,isExpanded:f,isSelected:N,isLoading:ge,fileVisual:Ae(n.name),onSelect:()=>R(n),onOpen:()=>{l?Kt(n.path,f):ce(n.path)},onNewFile:()=>X({mode:"new-file",node:n,parentDir:de}),onNewFolder:()=>X({mode:"new-folder",node:n,parentDir:de}),onCopyPath:()=>_e("Path",ye(n.path)),onCopyRelativePath:()=>_e("Relative path",Q(n.path)),onRename:()=>X({mode:"rename",node:n,parentDir:de}),onDelete:()=>De(n)},n.path)}),!j&&T&&qe.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"No files found"}),j&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:"Files"}),Ee>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Ee,Ee>=st?"+":""]})]}),S!==null&&S.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"No file names match"}),S?.map(t=>{const n=t.split("/").pop()??t,o=Ce(t),{Icon:l,color:f}=Ae(n),N=d===t;return r.jsxs("button",{type:"button",onClick:()=>{ce(t)},title:t,className:ee("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",N&&"bg-accent"),children:[r.jsx(l,{size:14,className:ee("shrink-0",f)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),j&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:"In files"}),Xe>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Xe,V?"+":""]}),P&&r.jsx(se,{size:10,className:"animate-spin"})]}),!P&&b!==null&&Qe.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"No matches in file contents"}),Qe.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:l}=Ae(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:ee("shrink-0",l)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(f=>r.jsxs("button",{type:"button",onClick:()=>Lt(f),title:`${t.path}:${f.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:f.line}),r.jsx(Gr,{text:f.text,query:j})]},`${t.path}:${f.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[k.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:k.map(t=>{const n=ie.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,l=d===t,f=t.split("/").pop()??t;return r.jsxs("div",{className:ee("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",l?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{h(t),Ue(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":l,children:[r.jsx("span",{className:"truncate max-w-32",children:f}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:N=>{N.stopPropagation(),zt(t)},children:r.jsx(Cn,{size:12})})]},t)})}),J&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&qt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&fe(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:"Send"}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&re?.loaded?r.jsx(xn,{language:Oe(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:re.editorValue,path:d,onChange:t=>{const n=d;n&&ne(o=>{const l=new Map(o),f=l.get(n);return f&&l.set(n,{...f,editorValue:t??""}),l})},onMount:Wt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!re?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[Vt?"Modified":"Saved"," ·"," ",Oe(d)]})]})]}),r.jsx(nr,{open:F!==null,mode:F?.mode??"new-file",initialName:F?.mode==="rename"?F.node.name:"",parentLabel:F&&F.mode!=="rename"?F.parentDir==="/"?"/":Q(F.parentDir):void 0,isPending:pe,onSubmit:Mt,onOpenChange:t=>{!t&&!pe&&X(null)}}),r.jsx(rr,{deleteTarget:Re,deleteDirtyPaths:Ht,fsActionPending:pe,onOpenChange:t=>{!t&&!pe&&De(null)},onConfirm:t=>{St(t)}})]})}export{La as FileExplorer};
@@ -1,4 +1,4 @@
1
- import{bw as zl,j as q,aM as lt,bL as zn,r as Ve,F as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-DmhdwAgP.js";import{i as zb}from"./ChevronUp-D5F6V6Tm.js";import{a as jb}from"./Copy01-BkGYkmm-.js";import{e as S0,g as y0,f as A0,a as _0}from"./dialog-DUqhzGiD.js";import{n as I0}from"./Globe01-D3vBqhI7.js";import{k as k0,n as R0}from"./ZoomOut-BprgOfkE.js";import{u as N0}from"./use-mobile-D8w2xyip.js";import{h as C0}from"./tab-id-BijBBRwE.js";function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=jl();function Vb(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},v0=/^(?:[ \t]*(?:\n|$))+/,w0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_n=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,O0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,Yb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wb=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),L0=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,D0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vl).getRegex(),er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,F0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kl).replace("tag",er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kb=le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),B0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kb).getRegex(),Xl={blockquote:B0,code:w0,def:M0,fences:x0,heading:O0,hr:_n,html:F0,lheading:Wb,list:P0,newline:v0,paragraph:Kb,table:ln,text:D0},Mc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),U0={...Xl,lheading:L0,table:Mc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex()},H0={...Xl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Yl).replace("hr",_n).replace("heading",` *#{1,6} *[^
1
+ import{bs as zl,j as q,aM as lt,bI as zn,r as Ve,F as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-CIFSbzEF.js";import{i as zb}from"./Check-CfdDVvTz.js";import{a as jb}from"./Copy01-Du_h2a2a.js";import{e as S0,g as y0,f as A0,a as _0}from"./dialog-a73gSkG2.js";import{n as I0}from"./Globe01-FT_j78GO.js";import{k as k0,n as R0}from"./ZoomOut-HpkK_jz9.js";import{u as N0}from"./use-mobile-48jgjwiy.js";import{h as C0}from"./tab-id-BijBBRwE.js";function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=jl();function Vb(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},v0=/^(?:[ \t]*(?:\n|$))+/,w0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_n=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,O0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,Yb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wb=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),L0=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,D0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vl).getRegex(),er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,F0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kl).replace("tag",er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kb=le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),B0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kb).getRegex(),Xl={blockquote:B0,code:w0,def:M0,fences:x0,heading:O0,hr:_n,html:F0,lheading:Wb,list:P0,newline:v0,paragraph:Kb,table:ln,text:D0},Mc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),U0={...Xl,lheading:L0,table:Mc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex()},H0={...Xl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Yl).replace("hr",_n).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Wb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},q0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,G0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xb=/^( {2,}|\\)\n(?!\s*$)/,$0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tr=/[\p{P}\p{S}]/u,Zl=/[\s\p{P}\p{S}]/u,Zb=/[^\s\p{P}\p{S}]/u,z0=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zl).getRegex(),Qb=/(?!~)[\p{P}\p{S}]/u,j0=/(?!~)[\s\p{P}\p{S}]/u,V0=/(?:[^\s\p{P}\p{S}]|~)/u,Y0=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Jb=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,W0=le(Jb,"u").replace(/punct/g,tr).getRegex(),K0=le(Jb,"u").replace(/punct/g,Qb).getRegex(),eE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",X0=le(eE,"gu").replace(/notPunctSpace/g,Zb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),Z0=le(eE,"gu").replace(/notPunctSpace/g,V0).replace(/punctSpace/g,j0).replace(/punct/g,Qb).getRegex(),Q0=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Zb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),J0=le(/\\(punct)/,"gu").replace(/punct/g,tr).getRegex(),eS=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),tS=le(Kl).replace("(?:-->|$)","-->").getRegex(),nS=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",tS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jn=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rS=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",jn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tE=le(/^!?\[(label)\]\[(ref)\]/).replace("label",jn).replace("ref",Wl).getRegex(),nE=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wl).getRegex(),aS=le("reflink|nolink(?!\\()","g").replace("reflink",tE).replace("nolink",nE).getRegex(),Ql={_backpedal:ln,anyPunctuation:J0,autolink:eS,blockSkip:Y0,br:Xb,code:G0,del:ln,emStrongLDelim:W0,emStrongRDelimAst:X0,emStrongRDelimUnd:Q0,escape:q0,link:rS,nolink:nE,punctuation:z0,reflink:tE,reflinkSearch:aS,tag:nS,text:$0,url:ln},iS={...Ql,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",jn).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jn).getRegex()},_l={...Ql,emStrongRDelimAst:Z0,emStrongLDelim:K0,url:le(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},oS={..._l,br:le(Xb).replace("{2,}","*").getRegex(),text:le(_l.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xn={normal:Xl,gfm:U0,pedantic:H0},Jt={normal:Ql,gfm:_l,breaks:oS,pedantic:iS},sS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Pc=e=>sS[e];function Je(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,Pc)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,Pc);return e}function Fc(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function Bc(e,t){const n=e.replace(xe.findPipe,(i,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),r=n.split(xe.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(xe.slashPipe,"|");return r}function en(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function uS(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Uc(e,t,n,r,a){const i=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,u}function lS(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
3
3
  `).map(i=>{const o=i.match(n.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=a.length?i.slice(a.length):i}).join(`
4
4
  `)}var Vn=class{options;rules;lexer;constructor(e){this.options=e||Nt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:en(n,`
@@ -1 +1 @@
1
- import{c as a,e as o,j as i,N as l}from"./index-DmhdwAgP.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-CIFSbzEF.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{dC as C,c as d,j as c,ah as j,r as f,l as p,bd as b,dD as h,dE as v}from"./index-DmhdwAgP.js";import{L as N}from"./label-CB2o7dZ2.js";const E=C,g=f.createContext({}),M=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=h();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=v(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=f.createContext({});function w(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
1
+ import{dC as C,c as d,j as c,ah as j,r as f,l as p,b9 as b,dD as h,dE as v}from"./index-CIFSbzEF.js";import{L as N}from"./label-BCtHDi1-.js";const E=C,g=f.createContext({}),M=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=h();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=v(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=f.createContext({});function w(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
@@ -0,0 +1 @@
1
+ import{c as V,C as te,r as Z,j as i,B as X,L as ge,H as de,I as W,b as me,n as ue,M as fe,J as pe,d as oe,p as ee,t as q,K as ie,ah as se,D as ne,s as he}from"./index-CIFSbzEF.js";import{P as M}from"./index-BZIMlfJW.js";import{A as xe,b as je}from"./alert-C26tfGUe.js";import{i as Se}from"./ArrowRight-CMDrgznR.js";import{n as ze}from"./LinkExternal01-Dw89NskH.js";import{s as ve}from"./XClose-CVT1rN5P.js";import{u as be}from"./use-org-auth-client-C7loj_lF.js";import{u as ye}from"./use-debounced-autosave-bRNiU42w.js";import{u as H}from"./use-t-DfEf5oHx.js";import{A as Oe}from"./avatar-CMlDI2D-.js";import{I as ae}from"./input-COKCWjWn.js";import{S as re,a as le,b as Q,c as Ce}from"./settings-section-BrZlvNfy.js";import{D as we}from"./domain-settings-DkMlfYSa.js";import{u as De}from"./studio-tools-DvzlcJzu.js";import{c as _e,d as Ae,b as Ne,A as Fe,g as Te,e as Ee,a as Pe,f as Re}from"./alert-dialog-BeSbCM7Y.js";import{R as ke}from"./require-capability-rAgzBn6-.js";import"./sidebar-BssgvH2v.js";import"./LayoutLeft-DDdEDKm1.js";import"./use-mobile-48jgjwiy.js";import"./X-BWhzmnUU.js";import"./tooltip-B6N5kQd7.js";import"./User01-JYrKFpRC.js";import"./card-Dd8gUiG_.js";import"./ArrowUpRight-ChAriHcE.js";import"./badge-BIKuZNrQ.js";import"./select-mGmKPAXK.js";import"./Check-CfdDVvTz.js";import"./ChevronDown-BRbMyZ1B.js";import"./ChevronUp-BT9WG4FQ.js";import"./use-capability-n8ljqiDB.js";import"./access-gate-DNuevEtG.js";import"./capability-load-error-Bn3urkKl.js";function ce(e){return`connect-banner-dismissed:${e}`}function Le(e){if(typeof window>"u")return!0;try{return localStorage.getItem(ce(e))==="1"}catch{return!1}}function Ie(){const e=V.c(17),{org:t}=te();let n;e[0]!==t.id?(n=()=>Le(t.id),e[0]=t.id,e[1]=n):n=e[1];const[u,p]=Z.useState(n);if(u)return null;let o;e[2]!==t.id?(o=()=>{p(!0);try{localStorage.setItem(ce(t.id),"1")}catch{}},e[2]=t.id,e[3]=o):o=e[3];const g=o;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(ze,{}),e[4]=d):d=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=l):l=e[5];let c;e[6]!==t.slug?(c={org:t.slug},e[6]=t.slug,e[7]=c):c=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Se,{size:12}),e[8]=m):m=e[8];let s;e[9]!==c?(s=i.jsx(X,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(ge,{to:"/$org/settings/connect",params:c,children:["Connect to clients ",m]})}),e[9]=c,e[10]=s):s=e[10];let a;e[11]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(ve,{size:14}),e[11]=a):a=e[11];let r;e[12]!==g?(r=i.jsx(X,{variant:"ghost",size:"icon",className:"size-7",onClick:g,"aria-label":"Dismiss",children:a}),e[12]=g,e[13]=r):r=e[13];let f;return e[14]!==s||e[15]!==r?(f=i.jsxs(xe,{variant:"info",className:"items-center",children:[d,i.jsxs(je,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[l,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s,r]})]})]}),e[14]=s,e[15]=r,e[16]=f):f=e[16],f}const $e=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function Be(e){return typeof e=="string"&&$e.has(e.trim().toLowerCase())}const qe=de({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens").refine(e=>!Be(e),"This organization URL is reserved by Studio"),logo:W().optional()});function Ve(e){const t=V.c(17),{value:n,onChange:u,name:p,disabled:o}=e,g=H(),d=Z.useRef(null);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>d.current?.click(),t[0]=l):l=t[0];const c=l;let m;t[1]!==u||t[2]!==g?(m=Y=>{const S=Y.target.files?.[0];if(!S)return;if(S.size>2097152){q.error(g("settings.organizationForm.imageTooLarge"));return}const x=new FileReader;x.onerror=()=>q.error(g("settings.organizationForm.failedToReadImage")),x.onloadend=()=>{x.result&&u(x.result),d.current&&(d.current.value="")},x.readAsDataURL(S)},t[1]=u,t[2]=g,t[3]=m):m=t[3];const s=m;let a;t[4]!==g?(a=g("settings.organizationForm.uploadLogoLabel"),t[4]=g,t[5]=a):a=t[5];let r;t[6]!==o||t[7]!==s?(r=i.jsx("input",{ref:d,type:"file",accept:"image/*",onChange:s,className:"hidden",disabled:o}),t[6]=o,t[7]=s,t[8]=r):r=t[8];const f=n||void 0,j=p??"?";let h;t[9]!==f||t[10]!==j?(h=i.jsx(Oe,{url:f,fallback:j,shape:"square",size:"base"}),t[9]=f,t[10]=j,t[11]=h):h=t[11];let z;return t[12]!==o||t[13]!==a||t[14]!==r||t[15]!==h?(z=i.jsxs("button",{type:"button",onClick:c,disabled:o,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":a,children:[r,h]}),t[12]=o,t[13]=a,t[14]=r,t[15]=h,t[16]=z):z=t[16],z}function Ge(){const e=H(),t=me(),{org:n}=te(),u=be(),p=ue(),o=fe({resolver:pe(qe),values:{name:n.name??"",slug:n.slug??"",logo:n.logo??""}}),g=oe({mutationFn:async s=>{const a={name:s.name,slug:s.slug};s.logo&&(a.logo=s.logo);const r=await u.organization.update({data:a});if(r?.error)throw new Error(r.error.message||e("settings.organizationForm.failedToUpdateOrg"));return r},onSuccess:(s,a)=>{ee("organization_settings_updated",{organization_id:n.id,fields:Object.keys(a)}),p.invalidateQueries({queryKey:ie.organizations()}),p.invalidateQueries({queryKey:ie.activeOrganization(n.slug)}),q.success(e("settings.organizationForm.updateSuccess")),s?.data?.slug&&s.data.slug!==n.slug&&t({to:"/$org/settings/general",params:{org:s.data.slug}})},onError:(s,a)=>{ee("organization_settings_update_failed",{organization_id:n.id,fields:Object.keys(a),error:s instanceof Error?s.message:String(s)}),q.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:l}=ye({save:async()=>{const s=o.control._formState.dirtyFields;if(Object.keys(s).length===0||!await o.trigger())return;const r=o.getValues(),f=o.control._defaultValues;o.reset(r,{keepValues:!0});try{await g.mutateAsync(r)}catch{o.reset(f,{keepValues:!0})}}}),c=o.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(re,{children:i.jsxs(le,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ve,{value:o.watch("logo"),onChange:s=>{o.setValue("logo",s??"",{shouldDirty:!0}),l()},name:o.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(se,{control:o.control,name:"name",render:({field:s})=>i.jsx(ae,{id:"org-name",...s,onChange:a=>{s.onChange(a),d()},onBlur:()=>{s.onBlur(),l()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[m&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),i.jsx(se,{control:o.control,name:"slug",render:({field:s})=>i.jsx("input",{id:"org-slug",value:s.value??"",name:s.name,ref:s.ref,placeholder:e("settings.organizationForm.slugPlaceholder"),className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:a=>{const r=a.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");o.setValue("slug",r,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),d()},onBlur:()=>{s.onBlur(),l()}})})]})}),(c.name||c.slug||c.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[c.name&&i.jsx("p",{className:"text-xs text-destructive",children:c.name.message}),c.slug&&i.jsx("p",{className:"text-xs text-destructive",children:c.slug.message}),c.logo&&i.jsx("p",{className:"text-xs text-destructive",children:c.logo.message})]})]})})}function Ue(){const e=V.c(86),t=H(),{org:n}=te(),[u,p]=Z.useState(!1),[o,g]=Z.useState(""),d=De();let l;e[0]!==n.id||e[1]!==d?(l=async()=>{await d.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=d,e[2]=l):l=e[2];let c;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(c=()=>{ee("organization_deleted",{organization_id:n.id}),localStorage.getItem(ne.lastOrgSlug())===n.slug&&localStorage.removeItem(ne.lastOrgSlug()),he(),q.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=c):c=e[6];let m;e[7]!==t?(m=v=>{q.error(v instanceof Error?v.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=m):m=e[8];let s;e[9]!==l||e[10]!==c||e[11]!==m?(s={mutationFn:l,onSuccess:c,onError:m},e[9]=l,e[10]=c,e[11]=m,e[12]=s):s=e[12];const a=oe(s);let r;e[13]!==t?(r=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=r):r=e[14];let f;e[15]!==t?(f=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=f):f=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let h;e[19]!==t?(h=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=h):h=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=()=>p(!0),e[21]=z):z=e[21];const Y=a.isPending;let S;e[22]!==t?(S=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=S):S=e[23];let x;e[24]!==a.isPending||e[25]!==S?(x=i.jsx(X,{variant:"destructive",size:"sm",onClick:z,disabled:Y,children:S}),e[24]=a.isPending,e[25]=S,e[26]=x):x=e[26];let b;e[27]!==x||e[28]!==j||e[29]!==h?(b=i.jsx(le,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:h,action:x})}),e[27]=x,e[28]=j,e[29]=h,e[30]=b):b=e[30];let y;e[31]!==b||e[32]!==r||e[33]!==f?(y=i.jsx(re,{title:r,description:f,children:b}),e[31]=b,e[32]=r,e[33]=f,e[34]=y):y=e[34];let G;e[35]===Symbol.for("react.memo_cache_sentinel")?(G=v=>{p(v),v||g("")},e[35]=G):G=e[35];let O;e[36]!==t?(O=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=O):O=e[37];let C;e[38]!==O?(C=i.jsx(_e,{children:O}),e[38]=O,e[39]=C):C=e[39];let w;e[40]!==n.name||e[41]!==t?(w=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=w):w=e[42];let D;e[43]!==w?(D=i.jsx("p",{children:w}),e[43]=w,e[44]=D):D=e[44];let _;e[45]!==n.name||e[46]!==t?(_=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=_):_=e[47];let A;e[48]!==_?(A=i.jsx("p",{className:"mt-3 mb-1.5",children:_}),e[48]=_,e[49]=A):A=e[49];let U;e[50]===Symbol.for("react.memo_cache_sentinel")?(U=v=>g(v.target.value),e[50]=U):U=e[50];let N;e[51]!==o||e[52]!==n.name?(N=i.jsx(ae,{value:o,onChange:U,placeholder:n.name,autoFocus:!0}),e[51]=o,e[52]=n.name,e[53]=N):N=e[53];let F;e[54]!==D||e[55]!==A||e[56]!==N?(F=i.jsx(Ae,{asChild:!0,children:i.jsxs("div",{children:[D,A,N]})}),e[54]=D,e[55]=A,e[56]=N,e[57]=F):F=e[57];let T;e[58]!==C||e[59]!==F?(T=i.jsxs(Ne,{children:[C,F]}),e[58]=C,e[59]=F,e[60]=T):T=e[60];let E;e[61]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=E):E=e[62];let P;e[63]!==E?(P=i.jsx(Fe,{children:E}),e[63]=E,e[64]=P):P=e[64];let R;e[65]!==a?(R=()=>a.mutate(),e[65]=a,e[66]=R):R=e[66];const J=o!==n.name||a.isPending;let k;e[67]!==a.isPending||e[68]!==t?(k=a.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=a.isPending,e[68]=t,e[69]=k):k=e[69];let L;e[70]!==R||e[71]!==J||e[72]!==k?(L=i.jsx(Te,{onClick:R,disabled:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=R,e[71]=J,e[72]=k,e[73]=L):L=e[73];let I;e[74]!==P||e[75]!==L?(I=i.jsxs(Ee,{children:[P,L]}),e[74]=P,e[75]=L,e[76]=I):I=e[76];let $;e[77]!==T||e[78]!==I?($=i.jsxs(Pe,{children:[T,I]}),e[77]=T,e[78]=I,e[79]=$):$=e[79];let B;e[80]!==u||e[81]!==$?(B=i.jsx(Re,{open:u,onOpenChange:G,children:$}),e[80]=u,e[81]=$,e[82]=B):B=e[82];let K;return e[83]!==y||e[84]!==B?(K=i.jsxs(i.Fragment,{children:[y,B]}),e[83]=y,e[84]=B,e[85]=K):K=e[85],K}function Ke(){const e=V.c(10),t=H();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let u;e[2]!==n?(u=i.jsx(M.Title,{children:n}),e[2]=n,e[3]=u):u=e[3];let p,o,g,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(Ie,{}),o=i.jsx(Ge,{}),g=i.jsx(we,{}),d=i.jsx(Ue,{}),e[4]=p,e[5]=o,e[6]=g,e[7]=d):(p=e[4],o=e[5],g=e[6],d=e[7]);let l;return e[8]!==u?(l=i.jsx(M,{children:i.jsx(M.Content,{children:i.jsx(M.Body,{children:i.jsxs(Ce,{children:[u,p,o,g,d]})})})}),e[8]=u,e[9]=l):l=e[9],l}function Ot(){const e=V.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(ke,{capability:"org:manage",area:"general settings",children:i.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Ot as default};
@@ -1 +1 @@
1
- import{C as B,a as Y,n as $,r as T,ac as O,c as R,j as t,i as z,d as Q,t as H,dF as W,K as G,m as X,B as Z,l as F,v as ee,w as te}from"./index-DmhdwAgP.js";import{D as ne,a as se,d as oe,e as ie}from"./dialog-DUqhzGiD.js";import{C as re}from"./collection-search-TcSAZpqK.js";import{u as le}from"./use-debounced-value-CSp0_yRg.js";import{b as M,u as ae}from"./use-connection-DM1ROgj3.js";import{u as U,S as V}from"./use-mcp-client-DseZ3Mea.js";import{a as K}from"./authenticate-and-persist-oauth-CEv4KtcH.js";import{b as J}from"./Settings02-DMpqOK24.js";import{O as ce}from"./agent-icon-DicjSkHu.js";import{u as ue,G as P}from"./use-registry-app-Cy7ipz7c.js";import{e as de}from"./extract-connection-data-_NDoBHMa.js";import{c as me}from"./use-navigate-to-agent-YScxPu5L.js";import{p as q,f as fe}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as xe}from"./github-repo-scope-DjMZbiKa.js";const ge="deco/mcp-github";function he(N){const{org:e}=B(),{data:i}=Y.useSession(),f=M(),v=$(),[g,s]=T.useState("idle"),[h,x]=T.useState(null),[p,C]=T.useState(null),{data:b,isLoading:l}=ue(ge,{enabled:N.enabled}),o=T.useRef(!1);N.enabled&&b&&!l&&!o.current&&i?.user?.id&&g==="idle"&&(o.current=!0,a());async function a(){if(!(!b||!i?.user?.id||!e))try{s("installing"),x(null);const r=de(b,e.id,i.user.id,{remoteIndex:0});if(!r.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:y}=await f.create.mutateAsync(r);s("authenticating");const d=await K({connectionId:y,orgId:e.id,orgSlug:e.slug,persistFallback:n=>f.update.mutateAsync({id:y,data:{connection_token:n}}).then(()=>{})});if(d.ran&&!d.ok){try{await f.delete.mutateAsync(y)}catch{}throw new Error(d.error&&d.error!=="no token received"?d.error:"No token received from GitHub")}O(v,e.id),C(r),s("ready")}catch(r){x(r instanceof Error?r.message:String(r)),s("error")}}function c(){s("idle"),x(null),C(null),o.current=!1}return N.enabled&&l&&g==="idle"?{status:"installing",error:null,connection:null,retry:c}:{status:g,error:h,connection:p,retry:c}}function He(N){const e=R.c(22),{open:i,onOpenChange:f,title:v,onImportComplete:g,mode:s}=N,h=s===void 0?"agent":s,x=v??(h==="connection"?"Add repo":"Import from GitHub"),[p,C]=T.useState(null);let b;e[0]!==x?(b=t.jsx(ne,{className:"sr-only",children:t.jsx(se,{children:x})}),e[0]=x,e[1]=b):b=e[1];let l;e[2]!==x||e[3]!==p?(l=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:p?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(J,{size:16})}),t.jsx("img",{src:p.avatarUrl,alt:p.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:p.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(P,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:x})]})}),e[2]=x,e[3]=p,e[4]=l):l=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=o):o=e[5];let a;e[6]!==f?(a=()=>f(!1),e[6]=f,e[7]=a):a=e[7];let c;e[8]!==h||e[9]!==g||e[10]!==i||e[11]!==p||e[12]!==a?(c=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:o,children:t.jsx(pe,{open:i,onComplete:a,selectedInstallation:p,onSelectInstallation:C,onImportComplete:g,mode:h})})}),e[8]=h,e[9]=g,e[10]=i,e[11]=p,e[12]=a,e[13]=c):c=e[13];let r;e[14]!==b||e[15]!==l||e[16]!==c?(r=t.jsxs(oe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[b,l,c]}),e[14]=b,e[15]=l,e[16]=c,e[17]=r):r=e[17];let u;return e[18]!==f||e[19]!==i||e[20]!==r?(u=t.jsx(ie,{open:i,onOpenChange:f,children:r}),e[18]=f,e[19]=i,e[20]=r,e[21]=u):u=e[21],u}function pe({open:N,onComplete:e,selectedInstallation:i,onSelectInstallation:f,onImportComplete:v,mode:g="agent"}){const{org:s}=B(),h=$(),x=me(),[p,C]=T.useState(null),b=ae({slug:"mcp-github"}),l=xe(b),o=he({enabled:N&&l.length===0}),a=l.length===1?l[0]??null:p,c=U({connectionId:a?.id??"",orgId:s.id,orgSlug:s.slug}),r=U({connectionId:V,orgId:s.id,orgSlug:s.slug}),u=async(n,j)=>{try{const k=await c.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:j}});if(k.isError)return null;const I=k.content?.find(m=>m.type==="resource")?.resource?.text;if(!I)return null;try{const m=JSON.parse(I);return typeof m=="string"?m:JSON.stringify(m)}catch{return I}}catch{return null}},y=(n,j)=>{Promise.all([u(j,"AGENTS.md"),u(j,"CLAUDE.md")]).then(async([S,k])=>{const w=S??k??null;w&&(await r.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:w}}}}),O(h,s.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},d=Q({mutationFn:async n=>{if(!a||!i)throw new Error("No GitHub connection or installation");const j=i.installationId;if(g==="connection"){const{childConnectionId:w}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:I=>c.callTool(I),selfCallTool:I=>r.callTool(I),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:w,item:null}}const{childConnectionId:S}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>r.callTool(w)});let k=null;try{const w=await r.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:j,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),I=w.structuredContent??w,m=I.item?.id;if(!I.item||!m)throw new Error("Failed to create the imported agent");return k=m,{virtualMcpId:m,repo:n,connectionId:S,item:I.item}}catch(w){throw k&&await r.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:k}}).catch(()=>{}),await r.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),w}},onSuccess:({virtualMcpId:n,repo:j,connectionId:S,item:k})=>{if(g==="connection"||!n||!k){O(h,s.id),W(h,s.id),H.success(`Added ${j.name}`),e();return}if(h.setQueryData(G.collectionItem(r,s.id,"","VIRTUAL_MCP",n),{item:k}),O(h,s.id),y(n,j),v){v({virtualMcpId:n,repo:j,connectionId:S});return}H.success(`Imported ${j.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),x(n)},onError:n=>{H.error("Failed to import repo: "+(n instanceof Error?n.message:"Unknown error"))}});return o.status==="installing"||o.status==="authenticating"?t.jsx(D,{status:o.status,error:null,retry:o.retry}):o.status==="error"?t.jsx(D,{status:"error",error:o.error,retry:o.retry}):l.length===0&&o.status==="idle"?t.jsx(D,{status:"installing",error:null,retry:o.retry}):l.length>1&&!a?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),l.map(n=>t.jsxs("button",{type:"button",onClick:()=>C(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(P,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):a?i?t.jsx(Ne,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,installation:i,onSelectRepo:n=>d.mutate(n),isSaving:d.isPending}):t.jsx(be,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,onSelect:f,showBackButton:l.length>1,onBack:()=>C(null)}):null}function be(N){const e=R.c(47),{connectionId:i,orgId:f,orgSlug:v,onSelect:g,showBackButton:s,onBack:h}=N;let x;e[0]!==f||e[1]!==v?(x={connectionId:V,orgId:f,orgSlug:v},e[0]=f,e[1]=v,e[2]=x):x=e[2];const p=U(x),C=$(),b=M();let l;e[3]!==i||e[4]!==f?(l=G.githubUserOrgs(f,i),e[3]=i,e[4]=f,e[5]=l):l=e[5];let o;e[6]!==i||e[7]!==p?(o=()=>fe(m=>p.callTool(m),i),e[6]=i,e[7]=p,e[8]=o):o=e[8];let a;e[9]!==l||e[10]!==o?(a={queryKey:l,queryFn:o},e[9]=l,e[10]=o,e[11]=a):a=e[11];const c=X(a);let r;e[12]!==b||e[13]!==i||e[14]!==c||e[15]!==f||e[16]!==v||e[17]!==C?(r={mutationFn:async()=>{const m=await K({connectionId:i,orgId:f,orgSlug:v,persistFallback:E=>b.update.mutateAsync({id:i,data:{connection_token:E}}).then(je)});if(m.ran&&!m.ok)throw new Error(m.error??"no token received");const _=new URL(`/api/${v}/mcp/${i}`,window.location.origin);await C.invalidateQueries({queryKey:G.isMCPAuthenticated(_.href,null)}),await C.invalidateQueries({queryKey:G.mcpClientPrefix()}),await c.refetch()},onError:ye},e[12]=b,e[13]=i,e[14]=c,e[15]=f,e[16]=v,e[17]=C,e[18]=r):r=e[18];const u=Q(r);if(c.isLoading){let m;return e[19]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=m):m=e[19],m}if(c.isError){let m,_;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),_=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=m,e[21]=_):(m=e[20],_=e[21]);let E;e[22]!==u?(E=()=>u.mutate(),e[22]=u,e[23]=E):E=e[23];let A;e[24]!==u.isPending?(A=u.isPending?t.jsx(z,{size:14,className:"animate-spin"}):t.jsx(P,{className:"size-3.5"}),e[24]=u.isPending,e[25]=A):A=e[25];let L;return e[26]!==u.isPending||e[27]!==E||e[28]!==A?(L=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[m,_,t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:E,disabled:u.isPending,children:[A,"Reconnect GitHub"]})]}),e[26]=u.isPending,e[27]=E,e[28]=A,e[29]=L):L=e[29],L}const y=c.data;if(!y)return null;let d;e[30]!==h||e[31]!==s?(d=s&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:h,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(J,{size:12}),"Change connection"]})}),e[30]=h,e[31]=s,e[32]=d):d=e[32];let n;if(e[33]!==y.installations||e[34]!==g){let m;e[36]!==g?(m=_=>t.jsxs("button",{type:"button",onClick:()=>g(_),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:_.avatarUrl,alt:_.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},_.installationId),e[36]=g,e[37]=m):m=e[37],n=y.installations.map(m),e[33]=y.installations,e[34]=g,e[35]=n}else n=e[35];let j;e[38]!==n?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:n}),e[38]=n,e[39]=j):j=e[39];const S=y.appSlug?`https://github.com/apps/${y.appSlug}/installations/new`:"https://github.com/settings/installations";let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=k):k=e[40];let w;e[41]!==S?(w=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",k]})}),e[41]=S,e[42]=w):w=e[42];let I;return e[43]!==w||e[44]!==d||e[45]!==j?(I=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[d,j,w]}),e[43]=w,e[44]=d,e[45]=j,e[46]=I):I=e[46],I}function ye(N){H.error("Failed to reconnect GitHub: "+(N instanceof Error?N.message:"Unknown error"))}function je(){}function Ne(N){const e=R.c(20),{connectionId:i,orgId:f,orgSlug:v,installation:g,onSelectRepo:s,isSaving:h}=N,[x,p]=T.useState(""),C=le(x,300),b=T.useDeferredValue(C),l=x!==b;let o;e[0]!==l||e[1]!==x?(o=t.jsx(re,{placeholder:"Search repositories...",value:x,onChange:p,isSearching:l}),e[0]=l,e[1]=x,e[2]=o):o=e[2];const a=l?"opacity-40":"opacity-100";let c;e[3]!==a?(c=F("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",a),e[3]=a,e[4]=c):c=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=r):r=e[5];let u;e[6]!==i||e[7]!==b||e[8]!==g||e[9]!==h||e[10]!==s||e[11]!==f||e[12]!==v?(u=t.jsx(T.Suspense,{fallback:r,children:t.jsx(ve,{connectionId:i,orgId:f,orgSlug:v,installation:g,query:b,onSelectRepo:s,isSaving:h})}),e[6]=i,e[7]=b,e[8]=g,e[9]=h,e[10]=s,e[11]=f,e[12]=v,e[13]=u):u=e[13];let y;e[14]!==c||e[15]!==u?(y=t.jsx("div",{className:c,children:u}),e[14]=c,e[15]=u,e[16]=y):y=e[16];let d;return e[17]!==o||e[18]!==y?(d=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[o,y]}),e[17]=o,e[18]=y,e[19]=d):d=e[19],d}function ve(N){const e=R.c(29),{connectionId:i,orgId:f,orgSlug:v,installation:g,query:s,onSelectRepo:h,isSaving:x}=N;let p;e[0]!==i||e[1]!==f||e[2]!==v?(p={connectionId:i,orgId:f,orgSlug:v},e[0]=i,e[1]=f,e[2]=v,e[3]=p):p=e[3];const C=U(p),b=g.type==="User"?"user":"org",l=s?`${b}:${g.login} ${s} in:name`:`${b}:${g.login}`;let o;e[4]!==i||e[5]!==g.login||e[6]!==f||e[7]!==s?(o=G.githubOrgRepos(f,i,g.login,s),e[4]=i,e[5]=g.login,e[6]=f,e[7]=s,e[8]=o):o=e[8];let a;e[9]!==C||e[10]!==l?(a=async d=>{const{signal:n}=d,S=(await C.callTool({name:"search_repositories",arguments:{query:l,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(we)},e[9]=C,e[10]=l,e[11]=a):a=e[11];let c;e[12]!==o||e[13]!==a?(c={queryKey:o,queryFn:a},e[12]=o,e[13]=a,e[14]=c):c=e[14];const{data:r}=ee(c);if(r.length===0){let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=d):d=e[15];let n;e[16]!==s?(n=s&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=s,e[17]=n):n=e[17];let j;return e[18]!==n?(j=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[d,n]}),e[18]=n,e[19]=j):j=e[19],j}let u;if(e[20]!==x||e[21]!==h||e[22]!==r){let d;e[24]!==x||e[25]!==h?(d=n=>t.jsxs("button",{type:"button",onClick:()=>h(n),disabled:x,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(P,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:n.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[n.private?t.jsx(te,{size:10}):t.jsx(ce,{size:10}),n.private?"Private":"Public"]})]},n.fullName),e[24]=x,e[25]=h,e[26]=d):d=e[26],u=r.map(d),e[20]=x,e[21]=h,e[22]=r,e[23]=u}else u=e[23];let y;return e[27]!==u?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:u}),e[27]=u,e[28]=y):y=e[28],y}function we(N){return{name:N.name,fullName:N.full_name,owner:N.full_name.split("/")[0]??"",url:N.html_url,private:N.private,description:N.description,updatedAt:N.updated_at}}function D(N){const e=R.c(33),{status:i,error:f,retry:v}=N;if(i==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let k;e[1]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=k):k=e[1];const w=f??"Something went wrong while connecting to GitHub.";let I;e[2]!==w?(I=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=I):I=e[3];let m;e[4]!==v?(m=t.jsx("button",{type:"button",onClick:v,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=v,e[5]=m):m=e[5];let _;return e[6]!==I||e[7]!==m?(_=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,I,m]}),e[6]=I,e[7]=m,e[8]=_):_=e[8],_}const g=i==="authenticating";let s;e[9]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-foreground"})}),e[9]=s):s=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{className:"relative size-10",children:[s,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=h):h=e[10];const x=g?"Authenticating with GitHub":"Setting up GitHub";let p;e[11]!==x?(p=t.jsx("p",{className:"text-sm font-medium",children:x}),e[11]=x,e[12]=p):p=e[12];const C=g?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let b;e[13]!==C?(b=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=b):b=e[14];let l;e[15]!==p||e[16]!==b?(l=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[p,b]}),e[15]=p,e[16]=b,e[17]=l):l=e[17];const o=g?"bg-muted-foreground/30":"bg-foreground animate-pulse";let a;e[18]!==o?(a=F("size-1.5 rounded-full",o),e[18]=o,e[19]=a):a=e[19];let c;e[20]!==a?(c=t.jsx("span",{className:a}),e[20]=a,e[21]=c):c=e[21];const r=g?"bg-foreground animate-pulse":"bg-muted-foreground/30";let u;e[22]!==r?(u=F("size-1.5 rounded-full",r),e[22]=r,e[23]=u):u=e[23];let y;e[24]!==u?(y=t.jsx("span",{className:u}),e[24]=u,e[25]=y):y=e[25];let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=d):d=e[26];let n;e[27]!==c||e[28]!==y?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,d]}),e[27]=c,e[28]=y,e[29]=n):n=e[29];let j;return e[30]!==n||e[31]!==l?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[h,l,n]}),e[30]=n,e[31]=l,e[32]=j):j=e[32],j}export{He as G,he as u};
1
+ import{C as Q,a as Y,n as $,r as T,ac as H,c as R,j as t,i as z,d as B,t as O,dF as W,K as G,m as X,B as Z,l as F,v as ee,w as te}from"./index-CIFSbzEF.js";import{D as ne,a as se,d as oe,e as ie}from"./dialog-a73gSkG2.js";import{C as re}from"./collection-search-B_OixFPO.js";import{u as le}from"./use-debounced-value-DMJgrRLy.js";import{b as M,u as ae}from"./use-connection-DpPEk8aM.js";import{u as U,S as V}from"./use-mcp-client-CJ_CTOi-.js";import{a as K}from"./authenticate-and-persist-oauth-pF30Ku2c.js";import{b as J}from"./Settings02-DkDTX6wF.js";import{Q as ce}from"./agent-icon-C6bqiv4x.js";import{u as ue,G as P}from"./use-registry-app-MQ7-Pl5L.js";import{e as de}from"./extract-connection-data-DB1JAVkl.js";import{c as me}from"./use-navigate-to-agent-BuwUdTe3.js";import{p as q,f as fe}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as xe}from"./github-repo-scope-DjMZbiKa.js";const ge="deco/mcp-github";function he(N){const{org:e}=Q(),{data:i}=Y.useSession(),f=M(),v=$(),[g,s]=T.useState("idle"),[h,x]=T.useState(null),[p,C]=T.useState(null),{data:b,isLoading:l}=ue(ge,{enabled:N.enabled}),o=T.useRef(!1);N.enabled&&b&&!l&&!o.current&&i?.user?.id&&g==="idle"&&(o.current=!0,a());async function a(){if(!(!b||!i?.user?.id||!e))try{s("installing"),x(null);const r=de(b,e.id,i.user.id,{remoteIndex:0});if(!r.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:y}=await f.create.mutateAsync(r);s("authenticating");const d=await K({connectionId:y,orgId:e.id,orgSlug:e.slug,persistFallback:n=>f.update.mutateAsync({id:y,data:{connection_token:n}}).then(()=>{})});if(d.ran&&!d.ok){try{await f.delete.mutateAsync(y)}catch{}throw new Error(d.error&&d.error!=="no token received"?d.error:"No token received from GitHub")}H(v,e.id),C(r),s("ready")}catch(r){x(r instanceof Error?r.message:String(r)),s("error")}}function c(){s("idle"),x(null),C(null),o.current=!1}return N.enabled&&l&&g==="idle"?{status:"installing",error:null,connection:null,retry:c}:{status:g,error:h,connection:p,retry:c}}function Oe(N){const e=R.c(22),{open:i,onOpenChange:f,title:v,onImportComplete:g,mode:s}=N,h=s===void 0?"agent":s,x=v??(h==="connection"?"Add repo":"Import from GitHub"),[p,C]=T.useState(null);let b;e[0]!==x?(b=t.jsx(ne,{className:"sr-only",children:t.jsx(se,{children:x})}),e[0]=x,e[1]=b):b=e[1];let l;e[2]!==x||e[3]!==p?(l=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:p?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(J,{size:16})}),t.jsx("img",{src:p.avatarUrl,alt:p.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:p.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(P,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:x})]})}),e[2]=x,e[3]=p,e[4]=l):l=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=o):o=e[5];let a;e[6]!==f?(a=()=>f(!1),e[6]=f,e[7]=a):a=e[7];let c;e[8]!==h||e[9]!==g||e[10]!==i||e[11]!==p||e[12]!==a?(c=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:o,children:t.jsx(pe,{open:i,onComplete:a,selectedInstallation:p,onSelectInstallation:C,onImportComplete:g,mode:h})})}),e[8]=h,e[9]=g,e[10]=i,e[11]=p,e[12]=a,e[13]=c):c=e[13];let r;e[14]!==b||e[15]!==l||e[16]!==c?(r=t.jsxs(oe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[b,l,c]}),e[14]=b,e[15]=l,e[16]=c,e[17]=r):r=e[17];let u;return e[18]!==f||e[19]!==i||e[20]!==r?(u=t.jsx(ie,{open:i,onOpenChange:f,children:r}),e[18]=f,e[19]=i,e[20]=r,e[21]=u):u=e[21],u}function pe({open:N,onComplete:e,selectedInstallation:i,onSelectInstallation:f,onImportComplete:v,mode:g="agent"}){const{org:s}=Q(),h=$(),x=me(),[p,C]=T.useState(null),b=ae({slug:"mcp-github"}),l=xe(b),o=he({enabled:N&&l.length===0}),a=l.length===1?l[0]??null:p,c=U({connectionId:a?.id??"",orgId:s.id,orgSlug:s.slug}),r=U({connectionId:V,orgId:s.id,orgSlug:s.slug}),u=async(n,j)=>{try{const k=await c.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:j}});if(k.isError)return null;const I=k.content?.find(m=>m.type==="resource")?.resource?.text;if(!I)return null;try{const m=JSON.parse(I);return typeof m=="string"?m:JSON.stringify(m)}catch{return I}}catch{return null}},y=(n,j)=>{Promise.all([u(j,"AGENTS.md"),u(j,"CLAUDE.md")]).then(async([S,k])=>{const w=S??k??null;w&&(await r.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:w}}}}),H(h,s.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},d=B({mutationFn:async n=>{if(!a||!i)throw new Error("No GitHub connection or installation");const j=i.installationId;if(g==="connection"){const{childConnectionId:w}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:I=>c.callTool(I),selfCallTool:I=>r.callTool(I),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:w,item:null}}const{childConnectionId:S}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>r.callTool(w)});let k=null;try{const w=await r.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:j,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),I=w.structuredContent??w,m=I.item?.id;if(!I.item||!m)throw new Error("Failed to create the imported agent");return k=m,{virtualMcpId:m,repo:n,connectionId:S,item:I.item}}catch(w){throw k&&await r.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:k}}).catch(()=>{}),await r.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),w}},onSuccess:({virtualMcpId:n,repo:j,connectionId:S,item:k})=>{if(g==="connection"||!n||!k){H(h,s.id),W(h,s.id),O.success(`Added ${j.name}`),e();return}if(h.setQueryData(G.collectionItem(r,s.id,"","VIRTUAL_MCP",n),{item:k}),H(h,s.id),y(n,j),v){v({virtualMcpId:n,repo:j,connectionId:S});return}O.success(`Imported ${j.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),x(n)},onError:n=>{O.error("Failed to import repo: "+(n instanceof Error?n.message:"Unknown error"))}});return o.status==="installing"||o.status==="authenticating"?t.jsx(D,{status:o.status,error:null,retry:o.retry}):o.status==="error"?t.jsx(D,{status:"error",error:o.error,retry:o.retry}):l.length===0&&o.status==="idle"?t.jsx(D,{status:"installing",error:null,retry:o.retry}):l.length>1&&!a?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),l.map(n=>t.jsxs("button",{type:"button",onClick:()=>C(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(P,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):a?i?t.jsx(Ne,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,installation:i,onSelectRepo:n=>d.mutate(n),isSaving:d.isPending}):t.jsx(be,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,onSelect:f,showBackButton:l.length>1,onBack:()=>C(null)}):null}function be(N){const e=R.c(47),{connectionId:i,orgId:f,orgSlug:v,onSelect:g,showBackButton:s,onBack:h}=N;let x;e[0]!==f||e[1]!==v?(x={connectionId:V,orgId:f,orgSlug:v},e[0]=f,e[1]=v,e[2]=x):x=e[2];const p=U(x),C=$(),b=M();let l;e[3]!==i||e[4]!==f?(l=G.githubUserOrgs(f,i),e[3]=i,e[4]=f,e[5]=l):l=e[5];let o;e[6]!==i||e[7]!==p?(o=()=>fe(m=>p.callTool(m),i),e[6]=i,e[7]=p,e[8]=o):o=e[8];let a;e[9]!==l||e[10]!==o?(a={queryKey:l,queryFn:o},e[9]=l,e[10]=o,e[11]=a):a=e[11];const c=X(a);let r;e[12]!==b||e[13]!==i||e[14]!==c||e[15]!==f||e[16]!==v||e[17]!==C?(r={mutationFn:async()=>{const m=await K({connectionId:i,orgId:f,orgSlug:v,persistFallback:E=>b.update.mutateAsync({id:i,data:{connection_token:E}}).then(je)});if(m.ran&&!m.ok)throw new Error(m.error??"no token received");const _=new URL(`/api/${v}/mcp/${i}`,window.location.origin);await C.invalidateQueries({queryKey:G.isMCPAuthenticated(_.href,null)}),await C.invalidateQueries({queryKey:G.mcpClientPrefix()}),await c.refetch()},onError:ye},e[12]=b,e[13]=i,e[14]=c,e[15]=f,e[16]=v,e[17]=C,e[18]=r):r=e[18];const u=B(r);if(c.isLoading){let m;return e[19]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=m):m=e[19],m}if(c.isError){let m,_;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),_=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=m,e[21]=_):(m=e[20],_=e[21]);let E;e[22]!==u?(E=()=>u.mutate(),e[22]=u,e[23]=E):E=e[23];let A;e[24]!==u.isPending?(A=u.isPending?t.jsx(z,{size:14,className:"animate-spin"}):t.jsx(P,{className:"size-3.5"}),e[24]=u.isPending,e[25]=A):A=e[25];let L;return e[26]!==u.isPending||e[27]!==E||e[28]!==A?(L=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[m,_,t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:E,disabled:u.isPending,children:[A,"Reconnect GitHub"]})]}),e[26]=u.isPending,e[27]=E,e[28]=A,e[29]=L):L=e[29],L}const y=c.data;if(!y)return null;let d;e[30]!==h||e[31]!==s?(d=s&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:h,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(J,{size:12}),"Change connection"]})}),e[30]=h,e[31]=s,e[32]=d):d=e[32];let n;if(e[33]!==y.installations||e[34]!==g){let m;e[36]!==g?(m=_=>t.jsxs("button",{type:"button",onClick:()=>g(_),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:_.avatarUrl,alt:_.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},_.installationId),e[36]=g,e[37]=m):m=e[37],n=y.installations.map(m),e[33]=y.installations,e[34]=g,e[35]=n}else n=e[35];let j;e[38]!==n?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:n}),e[38]=n,e[39]=j):j=e[39];const S=y.appSlug?`https://github.com/apps/${y.appSlug}/installations/new`:"https://github.com/settings/installations";let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=k):k=e[40];let w;e[41]!==S?(w=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",k]})}),e[41]=S,e[42]=w):w=e[42];let I;return e[43]!==w||e[44]!==d||e[45]!==j?(I=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[d,j,w]}),e[43]=w,e[44]=d,e[45]=j,e[46]=I):I=e[46],I}function ye(N){O.error("Failed to reconnect GitHub: "+(N instanceof Error?N.message:"Unknown error"))}function je(){}function Ne(N){const e=R.c(20),{connectionId:i,orgId:f,orgSlug:v,installation:g,onSelectRepo:s,isSaving:h}=N,[x,p]=T.useState(""),C=le(x,300),b=T.useDeferredValue(C),l=x!==b;let o;e[0]!==l||e[1]!==x?(o=t.jsx(re,{placeholder:"Search repositories...",value:x,onChange:p,isSearching:l}),e[0]=l,e[1]=x,e[2]=o):o=e[2];const a=l?"opacity-40":"opacity-100";let c;e[3]!==a?(c=F("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",a),e[3]=a,e[4]=c):c=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=r):r=e[5];let u;e[6]!==i||e[7]!==b||e[8]!==g||e[9]!==h||e[10]!==s||e[11]!==f||e[12]!==v?(u=t.jsx(T.Suspense,{fallback:r,children:t.jsx(ve,{connectionId:i,orgId:f,orgSlug:v,installation:g,query:b,onSelectRepo:s,isSaving:h})}),e[6]=i,e[7]=b,e[8]=g,e[9]=h,e[10]=s,e[11]=f,e[12]=v,e[13]=u):u=e[13];let y;e[14]!==c||e[15]!==u?(y=t.jsx("div",{className:c,children:u}),e[14]=c,e[15]=u,e[16]=y):y=e[16];let d;return e[17]!==o||e[18]!==y?(d=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[o,y]}),e[17]=o,e[18]=y,e[19]=d):d=e[19],d}function ve(N){const e=R.c(29),{connectionId:i,orgId:f,orgSlug:v,installation:g,query:s,onSelectRepo:h,isSaving:x}=N;let p;e[0]!==i||e[1]!==f||e[2]!==v?(p={connectionId:i,orgId:f,orgSlug:v},e[0]=i,e[1]=f,e[2]=v,e[3]=p):p=e[3];const C=U(p),b=g.type==="User"?"user":"org",l=s?`${b}:${g.login} ${s} in:name`:`${b}:${g.login}`;let o;e[4]!==i||e[5]!==g.login||e[6]!==f||e[7]!==s?(o=G.githubOrgRepos(f,i,g.login,s),e[4]=i,e[5]=g.login,e[6]=f,e[7]=s,e[8]=o):o=e[8];let a;e[9]!==C||e[10]!==l?(a=async d=>{const{signal:n}=d,S=(await C.callTool({name:"search_repositories",arguments:{query:l,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(we)},e[9]=C,e[10]=l,e[11]=a):a=e[11];let c;e[12]!==o||e[13]!==a?(c={queryKey:o,queryFn:a},e[12]=o,e[13]=a,e[14]=c):c=e[14];const{data:r}=ee(c);if(r.length===0){let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=d):d=e[15];let n;e[16]!==s?(n=s&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=s,e[17]=n):n=e[17];let j;return e[18]!==n?(j=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[d,n]}),e[18]=n,e[19]=j):j=e[19],j}let u;if(e[20]!==x||e[21]!==h||e[22]!==r){let d;e[24]!==x||e[25]!==h?(d=n=>t.jsxs("button",{type:"button",onClick:()=>h(n),disabled:x,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(P,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:n.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[n.private?t.jsx(te,{size:10}):t.jsx(ce,{size:10}),n.private?"Private":"Public"]})]},n.fullName),e[24]=x,e[25]=h,e[26]=d):d=e[26],u=r.map(d),e[20]=x,e[21]=h,e[22]=r,e[23]=u}else u=e[23];let y;return e[27]!==u?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:u}),e[27]=u,e[28]=y):y=e[28],y}function we(N){return{name:N.name,fullName:N.full_name,owner:N.full_name.split("/")[0]??"",url:N.html_url,private:N.private,description:N.description,updatedAt:N.updated_at}}function D(N){const e=R.c(33),{status:i,error:f,retry:v}=N;if(i==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let k;e[1]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=k):k=e[1];const w=f??"Something went wrong while connecting to GitHub.";let I;e[2]!==w?(I=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=I):I=e[3];let m;e[4]!==v?(m=t.jsx("button",{type:"button",onClick:v,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=v,e[5]=m):m=e[5];let _;return e[6]!==I||e[7]!==m?(_=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,I,m]}),e[6]=I,e[7]=m,e[8]=_):_=e[8],_}const g=i==="authenticating";let s;e[9]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-foreground"})}),e[9]=s):s=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{className:"relative size-10",children:[s,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=h):h=e[10];const x=g?"Authenticating with GitHub":"Setting up GitHub";let p;e[11]!==x?(p=t.jsx("p",{className:"text-sm font-medium",children:x}),e[11]=x,e[12]=p):p=e[12];const C=g?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let b;e[13]!==C?(b=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=b):b=e[14];let l;e[15]!==p||e[16]!==b?(l=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[p,b]}),e[15]=p,e[16]=b,e[17]=l):l=e[17];const o=g?"bg-muted-foreground/30":"bg-foreground animate-pulse";let a;e[18]!==o?(a=F("size-1.5 rounded-full",o),e[18]=o,e[19]=a):a=e[19];let c;e[20]!==a?(c=t.jsx("span",{className:a}),e[20]=a,e[21]=c):c=e[21];const r=g?"bg-foreground animate-pulse":"bg-muted-foreground/30";let u;e[22]!==r?(u=F("size-1.5 rounded-full",r),e[22]=r,e[23]=u):u=e[23];let y;e[24]!==u?(y=t.jsx("span",{className:u}),e[24]=u,e[25]=y):y=e[25];let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=d):d=e[26];let n;e[27]!==c||e[28]!==y?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,d]}),e[27]=c,e[28]=y,e[29]=n):n=e[29];let j;return e[30]!==n||e[31]!==l?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[h,l,n]}),e[30]=n,e[31]=l,e[32]=j):j=e[32],j}export{Oe as G,he as u};
@@ -1,4 +1,4 @@
1
- import{dw as St,dx as It,bi as N,I as c,dy as de,bo as ze,dz as Et,bh as Tt,aW as wt,ag as O,af as G,ad as oe,H as _,bj as m,b3 as F,dA as Mt,dB as I,ae as At,t as ge,c as Ee,r as W,C as Ot,j as Ct}from"./index-DmhdwAgP.js";import{S as Nt,u as Rt}from"./use-mcp-client-DseZ3Mea.js";import{d as xt,D as Pt}from"./decopilot-sse-pool-CEQrv8Fn.js";import{d as Dt}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 Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var Je="vercel.ai.error",Lt=Symbol.for(Je),Ce,Ne,Z=class We extends(Ne=Error,Ce=Lt,Ne){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return We.hasMarker(e,Je)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ge(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ye="AI_InvalidArgumentError",He=`vercel.ai.error.${Ye}`,jt=Symbol.for(He),Re,xe,Zt=class extends(xe=Z,Re=jt,xe){constructor({message:t,cause:e,argument:a}){super({name:Ye,message:t,cause:e}),this[Re]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,He)}},qe="AI_JSONParseError",Xe=`vercel.ai.error.${qe}`,$t=Symbol.for(Xe),Pe,De,ke=class extends(De=Z,Pe=$t,De){constructor({text:t,cause:e}){super({name:qe,message:`JSON parsing failed: Text: ${t}.
1
+ import{dw as St,dx as It,be as N,I as c,dy as de,bk as ze,dz as Et,bd as Tt,aW as wt,ag as O,af as G,ad as oe,H as _,bf as m,b3 as F,dA as Mt,dB as I,ae as At,t as ge,c as Ee,r as W,C as Ot,j as Ct}from"./index-CIFSbzEF.js";import{S as Nt,u as Rt}from"./use-mcp-client-CJ_CTOi-.js";import{d as xt,D as Pt}from"./decopilot-sse-pool-D92X3fNc.js";import{d as Dt}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 Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var Je="vercel.ai.error",Lt=Symbol.for(Je),Ce,Ne,Z=class We extends(Ne=Error,Ce=Lt,Ne){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return We.hasMarker(e,Je)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ge(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ye="AI_InvalidArgumentError",He=`vercel.ai.error.${Ye}`,jt=Symbol.for(He),Re,xe,Zt=class extends(xe=Z,Re=jt,xe){constructor({message:t,cause:e,argument:a}){super({name:Ye,message:t,cause:e}),this[Re]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,He)}},qe="AI_JSONParseError",Xe=`vercel.ai.error.${qe}`,$t=Symbol.for(Xe),Pe,De,ke=class extends(De=Z,Pe=$t,De){constructor({text:t,cause:e}){super({name:qe,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${Ge(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Xe)}},Qe="AI_TypeValidationError",Ke=`vercel.ai.error.${Qe}`,Ut=Symbol.for(Ke),Le,je,X=class ve extends(je=Z,Le=Ut,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),s+=o.join(", "),s+=")"}super({name:Qe,message:`${s}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${Ge(a)}`,cause:a}),this[Le]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,Ke)}static wrap({value:e,cause:a,context:r}){var s,o,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new Zt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Ft=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Bt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Ft.test(t)===!1&&Bt.test(t)===!1?e:Vt(e)}function Vt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const o=r[s];o&&typeof o=="object"&&e.push(o)}}}return t}function zt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Te(t)}var Jt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Wt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function R(){return{}}function Gt(t,e){var a,r,s;const o={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(o.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Yt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Ht(){return{type:"boolean"}}function et(t,e){return b(t.type._def,e)}var qt=(t,e)=>b(t.innerType._def,e);function tt(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,o)=>tt(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Xt(t)}}var Xt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Qt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function Kt(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):R()}function ea(t){return{type:"string",enum:Array.from(t.values)}}var ta=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function aa(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ta(s))r.push(...s.allOf);else{let o=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...n}=s;o=n}r.push(o)}}),r.length?{allOf:r}:void 0}function ra(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function at(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?na(t):t}var sa=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function na(t){let e="";for(let a=0;a<t.length;a++)sa.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,p=!1;for(let u=0;u<s.length;u++){if(i){o+=s[u],i=!1;continue}if(r.i){if(n){if(s[u].match(/[a-z]/)){p?(o+=s[u],o+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(o+=s[u],p=!0):o+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){o+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){o+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(s[u]==="$"){o+=`($|(?=[\r
@@ -0,0 +1 @@
1
+ import{r as s,aT as L,aR as B,j as c,cn as T,aO as C,aS as E,cp as U,aU as y,co as _,bE as q,aQ as w,bD as K,bC as V}from"./index-CIFSbzEF.js";var I="Radio",[z,P]=w(I),[H,Q]=z(I),k=s.forwardRef((a,d)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:t,value:l="on",onCheck:f,form:R,...v}=a,[p,m]=s.useState(null),i=E(d,b=>m(b)),u=s.useRef(!1),h=p?R||!!p.closest("form"):!0;return c.jsxs(H,{scope:o,checked:e,disabled:t,children:[c.jsx(C.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":t?"":void 0,disabled:t,value:l,...v,ref:i,onClick:y(a.onClick,b=>{e||f?.(),h&&(u.current=b.isPropagationStopped(),u.current||b.stopPropagation())})}),h&&c.jsx(G,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:t,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var S="RadioIndicator",g=s.forwardRef((a,d)=>{const{__scopeRadio:o,forceMount:n,...e}=a,r=Q(S,o);return c.jsx(q,{present:n||r.checked,children:c.jsx(C.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:d})})});g.displayName=S;var W="RadioBubbleInput",G=s.forwardRef(({__scopeRadio:a,control:d,checked:o,bubbles:n=!0,...e},r)=>{const t=s.useRef(null),l=E(t,r),f=K(o),R=V(d);return s.useEffect(()=>{const v=t.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),c.jsx(C.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});G.displayName=W;function A(a){return a?"checked":"unchecked"}var X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],x="RadioGroup",[Y]=w(x,[_,P]),j=_(),N=P(),[J,Z]=Y(x),D=s.forwardRef((a,d)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:t=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=a,i=j(o),u=L(R),[h,b]=B({prop:r,defaultProp:e??null,onChange:p,caller:x});return c.jsx(J,{scope:o,name:n,required:t,disabled:l,value:h,onValueChange:b,children:c.jsx(T,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:c.jsx(C.div,{role:"radiogroup","aria-required":t,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:d})})})});D.displayName=x;var M="RadioGroupItem",O=s.forwardRef((a,d)=>{const{__scopeRadioGroup:o,disabled:n,...e}=a,r=Z(M,o),t=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=E(d,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=h=>{X.includes(h.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),c.jsx(U,{asChild:!0,...l,focusable:!t,active:p,children:c.jsx(k,{disabled:t,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:y(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:y(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((a,d)=>{const{__scopeRadioGroup:o,...n}=a,e=N(o);return c.jsx(g,{...e,...n,ref:d})});F.displayName=$;var oe=D,re=O,ae=F;export{re as I,oe as R,ae as a};