@decocms/mesh 1.0.12 → 1.0.14

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 (113) hide show
  1. package/dist/client/assets/{AlertCircle-CgTGZ0LS.js → AlertCircle-DaEUMwle.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-BTBClwXP.js → ArrowLeft-CvFDkdiU.js} +1 -1
  3. package/dist/client/assets/{Calendar-UYaue4Vo.js → Calendar-DBqzL4c-.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-DiUUsoO6.js → CheckCircle-CILz6OCh.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-C6uzZBp6.js → ChevronDown-g4L12M9A.js} +1 -1
  6. package/dist/client/assets/{Clock-CvaxC0bJ.js → Clock-C-uwthk9.js} +1 -1
  7. package/dist/client/assets/{Copy01-C6L6B0Ei.js → Copy01-CHjgpWtl.js} +1 -1
  8. package/dist/client/assets/{CpuChip02-DHjYIIBW.js → CpuChip02-DlCI7cQJ.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-BNjf7SA5.js → DotsVertical-CIfapH0j.js} +1 -1
  10. package/dist/client/assets/{File06-gGBcoD5H.js → File06-CBkqKj5m.js} +1 -1
  11. package/dist/client/assets/{GitBranch01-BAm7Kao4.js → GitBranch01-Ci5lqvRi.js} +1 -1
  12. package/dist/client/assets/{Inbox01-BX5sFqBU.js → Inbox01-DCkU3Xgq.js} +1 -1
  13. package/dist/client/assets/{InfoCircle-BYxhaeYG.js → InfoCircle-BwNsGATl.js} +1 -1
  14. package/dist/client/assets/{Key01-DeH4dxot.js → Key01-5nxXQgMM.js} +1 -1
  15. package/dist/client/assets/{LinkExternal01-ByW37u5u.js → LinkExternal01-ISpHuMJE.js} +1 -1
  16. package/dist/client/assets/{Loading01-BC0x96Z5.js → Loading01-r04aEG5T.js} +1 -1
  17. package/dist/client/assets/{Plus-EukPTBel.js → Plus-CS_Y2Vnc.js} +1 -1
  18. package/dist/client/assets/{SearchMd-8Mty8uAj.js → SearchMd-1Gq7nypQ.js} +1 -1
  19. package/dist/client/assets/{Terminal-CXi8Gzb8.js → Terminal-DYN6gEAz.js} +1 -1
  20. package/dist/client/assets/{Trash01-BhXDZnCd.js → Trash01-DVxmznxT.js} +1 -1
  21. package/dist/client/assets/{Upload01-DuaQRUbb.js → Upload01-Da0sGkRE.js} +1 -1
  22. package/dist/client/assets/{X-BCw4rnZ5.js → X-BX0rl0N7.js} +1 -1
  23. package/dist/client/assets/{XClose-BuPaSPj_.js → XClose-BUuGHVgA.js} +1 -1
  24. package/dist/client/assets/{alert-dialog-Uz892MsJ.js → alert-dialog-DdP064l-.js} +1 -1
  25. package/dist/client/assets/{auth-BYeLjxhg.js → auth-AUS48lXs.js} +1 -1
  26. package/dist/client/assets/{auth-catchall-DAn23ENw.js → auth-catchall-DqCIX1bA.js} +1 -1
  27. package/dist/client/assets/{avatar-C4a-k5oT.js → avatar-bcdjVFyi.js} +1 -1
  28. package/dist/client/assets/{badge-DAer7EaE.js → badge-1WraHGEG.js} +1 -1
  29. package/dist/client/assets/{button-g1YyJeHt.js → button-DodNLkpL.js} +1 -1
  30. package/dist/client/assets/{card-BpQhyjdr.js → card-BHz-BqEu.js} +1 -1
  31. package/dist/client/assets/{checkbox-Cqclwr05.js → checkbox-Bj9jBMQF.js} +1 -1
  32. package/dist/client/assets/{collection-detail-eWLOICC2.js → collection-detail-QGbMDWA7.js} +1 -1
  33. package/dist/client/assets/{collection-display-button-YN1Du2b2.js → collection-display-button-475jHotV.js} +1 -1
  34. package/dist/client/assets/{collection-header-cwEX65MF.js → collection-header-DcpyPzrC.js} +1 -1
  35. package/dist/client/assets/{collection-page-B4_lG-H0.js → collection-page-DpUZNbpd.js} +1 -1
  36. package/dist/client/assets/{collection-search-Dv3t9yjC.js → collection-search-DVBnlN6E.js} +1 -1
  37. package/dist/client/assets/{collection-table-wrapper-S-frkDVa.js → collection-table-wrapper-DQ4F9pbh.js} +1 -1
  38. package/dist/client/assets/{connection-card-xiDlSmx0.js → connection-card-opsQBUfD.js} +1 -1
  39. package/dist/client/assets/{connection-detail-D8LXW0Fw.js → connection-detail-DpiL6xjK.js} +1 -1
  40. package/dist/client/assets/{connections-C87liitd.js → connections-CeDc3J_o.js} +1 -1
  41. package/dist/client/assets/{core-R8MKBD2a.js → core-DJoPglro.js} +1 -1
  42. package/dist/client/assets/{create-organization-dialog-4VD6t1n9.js → create-organization-dialog-fbCy_hNu.js} +1 -1
  43. package/dist/client/assets/{dialog-CGV-qz18.js → dialog-BqvvzTa7.js} +1 -1
  44. package/dist/client/assets/{dropdown-menu-BNCgQxqV.js → dropdown-menu-DrQKdl4f.js} +1 -1
  45. package/dist/client/assets/{env-vars-editor-8fl-6TQw.js → env-vars-editor-DEYac6H7.js} +1 -1
  46. package/dist/client/assets/{error-boundary-B9DOADmy.js → error-boundary-CdmYlIj7.js} +1 -1
  47. package/dist/client/assets/{extract-connection-data-CdQDF9XU.js → extract-connection-data-Ty2DjF1e.js} +1 -1
  48. package/dist/client/assets/{form-CIYxgWl_.js → form-Bus-fIfC.js} +1 -1
  49. package/dist/client/assets/{formatDistanceToNow-B64oYn50.js → formatDistanceToNow-D46rGC8T.js} +1 -1
  50. package/dist/client/assets/{gateway-detail-OpJIG3Yt.js → gateway-detail-fCVh3_nF.js} +1 -1
  51. package/dist/client/assets/{gateways-ZXZ9OfGc.js → gateways-DQmZoxNy.js} +1 -1
  52. package/dist/client/assets/{home-DeG5WSwS.js → home-heelYyW2.js} +1 -1
  53. package/dist/client/assets/{index-sCOTvdLe.js → index-A52jfksK.js} +2 -2
  54. package/dist/client/assets/{index-CA787L0w.js → index-DDiLOLYT.js} +1 -1
  55. package/dist/client/assets/index-DKrh5SL2.css +1 -0
  56. package/dist/client/assets/index-JV0IIYp6.js +1 -0
  57. package/dist/client/assets/{index-YQujs2yd.js → index-td_4XAxf.js} +1 -1
  58. package/dist/client/assets/{input-xue80KYR.js → input-BXHWk19m.js} +1 -1
  59. package/dist/client/assets/json-gPxhilNK.js +1 -0
  60. package/dist/client/assets/{json-syntax-highlighter-O0v4mZf4.js → json-syntax-highlighter-i1hiMNnF.js} +2 -2
  61. package/dist/client/assets/{layout-B1ZM1ufI.js → layout-dxbGsEKV.js} +1 -1
  62. package/dist/client/assets/{lazy-highlighter-JDYXACHf.js → lazy-highlighter-QDCjbXst.js} +1 -1
  63. package/dist/client/assets/{localstorage-keys-B4xlIfie.js → localstorage-keys-D7pZSS7H.js} +1 -1
  64. package/dist/client/assets/{login-BCIqnHMr.js → login-CcnR2b1q.js} +1 -1
  65. package/dist/client/assets/{mcp-oauth-DHCzdFXV.js → mcp-oauth-D7V7V-GS.js} +1 -1
  66. package/dist/client/assets/{members-OI62Ha9f.js → members-D5QtYSzf.js} +1 -1
  67. package/dist/client/assets/{monitoring-BozTlMNR.js → monitoring-Cp92YRPy.js} +1 -1
  68. package/dist/client/assets/{oauth-callback-ReB4XOUQ.js → oauth-callback-1_PgXFG_.js} +1 -1
  69. package/dist/client/assets/{page-BCF71hXV.js → page-C8KGQPlY.js} +1 -1
  70. package/dist/client/assets/{popover-D1xs0JOi.js → popover-MhzpcVkW.js} +1 -1
  71. package/dist/client/assets/prism-light-C-ukkBST.js +1 -0
  72. package/dist/client/assets/{resizable-D6jrUBoS.js → resizable-B3HA_CX4.js} +3 -3
  73. package/dist/client/assets/{resource-tabs-4PWXf_7x.js → resource-tabs-ru5yaRIE.js} +1 -1
  74. package/dist/client/assets/{select-BhGYpRS-.js → select-Be0LRVWn.js} +1 -1
  75. package/dist/client/assets/{settings-B5U2prRj.js → settings-gZFi_2QA.js} +1 -1
  76. package/dist/client/assets/shell-layout-adVEIdhn.js +17 -0
  77. package/dist/client/assets/{spinner-COE1DZ4A.js → spinner-oZ2DO2-U.js} +1 -1
  78. package/dist/client/assets/store-DzO4PTg0.js +1 -0
  79. package/dist/client/assets/{store-app-detail-DoIxciwX.js → store-app-detail-BIXt1EdE.js} +1 -1
  80. package/dist/client/assets/{switch-DBN8Ex7f.js → switch-DsCvClV8.js} +1 -1
  81. package/dist/client/assets/{tools-list-C3tYtdBK.js → tools-list-BsHebq88.js} +1 -1
  82. package/dist/client/assets/{tooltip-DfU80GZU.js → tooltip-BjhP6ibY.js} +1 -1
  83. package/dist/client/assets/{types-B98-qtEW.js → types-D4T3qWDr.js} +1 -1
  84. package/dist/client/assets/{use-binding-B2VzUGHI.js → use-binding-CapMpNVF.js} +1 -1
  85. package/dist/client/assets/{use-connection-m7Quih5m.js → use-connection-BX5-4xHw.js} +1 -1
  86. package/dist/client/assets/{use-connection-resources-DJLBG37p.js → use-connection-resources-FqHsvBSA.js} +1 -1
  87. package/dist/client/assets/{use-gateway-DNtHqlPZ.js → use-gateway-CseaalWF.js} +1 -1
  88. package/dist/client/assets/{use-list-state-PtU_RhYw.js → use-list-state-7NLbXyOC.js} +1 -1
  89. package/dist/client/assets/{use-mcp-DH62TTuH.js → use-mcp-M6XXMHar.js} +1 -1
  90. package/dist/client/assets/{use-members-DT0Eu16U.js → use-members-DzZB15s9.js} +1 -1
  91. package/dist/client/assets/{use-mobile-Bsr5OpCZ.js → use-mobile-TpeNqylz.js} +1 -1
  92. package/dist/client/assets/{use-organization-settings-DmZGcOTy.js → use-organization-settings-BAhAEDx8.js} +1 -1
  93. package/dist/client/assets/{use-tool-call-B18ASOk0.js → use-tool-call-CQCb5PBf.js} +1 -1
  94. package/dist/client/assets/useQuery-ojqdZMTH.js +1 -0
  95. package/dist/client/assets/utils-DgLfrg3u.js +1 -0
  96. package/dist/client/assets/{view-mode-toggle-DfXtYF8W.js → view-mode-toggle-DAXMt6ZW.js} +1 -1
  97. package/dist/client/assets/well-known-mcp-BPQQU1v0.js +1 -0
  98. package/dist/client/empty-state-openrouter.svg +320 -0
  99. package/dist/client/emptystate-mcp.svg +26 -70
  100. package/dist/client/index.html +2 -2
  101. package/dist/client/store-empty-state.svg +96 -349
  102. package/dist/server/cli.js +126 -126
  103. package/dist/server/server.js +121 -121
  104. package/package.json +1 -1
  105. package/dist/client/assets/index-9N6ukeZ0.js +0 -1
  106. package/dist/client/assets/index-Dgn6D_6Q.css +0 -1
  107. package/dist/client/assets/json-Dg5El1ra.js +0 -1
  108. package/dist/client/assets/prism-light-5LJTPgfP.js +0 -1
  109. package/dist/client/assets/shell-layout-iJEdHp6S.js +0 -17
  110. package/dist/client/assets/store-B7ElxPh-.js +0 -1
  111. package/dist/client/assets/useQuery-bRRwOSrM.js +0 -1
  112. package/dist/client/assets/utils-DNHmpmu2.js +0 -1
  113. package/dist/client/assets/well-known-mcp-DHBmBE29.js +0 -1
