decocms 4.95.0 → 4.95.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/dist/client/assets/{AlertCircle-2HcEr3aA.js → AlertCircle-8aL2p4Jm.js} +1 -1
  2. package/dist/client/assets/{AreaChart-C8HEwiaS.js → AreaChart-CH1JlaHA.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-BhbwwlKa.js → ArrowRight-BmTkQdSS.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-bMePGYxE.js → ArrowUp-BRv6jMcd.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-B7W17SiR.js → ArrowUpRight-DgWDf4bB.js} +1 -1
  6. package/dist/client/assets/{Check-r7PeF0eX.js → Check-xlx8bieA.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-Cgo9UV5-.js → CheckCircle-BhHr7P8S.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-DyTq4IzF.js → ChevronDown-z_OgoJuG.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-B_jrVjJU.js → ChevronRight-HByc-_dD.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-CVW5xbC5.js → ChevronUp-C0dubflE.js} +1 -1
  11. package/dist/client/assets/{Copy01-BJc2r-WF.js → Copy01-BhLnIcPa.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-1ay7rtoJ.js → DotsVertical-9e8whEmO.js} +1 -1
  13. package/dist/client/assets/{Eye-CtVV9e2j.js → Eye-Dmrq3Yx3.js} +1 -1
  14. package/dist/client/assets/{FilterLines-BhHlEzjv.js → FilterLines-LxfJFt1s.js} +1 -1
  15. package/dist/client/assets/{Globe01-DoHz4MgR.js → Globe01-C1OI0rNn.js} +1 -1
  16. package/dist/client/assets/{Globe04-S2vGDspM.js → Globe04-D37KO3Rl.js} +1 -1
  17. package/dist/client/assets/{HardDrive-CQEIN_su.js → HardDrive-xaUFGQWK.js} +1 -1
  18. package/dist/client/assets/{Image01-CUXxaE-D.js → Image01-D2MElAgS.js} +1 -1
  19. package/dist/client/assets/{Key01-Ccp0XsVr.js → Key01-CJ4v8ToT.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-CGrbMvWa.js → LayoutLeft-BXx4559W.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-ClJ56TMW.js → LinkExternal01-RdFrwyl0.js} +1 -1
  22. package/dist/client/assets/{Monitor01-DZz4yj0_.js → Monitor01-ByOW8gCA.js} +1 -1
  23. package/dist/client/assets/{Package-B1orPXJq.js → Package-BApyVZZF.js} +1 -1
  24. package/dist/client/assets/{Palette-BaolxSVv.js → Palette-gwCbQEVd.js} +1 -1
  25. package/dist/client/assets/{Play-BWff13WX.js → Play-CRcD5urt.js} +1 -1
  26. package/dist/client/assets/{Plus-Cu-dDUfk.js → Plus-CpvaryXc.js} +1 -1
  27. package/dist/client/assets/{SearchLg-DfHFdpE-.js → SearchLg-BLbYMh4R.js} +1 -1
  28. package/dist/client/assets/{SearchMd-qK78kgKQ.js → SearchMd-BbTMkDIb.js} +1 -1
  29. package/dist/client/assets/{Settings02-N8cMhnfQ.js → Settings02-CoD4T3JT.js} +1 -1
  30. package/dist/client/assets/{Shield01-DzRHTS33.js → Shield01-BSQ914Nd.js} +1 -1
  31. package/dist/client/assets/{Star01-Q-9vFIbP.js → Star01-B_ldc-QG.js} +1 -1
  32. package/dist/client/assets/{Stars01-BbbMQszh.js → Stars01-BEQN6TZj.js} +1 -1
  33. package/dist/client/assets/{Stars02-DCuS3QE8.js → Stars02-wl-TgjVw.js} +1 -1
  34. package/dist/client/assets/{Sun-Dq-7buJu.js → Sun-DcglW2RF.js} +1 -1
  35. package/dist/client/assets/{SwitchHorizontal01-D-Fk1Pa5.js → SwitchHorizontal01-BjhVVVE7.js} +1 -1
  36. package/dist/client/assets/{Tool01-C64m7h3m.js → Tool01-F8NWFSUY.js} +1 -1
  37. package/dist/client/assets/{Tool02-B_YdiFiC.js → Tool02-CYQFsqUw.js} +1 -1
  38. package/dist/client/assets/{Trash01-DoLHcQlV.js → Trash01-CFIi5PAY.js} +1 -1
  39. package/dist/client/assets/{TrendUp01-BVy6RgXF.js → TrendUp01-B11vKIzx.js} +1 -1
  40. package/dist/client/assets/{Upload01-BPvQLpzL.js → Upload01-CYv9Q0Sh.js} +1 -1
  41. package/dist/client/assets/{User01-Di4I1dn1.js → User01-BHW_CvWq.js} +1 -1
  42. package/dist/client/assets/{Users01-T3tcC-Q_.js → Users01-CVvGtppm.js} +1 -1
  43. package/dist/client/assets/{Users03-BMR8RGYj.js → Users03-Bg-uyP8J.js} +1 -1
  44. package/dist/client/assets/{X-WxvHrb7f.js → X-B9OMbRgI.js} +1 -1
  45. package/dist/client/assets/{XCircle-BPUwDg8K.js → XCircle-z2zpbAQl.js} +1 -1
  46. package/dist/client/assets/{XClose-Dqd4RGLi.js → XClose-Bvx5TP10.js} +1 -1
  47. package/dist/client/assets/{Zap-DHQd1aMk.js → Zap-CaoQpAZT.js} +1 -1
  48. package/dist/client/assets/{ZapSquare-BmThZYRa.js → ZapSquare-NmRRaYpN.js} +1 -1
  49. package/dist/client/assets/{ZoomOut-B9HTC-JQ.js → ZoomOut-Bjuv5wtp.js} +1 -1
  50. package/dist/client/assets/{access-gate-CiaKpwyl.js → access-gate-CSvdc98W.js} +1 -1
  51. package/dist/client/assets/{add-section-modal-CrYnB29L.js → add-section-modal-BlKiDhBw.js} +1 -1
  52. package/dist/client/assets/{agent-icon-BXYEXsD8.js → agent-icon-kMrNxjYJ.js} +1 -1
  53. package/dist/client/assets/{agents-list-CD7gGa6m.js → agents-list-4wX4J2kJ.js} +1 -1
  54. package/dist/client/assets/{ai-providers-mL_iWLDv.js → ai-providers-Dj7ASIds.js} +1 -1
  55. package/dist/client/assets/{alert-BVUEKz6K.js → alert-CgsPHe2o.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-CQ4lOqNP.js → alert-dialog-lT11Jsbj.js} +1 -1
  57. package/dist/client/assets/{app-editor-CxVQHVzd.js → app-editor-B3W7tylT.js} +1 -1
  58. package/dist/client/assets/{auth-Rl68lRVa.js → auth-CaW_gj1t.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-CwDVkZ9z.js → auth-catchall-CWTTCQsz.js} +1 -1
  60. package/dist/client/assets/{auth-entry-L4m_eDn0.js → auth-entry-IJFQq8w-.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-DhwakX9p.js → auth-split-layout-C25aJ8eh.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-HF1OZ01K.js → authenticate-and-persist-oauth-jkSUOcu8.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-x3AaazOu.js → automation-list-row-QQUoi2db.js} +1 -1
  64. package/dist/client/assets/{automation-runs-0ENPNaN0.js → automation-runs-Cs7mheBT.js} +1 -1
  65. package/dist/client/assets/{automations-kZfpWYqo.js → automations-BzzWpoAs.js} +1 -1
  66. package/dist/client/assets/{autosend-CnyvzRSd.js → autosend-CSO0mWVp.js} +1 -1
  67. package/dist/client/assets/{avatar-Dn3KdrEK.js → avatar-BHNRf2BK.js} +1 -1
  68. package/dist/client/assets/{badge-CKZbj9Sm.js → badge-0FaSmMEN.js} +1 -1
  69. package/dist/client/assets/{block-document-CRrTuFYl.js → block-document-BV8UCOiY.js} +1 -1
  70. package/dist/client/assets/{brand-context-CsUWTEth.js → brand-context-CnL-EXLr.js} +1 -1
  71. package/dist/client/assets/{buckets-CEkgv2gt.js → buckets-BhRo2ooL.js} +1 -1
  72. package/dist/client/assets/{bulk-category-panel-BdB8TLi0.js → bulk-category-panel-CzxYutCW.js} +1 -1
  73. package/dist/client/assets/{calendar-CGH-FtPb.js → calendar-ajXRpj7H.js} +1 -1
  74. package/dist/client/assets/{capability-load-error-CMXIJbu-.js → capability-load-error-D08tgLJn.js} +1 -1
  75. package/dist/client/assets/{card-CLBtulnR.js → card-CxpjTUKu.js} +1 -1
  76. package/dist/client/assets/{category-editor-DcCdN9-a.js → category-editor-VzyKXFmI.js} +1 -1
  77. package/dist/client/assets/{chat-context-pauDMQs4.js → chat-context-BKkLQtRB.js} +1 -1
  78. package/dist/client/assets/{checkbox-Bb7u4GZC.js → checkbox-9SStA5q1.js} +1 -1
  79. package/dist/client/assets/{cli-auth-success-CZgAirYQ.js → cli-auth-success-DMtwNV80.js} +1 -1
  80. package/dist/client/assets/{collection-detail-C70k2D6K.js → collection-detail-CjiPw-t8.js} +1 -1
  81. package/dist/client/assets/{collection-display-button-DTP4Dxoo.js → collection-display-button-BkQRfMlH.js} +1 -1
  82. package/dist/client/assets/{collection-search-BSRwuL9Y.js → collection-search-DZDCl18y.js} +1 -1
  83. package/dist/client/assets/{collection-table-wrapper-CzTLwDF7.js → collection-table-wrapper-3CLNdiVr.js} +1 -1
  84. package/dist/client/assets/{collection-tabs-C4WFDf3L.js → collection-tabs-C2iwwrh8.js} +1 -1
  85. package/dist/client/assets/{command-CvLmqp8n.js → command-Dv4-KFR5.js} +1 -1
  86. package/dist/client/assets/{commerce-onboarding-B0oLV1r7.js → commerce-onboarding-Cw_rAIUN.js} +1 -1
  87. package/dist/client/assets/{companions-core-9oVSiVay.js → companions-core-AOH9czLM.js} +1 -1
  88. package/dist/client/assets/{connect-Ds4xNTIm.js → connect-Cqt8XvcG.js} +1 -1
  89. package/dist/client/assets/{connect-desktop-dialog-Bm-6O5pA.js → connect-desktop-dialog-CcP2o0mO.js} +1 -1
  90. package/dist/client/assets/{connection-card-BNqCCiGi.js → connection-card-DSeJr6d2.js} +1 -1
  91. package/dist/client/assets/{connection-detail-BRMVl_cy.js → connection-detail-D0NuPfPl.js} +1 -1
  92. package/dist/client/assets/{connection-form-helpers-DYH9RX4H.js → connection-form-helpers-Ce26XCbs.js} +1 -1
  93. package/dist/client/assets/{connections-Bg4y0t1s.js → connections-CaxsgoYU.js} +1 -1
  94. package/dist/client/assets/{decopilot-sse-pool-naE4E78u.js → decopilot-sse-pool-DWXTDK7c.js} +1 -1
  95. package/dist/client/assets/{dialog-6hX1U4fH.js → dialog-B8iPXZfB.js} +1 -1
  96. package/dist/client/assets/{domain-settings-B6DIiCSh.js → domain-settings-DkOZ5_VY.js} +1 -1
  97. package/dist/client/assets/{drawer-CMaklRD3.js → drawer-D5z1QpZ1.js} +1 -1
  98. package/dist/client/assets/{dropdown-menu-CLAwAQZ_.js → dropdown-menu-D3W9Mypw.js} +1 -1
  99. package/dist/client/assets/{empty-state-D6L5fS3f.js → empty-state-B0XUVWqe.js} +1 -1
  100. package/dist/client/assets/{extract-connection-data-Dghmfry-.js → extract-connection-data-ChcGsUj8.js} +1 -1
  101. package/dist/client/assets/{file-explorer-Dff-06fS.js → file-explorer-DIO_SQJ1.js} +1 -1
  102. package/dist/client/assets/{file-type-icon-DYLY0CLy.js → file-type-icon-CICh64eJ.js} +1 -1
  103. package/dist/client/assets/{files-Byu3w8YW.js → files-Cql2muKm.js} +1 -1
  104. package/dist/client/assets/{form-CXNEyHcq.js → form-BbtpCekf.js} +1 -1
  105. package/dist/client/assets/{general-C9Pthex4.js → general-DPD4y6iK.js} +1 -1
  106. package/dist/client/assets/{github-repo-picker-ByxtRg3O.js → github-repo-picker-qhKlxIkP.js} +1 -1
  107. package/dist/client/assets/{hooks-Cr9i_kle.js → hooks-QkqjVdn8.js} +1 -1
  108. package/dist/client/assets/{index-evctrtQu.js → index-B72iIhnj.js} +1 -1
  109. package/dist/client/assets/{index-CV14bajU.js → index-BD3KwOs3.js} +1 -1
  110. package/dist/client/assets/{index-CXp3cTwF.js → index-BDQNsoxm.js} +1 -1
  111. package/dist/client/assets/{index-Dk4s7aLa.js → index-BUJePXEL.js} +1 -1
  112. package/dist/client/assets/{index-DI7mK1zX.js → index-BdfBtWtk.js} +1 -1
  113. package/dist/client/assets/{index-CDnDqO3O.js → index-BmTD_ujn.js} +1 -1
  114. package/dist/client/assets/{index-DV5mK7sA.js → index-Bz75jbQc.js} +1 -1
  115. package/dist/client/assets/{index-hjE2XX6X.js → index-CfAl6qA3.js} +3 -3
  116. package/dist/client/assets/{index-CEV5VePz.js → index-CwSqgILb.js} +9 -9
  117. package/dist/client/assets/{index-B9kIH6x6.js → index-D7GpXBZi.js} +1 -1
  118. package/dist/client/assets/{index-DeLkeJ6_.js → index-DCLh1sVt.js} +1 -1
  119. package/dist/client/assets/{index-XuMG--e3.js → index-DFylQUoD.js} +3 -3
  120. package/dist/client/assets/{index-yrbDmgjx.js → index-DyxjlEL3.js} +1 -1
  121. package/dist/client/assets/{index-BDK2Fs0Q.js → index-krar3iag.js} +1 -1
  122. package/dist/client/assets/{index-redirect-D17YCYHU.js → index-redirect-BIF-9n41.js} +1 -1
  123. package/dist/client/assets/{input-B3wVtT8N.js → input-C96iFBVQ.js} +1 -1
  124. package/dist/client/assets/{integration-icon-DggrBo9Y.js → integration-icon-B1RhpoYr.js} +1 -1
  125. package/dist/client/assets/{invite-member-dialog-Bh4TasFC.js → invite-member-dialog-xjgZGOB2.js} +1 -1
  126. package/dist/client/assets/{label-DIrBJY9t.js → label-Dyml5mFF.js} +1 -1
  127. package/dist/client/assets/{layout-n4kDijNp.js → layout-DDL4dMPD.js} +1 -1
  128. package/dist/client/assets/{login-DGWtKNDl.js → login-CoR8jNzG.js} +1 -1
  129. package/dist/client/assets/{mcp-oauth-pu4HGP5E.js → mcp-oauth-C3_4QnQD.js} +1 -1
  130. package/dist/client/assets/{members-CUcHZIpS.js → members-Bq1eH0V7.js} +1 -1
  131. package/dist/client/assets/{monaco-editor-DChvc4zo.js → monaco-editor-CzUxXwGN.js} +1 -1
  132. package/dist/client/assets/{monitoring-stats-row-D77T8MAB.js → monitoring-stats-row-B0DrzvEt.js} +1 -1
  133. package/dist/client/assets/{multi-select-BczX2BCu.js → multi-select-rPe-eyDx.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-CujWwGsW.js → oauth-callback-BrUhk0Wa.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-CNcJryZL.js → oauth-callback-ai-provider-B8YVCFyJ.js} +1 -1
  136. package/dist/client/assets/{onboarding-Cxp9OgE5.js → onboarding-COoyusCG.js} +1 -1
  137. package/dist/client/assets/{org-install-Cp_uS_Yv.js → org-install-JAHRkU5h.js} +1 -1
  138. package/dist/client/assets/{org-layout-C0amQSWr.js → org-layout-D60pVxIN.js} +1 -1
  139. package/dist/client/assets/{organization-choice-D1e_IHEx.js → organization-choice-C6Ls0A49.js} +1 -1
  140. package/dist/client/assets/{orgs-BUQRHrF9.js → orgs-DztT5sab.js} +1 -1
  141. package/dist/client/assets/{page-seo-form-f2sOWcXy.js → page-seo-form-B_P0EHl2.js} +1 -1
  142. package/dist/client/assets/page-seo-sheet-DHzmRm4L.js +1 -0
  143. package/dist/client/assets/{popover-CMANpc1P.js → popover-CNhMnjco.js} +1 -1
  144. package/dist/client/assets/{post-editor-igPGWwZT.js → post-editor-D_xoTmn-.js} +1 -1
  145. package/dist/client/assets/{primitives-C4ghey6q.js → primitives-CBYGlggB.js} +1 -1
  146. package/dist/client/assets/{profile-Bf08wFsB.js → profile-cvRYji9N.js} +1 -1
  147. package/dist/client/assets/project-app-view-CBEQxExF.js +1 -0
  148. package/dist/client/assets/record-editor-PW0VGnvH.js +1 -0
  149. package/dist/client/assets/redirect-editor-DsFvTbg2.js +1 -0
  150. package/dist/client/assets/registry-CvDjs0_s.js +2 -0
  151. package/dist/client/assets/{registry-layout-DOJrhsn0.js → registry-layout-bAxFNLjy.js} +1 -1
  152. package/dist/client/assets/{reports-Sz2eHkkE.js → reports-CQcFaphb.js} +1 -1
  153. package/dist/client/assets/{require-capability-DssBmal1.js → require-capability-DxlH57sg.js} +1 -1
  154. package/dist/client/assets/{required-auth-layout-Bb2Q5WiD.js → required-auth-layout-C-fhbIaJ.js} +1 -1
  155. package/dist/client/assets/{reset-password-DJkbgIKv.js → reset-password-DNx83PQG.js} +1 -1
  156. package/dist/client/assets/{roles-CDQ9N9B4.js → roles-BHDPkFyx.js} +1 -1
  157. package/dist/client/assets/{search-input-CSYveeK1.js → search-input-DzbdykkS.js} +1 -1
  158. package/dist/client/assets/{secrets-CWzBjHiy.js → secrets-BiPQdzxP.js} +1 -1
  159. package/dist/client/assets/{sections-editor-DO4ujnsl.js → sections-editor-DtTXEdpr.js} +1 -1
  160. package/dist/client/assets/{select-DL_WbMjV.js → select-DfWJsEeW.js} +1 -1
  161. package/dist/client/assets/{select-model-CaxXX-qs.js → select-model-va_ybRaj.js} +1 -1
  162. package/dist/client/assets/{self-tool-result-eufZmVSR.js → self-tool-result-BYn91ML_.js} +1 -1
  163. package/dist/client/assets/{seo-editor-OjDkwsRD.js → seo-editor-DhB9wLXc.js} +1 -1
  164. package/dist/client/assets/{settings-layout-wzi-9zmk.js → settings-layout-C0ekeOOv.js} +1 -1
  165. package/dist/client/assets/{settings-section-Dd__vNvn.js → settings-section-ZxnBfBdb.js} +1 -1
  166. package/dist/client/assets/{shell-controls-BTcTNUhC.js → shell-controls-CWv-6pxT.js} +1 -1
  167. package/dist/client/assets/{shell-layout-DpzKWAdD.js → shell-layout-B3ubQVJp.js} +1 -1
  168. package/dist/client/assets/{sidebar-DTKf3TAO.js → sidebar-Bmfjcji7.js} +1 -1
  169. package/dist/client/assets/{skeleton-CRh0JIjf.js → skeleton-DYsdfnWI.js} +1 -1
  170. package/dist/client/assets/{sso-oJUn63Bv.js → sso-DxE0pH8a.js} +1 -1
  171. package/dist/client/assets/{store-Dd0zwstp.js → store-DQtXE3rO.js} +1 -1
  172. package/dist/client/assets/store-registry-DJ5jwwgh.js +2 -0
  173. package/dist/client/assets/{studio-tools-Cwafm64U.js → studio-tools-CZ0lHHg8.js} +1 -1
  174. package/dist/client/assets/{switch-BsoYdree.js → switch-C8NVFCle.js} +1 -1
  175. package/dist/client/assets/{table-CEQ8Au0q.js → table-rrhMpufJ.js} +1 -1
  176. package/dist/client/assets/{tabs-DVvTTvBh.js → tabs-Zz7_UEQN.js} +1 -1
  177. package/dist/client/assets/{textarea-BF2PPtYX.js → textarea-Q9mIBUV-.js} +1 -1
  178. package/dist/client/assets/{toggle-group-BXTeLVn8.js → toggle-group-B8ZzagA8.js} +1 -1
  179. package/dist/client/assets/{toolbar-BJJ7OCXe.js → toolbar-1oJVDPdM.js} +1 -1
  180. package/dist/client/assets/{toolbar-icon-button-C2xHuQlk.js → toolbar-icon-button-CqHN6MBe.js} +1 -1
  181. package/dist/client/assets/{tooltip-BjzKDci2.js → tooltip-lvzwcxmr.js} +1 -1
  182. package/dist/client/assets/{use-ai-providers-Tfs_Zyru.js → use-ai-providers-DLA17X4H.js} +1 -1
  183. package/dist/client/assets/{use-api-keys-C8D3OUO8.js → use-api-keys-ZZNQlaQa.js} +1 -1
  184. package/dist/client/assets/{use-automations-vXGmFiw2.js → use-automations-CtAoOh2g.js} +1 -1
  185. package/dist/client/assets/{use-autosave-C6DGbMlv.js → use-autosave-Dj0woe8W.js} +1 -1
  186. package/dist/client/assets/{use-capability-y7XYwlsw.js → use-capability-x07oRB_v.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-CwOJk-hB.js → use-clock-tick-Cdnpjga1.js} +1 -1
  188. package/dist/client/assets/{use-collections-DJK7cqPG.js → use-collections-DJ2e88Xq.js} +1 -1
  189. package/dist/client/assets/{use-connection-dHOeVykL.js → use-connection-CawdsRuN.js} +1 -1
  190. package/dist/client/assets/{use-copy-BY_6H8f2.js → use-copy-aPelM9gN.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-a5AS9maG.js → use-create-virtual-mcp-D42LRs4W.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-gEZrBMKF.js → use-debounced-autosave-D46G2Nb3.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-DQ8ybCk8.js → use-debounced-value-U6TK_cAJ.js} +1 -1
  194. package/dist/client/assets/{use-deco-credits-Cu_CLKNZ.js → use-deco-credits-tLUAgc-O.js} +1 -1
  195. package/dist/client/assets/{use-decopilot-events-D-gabFqa.js → use-decopilot-events-zHZ5c1US.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-B903DB_v.js → use-delete-connection-B0eSidiK.js} +1 -1
  197. package/dist/client/assets/{use-deployment-admin-D2f6o1L8.js → use-deployment-admin-C0wf5iR9.js} +1 -1
  198. package/dist/client/assets/{use-file-configs-CtCwpKQk.js → use-file-configs-D6OQvi29.js} +1 -1
  199. package/dist/client/assets/{use-infinite-scroll-CkiTZdcb.js → use-infinite-scroll-DgeL9DrI.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-BBRb_n5o.js → use-join-requests-DYt3ADmT.js} +1 -1
  201. package/dist/client/assets/{use-mcp-auth-status-BHa4HLcz.js → use-mcp-auth-status-mlZiRJgT.js} +1 -1
  202. package/dist/client/assets/{use-mcp-client-Cp3sti4v.js → use-mcp-client-CAtCw6yl.js} +1 -1
  203. package/dist/client/assets/{use-mcp-tools-DgSJyhyt.js → use-mcp-tools-BkyW84hu.js} +1 -1
  204. package/dist/client/assets/{use-members-C6jzD8WY.js → use-members-BPomUDuY.js} +1 -1
  205. package/dist/client/assets/{use-mobile-DbFQjNJH.js → use-mobile-D0KrjV8M.js} +1 -1
  206. package/dist/client/assets/{use-navigate-to-agent-N_9ZB1GC.js → use-navigate-to-agent-CYMIGICl.js} +1 -1
  207. package/dist/client/assets/{use-org-auth-client-MugnqO7R.js → use-org-auth-client-BY7CXLsN.js} +1 -1
  208. package/dist/client/assets/{use-org-sso-BH3PKJVF.js → use-org-sso-BNL5m012.js} +1 -1
  209. package/dist/client/assets/{use-organization-roles-D_pL2V2J.js → use-organization-roles-DP7VZAnw.js} +1 -1
  210. package/dist/client/assets/{use-organization-settings-V8HCNVpz.js → use-organization-settings-Btln8Py9.js} +1 -1
  211. package/dist/client/assets/{use-registry-app-WmzUMowe.js → use-registry-app-DGmz0d5i.js} +1 -1
  212. package/dist/client/assets/{use-registry-connections-CBLHoxJf.js → use-registry-connections-BNAx72pz.js} +1 -1
  213. package/dist/client/assets/{use-secrets-BJw6jDsG.js → use-secrets-Brx7T76W.js} +1 -1
  214. package/dist/client/assets/{use-status-sounds-B6WaacbM.js → use-status-sounds-WASJAR7W.js} +1 -1
  215. package/dist/client/assets/{use-t-B9aftsnE.js → use-t-Ca0ZB4W6.js} +1 -1
  216. package/dist/client/assets/{use-view-mode-DgNetGEu.js → use-view-mode-CcZjEdUn.js} +1 -1
  217. package/dist/client/assets/{use-virtual-mcp-CEu5JSht.js → use-virtual-mcp--wK0dI9I.js} +1 -1
  218. package/dist/client/assets/useInfiniteQuery-BT7hVNXg.js +1 -0
  219. package/dist/client/assets/{useRouterState-BG4WF0xx.js → useRouterState-G26gh0wT.js} +1 -1
  220. package/dist/client/assets/useSuspenseInfiniteQuery-CIkQZwY0.js +1 -0
  221. package/dist/client/assets/{users-Coh1cMye.js → users-Cd08kHgh.js} +1 -1
  222. package/dist/client/assets/{variant-calendar-C_iW_fje.js → variant-calendar-DuJ3EROs.js} +1 -1
  223. package/dist/client/assets/{view-mode-toggle-uNwYCqf-.js → view-mode-toggle-IMXhdpcC.js} +1 -1
  224. package/dist/client/index.html +1 -1
  225. package/dist/server/cli.js +385 -385
  226. package/dist/server/server.js +271 -271
  227. package/package.json +1 -1
  228. package/dist/client/assets/page-seo-sheet-B907fpZL.js +0 -1
  229. package/dist/client/assets/project-app-view-BUDk-BSC.js +0 -1
  230. package/dist/client/assets/record-editor-UtL4Nppx.js +0 -1
  231. package/dist/client/assets/redirect-editor-Bpf86Ru1.js +0 -1
  232. package/dist/client/assets/registry-BM7__SCn.js +0 -2
  233. package/dist/client/assets/store-registry-CmUCkxOW.js +0 -2
  234. package/dist/client/assets/useInfiniteQuery-BB4xZyBn.js +0 -1
  235. package/dist/client/assets/useSuspenseInfiniteQuery-zeGOhvz4.js +0 -1
