@decocms/mesh 1.0.19 → 1.0.21

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 (108) hide show
  1. package/dist/client/assets/{AlertCircle-aBSXd6aa.js → AlertCircle-CkBPRGL_.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-DdU5giJb.js → ArrowLeft-eDq0PdxL.js} +1 -1
  3. package/dist/client/assets/{Calendar-DuXiXR2a.js → Calendar-GsuMeXnI.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-AknLh-p8.js → ChevronDown-CqrF2uJ-.js} +1 -1
  5. package/dist/client/assets/{Clock-CPJzDIg8.js → Clock-d43uwP0y.js} +1 -1
  6. package/dist/client/assets/{Copy01-sTNxtLGb.js → Copy01-CUqgUCLS.js} +1 -1
  7. package/dist/client/assets/{CpuChip02-CBET7vYo.js → CpuChip02-CwrVudRE.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-D-H9eVyi.js → DotsVertical-CGWni397.js} +1 -1
  9. package/dist/client/assets/{File06-CPdRfDtS.js → File06-CwcvFGqd.js} +1 -1
  10. package/dist/client/assets/{GitBranch01-DtyS0uyA.js → GitBranch01-B0LIL7GO.js} +1 -1
  11. package/dist/client/assets/{Inbox01-yIExAUuo.js → Inbox01-De35FSLT.js} +1 -1
  12. package/dist/client/assets/{InfoCircle-CoaQA7Cj.js → InfoCircle-CaOedrxe.js} +1 -1
  13. package/dist/client/assets/{Key01-BeFhxcJb.js → Key01-BXtnSDND.js} +1 -1
  14. package/dist/client/assets/{LinkExternal01-DFqmYIBB.js → LinkExternal01-ClKXW-wQ.js} +1 -1
  15. package/dist/client/assets/{Loading01-BBk1Ji8d.js → Loading01-DfUJLT5a.js} +1 -1
  16. package/dist/client/assets/{Lock01-B_owaR4J.js → Lock01-mcQuD2fk.js} +1 -1
  17. package/dist/client/assets/{Plus-DVuQJsYB.js → Plus-xQLsl9Xg.js} +1 -1
  18. package/dist/client/assets/{SearchMd-BvUmPv0S.js → SearchMd-BAWY3jJ1.js} +1 -1
  19. package/dist/client/assets/{Terminal-Dauj-6BI.js → Terminal-CJwUlnBn.js} +1 -1
  20. package/dist/client/assets/{Trash01-C_70aI9y.js → Trash01-DAwkJNu8.js} +1 -1
  21. package/dist/client/assets/{Upload01-B9UxI9R2.js → Upload01-5z8SDkNm.js} +1 -1
  22. package/dist/client/assets/{X-aQ5bBp1-.js → X-SWur-HdE.js} +1 -1
  23. package/dist/client/assets/{XClose-CM9DJg2M.js → XClose-CAyc7YMv.js} +1 -1
  24. package/dist/client/assets/{alert-dialog-BPjTE-Bx.js → alert-dialog-dauOR89q.js} +1 -1
  25. package/dist/client/assets/{auth-p1E7za2T.js → auth-Ds7lWA5K.js} +1 -1
  26. package/dist/client/assets/{auth-catchall-BmDJc3ht.js → auth-catchall-L0DhXNi0.js} +1 -1
  27. package/dist/client/assets/{avatar-CKQ5fZxV.js → avatar-CB7RLPFt.js} +1 -1
  28. package/dist/client/assets/{badge-CoAJQK-a.js → badge-DBsMMhww.js} +1 -1
  29. package/dist/client/assets/{button-BZJKEz_E.js → button-UpWqqi7Z.js} +1 -1
  30. package/dist/client/assets/{card-BVLf-CP1.js → card-csaWOT-1.js} +1 -1
  31. package/dist/client/assets/{checkbox-D-4OB0RT.js → checkbox-B53QAVdc.js} +1 -1
  32. package/dist/client/assets/{collection-detail-CMMwsDfE.js → collection-detail-DU4x4vE8.js} +37 -37
  33. package/dist/client/assets/{collection-display-button-BBYMkU7y.js → collection-display-button-CJMwmXuc.js} +1 -1
  34. package/dist/client/assets/{collection-header-B7mQA9l0.js → collection-header-BIZLVBPH.js} +1 -1
  35. package/dist/client/assets/{collection-page-DwiC5WsX.js → collection-page-CpTNB-W7.js} +1 -1
  36. package/dist/client/assets/{collection-search-DVqYXnGc.js → collection-search-xvAQUbQ8.js} +1 -1
  37. package/dist/client/assets/{collection-table-wrapper-Eq4A7toO.js → collection-table-wrapper-BLpgESGM.js} +1 -1
  38. package/dist/client/assets/{connection-card-Qd0gf8pk.js → connection-card-DIVWkbya.js} +1 -1
  39. package/dist/client/assets/{connection-detail-BMCVZ8mI.js → connection-detail-Cdicu8TT.js} +1 -1
  40. package/dist/client/assets/{connections-B4g6c5pN.js → connections-BYIPhseC.js} +1 -1
  41. package/dist/client/assets/{core-Dk3KlTQQ.js → core-Cy6-sfQL.js} +1 -1
  42. package/dist/client/assets/{create-organization-dialog-SPu73xqb.js → create-organization-dialog-BpD_WYLu.js} +1 -1
  43. package/dist/client/assets/{dialog-7UR2hpU4.js → dialog-DQ_m9LgP.js} +1 -1
  44. package/dist/client/assets/{dropdown-menu-B5-Z4RLQ.js → dropdown-menu-B_pozn9G.js} +1 -1
  45. package/dist/client/assets/{env-vars-editor-Cd1b325v.js → env-vars-editor-DcIkv_3p.js} +1 -1
  46. package/dist/client/assets/{error-boundary-NZgBt0kx.js → error-boundary-07xTy_TK.js} +1 -1
  47. package/dist/client/assets/{extract-connection-data-C0cohnD0.js → extract-connection-data-DzWc2H-V.js} +1 -1
  48. package/dist/client/assets/{form-M-gmJwwS.js → form-CGaxh2WC.js} +1 -1
  49. package/dist/client/assets/{formatDistanceToNow-gygpSZnD.js → formatDistanceToNow-BzQ8Uo3Q.js} +1 -1
  50. package/dist/client/assets/{gateway-detail-CmiryUNV.js → gateway-detail-DOKwn-_O.js} +1 -1
  51. package/dist/client/assets/{gateways-CWmvP6Ml.js → gateways-B-RGUqRx.js} +1 -1
  52. package/dist/client/assets/{home-DycBDegi.js → home-FzIxjpJt.js} +1 -1
  53. package/dist/client/assets/{index-DSVuuzx7.js → index-CB7OHJDJ.js} +1 -1
  54. package/dist/client/assets/{index-DCwxWpOb.js → index-Czm7CWjK.js} +1 -1
  55. package/dist/client/assets/index-DNC-5MRZ.css +1 -0
  56. package/dist/client/assets/{index-BdKUt3kP.js → index-D_9U2egr.js} +2 -2
  57. package/dist/client/assets/{index-0t4iQJMq.js → index-D_TAlzS2.js} +13 -13
  58. package/dist/client/assets/{input-D4UDXDKp.js → input-DNanPJKs.js} +1 -1
  59. package/dist/client/assets/json-rZ-8IzF3.js +1 -0
  60. package/dist/client/assets/{json-syntax-highlighter-BUSqZgZm.js → json-syntax-highlighter-BgGlXkoS.js} +2 -2
  61. package/dist/client/assets/{layout-CPKZZ5C4.js → layout-Cx9b8Yer.js} +1 -1
  62. package/dist/client/assets/{lazy-highlighter-BK73Fdw9.js → lazy-highlighter-B6ffJp-C.js} +1 -1
  63. package/dist/client/assets/{localstorage-keys-Cv4N1fxe.js → localstorage-keys-BkdyiQZF.js} +1 -1
  64. package/dist/client/assets/{login-Wj9TYCcD.js → login-C7pFWDVX.js} +1 -1
  65. package/dist/client/assets/mcp-oauth-C_ge4NPz.js +1 -0
  66. package/dist/client/assets/{members-Cu5c-T_O.js → members-g3aHOb_a.js} +1 -1
  67. package/dist/client/assets/{monitoring-DGEbRmqR.js → monitoring-B4Jp1FeK.js} +1 -1
  68. package/dist/client/assets/{oauth-callback-CFog2MKh.js → oauth-callback-DVsq0aWr.js} +1 -1
  69. package/dist/client/assets/{page-AO7blRyq.js → page-lDA0jUjQ.js} +1 -1
  70. package/dist/client/assets/{popover-B29wtK47.js → popover-BN78TD4M.js} +1 -1
  71. package/dist/client/assets/prism-light-B_WmfTLI.js +1 -0
  72. package/dist/client/assets/resizable-CjAFAEbu.js +98 -0
  73. package/dist/client/assets/{resource-tabs-BKx8NMIk.js → resource-tabs-CwnllnxC.js} +1 -1
  74. package/dist/client/assets/{select-X9N3ceFh.js → select-888i9ck2.js} +1 -1
  75. package/dist/client/assets/{settings-DShsUgSK.js → settings-B33ucW8T.js} +1 -1
  76. package/dist/client/assets/shell-layout-D2VG1r1F.js +17 -0
  77. package/dist/client/assets/{spinner-2MCW2Npg.js → spinner-mwkhkfGn.js} +1 -1
  78. package/dist/client/assets/{store-app-detail-CHUr2OX8.js → store-app-detail-MMa90jUl.js} +1 -1
  79. package/dist/client/assets/{store-V5lfintA.js → store-bCSxhgbO.js} +1 -1
  80. package/dist/client/assets/{switch-E6khGxvt.js → switch-CxdnIT30.js} +1 -1
  81. package/dist/client/assets/{tools-list-74BgWpCR.js → tools-list-ReDr32oC.js} +1 -1
  82. package/dist/client/assets/{tooltip-DGJnwA8J.js → tooltip-CaoJSXa7.js} +1 -1
  83. package/dist/client/assets/{types-Dory1ylt.js → types-C7Od-bBc.js} +1 -1
  84. package/dist/client/assets/{use-binding-4rPyk1Up.js → use-binding-q2q9V0d9.js} +1 -1
  85. package/dist/client/assets/{use-connection-CAS-EnWk.js → use-connection-CCY0Xwwp.js} +1 -1
  86. package/dist/client/assets/{use-connection-resources-DQhL2t6i.js → use-connection-resources-CQX8IZC3.js} +1 -1
  87. package/dist/client/assets/{use-gateway-Bz5mevBK.js → use-gateway-6PKj5OoP.js} +1 -1
  88. package/dist/client/assets/{use-list-state-BTzZJhNB.js → use-list-state-C-sROL5p.js} +1 -1
  89. package/dist/client/assets/{use-mcp-BdNK7xZK.js → use-mcp-W5evRIL-.js} +1 -1
  90. package/dist/client/assets/{use-members-BR16XPN5.js → use-members-DBU71Me9.js} +1 -1
  91. package/dist/client/assets/{use-mobile-BXJxBPSi.js → use-mobile-DjZ7nTWx.js} +1 -1
  92. package/dist/client/assets/{use-organization-settings-DhEg0GmX.js → use-organization-settings-Du1vfsWT.js} +1 -1
  93. package/dist/client/assets/{use-tool-call-B9sW_GaR.js → use-tool-call-DTxbLF2G.js} +1 -1
  94. package/dist/client/assets/useQuery-BTda2D25.js +1 -0
  95. package/dist/client/assets/{useSuspenseInfiniteQuery-BpzOu5TP.js → useSuspenseInfiniteQuery-6jf87YQF.js} +1 -1
  96. package/dist/client/assets/{view-mode-toggle-WwhzQMGF.js → view-mode-toggle-BWA1OFcI.js} +1 -1
  97. package/dist/client/index.html +2 -2
  98. package/dist/server/cli.js +119 -119
  99. package/dist/server/migrate.js +81 -81
  100. package/dist/server/server.js +117 -117
  101. package/package.json +1 -1
  102. package/dist/client/assets/index-FEm5nfEy.css +0 -1
  103. package/dist/client/assets/json-ZJ767_7P.js +0 -1
  104. package/dist/client/assets/mcp-oauth-DdVFrouT.js +0 -1
  105. package/dist/client/assets/prism-light-CIytl0p8.js +0 -1
  106. package/dist/client/assets/resizable-mvE7xDjh.js +0 -97
  107. package/dist/client/assets/shell-layout-DfVY6zuO.js +0 -17
  108. package/dist/client/assets/useQuery-BLl_PdQV.js +0 -1
