decocms 4.400.6 → 4.401.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/dist/client/assets/{AlertCircle-CiIF9Yxb.js → AlertCircle-D1gV07Oe.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CiScmeLa.js → AreaChart-lv4gftWl.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-Cw8zoASu.js → ArrowLeft-Bpb3sor7.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-DXuJxv6z.js → ArrowRight-BFyYdKNd.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-i7W4PLl8.js → ArrowUp-COLR6KTW.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-CAtvwpDL.js → CartesianChart-CJGGumCB.js} +1 -1
  7. package/dist/client/assets/{Check-Cxn5ODoZ.js → Check-C-Vn17o5.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-Cb0ohXc_.js → CheckCircle-CyKBJceB.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-B3Rmv2Rm.js → ChevronUp-Dto8qCq2.js} +1 -1
  10. package/dist/client/assets/{Copy01-CDFMtB2-.js → Copy01-B2GuMU9Q.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-Bpp7DUE2.js → CreditCard01-CoMSE38C.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CsphgVVa.js → DotsVertical-R1tuLE9v.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-Cmgr12jK.js → ErrorBarContext-viPSAyu4.js} +1 -1
  14. package/dist/client/assets/{Eye-BaKrr1k0.js → Eye-BhTmzCKr.js} +1 -1
  15. package/dist/client/assets/{Globe04-BjYimuB_.js → Globe04-BLoVxWaz.js} +1 -1
  16. package/dist/client/assets/{Image01-BokX_Ygh.js → Image01-D02_x5mu.js} +1 -1
  17. package/dist/client/assets/{Key01--iK_92aj.js → Key01-BuudAO_W.js} +1 -1
  18. package/dist/client/assets/{LayoutLeft-DbmxTpPW.js → LayoutLeft-CuG2yJZR.js} +1 -1
  19. package/dist/client/assets/{Line-CkGSu-B6.js → Line-CsKmpStn.js} +1 -1
  20. package/dist/client/assets/{Link01-CwRVjiFm.js → Link01-CVUd8ZSz.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-C1LIoQUC.js → LinkExternal01-Bo5cppL4.js} +1 -1
  22. package/dist/client/assets/{Monitor01-B-jx6SlO.js → Monitor01-Cj93oSbT.js} +1 -1
  23. package/dist/client/assets/{Palette-BZ8zPcQQ.js → Palette-CEa7GqA9.js} +1 -1
  24. package/dist/client/assets/{Plus-BeOCeSsu.js → Plus-Ch1uJBgh.js} +1 -1
  25. package/dist/client/assets/{SearchMd-CmoIwdFD.js → SearchMd-B_MXZ22A.js} +1 -1
  26. package/dist/client/assets/{Sector-L9R2CZ3j.js → Sector-CNfzRqjQ.js} +1 -1
  27. package/dist/client/assets/{Share07-BQpOEypi.js → Share07-D6XgmppM.js} +1 -1
  28. package/dist/client/assets/{Sun-BwQeSpzv.js → Sun-Dy_rDhHe.js} +1 -1
  29. package/dist/client/assets/{Tool01-CFPgtTUB.js → Tool01-BoO1X0ZH.js} +1 -1
  30. package/dist/client/assets/{Trash01-yjy5Djos.js → Trash01-D4CwdSy9.js} +1 -1
  31. package/dist/client/assets/{Upload01-C3YaZ92x.js → Upload01-hQyKBWZL.js} +1 -1
  32. package/dist/client/assets/{User01-CxY9-OxA.js → User01-gmEyKvLo.js} +1 -1
  33. package/dist/client/assets/{UserSquare-D1SexGLq.js → UserSquare-DXqYCX9F.js} +1 -1
  34. package/dist/client/assets/{Users01-C234jzz1.js → Users01-BBb4-Wbt.js} +1 -1
  35. package/dist/client/assets/{X-C49OUFcX.js → X-CEngH8b7.js} +1 -1
  36. package/dist/client/assets/{XClose-CKQjrGZS.js → XClose-Dvx_qcsQ.js} +1 -1
  37. package/dist/client/assets/{Zap-GTFewWZO.js → Zap-DkS3ccHw.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-BCbY44Eu.js → ZoomOut-D3wne5dx.js} +1 -1
  39. package/dist/client/assets/{access-gate-BWJ5-fyg.js → access-gate-D2mi3EXZ.js} +1 -1
  40. package/dist/client/assets/{add-connection-dialog-BRSOSKaa.js → add-connection-dialog-mm-WrmAR.js} +1 -1
  41. package/dist/client/assets/agent-analytics-IX3kP91L.js +2 -0
  42. package/dist/client/assets/agent-app-CliE0mM3.js +1 -0
  43. package/dist/client/assets/agent-assets-BbU_YrcZ.js +1 -0
  44. package/dist/client/assets/agent-automation-v13d06rk.js +20 -0
  45. package/dist/client/assets/agent-automations-yzTI8Hoc.js +1 -0
  46. package/dist/client/assets/agent-connect-sources-CEF4jbih.js +1 -0
  47. package/dist/client/assets/agent-deck-rRdXFIQU.js +1 -0
  48. package/dist/client/assets/agent-e2e-SKpj9Qv7.js +1 -0
  49. package/dist/client/assets/agent-experiments-DPD7MHX9.js +1 -0
  50. package/dist/client/assets/agent-file-CBIwfV0H.js +1 -0
  51. package/dist/client/assets/{agent-git-CEsra0W5.js → agent-git-N-SzMySX.js} +2 -2
  52. package/dist/client/assets/agent-hosting-BnzsqBpZ.js +1 -0
  53. package/dist/client/assets/{agent-icon-B4H17A-3.js → agent-icon-CjNFk4Bw.js} +1 -1
  54. package/dist/client/assets/agent-library-file-DHUyHSwO.js +1 -0
  55. package/dist/client/assets/agent-monitor-BeURekaz.js +1 -0
  56. package/dist/client/assets/agent-overview-By923wES.js +1 -0
  57. package/dist/client/assets/agent-settings-DiYW6DT3.js +1 -0
  58. package/dist/client/assets/{agent-site-editor-DqHsR1Oa.js → agent-site-editor-B7WR4KwZ.js} +13 -13
  59. package/dist/client/assets/agent-site-editor-code-A3lMFnBk.js +2 -0
  60. package/dist/client/assets/agent-site-editor-content-CTyxs9-E.js +9 -0
  61. package/dist/client/assets/agent-site-editor-preview-Db1buU8G.js +518 -0
  62. package/dist/client/assets/agent-view-Ct7YMMW7.js +1 -0
  63. package/dist/client/assets/{agent-view-guard-AncI1H8B.js → agent-view-guard-BpwecHVM.js} +1 -1
  64. package/dist/client/assets/agents-list-XIrdiWMz.js +1 -0
  65. package/dist/client/assets/{ai-providers-C91I1RIi.js → ai-providers-CsYNRATt.js} +2 -2
  66. package/dist/client/assets/{alert-Vv8Gd72t.js → alert-BYraKSPm.js} +1 -1
  67. package/dist/client/assets/{alert-dialog-p_yxBHYu.js → alert-dialog-DpzgB-Ls.js} +1 -1
  68. package/dist/client/assets/{analytics-sections-CJlCPTTn.js → analytics-sections-C2rbPWDv.js} +1 -1
  69. package/dist/client/assets/api-keys-B9Lt-UrM.js +1 -0
  70. package/dist/client/assets/api-keys-CzlAuC7_.js +1 -0
  71. package/dist/client/assets/app-editor-tD7rn_1-.js +1 -0
  72. package/dist/client/assets/{asset-utils-brdDGay3.js → asset-utils-4p52RC3c.js} +1 -1
  73. package/dist/client/assets/{auth-DN1jUXQS.js → auth-Dafjkfpj.js} +1 -1
  74. package/dist/client/assets/{auth-catchall-B8jjuh3t.js → auth-catchall-DD401U-a.js} +1 -1
  75. package/dist/client/assets/auth-entry-CEr7Y2wf.js +1 -0
  76. package/dist/client/assets/{auth-split-layout-9lXDS5uC.js → auth-split-layout-DLRovWby.js} +1 -1
  77. package/dist/client/assets/{authenticate-and-persist-oauth-BS0KLtdr.js → authenticate-and-persist-oauth-DIl2N_8B.js} +1 -1
  78. package/dist/client/assets/{automation-list-row-Z-oEG96S.js → automation-list-row-ueTfZfDa.js} +1 -1
  79. package/dist/client/assets/{automation-runs-BfoVhm3K.js → automation-runs-iTxxsepZ.js} +1 -1
  80. package/dist/client/assets/{automations-BPxNxlY1.js → automations-Cad12Ows.js} +1 -1
  81. package/dist/client/assets/{autosend-C9lP7MMD.js → autosend-DeYn5nkP.js} +1 -1
  82. package/dist/client/assets/{avatar-CaSFUaWf.js → avatar-B6HmPhM4.js} +1 -1
  83. package/dist/client/assets/{badge-DO3CQ_LV.js → badge-4kURMy-V.js} +1 -1
  84. package/dist/client/assets/block-document-CgGOvOyl.js +3 -0
  85. package/dist/client/assets/{blocks-preview-workspace-context-Bsh7P3Oa.js → blocks-preview-workspace-context-Bm8P7H4k.js} +1 -1
  86. package/dist/client/assets/{buckets-DAqePqsj.js → buckets-CK1WY8Rz.js} +1 -1
  87. package/dist/client/assets/{build-improve-prompt-doc-DKmCIRM5.js → build-improve-prompt-doc-BYdufdhy.js} +1 -1
  88. package/dist/client/assets/{calendar-v3rFo_Cq.js → calendar-CZsGTekl.js} +1 -1
  89. package/dist/client/assets/{capability-load-error-nzBIi4Tr.js → capability-load-error-CaE4aliY.js} +1 -1
  90. package/dist/client/assets/{use-org-repo-syncs-BMiVfW6D.js → cards-DaNm0Rmg.js} +3 -3
  91. package/dist/client/assets/category-editor-CyFQk1RV.js +1 -0
  92. package/dist/client/assets/{chart-CXdIvQqa.js → chart-_YADtzsN.js} +1 -1
  93. package/dist/client/assets/{chat-context-CypzFnUJ.js → chat-context-v9O7Tar9.js} +5 -5
  94. package/dist/client/assets/{chat-draft-bJa35Dyv.js → chat-draft-BSL5UQWs.js} +1 -1
  95. package/dist/client/assets/{checkbox-RuVP2KAD.js → checkbox-BMxilLAm.js} +1 -1
  96. package/dist/client/assets/{choose-editor-B6bnAbTO.js → choose-editor-TgQWBIvA.js} +1 -1
  97. package/dist/client/assets/{claim-phase-copy-IBG3Spfs.js → claim-phase-copy-DHsomph6.js} +1 -1
  98. package/dist/client/assets/{cli-auth-success-Gnusnqeq.js → cli-auth-success-Bsu7TVxL.js} +1 -1
  99. package/dist/client/assets/{client-icons-DeH3wN29.js → client-icons-PiLBRjl7.js} +1 -1
  100. package/dist/client/assets/{collapsible-Bx8hZ5vv.js → collapsible-bc19817o.js} +1 -1
  101. package/dist/client/assets/collection-detail-DpwCwzTH.js +1 -0
  102. package/dist/client/assets/{collection-display-button-B4JQi_wC.js → collection-display-button-BBRywDRf.js} +1 -1
  103. package/dist/client/assets/{collection-search-CPwy4oTQ.js → collection-search-kj64tBFw.js} +1 -1
  104. package/dist/client/assets/{collection-table-wrapper-DzLC9Cad.js → collection-table-wrapper-D2tmoW8T.js} +1 -1
  105. package/dist/client/assets/collection-tabs-DCLfzEOA.js +1 -0
  106. package/dist/client/assets/{combobox-bXWHxi5l.js → combobox-DlQnH8_N.js} +1 -1
  107. package/dist/client/assets/command-vKgGCoFF.js +1 -0
  108. package/dist/client/assets/{companion-mcps-section-BiiIWMdJ.js → companion-mcps-section-Dpcawwvl.js} +1 -1
  109. package/dist/client/assets/connect-Dick3000.js +8 -0
  110. package/dist/client/assets/{connect-layout-C5m144rF.js → connect-layout-BfLs3zCI.js} +1 -1
  111. package/dist/client/assets/{connection-C1Cmv_sz.js → connection-CTAV5crm.js} +1 -1
  112. package/dist/client/assets/{connection-card-lUin0zXZ.js → connection-card-DXWUKoxP.js} +1 -1
  113. package/dist/client/assets/connection-detail-BsIDB4zB.js +1 -0
  114. package/dist/client/assets/{connection-form-helpers-DiXUvzY1.js → connection-form-helpers-BrejHCrx.js} +1 -1
  115. package/dist/client/assets/connections-dBKfZKZY.js +1 -0
  116. package/dist/client/assets/{context-lYPc9MR3.js → context-VbsY_yj4.js} +1 -1
  117. package/dist/client/assets/{create-organization-dialog-CVGvbMrB.js → create-organization-dialog-BCpMYw7e.js} +1 -1
  118. package/dist/client/assets/{decofile-api-D2rDGWIR.js → decofile-api-5Nr0-h_v.js} +1 -1
  119. package/dist/client/assets/{decopilot-DZa7cUdc.js → decopilot-DlmPNMn_.js} +2 -2
  120. package/dist/client/assets/dialog-CEiE0rPQ.js +1 -0
  121. package/dist/client/assets/discover-BvxkrONV.js +1 -0
  122. package/dist/client/assets/{domain-settings-BoCWiWyd.js → domain-settings-D1tynvCC.js} +1 -1
  123. package/dist/client/assets/{download-app-dialog-B8fu6N4W.js → download-app-dialog-fmWolHKD.js} +1 -1
  124. package/dist/client/assets/{drawer-Dj7i5SNu.js → drawer-mNZA6mOf.js} +1 -1
  125. package/dist/client/assets/{editor-CStKuO5E.js → editor-BGAJHie_.js} +1 -1
  126. package/dist/client/assets/{empty-state-DuOhKQcg.js → empty-state-BJxP56xq.js} +1 -1
  127. package/dist/client/assets/{empty-state-C8J78MMg.js → empty-state-BgjUu2bT.js} +1 -1
  128. package/dist/client/assets/{extract-connection-data-BN6Gn7S7.js → extract-connection-data-erEsLv_0.js} +1 -1
  129. package/dist/client/assets/{feature-gate-BYtexfTr.js → feature-gate-BdRUy7K_.js} +1 -1
  130. package/dist/client/assets/{feature-paywall-Do9-TIse.js → feature-paywall-Tj9HTPlX.js} +1 -1
  131. package/dist/client/assets/{file-explorer-sM87NUct.js → file-explorer-0KdYuesc.js} +2 -2
  132. package/dist/client/assets/{file-preview-Cctwbzua.js → file-preview-i5I4Vmk2.js} +1 -1
  133. package/dist/client/assets/file-share-button-FS8XJyOj.js +3 -0
  134. package/dist/client/assets/{file-type-icon-C--_TBMw.js → file-type-icon-Cv10yXI0.js} +1 -1
  135. package/dist/client/assets/{folder-icon-Be-ry1Lo.js → folder-icon-DJuQAXN-.js} +1 -1
  136. package/dist/client/assets/{form-msoIoPH9.js → form-CCT2OtgN.js} +1 -1
  137. package/dist/client/assets/{gateway-client-B7EtyAUZ.js → gateway-client-hbsOo-al.js} +1 -1
  138. package/dist/client/assets/{general-B5uAiOFe.js → general-B_HDEt1Q.js} +1 -1
  139. package/dist/client/assets/{github-icon-Czf3JIe0.js → github-icon-BpCOzzV8.js} +1 -1
  140. package/dist/client/assets/home-CMRSzFNz.js +1 -0
  141. package/dist/client/assets/{hooks-BunFzIMc.js → hooks-CcmbiBeQ.js} +4 -4
  142. package/dist/client/assets/{icon-button-TBoaqswf.js → icon-button-B8KzCtPE.js} +1 -1
  143. package/dist/client/assets/index-BeJdXzSv.css +1 -0
  144. package/dist/client/assets/{index-C4bcGTWO.js → index-BpvXUNGE.js} +27 -27
  145. package/dist/client/assets/index-BsLVRPrU.js +26 -0
  146. package/dist/client/assets/{index-Bv9cknRX.js → index-CDe2yrwT.js} +1 -1
  147. package/dist/client/assets/index-CGxhGPsv.js +5 -0
  148. package/dist/client/assets/{index-DU8D4REs.js → index-CKZ6XrRd.js} +1 -1
  149. package/dist/client/assets/{index-B4lO5kiB.js → index-CWksyNR9.js} +1 -1
  150. package/dist/client/assets/{index-BO3WDGm0.js → index-ClooW3Im.js} +1 -1
  151. package/dist/client/assets/{index-DNOKSPYL.js → index-DVgj8U7g.js} +1 -1
  152. package/dist/client/assets/index-D_lD_4br.js +1 -0
  153. package/dist/client/assets/{index-B-RfjkQs.js → index-De5sr9zh.js} +44 -44
  154. package/dist/client/assets/{index-bU1o14-j.js → index-Kwx27vNK.js} +1 -1
  155. package/dist/client/assets/index-bMw4G7-h.js +1 -0
  156. package/dist/client/assets/{index-CUoS9PHq.js → index-gldwodyc.js} +1 -1
  157. package/dist/client/assets/{index-haAT4fp-.js → index-ldS2WUeM.js} +1 -1
  158. package/dist/client/assets/index-redirect-CfY3ykU_.js +1 -0
  159. package/dist/client/assets/{infiniteQueryObserver-CFFZE0G7.js → infiniteQueryObserver-CwgE9ndj.js} +1 -1
  160. package/dist/client/assets/{infra-billing-CI3pPi6s.js → infra-billing-TzlPUT1_.js} +1 -1
  161. package/dist/client/assets/{input-DgwTyBrI.js → input-B-DIEGoS.js} +1 -1
  162. package/dist/client/assets/{input-CkBBlArz.js → input-CogQggtY.js} +1 -1
  163. package/dist/client/assets/input-DMbK8B2u.js +8 -0
  164. package/dist/client/assets/{integration-icon-DuRUAYQY.js → integration-icon-CsYMgjoT.js} +1 -1
  165. package/dist/client/assets/{label-COhaglCI.js → label-Baft7ecp.js} +1 -1
  166. package/dist/client/assets/{last-preview-page-C2BRWzsU.js → last-preview-page-DkIjQnDn.js} +1 -1
  167. package/dist/client/assets/{layout-ezpRdHMe.js → layout-CI3O4gkp.js} +1 -1
  168. package/dist/client/assets/{legacy-agents-deep-7Ua9_FGE.js → legacy-agents-deep-BvWpwcOc.js} +1 -1
  169. package/dist/client/assets/{legacy-main-redirect-CoKgMaf6.js → legacy-main-redirect-CQgWSIje.js} +1 -1
  170. package/dist/client/assets/library-CAwdTP4-.js +161 -0
  171. package/dist/client/assets/{login-zL3v_Zks.js → login-DJ5PeYOE.js} +1 -1
  172. package/dist/client/assets/{markdown-CL_7eJfo.js → markdown-UaZeehfy.js} +2 -2
  173. package/dist/client/assets/{mcp-app-renderer-BF1xjUD_.js → mcp-app-renderer-DVXFXjZU.js} +2 -2
  174. package/dist/client/assets/{mcp-oauth-CYUMx6Lt.js → mcp-oauth-DpJ1IX9I.js} +1 -1
  175. package/dist/client/assets/members-CXM5jx_X.js +1 -0
  176. package/dist/client/assets/message-templates-54foej4h.js +1 -0
  177. package/dist/client/assets/{mini-report-page-D2G_6nvn.js → mini-report-page-B1sFW1ww.js} +1 -1
  178. package/dist/client/assets/mock-board-BbS_eZEl.js +10 -0
  179. package/dist/client/assets/{monaco-editor-B-WPLOla.js → monaco-editor-B9FUV1NZ.js} +2 -2
  180. package/dist/client/assets/{monitoring-stats-row-IwXyXgpg.js → monitoring-stats-row-Cl5_OBZ5.js} +1 -1
  181. package/dist/client/assets/multi-select-VDMM47xB.js +1 -0
  182. package/dist/client/assets/{mustache-D5b2aALH.js → mustache-DZ4FV0Nc.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-XaDe1ZVU.js → oauth-callback-OoZf3jL0.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-ai-provider-CG6P6aWc.js → oauth-callback-ai-provider-foDaIFwI.js} +1 -1
  185. package/dist/client/assets/{onboarding-C0P9leUg.js → onboarding-Dq71FOpN.js} +1 -1
  186. package/dist/client/assets/{optimistic-project-sidebar-views-BULTvoQH.js → optimistic-project-sidebar-views-CgB8Gy1s.js} +1 -1
  187. package/dist/client/assets/org-file-open-context-Mx8jC4-P.js +1 -0
  188. package/dist/client/assets/{organization-choice-5mEr1aKE.js → organization-choice-ZqNf00EY.js} +1 -1
  189. package/dist/client/assets/{orgs-3MZWLo-q.js → orgs-B8y0HHqF.js} +1 -1
  190. package/dist/client/assets/page-seo-form-DPObRKD4.js +1 -0
  191. package/dist/client/assets/{pair-CSXFDEIQ.js → pair-D39JYx1G.js} +5 -5
  192. package/dist/client/assets/{plan-ladder-B7xKH1KD.js → plan-ladder-D85oNnSr.js} +1 -1
  193. package/dist/client/assets/{popover-DFY37Yvw.js → popover-DCaw39mN.js} +1 -1
  194. package/dist/client/assets/{post-calendar-Jvfo43V-.js → post-calendar-Dpixo2IP.js} +1 -1
  195. package/dist/client/assets/{post-editor-D0HMXnr-.js → post-editor-BivV74bZ.js} +1 -1
  196. package/dist/client/assets/{preview-content-DyylZdej.js → preview-content-ziDhpr9V.js} +1 -1
  197. package/dist/client/assets/{preview-dialog-GxP1iGgN.js → preview-dialog-DHJShsrA.js} +1 -1
  198. package/dist/client/assets/profile-C9xI3KvS.js +1 -0
  199. package/dist/client/assets/{project-app-view-C-S_SBUQ.js → project-app-view-CFWAaKq_.js} +1 -1
  200. package/dist/client/assets/project-feed-D6D6bSHY.js +1 -0
  201. package/dist/client/assets/{project-icon-CsZAOQy_.js → project-icon-CXM68zVZ.js} +1 -1
  202. package/dist/client/assets/project-reports-8SYQbI2J.js +1 -0
  203. package/dist/client/assets/project-tasks-DrEyprGU.js +1 -0
  204. package/dist/client/assets/{prompts-CvgNBkYO.js → prompts-CVNAEIJB.js} +1 -1
  205. package/dist/client/assets/record-editor-CKxwz78L.js +1 -0
  206. package/dist/client/assets/{redirect-editor-D2NLj98m.js → redirect-editor-Dy1UJRrv.js} +1 -1
  207. package/dist/client/assets/{reports-BCYtzeDa.js → reports-BvZHk8Hk.js} +2 -2
  208. package/dist/client/assets/reports-DyvsxSR9.js +1 -0
  209. package/dist/client/assets/{reports-onboarding-BG7_PC6g.js → reports-onboarding-D4Uaui5Y.js} +1 -1
  210. package/dist/client/assets/reports-tab-CwwTWlIS.js +2 -0
  211. package/dist/client/assets/{repositories-C5RyL_z1.js → repositories-CqbcdDdH.js} +1 -1
  212. package/dist/client/assets/{repository-import-picker-ByioO6uG.js → repository-import-picker-BXQhU82J.js} +1 -1
  213. package/dist/client/assets/{repository-picker-BPuZL7HO.js → repository-picker-D1hSYB_G.js} +1 -1
  214. package/dist/client/assets/require-capability-Cab5QyjH.js +1 -0
  215. package/dist/client/assets/{required-auth-layout-Duev8t_N.js → required-auth-layout-scRrBHKS.js} +1 -1
  216. package/dist/client/assets/{reset-password-JANPJ9Jd.js → reset-password-CDE1iX3h.js} +1 -1
  217. package/dist/client/assets/{resizable-yTD1tEOl.js → resizable-D2L182YF.js} +1 -1
  218. package/dist/client/assets/{review-settings-vW0-yRPH.js → review-settings-B98rLFs_.js} +1 -1
  219. package/dist/client/assets/{rich-text-link-control-BUscMTY0.js → rich-text-link-control-DwRx0-0K.js} +1 -1
  220. package/dist/client/assets/roles-CZvYgdUZ.js +1 -0
  221. package/dist/client/assets/route-B9TApoqS.js +1 -0
  222. package/dist/client/assets/route-N926-QRJ.js +1 -0
  223. package/dist/client/assets/route-OKy5_TxY.js +1 -0
  224. package/dist/client/assets/route-page-header-ErgCCo2N.js +1 -0
  225. package/dist/client/assets/runnable-block-editor-C2YphDcL.js +17 -0
  226. package/dist/client/assets/{sandbox-lifecycle-context-BZ0OGbvt.js → sandbox-lifecycle-context-o4KKoGrI.js} +2 -2
  227. package/dist/client/assets/{schema-kN4UiUD7.js → schema-DkZUkArz.js} +1 -1
  228. package/dist/client/assets/{scroll-area-DtmE_V3W.js → scroll-area-Ca9Mo_QH.js} +1 -1
  229. package/dist/client/assets/{search-input-5SNth6iW.js → search-input-DRWRYRPs.js} +1 -1
  230. package/dist/client/assets/{search-toggle-BQLp0m3w.js → search-toggle-B5FB44XX.js} +1 -1
  231. package/dist/client/assets/{secret-picker-CNRCwGgJ.js → secret-picker-DLap6vTC.js} +1 -1
  232. package/dist/client/assets/secrets-jZp-bTCf.js +1 -0
  233. package/dist/client/assets/sections-editor-BFbkxXEt.js +1 -0
  234. package/dist/client/assets/{select-lkzYgXdD.js → select-BZ6sktb7.js} +1 -1
  235. package/dist/client/assets/select-model-BIWsu5PV.js +1 -0
  236. package/dist/client/assets/{seo-editor-C5sUOmWC.js → seo-editor-PDlEaSFK.js} +1 -1
  237. package/dist/client/assets/{separator-DIB2NY6d.js → separator-D_UVaWw6.js} +1 -1
  238. package/dist/client/assets/settings-tab-BBHI-Kul.js +5 -0
  239. package/dist/client/assets/{sheet-B5VBlNbo.js → sheet-Kja83qKC.js} +1 -1
  240. package/dist/client/assets/shell-layout-ynqF32RZ.js +1 -0
  241. package/dist/client/assets/{skill-preview-_2hXoPIK.js → skill-preview-BjeMKh94.js} +1 -1
  242. package/dist/client/assets/skills-BVNUFN8s.js +1 -0
  243. package/dist/client/assets/{sso-kIq_TNP0.js → sso-CbvzPnGh.js} +1 -1
  244. package/dist/client/assets/{suggestion-Bm5WiIMl.js → suggestion-DMGPIg87.js} +1 -1
  245. package/dist/client/assets/{switch-C_Vj5_E0.js → switch-CSgTLkLq.js} +1 -1
  246. package/dist/client/assets/synced-repos-DkDa4E03.js +1 -0
  247. package/dist/client/assets/{table-EewUoElk.js → table-BNlBwUw8.js} +1 -1
  248. package/dist/client/assets/{tabs-Dn00_KeP.js → tabs-DWl7SNDG.js} +1 -1
  249. package/dist/client/assets/{task-board-B1qWBX1A.js → task-board-C6TTBmRS.js} +1 -1
  250. package/dist/client/assets/{task-route-D--4JOl_.js → task-route-Bz3woGSP.js} +1 -1
  251. package/dist/client/assets/{task-status-Nj47Imo6.js → task-status-CnFMIlt_.js} +1 -1
  252. package/dist/client/assets/taskboard-analytics-DoJw1Xfg.js +1 -0
  253. package/dist/client/assets/tasks-CIdMsSLJ.js +1 -0
  254. package/dist/client/assets/{tasks-BKvSOVwi.js → tasks-Cqz8mQiU.js} +2 -2
  255. package/dist/client/assets/{textarea-BJstaU_4.js → textarea-CufiKBr1.js} +1 -1
  256. package/dist/client/assets/thread-analytics-CC-_zVgm.js +1 -0
  257. package/dist/client/assets/thread-button-Ds-0KssI.js +1 -0
  258. package/dist/client/assets/{thread-intent-Dv_ln6w2.js → thread-intent-rbLXiRX-.js} +1 -1
  259. package/dist/client/assets/{thread-route-C2QO3TRR.js → thread-route-B3__WRb1.js} +1 -1
  260. package/dist/client/assets/thread-route-D_-4E_Qa.js +1 -0
  261. package/dist/client/assets/{thread-sheet-body-a-hPHT_-.js → thread-sheet-body-C6Nvo-gY.js} +1 -1
  262. package/dist/client/assets/toggle-group-CEb1zCbt.js +1 -0
  263. package/dist/client/assets/toolbar-icon-button-B7ENG3u2.js +1 -0
  264. package/dist/client/assets/{tooltip-1YZ9_LEc.js → tooltip-Bdu4_ay-.js} +1 -1
  265. package/dist/client/assets/{track-BdOLl-rI.js → track-DYcNrkYj.js} +1 -1
  266. package/dist/client/assets/{types-BcA15it5.js → types-C1lh-7rD.js} +3 -3
  267. package/dist/client/assets/{usage-stats-BXm3jzMp.js → usage-stats-C8kdutYl.js} +1 -1
  268. package/dist/client/assets/{use-ai-providers-OZaiJf_i.js → use-ai-providers-DdvmCGxF.js} +1 -1
  269. package/dist/client/assets/{use-automations-D-L8pJyH.js → use-automations-By-N-e6c.js} +1 -1
  270. package/dist/client/assets/{use-autosave-WOg9IhGs.js → use-autosave-tkO4DMDZ.js} +1 -1
  271. package/dist/client/assets/use-connect-companion-CRgCDVPT.js +1 -0
  272. package/dist/client/assets/{use-connection-B5_J2wP6.js → use-connection-CzhqmkxY.js} +1 -1
  273. package/dist/client/assets/{use-copy-B6plqh15.js → use-copy-D35bNj5j.js} +1 -1
  274. package/dist/client/assets/{use-create-virtual-mcp-BHGrzRmt.js → use-create-virtual-mcp-DSS6KW-Y.js} +1 -1
  275. package/dist/client/assets/{use-date-fns-locale-giBeaSOM.js → use-date-fns-locale-B65-a3KP.js} +1 -1
  276. package/dist/client/assets/{use-debounced-autosave-B9G4Lz7n.js → use-debounced-autosave-UCDN4Lw3.js} +1 -1
  277. package/dist/client/assets/{use-debounced-value-CUPne1nm.js → use-debounced-value-CWshbX7F.js} +1 -1
  278. package/dist/client/assets/{use-deco-credits-BhBg4qYv.js → use-deco-credits-DTu_Qf20.js} +1 -1
  279. package/dist/client/assets/{use-decopilot-events-CrYWYj1F.js → use-decopilot-events-BvKgG5Ws.js} +1 -1
  280. package/dist/client/assets/{use-delete-connection-XgJ1tVSe.js → use-delete-connection-1XhxmMPF.js} +1 -1
  281. package/dist/client/assets/{use-deployment-admin-DhLAmeuE.js → use-deployment-admin-DMXwbJU8.js} +1 -1
  282. package/dist/client/assets/{use-entitlements-Bk0dyRQ2.js → use-entitlements-Da1bmf67.js} +1 -1
  283. package/dist/client/assets/{use-fast-preview-draft-url-BfzrR4he.js → use-fast-preview-draft-url-C7L3VsQn.js} +1 -1
  284. package/dist/client/assets/{use-file-configs-Q9mf6jQo.js → use-file-configs-C7xVU8E2.js} +1 -1
  285. package/dist/client/assets/use-in-settings-icIKIpSR.js +1 -0
  286. package/dist/client/assets/{use-infinite-scroll-BAK1V_oQ.js → use-infinite-scroll-7-m4dXi3.js} +1 -1
  287. package/dist/client/assets/{use-join-requests-DbabBnEV.js → use-join-requests-D_x3dmzZ.js} +1 -1
  288. package/dist/client/assets/use-main-panel-tabs-B5g6e1MJ.js +1 -0
  289. package/dist/client/assets/{use-mcp-auth-status-DetA28-g.js → use-mcp-auth-status-nDkEwx2c.js} +1 -1
  290. package/dist/client/assets/{use-mcp-client-6HSoOGyN.js → use-mcp-client-CkjkRUta.js} +1 -1
  291. package/dist/client/assets/{use-mcp-prompts-1aH_UXpe.js → use-mcp-prompts-D2XJcis0.js} +1 -1
  292. package/dist/client/assets/{use-mcp-tools-yAkOUoVS.js → use-mcp-tools-DZlo67bQ.js} +1 -1
  293. package/dist/client/assets/{use-members-CNAxK8NG.js → use-members-CdPjttiy.js} +1 -1
  294. package/dist/client/assets/{use-mobile-BA2OXMES.js → use-mobile-DVMuGaln.js} +1 -1
  295. package/dist/client/assets/{use-navigate-to-agent-B7J0geak.js → use-navigate-to-agent-BCcYux8q.js} +1 -1
  296. package/dist/client/assets/{use-open-billing-url-CdE8qyDV.js → use-open-billing-url-CJn1G7pV.js} +1 -1
  297. package/dist/client/assets/{use-org-auth-client-DJC4lcTZ.js → use-org-auth-client-D8dxsLtj.js} +1 -1
  298. package/dist/client/assets/{use-org-fs-DxNvtETC.js → use-org-fs-3jzMRDSK.js} +1 -1
  299. package/dist/client/assets/{use-org-sso-D0y0H-Wd.js → use-org-sso-Bb_2_N0Z.js} +1 -1
  300. package/dist/client/assets/{use-organization-roles-CTjyx7IB.js → use-organization-roles-ixSaPxG5.js} +1 -1
  301. package/dist/client/assets/{use-organization-settings-fx1CniIO.js → use-organization-settings-B0mobgxG.js} +1 -1
  302. package/dist/client/assets/{use-panel-navigate-ZqAXzPy8.js → use-panel-navigate-CjSWJCy4.js} +1 -1
  303. package/dist/client/assets/{use-project-native-view-presence-DU2K0Eyd.js → use-project-native-view-presence-_PPun-xm.js} +1 -1
  304. package/dist/client/assets/{use-project-scope-Hp7aDrht.js → use-project-scope-CJnr8HCi.js} +1 -1
  305. package/dist/client/assets/{use-releases-BXIf7cF0.js → use-releases-CT-nVxtd.js} +1 -1
  306. package/dist/client/assets/{use-reports-diagnostic-D7jrD_HD.js → use-reports-diagnostic-AsJIEIvt.js} +1 -1
  307. package/dist/client/assets/{use-route-default-main-DGbZPJrO.js → use-route-default-main-CQGz2KW9.js} +1 -1
  308. package/dist/client/assets/{use-secrets-C-Xp8b4K.js → use-secrets-DgNcVRY9.js} +1 -1
  309. package/dist/client/assets/use-section-preview-base-mIL7vKdH.js +1 -0
  310. package/dist/client/assets/{use-session-runtime-BGl1FWUp.js → use-session-runtime-B9eFlXyW.js} +1 -1
  311. package/dist/client/assets/{use-tags-pwsJJDvy.js → use-tags-BM82Yu0K.js} +1 -1
  312. package/dist/client/assets/{use-task-board-analytics-Dh7V7MPv.js → use-task-board-analytics-D_ruF5p9.js} +1 -1
  313. package/dist/client/assets/{use-task-metadata-DKjAQSZf.js → use-task-metadata-qZ-qzNT-.js} +1 -1
  314. package/dist/client/assets/{use-thread-analytics-CusHOOmZ.js → use-thread-analytics-BcEpZDI1.js} +1 -1
  315. package/dist/client/assets/{use-thread-outputs-8akdlycY.js → use-thread-outputs-CIF4-tq_.js} +1 -1
  316. package/dist/client/assets/{use-virtual-mcp-CbHEuH0C.js → use-virtual-mcp-BKP1YfD8.js} +1 -1
  317. package/dist/client/assets/useInfiniteQuery-DhVx-Xnv.js +1 -0
  318. package/dist/client/assets/{useQueries-B5DxQ3Sp.js → useQueries-CbuhlNe5.js} +1 -1
  319. package/dist/client/assets/useSuspenseInfiniteQuery-CB90sByh.js +1 -0
  320. package/dist/client/assets/{users-p9MUZzW1.js → users-CDy-vhRi.js} +1 -1
  321. package/dist/client/assets/{utils-BkPwCtYS.js → utils-VRidfAJX.js} +1 -1
  322. package/dist/client/assets/{variant-calendar-CcJNDqFN.js → variant-calendar-C5Yhhu_f.js} +1 -1
  323. package/dist/client/assets/{variant-matcher-override-CexHfhU3.js → variant-matcher-override-NRDTBNQG.js} +1 -1
  324. package/dist/client/assets/view-mode-toggle-P-VmNhrj.js +1 -0
  325. package/dist/client/assets/{virtual-mcp-Dd5g9b73.js → virtual-mcp-DXr1jTLu.js} +1 -1
  326. package/dist/client/index.html +2 -2
  327. package/dist/server/cli.js +1 -1
  328. package/dist/server/server.js +1 -1
  329. package/package.json +1 -1
  330. package/dist/client/assets/agent-analytics-DvZELmro.js +0 -2
  331. package/dist/client/assets/agent-app-CR4dhbC3.js +0 -1
  332. package/dist/client/assets/agent-assets-CAIo2BGp.js +0 -1
  333. package/dist/client/assets/agent-automation-4_v-jQ62.js +0 -20
  334. package/dist/client/assets/agent-automations-DideyLR7.js +0 -1
  335. package/dist/client/assets/agent-connect-sources-C16mG4Vi.js +0 -1
  336. package/dist/client/assets/agent-deck-B2S-lir7.js +0 -1
  337. package/dist/client/assets/agent-e2e-CQ-lGjg-.js +0 -1
  338. package/dist/client/assets/agent-experiments-CXowDnMX.js +0 -1
  339. package/dist/client/assets/agent-file-DVtUKLrb.js +0 -1
  340. package/dist/client/assets/agent-hosting-B95vsATF.js +0 -1
  341. package/dist/client/assets/agent-library-file-c5FcaNLf.js +0 -1
  342. package/dist/client/assets/agent-monitor-DKyHOvd6.js +0 -1
  343. package/dist/client/assets/agent-overview-Dq7efx0u.js +0 -1
  344. package/dist/client/assets/agent-settings-tjDRwuVg.js +0 -1
  345. package/dist/client/assets/agent-site-editor-code-D1x0TO9d.js +0 -2
  346. package/dist/client/assets/agent-site-editor-content-C0C8gdKB.js +0 -9
  347. package/dist/client/assets/agent-site-editor-preview-BPAT7NTN.js +0 -518
  348. package/dist/client/assets/agent-view-DECRuUKv.js +0 -1
  349. package/dist/client/assets/agents-list-DdpIsQof.js +0 -1
  350. package/dist/client/assets/api-keys-CAMHVAF8.js +0 -1
  351. package/dist/client/assets/api-keys-Ct4yGdka.js +0 -1
  352. package/dist/client/assets/app-editor-BWuGvl0o.js +0 -1
  353. package/dist/client/assets/auth-entry-BZ-zlX-A.js +0 -1
  354. package/dist/client/assets/block-document-BQbcWy3F.js +0 -3
  355. package/dist/client/assets/breadcrumb-D3KLnh1b.js +0 -1
  356. package/dist/client/assets/category-editor-CLkY8j6x.js +0 -1
  357. package/dist/client/assets/collection-detail-Xqlt3OgU.js +0 -1
  358. package/dist/client/assets/collection-tabs-VZH79ort.js +0 -1
  359. package/dist/client/assets/command-C0IXiNme.js +0 -1
  360. package/dist/client/assets/connect-B9RtRyUW.js +0 -8
  361. package/dist/client/assets/connection-detail-Bgtg-egn.js +0 -1
  362. package/dist/client/assets/connections-CIFiKTz-.js +0 -1
  363. package/dist/client/assets/dialog-fTIcTyHb.js +0 -1
  364. package/dist/client/assets/discover-BZC8PmWN.js +0 -1
  365. package/dist/client/assets/file-share-button-Dcpl3tTi.js +0 -3
  366. package/dist/client/assets/home-nqrW03_D.js +0 -1
  367. package/dist/client/assets/index-B48I-F_s.js +0 -26
  368. package/dist/client/assets/index-CnM-XjMS.js +0 -1
  369. package/dist/client/assets/index-CnlnpiW9.js +0 -1
  370. package/dist/client/assets/index-Cnm8iPpl.js +0 -5
  371. package/dist/client/assets/index-DQQ8_5-n.css +0 -1
  372. package/dist/client/assets/index-redirect-lHlkLUpP.js +0 -1
  373. package/dist/client/assets/input-bCtnK_dS.js +0 -8
  374. package/dist/client/assets/library-nbbFy0YJ.js +0 -161
  375. package/dist/client/assets/members-Ci31aIzf.js +0 -1
  376. package/dist/client/assets/message-templates-Dievwyon.js +0 -1
  377. package/dist/client/assets/mock-board-MGFiZQqD.js +0 -10
  378. package/dist/client/assets/multi-select-B5cPO8Zc.js +0 -1
  379. package/dist/client/assets/org-file-open-context-C6mgZPAr.js +0 -1
  380. package/dist/client/assets/page-seo-form-BHc2C0F_.js +0 -1
  381. package/dist/client/assets/profile-Bl7SMbnv.js +0 -1
  382. package/dist/client/assets/project-feed-C9k9tVu9.js +0 -1
  383. package/dist/client/assets/project-reports-h9XKnGzZ.js +0 -1
  384. package/dist/client/assets/project-tasks-CvQsB5FR.js +0 -1
  385. package/dist/client/assets/record-editor-Dco1ladi.js +0 -1
  386. package/dist/client/assets/reports-KVVIwKGA.js +0 -1
  387. package/dist/client/assets/reports-tab-CZyY8SM6.js +0 -2
  388. package/dist/client/assets/require-capability-BlL45yDc.js +0 -1
  389. package/dist/client/assets/roles-B-T-wGt2.js +0 -1
  390. package/dist/client/assets/route-BoE0K809.js +0 -1
  391. package/dist/client/assets/route-Ciyyz2ig.js +0 -1
  392. package/dist/client/assets/route-X5r9RmD7.js +0 -1
  393. package/dist/client/assets/route-page-header-Ck32Z_z1.js +0 -1
  394. package/dist/client/assets/runnable-block-editor-DXtvF8jt.js +0 -17
  395. package/dist/client/assets/secrets-BUndq66A.js +0 -1
  396. package/dist/client/assets/sections-editor-BMGHgar4.js +0 -1
  397. package/dist/client/assets/select-model-L0RmAR5m.js +0 -1
  398. package/dist/client/assets/settings-tab-BQA673_Z.js +0 -5
  399. package/dist/client/assets/shell-layout-t1NP6lxk.js +0 -1
  400. package/dist/client/assets/sidebar-Bsj1oRm2.js +0 -1
  401. package/dist/client/assets/skills-D_mDF0TE.js +0 -1
  402. package/dist/client/assets/synced-repos-wPtrwk-M.js +0 -1
  403. package/dist/client/assets/taskboard-analytics-DlcZmFmP.js +0 -1
  404. package/dist/client/assets/tasks-DhBfoBLp.js +0 -1
  405. package/dist/client/assets/thread-analytics-CJvSEofm.js +0 -1
  406. package/dist/client/assets/thread-button-Dg0_8ATn.js +0 -1
  407. package/dist/client/assets/thread-route-BBwMAr4Q.js +0 -1
  408. package/dist/client/assets/toggle-group-n81OZ_Uu.js +0 -1
  409. package/dist/client/assets/toolbar-icon-button-G0ZB62BK.js +0 -1
  410. package/dist/client/assets/use-connect-companion-dh23z2e4.js +0 -1
  411. package/dist/client/assets/use-in-settings-_C3gW9Az.js +0 -1
  412. package/dist/client/assets/use-main-panel-tabs-rnsNQmUO.js +0 -1
  413. package/dist/client/assets/use-section-preview-base-BIeB_qzV.js +0 -1
  414. package/dist/client/assets/useInfiniteQuery-CEwPAAtp.js +0 -1
  415. package/dist/client/assets/useSuspenseInfiniteQuery-CC4BMd5I.js +0 -1
  416. package/dist/client/assets/view-mode-toggle-CJHrx4Q2.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as R,b as W,e as Ye,j as n,B as F,t as Ve,bQ as me,a7 as Nt,a as Ke,y as Yt,D as _t,K as Ue,bR as Qt,bS as Xt,V as Be,l as dt,aF as Zt,p as pt,bT as en,r as G,Z as tn,a6 as ie,d as At,X as ht,z as Pt,m as He,q as ut,ar as Ct,bU as nn,ax as sn,aD as yt,x as on,bV as an,bW as rn,bX as ln,bY as cn,bZ as dn,Y as un,u as mn,$ as fn,b_ as hn,b$ as gn,k as Et,c0 as lt,c1 as pn,c2 as yn,O as bn,c3 as xn}from"./index-De5sr9zh.js";import{A as at}from"./avatar-B6HmPhM4.js";import{t as Ot}from"./Globe04-BLoVxWaz.js";import{i as wn}from"./UserSquare-DXqYCX9F.js";import{ap as Sn,O as vn,u as ct,a1 as jn,R as te,x as kn,aq as Tn,n as bt,j as Nn,h as _n,ar as An,f as Pn}from"./agent-icon-CjNFk4Bw.js";import{s as Cn}from"./XClose-Dvx_qcsQ.js";import{D as En}from"./download-app-dialog-fmWolHKD.js";import{a as On,u as In}from"./use-project-scope-CJnr8HCi.js";import{u as It,a as Ln}from"./use-panel-navigate-CjSWJCy4.js";import{i as ae}from"./CheckCircle-CyKBJceB.js";import{i as ot}from"./Monitor01-Cj93oSbT.js";import{i as re}from"./Zap-DkS3ccHw.js";import{c as Lt,d as $t,b as Dt,D as Rt,h as $n,e as Dn}from"./dialog-CEiE0rPQ.js";import{a as Rn}from"./Share07-D6XgmppM.js";import{s as xt}from"./Plus-Ch1uJBgh.js";import{a as Mn}from"./Tool01-BoO1X0ZH.js";import{b as le,a as Ge,f as Fn,e as zn,c as qn,C as Bn}from"./command-vKgGCoFF.js";import{I as Kn}from"./integration-icon-CsYMgjoT.js";import{P as Hn}from"./project-icon-CXM68zVZ.js";import{a as Un,m as Gn}from"./use-mcp-client-CkjkRUta.js";import{S as Jn,u as Vn}from"./hooks-CcmbiBeQ.js";import{u as Wn}from"./use-is-desktop-app-BNujXJc_.js";import{R as Yn}from"./required-auth-layout-scRrBHKS.js";import{A as Qn}from"./autosend-DeYn5nkP.js";import{u as Xn,a as Zn,b as es,c as ts}from"./thread-route-B3__WRb1.js";import{u as ns}from"./use-org-sso-Bb_2_N0Z.js";function ss(t){const e=R.c(49),{orgName:s,orgSlug:a,orgLogo:o,domain:i}=t,r=W();let u;e[0]!==a||e[1]!==r?(u=async()=>{const k=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),_=await k.json();if(!k.ok||!_.success)throw new Error(_.error??r("common.autoDomainJoinScreen.joinError"));return _},e[0]=a,e[1]=r,e[2]=u):u=e[2];let m;e[3]!==a?(m=k=>{window.location.href=`/${k.slug??a}`},e[3]=a,e[4]=m):m=e[4];let h;e[5]!==r?(h=k=>{Ve.error(k instanceof Error?k.message:r("common.autoDomainJoinScreen.joinError"))},e[5]=r,e[6]=h):h=e[6];let v;e[7]!==u||e[8]!==m||e[9]!==h?(v={mutationFn:u,onSuccess:m,onError:h},e[7]=u,e[8]=m,e[9]=h,e[10]=v):v=e[10];const c=Ye(v),x=os;let g;e[11]!==o||e[12]!==s?(g=o?n.jsx(at,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ot,{className:"h-6 w-6 text-primary"})}),e[11]=o,e[12]=s,e[13]=g):g=e[13];let y;e[14]!==s||e[15]!==r?(y=r("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=r,e[16]=y):y=e[16];let l;e[17]!==y?(l=n.jsx("h3",{className:"text-lg font-medium",children:y}),e[17]=y,e[18]=l):l=e[18];let d;e[19]!==i||e[20]!==r?(d=r("common.autoDomainJoinScreen.joinDescription",{domain:i}),e[19]=i,e[20]=r,e[21]=d):d=e[21];let p;e[22]!==d?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[22]=d,e[23]=p):p=e[23];let b;e[24]!==l||e[25]!==p?(b=n.jsxs("div",{className:"space-y-2",children:[l,p]}),e[24]=l,e[25]=p,e[26]=b):b=e[26];let w;e[27]!==c?(w=()=>c.mutate(),e[27]=c,e[28]=w):w=e[28];let S;e[29]!==c.isPending||e[30]!==s||e[31]!==r?(S=c.isPending?r("common.autoDomainJoinScreen.joining"):r("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=c.isPending,e[30]=s,e[31]=r,e[32]=S):S=e[32];let T;e[33]!==c.isPending||e[34]!==w||e[35]!==S?(T=n.jsx(F,{onClick:w,disabled:c.isPending,children:S}),e[33]=c.isPending,e[34]=w,e[35]=S,e[36]=T):T=e[36];const P=c.isPending;let A;e[37]!==r?(A=r("common.autoDomainJoinScreen.goHome"),e[37]=r,e[38]=A):A=e[38];let j;e[39]!==c.isPending||e[40]!==A?(j=n.jsx(F,{variant:"ghost",onClick:x,disabled:P,children:A}),e[39]=c.isPending,e[40]=A,e[41]=j):j=e[41];let f;e[42]!==T||e[43]!==j?(f=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[T,j]}),e[42]=T,e[43]=j,e[44]=f):f=e[44];let N;return e[45]!==b||e[46]!==f||e[47]!==g?(N=n.jsxs(me,{children:[g,b,f]}),e[45]=b,e[46]=f,e[47]=g,e[48]=N):N=e[48],N}function os(){window.location.href="/"}function wt(t){const e=R.c(25),{orgSlug:s,orgName:a,reason:o}=t,i=W(),r=is,u=o==="not-found",m=u?wn:Nt;let h;e[0]!==u||e[1]!==i?(h=i(u?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=u,e[1]=i,e[2]=h):h=e[2];const v=h;let c;e[3]!==u||e[4]!==a||e[5]!==s||e[6]!==i?(c=u?n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??s}),".",n.jsx("br",{}),i("common.noAccessScreen.askAdminToInvite")]}),e[3]=u,e[4]=a,e[5]=s,e[6]=i,e[7]=c):c=e[7];const x=c;let g;e[8]!==m?(g=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(m,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=m,e[9]=g):g=e[9];let y;e[10]!==v?(y=n.jsx("h3",{className:"text-lg font-medium",children:v}),e[10]=v,e[11]=y):y=e[11];let l;e[12]!==x?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[12]=x,e[13]=l):l=e[13];let d;e[14]!==y||e[15]!==l?(d=n.jsxs("div",{className:"space-y-2",children:[y,l]}),e[14]=y,e[15]=l,e[16]=d):d=e[16];let p;e[17]!==i?(p=i("common.noAccessScreen.goToHome"),e[17]=i,e[18]=p):p=e[18];let b;e[19]!==p?(b=n.jsx(F,{onClick:r,children:p}),e[19]=p,e[20]=b):b=e[20];let w;return e[21]!==g||e[22]!==d||e[23]!==b?(w=n.jsxs(me,{children:[g,d,b]}),e[21]=g,e[22]=d,e[23]=b,e[24]=w):w=e[24],w}function is(){window.location.href="/"}function as(t){const e=R.c(59),{invitationId:s,orgName:a,orgSlug:o,orgLogo:i}=t,r=W();let u;e[0]!==s?(u=async()=>{const O=await Ke.organization.acceptInvitation({invitationId:s});if(O.error)throw new Error(O.error.message);return O.data},e[0]=s,e[1]=u):u=e[1];let m;e[2]!==o?(m=()=>{Yt(),window.location.href=`/${o}`},e[2]=o,e[3]=m):m=e[3];let h;e[4]!==r?(h=O=>{Ve.error(O instanceof Error?O.message:r("common.pendingInviteScreen.failedToAccept"))},e[4]=r,e[5]=h):h=e[5];let v;e[6]!==u||e[7]!==m||e[8]!==h?(v={mutationFn:u,onSuccess:m,onError:h},e[6]=u,e[7]=m,e[8]=h,e[9]=v):v=e[9];const c=Ye(v);let x;e[10]!==s?(x=async()=>{const O=await Ke.organization.rejectInvitation({invitationId:s});if(O.error)throw new Error(O.error.message);return O.data},e[10]=s,e[11]=x):x=e[11];let g,y;e[12]!==r?(g=()=>{Ve.success(r("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},y=O=>{Ve.error(O instanceof Error?O.message:r("common.pendingInviteScreen.failedToDecline"))},e[12]=r,e[13]=g,e[14]=y):(g=e[13],y=e[14]);let l;e[15]!==x||e[16]!==g||e[17]!==y?(l={mutationFn:x,onSuccess:g,onError:y},e[15]=x,e[16]=g,e[17]=y,e[18]=l):l=e[18];const d=Ye(l),p=c.isPending||d.isPending;let b;e[19]!==i||e[20]!==a?(b=i?n.jsx(at,{url:i,fallback:a.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Sn,{className:"h-6 w-6 text-primary"})}),e[19]=i,e[20]=a,e[21]=b):b=e[21];let w;e[22]!==a||e[23]!==r?(w=r("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=r,e[24]=w):w=e[24];let S;e[25]!==w?(S=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[25]=w,e[26]=S):S=e[26];let T;e[27]!==r?(T=r("common.pendingInviteScreen.acceptDescription"),e[27]=r,e[28]=T):T=e[28];let P;e[29]!==T?(P=n.jsx("p",{className:"text-sm text-muted-foreground",children:T}),e[29]=T,e[30]=P):P=e[30];let A;e[31]!==S||e[32]!==P?(A=n.jsxs("div",{className:"space-y-2",children:[S,P]}),e[31]=S,e[32]=P,e[33]=A):A=e[33];let j;e[34]!==c?(j=()=>c.mutate(),e[34]=c,e[35]=j):j=e[35];let f;e[36]!==c.isPending||e[37]!==r?(f=c.isPending?r("common.pendingInviteScreen.acceptingButton"):r("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=r,e[38]=f):f=e[38];let N;e[39]!==p||e[40]!==j||e[41]!==f?(N=n.jsx(F,{onClick:j,disabled:p,children:f}),e[39]=p,e[40]=j,e[41]=f,e[42]=N):N=e[42];let k;e[43]!==d?(k=()=>d.mutate(),e[43]=d,e[44]=k):k=e[44];let _;e[45]!==d.isPending||e[46]!==r?(_=d.isPending?r("common.pendingInviteScreen.decliningButton"):r("common.pendingInviteScreen.declineButton"),e[45]=d.isPending,e[46]=r,e[47]=_):_=e[47];let E;e[48]!==p||e[49]!==k||e[50]!==_?(E=n.jsx(F,{variant:"ghost",onClick:k,disabled:p,children:_}),e[48]=p,e[49]=k,e[50]=_,e[51]=E):E=e[51];let C;e[52]!==N||e[53]!==E?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,E]}),e[52]=N,e[53]=E,e[54]=C):C=e[54];let I;return e[55]!==A||e[56]!==C||e[57]!==b?(I=n.jsxs(me,{children:[b,A,C]}),e[55]=A,e[56]=C,e[57]=b,e[58]=I):I=e[58],I}function rs(t){const e=R.c(23),{orgName:s,orgLogo:a}=t,o=W();let i;e[0]!==a||e[1]!==s?(i=a?n.jsx(at,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(vn,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=s,e[2]=i):i=e[2];let r;e[3]!==o?(r=o("common.requestPendingScreen.title"),e[3]=o,e[4]=r):r=e[4];let u;e[5]!==r?(u=n.jsx("h3",{className:"text-lg font-medium",children:r}),e[5]=r,e[6]=u):u=e[6];let m;e[7]!==s||e[8]!==o?(m=o("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=o,e[9]=m):m=e[9];let h;e[10]!==m?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[10]=m,e[11]=h):h=e[11];let v;e[12]!==u||e[13]!==h?(v=n.jsxs("div",{className:"space-y-2",children:[u,h]}),e[12]=u,e[13]=h,e[14]=v):v=e[14];let c;e[15]!==o?(c=o("common.requestPendingScreen.goHome"),e[15]=o,e[16]=c):c=e[16];let x;e[17]!==c?(x=n.jsx(F,{variant:"ghost",onClick:ls,children:c}),e[17]=c,e[18]=x):x=e[18];let g;return e[19]!==i||e[20]!==v||e[21]!==x?(g=n.jsxs(me,{children:[i,v,x]}),e[19]=i,e[20]=v,e[21]=x,e[22]=g):g=e[22],g}function ls(){window.location.href="/"}function cs(t){const e=R.c(45),{orgName:s,orgSlug:a,orgLogo:o,domain:i}=t,r=W();let u;e[0]!==a?(u=async()=>{const N=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),k=await N.json();if(!N.ok||!k.success)throw new Error(k.error??"Failed to request access");return k},e[0]=a,e[1]=u):u=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=us,e[2]=m):m=e[2];let h;e[3]!==r?(h=N=>{Ve.error(N instanceof Error?N.message:r("common.requestToJoinScreen.failedToRequest"))},e[3]=r,e[4]=h):h=e[4];let v;e[5]!==u||e[6]!==h?(v={mutationFn:u,onSuccess:m,onError:h},e[5]=u,e[6]=h,e[7]=v):v=e[7];const c=Ye(v);let x;e[8]!==o||e[9]!==s?(x=o?n.jsx(at,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ot,{className:"h-6 w-6 text-primary"})}),e[8]=o,e[9]=s,e[10]=x):x=e[10];let g;e[11]!==s||e[12]!==r?(g=r("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=r,e[13]=g):g=e[13];let y;e[14]!==g?(y=n.jsx("h3",{className:"text-lg font-medium",children:g}),e[14]=g,e[15]=y):y=e[15];let l;e[16]!==i||e[17]!==r?(l=r("common.requestToJoinScreen.description",{domain:i}),e[16]=i,e[17]=r,e[18]=l):l=e[18];let d;e[19]!==l?(d=n.jsx("p",{className:"text-sm text-muted-foreground",children:l}),e[19]=l,e[20]=d):d=e[20];let p;e[21]!==y||e[22]!==d?(p=n.jsxs("div",{className:"space-y-2",children:[y,d]}),e[21]=y,e[22]=d,e[23]=p):p=e[23];let b;e[24]!==c?(b=()=>c.mutate(),e[24]=c,e[25]=b):b=e[25];let w;e[26]!==c.isPending||e[27]!==r?(w=c.isPending?r("common.requestToJoinScreen.requesting"):r("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=r,e[28]=w):w=e[28];let S;e[29]!==c.isPending||e[30]!==b||e[31]!==w?(S=n.jsx(F,{onClick:b,disabled:c.isPending,children:w}),e[29]=c.isPending,e[30]=b,e[31]=w,e[32]=S):S=e[32];const T=c.isPending;let P;e[33]!==r?(P=r("common.requestToJoinScreen.goToHome"),e[33]=r,e[34]=P):P=e[34];let A;e[35]!==c.isPending||e[36]!==P?(A=n.jsx(F,{variant:"ghost",onClick:ds,disabled:T,children:P}),e[35]=c.isPending,e[36]=P,e[37]=A):A=e[37];let j;e[38]!==S||e[39]!==A?(j=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[S,A]}),e[38]=S,e[39]=A,e[40]=j):j=e[40];let f;return e[41]!==p||e[42]!==j||e[43]!==x?(f=n.jsxs(me,{children:[x,p,j]}),e[41]=p,e[42]=j,e[43]=x,e[44]=f):f=e[44],f}function ds(){window.location.href="/"}function us(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function ms(t){const e=R.c(7);let s;e[0]!==t?(s=Ue.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const i=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!i.ok)throw new Error(`org-access-status failed (${i.status})`);return await i.json()},e[2]=t,e[3]=a):a=e[3];let o;return e[4]!==s||e[5]!==a?(o={queryKey:s,queryFn:a,refetchOnWindowFocus:!1},e[4]=s,e[5]=a,e[6]=o):o=e[6],_t(o)}function fs({orgSlug:t}){const{data:e}=ms(t);if(e.status!=="member"){Qt()?.org===t&&Xt();const s=localStorage.getItem(Be.lastOrgSlug())===t;if(s&&localStorage.removeItem(Be.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(wt,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(as,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(ss,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(cs,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(rs,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(wt,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Mt(t){const e=R.c(42),{ariaLabel:s,dismissLabel:a,eyebrow:o,title:i,description:r,icon:u,children:m,footerLeading:h,actions:v,onDismiss:c,tone:x}=t,g=x===void 0?"neutral":x,y=h||v;let l;e[0]!==g?(l=g==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=g,e[1]=l):l=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Cn,{size:14}),e[2]=d):d=e[2];let p;e[3]!==a||e[4]!==c?(p=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:d}),e[3]=a,e[4]=c,e[5]=p):p=e[5];const b=u&&"flex items-start gap-3",w=m&&"pb-3";let S;e[6]!==b||e[7]!==w?(S=dt("p-4 pr-11",b,w),e[6]=b,e[7]=w,e[8]=S):S=e[8];let T;e[9]!==u?(T=u&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:u}),e[9]=u,e[10]=T):T=e[10];let P;e[11]!==o?(P=o&&n.jsx("p",{className:"text-xs text-muted-foreground",children:o}),e[11]=o,e[12]=P):P=e[12];let A;e[13]!==i?(A=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:i}),e[13]=i,e[14]=A):A=e[14];let j;e[15]!==r?(j=r&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:r}),e[15]=r,e[16]=j):j=e[16];let f;e[17]!==A||e[18]!==j||e[19]!==P?(f=n.jsxs("div",{children:[P,A,j]}),e[17]=A,e[18]=j,e[19]=P,e[20]=f):f=e[20];let N;e[21]!==m?(N=m&&n.jsx("div",{className:"mt-3",children:m}),e[21]=m,e[22]=N):N=e[22];let k;e[23]!==f||e[24]!==N?(k=n.jsxs("div",{className:"min-w-0 flex-1",children:[f,N]}),e[23]=f,e[24]=N,e[25]=k):k=e[25];let _;e[26]!==k||e[27]!==S||e[28]!==T?(_=n.jsxs("div",{className:S,children:[T,k]}),e[26]=k,e[27]=S,e[28]=T,e[29]=_):_=e[29];let E;e[30]!==v||e[31]!==h||e[32]!==y||e[33]!==g?(E=y&&n.jsxs("div",{className:dt("flex items-center justify-between gap-3 px-4 py-2.5",g==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:h}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:v})]}),e[30]=v,e[31]=h,e[32]=y,e[33]=g,e[34]=E):E=e[34];let C;return e[35]!==s||e[36]!==_||e[37]!==E||e[38]!==l||e[39]!==p||e[40]!==g?(C=n.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":g,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[l,p,_,E]}),e[35]=s,e[36]=_,e[37]=E,e[38]=l,e[39]=p,e[40]=g,e[41]=C):C=e[41],C}const hs={switcher:"tour-layout-switcher",nav:"tour-layout-nav",tasks:"tour-layout-tasks",projects:"tour-layout-projects",account:"tour-layout-account",recentActivity:"tour-layout-recent-activity",siteEditor:"tour-layout-site-editor",surfaceTabs:"tour-layout-surface-tabs",branchPicker:"tour-layout-branch-picker",automations:"tour-layout-automations",settings:"tour-layout-settings"};function Ft(t){return`[data-tour="${hs[t]}"]`}const gs=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function ps(t){return gs.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function ys(t,e){return ps(e).map(s=>({element:Ft(s.anchor),popover:{title:t(s.titleKey),description:t(s.descKey),side:s.side,align:"center"}}))}const bs=Ft("switcher"),xs=30;function zt(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function ws(t,e){return ys(t,e).filter(s=>typeof s.element=="string"&&zt(s.element))}function Ss(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(s,{driver:a})=>{if(s.footerButtons.querySelector(".layout-tour-skip"))return;const o=document.createElement("button");o.type="button",o.className="driver-popover-footer-btn layout-tour-skip",o.textContent=t("layoutTour.skip"),o.addEventListener("click",()=>a.destroy()),s.footerButtons.insertBefore(o,s.footerButtons.firstChild)},onDestroyed:()=>{Je=!1},steps:e}}let Je=!1;async function vs(){return(await Zt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function js(t,e){if(Je)return;Je=!0;let s=0;const a=()=>{if(!zt(bs)&&s++<xs){requestAnimationFrame(a);return}const o=ws(t,e);if(o.length===0){Je=!1;return}vs().then(i=>{i(Ss(t,o)).drive()}).catch(()=>{Je=!1})};a()}function ks(t){return t!=="off"}function li(t){if(!t.hasSource)return[];const e=["site-editor"];return ks(t.cmsMode)&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function qt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function ci(t){return t.reportsOnly&&!t.onReportAgent&&qt(t.tabId)}const Ts=[{id:"new-layout",date:"2026-09-22",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:ot,title:"Unified page headers",body:"Every page now has a clear header with navigation breadcrumbs and actions, making it easy to orient yourself and move around."},{icon:ct,title:"Consistent navigation and controls",body:"Settings and project pages use a predictable sidebar instead of scattered tabs. Buttons, inputs and toolbars share one shape and one height, and the layout adapts to smaller screens."},{icon:jn,title:"Site editor redesigned",body:"Try the redesigned blocks editor from Profile & Preferences. Blocks share consistent actions, variants appear beside their block in the header, and section selection is searchable."}],cta:{label:"Take a tour",action:"start-tour"}},{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:pt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:te,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:ot,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"native-app-linux-beta",date:"2026-08-20",eyebrow:"Now Available",title:"Studio for Linux is now in beta",bullets:[{icon:ot,title:"Native Linux desktop app",body:"Studio now ships as an AppImage for 64-bit x86 Linux, bringing the local desktop workflow to Linux."},{icon:ae,title:"Verified, no-root install",body:"The installer verifies the download, installs Studio to ~/.local/bin, and adds it to your application launcher without sudo."},{icon:re,title:"Beta today, broader support next",body:"We're validating more distributions and desktop environments. Arm builds are not available yet, and your feedback will shape general availability."}],cta:{label:"Install Studio",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases/tag/native-v4.242.0"},{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:re,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:te,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:en,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:ot,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:te,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:ae,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:re,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:te,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:ae,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:re,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:ae,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:te,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:re,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:te,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:ae,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:re,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:te,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:ae,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:re,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:te,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ct,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:ae,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:pt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:re,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:ae,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:te,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ct,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:te,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:kn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],Bt=Ts,it="studio.release-feed.v1",mt=new Set;let de="",ue={},ft=!1;function Ns(){if(ft)return de||"{}";try{return localStorage.getItem(it)??"{}"}catch{return de||"{}"}}function Kt(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function St(){const t=Ns();return t!==de&&(de=t,ue=Kt(t)),ue}function _s(t){mt.add(t);const e=s=>{if(!(s.key!==it&&s.key!==null)){try{const a=localStorage.getItem(it)??"{}",i={...Kt(a),...ue};ue=i,de=JSON.stringify(i)}catch{}t()}};return window.addEventListener("storage",e),()=>{mt.delete(t),window.removeEventListener("storage",e)}}function As(t){ue=t,de=JSON.stringify(t);try{localStorage.setItem(it,de),ft=!1}catch{ft=!0}mt.forEach(e=>e())}function Ps(){const t=R.c(7),e=G.useSyncExternalStore(_s,St,St);let s;t[0]!==e?(s=m=>!!e[m],t[0]=e,t[1]=s):s=t[1];const a=s,o=Cs;let i;t[2]!==e?(i=Bt.reduce((m,h)=>e[h.id]?m:m+1,0),t[2]=e,t[3]=i):i=t[3];const r=i;let u;return t[4]!==a||t[5]!==r?(u={isSeen:a,markSeen:o,unseenCount:r},t[4]=a,t[5]=r,t[6]=u):u=t[6],u}function Cs(t){ue[t]||As({...ue,[t]:{seenAt:new Date().toISOString()}})}const vt=new Map;function Ht(t){let e=vt.get(t);return e||(e={now:Date.now(),subscribers:new Set,intervalId:null},vt.set(t,e)),e}function Es(t,e){const s=Ht(t);return s.subscribers.add(e),s.intervalId===null&&(s.intervalId=setInterval(()=>{s.now=Date.now();for(const a of s.subscribers)a()},t)),()=>{s.subscribers.delete(e),s.subscribers.size===0&&s.intervalId!==null&&(clearInterval(s.intervalId),s.intervalId=null)}}function Os(t){const e=R.c(4),s=t===void 0?6e4:t;let a;e[0]!==s?(a=()=>Ht(s).now,e[0]=s,e[1]=a):a=e[1];const o=a;let i;return e[2]!==s?(i=r=>Es(s,r),e[2]=s,e[3]=i):i=e[3],G.useSyncExternalStore(i,o,o)}const Is=720*60*60*1e3,Ls=10080*60*1e3;function $s(t){const[e,s,a]=t.split("-").map(Number);return!e||!s||!a?new Date(t).getTime():new Date(e,s-1,a).getTime()}function Ds(t){const e=Bt[0];if(!e)return null;const s=$s(e.date),a=t-s;return a<0||a>Is?null:e}function Rs(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Ms(t,e){const s=Rs(t);return s===null?!1:e-s>=Ls}function Fs(){const t=R.c(53),e=W(),s=On(),a=tn(),o=It(),i=!!s,r=a===ie.home&&!s;let u;t[0]!==o||t[1]!==i?(u=i&&!!o&&qt(o),t[0]=o,t[1]=i,t[2]=u):u=t[2];const m=u,{data:h}=Ke.useSession(),{isSeen:v,markSeen:c}=Ps(),[x,g]=G.useState(!1),y=Os(6e4);let l,d,p;if(t[3]!==v||t[4]!==y||t[5]!==h?.user?.createdAt){p=Symbol.for("react.early_return_sentinel");e:{if(l=Ds(y),!l){p=null;break e}if(!Ms(h?.user?.createdAt,y)){p=null;break e}d=v(l.id)}t[3]=v,t[4]=y,t[5]=h?.user?.createdAt,t[6]=l,t[7]=d,t[8]=p}else l=t[6],d=t[7],p=t[8];if(p!==Symbol.for("react.early_return_sentinel"))return p;if(d)return null;let b;t[9]!==l.id||t[10]!==i||t[11]!==c||t[12]!==r||t[13]!==m||t[14]!==e?(b=()=>{c(l.id),js(e,{onOrgHome:r,inProject:i,onSiteEditor:m})},t[9]=l.id,t[10]=i,t[11]=c,t[12]=r,t[13]=m,t[14]=e,t[15]=b):b=t[15];const w=b;let S;t[16]!==e?(S=e("announcements.release.ariaLabel"),t[16]=e,t[17]=S):S=t[17];let T;t[18]!==e?(T=e("announcements.release.dismiss"),t[18]=e,t[19]=T):T=t[19];const P=l.eyebrow,A=l.title;let j;t[20]!==l.id||t[21]!==c?(j=()=>c(l.id),t[20]=l.id,t[21]=c,t[22]=j):j=t[22];let f;t[23]!==l.id||t[24]!==l.learnMoreHref||t[25]!==c||t[26]!==e?(f=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>c(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[23]=l.id,t[24]=l.learnMoreHref,t[25]=c,t[26]=e,t[27]=f):f=t[27];let N;t[28]!==l.cta||t[29]!==l.id||t[30]!==c||t[31]!==w?(N=l.cta?"href"in l.cta?n.jsx(F,{asChild:!0,size:"sm",onClick:()=>c(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):l.cta.action==="start-tour"?n.jsx(F,{size:"sm",onClick:w,children:l.cta.label}):n.jsx(F,{size:"sm",onClick:()=>g(!0),children:l.cta.label}):null,t[28]=l.cta,t[29]=l.id,t[30]=c,t[31]=w,t[32]=N):N=t[32];let k;t[33]!==l.bullets?(k=l.bullets.map(zs),t[33]=l.bullets,t[34]=k):k=t[34];let _;t[35]!==k?(_=n.jsx("ul",{className:"flex flex-col gap-3",children:k}),t[35]=k,t[36]=_):_=t[36];let E;t[37]!==l.id||t[38]!==c?(E=O=>{g(O),O||c(l.id)},t[37]=l.id,t[38]=c,t[39]=E):E=t[39];let C;t[40]!==x||t[41]!==E?(C=n.jsx(En,{open:x,onOpenChange:E}),t[40]=x,t[41]=E,t[42]=C):C=t[42];let I;return t[43]!==l.eyebrow||t[44]!==l.title||t[45]!==N||t[46]!==_||t[47]!==C||t[48]!==S||t[49]!==T||t[50]!==j||t[51]!==f?(I=n.jsxs(Mt,{ariaLabel:S,dismissLabel:T,eyebrow:P,title:A,onDismiss:j,footerLeading:f,actions:N,children:[_,C]}),t[43]=l.eyebrow,t[44]=l.title,t[45]=N,t[46]=_,t[47]=C,t[48]=S,t[49]=T,t[50]=j,t[51]=f,t[52]=I):I=t[52],I}function zs(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const Ut=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),ce=Ut?"⌘":"Ctrl",V={commandPalette:{keys:[ce,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[ce,"["],description:"Back to previous"},focusChatInput:{keys:[ce,"L"],description:"Focus chat input"},saveAndFormat:{keys:[ce,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[ce,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[ce,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",ce,"S"],description:"New task"},toggleDaemon:{keys:[ce,"D"],description:"Toggle daemon logs"}},qs=[{label:"General",shortcuts:[V.commandPalette,V.keyboardShortcuts,V.back,V.newTask,V.toggleDaemon]},{label:"Editor",shortcuts:[V.saveAndFormat]},{label:"Chat",shortcuts:[V.focusChatInput,V.togglePlanMode,V.sendMessage,V.newLine]},{label:"Questions",shortcuts:[V.selectOption]},{label:"Monitoring",shortcuts:[V.applyFilter]}];function jt(t){return Ut?t.metaKey:t.ctrlKey}function Bs(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function Ks(t){const e=R.c(11),{open:s,onOpenChange:a}=t,o=W();let i;e[0]!==o?(i=o("common.keyboardShortcutsDialog.title"),e[0]=o,e[1]=i):i=e[1];let r;e[2]!==i?(r=n.jsx(Lt,{children:n.jsx($t,{children:i})}),e[2]=i,e[3]=r):r=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex flex-col gap-4",children:qs.map(Hs)}),e[4]=u):u=e[4];let m;e[5]!==r?(m=n.jsxs(Dt,{className:"sm:max-w-md",children:[r,u]}),e[5]=r,e[6]=m):m=e[6];let h;return e[7]!==a||e[8]!==s||e[9]!==m?(h=n.jsx(Rt,{open:s,onOpenChange:a,children:m}),e[7]=a,e[8]=s,e[9]=m,e[10]=h):h=e[10],h}function Hs(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Us)})]},t.label)}function Us(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Gs)})]},t.description)}function Gs(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const kt=8;function Js(t){const{org:e}=ht(),s=Un({connectionId:Pt,orgId:e.id,orgSlug:e.slug}),{data:a}=He({queryKey:Ue.globalSearch(e.id,t,kt),enabled:!!s&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!s)return[];try{return(await s.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:kt}})).structuredContent?.items??[]}catch{return[]}}});return a??[]}function Vs(t){const e=R.c(195),{open:s,onOpenChange:a}=t,o=W(),i=At(),{org:r}=ht(),{projects:u,hasProjects:m}=In(),[h,v]=G.useState(""),c=G.useDeferredValue(h),x=Js(c);let g;e[0]!==a?(g=()=>{a(!1),v("")},e[0]=a,e[1]=g):g=e[1];const y=g;let l;e[2]!==y?(l=(z,Y)=>{ut("command_palette_used",{kind:Y}),z(),y()},e[2]=y,e[3]=l):l=e[3];const d=l;let p;e[4]!==i||e[5]!==r.id||e[6]!==r.slug?(p=z=>{if(z.type==="connection"){if(!z.slug){i({to:"/$org/settings/connections",params:{org:r.slug},search:{tab:"all"}});return}i({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:z.slug}});return}if(z.type==="task"){i({to:ie.tasks,params:{org:r.slug,taskKey:z.key??void 0}});return}const Y=Ct(r.id).id;nn(i,sn({org:r.slug,agentId:z.virtual_mcp_id??Y,superAgentId:Y}),{search:()=>({thread:z.id}),replace:!1})},e[4]=i,e[5]=r.id,e[6]=r.slug,e[7]=p):p=e[7];const b=p;let w;e[8]!==h?(w=[h],e[8]=h,e[9]=w):w=e[9];const S=w;let T,P,A,j,f,N,k,_,E,C,I,O,M;if(e[10]!==y||e[11]!==d||e[12]!==m||e[13]!==x||e[14]!==i||e[15]!==a||e[16]!==s||e[17]!==b||e[18]!==r.slug||e[19]!==u||e[20]!==S||e[21]!==o||e[22]!==h){const z=x.filter(Ys),Y=x.filter(Ws);let ne;e[36]!==r.slug?(ne={org:r.slug},e[36]=r.slug,e[37]=ne):ne=e[37];const D=ne;let ee;e[38]!==o?(ee=o("sidebar.navDestinations.home"),e[38]=o,e[39]=ee):ee=e[39];let Q;e[40]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(Nn,{"aria-hidden":"true"}),e[40]=Q):Q=e[40];let K;e[41]!==D||e[42]!==ee?(K={key:"home",label:ee,icon:Q,to:ie.home,params:D},e[41]=D,e[42]=ee,e[43]=K):K=e[43];let X;e[44]!==o?(X=o("sidebar.navDestinations.reports"),e[44]=o,e[45]=X):X=e[45];let se;e[46]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(_n,{"aria-hidden":"true"}),e[46]=se):se=e[46];let H;e[47]!==D||e[48]!==X?(H={key:"reports",label:X,icon:se,to:ie.reports,params:D},e[47]=D,e[48]=X,e[49]=H):H=e[49];let U;e[50]!==o?(U=o("sidebar.navDestinations.tasks"),e[50]=o,e[51]=U):U=e[51];let oe;e[52]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(bt,{"aria-hidden":"true"}),e[52]=oe):oe=e[52];let Z;e[53]!==r.slug?(Z={org:r.slug,taskKey:void 0},e[53]=r.slug,e[54]=Z):Z=e[54];let L;e[55]!==U||e[56]!==Z?(L={key:"tasks",label:U,icon:oe,to:ie.tasks,params:Z},e[55]=U,e[56]=Z,e[57]=L):L=e[57];let q;e[58]!==o?(q=o("sidebar.navDestinations.library"),e[58]=o,e[59]=q):q=e[59];let Qe;e[60]===Symbol.for("react.memo_cache_sentinel")?(Qe=n.jsx(Rn,{"aria-hidden":"true"}),e[60]=Qe):Qe=e[60];let fe;e[61]!==D||e[62]!==q?(fe={key:"library",label:q,icon:Qe,to:ie.library,params:D},e[61]=D,e[62]=q,e[63]=fe):fe=e[63];let he;e[64]!==o?(he=o("sidebar.navDestinations.discover"),e[64]=o,e[65]=he):he=e[65];let Xe;e[66]===Symbol.for("react.memo_cache_sentinel")?(Xe=n.jsx(An,{"aria-hidden":"true"}),e[66]=Xe):Xe=e[66];let ge;e[67]!==D||e[68]!==he?(ge={key:"discover",label:he,icon:Xe,to:ie.discover,params:D},e[67]=D,e[68]=he,e[69]=ge):ge=e[69];let Ze;e[70]!==K||e[71]!==H||e[72]!==L||e[73]!==fe||e[74]!==ge?(Ze=[K,H,L,fe,ge],e[70]=K,e[71]=H,e[72]=L,e[73]=fe,e[74]=ge,e[75]=Ze):Ze=e[75];const rt=Ze;P=Fn,j=s,e[76]!==y||e[77]!==a?(f=$=>$?a(!0):y(),e[76]=y,e[77]=a,e[78]=f):f=e[78],e[79]!==o?(N=o("commandPalette.title"),e[79]=o,e[80]=N):N=e[80],e[81]!==o?(k=o("commandPalette.description"),e[81]=o,e[82]=k):k=e[82];let pe;e[83]!==o?(pe=o("commandPalette.placeholder"),e[83]=o,e[84]=pe):pe=e[84];let ye;e[85]!==o?(ye=o("commandPalette.placeholder"),e[85]=o,e[86]=ye):ye=e[86],e[87]!==pe||e[88]!==ye||e[89]!==h?(_=n.jsx(zn,{placeholder:pe,"aria-label":ye,value:h,onValueChange:v}),e[87]=pe,e[88]=ye,e[89]=h,e[90]=_):_=e[90],T=qn;let be;e[91]!==o?(be=o("commandPalette.empty"),e[91]=o,e[92]=be):be=e[92],e[93]!==be?(E=n.jsx(Bn,{children:be}),e[93]=be,e[94]=E):E=e[94];let xe;e[95]!==o?(xe=o("commandPalette.goTo"),e[95]=o,e[96]=xe):xe=e[96];let we;e[97]!==rt||e[98]!==d||e[99]!==i?(we=rt.map($=>n.jsxs(le,{onSelect:()=>d(()=>i({to:$.to,params:$.params}),"destination"),children:[$.icon,n.jsx("span",{children:$.label})]},$.key)),e[97]=rt,e[98]=d,e[99]=i,e[100]=we):we=e[100],e[101]!==xe||e[102]!==we?(C=n.jsx(Ge,{heading:xe,children:we}),e[101]=xe,e[102]=we,e[103]=C):C=e[103],e[104]!==d||e[105]!==m||e[106]!==i||e[107]!==r.slug||e[108]!==u||e[109]!==o?(I=m&&n.jsx(Ge,{heading:o("commandPalette.projects"),children:u.map($=>n.jsxs(le,{value:`project ${$.title}`,onSelect:()=>d(()=>i({to:ie.projects,params:{org:r.slug,agentId:$.id}}),"project"),children:[n.jsx(Hn,{icon:$.icon,name:$.title,"aria-hidden":"true"}),n.jsx("span",{children:$.title})]},$.id))}),e[104]=d,e[105]=m,e[106]=i,e[107]=r.slug,e[108]=u,e[109]=o,e[110]=I):I=e[110];let Se;e[111]!==o?(Se=o("commandPalette.actions"),e[111]=o,e[112]=Se):Se=e[112];let ve;e[113]!==o?(ve=o("commandPalette.newProject"),e[113]=o,e[114]=ve):ve=e[114];let je;e[115]!==d||e[116]!==i||e[117]!==D?(je=()=>d(()=>i({to:ie.home,params:D}),"new_project"),e[115]=d,e[116]=i,e[117]=D,e[118]=je):je=e[118];let et;e[119]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(xt,{"aria-hidden":"true"}),e[119]=et):et=e[119];let ke;e[120]!==o?(ke=o("commandPalette.newProject"),e[120]=o,e[121]=ke):ke=e[121];let Te;e[122]!==ke?(Te=n.jsx("span",{children:ke}),e[122]=ke,e[123]=Te):Te=e[123];let Ne;e[124]!==ve||e[125]!==je||e[126]!==Te?(Ne=n.jsxs(le,{value:ve,onSelect:je,children:[et,Te]}),e[124]=ve,e[125]=je,e[126]=Te,e[127]=Ne):Ne=e[127];let _e;e[128]!==o?(_e=o("commandPalette.inviteTeammate"),e[128]=o,e[129]=_e):_e=e[129];let Ae;e[130]!==d||e[131]!==i||e[132]!==D?(Ae=()=>d(()=>i({to:"/$org/settings/members",params:D}),"invite"),e[130]=d,e[131]=i,e[132]=D,e[133]=Ae):Ae=e[133];let tt;e[134]===Symbol.for("react.memo_cache_sentinel")?(tt=n.jsx(Pn,{"aria-hidden":"true"}),e[134]=tt):tt=e[134];let Pe;e[135]!==o?(Pe=o("commandPalette.inviteTeammate"),e[135]=o,e[136]=Pe):Pe=e[136];let Ce;e[137]!==Pe?(Ce=n.jsx("span",{children:Pe}),e[137]=Pe,e[138]=Ce):Ce=e[138];let Ee;e[139]!==_e||e[140]!==Ae||e[141]!==Ce?(Ee=n.jsxs(le,{value:_e,onSelect:Ae,children:[tt,Ce]}),e[139]=_e,e[140]=Ae,e[141]=Ce,e[142]=Ee):Ee=e[142];let Oe;e[143]!==o?(Oe=o("commandPalette.addConnection"),e[143]=o,e[144]=Oe):Oe=e[144];let Ie;e[145]!==d||e[146]!==i||e[147]!==D?(Ie=()=>d(()=>i({to:"/$org/settings/connections",params:D,search:{tab:"all"}}),"add_connection"),e[145]=d,e[146]=i,e[147]=D,e[148]=Ie):Ie=e[148];let nt;e[149]===Symbol.for("react.memo_cache_sentinel")?(nt=n.jsx(xt,{"aria-hidden":"true"}),e[149]=nt):nt=e[149];let Le;e[150]!==o?(Le=o("commandPalette.addConnection"),e[150]=o,e[151]=Le):Le=e[151];let $e;e[152]!==Le?($e=n.jsx("span",{children:Le}),e[152]=Le,e[153]=$e):$e=e[153];let De;e[154]!==Oe||e[155]!==Ie||e[156]!==$e?(De=n.jsxs(le,{value:Oe,onSelect:Ie,children:[nt,$e]}),e[154]=Oe,e[155]=Ie,e[156]=$e,e[157]=De):De=e[157];let Re;e[158]!==o?(Re=o("commandPalette.settings"),e[158]=o,e[159]=Re):Re=e[159];let Me;e[160]!==d||e[161]!==i||e[162]!==D?(Me=()=>d(()=>i({to:"/$org/settings/general",params:D}),"settings"),e[160]=d,e[161]=i,e[162]=D,e[163]=Me):Me=e[163];let st;e[164]===Symbol.for("react.memo_cache_sentinel")?(st=n.jsx(Mn,{"aria-hidden":"true"}),e[164]=st):st=e[164];let Fe;e[165]!==o?(Fe=o("commandPalette.settings"),e[165]=o,e[166]=Fe):Fe=e[166];let ze;e[167]!==Fe?(ze=n.jsx("span",{children:Fe}),e[167]=Fe,e[168]=ze):ze=e[168];let qe;e[169]!==Re||e[170]!==Me||e[171]!==ze?(qe=n.jsxs(le,{value:Re,onSelect:Me,children:[st,ze]}),e[169]=Re,e[170]=Me,e[171]=ze,e[172]=qe):qe=e[172],e[173]!==Se||e[174]!==Ne||e[175]!==Ee||e[176]!==De||e[177]!==qe?(O=n.jsxs(Ge,{heading:Se,children:[Ne,Ee,De,qe]}),e[173]=Se,e[174]=Ne,e[175]=Ee,e[176]=De,e[177]=qe,e[178]=O):O=e[178],M=z.length>0&&n.jsx(Ge,{heading:o("commandPalette.connections"),children:z.map($=>n.jsxs(le,{value:`${$.title} ${$.id}`,keywords:S,onSelect:()=>d(()=>b($),"connection"),children:[n.jsx(Kn,{icon:$.icon,name:$.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title})]},`connection:${$.id}`))}),A=Y.length>0&&n.jsx(Ge,{heading:o("commandPalette.results"),children:Y.map($=>n.jsxs(le,{value:`${$.title} ${$.id}`,keywords:S,onSelect:()=>d(()=>b($),$.type),children:[$.type==="thread"?n.jsx(Tn,{"aria-hidden":"true"}):n.jsx(bt,{"aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title}),$.type==="task"&&$.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:$.key})]},`${$.type}:${$.id}`))}),e[10]=y,e[11]=d,e[12]=m,e[13]=x,e[14]=i,e[15]=a,e[16]=s,e[17]=b,e[18]=r.slug,e[19]=u,e[20]=S,e[21]=o,e[22]=h,e[23]=T,e[24]=P,e[25]=A,e[26]=j,e[27]=f,e[28]=N,e[29]=k,e[30]=_,e[31]=E,e[32]=C,e[33]=I,e[34]=O,e[35]=M}else T=e[23],P=e[24],A=e[25],j=e[26],f=e[27],N=e[28],k=e[29],_=e[30],E=e[31],C=e[32],I=e[33],O=e[34],M=e[35];let B;e[179]!==T||e[180]!==A||e[181]!==E||e[182]!==C||e[183]!==I||e[184]!==O||e[185]!==M?(B=n.jsxs(T,{children:[E,C,I,O,M,A]}),e[179]=T,e[180]=A,e[181]=E,e[182]=C,e[183]=I,e[184]=O,e[185]=M,e[186]=B):B=e[186];let J;return e[187]!==P||e[188]!==j||e[189]!==f||e[190]!==N||e[191]!==k||e[192]!==_||e[193]!==B?(J=n.jsxs(P,{open:j,onOpenChange:f,title:N,description:k,children:[_,B]}),e[187]=P,e[188]=j,e[189]=f,e[190]=N,e[191]=k,e[192]=_,e[193]=B,e[194]=J):J=e[194],J}function Ws(t){return t.type!=="connection"}function Ys(t){return t.type==="connection"}const We=new Jn(!1);function Qs(){We.set(!0)}function Xs(){We.set(!1)}function Zs(){const t=R.c(2),e=G.useSyncExternalStore(We.subscribe,We.get);let s;return t[0]!==e?(s=[e,We.set],t[0]=e,t[1]=s):s=t[1],s}const eo=300*1e3,to=2;function no(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function so(t,e){return t.count>=to&&t.version!==null&&t.version!==e}function oo(){const t=R.c(43),e=W(),s=Wn();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={mutationFn:ao},t[0]=a):a=t[0];const o=Ye(a);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={queryKey:Ue.appVersionCheck(),queryFn:io,refetchInterval:eo,refetchIntervalInBackground:!0,staleTime:0},t[1]=i):i=t[1];const{data:r,dataUpdatedAt:u}=He(i),[m,h]=G.useState(0);let v;t[2]===Symbol.for("react.memo_cache_sentinel")?(v={version:null,count:0},t[2]=v):v=t[2];const[c,x]=G.useState(v);u!==m&&(h(u),x(B=>no(B,r,"4.401.0")));const[g,y]=G.useState(null),l=s;let d;t[3]!==s||t[4]!==o?(d=()=>window.location.reload(),t[3]=s,t[4]=o,t[5]=d):d=t[5];const p=d,b="announcements.version.refresh";if(!so(c,g))return null;let w;t[6]!==e?(w=e("announcements.version.ariaLabel"),t[6]=e,t[7]=w):w=t[7];let S;t[8]!==e?(S=e("announcements.version.dismiss"),t[8]=e,t[9]=S):S=t[9];let T;t[10]!==e?(T=e("announcements.version.eyebrow"),t[10]=e,t[11]=T):T=t[11];let P;t[12]!==e?(P=e("announcements.version.title"),t[12]=e,t[13]=P):P=t[13];const A="announcements.version.description";let j;t[14]!==e||t[15]!==A?(j=e(A),t[14]=e,t[15]=A,t[16]=j):j=t[16];let f;t[17]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(yt,{size:16}),t[17]=f):f=t[17];let N;t[18]!==c.version?(N=()=>y(c.version),t[18]=c.version,t[19]=N):N=t[19];let k;t[20]!==e?(k=e("announcements.version.currentSession",{version:"4.401.0"}),t[20]=e,t[21]=k):k=t[21];let _;t[22]!==b||t[23]!==e?(_=e(b),t[22]=b,t[23]=e,t[24]=_):_=t[24];const E=l;let C;t[25]!==E?(C=dt(E),t[25]=E,t[26]=C):C=t[26];let I;t[27]!==C?(I=n.jsx(yt,{size:14,className:C}),t[27]=C,t[28]=I):I=t[28];let O;t[29]!==p||t[30]!==l||t[31]!==_||t[32]!==I?(O=n.jsxs(F,{size:"sm",disabled:l,onClick:p,children:[_,I]}),t[29]=p,t[30]=l,t[31]=_,t[32]=I,t[33]=O):O=t[33];let M;return t[34]!==N||t[35]!==k||t[36]!==O||t[37]!==w||t[38]!==S||t[39]!==T||t[40]!==P||t[41]!==j?(M=n.jsx(Mt,{ariaLabel:w,dismissLabel:S,eyebrow:T,title:P,description:j,icon:f,tone:"system",onDismiss:N,footerLeading:k,actions:O}),t[34]=N,t[35]=k,t[36]=O,t[37]=w,t[38]=S,t[39]=T,t[40]=P,t[41]=j,t[42]=M):M=t[42],M}async function io(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function ao(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function ro(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const lo=Date.parse("2026-07-21T00:00:00Z"),Tt=t=>ro(Be.ptBrAnnouncementSeen(t));function co(){const t=R.c(35),e=W(),[s,a]=on(),{data:o,isPending:i}=Ke.useSession(),r=o?.user,u=r?.id,m=r?.createdAt,h=m!=null&&new Date(m).getTime()<lo,v=an()==="pt-BR",c=!i&&!!u&&h&&v&&s.language==="en"&&!Tt(u).has(),[x,g]=G.useState(!1),[y,l]=G.useState(!1);!x&&!i&&(g(!0),c&&u&&(Tt(u).mark(),a(mo),l(!0),ut("pt_br_auto_switch_shown")));let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=J=>{ut("pt_br_auto_switch_closed",{action:J}),l(!1)},t[0]=d):d=t[0];const p=d;let b;t[1]!==a?(b=()=>{a(uo),p("switch-back")},t[1]=a,t[2]=b):b=t[2];const w=b;let S;t[3]===Symbol.for("react.memo_cache_sentinel")?(S=J=>!J&&p("dismiss"),t[3]=S):S=t[3];let T;t[4]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=T):T=t[4];let P;t[5]!==e?(P=e("announcements.ptBr.title"),t[5]=e,t[6]=P):P=t[6];let A;t[7]!==P?(A=n.jsx($t,{children:P}),t[7]=P,t[8]=A):A=t[8];let j;t[9]!==e?(j=e("announcements.ptBr.description"),t[9]=e,t[10]=j):j=t[10];let f;t[11]!==j?(f=n.jsx($n,{children:j}),t[11]=j,t[12]=f):f=t[12];let N;t[13]!==A||t[14]!==f?(N=n.jsxs(Lt,{children:[A,f]}),t[13]=A,t[14]=f,t[15]=N):N=t[15];let k;t[16]!==e?(k=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=k):k=t[17];let _;t[18]!==w||t[19]!==k?(_=n.jsx(F,{variant:"outline",onClick:w,children:k}),t[18]=w,t[19]=k,t[20]=_):_=t[20];let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E=()=>p("ok"),t[21]=E):E=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let I;t[24]!==C?(I=n.jsx(F,{onClick:E,children:C}),t[24]=C,t[25]=I):I=t[25];let O;t[26]!==_||t[27]!==I?(O=n.jsxs(Dn,{children:[_,I]}),t[26]=_,t[27]=I,t[28]=O):O=t[28];let M;t[29]!==O||t[30]!==N?(M=n.jsxs(Dt,{className:"sm:max-w-md",children:[T,N,O]}),t[29]=O,t[30]=N,t[31]=M):M=t[31];let B;return t[32]!==y||t[33]!==M?(B=n.jsx(Rt,{open:y,onOpenChange:S,children:M}),t[32]=y,t[33]=M,t[34]=B):B=t[34],B}function uo(t){return{...t,language:"en"}}function mo(t){return{...t,language:"pt-BR"}}function fo(t){const e=rn(t);return typeof e=="string"?e:void 0}function ho(){return fo("experiment-pipeline-check"),null}function go(t){const e=R.c(1),{activeOrg:s}=t;if(!s)return null;ln(s.id,{name:s.name??void 0,slug:s.slug??void 0}),cn();let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ho,{}),e[0]=a):a=e[0],a}function po(t){const{prev:e,virtualMcpId:s,decopilotId:a,savedLayout:o,opts:i,autosendValue:r}=t,u={mainpanel:void 0};s?u.virtualmcpid=s:e.virtualmcpid&&(u.virtualmcpid=e.virtualmcpid);const m=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,v=(s??m)!==m;let c,x;return i?.panel?x=i.panel:o?(x=o.tab,o.sidepanel!==void 0&&(c=o.sidepanel),o.mainpanel!==void 0&&(u.mainpanel=o.mainpanel)):!v&&e.tabId&&!dn(e.tabId)&&(x=e.tabId),c!==void 0&&(u.sidepanel=c),i?.autosend&&(u.autosend=r),{tabId:x,search:u}}const Gt="studio:thread-layout:v4",yo=50;function Jt(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function bo(t,e,s,a=yo){const o=t.filter(([i])=>i!==e);for(o.push([e,Jt(s)]);o.length>a;)o.shift();return o}function gt(){try{const t=sessionStorage.getItem(Gt);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="string"):[]}catch{return[]}}function Vt(t){try{sessionStorage.setItem(Gt,JSON.stringify(t))}catch{}}function xo(t,e){t&&Vt(bo(gt(),t,e))}function wo(t){if(!t)return null;const e=gt().find(([s])=>s===t);return e?Jt(e[1]):null}function di(t){if(!t)return;const e=gt(),s=e.filter(([a])=>a!==t);s.length!==e.length&&Vt(s)}function Wt(t){return{queryKey:Ue.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function ui(t){const e=R.c(10);let s;e[0]!==t?(s=Wt(t),e[0]=t,e[1]=s):s=e[1];const a=He(s);let o;e[2]!==a.data?.prompts?(o=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=o):o=e[3];let i;e[4]!==a.data?.tiles?(i=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=i):i=e[5];let r;return e[6]!==a.isLoading||e[7]!==o||e[8]!==i?(r={isLoading:a.isLoading,prompts:o,tiles:i},e[6]=a.isLoading,e[7]=o,e[8]=i,e[9]=r):r=e[9],r}function So(t){const e=R.c(31),{orgSlug:s,orgName:a,domain:o}=t,i=W();let r;e[0]!==s?(r=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=r):r=e[1];const u=r,m=vo;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Nt,{className:"h-6 w-6 text-primary"})}),e[2]=h):h=e[2];let v;e[3]!==i?(v=i("common.ssoRequiredScreen.title"),e[3]=i,e[4]=v):v=e[4];let c;e[5]!==v?(c=n.jsx("h3",{className:"text-lg font-medium",children:v}),e[5]=v,e[6]=c):c=e[6];let x;e[7]!==o||e[8]!==a||e[9]!==i?(x=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",i("common.ssoRequiredScreen.requiresSsoAuth"),o?` ${i("common.ssoRequiredScreen.via",{domain:o})}`:"","."]}):i("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=o,e[8]=a,e[9]=i,e[10]=x):x=e[10];let g;e[11]!==x?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[11]=x,e[12]=g):g=e[12];let y;e[13]!==c||e[14]!==g?(y=n.jsxs("div",{className:"space-y-2",children:[c,g]}),e[13]=c,e[14]=g,e[15]=y):y=e[15];let l;e[16]!==i?(l=i("common.ssoRequiredScreen.signInWithSso"),e[16]=i,e[17]=l):l=e[17];let d;e[18]!==u||e[19]!==l?(d=n.jsx(F,{onClick:u,children:l}),e[18]=u,e[19]=l,e[20]=d):d=e[20];let p;e[21]!==i?(p=i("common.ssoRequiredScreen.goBack"),e[21]=i,e[22]=p):p=e[22];let b;e[23]!==p?(b=n.jsx(F,{variant:"ghost",onClick:m,children:p}),e[23]=p,e[24]=b):b=e[24];let w;e[25]!==b||e[26]!==d?(w=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[d,b]}),e[25]=b,e[26]=d,e[27]=w):w=e[27];let S;return e[28]!==w||e[29]!==y?(S=n.jsxs(me,{children:[h,y,w]}),e[28]=w,e[29]=y,e[30]=S):S=e[30],S}function vo(){window.location.href="/"}function jo(t){const e=R.c(27),{notice:s,orgSlug:a}=t,o=W();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(un,{className:"h-6 w-6 text-destructive"})}),e[0]=i):i=e[0];let r;e[1]!==s.title?(r=n.jsx("h3",{className:"text-lg font-medium",children:s.title}),e[1]=s.title,e[2]=r):r=e[2];let u;e[3]!==s.message?(u=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:s.message}),e[3]=s.message,e[4]=u):u=e[4];let m;e[5]!==r||e[6]!==u?(m=n.jsxs("div",{className:"space-y-2",children:[r,u]}),e[5]=r,e[6]=u,e[7]=m):m=e[7];let h;e[8]!==s.ctaLabel||e[9]!==s.ctaUrl?(h=s.ctaUrl&&s.ctaLabel?n.jsx(F,{asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,e[8]=s.ctaLabel,e[9]=s.ctaUrl,e[10]=h):h=e[10];const v=`/${encodeURIComponent(a)}/settings/infra-billing`;let c;e[11]!==o?(c=o("common.blockedOrgScreen.goToBilling"),e[11]=o,e[12]=c):c=e[12];let x;e[13]!==v||e[14]!==c?(x=n.jsx(F,{variant:"outline",asChild:!0,children:n.jsx("a",{href:v,children:c})}),e[13]=v,e[14]=c,e[15]=x):x=e[15];let g;e[16]!==o?(g=o("common.blockedOrgScreen.switchOrg"),e[16]=o,e[17]=g):g=e[17];let y;e[18]!==g?(y=n.jsx(F,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:g})}),e[18]=g,e[19]=y):y=e[19];let l;e[20]!==y||e[21]!==h||e[22]!==x?(l=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,x,y]}),e[20]=y,e[21]=h,e[22]=x,e[23]=l):l=e[23];let d;return e[24]!==l||e[25]!==m?(d=n.jsxs(me,{children:[i,m,l]}),e[24]=l,e[25]=m,e[26]=d):d=e[26],d}function ko(t){const e=R.c(8);let s;e[0]!==t?(s=Ue.orgNotice(t??""),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/${t}/notice`,{credentials:"include"});return r.ok?(await r.json()).notice??null:null},e[2]=t,e[3]=a):a=e[3];const o=!!t;let i;return e[4]!==s||e[5]!==a||e[6]!==o?(i={queryKey:s,queryFn:a,enabled:o,staleTime:6e4},e[4]=s,e[5]=a,e[6]=o,e[7]=i):i=e[7],He(i)}const To="/settings/infra-billing";function No(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(To)}function _o(t){const e=R.c(7),{org:s,children:a}=t;let o;e[0]!==s.id||e[1]!==s.name?(o={id:s.id,organizationId:s.id,slug:"_org",name:s.name,ui:null},e[0]=s.id,e[1]=s.name,e[2]=o):o=e[2];const i=o;let r;return e[3]!==a||e[4]!==s||e[5]!==i?(r=n.jsx(xn,{org:s,project:i,children:a}),e[3]=a,e[4]=s,e[5]=i,e[6]=r):r=e[6],r}function Ao(){const t=At(),e=Vn(),{org:s}=ht(),a=mn({strict:!1}),o=It(),{openPanel:i,closePanel:r}=Ln(),u=Xn(),m=Zn(),h=es(),v=ts(),c=(l,d=!0)=>t({to:".",search:l,replace:d}),x=()=>c(l=>({...l,sidepanel:!0})),g=(l,d,p)=>{const b=!!m&&m===l;m&&!b&&xo(m,{tab:o,mainpanel:a.mainpanel,sidepanel:a.sidepanel});const w=b?null:wo(l),S=Ct(s.id).id,T=po({prev:{virtualmcpid:u,tabId:o},virtualMcpId:d,decopilotId:S,savedLayout:w,opts:p,autosendValue:Qn});return v(l,()=>T.search,{virtualMcpId:d,view:{tabId:T.tabId}})};return{openSidePanel:x,setTaskId:g,createNewTask:async(l,d,p)=>{const b=crypto.randomUUID(),w=l??h;try{await e?.create({id:b,virtual_mcp_id:w,...d?{branch:d}:{}})}catch{}g(b,w,p)},openTab:i,closeTab:r}}const Po=new Set(["/$org/","/$org/home"]);function Co(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:Eo},t[0]=e):e=t[0],Et(e)}function Eo(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&Po.has(e)}function Oo(){const t=R.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=fn(e)?.params.org,[o,i]=G.useState(!1),[r,u]=Zs(),m=hn(),h=Co(),v=a??"";let c;t[1]!==v?(c=Wt(v),t[1]=v,t[2]=c):c=t[2];const x=!!a&&h;let g;t[3]!==c||t[4]!==x?(g={...c,enabled:x},t[3]=c,t[4]=x,t[5]=g):g=t[5],He(g);const{data:y}=Ke.useSession(),l=y?.user?.id;let d;t[6]!==a||t[7]!==l?(d=a&&l?gn(l,a):null,t[6]=a,t[7]=l,t[8]=d):d=t[8];const p=d;let b,w;t[9]!==m?(b=()=>{const L=q=>{if(jt(q)&&q.code==="KeyK"){q.preventDefault(),Qs();return}if(q.key==="?"&&!Bs(q.target)){q.preventDefault(),i(!0);return}jt(q)&&q.code==="BracketLeft"&&m.history.canGoBack()&&(q.preventDefault(),m.history.back())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},w=[m],t[9]=m,t[10]=b,t[11]=w):(b=t[10],w=t[11]),G.useEffect(b,w);let S;t[12]!==a?(S=Ue.activeOrganization(a),t[12]=a,t[13]=S):S=t[13];let T;t[14]!==a||t[15]!==l?(T=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:L}=await Ke.organization.getFullOrganization({query:{organizationSlug:a}}).finally(Lo),q=lt(L);return L&&!q&&localStorage.setItem(Be.lastOrgSlug(),a),l&&L&&yn(l,a,L),L},t[14]=a,t[15]=l,t[16]=T):T=t[16];const P=p?p.data:void 0,A=p?.updatedAt;let j;t[17]!==P||t[18]!==A||t[19]!==S||t[20]!==T?(j={queryKey:S,queryFn:T,initialData:P,initialDataUpdatedAt:A,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=P,t[18]=A,t[19]=S,t[20]=T,t[21]=j):j=t[21];const{data:f}=_t(j),N=f?.id,k=f?.slug,{data:_}=ns(N,k),E=!!_?.ssoRequired&&!_.authenticated,{data:C}=ko(k);let I;t[22]===Symbol.for("react.memo_cache_sentinel")?(I={select:Io},t[22]=I):I=t[22];const O=Et(I),M=C?.severity==="block"&&!No(O),B=N??"",J=k??"";let z;t[23]!==B||t[24]!==J?(z=Gn({connectionId:Pt,orgId:B,orgSlug:J}),t[23]=B,t[24]=J,t[25]=z):z=t[25];const Y=!!N&&!!k;let ne;if(t[26]!==z||t[27]!==Y?(ne={...z,enabled:Y},t[26]=z,t[27]=Y,t[28]=ne):ne=t[28],He(ne),(!f||lt(f)||E||M)&&Xs(),!f){let L;return t[29]!==a?(L=n.jsx(fs,{orgSlug:a}),t[29]=a,t[30]=L):L=t[30],L}if(lt(f)){localStorage.getItem(Be.lastOrgSlug())===a&&localStorage.removeItem(Be.lastOrgSlug());let L;return t[31]!==f.name?(L=n.jsx(pn,{orgName:f.name}),t[31]=f.name,t[32]=L):L=t[32],L}if(M&&C){let L;return t[33]!==f.slug||t[34]!==C?(L=n.jsx(jo,{notice:C,orgSlug:f.slug}),t[33]=f.slug,t[34]=C,t[35]=L):L=t[35],L}if(E){let L;return t[36]!==f.id||t[37]!==f.name||t[38]!==f.slug||t[39]!==_.domain?(L=n.jsx(So,{orgId:f.id,orgSlug:f.slug,orgName:f.name,domain:_.domain}),t[36]=f.id,t[37]=f.name,t[38]=f.slug,t[39]=_.domain,t[40]=L):L=t[40],L}const ee=f.logo??null;let Q;t[41]!==f||t[42]!==ee?(Q={...f,logo:ee},t[41]=f,t[42]=ee,t[43]=Q):Q=t[43];let K;t[44]!==f?(K=n.jsx(go,{activeOrg:f}),t[44]=f,t[45]=K):K=t[45];let X;t[46]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(bn,{}),t[46]=X):X=t[46];let se;t[47]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(Fs,{}),n.jsx(oo,{})]}),t[47]=se):se=t[47];let H;t[48]!==r||t[49]!==u?(H=r&&n.jsx(Vs,{open:r,onOpenChange:u}),t[48]=r,t[49]=u,t[50]=H):H=t[50];let U;t[51]!==o?(U=n.jsx(Ks,{open:o,onOpenChange:i}),t[51]=o,t[52]=U):U=t[52];let oe;t[53]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(co,{}),t[53]=oe):oe=t[53];let Z;return t[54]!==Q||t[55]!==K||t[56]!==H||t[57]!==U?(Z=n.jsxs(_o,{org:Q,children:[K,X,se,H,U,oe]}),t[54]=Q,t[55]=K,t[56]=H,t[57]=U,t[58]=Z):Z=t[58],Z}function Io(t){return t.location.pathname}function Lo(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function $o(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Yn,{children:n.jsx(Oo,{})}),t[0]=e):e=t[0],e}const mi=Object.freeze(Object.defineProperty({__proto__:null,default:$o,usePanelActions:Ao},Symbol.toStringTag,{value:"Module"}));export{V as K,hs as L,Ao as a,Os as b,jt as c,ks as d,ui as e,di as f,mi as g,qt as i,Qs as o,li as r,ci as s,ko as u};
@@ -1 +1 @@
1
- import{c as E,j as s,r as K,aQ as u,l as M,B as T}from"./index-B-RfjkQs.js";import{b as R,D as _,d as Q,i as q}from"./dialog-fTIcTyHb.js";import{i as $}from"./X-C49OUFcX.js";import{i as A}from"./Zap-GTFewWZO.js";import{M as G}from"./markdown-CL_7eJfo.js";import{F as H}from"./file-preview-Cctwbzua.js";import{F as J}from"./file-type-icon-C--_TBMw.js";import{i as V,c as W,n as X}from"./use-org-fs-DxNvtETC.js";import{p as Y,b as c}from"./location-oTTXFrSF.js";import{p as Z}from"./skill-md-ChfVs4uF.js";function ee(n){const e=E.c(18),{skillPath:m,onClose:a,variant:t}=n,i=Y(m),{volume:r,dirPath:o}=i,P=V(),U=P(r??"",`${o}/SKILL.md`),d=W(U),D=X(r??"",o);let g;e[0]!==o?(g=c(o),e[0]=o,e[1]=g):g=e[1];const B=g;let j;e[2]!==d.data?(j=d.data?Z(d.data):null,e[2]=d.data,e[3]=j):j=e[3];const b=j,v=te;let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=(l,h)=>v(l.path)?-1:v(h.path)?1:c(l.path).localeCompare(c(h.path)),e[4]=N):N=e[4];const L=(D.data??[]).filter(se).sort(N),[z,I]=K.useState(null),x=z===null?null:L.find(l=>l.path===z)??null,k=b?.name??B;let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:s.jsx(A,{size:18})}),e[5]=w):w=e[5];let f;e[6]!==k||e[7]!==t?(f=t==="dialog"?s.jsx(Q,{className:"flex-1 truncate text-base font-medium text-foreground",children:k}):s.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:k}),e[6]=k,e[7]=t,e[8]=f):f=e[8];let p;e[9]!==a||e[10]!==t?(p=t==="dialog"?s.jsx(q,{asChild:!0,children:s.jsx(T,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:s.jsx($,{size:16})})}):s.jsx(T,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:a,children:s.jsx($,{size:16})}),e[9]=a,e[10]=t,e[11]=p):p=e[11];let y;e[12]!==f||e[13]!==p?(y=s.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[w,f,p]}),e[12]=f,e[13]=p,e[14]=y):y=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[15]=C):C=e[15];const O="relative flex min-w-0 flex-1 flex-col overflow-y-auto",F=x?s.jsx(H,{file:{key:x.path,filename:c(x.path),size:x.size,downloadUrl:P(r??"",x.path)}}):d.isPending?s.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[s.jsx(u,{className:"h-4 w-1/3"}),s.jsx(u,{className:"h-3 w-full"}),s.jsx(u,{className:"h-3 w-5/6"}),s.jsx(u,{className:"h-3 w-2/3"})]}):d.isError||!b?s.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),s.jsx("p",{className:"text-base text-muted-foreground",children:b.description??"Claude Code skill"})]}),s.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:s.jsx(G,{id:`skill-preview-${m}`,text:b.body})})]});let S;return e[16]!==F?(S=s.jsx("div",{className:O,children:F}),e[16]=F,e[17]=S):S=e[17],s.jsxs(s.Fragment,{children:[y,s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[C,D.isPending?s.jsx(u,{className:"mx-2 h-4 w-24"}):L.map(l=>{const h=v(l.path)?x===null:z===l.path;return s.jsxs("button",{type:"button",onClick:()=>I(v(l.path)?null:l.path),className:M("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",h?"bg-background shadow-sm":"hover:bg-muted/60"),children:[s.jsx(J,{filename:c(l.path),className:"h-6 w-5 shrink-0"}),s.jsx("span",{className:M("truncate text-sm",h?"text-foreground":"text-muted-foreground"),children:c(l.path)})]},l.path)})]}),S]})]})}function se(n){return n.kind==="file"}function te(n){return c(n)==="SKILL.md"}function fe(n){const e=E.c(8),{skillPath:m,onClose:a}=n;let t;e[0]!==a?(t=o=>{o||a()},e[0]=a,e[1]=t):t=e[1];let i;e[2]!==a||e[3]!==m?(i=s.jsx(R,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:s.jsx(ee,{skillPath:m,onClose:a,variant:"dialog"})}),e[2]=a,e[3]=m,e[4]=i):i=e[4];let r;return e[5]!==t||e[6]!==i?(r=s.jsx(_,{open:!0,onOpenChange:t,children:i}),e[5]=t,e[6]=i,e[7]=r):r=e[7],r}export{fe as S};
1
+ import{c as E,j as s,r as K,aP as u,l as M,B as T}from"./index-De5sr9zh.js";import{b as R,D as _,d as q,i as A}from"./dialog-CEiE0rPQ.js";import{i as $}from"./X-CEngH8b7.js";import{i as G}from"./Zap-DkS3ccHw.js";import{M as H}from"./markdown-UaZeehfy.js";import{F as J}from"./file-preview-i5I4Vmk2.js";import{F as Q}from"./file-type-icon-Cv10yXI0.js";import{i as V,c as W,l as X}from"./use-org-fs-3jzMRDSK.js";import{p as Y,b as c}from"./location-oTTXFrSF.js";import{p as Z}from"./skill-md-ChfVs4uF.js";function ee(n){const e=E.c(18),{skillPath:m,onClose:a,variant:t}=n,i=Y(m),{volume:r,dirPath:o}=i,F=V(),U=F(r??"",`${o}/SKILL.md`),d=W(U),D=X(r??"",o);let g;e[0]!==o?(g=c(o),e[0]=o,e[1]=g):g=e[1];const B=g;let j;e[2]!==d.data?(j=d.data?Z(d.data):null,e[2]=d.data,e[3]=j):j=e[3];const b=j,v=te;let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=(l,h)=>v(l.path)?-1:v(h.path)?1:c(l.path).localeCompare(c(h.path)),e[4]=N):N=e[4];const L=(D.data??[]).filter(se).sort(N),[P,I]=K.useState(null),x=P===null?null:L.find(l=>l.path===P)??null,k=b?.name??B;let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:s.jsx(G,{size:18})}),e[5]=w):w=e[5];let f;e[6]!==k||e[7]!==t?(f=t==="dialog"?s.jsx(q,{className:"flex-1 truncate text-base font-medium text-foreground",children:k}):s.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:k}),e[6]=k,e[7]=t,e[8]=f):f=e[8];let p;e[9]!==a||e[10]!==t?(p=t==="dialog"?s.jsx(A,{asChild:!0,children:s.jsx(T,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:s.jsx($,{size:16})})}):s.jsx(T,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:a,children:s.jsx($,{size:16})}),e[9]=a,e[10]=t,e[11]=p):p=e[11];let y;e[12]!==f||e[13]!==p?(y=s.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[w,f,p]}),e[12]=f,e[13]=p,e[14]=y):y=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[15]=C):C=e[15];const O="relative flex min-w-0 flex-1 flex-col overflow-y-auto",z=x?s.jsx(J,{file:{key:x.path,filename:c(x.path),size:x.size,downloadUrl:F(r??"",x.path)}}):d.isPending?s.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[s.jsx(u,{className:"h-4 w-1/3"}),s.jsx(u,{className:"h-3 w-full"}),s.jsx(u,{className:"h-3 w-5/6"}),s.jsx(u,{className:"h-3 w-2/3"})]}):d.isError||!b?s.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),s.jsx("p",{className:"text-base text-muted-foreground",children:b.description??"Claude Code skill"})]}),s.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:s.jsx(H,{id:`skill-preview-${m}`,text:b.body})})]});let S;return e[16]!==z?(S=s.jsx("div",{className:O,children:z}),e[16]=z,e[17]=S):S=e[17],s.jsxs(s.Fragment,{children:[y,s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[C,D.isPending?s.jsx(u,{className:"mx-2 h-4 w-24"}):L.map(l=>{const h=v(l.path)?x===null:P===l.path;return s.jsxs("button",{type:"button",onClick:()=>I(v(l.path)?null:l.path),className:M("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",h?"bg-background shadow-sm":"hover:bg-muted/60"),children:[s.jsx(Q,{filename:c(l.path),className:"h-6 w-5 shrink-0"}),s.jsx("span",{className:M("truncate text-sm",h?"text-foreground":"text-muted-foreground"),children:c(l.path)})]},l.path)})]}),S]})]})}function se(n){return n.kind==="file"}function te(n){return c(n)==="SKILL.md"}function fe(n){const e=E.c(8),{skillPath:m,onClose:a}=n;let t;e[0]!==a?(t=o=>{o||a()},e[0]=a,e[1]=t):t=e[1];let i;e[2]!==a||e[3]!==m?(i=s.jsx(R,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:s.jsx(ee,{skillPath:m,onClose:a,variant:"dialog"})}),e[2]=a,e[3]=m,e[4]=i):i=e[4];let r;return e[5]!==t||e[6]!==i?(r=s.jsx(_,{open:!0,onOpenChange:t,children:i}),e[5]=t,e[6]=i,e[7]=r):r=e[7],r}export{fe as S};
@@ -0,0 +1 @@
1
+ import{b as ee,X as te,o as oe,r as T,j as t,B as Q,n as L,aP as ae,Y as ce,t as w,ag as me,c as se,l as de,I as ue,F as pe,H as ge,G as fe,K as q,eK as he}from"./index-De5sr9zh.js";import{i as xe}from"./DotsVertical-R1tuLE9v.js";import{a as je}from"./ZoomOut-D3wne5dx.js";import{s as ke}from"./Trash01-D4CwdSy9.js";import{i as ve}from"./Upload01-hQyKBWZL.js";import{i as ie}from"./Zap-DkS3ccHw.js";import{S as ye}from"./search-input-DRWRYRPs.js";import{f as Se,e as be,b as we,A as Ce,a as De,d as Ne,c as Pe,g as Ee}from"./alert-dialog-DpzgB-Ls.js";import{E as Y}from"./empty-state-BJxP56xq.js";import{C as Ae}from"./collection-tabs-DCLfzEOA.js";import{F as Te}from"./folder-icon-DJuQAXN-.js";import{p as Me,h as Ie,q as Oe}from"./use-org-fs-3jzMRDSK.js";import{H as J,d as ze}from"./location-oTTXFrSF.js";import{S as Fe}from"./skill-preview-BjeMKh94.js";import{p as $e}from"./skill-md-ChfVs4uF.js";import"./SearchMd-B_MXZ22A.js";import"./badge-4kURMy-V.js";import"./Eye-BhTmzCKr.js";import"./dialog-CEiE0rPQ.js";import"./X-CEngH8b7.js";import"./markdown-UaZeehfy.js";import"./Check-C-Vn17o5.js";import"./Copy01-B2GuMU9Q.js";import"./org-file-open-context-Mx8jC4-P.js";import"./use-mobile-DVMuGaln.js";import"./use-panel-navigate-CjSWJCy4.js";import"./thread-route-B3__WRb1.js";import"./use-project-scope-CJnr8HCi.js";import"./use-virtual-mcp-BKP1YfD8.js";import"./use-mcp-client-CkjkRUta.js";import"./auth-Dafjkfpj.js";import"./github-repo-BknN0SVI.js";import"./file-preview-i5I4Vmk2.js";import"./utils-VRidfAJX.js";import"./Image01-D02_x5mu.js";import"./editor-BGAJHie_.js";import"./file-type-icon-Cv10yXI0.js";const V=200,Re=new Set(["node_modules","__pycache__"]);function G(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function Le(s){return G(s).split("/").every(e=>!e.startsWith(".")&&!Re.has(e))}function _e(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Ke(s,e){const l=new Map;for(const r of s){const c=G(r).split("/");c.pop();const a=["skills",e,...c].join("/");l.set(a,[...l.get(a)??[],r])}return l}async function Be(s,e){const r=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(r)throw r.reason}function He(s,e){const l=$e(e),r=`skills/${s}`;return{id:`home/${r}`,name:l.name??s,description:l.description,source:"home",volume:J,path:r,sandboxPath:`org/${J}/${r}`}}const _="*";function K(s){return s.volume==="home"}function le(s,e){const l=s.indexOf(":");return l===-1?{label:e,glyph:ie}:{label:s.slice(l+1),glyph:s.startsWith("repo:")?me:je}}function qe(s){const e=se.c(48),{entry:l,pending:r,onOpen:c,onDelete:a}=s,o=ee(),{org:g}=te();let C;e[0]!==l.source||e[1]!==g.name?(C=le(l.source,g.name),e[0]=l.source,e[1]=g.name,e[2]=C):C=e[2];const{label:M,glyph:O}=C;let D;e[3]!==l?(D=K(l),e[3]=l,e[4]=D):D=e[4];const z=D,N=r?"opacity-60":"hover:bg-muted/50";let f;e[5]!==N?(f=de("relative transition-colors group overflow-hidden flex flex-col h-full",N),e[5]=N,e[6]=f):f=e[6];let m;e[7]!==l.name||e[8]!==c||e[9]!==r?(m=!r&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":l.name}),e[7]=l.name,e[8]=c,e[9]=r,e[10]=m):m=e[10];const P=z?"default":"system",F=!z;let h;e[11]!==O||e[12]!==P||e[13]!==F?(h=t.jsx(Te,{glyph:O,tone:P,readOnly:F,className:"size-8 shrink-0"}),e[11]=O,e[12]=P,e[13]=F,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==o?(x=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ue,{children:[t.jsx(pe,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:t.jsx(xe,{size:16})})}),t.jsx(ge,{align:"end",children:t.jsxs(fe,{variant:"destructive",onClick:B=>{B.stopPropagation(),a()},children:[t.jsx(ke,{size:16}),o("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=o,e[17]=x):x=e[17];let j;e[18]!==h||e[19]!==x?(j=t.jsxs("div",{className:"flex items-start justify-between",children:[h,x]}),e[18]=h,e[19]=x,e[20]=j):j=e[20];let b;e[21]!==l.name?(b=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.name}),e[21]=l.name,e[22]=b):b=e[22];let k;e[23]!==l.description||e[24]!==o?(k=l.description||o("settings.skills.noDescription"),e[23]=l.description,e[24]=o,e[25]=k):k=e[25];let d;e[26]!==k?(d=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:k}),e[26]=k,e[27]=d):d=e[27];let v;e[28]!==b||e[29]!==d?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[b,d]}),e[28]=b,e[29]=d,e[30]=v):v=e[30];let u;e[31]!==j||e[32]!==v?(u=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[j,v]}),e[31]=j,e[32]=v,e[33]=u):u=e[33];let y;e[34]!==M||e[35]!==r||e[36]!==o?(y=r?o("settings.skills.importing"):M,e[34]=M,e[35]=r,e[36]=o,e[37]=y):y=e[37];let p;e[38]!==y?(p=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y})})}),e[38]=y,e[39]=p):p=e[39];let S;e[40]!==u||e[41]!==p?(S=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[u,p]}),e[40]=u,e[41]=p,e[42]=S):S=e[42];let I;return e[43]!==r||e[44]!==S||e[45]!==f||e[46]!==m?(I=t.jsxs(he,{"aria-busy":r,className:f,children:[m,S]}),e[43]=r,e[44]=S,e[45]=f,e[46]=m,e[47]=I):I=e[47],I}function Z(s){const e=se.c(2),{children:l}=s;let r;return e[0]!==l?(r=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:l}),e[0]=l,e[1]=r):r=e[1],r}function Pt(){const s=ee(),{org:e}=te(),l=Me(),{remove:r,upload:c}=Ie("home"),a=oe(),o=T.useRef(null),[g,C]=T.useState(""),[M,O]=T.useState(_),[D,z]=T.useState(!1),[N,f]=T.useState(null),[m,P]=T.useState(null),[F,h]=T.useState(null),x=()=>{a.invalidateQueries({queryKey:q.slashSkills(e.id)}),a.invalidateQueries({queryKey:q.orgFsSkills(e.id)})},j=i=>a.setQueryData(q.slashSkills(e.id),n=>i(n??[]));async function b(i){const n=[...i??[]];if(o.current&&(o.current.value=""),n.length===0)return;const E=n[0]?.webkitRelativePath??"";if(!E){w.error(s("settings.skills.importNeedsFolder"));return}const H=E.split("/")[0]??"",R=n.filter(Le),U=R.find(A=>G(A)==="SKILL.md");if(!U){w.error(s("settings.skills.importMissingSkillMd"));return}if(R.length>V){w.error(s("settings.skills.importTooManyFiles",{count:String(R.length),max:String(V)}));return}const $=_e(H),W=`skills/${$}`;let X=!1;z(!0);try{if(await Oe(e.slug,"home",W)){w.error(s("settings.skills.importSlugTaken",{slug:$}));return}X=!0;const A=He($,await U.text());j(ne=>[A,...ne]),h(A.id),await Be(Ke(R,$),c.mutateAsync),w.success(s("settings.skills.importSuccess",{name:$}))}catch(A){X&&await r.mutateAsync(W).catch(()=>{}),w.error(A instanceof Error?A.message:s("settings.skills.importError"))}finally{h(null),x(),z(!1)}}const k=g.toLowerCase(),d=(l.data??[]).filter(i=>i.name.toLowerCase().includes(k)||(i.description??"").toLowerCase().includes(k)).sort((i,n)=>Number(K(n))-Number(K(i))||i.name.localeCompare(n.name)),v=new Set((l.data??[]).map(i=>i.source)),u=new Map;for(const i of d)u.set(i.source,(u.get(i.source)??0)+1);const y=[{id:_,label:s("settings.skills.filterAll"),count:d.length},...[...v].map(i=>({id:i,label:le(i,e.name).label,count:u.get(i)??0}))],p=v.has(M)?M:_,S=p===_?d:d.filter(i=>i.source===p),I=i=>f(ze(i.volume,i.path)),B=async()=>{if(!m)return;const{id:i,path:n}=m;P(null),j(E=>E.filter(H=>H.id!==i));try{await r.mutateAsync(n),w.success(s("settings.skills.deleteSuccess"))}catch(E){w.error(E instanceof Error?E.message:s("settings.skills.deleteError"))}finally{x()}},re=t.jsxs(Q,{size:"sm",disabled:D,onClick:()=>o.current?.click(),children:[t.jsx(ve,{size:14}),s(D?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(L,{children:[t.jsx(L.Content,{children:t.jsx(L.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(L.Title,{actions:re,children:s("settings.skills.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx(ye,{value:g,onChange:C,placeholder:s("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:i=>{i.key==="Escape"&&(C(""),i.target.blur())}}),t.jsx("input",{ref:o,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:i=>{b(i.target.files)}})]}),y.length>2&&t.jsx(Ae,{placement:"page",tabs:y,activeTab:p,onTabChange:O}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(Z,{children:Array.from({length:8},(i,n)=>t.jsx(ae,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ce,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:s("settings.skills.errorDescription"),actions:t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:s("settings.skills.retry")})})}):S.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ie,{size:48,className:"text-muted-foreground"}),title:s(g?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:g?s("settings.skills.noResultsDescription",{search:g}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(Z,{children:S.map(i=>{const n=i.id===F;return t.jsx(qe,{entry:i,pending:n,onOpen:()=>I(i),onDelete:K(i)&&!n?()=>P(i):void 0},i.id)})})})]})})}),N&&t.jsx(Fe,{skillPath:N,onClose:()=>f(null)},N),t.jsx(Se,{open:m!==null,onOpenChange:i=>!i&&P(null),children:t.jsxs(be,{children:[t.jsxs(we,{children:[t.jsx(Ce,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(De,{children:s("settings.skills.deleteDialogDescription",{name:m?.name??""})})]}),t.jsxs(Ne,{children:[t.jsx(Pe,{children:s("settings.skills.cancel")}),t.jsx(Ee,{onClick:B,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.skills.deleteButton")})]})]})})]})}export{Pt as default};
@@ -1 +1 @@
1
- import{b as B,Y as L,r as v,j as e,n as x,e_ as k,dX as E,dY as y,dZ as a,fx as D,B as u,q as C,t as c,c as z}from"./index-B-RfjkQs.js";import{D as T}from"./domain-settings-BoCWiWyd.js";import{f as O,e as R,b as q,A as F,d as M,c as U,g as Y}from"./alert-dialog-p_yxBHYu.js";import{I as d}from"./input-DgwTyBrI.js";import{S as $}from"./switch-C_Vj5_E0.js";import{a as H,b as X,c as Z,d as G}from"./use-org-sso-D0y0H-Wd.js";import{s as J}from"./Trash01-yjy5Djos.js";import{R as K}from"./require-capability-BlL45yDc.js";import"./badge-DO3CQ_LV.js";import"./select-lkzYgXdD.js";import"./index-DNOKSPYL.js";import"./Check-Cxn5ODoZ.js";import"./ChevronUp-B3Rmv2Rm.js";import"./access-gate-BWJ5-fyg.js";import"./capability-load-error-nzBIi4Tr.js";function Q(){const s=B(),{org:o}=L(),{data:f,isLoading:I}=H(o.id,o.slug),h=X(o.id,o.slug),S=Z(o.id,o.slug),b=G(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,p]=v.useState(!1),[P,j]=v.useState(!1),m=f?.configured&&f.config,n=f?.config,_=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),p(!0)},N=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),p(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await S.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),p(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Container,{children:e.jsxs(k,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(T,{}),I?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx($,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(J,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:_,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:N,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(O,{open:P,onOpenChange:j,children:e.jsxs(R,{children:[e.jsx(q,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(M,{children:[e.jsx(U,{disabled:S.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx(Y,{onClick:w,disabled:S.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function ue(){const s=z.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(K,{capability:"org:manage",area:"security",children:e.jsx(Q,{})}),s[0]=o):o=s[0],o}export{ue as default};
1
+ import{b as B,X as L,r as v,j as e,n as x,f5 as k,dW as E,dX as y,dY as a,fw as D,B as u,q as C,t as c,c as z}from"./index-De5sr9zh.js";import{D as T}from"./domain-settings-D1tynvCC.js";import{f as O,e as R,b as q,A as F,d as M,c as U,g as X}from"./alert-dialog-DpzgB-Ls.js";import{I as d}from"./input-B-DIEGoS.js";import{S as $}from"./switch-CSgTLkLq.js";import{a as H,b as W,c as Y,d as G}from"./use-org-sso-Bb_2_N0Z.js";import{s as J}from"./Trash01-D4CwdSy9.js";import{R as K}from"./require-capability-Cab5QyjH.js";import"./badge-4kURMy-V.js";import"./select-BZ6sktb7.js";import"./index-DVgj8U7g.js";import"./Check-C-Vn17o5.js";import"./ChevronUp-Dto8qCq2.js";import"./access-gate-D2mi3EXZ.js";import"./capability-load-error-CaE4aliY.js";function Q(){const s=B(),{org:o}=L(),{data:f,isLoading:I}=H(o.id,o.slug),h=W(o.id,o.slug),S=Y(o.id,o.slug),b=G(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,p]=v.useState(!1),[P,j]=v.useState(!1),m=f?.configured&&f.config,n=f?.config,w=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),p(!0)},N=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),p(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},_=async()=>{try{await S.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),p(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Container,{children:e.jsxs(k,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(T,{}),I?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx($,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(J,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:w,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:N,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(O,{open:P,onOpenChange:j,children:e.jsxs(R,{children:[e.jsx(q,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(M,{children:[e.jsx(U,{disabled:S.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx(X,{onClick:_,disabled:S.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function ue(){const s=z.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(K,{capability:"org:manage",area:"security",children:e.jsx(Q,{})}),s[0]=o):o=s[0],o}export{ue as default};
@@ -1,2 +1,2 @@
1
- import{o as Ye,j as Ge,h as ie,D as ze,p as Qe,q as Ze}from"./index-B4lO5kiB.js";import{r as p,et as Je,eu as we,ev as et,ew as j,ex as te,j as I,aP as tt,ey as nt,ez as ne,eA as ot,eB as rt,eC as st,eD as it,eE as at,eF as lt,eG as Ce,eH as ct,c as H,D as ut,K as dt,eI as ft,eJ as gt,eK as mt,b as pt,l as vt,h as ht}from"./index-B-RfjkQs.js";import{g as bt,d as xt}from"./gateway-client-B7EtyAUZ.js";import{A as yt}from"./agent-icon-B4H17A-3.js";var Hn=Ye;var Et=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ae=Et.join(","),Ie=typeof Element>"u",z=Ie?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,J=!Ie&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n?.ownerDocument},ee=function(e,t){var o;t===void 0&&(t=!0);var r=e==null||(o=e.getAttribute)===null||o===void 0?void 0:o.call(e,"inert"),s=r===""||r==="true",i=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):ee(e.parentNode));return i},Rt=function(e){var t,o=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return o===""||o==="true"},St=function(e,t,o){if(ee(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ae));return t&&z.call(e,ae)&&r.unshift(e),r=r.filter(o),r},le=function(e,t,o){for(var r=[],s=Array.from(e);s.length;){var i=s.shift();if(!ee(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=le(l,!0,o);o.flatten?r.push.apply(r,c):r.push({scopeParent:i,candidates:c})}else{var d=z.call(i,ae);d&&o.filter(i)&&(t||!e.includes(i))&&r.push(i);var u=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),g=!ee(u,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(u&&g){var h=le(u===!0?i.children:u.children,!0,o);o.flatten?r.push.apply(r,h):r.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return r},Te=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Pe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Rt(e))&&!Te(e)?0:e.tabIndex},wt=function(e,t){var o=Pe(e);return o<0&&t&&!Te(e)?0:o},Ct=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ae=function(e){return e.tagName==="INPUT"},It=function(e){return Ae(e)&&e.type==="hidden"},Tt=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return t},Pt=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]},At=function(e){if(!e.name)return!0;var t=e.form||J(e),o=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(e.name));else try{r=o(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Pt(r,e.form);return!s||s===e},Nt=function(e){return Ae(e)&&e.type==="radio"},Dt=function(e){return Nt(e)&&!At(e)},Mt=function(e){var t,o=e&&J(e),r=(t=o)===null||t===void 0?void 0:t.host,s=!1;if(o&&o!==e){var i,a,l;for(s=!!((i=r)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&r;){var c,d,u;o=J(r),r=(c=o)===null||c===void 0?void 0:c.host,s=!!((d=r)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(r))}}return s},ge=function(e){var t=e.getBoundingClientRect(),o=t.width,r=t.height;return o===0&&r===0},Ot=function(e,t){var o=t.displayCheck,r=t.getShadowRoot;if(o==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var i=z.call(e,"details>summary:first-of-type"),a=i?e.parentElement:e;if(z.call(a,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var l=e;e;){var c=e.parentElement,d=J(e);if(c&&!c.shadowRoot&&r(c)===!0)return ge(e);e.assignedSlot?e=e.assignedSlot:!c&&d!==e.ownerDocument?e=d.host:e=c}e=l}if(Mt(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return ge(e);return!1},Ft=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var o=0;o<t.children.length;o++){var r=t.children.item(o);if(r.tagName==="LEGEND")return z.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},qt=function(e,t){return!(t.disabled||It(t)||Ot(t,e)||Tt(t)||Ft(t))},me=function(e,t){return!(Dt(t)||Pe(t)<0||!qt(e,t))},$t=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Ne=function(e){var t=[],o=[];return e.forEach(function(r,s){var i=!!r.scopeParent,a=i?r.scopeParent:r,l=wt(a,i),c=i?Ne(r.candidates):a;l===0?i?t.push.apply(t,c):t.push(a):o.push({documentOrder:s,tabIndex:l,item:r,isScope:i,content:c})}),o.sort(Ct).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(t)},De=function(e,t){t=t||{};var o;return t.getShadowRoot?o=le([e],t.includeContainer,{filter:me.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:$t}):o=St(e,t.includeContainer,me.bind(null,t)),Ne(o)};function kt(){return/apple/i.test(navigator.vendor)}const pe="data-floating-ui-focusable";function _t(n){let e=n.activeElement;for(;((t=e)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;e=e.shadowRoot.activeElement}return e}function ce(n,e){if(!n||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(n.contains(e))return!0;if(t&&Je(t)){let o=e;for(;o;){if(n===o)return!0;o=o.parentNode||o.host}}return!1}function G(n){return"composedPath"in n?n.composedPath()[0]:n.target}function oe(n,e){if(e==null)return!1;if("composedPath"in n)return n.composedPath().includes(e);const t=n;return t.target!=null&&e.contains(t.target)}function Lt(n){return n.matches("html,body")}function Q(n){return n?.ownerDocument||document}function jt(n){return n?n.hasAttribute(pe)?n:n.querySelector("["+pe+"]")||n:null}function Z(n,e,t){return t===void 0&&(t=!0),n.filter(r=>{var s;return r.parentId===e&&(!t||((s=r.context)==null?void 0:s.open))}).flatMap(r=>[r,...Z(n,r.id,t)])}function Kt(n){return"nativeEvent"in n}var Bt=typeof document<"u",Ut=function(){},V=Bt?p.useLayoutEffect:Ut;const Vt={...we},Wt=Vt.useInsertionEffect,Ht=Wt||(n=>n());function W(n){const e=p.useRef(()=>{});return Ht(()=>{e.current=n}),p.useCallback(function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return e.current==null?void 0:e.current(...o)},[])}const Me=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oe(n,e){const t=De(n,Me()),o=t.length;if(o===0)return;const r=_t(Q(n)),s=t.indexOf(r),i=s===-1?e===1?0:o-1:s+e;return t[i]}function Xt(n){return Oe(Q(n).body,1)||n}function Yt(n){return Oe(Q(n).body,-1)||n}function re(n,e){const t=e||n.currentTarget,o=n.relatedTarget;return!o||!ce(t,o)}function Gt(n){De(n,Me()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function ve(n){n.querySelectorAll("[data-tabindex]").forEach(t=>{const o=t.dataset.tabindex;delete t.dataset.tabindex,o?t.setAttribute("tabindex",o):t.removeAttribute("tabindex")})}const zt="data-floating-ui-focusable",he="active",be="selected",Qt={...we};let xe=!1,Zt=0;const ye=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Zt++;function Jt(){const[n,e]=p.useState(()=>xe?ye():void 0);return V(()=>{n==null&&e(ye())},[]),p.useEffect(()=>{xe=!0},[]),n}const en=Qt.useId,ue=en||Jt;function tn(){const n=new Map;return{emit(e,t){var o;(o=n.get(e))==null||o.forEach(r=>r(t))},on(e,t){n.has(e)||n.set(e,new Set),n.get(e).add(t)},off(e,t){var o;(o=n.get(e))==null||o.delete(t)}}}const nn=p.createContext(null),on=p.createContext(null),Fe=()=>{var n;return((n=p.useContext(nn))==null?void 0:n.id)||null},qe=()=>p.useContext(on);function de(n){return"data-floating-ui-"+n}const rn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ee=p.forwardRef(function(e,t){const[o,r]=p.useState();V(()=>{kt()&&r("button")},[]);const s={ref:t,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[de("focus-guard")]:"",style:rn};return I.jsx("span",{...e,...s})}),sn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$e=p.createContext(null),Re=de("portal");function an(n){n===void 0&&(n={});const{id:e,root:t}=n,o=ue(),r=cn(),[s,i]=p.useState(null),a=p.useRef(null);return V(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),V(()=>{if(!o||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=o,c.setAttribute(Re,""),l.appendChild(c),a.current=c,i(c)},[e,o]),V(()=>{if(t===null||!o||a.current)return;let l=t||r?.portalNode;l&&!it(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=o,d.setAttribute(Re,""),l=c||l,l.appendChild(d),a.current=d,i(d)},[e,t,o,r]),s}function ln(n){const{children:e,id:t,root:o,preserveTabOrder:r=!0}=n,s=an({id:t,root:o}),[i,a]=p.useState(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),g=i?.modal,h=i?.open,y=!!i&&!i.modal&&i.open&&r&&!!(o||s);return p.useEffect(()=>{if(!s||!r||g)return;function m(f){s&&re(f)&&(f.type==="focusin"?ve:Gt)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,r,g]),p.useEffect(()=>{s&&(h||ve(s))},[h,s]),I.jsxs($e.Provider,{value:p.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:s,setFocusManagerState:a}),[r,s]),children:[y&&s&&I.jsx(Ee,{"data-type":"outside",ref:l,onFocus:m=>{if(re(m,s)){var f;(f=d.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Yt(x);b?.focus()}}}),y&&s&&I.jsx("span",{"aria-owns":s.id,style:sn}),s&&tt.createPortal(e,s),y&&s&&I.jsx(Ee,{"data-type":"outside",ref:c,onFocus:m=>{if(re(m,s)){var f;(f=u.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Xt(x);b?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const cn=()=>p.useContext($e),un={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},dn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Se=n=>{var e,t;return{escapeKey:typeof n=="boolean"?n:(e=n?.escapeKey)!=null?e:!1,outsidePress:typeof n=="boolean"?n:(t=n?.outsidePress)!=null?t:!0}};function fn(n,e){e===void 0&&(e={});const{open:t,onOpenChange:o,elements:r,dataRef:s}=n,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:g=!1,bubbles:h,capture:y}=e,m=qe(),f=W(typeof l=="function"?l:()=>!1),x=typeof l=="function"?f:l,b=p.useRef(!1),{escapeKey:E,outsidePress:v}=Se(h),{escapeKey:D,outsidePress:C}=Se(y),O=p.useRef(!1),A=W(R=>{var S;if(!t||!i||!a||R.key!=="Escape"||O.current)return;const P=(S=s.current.floatingContext)==null?void 0:S.nodeId,M=m?Z(m.nodesRef.current,P):[];if(!E&&(R.stopPropagation(),M.length>0)){let w=!0;if(M.forEach(N=>{var q;if((q=N.context)!=null&&q.open&&!N.context.dataRef.current.__escapeKeyBubbles){w=!1;return}}),!w)return}o(!1,Kt(R)?R.nativeEvent:R,"escape-key")}),F=W(R=>{var S;const P=()=>{var M;A(R),(M=G(R))==null||M.removeEventListener("keydown",P)};(S=G(R))==null||S.addEventListener("keydown",P)}),T=W(R=>{var S;const P=s.current.insideReactTree;s.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||P||typeof x=="function"&&!x(R))return;const w=G(R),N="["+de("inert")+"]",q=Q(r.floating).querySelectorAll(N);let L=j(w)?w:null;for(;L&&!ne(L);){const k=ot(L);if(ne(k)||!j(k))break;L=k}if(q.length&&j(w)&&!Lt(w)&&!ce(w,r.floating)&&Array.from(q).every(k=>!ce(L,k)))return;if(rt(w)&&K){const k=ne(w),B=st(w),Y=/auto|scroll/,Ke=k||Y.test(B.overflowX),Be=k||Y.test(B.overflowY),Ue=Ke&&w.clientWidth>0&&w.scrollWidth>w.clientWidth,Ve=Be&&w.clientHeight>0&&w.scrollHeight>w.clientHeight,We=B.direction==="rtl",He=Ve&&(We?R.offsetX<=w.offsetWidth-w.clientWidth:R.offsetX>w.clientWidth),Xe=Ue&&R.offsetY>w.clientHeight;if(He||Xe)return}const U=(S=s.current.floatingContext)==null?void 0:S.nodeId,X=m&&Z(m.nodesRef.current,U).some(k=>{var B;return oe(R,(B=k.context)==null?void 0:B.elements.floating)});if(oe(R,r.floating)||oe(R,r.domReference)||X)return;const fe=m?Z(m.nodesRef.current,U):[];if(fe.length>0){let k=!0;if(fe.forEach(B=>{var Y;if((Y=B.context)!=null&&Y.open&&!B.context.dataRef.current.__outsidePressBubbles){k=!1;return}}),!k)return}o(!1,R,"outside-press")}),$=W(R=>{var S;const P=()=>{var M;T(R),(M=G(R))==null||M.removeEventListener(c,P)};(S=G(R))==null||S.addEventListener(c,P)});p.useEffect(()=>{if(!t||!i)return;s.current.__escapeKeyBubbles=E,s.current.__outsidePressBubbles=v;let R=-1;function S(q){o(!1,q,"ancestor-scroll")}function P(){window.clearTimeout(R),O.current=!0}function M(){R=window.setTimeout(()=>{O.current=!1},nt()?5:0)}const w=Q(r.floating);a&&(w.addEventListener("keydown",D?F:A,D),w.addEventListener("compositionstart",P),w.addEventListener("compositionend",M)),x&&w.addEventListener(c,C?$:T,C);let N=[];return g&&(j(r.domReference)&&(N=te(r.domReference)),j(r.floating)&&(N=N.concat(te(r.floating))),!j(r.reference)&&r.reference&&r.reference.contextElement&&(N=N.concat(te(r.reference.contextElement)))),N=N.filter(q=>{var L;return q!==((L=w.defaultView)==null?void 0:L.visualViewport)}),N.forEach(q=>{q.addEventListener("scroll",S,{passive:!0})}),()=>{a&&(w.removeEventListener("keydown",D?F:A,D),w.removeEventListener("compositionstart",P),w.removeEventListener("compositionend",M)),x&&w.removeEventListener(c,C?$:T,C),N.forEach(q=>{q.removeEventListener("scroll",S)}),window.clearTimeout(R)}},[s,r,a,x,c,t,o,g,i,E,v,A,D,F,T,C,$]),p.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const _=p.useMemo(()=>({onKeyDown:A,...d&&{[un[u]]:R=>{o(!1,R.nativeEvent,"reference-press")},...u!=="click"&&{onClick(R){o(!1,R.nativeEvent,"reference-press")}}}}),[A,o,d,u]),K=p.useMemo(()=>{function R(S){S.button===0&&(b.current=!0)}return{onKeyDown:A,onMouseDown:R,onMouseUp:R,[dn[c]]:()=>{s.current.insideReactTree=!0}}},[A,c,s]);return p.useMemo(()=>i?{reference:_,floating:K}:{},[i,_,K])}function gn(n){const{open:e=!1,onOpenChange:t,elements:o}=n,r=ue(),s=p.useRef({}),[i]=p.useState(()=>tn()),a=Fe()!=null,[l,c]=p.useState(o.reference),d=W((h,y,m)=>{s.current.openEvent=h?y:void 0,i.emit("openchange",{open:h,event:y,reason:m,nested:a}),t?.(h,y,m)}),u=p.useMemo(()=>({setPositionReference:c}),[]),g=p.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return p.useMemo(()=>({dataRef:s,open:e,onOpenChange:d,elements:g,events:i,floatingId:r,refs:u}),[e,d,g,i,r,u])}function mn(n){n===void 0&&(n={});const{nodeId:e}=n,t=gn({...n,elements:{reference:null,floating:null,...n.elements}}),o=n.rootContext||t,r=o.elements,[s,i]=p.useState(null),[a,l]=p.useState(null),d=r?.domReference||s,u=p.useRef(null),g=qe();V(()=>{d&&(u.current=d)},[d]);const h=et({...n,elements:{...r,...a&&{reference:a}}}),y=p.useCallback(E=>{const v=j(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;l(v),h.refs.setReference(v)},[h.refs]),m=p.useCallback(E=>{(j(E)||E===null)&&(u.current=E,i(E)),(j(h.refs.reference.current)||h.refs.reference.current===null||E!==null&&!j(E))&&h.refs.setReference(E)},[h.refs]),f=p.useMemo(()=>({...h.refs,setReference:m,setPositionReference:y,domReference:u}),[h.refs,m,y]),x=p.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),b=p.useMemo(()=>({...h,...o,refs:f,elements:x,nodeId:e}),[h,f,x,e,o]);return V(()=>{o.dataRef.current.floatingContext=b;const E=g?.nodesRef.current.find(v=>v.id===e);E&&(E.context=b)}),p.useMemo(()=>({...h,context:b,refs:f,elements:x}),[h,f,x,b])}function se(n,e,t){const o=new Map,r=t==="item";let s=n;if(r&&n){const{[he]:i,[be]:a,...l}=n;s=l}return{...t==="floating"&&{tabIndex:-1,[zt]:""},...s,...e.map(i=>{const a=i?i[t]:null;return typeof a=="function"?n?a(n):null:a}).concat(n).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(r&&[he,be].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof d=="function"){var u;(u=o.get(c))==null||u.push(d),i[c]=function(){for(var g,h=arguments.length,y=new Array(h),m=0;m<h;m++)y[m]=arguments[m];return(g=o.get(c))==null?void 0:g.map(f=>f(...y)).find(f=>f!==void 0)}}}else i[c]=d}),i),{})}}function pn(n){n===void 0&&(n=[]);const e=n.map(a=>a?.reference),t=n.map(a=>a?.floating),o=n.map(a=>a?.item),r=p.useCallback(a=>se(a,n,"reference"),e),s=p.useCallback(a=>se(a,n,"floating"),t),i=p.useCallback(a=>se(a,n,"item"),o);return p.useMemo(()=>({getReferenceProps:r,getFloatingProps:s,getItemProps:i}),[r,s,i])}const vn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function hn(n,e){var t,o;e===void 0&&(e={});const{open:r,elements:s,floatingId:i}=n,{enabled:a=!0,role:l="dialog"}=e,c=ue(),d=((t=s.domReference)==null?void 0:t.id)||c,u=p.useMemo(()=>{var b;return((b=jt(s.floating))==null?void 0:b.id)||i},[s.floating,i]),g=(o=vn.get(l))!=null?o:l,y=Fe()!=null,m=p.useMemo(()=>g==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:r?u:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":r?u:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:d},...g==="menu"&&y&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[g,u,y,r,d,l]),f=p.useMemo(()=>{const b={id:u,...g&&{role:g}};return g==="tooltip"||l==="label"?b:{...b,...g==="menu"&&{"aria-labelledby":d}}},[g,u,d,l]),x=p.useCallback(b=>{let{active:E,selected:v}=b;const D={role:"option",...E&&{id:u+"-fui-option"}};switch(l){case"select":case"combobox":return{...D,"aria-selected":v}}return{}},[u,l]);return p.useMemo(()=>a?{reference:m,floating:f,item:x}:{},[a,m,f,x])}function bn(n){var e;const{char:t,allowSpaces:o,allowToIncludeChar:r,allowedPrefixes:s,startOfLine:i,$position:a}=n,l=o&&!r,c=Ze(t),d=new RegExp(`\\s${c}$`),u=i?"^":"",g=r?"":c,h=l?new RegExp(`${u}${c}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${u}(?:^)?${c}[^\\s${g}]*`,"gm"),y=((e=a.nodeBefore)===null||e===void 0?void 0:e.isText)&&a.nodeBefore.text;if(!y)return null;const m=a.pos-y.length,f=Array.from(y.matchAll(h)).pop();if(!f||f.input===void 0||f.index===void 0)return null;const x=f.input.slice(Math.max(0,f.index-1),f.index),b=new RegExp(`^[${s?.join("")}\0]?$`).test(x);if(s!==null&&!b)return null;const E=m+f.index;let v=E+f[0].length;return l&&d.test(y.slice(v-1,v+1))&&(f[0]+=" ",v+=1),E<a.pos&&v>=a.pos?{range:{from:E,to:v},query:f[0].slice(t.length),text:f[0]}:null}function xn(n){return n.docChanged?n.steps.some(e=>{const t=e.slice;if(!t?.content)return!1;const o=t.content.textBetween(0,t.content.size,`
1
+ import{o as Ye,j as Ge,h as ie,D as ze,p as Qe,q as Ze}from"./index-CWksyNR9.js";import{r as p,es as Je,et as we,eu as et,ev as j,ew as te,j as I,aO as tt,ex as nt,ey as ne,ez as ot,eA as rt,eB as st,eC as it,eD as at,eE as lt,eF as Ce,eG as ct,c as H,D as ut,K as dt,eH as ft,eI as gt,eJ as mt,b as pt,l as vt,h as ht}from"./index-De5sr9zh.js";import{g as bt,d as xt}from"./gateway-client-hbsOo-al.js";import{A as yt}from"./agent-icon-CjNFk4Bw.js";var Hn=Ye;var Et=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ae=Et.join(","),Ie=typeof Element>"u",z=Ie?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,J=!Ie&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n?.ownerDocument},ee=function(e,t){var o;t===void 0&&(t=!0);var r=e==null||(o=e.getAttribute)===null||o===void 0?void 0:o.call(e,"inert"),s=r===""||r==="true",i=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):ee(e.parentNode));return i},Rt=function(e){var t,o=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return o===""||o==="true"},St=function(e,t,o){if(ee(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ae));return t&&z.call(e,ae)&&r.unshift(e),r=r.filter(o),r},le=function(e,t,o){for(var r=[],s=Array.from(e);s.length;){var i=s.shift();if(!ee(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=le(l,!0,o);o.flatten?r.push.apply(r,c):r.push({scopeParent:i,candidates:c})}else{var d=z.call(i,ae);d&&o.filter(i)&&(t||!e.includes(i))&&r.push(i);var u=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),g=!ee(u,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(u&&g){var h=le(u===!0?i.children:u.children,!0,o);o.flatten?r.push.apply(r,h):r.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return r},Te=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Pe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Rt(e))&&!Te(e)?0:e.tabIndex},wt=function(e,t){var o=Pe(e);return o<0&&t&&!Te(e)?0:o},Ct=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ae=function(e){return e.tagName==="INPUT"},It=function(e){return Ae(e)&&e.type==="hidden"},Tt=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return t},Pt=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]},At=function(e){if(!e.name)return!0;var t=e.form||J(e),o=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(e.name));else try{r=o(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Pt(r,e.form);return!s||s===e},Nt=function(e){return Ae(e)&&e.type==="radio"},Dt=function(e){return Nt(e)&&!At(e)},Mt=function(e){var t,o=e&&J(e),r=(t=o)===null||t===void 0?void 0:t.host,s=!1;if(o&&o!==e){var i,a,l;for(s=!!((i=r)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&r;){var c,d,u;o=J(r),r=(c=o)===null||c===void 0?void 0:c.host,s=!!((d=r)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(r))}}return s},ge=function(e){var t=e.getBoundingClientRect(),o=t.width,r=t.height;return o===0&&r===0},Ot=function(e,t){var o=t.displayCheck,r=t.getShadowRoot;if(o==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var i=z.call(e,"details>summary:first-of-type"),a=i?e.parentElement:e;if(z.call(a,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var l=e;e;){var c=e.parentElement,d=J(e);if(c&&!c.shadowRoot&&r(c)===!0)return ge(e);e.assignedSlot?e=e.assignedSlot:!c&&d!==e.ownerDocument?e=d.host:e=c}e=l}if(Mt(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return ge(e);return!1},Ft=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var o=0;o<t.children.length;o++){var r=t.children.item(o);if(r.tagName==="LEGEND")return z.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},qt=function(e,t){return!(t.disabled||It(t)||Ot(t,e)||Tt(t)||Ft(t))},me=function(e,t){return!(Dt(t)||Pe(t)<0||!qt(e,t))},$t=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Ne=function(e){var t=[],o=[];return e.forEach(function(r,s){var i=!!r.scopeParent,a=i?r.scopeParent:r,l=wt(a,i),c=i?Ne(r.candidates):a;l===0?i?t.push.apply(t,c):t.push(a):o.push({documentOrder:s,tabIndex:l,item:r,isScope:i,content:c})}),o.sort(Ct).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(t)},De=function(e,t){t=t||{};var o;return t.getShadowRoot?o=le([e],t.includeContainer,{filter:me.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:$t}):o=St(e,t.includeContainer,me.bind(null,t)),Ne(o)};function kt(){return/apple/i.test(navigator.vendor)}const pe="data-floating-ui-focusable";function _t(n){let e=n.activeElement;for(;((t=e)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;e=e.shadowRoot.activeElement}return e}function ce(n,e){if(!n||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(n.contains(e))return!0;if(t&&Je(t)){let o=e;for(;o;){if(n===o)return!0;o=o.parentNode||o.host}}return!1}function G(n){return"composedPath"in n?n.composedPath()[0]:n.target}function oe(n,e){if(e==null)return!1;if("composedPath"in n)return n.composedPath().includes(e);const t=n;return t.target!=null&&e.contains(t.target)}function Lt(n){return n.matches("html,body")}function Q(n){return n?.ownerDocument||document}function jt(n){return n?n.hasAttribute(pe)?n:n.querySelector("["+pe+"]")||n:null}function Z(n,e,t){return t===void 0&&(t=!0),n.filter(r=>{var s;return r.parentId===e&&(!t||((s=r.context)==null?void 0:s.open))}).flatMap(r=>[r,...Z(n,r.id,t)])}function Kt(n){return"nativeEvent"in n}var Bt=typeof document<"u",Ut=function(){},V=Bt?p.useLayoutEffect:Ut;const Vt={...we},Wt=Vt.useInsertionEffect,Ht=Wt||(n=>n());function W(n){const e=p.useRef(()=>{});return Ht(()=>{e.current=n}),p.useCallback(function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return e.current==null?void 0:e.current(...o)},[])}const Me=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oe(n,e){const t=De(n,Me()),o=t.length;if(o===0)return;const r=_t(Q(n)),s=t.indexOf(r),i=s===-1?e===1?0:o-1:s+e;return t[i]}function Xt(n){return Oe(Q(n).body,1)||n}function Yt(n){return Oe(Q(n).body,-1)||n}function re(n,e){const t=e||n.currentTarget,o=n.relatedTarget;return!o||!ce(t,o)}function Gt(n){De(n,Me()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function ve(n){n.querySelectorAll("[data-tabindex]").forEach(t=>{const o=t.dataset.tabindex;delete t.dataset.tabindex,o?t.setAttribute("tabindex",o):t.removeAttribute("tabindex")})}const zt="data-floating-ui-focusable",he="active",be="selected",Qt={...we};let xe=!1,Zt=0;const ye=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Zt++;function Jt(){const[n,e]=p.useState(()=>xe?ye():void 0);return V(()=>{n==null&&e(ye())},[]),p.useEffect(()=>{xe=!0},[]),n}const en=Qt.useId,ue=en||Jt;function tn(){const n=new Map;return{emit(e,t){var o;(o=n.get(e))==null||o.forEach(r=>r(t))},on(e,t){n.has(e)||n.set(e,new Set),n.get(e).add(t)},off(e,t){var o;(o=n.get(e))==null||o.delete(t)}}}const nn=p.createContext(null),on=p.createContext(null),Fe=()=>{var n;return((n=p.useContext(nn))==null?void 0:n.id)||null},qe=()=>p.useContext(on);function de(n){return"data-floating-ui-"+n}const rn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ee=p.forwardRef(function(e,t){const[o,r]=p.useState();V(()=>{kt()&&r("button")},[]);const s={ref:t,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[de("focus-guard")]:"",style:rn};return I.jsx("span",{...e,...s})}),sn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$e=p.createContext(null),Re=de("portal");function an(n){n===void 0&&(n={});const{id:e,root:t}=n,o=ue(),r=cn(),[s,i]=p.useState(null),a=p.useRef(null);return V(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),V(()=>{if(!o||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=o,c.setAttribute(Re,""),l.appendChild(c),a.current=c,i(c)},[e,o]),V(()=>{if(t===null||!o||a.current)return;let l=t||r?.portalNode;l&&!it(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=o,d.setAttribute(Re,""),l=c||l,l.appendChild(d),a.current=d,i(d)},[e,t,o,r]),s}function ln(n){const{children:e,id:t,root:o,preserveTabOrder:r=!0}=n,s=an({id:t,root:o}),[i,a]=p.useState(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),g=i?.modal,h=i?.open,y=!!i&&!i.modal&&i.open&&r&&!!(o||s);return p.useEffect(()=>{if(!s||!r||g)return;function m(f){s&&re(f)&&(f.type==="focusin"?ve:Gt)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,r,g]),p.useEffect(()=>{s&&(h||ve(s))},[h,s]),I.jsxs($e.Provider,{value:p.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:s,setFocusManagerState:a}),[r,s]),children:[y&&s&&I.jsx(Ee,{"data-type":"outside",ref:l,onFocus:m=>{if(re(m,s)){var f;(f=d.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Yt(x);b?.focus()}}}),y&&s&&I.jsx("span",{"aria-owns":s.id,style:sn}),s&&tt.createPortal(e,s),y&&s&&I.jsx(Ee,{"data-type":"outside",ref:c,onFocus:m=>{if(re(m,s)){var f;(f=u.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Xt(x);b?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const cn=()=>p.useContext($e),un={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},dn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Se=n=>{var e,t;return{escapeKey:typeof n=="boolean"?n:(e=n?.escapeKey)!=null?e:!1,outsidePress:typeof n=="boolean"?n:(t=n?.outsidePress)!=null?t:!0}};function fn(n,e){e===void 0&&(e={});const{open:t,onOpenChange:o,elements:r,dataRef:s}=n,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:g=!1,bubbles:h,capture:y}=e,m=qe(),f=W(typeof l=="function"?l:()=>!1),x=typeof l=="function"?f:l,b=p.useRef(!1),{escapeKey:E,outsidePress:v}=Se(h),{escapeKey:D,outsidePress:C}=Se(y),O=p.useRef(!1),A=W(R=>{var S;if(!t||!i||!a||R.key!=="Escape"||O.current)return;const P=(S=s.current.floatingContext)==null?void 0:S.nodeId,M=m?Z(m.nodesRef.current,P):[];if(!E&&(R.stopPropagation(),M.length>0)){let w=!0;if(M.forEach(N=>{var q;if((q=N.context)!=null&&q.open&&!N.context.dataRef.current.__escapeKeyBubbles){w=!1;return}}),!w)return}o(!1,Kt(R)?R.nativeEvent:R,"escape-key")}),F=W(R=>{var S;const P=()=>{var M;A(R),(M=G(R))==null||M.removeEventListener("keydown",P)};(S=G(R))==null||S.addEventListener("keydown",P)}),T=W(R=>{var S;const P=s.current.insideReactTree;s.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||P||typeof x=="function"&&!x(R))return;const w=G(R),N="["+de("inert")+"]",q=Q(r.floating).querySelectorAll(N);let L=j(w)?w:null;for(;L&&!ne(L);){const k=ot(L);if(ne(k)||!j(k))break;L=k}if(q.length&&j(w)&&!Lt(w)&&!ce(w,r.floating)&&Array.from(q).every(k=>!ce(L,k)))return;if(rt(w)&&K){const k=ne(w),B=st(w),Y=/auto|scroll/,Ke=k||Y.test(B.overflowX),Be=k||Y.test(B.overflowY),Ue=Ke&&w.clientWidth>0&&w.scrollWidth>w.clientWidth,Ve=Be&&w.clientHeight>0&&w.scrollHeight>w.clientHeight,We=B.direction==="rtl",He=Ve&&(We?R.offsetX<=w.offsetWidth-w.clientWidth:R.offsetX>w.clientWidth),Xe=Ue&&R.offsetY>w.clientHeight;if(He||Xe)return}const U=(S=s.current.floatingContext)==null?void 0:S.nodeId,X=m&&Z(m.nodesRef.current,U).some(k=>{var B;return oe(R,(B=k.context)==null?void 0:B.elements.floating)});if(oe(R,r.floating)||oe(R,r.domReference)||X)return;const fe=m?Z(m.nodesRef.current,U):[];if(fe.length>0){let k=!0;if(fe.forEach(B=>{var Y;if((Y=B.context)!=null&&Y.open&&!B.context.dataRef.current.__outsidePressBubbles){k=!1;return}}),!k)return}o(!1,R,"outside-press")}),$=W(R=>{var S;const P=()=>{var M;T(R),(M=G(R))==null||M.removeEventListener(c,P)};(S=G(R))==null||S.addEventListener(c,P)});p.useEffect(()=>{if(!t||!i)return;s.current.__escapeKeyBubbles=E,s.current.__outsidePressBubbles=v;let R=-1;function S(q){o(!1,q,"ancestor-scroll")}function P(){window.clearTimeout(R),O.current=!0}function M(){R=window.setTimeout(()=>{O.current=!1},nt()?5:0)}const w=Q(r.floating);a&&(w.addEventListener("keydown",D?F:A,D),w.addEventListener("compositionstart",P),w.addEventListener("compositionend",M)),x&&w.addEventListener(c,C?$:T,C);let N=[];return g&&(j(r.domReference)&&(N=te(r.domReference)),j(r.floating)&&(N=N.concat(te(r.floating))),!j(r.reference)&&r.reference&&r.reference.contextElement&&(N=N.concat(te(r.reference.contextElement)))),N=N.filter(q=>{var L;return q!==((L=w.defaultView)==null?void 0:L.visualViewport)}),N.forEach(q=>{q.addEventListener("scroll",S,{passive:!0})}),()=>{a&&(w.removeEventListener("keydown",D?F:A,D),w.removeEventListener("compositionstart",P),w.removeEventListener("compositionend",M)),x&&w.removeEventListener(c,C?$:T,C),N.forEach(q=>{q.removeEventListener("scroll",S)}),window.clearTimeout(R)}},[s,r,a,x,c,t,o,g,i,E,v,A,D,F,T,C,$]),p.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const _=p.useMemo(()=>({onKeyDown:A,...d&&{[un[u]]:R=>{o(!1,R.nativeEvent,"reference-press")},...u!=="click"&&{onClick(R){o(!1,R.nativeEvent,"reference-press")}}}}),[A,o,d,u]),K=p.useMemo(()=>{function R(S){S.button===0&&(b.current=!0)}return{onKeyDown:A,onMouseDown:R,onMouseUp:R,[dn[c]]:()=>{s.current.insideReactTree=!0}}},[A,c,s]);return p.useMemo(()=>i?{reference:_,floating:K}:{},[i,_,K])}function gn(n){const{open:e=!1,onOpenChange:t,elements:o}=n,r=ue(),s=p.useRef({}),[i]=p.useState(()=>tn()),a=Fe()!=null,[l,c]=p.useState(o.reference),d=W((h,y,m)=>{s.current.openEvent=h?y:void 0,i.emit("openchange",{open:h,event:y,reason:m,nested:a}),t?.(h,y,m)}),u=p.useMemo(()=>({setPositionReference:c}),[]),g=p.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return p.useMemo(()=>({dataRef:s,open:e,onOpenChange:d,elements:g,events:i,floatingId:r,refs:u}),[e,d,g,i,r,u])}function mn(n){n===void 0&&(n={});const{nodeId:e}=n,t=gn({...n,elements:{reference:null,floating:null,...n.elements}}),o=n.rootContext||t,r=o.elements,[s,i]=p.useState(null),[a,l]=p.useState(null),d=r?.domReference||s,u=p.useRef(null),g=qe();V(()=>{d&&(u.current=d)},[d]);const h=et({...n,elements:{...r,...a&&{reference:a}}}),y=p.useCallback(E=>{const v=j(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;l(v),h.refs.setReference(v)},[h.refs]),m=p.useCallback(E=>{(j(E)||E===null)&&(u.current=E,i(E)),(j(h.refs.reference.current)||h.refs.reference.current===null||E!==null&&!j(E))&&h.refs.setReference(E)},[h.refs]),f=p.useMemo(()=>({...h.refs,setReference:m,setPositionReference:y,domReference:u}),[h.refs,m,y]),x=p.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),b=p.useMemo(()=>({...h,...o,refs:f,elements:x,nodeId:e}),[h,f,x,e,o]);return V(()=>{o.dataRef.current.floatingContext=b;const E=g?.nodesRef.current.find(v=>v.id===e);E&&(E.context=b)}),p.useMemo(()=>({...h,context:b,refs:f,elements:x}),[h,f,x,b])}function se(n,e,t){const o=new Map,r=t==="item";let s=n;if(r&&n){const{[he]:i,[be]:a,...l}=n;s=l}return{...t==="floating"&&{tabIndex:-1,[zt]:""},...s,...e.map(i=>{const a=i?i[t]:null;return typeof a=="function"?n?a(n):null:a}).concat(n).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(r&&[he,be].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof d=="function"){var u;(u=o.get(c))==null||u.push(d),i[c]=function(){for(var g,h=arguments.length,y=new Array(h),m=0;m<h;m++)y[m]=arguments[m];return(g=o.get(c))==null?void 0:g.map(f=>f(...y)).find(f=>f!==void 0)}}}else i[c]=d}),i),{})}}function pn(n){n===void 0&&(n=[]);const e=n.map(a=>a?.reference),t=n.map(a=>a?.floating),o=n.map(a=>a?.item),r=p.useCallback(a=>se(a,n,"reference"),e),s=p.useCallback(a=>se(a,n,"floating"),t),i=p.useCallback(a=>se(a,n,"item"),o);return p.useMemo(()=>({getReferenceProps:r,getFloatingProps:s,getItemProps:i}),[r,s,i])}const vn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function hn(n,e){var t,o;e===void 0&&(e={});const{open:r,elements:s,floatingId:i}=n,{enabled:a=!0,role:l="dialog"}=e,c=ue(),d=((t=s.domReference)==null?void 0:t.id)||c,u=p.useMemo(()=>{var b;return((b=jt(s.floating))==null?void 0:b.id)||i},[s.floating,i]),g=(o=vn.get(l))!=null?o:l,y=Fe()!=null,m=p.useMemo(()=>g==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:r?u:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":r?u:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:d},...g==="menu"&&y&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[g,u,y,r,d,l]),f=p.useMemo(()=>{const b={id:u,...g&&{role:g}};return g==="tooltip"||l==="label"?b:{...b,...g==="menu"&&{"aria-labelledby":d}}},[g,u,d,l]),x=p.useCallback(b=>{let{active:E,selected:v}=b;const D={role:"option",...E&&{id:u+"-fui-option"}};switch(l){case"select":case"combobox":return{...D,"aria-selected":v}}return{}},[u,l]);return p.useMemo(()=>a?{reference:m,floating:f,item:x}:{},[a,m,f,x])}function bn(n){var e;const{char:t,allowSpaces:o,allowToIncludeChar:r,allowedPrefixes:s,startOfLine:i,$position:a}=n,l=o&&!r,c=Ze(t),d=new RegExp(`\\s${c}$`),u=i?"^":"",g=r?"":c,h=l?new RegExp(`${u}${c}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${u}(?:^)?${c}[^\\s${g}]*`,"gm"),y=((e=a.nodeBefore)===null||e===void 0?void 0:e.isText)&&a.nodeBefore.text;if(!y)return null;const m=a.pos-y.length,f=Array.from(y.matchAll(h)).pop();if(!f||f.input===void 0||f.index===void 0)return null;const x=f.input.slice(Math.max(0,f.index-1),f.index),b=new RegExp(`^[${s?.join("")}\0]?$`).test(x);if(s!==null&&!b)return null;const E=m+f.index;let v=E+f[0].length;return l&&d.test(y.slice(v-1,v+1))&&(f[0]+=" ",v+=1),E<a.pos&&v>=a.pos?{range:{from:E,to:v},query:f[0].slice(t.length),text:f[0]}:null}function xn(n){return n.docChanged?n.steps.some(e=>{const t=e.slice;if(!t?.content)return!1;const o=t.content.textBetween(0,t.content.size,`
2
2
  `);return/\s/.test(o)}):!1}function yn(n){return()=>{const e=n.state.selection.$anchor.pos,{top:t,right:o,bottom:r,left:s}=n.view.coordsAtPos(e);try{return new DOMRect(s,t,o-s,r-t)}catch{return null}}}function En(n,e,t,o){return t?()=>{const r=o.getState(n.state),s=r?.decorationId,i=e.dom.querySelector(`[data-decoration-id="${s}"]`);return i?.getBoundingClientRect()||null}:yn(n)}function Rn({match:n,dismissedRange:e,state:t,transaction:o,editor:r,shouldResetDismissed:s,effectiveAllowSpaces:i}){return s?.({editor:r,state:t,range:e,match:n,transaction:o,allowSpaces:i})?!1:i?n.range.from===e.from:n.range.from===e.from&&!xn(o)}function Sn({view:n,pluginKeyRef:e}){const t=n.state.tr.setMeta(e,{exit:!0});n.dispatch(t)}function wn({pluginKey:n,decorationTag:e,decorationClass:t,decorationContent:o,decorationEmptyClass:r,renderer:s,dispatchExit:i}){return{handleKeyDown(a,l){var c;const d=n.getState(a.state);if(!d.active)return!1;if(l.key==="Escape"||l.key==="Esc"){var u;return s==null||(u=s.onKeyDown)===null||u===void 0||u.call(s,{view:a,event:l,range:d.range}),i(a),!0}return(s==null||(c=s.onKeyDown)===null||c===void 0?void 0:c.call(s,{view:a,event:l,range:d.range}))||!1},decorations(a){const{active:l,range:c,decorationId:d,query:u}=n.getState(a);if(!l)return null;const g=!u?.length,h=[t];return g&&h.push(r),ze.create(a.doc,[Qe.inline(c.from,c.to,{nodeName:e,class:h.join(" "),"data-decoration-id":d||void 0,"data-decoration-content":o})])}}}function Cn({editor:n,char:e,effectiveAllowSpaces:t,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,findSuggestionMatch:i,allow:a,shouldShow:l,shouldKeepDismissed:c,pluginKey:d}){return{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}},apply(u,g,h,y){const{isEditable:m}=n,{composing:f}=n.view,{selection:x}=u,{empty:b,from:E}=x,v={...g},D=u.getMeta(d);if(D&&D.exit)return v.active=!1,v.decorationId=null,v.range={from:0,to:0},v.query=null,v.text=null,v.dismissedRange=g.active?{...g.range}:g.dismissedRange,v;if(v.composing=f,u.docChanged&&v.dismissedRange!==null&&(v.dismissedRange={from:u.mapping.map(v.dismissedRange.from),to:u.mapping.map(v.dismissedRange.to)}),m&&(b||n.view.composing)){(E<g.range.from||E>g.range.to)&&!f&&!g.composing&&(v.active=!1);const C=i({char:e,allowSpaces:t,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,$position:x.$from}),O=`id_${Math.floor(Math.random()*4294967295)}`;C&&a({editor:n,state:y,range:C.range,isActive:g.active})&&(!l||l({editor:n,range:C.range,query:C.query,text:C.text,transaction:u}))?(v.dismissedRange!==null&&!c({match:C,dismissedRange:v.dismissedRange,state:y,transaction:u})&&(v.dismissedRange=null),v.dismissedRange===null?(v.active=!0,v.decorationId=g.decorationId||O,v.range=C.range,v.query=C.query,v.text=C.text):v.active=!1):(C||(v.dismissedRange=null),v.active=!1)}else v.active=!1;return v.active||(v.decorationId=null,v.range={from:0,to:0},v.query=null,v.text=null),v}}}function In({editor:n,items:e}){let t=null,o=null,r=null;const s=()=>{o!==null&&(clearTimeout(o),o=null),r?.(),r=null},i=c=>new Promise(d=>{r=d,o=setTimeout(()=>{o=null;const u=r;r=null,u?.()},c)}),a=()=>{t?.abort(),s(),t=null};return{abort:a,fetch:async(c,d)=>{a(),t=new AbortController;const u=t;if(d>0&&await i(d),t!==u||u.signal.aborted)return{status:"aborted"};try{const g=await e({editor:n,query:c,signal:u.signal});return t!==u||u.signal.aborted?{status:"aborted"}:{status:"resolved",items:g}}catch{return t!==u||u.signal.aborted?{status:"aborted"}:{status:"error"}}}}}function Tn({placement:n,offset:e,flip:t,floatingUi:o}){var r,s,i,a;const l=[at({mainAxis:(r=e.mainAxis)!==null&&r!==void 0?r:4,crossAxis:(s=e.crossAxis)!==null&&s!==void 0?s:0})];return t&&l.push(lt()),!(o==null||(i=o.middleware)===null||i===void 0)&&i.length&&l.push(...o.middleware),{placement:n,strategy:(a=o?.strategy)!==null&&a!==void 0?a:"absolute",middleware:l}}function Pn(n){if(n instanceof HTMLElement)return n;if(typeof n=="string")try{const e=document.querySelector(n);if(e)return e}catch{return document.body}return document.body}function An({getReferenceRect:n,contextElement:e,config:t,container:o,dismissOnOutsideClick:r,dismiss:s}){return(i,a={})=>{const l={getBoundingClientRect:()=>{var y;return(y=n())!==null&&y!==void 0?y:new DOMRect},contextElement:e};let c=!1;const d=!i.isConnected;d&&Pn(o).appendChild(i),a.onPosition||(i.style.visibility="hidden",i.style.width="max-content");const g=Ce(l,i,()=>{ct(l,i,{placement:t.placement,strategy:t.strategy,middleware:t.middleware}).then(({x:y,y:m,placement:f,strategy:x})=>{if(a.onPosition){a.onPosition({x:y,y:m,placement:f,strategy:x});return}Object.assign(i.style,{position:x,left:`${y}px`,top:`${m}px`}),c||(c=!0,i.style.visibility="")})},a.autoUpdate);let h;return r&&(h=y=>{const m=y.target;!(m instanceof Node)||i.contains(m)||e.contains(m)||s()},document.addEventListener("pointerdown",h,!0)),()=>{g(),h&&document.removeEventListener("pointerdown",h,!0),d&&i.remove()}}}function Nn({editor:n,pluginKey:e,items:t,renderer:o,minQueryLength:r,debounce:s,initialItems:i,placement:a,offset:l,container:c,flip:d,floatingUi:u,dismissOnOutsideClick:g,command:h,clientRectFor:y,dispatchExit:m}){let f;const x=In({editor:n,items:t}),b=Tn({placement:a,offset:l,flip:d,floatingUi:u});function E(v,D){switch(v){case"started":var C;o==null||(C=o.onStart)===null||C===void 0||C.call(o,D);break;case"updated":var O;o==null||(O=o.onUpdate)===null||O===void 0||O.call(o,D);break;case"stopped":var A;o==null||(A=o.onExit)===null||A===void 0||A.call(o,D)}}return{update:async(v,D)=>{var C,O;const A=e.getState(D),F=e.getState(v.state);if(!A||!F)return;let T=null;const $=A.query!==F.query,_=A.text!==F.text,K=A.range.from!==F.range.from||A.range.to!==F.range.to,R=$||_||K;if(!A.active&&F.active)T="started";else if(A.active&&!F.active)T="stopped";else if(F.active&&R)T="updated";else return;const S=T==="stopped"?A:F,P=v.dom.querySelector(`[data-decoration-id="${S.decorationId}"]`),M=y(v,P),w=r===0||(S.query?S.query.length>=r:!1),N=(T==="started"||T==="updated")&&w;if(f={editor:n,range:S.range,query:S.query||"",text:S.text||"",items:i??[],command:U=>h({editor:n,range:S.range,props:U}),decorationNode:P,clientRect:M,loading:N,placement:a,offset:{mainAxis:(C=l.mainAxis)!==null&&C!==void 0?C:4,crossAxis:(O=l.crossAxis)!==null&&O!==void 0?O:0},container:c,flip:d,floatingUi:b,mount:An({getReferenceRect:M,contextElement:v.dom,config:b,container:c,dismissOnOutsideClick:g,dismiss:()=>m(n.view)})},T==="started"){var q;o==null||(q=o.onBeforeStart)===null||q===void 0||q.call(o,f)}if(T==="updated"){var L;o==null||(L=o.onBeforeUpdate)===null||L===void 0||L.call(o,f)}if(T==="started"&&E(T,f),T==="started"||T==="updated")if(!N)x.abort(),f={...f,items:i??[],loading:!1};else{f={...f,items:i??[],loading:!0},T="updated",E(T,f);const U=await x.fetch(S.query||"",s);if(U.status==="aborted")return;const X=e.getState(v.state);if(!X?.active){x.abort();return}f=U.status==="resolved"?{...f,items:U.items,loading:!1}:{...f,loading:!1}}if(T==="stopped"){x.abort(),E(T,f),f=void 0;return}T==="updated"&&E(T,f)},destroy:()=>{var v;x.abort(),f&&(o==null||(v=o.onExit)===null||v===void 0||v.call(o,f))}}}const ke=new ie("suggestion");function _e({pluginKey:n=ke,editor:e,char:t="@",allowSpaces:o=!1,allowToIncludeChar:r=!1,allowedPrefixes:s=[" "],startOfLine:i=!1,decorationTag:a="span",decorationClass:l="suggestion",decorationContent:c="",decorationEmptyClass:d="is-empty",command:u=()=>null,items:g=()=>[],minQueryLength:h=0,debounce:y=0,initialItems:m,placement:f="bottom-start",offset:x={},container:b,flip:E=!0,floatingUi:v,dismissOnOutsideClick:D=!0,render:C=()=>({}),allow:O=()=>!0,findSuggestionMatch:A=bn,shouldShow:F,shouldResetDismissed:T}){const $=C?.(),_=o&&!r,K=(P,M)=>En(e,P,M,n);function R(P){return Rn({...P,editor:e,shouldResetDismissed:T,effectiveAllowSpaces:_})}const S=P=>Sn({view:P,pluginKeyRef:n});return new Ge({key:n,view:()=>Nn({editor:e,pluginKey:n,items:g,renderer:$,minQueryLength:h,debounce:y,initialItems:m,placement:f,offset:x,container:b,flip:E,floatingUi:v,dismissOnOutsideClick:D,command:u,clientRectFor:K,dispatchExit:S}),state:Cn({editor:e,char:t,effectiveAllowSpaces:_,allowToIncludeChar:r,allowedPrefixes:s,startOfLine:i,findSuggestionMatch:A,allow:O,shouldShow:F,shouldKeepDismissed:R,pluginKey:n}),props:wn({pluginKey:n,decorationTag:a,decorationClass:l,decorationContent:c,decorationEmptyClass:d,renderer:$,dispatchExit:S})})}function Xn(n,e=ke){const t=n.state.tr.setMeta(e,{exit:!0});n.dispatch(t)}var Yn=_e;function Dn(n){const e=H.c(17),{editor:t,query:o,items:r,onSelect:s,onClose:i}=n,[a,l]=p.useState(0),c=p.useRef(r),d=p.useRef(a),u=p.useRef(s),g=p.useRef(i),h=p.useDeferredValue(o),[y,m]=p.useState(h);y!==h&&(m(h),l(0)),a>=r.length&&r.length>0&&l(0);let f,x;e[0]!==r?(f=()=>{c.current=r},x=[r],e[0]=r,e[1]=f,e[2]=x):(f=e[1],x=e[2]),p.useEffect(f,x);let b,E;e[3]!==a?(b=()=>{d.current=a},E=[a],e[3]=a,e[4]=b,e[5]=E):(b=e[4],E=e[5]),p.useEffect(b,E);let v,D;e[6]!==s?(v=()=>{u.current=s},D=[s],e[6]=s,e[7]=v,e[8]=D):(v=e[7],D=e[8]),p.useEffect(v,D);let C,O;e[9]!==i?(C=()=>{g.current=i},O=[i],e[9]=i,e[10]=C,e[11]=O):(C=e[10],O=e[11]),p.useEffect(C,O);let A,F;e[12]!==t?(F=()=>{if(t?.isDestroyed)return;let _;try{_=t.view.dom}catch{return}if(!_)return;const K=S=>{const P=c.current;if(!P.length)return!1;const M=()=>l(N=>(N+1)%P.length),w=()=>l(N=>(N-1+P.length)%P.length);switch(S.key){case"ArrowUp":return S.preventDefault(),w(),!0;case"ArrowDown":return S.preventDefault(),M(),!0;case"Tab":return S.preventDefault(),S.shiftKey?w():M(),!0;case"Home":return S.preventDefault(),l(0),!0;case"End":return S.preventDefault(),l(P.length-1),!0;case"Enter":{if(S.isComposing)return!1;S.preventDefault();const N=d.current;return N!==-1&&P[N]&&u.current?.(P[N],N),!0}case"Escape":return S.preventDefault(),g.current?.(),!0;default:return!1}},R=S=>{K(S)};return _.addEventListener("keydown",R,!0),()=>{_?.removeEventListener("keydown",R,!0)}},A=[t],e[12]=t,e[13]=A,e[14]=F):(A=e[13],F=e[14]),p.useEffect(F,A);const T=r.length?a:void 0;let $;return e[15]!==T?($={selectedIndex:T,setSelectedIndex:l},e[15]=T,e[16]=$):$=e[16],$}function Mn(n,e){switch(e.type){case"SET_SELECTED_ITEM":return{...n,selectedItem:e.payload};case"ON_START":return{...n,open:!0,selectedItem:null,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_UPDATE":return{...n,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_EXIT":return{open:!1,element:null,query:"",range:null,selectedItem:null};default:return n}}const Le=p.createContext(void 0);function je(){const n=p.useContext(Le);if(!n)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return n}function On(n){const e=H.c(16),{editor:t,char:o,pluginKey:r,allow:s,onOpenChange:i}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={open:!1,element:null,query:"",range:null,selectedItem:null},e[0]=a):a=e[0];const[l,c]=p.useReducer(Mn,a);let d;e[1]!==i?(d=m=>{i?.(m)},e[1]=i,e[2]=d):d=e[2];const u=p.useEffectEvent(d);let g;e[3]!==o||e[4]!==s||e[5]!==t||e[6]!==u||e[7]!==r?(g=()=>{if(t?.isDestroyed)return;const m=r instanceof ie?r:new ie(r);t.state.plugins.find(b=>b.spec.key===m)&&t.unregisterPlugin(m);const x=_e({pluginKey:m,editor:t,char:o,allow(b){const E=t.state.doc.resolve(b.range.from);for(let v=E.depth;v>0;v--)if(E.node(v).type.name==="image")return!1;return!(s&&!s(b))},command(){},render:()=>({onStart:b=>{c({type:"ON_START",payload:{element:b.decorationNode??null,query:b.query,range:b.range}}),u(!0)},onUpdate:b=>{c({type:"ON_UPDATE",payload:{element:b.decorationNode??null,query:b.query,range:b.range}})},onKeyDown:b=>b.event.key==="Escape"?(c({type:"ON_EXIT"}),!0):!1,onExit:()=>{c({type:"ON_EXIT"}),u(!1)}}),items:Fn});return t.registerPlugin(x),()=>{t?.isDestroyed||t.unregisterPlugin(m)}},e[3]=o,e[4]=s,e[5]=t,e[6]=u,e[7]=r,e[8]=g):g=e[8];let h;e[9]!==o||e[10]!==s||e[11]!==t||e[12]!==r?(h=[t,r,o,c,s],e[9]=o,e[10]=s,e[11]=t,e[12]=r,e[13]=h):h=e[13],p.useEffect(g,h);let y;return e[14]!==l?(y={state:l,dispatch:c},e[14]=l,e[15]=y):y=e[15],y}function Fn(){return[]}function qn({editor:n,queryKey:e,queryFn:t,onSelect:o}){const{state:r,dispatch:s}=je(),i=p.useDeferredValue(r.query),{data:a}=ut({queryKey:dt.suggestionItems(e,r.open,i),queryFn:()=>r.open?t({query:i}):[]}),l=()=>{s({type:"ON_EXIT"})},c=async(u,g)=>{if(!(r.selectedItem!==null||!r.range)){s({type:"SET_SELECTED_ITEM",payload:u});try{const{view:h}=n,m=h.state.selection.$to.nodeAfter?.text?.startsWith(" "),f=r.range?{...r.range}:{from:0,to:0};m&&r.range&&(f.to+=1),await o({range:f,item:u})===!1?s({type:"SET_SELECTED_ITEM",payload:null}):l()}catch{l()}}},{selectedIndex:d}=Dn({editor:n,query:i,items:a,onSelect:c,onClose:l});return{selectedItem:r.selectedItem,items:a,selectedIndex:d,close:l,onSelect:c}}function $n({children:n}){const{state:e,dispatch:t}=je(),{open:o,element:r}=e,s=()=>{t({type:"ON_EXIT"})},{refs:i,floatingStyles:a,context:l}=mn({placement:"bottom-start",open:o,onOpenChange:g=>{g||s()},elements:{reference:r},middleware:[ft(10),gt(),mt()],whileElementsMounted:Ce}),c=fn(l,{outsidePress:g=>!(g.target instanceof Element&&g.target.closest(".ProseMirror"))}),d=hn(l,{role:"listbox"}),{getFloatingProps:u}=pn([c,d]);return o?I.jsx(ln,{children:I.jsx("div",{ref:i.setFloating,style:a,...u(),className:"z-50 w-auto min-w-[360px] max-w-[520px] rounded-lg border bg-popover p-0 text-popover-foreground shadow-md outline-hidden overflow-hidden",children:n})}):null}const kn=n=>{const e=H.c(17),{item:t,isSelected:o,onSelect:r,isLoading:s,ref:i,renderItem:a}=n;let l;if(e[0]!==t){const x=bt(t._meta);l=t.title||xt(t.name,x),e[0]=t,e[1]=l}else l=e[1];const c=l,d=t.description||null,u=t.icon,g=o&&"bg-accent text-accent-foreground",h=s&&"pointer-events-none opacity-50";let y;e[2]!==g||e[3]!==h?(y=vt("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground",g,h),e[2]=g,e[3]=h,e[4]=y):y=e[4];let m;e[5]!==d||e[6]!==u||e[7]!==s||e[8]!==t||e[9]!==c||e[10]!==a?(m=a?a(t):I.jsxs(I.Fragment,{children:[u!==void 0&&I.jsx(yt,{icon:u,name:c,size:"xs",className:"mr-2"}),I.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[I.jsxs("div",{className:"flex items-center justify-between gap-2",children:[I.jsx("span",{className:"font-medium flex items-center truncate capitalize",children:c}),s&&I.jsx(ht,{size:"xs"})]}),d&&I.jsx("div",{className:"text-xs text-muted-foreground line-clamp-1",children:d})]}),t.drillable&&I.jsx("kbd",{className:"shrink-0 ml-2 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground bg-muted border border-border rounded",children:"↵"})]}),e[5]=d,e[6]=u,e[7]=s,e[8]=t,e[9]=c,e[10]=a,e[11]=m):m=e[11];let f;return e[12]!==r||e[13]!==i||e[14]!==y||e[15]!==m?(f=I.jsx("div",{ref:i,onClick:r,className:y,children:m}),e[12]=r,e[13]=i,e[14]=y,e[15]=m,e[16]=f):f=e[16],f},_n=n=>{const e=H.c(24),{editor:t,queryKey:o,queryFn:r,onSelect:s,renderItem:i,emptyLabel:a}=n,l=pt();let c;e[0]!==t||e[1]!==s||e[2]!==r||e[3]!==o?(c={editor:t,queryKey:o,queryFn:r,onSelect:s},e[0]=t,e[1]=s,e[2]=r,e[3]=o,e[4]=c):c=e[4];const{items:d,selectedIndex:u,onSelect:g,selectedItem:h}=qn(c);if(!d.length){let x;e[5]!==a||e[6]!==l?(x=a??l("chat.mention.noItemsFound"),e[5]=a,e[6]=l,e[7]=x):x=e[7];let b;return e[8]!==x?(b=I.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md border shadow-md p-3 text-sm",children:x}),e[8]=x,e[9]=b):b=e[9],b}let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y={maxHeight:"min(320px, var(--radix-popover-content-available-height, 320px))"},e[10]=y):y=e[10];let m;if(e[11]!==g||e[12]!==d||e[13]!==i||e[14]!==u||e[15]!==h?.name){let x;e[17]!==g||e[18]!==i||e[19]!==u||e[20]!==h?.name?(x=(b,E)=>I.jsx(kn,{item:b,isSelected:E===u,ref:E===u?Kn:void 0,onSelect:()=>g(b,E),isLoading:h?.name===b.name,renderItem:i},`${b.kind??"item"}:${b.name}`),e[17]=g,e[18]=i,e[19]=u,e[20]=h?.name,e[21]=x):x=e[21],m=d.map(x),e[11]=g,e[12]=d,e[13]=i,e[14]=u,e[15]=h?.name,e[16]=m}else m=e[16];let f;return e[22]!==m?(f=I.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md overflow-y-auto",style:y,children:I.jsx("div",{className:"p-1",children:m})}),e[22]=m,e[23]=f):f=e[23],f};function Ln(){const n=H.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=I.jsx("div",{className:"p-1",children:[...Array(3)].map(jn)}),n[0]=e):e=n[0],e}function jn(n,e){return I.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 animate-pulse",children:[I.jsx("div",{className:"h-4 w-24 bg-muted rounded"}),I.jsx("div",{className:"h-3 w-32 bg-muted rounded"})]},e)}function Gn(n){const e=H.c(20),{editor:t,char:o,pluginKey:r,queryKey:s,queryFn:i,onSelect:a,allow:l,onOpenChange:c,renderItem:d,emptyLabel:u}=n;let g;e[0]!==l||e[1]!==o||e[2]!==t||e[3]!==c||e[4]!==r?(g={editor:t,char:o,pluginKey:r,allow:l,onOpenChange:c},e[0]=l,e[1]=o,e[2]=t,e[3]=c,e[4]=r,e[5]=g):g=e[5];const{state:h,dispatch:y}=On(g);let m;e[6]!==y||e[7]!==h?(m={state:h,dispatch:y},e[6]=y,e[7]=h,e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=I.jsx(Ln,{}),e[9]=f):f=e[9];let x;e[10]!==t||e[11]!==u||e[12]!==a||e[13]!==i||e[14]!==s||e[15]!==d?(x=I.jsx($n,{children:I.jsx(p.Suspense,{fallback:f,children:I.jsx(_n,{editor:t,queryKey:s,queryFn:i,onSelect:a,renderItem:d,emptyLabel:u})})}),e[10]=t,e[11]=u,e[12]=a,e[13]=i,e[14]=s,e[15]=d,e[16]=x):x=e[16];let b;return e[17]!==m||e[18]!==x?(b=I.jsx(Le.Provider,{value:m,children:x}),e[17]=m,e[18]=x,e[19]=b):b=e[19],b}function Kn(n){n&&n.scrollIntoView({block:"center",behavior:"smooth"})}export{Gn as S,Yn as a,Xn as e,Hn as s};
@@ -1 +1 @@
1
- import{r as c,j as i,bq as C,bo as y,bt as T,br as I,bA as H,bL as M,bH as A,c as q,l as g}from"./index-B-RfjkQs.js";var m="Switch",[z]=A(m),[L,U]=z(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(L,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=U(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=H(t),k=M(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(a){return a?"checked":"unchecked"}var $=E,D=R;function W(a){const e=q.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx($,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{W as S};
1
+ import{r as c,j as i,bp as C,bn as y,bs as T,bq as I,bz as M,bK as z,bG as H,c as q,l as g}from"./index-De5sr9zh.js";var m="Switch",[A]=H(m),[U,L]=A(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(U,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=L(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=z(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(a){return a?"checked":"unchecked"}var $=E,D=R;function G(a){const e=q.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx($,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{G as S};
@@ -0,0 +1 @@
1
+ import{c as se,j as s,fq as ye,b as ue,r as ae,B as te,ag as ge,l as je,t as ce,aP as Re}from"./index-De5sr9zh.js";import{s as xe}from"./Plus-Ch1uJBgh.js";import{A as be,a as ve,b as Se,c as De,g as Ne,d as Pe,e as _e,f as Ce}from"./alert-dialog-DpzgB-Ls.js";import{d as Ae,h as ke,c as we,e as ze,b as Ee,D as Oe}from"./dialog-CEiE0rPQ.js";import{I as Ie}from"./input-B-DIEGoS.js";import{u as $e,G as Fe,R as Te}from"./repository-picker-D1hSYB_G.js";import{a as Ge,d as qe,h as Be,t as He}from"./cards-DaNm0Rmg.js";import{R as Le}from"./require-capability-Cab5QyjH.js";import"./X-CEngH8b7.js";import"./ArrowLeft-Bpb3sor7.js";import"./LinkExternal01-Bo5cppL4.js";import"./tooltip-Bdu4_ay-.js";import"./index-DVgj8U7g.js";import"./label-Baft7ecp.js";import"./github-icon-BpCOzzV8.js";import"./useInfiniteQuery-DhVx-Xnv.js";import"./infiniteQueryObserver-CwgE9ndj.js";import"./avatar-B6HmPhM4.js";import"./User01-gmEyKvLo.js";import"./collection-search-kj64tBFw.js";import"./SearchMd-B_MXZ22A.js";import"./use-debounced-value-CWshbX7F.js";import"./use-org-fs-3jzMRDSK.js";import"./DotsVertical-R1tuLE9v.js";import"./Eye-BhTmzCKr.js";import"./Share07-D6XgmppM.js";import"./Key01-BuudAO_W.js";import"./Palette-CEa7GqA9.js";import"./Trash01-D4CwdSy9.js";import"./Zap-DkS3ccHw.js";import"./file-type-icon-Cv10yXI0.js";import"./folder-icon-DJuQAXN-.js";import"./skill-md-ChfVs4uF.js";import"./access-gate-D2mi3EXZ.js";import"./capability-load-error-CaE4aliY.js";function Ve(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Je(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:He(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ke(e){const t=se.c(38),{config:l,onRemove:i}=e,o=ue();let u;t[0]!==l||t[1]!==o?(u=Je(l,o),t[0]=l,t[1]=o,t[2]=u):u=t[2];const m=u,r=$e();let f;t[3]!==l.repositoryId||t[4]!==r.data?(f=r.data?.find(_=>_.id===l.repositoryId),t[3]=l.repositoryId,t[4]=r.data,t[5]=f):f=t[5];const n=f;let g;t[6]!==n?(g=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:n?s.jsx(Fe,{provider:n.provider,size:16,className:"text-muted-foreground"}):s.jsx(ge,{size:16,className:"text-muted-foreground"})}),t[6]=n,t[7]=g):g=t[7];const c=n?.path??`${l.repoOwner}/${l.repoName}`;let d;t[8]!==c?(d=s.jsx("span",{className:"font-medium text-sm truncate",children:c}),t[8]=c,t[9]=d):d=t[9];let p;t[10]!==l.ref?(p=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[10]=l.ref,t[11]=p):p=t[11];let S;t[12]!==d||t[13]!==p?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[d,p]}),t[12]=d,t[13]=p,t[14]=S):S=t[14];const P=m.error?"text-destructive":"text-muted-foreground";let D;t[15]!==P?(D=je("text-xs mt-0.5 truncate",P),t[15]=P,t[16]=D):D=t[16];let R;t[17]!==l.volume||t[18]!==o?(R=o("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[17]=l.volume,t[18]=o,t[19]=R):R=t[19];let b;t[20]!==m.label||t[21]!==R||t[22]!==D?(b=s.jsxs("p",{className:D,children:[R," ·"," ",m.label]}),t[20]=m.label,t[21]=R,t[22]=D,t[23]=b):b=t[23];let x;t[24]!==b||t[25]!==S?(x=s.jsxs("div",{className:"min-w-0",children:[S,b]}),t[24]=b,t[25]=S,t[26]=x):x=t[26];let h;t[27]!==x||t[28]!==g?(h=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[g,x]}),t[27]=x,t[28]=g,t[29]=h):h=t[29];let y;t[30]!==o?(y=o("settings.syncedRepos.remove"),t[30]=o,t[31]=y):y=t[31];let j;t[32]!==i||t[33]!==y?(j=s.jsx(te,{variant:"outline",size:"sm",onClick:i,children:y}),t[32]=i,t[33]=y,t[34]=j):j=t[34];let N;return t[35]!==h||t[36]!==j?(N=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[h,j]}),t[35]=h,t[36]=j,t[37]=N):N=t[37],N}function Me(e){const t=se.c(21),{onAdd:l}=e,i=ue();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(ge,{size:20,className:"text-muted-foreground"})}),t[0]=o):o=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let m;t[3]!==u?(m=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=m):m=t[4];let r;t[5]!==i?(r=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=r):r=t[6];let f;t[7]!==r?(f=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:r}),t[7]=r,t[8]=f):f=t[8];let n;t[9]!==m||t[10]!==f?(n=s.jsxs("div",{children:[m,f]}),t[9]=m,t[10]=f,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(xe,{size:14}),t[12]=g):g=t[12];let c;t[13]!==i?(c=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=c):c=t[14];let d;t[15]!==l||t[16]!==c?(d=s.jsxs(te,{onClick:l,size:"sm",className:"mt-2",children:[g,c]}),t[15]=l,t[16]=c,t[17]=d):d=t[17];let p;return t[18]!==n||t[19]!==d?(p=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[o,n,d]}),t[18]=n,t[19]=d,t[20]=p):p=t[20],p}function Qe(){const e=se.c(107),t=ue(),l=Ge(),i=qe(),o=Be(),[u,m]=ae.useState(!1),[r,f]=ae.useState(null),[n,g]=ae.useState(""),[c,d]=ae.useState(null);let p;e[0]!==i||e[1]!==r||e[2]!==t||e[3]!==n?(p=function(){!r||!n.trim()||i.mutate({repositoryId:r.id,volume:n.trim()},{onSuccess:v=>{f(null),ce.success(t("settings.syncedRepos.created",{volume:v.volume}))},onError:v=>{ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=r,e[2]=t,e[3]=n,e[4]=p):p=e[4];const S=p;let P;e[5]!==c||e[6]!==o||e[7]!==t?(P=function(){c&&o.mutate(c.id,{onSuccess:()=>ce.success(t("settings.syncedRepos.removed")),onError:v=>ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=c,e[6]=o,e[7]=t,e[8]=P):P=e[8];const D=P;if(l.isPending){let a;return e[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Re,{className:"h-32 w-full"}),e[9]=a):a=e[9],a}let R;e[10]!==l.data?(R=l.data??[],e[10]=l.data,e[11]=R):R=e[11];const b=R;let x;e[12]!==t?(x=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=x):x=e[13];let h;e[14]!==x?(h=s.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[14]=x,e[15]=h):h=e[15];let y;e[16]!==b||e[17]!==t?(y=b.length===0?s.jsx(Me,{onAdd:()=>m(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(te,{onClick:()=>m(!0),size:"sm",children:[s.jsx(xe,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:b.map(a=>s.jsx(Ke,{config:a,onRemove:()=>d(a)},a.id))})]}),e[16]=b,e[17]=t,e[18]=y):y=e[18];let j;e[19]!==t?(j=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=j):j=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=a=>{const{repository:v}=a;m(!1),f(v),g(Ve(v.path.split("/").at(-1)??v.path))},e[21]=N):N=e[21];let _;e[22]!==u||e[23]!==j?(_=s.jsx(Te,{open:u,onOpenChange:m,title:j,onPicked:N}),e[22]=u,e[23]=j,e[24]=_):_=e[24];const de=r!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=a=>{a||f(null)},e[25]=ie):ie=e[25];let C;e[26]!==t?(C=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=C):C=e[27];let A;e[28]!==C?(A=s.jsx(Ae,{children:C}),e[28]=C,e[29]=A):A=e[29];const me=r?r.path:"";let k;e[30]!==t||e[31]!==me?(k=t("settings.syncedRepos.nameDialogDescription",{repo:me}),e[30]=t,e[31]=me,e[32]=k):k=e[32];let w;e[33]!==k?(w=s.jsx(ke,{children:k}),e[33]=k,e[34]=w):w=e[34];let z;e[35]!==A||e[36]!==w?(z=s.jsxs(we,{children:[A,w]}),e[35]=A,e[36]=w,e[37]=z):z=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=a=>g(a.target.value),e[38]=le):le=e[38];let E;e[39]!==t?(E=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=E):E=e[40];let O;e[41]!==E||e[42]!==n?(O=s.jsx(Ie,{value:n,onChange:le,placeholder:E,autoFocus:!0}),e[41]=E,e[42]=n,e[43]=O):O=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>f(null),e[44]=ne):ne=e[44];const he=i.isPending;let I;e[45]!==t?(I=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=I):I=e[46];let $;e[47]!==i.isPending||e[48]!==I?($=s.jsx(te,{variant:"outline",onClick:ne,disabled:he,children:I}),e[47]=i.isPending,e[48]=I,e[49]=$):$=e[49];let F;e[50]!==i.isPending||e[51]!==n?(F=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=F):F=e[52];let T;e[53]!==i.isPending||e[54]!==t?(T=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=T):T=e[55];let G;e[56]!==S||e[57]!==F||e[58]!==T?(G=s.jsx(te,{disabled:F,onClick:S,children:T}),e[56]=S,e[57]=F,e[58]=T,e[59]=G):G=e[59];let q;e[60]!==$||e[61]!==G?(q=s.jsxs(ze,{children:[$,G]}),e[60]=$,e[61]=G,e[62]=q):q=e[62];let B;e[63]!==z||e[64]!==O||e[65]!==q?(B=s.jsxs(Ee,{className:"sm:max-w-sm",children:[z,O,q]}),e[63]=z,e[64]=O,e[65]=q,e[66]=B):B=e[66];let H;e[67]!==B||e[68]!==de?(H=s.jsx(Oe,{open:de,onOpenChange:ie,children:B}),e[67]=B,e[68]=de,e[69]=H):H=e[69];const fe=c!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=a=>{a||d(null)},e[70]=oe):oe=e[70];const pe=c?.volume??"";let L;e[71]!==t||e[72]!==pe?(L=t("settings.syncedRepos.removeTitle",{volume:pe}),e[71]=t,e[72]=pe,e[73]=L):L=e[73];let V;e[74]!==L?(V=s.jsx(be,{children:L}),e[74]=L,e[75]=V):V=e[75];let J;e[76]!==t?(J=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=J):J=e[77];let K;e[78]!==J?(K=s.jsx(ve,{children:J}),e[78]=J,e[79]=K):K=e[79];let M;e[80]!==V||e[81]!==K?(M=s.jsxs(Se,{children:[V,K]}),e[80]=V,e[81]=K,e[82]=M):M=e[82];let Q;e[83]!==t?(Q=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=Q):Q=e[84];let U;e[85]!==Q?(U=s.jsx(De,{children:Q}),e[85]=Q,e[86]=U):U=e[86];let W;e[87]!==t?(W=t("settings.syncedRepos.remove"),e[87]=t,e[88]=W):W=e[88];let X;e[89]!==D||e[90]!==W?(X=s.jsx(Ne,{onClick:D,children:W}),e[89]=D,e[90]=W,e[91]=X):X=e[91];let Y;e[92]!==U||e[93]!==X?(Y=s.jsxs(Pe,{children:[U,X]}),e[92]=U,e[93]=X,e[94]=Y):Y=e[94];let Z;e[95]!==M||e[96]!==Y?(Z=s.jsxs(_e,{children:[M,Y]}),e[95]=M,e[96]=Y,e[97]=Z):Z=e[97];let ee;e[98]!==fe||e[99]!==Z?(ee=s.jsx(Ce,{open:fe,onOpenChange:oe,children:Z}),e[98]=fe,e[99]=Z,e[100]=ee):ee=e[100];let re;return e[101]!==H||e[102]!==h||e[103]!==ee||e[104]!==y||e[105]!==_?(re=s.jsxs(s.Fragment,{children:[h,y,_,H,ee]}),e[101]=H,e[102]=h,e[103]=ee,e[104]=y,e[105]=_,e[106]=re):re=e[106],re}function Ue(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Qe,{})}),e[0]=t):t=e[0],t}function wt(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Le,{capability:"file-configs:manage",area:"files",children:s.jsx(Ue,{})}),e[0]=t):t=e[0],t}export{wt as default};
@@ -1 +1 @@
1
- import{c,l as i,j as r}from"./index-B-RfjkQs.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{m as T,f as a,p as b,x as c,b as d,d as e};
1
+ import{c,l as i,j as r}from"./index-De5sr9zh.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{m as T,f as a,p as b,x as c,b as d,d as e};
@@ -1 +1 @@
1
- import{r as v,j as d,ec as k,bq as p,br as T,ee as M,dl as P,bs as S,bt as F,bp as V,ed as y,bH as D,c as x,l as g}from"./index-B-RfjkQs.js";var m="Tabs",[G]=D(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=S(i),[c,b]=F({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:V(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(M,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(P,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,q=_,B=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function J(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(q,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(B,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{Q as T,J as a,O as b,U as c};
1
+ import{r as v,j as d,eb as k,bp as p,bq as T,ed as M,dk as P,br as S,bs as F,bo as V,ec as y,bG as D,c as x,l as g}from"./index-De5sr9zh.js";var m="Tabs",[G]=D(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=S(i),[c,b]=F({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:V(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(M,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(P,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,q=_,B=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function J(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(q,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(B,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{Q as T,J as a,O as b,U as c};
@@ -1 +1 @@
1
- import{o as s}from"./schema-kN4UiUD7.js";const T="super-agent",o=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],c=o[0];function A(e){return o[e%o.length]??c}function w(e){return e.createdBy==="system"}const p="chore",d=["reviewer"],_={reviewer:"Reviewer"},E=["QA Agent","Code Reviewer"];function R(e){return e?.reviewer_enabled===void 0&&e?.qa_agent_enabled===!1&&e?.code_reviewer_enabled===!1?!1:s(e,"reviewer_enabled")}const S=["triage","todo","in_progress","in_review","approved","merged","post_deploy_validation","done","archived"],D={queue:"todo"},L=["approved","merged","post_deploy_validation"];function u(e,t){return e?[_[t],...E].some(r=>e.startsWith(`${r}:`)):!1}function g(e){return e.reviewerEnabled||!e.hasPullRequest?!1:!e.threadTitles.some(t=>d.some(r=>u(t,r)))}function f(e,t){if(t)return new Date(t).getTime();let r=0;for(const n of e)n.action==="status_changed"&&n.data?.to==="in_review"&&(r=Math.max(r,new Date(n.occurredAt).getTime()));return r}function v(e,t){const r=f(e,t.cycleStartedAt),n=new Map;for(const a of e){if(a.action!=="review_approved"&&a.action!=="review_changes_requested"||new Date(a.occurredAt).getTime()<r)continue;const i=a.data??{};if(i.reviewer==="reviewer")if(a.action==="review_approved"){if(t?.verifiedOnly&&i.verified!==!0)continue;n.set("reviewer","approved")}else n.set("reviewer","changes_requested")}return n}function m(e,t,r){if(t.length===0)return!1;const n=v(e,r);return t.every(a=>n.get(a)==="approved")}const h="task-board.item.updated",b="task-board.item.deleted",N="task-board.item.prs.updated",C=4e3;export{S as C,p as D,D as L,d as R,T as S,h as T,b as a,N as b,c,L as d,m as e,u as f,g,C as h,w as i,A as n,R as r};
1
+ import{o as s}from"./schema-DkZUkArz.js";const T="super-agent",o=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],c=o[0];function A(e){return o[e%o.length]??c}function w(e){return e.createdBy==="system"}const p="chore",d=["reviewer"],_={reviewer:"Reviewer"},E=["QA Agent","Code Reviewer"];function R(e){return e?.reviewer_enabled===void 0&&e?.qa_agent_enabled===!1&&e?.code_reviewer_enabled===!1?!1:s(e,"reviewer_enabled")}const S=["triage","todo","in_progress","in_review","approved","merged","post_deploy_validation","done","archived"],D={queue:"todo"},L=["approved","merged","post_deploy_validation"];function u(e,t){return e?[_[t],...E].some(r=>e.startsWith(`${r}:`)):!1}function g(e){return e.reviewerEnabled||!e.hasPullRequest?!1:!e.threadTitles.some(t=>d.some(r=>u(t,r)))}function f(e,t){if(t)return new Date(t).getTime();let r=0;for(const n of e)n.action==="status_changed"&&n.data?.to==="in_review"&&(r=Math.max(r,new Date(n.occurredAt).getTime()));return r}function v(e,t){const r=f(e,t.cycleStartedAt),n=new Map;for(const a of e){if(a.action!=="review_approved"&&a.action!=="review_changes_requested"||new Date(a.occurredAt).getTime()<r)continue;const i=a.data??{};if(i.reviewer==="reviewer")if(a.action==="review_approved"){if(t?.verifiedOnly&&i.verified!==!0)continue;n.set("reviewer","approved")}else n.set("reviewer","changes_requested")}return n}function m(e,t,r){if(t.length===0)return!1;const n=v(e,r);return t.every(a=>n.get(a)==="approved")}const h="task-board.item.updated",b="task-board.item.deleted",N="task-board.item.prs.updated",C=4e3;export{S as C,p as D,D as L,d as R,T as S,h as T,b as a,N as b,c,L as d,m as e,u as f,g,C as h,w as i,A as n,R as r};