@decocms/mesh 2.18.0 → 2.19.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 (136) hide show
  1. package/dist/client/assets/{AlertCircle-CahACZDg.js → AlertCircle-DZfqNByx.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-DlLOWSTj.js → ArrowLeft-Cd6RM4A6.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-Ck0taqJi.js → ArrowUp-VMKONnWJ.js} +1 -1
  4. package/dist/client/assets/{Check-Cjgi2ZiG.js → Check-Clnl6VO2.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-BuVzyKHq.js → ChevronDown-CUCzTkUk.js} +1 -1
  6. package/dist/client/assets/{Code01-XpAoNs3W.js → Code01-BAik7hF-.js} +1 -1
  7. package/dist/client/assets/{Copy01-De4SwxDv.js → Copy01-CCfh45Hm.js} +1 -1
  8. package/dist/client/assets/{DotsHorizontal-D-Bv2U6B.js → DotsHorizontal-H1CDe03p.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-BhTwPxq7.js → DotsVertical-CubHWPM8.js} +1 -1
  10. package/dist/client/assets/{Download01-DhkFfGKV.js → Download01-DUxaWCdv.js} +1 -1
  11. package/dist/client/assets/{Edit01-DsRHb45T.js → Edit01-tXex8wx0.js} +1 -1
  12. package/dist/client/assets/{File06-BiIPMtEV.js → File06-1GHbOIr4.js} +1 -1
  13. package/dist/client/assets/{FilterLines-C_UJwG_t.js → FilterLines-Ttp2swRG.js} +1 -1
  14. package/dist/client/assets/{FlipBackward-CQnTJKeB.js → FlipBackward-BkcMu9OY.js} +1 -1
  15. package/dist/client/assets/{GitBranch01-ClS9Bk6n.js → GitBranch01-V6D4YBhB.js} +1 -1
  16. package/dist/client/assets/{Grid01-CRALWbj6.js → Grid01-Bf8eAyhK.js} +1 -1
  17. package/dist/client/assets/{Home02-ofwnyeoV.js → Home02-8q2bbK8n.js} +1 -1
  18. package/dist/client/assets/{Image01-Cb4gQMH4.js → Image01-Ba0mxAoN.js} +1 -1
  19. package/dist/client/assets/{Inbox01-CKGdnZFH.js → Inbox01-BvYPvM_p.js} +1 -1
  20. package/dist/client/assets/{InfoCircle-_4UsKVMw.js → InfoCircle-DKA0-FHH.js} +1 -1
  21. package/dist/client/assets/{Key01-BFJBGJng.js → Key01-CrI4HON6.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-C1dAUI0b.js → LinkExternal01-CqAE-za3.js} +1 -1
  23. package/dist/client/assets/{List-DOmOO2Cw.js → List-C6tpn114.js} +1 -1
  24. package/dist/client/assets/{Loading01-JwelopeC.js → Loading01-wy6i08TR.js} +1 -1
  25. package/dist/client/assets/{Lock01-B7TIX2sZ.js → Lock01-CGlDIBQ9.js} +1 -1
  26. package/dist/client/assets/{Play-CMKLF_6n.js → Play-BvhASZjZ.js} +1 -1
  27. package/dist/client/assets/{Plus-Df2M6Ns2.js → Plus-DaMIylfN.js} +1 -1
  28. package/dist/client/assets/{SearchMd-Cgfgcbdz.js → SearchMd-DsK25qy7.js} +1 -1
  29. package/dist/client/assets/{Terminal-C8LHfiOW.js → Terminal-cal0VHQd.js} +1 -1
  30. package/dist/client/assets/{Trash01-KvZ0cVo9.js → Trash01-pB5oOXYU.js} +1 -1
  31. package/dist/client/assets/{Upload01-TiwmYxO-.js → Upload01-BRGUFGKZ.js} +1 -1
  32. package/dist/client/assets/{X-DhyaYbLb.js → X-Bq7VzczH.js} +1 -1
  33. package/dist/client/assets/{XClose-2bShEltc.js → XClose-zOphE63W.js} +1 -1
  34. package/dist/client/assets/{alert-dialog-gZhceV_v.js → alert-dialog-BBkPKiLO.js} +1 -1
  35. package/dist/client/assets/{auth-catchall-Dz8qCpUP.js → auth-catchall-D7-AwG4p.js} +1 -1
  36. package/dist/client/assets/{avatar-d8M8JpvZ.js → avatar-CumXES9B.js} +1 -1
  37. package/dist/client/assets/{badge-CKe-ib_i.js → badge-tnyrO2LA.js} +1 -1
  38. package/dist/client/assets/{binder-iKe3ndXq.js → binder-BxHiGQ64.js} +1 -1
  39. package/dist/client/assets/{button-DXl1hVqx.js → button-BQMZIX_4.js} +1 -1
  40. package/dist/client/assets/{card-D0GcpRPY.js → card-B-rrjyBF.js} +1 -1
  41. package/dist/client/assets/{checkbox-D1tHbcIN.js → checkbox-CJvAgYlu.js} +1 -1
  42. package/dist/client/assets/{collection-detail-BQkjgYb7.js → collection-detail-w6psdBlt.js} +1 -1
  43. package/dist/client/assets/{collection-display-button-B_KC-ent.js → collection-display-button-Bi_NXbuN.js} +1 -1
  44. package/dist/client/assets/{collection-header-BA9HTLmg.js → collection-header-BfNxri-N.js} +1 -1
  45. package/dist/client/assets/{collection-page-CDkTC45g.js → collection-page-DJtrTRMH.js} +1 -1
  46. package/dist/client/assets/{collection-search-pUdl1eNx.js → collection-search-9baWd84b.js} +1 -1
  47. package/dist/client/assets/{collection-tab-BofyxU3Y.js → collection-tab-Ct4krCcB.js} +1 -1
  48. package/dist/client/assets/{collection-table-wrapper-wARoPZXo.js → collection-table-wrapper-Cu-yqUsH.js} +1 -1
  49. package/dist/client/assets/{connection-ByVJuREK.js → connection-BdWKvn2K.js} +1 -1
  50. package/dist/client/assets/{connection-card-DjK0GZ2u.js → connection-card-CwhA62aK.js} +1 -1
  51. package/dist/client/assets/{connection-detail-BGizcg4Z.js → connection-detail-BvvvvXz6.js} +1 -1
  52. package/dist/client/assets/{connections-B3vaIw3-.js → connections-CfRRCGSZ.js} +1 -1
  53. package/dist/client/assets/constants-BoL9C76L.js +1 -0
  54. package/dist/client/assets/{create-organization-dialog-DKwU0dfN.js → create-organization-dialog-gxAB4wwP.js} +1 -1
  55. package/dist/client/assets/{dialog-1B3YWWMu.js → dialog-BOTxth8M.js} +1 -1
  56. package/dist/client/assets/{dropdown-menu-Hp4qYTud.js → dropdown-menu-Cwg_0qoi.js} +1 -1
  57. package/dist/client/assets/{dynamic-plugin-layout-j2gEmQEr.js → dynamic-plugin-layout-DcLqC1O8.js} +1 -1
  58. package/dist/client/assets/{empty-state-D-JjObLi.js → empty-state-2SJ3WxPr.js} +1 -1
  59. package/dist/client/assets/{empty-state-C7Gr5Tg2.js → empty-state-DeORHrTg.js} +1 -1
  60. package/dist/client/assets/{env-vars-editor-D4XTsyk0.js → env-vars-editor-qkfhYptd.js} +1 -1
  61. package/dist/client/assets/{error-boundary-rr4tK3fB.js → error-boundary-KUKN2TxD.js} +1 -1
  62. package/dist/client/assets/{extract-connection-data-37AfzoCx.js → extract-connection-data-37AfJqs-.js} +1 -1
  63. package/dist/client/assets/{file-browser-BECnO7FM.js → file-browser-D3uR2C9M.js} +2 -2
  64. package/dist/client/assets/{form-BQupN7IV.js → form-o9xmUpnK.js} +1 -1
  65. package/dist/client/assets/gateway-detail-B6zUy6TE.js +1 -0
  66. package/dist/client/assets/{gateways-jpQl136Z.js → gateways-fe-SAKln.js} +1 -1
  67. package/dist/client/assets/{grid-view-BwLKimb0.js → grid-view-vZ2Zpkzy.js} +1 -1
  68. package/dist/client/assets/{home-9vMYPTYi.js → home-OB-BKE3S.js} +1 -1
  69. package/dist/client/assets/{index-D0CzZUCs.js → index-BGlkGnRh.js} +1 -1
  70. package/dist/client/assets/{index-DEuqpeVv.js → index-BdoGlqOh.js} +2 -2
  71. package/dist/client/assets/{index-Bpy9plQL.js → index-DB3RU6w4.js} +1 -1
  72. package/dist/client/assets/{index-u_K3efbu.js → index-DuoIQX0P.js} +1 -1
  73. package/dist/client/assets/{index-DVolwMvn.js → index-nfXEOl8p.js} +31 -31
  74. package/dist/client/assets/{infiniteQueryObserver-BXdaScti.js → infiniteQueryObserver-B-zosqIG.js} +1 -1
  75. package/dist/client/assets/{input-CqqzkfyF.js → input-B0JGK4qg.js} +1 -1
  76. package/dist/client/assets/{layout-D7T4rJzl.js → layout-LCGR_e4n.js} +1 -1
  77. package/dist/client/assets/{lazy-highlighter-U-fd28FU.js → lazy-highlighter-7Ygumnp-.js} +1 -1
  78. package/dist/client/assets/{localstorage-keys-kemGZMIp.js → localstorage-keys-DJgrMpsR.js} +1 -1
  79. package/dist/client/assets/{login-AsctHrUh.js → login-CPHiXmVM.js} +1 -1
  80. package/dist/client/assets/{mcp-oauth-DqZqwRXe.js → mcp-oauth-DHBNZNZN.js} +1 -1
  81. package/dist/client/assets/{mcp-server-card-DfoQ5M8z.js → mcp-server-card-CCJD8rY5.js} +1 -1
  82. package/dist/client/assets/{mcp-server-detail-GLsULv7B.js → mcp-server-detail-B2BLpdBe.js} +1 -1
  83. package/dist/client/assets/{members-eia2aN0I.js → members-BUKGWKo1.js} +1 -1
  84. package/dist/client/assets/{monaco-editor-rl0nEzOU.js → monaco-editor-2dgkKSmS.js} +1 -1
  85. package/dist/client/assets/{monitoring-DWEGkU9y.js → monitoring-Co2ahvWI.js} +1 -1
  86. package/dist/client/assets/{oauth-callback-BFr0fBNT.js → oauth-callback-DqMgYj7o.js} +1 -1
  87. package/dist/client/assets/{page-GoE2bJQh.js → page-CUhEXv2W.js} +1 -1
  88. package/dist/client/assets/{page-BeG_Zpat.js → page-Xy2zuFaN.js} +1 -1
  89. package/dist/client/assets/{pin-to-sidebar-button-CrzVxc9I.js → pin-to-sidebar-button-BcuLv1ea.js} +1 -1
  90. package/dist/client/assets/{plugin-empty-state-CvQbqnfg.js → plugin-empty-state-BMZ2lKdt.js} +1 -1
  91. package/dist/client/assets/{plugin-header-BaWUIpLx.js → plugin-header-CzG6IJ7x.js} +1 -1
  92. package/dist/client/assets/{plugins-Q7uqmYFh.js → plugins-DrfogMhA.js} +1 -1
  93. package/dist/client/assets/{popover-BcOo6EXw.js → popover-CXUBdgho.js} +1 -1
  94. package/dist/client/assets/{project-context-provider-Dn1-l4h2.js → project-context-provider-DhgIBvJ2.js} +1 -1
  95. package/dist/client/assets/{registry-utils-85b65tFI.js → registry-utils-C1MEHnjt.js} +1 -1
  96. package/dist/client/assets/{resizable-DkFmgcsj.js → resizable-CwvNlApq.js} +1 -1
  97. package/dist/client/assets/{resource-tabs-DkDSMlFB.js → resource-tabs-BnWaqzvN.js} +1 -1
  98. package/dist/client/assets/{select-Bv7J3zlQ.js → select--nDzC8in.js} +1 -1
  99. package/dist/client/assets/{settings-BK8QvMDL.js → settings-18XrU-68.js} +1 -1
  100. package/dist/client/assets/shell-layout-DPrrZeqr.js +3 -0
  101. package/dist/client/assets/{spinner-D0hdWfev.js → spinner-BJxZd1VB.js} +1 -1
  102. package/dist/client/assets/{switch-ugX7u7WU.js → switch-BFRma3Oi.js} +1 -1
  103. package/dist/client/assets/{textarea-BUrXtpl5.js → textarea-CZGp5M36.js} +1 -1
  104. package/dist/client/assets/{tool-set-selector-a1uFioE0.js → tool-set-selector-D-ihTeCw.js} +1 -1
  105. package/dist/client/assets/{tools-list-DpFBj-bw.js → tools-list-DdaO5B-A.js} +1 -1
  106. package/dist/client/assets/{tooltip-vUrxHIt0.js → tooltip-DSjdME5j.js} +1 -1
  107. package/dist/client/assets/{typewriter-title-7_SusDya.js → typewriter-title-D3pHLziM.js} +1 -1
  108. package/dist/client/assets/{use-binding-B0VMz_Ex.js → use-binding-CdMfLY85.js} +1 -1
  109. package/dist/client/assets/{use-collections-Cflasxiq.js → use-collections-B_r4T3b1.js} +1 -1
  110. package/dist/client/assets/{use-connection-DhRUkVvI.js → use-connection-W2V2j8pE.js} +1 -1
  111. package/dist/client/assets/{use-connection-resources-C-wyp48q.js → use-connection-resources-_fz_82N5.js} +1 -1
  112. package/dist/client/assets/{use-create-gateway-DMkdPgfy.js → use-create-gateway-DGaCqRhz.js} +1 -1
  113. package/dist/client/assets/{use-gateway-D5VVN1xE.js → use-gateway-CijYzCU9.js} +1 -1
  114. package/dist/client/assets/use-gateway-system-prompt-CusPzWe3.js +1 -0
  115. package/dist/client/assets/{use-list-state-BYREPRxy.js → use-list-state-DNPGmD9A.js} +1 -1
  116. package/dist/client/assets/{use-mcp-CZeMxRgK.js → use-mcp-fzL3ILVj.js} +1 -1
  117. package/dist/client/assets/{use-members-Bi0eIvBO.js → use-members-Cs5znkoZ.js} +1 -1
  118. package/dist/client/assets/{use-mobile-CI2w7svc.js → use-mobile-DPzmQj9d.js} +1 -1
  119. package/dist/client/assets/{use-organization-settings-D0kNSjbq.js → use-organization-settings-sFF34W-p.js} +1 -1
  120. package/dist/client/assets/{use-tool-call-CoI4ZCZe.js → use-tool-call-CCdok443.js} +1 -1
  121. package/dist/client/assets/useInfiniteQuery-Bx9UQHNH.js +1 -0
  122. package/dist/client/assets/{useMutation-xcmVYLP7.js → useMutation-mOecCzvG.js} +1 -1
  123. package/dist/client/assets/useQuery-B_cnJjvx.js +1 -0
  124. package/dist/client/assets/{value-C7rJ457O.js → value-C7yMc_BN.js} +1 -1
  125. package/dist/client/assets/{view-mode-toggle-CTWk8Dkt.js → view-mode-toggle-DdRtk7o-.js} +1 -1
  126. package/dist/client/assets/{workflow-ClKgdB2v.js → workflow-Ca7LNIxD.js} +1 -1
  127. package/dist/client/index.html +1 -1
  128. package/dist/server/cli.js +11 -11
  129. package/dist/server/server.js +11 -11
  130. package/package.json +1 -1
  131. package/dist/client/assets/constants-DQVDVC-J.js +0 -1
  132. package/dist/client/assets/gateway-detail-B1f7bt6s.js +0 -1
  133. package/dist/client/assets/shell-layout-DImgzYtx.js +0 -3
  134. package/dist/client/assets/use-gateway-system-prompt-B3fSaA6r.js +0 -1
  135. package/dist/client/assets/useInfiniteQuery-ckN_t7ea.js +0 -1
  136. package/dist/client/assets/useQuery-BKyLWvSZ.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/mesh",