@@ -1,17 +0,0 @@
1
- import{r as w,c as x,j as o,e as nt,d as ce,K as ve,t as ne,f as oe,a as J,g as at,R as ot,T as lt,D as it,C as rt,P as ct,h as dt,O as mt,i as ut,k as ft,l as ht,m as pt,G as xt,U as gt,n as bt,S as je,o as vt,p as jt,N as wt,q as St,s as we}from"./index-BdKUt3kP.js";import{O as Ct,a as yt,g as Nt}from"./well-known-mcp-DX3tGGx0.js";import{g as _t}from"./generate-id-Dyweu44Y.js";import{i as kt,E as It}from"./SearchMd-BvUmPv0S.js";import{u as $t,a as Tt,I as fe,n as Mt}from"./use-connection-CAS-EnWk.js";import{u as Z,L as ee}from"./localstorage-keys-Cv4N1fxe.js";import{u as q,T as Ot,a as zt,b as Dt,c as Rt,L as he,i as At,P as Pt,O as Et}from"./tooltip-DGJnwA8J.js";import{c as $,B as W}from"./button-BZJKEz_E.js";import{i as ie}from"./CpuChip02-CBET7vYo.js";import{i as Lt}from"./Loading01-BBk1Ji8d.js";import{s as Ut}from"./Plus-DVuQJsYB.js";import{i as ae}from"./X-aQ5bBp1-.js";import{u as Ht}from"./use-binding-4rPyk1Up.js";import{u as Bt,a as Gt,b as Wt,c as Vt,d as Ft,C as R,e as Kt,I as Yt,D as Zt,f as qt,g as Qt,h as Xt,i as Jt,j as es,R as Se,k as ts,l as ss,m as ns}from"./resizable-mvE7xDjh.js";import{E as de}from"./error-boundary-NZgBt0kx.js";import{P as Ce,a as ye,b as Ne}from"./popover-B29wtK47.js";import{s as as}from"./Clock-CPJzDIg8.js";import{s as os}from"./Trash01-C_70aI9y.js";import{i as ls}from"./File06-CPdRfDtS.js";import{u as te}from"./use-mobile-BXJxBPSi.js";import{u as _e,a as is}from"./use-organization-settings-DhEg0GmX.js";import{C as rs}from"./create-organization-dialog-SPu73xqb.js";import{I as cs}from"./input-D4UDXDKp.js";import{A as Q}from"./avatar-CKQ5fZxV.js";import{c as ds,D as ms,a as us,b as fs,d as hs,e as pe}from"./dropdown-menu-B5-Z4RLQ.js";import{a as ps}from"./Copy01-sTNxtLGb.js";import{n as xe}from"./LinkExternal01-DFqmYIBB.js";import{D as ke,a as Ie,b as $e,c as Te,d as Me}from"./dialog-7UR2hpU4.js";import"./useQuery-BLl_PdQV.js";import"./auth-p1E7za2T.js";import"./select-X9N3ceFh.js";import"./ChevronDown-AknLh-p8.js";import"./use-gateway-Bz5mevBK.js";import"./AlertCircle-aBSXd6aa.js";import"./Terminal-Dauj-6BI.js";import"./connection-card-Qd0gf8pk.js";import"./card-BVLf-CP1.js";import"./spinner-2MCW2Npg.js";import"./InfoCircle-CoaQA7Cj.js";import"./alert-dialog-BPjTE-Bx.js";import"./form-M-gmJwwS.js";const Oe=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));Oe.displayName="BarChart10";const ze=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));ze.displayName="Building02";const De=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));De.displayName="ChevronSelectorVertical";const Re=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));Re.displayName="Globe01";const Ae=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M9 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"}));Ae.displayName="Home02";const Pe=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Pe.displayName="LayoutRight";const Ee=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"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"}));Ee.displayName="LogOut01";const Le=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m2 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"}));Le.displayName="Mail01";const Ue=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),w.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));Ue.displayName="Settings01";const He=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"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"}));He.displayName="UserCircle";const Be=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"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"}));Be.displayName="Users01";function me(){const t=x.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=ee.decoChatOpen(),t[0]=e):e=t[0];const[s,a]=Z(e,xs);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 xs(t){return!!(t??!1)}function gs(t){const e=x.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=$("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 u;e[7]!==a?(u=a&&o.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:a}),e[7]=a,e[8]=u):u=e[8];let f;return e[9]!==c||e[10]!==d||e[11]!==m||e[12]!==u?(f=o.jsxs("div",{className:c,children:[d,m,u]}),e[9]=c,e[10]=d,e[11]=m,e[12]=u,e[13]=f):f=e[13],f}function bs(){const t=x.c(5),e=nt(),{org:s}=q();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const n=ce(a);let l;return t[1]!==s||t[2]!==n||t[3]!==e?(l=i=>{const c=i.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!c||!c[1])return;const d=c[1],m=n.connectionId;if(!m)return;e.invalidateQueries({queryKey:ve.collection(s.slug,m,d)});const u=d.toLowerCase().replace(/_/g," ");ne.success(`${u} updated`)},t[1]=s,t[2]=n,t[3]=e,t[4]=l):l=t[4],l}const Ge=()=>crypto.randomUUID(),We=w.createContext(null);function vs(t){const e=x.c(15),{children:s}=t,{locator:a}=q(),n=Bt(),[l,i]=Z(ee.threadManagerState(a)+":active-id",js);let r;e[0]!==i||e[1]!==n?(r=h=>{const v=h?.id||crypto.randomUUID(),g=new Date().toISOString(),b={id:v,title:h?.title||"",created_at:h?.created_at||g,updated_at:h?.updated_at||g,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(Ge())},e[3]=l,e[4]=i,e[5]=n,e[6]=d):d=e[6];const m=d;let u;e[7]!==l||e[8]!==c||e[9]!==m||e[10]!==i?(u={activeThreadId:l,createThread:c,setActiveThreadId:i,hideThread:m},e[7]=l,e[8]=c,e[9]=m,e[10]=i,e[11]=u):u=e[11];const f=u;let p;return e[12]!==s||e[13]!==f?(p=o.jsx(We.Provider,{value:f,children:s}),e[12]=s,e[13]=f,e[14]=p):p=e[14],p}function js(t){return t||Ge()}function ws(){const t=w.useContext(We);if(!t)throw new Error("useChat must be used within a ChatProvider");return t}function Ss(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 Cs(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 f of t){const p=new Date(f.updated_at);p>=s?i.push(f):p>=a?r.push(f):p>=n?c.push(f):p>=l?d.push(f):m.push(f)}const u=[];return i.length>0&&u.push({label:"Today",threads:i,showRelativeTime:!0}),r.length>0&&u.push({label:"Yesterday",threads:r,showRelativeTime:!1}),c.length>0&&u.push({label:"7 days ago",threads:c,showRelativeTime:!1}),d.length>0&&u.push({label:"30 days ago",threads:d,showRelativeTime:!1}),m.length>0&&u.push({label:"Older",threads:m,showRelativeTime:!1}),u}function ys(t){const e=x.c(36),{threads:s,activeThreadId:a,onSelectThread:n,onRemoveThread:l,onOpen:i}=t,[r,c]=w.useState("");let d,m,u,f,p,h,v,g,b;if(e[0]!==a||e[1]!==i||e[2]!==l||e[3]!==n||e[4]!==r||e[5]!==s){const C=r.trim()?s.filter(T=>(T.title||"New chat").toLowerCase().includes(r.toLowerCase())):s,N=Cs(C);let _;e[15]!==i?(_=T=>{T?i?.():c("")},e[15]=i,e[16]=_):_=e[16];const z=_;m=Ce,g=z,e[17]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(ye,{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(as,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})}),e[17]=b):b=e[17],d=Ne,p="end",h="w-80 p-0";let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(kt,{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=T=>c(T.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],u="max-h-[300px] overflow-y-auto",f=C.length===0?o.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:r.trim()?"No chats found":"No chats yet"}):N.map((T,O)=>o.jsxs("div",{children:[O>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:T.label})}),T.threads.map(D=>{const V=D.id===a;return o.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 hover:bg-accent cursor-pointer group ${V?"bg-accent/50":""}`,onClick:()=>n(D.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:D.title||"New chat"}),o.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:V?"current":T.showRelativeTime?Ss(D.updated_at):null})]}),o.jsx("button",{type:"button",onClick:X=>{X.stopPropagation(),l(D.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(os,{size:14,className:"text-muted-foreground group-hover/trash:text-destructive"})})]},D.id)})]},T.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]=u,e[9]=f,e[10]=p,e[11]=h,e[12]=v,e[13]=g,e[14]=b}else d=e[6],m=e[7],u=e[8],f=e[9],p=e[10],h=e[11],v=e[12],g=e[13],b=e[14];let j;e[22]!==u||e[23]!==f?(j=o.jsx("div",{className:u,children:f}),e[22]=u,e[23]=f,e[24]=j):j=e[24];let S;e[25]!==d||e[26]!==p||e[27]!==h||e[28]!==v||e[29]!==j?(S=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]=S):S=e[30];let y;return e[31]!==m||e[32]!==g||e[33]!==b||e[34]!==S?(y=o.jsxs(m,{onOpenChange:g,children:[b,S]}),e[31]=m,e[32]=g,e[33]=b,e[34]=S,e[35]=y):y=e[35],y}const Ns="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function _s(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 ks(){const t=x.c(2),e=at();let s;t[0]!==e.location.pathname?(s=_s(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
- `}function Is(){const t=x.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("img",{src:"/empty-state-openrouter.svg",alt:"",width:336,height:320,"aria-hidden":"true",className:"w-xs h-auto mask-radial-[100%_100%] mask-radial-from-20% mask-radial-to-50% mask-radial-at-center"}),t[0]=e):e=t[0],e}function $s(t){const e=x.c(3),{gatewayId:s,onSelect:a}=t,{data:n}=Kt(s);if(n.length===0)return null;let l;return e[0]!==a||e[1]!==n?(l=o.jsx(Yt,{prompts:n,onSelect:a,className:"mt-6"}),e[0]=a,e[1]=n,e[2]=l):l=e[2],l}function Ts(){const{org:{slug:t,id:e},locator:s}=q(),[,a]=me(),n=oe(),{data:l}=J.useSession(),i=l?.user,{createThread:r,activeThreadId:c,setActiveThreadId:d,hideThread:m}=ws(),{threads:u,refetch:f}=Gt(),p=Wt(),h=Vt(),v=$t(),[g]=Ht({connections:v,binding:"LLMS"}),b=!!g,j=p.length>0,S=b&&j,[y,C]=Z(ee.chatSelectedModel(s),I=>I??null),[N,_]=Z(`${s}:selected-gateway`,()=>null),z=h[0],k=y??(z?{id:z.id,connectionId:z.connectionId}:null),M=p[0]?.id,T=N?.gatewayId??M,O=p.find(I=>I.id===T),D=h.find(I=>I.id===k?.id&&I.connectionId===k?.connectionId),V=ks(),X=bs(),P=Ft({threadId:c,systemPrompt:V,onToolCall:X,onCreateThread:I=>r({id:I.id,title:I.title})}),K=async I=>{if(!D){ne.error("No model configured");return}const B={created_at:new Date().toISOString(),thread_id:c,model:{id:D.id,connectionId:D.connectionId,provider:D.provider??void 0},gateway:O?{id:O.id}:void 0,user:{avatar:i?.image??void 0,name:i?.name??"you"}};await P.sendMessage(I,B)},H=I=>{C({id:I.id,connectionId:I.connectionId})},[L,F]=w.useState(!1),E=Tt(),U=async()=>{if(!e||!i?.id){ne.error("Not authenticated");return}F(!0);try{const I=v?.find(st=>st.connection_url===yt);if(I){n({to:"/$org/mcps/$connectionId",params:{org:t,connectionId:I.id}});return}const B=Nt({id:_t("conn")}),tt=await E.create.mutateAsync(B);n({to:"/$org/mcps/$connectionId",params:{org:t,connectionId:tt.id}})}catch(I){ne.error(`Failed to connect OpenRouter: ${I instanceof Error?I.message:String(I)}`)}finally{F(!1)}};if(!S){let I,B;return!b&&!j?(I="Connect your providers",B="Connect an LLM provider and create a gateway to unlock AI-powered features."):b?(I="No gateways configured",B="Create a gateway to expose your MCP tools to the chat."):(I="No model provider connected",B="Connect to a model provider to unlock AI-powered features."),o.jsxs(R,{children:[o.jsxs(R.Header,{children:[o.jsxs(R.Header.Left,{children:[o.jsx("img",{src:Ns,alt:"deco chat",className:"size-5 rounded"}),o.jsx("span",{className:"text-sm font-medium",children:"deco chat"})]}),o.jsx(R.Header.Right,{children:o.jsx("button",{type:"button",onClick:()=>a(!1),className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:o.jsx(ae,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})})]}),o.jsx(R.Main,{className:"flex flex-col items-center",children:o.jsx(R.EmptyState,{children:o.jsx(It,{image:o.jsx(Is,{}),title:I,description:B,actions:o.jsxs(o.Fragment,{children:[o.jsxs(W,{variant:"outline",onClick:U,disabled:L,children:[o.jsx("img",{src:Ct,alt:"OpenRouter",className:"size-4"}),L?"Installing...":"Install OpenRouter"]}),o.jsx(W,{variant:"outline",onClick:()=>n({to:"/$org/mcps",params:{org:t},search:{action:"create"}}),children:"Install MCP Server"})]})})})})]})}const Y=P.messages.filter(I=>I.role!=="system");return o.jsxs(R,{children:[o.jsxs(R.Header,{children:[o.jsxs(R.Header.Left,{children:[o.jsx(fe,{icon:O?.icon,name:O?.title||"deco chat",size:"xs",fallbackIcon:o.jsx(ie,{size:12})}),o.jsx("span",{className:"text-sm font-medium",children:O?.title||"deco chat"})]}),o.jsxs(R.Header.Right,{children:[o.jsx("button",{type:"button",onClick:()=>r(),className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"New chat",children:o.jsx(Ut,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),o.jsx(ys,{threads:u,activeThreadId:c,onSelectThread:d,onRemoveThread:m,onOpen:()=>f()}),o.jsx("button",{type:"button",onClick:()=>a(!1),className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:o.jsx(ae,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})]})]}),o.jsx(R.Main,{children:Y.length===0?o.jsx(R.EmptyState,{children:o.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[o.jsx(gs,{title:O?.title||"Ask deco chat",description:O?.description??"Ask anything about configuring model providers or using MCP Mesh.",avatarNode:o.jsx(fe,{icon:O?.icon,name:O?.title||"deco chat",size:"lg",fallbackIcon:o.jsx(ie,{size:32}),className:"size-[60px]! rounded-[18px]!"})}),T&&o.jsx(de,{fallback:null,children:o.jsx(w.Suspense,{fallback:o.jsx("div",{className:"flex justify-center",children:o.jsx(Lt,{size:20,className:"animate-spin text-muted-foreground"})}),children:o.jsx($s,{gatewayId:T,onSelect:I=>{K(I.description??I.name)}})})},T)]})}):o.jsx(R.Messages,{messages:P.messages,status:P.status,minHeightOffset:240})}),o.jsx(R.Footer,{children:o.jsx("div",{children:o.jsxs(R.Input,{onSubmit:K,onStop:P.stop,disabled:h.length===0||!k,isStreaming:P.status==="submitted"||P.status==="streaming",placeholder:h.length===0?"Add an LLM binding connection to start chatting":"Ask anything or @ for context",usageMessages:P.messages,children:[o.jsx(R.Input.GatewaySelector,{disabled:!1,selectedGatewayId:T,onGatewayChange:I=>{I&&_({gatewayId:I})}}),o.jsx(R.Input.ModelSelector,{disabled:!1,selectedModel:k??void 0,onModelChange:H})]})})})]})}function Ms(t){const e=x.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(ot,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function Os(t){const e=x.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(ct,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function zs(t){const e=x.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=$("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(mt,{"data-slot":"sheet-overlay",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Ds(t){const e=x.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(zs,{}),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",u=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 f;e[6]!==a||e[7]!==c||e[8]!==d||e[9]!==m||e[10]!==u?(f=$("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,u,a),e[6]=a,e[7]=c,e[8]=d,e[9]=m,e[10]=u,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs(dt,{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]!==f?(h=o.jsxs(Os,{children:[r,o.jsxs(rt,{"data-slot":"sheet-content",className:f,...n,children:[s,p]})]}),e[13]=s,e[14]=n,e[15]=f,e[16]=h):h=e[16],h}function Rs(t){const e=x.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=$("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 As(t){const e=x.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=$("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(lt,{"data-slot":"sheet-title",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Ps(t){const e=x.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=$("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(it,{"data-slot":"sheet-description",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Ve(t){const e=x.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=$("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 Es="sidebar_state",Ls=3600*24*7,Us="16rem",Hs="18rem",Bs="3rem",Gs="b",Fe=w.createContext(null);function ue(){const t=w.useContext(Fe);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Ws(t){const e=x.c(21),{defaultOpen:s,open:a,onOpenChange:n,children:l}=t,i=s===void 0?!0:s,r=te(),[c,d]=w.useState(!1),[m,u]=w.useState(i),f=a??m;let p;e[0]!==f||e[1]!==n?(p=z=>{const k=typeof z=="function"?z(f):z;n?n(k):u(k),document.cookie=`${Es}=${k}; path=/; max-age=${Ls}`},e[0]=f,e[1]=n,e[2]=p):p=e[2];const h=p;let v;e[3]!==r||e[4]!==h?(v=()=>r?d(Fs):h(Vs),e[3]=r,e[4]=h,e[5]=v):v=e[5];const g=v;let b,j;e[6]!==g?(b=()=>{const z=k=>{if(k.key===Gs&&(k.metaKey||k.ctrlKey)){const M=k.target;if(M.tagName==="INPUT"||M.tagName==="TEXTAREA"||M.isContentEditable)return;k.preventDefault(),g()}};return globalThis.addEventListener("keydown",z),()=>globalThis.removeEventListener("keydown",z)},j=[g],e[6]=g,e[7]=b,e[8]=j):(b=e[7],j=e[8]),w.useEffect(b,j);const S=f?"expanded":"collapsed";let y;e[9]!==r||e[10]!==f||e[11]!==c||e[12]!==h||e[13]!==S||e[14]!==g?(y={state:S,open:f,setOpen:h,isMobile:r,openMobile:c,setOpenMobile:d,toggleSidebar:g},e[9]=r,e[10]=f,e[11]=c,e[12]=h,e[13]=S,e[14]=g,e[15]=y):y=e[15];const C=y;let N;e[16]!==l?(N=o.jsx(zt,{delayDuration:0,children:l}),e[16]=l,e[17]=N):N=e[17];let _;return e[18]!==C||e[19]!==N?(_=o.jsx(Fe.Provider,{value:C,children:N}),e[18]=C,e[19]=N,e[20]=_):_=e[20],_}function Vs(t){return!t}function Fs(t){return!t}function Ks(t){const e=x.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":Us,"--sidebar-width-icon":Bs,...l},e[5]=l,e[6]=i):i=e[6];const r=i;let c;e[7]!==a?(c=$("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 Ys(t){const e=x.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:u,state:f,openMobile:p,setOpenMobile:h}=ue();if(m==="none"){let k;e[7]!==a?(k=$("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(u){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":Hs},e[13]=k):k=e[13];let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsxs(Rs,{className:"sr-only",children:[o.jsx(As,{children:"Sidebar"}),o.jsx(Ps,{children:"Displays the mobile sidebar."})]}),e[14]=M):M=e[14];let T;e[15]!==s?(T=o.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=T):T=e[16];let O;e[17]!==c||e[18]!==T?(O=o.jsxs(Ds,{"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,T]}),e[17]=c,e[18]=T,e[19]=O):O=e[19];let D;return e[20]!==p||e[21]!==n||e[22]!==h||e[23]!==O?(D=o.jsx(Ms,{open:p,onOpenChange:h,...n,children:O}),e[20]=p,e[21]=n,e[22]=h,e[23]=O,e[24]=D):D=e[24],D}const v=f==="collapsed"?m:"",g=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let b;e[25]!==g?(b=$("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",g),e[25]=g,e[26]=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 S=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)]",y=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 C;e[29]!==a||e[30]!==S||e[31]!==y?(C=$("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",S,y,a),e[29]=a,e[30]=S,e[31]=y,e[32]=C):C=e[32];let N;e[33]!==s?(N=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]=N):N=e[34];let _;e[35]!==n||e[36]!==C||e[37]!==N?(_=o.jsx("div",{"data-slot":"sidebar-container",className:C,...n,children:N}),e[35]=n,e[36]=C,e[37]=N,e[38]=_):_=e[38];let z;return e[39]!==c||e[40]!==f||e[41]!==_||e[42]!==v||e[43]!==j||e[44]!==d?(z=o.jsxs("div",{className:"group peer text-foreground hidden md:block border-r","data-state":f,"data-collapsible":v,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[j,_]}),e[39]=c,e[40]=f,e[41]=_,e[42]=v,e[43]=j,e[44]=d,e[45]=z):z=e[45],z}function Zs(t){const e=x.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=$("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 qs(t){const e=x.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=$("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 Qs(t){const e=x.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=$("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 Xs(t){const e=x.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=$("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 Js(t){const e=x.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=$("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 en(t){const e=x.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=$("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 le(t){const e=x.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=$("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 tn=ut("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 Ke(t){const e=x.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,u=i===void 0?"default":i,f=r===void 0?"default":r,p=d?ft:"button",{isMobile:h,state:v}=ue();let g;e[8]!==s||e[9]!==f||e[10]!==u?(g=$(tn({variant:u,size:f}),s),e[8]=s,e[9]=f,e[10]=u,e[11]=g):g=e[11];let b;e[12]!==p||e[13]!==m||e[14]!==a||e[15]!==f||e[16]!==g?(b=o.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":m,className:g,...a}),e[12]=p,e[13]=m,e[14]=a,e[15]=f,e[16]=g,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 S;e[20]!==j?(S=o.jsx(Dt,{asChild:!0,children:j}),e[20]=j,e[21]=S):S=e[21];const y=v!=="collapsed"||h;let C;e[22]!==y||e[23]!==c?(C=o.jsx(Ot,{side:"right",align:"center",hidden:y,...c}),e[22]=y,e[23]=c,e[24]=C):C=e[24];let N;return e[25]!==S||e[26]!==C?(N=o.jsxs(Rt,{children:[S,C]}),e[25]=S,e[26]=C,e[27]=N):N=e[27],N}function sn(t){const e=x.c(26),{item:s}=t,a=oe(),{org:n}=q(),l=_e(n.id),i=is(n.id);let r;e[0]!==i.update||e[1]!==s.url||e[2]!==l?.sidebar_items?(r=async()=>{const y=(l?.sidebar_items||[]).filter(C=>C.url!==s.url);await i.update.mutateAsync({sidebar_items:y})},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 u=m;let f;e[7]!==s.url||e[8]!==a?(f=()=>{a({to:s.url})},e[7]=s.url,e[8]=a,e[9]=f):f=e[9];const p=s.title;let h;e[10]!==u||e[11]!==s.icon||e[12]!==s.title?(h=o.jsx("div",{className:"flex items-center justify-center shrink-0",children:u?o.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):o.jsx(ls,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=u,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 g;e[16]!==v?(g=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]=g):g=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:S=>{S.preventDefault(),S.stopPropagation(),c()}}),e[18]=c,e[19]=b):b=e[19];let j;return e[20]!==s.title||e[21]!==f||e[22]!==h||e[23]!==g||e[24]!==b?(j=o.jsx(le,{children:o.jsxs(Ke,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:f,tooltip:p,children:[h,g,b]})}),e[20]=s.title,e[21]=f,e[22]=h,e[23]=g,e[24]=b,e[25]=j):j=e[25],j}function nn(){const t=x.c(4),{org:e}=q(),a=_e(e.id)?.sidebar_items;if(!a?.length)return null;let n;t[0]!==a?(n=a.map(an),t[0]=a,t[1]=n):n=t[1];let l;return t[2]!==n?(l=o.jsx(Ye,{children:n}),t[2]=n,t[3]=l):l=t[3],l}function an(t){return o.jsx(sn,{item:t},t.url)}function ge(){const t=x.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(le,{children:o.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:o.jsx(Ve,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Ye(t){const e=x.c(4),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(qs,{className:"my-2 -ml-1"}),e[0]=a):a=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(le,{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 on(){const t=x.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(w.Suspense,{fallback:o.jsxs(Ye,{children:[o.jsx(ge,{}),o.jsx(ge,{})]}),children:o.jsx(nn,{})}),t[0]=e):e=t[0],e}function ln(){const t=x.c(43),{locator:e}=q(),s=oe();let a;t[0]!==e?(a=he.parse(e),t[0]=e,t[1]=a):a=t[1];const{org:n}=a;let l;t[2]!==e?(l=he.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(Ae,{}),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(ze,{}),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 u;t[12]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(Mt,{}),t[12]=u):u=t[12];let f;t[13]!==s||t[14]!==n?(f={key:"mcps",label:"MCP Servers",icon:u,onClick:()=>s({to:"/$org/mcps",params:{org:n}})},t[13]=s,t[14]=n,t[15]=f):f=t[15];let p;t[16]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(ie,{}),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(Oe,{}),t[20]=v):v=t[20];let g;t[21]!==s||t[22]!==n?(g={key:"monitoring",label:"Monitoring",icon:v,onClick:()=>s({to:"/$org/monitoring",params:{org:n}})},t[21]=s,t[22]=n,t[23]=g):g=t[23];let b;t[24]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(Be,{}),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 S;t[28]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Ue,{}),t[28]=S):S=t[28];let y;t[29]!==s||t[30]!==n?(y={key:"settings",label:"Settings",icon:S,onClick:()=>s({to:"/$org/settings",params:{org:n}})},t[29]=s,t[30]=n,t[31]=y):y=t[31];let C;t[32]!==g||t[33]!==j||t[34]!==y||t[35]!==c||t[36]!==m||t[37]!==f||t[38]!==h?(C=[c,m,f,h,g,j,y],t[32]=g,t[33]=j,t[34]=y,t[35]=c,t[36]=m,t[37]=f,t[38]=h,t[39]=C):C=t[39];const N=C;let _;return t[40]!==N||t[41]!==i?(_=i?N:[],t[40]=N,t[41]=i,t[42]=_):_=t[42],_}function Ze(t){const e=x.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(rn),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==n||e[3]!==d?(m=o.jsx(Qs,{className:"flex-1 overflow-x-hidden",children:o.jsx(Xs,{className:"font-medium",children:o.jsx(Js,{children:o.jsxs(en,{className:"gap-0.5",children:[d,n]})})})}),e[2]=n,e[3]=d,e[4]=m):m=e[4];let u;return e[5]!==c||e[6]!==a||e[7]!==m||e[8]!==r?(u=o.jsxs(Ys,{variant:r,collapsible:c,children:[m,a]}),e[5]=c,e[6]=a,e[7]=m,e[8]=r,e[9]=u):u=e[9],u}function rn(t){return o.jsx(le,{children:o.jsxs(Ke,{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)}Ze.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(Ve,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function cn(){const t=x.c(3),e=ln();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(o.Fragment,{children:o.jsx(de,{children:o.jsx(w.Suspense,{fallback:null,children:o.jsx(on,{})})})}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=o.jsx(Ze,{navigationItems:e,additionalContent:s}),t[1]=e,t[2]=a):a=t[2],a}function dn(t){const e=x.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=$("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(ht,{"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 qe=w.createContext(null);function mn(){const t=w.useContext(qe);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function un(t){const e=x.c(10),{children:s,onItemHover:a}=t,[n,l]=w.useState(null);let i;e[0]!==a?(i=u=>{l(u),a?.(u)},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(Ce,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=o.jsx(qe.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function fn(t){const e=x.c(6),{children:s,onClick:a}=t;let n;e[0]!==s||e[1]!==a?(n=o.jsx(W,{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(ye,{asChild:!0,children:o.jsx(W,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:o.jsx(De,{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 hn(t){const e=x.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(Q,{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 pn(t){const e=x.c(6),{children:s,align:a}=t,n=a===void 0?"start":a,i=w.Children.toArray(s).filter(xn).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(Ne,{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 xn(t){return w.isValidElement(t)&&(t.type===Xe||t.type===Qe)}function Qe(t){const e=x.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("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 Xe=Qe;function gn(t){const e=x.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(cs,{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 bn(t){const e=x.c(6),{children:s,emptyMessage:a}=t,n=a===void 0?"No items found.":a,l=w.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 vn(t){const e=x.c(15),{item:s,onClick:a,onHover:n,children:l}=t,i=mn();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(Q,{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 u;return e[11]!==c||e[12]!==d||e[13]!==m?(u=o.jsx(W,{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]=u):u=e[14],u}function jn(t){const e=x.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 wn(t){const e=x.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=$("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 u;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(u=o.jsxs(W,{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]=u):u=e[10],u}function Sn(){const t=x.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(dn,{}),t[0]=e):e=t[0],e}function Cn(){const t=x.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 A=Object.assign(un,{Trigger:fn,CurrentItem:hn,Content:pn,Panel:Xe,Search:gn,Items:bn,Item:vn,Actions:jn,Action:wn,Separator:Sn,Skeleton:Cn});function re(){const t=x.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=ce(e),{data:a}=J.useListOrganizations(),n=oe();let l;t[1]!==s||t[2]!==a?(l=a?.find(V=>V.slug===s),t[1]=s,t[2]=a,t[3]=l):l=t[3];const i=l,[r,c]=w.useState(""),[d,m]=w.useState(!1);let u,f,p,h,v,g,b,j;if(t[4]!==i||t[5]!==n||t[6]!==s||t[7]!==r||t[8]!==a){const X=(a?(()=>{const E=a.filter(U=>U.name.toLowerCase().includes(r.toLowerCase()));if(s){const U=E.findIndex(Y=>Y.slug===s);if(U>0){const Y=E[U];Y&&(E.splice(U,1),E.unshift(Y))}}return E})():[]).map(yn);let P;t[17]!==i?(P=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=P):P=t[18];const K=P;h=A;let H;t[19]!==n||t[20]!==s?(H=()=>n({to:"/$org",params:{org:s??""}}),t[19]=n,t[20]=s,t[21]=H):H=t[21];let L;t[22]!==K?(L=o.jsx(A.CurrentItem,{item:K}),t[22]=K,t[23]=L):L=t[23],t[24]!==H||t[25]!==L?(j=o.jsx(A.Trigger,{onClick:H,children:L}),t[24]=H,t[25]=L,t[26]=j):j=t[26],p=A.Content,f=A.Panel,t[27]!==r?(b=o.jsx(A.Search,{placeholder:"Search organizations...",value:r,onChange:c}),t[27]=r,t[28]=b):b=t[28],u=A.Items,v="No organizations found.";let F;t[29]!==n?(F=E=>o.jsx(A.Item,{item:E,onClick:U=>n({to:"/$org",params:{org:U.slug}})},E.slug),t[29]=n,t[30]=F):F=t[30],g=X.map(F),t[4]=i,t[5]=n,t[6]=s,t[7]=r,t[8]=a,t[9]=u,t[10]=f,t[11]=p,t[12]=h,t[13]=v,t[14]=g,t[15]=b,t[16]=j}else u=t[9],f=t[10],p=t[11],h=t[12],v=t[13],g=t[14],b=t[15],j=t[16];let S;t[31]!==u||t[32]!==v||t[33]!==g?(S=o.jsx(u,{emptyMessage:v,children:g}),t[31]=u,t[32]=v,t[33]=g,t[34]=S):S=t[34];let y,C;t[35]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(A.Actions,{children:o.jsx(A.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),C=o.jsx(A.Separator,{}),t[35]=y,t[36]=C):(y=t[35],C=t[36]);let N;t[37]!==n?(N=()=>n({to:"/"}),t[37]=n,t[38]=N):N=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(ds,{}),t[39]=_):_=t[39];let z;t[40]!==N?(z=o.jsx(A.Actions,{children:o.jsx(A.Action,{onClick:N,icon:_,children:"See all organizations"})}),t[40]=N,t[41]=z):z=t[41];let k;t[42]!==f||t[43]!==z||t[44]!==b||t[45]!==S?(k=o.jsxs(f,{children:[b,S,y,C,z]}),t[42]=f,t[43]=z,t[44]=b,t[45]=S,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;t[50]!==h||t[51]!==M||t[52]!==j?(T=o.jsxs(h,{children:[j,M]}),t[50]=h,t[51]=M,t[52]=j,t[53]=T):T=t[53];let O;t[54]!==d?(O=o.jsx(rs,{open:d,onOpenChange:m}),t[54]=d,t[55]=O):O=t[55];let D;return t[56]!==T||t[57]!==O?(D=o.jsxs(o.Fragment,{children:[T,O]}),t[56]=T,t[57]=O,t[58]=D):D=t[58],D}function yn(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}re.Skeleton=A.Skeleton;const Je=w.createContext({setOpen:()=>{}}),Nn=()=>w.useContext(Je),_n=t=>{const e=x.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]=Jt(c);let u;e[10]!==m?(u={setOpen:m},e[10]=m,e[11]=u):u=e[11];let f;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(f=o.jsx(es,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=f):f=e[16];let p;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==f?(p=o.jsx(fs,{open:d,onOpenChange:m,...i,children:f}),e[17]=d,e[18]=i,e[19]=m,e[20]=f,e[21]=p):p=e[21];let h;return e[22]!==u||e[23]!==p?(h=o.jsx(Je.Provider,{value:u,children:p}),e[22]=u,e[23]=p,e[24]=h):h=e[24],h},kn=t=>{const{children:e,title:s,...a}=t,n=te(),{className:l,...i}=a;return n?o.jsxs(qt,{...i,children:[o.jsx(Qt,{className:"hidden",children:o.jsx(Xt,{children:s})}),o.jsx("div",{className:$("flex flex-col gap-2 p-2 py-4",l),children:e})]}):o.jsx(us,{...a,children:e})},In=t=>{const{children:e,...s}=t,{setOpen:a}=Nn(),n=te(),{className:l,...i}=s;return n?o.jsx("div",{...i,onClick:r=>{a(!1);const{onClick:c}=i;c?.(r)},className:$("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(hs,{...s,children:e})},$n=t=>{const e=x.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=te();let l;return e[3]!==s||e[4]!==n||e[5]!==a?(l=n?o.jsx(Zt,{asChild:!0,children:s}):o.jsx(ms,{...a,children:s}),e[3]=s,e[4]=n,e[5]=a,e[6]=l):l=e[6],l},Tn=t=>{const e=x.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=te();let l;return e[3]!==s||e[4]!==n||e[5]!==a?(l=n?o.jsx(pe,{className:$(s),...a}):o.jsx(pe,{className:$(s),...a}),e[3]=s,e[4]=n,e[5]=a,e[6]=l):l=e[6],l};function Mn(t){const e=x.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($n,{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(kn,{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(_n,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function On(t){const e=x.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(In,{asChild:l,className:n,children:i}),e[4]=l,e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function zn(t){const e=x.c(2),{className:s}=t;let a;return e[0]!==s?(a=o.jsx(Tn,{className:s}),e[0]=s,e[1]=a):a=e[1],a}function Dn(){const t=x.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 G=Object.assign(Mn,{Item:On,Separator:zn,Skeleton:Dn});function Rn(t){const e=x.c(32),{open:s,onOpenChange:a,user:n,userImage:l}=t,[i,r]=w.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(ke,{children:[o.jsx(Ie,{children:"Profile"}),o.jsx($e,{children:"Your account information"})]}),e[2]=m):m=e[2];const u=n.name||n.email||"U";let f;e[3]!==u||e[4]!==l?(f=o.jsx(Q,{url:l,fallback:u,shape:"circle",size:"2xl"}),e[3]=u,e[4]=l,e[5]=f):f=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 g;e[10]!==h||e[11]!==v?(g=o.jsxs("div",{className:"flex flex-col items-center gap-2 w-full",children:[h,v]}),e[10]=h,e[11]=v,e[12]=g):g=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 S;e[16]!==i?(S=i?o.jsx(At,{size:16,className:"text-green-600"}):o.jsx(ps,{size:16,className:"text-muted-foreground"}),e[16]=i,e[17]=S):S=e[17];let y;e[18]!==d||e[19]!==S?(y=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:S}),e[18]=d,e[19]=S,e[20]=y):y=e[20];let C;e[21]!==j||e[22]!==y?(C=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,y]}),e[21]=j,e[22]=y,e[23]=C):C=e[23];let N;e[24]!==C||e[25]!==f||e[26]!==g?(N=o.jsxs(Te,{className:"sm:max-w-md",children:[m,o.jsxs("div",{className:"flex flex-col items-center gap-6 py-4",children:[f,g,C]})]}),e[24]=C,e[25]=f,e[26]=g,e[27]=N):N=e[27];let _;return e[28]!==a||e[29]!==s||e[30]!==N?(_=o.jsx(Me,{open:s,onOpenChange:a,children:N}),e[28]=a,e[29]=s,e[30]=N,e[31]=_):_=e[31],_}function An(t){const e=x.c(5),{open:s,onOpenChange:a}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsxs(ke,{children:[o.jsx(Ie,{children:"Invitations"}),o.jsx($e,{children:"Your pending organization invitations"})]}),e[0]=n):n=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsxs(Te,{className:"sm:max-w-lg",children:[n,o.jsx("div",{className:"max-h-[420px] overflow-auto pr-1",children:o.jsx(gt,{})})]}),e[1]=l):l=e[1];let i;return e[2]!==a||e[3]!==s?(i=o.jsx(Me,{open:s,onOpenChange:a,children:l}),e[2]=a,e[3]=s,e[4]=i):i=e[4],i}function Pn(t){const e=x.c(31),{user:s,userImage:a,hasInvites:n,showInvitesItem:l}=t,[i,r]=w.useState(!1),[c,d]=w.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(Q,{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 u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsxs(G.Item,{onClick:()=>r(!0),children:[o.jsx(He,{className:"text-muted-foreground",size:18}),"Profile"]}),e[5]=u):u=e[5];let f;e[6]!==n||e[7]!==l?(f=l&&o.jsxs(G.Item,{onClick:()=>d(!0),children:[o.jsx(Le,{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]=f):f=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(G.Separator,{}),e[9]=p):p=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(xt,{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(G.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(xe,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[11]=v):v=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Re,{className:"text-muted-foreground",size:18}),e[12]=g):g=e[12];let b,j;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(G.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:[g,"Homepage",o.jsx(xe,{size:18,className:"ml-auto text-muted-foreground"})]})}),j=o.jsx(G.Separator,{}),e[13]=b,e[14]=j):(b=e[13],j=e[14]);let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsxs(G.Item,{onClick:En,children:[o.jsx(Ee,{size:18,className:"text-muted-foreground"}),"Log out"]}),e[15]=S):S=e[15];let y;e[16]!==m||e[17]!==f||e[18]!==s?(y=o.jsxs(G,{user:s,trigger:m,align:"end",children:[u,f,p,v,b,j,S]}),e[16]=m,e[17]=f,e[18]=s,e[19]=y):y=e[19];let C;e[20]!==i||e[21]!==s||e[22]!==a?(C=i&&o.jsx(Rn,{open:i,onOpenChange:r,user:s,userImage:a}),e[20]=i,e[21]=s,e[22]=a,e[23]=C):C=e[23];let N;e[24]!==c||e[25]!==l?(N=l&&c&&o.jsx(An,{open:c,onOpenChange:d}),e[24]=c,e[25]=l,e[26]=N):N=e[26];let _;return e[27]!==y||e[28]!==C||e[29]!==N?(_=o.jsxs(o.Fragment,{children:[y,C,N]}),e[27]=y,e[28]=C,e[29]=N,e[30]=_):_=e[30],_}function En(){return J.signOut()}function Ln(){const{data:t}=J.useSession(),e=w.useContext(pt),{data:s}=e.hooks.useListUserInvitations(),n=(s??[]).length>0;if(!t?.user)return o.jsx(Q,{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(Pn,{user:i,userImage:r,hasInvites:n,showInvitesItem:!0})}function Un(t){const e=x.c(6),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(bt,{children:o.jsx(je,{})}),e[0]=a):a=e[0];let n;e[1]!==s?(n=o.jsx(vt,{children:s}),e[1]=s,e[2]=n):n=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(jt,{children:o.jsx(wt,{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 Hn(t){const e=x.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("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 Bn(t){const e=x.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("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 Gn(t){const e=x.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("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 Wn(t){const e=x.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("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 Vn(t){const e=x.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("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 Fn(){const t=x.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 se=Object.assign(Hn,{Sidebar:Bn,Left:Gn,Center:Wn,Right:Vn,Skeleton:Fn});function et(){const t=x.c(3),{toggleSidebar:e}=ue();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(Pe,{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(W,{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}et.Skeleton=function(){return o.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})};const Kn="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function be(t){const e=x.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]=me();let d;e[0]!==c?(d=()=>c(Yn),e[0]=c,e[1]=d):d=e[1];const m=d;let u;e[2]!==l?(u=l&&o.jsx(se.Sidebar,{children:o.jsx(et,{})}),e[2]=l,e[3]=u):u=e[3];let f;e[4]!==i?(f=i&&o.jsx(w.Suspense,{fallback:o.jsx(re.Skeleton,{}),children:o.jsx(re,{})}),e[4]=i,e[5]=f):f=e[5];let p;e[6]!==f?(p=o.jsx(se.Left,{children:f}),e[6]=f,e[7]=p):p=e[7];let h;e[8]!==r||e[9]!==m?(h=r&&o.jsxs(W,{size:"sm",variant:"default",onClick:m,children:[o.jsx(Q,{url:Kn,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(Ln,{}),e[11]=v):v=e[11];let g;e[12]!==h?(g=o.jsxs(se.Right,{className:"gap-2",children:[h,v]}),e[12]=h,e[13]=g):g=e[13];let b;return e[14]!==g||e[15]!==u||e[16]!==p?(b=o.jsxs(se,{children:[u,p,g]}),e[14]=g,e[15]=u,e[16]=p,e[17]=b):b=e[17],b}function Yn(t){return!t}function Zn(t){const e=x.c(10),{children:s,className:a}=t,[,n]=w.useTransition();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=ee.decoChatPanelWidth(),e[0]=l):l=e[0];const[i,r]=Z(l,30);let c;e[1]!==r?(c=f=>n(()=>r(f)),e[1]=r,e[2]=c):c=e[2];const d=c;let m;e[3]!==a?(m=$("min-w-0",a),e[3]=a,e[4]=m):m=e[4];let u;return e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==m?(u=o.jsx(Se,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=u):u=e[9],u}function qn(t){const e=x.c(5),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=ee.sidebarOpen(),e[0]=a):a=e[0];const[n,l]=Z(a,!0);let i;return e[1]!==s||e[2]!==l||e[3]!==n?(i=o.jsx(Ws,{open:n,onOpenChange:l,children:s}),e[1]=s,e[2]=l,e[3]=n,e[4]=i):i=e[4],i}function Qn(){const t=x.c(9),[e]=me();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(Se,{className:"bg-background",children:o.jsx(we,{})}),t[0]=s):s=t[0];let a;t[1]!==e?(a=o.jsx(ts,{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(de,{children:o.jsx(w.Suspense,{fallback:o.jsx(ss,{}),children:o.jsx(Ts,{})})}),t[3]=l):l=t[3];let i;t[4]!==n?(i=o.jsx(Zn,{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(ns,{direction:"horizontal",children:[s,a,i]}),t[6]=a,t[7]=i,t[8]=r):r=t[8],r}function Xn(){const t=x.c(19);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=ce(e);let a;t[1]!==s?(a=ve.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 J.organization.setActive({organizationSlug:s});return{org:p,project:{slug:Et}}},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}=St(l);if(!i){let p;t[8]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(be,{}),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(we,{})})]}),t[9]=h):h=t[9],h}let r;t[10]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(be,{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(cn,{}),t[12]=d):d=t[12];let m;t[13]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(qn,{children:o.jsxs("div",{className:"flex flex-col h-screen",children:[r,o.jsxs(Ks,{className:"flex-1 bg-sidebar",style:c,children:[d,o.jsx(Zs,{className:"pt-12",children:o.jsx(Qn,{})})]})]})}),t[13]=m):m=t[13];let u;t[14]!==i.org.slug?(u=o.jsx(vs,{children:m},i.org.slug),t[14]=i.org.slug,t[15]=u):u=t[15];let f;return t[16]!==i||t[17]!==u?(f=o.jsx(Pt,{...i,children:u}),t[16]=i,t[17]=u,t[18]=f):f=t[18],f}function Ua(){const t=x.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Un,{children:o.jsx(w.Suspense,{fallback:o.jsx(je,{}),children:o.jsx(Xn,{})})}),t[0]=e):e=t[0],e}export{Ua as default};
@@ -1 +0,0 @@
1
- import{at as u,ap as s}from"./index-BdKUt3kP.js";function t(e,r){return u(e,s,r)}export{t as u};