decocms 2.288.0 → 2.289.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 (198) hide show
  1. package/dist/client/assets/{AlertCircle--Y_xi7pz.js → AlertCircle-BCfEJcld.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-adl7K_Ob.js → ArrowNarrowLeft-dDBZy2uy.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-DrcSZgbj.js → ArrowUpRight-DR20SS60.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-DeN4Arf9.js → CheckCircle-C29ChaU6.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-aTqoLskN.js → ChevronDown-CAze57fI.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-D_eqesT2.js → ChevronRight-Df7bIxwE.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-BJsJc2K_.js → ChevronUp-CTU6V7Q0.js} +1 -1
  8. package/dist/client/assets/{Container-RTpXHcc_.js → Container-Ckr-D4x-.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-DU62Ovco.js → DotsVertical-BooYL5-r.js} +1 -1
  10. package/dist/client/assets/{LinkExternal01-CZ54w6Ys.js → LinkExternal01-BF4nSmdO.js} +1 -1
  11. package/dist/client/assets/{Lock01-C1fACGdb.js → Lock01-D_RqxNIk.js} +1 -1
  12. package/dist/client/assets/{Palette-CSi1xvBX.js → Palette-Du_aKlJW.js} +1 -1
  13. package/dist/client/assets/{Play-ZwqBA0Gj.js → Play-hp4nCWPw.js} +1 -1
  14. package/dist/client/assets/{Plus-DgDw4N5v.js → Plus-C-OJiAlg.js} +1 -1
  15. package/dist/client/assets/{RefreshCcw01-BQD-u-1H.js → RefreshCcw01-Bw_4FSKr.js} +1 -1
  16. package/dist/client/assets/{SearchMd-DIPAhwlI.js → SearchMd-DRU7KH2R.js} +1 -1
  17. package/dist/client/assets/{Settings02-NWpe6nkq.js → Settings02-tDR0R-7r.js} +1 -1
  18. package/dist/client/assets/{Shield01-yW6P30XX.js → Shield01-CyMbm-kt.js} +1 -1
  19. package/dist/client/assets/{Star01-BNCw32N6.js → Star01-BSV4P3zw.js} +1 -1
  20. package/dist/client/assets/{Sun-BIhz6_CP.js → Sun-NTsERAnx.js} +1 -1
  21. package/dist/client/assets/{Tool01-DK8Fhe6_.js → Tool01-JkKJ-VBh.js} +1 -1
  22. package/dist/client/assets/{Trash01-CLPACLPe.js → Trash01-5isrbkO6.js} +1 -1
  23. package/dist/client/assets/{User01-C_p7EKq6.js → User01-CtVgwrxn.js} +1 -1
  24. package/dist/client/assets/{Users03-C5Wav_Yh.js → Users03-kskEQmar.js} +1 -1
  25. package/dist/client/assets/{X-BI3qXgCM.js → X-KZf37p0i.js} +1 -1
  26. package/dist/client/assets/{XCircle-C15LvzjS.js → XCircle-0jhuLEi-.js} +1 -1
  27. package/dist/client/assets/{XClose-xaUxE8BL.js → XClose-DmXYRRRU.js} +1 -1
  28. package/dist/client/assets/{Zap-DUrCsyVy.js → Zap-CjGMKfBw.js} +1 -1
  29. package/dist/client/assets/{ZapSquare-CzhlLfPR.js → ZapSquare-Q_j-wpZU.js} +1 -1
  30. package/dist/client/assets/{accordion-PgILOgmD.js → accordion-LhYuXsvn.js} +1 -1
  31. package/dist/client/assets/{agent-icon-Dwc2UhoB.js → agent-icon-CJBSrXXa.js} +1 -1
  32. package/dist/client/assets/{agents-list-DtDkfiBL.js → agents-list-Bj1ZEySf.js} +1 -1
  33. package/dist/client/assets/ai-providers-NZdL0YY1.js +1 -0
  34. package/dist/client/assets/{alert-dialog-P1MELuo2.js → alert-dialog-DGf6p6RH.js} +2 -2
  35. package/dist/client/assets/{auth-catchall-DXBvhnpI.js → auth-catchall-mJXjaGjq.js} +1 -1
  36. package/dist/client/assets/{automation-list-row-ZhJERDs5.js → automation-list-row-i7idsf84.js} +1 -1
  37. package/dist/client/assets/{automations-BKo3NXeb.js → automations-D5L5OUmd.js} +1 -1
  38. package/dist/client/assets/{avatar-C4Xk2I9Z.js → avatar-BiQlJs5k.js} +1 -1
  39. package/dist/client/assets/{badge-LkPgBUqp.js → badge-BiDYflRu.js} +1 -1
  40. package/dist/client/assets/{brand-context-B0xNT0Kl.js → brand-context-1aiu9Hp5.js} +1 -1
  41. package/dist/client/assets/{card-oTGN-YLV.js → card-kpHhMcOo.js} +1 -1
  42. package/dist/client/assets/{chat-context-yRGYHam2.js → chat-context-C5B4JHNW.js} +1 -1
  43. package/dist/client/assets/{checkbox-COiFtX5D.js → checkbox-DVSlEbBg.js} +1 -1
  44. package/dist/client/assets/{collection-detail-D7_Iw3uk.js → collection-detail-8OxmAVZx.js} +1 -1
  45. package/dist/client/assets/{collection-display-button-cYrSfrMz.js → collection-display-button-DJUi1nr2.js} +1 -1
  46. package/dist/client/assets/{collection-search-Biy5fWyC.js → collection-search-Cauf3WLX.js} +1 -1
  47. package/dist/client/assets/{collection-search-D8Ek-RA1.js → collection-search-G428te1f.js} +1 -1
  48. package/dist/client/assets/{collection-table-wrapper-D7Avuad7.js → collection-table-wrapper-CgJ-IWGp.js} +1 -1
  49. package/dist/client/assets/{collection-tabs-Ez6xggyp.js → collection-tabs-ImMH44oz.js} +1 -1
  50. package/dist/client/assets/{collections-h5KZ86rd.js → collections-CgvQVGim.js} +1 -1
  51. package/dist/client/assets/{command-BcjbHr_r.js → command-DUlueOVl.js} +1 -1
  52. package/dist/client/assets/{connection-card-Tvf09fuE.js → connection-card-CfcNRXjD.js} +1 -1
  53. package/dist/client/assets/{connection-detail-BOee_bXK.js → connection-detail-ZbjzvLjZ.js} +1 -1
  54. package/dist/client/assets/{connection-form-helpers-BML8fV-T.js → connection-form-helpers-CLdsDsnf.js} +1 -1
  55. package/dist/client/assets/{connections-BE48nDv7.js → connections-Db7XXBzz.js} +1 -1
  56. package/dist/client/assets/{constants-n9yTcILK.js → constants-D21LrFJ4.js} +1 -1
  57. package/dist/client/assets/{constants-Dsh71ijv.js → constants-DV1Uc_8Q.js} +2 -2
  58. package/dist/client/assets/{dialog-Dv_lEigV.js → dialog-eYBbNtPx.js} +1 -1
  59. package/dist/client/assets/{domain-settings-BcSGKzwX.js → domain-settings-5yGQjw4b.js} +1 -1
  60. package/dist/client/assets/{drawer-WXY2u6pv.js → drawer-BnROsLEL.js} +1 -1
  61. package/dist/client/assets/{dropdown-menu-B9QIvjxH.js → dropdown-menu-BeTlEYH5.js} +1 -1
  62. package/dist/client/assets/{dynamic-plugin-layout-CjDWcYO9.js → dynamic-plugin-layout-BvdykXHY.js} +1 -1
  63. package/dist/client/assets/{empty-state-DIMeCEjD.js → empty-state-B2VGunPR.js} +1 -1
  64. package/dist/client/assets/{empty-state-JxMlNoaR.js → empty-state-Dyal5Xfo.js} +1 -1
  65. package/dist/client/assets/{extract-connection-data-Cvlutde4.js → extract-connection-data-CSJgZrtD.js} +1 -1
  66. package/dist/client/assets/{features-YbryDu0n.js → features-B-66Obp6.js} +1 -1
  67. package/dist/client/assets/{form-BNoUlod_.js → form-CIMdOf9q.js} +1 -1
  68. package/dist/client/assets/{general-b6CUcDdB.js → general-D6CyCDN-.js} +1 -1
  69. package/dist/client/assets/{github-repo-picker-CP7-EChX.js → github-repo-picker-CvkiRKr8.js} +1 -1
  70. package/dist/client/assets/{index-Dig_TVyF.js → index-B07jP2sp.js} +1 -1
  71. package/dist/client/assets/{index-BVkdH26T.js → index-B0qIbTFl.js} +1 -1
  72. package/dist/client/assets/{index-Cw8cSB3k.js → index-CKiHh8tq.js} +1 -1
  73. package/dist/client/assets/{index-FXohrF1g.js → index-CQ6k5P_g.js} +1 -1
  74. package/dist/client/assets/{index-C-fdRcaZ.js → index-CQJ0POFk.js} +4 -4
  75. package/dist/client/assets/{index-CdjpBOmP.js → index-Ciwyai62.js} +1 -1
  76. package/dist/client/assets/{index-BZtydI_4.js → index-Cqh-Pw0g.js} +1 -1
  77. package/dist/client/assets/{index-CVUETRIB.js → index-D3dcRy4-.js} +28 -28
  78. package/dist/client/assets/{index-B0_K5fYx.js → index-DdZX0aDg.js} +1 -1
  79. package/dist/client/assets/{index-CjZGXiUn.js → index-Duvlh7HC.js} +1 -1
  80. package/dist/client/assets/{infiniteQueryObserver-BYD3scla.js → infiniteQueryObserver-DNXrDhz0.js} +1 -1
  81. package/dist/client/assets/{input-CL-LUIlC.js → input-BTdB8RPC.js} +1 -1
  82. package/dist/client/assets/{integration-icon-BXMU-Z0-.js → integration-icon-DJHy4-lT.js} +1 -1
  83. package/dist/client/assets/{label-Do_qw_q4.js → label-HfwUkinD.js} +1 -1
  84. package/dist/client/assets/{layout-DrFXNrUJ.js → layout-Blu93q33.js} +1 -1
  85. package/dist/client/assets/{login-B6O4fD8Q.js → login-YFb2t01p.js} +1 -1
  86. package/dist/client/assets/{members-L61ME1MY.js → members-qoLnAp5E.js} +1 -1
  87. package/dist/client/assets/{monaco-editor-BRexmFrU.js → monaco-editor-BFeXzORV.js} +1 -1
  88. package/dist/client/assets/{monitoring-stats-row-DpDZn9jY.js → monitoring-stats-row-B8LpUgZ3.js} +1 -1
  89. package/dist/client/assets/{oauth-callback-_ywR3sFa.js → oauth-callback-CXbpsVJh.js} +1 -1
  90. package/dist/client/assets/{oauth-callback-ai-provider-CpjecUsU.js → oauth-callback-ai-provider-CHi0ZwiA.js} +1 -1
  91. package/dist/client/assets/{onboarding-BHrMLfDa.js → onboarding-CS_9vzjQ.js} +1 -1
  92. package/dist/client/assets/{org-layout-BkXZ1gvy.js → org-layout-DzWFCFrp.js} +1 -1
  93. package/dist/client/assets/{org-plugin-layout-DQZ2g3kO.js → org-plugin-layout-C1udHyJg.js} +1 -1
  94. package/dist/client/assets/{plugin-empty-state-vwtahL68.js → plugin-empty-state-uSy8H1wz.js} +1 -1
  95. package/dist/client/assets/{plugin-header-BsB_du51.js → plugin-header-Y9KGqpf-.js} +1 -1
  96. package/dist/client/assets/{plugin-layout-Buej05e7.js → plugin-layout-BMUI6aZk.js} +1 -1
  97. package/dist/client/assets/{popover-C4684neQ.js → popover-0rGXbfVv.js} +1 -1
  98. package/dist/client/assets/{profile-DDmHWY6_.js → profile-Dxc4PLoS.js} +1 -1
  99. package/dist/client/assets/{project-app-view-BNwkzuii.js → project-app-view-rhNtxAKM.js} +1 -1
  100. package/dist/client/assets/registry-3CD149WE.js +2 -0
  101. package/dist/client/assets/{registry-layout-CZd2B4C7.js → registry-layout-20jGjbo6.js} +1 -1
  102. package/dist/client/assets/{required-auth-layout-SaQW2h7l.js → required-auth-layout-BrXS6Et-.js} +1 -1
  103. package/dist/client/assets/{reset-password-DDLCghhj.js → reset-password-KHQpUmrP.js} +1 -1
  104. package/dist/client/assets/{roles-DmqW3xZU.js → roles-QJpAwLWN.js} +1 -1
  105. package/dist/client/assets/{scroll-area-BmiP98pu.js → scroll-area-Cmb2U-GX.js} +1 -1
  106. package/dist/client/assets/{search-input-DQ1Xzm_b.js → search-input-Cxdo8FJH.js} +1 -1
  107. package/dist/client/assets/{select-model-CX8VF4-p.js → select-model-CepjGove.js} +1 -1
  108. package/dist/client/assets/{select-DaM3TY5t.js → select-pbe1Tw3i.js} +1 -1
  109. package/dist/client/assets/{settings-layout-DNFV8Oix.js → settings-layout-C_jpXJmC.js} +1 -1
  110. package/dist/client/assets/{settings-section-BS3Z4RWi.js → settings-section-zap-Boy4.js} +1 -1
  111. package/dist/client/assets/shell-layout-YcfNni5N.js +1 -0
  112. package/dist/client/assets/{skeleton-C8RqYCI9.js → skeleton-cT9-y8hq.js} +1 -1
  113. package/dist/client/assets/{sso-CZDbiXIw.js → sso-Bbte0m6W.js} +1 -1
  114. package/dist/client/assets/{store-CeeuB26r.js → store-CdJMoZz8.js} +1 -1
  115. package/dist/client/assets/store-registry-BT7eie06.js +2 -0
  116. package/dist/client/assets/{switch-DGYFt_K8.js → switch-CrRugnBx.js} +1 -1
  117. package/dist/client/assets/{table-BJ_I6wc6.js → table-Chd-IJRh.js} +1 -1
  118. package/dist/client/assets/{tabs-O35WvzjF.js → tabs-DvsJVzb1.js} +1 -1
  119. package/dist/client/assets/{task-status-BKkJIb6H.js → task-status-KWWNTm4M.js} +1 -1
  120. package/dist/client/assets/{textarea-CjtgfBdH.js → textarea-CWhJ3Xwe.js} +1 -1
  121. package/dist/client/assets/{toggle-group-ComSgZAp.js → toggle-group-B06Rml5A.js} +1 -1
  122. package/dist/client/assets/{tools-list-CurMUG9t.js → tools-list-DT1hnay8.js} +1 -1
  123. package/dist/client/assets/{types-DlC_80GR.js → types-DsDrkXAr.js} +1 -1
  124. package/dist/client/assets/{use-ai-providers-C3mVVuRV.js → use-ai-providers-oEGyGWt1.js} +1 -1
  125. package/dist/client/assets/{use-collections-DcKD6Qxv.js → use-collections-D8VuBtQu.js} +1 -1
  126. package/dist/client/assets/{use-connection-PZAuCSXO.js → use-connection-DATDvleR.js} +1 -1
  127. package/dist/client/assets/{use-copy-Bj-MTwaa.js → use-copy-C4JHTA85.js} +1 -1
  128. package/dist/client/assets/{use-create-virtual-mcp-B_irsl9D.js → use-create-virtual-mcp-CPp3t7Vk.js} +1 -1
  129. package/dist/client/assets/{use-decopilot-events-CDeh99iZ.js → use-decopilot-events-BmJPvHjL.js} +1 -1
  130. package/dist/client/assets/{use-delete-connection-BR9ISSGY.js → use-delete-connection-Cs_pBxVJ.js} +1 -1
  131. package/dist/client/assets/{use-infinite-scroll-D-2l__Cz.js → use-infinite-scroll-42GyaTNJ.js} +1 -1
  132. package/dist/client/assets/{use-list-state-BV21WFDK.js → use-list-state-B_acXswQ.js} +1 -1
  133. package/dist/client/assets/{use-mcp-tools-Bv5yUcCZ.js → use-mcp-tools-Bp4N36ES.js} +1 -1
  134. package/dist/client/assets/{use-members-BAhIl5n0.js → use-members-egBMdDNQ.js} +1 -1
  135. package/dist/client/assets/{use-mobile-BpBXbl16.js → use-mobile-BwJlvmat.js} +1 -1
  136. package/dist/client/assets/{use-navigate-to-agent-CG7-kp4S.js → use-navigate-to-agent-CeIX1obd.js} +1 -1
  137. package/dist/client/assets/{use-org-sso-4JoNv6HV.js → use-org-sso-D35VQct2.js} +1 -1
  138. package/dist/client/assets/{use-organization-roles-Bpj16cC4.js → use-organization-roles-DewFhO3_.js} +1 -1
  139. package/dist/client/assets/{use-organization-settings-axiNM6Y6.js → use-organization-settings-DlzwYRHw.js} +1 -1
  140. package/dist/client/assets/{use-registry-connections-fdW_5JrJ.js → use-registry-connections-BMDx5SL4.js} +1 -1
  141. package/dist/client/assets/{use-status-sounds-BYcGwXOW.js → use-status-sounds-CnYkx9X0.js} +1 -1
  142. package/dist/client/assets/{use-tasks-CEbKlK-w.js → use-tasks-BtgjavUX.js} +1 -1
  143. package/dist/client/assets/{use-view-mode-DXGS7T6x.js → use-view-mode-ni8MVEBL.js} +1 -1
  144. package/dist/client/assets/{use-virtual-mcp-C8FeHhCA.js → use-virtual-mcp-CLK92_-L.js} +1 -1
  145. package/dist/client/assets/useInfiniteQuery-NxzX8_KV.js +1 -0
  146. package/dist/client/assets/useSuspenseInfiniteQuery-BTse9xwX.js +1 -0
  147. package/dist/client/assets/{user-1OxcID9o.js → user-K40phdtq.js} +1 -1
  148. package/dist/client/assets/{view-mode-toggle-BiIaP24A.js → view-mode-toggle-Co7HEZDI.js} +1 -1
  149. package/dist/client/assets/{workflow-Dx23L5rN.js → workflow-CuFWe7ID.js} +1 -1
  150. package/dist/client/assets/workflow-detail-CoSxU_nR.js +1 -0
  151. package/dist/client/index.html +1 -1
  152. package/dist/server/cli.js +1 -1
  153. package/dist/server/node_modules/{xtend → pg}/LICENSE +7 -6
  154. package/dist/server/node_modules/pg/README.md +95 -0
  155. package/dist/server/node_modules/pg/esm/index.mjs +20 -0
  156. package/dist/server/node_modules/pg/lib/client.js +743 -0
  157. package/dist/server/node_modules/pg/lib/connection-parameters.js +171 -0
  158. package/dist/server/node_modules/pg/lib/connection.js +221 -0
  159. package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
  160. package/dist/server/node_modules/pg/lib/crypto/sasl.js +212 -0
  161. package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
  162. package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +89 -0
  163. package/dist/server/node_modules/pg/lib/crypto/utils.js +9 -0
  164. package/dist/server/node_modules/pg/lib/defaults.js +91 -0
  165. package/dist/server/node_modules/pg/lib/index.js +73 -0
  166. package/dist/server/node_modules/pg/lib/native/client.js +323 -0
  167. package/dist/server/node_modules/pg/lib/native/index.js +2 -0
  168. package/dist/server/node_modules/pg/lib/native/query.js +165 -0
  169. package/dist/server/node_modules/pg/lib/query.js +252 -0
  170. package/dist/server/node_modules/pg/lib/result.js +109 -0
  171. package/dist/server/node_modules/pg/lib/stream.js +83 -0
  172. package/dist/server/node_modules/pg/lib/type-overrides.js +35 -0
  173. package/dist/server/node_modules/pg/lib/utils.js +217 -0
  174. package/dist/server/node_modules/pg/package.json +76 -0
  175. package/package.json +1 -1
  176. package/dist/client/assets/ai-providers-dl8LgpRM.js +0 -1
  177. package/dist/client/assets/registry-B2nAdztj.js +0 -2
  178. package/dist/client/assets/shell-layout-DifA2CaM.js +0 -1
  179. package/dist/client/assets/store-registry-Db_sa3Jy.js +0 -2
  180. package/dist/client/assets/useInfiniteQuery-D8Ti3aNB.js +0 -1
  181. package/dist/client/assets/useSuspenseInfiniteQuery-BOcz1SDi.js +0 -1
  182. package/dist/client/assets/workflow-detail-BMaclVeL.js +0 -1
  183. package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
  184. package/dist/server/node_modules/ansi-styles/index.js +0 -223
  185. package/dist/server/node_modules/ansi-styles/license +0 -9
  186. package/dist/server/node_modules/ansi-styles/package.json +0 -54
  187. package/dist/server/node_modules/ansi-styles/readme.md +0 -173
  188. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  189. package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
  190. package/dist/server/node_modules/is-fullwidth-code-point/license +0 -9
  191. package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
  192. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
  193. package/dist/server/node_modules/xtend/.jshintrc +0 -30
  194. package/dist/server/node_modules/xtend/README.md +0 -32
  195. package/dist/server/node_modules/xtend/immutable.js +0 -19
  196. package/dist/server/node_modules/xtend/mutable.js +0 -17
  197. package/dist/server/node_modules/xtend/package.json +0 -55
  198. package/dist/server/node_modules/xtend/test.js +0 -103