@@ -1 +1 @@
1
- import{c as n,j as i,cL as u,l as c,F as m,cK as x,cM as j,cN as N,cP as b,cY as D,cO as g}from"./index-hjE2XX6X.js";import{i as h}from"./X-WxvHrb7f.js";function z(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=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/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(g,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function P(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{O as D,R as a,k as b,P as c,T as d,z as e,y as f,v as g,B as h,w as i};
1
+ import{c as n,j as i,cL as u,l as c,F as m,cK as x,cM as j,cN as N,cP as b,cY as D,cO as g}from"./index-CfAl6qA3.js";import{i as h}from"./X-B9OMbRgI.js";function z(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=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/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(g,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function P(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{O as D,R as a,k as b,P as c,T as d,z as e,y as f,v as g,B as h,w as i};
@@ -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-hjE2XX6X.js";import{u as ue}from"./studio-tools-Cwafm64U.js";import{u as ae}from"./use-t-B9aftsnE.js";import{b as fe,a as xe,S as Se}from"./settings-section-Dd__vNvn.js";import{B as ne}from"./badge-CKZbj9Sm.js";import{I as je}from"./input-B3wVtT8N.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-DL_WbMjV.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-CfAl6qA3.js";import{u as ue}from"./studio-tools-CZ0lHHg8.js";import{u as ae}from"./use-t-Ca0ZB4W6.js";import{b as fe,a as xe,S as Se}from"./settings-section-ZxnBfBdb.js";import{B as ne}from"./badge-0FaSmMEN.js";import{I as je}from"./input-C96iFBVQ.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-DfWJsEeW.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-hjE2XX6X.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-CfAl6qA3.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
@@ -1 +1 @@
1
- import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-hjE2XX6X.js";import{i as $}from"./Check-r7PeF0eX.js";import{i as D}from"./ChevronRight-B_jrVjJU.js";import{a as M}from"./DotsVertical-1ay7rtoJ.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function O(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function E(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function G(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function L(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function Q(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function V(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function W(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function X(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{C as D,T as a,Q as b,O as c,E as d,V as e,W as f,X as g,L as h,P as i,U as j,G as k};
1
+ import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-CfAl6qA3.js";import{i as $}from"./Check-xlx8bieA.js";import{i as D}from"./ChevronRight-HByc-_dD.js";import{a as M}from"./DotsVertical-9e8whEmO.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-hjE2XX6X.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-CfAl6qA3.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-hjE2XX6X.js";import{W as T,j as O}from"./use-mcp-client-Cp3sti4v.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-CfAl6qA3.js";import{W as T,j as O}from"./use-mcp-client-CAtCw6yl.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,2 +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-hjE2XX6X.js";import{F as xn,l as hn}from"./index-yrbDmgjx.js";import{g as gn,aM as vn,aN as yn}from"./agent-icon-BXYEXsD8.js";import{s as Cn}from"./XClose-Dqd4RGLi.js";import{m as wn}from"./automation-runs-0ENPNaN0.js";import{b as Je,T as Ze,a as et}from"./tooltip-BjzKDci2.js";import{b as jn}from"./chat-context-pauDMQs4.js";import{u as Nn}from"./shell-layout-DpzKWAdD.js";import{s as ve,a as tt,f as bn}from"./index-CEV5VePz.js";import{a as Sn,h as Mn,D as Rn,c as Dn,d as Pn,e as En}from"./dialog-6hX1U4fH.js";import{I as nt}from"./input-B3wVtT8N.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-CQ4lOqNP.js";import{t as _n}from"./ChevronDown-DyTq4IzF.js";import{i as zn}from"./ChevronRight-B_jrVjJU.js";import{a as Gn}from"./ZoomOut-B9HTC-JQ.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-B9kIH6x6.js";import"./AlertCircle-2HcEr3aA.js";import"./Tool01-C64m7h3m.js";import"./ArrowUp-bMePGYxE.js";import"./Settings02-N8cMhnfQ.js";import"./Tool02-B_YdiFiC.js";import"./ArrowRight-BhbwwlKa.js";import"./ArrowUpRight-B7W17SiR.js";import"./TrendUp01-BVy6RgXF.js";import"./ZapSquare-BmThZYRa.js";import"./Users03-BMR8RGYj.js";import"./CheckCircle-Cgo9UV5-.js";import"./Check-r7PeF0eX.js";import"./ChevronUp-CVW5xbC5.js";import"./DotsVertical-1ay7rtoJ.js";import"./Stars02-DCuS3QE8.js";import"./Copy01-BJc2r-WF.js";import"./Globe01-DoHz4MgR.js";import"./Eye-CtVV9e2j.js";import"./FilterLines-BhHlEzjv.js";import"./Star01-Q-9vFIbP.js";import"./Globe04-S2vGDspM.js";import"./SwitchHorizontal01-D-Fk1Pa5.js";import"./HardDrive-CQEIN_su.js";import"./Image01-CUXxaE-D.js";import"./Key01-Ccp0XsVr.js";import"./LayoutLeft-CGrbMvWa.js";import"./XCircle-BPUwDg8K.js";import"./LinkExternal01-ClJ56TMW.js";import"./Monitor01-DZz4yj0_.js";import"./Sun-Dq-7buJu.js";import"./Package-B1orPXJq.js";import"./Palette-BaolxSVv.js";import"./Play-BWff13WX.js";import"./Plus-Cu-dDUfk.js";import"./SearchLg-DfHFdpE-.js";import"./SearchMd-qK78kgKQ.js";import"./Shield01-DzRHTS33.js";import"./Stars01-BbbMQszh.js";import"./Trash01-DoLHcQlV.js";import"./Upload01-BPvQLpzL.js";import"./User01-Di4I1dn1.js";import"./Users01-T3tcC-Q_.js";import"./X-WxvHrb7f.js";import"./Zap-DHQd1aMk.js";import"./select-DL_WbMjV.js";import"./useInfiniteQuery-BB4xZyBn.js";import"./use-infinite-scroll-CkiTZdcb.js";import"./use-connection-dHOeVykL.js";import"./use-collections-DJK7cqPG.js";import"./use-mcp-client-Cp3sti4v.js";import"./auth-Rl68lRVa.js";import"./use-virtual-mcp-CEu5JSht.js";import"./card-CLBtulnR.js";import"./sidebar-DTKf3TAO.js";import"./use-mobile-DbFQjNJH.js";import"./table-CEQ8Au0q.js";import"./empty-state-D6L5fS3f.js";import"./use-members-C6jzD8WY.js";import"./use-org-auth-client-MugnqO7R.js";import"./use-clock-tick-CwOJk-hB.js";import"./use-automations-vXGmFiw2.js";import"./studio-tools-Cwafm64U.js";import"./useSuspenseInfiniteQuery-zeGOhvz4.js";import"./avatar-Dn3KdrEK.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BY_6H8f2.js";import"./file-type-icon-DYLY0CLy.js";import"./tab-id-BijBBRwE.js";import"./hooks-Cr9i_kle.js";import"./decopilot-sse-pool-naE4E78u.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-DChvc4zo.js";import"./index-CV14bajU.js";import"./calendar-CGH-FtPb.js";import"./use-t-B9aftsnE.js";import"./integration-icon-DggrBo9Y.js";import"./use-navigate-to-agent-N_9ZB1GC.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-C8HEwiaS.js";import"./form-CXNEyHcq.js";import"./label-DIrBJY9t.js";import"./autosend-CnyvzRSd.js";import"./use-ai-providers-Tfs_Zyru.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-D-gabFqa.js";import"./use-organization-settings-V8HCNVpz.js";import"./required-auth-layout-Bb2Q5WiD.js";import"./use-org-sso-BH3PKJVF.js";import"./drawer-CMaklRD3.js";import"./collection-search-BSRwuL9Y.js";import"./index-XuMG--e3.js";import"./get-initials-D-f_fDFw.js";import"./popover-CMANpc1P.js";import"./use-registry-app-WmzUMowe.js";import"./use-mcp-tools-DgSJyhyt.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-HF1OZ01K.js";import"./mcp-oauth-pu4HGP5E.js";import"./extract-connection-data-Dghmfry-.js";import"./dropdown-menu-CLAwAQZ_.js";import"./command-CvLmqp8n.js";import"./index-DeLkeJ6_.js";import"./companions-core-9oVSiVay.js";import"./tabs-DVvTTvBh.js";import"./toggle-group-BXTeLVn8.js";import"./use-deco-credits-Cu_CLKNZ.js";import"./connection-card-BNqCCiGi.js";import"./use-registry-connections-CBLHoxJf.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BF2PPtYX.js";import"./connection-form-helpers-DYH9RX4H.js";import"./collection-tabs-C4WFDf3L.js";import"./badge-CKZbj9Sm.js";import"./connect-desktop-dialog-Bm-6O5pA.js";import"./select-model-CaxXX-qs.js";import"./checkbox-Bb7u4GZC.js";import"./skeleton-CRh0JIjf.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Dd__vNvn.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B6WaacbM.js";import"./toolbar-BJJ7OCXe.js";import"./use-capability-y7XYwlsw.js";import"./toolbar-icon-button-C2xHuQlk.js";import"./use-debounced-autosave-gEZrBMKF.js";import"./index-evctrtQu.js";import"./search-input-CSYveeK1.js";import"./use-mcp-auth-status-BHa4HLcz.js";import"./switch-BsoYdree.js";import"./github-repo-picker-ByxtRg3O.js";import"./use-debounced-value-DQ8ybCk8.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-BJw6jDsG.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./use-file-configs-CtCwpKQk.js";import"./automation-list-row-x3AaazOu.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(`
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-CfAl6qA3.js";import{F as xn,l as hn}from"./index-DyxjlEL3.js";import{g as gn,aM as vn,aN as yn}from"./agent-icon-kMrNxjYJ.js";import{s as Cn}from"./XClose-Bvx5TP10.js";import{m as wn}from"./automation-runs-Cs7mheBT.js";import{b as Je,T as Ze,a as et}from"./tooltip-lvzwcxmr.js";import{b as jn}from"./chat-context-BKkLQtRB.js";import{u as Nn}from"./shell-layout-B3ubQVJp.js";import{s as ve,a as tt,f as bn}from"./index-CwSqgILb.js";import{a as Sn,h as Mn,D as Rn,c as Dn,d as Pn,e as En}from"./dialog-B8iPXZfB.js";import{I as nt}from"./input-C96iFBVQ.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-lT11Jsbj.js";import{t as _n}from"./ChevronDown-z_OgoJuG.js";import{i as zn}from"./ChevronRight-HByc-_dD.js";import{a as Gn}from"./ZoomOut-Bjuv5wtp.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-D7GpXBZi.js";import"./AlertCircle-8aL2p4Jm.js";import"./Tool01-F8NWFSUY.js";import"./ArrowUp-BRv6jMcd.js";import"./Settings02-CoD4T3JT.js";import"./Tool02-CYQFsqUw.js";import"./ArrowRight-BmTkQdSS.js";import"./ArrowUpRight-DgWDf4bB.js";import"./TrendUp01-B11vKIzx.js";import"./ZapSquare-NmRRaYpN.js";import"./Users03-Bg-uyP8J.js";import"./CheckCircle-BhHr7P8S.js";import"./Check-xlx8bieA.js";import"./ChevronUp-C0dubflE.js";import"./DotsVertical-9e8whEmO.js";import"./Stars02-wl-TgjVw.js";import"./Copy01-BhLnIcPa.js";import"./Globe01-C1OI0rNn.js";import"./Eye-Dmrq3Yx3.js";import"./FilterLines-LxfJFt1s.js";import"./Star01-B_ldc-QG.js";import"./Globe04-D37KO3Rl.js";import"./SwitchHorizontal01-BjhVVVE7.js";import"./HardDrive-xaUFGQWK.js";import"./Image01-D2MElAgS.js";import"./Key01-CJ4v8ToT.js";import"./LayoutLeft-BXx4559W.js";import"./XCircle-z2zpbAQl.js";import"./LinkExternal01-RdFrwyl0.js";import"./Monitor01-ByOW8gCA.js";import"./Sun-DcglW2RF.js";import"./Package-BApyVZZF.js";import"./Palette-gwCbQEVd.js";import"./Play-CRcD5urt.js";import"./Plus-CpvaryXc.js";import"./SearchLg-BLbYMh4R.js";import"./SearchMd-BbTMkDIb.js";import"./Shield01-BSQ914Nd.js";import"./Stars01-BEQN6TZj.js";import"./Trash01-CFIi5PAY.js";import"./Upload01-CYv9Q0Sh.js";import"./User01-BHW_CvWq.js";import"./Users01-CVvGtppm.js";import"./X-B9OMbRgI.js";import"./Zap-CaoQpAZT.js";import"./select-DfWJsEeW.js";import"./useInfiniteQuery-BT7hVNXg.js";import"./use-infinite-scroll-DgeL9DrI.js";import"./use-connection-CawdsRuN.js";import"./use-collections-DJ2e88Xq.js";import"./use-mcp-client-CAtCw6yl.js";import"./auth-CaW_gj1t.js";import"./use-virtual-mcp--wK0dI9I.js";import"./card-CxpjTUKu.js";import"./sidebar-Bmfjcji7.js";import"./use-mobile-D0KrjV8M.js";import"./table-rrhMpufJ.js";import"./empty-state-B0XUVWqe.js";import"./use-members-BPomUDuY.js";import"./use-org-auth-client-BY7CXLsN.js";import"./use-clock-tick-Cdnpjga1.js";import"./use-automations-CtAoOh2g.js";import"./studio-tools-CZ0lHHg8.js";import"./useSuspenseInfiniteQuery-CIkQZwY0.js";import"./avatar-BHNRf2BK.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-aPelM9gN.js";import"./file-type-icon-CICh64eJ.js";import"./tab-id-BijBBRwE.js";import"./hooks-QkqjVdn8.js";import"./decopilot-sse-pool-DWXTDK7c.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-CzUxXwGN.js";import"./index-BD3KwOs3.js";import"./calendar-ajXRpj7H.js";import"./use-t-Ca0ZB4W6.js";import"./integration-icon-B1RhpoYr.js";import"./use-navigate-to-agent-CYMIGICl.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CH1JlaHA.js";import"./form-BbtpCekf.js";import"./label-Dyml5mFF.js";import"./autosend-CSO0mWVp.js";import"./use-ai-providers-DLA17X4H.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-zHZ5c1US.js";import"./use-organization-settings-Btln8Py9.js";import"./required-auth-layout-C-fhbIaJ.js";import"./use-org-sso-BNL5m012.js";import"./drawer-D5z1QpZ1.js";import"./collection-search-DZDCl18y.js";import"./index-DFylQUoD.js";import"./get-initials-D-f_fDFw.js";import"./popover-CNhMnjco.js";import"./use-registry-app-DGmz0d5i.js";import"./use-mcp-tools-BkyW84hu.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-jkSUOcu8.js";import"./mcp-oauth-C3_4QnQD.js";import"./extract-connection-data-ChcGsUj8.js";import"./dropdown-menu-D3W9Mypw.js";import"./command-Dv4-KFR5.js";import"./index-DCLh1sVt.js";import"./companions-core-AOH9czLM.js";import"./tabs-Zz7_UEQN.js";import"./toggle-group-B8ZzagA8.js";import"./use-deco-credits-tLUAgc-O.js";import"./connection-card-DSeJr6d2.js";import"./use-registry-connections-BNAx72pz.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-Q9mIBUV-.js";import"./connection-form-helpers-Ce26XCbs.js";import"./collection-tabs-C2iwwrh8.js";import"./badge-0FaSmMEN.js";import"./connect-desktop-dialog-CcP2o0mO.js";import"./select-model-va_ybRaj.js";import"./checkbox-9SStA5q1.js";import"./skeleton-DYsdfnWI.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-ZxnBfBdb.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-WASJAR7W.js";import"./toolbar-1oJVDPdM.js";import"./use-capability-x07oRB_v.js";import"./toolbar-icon-button-CqHN6MBe.js";import"./use-debounced-autosave-D46G2Nb3.js";import"./index-B72iIhnj.js";import"./search-input-DzbdykkS.js";import"./use-mcp-auth-status-mlZiRJgT.js";import"./switch-C8NVFCle.js";import"./github-repo-picker-qhKlxIkP.js";import"./use-debounced-value-U6TK_cAJ.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-Brx7T76W.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./use-file-configs-D6OQvi29.js";import"./automation-list-row-QQUoi2db.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
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{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-hjE2XX6X.js";import{i as zb}from"./Check-r7PeF0eX.js";import{a as jb}from"./Copy01-BJc2r-WF.js";import{e as S0,g as y0,f as A0,a as _0}from"./dialog-6hX1U4fH.js";import{n as I0}from"./Globe01-DoHz4MgR.js";import{k as k0,n as R0}from"./ZoomOut-B9HTC-JQ.js";import{u as N0}from"./use-mobile-DbFQjNJH.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-CfAl6qA3.js";import{i as zb}from"./Check-xlx8bieA.js";import{a as jb}from"./Copy01-BhLnIcPa.js";import{e as S0,g as y0,f as A0,a as _0}from"./dialog-B8iPXZfB.js";import{n as I0}from"./Globe01-C1OI0rNn.js";import{k as k0,n as R0}from"./ZoomOut-Bjuv5wtp.js";import{u as N0}from"./use-mobile-D0KrjV8M.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-hjE2XX6X.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-CfAl6qA3.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,b9 as b,dD as h,dE as v}from"./index-hjE2XX6X.js";import{L as N}from"./label-DIrBJY9t.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-CfAl6qA3.js";import{L as N}from"./label-Dyml5mFF.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 +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-hjE2XX6X.js";import{P as M}from"./index-evctrtQu.js";import{A as xe,b as je}from"./alert-BVUEKz6K.js";import{i as Se}from"./ArrowRight-BhbwwlKa.js";import{n as ze}from"./LinkExternal01-ClJ56TMW.js";import{s as ve}from"./XClose-Dqd4RGLi.js";import{u as be}from"./use-org-auth-client-MugnqO7R.js";import{u as ye}from"./use-debounced-autosave-gEZrBMKF.js";import{u as H}from"./use-t-B9aftsnE.js";import{A as Oe}from"./avatar-Dn3KdrEK.js";import{I as ae}from"./input-B3wVtT8N.js";import{S as re,a as le,b as Q,c as Ce}from"./settings-section-Dd__vNvn.js";import{D as we}from"./domain-settings-B6DIiCSh.js";import{u as De}from"./studio-tools-Cwafm64U.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-CQ4lOqNP.js";import{R as ke}from"./require-capability-DssBmal1.js";import"./sidebar-DTKf3TAO.js";import"./LayoutLeft-CGrbMvWa.js";import"./use-mobile-DbFQjNJH.js";import"./X-WxvHrb7f.js";import"./tooltip-BjzKDci2.js";import"./User01-Di4I1dn1.js";import"./card-CLBtulnR.js";import"./ArrowUpRight-B7W17SiR.js";import"./badge-CKZbj9Sm.js";import"./select-DL_WbMjV.js";import"./Check-r7PeF0eX.js";import"./ChevronDown-DyTq4IzF.js";import"./ChevronUp-CVW5xbC5.js";import"./use-capability-y7XYwlsw.js";import"./access-gate-CiaKpwyl.js";import"./capability-load-error-CMXIJbu-.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
+ 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-CfAl6qA3.js";import{P as M}from"./index-B72iIhnj.js";import{A as xe,b as je}from"./alert-CgsPHe2o.js";import{i as Se}from"./ArrowRight-BmTkQdSS.js";import{n as ze}from"./LinkExternal01-RdFrwyl0.js";import{s as ve}from"./XClose-Bvx5TP10.js";import{u as be}from"./use-org-auth-client-BY7CXLsN.js";import{u as ye}from"./use-debounced-autosave-D46G2Nb3.js";import{u as H}from"./use-t-Ca0ZB4W6.js";import{A as Oe}from"./avatar-BHNRf2BK.js";import{I as ae}from"./input-C96iFBVQ.js";import{S as re,a as le,b as Q,c as Ce}from"./settings-section-ZxnBfBdb.js";import{D as we}from"./domain-settings-DkOZ5_VY.js";import{u as De}from"./studio-tools-CZ0lHHg8.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-lT11Jsbj.js";import{R as ke}from"./require-capability-DxlH57sg.js";import"./sidebar-Bmfjcji7.js";import"./LayoutLeft-BXx4559W.js";import"./use-mobile-D0KrjV8M.js";import"./X-B9OMbRgI.js";import"./tooltip-lvzwcxmr.js";import"./User01-BHW_CvWq.js";import"./card-CxpjTUKu.js";import"./ArrowUpRight-DgWDf4bB.js";import"./badge-0FaSmMEN.js";import"./select-DfWJsEeW.js";import"./Check-xlx8bieA.js";import"./ChevronDown-z_OgoJuG.js";import"./ChevronUp-C0dubflE.js";import"./use-capability-x07oRB_v.js";import"./access-gate-CSvdc98W.js";import"./capability-load-error-D08tgLJn.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};