@decocms/mesh 1.0.0-alpha.37 → 1.0.0-alpha.38

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 (105) hide show
  1. package/dist/client/assets/{AlertCircle-FgA4OE_Y.js → AlertCircle-BRDn8bYf.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-DZ8Qhlyz.js → ArrowLeft-qWOemv4m.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-D9-mPjW-.js → CheckCircle-DNAL-vtD.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-CRpCA4eQ.js → ChevronDown-CJBpL9ke.js} +1 -1
  5. package/dist/client/assets/{Clock-9Ud3hYi_.js → Clock-s023drCB.js} +1 -1
  6. package/dist/client/assets/{Copy01-DGZy8_Wa.js → Copy01-Bm7GrXLR.js} +1 -1
  7. package/dist/client/assets/{CpuChip02-9xkDTOQm.js → CpuChip02-CY8-jTO9.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-7BehxNIr.js → DotsVertical-DakD93ro.js} +1 -1
  9. package/dist/client/assets/{File06-JZRzMAbM.js → File06-CaEGX5DR.js} +1 -1
  10. package/dist/client/assets/{Grid01-CKvZ5Bgj.js → Grid01-DzkX4KgN.js} +1 -1
  11. package/dist/client/assets/{Inbox01-Q7OGuD8_.js → Inbox01-BwvF7iId.js} +1 -1
  12. package/dist/client/assets/{InfoCircle-ZmqIswrk.js → InfoCircle-D8u9C2rC.js} +1 -1
  13. package/dist/client/assets/{Key01-Cc974JWF.js → Key01-CNozBS0S.js} +1 -1
  14. package/dist/client/assets/{LinkExternal01-0ybSN01c.js → LinkExternal01-v_wZOVfQ.js} +1 -1
  15. package/dist/client/assets/{Loading01-BpGj_YCN.js → Loading01-Bg5ZbX7j.js} +1 -1
  16. package/dist/client/assets/{Plus-BS5hPXY3.js → Plus-DHLB4x84.js} +1 -1
  17. package/dist/client/assets/{SearchMd-BbbPnMSd.js → SearchMd-dWvbF6MG.js} +1 -1
  18. package/dist/client/assets/{Trash01-DtIQgapG.js → Trash01-B8SyVfGZ.js} +1 -1
  19. package/dist/client/assets/{Upload01-Zx3GirGx.js → Upload01-B11bwIwD.js} +1 -1
  20. package/dist/client/assets/{X-CYjj99XI.js → X-B95LxPIt.js} +1 -1
  21. package/dist/client/assets/{XClose-BDRe0Ozk.js → XClose-B0ejekJj.js} +1 -1
  22. package/dist/client/assets/{alert-dialog-Bj94Mg43.js → alert-dialog-UMEPZCAs.js} +2 -2
  23. package/dist/client/assets/{auth-CbkV4JhC.js → auth-DzSQcnhF.js} +1 -1
  24. package/dist/client/assets/{auth-catchall-pG3jhayZ.js → auth-catchall-BYr2zijL.js} +1 -1
  25. package/dist/client/assets/avatar-BHmRC7PJ.js +1 -0
  26. package/dist/client/assets/{badge-B6NR5xty.js → badge-CsN_0CQA.js} +1 -1
  27. package/dist/client/assets/{button-WA21TIge.js → button-DGzvT_2A.js} +1 -1
  28. package/dist/client/assets/{card-fnco2BKy.js → card-DhiM8w8S.js} +1 -1
  29. package/dist/client/assets/{checkbox-Bq4Db1eq.js → checkbox-CazM39DL.js} +1 -1
  30. package/dist/client/assets/collection-detail-Be2q4lq8.js +1 -0
  31. package/dist/client/assets/{collection-display-button-CJgVNUjG.js → collection-display-button-HCh5o-4Q.js} +1 -1
  32. package/dist/client/assets/{collection-header-COdYt0yo.js → collection-header-QrVAH4kj.js} +1 -1
  33. package/dist/client/assets/{collection-page-IZEjeZDJ.js → collection-page-CUS5aOdu.js} +1 -1
  34. package/dist/client/assets/{collection-search-Dh2zcE6Z.js → collection-search-nvVuwapQ.js} +1 -1
  35. package/dist/client/assets/{collection-table-wrapper-DOiiwQBc.js → collection-table-wrapper-D0FdiE30.js} +1 -1
  36. package/dist/client/assets/{connection-card-P2DYTKtD.js → connection-card-CtFpN05k.js} +1 -1
  37. package/dist/client/assets/{connection-detail-2kY4jzvr.js → connection-detail-DlPH1Rj9.js} +1 -1
  38. package/dist/client/assets/{connections-CfReLX9R.js → connections-CuXo1k5G.js} +1 -1
  39. package/dist/client/assets/{core-Bsa-CClQ.js → core-CPQcCrZ7.js} +1 -1
  40. package/dist/client/assets/{create-organization-dialog-DjEf_yPL.js → create-organization-dialog-CO78Byme.js} +1 -1
  41. package/dist/client/assets/{deco-chat-skeleton-YKru_-uq.js → deco-chat-skeleton-BAqDOmQt.js} +3 -3
  42. package/dist/client/assets/{dialog-CzRcLMrO.js → dialog-BQqZMrZX.js} +1 -1
  43. package/dist/client/assets/{dropdown-menu-lNp795nL.js → dropdown-menu-D1IcmwBM.js} +1 -1
  44. package/dist/client/assets/{error-boundary-D10vdRO6.js → error-boundary-BePJNb-A.js} +1 -1
  45. package/dist/client/assets/{extract-connection-data-CnaW3oDd.js → extract-connection-data-BzkcwZMq.js} +1 -1
  46. package/dist/client/assets/{form-BUVsmabM.js → form-CtkKIwlr.js} +1 -1
  47. package/dist/client/assets/{gateway-detail-DxVWCOGY.js → gateway-detail-BFm1a022.js} +1 -1
  48. package/dist/client/assets/{gateways-BDUTpLoJ.js → gateways-u5Ek3G6R.js} +1 -1
  49. package/dist/client/assets/{home-DcAStJkG.js → home-tHS3Zecm.js} +1 -1
  50. package/dist/client/assets/{index-B3MiP_oE.js → index-B3hUglpl.js} +1 -1
  51. package/dist/client/assets/{index-BWMTgSpJ.js → index-BFGV_ZyQ.js} +2 -2
  52. package/dist/client/assets/index-Bchib-vH.css +1 -0
  53. package/dist/client/assets/{index-DiIfEFEx.js → index-Co77-1xF.js} +1 -1
  54. package/dist/client/assets/{index-DXIf5jrv.js → index-RtH5C8CP.js} +1 -1
  55. package/dist/client/assets/{input-C8ckt9pD.js → input-CSN83rcG.js} +1 -1
  56. package/dist/client/assets/json-eo7c8zn7.js +1 -0
  57. package/dist/client/assets/{json-syntax-highlighter-DqTOcqS4.js → json-syntax-highlighter-s54gEg6g.js} +2 -2
  58. package/dist/client/assets/{layout-Ddw5vi1_.js → layout-By0mCM-C.js} +1 -1
  59. package/dist/client/assets/{lazy-highlighter-D0ldRF_z.js → lazy-highlighter-BA7LoVJl.js} +1 -1
  60. package/dist/client/assets/{localstorage-keys-C__QKrnP.js → localstorage-keys-CKD_ZpQC.js} +1 -1
  61. package/dist/client/assets/{login-Bfuntl4G.js → login-hHvv0tPc.js} +1 -1
  62. package/dist/client/assets/{mcp-oauth-BeGFsv5e.js → mcp-oauth-BXBge9LN.js} +1 -1
  63. package/dist/client/assets/{members-DsJnPzlW.js → members-Bvub8C8H.js} +1 -1
  64. package/dist/client/assets/{monitoring-C4ZUhICh.js → monitoring-B76IY8Nx.js} +1 -1
  65. package/dist/client/assets/{oauth-callback-rQDuS0Y4.js → oauth-callback-Buaygh1B.js} +1 -1
  66. package/dist/client/assets/{page-CEwSU962.js → page-X28UCcuA.js} +1 -1
  67. package/dist/client/assets/popover-Bc_J6DJM.js +1 -0
  68. package/dist/client/assets/prism-light-CJ5lsPAv.js +1 -0
  69. package/dist/client/assets/{resource-tabs-TaJMxN6_.js → resource-tabs-talmxE-P.js} +1 -1
  70. package/dist/client/assets/{schema-B3tkq8IT.js → schema-BNYaaxve.js} +1 -1
  71. package/dist/client/assets/{select-DQatPXKJ.js → select-zI1MuLqv.js} +1 -1
  72. package/dist/client/assets/{settings-DIHeOoHX.js → settings-3CQfBwb4.js} +1 -1
  73. package/dist/client/assets/shell-layout-DrYzniBY.js +17 -0
  74. package/dist/client/assets/{spinner-DD8NRDSP.js → spinner-Bz0yGoI-.js} +1 -1
  75. package/dist/client/assets/store-DFp_70M-.js +1 -0
  76. package/dist/client/assets/{store-app-detail-C3gtVQGX.js → store-app-detail-lpZSA42O.js} +1 -1
  77. package/dist/client/assets/{switch-BLTM21B0.js → switch-hr3MPsBc.js} +1 -1
  78. package/dist/client/assets/{textarea-OUcFAiZD.js → textarea-B9KhTSks.js} +1 -1
  79. package/dist/client/assets/{tooltip-Dy-DsVOX.js → tooltip-B1UObqaJ.js} +1 -1
  80. package/dist/client/assets/{types-Be8keXIM.js → types-BH1WeggD.js} +1 -1
  81. package/dist/client/assets/{use-binding-pAqGO8UI.js → use-binding-BAah0fz3.js} +1 -1
  82. package/dist/client/assets/{use-connection-Lp9rwnx7.js → use-connection-DfrXFTVM.js} +2 -2
  83. package/dist/client/assets/{use-gateway-C0GNG4JP.js → use-gateway-MMJo-JLn.js} +1 -1
  84. package/dist/client/assets/{use-list-state-BxKaK11n.js → use-list-state-z01BeFuP.js} +1 -1
  85. package/dist/client/assets/{use-mcp-ClY7_5dz.js → use-mcp-BM47vnpW.js} +1 -1
  86. package/dist/client/assets/{use-members-4V3USNhz.js → use-members-ClMZBuqE.js} +1 -1
  87. package/dist/client/assets/{use-mobile-k1X2THZ9.js → use-mobile-CZP-mMZd.js} +1 -1
  88. package/dist/client/assets/{use-organization-settings-CMytLZst.js → use-organization-settings-GOa26Bje.js} +1 -1
  89. package/dist/client/assets/use-tool-call-De--YQMp.js +1 -0
  90. package/dist/client/assets/useQuery-B00cZGqv.js +1 -0
  91. package/dist/client/assets/utils-D8oc_Xja.js +1 -0
  92. package/dist/client/assets/{well-known-mcp-CjKrCZkD.js → well-known-mcp-CJlqApJn.js} +1 -1
  93. package/dist/client/index.html +2 -2
  94. package/package.json +1 -1
  95. package/dist/client/assets/avatar-DQuAu06W.js +0 -1
  96. package/dist/client/assets/collection-detail-C45JavW1.js +0 -1
  97. package/dist/client/assets/index-LtFisB9d.css +0 -1
  98. package/dist/client/assets/json-DgiEbznW.js +0 -1
  99. package/dist/client/assets/popover-BSAaObMv.js +0 -1
  100. package/dist/client/assets/prism-light-BGWrXuVI.js +0 -1
  101. package/dist/client/assets/shell-layout-D1irgz1e.js +0 -1
  102. package/dist/client/assets/store-BlitdGFv.js +0 -1
  103. package/dist/client/assets/use-tool-call-z8Rn6Gss.js +0 -1
  104. package/dist/client/assets/useQuery-CdGzN_Sp.js +0 -1
  105. package/dist/client/assets/utils-CvrJmBA1.js +0 -1