3
- "version": "2.18.0",
3
+ "version": "2.19.0",
4
4
  "description": "MCP Mesh - Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- import{aJ as a,bo as o}from"./index-DEuqpeVv.js";const e="mcp.mesh",s=a(o,{target:"draft-7"});export{s as B,e as M};
@@ -1 +0,0 @@
1
- import{r as S,_ as ye,y as re,I as U,z as _,c as R,j as t,f as Fe,d as tt,b as st,k as ot,af as lt,B as nt,E as it,t as Ae}from"./index-DEuqpeVv.js";import{I as Ee,E as rt}from"./empty-state-C7Gr5Tg2.js";import{E as Ve}from"./error-boundary-rr4tK3fB.js";import{C as Ge}from"./checkbox-D1tHbcIN.js";import{c as H,B as V}from"./button-DXl1hVqx.js";import{i as at}from"./ArrowLeft-DlLOWSTj.js";import{u as We}from"./use-connection-DhRUkVvI.js";import{C as ct}from"./collection-search-pUdl1eNx.js";import{I as Pe}from"./input-CqqzkfyF.js";import{s as dt}from"./Plus-Df2M6Ns2.js";import{i as mt}from"./X-DhyaYbLb.js";import{P as ut}from"./pin-to-sidebar-button-CrzVxc9I.js";import{T as ft}from"./tool-set-selector-a1uFioE0.js";import{b as ht,a as xt,i as pt}from"./use-gateway-D5VVN1xE.js";import{u as gt,a as bt}from"./use-connection-resources-C-wyp48q.js";import{u as jt}from"./use-gateway-system-prompt-B3fSaA6r.js";import{s as He}from"./slugify-CEUa2lfQ.js";import{B as qe}from"./badge-CKe-ib_i.js";import{a as yt,D as vt,c as St,d as Nt}from"./dialog-1B3YWWMu.js";import{F as be,a as _t,b as ve,d as Se,f as Ne,c as wt}from"./form-BQupN7IV.js";import{I as Ct,R as kt,a as It}from"./index-u_K3efbu.js";import{R as Tt}from"./resource-tabs-DkDSMlFB.js";import{S as $t,a as Rt,b as zt,c as At,d as Ue}from"./select-Bv7J3zlQ.js";import{S as Et}from"./switch-ugX7u7WU.js";import{T as Pt}from"./textarea-BUrXtpl5.js";import{a as Z,c as Y,b as J,T as Q}from"./tooltip-vUrxHIt0.js";import{i as Ze}from"./Check-Cjgi2ZiG.js";import{i as Mt}from"./Code01-XpAoNs3W.js";import{a as Dt}from"./Copy01-De4SwxDv.js";import{i as Ut}from"./FlipBackward-CQnTJKeB.js";import{i as je}from"./InfoCircle-_4UsKVMw.js";import{i as ze}from"./Loading01-JwelopeC.js";import{a as Lt,V as Ot,b as Bt}from"./layout-D7T4rJzl.js";import"./connection-ByVJuREK.js";import"./project-context-provider-Dn1-l4h2.js";import"./use-collections-Cflasxiq.js";import"./useMutation-xcmVYLP7.js";import"./SearchMd-Cgfgcbdz.js";import"./use-organization-settings-D0kNSjbq.js";import"./localstorage-keys-kemGZMIp.js";import"./useQuery-BKyLWvSZ.js";import"./ChevronDown-BuVzyKHq.js";const Ye=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));Ye.displayName="ArrowsRight";const Je=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));Je.displayName="Circle";const Qe=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));Qe.displayName="Lightbulb02";const Ke=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M7 3v3.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C7.76 8 8.04 8 8.6 8h6.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C17 7.24 17 6.96 17 6.4V4m0 17v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));Ke.displayName="Save01";const Xe=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"m8.59 13.51 6.83 3.98m-.01-10.98-6.82 3.98M21 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm12 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Xe.displayName="Share07";const Me=ye(["inclusion","exclusion"]).describe("Tool selection mode: 'inclusion' = include selected (default), 'exclusion' = exclude selected"),Ft=re({connection_id:_().describe("Connection ID"),selected_tools:U(_()).nullable().describe("Selected tool names. With 'inclusion' mode: null = all tools included. With 'exclusion' mode: null = entire connection excluded"),selected_resources:U(_()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. With 'inclusion' mode: null = all resources included."),selected_prompts:U(_()).nullable().describe("Selected prompt names. With 'inclusion' mode: null = all prompts included. With 'exclusion' mode: null = entire connection excluded.")}),Vt=re({id:_().describe("Unique identifier for the gateway"),title:_().describe("Human-readable name for the gateway"),description:_().nullable().describe("Description of the gateway"),icon:_().nullable().optional().describe("Icon URL for the gateway"),created_at:_().describe("When the gateway was created"),updated_at:_().describe("When the gateway was last updated"),created_by:_().describe("User ID who created the gateway"),updated_by:_().optional().describe("User ID who last updated the gateway"),organization_id:_().describe("Organization ID this gateway belongs to"),tool_selection_mode:Me.describe("Tool selection mode: 'inclusion' = include selected, 'exclusion' = exclude selected"),status:ye(["active","inactive"]).describe("Current status"),connections:U(Ft).describe("Connections with their selected tools (behavior depends on tool_selection_mode)")});re({title:_().min(1).max(255).describe("Name for the gateway"),description:_().nullable().optional().describe("Optional description"),tool_selection_mode:Me.optional().default("inclusion").describe("Tool selection mode (defaults to 'inclusion')"),icon:_().nullable().optional().describe("Optional icon URL"),status:ye(["active","inactive"]).optional().default("active").describe("Initial status"),connections:U(re({connection_id:_().describe("Connection ID"),selected_tools:U(_()).nullable().optional().describe("Selected tool names (null/undefined = all tools or full exclusion)"),selected_resources:U(_()).nullable().optional().describe("Selected resource URIs or patterns with * and ** wildcards (null/undefined = all resources)"),selected_prompts:U(_()).nullable().optional().describe("Selected prompt names (null/undefined = all prompts or full exclusion)")})).describe("Connections to include/exclude (can be empty for exclusion mode)")});re({title:_().min(1).max(255).optional().describe("New name"),description:_().nullable().optional().describe("New description (null to clear)"),tool_selection_mode:Me.optional().describe("New tool selection mode"),icon:_().nullable().optional().describe("New icon URL (null to clear)"),status:ye(["active","inactive"]).optional().describe("New status"),connections:U(re({connection_id:_().describe("Connection ID"),selected_tools:U(_()).nullable().optional().describe("Selected tool names (null/undefined = all tools or full exclusion)"),selected_resources:U(_()).nullable().optional().describe("Selected resource URIs or patterns with * and ** wildcards (null/undefined = all resources)"),selected_prompts:U(_()).nullable().optional().describe("Selected prompt names (null/undefined = all prompts or full exclusion)")})).optional().describe("New connections (replaces existing)")});const Gt=S.memo(function(e){const s=R.c(20),{connection:l,isSelected:i,hasItemsEnabled:n,activeItemsCount:a,totalItemsCount:c,onSelect:m,onToggle:r}=e,d=i?"bg-accent/50":"hover:bg-muted/50";let u;s[0]!==d?(u=H("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",d),s[0]=d,s[1]=u):u=s[1];let f;s[2]!==l.icon||s[3]!==l.title?(f=t.jsx(Ee,{icon:l.icon,name:l.title,size:"xs"}),s[2]=l.icon,s[3]=l.title,s[4]=f):f=s[4];let p;s[5]!==l.title?(p=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:l.title})}),s[5]=l.title,s[6]=p):p=s[6];let x;s[7]!==m||s[8]!==f||s[9]!==p?(x=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:m,children:[f,p]}),s[7]=m,s[8]=f,s[9]=p,s[10]=x):x=s[10];let g;s[11]!==a||s[12]!==n||s[13]!==r||s[14]!==c?(g=c>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[a,"/",c]}),t.jsx(Ge,{checked:n,onCheckedChange:r,onClick:Ht})]}),s[11]=a,s[12]=n,s[13]=r,s[14]=c,s[15]=g):g=s[15];let y;return s[16]!==u||s[17]!==x||s[18]!==g?(y=t.jsxs("div",{className:u,children:[x,g]}),s[16]=u,s[17]=x,s[18]=g,s[19]=y):y=s[19],y}),Wt=S.memo(function(e){const s=R.c(18),{connectionId:l,item:i,isSelected:n,onToggle:a}=e,c=`item-${l}-${i.id}`,m=n?"text-foreground":"text-muted-foreground";let r;s[0]!==m?(r=H("text-sm font-medium",m),s[0]=m,s[1]=r):r=s[1];let d;s[2]!==i.name||s[3]!==r?(d=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:r,children:i.name})}),s[2]=i.name,s[3]=r,s[4]=d):d=s[4];let u;s[5]!==i.description?(u=i.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:i.description}),s[5]=i.description,s[6]=u):u=s[6];let f;s[7]!==d||s[8]!==u?(f=t.jsxs("div",{className:"flex-1 min-w-0",children:[d,u]}),s[7]=d,s[8]=u,s[9]=f):f=s[9];const p=`item-${l}-${i.id}`;let x;s[10]!==n||s[11]!==a||s[12]!==p?(x=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(Ge,{id:p,checked:n,onCheckedChange:a,onClick:qt})}),s[10]=n,s[11]=a,s[12]=p,s[13]=x):x=s[13];let g;return s[14]!==c||s[15]!==f||s[16]!==x?(g=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:c,children:[f,x]}),s[14]=c,s[15]=f,s[16]=x,s[17]=g):g=s[17],g});function et({itemSet:o,onItemSetChange:e,getItems:s,itemLabel:l,emptyItemsMessage:i,extraContent:n}){const[a,c]=S.useState(""),m=S.useDeferredValue(a),[r,d]=S.useState("all"),[u,f]=S.useState(!1),p=S.useRef(new Set(Object.keys(o))),x=We({searchTerm:m.trim()||void 0}),g=p.current,y=[...g.values()].map(h=>x.find(N=>N.id===h)).filter(h=>h!==void 0),j=x.filter(h=>!g.has(h.id)),v=[...y,...j],b=h=>{const N=o[h];return N!==void 0&&N.length>0},w=v.filter(h=>{if(r==="all")return!0;const N=b(h.id);return r==="selected"?N:r==="unselected"?!N:!0}),[I,k]=S.useState(v[0]?.id??null),C=I?v.find(h=>h.id===I)??null:null,P=C?s(C):[],E=(h,N)=>o[h]?.includes(N)??!1,L=(h,N)=>{const z=o[h]??[],$=z.includes(N),G={...o};if($){const W=z.filter(q=>q!==N);W.length===0?delete G[h]:G[h]=W}else G[h]=[...z,N];e(G)},B=h=>{const N=v.find(F=>F.id===h);if(!N)return;const z=s(N);if(z.length===0)return;const $=o[h]??[],G=z.map(F=>F.id),W=$.length>0&&G.every(F=>$.includes(F)),q={...o};W?delete q[h]:(q[h]=G,k(h)),e(q)},A=h=>{k(h),f(!0)},M=()=>{f(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:H("w-full md:w-80 border-r border-border flex flex-col",u&&"hidden md:flex"),children:[t.jsx(ct,{value:a,onChange:c,placeholder:"Search Connections..."}),t.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[t.jsx("button",{onClick:()=>d("all"),className:H("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>d("selected"),className:H("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>d("unselected"),className:H("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:w.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:a?"No connections found":r==="selected"?"No servers selected":r==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:w.map(h=>{const z=s(h).length,$=o[h.id]?.length??0;return t.jsx(Gt,{connection:h,isSelected:I===h.id,hasItemsEnabled:b(h.id),activeItemsCount:$,totalItemsCount:z,onSelect:()=>A(h.id),onToggle:()=>B(h.id)},h.id)})})})]}),t.jsx("div",{className:H("flex-1 flex-col",u?"flex":"hidden md:flex"),children:C?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[t.jsx(V,{variant:"ghost",size:"sm",onClick:M,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(at,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(Ee,{icon:C.icon,name:C.title,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:C.title}),C.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:C.description})]})]})]}),n,t.jsx("div",{className:"flex-1 overflow-auto p-4",children:P.length===0?t.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:i||`This connection has no ${l} available`}):t.jsx("div",{className:"space-y-2",children:P.map(h=>t.jsx(Wt,{connectionId:C.id,item:h,isSelected:E(C.id,h.id),onToggle:()=>L(C.id,h.id)},h.id))})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Select a connection to view its ",l]})})})]})}function Ht(o){return o.stopPropagation()}function qt(o){return o.stopPropagation()}function Zt(o){const e=R.c(6),{promptSet:s,onPromptSetChange:l,connectionPrompts:i}=o;let n;e[0]!==i?(n=m=>(i.get(m.id)??[]).map(Yt),e[0]=i,e[1]=n):n=e[1];const a=n;let c;return e[2]!==a||e[3]!==l||e[4]!==s?(c=t.jsx(et,{itemSet:s,onItemSetChange:l,getItems:a,itemLabel:"prompts",emptyItemsMessage:"This connection has no prompts available"}),e[2]=a,e[3]=l,e[4]=s,e[5]=c):c=e[5],c}function Yt(o){return{id:o.name,name:o.name,description:o.description}}function Jt(o){return o.includes("*")}function Qt(o){const e=R.c(27),{patterns:s,onAddPattern:l,onRemovePattern:i}=o,[n,a]=S.useState("");let c;e[0]!==n||e[1]!==l||e[2]!==s?(c=()=>{const f=n.trim();f&&!s.includes(f)&&(l(f),a(""))},e[0]=n,e[1]=l,e[2]=s,e[3]=c):c=e[3];const m=c;let r;e[4]!==m?(r=f=>{f.key==="Enter"&&(f.preventDefault(),m())},e[4]=m,e[5]=r):r=e[5];const d=r;let u;if(e[6]!==m||e[7]!==d||e[8]!==n||e[9]!==i||e[10]!==s){const f=s.filter(Jt);let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("code",{children:"*"}),e[12]=p):p=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsxs("div",{className:"text-xs text-muted-foreground",children:["Add URI patterns to match multiple resources. Use ",p," for single segment and ",t.jsx("code",{children:"**"})," for multiple segments."]}),e[13]=x):x=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=k=>a(k.target.value),e[14]=g):g=e[14];let y;e[15]!==d||e[16]!==n?(y=t.jsx(Pe,{value:n,onChange:g,onKeyDown:d,placeholder:"e.g., file:///**/*.ts or db://users/*",className:"flex-1 text-sm"}),e[15]=d,e[16]=n,e[17]=y):y=e[17];let j;e[18]!==n?(j=n.trim(),e[18]=n,e[19]=j):j=e[19];const v=!j;let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(dt,{size:16}),e[20]=b):b=e[20];let w;e[21]!==m||e[22]!==v?(w=t.jsx(V,{type:"button",variant:"outline",size:"sm",onClick:m,disabled:v,children:b}),e[21]=m,e[22]=v,e[23]=w):w=e[23];let I;e[24]!==w||e[25]!==y?(I=t.jsxs("div",{className:"flex gap-2",children:[y,w]}),e[24]=w,e[25]=y,e[26]=I):I=e[26],u=t.jsxs("div",{className:"border-b border-border p-4 space-y-3",children:[x,I,f.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2",children:f.map(k=>t.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-muted rounded-md text-xs",children:[t.jsx("code",{className:"text-foreground",children:k}),t.jsx("button",{type:"button",onClick:()=>i(k),className:"text-muted-foreground hover:text-foreground",children:t.jsx(mt,{size:12})})]},k))})]}),e[6]=m,e[7]=d,e[8]=n,e[9]=i,e[10]=s,e[11]=u}else u=e[11];return u}function Kt(o){const e=R.c(23),{resourceSet:s,onResourceSetChange:l,connectionResources:i}=o,[n]=S.useState(null);let a;e[0]!==i?(a=b=>(i.get(b.id)??[]).map(Xt),e[0]=i,e[1]=a):a=e[1];const c=a;let m;e[2]!==l||e[3]!==s?(m=(b,w)=>{const I=s[b]??[];I.includes(w)||l({...s,[b]:[...I,w]})},e[2]=l,e[3]=s,e[4]=m):m=e[4];const r=m;let d;e[5]!==l||e[6]!==s?(d=(b,w)=>{const k=(s[b]??[]).filter(C=>C!==w);if(k.length===0){const C={...s};delete C[b],l(C)}else l({...s,[b]:k})},e[5]=l,e[6]=s,e[7]=d):d=e[7];const u=d;let f;e[8]!==l?(f=b=>{l(b)},e[8]=l,e[9]=f):f=e[9];const p=f;let x;e[10]!==s||e[11]!==n?(x=n?s[n]??[]:[],e[10]=s,e[11]=n,e[12]=x):x=e[12];const g=x;let y;e[13]!==r||e[14]!==u||e[15]!==n||e[16]!==g?(y=n?t.jsx(Qt,{patterns:g,onAddPattern:b=>r(n,b),onRemovePattern:b=>u(n,b)}):null,e[13]=r,e[14]=u,e[15]=n,e[16]=g,e[17]=y):y=e[17];const j=y;let v;return e[18]!==j||e[19]!==c||e[20]!==p||e[21]!==s?(v=t.jsx("div",{className:"h-full",children:t.jsx(et,{itemSet:s,onItemSetChange:p,getItems:c,itemLabel:"resources",emptyItemsMessage:"This connection has no resources available",extraContent:j})}),e[18]=j,e[19]=c,e[20]=p,e[21]=s,e[22]=v):v=e[22],v}function Xt(o){return{id:o.uri,name:o.name||o.uri,description:o.description||o.uri}}function es(o){const e=R.c(8);let s,l;e[0]!==o?({className:s,...l}=o,e[0]=o,e[1]=s,e[2]=l):(s=e[1],l=e[2]);let i;e[3]!==s?(i=H("grid gap-3",s),e[3]=s,e[4]=i):i=e[4];let n;return e[5]!==l||e[6]!==i?(n=t.jsx(kt,{"data-slot":"radio-group",className:i,...l}),e[5]=l,e[6]=i,e[7]=n):n=e[7],n}function Re(o){const e=R.c(9);let s,l;e[0]!==o?({className:s,...l}=o,e[0]=o,e[1]=s,e[2]=l):(s=e[1],l=e[2]);let i;e[3]!==s?(i=H("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=i):i=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(It,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Je,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=n):n=e[5];let a;return e[6]!==l||e[7]!==i?(a=t.jsx(Ct,{"data-slot":"radio-group-item",className:i,...l,children:n}),e[6]=l,e[7]=i,e[8]=a):a=e[8],a}function ts(o){const s=new TextEncoder().encode(o),l=Array.from(s,i=>String.fromCharCode(i)).join("");return btoa(l)}const ss=Vt.pick({title:!0,description:!0,status:!0,tool_selection_mode:!0}).extend({title:_().min(1,"Name is required").max(255)});function Le(o,e){const s={};for(const l of o.connections)if(l.selected_tools===null){const i=e.get(l.connection_id)??[];i.length>0&&(s[l.connection_id]=i)}else l.selected_tools.length>0&&(s[l.connection_id]=l.selected_tools);return s}function Oe(o){const e={};for(const s of o.connections)s.selected_resources!==null&&s.selected_resources!==void 0&&s.selected_resources.length>0&&(e[s.connection_id]=s.selected_resources);return e}function Be(o){const e={};for(const s of o.connections)s.selected_prompts!==null&&s.selected_prompts!==void 0&&s.selected_prompts.length>0&&(e[s.connection_id]=s.selected_prompts);return e}function os(o,e,s,l){const i=new Set([...Object.keys(o),...Object.keys(e),...Object.keys(s)]);return Array.from(i).map(n=>{const a=o[n]??[],c=l.get(n)??[],m=c.length>0&&c.every(r=>a.includes(r));return{connection_id:n,selected_tools:a.length===0||m?null:a,selected_resources:e[n]??null,selected_prompts:s[n]??null}})}function ls(o){const e=R.c(10),{gatewayUrl:s}=o,[l,i]=S.useState(!1);let n;e[0]!==s?(n=async()=>{await navigator.clipboard.writeText(s),i(!0),Ae.success("Agent URL copied to clipboard"),setTimeout(()=>i(!1),2e3)},e[0]=s,e[1]=n):n=e[1];const a=n;let c;e[2]!==l?(c=l?t.jsx(Ze,{size:20,className:"text-green-600"}):t.jsx(Dt,{size:20}),e[2]=l,e[3]=c):c=e[3];const m=l?"Copied!":"Copy URL";let r;e[4]!==m?(r=t.jsx("span",{className:"text-xs font-medium",children:m}),e[4]=m,e[5]=r):r=e[5];let d;return e[6]!==a||e[7]!==c||e[8]!==r?(d=t.jsxs(V,{type:"button",variant:"outline",onClick:a,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[c,r]}),e[6]=a,e[7]=c,e[8]=r,e[9]=d):d=e[9],d}function ns(o){const e=R.c(7),{gatewayUrl:s,serverName:l}=o;let i;e[0]!==s||e[1]!==l?(i=()=>{const r=He(l),u=ts(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),f=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(r)}&config=${encodeURIComponent(u)}`;window.open(f,"_blank"),Ae.success("Opening Cursor...")},e[0]=s,e[1]=l,e[2]=i):i=e[2];const n=i;let a,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),c=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=a,e[4]=c):(a=e[3],c=e[4]);let m;return e[5]!==n?(m=t.jsxs(V,{type:"button",variant:"outline",onClick:n,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[a,c]}),e[5]=n,e[6]=m):m=e[6],m}function is(o){const e=R.c(11),{gatewayUrl:s,serverName:l}=o,[i,n]=S.useState(!1);let a;e[0]!==s||e[1]!==l?(a=async()=>{const f=He(l),x=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),g=`claude mcp add "${f}" --config '${x.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(g),n(!0),Ae.success("Claude Code command copied to clipboard"),setTimeout(()=>n(!1),2e3)},e[0]=s,e[1]=l,e[2]=a):a=e[2];const c=a;let m;e[3]!==i?(m=i?t.jsx(Ze,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=i,e[4]=m):m=e[4];const r=i?"Copied!":"Install on Claude";let d;e[5]!==r?(d=t.jsx("span",{className:"text-xs font-medium",children:r}),e[5]=r,e[6]=d):d=e[6];let u;return e[7]!==c||e[8]!==m||e[9]!==d?(u=t.jsxs(V,{type:"button",variant:"outline",onClick:c,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[m,d]}),e[7]=c,e[8]=m,e[9]=d,e[10]=u):u=e[10],u}function rs(o){const e=R.c(40),{open:s,onOpenChange:l,gateway:i}=o,[n,a]=S.useState("code_execution");let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=$=>{($==="passthrough"||$==="smart_tool_selection"||$==="code_execution")&&a($)},e[0]=c):c=e[0];const m=c;let r;e[1]!==i.id||e[2]!==n?(r=new URL(`/mcp/gateway/${i.id}`,window.location.origin),r.searchParams.set("mode",n),e[1]=i.id,e[2]=n,e[3]=r):r=e[3];let d;e[4]!==i.id||e[5]!==i.title?(d=i.title||`agent-${i.id.slice(0,8)}`,e[4]=i.id,e[5]=i.title,e[6]=d):d=e[6];const u=d;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(yt,{children:t.jsx(vt,{children:"Share Agent"})}),e[7]=f):f=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mt-1",children:"How should this agent work?"})}),e[8]=p):p=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Ye,{className:"size-5 text-muted-foreground"})}),e[9]=x):x=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=g):g=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(J,{asChild:!0,children:t.jsx(je,{className:"size-3.5 text-muted-foreground"})}),e[11]=y):y=e[11];let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("label",{htmlFor:"mode-passthrough",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[x,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[g,t.jsx(Z,{children:t.jsxs(Y,{children:[y,t.jsx(Q,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"All tools are exposed directly via tools/list. Best for small tool surfaces with deterministic behavior."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Best for small teams or when you need predictable behavior"})]}),t.jsx(Re,{id:"mode-passthrough",value:"passthrough"})]}),e[12]=j):j=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Qe,{className:"size-5 text-muted-foreground"})}),e[13]=v):v=e[13];let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=b):b=e[14];let w;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(J,{asChild:!0,children:t.jsx(je,{className:"size-3.5 text-muted-foreground"})}),e[15]=w):w=e[15];let I;e[16]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsxs("label",{htmlFor:"mode-smart",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[v,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[b,t.jsx(Z,{children:t.jsxs(Y,{children:[w,t.jsx(Q,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Uses meta-tools (GATEWAY_SEARCH_TOOLS, GATEWAY_DESCRIBE_TOOLS, GATEWAY_CALL_TOOL) to keep the tool list small and request details on demand."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Ideal for large teams with many tools - AI finds what it needs"})]}),t.jsx(Re,{id:"mode-smart",value:"smart_tool_selection"})]}),e[16]=I):I=e[16];let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Mt,{className:"size-5 text-muted-foreground"})}),e[17]=k):k=e[17];let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=C):C=e[18];let P;e[19]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(J,{asChild:!0,children:t.jsx(je,{className:"size-3.5 text-muted-foreground"})}),e[19]=P):P=e[19];let E;e[20]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsxs("label",{htmlFor:"mode-code",className:"relative flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[k,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[C,t.jsx(Z,{children:t.jsxs(Y,{children:[P,t.jsx(Q,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Exposes meta-tools for discovery + sandboxed execution (GATEWAY_RUN_CODE). Reduces overhead on large surfaces by shifting work into a controlled runtime."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Maximum flexibility - AI can write code to orchestrate tools"})]}),t.jsx(Re,{id:"mode-code",value:"code_execution"}),t.jsx(qe,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=E):E=e[20];let L;e[21]!==n?(L=t.jsxs("div",{className:"flex flex-col gap-3",children:[p,t.jsxs(es,{value:n,onValueChange:m,className:"flex flex-col gap-4.5",children:[j,I,E]})]}),e[21]=n,e[22]=L):L=e[22];let B;e[23]!==r.href?(B=t.jsx(ls,{gatewayUrl:r.href}),e[23]=r.href,e[24]=B):B=e[24];let A,M;e[25]!==r.href||e[26]!==u?(A=t.jsx(ns,{gatewayUrl:r.href,serverName:u}),M=t.jsx(is,{gatewayUrl:r.href,serverName:u}),e[25]=r.href,e[26]=u,e[27]=A,e[28]=M):(A=e[27],M=e[28]);let h;e[29]!==B||e[30]!==A||e[31]!==M?(h=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[B,A,M]})}),e[29]=B,e[30]=A,e[31]=M,e[32]=h):h=e[32];let N;e[33]!==L||e[34]!==h?(N=t.jsxs(St,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[f,t.jsxs("div",{className:"flex flex-col gap-6",children:[L,h]})]}),e[33]=L,e[34]=h,e[35]=N):N=e[35];let z;return e[36]!==l||e[37]!==s||e[38]!==N?(z=t.jsx(Nt,{open:s,onOpenChange:l,children:N}),e[36]=l,e[37]=s,e[38]=N,e[39]=z):z=e[39],z}function as(o){const e=R.c(31),{form:s,icon:l,gatewayId:i}=o,[n,a]=jt(i);let c;e[0]!==s?(c=s.watch("title")||"Agent",e[0]=s,e[1]=c):c=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(pt,{}),e[2]=m):m=e[2];let r;e[3]!==l||e[4]!==c?(r=t.jsx(Ee,{icon:l,name:c,size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=l,e[4]=c,e[5]=r):r=e[5];let d;e[6]!==s.control?(d=t.jsx(be,{control:s.control,name:"status",render:us}),e[6]=s.control,e[7]=d):d=e[7];let u;e[8]!==r||e[9]!==d?(u=t.jsxs("div",{className:"flex items-start justify-between",children:[r,d]}),e[8]=r,e[9]=d,e[10]=u):u=e[10];let f;e[11]!==s.control?(f=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(be,{control:s.control,name:"title",render:ms}),t.jsx(be,{control:s.control,name:"description",render:ds})]}),e[11]=s.control,e[12]=f):f=e[12];let p;e[13]!==u||e[14]!==f?(p=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[u,f]}),e[13]=u,e[14]=f,e[15]=p):p=e[15];let x;e[16]!==s.control?(x=t.jsx("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:t.jsx(be,{control:s.control,name:"tool_selection_mode",render:cs})}),e[16]=s.control,e[17]=x):x=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"System Prompt"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Stored locally for now"})]}),e[18]=g):g=e[18];let y;e[19]!==a?(y=w=>a(w.target.value),e[19]=a,e[20]=y):y=e[20];let j;e[21]!==n||e[22]!==y?(j=t.jsxs("div",{className:"flex flex-col gap-3 p-5",children:[g,t.jsx(Pt,{value:n,onChange:y,placeholder:"Enter system prompt instructions...",className:"min-h-[240px] resize-none text-sm leading-relaxed"})]}),e[21]=n,e[22]=y,e[23]=j):j=e[23];let v;e[24]!==j||e[25]!==p||e[26]!==x?(v=t.jsxs("div",{className:"flex flex-col",children:[p,x,j]}),e[24]=j,e[25]=p,e[26]=x,e[27]=v):v=e[27];let b;return e[28]!==s||e[29]!==v?(b=t.jsx("div",{className:"flex flex-col h-full overflow-auto",children:t.jsx(_t,{...s,children:v})}),e[28]=s,e[29]=v,e[30]=b):b=e[30],b}function cs(o){const{field:e}=o;return t.jsxs(ve,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(wt,{className:"mb-0",children:"Selection Mode"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Z,{children:t.jsxs(Y,{children:[t.jsx(J,{asChild:!0,children:t.jsx(V,{type:"button",variant:"ghost",size:"icon",className:"size-7","aria-label":"Selection mode help",children:t.jsx(je,{size:14,className:"text-muted-foreground"})})}),t.jsx(Q,{side:"left",className:"max-w-sm",children:t.jsxs("div",{className:"text-xs space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Include:"})," Only selected items are exposed."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Exclude:"})," All items except selected ones are exposed."]})]})})]})}),t.jsxs($t,{value:e.value,onValueChange:e.onChange,children:[t.jsx(Se,{children:t.jsx(Rt,{className:"w-[180px]",children:t.jsx(zt,{})})}),t.jsxs(At,{children:[t.jsx(Ue,{value:"inclusion",children:"Include Selected"}),t.jsx(Ue,{value:"exclusion",children:"Exclude Selected"})]})]})]})]}),t.jsx(Ne,{})]})}function ds(o){const{field:e}=o;return t.jsxs(ve,{className:"w-full space-y-0",children:[t.jsx(Se,{children:t.jsx(Pe,{...e,value:e.value||"",className:"h-auto text-base text-muted-foreground leading-6 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})}),t.jsx(Ne,{})]})}function ms(o){const{field:e}=o;return t.jsxs(ve,{className:"w-full space-y-0",children:[t.jsx(Se,{children:t.jsx(Pe,{...e,className:"h-auto text-lg! font-medium leading-7 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Agent Name"})}),t.jsx(Ne,{})]})}function us(o){const{field:e}=o;return t.jsxs(ve,{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(qe,{variant:e.value==="active"?"success":"outline",children:e.value==="active"?"Active":"Inactive"}),t.jsx(Se,{children:t.jsx(Et,{checked:e.value==="active",onCheckedChange:s=>e.onChange(s?"active":"inactive")})})]}),t.jsx(Ne,{})]})}function fs(o){const e=R.c(81),{gateway:s,gatewayId:l,requestedTabId:i}=o,a=ot().location.href,c=lt();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={from:"/$org/gateways/$gatewayId"},e[0]=m):m=e[0];const r=Fe(m),d=xt();let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u={},e[1]=u):u=e[1];const f=We(u);let p;e[2]!==f?(p=f.map(xs),e[2]=f,e[3]=p):p=e[3];const x=p,{promptsMap:g}=gt(x),{resourcesMap:y}=bt(x);let j;if(e[4]!==f){j=new Map;for(const T of f)T.tools&&T.tools.length>0&&j.set(T.id,T.tools.map(hs));e[4]=f,e[5]=j}else j=e[5];let v;e[6]!==j||e[7]!==s?(v=()=>Le(s,j),e[6]=j,e[7]=s,e[8]=v):v=e[8];const[b,w]=S.useState(v);let I;e[9]!==s?(I=()=>Oe(s),e[9]=s,e[10]=I):I=e[10];const[k,C]=S.useState(I);let P;e[11]!==s?(P=()=>Be(s),e[11]=s,e[12]=P):P=e[12];const[E,L]=S.useState(P),[B,A]=S.useState(!1),[M,h]=S.useState(!1);let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=T=>{w(T),A(!0)},e[13]=N):N=e[13];const z=N;let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=T=>{C(T),A(!0)},e[14]=$):$=e[14];const G=$;let W;e[15]===Symbol.for("react.memo_cache_sentinel")?(W=T=>{L(T),A(!0)},e[15]=W):W=e[15];const q=W;let F;e[16]===Symbol.for("react.memo_cache_sentinel")?(F=nt(ss),e[16]=F):F=e[16];const _e=s.tool_selection_mode??"inclusion";let ce;e[17]!==s.description||e[18]!==s.status||e[19]!==s.title||e[20]!==_e?(ce={resolver:F,defaultValues:{title:s.title,description:s.description,status:s.status,tool_selection_mode:_e}},e[17]=s.description,e[18]=s.status,e[19]=s.title,e[20]=_e,e[21]=ce):ce=e[21];const O=it(ce),we=O.formState.isDirty||B;let de;e[22]!==d.update||e[23]!==j||e[24]!==O||e[25]!==l||e[26]!==E||e[27]!==k||e[28]!==b?(de=async()=>{const T=O.getValues(),$e=os(b,k,E,j);await d.update.mutateAsync({id:l,data:{title:T.title,description:T.description,status:T.status,tool_selection_mode:T.tool_selection_mode,connections:$e}}),O.reset(T),A(!1)},e[22]=d.update,e[23]=j,e[24]=O,e[25]=l,e[26]=E,e[27]=k,e[28]=b,e[29]=de):de=e[29];const Ce=de;let me;e[30]!==j||e[31]!==O||e[32]!==s?(me=()=>{O.reset({title:s.title,description:s.description,status:s.status,tool_selection_mode:s.tool_selection_mode??"inclusion"}),w(Le(s,j)),C(Oe(s)),L(Be(s)),A(!1)},e[30]=j,e[31]=O,e[32]=s,e[33]=me):me=e[33];const ke=me;let ue;e[34]===Symbol.for("react.memo_cache_sentinel")?(ue=[{id:"settings",label:"Settings"},{id:"tools",label:"Tools"},{id:"resources",label:"Resources"},{id:"prompts",label:"Prompts"}],e[34]=ue):ue=e[34];const De=ue,D=De.some(T=>T.id===i)?i:"settings";let fe;e[35]!==r?(fe=T=>{r({search:$e=>({...$e,tab:T}),replace:!0})},e[35]=r,e[36]=fe):fe=e[36];const Ie=fe,ae=d.update.isPending;let K;e[37]!==c.history?(K=()=>c.history.back(),e[37]=c.history,e[38]=K):K=e[38];let X;e[39]!==D||e[40]!==Ie?(X=t.jsx(Lt,{children:t.jsx(Tt,{tabs:De,activeTab:D,onTabChange:Ie})}),e[39]=D,e[40]=Ie,e[41]=X):X=e[41];let ee;e[42]!==ke||e[43]!==Ce||e[44]!==we||e[45]!==ae?(ee=we&&t.jsxs(t.Fragment,{children:[t.jsx(Z,{children:t.jsxs(Y,{delayDuration:0,children:[t.jsx(J,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:ae,onClick:ke,"aria-label":"Cancel",children:t.jsx(Ut,{size:14})})})}),t.jsx(Q,{side:"bottom",children:"Cancel"})]})}),t.jsx(Z,{children:t.jsxs(Y,{delayDuration:0,children:[t.jsx(J,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:ae,onClick:Ce,"aria-label":"Save",children:ae?t.jsx(ze,{size:14,className:"animate-spin"}):t.jsx(Ke,{size:14})})})}),t.jsx(Q,{side:"bottom",children:"Save"})]})})]}),e[42]=ke,e[43]=Ce,e[44]=we,e[45]=ae,e[46]=ee):ee=e[46];let he;e[47]===Symbol.for("react.memo_cache_sentinel")?(he=()=>h(!0),e[47]=he):he=e[47];let xe;e[48]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsx(Z,{children:t.jsxs(Y,{delayDuration:0,children:[t.jsx(J,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",onClick:he,"aria-label":"Share",children:t.jsx(Xe,{size:14})})})}),t.jsx(Q,{side:"bottom",children:"Share"})]})}),e[48]=xe):xe=e[48];const Te=s.icon??"cpu_chip";let te;e[49]!==s.title||e[50]!==Te||e[51]!==a?(te=t.jsx(ut,{title:s.title,url:a,icon:Te}),e[49]=s.title,e[50]=Te,e[51]=a,e[52]=te):te=e[52];let se;e[53]!==ee||e[54]!==te?(se=t.jsxs(Ot,{children:[ee,xe,te]}),e[53]=ee,e[54]=te,e[55]=se):se=e[55];let pe;e[56]===Symbol.for("react.memo_cache_sentinel")?(pe=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ze,{size:32,className:"animate-spin text-muted-foreground"})}),e[56]=pe):pe=e[56];let oe;e[57]!==D||e[58]!==g||e[59]!==y||e[60]!==O||e[61]!==s.icon||e[62]!==l||e[63]!==E||e[64]!==k||e[65]!==b?(oe=D==="settings"?t.jsx(as,{form:O,icon:s.icon,gatewayId:l}):D==="tools"?t.jsx(ft,{toolSet:b,onToolSetChange:z}):D==="resources"?t.jsx(Kt,{resourceSet:k,onResourceSetChange:G,connectionResources:y}):D==="prompts"?t.jsx(Zt,{promptSet:E,onPromptSetChange:q,connectionPrompts:g}):null,e[57]=D,e[58]=g,e[59]=y,e[60]=O,e[61]=s.icon,e[62]=l,e[63]=E,e[64]=k,e[65]=b,e[66]=oe):oe=e[66];let le;e[67]!==oe?(le=t.jsx(S.Suspense,{fallback:pe,children:oe}),e[67]=oe,e[68]=le):le=e[68];let ne;e[69]!==D||e[70]!==le?(ne=t.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-hidden",children:t.jsx("div",{className:"h-full overflow-auto",children:t.jsx(Ve,{children:le},D)})})}),e[69]=D,e[70]=le,e[71]=ne):ne=e[71];let ie;e[72]!==s||e[73]!==M?(ie=t.jsx(rs,{open:M,onOpenChange:h,gateway:s}),e[72]=s,e[73]=M,e[74]=ie):ie=e[74];let ge;return e[75]!==K||e[76]!==X||e[77]!==se||e[78]!==ne||e[79]!==ie?(ge=t.jsxs(Bt,{onBack:K,children:[X,se,ne,ie]}),e[75]=K,e[76]=X,e[77]=se,e[78]=ne,e[79]=ie,e[80]=ge):ge=e[80],ge}function hs(o){return o.name}function xs(o){return o.id}function ps(){const o=R.c(10);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/gateways/$gatewayId"},o[0]=e):e=o[0];const s=Fe(e);let l;o[1]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/gateways/$gatewayId"},o[1]=l):l=o[1];const{gatewayId:i,org:n}=tt(l);let a;o[2]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/gateways/$gatewayId"},o[2]=a):a=o[2];const m=st(a).tab||"settings",r=ht(i);if(!r){let u;return o[3]!==s||o[4]!==n?(u=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(rt,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(V,{variant:"outline",onClick:()=>s({to:"/$org/gateways",params:{org:n}}),children:"Back to agents"})})}),o[3]=s,o[4]=n,o[5]=u):u=o[5],u}let d;return o[6]!==r||o[7]!==i||o[8]!==m?(d=t.jsx(fs,{gateway:r,gatewayId:i,requestedTabId:m}),o[6]=r,o[7]=i,o[8]=m,o[9]=d):d=o[9],d}function gs(){const o=R.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ve,{children:t.jsx(S.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ze,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(ps,{})})}),o[0]=e):e=o[0],e}function ro(){const o=R.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(gs,{}),o[0]=e):e=o[0],e}export{ro as default};
@@ -1,3 +0,0 @@
1
- import{r as w,e as et,a as W,j as n,f as te,t as U,c as h,R as tt,T as st,D as at,C as nt,P as ot,g as lt,O as rt,h as it,i as ct,k as ve,p as dt,l as mt,d as we,m as Ne,n as Z,G as ft,o as ut,S as Se,q as pt,s as ht,N as xt,v as gt,K as bt,w as ye}from"./index-DEuqpeVv.js";import{B as H,c as I}from"./button-DXl1hVqx.js";import{P as Ce,a as _e,b as ke}from"./popover-BcOo6EXw.js";import{B as fe}from"./badge-CKe-ib_i.js";import{i as ee}from"./Check-Cjgi2ZiG.js";import{n as ue}from"./Inbox01-CKGdnZFH.js";import{s as pe}from"./XClose-2bShEltc.js";import{E as $e}from"./error-boundary-rr4tK3fB.js";import{i as jt}from"./File06-BiIPMtEV.js";import{i as q}from"./X-DhyaYbLb.js";import{u as Y}from"./use-mobile-CI2w7svc.js";import{T as ze,a as Ie,b as Oe,c as Te}from"./tooltip-vUrxHIt0.js";import{S as Me,i as vt,u as wt,C as A,a as Nt}from"./index-DVolwMvn.js";import{u as le,a as St}from"./use-organization-settings-D0kNSjbq.js";import{u as se,L as he,P as yt,O as Ct}from"./project-context-provider-Dn1-l4h2.js";import{n as _t,I as kt}from"./empty-state-C7Gr5Tg2.js";import{i as Ae}from"./use-gateway-D5VVN1xE.js";import{a as $t}from"./Home02-ofwnyeoV.js";import{C as zt}from"./create-organization-dialog-DKwU0dfN.js";import{I as It}from"./input-CqqzkfyF.js";import{A as K}from"./avatar-d8M8JpvZ.js";import{c as Ot}from"./Grid01-CRALWbj6.js";import{D as Tt,a as Mt,b as At,c as Rt,d as xe}from"./dropdown-menu-Hp4qYTud.js";import{a as Re}from"./Copy01-De4SwxDv.js";import{n as ge}from"./LinkExternal01-C1dAUI0b.js";import{D as Pt,a as Et,b as Dt,c as Lt,d as Ht}from"./dialog-1B3YWWMu.js";import{L as Bt}from"./form-BQupN7IV.js";import{S as Ut}from"./switch-ugX7u7WU.js";import{i as Wt}from"./Code01-XpAoNs3W.js";import{u as re,L as ie}from"./localstorage-keys-kemGZMIp.js";import{T as Ft,t as Vt}from"./typewriter-title-7_SusDya.js";import{R as Pe,a as Gt,b as Kt}from"./resizable-DkFmgcsj.js";import{s as Zt}from"./Plus-Df2M6Ns2.js";import"./textarea-BUrXtpl5.js";import"./AlertCircle-CahACZDg.js";import"./ArrowUp-Ck0taqJi.js";import"./ChevronDown-BuVzyKHq.js";import"./Edit01-DsRHb45T.js";import"./connection-ByVJuREK.js";import"./use-collections-Cflasxiq.js";import"./useMutation-xcmVYLP7.js";import"./use-connection-DhRUkVvI.js";import"./use-binding-B0VMz_Ex.js";import"./binder-iKe3ndXq.js";import"./use-gateway-system-prompt-B3fSaA6r.js";import"./SearchMd-Cgfgcbdz.js";import"./use-create-gateway-DMkdPgfy.js";import"./select-Bv7J3zlQ.js";import"./Image01-Cb4gQMH4.js";import"./spinner-D0hdWfev.js";import"./Terminal-C8LHfiOW.js";import"./monaco-editor-rl0nEzOU.js";import"./alert-dialog-gZhceV_v.js";import"./well-known-mcp-DOEdYmKO.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-KvZ0cVo9.js";import"./useQuery-BKyLWvSZ.js";const Ee=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));Ee.displayName="BarChart10";const De=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));De.displayName="Building02";const Le=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));Le.displayName="Globe01";const He=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));He.displayName="LayoutRight";const Be=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));Be.displayName="LogOut01";const Ue=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Ue.displayName="Mail01";const ce=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),w.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));ce.displayName="Settings01";const We=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));We.displayName="Users01";const Fe=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M13 2 4.093 12.688c-.348.418-.523.628-.525.804a.5.5 0 0 0 .185.397c.138.111.41.111.955.111H12l-1 8 8.907-10.688c.348-.418.523-.628.525-.804a.5.5 0 0 0-.185-.397c-.138-.111-.41-.111-.955-.111H12l1-8Z"}));Fe.displayName="Zap";function qt({invitation:t,onStatusChange:e}){const[s,a]=w.useState(!1),[o,l]=w.useState(!1),r=te(),i=async()=>{a(!0);try{const u=await W.organization.acceptInvitation({invitationId:t.id});if(u.error)U.error(u.error.message),a(!1);else{e(t.id,"accepted");const x=await W.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(U.success("Invitation accepted!"),r({to:"/$org",params:{org:x.data.slug}})):(U.success("Invitation accepted! Redirecting..."),r({to:"/"}))}}catch{U.error("Failed to accept invitation"),a(!1)}},c=async()=>{l(!0);try{const u=await W.organization.rejectInvitation({invitationId:t.id});u.error?(U.error(u.error.message),l(!1)):(U.success("Invitation rejected"),e(t.id,"rejected"),l(!1))}catch{U.error("Failed to reject invitation"),l(!1)}},d=t.organizationName||t.organizationId,m=t.inviter?.name||t.inviter?.email||t.email||"Someone",f=t.status==="pending",p=t.status==="accepted",b=t.status==="rejected";return n.jsxs("div",{className:`flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0 ${f?"":"opacity-50"}`,children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Ue,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:[n.jsx("span",{className:"font-semibold inline-block max-w-[120px] truncate align-bottom",children:m})," invited you to join ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:f?n.jsxs(n.Fragment,{children:[n.jsx(H,{variant:"ghost",size:"icon",onClick:c,disabled:s||o,className:"h-8 w-8",children:n.jsx(pe,{size:14})}),n.jsx(H,{variant:"outline",size:"icon",onClick:i,disabled:s||o,className:"h-8 w-8",children:n.jsx(ee,{size:14})})]}):p?n.jsxs(fe,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(ee,{size:12}),"Accepted"]}):b?n.jsxs(fe,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(pe,{size:12}),"Declined"]}):null})]})}function Yt(){const[t,e]=w.useState(!1),s=w.useContext(et),{data:a}=s.hooks.useListUserInvitations(),{data:o}=W.useListOrganizations(),[l,r]=w.useState({}),d=(a??[]).map(u=>{const x=(o??[]).find(g=>g.id===u.organizationId);return{...u,organizationSlug:x?.slug||u.organizationSlug,organizationName:x?.name||u.organizationName}}).map(u=>({...u,status:l[u.id]||u.status})),m=[...d].sort((u,x)=>{const g={pending:0,accepted:1,rejected:2};return(g[u.status]??999)-(g[x.status]??999)}),p=d.filter(u=>u.status==="pending").length>0,b=(u,x)=>{r(g=>({...g,[u]:x}))};return n.jsxs(Ce,{open:t,onOpenChange:e,children:[n.jsx(_e,{asChild:!0,children:n.jsxs(H,{variant:"ghost",size:"sm",className:"relative h-7 w-7 p-0","aria-label":"Inbox",children:[n.jsx(ue,{size:18,className:"text-muted-foreground"}),p&&n.jsx("span",{className:"absolute bottom-1 right-0.5 h-2 w-2 rounded-full bg-destructive ring-2 ring-background"})]})}),n.jsxs(ke,{align:"end",className:"w-[480px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:m.length>0?m.map(u=>n.jsx(qt,{invitation:u,onStatusChange:b},u.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(ue,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function Jt(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(tt,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function Xt(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(ot,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function Qt(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx(rt,{"data-slot":"sheet-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function es(t){const e=h.c(17);let s,a,o,l;e[0]!==t?({className:a,children:s,side:l,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l):(s=e[1],a=e[2],o=e[3],l=e[4]);const r=l===void 0?"right":l;let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Qt,{}),e[5]=i):i=e[5];const c=r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",d=r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",m=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",f=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let p;e[6]!==a||e[7]!==c||e[8]!==d||e[9]!==m||e[10]!==f?(p=I("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",c,d,m,f,a),e[6]=a,e[7]=c,e[8]=d,e[9]=m,e[10]=f,e[11]=p):p=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsxs(lt,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[n.jsx(q,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=b):b=e[12];let u;return e[13]!==s||e[14]!==o||e[15]!==p?(u=n.jsxs(Xt,{children:[i,n.jsxs(nt,{"data-slot":"sheet-content",className:p,...o,children:[s,b]})]}),e[13]=s,e[14]=o,e[15]=p,e[16]=u):u=e[16],u}function ts(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex flex-col gap-1.5 p-4",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-slot":"sheet-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function ss(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("text-foreground font-semibold",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx(st,{"data-slot":"sheet-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function as(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("text-muted-foreground text-sm",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx(at,{"data-slot":"sheet-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}const ns="sidebar_state",os=3600*24*7,ls="16rem",rs="18rem",is="3rem",cs="b",Ve=w.createContext(null);function de(){const t=w.useContext(Ve);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function ds(t){const e=h.c(21),{defaultOpen:s,open:a,onOpenChange:o,children:l}=t,r=s===void 0?!0:s,i=Y(),[c,d]=w.useState(!1),[m,f]=w.useState(r),p=a??m;let b;e[0]!==p||e[1]!==o?(b=$=>{const S=typeof $=="function"?$(p):$;o?o(S):f(S),document.cookie=`${ns}=${S}; path=/; max-age=${os}`},e[0]=p,e[1]=o,e[2]=b):b=e[2];const u=b;let x;e[3]!==i||e[4]!==u?(x=()=>i?d(fs):u(ms),e[3]=i,e[4]=u,e[5]=x):x=e[5];const g=x;let j,v;e[6]!==g?(j=()=>{const $=S=>{if(S.key===cs&&(S.metaKey||S.ctrlKey)){const z=S.target;if(z.tagName==="INPUT"||z.tagName==="TEXTAREA"||z.isContentEditable)return;S.preventDefault(),g()}};return globalThis.addEventListener("keydown",$),()=>globalThis.removeEventListener("keydown",$)},v=[g],e[6]=g,e[7]=j,e[8]=v):(j=e[7],v=e[8]),w.useEffect(j,v);const N=p?"expanded":"collapsed";let k;e[9]!==i||e[10]!==p||e[11]!==c||e[12]!==u||e[13]!==N||e[14]!==g?(k={state:N,open:p,setOpen:u,isMobile:i,openMobile:c,setOpenMobile:d,toggleSidebar:g},e[9]=i,e[10]=p,e[11]=c,e[12]=u,e[13]=N,e[14]=g,e[15]=k):k=e[15];const y=k;let _;e[16]!==l?(_=n.jsx(Ie,{delayDuration:0,children:l}),e[16]=l,e[17]=_):_=e[17];let C;return e[18]!==y||e[19]!==_?(C=n.jsx(Ve.Provider,{value:y,children:_}),e[18]=y,e[19]=_,e[20]=C):C=e[20],C}function ms(t){return!t}function fs(t){return!t}function us(t){const e=h.c(14);let s,a,o,l;e[0]!==t?({className:a,style:l,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l):(s=e[1],a=e[2],o=e[3],l=e[4]);let r;e[5]!==l?(r={"--sidebar-width":ls,"--sidebar-width-icon":is,...l},e[5]=l,e[6]=r):r=e[6];const i=r;let c;e[7]!==a?(c=I("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==o||e[11]!==i||e[12]!==c?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:i,className:c,...o,children:s}),e[9]=s,e[10]=o,e[11]=i,e[12]=c,e[13]=d):d=e[13],d}function ps(t){const e=h.c(46);let s,a,o,l,r,i;e[0]!==t?({side:l,variant:r,collapsible:i,className:a,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=r,e[6]=i):(s=e[1],a=e[2],o=e[3],l=e[4],r=e[5],i=e[6]);const c=l===void 0?"left":l,d=r===void 0?"sidebar":r,m=i===void 0?"offcanvas":i,{isMobile:f,state:p,openMobile:b,setOpenMobile:u}=de();if(m==="none"){let S;e[7]!==a?(S=I("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=S):S=e[8];let z;return e[9]!==s||e[10]!==o||e[11]!==S?(z=n.jsx("div",{"data-slot":"sidebar",className:S,...o,children:s}),e[9]=s,e[10]=o,e[11]=S,e[12]=z):z=e[12],z}if(f){let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S={"--sidebar-width":rs},e[13]=S):S=e[13];let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsxs(ts,{className:"sr-only",children:[n.jsx(ss,{children:"Sidebar"}),n.jsx(as,{children:"Displays the mobile sidebar."})]}),e[14]=z):z=e[14];let O;e[15]!==s?(O=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=O):O=e[16];let T;e[17]!==c||e[18]!==O?(T=n.jsxs(es,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:S,side:c,children:[z,O]}),e[17]=c,e[18]=O,e[19]=T):T=e[19];let M;return e[20]!==b||e[21]!==o||e[22]!==u||e[23]!==T?(M=n.jsx(Jt,{open:b,onOpenChange:u,...o,children:T}),e[20]=b,e[21]=o,e[22]=u,e[23]=T,e[24]=M):M=e[24],M}const x=p==="collapsed"?m:"",g=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let j;e[25]!==g?(j=I("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",g),e[25]=g,e[26]=j):j=e[26];let v;e[27]!==j?(v=n.jsx("div",{"data-slot":"sidebar-gap",className:j}),e[27]=j,e[28]=v):v=e[28];const N=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",k=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let y;e[29]!==a||e[30]!==N||e[31]!==k?(y=I("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",N,k,a),e[29]=a,e[30]=N,e[31]=k,e[32]=y):y=e[32];let _;e[33]!==s?(_=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border py-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=_):_=e[34];let C;e[35]!==o||e[36]!==y||e[37]!==_?(C=n.jsx("div",{"data-slot":"sidebar-container",className:y,...o,children:_}),e[35]=o,e[36]=y,e[37]=_,e[38]=C):C=e[38];let $;return e[39]!==c||e[40]!==p||e[41]!==C||e[42]!==x||e[43]!==v||e[44]!==d?($=n.jsxs("div",{className:"group peer text-foreground hidden md:block border-r","data-state":p,"data-collapsible":x,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[v,C]}),e[39]=c,e[40]=p,e[41]=C,e[42]=x,e[43]=v,e[44]=d,e[45]=$):$=e[45],$}function hs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function xs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("h-4 m-0! w-full",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-sidebar":"separator",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function gs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function bs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function js(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("w-full text-sm",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function vs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function ae(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("group/menu-item relative",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}const ws=it("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ge(t){const e=h.c(28);let s,a,o,l,r,i,c;e[0]!==t?({asChild:o,isActive:l,variant:r,size:i,tooltip:c,className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=r,e[6]=i,e[7]=c):(s=e[1],a=e[2],o=e[3],l=e[4],r=e[5],i=e[6],c=e[7]);const d=o===void 0?!1:o,m=l===void 0?!1:l,f=r===void 0?"default":r,p=i===void 0?"default":i,b=d?ct:"button",{isMobile:u,state:x}=de();let g;e[8]!==s||e[9]!==p||e[10]!==f?(g=I(ws({variant:f,size:p}),s),e[8]=s,e[9]=p,e[10]=f,e[11]=g):g=e[11];let j;e[12]!==b||e[13]!==m||e[14]!==a||e[15]!==p||e[16]!==g?(j=n.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":p,"data-active":m,className:g,...a}),e[12]=b,e[13]=m,e[14]=a,e[15]=p,e[16]=g,e[17]=j):j=e[17];const v=j;if(!c)return v;if(typeof c=="string"){let C;e[18]!==c?(C={children:c},e[18]=c,e[19]=C):C=e[19],c=C}let N;e[20]!==v?(N=n.jsx(Oe,{asChild:!0,children:v}),e[20]=v,e[21]=N):N=e[21];const k=x!=="collapsed"||u;let y;e[22]!==k||e[23]!==c?(y=n.jsx(ze,{side:"right",align:"center",hidden:k,...c}),e[22]=k,e[23]=c,e[24]=y):y=e[24];let _;return e[25]!==N||e[26]!==y?(_=n.jsxs(Te,{children:[N,y]}),e[25]=N,e[26]=y,e[27]=_):_=e[27],_}function Ns(t){const e=h.c(26),{item:s}=t,a=te(),{org:o}=se(),l=le(o.id),r=St(o.id);let i;e[0]!==r.update||e[1]!==s.url||e[2]!==l?.sidebar_items?(i=async()=>{const k=(l?.sidebar_items||[]).filter(y=>y.url!==s.url);await r.update.mutateAsync({sidebar_items:k})},e[0]=r.update,e[1]=s.url,e[2]=l?.sidebar_items,e[3]=i):i=e[3];const c=i;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let p;e[7]!==s.url||e[8]!==a?(p=()=>{a({to:s.url})},e[7]=s.url,e[8]=a,e[9]=p):p=e[9];const b=s.title;let u;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(u=n.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?n.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):n.jsx(jt,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=u):u=e[13];let x;e[14]!==s.title?(x=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=x):x=e[15];let g;e[16]!==x?(g=n.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:n.jsx("span",{className:"truncate text-sm w-full capitalize",children:x})}),e[16]=x,e[17]=g):g=e[17];let j;e[18]!==c?(j=n.jsx(q,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:N=>{N.preventDefault(),N.stopPropagation(),c()}}),e[18]=c,e[19]=j):j=e[19];let v;return e[20]!==s.title||e[21]!==p||e[22]!==u||e[23]!==g||e[24]!==j?(v=n.jsx(ae,{children:n.jsxs(Ge,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:p,tooltip:b,children:[u,g,j]})}),e[20]=s.title,e[21]=p,e[22]=u,e[23]=g,e[24]=j,e[25]=v):v=e[25],v}function Ss(){const t=h.c(4),{org:e}=se(),a=le(e.id)?.sidebar_items;if(!a?.length)return null;let o;t[0]!==a?(o=a.map(ys),t[0]=a,t[1]=o):o=t[1];let l;return t[2]!==o?(l=n.jsx(Ke,{children:o}),t[2]=o,t[3]=l):l=t[3],l}function ys(t){return n.jsx(Ns,{item:t},t.url)}function be(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ae,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(Me,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Ke(t){const e=h.c(4),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(xs,{className:"my-2 -ml-1"}),e[0]=a):a=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ae,{children:n.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:n.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=o):o=e[1];let l;return e[2]!==s?(l=n.jsxs(n.Fragment,{children:[a,o,s]}),e[2]=s,e[3]=l):l=e[3],l}function Cs(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(w.Suspense,{fallback:n.jsxs(Ke,{children:[n.jsx(be,{}),n.jsx(be,{})]}),children:n.jsx(Ss,{})}),t[0]=e):e=t[0],e}function _s(){const t=h.c(14),{locator:e,org:s}=se(),a=te(),o=ve(),{org:l}=he.parse(e);let r;t[0]!==e?(r=he.isOrgAdminProject(e),t[0]=e,t[1]=r):r=t[1];const i=r,c=le(s.id);let d;t[2]!==c?.enabled_plugins?(d=c?.enabled_plugins??[],t[2]=c?.enabled_plugins,t[3]=d):d=t[3];const m=d;let f;t[4]!==m?(f=C=>m.includes(C.pluginId),t[4]=m,t[5]=f):f=t[5];const p=dt.filter(f),b=o.location.pathname===`/${l}`||o.location.pathname===`/${l}/`;let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx($t,{}),t[6]=u):u=t[6];let x;t[7]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(De,{}),t[7]=x):x=t[7];let g;t[8]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(_t,{}),t[8]=g):g=t[8];let j;t[9]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Ae,{}),t[9]=j):j=t[9];let v;t[10]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Fe,{}),t[10]=v):v=t[10];let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(Ee,{}),t[11]=N):N=t[11];let k;t[12]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(We,{}),t[12]=k):k=t[12];let y;t[13]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ce,{}),t[13]=y):y=t[13];const _=[{key:"home",label:"Home",icon:u,onClick:()=>{b?window.dispatchEvent(new CustomEvent("reset-home-view")):a({to:"/$org",params:{org:l}})}},{key:"store",label:"Store",icon:x,onClick:()=>a({to:"/$org/store",params:{org:l}})},...p.map(C=>({key:C.pluginId,label:C.label,icon:C.icon,onClick:()=>a({to:"/$org/$pluginId",params:{org:l,pluginId:C.pluginId}})})),{key:"mcps",label:"Connections",icon:g,onClick:()=>a({to:"/$org/mcps",params:{org:l}})},{key:"gateways",label:"Agents",icon:j,onClick:()=>a({to:"/$org/gateways",params:{org:l}})},{key:"workflow",label:"Workflows",icon:v,onClick:()=>a({to:"/$org/workflows",params:{org:l}})},{key:"monitoring",label:"Monitoring",icon:N,onClick:()=>a({to:"/$org/monitoring",params:{org:l}})},{key:"members",label:"Members",icon:k,onClick:()=>a({to:"/$org/members",params:{org:l}})},{key:"settings",label:"Settings",icon:y,onClick:()=>a({to:"/$org/settings",params:{org:l}})}];return i?_:[]}function Ze(t){const e=h.c(10),{navigationItems:s,footer:a,additionalContent:o,variant:l,collapsible:r}=t,i=l===void 0?"sidebar":l,c=r===void 0?"icon":r;let d;e[0]!==s?(d=s.map(ks),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==o||e[3]!==d?(m=n.jsx(gs,{className:"flex-1 overflow-x-hidden",children:n.jsx(bs,{className:"font-medium",children:n.jsx(js,{children:n.jsxs(vs,{className:"gap-0.5",children:[d,o]})})})}),e[2]=o,e[3]=d,e[4]=m):m=e[4];let f;return e[5]!==c||e[6]!==a||e[7]!==m||e[8]!==i?(f=n.jsxs(ps,{variant:i,collapsible:c,children:[m,a]}),e[5]=c,e[6]=a,e[7]=m,e[8]=i,e[9]=f):f=e[9],f}function ks(t){return n.jsx(ae,{children:n.jsxs(Ge,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:t.onClick,isActive:t.isActive,tooltip:t.label,children:[n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:t.icon}),n.jsx("span",{className:"truncate",children:t.label})]})},t.key)}Ze.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(Me,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function $s(){const t=h.c(3),e=_s();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(n.Fragment,{children:n.jsx($e,{children:n.jsx(w.Suspense,{fallback:null,children:n.jsx(Cs,{})})})}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=n.jsx(Ze,{navigationItems:e,additionalContent:s}),t[1]=e,t[2]=a):a=t[2],a}function zs(t){const e=h.c(12);let s,a,o,l;e[0]!==t?({className:s,orientation:o,decorative:l,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l):(s=e[1],a=e[2],o=e[3],l=e[4]);const r=o===void 0?"horizontal":o,i=l===void 0?!0:l;let c;e[5]!==s?(c=I("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==i||e[8]!==r||e[9]!==a||e[10]!==c?(d=n.jsx(mt,{"data-slot":"separator-root",decorative:i,orientation:r,className:c,...a}),e[7]=i,e[8]=r,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}const qe=w.createContext(null);function Is(){const t=w.useContext(qe);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function Os(t){const e=h.c(10),{children:s,onItemHover:a}=t,[o,l]=w.useState(null);let r;e[0]!==a?(r=f=>{l(f),a?.(f)},e[0]=a,e[1]=r):r=e[1];const i=r;let c;e[2]!==o||e[3]!==i?(c={hoveredItem:o,setHoveredItem:i},e[2]=o,e[3]=i,e[4]=c):c=e[4];let d;e[5]!==s?(d=n.jsx(Ce,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=n.jsx(qe.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function Ts(t){const e=h.c(6),{children:s,onClick:a}=t;let o;e[0]!==s||e[1]!==a?(o=n.jsx(H,{variant:"link",className:"p-0.5 h-auto",onClick:a,type:"button",children:s}),e[0]=s,e[1]=a,e[2]=o):o=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(_e,{asChild:!0,children:n.jsx(H,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(vt,{size:16,className:"opacity-50"})})}),e[3]=l):l=e[3];let r;return e[4]!==o?(r=n.jsxs("div",{className:"flex items-center gap-1",children:[o,l]}),e[4]=o,e[5]=r):r=e[5],r}function Ms(t){const e=h.c(8),{item:s,fallback:a}=t,o=a===void 0?"":a,l=s?.avatarUrl??"",r=s?.name??o;let i;e[0]!==l||e[1]!==r?(i=n.jsx(K,{url:l,fallback:r,size:"xs",objectFit:"contain"}),e[0]=l,e[1]=r,e[2]=i):i=e[2];const c=s?.name??o;let d;e[3]!==c?(d=n.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==i||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[i,d]}),e[5]=i,e[6]=d,e[7]=m):m=e[7],m}function As(t){const e=h.c(6),{children:s,align:a}=t,o=a===void 0?"start":a,r=w.Children.toArray(s).filter(Rs).length===1?"280px":"480px";let i;e[0]!==r?(i={width:r},e[0]=r,e[1]=i):i=e[1];let c;return e[2]!==o||e[3]!==s||e[4]!==i?(c=n.jsx(ke,{align:o,className:"p-0 flex items-start",style:i,children:s}),e[2]=o,e[3]=s,e[4]=i,e[5]=c):c=e[5],c}function Rs(t){return w.isValidElement(t)&&(t.type===Je||t.type===Ye)}function Ye(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}const Je=Ye;function Ps(t){const e=h.c(6),{placeholder:s,value:a,onChange:o}=t,l=s===void 0?"Search...":s;let r;e[0]!==o?(r=c=>o(c.target.value),e[0]=o,e[1]=r):r=e[1];let i;return e[2]!==l||e[3]!==r||e[4]!==a?(i=n.jsx(It,{placeholder:l,value:a,onChange:r,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=l,e[3]=r,e[4]=a,e[5]=i):i=e[5],i}function Es(t){const e=h.c(6),{children:s,emptyMessage:a}=t,o=a===void 0?"No items found.":a,l=w.Children.count(s)>0;let r;e[0]!==o||e[1]!==l?(r=!l&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:o}),e[0]=o,e[1]=l,e[2]=r):r=e[2];let i;return e[3]!==s||e[4]!==r?(i=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[r,s]}),e[3]=s,e[4]=r,e[5]=i):i=e[5],i}function Ds(t){const e=h.c(15),{item:s,onClick:a,onHover:o,children:l}=t,r=Is();let i;e[0]!==r||e[1]!==s||e[2]!==o?(i=()=>{r.setHoveredItem(s.slug),o?.(s)},e[0]=r,e[1]=s,e[2]=o,e[3]=i):i=e[3];const c=i;let d;e[4]!==s||e[5]!==a?(d=()=>a(s),e[4]=s,e[5]=a,e[6]=d):d=e[6];let m;e[7]!==l||e[8]!==s.avatarUrl||e[9]!==s.name?(m=l||n.jsxs(n.Fragment,{children:[n.jsx(K,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),n.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=l,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=n.jsx(H,{onClick:d,onMouseEnter:c,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=c,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function Ls(t){const e=h.c(2),{children:s}=t;let a;return e[0]!==s?(a=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=a):a=e[1],a}function Hs(t){const e=h.c(11),{onClick:s,icon:a,children:o,variant:l}=t,i=(l===void 0?"default":l)==="muted"&&"text-muted-foreground";let c;e[0]!==i?(c=I("w-full justify-start font-normal",i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==a?(d=a&&n.jsx("span",{className:"[&>svg]:size-4",children:a}),e[2]=a,e[3]=d):d=e[3];let m;e[4]!==o?(m=n.jsx("span",{children:o}),e[4]=o,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=n.jsxs(H,{variant:"ghost",size:"sm",className:c,onClick:s,children:[d,m]}),e[6]=s,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function Bs(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(zs,{}),t[0]=e):e=t[0],e}function Us(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const P=Object.assign(Os,{Trigger:Ts,CurrentItem:Ms,Content:As,Panel:Je,Search:Ps,Items:Es,Item:Ds,Actions:Ls,Action:Hs,Separator:Bs,Skeleton:Us});function oe(){const t=h.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=we(e),{data:a}=W.useListOrganizations(),o=te();let l;t[1]!==s||t[2]!==a?(l=a?.find(R=>R.slug===s),t[1]=s,t[2]=a,t[3]=l):l=t[3];const r=l,[i,c]=w.useState(""),[d,m]=w.useState(!1);let f,p,b,u,x,g,j,v;if(t[4]!==r||t[5]!==o||t[6]!==s||t[7]!==i||t[8]!==a){const E=(a?(()=>{const B=a.filter(F=>F.name.toLowerCase().includes(i.toLowerCase()));if(s){const F=B.findIndex(X=>X.slug===s);if(F>0){const X=B[F];X&&(B.splice(F,1),B.unshift(X))}}return B})():[]).map(Ws);let D;t[17]!==r?(D=r?{slug:r.slug,name:r.name,avatarUrl:r.logo}:void 0,t[17]=r,t[18]=D):D=t[18];const ne=D;u=P;let V;t[19]!==o||t[20]!==s?(V=()=>o({to:"/$org",params:{org:s??""}}),t[19]=o,t[20]=s,t[21]=V):V=t[21];let G;t[22]!==ne?(G=n.jsx(P.CurrentItem,{item:ne}),t[22]=ne,t[23]=G):G=t[23],t[24]!==V||t[25]!==G?(v=n.jsx(P.Trigger,{onClick:V,children:G}),t[24]=V,t[25]=G,t[26]=v):v=t[26],b=P.Content,p=P.Panel,t[27]!==i?(j=n.jsx(P.Search,{placeholder:"Search organizations...",value:i,onChange:c}),t[27]=i,t[28]=j):j=t[28],f=P.Items,x="No organizations found.";let J;t[29]!==o?(J=B=>n.jsx(P.Item,{item:B,onClick:F=>o({to:"/$org",params:{org:F.slug}})},B.slug),t[29]=o,t[30]=J):J=t[30],g=E.map(J),t[4]=r,t[5]=o,t[6]=s,t[7]=i,t[8]=a,t[9]=f,t[10]=p,t[11]=b,t[12]=u,t[13]=x,t[14]=g,t[15]=j,t[16]=v}else f=t[9],p=t[10],b=t[11],u=t[12],x=t[13],g=t[14],j=t[15],v=t[16];let N;t[31]!==f||t[32]!==x||t[33]!==g?(N=n.jsx(f,{emptyMessage:x,children:g}),t[31]=f,t[32]=x,t[33]=g,t[34]=N):N=t[34];let k,y;t[35]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(P.Actions,{children:n.jsx(P.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),y=n.jsx(P.Separator,{}),t[35]=k,t[36]=y):(k=t[35],y=t[36]);let _;t[37]!==o?(_=()=>o({to:"/"}),t[37]=o,t[38]=_):_=t[38];let C;t[39]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(Ot,{}),t[39]=C):C=t[39];let $;t[40]!==_?($=n.jsx(P.Actions,{children:n.jsx(P.Action,{onClick:_,icon:C,children:"See all organizations"})}),t[40]=_,t[41]=$):$=t[41];let S;t[42]!==p||t[43]!==$||t[44]!==j||t[45]!==N?(S=n.jsxs(p,{children:[j,N,k,y,$]}),t[42]=p,t[43]=$,t[44]=j,t[45]=N,t[46]=S):S=t[46];let z;t[47]!==b||t[48]!==S?(z=n.jsx(b,{children:S}),t[47]=b,t[48]=S,t[49]=z):z=t[49];let O;t[50]!==u||t[51]!==z||t[52]!==v?(O=n.jsxs(u,{children:[v,z]}),t[50]=u,t[51]=z,t[52]=v,t[53]=O):O=t[53];let T;t[54]!==d?(T=n.jsx(zt,{open:d,onOpenChange:m}),t[54]=d,t[55]=T):T=t[55];let M;return t[56]!==O||t[57]!==T?(M=n.jsxs(n.Fragment,{children:[O,T]}),t[56]=O,t[57]=T,t[58]=M):M=t[58],M}function Ws(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}oe.Skeleton=P.Skeleton;function Fs({prop:t,defaultProp:e,onChange:s=()=>{}}){const[a,o]=Vs({defaultProp:e,onChange:s}),l=t!==void 0,r=l?t:a,i=Ne(s),c=w.useCallback(d=>{if(l){const f=typeof d=="function"?d(t):d;f!==t&&i(f)}else o(d)},[l,t,o,i]);return[r,c]}function Vs({defaultProp:t,onChange:e}){const s=w.useState(t),[a]=s,o=w.useRef(a),l=Ne(e);return w.useEffect(()=>{o.current!==a&&(l(a),o.current=a)},[a,o,l]),s}function Gs(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ks(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Zs(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function qs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx(Z.Overlay,{"data-slot":"drawer-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function Ys(t){const e=h.c(12);let s,a,o;e[0]!==t?({className:a,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o):(s=e[1],a=e[2],o=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(qs,{}),e[4]=l):l=e[4];let r;e[5]!==a?(r=I("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=i):i=e[7];let c;return e[8]!==s||e[9]!==o||e[10]!==r?(c=n.jsxs(Zs,{"data-slot":"drawer-portal",children:[l,n.jsxs(Z.Content,{"data-slot":"drawer-content",className:r,...o,children:[i,s]})]}),e[8]=s,e[9]=o,e[10]=r,e[11]=c):c=e[11],c}function Js(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-slot":"drawer-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function Xs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("text-foreground font-semibold",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx(Z.Title,{"data-slot":"drawer-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}const Xe=w.createContext({setOpen:()=>{}}),Qs=()=>w.useContext(Xe),ea=t=>{const e=h.c(25);let s,a,o,l,r;e[0]!==t?({children:s,defaultOpen:a,open:l,onOpenChange:o,...r}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=r):(s=e[1],a=e[2],o=e[3],l=e[4],r=e[5]);const i=a??!1;let c;e[6]!==o||e[7]!==l||e[8]!==i?(c={prop:l,defaultProp:i,onChange:o},e[6]=o,e[7]=l,e[8]=i,e[9]=c):c=e[9];const[d,m]=Fs(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let p;e[12]!==s||e[13]!==d||e[14]!==r||e[15]!==m?(p=n.jsx(Gs,{open:d,onOpenChange:m,...r,children:s}),e[12]=s,e[13]=d,e[14]=r,e[15]=m,e[16]=p):p=e[16];let b;e[17]!==d||e[18]!==r||e[19]!==m||e[20]!==p?(b=n.jsx(At,{open:d,onOpenChange:m,...r,children:p}),e[17]=d,e[18]=r,e[19]=m,e[20]=p,e[21]=b):b=e[21];let u;return e[22]!==f||e[23]!==b?(u=n.jsx(Xe.Provider,{value:f,children:b}),e[22]=f,e[23]=b,e[24]=u):u=e[24],u},ta=t=>{const{children:e,title:s,...a}=t,o=Y(),{className:l,...r}=a;return o?n.jsxs(Ys,{...r,children:[n.jsx(Js,{className:"hidden",children:n.jsx(Xs,{children:s})}),n.jsx("div",{className:I("flex flex-col gap-2 p-2 py-4",l),children:e})]}):n.jsx(Mt,{...a,children:e})},sa=t=>{const{children:e,...s}=t,{setOpen:a}=Qs(),o=Y(),{className:l,...r}=s;return o?n.jsx("div",{...r,onClick:i=>{a(!1);const{onClick:c}=r;c?.(i)},className:I("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",l),children:e}):n.jsx(Rt,{...s,children:e})},aa=t=>{const e=h.c(7);let s,a;e[0]!==t?({children:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);const o=Y();let l;return e[3]!==s||e[4]!==o||e[5]!==a?(l=o?n.jsx(Ks,{asChild:!0,children:s}):n.jsx(Tt,{...a,children:s}),e[3]=s,e[4]=o,e[5]=a,e[6]=l):l=e[6],l},na=t=>{const e=h.c(7);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);const o=Y();let l;return e[3]!==s||e[4]!==o||e[5]!==a?(l=o?n.jsx(xe,{className:I(s),...a}):n.jsx(xe,{className:I(s),...a}),e[3]=s,e[4]=o,e[5]=a,e[6]=l):l=e[6],l};function oa(t){const e=h.c(11),{user:s,trigger:a,align:o,children:l}=t,r=o===void 0?"start":o;let i;e[0]!==a||e[1]!==s?(i=a(s),e[0]=a,e[1]=s,e[2]=i):i=e[2];let c;e[3]!==i?(c=n.jsx(aa,{asChild:!0,children:n.jsx("div",{children:i})}),e[3]=i,e[4]=c):c=e[4];let d;e[5]!==r||e[6]!==l?(d=n.jsx(ta,{side:"top",align:r,className:"md:w-[240px]",children:l}),e[5]=r,e[6]=l,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsxs(ea,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function la(t){const e=h.c(8),{children:s,onClick:a,className:o,asChild:l}=t;let r;e[0]!==l||e[1]!==s||e[2]!==a?(r=l?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:a,children:s}),e[0]=l,e[1]=s,e[2]=a,e[3]=r):r=e[3];let i;return e[4]!==l||e[5]!==o||e[6]!==r?(i=n.jsx(sa,{asChild:l,className:o,children:r}),e[4]=l,e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function ra(t){const e=h.c(2),{className:s}=t;let a;return e[0]!==s?(a=n.jsx(na,{className:s}),e[0]=s,e[1]=a):a=e[1],a}function ia(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const L=Object.assign(oa,{Item:la,Separator:ra,Skeleton:ia});function ca(t){const e=h.c(48),{open:s,onOpenChange:a,user:o,userImage:l}=t,[r,i]=wt(),[c,d]=w.useState(!1);let m;e[0]!==o.id?(m=()=>{navigator.clipboard.writeText(o.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=o.id,e[1]=m):m=e[1];const f=m;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(Pt,{className:"text-base",children:"Profile Settings"}),e[2]=p):p=e[2];let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsxs(Et,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[p,n.jsxs(Dt,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(q,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=b):b=e[3];const u=o.name||"U";let x;e[4]!==u||e[5]!==l?(x=n.jsx(K,{url:l,fallback:u,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=u,e[5]=l,e[6]=x):x=e[6];const g=o.name||"User";let j;e[7]!==g?(j=n.jsx("span",{className:"text-base font-medium text-foreground",children:g}),e[7]=g,e[8]=j):j=e[8];let v;e[9]!==o.email?(v=n.jsx("span",{className:"text-sm text-muted-foreground",children:o.email}),e[9]=o.email,e[10]=v):v=e[10];let N;e[11]!==j||e[12]!==v?(N=n.jsxs("div",{className:"flex flex-col gap-1",children:[j,v]}),e[11]=j,e[12]=v,e[13]=N):N=e[13];let k;e[14]!==x||e[15]!==N?(k=n.jsxs("div",{className:"flex items-center gap-4",children:[x,N]}),e[14]=x,e[15]=N,e[16]=k):k=e[16];let y;e[17]!==r||e[18]!==i?(y=()=>i(!r),e[17]=r,e[18]=i,e[19]=y):y=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(Bt,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Wt,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[20]=_):_=e[20];let C;e[21]!==r||e[22]!==i?(C=n.jsx("div",{onClick:da,children:n.jsx(Ut,{checked:r,onCheckedChange:i})}),e[21]=r,e[22]=i,e[23]=C):C=e[23];let $;e[24]!==y||e[25]!==C?($=n.jsxs("button",{type:"button",onClick:y,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,C]}),e[24]=y,e[25]=C,e[26]=$):$=e[26];let S;e[27]!==k||e[28]!==$?(S=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[k,$]}),e[27]=k,e[28]=$,e[29]=S):S=e[29];let z;e[30]!==o.id?(z=n.jsx("span",{className:"font-mono text-xs",children:o.id}),e[30]=o.id,e[31]=z):z=e[31];let O;e[32]!==c?(O=c?n.jsx(ee,{size:14,className:"text-green-600"}):n.jsx(Re,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[32]=c,e[33]=O):O=e[33];let T;e[34]!==f||e[35]!==z||e[36]!==O?(T=n.jsx(Oe,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[z,O]})}),e[34]=f,e[35]=z,e[36]=O,e[37]=T):T=e[37];let M;e[38]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx(ze,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[38]=M):M=e[38];let R;e[39]!==T?(R=n.jsx("div",{className:"border-t border-border px-5 py-4 flex items-center shrink-0",children:n.jsx(Ie,{children:n.jsxs(Te,{children:[T,M]})})}),e[39]=T,e[40]=R):R=e[40];let E;e[41]!==S||e[42]!==R?(E=n.jsxs(Lt,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[b,n.jsxs("div",{className:"flex flex-col",children:[S,R]})]}),e[41]=S,e[42]=R,e[43]=E):E=e[43];let D;return e[44]!==a||e[45]!==s||e[46]!==E?(D=n.jsx(Ht,{open:s,onOpenChange:a,children:E}),e[44]=a,e[45]=s,e[46]=E,e[47]=D):D=e[47],D}function da(t){return t.stopPropagation()}function ma(t){const e=h.c(47),{user:s,userImage:a}=t,[o,l]=w.useState(!1),[r,i]=w.useState(!1);let c;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(c=()=>{const D=`ID: ${s.id}
2
- Name: ${s.name||"N/A"}
3
- Email: ${s.email}`;navigator.clipboard.writeText(D),i(!0),U.success("User info copied to clipboard"),setTimeout(()=>i(!1),2e3)},e[0]=s.email,e[1]=s.id,e[2]=s.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==s.email||e[5]!==s.name||e[6]!==a?(m=()=>n.jsx(K,{url:a,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=s.email,e[5]=s.name,e[6]=a,e[7]=m):m=e[7];const f=s.name||s.email||"U";let p;e[8]!==f||e[9]!==a?(p=n.jsx(K,{url:a,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=a,e[10]=p):p=e[10];const b=s.name||"User";let u;e[11]!==b?(u=n.jsx("div",{className:"text-sm font-medium truncate",children:b}),e[11]=b,e[12]=u):u=e[12];let x;e[13]!==s.email?(x=n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.email}),e[13]=s.email,e[14]=x):x=e[14];let g;e[15]!==u||e[16]!==x?(g=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[u,x]}),e[15]=u,e[16]=x,e[17]=g):g=e[17];let j;e[18]!==r?(j=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:r?n.jsx(ee,{size:16,className:"text-green-600"}):n.jsx(Re,{size:16,className:"text-muted-foreground"})}),e[18]=r,e[19]=j):j=e[19];let v;e[20]!==p||e[21]!==g||e[22]!==j?(v=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[p,g,j]}),e[20]=p,e[21]=g,e[22]=j,e[23]=v):v=e[23];let N;e[24]!==d||e[25]!==v?(N=n.jsx(L.Item,{onClick:d,children:v}),e[24]=d,e[25]=v,e[26]=N):N=e[26];let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(L.Separator,{}),e[27]=k):k=e[27];let y,_;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsxs(L.Item,{onClick:()=>l(!0),children:[n.jsx(ce,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),_=n.jsx(L.Separator,{}),e[28]=y,e[29]=_):(y=e[28],_=e[29]);let C;e[30]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ft,{className:"w-4 h-4 text-muted-foreground"}),e[30]=C):C=e[30];let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(L.Item,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[C,"decocms/admin",n.jsx(ge,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=$):$=e[31];let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Le,{className:"text-muted-foreground",size:18}),e[32]=S):S=e[32];let z,O;e[33]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(L.Item,{asChild:!0,children:n.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[S,"Homepage",n.jsx(ge,{size:18,className:"ml-auto text-muted-foreground"})]})}),O=n.jsx(L.Separator,{}),e[33]=z,e[34]=O):(z=e[33],O=e[34]);let T;e[35]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsxs(L.Item,{onClick:fa,children:[n.jsx(Be,{size:18,className:"text-muted-foreground"}),"Log out"]}),e[35]=T):T=e[35];let M;e[36]!==N||e[37]!==m||e[38]!==s?(M=n.jsxs(L,{user:s,trigger:m,align:"end",children:[N,k,y,_,$,z,O,T]}),e[36]=N,e[37]=m,e[38]=s,e[39]=M):M=e[39];let R;e[40]!==o||e[41]!==s||e[42]!==a?(R=o&&n.jsx(ca,{open:o,onOpenChange:l,user:s,userImage:a}),e[40]=o,e[41]=s,e[42]=a,e[43]=R):R=e[43];let E;return e[44]!==M||e[45]!==R?(E=n.jsxs(n.Fragment,{children:[M,R]}),e[44]=M,e[45]=R,e[46]=E):E=e[46],E}function fa(){return W.signOut()}function ua(){const t=h.c(7),{data:e}=W.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(K,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const s=e.user,a=s.name??void 0;let o;t[1]!==a||t[2]!==s?(o={...s,name:a},t[1]=a,t[2]=s,t[3]=o):o=t[3];const l=o,r=s.image;let i;return t[4]!==r||t[5]!==l?(i=n.jsx(ma,{user:l,userImage:r}),t[4]=r,t[5]=l,t[6]=i):i=t[6],i}function me(){const t=h.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=ie.decoChatOpen(),t[0]=e):e=t[0];const[s,a]=re(e,pa);let o;return t[1]!==s||t[2]!==a?(o=[s,a],t[1]=s,t[2]=a,t[3]=o):o=t[3],o}function pa(t){return!!(t??!1)}function ha(t){const e=h.c(6),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ut,{children:n.jsx(Se,{})}),e[0]=a):a=e[0];let o;e[1]!==s?(o=n.jsx(pt,{children:s}),e[1]=s,e[2]=o):o=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(ht,{children:n.jsx(xt,{to:"/login",replace:!0})}),e[3]=l):l=e[3];let r;return e[4]!==o?(r=n.jsxs(n.Fragment,{children:[a,o,l]}),e[4]=o,e[5]=r):r=e[5],r}function xa(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function ga(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("flex items-center justify-center px-2.5 h-full border-r border-border",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function ba(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("flex items-center gap-2 px-2 h-full",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function ja(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("flex items-center gap-2 px-2 h-full flex-1",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function va(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("flex items-center gap-2 px-2 h-full ml-auto",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function wa(){const t=h.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:n.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=s):s=t[1];let a;return t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",children:[e,s,n.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=a):a=t[2],a}const Q=Object.assign(xa,{Sidebar:ga,Left:ba,Center:ja,Right:va,Skeleton:wa});function Qe(){const t=h.c(3),{toggleSidebar:e}=de();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(He,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=n.jsx(n.Fragment,{children:n.jsx(H,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:s})}),t[1]=e,t[2]=a):a=t[2],a}Qe.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};const Na="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function Sa(){const t=h.c(40),{org:e}=se(),[,s]=me(),{createThread:a,activeThread:o,selectedGateway:l,modelsConnections:r,isChatEmpty:i}=Nt();if(r.length===0){let y;t[0]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsxs(A.Header.Left,{children:[n.jsx("img",{src:Na,alt:"Chat",className:"size-5 rounded"}),n.jsx("span",{className:"text-sm font-medium",children:"Chat"})]}),t[0]=y):y=t[0];let _;t[1]!==s?(_=()=>s(!1),t[1]=s,t[2]=_):_=t[2];let C;t[3]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(q,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[3]=C):C=t[3];let $;t[4]!==_?($=n.jsxs(A.Header,{children:[y,n.jsx(A.Header.Right,{children:n.jsx("button",{type:"button",onClick:_,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:C})})]}),t[4]=_,t[5]=$):$=t[5];let S;t[6]!==e?(S=n.jsx(A.Main,{className:"flex flex-col items-center",children:n.jsx(A.EmptyState,{children:n.jsx(A.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[6]=e,t[7]=S):S=t[7];let z;return t[8]!==$||t[9]!==S?(z=n.jsxs(A,{children:[$,S]}),t[8]=$,t[9]=S,t[10]=z):z=t[10],z}let c;t[11]!==o||t[12]!==i?(c=n.jsx(A.Header.Left,{children:!i&&o?.title?n.jsx(Ft,{text:o.title,className:"text-sm font-medium text-foreground"}):n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Chat"})}),t[11]=o,t[12]=i,t[13]=c):c=t[13];let d;t[14]!==a?(d=()=>a(),t[14]=a,t[15]=d):d=t[15];let m;t[16]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Zt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[16]=m):m=t[16];let f;t[17]!==d?(f=n.jsx("button",{type:"button",onClick:d,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"New chat",children:m}),t[17]=d,t[18]=f):f=t[18];let p;t[19]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(A.ThreadHistoryPopover,{}),t[19]=p):p=t[19];let b;t[20]!==s?(b=()=>s(!1),t[20]=s,t[21]=b):b=t[21];let u;t[22]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(q,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[22]=u):u=t[22];let x;t[23]!==b?(x=n.jsx("button",{type:"button",onClick:b,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:u}),t[23]=b,t[24]=x):x=t[24];let g;t[25]!==f||t[26]!==x?(g=n.jsxs(A.Header.Right,{children:[f,p,x]}),t[25]=f,t[26]=x,t[27]=g):g=t[27];let j;t[28]!==c||t[29]!==g?(j=n.jsxs(A.Header,{children:[c,g]}),t[28]=c,t[29]=g,t[30]=j):j=t[30];let v;t[31]!==i||t[32]!==l?.description||t[33]!==l?.icon||t[34]!==l?.title?(v=n.jsx(A.Main,{children:i?n.jsx(A.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx(kt,{icon:l?.icon??"/favicon.svg",name:l?.title||"Chat",size:"lg",fallbackIcon:n.jsx(Ae,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:l?.title||"Chat"}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:l?.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(A.IceBreakers,{})]})}):n.jsx(A.Messages,{minHeightOffset:280})}),t[31]=i,t[32]=l?.description,t[33]=l?.icon,t[34]=l?.title,t[35]=v):v=t[35];let N;t[36]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(A.Footer,{children:n.jsx(A.Input,{})}),t[36]=N):N=t[36];let k;return t[37]!==v||t[38]!==j?(k=n.jsxs(A,{children:[j,v,N]}),t[37]=v,t[38]=j,t[39]=k):k=t[39],k}function ya(){const t=h.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(A.Skeleton,{}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(A.Skeleton,{}),t[1]=s):s=t[1];let a;return t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx($e,{fallback:e,children:n.jsx(w.Suspense,{fallback:s,children:n.jsx(A.Provider,{children:n.jsx(Sa,{})})})}),t[2]=a):a=t[2],a}function je({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:a=!1}){const[o,l]=me(),r=w.useRef(a);a&&o&&r.current!==a&&l(!1),r.current=a;const i=()=>{a||l(c=>!c)};return n.jsxs(Q,{children:[t&&n.jsx(Q.Sidebar,{children:n.jsx(Qe,{})}),n.jsx(Q.Left,{children:e&&n.jsx(w.Suspense,{fallback:n.jsx(oe.Skeleton,{}),children:n.jsx(oe,{})})}),n.jsxs(Q.Right,{className:"gap-2",children:[n.jsx(Yt,{}),s&&!a&&n.jsxs(H,{size:"sm",variant:"default",onClick:i,className:"h-7 gap-2",children:[n.jsx(Vt,{size:16}),"Chat"]}),n.jsx(ua,{})]})]})}function Ca(t){const e=h.c(10),{children:s,className:a}=t,[,o]=w.useTransition();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=ie.decoChatPanelWidth(),e[0]=l):l=e[0];const[r,i]=re(l,30);let c;e[1]!==i?(c=p=>o(()=>i(p)),e[1]=i,e[2]=c):c=e[2];const d=c;let m;e[3]!==a?(m=I("min-w-0",a),e[3]=a,e[4]=m):m=e[4];let f;return e[5]!==r||e[6]!==s||e[7]!==d||e[8]!==m?(f=n.jsx(Pe,{defaultSize:r,minSize:20,className:m,onResize:d,children:s}),e[5]=r,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function _a(t){const e=h.c(5),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=ie.sidebarOpen(),e[0]=a):a=e[0];const[o,l]=re(a,!0);let r;return e[1]!==s||e[2]!==l||e[3]!==o?(r=n.jsx(ds,{open:o,onOpenChange:l,children:s}),e[1]=s,e[2]=l,e[3]=o,e[4]=r):r=e[4],r}function ka(t){const e=h.c(10),{disableChat:s}=t,a=s===void 0?!1:s,[o]=me(),l=o&&!a;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Pe,{className:"bg-background",children:n.jsx(ye,{})}),e[0]=r):r=e[0];let i;e[1]!==a||e[2]!==l?(i=!a&&n.jsx(Gt,{withHandle:l}),e[1]=a,e[2]=l,e[3]=i):i=e[3];const c=l?"max-w-none":"max-w-0";let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(ya,{}),e[4]=d):d=e[4];let m;e[5]!==c?(m=n.jsx(Ca,{className:c,children:d}),e[5]=c,e[6]=m):m=e[6];let f;return e[7]!==i||e[8]!==m?(f=n.jsxs(Kt,{direction:"horizontal",children:[r,i,m]}),e[7]=i,e[8]=m,e[9]=f):f=e[9],f}function $a(){const t=h.c(22);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=we(e),a=ve(),o=a.location.pathname===`/${s}`||a.location.pathname===`/${s}/`;let l;t[1]!==s?(l=bt.activeOrganization(s),t[1]=s,t[2]=l):l=t[2];let r;t[3]!==s?(r=async()=>{if(!s)return null;const{data:x}=await W.organization.setActive({organizationSlug:s});return{org:x,project:{slug:Ct}}},t[3]=s,t[4]=r):r=t[4];let i;t[5]!==l||t[6]!==r?(i={queryKey:l,queryFn:r,gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1},t[5]=l,t[6]=r,t[7]=i):i=t[7];const{data:c}=gt(i);if(!c){let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(je,{}),t[8]=x):x=t[8];let g;return t[9]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsxs("div",{className:"min-h-screen bg-background",children:[x,n.jsx("div",{className:"pt-12",children:n.jsx(ye,{})})]}),t[9]=g):g=t[9],g}let d;t[10]!==o?(d=n.jsx(je,{showSidebarToggle:!0,showOrgSwitcher:!0,showDecoChat:!0,disableDecoChat:o}),t[10]=o,t[11]=d):d=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m={"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},t[12]=m):m=t[12];let f;t[13]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx($s,{}),t[13]=f):f=t[13];let p;t[14]!==o?(p=n.jsxs(us,{className:"flex-1 bg-sidebar",style:m,children:[f,n.jsx(hs,{className:"pt-12",children:n.jsx(ka,{disableChat:o})})]}),t[14]=o,t[15]=p):p=t[15];let b;t[16]!==d||t[17]!==p?(b=n.jsx(_a,{children:n.jsxs("div",{className:"flex flex-col h-screen",children:[d,p]})}),t[16]=d,t[17]=p,t[18]=b):b=t[18];let u;return t[19]!==c||t[20]!==b?(u=n.jsx(yt,{...c,children:b}),t[19]=c,t[20]=b,t[21]=u):u=t[21],u}function Mn(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ha,{children:n.jsx(w.Suspense,{fallback:n.jsx(Se,{}),children:n.jsx($a,{})})}),t[0]=e):e=t[0],e}export{Mn as default};
@@ -1 +0,0 @@
1
- import{c as a}from"./index-DEuqpeVv.js";import{u as S}from"./project-context-provider-Dn1-l4h2.js";import{u as L,L as x}from"./localstorage-keys-kemGZMIp.js";function A(e){const t=a.c(9),{locator:c}=S();let o;t[0]!==c?(o=x.gatewaySystemPrompts(c),t[0]=c,t[1]=o):o=t[1];let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s={},t[2]=s):s=t[2];const[u,l]=L(o,s),n=e?u[e]??"":"";let r;t[3]!==e||t[4]!==l?(r=f=>{e&&l(p=>({...p,[e]:f}))},t[3]=e,t[4]=l,t[5]=r):r=t[5];const i=r;let m;return t[6]!==i||t[7]!==n?(m=[n,i],t[6]=i,t[7]=n,t[8]=m):m=t[8],m}export{A as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-BXdaScti.js";import{U as i}from"./index-DEuqpeVv.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{U as u,b6 as s}from"./index-DEuqpeVv.js";function o(e,r){return u(e,s,r)}export{o as u};