@@ -1,17 +0,0 @@
1
- import{r as S,c as g,j as o,e as Bt,f as Pe,a as je,t as Ut,R as Gt,T as Wt,D as Vt,C as Ft,P as Kt,g as Yt,O as Zt,h as qt,i as Qt,k as Xt,d as ot,l as Jt,G as es,U as ts,m as ss,S as lt,n as ns,o as as,N as os,p as ls,K as is,q as it}from"./index-sCOTvdLe.js";import{i as rs,E as cs}from"./SearchMd-8Mty8uAj.js";import{u as ds,I as Je,n as ms}from"./use-connection-m7Quih5m.js";import{u as be,L as we}from"./localstorage-keys-B4xlIfie.js";import{u as Se,T as fs,a as us,b as hs,c as ps,L as et,i as xs,P as gs,O as bs}from"./tooltip-DfU80GZU.js";import{B as Z}from"./button-g1YyJeHt.js";import{c as I}from"./utils-DNHmpmu2.js";import{i as Ye}from"./CpuChip02-DHjYIIBW.js";import{i as vs}from"./Loading01-BC0x96Z5.js";import{s as js}from"./Plus-EukPTBel.js";import{i as Ae}from"./X-BCw4rnZ5.js";import{u as ws,a as Ss,b as ys,c as Cs,d as Ns,C as E,e as _s,I as ks,D as Is,f as $s,g as Ts,h as Ms,i as zs,j as Os,R as rt,k as Ds,l as As,m as Ps}from"./resizable-D6jrUBoS.js";import{P as ct,a as dt,b as mt}from"./popover-D1xs0JOi.js";import{s as Rs}from"./Clock-CvaxC0bJ.js";import{s as Es}from"./Trash01-BhXDZnCd.js";import{u as Ls}from"./use-binding-B2VzUGHI.js";import{E as qe}from"./error-boundary-B9DOADmy.js";import{i as Hs}from"./File06-gGBcoD5H.js";import{u as ye}from"./use-mobile-Bsr5OpCZ.js";import{u as ft,a as Bs}from"./use-organization-settings-DmZGcOTy.js";import{C as Us}from"./create-organization-dialog-4VD6t1n9.js";import{I as Gs}from"./input-xue80KYR.js";import{A as ve}from"./avatar-C4a-k5oT.js";import{c as Ws,D as Vs,a as Fs,b as Ks,d as Ys,e as tt}from"./dropdown-menu-BNCgQxqV.js";import{a as Zs}from"./Copy01-C6L6B0Ei.js";import{n as st}from"./LinkExternal01-ByW37u5u.js";import{D as ut,a as ht,b as pt,c as xt,d as gt}from"./dialog-CGV-qz18.js";import"./useQuery-bRRwOSrM.js";import"./select-BhGYpRS-.js";import"./ChevronDown-C6uzZBp6.js";import"./use-gateway-DNtHqlPZ.js";import"./AlertCircle-CgTGZ0LS.js";import"./Terminal-CXi8Gzb8.js";import"./connection-card-xiDlSmx0.js";import"./card-BpQhyjdr.js";import"./spinner-COE1DZ4A.js";import"./InfoCircle-BYxhaeYG.js";import"./auth-BYeLjxhg.js";import"./alert-dialog-Uz892MsJ.js";import"./form-CIYxgWl_.js";const bt=({size:t=24,color:e="currentColor",...s})=>S.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},S.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"}));bt.displayName="BarChart10";const vt=({size:t=24,color:e="currentColor",...s})=>S.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},S.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"}));vt.displayName="Building02";const jt=({size:t=24,color:e="currentColor",...s})=>S.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},S.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));jt.displayName="ChevronSelectorVertical";const wt=({size:t=24,color:e="currentColor",...s})=>S.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},S.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"}));wt.displayName="Globe01";const St=({size:t=24,color:e="currentColor",...s})=>S.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},S.createElement("path",{d:"M9 21v-7.4c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 12 10.04 12 10.6 12h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 12.76 15 13.04 15 13.6V21M11.018 2.764 4.235 8.039c-.453.353-.68.53-.843.75a2 2 0 0 0-.318.65C3 9.704 3 9.991 3 10.565V17.8c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8v-7.235c0-.574 0-.861-.074-1.126a2.002 2.002 0 0 0-.318-.65c-.163-.22-.39-.397-.843-.75l-6.783-5.275c-.351-.273-.527-.41-.72-.462a1 1 0 0 0-.523 0c-.194.052-.37.189-.721.462Z"}));St.displayName="Home02";const yt=({size:t=24,color:e="currentColor",...s})=>S.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},S.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"}));yt.displayName="LayoutRight";const Ct=({size:t=24,color:e="currentColor",...s})=>S.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},S.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"}));Ct.displayName="LogOut01";const Nt=({size:t=24,color:e="currentColor",...s})=>S.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},S.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"}));Nt.displayName="Mail01";const _t=({size:t=24,color:e="currentColor",...s})=>S.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},S.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),S.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"}));_t.displayName="Settings01";const kt=({size:t=24,color:e="currentColor",...s})=>S.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},S.createElement("path",{d:"M5.316 19.438A4.001 4.001 0 0 1 9 17h6a4.001 4.001 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));kt.displayName="UserCircle";const It=({size:t=24,color:e="currentColor",...s})=>S.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},S.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"}));It.displayName="Users01";function Qe(){const t=g.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=we.decoChatOpen(),t[0]=e):e=t[0];const[s,a]=be(e,qs);let n;return t[1]!==s||t[2]!==a?(n=[s,a],t[1]=s,t[2]=a,t[3]=n):n=t[3],n}function qs(t){return!!(t??!1)}function Qs(t){const e=g.c(14),{title:s,description:a,avatar:n,avatarNode:l,className:i}=t,r=s===void 0?"Start a conversation":s;let c;e[0]!==i?(c=I("flex flex-col items-center justify-center gap-4 p-0 text-center",i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==n||e[3]!==l?(d=l||n&&o.jsx("img",{src:n,alt:"Chat avatar",className:"size-[60px] rounded-[18px] border-[1.875px] border-border/10"}),e[2]=n,e[3]=l,e[4]=d):d=e[4];let m;e[5]!==r?(m=r&&o.jsx("h3",{className:"text-xl font-medium text-foreground",children:r}),e[5]=r,e[6]=m):m=e[6];let f;e[7]!==a?(f=a&&o.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:a}),e[7]=a,e[8]=f):f=e[8];let u;return e[9]!==c||e[10]!==d||e[11]!==m||e[12]!==f?(u=o.jsxs("div",{className:c,children:[d,m,f]}),e[9]=c,e[10]=d,e[11]=m,e[12]=f,e[13]=u):u=e[13],u}const $t=()=>crypto.randomUUID(),Tt=S.createContext(null);function Xs(t){const e=g.c(15),{children:s}=t,{locator:a}=Se(),n=ws(),[l,i]=be(we.threadManagerState(a)+":active-id",Js);let r;e[0]!==i||e[1]!==n?(r=h=>{const v=h?.id||crypto.randomUUID(),x=new Date().toISOString(),b={id:v,title:h?.title||"",created_at:h?.created_at||x,updated_at:h?.updated_at||x,hidden:h?.hidden??!1};return n.insert.mutate(b),i(v),b},e[0]=i,e[1]=n,e[2]=r):r=e[2];const c=r;let d;e[3]!==l||e[4]!==i||e[5]!==n?(d=h=>{n.update.mutate({id:h,updates:{hidden:!0,updated_at:new Date().toISOString()}}),l===h&&i($t())},e[3]=l,e[4]=i,e[5]=n,e[6]=d):d=e[6];const m=d;let f;e[7]!==l||e[8]!==c||e[9]!==m||e[10]!==i?(f={activeThreadId:l,createThread:c,setActiveThreadId:i,hideThread:m},e[7]=l,e[8]=c,e[9]=m,e[10]=i,e[11]=f):f=e[11];const u=f;let p;return e[12]!==s||e[13]!==u?(p=o.jsx(Tt.Provider,{value:u,children:s}),e[12]=s,e[13]=u,e[14]=p):p=e[14],p}function Js(t){return t||$t()}function en(){const t=S.useContext(Tt);if(!t)throw new Error("useChat must be used within a ChatProvider");return t}function tn(t){const e=new Date(t),a=new Date().getTime()-e.getTime(),n=Math.floor(a/6e4),l=Math.floor(a/36e5);return n<1?"now":n<60?`${n}m`:`${l}h`}function sn(t){const e=new Date,s=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=new Date(s.getTime()-864e5),n=new Date(s.getTime()-7*864e5),l=new Date(s.getTime()-30*864e5),i=[],r=[],c=[],d=[],m=[];for(const u of t){const p=new Date(u.updated_at);p>=s?i.push(u):p>=a?r.push(u):p>=n?c.push(u):p>=l?d.push(u):m.push(u)}const f=[];return i.length>0&&f.push({label:"Today",threads:i,showRelativeTime:!0}),r.length>0&&f.push({label:"Yesterday",threads:r,showRelativeTime:!1}),c.length>0&&f.push({label:"7 days ago",threads:c,showRelativeTime:!1}),d.length>0&&f.push({label:"30 days ago",threads:d,showRelativeTime:!1}),m.length>0&&f.push({label:"Older",threads:m,showRelativeTime:!1}),f}function nn(t){const e=g.c(36),{threads:s,activeThreadId:a,onSelectThread:n,onRemoveThread:l,onOpen:i}=t,[r,c]=S.useState("");let d,m,f,u,p,h,v,x,b;if(e[0]!==a||e[1]!==i||e[2]!==l||e[3]!==n||e[4]!==r||e[5]!==s){const N=r.trim()?s.filter($=>($.title||"New chat").toLowerCase().includes(r.toLowerCase())):s,y=sn(N);let _;e[15]!==i?(_=$=>{$?i?.():c("")},e[15]=i,e[16]=_):_=e[16];const D=_;m=ct,x=D,e[17]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(dt,{asChild:!0,children:o.jsx("button",{type:"button",className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:o.jsx(Rs,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})}),e[17]=b):b=e[17],d=mt,p="end",h="w-80 p-0";let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(rs,{size:16,className:"text-muted-foreground shrink-0"}),e[18]=k):k=e[18];let M;e[19]===Symbol.for("react.memo_cache_sentinel")?(M=$=>c($.target.value),e[19]=M):M=e[19],e[20]!==r?(v=o.jsx("div",{className:"border-b",children:o.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[k,o.jsx("input",{type:"text",placeholder:"Search chats...",value:r,onChange:M,className:"flex-1 border-0 shadow-none focus:outline-none px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[20]=r,e[21]=v):v=e[21],f="max-h-[300px] overflow-y-auto",u=N.length===0?o.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:r.trim()?"No chats found":"No chats yet"}):y.map(($,P)=>o.jsxs("div",{children:[P>0&&o.jsx("div",{className:"border-t mx-3"}),o.jsx("div",{className:"px-3 py-1",children:o.jsx("span",{className:"text-xs font-medium text-muted-foreground tracking-wide",children:$.label})}),$.threads.map(z=>{const Y=z.id===a;return o.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 hover:bg-accent cursor-pointer group ${Y?"bg-accent/50":""}`,onClick:()=>n(z.id),children:[o.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[o.jsx("span",{className:"text-sm truncate",children:z.title||"New chat"}),o.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:Y?"current":$.showRelativeTime?tn(z.updated_at):null})]}),o.jsx("button",{type:"button",onClick:R=>{R.stopPropagation(),l(z.id)},className:"opacity-0 cursor-pointer group/trash group-hover:opacity-100 p-1 hover:bg-destructive/10 rounded transition-opacity",title:"Remove chat",children:o.jsx(Es,{size:14,className:"text-muted-foreground group-hover/trash:text-destructive"})})]},z.id)})]},$.label)),e[0]=a,e[1]=i,e[2]=l,e[3]=n,e[4]=r,e[5]=s,e[6]=d,e[7]=m,e[8]=f,e[9]=u,e[10]=p,e[11]=h,e[12]=v,e[13]=x,e[14]=b}else d=e[6],m=e[7],f=e[8],u=e[9],p=e[10],h=e[11],v=e[12],x=e[13],b=e[14];let j;e[22]!==f||e[23]!==u?(j=o.jsx("div",{className:f,children:u}),e[22]=f,e[23]=u,e[24]=j):j=e[24];let w;e[25]!==d||e[26]!==p||e[27]!==h||e[28]!==v||e[29]!==j?(w=o.jsxs(d,{align:p,className:h,children:[v,j]}),e[25]=d,e[26]=p,e[27]=h,e[28]=v,e[29]=j,e[30]=w):w=e[30];let C;return e[31]!==m||e[32]!==x||e[33]!==b||e[34]!==w?(C=o.jsxs(m,{onOpenChange:x,children:[b,w]}),e[31]=m,e[32]=x,e[33]=b,e[34]=w,e[35]=C):C=e[35],C}function an(t){const e=/\/[^/]+\/mcps\/([^/]+)\/([^/]+)\/([^/]+)/,s=t.match(e);return s&&s[1]&&s[2]&&s[3]?{connectionId:decodeURIComponent(s[1]),collectionName:decodeURIComponent(s[2]),itemId:decodeURIComponent(s[3])}:{connectionId:null,collectionName:null,itemId:null}}function on(){const t=g.c(2),e=Bt();let s;t[0]!==e.location.pathname?(s=an(e.location.pathname),t[0]=e.location.pathname,t[1]=s):s=t[1];const{connectionId:a,collectionName:n,itemId:l}=s;return`You are an AI assistant running in an MCP Mesh environment.
2
-
3
- ## About MCP Mesh
4
- The Model Context Protocol (MCP) Mesh allows users to connect external MCP servers and expose their capabilities through gateways. Each gateway provides access to a curated set of tools from connected MCP servers.
5
-
6
- ## Important Notes
7
- - All tool calls are logged and audited for security and compliance
8
- - You have access to the tools exposed through the selected gateway
9
- - MCPs may expose resources that users can browse and edit
10
-
11
- ## Current Editing Context
12
- ${a?`- Connection ID: ${a}`:""}
13
- ${n?`- Collection Name: ${n}`:""}
14
- ${l?`- Item ID: ${l}`:""}
15
-
16
- Help the user understand and work with this resource.
17
- `}const ln="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function rn(t){const e=g.c(3),{gatewayId:s,onSelect:a}=t,{data:n}=_s(s);if(n.length===0)return null;let l;return e[0]!==a||e[1]!==n?(l=o.jsx(ks,{prompts:n,onSelect:a,className:"mt-6"}),e[0]=a,e[1]=n,e[2]=l):l=e[2],l}function cn(){const t=g.c(120),{org:e,locator:s}=Se(),{slug:a}=e,[,n]=Qe(),l=Pe(),{data:i}=je.useSession(),r=i?.user,{createThread:c,activeThreadId:d,setActiveThreadId:m,hideThread:f}=en(),{threads:u,refetch:p}=Ss(),h=ys(),v=Cs(),x=ds();let b;t[0]!==x?(b={connections:x,binding:"LLMS"},t[0]=x,t[1]=b):b=t[1];const[j]=Ls(b),w=!!j,C=h.length>0,N=w&&C;let y;t[2]!==s?(y=we.chatSelectedModel(s),t[2]=s,t[3]=y):y=t[3];const[_,D]=be(y,fn),[k,M]=be(`${s}:selected-gateway`,mn),$=v[0];let P;t[4]!==$||t[5]!==_?(P=_??($?{id:$.id,connectionId:$.connectionId}:null),t[4]=$,t[5]=_,t[6]=P):P=t[6];const z=P,Y=h[0]?.id,R=k?.gatewayId??Y;let V;if(t[7]!==R||t[8]!==h){let T;t[10]!==R?(T=U=>U.id===R,t[10]=R,t[11]=T):T=t[11],V=h.find(T),t[7]=R,t[8]=h,t[9]=V}else V=t[9];const A=V;let W;if(t[12]!==z?.connectionId||t[13]!==z?.id||t[14]!==v){let T;t[16]!==z?.connectionId||t[17]!==z?.id?(T=U=>U.id===z?.id&&U.connectionId===z?.connectionId,t[16]=z?.connectionId,t[17]=z?.id,t[18]=T):T=t[18],W=v.find(T),t[12]=z?.connectionId,t[13]=z?.id,t[14]=v,t[15]=W}else W=t[15];const B=W,F=on();let L;t[19]!==c?(L=T=>c({id:T.id,title:T.title}),t[19]=c,t[20]=L):L=t[20];let G;t[21]!==d||t[22]!==F||t[23]!==L?(G={threadId:d,systemPrompt:F,onCreateThread:L},t[21]=d,t[22]=F,t[23]=L,t[24]=G):G=t[24];const O=Ns(G);let Ce;t[25]!==d||t[26]!==O||t[27]!==A||t[28]!==B||t[29]!==r?.image||t[30]!==r?.name?(Ce=async T=>{if(!B){Ut.error("No model configured");return}const U={created_at:new Date().toISOString(),thread_id:d,model:{id:B.id,connectionId:B.connectionId,provider:B.provider??void 0},gateway:A?{id:A.id}:void 0,user:{avatar:r?.image??void 0,name:r?.name??"you"}};await O.sendMessage(T,U)},t[25]=d,t[26]=O,t[27]=A,t[28]=B,t[29]=r?.image,t[30]=r?.name,t[31]=Ce):Ce=t[31];const q=Ce;let Ne;t[32]!==D?(Ne=T=>{D({id:T.id,connectionId:T.connectionId})},t[32]=D,t[33]=Ne):Ne=t[33];const Ee=Ne;if(!N){let T,U;!w&&!C?(T="Connect your providers",U="Connect an LLM provider and create a gateway to unlock AI-powered features."):w?(T="No gateways configured",U="Create a gateway to expose your MCP tools to the chat."):(T="No model provider connected",U="Connect to a model provider to unlock AI-powered features.");let Me;t[34]===Symbol.for("react.memo_cache_sentinel")?(Me=o.jsxs(E.Header.Left,{children:[o.jsx("img",{src:ln,alt:"deco chat",className:"size-5 rounded"}),o.jsx("span",{className:"text-sm font-medium",children:"deco chat"})]}),t[34]=Me):Me=t[34];let ue;t[35]!==n?(ue=()=>n(!1),t[35]=n,t[36]=ue):ue=t[36];let ze;t[37]===Symbol.for("react.memo_cache_sentinel")?(ze=o.jsx(Ae,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[37]=ze):ze=t[37];let he;t[38]!==ue?(he=o.jsxs(E.Header,{children:[Me,o.jsx(E.Header.Right,{children:o.jsx("button",{type:"button",onClick:ue,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:ze})})]}),t[38]=ue,t[39]=he):he=t[39];let pe;t[40]!==w||t[41]!==l||t[42]!==a?(pe=()=>l({to:w?"/$org/gateways":"/$org/mcps",params:{org:a},search:w?void 0:{action:"create"}}),t[40]=w,t[41]=l,t[42]=a,t[43]=pe):pe=t[43];const Ke=w?"Create gateway":"Add connection";let xe;t[44]!==pe||t[45]!==Ke?(xe=o.jsx(Z,{variant:"outline",onClick:pe,children:Ke}),t[44]=pe,t[45]=Ke,t[46]=xe):xe=t[46];let ge;t[47]!==U||t[48]!==xe||t[49]!==T?(ge=o.jsx(E.Main,{className:"flex flex-col items-center",children:o.jsx(E.EmptyState,{children:o.jsx(cs,{title:T,description:U,actions:xe})})}),t[47]=U,t[48]=xe,t[49]=T,t[50]=ge):ge=t[50];let Oe;return t[51]!==he||t[52]!==ge?(Oe=o.jsxs(E,{children:[he,ge]}),t[51]=he,t[52]=ge,t[53]=Oe):Oe=t[53],Oe}let _e;t[54]!==O.messages?(_e=O.messages.filter(dn),t[54]=O.messages,t[55]=_e):_e=t[55];const Le=_e,He=A?.icon,Be=A?.title||"deco chat";let ke;t[56]===Symbol.for("react.memo_cache_sentinel")?(ke=o.jsx(Ye,{size:12}),t[56]=ke):ke=t[56];let Q;t[57]!==He||t[58]!==Be?(Q=o.jsx(Je,{icon:He,name:Be,size:"xs",fallbackIcon:ke}),t[57]=He,t[58]=Be,t[59]=Q):Q=t[59];const Ue=A?.title||"deco chat";let X;t[60]!==Ue?(X=o.jsx("span",{className:"text-sm font-medium",children:Ue}),t[60]=Ue,t[61]=X):X=t[61];let J;t[62]!==Q||t[63]!==X?(J=o.jsxs(E.Header.Left,{children:[Q,X]}),t[62]=Q,t[63]=X,t[64]=J):J=t[64];let ee;t[65]!==c?(ee=()=>c(),t[65]=c,t[66]=ee):ee=t[66];let Ie;t[67]===Symbol.for("react.memo_cache_sentinel")?(Ie=o.jsx(js,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[67]=Ie):Ie=t[67];let te;t[68]!==ee?(te=o.jsx("button",{type:"button",onClick:ee,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"New chat",children:Ie}),t[68]=ee,t[69]=te):te=t[69];let se;t[70]!==p?(se=()=>p(),t[70]=p,t[71]=se):se=t[71];let ne;t[72]!==d||t[73]!==f||t[74]!==m||t[75]!==se||t[76]!==u?(ne=o.jsx(nn,{threads:u,activeThreadId:d,onSelectThread:m,onRemoveThread:f,onOpen:se}),t[72]=d,t[73]=f,t[74]=m,t[75]=se,t[76]=u,t[77]=ne):ne=t[77];let ae;t[78]!==n?(ae=()=>n(!1),t[78]=n,t[79]=ae):ae=t[79];let $e;t[80]===Symbol.for("react.memo_cache_sentinel")?($e=o.jsx(Ae,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[80]=$e):$e=t[80];let oe;t[81]!==ae?(oe=o.jsx("button",{type:"button",onClick:ae,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:$e}),t[81]=ae,t[82]=oe):oe=t[82];let le;t[83]!==te||t[84]!==ne||t[85]!==oe?(le=o.jsxs(E.Header.Right,{children:[te,ne,oe]}),t[83]=te,t[84]=ne,t[85]=oe,t[86]=le):le=t[86];let ie;t[87]!==J||t[88]!==le?(ie=o.jsxs(E.Header,{children:[J,le]}),t[87]=J,t[88]=le,t[89]=ie):ie=t[89];let re;t[90]!==O.messages||t[91]!==O.status||t[92]!==R||t[93]!==q||t[94]!==Le.length||t[95]!==A?.description||t[96]!==A?.icon||t[97]!==A?.title?(re=o.jsx(E.Main,{children:Le.length===0?o.jsx(E.EmptyState,{children:o.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[o.jsx(Qs,{title:A?.title||"Ask deco chat",description:A?.description??"Ask anything about configuring model providers or using MCP Mesh.",avatarNode:o.jsx(Je,{icon:A?.icon,name:A?.title||"deco chat",size:"lg",fallbackIcon:o.jsx(Ye,{size:32}),className:"size-[60px]! rounded-[18px]!"})}),R&&o.jsx(qe,{fallback:null,children:o.jsx(S.Suspense,{fallback:o.jsx("div",{className:"flex justify-center",children:o.jsx(vs,{size:20,className:"animate-spin text-muted-foreground"})}),children:o.jsx(rn,{gatewayId:R,onSelect:T=>{q(T.description??T.name)}})})},R)]})}):o.jsx(E.Messages,{messages:O.messages,status:O.status,minHeightOffset:240})}),t[90]=O.messages,t[91]=O.status,t[92]=R,t[93]=q,t[94]=Le.length,t[95]=A?.description,t[96]=A?.icon,t[97]=A?.title,t[98]=re):re=t[98];const Ge=v.length===0||!z,We=O.status==="submitted"||O.status==="streaming",Ve=v.length===0?"Add an LLM binding connection to start chatting":"Ask anything or @ for context";let ce;t[99]!==M?(ce=T=>{T&&M({gatewayId:T})},t[99]=M,t[100]=ce):ce=t[100];let de;t[101]!==R||t[102]!==ce?(de=o.jsx(E.Input.GatewaySelector,{disabled:!1,selectedGatewayId:R,onGatewayChange:ce}),t[101]=R,t[102]=ce,t[103]=de):de=t[103];const Fe=z??void 0;let me;t[104]!==Ee||t[105]!==Fe?(me=o.jsx(E.Input.ModelSelector,{disabled:!1,selectedModel:Fe,onModelChange:Ee}),t[104]=Ee,t[105]=Fe,t[106]=me):me=t[106];let fe;t[107]!==O.messages||t[108]!==O.stop||t[109]!==q||t[110]!==Ge||t[111]!==We||t[112]!==Ve||t[113]!==de||t[114]!==me?(fe=o.jsx(E.Footer,{children:o.jsx("div",{children:o.jsxs(E.Input,{onSubmit:q,onStop:O.stop,disabled:Ge,isStreaming:We,placeholder:Ve,usageMessages:O.messages,children:[de,me]})})}),t[107]=O.messages,t[108]=O.stop,t[109]=q,t[110]=Ge,t[111]=We,t[112]=Ve,t[113]=de,t[114]=me,t[115]=fe):fe=t[115];let Te;return t[116]!==ie||t[117]!==re||t[118]!==fe?(Te=o.jsxs(E,{children:[ie,re,fe]}),t[116]=ie,t[117]=re,t[118]=fe,t[119]=Te):Te=t[119],Te}function dn(t){return t.role!=="system"}function mn(){return null}function fn(t){return t??null}function un(t){const e=g.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=o.jsx(Gt,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function hn(t){const e=g.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=o.jsx(Kt,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function pn(t){const e=g.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 n;e[3]!==s?(n=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]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx(Zt,{"data-slot":"sheet-overlay",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function xn(t){const e=g.c(17);let s,a,n,l;e[0]!==t?({className:a,children:s,side:l,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l):(s=e[1],a=e[2],n=e[3],l=e[4]);const i=l===void 0?"right":l;let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(pn,{}),e[5]=r):r=e[5];const c=i==="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=i==="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=i==="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=i==="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 u;e[6]!==a||e[7]!==c||e[8]!==d||e[9]!==m||e[10]!==f?(u=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]=u):u=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs(Yt,{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:[o.jsx(Ae,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=p):p=e[12];let h;return e[13]!==s||e[14]!==n||e[15]!==u?(h=o.jsxs(hn,{children:[r,o.jsxs(Ft,{"data-slot":"sheet-content",className:u,...n,children:[s,p]})]}),e[13]=s,e[14]=n,e[15]=u,e[16]=h):h=e[16],h}function gn(t){const e=g.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 n;e[3]!==s?(n=I("flex flex-col gap-1.5 p-4",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-slot":"sheet-header",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function bn(t){const e=g.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 n;e[3]!==s?(n=I("text-foreground font-semibold",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx(Wt,{"data-slot":"sheet-title",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function vn(t){const e=g.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 n;e[3]!==s?(n=I("text-muted-foreground text-sm",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx(Vt,{"data-slot":"sheet-description",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Mt(t){const e=g.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 n;e[3]!==s?(n=I("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-slot":"skeleton",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}const jn="sidebar_state",wn=3600*24*7,Sn="16rem",yn="18rem",Cn="3rem",Nn="b",zt=S.createContext(null);function Xe(){const t=S.useContext(zt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function _n(t){const e=g.c(21),{defaultOpen:s,open:a,onOpenChange:n,children:l}=t,i=s===void 0?!0:s,r=ye(),[c,d]=S.useState(!1),[m,f]=S.useState(i),u=a??m;let p;e[0]!==u||e[1]!==n?(p=D=>{const k=typeof D=="function"?D(u):D;n?n(k):f(k),document.cookie=`${jn}=${k}; path=/; max-age=${wn}`},e[0]=u,e[1]=n,e[2]=p):p=e[2];const h=p;let v;e[3]!==r||e[4]!==h?(v=()=>r?d(In):h(kn),e[3]=r,e[4]=h,e[5]=v):v=e[5];const x=v;let b,j;e[6]!==x?(b=()=>{const D=k=>{if(k.key===Nn&&(k.metaKey||k.ctrlKey)){const M=k.target;if(M.tagName==="INPUT"||M.tagName==="TEXTAREA"||M.isContentEditable)return;k.preventDefault(),x()}};return globalThis.addEventListener("keydown",D),()=>globalThis.removeEventListener("keydown",D)},j=[x],e[6]=x,e[7]=b,e[8]=j):(b=e[7],j=e[8]),S.useEffect(b,j);const w=u?"expanded":"collapsed";let C;e[9]!==r||e[10]!==u||e[11]!==c||e[12]!==h||e[13]!==w||e[14]!==x?(C={state:w,open:u,setOpen:h,isMobile:r,openMobile:c,setOpenMobile:d,toggleSidebar:x},e[9]=r,e[10]=u,e[11]=c,e[12]=h,e[13]=w,e[14]=x,e[15]=C):C=e[15];const N=C;let y;e[16]!==l?(y=o.jsx(us,{delayDuration:0,children:l}),e[16]=l,e[17]=y):y=e[17];let _;return e[18]!==N||e[19]!==y?(_=o.jsx(zt.Provider,{value:N,children:y}),e[18]=N,e[19]=y,e[20]=_):_=e[20],_}function kn(t){return!t}function In(t){return!t}function $n(t){const e=g.c(14);let s,a,n,l;e[0]!==t?({className:a,style:l,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l):(s=e[1],a=e[2],n=e[3],l=e[4]);let i;e[5]!==l?(i={"--sidebar-width":Sn,"--sidebar-width-icon":Cn,...l},e[5]=l,e[6]=i):i=e[6];const r=i;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]!==n||e[11]!==r||e[12]!==c?(d=o.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:c,...n,children:s}),e[9]=s,e[10]=n,e[11]=r,e[12]=c,e[13]=d):d=e[13],d}function Tn(t){const e=g.c(46);let s,a,n,l,i,r;e[0]!==t?({side:l,variant:i,collapsible:r,className:a,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l,e[5]=i,e[6]=r):(s=e[1],a=e[2],n=e[3],l=e[4],i=e[5],r=e[6]);const c=l===void 0?"left":l,d=i===void 0?"sidebar":i,m=r===void 0?"offcanvas":r,{isMobile:f,state:u,openMobile:p,setOpenMobile:h}=Xe();if(m==="none"){let k;e[7]!==a?(k=I("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=k):k=e[8];let M;return e[9]!==s||e[10]!==n||e[11]!==k?(M=o.jsx("div",{"data-slot":"sidebar",className:k,...n,children:s}),e[9]=s,e[10]=n,e[11]=k,e[12]=M):M=e[12],M}if(f){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":yn},e[13]=k):k=e[13];let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsxs(gn,{className:"sr-only",children:[o.jsx(bn,{children:"Sidebar"}),o.jsx(vn,{children:"Displays the mobile sidebar."})]}),e[14]=M):M=e[14];let $;e[15]!==s?($=o.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=$):$=e[16];let P;e[17]!==c||e[18]!==$?(P=o.jsxs(xn,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:k,side:c,children:[M,$]}),e[17]=c,e[18]=$,e[19]=P):P=e[19];let z;return e[20]!==p||e[21]!==n||e[22]!==h||e[23]!==P?(z=o.jsx(un,{open:p,onOpenChange:h,...n,children:P}),e[20]=p,e[21]=n,e[22]=h,e[23]=P,e[24]=z):z=e[24],z}const v=u==="collapsed"?m:"",x=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 b;e[25]!==x?(b=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",x),e[25]=x,e[26]=b):b=e[26];let j;e[27]!==b?(j=o.jsx("div",{"data-slot":"sidebar-gap",className:b}),e[27]=b,e[28]=j):j=e[28];const w=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)]",C=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 N;e[29]!==a||e[30]!==w||e[31]!==C?(N=I("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",w,C,a),e[29]=a,e[30]=w,e[31]=C,e[32]=N):N=e[32];let y;e[33]!==s?(y=o.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]=y):y=e[34];let _;e[35]!==n||e[36]!==N||e[37]!==y?(_=o.jsx("div",{"data-slot":"sidebar-container",className:N,...n,children:y}),e[35]=n,e[36]=N,e[37]=y,e[38]=_):_=e[38];let D;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==v||e[43]!==j||e[44]!==d?(D=o.jsxs("div",{className:"group peer text-foreground hidden md:block border-r","data-state":u,"data-collapsible":v,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[j,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=v,e[43]=j,e[44]=d,e[45]=D):D=e[45],D}function Mn(t){const e=g.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 n;e[3]!==s?(n=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]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function zn(t){const e=g.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 n;e[3]!==s?(n=I("h-4 m-0! w-full",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-sidebar":"separator",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function On(t){const e=g.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 n;e[3]!==s?(n=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]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Dn(t){const e=g.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 n;e[3]!==s?(n=I("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function An(t){const e=g.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 n;e[3]!==s?(n=I("w-full text-sm",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Pn(t){const e=g.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 n;e[3]!==s?(n=I("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Re(t){const e=g.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 n;e[3]!==s?(n=I("group/menu-item relative",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}const Rn=qt("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 Ot(t){const e=g.c(28);let s,a,n,l,i,r,c;e[0]!==t?({asChild:n,isActive:l,variant:i,size:r,tooltip:c,className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l,e[5]=i,e[6]=r,e[7]=c):(s=e[1],a=e[2],n=e[3],l=e[4],i=e[5],r=e[6],c=e[7]);const d=n===void 0?!1:n,m=l===void 0?!1:l,f=i===void 0?"default":i,u=r===void 0?"default":r,p=d?Qt:"button",{isMobile:h,state:v}=Xe();let x;e[8]!==s||e[9]!==u||e[10]!==f?(x=I(Rn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=x):x=e[11];let b;e[12]!==p||e[13]!==m||e[14]!==a||e[15]!==u||e[16]!==x?(b=o.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:x,...a}),e[12]=p,e[13]=m,e[14]=a,e[15]=u,e[16]=x,e[17]=b):b=e[17];const j=b;if(!c)return j;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let w;e[20]!==j?(w=o.jsx(hs,{asChild:!0,children:j}),e[20]=j,e[21]=w):w=e[21];const C=v!=="collapsed"||h;let N;e[22]!==C||e[23]!==c?(N=o.jsx(fs,{side:"right",align:"center",hidden:C,...c}),e[22]=C,e[23]=c,e[24]=N):N=e[24];let y;return e[25]!==w||e[26]!==N?(y=o.jsxs(ps,{children:[w,N]}),e[25]=w,e[26]=N,e[27]=y):y=e[27],y}function En(t){const e=g.c(26),{item:s}=t,a=Pe(),{org:n}=Se(),l=ft(n.id),i=Bs(n.id);let r;e[0]!==i.update||e[1]!==s.url||e[2]!==l?.sidebar_items?(r=async()=>{const C=(l?.sidebar_items||[]).filter(N=>N.url!==s.url);await i.update.mutateAsync({sidebar_items:C})},e[0]=i.update,e[1]=s.url,e[2]=l?.sidebar_items,e[3]=r):r=e[3];const c=r;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 u;e[7]!==s.url||e[8]!==a?(u=()=>{a({to:s.url})},e[7]=s.url,e[8]=a,e[9]=u):u=e[9];const p=s.title;let h;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(h=o.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?o.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):o.jsx(Hs,{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]=h):h=e[13];let v;e[14]!==s.title?(v=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=v):v=e[15];let x;e[16]!==v?(x=o.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:o.jsx("span",{className:"truncate text-sm w-full capitalize",children:v})}),e[16]=v,e[17]=x):x=e[17];let b;e[18]!==c?(b=o.jsx(Ae,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:w=>{w.preventDefault(),w.stopPropagation(),c()}}),e[18]=c,e[19]=b):b=e[19];let j;return e[20]!==s.title||e[21]!==u||e[22]!==h||e[23]!==x||e[24]!==b?(j=o.jsx(Re,{children:o.jsxs(Ot,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[h,x,b]})}),e[20]=s.title,e[21]=u,e[22]=h,e[23]=x,e[24]=b,e[25]=j):j=e[25],j}function Ln(){const t=g.c(4),{org:e}=Se(),a=ft(e.id)?.sidebar_items;if(!a?.length)return null;let n;t[0]!==a?(n=a.map(Hn),t[0]=a,t[1]=n):n=t[1];let l;return t[2]!==n?(l=o.jsx(Dt,{children:n}),t[2]=n,t[3]=l):l=t[3],l}function Hn(t){return o.jsx(En,{item:t},t.url)}function nt(){const t=g.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Re,{children:o.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:o.jsx(Mt,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Dt(t){const e=g.c(4),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(zn,{className:"my-2 -ml-1"}),e[0]=a):a=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(Re,{children:o.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:o.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=n):n=e[1];let l;return e[2]!==s?(l=o.jsxs(o.Fragment,{children:[a,n,s]}),e[2]=s,e[3]=l):l=e[3],l}function Bn(){const t=g.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(S.Suspense,{fallback:o.jsxs(Dt,{children:[o.jsx(nt,{}),o.jsx(nt,{})]}),children:o.jsx(Ln,{})}),t[0]=e):e=t[0],e}function Un(){const t=g.c(43),{locator:e}=Se(),s=Pe();let a;t[0]!==e?(a=et.parse(e),t[0]=e,t[1]=a):a=t[1];const{org:n}=a;let l;t[2]!==e?(l=et.isOrgAdminProject(e),t[2]=e,t[3]=l):l=t[3];const i=l;let r;t[4]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(St,{}),t[4]=r):r=t[4];let c;t[5]!==s||t[6]!==n?(c={key:"home",label:"Home",icon:r,onClick:()=>s({to:"/$org",params:{org:n}})},t[5]=s,t[6]=n,t[7]=c):c=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(vt,{}),t[8]=d):d=t[8];let m;t[9]!==s||t[10]!==n?(m={key:"store",label:"Store",icon:d,onClick:()=>s({to:"/$org/store",params:{org:n}})},t[9]=s,t[10]=n,t[11]=m):m=t[11];let f;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(ms,{}),t[12]=f):f=t[12];let u;t[13]!==s||t[14]!==n?(u={key:"mcps",label:"MCP Servers",icon:f,onClick:()=>s({to:"/$org/mcps",params:{org:n}})},t[13]=s,t[14]=n,t[15]=u):u=t[15];let p;t[16]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(Ye,{}),t[16]=p):p=t[16];let h;t[17]!==s||t[18]!==n?(h={key:"gateways",label:"MCP Gateways",icon:p,onClick:()=>s({to:"/$org/gateways",params:{org:n}})},t[17]=s,t[18]=n,t[19]=h):h=t[19];let v;t[20]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(bt,{}),t[20]=v):v=t[20];let x;t[21]!==s||t[22]!==n?(x={key:"monitoring",label:"Monitoring",icon:v,onClick:()=>s({to:"/$org/monitoring",params:{org:n}})},t[21]=s,t[22]=n,t[23]=x):x=t[23];let b;t[24]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(It,{}),t[24]=b):b=t[24];let j;t[25]!==s||t[26]!==n?(j={key:"members",label:"Members",icon:b,onClick:()=>s({to:"/$org/members",params:{org:n}})},t[25]=s,t[26]=n,t[27]=j):j=t[27];let w;t[28]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(_t,{}),t[28]=w):w=t[28];let C;t[29]!==s||t[30]!==n?(C={key:"settings",label:"Settings",icon:w,onClick:()=>s({to:"/$org/settings",params:{org:n}})},t[29]=s,t[30]=n,t[31]=C):C=t[31];let N;t[32]!==x||t[33]!==j||t[34]!==C||t[35]!==c||t[36]!==m||t[37]!==u||t[38]!==h?(N=[c,m,u,h,x,j,C],t[32]=x,t[33]=j,t[34]=C,t[35]=c,t[36]=m,t[37]=u,t[38]=h,t[39]=N):N=t[39];const y=N;let _;return t[40]!==y||t[41]!==i?(_=i?y:[],t[40]=y,t[41]=i,t[42]=_):_=t[42],_}function At(t){const e=g.c(10),{navigationItems:s,footer:a,additionalContent:n,variant:l,collapsible:i}=t,r=l===void 0?"sidebar":l,c=i===void 0?"icon":i;let d;e[0]!==s?(d=s.map(Gn),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==n||e[3]!==d?(m=o.jsx(On,{className:"flex-1 overflow-x-hidden",children:o.jsx(Dn,{className:"font-medium",children:o.jsx(An,{children:o.jsxs(Pn,{className:"gap-0.5",children:[d,n]})})})}),e[2]=n,e[3]=d,e[4]=m):m=e[4];let f;return e[5]!==c||e[6]!==a||e[7]!==m||e[8]!==r?(f=o.jsxs(Tn,{variant:r,collapsible:c,children:[m,a]}),e[5]=c,e[6]=a,e[7]=m,e[8]=r,e[9]=f):f=e[9],f}function Gn(t){return o.jsx(Re,{children:o.jsxs(Ot,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:t.onClick,isActive:t.isActive,tooltip:t.label,children:[o.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:t.icon}),o.jsx("span",{className:"truncate",children:t.label})]})},t.key)}At.Skeleton=function(){return o.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>o.jsx("div",{className:"w-full h-8",children:o.jsx(Mt,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function Wn(){const t=g.c(3),e=Un();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(o.Fragment,{children:o.jsx(qe,{children:o.jsx(S.Suspense,{fallback:null,children:o.jsx(Bn,{})})})}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=o.jsx(At,{navigationItems:e,additionalContent:s}),t[1]=e,t[2]=a):a=t[2],a}function Vn(t){const e=g.c(12);let s,a,n,l;e[0]!==t?({className:s,orientation:n,decorative:l,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l):(s=e[1],a=e[2],n=e[3],l=e[4]);const i=n===void 0?"horizontal":n,r=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]!==r||e[8]!==i||e[9]!==a||e[10]!==c?(d=o.jsx(Xt,{"data-slot":"separator-root",decorative:r,orientation:i,className:c,...a}),e[7]=r,e[8]=i,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}const Pt=S.createContext(null);function Fn(){const t=S.useContext(Pt);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function Kn(t){const e=g.c(10),{children:s,onItemHover:a}=t,[n,l]=S.useState(null);let i;e[0]!==a?(i=f=>{l(f),a?.(f)},e[0]=a,e[1]=i):i=e[1];const r=i;let c;e[2]!==n||e[3]!==r?(c={hoveredItem:n,setHoveredItem:r},e[2]=n,e[3]=r,e[4]=c):c=e[4];let d;e[5]!==s?(d=o.jsx(ct,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=o.jsx(Pt.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function Yn(t){const e=g.c(6),{children:s,onClick:a}=t;let n;e[0]!==s||e[1]!==a?(n=o.jsx(Z,{variant:"link",className:"p-0.5 h-auto",onClick:a,type:"button",children:s}),e[0]=s,e[1]=a,e[2]=n):n=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(dt,{asChild:!0,children:o.jsx(Z,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:o.jsx(jt,{size:16,className:"opacity-50"})})}),e[3]=l):l=e[3];let i;return e[4]!==n?(i=o.jsxs("div",{className:"flex items-center gap-1",children:[n,l]}),e[4]=n,e[5]=i):i=e[5],i}function Zn(t){const e=g.c(8),{item:s,fallback:a}=t,n=a===void 0?"":a,l=s?.avatarUrl??"",i=s?.name??n;let r;e[0]!==l||e[1]!==i?(r=o.jsx(ve,{url:l,fallback:i,size:"xs",objectFit:"contain"}),e[0]=l,e[1]=i,e[2]=r):r=e[2];const c=s?.name??n;let d;e[3]!==c?(d=o.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==r||e[6]!==d?(m=o.jsxs("div",{className:"flex items-center gap-2",children:[r,d]}),e[5]=r,e[6]=d,e[7]=m):m=e[7],m}function qn(t){const e=g.c(6),{children:s,align:a}=t,n=a===void 0?"start":a,i=S.Children.toArray(s).filter(Qn).length===1?"280px":"480px";let r;e[0]!==i?(r={width:i},e[0]=i,e[1]=r):r=e[1];let c;return e[2]!==n||e[3]!==s||e[4]!==r?(c=o.jsx(mt,{align:n,className:"p-0 flex items-start",style:r,children:s}),e[2]=n,e[3]=s,e[4]=r,e[5]=c):c=e[5],c}function Qn(t){return S.isValidElement(t)&&(t.type===Et||t.type===Rt)}function Rt(t){const e=g.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=I("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",a),e[0]=a,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}const Et=Rt;function Xn(t){const e=g.c(6),{placeholder:s,value:a,onChange:n}=t,l=s===void 0?"Search...":s;let i;e[0]!==n?(i=c=>n(c.target.value),e[0]=n,e[1]=i):i=e[1];let r;return e[2]!==l||e[3]!==i||e[4]!==a?(r=o.jsx(Gs,{placeholder:l,value:a,onChange:i,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=l,e[3]=i,e[4]=a,e[5]=r):r=e[5],r}function Jn(t){const e=g.c(6),{children:s,emptyMessage:a}=t,n=a===void 0?"No items found.":a,l=S.Children.count(s)>0;let i;e[0]!==n||e[1]!==l?(i=!l&&o.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:n}),e[0]=n,e[1]=l,e[2]=i):i=e[2];let r;return e[3]!==s||e[4]!==i?(r=o.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,s]}),e[3]=s,e[4]=i,e[5]=r):r=e[5],r}function ea(t){const e=g.c(15),{item:s,onClick:a,onHover:n,children:l}=t,i=Fn();let r;e[0]!==i||e[1]!==s||e[2]!==n?(r=()=>{i.setHoveredItem(s.slug),n?.(s)},e[0]=i,e[1]=s,e[2]=n,e[3]=r):r=e[3];const c=r;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||o.jsxs(o.Fragment,{children:[o.jsx(ve,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),o.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=o.jsx(Z,{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 ta(t){const e=g.c(2),{children:s}=t;let a;return e[0]!==s?(a=o.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=a):a=e[1],a}function sa(t){const e=g.c(11),{onClick:s,icon:a,children:n,variant:l}=t,r=(l===void 0?"default":l)==="muted"&&"text-muted-foreground";let c;e[0]!==r?(c=I("w-full justify-start font-normal",r),e[0]=r,e[1]=c):c=e[1];let d;e[2]!==a?(d=a&&o.jsx("span",{className:"[&>svg]:size-4",children:a}),e[2]=a,e[3]=d):d=e[3];let m;e[4]!==n?(m=o.jsx("span",{children:n}),e[4]=n,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=o.jsxs(Z,{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 na(){const t=g.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Vn,{}),t[0]=e):e=t[0],e}function aa(){const t=g.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const H=Object.assign(Kn,{Trigger:Yn,CurrentItem:Zn,Content:qn,Panel:Et,Search:Xn,Items:Jn,Item:ea,Actions:ta,Action:sa,Separator:na,Skeleton:aa});function Ze(){const t=g.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=ot(e),{data:a}=je.useListOrganizations(),n=Pe();let l;t[1]!==s||t[2]!==a?(l=a?.find(Y=>Y.slug===s),t[1]=s,t[2]=a,t[3]=l):l=t[3];const i=l,[r,c]=S.useState(""),[d,m]=S.useState(!1);let f,u,p,h,v,x,b,j;if(t[4]!==i||t[5]!==n||t[6]!==s||t[7]!==r||t[8]!==a){const R=(a?(()=>{const L=a.filter(G=>G.name.toLowerCase().includes(r.toLowerCase()));if(s){const G=L.findIndex(O=>O.slug===s);if(G>0){const O=L[G];O&&(L.splice(G,1),L.unshift(O))}}return L})():[]).map(oa);let V;t[17]!==i?(V=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=V):V=t[18];const A=V;h=H;let W;t[19]!==n||t[20]!==s?(W=()=>n({to:"/$org",params:{org:s??""}}),t[19]=n,t[20]=s,t[21]=W):W=t[21];let B;t[22]!==A?(B=o.jsx(H.CurrentItem,{item:A}),t[22]=A,t[23]=B):B=t[23],t[24]!==W||t[25]!==B?(j=o.jsx(H.Trigger,{onClick:W,children:B}),t[24]=W,t[25]=B,t[26]=j):j=t[26],p=H.Content,u=H.Panel,t[27]!==r?(b=o.jsx(H.Search,{placeholder:"Search organizations...",value:r,onChange:c}),t[27]=r,t[28]=b):b=t[28],f=H.Items,v="No organizations found.";let F;t[29]!==n?(F=L=>o.jsx(H.Item,{item:L,onClick:G=>n({to:"/$org",params:{org:G.slug}})},L.slug),t[29]=n,t[30]=F):F=t[30],x=R.map(F),t[4]=i,t[5]=n,t[6]=s,t[7]=r,t[8]=a,t[9]=f,t[10]=u,t[11]=p,t[12]=h,t[13]=v,t[14]=x,t[15]=b,t[16]=j}else f=t[9],u=t[10],p=t[11],h=t[12],v=t[13],x=t[14],b=t[15],j=t[16];let w;t[31]!==f||t[32]!==v||t[33]!==x?(w=o.jsx(f,{emptyMessage:v,children:x}),t[31]=f,t[32]=v,t[33]=x,t[34]=w):w=t[34];let C,N;t[35]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(H.Actions,{children:o.jsx(H.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),N=o.jsx(H.Separator,{}),t[35]=C,t[36]=N):(C=t[35],N=t[36]);let y;t[37]!==n?(y=()=>n({to:"/"}),t[37]=n,t[38]=y):y=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(Ws,{}),t[39]=_):_=t[39];let D;t[40]!==y?(D=o.jsx(H.Actions,{children:o.jsx(H.Action,{onClick:y,icon:_,children:"See all organizations"})}),t[40]=y,t[41]=D):D=t[41];let k;t[42]!==u||t[43]!==D||t[44]!==b||t[45]!==w?(k=o.jsxs(u,{children:[b,w,C,N,D]}),t[42]=u,t[43]=D,t[44]=b,t[45]=w,t[46]=k):k=t[46];let M;t[47]!==p||t[48]!==k?(M=o.jsx(p,{children:k}),t[47]=p,t[48]=k,t[49]=M):M=t[49];let $;t[50]!==h||t[51]!==M||t[52]!==j?($=o.jsxs(h,{children:[j,M]}),t[50]=h,t[51]=M,t[52]=j,t[53]=$):$=t[53];let P;t[54]!==d?(P=o.jsx(Us,{open:d,onOpenChange:m}),t[54]=d,t[55]=P):P=t[55];let z;return t[56]!==$||t[57]!==P?(z=o.jsxs(o.Fragment,{children:[$,P]}),t[56]=$,t[57]=P,t[58]=z):z=t[58],z}function oa(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}Ze.Skeleton=H.Skeleton;const Lt=S.createContext({setOpen:()=>{}}),la=()=>S.useContext(Lt),ia=t=>{const e=g.c(25);let s,a,n,l,i;e[0]!==t?({children:s,defaultOpen:a,open:l,onOpenChange:n,...i}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l,e[5]=i):(s=e[1],a=e[2],n=e[3],l=e[4],i=e[5]);const r=a??!1;let c;e[6]!==n||e[7]!==l||e[8]!==r?(c={prop:l,defaultProp:r,onChange:n},e[6]=n,e[7]=l,e[8]=r,e[9]=c):c=e[9];const[d,m]=zs(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(u=o.jsx(Os,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==u?(p=o.jsx(Ks,{open:d,onOpenChange:m,...i,children:u}),e[17]=d,e[18]=i,e[19]=m,e[20]=u,e[21]=p):p=e[21];let h;return e[22]!==f||e[23]!==p?(h=o.jsx(Lt.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=h):h=e[24],h},ra=t=>{const{children:e,title:s,...a}=t,n=ye(),{className:l,...i}=a;return n?o.jsxs($s,{...i,children:[o.jsx(Ts,{className:"hidden",children:o.jsx(Ms,{children:s})}),o.jsx("div",{className:I("flex flex-col gap-2 p-2 py-4",l),children:e})]}):o.jsx(Fs,{...a,children:e})},ca=t=>{const{children:e,...s}=t,{setOpen:a}=la(),n=ye(),{className:l,...i}=s;return n?o.jsx("div",{...i,onClick:r=>{a(!1);const{onClick:c}=i;c?.(r)},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-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",l),children:e}):o.jsx(Ys,{...s,children:e})},da=t=>{const e=g.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 n=ye();let l;return e[3]!==s||e[4]!==n||e[5]!==a?(l=n?o.jsx(Is,{asChild:!0,children:s}):o.jsx(Vs,{...a,children:s}),e[3]=s,e[4]=n,e[5]=a,e[6]=l):l=e[6],l},ma=t=>{const e=g.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 n=ye();let l;return e[3]!==s||e[4]!==n||e[5]!==a?(l=n?o.jsx(tt,{className:I(s),...a}):o.jsx(tt,{className:I(s),...a}),e[3]=s,e[4]=n,e[5]=a,e[6]=l):l=e[6],l};function fa(t){const e=g.c(11),{user:s,trigger:a,align:n,children:l}=t,i=n===void 0?"start":n;let r;e[0]!==a||e[1]!==s?(r=a(s),e[0]=a,e[1]=s,e[2]=r):r=e[2];let c;e[3]!==r?(c=o.jsx(da,{asChild:!0,children:o.jsx("div",{children:r})}),e[3]=r,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==l?(d=o.jsx(ra,{side:"top",align:i,className:"md:w-[240px]",children:l}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=o.jsxs(ia,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function ua(t){const e=g.c(8),{children:s,onClick:a,className:n,asChild:l}=t;let i;e[0]!==l||e[1]!==s||e[2]!==a?(i=l?s:o.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]=i):i=e[3];let r;return e[4]!==l||e[5]!==n||e[6]!==i?(r=o.jsx(ca,{asChild:l,className:n,children:i}),e[4]=l,e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function ha(t){const e=g.c(2),{className:s}=t;let a;return e[0]!==s?(a=o.jsx(ma,{className:s}),e[0]=s,e[1]=a):a=e[1],a}function pa(){const t=g.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const K=Object.assign(fa,{Item:ua,Separator:ha,Skeleton:pa});function xa(t){const e=g.c(32),{open:s,onOpenChange:a,user:n,userImage:l}=t,[i,r]=S.useState(!1);let c;e[0]!==n.id?(c=()=>{navigator.clipboard.writeText(n.id),r(!0),setTimeout(()=>r(!1),2e3)},e[0]=n.id,e[1]=c):c=e[1];const d=c;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsxs(ut,{children:[o.jsx(ht,{children:"Profile"}),o.jsx(pt,{children:"Your account information"})]}),e[2]=m):m=e[2];const f=n.name||n.email||"U";let u;e[3]!==f||e[4]!==l?(u=o.jsx(ve,{url:l,fallback:f,shape:"circle",size:"2xl"}),e[3]=f,e[4]=l,e[5]=u):u=e[5];const p=n.name||n.email;let h;e[6]!==p?(h=o.jsx("div",{className:"text-lg font-semibold text-center",children:p}),e[6]=p,e[7]=h):h=e[7];let v;e[8]!==n.email?(v=o.jsx("div",{className:"text-sm text-muted-foreground text-center",children:n.email}),e[8]=n.email,e[9]=v):v=e[9];let x;e[10]!==h||e[11]!==v?(x=o.jsxs("div",{className:"flex flex-col items-center gap-2 w-full",children:[h,v]}),e[10]=h,e[11]=v,e[12]=x):x=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"User ID"}),e[13]=b):b=e[13];let j;e[14]!==n.id?(j=o.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[b,o.jsx("span",{className:"text-sm font-mono truncate",children:n.id})]}),e[14]=n.id,e[15]=j):j=e[15];let w;e[16]!==i?(w=i?o.jsx(xs,{size:16,className:"text-green-600"}):o.jsx(Zs,{size:16,className:"text-muted-foreground"}),e[16]=i,e[17]=w):w=e[17];let C;e[18]!==d||e[19]!==w?(C=o.jsx("button",{type:"button",onClick:d,className:"flex-shrink-0 p-2 hover:bg-background rounded-md transition-colors","aria-label":"Copy user ID",children:w}),e[18]=d,e[19]=w,e[20]=C):C=e[20];let N;e[21]!==j||e[22]!==C?(N=o.jsxs("div",{className:"flex items-center justify-between gap-3 w-full px-4 py-3 rounded-lg bg-muted/50 border border-border",children:[j,C]}),e[21]=j,e[22]=C,e[23]=N):N=e[23];let y;e[24]!==N||e[25]!==u||e[26]!==x?(y=o.jsxs(xt,{className:"sm:max-w-md",children:[m,o.jsxs("div",{className:"flex flex-col items-center gap-6 py-4",children:[u,x,N]})]}),e[24]=N,e[25]=u,e[26]=x,e[27]=y):y=e[27];let _;return e[28]!==a||e[29]!==s||e[30]!==y?(_=o.jsx(gt,{open:s,onOpenChange:a,children:y}),e[28]=a,e[29]=s,e[30]=y,e[31]=_):_=e[31],_}function ga(t){const e=g.c(5),{open:s,onOpenChange:a}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsxs(ut,{children:[o.jsx(ht,{children:"Invitations"}),o.jsx(pt,{children:"Your pending organization invitations"})]}),e[0]=n):n=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsxs(xt,{className:"sm:max-w-lg",children:[n,o.jsx("div",{className:"max-h-[420px] overflow-auto pr-1",children:o.jsx(ts,{})})]}),e[1]=l):l=e[1];let i;return e[2]!==a||e[3]!==s?(i=o.jsx(gt,{open:s,onOpenChange:a,children:l}),e[2]=a,e[3]=s,e[4]=i):i=e[4],i}function ba(t){const e=g.c(31),{user:s,userImage:a,hasInvites:n,showInvitesItem:l}=t,[i,r]=S.useState(!1),[c,d]=S.useState(!1);let m;e[0]!==n||e[1]!==s.email||e[2]!==s.name||e[3]!==a?(m=()=>o.jsxs("div",{className:"relative",children:[o.jsx(ve,{url:a,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all"}),n&&o.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2.5 w-2.5 rounded-full bg-destructive ring-2 ring-background"})]}),e[0]=n,e[1]=s.email,e[2]=s.name,e[3]=a,e[4]=m):m=e[4];let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsxs(K.Item,{onClick:()=>r(!0),children:[o.jsx(kt,{className:"text-muted-foreground",size:18}),"Profile"]}),e[5]=f):f=e[5];let u;e[6]!==n||e[7]!==l?(u=l&&o.jsxs(K.Item,{onClick:()=>d(!0),children:[o.jsx(Nt,{className:"text-muted-foreground",size:18}),"Invitations",n&&o.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]}),e[6]=n,e[7]=l,e[8]=u):u=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(K.Separator,{}),e[9]=p):p=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(es,{className:"w-4 h-4 text-muted-foreground"}),e[10]=h):h=e[10];let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(K.Item,{asChild:!0,children:o.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:[h,"decocms/admin",o.jsx(st,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[11]=v):v=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(wt,{className:"text-muted-foreground",size:18}),e[12]=x):x=e[12];let b,j;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(K.Item,{asChild:!0,children:o.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[x,"Homepage",o.jsx(st,{size:18,className:"ml-auto text-muted-foreground"})]})}),j=o.jsx(K.Separator,{}),e[13]=b,e[14]=j):(b=e[13],j=e[14]);let w;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsxs(K.Item,{onClick:va,children:[o.jsx(Ct,{size:18,className:"text-muted-foreground"}),"Log out"]}),e[15]=w):w=e[15];let C;e[16]!==m||e[17]!==u||e[18]!==s?(C=o.jsxs(K,{user:s,trigger:m,align:"end",children:[f,u,p,v,b,j,w]}),e[16]=m,e[17]=u,e[18]=s,e[19]=C):C=e[19];let N;e[20]!==i||e[21]!==s||e[22]!==a?(N=i&&o.jsx(xa,{open:i,onOpenChange:r,user:s,userImage:a}),e[20]=i,e[21]=s,e[22]=a,e[23]=N):N=e[23];let y;e[24]!==c||e[25]!==l?(y=l&&c&&o.jsx(ga,{open:c,onOpenChange:d}),e[24]=c,e[25]=l,e[26]=y):y=e[26];let _;return e[27]!==C||e[28]!==N||e[29]!==y?(_=o.jsxs(o.Fragment,{children:[C,N,y]}),e[27]=C,e[28]=N,e[29]=y,e[30]=_):_=e[30],_}function va(){return je.signOut()}function ja(){const{data:t}=je.useSession(),e=S.useContext(Jt),{data:s}=e.hooks.useListUserInvitations(),n=(s??[]).length>0;if(!t?.user)return o.jsx(ve,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer",muted:!0});const l=t.user,i={...l,name:l.name??void 0},r=l.image;return o.jsx(ba,{user:i,userImage:r,hasInvites:n,showInvitesItem:!0})}function wa(t){const e=g.c(6),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(ss,{children:o.jsx(lt,{})}),e[0]=a):a=e[0];let n;e[1]!==s?(n=o.jsx(ns,{children:s}),e[1]=s,e[2]=n):n=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(as,{children:o.jsx(os,{to:"/login",replace:!0})}),e[3]=l):l=e[3];let i;return e[4]!==n?(i=o.jsxs(o.Fragment,{children:[a,n,l]}),e[4]=n,e[5]=i):i=e[5],i}function Sa(t){const e=g.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=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]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function ya(t){const e=g.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=I("flex items-center justify-center px-2 h-full border-r border-border",a),e[0]=a,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function Ca(t){const e=g.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=I("flex items-center gap-2 px-2 h-full",a),e[0]=a,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function Na(t){const e=g.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=I("flex items-center gap-2 px-2 h-full flex-1",a),e[0]=a,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function _a(t){const e=g.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=I("flex items-center gap-2 px-2 h-full ml-auto",a),e[0]=a,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function ka(){const t=g.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:o.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=o.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:o.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=o.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,o.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:o.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=a):a=t[2],a}const De=Object.assign(Sa,{Sidebar:ya,Left:Ca,Center:Na,Right:_a,Skeleton:ka});function Ht(){const t=g.c(3),{toggleSidebar:e}=Xe();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(yt,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:20}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=o.jsx(o.Fragment,{children:o.jsx(Z,{onClick:e,size:"icon",variant:"ghost",className:"w-8 h-8 rounded-md",children:s})}),t[1]=e,t[2]=a):a=t[2],a}Ht.Skeleton=function(){return o.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})};const Ia="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function at(t){const e=g.c(18),{showSidebarToggle:s,showOrgSwitcher:a,showDecoChat:n}=t,l=s===void 0?!1:s,i=a===void 0?!1:a,r=n===void 0?!1:n,[,c]=Qe();let d;e[0]!==c?(d=()=>c($a),e[0]=c,e[1]=d):d=e[1];const m=d;let f;e[2]!==l?(f=l&&o.jsx(De.Sidebar,{children:o.jsx(Ht,{})}),e[2]=l,e[3]=f):f=e[3];let u;e[4]!==i?(u=i&&o.jsx(S.Suspense,{fallback:o.jsx(Ze.Skeleton,{}),children:o.jsx(Ze,{})}),e[4]=i,e[5]=u):u=e[5];let p;e[6]!==u?(p=o.jsx(De.Left,{children:u}),e[6]=u,e[7]=p):p=e[7];let h;e[8]!==r||e[9]!==m?(h=r&&o.jsxs(Z,{size:"sm",variant:"default",onClick:m,children:[o.jsx(ve,{url:Ia,fallback:"DC",size:"2xs",className:"rounded-sm"}),"deco chat"]}),e[8]=r,e[9]=m,e[10]=h):h=e[10];let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(ja,{}),e[11]=v):v=e[11];let x;e[12]!==h?(x=o.jsxs(De.Right,{className:"gap-2",children:[h,v]}),e[12]=h,e[13]=x):x=e[13];let b;return e[14]!==x||e[15]!==f||e[16]!==p?(b=o.jsxs(De,{children:[f,p,x]}),e[14]=x,e[15]=f,e[16]=p,e[17]=b):b=e[17],b}function $a(t){return!t}function Ta(t){const e=g.c(10),{children:s,className:a}=t,[,n]=S.useTransition();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=we.decoChatPanelWidth(),e[0]=l):l=e[0];const[i,r]=be(l,30);let c;e[1]!==r?(c=u=>n(()=>r(u)),e[1]=r,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]!==i||e[6]!==s||e[7]!==d||e[8]!==m?(f=o.jsx(rt,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function Ma(t){const e=g.c(5),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=we.sidebarOpen(),e[0]=a):a=e[0];const[n,l]=be(a,!0);let i;return e[1]!==s||e[2]!==l||e[3]!==n?(i=o.jsx(_n,{open:n,onOpenChange:l,children:s}),e[1]=s,e[2]=l,e[3]=n,e[4]=i):i=e[4],i}function za(){const t=g.c(9),[e]=Qe();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(rt,{className:"bg-background",children:o.jsx(it,{})}),t[0]=s):s=t[0];let a;t[1]!==e?(a=o.jsx(Ds,{withHandle:e}),t[1]=e,t[2]=a):a=t[2];const n=e?"max-w-none":"max-w-0";let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(qe,{children:o.jsx(S.Suspense,{fallback:o.jsx(As,{}),children:o.jsx(cn,{})})}),t[3]=l):l=t[3];let i;t[4]!==n?(i=o.jsx(Ta,{className:n,children:l}),t[4]=n,t[5]=i):i=t[5];let r;return t[6]!==a||t[7]!==i?(r=o.jsxs(Ps,{direction:"horizontal",children:[s,a,i]}),t[6]=a,t[7]=i,t[8]=r):r=t[8],r}function Oa(){const t=g.c(19);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=ot(e);let a;t[1]!==s?(a=is.activeOrganization(s),t[1]=s,t[2]=a):a=t[2];let n;t[3]!==s?(n=async()=>{if(!s)return null;const{data:p}=await je.organization.setActive({organizationSlug:s});return{org:p,project:{slug:bs}}},t[3]=s,t[4]=n):n=t[4];let l;t[5]!==a||t[6]!==n?(l={queryKey:a,queryFn:n,gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1},t[5]=a,t[6]=n,t[7]=l):l=t[7];const{data:i}=ls(l);if(!i){let p;t[8]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(at,{}),t[8]=p):p=t[8];let h;return t[9]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs("div",{className:"min-h-screen bg-background",children:[p,o.jsx("div",{className:"pt-12",children:o.jsx(it,{})})]}),t[9]=h):h=t[9],h}let r;t[10]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(at,{showSidebarToggle:!0,showOrgSwitcher:!0,showDecoChat:!0}),t[10]=r):r=t[10];let c;t[11]===Symbol.for("react.memo_cache_sentinel")?(c={"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},t[11]=c):c=t[11];let d;t[12]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Wn,{}),t[12]=d):d=t[12];let m;t[13]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(Ma,{children:o.jsxs("div",{className:"flex flex-col h-screen",children:[r,o.jsxs($n,{className:"flex-1 bg-sidebar",style:c,children:[d,o.jsx(Mn,{className:"pt-12",children:o.jsx(za,{})})]})]})}),t[13]=m):m=t[13];let f;t[14]!==i.org.slug?(f=o.jsx(Xs,{children:m},i.org.slug),t[14]=i.org.slug,t[15]=f):f=t[15];let u;return t[16]!==i||t[17]!==f?(u=o.jsx(gs,{...i,children:f}),t[16]=i,t[17]=f,t[18]=u):u=t[18],u}function wo(){const t=g.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(wa,{children:o.jsx(S.Suspense,{fallback:o.jsx(lt,{}),children:o.jsx(Oa,{})})}),t[0]=e):e=t[0],e}export{wo as default};
@@ -1 +0,0 @@
1
- import{ap as U,aq as _,ar as H,as as q,at as G,au as Y,r as M,c as T,j as s,f as Z,K as J,a as X,e as ee,q as te}from"./index-sCOTvdLe.js";import{i as se,g as ie,a as le}from"./well-known-mcp-DHBmBE29.js";import{C as ne}from"./collection-header-cwEX65MF.js";import{I as re,b as oe,c as ae,a as V,u as ce}from"./use-connection-m7Quih5m.js";import{b as de,T as me,c as fe,u as D}from"./tooltip-DfU80GZU.js";import{s as ue}from"./slugify-CEUa2lfQ.js";import{n as he}from"./Inbox01-BX5sFqBU.js";import{i as z}from"./Loading01-BC0x96Z5.js";import{i as xe,E as pe}from"./SearchMd-8Mty8uAj.js";import{C as ge}from"./collection-search-Dv3t9yjC.js";import{C as ve}from"./card-BpQhyjdr.js";import{g as je,f as Ne,a as ye}from"./registry-utils-ulDDT0d8.js";import{e as Ce}from"./app-name-gTETL9So.js";import{d as we,a as be,b as Se,c as Pe,S as Re}from"./select-BhGYpRS-.js";import{s as W}from"./Plus-EukPTBel.js";import{C as Ie}from"./connection-card-xiDlSmx0.js";import{B as ke}from"./button-g1YyJeHt.js";import{a as Ee}from"./use-binding-B2VzUGHI.js";import{L as Le,u as Te}from"./localstorage-keys-B4xlIfie.js";import"./collection-display-button-YN1Du2b2.js";import"./dropdown-menu-BNCgQxqV.js";import"./utils-DNHmpmu2.js";import"./view-mode-toggle-DfXtYF8W.js";import"./input-xue80KYR.js";import"./ChevronDown-C6uzZBp6.js";import"./auth-BYeLjxhg.js";import"./useQuery-bRRwOSrM.js";var $e=class extends U{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){super.setOptions({...t,behavior:_()})}getOptimisticResult(t){return t.behavior=_(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){const{state:l}=t,m=super.createResult(t,e),{isFetching:r,isRefetching:h,isError:d,isRefetchError:a}=m,c=l.fetchMeta?.fetchMore?.direction,i=d&&c==="forward",n=r&&c==="forward",o=d&&c==="backward",f=r&&c==="backward";return{...m,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:q(e,l.data),hasPreviousPage:H(e,l.data),isFetchNextPageError:i,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:f,isRefetchError:a&&!i&&!o,isRefetching:h&&!n&&!f}}};function Me(t,e){return G({...t,enabled:!0,suspense:!0,throwOnError:Y},$e,e)}const Q=({size:t=24,color:e="currentColor",...l})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},M.createElement("path",{d:"m9 12 2 2 4.5-4.5m2.401-4.501a2.03 2.03 0 0 0 1.1 1.1l1.744.723a2.033 2.033 0 0 1 1.1 2.656l-.722 1.744a2.03 2.03 0 0 0 0 1.556l.722 1.744a2.033 2.033 0 0 1-1.1 2.656L19 17.901A2.033 2.033 0 0 0 17.9 19l-.723 1.745a2.032 2.032 0 0 1-2.656 1.1l-1.744-.722a2.032 2.032 0 0 0-1.555 0l-1.745.723a2.033 2.033 0 0 1-2.654-1.1L6.1 19.001A2.033 2.033 0 0 0 5 17.9l-1.744-.723a2.033 2.033 0 0 1-1.1-2.654l.721-1.744a2.033 2.033 0 0 0 0-1.556l-.722-1.746a2.033 2.033 0 0 1 1.1-2.657L5 6.098A2.03 2.03 0 0 0 6.1 5l.723-1.745a2.033 2.033 0 0 1 2.656-1.1l1.744.722a2.033 2.033 0 0 0 1.555-.001l1.746-.72a2.032 2.032 0 0 1 2.655 1.1l.723 1.746v-.003Z"}));Q.displayName="CheckVerified02";function Ae(t){const e=t.title||t.server.title||t.id||"Unnamed Item",l=t.server.description||null,m=t.server.icons?.[0]?.src||je(t.server.repository)||null,r=t._meta?.["mcp.mesh"]?.verified??!1,h=t.server.version,a=(t.server.remotes?.length??0)>0;let c=e,i=null;if(e.includes("/")){const n=e.split("/");n.length>=2&&(i=n[0]||null,c=Ce(e))}if(!i){const n=t._meta?.["mcp.mesh"]?.scopeName,o=t._meta?.["mcp.mesh"]?.appName;n&&o?i=`${n}/${o}`:n&&(i=n)}return{icon:m,scopeName:i,displayName:c,description:l,version:h||null,isVerified:r,canInstall:a}}function Ke(t){const e=T.c(39),{icon:l,scopeName:m,displayName:r,description:h,isVerified:d,canInstall:a,onClick:c}=t;let i;e[0]!==r||e[1]!==l?(i=s.jsx(re,{icon:l,name:r,size:"md",className:"shadow-sm"}),e[0]=r,e[1]=l,e[2]=i):i=e[2];let n;e[3]!==r?(n=s.jsx("span",{className:"truncate",children:r}),e[3]=r,e[4]=n):n=e[4];let o;e[5]!==d?(o=d&&s.jsx(Q,{size:16,className:"text-success shrink-0"}),e[5]=d,e[6]=o):o=e[6];let f;e[7]!==a?(f=!a&&s.jsx(se,{size:16,className:"text-muted-foreground shrink-0"}),e[7]=a,e[8]=f):f=e[8];let p;e[9]!==n||e[10]!==o||e[11]!==f?(p=s.jsx(de,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2 text-base font-medium min-w-0",children:[n,o,f]})}),e[9]=n,e[10]=o,e[11]=f,e[12]=p):p=e[12];let u;e[13]!==r?(u=s.jsx("p",{children:r}),e[13]=r,e[14]=u):u=e[14];let g;e[15]!==a?(g=!a&&s.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[15]=a,e[16]=g):g=e[16];let v;e[17]!==u||e[18]!==g?(v=s.jsxs(me,{children:[u,g]}),e[17]=u,e[18]=g,e[19]=v):v=e[19];let y;e[20]!==p||e[21]!==v?(y=s.jsxs(fe,{children:[p,v]}),e[20]=p,e[21]=v,e[22]=y):y=e[22];let C;e[23]!==m?(C=m&&s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:m}),e[23]=m,e[24]=C):C=e[24];let S;e[25]!==C||e[26]!==y?(S=s.jsx("div",{className:"flex gap-2 items-start min-w-0 flex-1",children:s.jsxs("div",{className:"min-w-0 flex-1",children:[y,C]})}),e[25]=C,e[26]=y,e[27]=S):S=e[27];let w;e[28]!==i||e[29]!==S?(w=s.jsxs("div",{className:"flex gap-3",children:[i,S]}),e[28]=i,e[29]=S,e[30]=w):w=e[30];const P=h||"No description available";let j;e[31]!==P?(j=s.jsx("div",{className:"grid grid-cols-1 gap-1 min-w-0",children:s.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:P})}),e[31]=P,e[32]=j):j=e[32];let x;e[33]!==w||e[34]!==j?(x=s.jsxs("div",{className:"flex flex-col gap-4 h-full relative",children:[w,j]}),e[33]=w,e[34]=j,e[35]=x):x=e[35];let b;return e[36]!==c||e[37]!==x?(b=s.jsx(ve,{className:"p-6 cursor-pointer hover:bg-muted/50 transition-colors",onClick:c,children:x}),e[36]=c,e[37]=x,e[38]=b):b=e[38],b}function B(t){const e=T.c(12),{items:l,title:m,onItemClick:r}=t;if(l.length===0)return null;let h;e[0]!==m?(h=m&&s.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:s.jsx("h2",{className:"text-lg font-medium",children:m})}),e[0]=m,e[1]=h):h=e[1];let d;if(e[2]!==l||e[3]!==r){let i;e[5]!==r?(i=n=>{const o=Ae(n);return s.jsx(Ke,{...o,onClick:()=>r(n)},n.id)},e[5]=r,e[6]=i):i=e[6],d=l.map(i),e[2]=l,e[3]=r,e[4]=d}else d=e[4];let a;e[7]!==d?(a=s.jsx("div",{className:"grid grid-cols-4 gap-4",children:d}),e[7]=d,e[8]=a):a=e[8];let c;return e[9]!==h||e[10]!==a?(c=s.jsxs("div",{className:"flex flex-col gap-4",children:[h,a]}),e[9]=h,e[10]=a,e[11]=c):c=e[11],c}function Oe(t,e){if(!e)return t;const l=e.toLowerCase();return t.filter(m=>(m.name||m.title||"").toLowerCase().includes(l)||(m.description||m.server.description||"").toLowerCase().includes(l))}function Fe(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0||t.server._meta?.["mcp.mesh"]?.verified===!0}function De(t){const e=T.c(32),{items:l,isLoadingMore:m,registryId:r,hasMore:h,onLoadMore:d}=t,a=m===void 0?!1:m,c=h===void 0?!1:h,[i,n]=M.useState(""),o=Z(),{org:f}=D(),p=M.useRef(null);let u,g,v;e[0]!==l||e[1]!==i?(u=Oe(l,i),v=u.filter(Fe),g=u.filter(R=>!v.find(I=>I.id===R.id)),e[0]=l,e[1]=i,e[2]=u,e[3]=g,e[4]=v):(u=e[2],g=e[3],v=e[4]);const y=g;let C;e[5]!==o||e[6]!==f.slug||e[7]!==r?(C=R=>{const I=ue(R.name||R.title||R.server.title||""),L=R.server.name;o({to:"/$org/store/$appName",params:{org:f.slug,appName:I},search:{registryId:r,serverName:L}})},e[5]=o,e[6]=f.slug,e[7]=r,e[8]=C):C=e[8];const S=C;let w;e[9]!==c||e[10]!==a||e[11]!==d||e[12]!==i?(w=R=>{if(!c||!d||i||a)return;const I=R.currentTarget;I.scrollHeight-I.scrollTop-I.clientHeight<200&&d()},e[9]=c,e[10]=a,e[11]=d,e[12]=i,e[13]=w):w=e[13];const P=w;let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=R=>{R.key==="Enter"&&n(R.currentTarget.value)},e[14]=j):j=e[14];let x;e[15]!==i?(x=s.jsx(ge,{value:i,onChange:n,placeholder:"Search for an MCP Server...",onKeyDown:j}),e[15]=i,e[16]=x):x=e[16];let b;e[17]!==y||e[18]!==u||e[19]!==S||e[20]!==c||e[21]!==a||e[22]!==l.length||e[23]!==i||e[24]!==v?(b=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:l.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):i&&u.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(xe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[v.length>0&&s.jsx(B,{items:v,title:"Verified",onItemClick:S}),y.length>0&&s.jsx(B,{items:y,title:v.length>0?"All":"",onItemClick:S}),c&&!i&&a&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(z,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[17]=y,e[18]=u,e[19]=S,e[20]=c,e[21]=a,e[22]=l.length,e[23]=i,e[24]=v,e[25]=b):b=e[25];let k;e[26]!==P||e[27]!==b?(k=s.jsx("div",{ref:p,className:"flex-1 overflow-y-auto",onScroll:P,children:b}),e[26]=P,e[27]=b,e[28]=k):k=e[28];let E;return e[29]!==x||e[30]!==k?(E=s.jsxs("div",{className:"flex flex-col h-full",children:[x,k]}),e[29]=x,e[30]=k,e[31]=E):E=e[31],E}const F=24;function ze(t){const e=T.c(27),{registryId:l}=t,m=oe(l);let r,h,d,a;if(e[0]!==m?.tools||e[1]!==l){if(r=Ne(m?.tools),!r)throw new Error("This registry does not support listing store items.");let x;e[6]!==l?(x=ae(l),e[6]=l,e[7]=x):x=e[7],a=x,d=Me,h=J.toolCall(l,r,JSON.stringify({limit:F})),e[0]=m?.tools,e[1]=l,e[2]=r,e[3]=h,e[4]=d,e[5]=a}else r=e[2],h=e[3],d=e[4],a=e[5];let c;e[8]!==r||e[9]!==a?(c=async x=>{const{pageParam:b}=x;return await a(r,b?{cursor:b,limit:F}:{limit:F})},e[8]=r,e[9]=a,e[10]=c):c=e[10];let i;e[11]!==h||e[12]!==c?(i={queryKey:h,queryFn:c,initialPageParam:void 0,getNextPageParam:_e,staleTime:36e5},e[11]=h,e[12]=c,e[13]=i):i=e[13];const{data:n,fetchNextPage:o,hasNextPage:f,isFetchingNextPage:p}=d(i);let u;e:{if(!n?.pages||n.pages.length===0){u=null;break e}const x=n.pages[0];if(typeof x=="object"&&x!==null&&"totalCount"in x&&typeof x.totalCount=="number"){u=x.totalCount;break e}u=null}const g=u,v=n?.pages;let y;e[14]!==v?(y=ye(v),e[14]=v,e[15]=y):y=e[15];const C=y;let S;e[16]!==o||e[17]!==f||e[18]!==p?(S=()=>{f&&!p&&o()},e[16]=o,e[17]=f,e[18]=p,e[19]=S):S=e[19];const w=S,P=f??!1;let j;return e[20]!==C||e[21]!==w||e[22]!==p||e[23]!==l||e[24]!==P||e[25]!==g?(j=s.jsx(De,{items:C,isLoadingMore:p,registryId:l,hasMore:P,onLoadMore:w,totalCount:g}),e[20]=C,e[21]=w,e[22]=p,e[23]=l,e[24]=P,e[25]=g,e[26]=j):j=e[26],j}function _e(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function Be(t){const e=T.c(15),{registries:l,value:m,onValueChange:r,onAddWellKnown:h,wellKnownRegistries:d,placeholder:a}=t,c=a===void 0?"Select a registry...":a;let i;e[0]!==c?(i=s.jsx(be,{className:"w-[200px] h-8!",children:s.jsx(Se,{placeholder:c})}),e[0]=c,e[1]=i):i=e[1];let n;e[2]!==l?(n=l.map(Ve),e[2]=l,e[3]=n):n=e[3];let o;e[4]!==h||e[5]!==d?(o=d.length>0&&s.jsxs("div",{className:"border-t border-border pt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),d.map(u=>s.jsxs("button",{onClick:g=>{g.preventDefault(),g.stopPropagation(),h(u)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-xl py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[u.icon?s.jsx("img",{src:u.icon,alt:u.title,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:u.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:u.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(W,{size:16})})]},u.id??u.title))]}),e[4]=h,e[5]=d,e[6]=o):o=e[6];let f;e[7]!==n||e[8]!==o?(f=s.jsxs(Pe,{children:[n,o]}),e[7]=n,e[8]=o,e[9]=f):f=e[9];let p;return e[10]!==r||e[11]!==i||e[12]!==f||e[13]!==m?(p=s.jsxs(Re,{value:m,onValueChange:r,children:[i,f]}),e[10]=r,e[11]=i,e[12]=f,e[13]=m,e[14]=p):p=e[14],p}function Ve(t){return s.jsx(we,{className:"cursor-pointer",value:t.id??t.name,children:s.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?s.jsx("img",{src:t.icon,alt:t.name,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:t.name})]})},t.id??t.name)}function We(t){const e=T.c(13),{registries:l,onConnected:m}=t,r=l.length===1;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:423,height:279,className:"max-w-full h-auto"}),e[0]=h):h=e[0];const d=r?"Connect to registry":"Connect to a store",a=r?"Connect to discover and use MCP Servers from the community.":"Choose a registry to discover and connect MCP Servers from the community.",c=`grid gap-4 w-full ${r?"grid-cols-1 justify-items-center":"grid-cols-1 md:grid-cols-2"}`;let i;if(e[1]!==m||e[2]!==l){let f;e[4]!==m?(f=(p,u)=>{const g=p.id??`registry-${u}`;return s.jsx(Qe,{registry:{...p,id:g},onConnected:m},g)},e[4]=m,e[5]=f):f=e[5],i=l.map(f),e[1]=m,e[2]=l,e[3]=i}else i=e[3];let n;e[6]!==c||e[7]!==i?(n=s.jsx("div",{className:c,children:i}),e[6]=c,e[7]=i,e[8]=n):n=e[8];let o;return e[9]!==d||e[10]!==a||e[11]!==n?(o=s.jsx(pe,{image:h,title:d,description:a,descriptionClassName:"max-w-[500px]",actionsClassName:"w-full max-w-2xl",actions:n}),e[9]=d,e[10]=a,e[11]=n,e[12]=o):o=e[12],o}function Qe(t){const e=T.c(15),{registry:l,onConnected:m}=t,r=V(),{org:h}=D(),{data:d}=X.useSession(),a=!!h&&!!d?.user?.id;let c;e[0]!==r.create||e[1]!==a||e[2]!==m||e[3]!==l?(c=async()=>{if(!a)return;const u=await r.create.mutateAsync(l);m?.(u.id)},e[0]=r.create,e[1]=a,e[2]=m,e[3]=l,e[4]=c):c=e[4];const i=c,n=!a||r.create.isPending;let o;e[5]!==r.create.isPending?(o=r.create.isPending?s.jsxs(s.Fragment,{children:[s.jsx(z,{className:"animate-spin"}),"Connecting..."]}):s.jsxs(s.Fragment,{children:[s.jsx(W,{}),"Connect"]}),e[5]=r.create.isPending,e[6]=o):o=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==o?(f=s.jsx(ke,{variant:"outline",className:"w-full",disabled:n,onClick:i,children:o}),e[7]=i,e[8]=n,e[9]=o,e[10]=f):f=e[10];let p;return e[11]!==i||e[12]!==l||e[13]!==f?(p=s.jsx(Ie,{connection:l,onClick:i,footer:f,className:"transition-all hover:border-primary/50 hover:shadow-md"}),e[11]=i,e[12]=l,e[13]=f,e[14]=p):p=e[14],p}function Ct(){const t=T.c(41),{org:e}=D(),l=ce(),m=V(),r=ee(),h=r.location.pathname.includes("/store/")&&r.location.pathname.split("/").length>3,d=Ee(l);let a;t[0]!==d?(a=d.map(qe),t[0]=d,t[1]=a):a=t[1];const c=a;let i;t[2]!==e.slug?(i=Le.selectedRegistry(e.slug),t[2]=e.slug,t[3]=i):i=t[3];const[n,o]=Te(i,He);let f;if(t[4]!==d||t[5]!==n){let N;t[7]!==n?(N=O=>O.id===n,t[7]=n,t[8]=N):N=t[8],f=d.find(N),t[4]=d,t[5]=n,t[6]=f}else f=t[6];const u=f?.id||d[0]?.id||"";let g;t[9]!==e.id?(g=ie(e.id),t[9]=e.id,t[10]=g):g=t[10];let v;t[11]!==g?(v=[g],t[11]=g,t[12]=v):v=t[12];const y=v;let C;t[13]===Symbol.for("react.memo_cache_sentinel")?(C=[le()],t[13]=C):C=t[13];const S=C;let w;t[14]!==m.create||t[15]!==o?(w=async N=>{const O=await m.create.mutateAsync(N);o(O.id)},t[14]=m.create,t[15]=o,t[16]=w):w=t[16];const P=w;let j;t[17]!==d?(j=new Set(d.map(Ue)),t[17]=d,t[18]=j):j=t[18];const x=j;let b;t[19]!==x||t[20]!==y?(b=y.filter(N=>N.id&&!x.has(N.id)),t[19]=x,t[20]=y,t[21]=b):b=t[21];const k=b;let E;t[22]!==x?(E=S.filter(N=>N.id&&!x.has(N.id)),t[22]=x,t[23]=E):E=t[23];const R=E;if(h){let N;return t[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(te,{}),t[24]=N):N=t[24],N}let I;t[25]!==P?(I=async N=>P(N),t[25]=P,t[26]=I):I=t[26];let L;t[27]!==k||t[28]!==u||t[29]!==c||t[30]!==o||t[31]!==I?(L=s.jsx(ne,{title:"Store",ctaButton:s.jsx(Be,{wellKnownRegistries:k,registries:c,value:u,onValueChange:o,onAddWellKnown:I,placeholder:"Select store..."})}),t[27]=k,t[28]=u,t[29]=c,t[30]=o,t[31]=I,t[32]=L):L=t[32];let A;t[33]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(z,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[33]=A):A=t[33];let $;t[34]!==R||t[35]!==u||t[36]!==o?($=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx(M.Suspense,{fallback:A,children:u?s.jsx(ze,{registryId:u}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(We,{registries:R,onConnected:N=>{o(N)}})})})}),t[34]=R,t[35]=u,t[36]=o,t[37]=$):$=t[37];let K;return t[38]!==L||t[39]!==$?(K=s.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[L,$]}),t[38]=L,t[39]=$,t[40]=K):K=t[40],K}function Ue(t){return t.id}function He(){return""}function qe(t){return{id:t.id,name:t.title,icon:t.icon||void 0}}export{Ct as default};
@@ -1 +0,0 @@
1
- import{at as u,ap as s}from"./index-sCOTvdLe.js";function t(e,r){return u(e,s,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{aV as t,Q as a}from"./index-sCOTvdLe.js";function e(...r){return t(a(r))}export{e as c};
@@ -1 +0,0 @@
1
- import{r as n}from"./index-sCOTvdLe.js";const i=({size:e=24,color:o="currentColor",...c})=>n.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:o,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...c},n.createElement("path",{d:"M17 10V8A5 5 0 0 0 7 8v2m5 4.5v2M8.8 21h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 18.72 20 17.88 20 16.2v-1.4c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 10 16.88 10 15.2 10H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 12.28 4 13.12 4 14.8v1.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 21 7.12 21 8.8 21Z"}));i.displayName="Lock01";const t={SELF:"self",REGISTRY:"registry",COMMUNITY_REGISTRY:"community-registry"},r={SELF:e=>`${e}_${t.SELF}`,REGISTRY:e=>`${e}_${t.REGISTRY}`,COMMUNITY_REGISTRY:e=>`${e}_${t.COMMUNITY_REGISTRY}`};function a(e){return{id:r.REGISTRY(e),title:"Deco Store",description:"Official deco MCP registry with curated integrations",connection_type:"HTTP",connection_url:"https://api.decocms.com/mcp/registry",icon:"https://assets.decocache.com/decocms/00ccf6c3-9e13-4517-83b0-75ab84554bb9/596364c63320075ca58483660156b6d9de9b526e.png",app_name:"deco-registry",app_id:null,connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{isDefault:!0,type:"registry"}}}function l(){return{id:t.COMMUNITY_REGISTRY,title:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",connection_type:"HTTP",connection_url:"https://sites-registry.decocache.com/mcp",icon:"https://assets.decocache.com/decocms/cd7ca472-0f72-463a-b0de-6e44bdd0f9b4/mcp.png",app_name:"mcp-registry",app_id:null,connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{isDefault:!0,type:"registry"}}}export{t as W,l as a,a as g,i};