@@ -1 +0,0 @@
1
- import{r as x,c as C,j as a,e as at,a as Fe,t as Xn,R as Jn,T as Qn,D as es,C as ts,P as ns,f as ss,O as os,g as rs,h as as,i as ls,d as Vt,k as is,G as cs,U as ds,l as us,S as Ft,m as fs,n as ms,N as ps,o as hs,p as xs,K as gs,q as Kt}from"./index-BWMTgSpJ.js";import{i as bs,E as vs}from"./SearchMd-BbbPnMSd.js";import{u as ys,I as $t,n as Ss}from"./use-connection-Lp9rwnx7.js";import{u as He,L as Ke}from"./localstorage-keys-C__QKrnP.js";import{u as Ze,T as js,a as ws,b as Cs,c as zs,L as Et,i as Ns,P as _s,O as ks}from"./tooltip-Dy-DsVOX.js";import{B as we}from"./button-WA21TIge.js";import{c as O}from"./utils-CvrJmBA1.js";import{i as jt}from"./CpuChip02-9xkDTOQm.js";import{s as Is}from"./Plus-BS5hPXY3.js";import{i as st}from"./X-CYjj99XI.js";import{u as Ps,a as $s,b as Es,c as Ms,d as Rs,C as se,D as As,e as Ts,f as Ds,g as Ls,h as Os,i as Hs,j as Bs}from"./deco-chat-skeleton-YKru_-uq.js";import{P as Zt,a as qt,b as Yt}from"./popover-BSAaObMv.js";import{s as Us}from"./Clock-9Ud3hYi_.js";import{s as Gs}from"./Trash01-DtIQgapG.js";import{u as Ws}from"./use-binding-pAqGO8UI.js";import{E as Xt}from"./error-boundary-D10vdRO6.js";import{i as Vs}from"./File06-JZRzMAbM.js";import{u as qe}from"./use-mobile-k1X2THZ9.js";import{u as Jt,a as Fs}from"./use-organization-settings-CMytLZst.js";import{C as Ks}from"./create-organization-dialog-DjEf_yPL.js";import{I as Zs}from"./input-C8ckt9pD.js";import{A as Be}from"./avatar-DQuAu06W.js";import{c as qs}from"./Grid01-CKvZ5Bgj.js";import{D as Ys,a as Xs,b as Js,c as Qs,d as Mt}from"./dropdown-menu-lNp795nL.js";import{a as eo}from"./Copy01-DGZy8_Wa.js";import{n as Rt}from"./LinkExternal01-0ybSN01c.js";import{D as Qt,a as en,b as tn,c as nn,d as sn}from"./dialog-CzRcLMrO.js";import"./useQuery-CdGzN_Sp.js";import"./textarea-OUcFAiZD.js";import"./select-DQatPXKJ.js";import"./ChevronDown-CRpCA4eQ.js";import"./use-gateway-C0GNG4JP.js";import"./AlertCircle-FgA4OE_Y.js";import"./connection-card-P2DYTKtD.js";import"./card-fnco2BKy.js";import"./spinner-DD8NRDSP.js";import"./InfoCircle-ZmqIswrk.js";import"./auth-CbkV4JhC.js";import"./alert-dialog-Bj94Mg43.js";import"./form-BUVsmabM.js";const on=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.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"}));on.displayName="BarChart10";const rn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.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"}));rn.displayName="Building02";const an=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));an.displayName="ChevronSelectorVertical";const ln=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));ln.displayName="DotsGrid";const cn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.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"}));cn.displayName="Globe01";const dn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.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"}));dn.displayName="Home02";const un=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.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"}));un.displayName="LayoutRight";const fn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.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"}));fn.displayName="LogOut01";const mn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.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"}));mn.displayName="Mail01";const pn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),x.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"}));pn.displayName="Settings01";const hn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.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"}));hn.displayName="UserCircle";const xn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.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"}));xn.displayName="Users01";function zt(){const t=C.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=Ke.decoChatOpen(),t[0]=e):e=t[0];const[n,s]=He(e,to);let o;return t[1]!==n||t[2]!==s?(o=[n,s],t[1]=n,t[2]=s,t[3]=o):o=t[3],o}function to(t){return!!(t??!1)}function no(t){const e=C.c(14),{title:n,description:s,avatar:o,avatarNode:r,className:l}=t,i=n===void 0?"Start a conversation":n;let c;e[0]!==l?(c=O("flex flex-col items-center justify-center gap-4 p-8 text-center",l),e[0]=l,e[1]=c):c=e[1];let d;e[2]!==o||e[3]!==r?(d=r||o&&a.jsx("img",{src:o,alt:"Chat avatar",className:"size-[60px] rounded-[18px] border-[1.875px] border-border/10"}),e[2]=o,e[3]=r,e[4]=d):d=e[4];let m;e[5]!==i?(m=i&&a.jsx("h3",{className:"text-xl font-medium text-foreground",children:i}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==s?(f=s&&a.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:s}),e[7]=s,e[8]=f):f=e[8];let u;return e[9]!==c||e[10]!==d||e[11]!==m||e[12]!==f?(u=a.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 gn=()=>crypto.randomUUID(),bn=x.createContext(null);function so(t){const e=C.c(15),{children:n}=t,{locator:s}=Ze(),o=Ps(),[r,l]=He(Ke.threadManagerState(s)+":active-id",oo);let i;e[0]!==l||e[1]!==o?(i=p=>{const v=p?.id||crypto.randomUUID(),b=new Date().toISOString(),g={id:v,title:p?.title||"",created_at:p?.created_at||b,updated_at:p?.updated_at||b,hidden:p?.hidden??!1};return o.insert.mutate(g),l(v),g},e[0]=l,e[1]=o,e[2]=i):i=e[2];const c=i;let d;e[3]!==r||e[4]!==l||e[5]!==o?(d=p=>{o.update.mutate({id:p,updates:{hidden:!0,updated_at:new Date().toISOString()}}),r===p&&l(gn())},e[3]=r,e[4]=l,e[5]=o,e[6]=d):d=e[6];const m=d;let f;e[7]!==r||e[8]!==c||e[9]!==m||e[10]!==l?(f={activeThreadId:r,createThread:c,setActiveThreadId:l,hideThread:m},e[7]=r,e[8]=c,e[9]=m,e[10]=l,e[11]=f):f=e[11];const u=f;let h;return e[12]!==n||e[13]!==u?(h=a.jsx(bn.Provider,{value:u,children:n}),e[12]=n,e[13]=u,e[14]=h):h=e[14],h}function oo(t){return t||gn()}function ro(){const t=x.useContext(bn);if(!t)throw new Error("useChat must be used within a ChatProvider");return t}function ao(t){const e=new Date(t),s=new Date().getTime()-e.getTime(),o=Math.floor(s/6e4),r=Math.floor(s/36e5);return o<1?"now":o<60?`${o}m`:`${r}h`}function lo(t){const e=new Date,n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),s=new Date(n.getTime()-864e5),o=new Date(n.getTime()-7*864e5),r=new Date(n.getTime()-30*864e5),l=[],i=[],c=[],d=[],m=[];for(const u of t){const h=new Date(u.updated_at);h>=n?l.push(u):h>=s?i.push(u):h>=o?c.push(u):h>=r?d.push(u):m.push(u)}const f=[];return l.length>0&&f.push({label:"Today",threads:l,showRelativeTime:!0}),i.length>0&&f.push({label:"Yesterday",threads:i,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 io(t){const e=C.c(36),{threads:n,activeThreadId:s,onSelectThread:o,onRemoveThread:r,onOpen:l}=t,[i,c]=x.useState("");let d,m,f,u,h,p,v,b,g;if(e[0]!==s||e[1]!==l||e[2]!==r||e[3]!==o||e[4]!==i||e[5]!==n){const _=i.trim()?n.filter(M=>(M.title||"New chat").toLowerCase().includes(i.toLowerCase())):n,w=lo(_);let S;e[15]!==l?(S=M=>{M?l?.():c("")},e[15]=l,e[16]=S):S=e[16];const I=S;m=Zt,b=I,e[17]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx(qt,{asChild:!0,children:a.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:a.jsx(Us,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})}),e[17]=g):g=e[17],d=Yt,h="end",p="w-80 p-0";let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=a.jsx(bs,{size:16,className:"text-muted-foreground shrink-0"}),e[18]=P):P=e[18];let T;e[19]===Symbol.for("react.memo_cache_sentinel")?(T=M=>c(M.target.value),e[19]=T):T=e[19],e[20]!==i?(v=a.jsx("div",{className:"border-b",children:a.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[P,a.jsx("input",{type:"text",placeholder:"Search chats...",value:i,onChange:T,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]=i,e[21]=v):v=e[21],f="max-h-[300px] overflow-y-auto",u=_.length===0?a.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:i.trim()?"No chats found":"No chats yet"}):w.map((M,L)=>a.jsxs("div",{children:[L>0&&a.jsx("div",{className:"border-t mx-3"}),a.jsx("div",{className:"px-3 py-1",children:a.jsx("span",{className:"text-xs font-medium text-muted-foreground tracking-wide",children:M.label})}),M.threads.map(G=>{const W=G.id===s;return a.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 hover:bg-accent cursor-pointer group ${W?"bg-accent/50":""}`,onClick:()=>o(G.id),children:[a.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[a.jsx("span",{className:"text-sm truncate",children:G.title||"New chat"}),a.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:W?"current":M.showRelativeTime?ao(G.updated_at):null})]}),a.jsx("button",{type:"button",onClick:V=>{V.stopPropagation(),r(G.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:a.jsx(Gs,{size:14,className:"text-muted-foreground group-hover/trash:text-destructive"})})]},G.id)})]},M.label)),e[0]=s,e[1]=l,e[2]=r,e[3]=o,e[4]=i,e[5]=n,e[6]=d,e[7]=m,e[8]=f,e[9]=u,e[10]=h,e[11]=p,e[12]=v,e[13]=b,e[14]=g}else d=e[6],m=e[7],f=e[8],u=e[9],h=e[10],p=e[11],v=e[12],b=e[13],g=e[14];let y;e[22]!==f||e[23]!==u?(y=a.jsx("div",{className:f,children:u}),e[22]=f,e[23]=u,e[24]=y):y=e[24];let j;e[25]!==d||e[26]!==h||e[27]!==p||e[28]!==v||e[29]!==y?(j=a.jsxs(d,{align:h,className:p,children:[v,y]}),e[25]=d,e[26]=h,e[27]=p,e[28]=v,e[29]=y,e[30]=j):j=e[30];let N;return e[31]!==m||e[32]!==b||e[33]!==g||e[34]!==j?(N=a.jsxs(m,{onOpenChange:b,children:[g,j]}),e[31]=m,e[32]=b,e[33]=g,e[34]=j,e[35]=N):N=e[35],N}const co="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function uo(){const t=C.c(114),{org:e,locator:n}=Ze(),{slug:s}=e,[,o]=zt(),r=at(),{data:l}=Fe.useSession(),i=l?.user,{createThread:c,activeThreadId:d,setActiveThreadId:m,hideThread:f}=ro(),{threads:u,refetch:h}=$s(),p=Es(),v=Ms(),b=ys();let g;t[0]!==b?(g={connections:b,binding:"LLMS"},t[0]=b,t[1]=g):g=t[1];const[y]=Ws(g),j=!!y,N=p.length>0,_=j&&N;let w;t[2]!==c?(w=Z=>c({id:Z.id,title:Z.title}),t[2]=c,t[3]=w):w=t[3];let S;t[4]!==d||t[5]!==w?(S={threadId:d,onCreateThread:w},t[4]=d,t[5]=w,t[6]=S):S=t[6];const I=Rs(S);let P;t[7]!==n?(P=Ke.chatSelectedModel(n),t[7]=n,t[8]=P):P=t[8];const[T,M]=He(P,mo),[L,G]=He(`${n}:selected-gateway`,fo),W=v[0];let V;t[9]!==W||t[10]!==T?(V=T??(W?{id:W.id,connectionId:W.connectionId}:null),t[9]=W,t[10]=T,t[11]=V):V=t[11];const H=V,ce=p[0]?.id,Y=L?.gatewayId??ce;let te;if(t[12]!==Y||t[13]!==p){let Z;t[15]!==Y?(Z=ae=>ae.id===Y,t[15]=Y,t[16]=Z):Z=t[16],te=p.find(Z),t[12]=Y,t[13]=p,t[14]=te}else te=t[14];const F=te;let J;if(t[17]!==H?.connectionId||t[18]!==H?.id||t[19]!==v){let Z;t[21]!==H?.connectionId||t[22]!==H?.id?(Z=ae=>ae.id===H?.id&&ae.connectionId===H?.connectionId,t[21]=H?.connectionId,t[22]=H?.id,t[23]=Z):Z=t[23],J=v.find(Z),t[17]=H?.connectionId,t[18]=H?.id,t[19]=v,t[20]=J}else J=t[20];const Q=J;let z;t[24]!==d||t[25]!==I||t[26]!==F||t[27]!==Q||t[28]!==i?.image||t[29]!==i?.name?(z=async Z=>{if(!Q){Xn.error("No model configured");return}const ae={created_at:new Date().toISOString(),thread_id:d,model:{id:Q.id,connectionId:Q.connectionId,provider:Q.provider??void 0},gateway:F?{id:F.id}:void 0,user:{avatar:i?.image??void 0,name:i?.name??"you"}};await I.sendMessage(Z,ae)},t[24]=d,t[25]=I,t[26]=F,t[27]=Q,t[28]=i?.image,t[29]=i?.name,t[30]=z):z=t[30];const E=z;let R;t[31]!==M?(R=Z=>{M({id:Z.id,connectionId:Z.connectionId})},t[31]=M,t[32]=R):R=t[32];const $=R;if(!_){let Z,ae;!j&&!N?(Z="Connect your providers",ae="Connect an LLM provider and create a gateway to unlock AI-powered features."):j?(Z="No gateways configured",ae="Create a gateway to expose your MCP tools to the chat."):(Z="No model provider connected",ae="Connect to a model provider to unlock AI-powered features.");let Xe;t[33]===Symbol.for("react.memo_cache_sentinel")?(Xe=a.jsxs(se.Header.Left,{children:[a.jsx("img",{src:co,alt:"deco chat",className:"size-5 rounded"}),a.jsx("span",{className:"text-sm font-medium",children:"deco chat"})]}),t[33]=Xe):Xe=t[33];let $e;t[34]!==o?($e=()=>o(!1),t[34]=o,t[35]=$e):$e=t[35];let Je;t[36]===Symbol.for("react.memo_cache_sentinel")?(Je=a.jsx(st,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[36]=Je):Je=t[36];let Ee;t[37]!==$e?(Ee=a.jsxs(se.Header,{children:[Xe,a.jsx(se.Header.Right,{children:a.jsx("button",{type:"button",onClick:$e,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:Je})})]}),t[37]=$e,t[38]=Ee):Ee=t[38];let Me;t[39]!==j||t[40]!==r||t[41]!==s?(Me=()=>r({to:j?"/$org/gateways":"/$org/mcps",params:{org:s},search:j?void 0:{action:"create"}}),t[39]=j,t[40]=r,t[41]=s,t[42]=Me):Me=t[42];const xt=j?"Create gateway":"Add connection";let Re;t[43]!==Me||t[44]!==xt?(Re=a.jsx(we,{variant:"outline",onClick:Me,children:xt}),t[43]=Me,t[44]=xt,t[45]=Re):Re=t[45];let Ae;t[46]!==ae||t[47]!==Re||t[48]!==Z?(Ae=a.jsx(se.Main,{className:"flex flex-col items-center",innerClassName:"max-w-2xl mx-auto w-full min-w-0",children:a.jsx(se.EmptyState,{children:a.jsx(vs,{title:Z,description:ae,actions:Re})})}),t[46]=ae,t[47]=Re,t[48]=Z,t[49]=Ae):Ae=t[49];let Qe;return t[50]!==Ee||t[51]!==Ae?(Qe=a.jsxs(se,{children:[Ee,Ae]}),t[50]=Ee,t[51]=Ae,t[52]=Qe):Qe=t[52],Qe}const k=F?.icon,A=F?.title||"deco chat";let B;t[53]===Symbol.for("react.memo_cache_sentinel")?(B=a.jsx(jt,{size:12}),t[53]=B):B=t[53];let K;t[54]!==k||t[55]!==A?(K=a.jsx($t,{icon:k,name:A,size:"xs",fallbackIcon:B}),t[54]=k,t[55]=A,t[56]=K):K=t[56];const oe=F?.title||"deco chat";let ne;t[57]!==oe?(ne=a.jsx("span",{className:"text-sm font-medium",children:oe}),t[57]=oe,t[58]=ne):ne=t[58];let U;t[59]!==K||t[60]!==ne?(U=a.jsxs(se.Header.Left,{children:[K,ne]}),t[59]=K,t[60]=ne,t[61]=U):U=t[61];let ee;t[62]!==c?(ee=()=>c(),t[62]=c,t[63]=ee):ee=t[63];let fe;t[64]===Symbol.for("react.memo_cache_sentinel")?(fe=a.jsx(Is,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[64]=fe):fe=t[64];let de;t[65]!==ee?(de=a.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:fe}),t[65]=ee,t[66]=de):de=t[66];let me;t[67]!==h?(me=()=>h(),t[67]=h,t[68]=me):me=t[68];let X;t[69]!==d||t[70]!==f||t[71]!==m||t[72]!==me||t[73]!==u?(X=a.jsx(io,{threads:u,activeThreadId:d,onSelectThread:m,onRemoveThread:f,onOpen:me}),t[69]=d,t[70]=f,t[71]=m,t[72]=me,t[73]=u,t[74]=X):X=t[74];let pe;t[75]!==o?(pe=()=>o(!1),t[75]=o,t[76]=pe):pe=t[76];let ze;t[77]===Symbol.for("react.memo_cache_sentinel")?(ze=a.jsx(st,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[77]=ze):ze=t[77];let ie;t[78]!==pe?(ie=a.jsx("button",{type:"button",onClick:pe,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[78]=pe,t[79]=ie):ie=t[79];let he;t[80]!==de||t[81]!==X||t[82]!==ie?(he=a.jsxs(se.Header.Right,{children:[de,X,ie]}),t[80]=de,t[81]=X,t[82]=ie,t[83]=he):he=t[83];let ge;t[84]!==U||t[85]!==he?(ge=a.jsxs(se.Header,{children:[U,he]}),t[84]=U,t[85]=he,t[86]=ge):ge=t[86];let Ne;t[87]!==I.messages||t[88]!==I.status||t[89]!==F?.description||t[90]!==F?.icon||t[91]!==F?.title?(Ne=a.jsx(se.Main,{innerClassName:"max-w-2xl mx-auto w-full min-w-0",children:I.messages.length===0?a.jsx(se.EmptyState,{children:a.jsx(no,{title:F?.title||"Ask deco chat",description:F?.description??"Ask anything about configuring model providers or using MCP Mesh.",avatarNode:a.jsx($t,{icon:F?.icon,name:F?.title||"deco chat",size:"lg",fallbackIcon:a.jsx(jt,{size:32}),className:"size-[60px]! rounded-[18px]!"})})}):a.jsx(se.Messages,{messages:I.messages,status:I.status,minHeightOffset:240})}),t[87]=I.messages,t[88]=I.status,t[89]=F?.description,t[90]=F?.icon,t[91]=F?.title,t[92]=Ne):Ne=t[92];const ft=v.length===0||!H,mt=I.status==="submitted"||I.status==="streaming",pt=v.length===0?"Add an LLM binding connection to start chatting":"Ask anything or @ for context";let _e;t[93]!==G?(_e=Z=>{Z&&G({gatewayId:Z})},t[93]=G,t[94]=_e):_e=t[94];let ke;t[95]!==Y||t[96]!==_e?(ke=a.jsx(se.Input.GatewaySelector,{disabled:!1,selectedGatewayId:Y,onGatewayChange:_e}),t[95]=Y,t[96]=_e,t[97]=ke):ke=t[97];const ht=H??void 0;let Ie;t[98]!==$||t[99]!==ht?(Ie=a.jsx(se.Input.ModelSelector,{disabled:!1,selectedModel:ht,onModelChange:$}),t[98]=$,t[99]=ht,t[100]=Ie):Ie=t[100];let Pe;t[101]!==I.messages||t[102]!==I.stop||t[103]!==E||t[104]!==ft||t[105]!==mt||t[106]!==pt||t[107]!==ke||t[108]!==Ie?(Pe=a.jsx(se.Footer,{children:a.jsx("div",{children:a.jsxs(se.Input,{onSubmit:E,onStop:I.stop,disabled:ft,isStreaming:mt,placeholder:pt,usageMessages:I.messages,children:[ke,Ie]})})}),t[101]=I.messages,t[102]=I.stop,t[103]=E,t[104]=ft,t[105]=mt,t[106]=pt,t[107]=ke,t[108]=Ie,t[109]=Pe):Pe=t[109];let Ye;return t[110]!==ge||t[111]!==Ne||t[112]!==Pe?(Ye=a.jsxs(se,{children:[ge,Ne,Pe]}),t[110]=ge,t[111]=Ne,t[112]=Pe,t[113]=Ye):Ye=t[113],Ye}function fo(){return null}function mo(t){return t??null}function po(t){const e=C.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let s;return e[2]!==n?(s=a.jsx(Jn,{"data-slot":"sheet",...n}),e[2]=n,e[3]=s):s=e[3],s}function ho(t){const e=C.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let s;return e[2]!==n?(s=a.jsx(ns,{"data-slot":"sheet-portal",...n}),e[2]=n,e[3]=s):s=e[3],s}function xo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("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",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx(os,{"data-slot":"sheet-overlay",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function go(t){const e=C.c(17);let n,s,o,r;e[0]!==t?({className:s,children:n,side:r,...o}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r):(n=e[1],s=e[2],o=e[3],r=e[4]);const l=r===void 0?"right":r;let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(xo,{}),e[5]=i):i=e[5];const c=l==="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=l==="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=l==="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=l==="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]!==s||e[7]!==c||e[8]!==d||e[9]!==m||e[10]!==f?(u=O("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,s),e[6]=s,e[7]=c,e[8]=d,e[9]=m,e[10]=f,e[11]=u):u=e[11];let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsxs(ss,{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:[a.jsx(st,{className:"size-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=h):h=e[12];let p;return e[13]!==n||e[14]!==o||e[15]!==u?(p=a.jsxs(ho,{children:[i,a.jsxs(ts,{"data-slot":"sheet-content",className:u,...o,children:[n,h]})]}),e[13]=n,e[14]=o,e[15]=u,e[16]=p):p=e[16],p}function bo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("flex flex-col gap-1.5 p-4",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-slot":"sheet-header",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function vo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("text-foreground font-semibold",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx(Qn,{"data-slot":"sheet-title",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function yo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("text-muted-foreground text-sm",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx(es,{"data-slot":"sheet-description",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function vn(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("bg-accent animate-pulse rounded-md",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-slot":"skeleton",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}const So="sidebar_state",jo=3600*24*7,wo="16rem",Co="18rem",zo="3rem",No="b",yn=x.createContext(null);function Nt(){const t=x.useContext(yn);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function _o(t){const e=C.c(21),{defaultOpen:n,open:s,onOpenChange:o,children:r}=t,l=n===void 0?!0:n,i=qe(),[c,d]=x.useState(!1),[m,f]=x.useState(l),u=s??m;let h;e[0]!==u||e[1]!==o?(h=I=>{const P=typeof I=="function"?I(u):I;o?o(P):f(P),document.cookie=`${So}=${P}; path=/; max-age=${jo}`},e[0]=u,e[1]=o,e[2]=h):h=e[2];const p=h;let v;e[3]!==i||e[4]!==p?(v=()=>i?d(Io):p(ko),e[3]=i,e[4]=p,e[5]=v):v=e[5];const b=v;let g,y;e[6]!==b?(g=()=>{const I=P=>{if(P.key===No&&(P.metaKey||P.ctrlKey)){const T=P.target;if(T.tagName==="INPUT"||T.tagName==="TEXTAREA"||T.isContentEditable)return;P.preventDefault(),b()}};return globalThis.addEventListener("keydown",I),()=>globalThis.removeEventListener("keydown",I)},y=[b],e[6]=b,e[7]=g,e[8]=y):(g=e[7],y=e[8]),x.useEffect(g,y);const j=u?"expanded":"collapsed";let N;e[9]!==i||e[10]!==u||e[11]!==c||e[12]!==p||e[13]!==j||e[14]!==b?(N={state:j,open:u,setOpen:p,isMobile:i,openMobile:c,setOpenMobile:d,toggleSidebar:b},e[9]=i,e[10]=u,e[11]=c,e[12]=p,e[13]=j,e[14]=b,e[15]=N):N=e[15];const _=N;let w;e[16]!==r?(w=a.jsx(ws,{delayDuration:0,children:r}),e[16]=r,e[17]=w):w=e[17];let S;return e[18]!==_||e[19]!==w?(S=a.jsx(yn.Provider,{value:_,children:w}),e[18]=_,e[19]=w,e[20]=S):S=e[20],S}function ko(t){return!t}function Io(t){return!t}function Po(t){const e=C.c(14);let n,s,o,r;e[0]!==t?({className:s,style:r,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r):(n=e[1],s=e[2],o=e[3],r=e[4]);let l;e[5]!==r?(l={"--sidebar-width":wo,"--sidebar-width-icon":zo,...r},e[5]=r,e[6]=l):l=e[6];const i=l;let c;e[7]!==s?(c=O("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=c):c=e[8];let d;return e[9]!==n||e[10]!==o||e[11]!==i||e[12]!==c?(d=a.jsx("div",{"data-slot":"sidebar-wrapper",style:i,className:c,...o,children:n}),e[9]=n,e[10]=o,e[11]=i,e[12]=c,e[13]=d):d=e[13],d}function $o(t){const e=C.c(46);let n,s,o,r,l,i;e[0]!==t?({side:r,variant:l,collapsible:i,className:s,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r,e[5]=l,e[6]=i):(n=e[1],s=e[2],o=e[3],r=e[4],l=e[5],i=e[6]);const c=r===void 0?"left":r,d=l===void 0?"sidebar":l,m=i===void 0?"offcanvas":i,{isMobile:f,state:u,openMobile:h,setOpenMobile:p}=Nt();if(m==="none"){let P;e[7]!==s?(P=O("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),e[7]=s,e[8]=P):P=e[8];let T;return e[9]!==n||e[10]!==o||e[11]!==P?(T=a.jsx("div",{"data-slot":"sidebar",className:P,...o,children:n}),e[9]=n,e[10]=o,e[11]=P,e[12]=T):T=e[12],T}if(f){let P;e[13]===Symbol.for("react.memo_cache_sentinel")?(P={"--sidebar-width":Co},e[13]=P):P=e[13];let T;e[14]===Symbol.for("react.memo_cache_sentinel")?(T=a.jsxs(bo,{className:"sr-only",children:[a.jsx(vo,{children:"Sidebar"}),a.jsx(yo,{children:"Displays the mobile sidebar."})]}),e[14]=T):T=e[14];let M;e[15]!==n?(M=a.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[15]=n,e[16]=M):M=e[16];let L;e[17]!==c||e[18]!==M?(L=a.jsxs(go,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:P,side:c,children:[T,M]}),e[17]=c,e[18]=M,e[19]=L):L=e[19];let G;return e[20]!==h||e[21]!==o||e[22]!==p||e[23]!==L?(G=a.jsx(po,{open:h,onOpenChange:p,...o,children:L}),e[20]=h,e[21]=o,e[22]=p,e[23]=L,e[24]=G):G=e[24],G}const v=u==="collapsed"?m:"",b=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 g;e[25]!==b?(g=O("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",b),e[25]=b,e[26]=g):g=e[26];let y;e[27]!==g?(y=a.jsx("div",{"data-slot":"sidebar-gap",className:g}),e[27]=g,e[28]=y):y=e[28];const j=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)]",N=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 _;e[29]!==s||e[30]!==j||e[31]!==N?(_=O("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",j,N,s),e[29]=s,e[30]=j,e[31]=N,e[32]=_):_=e[32];let w;e[33]!==n?(w=a.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:n}),e[33]=n,e[34]=w):w=e[34];let S;e[35]!==o||e[36]!==_||e[37]!==w?(S=a.jsx("div",{"data-slot":"sidebar-container",className:_,...o,children:w}),e[35]=o,e[36]=_,e[37]=w,e[38]=S):S=e[38];let I;return e[39]!==c||e[40]!==u||e[41]!==S||e[42]!==v||e[43]!==y||e[44]!==d?(I=a.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:[y,S]}),e[39]=c,e[40]=u,e[41]=S,e[42]=v,e[43]=y,e[44]=d,e[45]=I):I=e[45],I}function Eo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("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",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("main",{"data-slot":"sidebar-inset",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Mo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("h-4 m-0! w-full",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-sidebar":"separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Ro(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Ao(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function To(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("w-full text-sm",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Do(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("flex w-full min-w-0 flex-col gap-1",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function lt(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("group/menu-item relative",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}const Lo=rs("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 Sn(t){const e=C.c(28);let n,s,o,r,l,i,c;e[0]!==t?({asChild:o,isActive:r,variant:l,size:i,tooltip:c,className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r,e[5]=l,e[6]=i,e[7]=c):(n=e[1],s=e[2],o=e[3],r=e[4],l=e[5],i=e[6],c=e[7]);const d=o===void 0?!1:o,m=r===void 0?!1:r,f=l===void 0?"default":l,u=i===void 0?"default":i,h=d?as:"button",{isMobile:p,state:v}=Nt();let b;e[8]!==n||e[9]!==u||e[10]!==f?(b=O(Lo({variant:f,size:u}),n),e[8]=n,e[9]=u,e[10]=f,e[11]=b):b=e[11];let g;e[12]!==h||e[13]!==m||e[14]!==s||e[15]!==u||e[16]!==b?(g=a.jsx(h,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:b,...s}),e[12]=h,e[13]=m,e[14]=s,e[15]=u,e[16]=b,e[17]=g):g=e[17];const y=g;if(!c)return y;if(typeof c=="string"){let S;e[18]!==c?(S={children:c},e[18]=c,e[19]=S):S=e[19],c=S}let j;e[20]!==y?(j=a.jsx(Cs,{asChild:!0,children:y}),e[20]=y,e[21]=j):j=e[21];const N=v!=="collapsed"||p;let _;e[22]!==N||e[23]!==c?(_=a.jsx(js,{side:"right",align:"center",hidden:N,...c}),e[22]=N,e[23]=c,e[24]=_):_=e[24];let w;return e[25]!==j||e[26]!==_?(w=a.jsxs(zs,{children:[j,_]}),e[25]=j,e[26]=_,e[27]=w):w=e[27],w}function Oo(t){const e=C.c(26),{item:n}=t,s=at(),{org:o}=Ze(),r=Jt(o.id),l=Fs(o.id);let i;e[0]!==l.update||e[1]!==n.url||e[2]!==r?.sidebar_items?(i=async()=>{const N=(r?.sidebar_items||[]).filter(_=>_.url!==n.url);await l.update.mutateAsync({sidebar_items:N})},e[0]=l.update,e[1]=n.url,e[2]=r?.sidebar_items,e[3]=i):i=e[3];const c=i;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==n.icon?(m=d.test(n.icon),e[5]=n.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==n.url||e[8]!==s?(u=()=>{s({to:n.url})},e[7]=n.url,e[8]=s,e[9]=u):u=e[9];const h=n.title;let p;e[10]!==f||e[11]!==n.icon||e[12]!==n.title?(p=a.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?a.jsx("img",{src:n.icon,alt:n.title,className:"h-4 w-4 rounded object-cover"}):a.jsx(Vs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=n.icon,e[12]=n.title,e[13]=p):p=e[13];let v;e[14]!==n.title?(v=n.title.toLocaleLowerCase(),e[14]=n.title,e[15]=v):v=e[15];let b;e[16]!==v?(b=a.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:a.jsx("span",{className:"truncate text-sm w-full capitalize",children:v})}),e[16]=v,e[17]=b):b=e[17];let g;e[18]!==c?(g=a.jsx(st,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:j=>{j.preventDefault(),j.stopPropagation(),c()}}),e[18]=c,e[19]=g):g=e[19];let y;return e[20]!==n.title||e[21]!==u||e[22]!==p||e[23]!==b||e[24]!==g?(y=a.jsx(lt,{children:a.jsxs(Sn,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:h,children:[p,b,g]})}),e[20]=n.title,e[21]=u,e[22]=p,e[23]=b,e[24]=g,e[25]=y):y=e[25],y}function Ho(){const t=C.c(4),{org:e}=Ze(),s=Jt(e.id)?.sidebar_items;if(!s?.length)return null;let o;t[0]!==s?(o=s.map(Bo),t[0]=s,t[1]=o):o=t[1];let r;return t[2]!==o?(r=a.jsx(jn,{children:o}),t[2]=o,t[3]=r):r=t[3],r}function Bo(t){return a.jsx(Oo,{item:t},t.url)}function At(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(lt,{children:a.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:a.jsx(vn,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function jn(t){const e=C.c(4),{children:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(Mo,{className:"my-2 -ml-1"}),e[0]=s):s=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(lt,{children:a.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:a.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=o):o=e[1];let r;return e[2]!==n?(r=a.jsxs(a.Fragment,{children:[s,o,n]}),e[2]=n,e[3]=r):r=e[3],r}function Uo(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(x.Suspense,{fallback:a.jsxs(jn,{children:[a.jsx(At,{}),a.jsx(At,{})]}),children:a.jsx(Ho,{})}),t[0]=e):e=t[0],e}function Go(){const t=C.c(43),{locator:e}=Ze(),n=at();let s;t[0]!==e?(s=Et.parse(e),t[0]=e,t[1]=s):s=t[1];const{org:o}=s;let r;t[2]!==e?(r=Et.isOrgAdminProject(e),t[2]=e,t[3]=r):r=t[3];const l=r;let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(dn,{}),t[4]=i):i=t[4];let c;t[5]!==n||t[6]!==o?(c={key:"home",label:"Home",icon:i,onClick:()=>n({to:"/$org",params:{org:o}})},t[5]=n,t[6]=o,t[7]=c):c=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(rn,{}),t[8]=d):d=t[8];let m;t[9]!==n||t[10]!==o?(m={key:"store",label:"Store",icon:d,onClick:()=>n({to:"/$org/store",params:{org:o}})},t[9]=n,t[10]=o,t[11]=m):m=t[11];let f;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsx(Ss,{}),t[12]=f):f=t[12];let u;t[13]!==n||t[14]!==o?(u={key:"mcps",label:"MCP Servers",icon:f,onClick:()=>n({to:"/$org/mcps",params:{org:o}})},t[13]=n,t[14]=o,t[15]=u):u=t[15];let h;t[16]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsx(jt,{}),t[16]=h):h=t[16];let p;t[17]!==n||t[18]!==o?(p={key:"gateways",label:"MCP Gateways",icon:h,onClick:()=>n({to:"/$org/gateways",params:{org:o}})},t[17]=n,t[18]=o,t[19]=p):p=t[19];let v;t[20]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(on,{}),t[20]=v):v=t[20];let b;t[21]!==n||t[22]!==o?(b={key:"monitoring",label:"Monitoring",icon:v,onClick:()=>n({to:"/$org/monitoring",params:{org:o}})},t[21]=n,t[22]=o,t[23]=b):b=t[23];let g;t[24]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx(xn,{}),t[24]=g):g=t[24];let y;t[25]!==n||t[26]!==o?(y={key:"members",label:"Members",icon:g,onClick:()=>n({to:"/$org/members",params:{org:o}})},t[25]=n,t[26]=o,t[27]=y):y=t[27];let j;t[28]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx(pn,{}),t[28]=j):j=t[28];let N;t[29]!==n||t[30]!==o?(N={key:"settings",label:"Settings",icon:j,onClick:()=>n({to:"/$org/settings",params:{org:o}})},t[29]=n,t[30]=o,t[31]=N):N=t[31];let _;t[32]!==b||t[33]!==y||t[34]!==N||t[35]!==c||t[36]!==m||t[37]!==u||t[38]!==p?(_=[c,m,u,p,b,y,N],t[32]=b,t[33]=y,t[34]=N,t[35]=c,t[36]=m,t[37]=u,t[38]=p,t[39]=_):_=t[39];const w=_;let S;return t[40]!==w||t[41]!==l?(S=l?w:[],t[40]=w,t[41]=l,t[42]=S):S=t[42],S}function wn(t){const e=C.c(10),{navigationItems:n,footer:s,additionalContent:o,variant:r,collapsible:l}=t,i=r===void 0?"sidebar":r,c=l===void 0?"icon":l;let d;e[0]!==n?(d=n.map(Wo),e[0]=n,e[1]=d):d=e[1];let m;e[2]!==o||e[3]!==d?(m=a.jsx(Ro,{className:"flex-1 overflow-x-hidden",children:a.jsx(Ao,{className:"font-medium",children:a.jsx(To,{children:a.jsxs(Do,{className:"gap-0.5",children:[d,o]})})})}),e[2]=o,e[3]=d,e[4]=m):m=e[4];let f;return e[5]!==c||e[6]!==s||e[7]!==m||e[8]!==i?(f=a.jsxs($o,{variant:i,collapsible:c,children:[m,s]}),e[5]=c,e[6]=s,e[7]=m,e[8]=i,e[9]=f):f=e[9],f}function Wo(t){return a.jsx(lt,{children:a.jsxs(Sn,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:t.onClick,isActive:t.isActive,tooltip:t.label,children:[a.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:t.icon}),a.jsx("span",{className:"truncate",children:t.label})]})},t.key)}wn.Skeleton=function(){return a.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>a.jsx("div",{className:"w-full h-8",children:a.jsx(vn,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Vo(){const t=C.c(3),e=Go();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(a.Fragment,{children:a.jsx(Xt,{children:a.jsx(x.Suspense,{fallback:null,children:a.jsx(Uo,{})})})}),t[0]=n):n=t[0];let s;return t[1]!==e?(s=a.jsx(wn,{navigationItems:e,additionalContent:n}),t[1]=e,t[2]=s):s=t[2],s}function Fo(t){const e=C.c(12);let n,s,o,r;e[0]!==t?({className:n,orientation:o,decorative:r,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r):(n=e[1],s=e[2],o=e[3],r=e[4]);const l=o===void 0?"horizontal":o,i=r===void 0?!0:r;let c;e[5]!==n?(c=O("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),e[5]=n,e[6]=c):c=e[6];let d;return e[7]!==i||e[8]!==l||e[9]!==s||e[10]!==c?(d=a.jsx(ls,{"data-slot":"separator-root",decorative:i,orientation:l,className:c,...s}),e[7]=i,e[8]=l,e[9]=s,e[10]=c,e[11]=d):d=e[11],d}const Cn=x.createContext(null);function Ko(){const t=x.useContext(Cn);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function Zo(t){const e=C.c(10),{children:n,onItemHover:s}=t,[o,r]=x.useState(null);let l;e[0]!==s?(l=f=>{r(f),s?.(f)},e[0]=s,e[1]=l):l=e[1];const i=l;let c;e[2]!==o||e[3]!==i?(c={hoveredItem:o,setHoveredItem:i},e[2]=o,e[3]=i,e[4]=c):c=e[4];let d;e[5]!==n?(d=a.jsx(Zt,{children:n}),e[5]=n,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=a.jsx(Cn.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function qo(t){const e=C.c(6),{children:n,onClick:s}=t;let o;e[0]!==n||e[1]!==s?(o=a.jsx(we,{variant:"link",className:"p-0.5 h-auto",onClick:s,type:"button",children:n}),e[0]=n,e[1]=s,e[2]=o):o=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(qt,{asChild:!0,children:a.jsx(we,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:a.jsx(an,{size:16,className:"opacity-50"})})}),e[3]=r):r=e[3];let l;return e[4]!==o?(l=a.jsxs("div",{className:"flex items-center gap-1",children:[o,r]}),e[4]=o,e[5]=l):l=e[5],l}function Yo(t){const e=C.c(8),{item:n,fallback:s}=t,o=s===void 0?"":s,r=n?.avatarUrl??"",l=n?.name??o;let i;e[0]!==r||e[1]!==l?(i=a.jsx(Be,{url:r,fallback:l,size:"xs",objectFit:"contain"}),e[0]=r,e[1]=l,e[2]=i):i=e[2];const c=n?.name??o;let d;e[3]!==c?(d=a.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==i||e[6]!==d?(m=a.jsxs("div",{className:"flex items-center gap-2",children:[i,d]}),e[5]=i,e[6]=d,e[7]=m):m=e[7],m}function Xo(t){const e=C.c(6),{children:n,align:s}=t,o=s===void 0?"start":s,l=x.Children.toArray(n).filter(Jo).length===1?"280px":"480px";let i;e[0]!==l?(i={width:l},e[0]=l,e[1]=i):i=e[1];let c;return e[2]!==o||e[3]!==n||e[4]!==i?(c=a.jsx(Yt,{align:o,className:"p-0 flex items-start",style:i,children:n}),e[2]=o,e[3]=n,e[4]=i,e[5]=c):c=e[5],c}function Jo(t){return x.isValidElement(t)&&(t.type===Nn||t.type===zn)}function zn(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=O("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}const Nn=zn;function Qo(t){const e=C.c(6),{placeholder:n,value:s,onChange:o}=t,r=n===void 0?"Search...":n;let l;e[0]!==o?(l=c=>o(c.target.value),e[0]=o,e[1]=l):l=e[1];let i;return e[2]!==r||e[3]!==l||e[4]!==s?(i=a.jsx(Zs,{placeholder:r,value:s,onChange:l,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=r,e[3]=l,e[4]=s,e[5]=i):i=e[5],i}function er(t){const e=C.c(6),{children:n,emptyMessage:s}=t,o=s===void 0?"No items found.":s,r=x.Children.count(n)>0;let l;e[0]!==o||e[1]!==r?(l=!r&&a.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:o}),e[0]=o,e[1]=r,e[2]=l):l=e[2];let i;return e[3]!==n||e[4]!==l?(i=a.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[l,n]}),e[3]=n,e[4]=l,e[5]=i):i=e[5],i}function tr(t){const e=C.c(15),{item:n,onClick:s,onHover:o,children:r}=t,l=Ko();let i;e[0]!==l||e[1]!==n||e[2]!==o?(i=()=>{l.setHoveredItem(n.slug),o?.(n)},e[0]=l,e[1]=n,e[2]=o,e[3]=i):i=e[3];const c=i;let d;e[4]!==n||e[5]!==s?(d=()=>s(n),e[4]=n,e[5]=s,e[6]=d):d=e[6];let m;e[7]!==r||e[8]!==n.avatarUrl||e[9]!==n.name?(m=r||a.jsxs(a.Fragment,{children:[a.jsx(Be,{url:n.avatarUrl??"",fallback:n.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),a.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n.name})]}),e[7]=r,e[8]=n.avatarUrl,e[9]=n.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=a.jsx(we,{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 nr(t){const e=C.c(2),{children:n}=t;let s;return e[0]!==n?(s=a.jsx("div",{className:"px-1 pb-1 pt-0.5",children:n}),e[0]=n,e[1]=s):s=e[1],s}function sr(t){const e=C.c(11),{onClick:n,icon:s,children:o,variant:r}=t,i=(r===void 0?"default":r)==="muted"&&"text-muted-foreground";let c;e[0]!==i?(c=O("w-full justify-start font-normal",i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==s?(d=s&&a.jsx("span",{className:"[&>svg]:size-4",children:s}),e[2]=s,e[3]=d):d=e[3];let m;e[4]!==o?(m=a.jsx("span",{children:o}),e[4]=o,e[5]=m):m=e[5];let f;return e[6]!==n||e[7]!==c||e[8]!==d||e[9]!==m?(f=a.jsxs(we,{variant:"ghost",size:"sm",className:c,onClick:n,children:[d,m]}),e[6]=n,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function or(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(Fo,{}),t[0]=e):e=t[0],e}function rr(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const re=Object.assign(Zo,{Trigger:qo,CurrentItem:Yo,Content:Xo,Panel:Nn,Search:Qo,Items:er,Item:tr,Actions:nr,Action:sr,Separator:or,Skeleton:rr});function wt(){const t=C.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:n}=Vt(e),{data:s}=Fe.useListOrganizations(),o=at();let r;t[1]!==n||t[2]!==s?(r=s?.find(W=>W.slug===n),t[1]=n,t[2]=s,t[3]=r):r=t[3];const l=r,[i,c]=x.useState(""),[d,m]=x.useState(!1);let f,u,h,p,v,b,g,y;if(t[4]!==l||t[5]!==o||t[6]!==n||t[7]!==i||t[8]!==s){const V=(s?(()=>{const J=s.filter(Q=>Q.name.toLowerCase().includes(i.toLowerCase()));if(n){const Q=J.findIndex(z=>z.slug===n);if(Q>0){const z=J[Q];z&&(J.splice(Q,1),J.unshift(z))}}return J})():[]).map(ar);let H;t[17]!==l?(H=l?{slug:l.slug,name:l.name,avatarUrl:l.logo}:void 0,t[17]=l,t[18]=H):H=t[18];const ce=H;p=re;let Y;t[19]!==o||t[20]!==n?(Y=()=>o({to:"/$org",params:{org:n??""}}),t[19]=o,t[20]=n,t[21]=Y):Y=t[21];let te;t[22]!==ce?(te=a.jsx(re.CurrentItem,{item:ce}),t[22]=ce,t[23]=te):te=t[23],t[24]!==Y||t[25]!==te?(y=a.jsx(re.Trigger,{onClick:Y,children:te}),t[24]=Y,t[25]=te,t[26]=y):y=t[26],h=re.Content,u=re.Panel,t[27]!==i?(g=a.jsx(re.Search,{placeholder:"Search organizations...",value:i,onChange:c}),t[27]=i,t[28]=g):g=t[28],f=re.Items,v="No organizations found.";let F;t[29]!==o?(F=J=>a.jsx(re.Item,{item:J,onClick:Q=>o({to:"/$org",params:{org:Q.slug}})},J.slug),t[29]=o,t[30]=F):F=t[30],b=V.map(F),t[4]=l,t[5]=o,t[6]=n,t[7]=i,t[8]=s,t[9]=f,t[10]=u,t[11]=h,t[12]=p,t[13]=v,t[14]=b,t[15]=g,t[16]=y}else f=t[9],u=t[10],h=t[11],p=t[12],v=t[13],b=t[14],g=t[15],y=t[16];let j;t[31]!==f||t[32]!==v||t[33]!==b?(j=a.jsx(f,{emptyMessage:v,children:b}),t[31]=f,t[32]=v,t[33]=b,t[34]=j):j=t[34];let N,_;t[35]===Symbol.for("react.memo_cache_sentinel")?(N=a.jsx(re.Actions,{children:a.jsx(re.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),_=a.jsx(re.Separator,{}),t[35]=N,t[36]=_):(N=t[35],_=t[36]);let w;t[37]!==o?(w=()=>o({to:"/"}),t[37]=o,t[38]=w):w=t[38];let S;t[39]===Symbol.for("react.memo_cache_sentinel")?(S=a.jsx(qs,{}),t[39]=S):S=t[39];let I;t[40]!==w?(I=a.jsx(re.Actions,{children:a.jsx(re.Action,{onClick:w,icon:S,children:"See all organizations"})}),t[40]=w,t[41]=I):I=t[41];let P;t[42]!==u||t[43]!==I||t[44]!==g||t[45]!==j?(P=a.jsxs(u,{children:[g,j,N,_,I]}),t[42]=u,t[43]=I,t[44]=g,t[45]=j,t[46]=P):P=t[46];let T;t[47]!==h||t[48]!==P?(T=a.jsx(h,{children:P}),t[47]=h,t[48]=P,t[49]=T):T=t[49];let M;t[50]!==p||t[51]!==T||t[52]!==y?(M=a.jsxs(p,{children:[y,T]}),t[50]=p,t[51]=T,t[52]=y,t[53]=M):M=t[53];let L;t[54]!==d?(L=a.jsx(Ks,{open:d,onOpenChange:m}),t[54]=d,t[55]=L):L=t[55];let G;return t[56]!==M||t[57]!==L?(G=a.jsxs(a.Fragment,{children:[M,L]}),t[56]=M,t[57]=L,t[58]=G):G=t[58],G}function ar(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}wt.Skeleton=re.Skeleton;const _n=x.createContext({setOpen:()=>{}}),lr=()=>x.useContext(_n),ir=t=>{const e=C.c(25);let n,s,o,r,l;e[0]!==t?({children:n,defaultOpen:s,open:r,onOpenChange:o,...l}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r,e[5]=l):(n=e[1],s=e[2],o=e[3],r=e[4],l=e[5]);const i=s??!1;let c;e[6]!==o||e[7]!==r||e[8]!==i?(c={prop:r,defaultProp:i,onChange:o},e[6]=o,e[7]=r,e[8]=i,e[9]=c):c=e[9];const[d,m]=Os(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==n||e[13]!==d||e[14]!==l||e[15]!==m?(u=a.jsx(Hs,{open:d,onOpenChange:m,...l,children:n}),e[12]=n,e[13]=d,e[14]=l,e[15]=m,e[16]=u):u=e[16];let h;e[17]!==d||e[18]!==l||e[19]!==m||e[20]!==u?(h=a.jsx(Js,{open:d,onOpenChange:m,...l,children:u}),e[17]=d,e[18]=l,e[19]=m,e[20]=u,e[21]=h):h=e[21];let p;return e[22]!==f||e[23]!==h?(p=a.jsx(_n.Provider,{value:f,children:h}),e[22]=f,e[23]=h,e[24]=p):p=e[24],p},cr=t=>{const{children:e,title:n,...s}=t,o=qe(),{className:r,...l}=s;return o?a.jsxs(Ts,{...l,children:[a.jsx(Ds,{className:"hidden",children:a.jsx(Ls,{children:n})}),a.jsx("div",{className:O("flex flex-col gap-2 p-2 py-4",r),children:e})]}):a.jsx(Xs,{...s,children:e})},dr=t=>{const{children:e,...n}=t,{setOpen:s}=lr(),o=qe(),{className:r,...l}=n;return o?a.jsx("div",{...l,onClick:i=>{s(!1);const{onClick:c}=l;c?.(i)},className:O("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",r),children:e}):a.jsx(Qs,{...n,children:e})},ur=t=>{const e=C.c(7);let n,s;e[0]!==t?({children:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);const o=qe();let r;return e[3]!==n||e[4]!==o||e[5]!==s?(r=o?a.jsx(As,{asChild:!0,children:n}):a.jsx(Ys,{...s,children:n}),e[3]=n,e[4]=o,e[5]=s,e[6]=r):r=e[6],r},fr=t=>{const e=C.c(7);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);const o=qe();let r;return e[3]!==n||e[4]!==o||e[5]!==s?(r=o?a.jsx(Mt,{className:O(n),...s}):a.jsx(Mt,{className:O(n),...s}),e[3]=n,e[4]=o,e[5]=s,e[6]=r):r=e[6],r};function mr(t){const e=C.c(11),{user:n,trigger:s,align:o,children:r}=t,l=o===void 0?"start":o;let i;e[0]!==s||e[1]!==n?(i=s(n),e[0]=s,e[1]=n,e[2]=i):i=e[2];let c;e[3]!==i?(c=a.jsx(ur,{asChild:!0,children:a.jsx("div",{children:i})}),e[3]=i,e[4]=c):c=e[4];let d;e[5]!==l||e[6]!==r?(d=a.jsx(cr,{side:"top",align:l,className:"md:w-[240px]",children:r}),e[5]=l,e[6]=r,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=a.jsxs(ir,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function pr(t){const e=C.c(8),{children:n,onClick:s,className:o,asChild:r}=t;let l;e[0]!==r||e[1]!==n||e[2]!==s?(l=r?n:a.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:s,children:n}),e[0]=r,e[1]=n,e[2]=s,e[3]=l):l=e[3];let i;return e[4]!==r||e[5]!==o||e[6]!==l?(i=a.jsx(dr,{asChild:r,className:o,children:l}),e[4]=r,e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function hr(t){const e=C.c(2),{className:n}=t;let s;return e[0]!==n?(s=a.jsx(fr,{className:n}),e[0]=n,e[1]=s):s=e[1],s}function xr(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const be=Object.assign(mr,{Item:pr,Separator:hr,Skeleton:xr});function gr(t){const e=C.c(32),{open:n,onOpenChange:s,user:o,userImage:r}=t,[l,i]=x.useState(!1);let c;e[0]!==o.id?(c=()=>{navigator.clipboard.writeText(o.id),i(!0),setTimeout(()=>i(!1),2e3)},e[0]=o.id,e[1]=c):c=e[1];const d=c;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsxs(Qt,{children:[a.jsx(en,{children:"Profile"}),a.jsx(tn,{children:"Your account information"})]}),e[2]=m):m=e[2];const f=o.name||o.email||"U";let u;e[3]!==f||e[4]!==r?(u=a.jsx(Be,{url:r,fallback:f,shape:"circle",size:"2xl"}),e[3]=f,e[4]=r,e[5]=u):u=e[5];const h=o.name||o.email;let p;e[6]!==h?(p=a.jsx("div",{className:"text-lg font-semibold text-center",children:h}),e[6]=h,e[7]=p):p=e[7];let v;e[8]!==o.email?(v=a.jsx("div",{className:"text-sm text-muted-foreground text-center",children:o.email}),e[8]=o.email,e[9]=v):v=e[9];let b;e[10]!==p||e[11]!==v?(b=a.jsxs("div",{className:"flex flex-col items-center gap-2 w-full",children:[p,v]}),e[10]=p,e[11]=v,e[12]=b):b=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"User ID"}),e[13]=g):g=e[13];let y;e[14]!==o.id?(y=a.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[g,a.jsx("span",{className:"text-sm font-mono truncate",children:o.id})]}),e[14]=o.id,e[15]=y):y=e[15];let j;e[16]!==l?(j=l?a.jsx(Ns,{size:16,className:"text-green-600"}):a.jsx(eo,{size:16,className:"text-muted-foreground"}),e[16]=l,e[17]=j):j=e[17];let N;e[18]!==d||e[19]!==j?(N=a.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:j}),e[18]=d,e[19]=j,e[20]=N):N=e[20];let _;e[21]!==y||e[22]!==N?(_=a.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:[y,N]}),e[21]=y,e[22]=N,e[23]=_):_=e[23];let w;e[24]!==_||e[25]!==u||e[26]!==b?(w=a.jsxs(nn,{className:"sm:max-w-md",children:[m,a.jsxs("div",{className:"flex flex-col items-center gap-6 py-4",children:[u,b,_]})]}),e[24]=_,e[25]=u,e[26]=b,e[27]=w):w=e[27];let S;return e[28]!==s||e[29]!==n||e[30]!==w?(S=a.jsx(sn,{open:n,onOpenChange:s,children:w}),e[28]=s,e[29]=n,e[30]=w,e[31]=S):S=e[31],S}function br(t){const e=C.c(5),{open:n,onOpenChange:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsxs(Qt,{children:[a.jsx(en,{children:"Invitations"}),a.jsx(tn,{children:"Your pending organization invitations"})]}),e[0]=o):o=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsxs(nn,{className:"sm:max-w-lg",children:[o,a.jsx("div",{className:"max-h-[420px] overflow-auto pr-1",children:a.jsx(ds,{})})]}),e[1]=r):r=e[1];let l;return e[2]!==s||e[3]!==n?(l=a.jsx(sn,{open:n,onOpenChange:s,children:r}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function vr(t){const e=C.c(31),{user:n,userImage:s,hasInvites:o,showInvitesItem:r}=t,[l,i]=x.useState(!1),[c,d]=x.useState(!1);let m;e[0]!==o||e[1]!==n.email||e[2]!==n.name||e[3]!==s?(m=()=>a.jsxs("div",{className:"relative",children:[a.jsx(Be,{url:s,fallback:n.name||n.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all"}),o&&a.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]=o,e[1]=n.email,e[2]=n.name,e[3]=s,e[4]=m):m=e[4];let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsxs(be.Item,{onClick:()=>i(!0),children:[a.jsx(hn,{className:"text-muted-foreground",size:18}),"Profile"]}),e[5]=f):f=e[5];let u;e[6]!==o||e[7]!==r?(u=r&&a.jsxs(be.Item,{onClick:()=>d(!0),children:[a.jsx(mn,{className:"text-muted-foreground",size:18}),"Invitations",o&&a.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]}),e[6]=o,e[7]=r,e[8]=u):u=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsx(be.Separator,{}),e[9]=h):h=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsx(cs,{className:"w-4 h-4 text-muted-foreground"}),e[10]=p):p=e[10];let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(be.Item,{asChild:!0,children:a.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:[p,"decocms/admin",a.jsx(Rt,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[11]=v):v=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx(cn,{className:"text-muted-foreground",size:18}),e[12]=b):b=e[12];let g,y;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx(be.Item,{asChild:!0,children:a.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[b,"Homepage",a.jsx(Rt,{size:18,className:"ml-auto text-muted-foreground"})]})}),y=a.jsx(be.Separator,{}),e[13]=g,e[14]=y):(g=e[13],y=e[14]);let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsxs(be.Item,{onClick:yr,children:[a.jsx(fn,{size:18,className:"text-muted-foreground"}),"Log out"]}),e[15]=j):j=e[15];let N;e[16]!==m||e[17]!==u||e[18]!==n?(N=a.jsxs(be,{user:n,trigger:m,align:"end",children:[f,u,h,v,g,y,j]}),e[16]=m,e[17]=u,e[18]=n,e[19]=N):N=e[19];let _;e[20]!==l||e[21]!==n||e[22]!==s?(_=l&&a.jsx(gr,{open:l,onOpenChange:i,user:n,userImage:s}),e[20]=l,e[21]=n,e[22]=s,e[23]=_):_=e[23];let w;e[24]!==c||e[25]!==r?(w=r&&c&&a.jsx(br,{open:c,onOpenChange:d}),e[24]=c,e[25]=r,e[26]=w):w=e[26];let S;return e[27]!==N||e[28]!==_||e[29]!==w?(S=a.jsxs(a.Fragment,{children:[N,_,w]}),e[27]=N,e[28]=_,e[29]=w,e[30]=S):S=e[30],S}function yr(){return Fe.signOut()}function Sr(){const{data:t}=Fe.useSession(),e=x.useContext(is),{data:n}=e.hooks.useListUserInvitations(),o=(n??[]).length>0;if(!t?.user)return a.jsx(Be,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer",muted:!0});const r=t.user,l={...r,name:r.name??void 0},i=r.image;return a.jsx(vr,{user:l,userImage:i,hasInvites:o,showInvitesItem:!0})}function jr(t){const e=C.c(6),{children:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(us,{children:a.jsx(Ft,{})}),e[0]=s):s=e[0];let o;e[1]!==n?(o=a.jsx(fs,{children:n}),e[1]=n,e[2]=o):o=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(ms,{children:a.jsx(ps,{to:"/login",replace:!0})}),e[3]=r):r=e[3];let l;return e[4]!==o?(l=a.jsxs(a.Fragment,{children:[s,o,r]}),e[4]=o,e[5]=l):l=e[5],l}function wr(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=O("fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}function Cr(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=O("flex items-center justify-center px-2 h-full border-r border-border",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}function zr(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=O("flex items-center gap-2 px-2 h-full",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}function Nr(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=O("flex items-center gap-2 px-2 h-full flex-1",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}function _r(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=O("flex items-center gap-2 px-2 h-full ml-auto",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}function kr(){const t=C.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:a.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:a.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=n):n=t[1];let s;return t[2]===Symbol.for("react.memo_cache_sentinel")?(s=a.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,n,a.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:a.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=s):s=t[2],s}const et=Object.assign(wr,{Sidebar:Cr,Left:zr,Center:Nr,Right:_r,Skeleton:kr}),it=x.createContext(null);it.displayName="PanelGroupContext";const q={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},_t=10,je=x.useLayoutEffect,Tt=hs.useId,Ir=typeof Tt=="function"?Tt:()=>null;let Pr=0;function kt(t=null){const e=Ir(),n=x.useRef(t||e||null);return n.current===null&&(n.current=""+Pr++),t??n.current}function kn({children:t,className:e="",collapsedSize:n,collapsible:s,defaultSize:o,forwardedRef:r,id:l,maxSize:i,minSize:c,onCollapse:d,onExpand:m,onResize:f,order:u,style:h,tagName:p="div",...v}){const b=x.useContext(it);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:g,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:_,isPanelCollapsed:w,reevaluatePanelConstraints:S,registerPanel:I,resizePanel:P,unregisterPanel:T}=b,M=kt(l),L=x.useRef({callbacks:{onCollapse:d,onExpand:m,onResize:f},constraints:{collapsedSize:n,collapsible:s,defaultSize:o,maxSize:i,minSize:c},id:M,idIsFromProps:l!==void 0,order:u});x.useRef({didLogMissingDefaultSizeWarning:!1}),je(()=>{const{callbacks:W,constraints:V}=L.current,H={...V};L.current.id=M,L.current.idIsFromProps=l!==void 0,L.current.order=u,W.onCollapse=d,W.onExpand=m,W.onResize=f,V.collapsedSize=n,V.collapsible=s,V.defaultSize=o,V.maxSize=i,V.minSize=c,(H.collapsedSize!==V.collapsedSize||H.collapsible!==V.collapsible||H.maxSize!==V.maxSize||H.minSize!==V.minSize)&&S(L.current,H)}),je(()=>{const W=L.current;return I(W),()=>{T(W)}},[u,M,I,T]),x.useImperativeHandle(r,()=>({collapse:()=>{g(L.current)},expand:W=>{y(L.current,W)},getId(){return M},getSize(){return j(L.current)},isCollapsed(){return w(L.current)},isExpanded(){return!w(L.current)},resize:W=>{P(L.current,W)}}),[g,y,j,w,M,P]);const G=N(L.current,o);return x.createElement(p,{...v,children:t,className:e,id:M,style:{...G,...h},[q.groupId]:_,[q.panel]:"",[q.panelCollapsible]:s||void 0,[q.panelId]:M,[q.panelSize]:parseFloat(""+G.flexGrow).toFixed(1)})}const In=x.forwardRef((t,e)=>x.createElement(kn,{...t,forwardedRef:e}));kn.displayName="Panel";In.displayName="forwardRef(Panel)";let Ct=null,nt=-1,ve=null;function $r(t,e){if(e){const n=(e&Rn)!==0,s=(e&An)!==0,o=(e&Tn)!==0,r=(e&Dn)!==0;if(n)return o?"se-resize":r?"ne-resize":"e-resize";if(s)return o?"sw-resize":r?"nw-resize":"w-resize";if(o)return"s-resize";if(r)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Er(){ve!==null&&(document.head.removeChild(ve),Ct=null,ve=null,nt=-1)}function gt(t,e){var n,s;const o=$r(t,e);if(Ct!==o){if(Ct=o,ve===null&&(ve=document.createElement("style"),document.head.appendChild(ve)),nt>=0){var r;(r=ve.sheet)===null||r===void 0||r.removeRule(nt)}nt=(n=(s=ve.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${o} !important;}`))!==null&&n!==void 0?n:-1}}function Pn(t){return t.type==="keydown"}function $n(t){return t.type.startsWith("pointer")}function En(t){return t.type.startsWith("mouse")}function ct(t){if($n(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(En(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Mr(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Rr(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Ar(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Ot(t),b:Ot(e)};let s;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),s=t;D(s,"Stacking order can only be calculated for elements with a common ancestor");const o={a:Lt(Dt(n.a)),b:Lt(Dt(n.b))};if(o.a===o.b){const r=s.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let i=r.length;for(;i--;){const c=r[i];if(c===l.a)return 1;if(c===l.b)return-1}}return Math.sign(o.a-o.b)}const Tr=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Dr(t){var e;const n=getComputedStyle((e=Mn(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Lr(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Dr(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Tr.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Dt(t){let e=t.length;for(;e--;){const n=t[e];if(D(n,"Missing node"),Lr(n))return n}return null}function Lt(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Ot(t){const e=[];for(;t;)e.push(t),t=Mn(t);return e}function Mn(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const Rn=1,An=2,Tn=4,Dn=8,Or=Mr()==="coarse";let ue=[],Oe=!1,Se=new Map,dt=new Map;const We=new Set;function Hr(t,e,n,s,o){var r;const{ownerDocument:l}=e,i={direction:n,element:e,hitAreaMargins:s,setResizeHandlerState:o},c=(r=Se.get(l))!==null&&r!==void 0?r:0;return Se.set(l,c+1),We.add(i),ot(),function(){var m;dt.delete(t),We.delete(i);const f=(m=Se.get(l))!==null&&m!==void 0?m:1;if(Se.set(l,f-1),ot(),f===1&&Se.delete(l),ue.includes(i)){const u=ue.indexOf(i);u>=0&&ue.splice(u,1),Pt(),o("up",!0,null)}}}function Br(t){const{target:e}=t,{x:n,y:s}=ct(t);Oe=!0,It({target:e,x:n,y:s}),ot(),ue.length>0&&(rt("down",t),t.preventDefault(),Ln(e)||t.stopImmediatePropagation())}function bt(t){const{x:e,y:n}=ct(t);if(Oe&&t.buttons===0&&(Oe=!1,rt("up",t)),!Oe){const{target:s}=t;It({target:s,x:e,y:n})}rt("move",t),Pt(),ue.length>0&&t.preventDefault()}function vt(t){const{target:e}=t,{x:n,y:s}=ct(t);dt.clear(),Oe=!1,ue.length>0&&(t.preventDefault(),Ln(e)||t.stopImmediatePropagation()),rt("up",t),It({target:e,x:n,y:s}),Pt(),ot()}function Ln(t){let e=t;for(;e;){if(e.hasAttribute(q.resizeHandle))return!0;e=e.parentElement}return!1}function It({target:t,x:e,y:n}){ue.splice(0);let s=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(s=t),We.forEach(o=>{const{element:r,hitAreaMargins:l}=o,i=r.getBoundingClientRect(),{bottom:c,left:d,right:m,top:f}=i,u=Or?l.coarse:l.fine;if(e>=d-u&&e<=m+u&&n>=f-u&&n<=c+u){if(s!==null&&document.contains(s)&&r!==s&&!r.contains(s)&&!s.contains(r)&&Ar(s,r)>0){let p=s,v=!1;for(;p&&!p.contains(r);){if(Rr(p.getBoundingClientRect(),i)){v=!0;break}p=p.parentElement}if(v)return}ue.push(o)}})}function yt(t,e){dt.set(t,e)}function Pt(){let t=!1,e=!1;ue.forEach(s=>{const{direction:o}=s;o==="horizontal"?t=!0:e=!0});let n=0;dt.forEach(s=>{n|=s}),t&&e?gt("intersection",n):t?gt("horizontal",n):e?gt("vertical",n):Er()}let St=new AbortController;function ot(){St.abort(),St=new AbortController;const t={capture:!0,signal:St.signal};We.size&&(Oe?(ue.length>0&&Se.forEach((e,n)=>{const{body:s}=n;e>0&&(s.addEventListener("contextmenu",vt,t),s.addEventListener("pointerleave",bt,t),s.addEventListener("pointermove",bt,t))}),window.addEventListener("pointerup",vt,t),window.addEventListener("pointercancel",vt,t)):Se.forEach((e,n)=>{const{body:s}=n;e>0&&(s.addEventListener("pointerdown",Br,t),s.addEventListener("pointermove",bt,t))}))}function rt(t,e){We.forEach(n=>{const{setResizeHandlerState:s}=n,o=ue.includes(n);s(t,o,e)})}function Ur(){const[t,e]=x.useState(0);return x.useCallback(()=>e(n=>n+1),[])}function D(t,e){if(!t)throw console.error(e),Error(e)}function Ce(t,e,n=_t){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function xe(t,e,n=_t){return Ce(t,e,n)===0}function le(t,e,n){return Ce(t,e,n)===0}function Gr(t,e,n){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++){const o=t[s],r=e[s];if(!le(o,r,n))return!1}return!0}function Le({panelConstraints:t,panelIndex:e,size:n}){const s=t[e];D(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:o=0,collapsible:r,maxSize:l=100,minSize:i=0}=s;if(Ce(n,i)<0)if(r){const c=(o+i)/2;Ce(n,c)<0?n=o:n=i}else n=i;return n=Math.min(l,n),n=parseFloat(n.toFixed(_t)),n}function Ue({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:s,prevLayout:o,trigger:r}){if(le(t,0))return e;const l=[...e],[i,c]=s;D(i!=null,"Invalid first pivot index"),D(c!=null,"Invalid second pivot index");let d=0;if(r==="keyboard"){{const f=t<0?c:i,u=n[f];D(u,`Panel constraints not found for index ${f}`);const{collapsedSize:h=0,collapsible:p,minSize:v=0}=u;if(p){const b=e[f];if(D(b!=null,`Previous layout not found for panel index ${f}`),le(b,h)){const g=v-b;Ce(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}{const f=t<0?i:c,u=n[f];D(u,`No panel constraints found for index ${f}`);const{collapsedSize:h=0,collapsible:p,minSize:v=0}=u;if(p){const b=e[f];if(D(b!=null,`Previous layout not found for panel index ${f}`),le(b,v)){const g=b-h;Ce(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const f=t<0?1:-1;let u=t<0?c:i,h=0;for(;;){const v=e[u];D(v!=null,`Previous layout not found for panel index ${u}`);const g=Le({panelConstraints:n,panelIndex:u,size:100})-v;if(h+=g,u+=f,u<0||u>=n.length)break}const p=Math.min(Math.abs(t),Math.abs(h));t=t<0?0-p:p}{let u=t<0?i:c;for(;u>=0&&u<n.length;){const h=Math.abs(t)-Math.abs(d),p=e[u];D(p!=null,`Previous layout not found for panel index ${u}`);const v=p-h,b=Le({panelConstraints:n,panelIndex:u,size:v});if(!le(p,b)&&(d+=p-b,l[u]=b,d.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?u--:u++}}if(Gr(o,l))return o;{const f=t<0?c:i,u=e[f];D(u!=null,`Previous layout not found for panel index ${f}`);const h=u+d,p=Le({panelConstraints:n,panelIndex:f,size:h});if(l[f]=p,!le(p,h)){let v=h-p,g=t<0?c:i;for(;g>=0&&g<n.length;){const y=l[g];D(y!=null,`Previous layout not found for panel index ${g}`);const j=y+v,N=Le({panelConstraints:n,panelIndex:g,size:j});if(le(y,N)||(v-=N-y,l[g]=N),le(v,0))break;t>0?g--:g++}}}const m=l.reduce((f,u)=>u+f,0);return le(m,100)?l:o}function Wr({layout:t,panelsArray:e,pivotIndices:n}){let s=0,o=100,r=0,l=0;const i=n[0];D(i!=null,"No pivot index found"),e.forEach((f,u)=>{const{constraints:h}=f,{maxSize:p=100,minSize:v=0}=h;u===i?(s=v,o=p):(r+=v,l+=p)});const c=Math.min(o,100-r),d=Math.max(s,100-l),m=t[i];return{valueMax:c,valueMin:d,valueNow:m}}function Ve(t,e=document){return Array.from(e.querySelectorAll(`[${q.resizeHandleId}][data-panel-group-id="${t}"]`))}function On(t,e,n=document){const o=Ve(t,n).findIndex(r=>r.getAttribute(q.resizeHandleId)===e);return o??null}function Hn(t,e,n){const s=On(t,e,n);return s!=null?[s,s+1]:[-1,-1]}function Bn(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return s||null}function ut(t,e=document){const n=e.querySelector(`[${q.resizeHandleId}="${t}"]`);return n||null}function Vr(t,e,n,s=document){var o,r,l,i;const c=ut(e,s),d=Ve(t,s),m=c?d.indexOf(c):-1,f=(o=(r=n[m])===null||r===void 0?void 0:r.id)!==null&&o!==void 0?o:null,u=(l=(i=n[m+1])===null||i===void 0?void 0:i.id)!==null&&l!==void 0?l:null;return[f,u]}function Fr({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:s,panelDataArray:o,panelGroupElement:r,setLayout:l}){x.useRef({didWarnAboutMissingResizeHandle:!1}),je(()=>{if(!r)return;const i=Ve(n,r);for(let c=0;c<o.length-1;c++){const{valueMax:d,valueMin:m,valueNow:f}=Wr({layout:s,panelsArray:o,pivotIndices:[c,c+1]}),u=i[c];if(u!=null){const h=o[c];D(h,`No panel data found for index "${c}"`),u.setAttribute("aria-controls",h.id),u.setAttribute("aria-valuemax",""+Math.round(d)),u.setAttribute("aria-valuemin",""+Math.round(m)),u.setAttribute("aria-valuenow",f!=null?""+Math.round(f):"")}}return()=>{i.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,s,o,r]),x.useEffect(()=>{if(!r)return;const i=e.current;D(i,"Eager values not found");const{panelDataArray:c}=i,d=Bn(n,r);D(d!=null,`No group found for id "${n}"`);const m=Ve(n,r);D(m,`No resize handles found for group id "${n}"`);const f=m.map(u=>{const h=u.getAttribute(q.resizeHandleId);D(h,"Resize handle element has no handle id attribute");const[p,v]=Vr(n,h,c,r);if(p==null||v==null)return()=>{};const b=g=>{if(!g.defaultPrevented)switch(g.key){case"Enter":{g.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];D(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:_=0,collapsible:w,minSize:S=0}=j.constraints;if(N!=null&&w){const I=Ue({delta:le(N,_)?S-_:_-N,initialLayout:s,panelConstraints:c.map(P=>P.constraints),pivotIndices:Hn(n,h,r),prevLayout:s,trigger:"keyboard"});s!==I&&l(I)}}break}}};return u.addEventListener("keydown",b),()=>{u.removeEventListener("keydown",b)}});return()=>{f.forEach(u=>u())}},[r,t,e,n,s,o,l])}function Ht(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Un(t,e){const n=t==="horizontal",{x:s,y:o}=ct(e);return n?s:o}function Kr(t,e,n,s,o){const r=n==="horizontal",l=ut(e,o);D(l,`No resize handle element found for id "${e}"`);const i=l.getAttribute(q.groupId);D(i,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=Un(n,t),m=Bn(i,o);D(m,`No group element found for id "${i}"`);const f=m.getBoundingClientRect(),u=r?f.width:f.height;return(d-c)/u*100}function Zr(t,e,n,s,o,r){if(Pn(t)){const l=n==="horizontal";let i=0;t.shiftKey?i=100:o!=null?i=o:i=10;let c=0;switch(t.key){case"ArrowDown":c=l?0:i;break;case"ArrowLeft":c=l?-i:0;break;case"ArrowRight":c=l?i:0;break;case"ArrowUp":c=l?0:-i;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Kr(t,e,n,s,r)}function qr({panelDataArray:t}){const e=Array(t.length),n=t.map(r=>r.constraints);let s=0,o=100;for(let r=0;r<t.length;r++){const l=n[r];D(l,`Panel constraints not found for index ${r}`);const{defaultSize:i}=l;i!=null&&(s++,e[r]=i,o-=i)}for(let r=0;r<t.length;r++){const l=n[r];D(l,`Panel constraints not found for index ${r}`);const{defaultSize:i}=l;if(i!=null)continue;const c=t.length-s,d=o/c;s++,e[r]=d,o-=d}return e}function Te(t,e,n){e.forEach((s,o)=>{const r=t[o];D(r,`Panel data not found for index ${o}`);const{callbacks:l,constraints:i,id:c}=r,{collapsedSize:d=0,collapsible:m}=i,f=n[c];if(f==null||s!==f){n[c]=s;const{onCollapse:u,onExpand:h,onResize:p}=l;p&&p(s,f),m&&(u||h)&&(h&&(f==null||xe(f,d))&&!xe(s,d)&&h(),u&&(f==null||!xe(f,d))&&xe(s,d)&&u())}})}function tt(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function Yr({defaultSize:t,dragState:e,layout:n,panelData:s,panelIndex:o,precision:r=3}){const l=n[o];let i;return l==null?i=t!=null?t.toPrecision(r):"1":s.length===1?i="1":i=l.toPrecision(r),{flexBasis:0,flexGrow:i,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Xr(t,e=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...o)},e)}}function Bt(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function Gn(t){return`react-resizable-panels:${t}`}function Wn(t){return t.map(e=>{const{constraints:n,id:s,idIsFromProps:o,order:r}=e;return o?s:r?`${r}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function Vn(t,e){try{const n=Gn(t),s=e.getItem(n);if(s){const o=JSON.parse(s);if(typeof o=="object"&&o!=null)return o}}catch{}return null}function Jr(t,e,n){var s,o;const r=(s=Vn(t,n))!==null&&s!==void 0?s:{},l=Wn(e);return(o=r[l])!==null&&o!==void 0?o:null}function Qr(t,e,n,s,o){var r;const l=Gn(t),i=Wn(e),c=(r=Vn(t,o))!==null&&r!==void 0?r:{};c[i]={expandToSizes:Object.fromEntries(n.entries()),layout:s};try{o.setItem(l,JSON.stringify(c))}catch(d){console.error(d)}}function Ut({layout:t,panelConstraints:e}){const n=[...t],s=n.reduce((r,l)=>r+l,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(r=>`${r}%`).join(", ")}`);if(!le(s,100)&&n.length>0)for(let r=0;r<e.length;r++){const l=n[r];D(l!=null,`No layout data found for index ${r}`);const i=100/s*l;n[r]=i}let o=0;for(let r=0;r<e.length;r++){const l=n[r];D(l!=null,`No layout data found for index ${r}`);const i=Le({panelConstraints:e,panelIndex:r,size:l});l!=i&&(o+=l-i,n[r]=i)}if(!le(o,0))for(let r=0;r<e.length;r++){const l=n[r];D(l!=null,`No layout data found for index ${r}`);const i=l+o,c=Le({panelConstraints:e,panelIndex:r,size:i});if(l!==c&&(o-=c-l,n[r]=c,le(o,0)))break}return n}const ea=100,Ge={getItem:t=>(Bt(Ge),Ge.getItem(t)),setItem:(t,e)=>{Bt(Ge),Ge.setItem(t,e)}},Gt={};function Fn({autoSaveId:t=null,children:e,className:n="",direction:s,forwardedRef:o,id:r=null,onLayout:l=null,keyboardResizeBy:i=null,storage:c=Ge,style:d,tagName:m="div",...f}){const u=kt(r),h=x.useRef(null),[p,v]=x.useState(null),[b,g]=x.useState([]),y=Ur(),j=x.useRef({}),N=x.useRef(new Map),_=x.useRef(0),w=x.useRef({autoSaveId:t,direction:s,dragState:p,id:u,keyboardResizeBy:i,onLayout:l,storage:c}),S=x.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});x.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),x.useImperativeHandle(o,()=>({getId:()=>w.current.id,getLayout:()=>{const{layout:z}=S.current;return z},setLayout:z=>{const{onLayout:E}=w.current,{layout:R,panelDataArray:$}=S.current,k=Ut({layout:z,panelConstraints:$.map(A=>A.constraints)});Ht(R,k)||(g(k),S.current.layout=k,E&&E(k),Te($,k,j.current))}}),[]),je(()=>{w.current.autoSaveId=t,w.current.direction=s,w.current.dragState=p,w.current.id=u,w.current.onLayout=l,w.current.storage=c}),Fr({committedValuesRef:w,eagerValuesRef:S,groupId:u,layout:b,panelDataArray:S.current.panelDataArray,setLayout:g,panelGroupElement:h.current}),x.useEffect(()=>{const{panelDataArray:z}=S.current;if(t){if(b.length===0||b.length!==z.length)return;let E=Gt[t];E==null&&(E=Xr(Qr,ea),Gt[t]=E);const R=[...z],$=new Map(N.current);E(t,R,$,b,c)}},[t,b,c]),x.useEffect(()=>{});const I=x.useCallback(z=>{const{onLayout:E}=w.current,{layout:R,panelDataArray:$}=S.current;if(z.constraints.collapsible){const k=$.map(oe=>oe.constraints),{collapsedSize:A=0,panelSize:B,pivotIndices:K}=ye($,z,R);if(D(B!=null,`Panel size not found for panel "${z.id}"`),!xe(B,A)){N.current.set(z.id,B);const ne=De($,z)===$.length-1?B-A:A-B,U=Ue({delta:ne,initialLayout:R,panelConstraints:k,pivotIndices:K,prevLayout:R,trigger:"imperative-api"});tt(R,U)||(g(U),S.current.layout=U,E&&E(U),Te($,U,j.current))}}},[]),P=x.useCallback((z,E)=>{const{onLayout:R}=w.current,{layout:$,panelDataArray:k}=S.current;if(z.constraints.collapsible){const A=k.map(ee=>ee.constraints),{collapsedSize:B=0,panelSize:K=0,minSize:oe=0,pivotIndices:ne}=ye(k,z,$),U=E??oe;if(xe(K,B)){const ee=N.current.get(z.id),fe=ee!=null&&ee>=U?ee:U,me=De(k,z)===k.length-1?K-fe:fe-K,X=Ue({delta:me,initialLayout:$,panelConstraints:A,pivotIndices:ne,prevLayout:$,trigger:"imperative-api"});tt($,X)||(g(X),S.current.layout=X,R&&R(X),Te(k,X,j.current))}}},[]),T=x.useCallback(z=>{const{layout:E,panelDataArray:R}=S.current,{panelSize:$}=ye(R,z,E);return D($!=null,`Panel size not found for panel "${z.id}"`),$},[]),M=x.useCallback((z,E)=>{const{panelDataArray:R}=S.current,$=De(R,z);return Yr({defaultSize:E,dragState:p,layout:b,panelData:R,panelIndex:$})},[p,b]),L=x.useCallback(z=>{const{layout:E,panelDataArray:R}=S.current,{collapsedSize:$=0,collapsible:k,panelSize:A}=ye(R,z,E);return D(A!=null,`Panel size not found for panel "${z.id}"`),k===!0&&xe(A,$)},[]),G=x.useCallback(z=>{const{layout:E,panelDataArray:R}=S.current,{collapsedSize:$=0,collapsible:k,panelSize:A}=ye(R,z,E);return D(A!=null,`Panel size not found for panel "${z.id}"`),!k||Ce(A,$)>0},[]),W=x.useCallback(z=>{const{panelDataArray:E}=S.current;E.push(z),E.sort((R,$)=>{const k=R.order,A=$.order;return k==null&&A==null?0:k==null?-1:A==null?1:k-A}),S.current.panelDataArrayChanged=!0,y()},[y]);je(()=>{if(S.current.panelDataArrayChanged){S.current.panelDataArrayChanged=!1;const{autoSaveId:z,onLayout:E,storage:R}=w.current,{layout:$,panelDataArray:k}=S.current;let A=null;if(z){const K=Jr(z,k,R);K&&(N.current=new Map(Object.entries(K.expandToSizes)),A=K.layout)}A==null&&(A=qr({panelDataArray:k}));const B=Ut({layout:A,panelConstraints:k.map(K=>K.constraints)});Ht($,B)||(g(B),S.current.layout=B,E&&E(B),Te(k,B,j.current))}}),je(()=>{const z=S.current;return()=>{z.layout=[]}},[]);const V=x.useCallback(z=>{let E=!1;const R=h.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(E=!0),function(k){k.preventDefault();const A=h.current;if(!A)return()=>null;const{direction:B,dragState:K,id:oe,keyboardResizeBy:ne,onLayout:U}=w.current,{layout:ee,panelDataArray:fe}=S.current,{initialLayout:de}=K??{},me=Hn(oe,z,A);let X=Zr(k,z,B,K,ne,A);const pe=B==="horizontal";pe&&E&&(X=-X);const ze=fe.map(ge=>ge.constraints),ie=Ue({delta:X,initialLayout:de??ee,panelConstraints:ze,pivotIndices:me,prevLayout:ee,trigger:Pn(k)?"keyboard":"mouse-or-touch"}),he=!tt(ee,ie);($n(k)||En(k))&&_.current!=X&&(_.current=X,!he&&X!==0?pe?yt(z,X<0?Rn:An):yt(z,X<0?Tn:Dn):yt(z,0)),he&&(g(ie),S.current.layout=ie,U&&U(ie),Te(fe,ie,j.current))}},[]),H=x.useCallback((z,E)=>{const{onLayout:R}=w.current,{layout:$,panelDataArray:k}=S.current,A=k.map(ee=>ee.constraints),{panelSize:B,pivotIndices:K}=ye(k,z,$);D(B!=null,`Panel size not found for panel "${z.id}"`);const ne=De(k,z)===k.length-1?B-E:E-B,U=Ue({delta:ne,initialLayout:$,panelConstraints:A,pivotIndices:K,prevLayout:$,trigger:"imperative-api"});tt($,U)||(g(U),S.current.layout=U,R&&R(U),Te(k,U,j.current))},[]),ce=x.useCallback((z,E)=>{const{layout:R,panelDataArray:$}=S.current,{collapsedSize:k=0,collapsible:A}=E,{collapsedSize:B=0,collapsible:K,maxSize:oe=100,minSize:ne=0}=z.constraints,{panelSize:U}=ye($,z,R);U!=null&&(A&&K&&xe(U,k)?xe(k,B)||H(z,B):U<ne?H(z,ne):U>oe&&H(z,oe))},[H]),Y=x.useCallback((z,E)=>{const{direction:R}=w.current,{layout:$}=S.current;if(!h.current)return;const k=ut(z,h.current);D(k,`Drag handle element not found for id "${z}"`);const A=Un(R,E);v({dragHandleId:z,dragHandleRect:k.getBoundingClientRect(),initialCursorPosition:A,initialLayout:$})},[]),te=x.useCallback(()=>{v(null)},[]),F=x.useCallback(z=>{const{panelDataArray:E}=S.current,R=De(E,z);R>=0&&(E.splice(R,1),delete j.current[z.id],S.current.panelDataArrayChanged=!0,y())},[y]),J=x.useMemo(()=>({collapsePanel:I,direction:s,dragState:p,expandPanel:P,getPanelSize:T,getPanelStyle:M,groupId:u,isPanelCollapsed:L,isPanelExpanded:G,reevaluatePanelConstraints:ce,registerPanel:W,registerResizeHandle:V,resizePanel:H,startDragging:Y,stopDragging:te,unregisterPanel:F,panelGroupElement:h.current}),[I,p,s,P,T,M,u,L,G,ce,W,V,H,Y,te,F]),Q={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return x.createElement(it.Provider,{value:J},x.createElement(m,{...f,children:e,className:n,id:r,ref:h,style:{...Q,...d},[q.group]:"",[q.groupDirection]:s,[q.groupId]:u}))}const Kn=x.forwardRef((t,e)=>x.createElement(Fn,{...t,forwardedRef:e}));Fn.displayName="PanelGroup";Kn.displayName="forwardRef(PanelGroup)";function De(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function ye(t,e,n){const s=De(t,e),r=s===t.length-1?[s-1,s]:[s,s+1],l=n[s];return{...e.constraints,panelSize:l,pivotIndices:r}}function ta({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:s}){x.useEffect(()=>{if(t||n==null||s==null)return;const o=ut(e,s);if(o==null)return;const r=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),n(l);break}case"F6":{l.preventDefault();const i=o.getAttribute(q.groupId);D(i,`No group element found for id "${i}"`);const c=Ve(i,s),d=On(i,e,s);D(d!==null,`No resize element found for id "${e}"`);const m=l.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[m].focus();break}}};return o.addEventListener("keydown",r),()=>{o.removeEventListener("keydown",r)}},[s,t,e,n])}function Zn({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:s,id:o,onBlur:r,onClick:l,onDragging:i,onFocus:c,onPointerDown:d,onPointerUp:m,style:f={},tabIndex:u=0,tagName:h="div",...p}){var v,b;const g=x.useRef(null),y=x.useRef({onClick:l,onDragging:i,onPointerDown:d,onPointerUp:m});x.useEffect(()=>{y.current.onClick=l,y.current.onDragging=i,y.current.onPointerDown=d,y.current.onPointerUp=m});const j=x.useContext(it);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:_,registerResizeHandle:w,startDragging:S,stopDragging:I,panelGroupElement:P}=j,T=kt(o),[M,L]=x.useState("inactive"),[G,W]=x.useState(!1),[V,H]=x.useState(null),ce=x.useRef({state:M});je(()=>{ce.current.state=M}),x.useEffect(()=>{if(n)H(null);else{const J=w(T);H(()=>J)}},[n,T,w]);const Y=(v=s?.coarse)!==null&&v!==void 0?v:15,te=(b=s?.fine)!==null&&b!==void 0?b:5;x.useEffect(()=>{if(n||V==null)return;const J=g.current;D(J,"Element ref not attached");let Q=!1;return Hr(T,J,N,{coarse:Y,fine:te},(E,R,$)=>{if(!R){L("inactive");return}switch(E){case"down":{L("drag"),Q=!1,D($,'Expected event to be defined for "down" action'),S(T,$);const{onDragging:k,onPointerDown:A}=y.current;k?.(!0),A?.();break}case"move":{const{state:k}=ce.current;Q=!0,k!=="drag"&&L("hover"),D($,'Expected event to be defined for "move" action'),V($);break}case"up":{L("hover"),I();const{onClick:k,onDragging:A,onPointerUp:B}=y.current;A?.(!1),B?.(),Q||k?.();break}}})},[Y,N,n,te,w,T,V,S,I]),ta({disabled:n,handleId:T,resizeHandler:V,panelGroupElement:P});const F={touchAction:"none",userSelect:"none"};return x.createElement(h,{...p,children:t,className:e,id:o,onBlur:()=>{W(!1),r?.()},onFocus:()=>{W(!0),c?.()},ref:g,role:"separator",style:{...F,...f},tabIndex:u,[q.groupDirection]:N,[q.groupId]:_,[q.resizeHandle]:"",[q.resizeHandleActive]:M==="drag"?"pointer":G?"keyboard":void 0,[q.resizeHandleEnabled]:!n,[q.resizeHandleId]:T,[q.resizeHandleState]:M})}Zn.displayName="PanelResizeHandle";function na(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=O("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx(Kn,{"data-slot":"resizable-panel-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function qn(t){const e=C.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let s;return e[2]!==n?(s=a.jsx(In,{"data-slot":"resizable-panel",...n}),e[2]=n,e[3]=s):s=e[3],s}function sa(t){const e=C.c(12);let n,s,o;e[0]!==t?({withHandle:o,className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o):(n=e[1],s=e[2],o=e[3]);let r;e[4]!==n?(r=O("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),e[4]=n,e[5]=r):r=e[5];let l;e[6]!==o?(l=o&&a.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:a.jsx(ln,{className:"size-2.5"})}),e[6]=o,e[7]=l):l=e[7];let i;return e[8]!==s||e[9]!==r||e[10]!==l?(i=a.jsx(Zn,{"data-slot":"resizable-handle",className:r,...s,children:l}),e[8]=s,e[9]=r,e[10]=l,e[11]=i):i=e[11],i}function Yn(){const t=C.c(3),{toggleSidebar:e}=Nt();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(un,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:20}),t[0]=n):n=t[0];let s;return t[1]!==e?(s=a.jsx(a.Fragment,{children:a.jsx(we,{onClick:e,size:"icon",variant:"ghost",className:"w-8 h-8 rounded-md",children:n})}),t[1]=e,t[2]=s):s=t[2],s}Yn.Skeleton=function(){return a.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})};const oa="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function Wt(t){const e=C.c(18),{showSidebarToggle:n,showOrgSwitcher:s,showDecoChat:o}=t,r=n===void 0?!1:n,l=s===void 0?!1:s,i=o===void 0?!1:o,[,c]=zt();let d;e[0]!==c?(d=()=>c(ra),e[0]=c,e[1]=d):d=e[1];const m=d;let f;e[2]!==r?(f=r&&a.jsx(et.Sidebar,{children:a.jsx(Yn,{})}),e[2]=r,e[3]=f):f=e[3];let u;e[4]!==l?(u=l&&a.jsx(x.Suspense,{fallback:a.jsx(wt.Skeleton,{}),children:a.jsx(wt,{})}),e[4]=l,e[5]=u):u=e[5];let h;e[6]!==u?(h=a.jsx(et.Left,{children:u}),e[6]=u,e[7]=h):h=e[7];let p;e[8]!==i||e[9]!==m?(p=i&&a.jsxs(we,{size:"sm",variant:"default",onClick:m,children:[a.jsx(Be,{url:oa,fallback:"DC",size:"2xs",className:"rounded-sm"}),"deco chat"]}),e[8]=i,e[9]=m,e[10]=p):p=e[10];let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(Sr,{}),e[11]=v):v=e[11];let b;e[12]!==p?(b=a.jsxs(et.Right,{className:"gap-2",children:[p,v]}),e[12]=p,e[13]=b):b=e[13];let g;return e[14]!==b||e[15]!==f||e[16]!==h?(g=a.jsxs(et,{children:[f,h,b]}),e[14]=b,e[15]=f,e[16]=h,e[17]=g):g=e[17],g}function ra(t){return!t}function aa(t){const e=C.c(10),{children:n,className:s}=t,[,o]=x.useTransition();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Ke.decoChatPanelWidth(),e[0]=r):r=e[0];const[l,i]=He(r,30);let c;e[1]!==i?(c=u=>o(()=>i(u)),e[1]=i,e[2]=c):c=e[2];const d=c;let m;e[3]!==s?(m=O("min-w-0",s),e[3]=s,e[4]=m):m=e[4];let f;return e[5]!==l||e[6]!==n||e[7]!==d||e[8]!==m?(f=a.jsx(qn,{defaultSize:l,minSize:20,className:m,onResize:d,children:n}),e[5]=l,e[6]=n,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function la(t){const e=C.c(5),{children:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Ke.sidebarOpen(),e[0]=s):s=e[0];const[o,r]=He(s,!0);let l;return e[1]!==n||e[2]!==r||e[3]!==o?(l=a.jsx(_o,{open:o,onOpenChange:r,children:n}),e[1]=n,e[2]=r,e[3]=o,e[4]=l):l=e[4],l}function ia(){const t=C.c(9),[e]=zt();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(qn,{className:"bg-background",children:a.jsx(Kt,{})}),t[0]=n):n=t[0];let s;t[1]!==e?(s=a.jsx(sa,{withHandle:e}),t[1]=e,t[2]=s):s=t[2];const o=e?"max-w-none":"max-w-0";let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Xt,{children:a.jsx(x.Suspense,{fallback:a.jsx(Bs,{}),children:a.jsx(uo,{})})}),t[3]=r):r=t[3];let l;t[4]!==o?(l=a.jsx(aa,{className:o,children:r}),t[4]=o,t[5]=l):l=t[5];let i;return t[6]!==s||t[7]!==l?(i=a.jsxs(na,{direction:"horizontal",children:[n,s,l]}),t[6]=s,t[7]=l,t[8]=i):i=t[8],i}function ca(){const t=C.c(19);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:n}=Vt(e);let s;t[1]!==n?(s=gs.activeOrganization(n),t[1]=n,t[2]=s):s=t[2];let o;t[3]!==n?(o=async()=>{if(!n)return null;const{data:h}=await Fe.organization.setActive({organizationSlug:n});return{org:h,project:{slug:ks}}},t[3]=n,t[4]=o):o=t[4];let r;t[5]!==s||t[6]!==o?(r={queryKey:s,queryFn:o,gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1},t[5]=s,t[6]=o,t[7]=r):r=t[7];const{data:l}=xs(r);if(!l){let h;t[8]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsx(Wt,{}),t[8]=h):h=t[8];let p;return t[9]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsxs("div",{className:"min-h-screen bg-background",children:[h,a.jsx("div",{className:"pt-12",children:a.jsx(Kt,{})})]}),t[9]=p):p=t[9],p}let i;t[10]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(Wt,{showSidebarToggle:!0,showOrgSwitcher:!0,showDecoChat:!0}),t[10]=i):i=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=a.jsx(Vo,{}),t[12]=d):d=t[12];let m;t[13]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(la,{children:a.jsxs("div",{className:"flex flex-col h-screen",children:[i,a.jsxs(Po,{className:"flex-1 bg-sidebar",style:c,children:[d,a.jsx(Eo,{className:"pt-12",children:a.jsx(ia,{})})]})]})}),t[13]=m):m=t[13];let f;t[14]!==l.org.slug?(f=a.jsx(so,{children:m},l.org.slug),t[14]=l.org.slug,t[15]=f):f=t[15];let u;return t[16]!==l||t[17]!==f?(u=a.jsx(_s,{...l,children:f}),t[16]=l,t[17]=f,t[18]=u):u=t[18],u}function Ya(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(jr,{children:a.jsx(x.Suspense,{fallback:a.jsx(Ft,{}),children:a.jsx(ca,{})})}),t[0]=e):e=t[0],e}export{Ya as default};
@@ -1 +0,0 @@
1
- import{ao as U,ap as _,aq as H,ar as q,as as G,at as Y,r as M,c as T,j as s,e as Z,K as J,a as X,au as ee,q as te}from"./index-BWMTgSpJ.js";import{i as se,g as ie,a as le}from"./well-known-mcp-CjKrCZkD.js";import{C as ne}from"./collection-header-COdYt0yo.js";import{I as re,b as oe,c as ae,a as V,u as ce}from"./use-connection-Lp9rwnx7.js";import{b as de,T as me,c as fe,u as D}from"./tooltip-Dy-DsVOX.js";import{s as ue}from"./slugify-CEUa2lfQ.js";import{n as he}from"./Inbox01-Q7OGuD8_.js";import{i as z}from"./Loading01-BpGj_YCN.js";import{i as xe,E as pe}from"./SearchMd-BbbPnMSd.js";import{C as ge}from"./collection-search-Dh2zcE6Z.js";import{C as ve}from"./card-fnco2BKy.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-DQatPXKJ.js";import{s as W}from"./Plus-BS5hPXY3.js";import{C as Ie}from"./connection-card-P2DYTKtD.js";import{B as ke}from"./button-WA21TIge.js";import{a as Ee}from"./use-binding-pAqGO8UI.js";import{L as Le,u as Te}from"./localstorage-keys-C__QKrnP.js";import"./collection-display-button-CJgVNUjG.js";import"./dropdown-menu-lNp795nL.js";import"./Grid01-CKvZ5Bgj.js";import"./utils-CvrJmBA1.js";import"./input-C8ckt9pD.js";import"./ChevronDown-CRpCA4eQ.js";import"./auth-CbkV4JhC.js";import"./useQuery-CdGzN_Sp.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{c as f,p as K,K as q}from"./index-BWMTgSpJ.js";function S(m){const e=f.c(23);let s,o,r,t,l;e[0]!==m?({toolCaller:r,toolName:l,toolInputParams:t,scope:o,...s}=m,e[0]=m,e[1]=s,e[2]=o,e[3]=r,e[4]=t,e[5]=l):(s=e[1],o=e[2],r=e[3],t=e[4],l=e[5]);let a,u,i,p;if(e[6]!==s||e[7]!==o||e[8]!==t||e[9]!==l){const y=JSON.stringify(t);p=K,a=s,u=s.staleTime??6e4,i=q.toolCall(o,l,y),e[6]=s,e[7]=o,e[8]=t,e[9]=l,e[10]=a,e[11]=u,e[12]=i,e[13]=p}else a=e[10],u=e[11],i=e[12],p=e[13];let n;e[14]!==r||e[15]!==t||e[16]!==l?(n=async()=>await r(l,t),e[14]=r,e[15]=t,e[16]=l,e[17]=n):n=e[17];let c;return e[18]!==a||e[19]!==u||e[20]!==i||e[21]!==n?(c={...a,staleTime:u,queryKey:i,queryFn:n},e[18]=a,e[19]=u,e[20]=i,e[21]=n,e[22]=c):c=e[22],p(c)}export{S as u};
@@ -1 +0,0 @@
1
- import{as as s,ao as u}from"./index-BWMTgSpJ.js";function o(e,r){return s(e,u,r)}export{o as u};
@@ -1 +0,0 @@
1
- import{bs as s,Q as t}from"./index-BWMTgSpJ.js";function e(...r){return s(t(r))}export{e as c};