@@ -1 +1 @@
1
- import{r as i,aS as nt,aT as Pe,j as d,c3 as rt,aU as be,b6 as k,c4 as st,ah as j,ai as N,cF as $,c5 as lt,J as _e,c6 as Ee,b9 as at,b7 as ct,ae as it,c7 as dt,ca as ut,c8 as pt,cb as ft,cc as mt,ao as ht,c9 as vt,cd as gt,ce as xt,e as ee,c as oe}from"./index-CVUETRIB.js";import{V as St}from"./use-mobile-BpBXbl16.js";import{t as Re,i as wt}from"./ChevronDown-aTqoLskN.js";import{n as Ct}from"./ChevronUp-BJsJc2K_.js";function Ne(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=at(J),[ne]=ht(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,Nt]=ne(J),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:c,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=r,p=pe(e),[v,C]=i.useState(null),[m,x]=i.useState(null),[F,M]=i.useState(!1),re=nt(u),[_,O]=Pe({prop:o,defaultProp:n??!1,onChange:c,caller:J}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),L=i.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=i.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:i.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:i.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:b,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=i.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,c=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=i.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...c,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:N(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(n.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:c,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=c!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):c})});De.displayName=Oe;var _t="SelectIcon",ke=i.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var Q="SelectContent",Be=i.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=i.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const c=o;return c?_e.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),c):null}return d.jsx(He,{...r,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=vt("SelectContent.RemoveScroll"),He=i.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:c,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=r,m=G(Q,t),[x,F]=i.useState(null),[M,re]=i.useState(null),_=k(e,f=>F(f)),[O,U]=i.useState(null),[q,L]=i.useState(null),B=ue(t),[W,V]=i.useState(!1),H=i.useRef(!1);i.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=i.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=i.useCallback(()=>E([O,x]),[E,O,x]);i.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;i.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),i.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=i.useCallback(()=>x?.focus(),[x]),te=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ce=o==="popper"?Se:ze,se=ce===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ce,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=i.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,c=G(Q,t),s=Y(Q,t),[l,a]=i.useState(null),[u,h]=i.useState(null),g=k(e,_=>h(_)),b=ue(t),w=i.useRef(!1),S=i.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=i.useCallback(()=>{if(c.trigger&&c.valueNode&&l&&u&&p&&v&&C){const _=c.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=c.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(c.dir!=="rtl"){const I=q.left-O.left,P=U.left-I,X=_.left-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-U.right-I,X=window.innerWidth-_.right-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ce=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ce,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,l,u,p,v,C,c.dir,o]);$(()=>x(),[x]);const[F,M]=i.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=i.useCallback(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=i.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...c}=r,s=pe(t);return d.jsx(gt,{...s,...c,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Fe=i.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,c=Y(we,t),s=Te(we,t),l=k(e,c.onViewportChange),a=i.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),Lt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Ue;var We="SelectLabel",Bt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ie="SelectItem",[Vt,Ke]=ne(ie),$e=i.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:c,...s}=r,l=G(ie,t),a=Y(ie,t),u=l.value===o,[h,g]=i.useState(c??""),[b,w]=i.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),v=i.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:i.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>w(!0)),onBlur:N(s.onBlur,()=>w(!1)),onClick:N(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{v.current=m.pointerType,n?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ie;var le="SelectItemText",Ge=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...c}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,g]=i.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=i.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...c,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(c.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=i.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;c(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=i.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;c(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=i.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,c=Y("SelectScrollButton",t),s=i.useRef(null),l=ue(t),a=i.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return i.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{c.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ft=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),c=G(Ie,t),s=Y(Ie,t);return c.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Qe=i.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=i.useRef(null),c=k(o,n),s=ct(e);return i.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:c,defaultValue:e})});Qe.displayName=Ut;function et(r){return r===""||r===void 0}function tt(r){const e=it(r),t=i.useRef(""),o=i.useRef(0),n=i.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),c=i.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,c]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,c=t?r.indexOf(t):-1;let s=Wt(r,Math.max(c,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;function io(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(13);let t,o,n,c;e[0]!==r?({className:o,size:c,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?"default":c;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(r){const e=ee.c(25);let t,o,n,c,s;e[0]!==r?({className:o,children:t,position:c,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c,e[5]=s):(t=e[1],o=e[2],n=e[3],c=e[4],s=e[5]);const l=c===void 0?"popper":c,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function mo(r){const e=ee.c(16);let t,o,n,c;e[0]!==r?({className:o,children:t,hideCheck:c,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?!1:c;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Ct,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Re,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{fo as S,io as a,mo as b,po as c,uo as d,Ne as e};
1
+ import{r as i,aS as nt,aT as Pe,j as d,c4 as rt,aU as be,b6 as k,c5 as st,ah as j,ai as N,cG as $,c6 as lt,J as _e,c7 as Ee,b9 as at,b7 as ct,ae as it,c8 as dt,cb as ut,c9 as pt,cc as ft,cd as mt,ao as ht,ca as vt,ce as gt,cf as xt,e as ee,c as oe}from"./index-D3dcRy4-.js";import{V as St}from"./use-mobile-BwJlvmat.js";import{t as Re,i as wt}from"./ChevronDown-CAze57fI.js";import{n as Ct}from"./ChevronUp-CTU6V7Q0.js";function Ne(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=at(J),[ne]=ht(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,Nt]=ne(J),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:c,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=r,p=pe(e),[v,C]=i.useState(null),[m,x]=i.useState(null),[U,M]=i.useState(!1),re=nt(u),[_,O]=Pe({prop:o,defaultProp:n??!1,onChange:c,caller:J}),[F,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),L=i.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=i.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:be(),value:F,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:i.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:i.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:F,onChange:E=>q(E.target.value),disabled:b,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=i.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,c=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=i.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...c,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:N(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(n.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:c,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=c!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):c})});De.displayName=Oe;var _t="SelectIcon",ke=i.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var Q="SelectContent",Be=i.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=i.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const c=o;return c?_e.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),c):null}return d.jsx(He,{...r,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=vt("SelectContent.RemoveScroll"),He=i.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:c,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=r,m=G(Q,t),[x,U]=i.useState(null),[M,re]=i.useState(null),_=k(e,f=>U(f)),[O,F]=i.useState(null),[q,L]=i.useState(null),B=ue(t),[W,V]=i.useState(!1),H=i.useRef(!1);i.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=i.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=i.useCallback(()=>E([O,x]),[E,O,x]);i.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;i.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),i.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(F(f),y&&(H.current=!0))},[m.value]),he=i.useCallback(()=>x?.focus(),[x]),te=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ce=o==="popper"?Se:ze,se=ce===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ce,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=i.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,c=G(Q,t),s=Y(Q,t),[l,a]=i.useState(null),[u,h]=i.useState(null),g=k(e,_=>h(_)),b=ue(t),w=i.useRef(!1),S=i.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=i.useCallback(()=>{if(c.trigger&&c.valueNode&&l&&u&&p&&v&&C){const _=c.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=c.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(c.dir!=="rtl"){const I=q.left-O.left,P=F.left-I,X=_.left-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-F.right-I,X=window.innerWidth-_.right-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ce=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ce,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,l,u,p,v,C,c.dir,o]);$(()=>x(),[x]);const[U,M]=i.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=i.useCallback(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:U},children:d.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=i.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...c}=r,s=pe(t);return d.jsx(gt,{...s,...c,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Ue=i.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,c=Y(we,t),s=Te(we,t),l=k(e,c.onViewportChange),a=i.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),U=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ie="SelectItem",[Vt,Ke]=ne(ie),$e=i.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:c,...s}=r,l=G(ie,t),a=Y(ie,t),u=l.value===o,[h,g]=i.useState(c??""),[b,w]=i.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),v=i.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:i.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>w(!0)),onBlur:N(s.onBlur,()=>w(!1)),onClick:N(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{v.current=m.pointerType,n?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ie;var le="SelectItemText",Ge=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...c}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,g]=i.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=i.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...c,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(c.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=i.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;c(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=i.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;c(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=i.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,c=Y("SelectScrollButton",t),s=i.useRef(null),l=ue(t),a=i.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return i.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{c.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ut=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),c=G(Ie,t),s=Y(Ie,t);return c.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Ft="SelectBubbleInput",Qe=i.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=i.useRef(null),c=k(o,n),s=ct(e);return i.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:c,defaultValue:e})});Qe.displayName=Ft;function et(r){return r===""||r===void 0}function tt(r){const e=it(r),t=i.useRef(""),o=i.useRef(0),n=i.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),c=i.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,c]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,c=t?r.indexOf(t):-1;let s=Wt(r,Math.max(c,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Ue,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;function io(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(13);let t,o,n,c;e[0]!==r?({className:o,size:c,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?"default":c;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(r){const e=ee.c(25);let t,o,n,c,s;e[0]!==r?({className:o,children:t,position:c,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c,e[5]=s):(t=e[1],o=e[2],n=e[3],c=e[4],s=e[5]);const l=c===void 0?"popper":c,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function mo(r){const e=ee.c(16);let t,o,n,c;e[0]!==r?({className:o,children:t,hideCheck:c,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?!1:c;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Ct,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Re,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{fo as S,io as a,mo as b,po as c,uo as d,Ne as e};
@@ -1 +1 @@
1
- import{e as k,g as E,a4 as R,j as s,s as T,aG as H,c as $,ay as z,t as L,b as W,O as I,l as J,r as K}from"./index-CVUETRIB.js";import{k as Q,l as U,m as V,u as X,S as w,a as C,b as O,d as P,c as M,f as Y,g as Z,q as A,n as ee,o as se,p as te}from"./index-Dig_TVyF.js";import{i as q}from"./ArrowNarrowLeft-adl7K_Ob.js";import{n as le,d as ne,b as re,e as ie,f as oe,i as F,a as ae,c as ce}from"./ZapSquare-CzhlLfPR.js";import{t as me,a as G}from"./Users03-C5Wav_Yh.js";import{i as de}from"./ChevronRight-D_eqesT2.js";import{i as fe}from"./Lock01-C1fACGdb.js";import{i as xe}from"./Shield01-yW6P30XX.js";import{s as be}from"./User01-C_p7EKq6.js";import{i as B}from"./Zap-DUrCsyVy.js";import{u as he}from"./use-mobile-BpBXbl16.js";import{u as ue}from"./use-status-sounds-BYcGwXOW.js";import"./X-BI3qXgCM.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-CDeh99iZ.js";import"./create-sse-subscription-CxkOgzKf.js";function D(){const e=k.c(29),t=T().project;let n;e[0]!==t.enabledPlugins?(n=t.enabledPlugins??[],e[0]=t.enabledPlugins,e[1]=n):n=e[1];const l=n;let r,i,c,m,o;if(e[2]!==l){const b=H.filter(N=>l.includes(N.pluginId)).map(pe);let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x={key:"general",label:"General",icon:s.jsx(me,{size:14}),to:"/$org/settings/general"},e[8]=x):x=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={key:"brand-context",label:"Brand Context",icon:s.jsx(le,{size:14}),to:"/$org/settings/brand-context"},e[9]=g):g=e[9],e[10]===Symbol.for("react.memo_cache_sentinel")?(c={label:"Organization",items:[x,g,{key:"ai-providers",label:"AI Providers",icon:s.jsx(ne,{size:14}),to:"/$org/settings/ai-providers"}]},e[10]=c):c=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y={key:"connections",label:"Connections",icon:s.jsx(re,{size:14}),to:"/$org/settings/connections"},e[11]=y):y=e[11];let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j={key:"agents",label:"Agents",icon:s.jsx(G,{size:14}),to:"/$org/settings/agents"},e[12]=j):j=e[12];let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_={key:"automations",label:"Automations",icon:s.jsx(B,{size:14}),to:"/$org/settings/automations"},e[13]=_):_=e[13],e[14]===Symbol.for("react.memo_cache_sentinel")?(m={label:"Build",items:[y,j,_,{key:"store",label:"Store",icon:s.jsx(ie,{size:14}),to:"/$org/settings/store"}]},e[14]=m):m=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p={key:"monitor",label:"Monitor",icon:s.jsx(oe,{size:14}),to:"/$org/settings/monitor"},e[15]=p):p=e[15];let S;e[16]===Symbol.for("react.memo_cache_sentinel")?(S={key:"members",label:"Members",icon:s.jsx(G,{size:14}),to:"/$org/settings/members"},e[16]=S):S=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u={key:"roles",label:"Roles",icon:s.jsx(xe,{size:14}),to:"/$org/settings/roles"},e[17]=u):u=e[17],e[18]===Symbol.for("react.memo_cache_sentinel")?(o={label:"Manage",items:[p,S,u,{key:"sso",label:"Security",icon:s.jsx(fe,{size:14}),to:"/$org/settings/sso"}]},e[18]=o):o=e[18],r="Extensions";let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v={key:"features",label:"Plugins",icon:s.jsx(B,{size:14}),to:"/$org/settings/features"},e[19]=v):v=e[19],i=[v,...b],e[2]=l,e[3]=r,e[4]=i,e[5]=c,e[6]=m,e[7]=o}else r=e[3],i=e[4],c=e[5],m=e[6],o=e[7];let a;e[20]!==r||e[21]!==i?(a={label:r,items:i},e[20]=r,e[21]=i,e[22]=a):a=e[22];let d;e[23]===Symbol.for("react.memo_cache_sentinel")?(d={label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:s.jsx(be,{size:14}),to:"/$org/settings/profile"}]},e[23]=d):d=e[23];let f;return e[24]!==c||e[25]!==m||e[26]!==o||e[27]!==a?(f=[c,m,o,a,d],e[24]=c,e[25]=m,e[26]=o,e[27]=a,e[28]=f):f=e[28],f}function pe(e){const{key:t,label:n,icon:l,to:r}=e;return{key:t,label:n,icon:l,to:r}}function ge(){const e=k.c(26),t=D();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},e[0]=n):n=e[0];const{org:l}=E(n);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r={select:_e},e[1]=r):r=e[1];const i=R(r);let c;e[2]!==l||e[3]!==i?(c=_=>{const p=_.replace("$org",l);return i.startsWith(p)},e[2]=l,e[3]=i,e[4]=c):c=e[4];const m=c;let o;e[5]!==l?(o={org:l},e[5]=l,e[6]=o):o=e[6];let a,d;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(q,{size:14}),d=s.jsx("span",{children:"Settings"}),e[7]=a,e[8]=d):(a=e[7],d=e[8]);let f;e[9]!==o?(f=s.jsx(w,{className:"pt-0 pr-0 pb-3 md:pb-3 pl-0",children:s.jsx(C,{children:s.jsx(O,{className:"gap-1.5",children:s.jsx(P,{children:s.jsx(M,{asChild:!0,children:s.jsxs(z,{to:"/$org",params:o,className:"flex items-center gap-2 text-sm text-muted-foreground",children:[a,d]})})})})})}),e[9]=o,e[10]=f):f=e[10];let h;if(e[11]!==t||e[12]!==m||e[13]!==l){let _;e[15]!==m||e[16]!==l?(_=(p,S)=>s.jsxs(w,{className:"pt-0 pr-0 pb-0 pl-0",children:[p.label&&s.jsx("p",{className:$("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",S>0&&"mt-3"),children:p.label}),s.jsx(C,{children:s.jsx(O,{className:"gap-0.5",children:p.items.map(u=>s.jsx(P,{children:s.jsx(M,{asChild:!0,isActive:m(u.to),children:s.jsxs(z,{to:u.to,params:{org:l},onClick:()=>L("settings_nav_clicked",{section_key:u.key,section_label:u.label,group_label:p.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:u.icon}),s.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},`${p.label}-${S}`),e[15]=m,e[16]=l,e[17]=_):_=e[17],h=t.map(_),e[11]=t,e[12]=m,e[13]=l,e[14]=h}else h=e[14];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[18]=b):b=e[18];let x;e[19]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs(w,{className:"pt-0 pr-0 pb-0 pl-0",children:[b,s.jsx(C,{children:s.jsx(O,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs(M,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(F,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[19]=x):x=e[19];let g;e[20]!==f||e[21]!==h?(g=s.jsxs(Y,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0",children:[f,h,x]}),e[20]=f,e[21]=h,e[22]=g):g=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.288.0"]})}),e[23]=y):y=e[23];let j;return e[24]!==g?(j=s.jsxs(Z,{variant:"sidebar",children:[g,y]}),e[24]=g,e[25]=j):j=e[25],j}function je(){L("signed_out",{source:"settings_sidebar"}),W.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=k.c(29),{onClose:n}=e,l=D();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org"},t[0]=r):r=t[0];const{org:i}=E(r);let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c={select:ve},t[1]=c):c=t[1];const m=R(c);let o;t[2]!==i||t[3]!==m?(o=S=>{const u=S.replace("$org",i);return m.startsWith(u)},t[2]=i,t[3]=m,t[4]=o):o=t[4];const a=o;let d;t[5]!==i?(d={org:i},t[5]=i,t[6]=d):d=t[6];let f,h;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(q,{size:16,className:"shrink-0"}),h=s.jsx("span",{children:"Settings"}),t[7]=f,t[8]=h):(f=t[7],h=t[8]);let b;t[9]!==n||t[10]!==d?(b=s.jsx("div",{className:"flex items-center h-14 px-4 shrink-0 border-b border-border/50",children:s.jsxs(z,{to:"/$org",params:d,onClick:n,className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[f,h]})}),t[9]=n,t[10]=d,t[11]=b):b=t[11];let x;if(t[12]!==l||t[13]!==a||t[14]!==n||t[15]!==i){let S;t[17]!==a||t[18]!==n||t[19]!==i?(S=(u,v)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&s.jsx("p",{className:$("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",v>0&&"mt-3"),children:u.label}),u.items.map(N=>s.jsxs(z,{to:N.to,params:{org:i},onClick:n,className:$("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",a(N.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsx("span",{className:"shrink-0",children:N.icon}),s.jsx("span",{className:"truncate",children:N.label})]},N.key))]},`${u.label}-${v}`),t[17]=a,t[18]=n,t[19]=i,t[20]=S):S=t[20],x=l.map(S),t[12]=l,t[13]=a,t[14]=n,t[15]=i,t[16]=x}else x=t[16];let g;t[21]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[21]=g):g=t[21];let y;t[22]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[g,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(F,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[22]=y):y=t[22];let j;t[23]!==x?(j=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[x,y]}),t[23]=x,t[24]=j):j=t[24];let _;t[25]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.288.0"]})}),t[25]=_):_=t[25];let p;return t[26]!==j||t[27]!==b?(p=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[b,j,_]}),t[26]=j,t[27]=b,t[28]=p):p=t[28],p}function Se(){return W.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=k.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("button",{type:"button",onClick:$e,className:"flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Go back",children:s.jsx(ae,{size:16})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"shrink-0 flex items-center justify-between pl-1 pr-2 h-10",children:s.jsxs("div",{className:"flex items-center gap-0.5 min-w-0",children:[t,s.jsx("button",{type:"button",onClick:ke,className:"flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Go forward",children:s.jsx(de,{size:16})})]})}),e[1]=n):n=e[1],n}function ke(){return window.history.forward()}function $e(){return window.history.back()}function ze(e){const t=k.c(3),{onOpenSidebar:n}=e;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ce,{size:20}),t[0]=l):l=t[0];let r;return t[1]!==n?(r=s.jsx("div",{className:"shrink-0 flex items-center justify-between px-3 h-12 bg-background border-b border-border",children:s.jsx("button",{type:"button",onClick:n,className:"flex size-8 items-center justify-center rounded-md text-foreground/60 hover:bg-accent hover:text-foreground transition-colors","aria-label":"Open menu",children:l})}),t[1]=n,t[2]=r):r=t[2],r}function we(){const e=k.c(17),t=he(),{org:n}=T();ue(n.id);const{setOpenMobile:l,openMobile:r}=X();if(t){let a;e[0]!==l?(a=s.jsx(ze,{onOpenSidebar:()=>l(!0)}),e[0]=l,e[1]=a):a=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(A,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(I,{})})})}),e[2]=d):d=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ee,{className:"sr-only",children:"Navigation"}),e[3]=f):f=e[3];let h;e[4]!==l?(h=s.jsxs(se,{side:"left",hideCloseButton:!0,className:"w-[calc(100vw-3rem)] sm:max-w-md! p-0",children:[f,s.jsx(ye,{onClose:()=>l(!1)})]}),e[4]=l,e[5]=h):h=e[5];let b;e[6]!==r||e[7]!==l||e[8]!==h?(b=s.jsx(te,{open:r,onOpenChange:l,children:h}),e[6]=r,e[7]=l,e[8]=h,e[9]=b):b=e[9];let x;return e[10]!==a||e[11]!==b?(x=s.jsxs("div",{className:"flex flex-col flex-1 bg-background min-h-0",children:[a,d,b]}),e[10]=a,e[11]=b,e[12]=x):x=e[12],x}let i;e[13]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ne,{}),e[13]=i):i=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=$("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),e[14]=c):c=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(J,{size:20,className:"animate-spin text-muted-foreground"})}),e[15]=m):m=e[15];let o;return e[16]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(s.Fragment,{children:[i,s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:c,children:s.jsx(K.Suspense,{fallback:m,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(A,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(I,{})})})})})})})]}),e[16]=o):o=e[16],o}function He(){const e=k.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={"--sidebar-width-icon":"3.5rem"},e[0]=t):t=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ge,{}),e[1]=n):n=e[1];let l;return e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Q,{defaultOpen:!0,children:s.jsx("div",{className:"flex flex-col h-dvh overflow-hidden",children:s.jsxs(U,{className:"flex-1 bg-sidebar",style:t,children:[n,s.jsx(V,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(we,{})})]})})}),e[2]=l):l=e[2],l}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,He as default};
1
+ import{e as k,g as E,a4 as R,j as s,s as T,aG as H,c as $,ay as z,t as L,b as W,O as I,l as J,r as K}from"./index-D3dcRy4-.js";import{k as Q,l as U,m as V,u as X,S as w,a as C,b as O,d as P,c as M,f as Y,g as Z,q as A,n as ee,o as se,p as te}from"./index-B07jP2sp.js";import{i as q}from"./ArrowNarrowLeft-dDBZy2uy.js";import{n as le,d as ne,b as re,e as ie,f as oe,i as F,a as ae,c as ce}from"./ZapSquare-Q_j-wpZU.js";import{t as me,a as G}from"./Users03-kskEQmar.js";import{i as de}from"./ChevronRight-Df7bIxwE.js";import{i as fe}from"./Lock01-D_RqxNIk.js";import{i as xe}from"./Shield01-CyMbm-kt.js";import{s as be}from"./User01-CtVgwrxn.js";import{i as B}from"./Zap-CjGMKfBw.js";import{u as he}from"./use-mobile-BwJlvmat.js";import{u as ue}from"./use-status-sounds-CnYkx9X0.js";import"./X-KZf37p0i.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-BmJPvHjL.js";import"./create-sse-subscription-CxkOgzKf.js";function D(){const e=k.c(29),t=T().project;let n;e[0]!==t.enabledPlugins?(n=t.enabledPlugins??[],e[0]=t.enabledPlugins,e[1]=n):n=e[1];const l=n;let r,i,c,m,o;if(e[2]!==l){const b=H.filter(N=>l.includes(N.pluginId)).map(pe);let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x={key:"general",label:"General",icon:s.jsx(me,{size:14}),to:"/$org/settings/general"},e[8]=x):x=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={key:"brand-context",label:"Brand Context",icon:s.jsx(le,{size:14}),to:"/$org/settings/brand-context"},e[9]=g):g=e[9],e[10]===Symbol.for("react.memo_cache_sentinel")?(c={label:"Organization",items:[x,g,{key:"ai-providers",label:"AI Providers",icon:s.jsx(ne,{size:14}),to:"/$org/settings/ai-providers"}]},e[10]=c):c=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y={key:"connections",label:"Connections",icon:s.jsx(re,{size:14}),to:"/$org/settings/connections"},e[11]=y):y=e[11];let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j={key:"agents",label:"Agents",icon:s.jsx(G,{size:14}),to:"/$org/settings/agents"},e[12]=j):j=e[12];let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_={key:"automations",label:"Automations",icon:s.jsx(B,{size:14}),to:"/$org/settings/automations"},e[13]=_):_=e[13],e[14]===Symbol.for("react.memo_cache_sentinel")?(m={label:"Build",items:[y,j,_,{key:"store",label:"Store",icon:s.jsx(ie,{size:14}),to:"/$org/settings/store"}]},e[14]=m):m=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p={key:"monitor",label:"Monitor",icon:s.jsx(oe,{size:14}),to:"/$org/settings/monitor"},e[15]=p):p=e[15];let S;e[16]===Symbol.for("react.memo_cache_sentinel")?(S={key:"members",label:"Members",icon:s.jsx(G,{size:14}),to:"/$org/settings/members"},e[16]=S):S=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u={key:"roles",label:"Roles",icon:s.jsx(xe,{size:14}),to:"/$org/settings/roles"},e[17]=u):u=e[17],e[18]===Symbol.for("react.memo_cache_sentinel")?(o={label:"Manage",items:[p,S,u,{key:"sso",label:"Security",icon:s.jsx(fe,{size:14}),to:"/$org/settings/sso"}]},e[18]=o):o=e[18],r="Extensions";let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v={key:"features",label:"Plugins",icon:s.jsx(B,{size:14}),to:"/$org/settings/features"},e[19]=v):v=e[19],i=[v,...b],e[2]=l,e[3]=r,e[4]=i,e[5]=c,e[6]=m,e[7]=o}else r=e[3],i=e[4],c=e[5],m=e[6],o=e[7];let a;e[20]!==r||e[21]!==i?(a={label:r,items:i},e[20]=r,e[21]=i,e[22]=a):a=e[22];let d;e[23]===Symbol.for("react.memo_cache_sentinel")?(d={label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:s.jsx(be,{size:14}),to:"/$org/settings/profile"}]},e[23]=d):d=e[23];let f;return e[24]!==c||e[25]!==m||e[26]!==o||e[27]!==a?(f=[c,m,o,a,d],e[24]=c,e[25]=m,e[26]=o,e[27]=a,e[28]=f):f=e[28],f}function pe(e){const{key:t,label:n,icon:l,to:r}=e;return{key:t,label:n,icon:l,to:r}}function ge(){const e=k.c(26),t=D();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},e[0]=n):n=e[0];const{org:l}=E(n);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r={select:_e},e[1]=r):r=e[1];const i=R(r);let c;e[2]!==l||e[3]!==i?(c=_=>{const p=_.replace("$org",l);return i.startsWith(p)},e[2]=l,e[3]=i,e[4]=c):c=e[4];const m=c;let o;e[5]!==l?(o={org:l},e[5]=l,e[6]=o):o=e[6];let a,d;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(q,{size:14}),d=s.jsx("span",{children:"Settings"}),e[7]=a,e[8]=d):(a=e[7],d=e[8]);let f;e[9]!==o?(f=s.jsx(w,{className:"pt-0 pr-0 pb-3 md:pb-3 pl-0",children:s.jsx(C,{children:s.jsx(O,{className:"gap-1.5",children:s.jsx(P,{children:s.jsx(M,{asChild:!0,children:s.jsxs(z,{to:"/$org",params:o,className:"flex items-center gap-2 text-sm text-muted-foreground",children:[a,d]})})})})})}),e[9]=o,e[10]=f):f=e[10];let h;if(e[11]!==t||e[12]!==m||e[13]!==l){let _;e[15]!==m||e[16]!==l?(_=(p,S)=>s.jsxs(w,{className:"pt-0 pr-0 pb-0 pl-0",children:[p.label&&s.jsx("p",{className:$("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",S>0&&"mt-3"),children:p.label}),s.jsx(C,{children:s.jsx(O,{className:"gap-0.5",children:p.items.map(u=>s.jsx(P,{children:s.jsx(M,{asChild:!0,isActive:m(u.to),children:s.jsxs(z,{to:u.to,params:{org:l},onClick:()=>L("settings_nav_clicked",{section_key:u.key,section_label:u.label,group_label:p.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:u.icon}),s.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},`${p.label}-${S}`),e[15]=m,e[16]=l,e[17]=_):_=e[17],h=t.map(_),e[11]=t,e[12]=m,e[13]=l,e[14]=h}else h=e[14];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[18]=b):b=e[18];let x;e[19]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs(w,{className:"pt-0 pr-0 pb-0 pl-0",children:[b,s.jsx(C,{children:s.jsx(O,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs(M,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(F,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[19]=x):x=e[19];let g;e[20]!==f||e[21]!==h?(g=s.jsxs(Y,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0",children:[f,h,x]}),e[20]=f,e[21]=h,e[22]=g):g=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.289.0"]})}),e[23]=y):y=e[23];let j;return e[24]!==g?(j=s.jsxs(Z,{variant:"sidebar",children:[g,y]}),e[24]=g,e[25]=j):j=e[25],j}function je(){L("signed_out",{source:"settings_sidebar"}),W.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=k.c(29),{onClose:n}=e,l=D();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org"},t[0]=r):r=t[0];const{org:i}=E(r);let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c={select:ve},t[1]=c):c=t[1];const m=R(c);let o;t[2]!==i||t[3]!==m?(o=S=>{const u=S.replace("$org",i);return m.startsWith(u)},t[2]=i,t[3]=m,t[4]=o):o=t[4];const a=o;let d;t[5]!==i?(d={org:i},t[5]=i,t[6]=d):d=t[6];let f,h;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(q,{size:16,className:"shrink-0"}),h=s.jsx("span",{children:"Settings"}),t[7]=f,t[8]=h):(f=t[7],h=t[8]);let b;t[9]!==n||t[10]!==d?(b=s.jsx("div",{className:"flex items-center h-14 px-4 shrink-0 border-b border-border/50",children:s.jsxs(z,{to:"/$org",params:d,onClick:n,className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[f,h]})}),t[9]=n,t[10]=d,t[11]=b):b=t[11];let x;if(t[12]!==l||t[13]!==a||t[14]!==n||t[15]!==i){let S;t[17]!==a||t[18]!==n||t[19]!==i?(S=(u,v)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&s.jsx("p",{className:$("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",v>0&&"mt-3"),children:u.label}),u.items.map(N=>s.jsxs(z,{to:N.to,params:{org:i},onClick:n,className:$("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",a(N.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsx("span",{className:"shrink-0",children:N.icon}),s.jsx("span",{className:"truncate",children:N.label})]},N.key))]},`${u.label}-${v}`),t[17]=a,t[18]=n,t[19]=i,t[20]=S):S=t[20],x=l.map(S),t[12]=l,t[13]=a,t[14]=n,t[15]=i,t[16]=x}else x=t[16];let g;t[21]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[21]=g):g=t[21];let y;t[22]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[g,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(F,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[22]=y):y=t[22];let j;t[23]!==x?(j=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[x,y]}),t[23]=x,t[24]=j):j=t[24];let _;t[25]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.289.0"]})}),t[25]=_):_=t[25];let p;return t[26]!==j||t[27]!==b?(p=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[b,j,_]}),t[26]=j,t[27]=b,t[28]=p):p=t[28],p}function Se(){return W.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=k.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("button",{type:"button",onClick:$e,className:"flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Go back",children:s.jsx(ae,{size:16})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"shrink-0 flex items-center justify-between pl-1 pr-2 h-10",children:s.jsxs("div",{className:"flex items-center gap-0.5 min-w-0",children:[t,s.jsx("button",{type:"button",onClick:ke,className:"flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Go forward",children:s.jsx(de,{size:16})})]})}),e[1]=n):n=e[1],n}function ke(){return window.history.forward()}function $e(){return window.history.back()}function ze(e){const t=k.c(3),{onOpenSidebar:n}=e;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ce,{size:20}),t[0]=l):l=t[0];let r;return t[1]!==n?(r=s.jsx("div",{className:"shrink-0 flex items-center justify-between px-3 h-12 bg-background border-b border-border",children:s.jsx("button",{type:"button",onClick:n,className:"flex size-8 items-center justify-center rounded-md text-foreground/60 hover:bg-accent hover:text-foreground transition-colors","aria-label":"Open menu",children:l})}),t[1]=n,t[2]=r):r=t[2],r}function we(){const e=k.c(17),t=he(),{org:n}=T();ue(n.id);const{setOpenMobile:l,openMobile:r}=X();if(t){let a;e[0]!==l?(a=s.jsx(ze,{onOpenSidebar:()=>l(!0)}),e[0]=l,e[1]=a):a=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(A,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(I,{})})})}),e[2]=d):d=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ee,{className:"sr-only",children:"Navigation"}),e[3]=f):f=e[3];let h;e[4]!==l?(h=s.jsxs(se,{side:"left",hideCloseButton:!0,className:"w-[calc(100vw-3rem)] sm:max-w-md! p-0",children:[f,s.jsx(ye,{onClose:()=>l(!1)})]}),e[4]=l,e[5]=h):h=e[5];let b;e[6]!==r||e[7]!==l||e[8]!==h?(b=s.jsx(te,{open:r,onOpenChange:l,children:h}),e[6]=r,e[7]=l,e[8]=h,e[9]=b):b=e[9];let x;return e[10]!==a||e[11]!==b?(x=s.jsxs("div",{className:"flex flex-col flex-1 bg-background min-h-0",children:[a,d,b]}),e[10]=a,e[11]=b,e[12]=x):x=e[12],x}let i;e[13]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ne,{}),e[13]=i):i=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=$("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),e[14]=c):c=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(J,{size:20,className:"animate-spin text-muted-foreground"})}),e[15]=m):m=e[15];let o;return e[16]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(s.Fragment,{children:[i,s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:c,children:s.jsx(K.Suspense,{fallback:m,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(A,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(I,{})})})})})})})]}),e[16]=o):o=e[16],o}function He(){const e=k.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={"--sidebar-width-icon":"3.5rem"},e[0]=t):t=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ge,{}),e[1]=n):n=e[1];let l;return e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Q,{defaultOpen:!0,children:s.jsx("div",{className:"flex flex-col h-dvh overflow-hidden",children:s.jsxs(U,{className:"flex-1 bg-sidebar",style:t,children:[n,s.jsx(V,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(we,{})})]})})}),e[2]=l):l=e[2],l}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,He as default};
@@ -1 +1 @@
1
- import{e as N,c as v,r as S,j as r}from"./index-CVUETRIB.js";import{C as w}from"./card-oTGN-YLV.js";import{i as E}from"./ArrowUpRight-DrcSZgbj.js";function I(c){const e=N.c(11),{title:i,description:l,docsHref:t,actions:s,className:n,children:o}=c;let a;e[0]!==n?(a=v("flex flex-col gap-3",n),e[0]=n,e[1]=a):a=e[1];let d;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==i?(d=(i||l||t||s)&&r.jsxs("div",{className:"flex items-center justify-between gap-3 px-4",children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=i,e[6]=d):d=e[6];let m;return e[7]!==o||e[8]!==a||e[9]!==d?(m=r.jsxs("section",{className:a,children:[d,o]}),e[7]=o,e[8]=a,e[9]=d,e[10]=m):m=e[10],m}function P(c){const e=N.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const a=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=v("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=a.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let o;return e[7]!==t||e[8]!==s||e[9]!==n?(o=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=o):o=e[10],o}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=N.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:o,children:a}=c,d=a?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",m=n&&"hover:bg-muted/50 cursor-pointer";let f;e[0]!==o||e[1]!==d||e[2]!==m?(f=v(d,m,o),e[0]=o,e[1]=d,e[2]=m,e[3]=f):f=e[3];const b=n?"button":void 0,k=n?0:void 0;let x;e[4]!==n?(x=n?C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==a||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,a]}),e[12]=a,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==f||e[22]!==b||e[23]!==k||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:f,onClick:n,role:b,tabIndex:k,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=f,e[22]=b,e[23]=k,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=N.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=v("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=N.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=v("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,H as c,K as d};
1
+ import{e as N,c as v,r as S,j as r}from"./index-D3dcRy4-.js";import{C as w}from"./card-kpHhMcOo.js";import{i as E}from"./ArrowUpRight-DR20SS60.js";function I(c){const e=N.c(11),{title:i,description:l,docsHref:t,actions:s,className:n,children:o}=c;let a;e[0]!==n?(a=v("flex flex-col gap-3",n),e[0]=n,e[1]=a):a=e[1];let d;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==i?(d=(i||l||t||s)&&r.jsxs("div",{className:"flex items-center justify-between gap-3 px-4",children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=i,e[6]=d):d=e[6];let m;return e[7]!==o||e[8]!==a||e[9]!==d?(m=r.jsxs("section",{className:a,children:[d,o]}),e[7]=o,e[8]=a,e[9]=d,e[10]=m):m=e[10],m}function P(c){const e=N.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const a=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=v("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=a.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let o;return e[7]!==t||e[8]!==s||e[9]!==n?(o=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=o):o=e[10],o}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=N.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:o,children:a}=c,d=a?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",m=n&&"hover:bg-muted/50 cursor-pointer";let f;e[0]!==o||e[1]!==d||e[2]!==m?(f=v(d,m,o),e[0]=o,e[1]=d,e[2]=m,e[3]=f):f=e[3];const b=n?"button":void 0,k=n?0:void 0;let x;e[4]!==n?(x=n?C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==a||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,a]}),e[12]=a,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==f||e[22]!==b||e[23]!==k||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:f,onClick:n,role:b,tabIndex:k,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=f,e[22]=b,e[23]=k,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=N.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=v("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=N.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=v("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,H as c,K as d};
@@ -0,0 +1 @@
1
+ import{e as v,j as s,bj as D,K as T,B as w,f as P,o as I,s as K,g as E,d as M,ab as A,r as N,V as L,b as R,a3 as q,S as $,O as z,bk as F}from"./index-D3dcRy4-.js";import{c as U,a as G,D as B,d as H}from"./dialog-eYBbNtPx.js";import{R as Q}from"./required-auth-layout-BrXS6Et-.js";import{u as Y}from"./use-tasks-BtgjavUX.js";import{b as V}from"./use-organization-settings-DlzwYRHw.js";import{u as W}from"./use-org-sso-D35VQct2.js";import{i as J}from"./Lock01-D_RqxNIk.js";const C=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),O=C?"⌘":"Ctrl",k={keyboardShortcuts:{keys:[O,"K"],description:"Keyboard shortcuts"},focusChatInput:{keys:[O,"L"],description:"Focus chat input"},saveAndFormat:{keys:[O,"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:[O,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[O,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",O,"S"],description:"New task"},toggleDaemon:{keys:[O,"D"],description:"Toggle daemon logs"}},X=[{label:"General",shortcuts:[k.keyboardShortcuts,k.newTask,k.toggleDaemon]},{label:"Editor",shortcuts:[k.saveAndFormat]},{label:"Chat",shortcuts:[k.focusChatInput,k.togglePlanMode,k.sendMessage,k.newLine]},{label:"Questions",shortcuts:[k.selectOption]},{label:"Monitoring",shortcuts:[k.applyFilter]}];function Z(e){return C?e.metaKey:e.ctrlKey}function ee(e){const t=v.c(5),{open:o,onOpenChange:a}=e;let m;t[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(G,{children:s.jsx(B,{children:"Keyboard Shortcuts"})}),t[0]=m):m=t[0];let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(U,{className:"sm:max-w-md",children:[m,s.jsx("div",{className:"flex flex-col gap-4",children:X.map(te)})]}),t[1]=c):c=t[1];let r;return t[2]!==a||t[3]!==o?(r=s.jsx(H,{open:o,onOpenChange:a,children:c}),t[2]=a,t[3]=o,t[4]=r):r=t[4],r}function te(e){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:e.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:e.shortcuts.map(se)})]},e.label)}function se(e){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:e.description}),s.jsx("div",{className:"flex items-center gap-1",children:e.keys.map(ne)})]},e.description)}function ne(e){return s.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:e},e)}function oe({activeOrg:e}){return e&&D(e.id,{name:e.name??void 0,slug:e.slug??void 0}),null}function ae(e,t,o){if(!o)return null;const a=e.getQueriesData({queryKey:T.tasksPrefix(t)});for(const[,m]of a){const c=m?.items?.find(r=>r.id===o);if(c?.branch)return c.branch}return null}function ie(e){const t=v.c(17),{orgId:o,orgName:a,domain:m}=e;let c;t[0]!==o?(c=()=>{window.location.href=`/api/org-sso/authorize?orgId=${encodeURIComponent(o)}`},t[0]=o,t[1]=c):c=t[1];const r=c,g=re;let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(J,{className:"h-6 w-6 text-primary"})}),t[2]=u):u=t[2];let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),t[3]=f):f=t[3];let p;t[4]!==m||t[5]!==a?(p=a?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:a})," requires SSO authentication",m?` via ${m}`:"","."]}):"This organization requires SSO authentication to access.",t[4]=m,t[5]=a,t[6]=p):p=t[6];let i;t[7]!==p?(i=s.jsxs("div",{className:"space-y-2",children:[f,s.jsx("p",{className:"text-sm text-muted-foreground",children:p})]}),t[7]=p,t[8]=i):i=t[8];let y;t[9]!==r?(y=s.jsx(w,{onClick:r,children:"Sign in with SSO"}),t[9]=r,t[10]=y):y=t[10];let S;t[11]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(w,{variant:"ghost",onClick:g,children:"Go back"}),t[11]=S):S=t[11];let b;t[12]!==y?(b=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[y,S]}),t[12]=y,t[13]=b):b=t[13];let x;return t[14]!==i||t[15]!==b?(x=s.jsx("div",{className:"flex items-center justify-center min-h-screen bg-background",children:s.jsxs("div",{className:"flex flex-col items-center text-center space-y-4 max-w-sm px-6",children:[u,i,b]})}),t[14]=i,t[15]=b,t[16]=x):x=t[16],x}function re(){window.location.href="/"}function ce(e){const t=v.c(8),{org:o,children:a}=e,c=V(o.id)?.enabled_plugins??null;let r;t[0]!==o.id||t[1]!==o.name||t[2]!==c?(r={id:o.id,organizationId:o.id,slug:"_org",name:o.name,enabledPlugins:c,ui:null},t[0]=o.id,t[1]=o.name,t[2]=c,t[3]=r):r=t[3];const g=r;let u;return t[4]!==a||t[5]!==o||t[6]!==g?(u=s.jsx(F,{org:o,project:g,children:a}),t[4]=a,t[5]=o,t[6]=g,t[7]=u):u=t[7],u}function le(){const e=P(),t=I(),o=Y(),{locator:a}=K(),m=E({strict:!1}),c=M({strict:!1}),r=m.org??"",g=m.taskId??"",u=(n,l,d=!0)=>e({to:"/$org/$taskId",params:{org:r,taskId:n},search:l,replace:d}),f=(n,l=!0)=>u(g,n,l),p=n=>f(l=>({...l,chat:n?1:0})),i=n=>f(l=>({...l,tasks:n?1:0})),y=(n,l)=>u(n,d=>{const j={chat:1};return l?j.virtualmcpid=l:d.virtualmcpid&&(j.virtualmcpid=d.virtualmcpid),d.tasks&&(j.tasks=d.tasks),d.main&&(j.main=d.main),j},!1);return{setChatOpen:p,setTasksOpen:i,setTaskId:y,createNewTask:async()=>{const n=crypto.randomUUID(),l=ae(t,a,g),d=c.virtualmcpid;try{await o.create.mutateAsync({id:n,...d?{virtual_mcp_id:d}:{},...l?{branch:l}:{}})}catch{}y(n)},openTab:n=>u(g||crypto.randomUUID(),l=>({...l,main:n})),toggleMain:()=>f(n=>{if(n.main!==void 0&&n.main!=="0")return{...n,main:"0"};const d={...n};return delete d.main,d})}}function de(){const e=v.c(27);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org",shouldThrow:!1},e[0]=t):t=e[0];const a=A(t)?.params.org,[m,c]=N.useState(!1);let r,g;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const h=_=>{Z(_)&&_.code==="KeyK"&&(_.preventDefault(),c(!0))};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},g=[],e[1]=r,e[2]=g):(r=e[1],g=e[2]),N.useEffect(r,g);let u;e[3]!==a?(u=T.activeOrganization(a),e[3]=a,e[4]=u):u=e[4];let f;e[5]!==a?(f=async()=>{if(!a)return null;const{data:h}=await R.organization.setActive({organizationSlug:a});return h&&localStorage.setItem(q.lastOrgSlug(),a),h},e[5]=a,e[6]=f):f=e[6];let p;e[7]!==u||e[8]!==f?(p={queryKey:u,queryFn:f,gcTime:1/0,refetchOnWindowFocus:!1},e[7]=u,e[8]=f,e[9]=p):p=e[9];const{data:i}=L(p),y=i?.id,{data:S}=W(y);if(!i){let h;return e[10]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx($,{}),e[10]=h):h=e[10],h}if(S?.ssoRequired&&!S.authenticated){let h;return e[11]!==i.id||e[12]!==i.name||e[13]!==S.domain?(h=s.jsx(ie,{orgId:i.id,orgName:i.name,domain:S.domain}),e[11]=i.id,e[12]=i.name,e[13]=S.domain,e[14]=h):h=e[14],h}const b=i.logo??null;let x;e[15]!==i||e[16]!==b?(x={...i,logo:b},e[15]=i,e[16]=b,e[17]=x):x=e[17];let n;e[18]!==i?(n=s.jsx(oe,{activeOrg:i}),e[18]=i,e[19]=n):n=e[19];let l;e[20]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(z,{}),e[20]=l):l=e[20];let d;e[21]!==m?(d=s.jsx(ee,{open:m,onOpenChange:c}),e[21]=m,e[22]=d):d=e[22];let j;return e[23]!==d||e[24]!==x||e[25]!==n?(j=s.jsxs(ce,{org:x,children:[n,l,d]}),e[23]=d,e[24]=x,e[25]=n,e[26]=j):j=e[26],j}function ue(){const e=v.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Q,{children:s.jsx(de,{})}),e[0]=t):t=e[0],t}const Se=Object.freeze(Object.defineProperty({__proto__:null,default:ue,usePanelActions:le},Symbol.toStringTag,{value:"Module"}));export{Z as i,ae as r,Se as s,le as u};
@@ -1 +1 @@
1
- import{e as n,c,j as i}from"./index-CVUETRIB.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
1
+ import{e as n,c,j as i}from"./index-D3dcRy4-.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
@@ -1 +1 @@
1
- import{s as N,r as j,j as e,B as p,t as S,z as c,e as b}from"./index-CVUETRIB.js";import{D as z}from"./domain-settings-BcSGKzwX.js";import{P as f}from"./index-Dig_TVyF.js";import{I as l}from"./input-CL-LUIlC.js";import{S as k}from"./switch-DGYFt_K8.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-4JoNv6HV.js";import{d as F,S as y,a as C,b as a,c as O}from"./settings-section-BS3Z4RWi.js";import{s as L}from"./Trash01-CLPACLPe.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./constants-Dsh71ijv.js";import"./use-mobile-BpBXbl16.js";import"./X-BI3qXgCM.js";import"./card-oTGN-YLV.js";import"./ArrowUpRight-DrcSZgbj.js";function B(){const{org:t}=N(),{data:r,isLoading:E}=P(t.id),x=R(t.id),h=A(t.id),v=T(t.id),[s,d]=j.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=j.useState(!1),u=r?.configured&&r.config,o=r?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},w=async()=>{if(!s.issuer||!s.clientId||!s.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!s.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:s.issuer,clientId:s.clientId,clientSecret:s.clientSecret,discoveryEndpoint:s.discoveryEndpoint||void 0,scopes:s.scopes.split(/\s+/).filter(Boolean),domain:s.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:t.id,email_domain:s.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},_=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:t.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},D=async i=>{try{await v.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:t.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(z,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(a,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(a,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(a,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(a,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(k,{checked:o.enforced,onCheckedChange:D,disabled:v.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:_,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/org-sso/authorize?orgId=${t.id}`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(a,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:s.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:s.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:s.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:s.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:s.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:s.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:w,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ee(){const t=b.c(1);let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(B,{}),t[0]=r):r=t[0],r}export{ee as default};
1
+ import{s as N,r as j,j as e,B as p,t as S,z as c,e as b}from"./index-D3dcRy4-.js";import{D as z}from"./domain-settings-5yGQjw4b.js";import{P as f}from"./index-B07jP2sp.js";import{I as l}from"./input-BTdB8RPC.js";import{S as k}from"./switch-CrRugnBx.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-D35VQct2.js";import{d as F,S as y,a as C,b as a,c as O}from"./settings-section-zap-Boy4.js";import{s as L}from"./Trash01-5isrbkO6.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./constants-DV1Uc_8Q.js";import"./use-mobile-BwJlvmat.js";import"./X-KZf37p0i.js";import"./card-kpHhMcOo.js";import"./ArrowUpRight-DR20SS60.js";function B(){const{org:t}=N(),{data:r,isLoading:E}=P(t.id),x=R(t.id),h=A(t.id),v=T(t.id),[s,d]=j.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=j.useState(!1),u=r?.configured&&r.config,o=r?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},w=async()=>{if(!s.issuer||!s.clientId||!s.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!s.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:s.issuer,clientId:s.clientId,clientSecret:s.clientSecret,discoveryEndpoint:s.discoveryEndpoint||void 0,scopes:s.scopes.split(/\s+/).filter(Boolean),domain:s.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:t.id,email_domain:s.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},_=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:t.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},D=async i=>{try{await v.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:t.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(z,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(a,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(a,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(a,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(a,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(k,{checked:o.enforced,onCheckedChange:D,disabled:v.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:_,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/org-sso/authorize?orgId=${t.id}`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(a,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:s.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:s.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:s.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:s.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:s.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:s.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:w,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ee(){const t=b.c(1);let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(B,{}),t[0]=r):r=t[0],r}export{ee as default};
@@ -1 +1 @@
1
- import{e as D,j as s,E as le,r as K,s as ae,o as ce,f as de,g as me,B as Y,t as te,K as fe,a as ge,z as ie}from"./index-CVUETRIB.js";import{i as ue}from"./AlertCircle--Y_xi7pz.js";import{i as pe}from"./ChevronRight-D_eqesT2.js";import{s as xe}from"./Plus-DgDw4N5v.js";import{s as he}from"./Trash01-CLPACLPe.js";import{I as X}from"./input-CL-LUIlC.js";import{S as ne}from"./switch-DGYFt_K8.js";import{S as ye}from"./skeleton-C8RqYCI9.js";import{A as oe}from"./avatar-C4Xk2I9Z.js";import{b as je,P as Ce,a as Se}from"./popover-C4684neQ.js";import{a as re}from"./use-connection-PZAuCSXO.js";import{d as Z}from"./constants-Dsh71ijv.js";import{P as G}from"./index-Dig_TVyF.js";import{u as ve}from"./use-registry-connections-fdW_5JrJ.js";import{g as _e,h as be}from"./use-organization-settings-axiNM6Y6.js";import{d as Pe,b as I,S as ee,a as Q}from"./settings-section-BS3Z4RWi.js";import"./User01-C_p7EKq6.js";import"./use-collections-DcKD6Qxv.js";import"./use-mobile-BpBXbl16.js";import"./X-BI3qXgCM.js";import"./card-oTGN-YLV.js";import"./ArrowUpRight-DrcSZgbj.js";function Re(t){const e=D.c(3),{error:n}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let o;return e[1]!==n.message?(o=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",n.message]})]}),e[1]=n.message,e[2]=o):o=e[2],o}function ke(t){const e=D.c(36),{onCancel:n,onSuccess:m}=t,o=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==o||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await o.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:we},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==n?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:n,disabled:d,children:"Cancel"}),e[19]=d,e[20]=n,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function we(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:n,description:m,icon:o,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==o||e[8]!==n?(c=o?s.jsx("img",{src:o,alt:n,className:"size-8 rounded-md object-contain"}):s.jsx(oe,{fallback:n.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=o,e[8]=n,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ae,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(ne,{checked:r,onClick:Ne,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==n||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:n,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=n,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ne(t){return t.stopPropagation()}function Ae(t){return t.stopPropagation()}function Me(){const t=D.c(59),{org:e}=ae(),n=ve(),m=re(),o=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==o||t[4]!==n||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!o)return i===p;const w=o.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=n.find(i=>i.id===p),k=n.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=n.filter(i=>!B.has(i.id));let R;t[13]!==o||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=o??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=o,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const H=C;let U;t[20]!==o||t[21]!==r?(U=async i=>{S(!1);const w=o??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=o,t[21]=r,t[22]=U):U=t[22];const W=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==W||t[28]!==a?(T=a&&s.jsx(ke,{onCancel:()=>S(!1),onSuccess:W}),t[27]=W,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==H||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>H(i.id)},i.id),t[37]=H,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(oe,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(ne,{checked:!1,disabled:!0,onCheckedChange:Te})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=o,t[4]=n,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function Te(){}function ze(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(le,{fallback:Ee,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Me,{})]})})})})})}),t[1]=n):n=t[1],n}function Ee(t){const{error:e}=t;return s.jsx(Re,{error:e??new Error("Failed to load store settings")})}function it(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ze,{}),t[0]=e):e=t[0],e}export{it as default};
1
+ import{e as D,j as s,E as le,r as K,s as ae,o as ce,f as de,g as me,B as Y,t as te,K as fe,a as ge,z as ie}from"./index-D3dcRy4-.js";import{i as ue}from"./AlertCircle-BCfEJcld.js";import{i as pe}from"./ChevronRight-Df7bIxwE.js";import{s as xe}from"./Plus-C-OJiAlg.js";import{s as he}from"./Trash01-5isrbkO6.js";import{I as X}from"./input-BTdB8RPC.js";import{S as ne}from"./switch-CrRugnBx.js";import{S as ye}from"./skeleton-cT9-y8hq.js";import{A as oe}from"./avatar-BiQlJs5k.js";import{b as je,P as Ce,a as Se}from"./popover-0rGXbfVv.js";import{a as re}from"./use-connection-DATDvleR.js";import{d as Z}from"./constants-DV1Uc_8Q.js";import{P as G}from"./index-B07jP2sp.js";import{u as ve}from"./use-registry-connections-BMDx5SL4.js";import{g as _e,h as be}from"./use-organization-settings-DlzwYRHw.js";import{d as Pe,b as I,S as ee,a as Q}from"./settings-section-zap-Boy4.js";import"./User01-CtVgwrxn.js";import"./use-collections-D8VuBtQu.js";import"./use-mobile-BwJlvmat.js";import"./X-KZf37p0i.js";import"./card-kpHhMcOo.js";import"./ArrowUpRight-DR20SS60.js";function Re(t){const e=D.c(3),{error:n}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let o;return e[1]!==n.message?(o=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",n.message]})]}),e[1]=n.message,e[2]=o):o=e[2],o}function ke(t){const e=D.c(36),{onCancel:n,onSuccess:m}=t,o=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==o||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await o.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:we},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==n?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:n,disabled:d,children:"Cancel"}),e[19]=d,e[20]=n,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function we(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:n,description:m,icon:o,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==o||e[8]!==n?(c=o?s.jsx("img",{src:o,alt:n,className:"size-8 rounded-md object-contain"}):s.jsx(oe,{fallback:n.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=o,e[8]=n,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ae,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(ne,{checked:r,onClick:Ne,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==n||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:n,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=n,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ne(t){return t.stopPropagation()}function Ae(t){return t.stopPropagation()}function Me(){const t=D.c(59),{org:e}=ae(),n=ve(),m=re(),o=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==o||t[4]!==n||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!o)return i===p;const w=o.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=n.find(i=>i.id===p),k=n.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=n.filter(i=>!B.has(i.id));let R;t[13]!==o||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=o??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=o,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const H=C;let U;t[20]!==o||t[21]!==r?(U=async i=>{S(!1);const w=o??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=o,t[21]=r,t[22]=U):U=t[22];const W=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==W||t[28]!==a?(T=a&&s.jsx(ke,{onCancel:()=>S(!1),onSuccess:W}),t[27]=W,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==H||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>H(i.id)},i.id),t[37]=H,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(oe,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(ne,{checked:!1,disabled:!0,onCheckedChange:Te})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=o,t[4]=n,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function Te(){}function ze(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(le,{fallback:Ee,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Me,{})]})})})})})}),t[1]=n):n=t[1],n}function Ee(t){const{error:e}=t;return s.jsx(Re,{error:e??new Error("Failed to load store settings")})}function it(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ze,{}),t[0]=e):e=t[0],e}export{it as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-20jGjbo6.js","assets/index-D3dcRy4-.js","assets/index-BHUL0rr0.css","assets/ArrowNarrowLeft-dDBZy2uy.js","assets/CheckCircle-C29ChaU6.js","assets/Container-Ckr-D4x-.js","assets/Settings02-tDR0R-7r.js","assets/XCircle-0jhuLEi-.js","assets/constants-DV1Uc_8Q.js","assets/useInfiniteQuery-NxzX8_KV.js","assets/infiniteQueryObserver-DNXrDhz0.js","assets/badge-BiDYflRu.js","assets/input-BTdB8RPC.js","assets/dropdown-menu-BeTlEYH5.js","assets/ChevronDown-CAze57fI.js","assets/ChevronRight-Df7bIxwE.js","assets/DotsVertical-BooYL5-r.js","assets/table-Chd-IJRh.js","assets/toggle-group-B06Rml5A.js","assets/use-view-mode-ni8MVEBL.js","assets/use-mobile-BwJlvmat.js","assets/SearchMd-DRU7KH2R.js","assets/dialog-eYBbNtPx.js","assets/X-KZf37p0i.js","assets/AlertCircle-BCfEJcld.js","assets/alert-dialog-DGf6p6RH.js","assets/card-kpHhMcOo.js","assets/Trash01-5isrbkO6.js","assets/label-HfwUkinD.js","assets/select-pbe1Tw3i.js","assets/ChevronUp-CTU6V7Q0.js","assets/switch-CrRugnBx.js","assets/textarea-CWhJ3Xwe.js","assets/RefreshCcw01-Bw_4FSKr.js","assets/checkbox-DVSlEbBg.js","assets/LinkExternal01-BF4nSmdO.js","assets/use-copy-C4JHTA85.js","assets/Plus-C-OJiAlg.js","assets/Play-hp4nCWPw.js"])))=>i.map(i=>d[i]);
2
+ import{e as n,f as c,g as m,j as r,l as f,r as l,aE as u}from"./index-D3dcRy4-.js";const g=l.lazy(()=>u(()=>import("./registry-layout-20jGjbo6.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38])));function _(){const e=n.c(5),o=c();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org"},e[0]=t):t=e[0];const{org:i}=m(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"h-full flex items-center justify-center",children:r.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=s):s=e[1];let a;return e[2]!==o||e[3]!==i?(a=r.jsx(l.Suspense,{fallback:s,children:r.jsx(g,{onBack:()=>o({to:"/$org/settings/store",params:{org:i}})})}),e[2]=o,e[3]=i,e[4]=a):a=e[4],a}export{_ as default};
@@ -1 +1 @@
1
- import{r as c,j as i,ah as C,b6 as y,aT as B,ai as I,b7 as M,b8 as H,ao as z,e as A,c as g}from"./index-CVUETRIB.js";var m="Switch",[U]=z(m),[q,L]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:s,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=B({prop:a,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{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(r.onClick,b=>{N(T=>!T),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:s,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...s}=r,a=L(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:s=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(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:s});h.call(l,t),l.dispatchEvent(v)}},[u,t,s]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(r){return r?"checked":"unchecked"}var $=E,D=R;function W(r){const e=A.c(9);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=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]=a):a=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]!==s||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...s,children:n}),e[6]=s,e[7]=a,e[8]=o):o=e[8],o}export{W as S};
1
+ import{r as c,j as i,ah as C,b6 as y,aT as B,ai as I,b7 as M,b8 as H,ao as z,e as A,c as g}from"./index-D3dcRy4-.js";var m="Switch",[U]=z(m),[q,L]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:s,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=B({prop:a,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{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(r.onClick,b=>{N(T=>!T),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:s,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...s}=r,a=L(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:s=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(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:s});h.call(l,t),l.dispatchEvent(v)}},[u,t,s]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(r){return r?"checked":"unchecked"}var $=E,D=R;function W(r){const e=A.c(9);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=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]=a):a=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]!==s||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...s,children:n}),e[6]=s,e[7]=a,e[8]=o):o=e[8],o}export{W as S};
@@ -1 +1 @@
1
- import{e as c,c as i,j as r}from"./index-CVUETRIB.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{x as T,p as a,b,d as c,f as d,m as e};
1
+ import{e as c,c as i,j as r}from"./index-D3dcRy4-.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{x as T,p as a,b,d as c,f as d,m as e};
@@ -1 +1 @@
1
- import{e as b,n as A,V as F,aO as V,aP as k,r as f,j as d,aQ as L,ah as m,ai as y,aR as h,ao as q,aS as D,aT as K,aU as G,aV as O,aW as Q,c as g}from"./index-CVUETRIB.js";import{K as w}from"./constants-Dsh71ijv.js";async function C(s){if(!s.getServerCapabilities()?.prompts)return{prompts:[]};try{return await s.listPrompts()}catch(t){if(t instanceof V&&t.code===k.MethodNotFound)return{prompts:[]};throw t}}async function Z(s,e,t){if(!s.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await s.getPrompt({name:e,arguments:t??{}})}function ee(s){const e=b.c(12);let t,a;e[0]!==s?({client:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=w.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let o;e[5]!==t?(o=()=>C(t),e[5]=t,e[6]=o):o=e[6];const n=a.staleTime??3e4;let i;return e[7]!==a||e[8]!==r||e[9]!==o||e[10]!==n?(i={...a,queryKey:r,queryFn:o,staleTime:n,retry:!1},e[7]=a,e[8]=r,e[9]=o,e[10]=n,e[11]=i):i=e[11],F(i)}function te(s){const e=b.c(12);let t,a;e[0]!==s?({client:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=w.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let o;e[5]!==t?(o=()=>C(t),e[5]=t,e[6]=o):o=e[6];const n=a.staleTime??3e4;let i;return e[7]!==a||e[8]!==r||e[9]!==o||e[10]!==n?(i={...a,queryKey:r,queryFn:o,staleTime:n,retry:!1},e[7]=a,e[8]=r,e[9]=o,e[10]=n,e[11]=i):i=e[11],A(i)}var x="Tabs",[z]=q(x,[h]),P=h(),[B,T]=z(x),N=f.forwardRef((s,e)=>{const{__scopeTabs:t,value:a,onValueChange:r,defaultValue:o,orientation:n="horizontal",dir:i,activationMode:l="automatic",...v}=s,u=D(i),[c,p]=K({prop:a,onChange:r,defaultProp:o??"",caller:x});return d.jsx(B,{scope:t,baseId:G(),value:c,onValueChange:p,orientation:n,dir:u,activationMode:l,children:d.jsx(m.div,{dir:u,"data-orientation":n,...v,ref:e})})});N.displayName=x;var j="TabsList",E=f.forwardRef((s,e)=>{const{__scopeTabs:t,loop:a=!0,...r}=s,o=T(j,t),n=P(t);return d.jsx(O,{asChild:!0,...n,orientation:o.orientation,dir:o.dir,loop:a,children:d.jsx(m.div,{role:"tablist","aria-orientation":o.orientation,...r,ref:e})})});E.displayName=j;var I="TabsTrigger",_=f.forwardRef((s,e)=>{const{__scopeTabs:t,value:a,disabled:r=!1,...o}=s,n=T(I,t),i=P(t),l=M(n.baseId,a),v=$(n.baseId,a),u=a===n.value;return d.jsx(L,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(m.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":v,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...o,ref:e,onMouseDown:y(s.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?n.onValueChange(a):c.preventDefault()}),onKeyDown:y(s.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&n.onValueChange(a)}),onFocus:y(s.onFocus,()=>{const c=n.activationMode!=="manual";!u&&!r&&c&&n.onValueChange(a)})})})});_.displayName=I;var R="TabsContent",S=f.forwardRef((s,e)=>{const{__scopeTabs:t,value:a,forceMount:r,children:o,...n}=s,i=T(R,t),l=M(i.baseId,a),v=$(i.baseId,a),u=a===i.value,c=f.useRef(u);return f.useEffect(()=>{const p=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(p)},[]),d.jsx(Q,{present:r||u,children:({present:p})=>d.jsx(m.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:v,tabIndex:0,...n,ref:e,style:{...s.style,animationDuration:c.current?"0s":void 0},children:p&&o})})});S.displayName=R;function M(s,e){return`${s}-trigger-${e}`}function $(s,e){return`${s}-content-${e}`}var H=N,U=E,W=_,Y=S;function ae(s){const e=b.c(10);let t,a,r;e[0]!==s?({className:t,variant:r,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);const o=r===void 0?"pill":r;let n;e[4]!==t?(n=g("flex flex-col gap-2",t),e[4]=t,e[5]=n):n=e[5];let i;return e[6]!==a||e[7]!==n||e[8]!==o?(i=d.jsx(H,{"data-slot":"tabs","data-variant":o,className:n,...a}),e[6]=a,e[7]=n,e[8]=o,e[9]=i):i=e[9],i}function re(s){const e=b.c(11);let t,a,r;e[0]!==s?({className:t,variant:r,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);const o=r||"pill",n=o==="underline"?"flex h-[52px] items-center border-b border-border":o==="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]!==t||e[5]!==n?(i=g(n,t),e[4]=t,e[5]=n,e[6]=i):i=e[6];let l;return e[7]!==o||e[8]!==a||e[9]!==i?(l=d.jsx(U,{"data-slot":"tabs-list","data-variant":o,className:i,...a}),e[7]=o,e[8]=a,e[9]=i,e[10]=l):l=e[10],l}function se(s){const e=b.c(11);let t,a,r;e[0]!==s?({className:t,variant:r,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);const o=r||"pill",n=o==="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":o==="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]!==t||e[5]!==n?(i=g(n,t),e[4]=t,e[5]=n,e[6]=i):i=e[6];let l;return e[7]!==o||e[8]!==a||e[9]!==i?(l=d.jsx(W,{"data-slot":"tabs-trigger","data-variant":o,className:i,...a}),e[7]=o,e[8]=a,e[9]=i,e[10]=l):l=e[10],l}function oe(s){const e=b.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=g("flex-1 outline-none h-full",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=d.jsx(Y,{"data-slot":"tabs-content",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{ae as T,oe as a,se as b,re as c,te as d,Z as g,C as l,ee as u};
1
+ import{e as b,n as A,V as F,aO as V,aP as k,r as f,j as d,aQ as L,ah as m,ai as y,aR as h,ao as q,aS as D,aT as K,aU as G,aV as O,aW as Q,c as g}from"./index-D3dcRy4-.js";import{K as w}from"./constants-DV1Uc_8Q.js";async function C(s){if(!s.getServerCapabilities()?.prompts)return{prompts:[]};try{return await s.listPrompts()}catch(t){if(t instanceof V&&t.code===k.MethodNotFound)return{prompts:[]};throw t}}async function Z(s,e,t){if(!s.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await s.getPrompt({name:e,arguments:t??{}})}function ee(s){const e=b.c(12);let t,a;e[0]!==s?({client:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=w.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let o;e[5]!==t?(o=()=>C(t),e[5]=t,e[6]=o):o=e[6];const n=a.staleTime??3e4;let i;return e[7]!==a||e[8]!==r||e[9]!==o||e[10]!==n?(i={...a,queryKey:r,queryFn:o,staleTime:n,retry:!1},e[7]=a,e[8]=r,e[9]=o,e[10]=n,e[11]=i):i=e[11],F(i)}function te(s){const e=b.c(12);let t,a;e[0]!==s?({client:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=w.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let o;e[5]!==t?(o=()=>C(t),e[5]=t,e[6]=o):o=e[6];const n=a.staleTime??3e4;let i;return e[7]!==a||e[8]!==r||e[9]!==o||e[10]!==n?(i={...a,queryKey:r,queryFn:o,staleTime:n,retry:!1},e[7]=a,e[8]=r,e[9]=o,e[10]=n,e[11]=i):i=e[11],A(i)}var x="Tabs",[z]=q(x,[h]),P=h(),[B,T]=z(x),N=f.forwardRef((s,e)=>{const{__scopeTabs:t,value:a,onValueChange:r,defaultValue:o,orientation:n="horizontal",dir:i,activationMode:l="automatic",...v}=s,u=D(i),[c,p]=K({prop:a,onChange:r,defaultProp:o??"",caller:x});return d.jsx(B,{scope:t,baseId:G(),value:c,onValueChange:p,orientation:n,dir:u,activationMode:l,children:d.jsx(m.div,{dir:u,"data-orientation":n,...v,ref:e})})});N.displayName=x;var j="TabsList",E=f.forwardRef((s,e)=>{const{__scopeTabs:t,loop:a=!0,...r}=s,o=T(j,t),n=P(t);return d.jsx(O,{asChild:!0,...n,orientation:o.orientation,dir:o.dir,loop:a,children:d.jsx(m.div,{role:"tablist","aria-orientation":o.orientation,...r,ref:e})})});E.displayName=j;var I="TabsTrigger",_=f.forwardRef((s,e)=>{const{__scopeTabs:t,value:a,disabled:r=!1,...o}=s,n=T(I,t),i=P(t),l=M(n.baseId,a),v=$(n.baseId,a),u=a===n.value;return d.jsx(L,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(m.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":v,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...o,ref:e,onMouseDown:y(s.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?n.onValueChange(a):c.preventDefault()}),onKeyDown:y(s.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&n.onValueChange(a)}),onFocus:y(s.onFocus,()=>{const c=n.activationMode!=="manual";!u&&!r&&c&&n.onValueChange(a)})})})});_.displayName=I;var R="TabsContent",S=f.forwardRef((s,e)=>{const{__scopeTabs:t,value:a,forceMount:r,children:o,...n}=s,i=T(R,t),l=M(i.baseId,a),v=$(i.baseId,a),u=a===i.value,c=f.useRef(u);return f.useEffect(()=>{const p=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(p)},[]),d.jsx(Q,{present:r||u,children:({present:p})=>d.jsx(m.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:v,tabIndex:0,...n,ref:e,style:{...s.style,animationDuration:c.current?"0s":void 0},children:p&&o})})});S.displayName=R;function M(s,e){return`${s}-trigger-${e}`}function $(s,e){return`${s}-content-${e}`}var H=N,U=E,W=_,Y=S;function ae(s){const e=b.c(10);let t,a,r;e[0]!==s?({className:t,variant:r,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);const o=r===void 0?"pill":r;let n;e[4]!==t?(n=g("flex flex-col gap-2",t),e[4]=t,e[5]=n):n=e[5];let i;return e[6]!==a||e[7]!==n||e[8]!==o?(i=d.jsx(H,{"data-slot":"tabs","data-variant":o,className:n,...a}),e[6]=a,e[7]=n,e[8]=o,e[9]=i):i=e[9],i}function re(s){const e=b.c(11);let t,a,r;e[0]!==s?({className:t,variant:r,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);const o=r||"pill",n=o==="underline"?"flex h-[52px] items-center border-b border-border":o==="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]!==t||e[5]!==n?(i=g(n,t),e[4]=t,e[5]=n,e[6]=i):i=e[6];let l;return e[7]!==o||e[8]!==a||e[9]!==i?(l=d.jsx(U,{"data-slot":"tabs-list","data-variant":o,className:i,...a}),e[7]=o,e[8]=a,e[9]=i,e[10]=l):l=e[10],l}function se(s){const e=b.c(11);let t,a,r;e[0]!==s?({className:t,variant:r,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);const o=r||"pill",n=o==="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":o==="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]!==t||e[5]!==n?(i=g(n,t),e[4]=t,e[5]=n,e[6]=i):i=e[6];let l;return e[7]!==o||e[8]!==a||e[9]!==i?(l=d.jsx(W,{"data-slot":"tabs-trigger","data-variant":o,className:i,...a}),e[7]=o,e[8]=a,e[9]=i,e[10]=l):l=e[10],l}function oe(s){const e=b.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=g("flex-1 outline-none h-full",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=d.jsx(Y,{"data-slot":"tabs-content",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{ae as T,oe as a,se as b,re as c,te as d,Z as g,C as l,ee as u};
@@ -1,4 +1,4 @@
1
- import{e as ne,c as Re,j as b,bb as lc,bc as yt,bd as tr,r as fe,be as sS,B as uc,t as oS,s as hE,o as lS,a as uS,K as Ct,z as cS,n as bE,f as dS,E as pS,aD as fS,bf as EE,l as mS}from"./index-CVUETRIB.js";import{_ as gS,$ as hS,a0 as bS,W as TE,a1 as ES,a2 as TS,a3 as SS,a4 as yS,a5 as _S,a6 as AS}from"./agent-icon-Dwc2UhoB.js";import{a as Or,t as cc}from"./Tool01-DK8Fhe6_.js";import{n as IS,f as dr,t as kS,h as NS,d as RS}from"./XCircle-C15LvzjS.js";import{i as On}from"./ChevronDown-aTqoLskN.js";import{i as sd}from"./ChevronRight-D_eqesT2.js";import{N as SE,R as yE,f as _E,C as CS,g as xS,h as vS,c as wS,i as OS,d as LS}from"./scroll-area-BmiP98pu.js";import{u as AE}from"./use-copy-Bj-MTwaa.js";import{a as wt,b as Ot,c as Lt}from"./use-mobile-BpBXbl16.js";import{d as DS}from"./differenceInSeconds-NQ4PDo0z.js";import{d as MS,f as PS,g as FS,D as BS}from"./dialog-Dv_lEigV.js";import{c as US}from"./content-blocks-o63cs2vh.js";import{g as IE,M as HS}from"./types-DlC_80GR.js";import{h as kE,g as qS,b as $S}from"./chat-context-yRGYHam2.js";import{S as GS,u as NE,c as zS}from"./constants-Dsh71ijv.js";import{i as dc}from"./AlertCircle--Y_xi7pz.js";import{s as jS}from"./RefreshCcw01-BQD-u-1H.js";import{s as Bu}from"./Star01-BNCw32N6.js";import{s as VS}from"./XClose-xaUxE8BL.js";import{u as WS}from"./shell-layout-DifA2CaM.js";import{n as YS}from"./LinkExternal01-CZ54w6Ys.js";import{I as KS}from"./integration-icon-BXMU-Z0-.js";import{a as XS}from"./use-virtual-mcp-C8FeHhCA.js";import{a as ZS}from"./Users03-C5Wav_Yh.js";import{n as QS}from"./ZapSquare-CzhlLfPR.js";import{i as JS}from"./CheckCircle-DeN4Arf9.js";import{a as ey}from"./DotsVertical-DU62Ovco.js";const ty={openrouter:e=>{const t=e?.openrouter;return typeof t=="object"&&t!==null&&"usage"in t&&typeof t.usage=="object"&&t.usage!==null&&"cost"in t.usage&&typeof t.usage.cost=="number"?t.usage.cost:null}};function RE(e){if(!e?.providerMetadata)return 0;for(const t of Object.values(ty)){const n=t(e.providerMetadata);if(n!==null)return n}return 0}function CE(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0}}function xE(e,t){return t?{inputTokens:e.inputTokens+(t.inputTokens??0),outputTokens:e.outputTokens+(t.outputTokens??0),reasoningTokens:e.reasoningTokens+(t.reasoningTokens??0),totalTokens:e.totalTokens+(t.totalTokens??0),cost:e.cost+RE(t)}:e}function rB(e){return e.reduce((t,n)=>xE(t,n.metadata?.usage),CE())}function ny(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function ry(e){if(e&&typeof e=="object"&&"gatewayClientId"in e&&typeof e.gatewayClientId=="string")return e.gatewayClientId}function vE(e,t){if(!t)return e;const n=`${ny(t)}_`;return e.startsWith(n)?e.slice(n.length):e}function aB(e,t){return vE(e,t).replace(/[_-]/g," ").toLowerCase()}function iB(e){const t=DS(new Date,e);return t<60?"<1m":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:t<2592e3?`${Math.floor(t/604800)}w ago`:t<31536e3?`${Math.floor(t/2592e3)}mo ago`:`${Math.floor(t/31536e3)}y ago`}function Yt(e){if(e<60)return`${e.toFixed(1)}s`;const t=Math.round(e%60*10)/10,n=t>=60?1:0;return`${Math.floor(e/60)+n}m ${(n?0:t).toFixed(1)}s`}function wE(e){return e?e.replace(/[_-]/g," ").toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):""}function pr(e,t){return e==="output-error"?"error":e==="approval-requested"?"approval":e==="input-streaming"||e==="input-available"||e==="output-available"&&t===!0?"loading":"idle"}function sB(e,t,n){e.chain().focus().insertContentAt(t,[ay(n),{type:"text",text:" "}]).run()}function ay(e){return{type:"mention",attrs:e}}function iy(e){const t=ne.c(9),{node:n,selected:r,view:a}=e,{name:i,char:s}=n.attrs,o=r&&a.editable,u=s==="@"?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",c=o&&"outline-2 outline-blue-300 outline-offset-0";let d;t[0]!==u||t[1]!==c?(d=Re("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light",u,c,"capitalize"),t[0]=u,t[1]=c,t[2]=d):d=t[2];let f;t[3]!==i?(f=i?wE(i):"",t[3]=i,t[4]=f):f=t[4];let m;return t[5]!==s||t[6]!==d||t[7]!==f?(m=b.jsxs(_E,{className:d,children:[s,f]}),t[5]=s,t[6]=d,t[7]=f,t[8]=m):m=t[8],m}const sy=SE.create({name:"mention",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:e=>e.getAttribute("data-id")||null,renderHTML:e=>e.id?{"data-id":e.id}:{}},name:{default:null,parseHTML:e=>e.getAttribute("data-name")||null,renderHTML:e=>e.name?{"data-name":e.name}:{}},char:{default:"/",parseHTML:e=>e.getAttribute("data-char")||"/",renderHTML:e=>e.char?{"data-char":e.char}:{}},metadata:{default:null,parseHTML:e=>{try{return JSON.parse(e.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:e=>e.metadata?{"data-metadata":JSON.stringify(e.metadata)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:e,HTMLAttributes:t}){const n={"data-type":"mention"};return e.attrs.id&&(n["data-id"]=e.attrs.id),e.attrs.name&&(n["data-name"]=e.attrs.name),e.attrs.char&&(n["data-char"]=e.attrs.char),e.attrs.metadata&&(n["data-metadata"]=JSON.stringify(e.attrs.metadata)),["span",{...t,...n}]},renderText({node:e}){const t=e.attrs.char??"@",n=e.attrs.name??"";return`${t}${n}`},addNodeView(){return yE(iy)}}),oy=/^mcp__[a-zA-Z0-9_-]+__/;function OE(e){return e.replace(oy,"")}function pc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Pt=pc();function LE(e){Pt=e}var En={exec:()=>null};function pe(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(qe.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,t)};return r}var qe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},ly=/^(?:[ \t]*(?:\n|$))+/,uy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ln=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,dy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fc=/(?:[*+-]|\d{1,9}[.)])/,DE=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ME=pe(DE).replace(/bull/g,fc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),py=pe(DE).replace(/bull/g,fc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),mc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,fy=/^[^\n]+/,gc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,my=pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",gc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gy=pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fc).getRegex(),fr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",hc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hy=pe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",hc).replace("tag",fr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),PE=pe(mc).replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex(),by=pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",PE).getRegex(),bc={blockquote:by,code:uy,def:my,fences:cy,heading:dy,hr:Ln,html:hy,lheading:ME,list:gy,newline:ly,paragraph:PE,table:En,text:fy},od=pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex(),Ey={...bc,lheading:py,table:od,paragraph:pe(mc).replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",od).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex()},Ty={...bc,html:pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",hc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:En,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pe(mc).replace("hr",Ln).replace("heading",` *#{1,6} *[^
1
+ import{e as ne,c as Re,j as b,bb as lc,bc as yt,bd as tr,r as fe,be as sS,B as uc,t as oS,s as hE,o as lS,a as uS,K as Ct,z as cS,n as bE,f as dS,E as pS,aD as fS,bf as EE,l as mS}from"./index-D3dcRy4-.js";import{_ as gS,$ as hS,a0 as bS,W as TE,a1 as ES,a2 as TS,a3 as SS,a4 as yS,a5 as _S,a6 as AS}from"./agent-icon-CJBSrXXa.js";import{a as Or,t as cc}from"./Tool01-JkKJ-VBh.js";import{n as IS,f as dr,t as kS,h as NS,d as RS}from"./XCircle-0jhuLEi-.js";import{i as On}from"./ChevronDown-CAze57fI.js";import{i as sd}from"./ChevronRight-Df7bIxwE.js";import{N as SE,R as yE,f as _E,C as CS,g as xS,h as vS,c as wS,i as OS,d as LS}from"./scroll-area-Cmb2U-GX.js";import{u as AE}from"./use-copy-C4JHTA85.js";import{a as wt,b as Ot,c as Lt}from"./use-mobile-BwJlvmat.js";import{d as DS}from"./differenceInSeconds-NQ4PDo0z.js";import{d as MS,f as PS,g as FS,D as BS}from"./dialog-eYBbNtPx.js";import{c as US}from"./content-blocks-o63cs2vh.js";import{g as IE,M as HS}from"./types-DsDrkXAr.js";import{h as kE,g as qS,b as $S}from"./chat-context-C5B4JHNW.js";import{S as GS,u as NE,c as zS}from"./constants-DV1Uc_8Q.js";import{i as dc}from"./AlertCircle-BCfEJcld.js";import{s as jS}from"./RefreshCcw01-Bw_4FSKr.js";import{s as Bu}from"./Star01-BSV4P3zw.js";import{s as VS}from"./XClose-DmXYRRRU.js";import{u as WS}from"./shell-layout-YcfNni5N.js";import{n as YS}from"./LinkExternal01-BF4nSmdO.js";import{I as KS}from"./integration-icon-DJHy4-lT.js";import{a as XS}from"./use-virtual-mcp-CLK92_-L.js";import{a as ZS}from"./Users03-kskEQmar.js";import{n as QS}from"./ZapSquare-Q_j-wpZU.js";import{i as JS}from"./CheckCircle-C29ChaU6.js";import{a as ey}from"./DotsVertical-BooYL5-r.js";const ty={openrouter:e=>{const t=e?.openrouter;return typeof t=="object"&&t!==null&&"usage"in t&&typeof t.usage=="object"&&t.usage!==null&&"cost"in t.usage&&typeof t.usage.cost=="number"?t.usage.cost:null}};function RE(e){if(!e?.providerMetadata)return 0;for(const t of Object.values(ty)){const n=t(e.providerMetadata);if(n!==null)return n}return 0}function CE(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0}}function xE(e,t){return t?{inputTokens:e.inputTokens+(t.inputTokens??0),outputTokens:e.outputTokens+(t.outputTokens??0),reasoningTokens:e.reasoningTokens+(t.reasoningTokens??0),totalTokens:e.totalTokens+(t.totalTokens??0),cost:e.cost+RE(t)}:e}function rB(e){return e.reduce((t,n)=>xE(t,n.metadata?.usage),CE())}function ny(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function ry(e){if(e&&typeof e=="object"&&"gatewayClientId"in e&&typeof e.gatewayClientId=="string")return e.gatewayClientId}function vE(e,t){if(!t)return e;const n=`${ny(t)}_`;return e.startsWith(n)?e.slice(n.length):e}function aB(e,t){return vE(e,t).replace(/[_-]/g," ").toLowerCase()}function iB(e){const t=DS(new Date,e);return t<60?"<1m":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:t<2592e3?`${Math.floor(t/604800)}w ago`:t<31536e3?`${Math.floor(t/2592e3)}mo ago`:`${Math.floor(t/31536e3)}y ago`}function Yt(e){if(e<60)return`${e.toFixed(1)}s`;const t=Math.round(e%60*10)/10,n=t>=60?1:0;return`${Math.floor(e/60)+n}m ${(n?0:t).toFixed(1)}s`}function wE(e){return e?e.replace(/[_-]/g," ").toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):""}function pr(e,t){return e==="output-error"?"error":e==="approval-requested"?"approval":e==="input-streaming"||e==="input-available"||e==="output-available"&&t===!0?"loading":"idle"}function sB(e,t,n){e.chain().focus().insertContentAt(t,[ay(n),{type:"text",text:" "}]).run()}function ay(e){return{type:"mention",attrs:e}}function iy(e){const t=ne.c(9),{node:n,selected:r,view:a}=e,{name:i,char:s}=n.attrs,o=r&&a.editable,u=s==="@"?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",c=o&&"outline-2 outline-blue-300 outline-offset-0";let d;t[0]!==u||t[1]!==c?(d=Re("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light",u,c,"capitalize"),t[0]=u,t[1]=c,t[2]=d):d=t[2];let f;t[3]!==i?(f=i?wE(i):"",t[3]=i,t[4]=f):f=t[4];let m;return t[5]!==s||t[6]!==d||t[7]!==f?(m=b.jsxs(_E,{className:d,children:[s,f]}),t[5]=s,t[6]=d,t[7]=f,t[8]=m):m=t[8],m}const sy=SE.create({name:"mention",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:e=>e.getAttribute("data-id")||null,renderHTML:e=>e.id?{"data-id":e.id}:{}},name:{default:null,parseHTML:e=>e.getAttribute("data-name")||null,renderHTML:e=>e.name?{"data-name":e.name}:{}},char:{default:"/",parseHTML:e=>e.getAttribute("data-char")||"/",renderHTML:e=>e.char?{"data-char":e.char}:{}},metadata:{default:null,parseHTML:e=>{try{return JSON.parse(e.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:e=>e.metadata?{"data-metadata":JSON.stringify(e.metadata)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:e,HTMLAttributes:t}){const n={"data-type":"mention"};return e.attrs.id&&(n["data-id"]=e.attrs.id),e.attrs.name&&(n["data-name"]=e.attrs.name),e.attrs.char&&(n["data-char"]=e.attrs.char),e.attrs.metadata&&(n["data-metadata"]=JSON.stringify(e.attrs.metadata)),["span",{...t,...n}]},renderText({node:e}){const t=e.attrs.char??"@",n=e.attrs.name??"";return`${t}${n}`},addNodeView(){return yE(iy)}}),oy=/^mcp__[a-zA-Z0-9_-]+__/;function OE(e){return e.replace(oy,"")}function pc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Pt=pc();function LE(e){Pt=e}var En={exec:()=>null};function pe(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(qe.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,t)};return r}var qe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},ly=/^(?:[ \t]*(?:\n|$))+/,uy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ln=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,dy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fc=/(?:[*+-]|\d{1,9}[.)])/,DE=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ME=pe(DE).replace(/bull/g,fc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),py=pe(DE).replace(/bull/g,fc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),mc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,fy=/^[^\n]+/,gc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,my=pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",gc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gy=pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fc).getRegex(),fr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",hc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hy=pe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",hc).replace("tag",fr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),PE=pe(mc).replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex(),by=pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",PE).getRegex(),bc={blockquote:by,code:uy,def:my,fences:cy,heading:dy,hr:Ln,html:hy,lheading:ME,list:gy,newline:ly,paragraph:PE,table:En,text:fy},od=pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex(),Ey={...bc,lheading:py,table:od,paragraph:pe(mc).replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",od).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex()},Ty={...bc,html:pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",hc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:En,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pe(mc).replace("hr",Ln).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",ME).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Sy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yy=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,FE=/^( {2,}|\\)\n(?!\s*$)/,_y=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,mr=/[\p{P}\p{S}]/u,Ec=/[\s\p{P}\p{S}]/u,BE=/[^\s\p{P}\p{S}]/u,Ay=pe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ec).getRegex(),UE=/(?!~)[\p{P}\p{S}]/u,Iy=/(?!~)[\s\p{P}\p{S}]/u,ky=/(?:[^\s\p{P}\p{S}]|~)/u,Ny=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,HE=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ry=pe(HE,"u").replace(/punct/g,mr).getRegex(),Cy=pe(HE,"u").replace(/punct/g,UE).getRegex(),qE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xy=pe(qE,"gu").replace(/notPunctSpace/g,BE).replace(/punctSpace/g,Ec).replace(/punct/g,mr).getRegex(),vy=pe(qE,"gu").replace(/notPunctSpace/g,ky).replace(/punctSpace/g,Iy).replace(/punct/g,UE).getRegex(),wy=pe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,BE).replace(/punctSpace/g,Ec).replace(/punct/g,mr).getRegex(),Oy=pe(/\\(punct)/,"gu").replace(/punct/g,mr).getRegex(),Ly=pe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Dy=pe(hc).replace("(?:-->|$)","-->").getRegex(),My=pe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Dy).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Py=pe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",nr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),$E=pe(/^!?\[(label)\]\[(ref)\]/).replace("label",nr).replace("ref",gc).getRegex(),GE=pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",gc).getRegex(),Fy=pe("reflink|nolink(?!\\()","g").replace("reflink",$E).replace("nolink",GE).getRegex(),Tc={_backpedal:En,anyPunctuation:Oy,autolink:Ly,blockSkip:Ny,br:FE,code:yy,del:En,emStrongLDelim:Ry,emStrongRDelimAst:xy,emStrongRDelimUnd:wy,escape:Sy,link:Py,nolink:GE,punctuation:Ay,reflink:$E,reflinkSearch:Fy,tag:My,text:_y,url:En},By={...Tc,link:pe(/^!?\[(label)\]\((.*?)\)/).replace("label",nr).getRegex(),reflink:pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nr).getRegex()},Uu={...Tc,emStrongRDelimAst:vy,emStrongLDelim:Cy,url:pe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Uy={...Uu,br:pe(FE).replace("{2,}","*").getRegex(),text:pe(Uu.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qn={normal:bc,gfm:Ey,pedantic:Ty},un={normal:Tc,gfm:Uu,breaks:Uy,pedantic:By},Hy={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ld=e=>Hy[e];function at(e,t){if(t){if(qe.escapeTest.test(e))return e.replace(qe.escapeReplace,ld)}else if(qe.escapeTestNoEncode.test(e))return e.replace(qe.escapeReplaceNoEncode,ld);return e}function ud(e){try{e=encodeURI(e).replace(qe.percentDecode,"%")}catch{return null}return e}function cd(e,t){const n=e.replace(qe.findPipe,(i,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(qe.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(qe.slashPipe,"|");return r}function cn(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function qy(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function dd(e,t,n,r,a){const i=t.href,s=t.title||null,o=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function $y(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
3
3
  `).map(i=>{const s=i.match(n.other.beginningSpace);if(s===null)return i;const[o]=s;return o.length>=a.length?i.slice(a.length):i}).join(`
4
4
  `)}var rr=class{options;rules;lexer;constructor(e){this.options=e||Pt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:cn(n,`
@@ -1 +1 @@
1
- import{e as o,c as l,j as n}from"./index-CVUETRIB.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
1
+ import{e as o,c as l,j as n}from"./index-D3dcRy4-.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
@@ -1 +1 @@
1
- import{r as x,aT as h,j as c,ah as m,ai as k,bc as p,aQ as S,aR as T,aS as M,aV as A,ao as F,aX as $,e as P,c as C}from"./index-CVUETRIB.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=h({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),b=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});b.displayName=v;var[z,R]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=h({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(y,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=h({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(E=>E!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(y,{...r,ref:e})})});b.displayName=v;var[O,H]=w(v),y=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=M(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((a,e)=>{const l=R(f,a.__scopeToggleGroup),s=H(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(S,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=R(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),L=b,Q=N;const U=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),V=x.createContext({size:"default",variant:"default"});function q(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(V.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(L,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function J(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(V),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(U({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(Q,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{q as T,J as a};
1
+ import{r as x,aT as h,j as c,ah as m,ai as k,bc as p,aQ as S,aR as T,aS as M,aV as A,ao as F,aX as $,e as P,c as C}from"./index-D3dcRy4-.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=h({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),b=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});b.displayName=v;var[z,R]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=h({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(y,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=h({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(E=>E!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(y,{...r,ref:e})})});b.displayName=v;var[O,H]=w(v),y=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=M(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((a,e)=>{const l=R(f,a.__scopeToggleGroup),s=H(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(S,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=R(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),L=b,Q=N;const U=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),V=x.createContext({size:"default",variant:"default"});function q(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(V.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(L,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function J(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(V),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(U({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(Q,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{q as T,J as a};
@@ -1 +1 @@
1
- import{e as h,K as T,V as b,a0 as g,D as C,aD as k,j as s}from"./index-CVUETRIB.js";import{B as x}from"./badge-LkPgBUqp.js";import{c as y,a as j,b as v,T as N}from"./use-mobile-BpBXbl16.js";import{g as S}from"./types-DlC_80GR.js";import{s as _}from"./RefreshCcw01-BQD-u-1H.js";import{s as A}from"./Star01-BNCw32N6.js";import{W as $}from"./agent-icon-Dwc2UhoB.js";function K(m){const e=h.c(9),{connectionId:a}=m;let t,r,i;e[0]!==a?(t=new URL(`/mcp/${a}`,window.location.origin),i=b,r=T.isMCPAuthenticated(t.href,null),e[0]=a,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let n;e[4]!==t?(n=()=>g({url:t.href,token:null}),e[4]=t,e[5]=n):n=e[5];let l;e[6]!==r||e[7]!==n?(l={queryKey:r,queryFn:n},e[6]=r,e[7]=n,e[8]=l):l=e[8];const{data:o}=i(l);return o}const w=[{key:"readOnlyHint",label:"Read-only",Icon:_,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:C,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:k,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:A,variant:"outline"}];function q(m){const e=h.c(18),{annotations:a,_meta:t}=m;let r;e[0]!==t?(r=S(t),e[0]=t,e[1]=r):r=e[1];const i=!!r;let n,l,o,c,u;if(e[2]!==a||e[3]!==i){u=Symbol.for("react.early_return_sentinel");e:{const f=a?w.filter(I=>a[I.key]===!0):[];if(f.length===0&&!i){u=null;break e}n=N,l="flex gap-1 flex-nowrap",e[9]!==i?(o=i&&s.jsxs(y,{children:[s.jsx(j,{asChild:!0,children:s.jsx(x,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:s.jsx($,{})})}),s.jsx(v,{children:"Interactive"})]}),e[9]=i,e[10]=o):o=e[10],c=f.map(H)}e[2]=a,e[3]=i,e[4]=n,e[5]=l,e[6]=o,e[7]=c,e[8]=u}else n=e[4],l=e[5],o=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let d;e[11]!==l||e[12]!==o||e[13]!==c?(d=s.jsxs("div",{className:l,children:[o,c]}),e[11]=l,e[12]=o,e[13]=c,e[14]=d):d=e[14];let p;return e[15]!==n||e[16]!==d?(p=s.jsx(n,{children:d}),e[15]=n,e[16]=d,e[17]=p):p=e[17],p}function H(m){const{label:e,Icon:a,variant:t}=m;return s.jsxs(y,{children:[s.jsx(j,{asChild:!0,children:s.jsx(x,{asChild:!0,variant:t,className:"size-6 p-1",children:s.jsx(a,{})})}),s.jsx(v,{children:e})]},e)}export{q as T,K as u};
1
+ import{e as h,K as T,V as b,a0 as g,D as C,aD as k,j as s}from"./index-D3dcRy4-.js";import{B as x}from"./badge-BiDYflRu.js";import{c as y,a as j,b as v,T as N}from"./use-mobile-BwJlvmat.js";import{g as S}from"./types-DsDrkXAr.js";import{s as _}from"./RefreshCcw01-Bw_4FSKr.js";import{s as A}from"./Star01-BSV4P3zw.js";import{W as $}from"./agent-icon-CJBSrXXa.js";function K(m){const e=h.c(9),{connectionId:a}=m;let t,r,i;e[0]!==a?(t=new URL(`/mcp/${a}`,window.location.origin),i=b,r=T.isMCPAuthenticated(t.href,null),e[0]=a,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let n;e[4]!==t?(n=()=>g({url:t.href,token:null}),e[4]=t,e[5]=n):n=e[5];let l;e[6]!==r||e[7]!==n?(l={queryKey:r,queryFn:n},e[6]=r,e[7]=n,e[8]=l):l=e[8];const{data:o}=i(l);return o}const w=[{key:"readOnlyHint",label:"Read-only",Icon:_,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:C,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:k,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:A,variant:"outline"}];function q(m){const e=h.c(18),{annotations:a,_meta:t}=m;let r;e[0]!==t?(r=S(t),e[0]=t,e[1]=r):r=e[1];const i=!!r;let n,l,o,c,u;if(e[2]!==a||e[3]!==i){u=Symbol.for("react.early_return_sentinel");e:{const f=a?w.filter(I=>a[I.key]===!0):[];if(f.length===0&&!i){u=null;break e}n=N,l="flex gap-1 flex-nowrap",e[9]!==i?(o=i&&s.jsxs(y,{children:[s.jsx(j,{asChild:!0,children:s.jsx(x,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:s.jsx($,{})})}),s.jsx(v,{children:"Interactive"})]}),e[9]=i,e[10]=o):o=e[10],c=f.map(H)}e[2]=a,e[3]=i,e[4]=n,e[5]=l,e[6]=o,e[7]=c,e[8]=u}else n=e[4],l=e[5],o=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let d;e[11]!==l||e[12]!==o||e[13]!==c?(d=s.jsxs("div",{className:l,children:[o,c]}),e[11]=l,e[12]=o,e[13]=c,e[14]=d):d=e[14];let p;return e[15]!==n||e[16]!==d?(p=s.jsx(n,{children:d}),e[15]=n,e[16]=d,e[17]=p):p=e[17],p}function H(m){const{label:e,Icon:a,variant:t}=m;return s.jsxs(y,{children:[s.jsx(j,{asChild:!0,children:s.jsx(x,{asChild:!0,variant:t,className:"size-6 p-1",children:s.jsx(a,{})})}),s.jsx(v,{children:e})]},e)}export{q as T,K as u};