@decocms/mesh 2.96.0 → 2.96.1
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.
- package/dist/client/assets/{AlertCircle-DWz9vHEs.js → AlertCircle-Uhm-vg87.js} +1 -1
- package/dist/client/assets/{AlertOctagon-CwSM6d3T.js → AlertOctagon-BnG7_0Lj.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CsFFtBUs.js → ArrowLeft-DZdpcFcm.js} +1 -1
- package/dist/client/assets/{ArrowRight-pCJhk5MV.js → ArrowRight-DDCJ7vCm.js} +1 -1
- package/dist/client/assets/{ArrowUp--iCyDep1.js → ArrowUp-o8GkJfpb.js} +1 -1
- package/dist/client/assets/{Check-BpnmtlNp.js → Check-RSjbQD0O.js} +1 -1
- package/dist/client/assets/{CheckCircle-Bbwk4wSu.js → CheckCircle-BabFBaUr.js} +1 -1
- package/dist/client/assets/{CheckDone01-DVPSPPOk.js → CheckDone01-TcspZYjj.js} +1 -1
- package/dist/client/assets/{ChevronDown-ATEjQZt3.js → ChevronDown-C42nqF2a.js} +1 -1
- package/dist/client/assets/{ChevronRight-bn8bbclH.js → ChevronRight-CYPNNnez.js} +1 -1
- package/dist/client/assets/{Clock-DzsDw-Lk.js → Clock-DXNO1b12.js} +1 -1
- package/dist/client/assets/{Code01-CNVlz5lN.js → Code01-n69ilXrX.js} +1 -1
- package/dist/client/assets/{Container-iEhX8Mjo.js → Container-CS-v1KY-.js} +1 -1
- package/dist/client/assets/{Copy01-BFLkziTz.js → Copy01-BCPsfObr.js} +1 -1
- package/dist/client/assets/{Dataflow03-CFDyQjKC.js → Dataflow03-Dh760DjE.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BJtQvuZG.js → DotsHorizontal-Ctv-gwuL.js} +1 -1
- package/dist/client/assets/{DotsVertical-DpOdk4Aq.js → DotsVertical-BAQdtXzK.js} +1 -1
- package/dist/client/assets/{Download01-BDQiTMNS.js → Download01-k9Xf7rXk.js} +1 -1
- package/dist/client/assets/{Edit01-DzfsJhj_.js → Edit01-BR94fmFd.js} +1 -1
- package/dist/client/assets/{Eye-wuUqxO-f.js → Eye-BRCzsGxl.js} +1 -1
- package/dist/client/assets/{File02-D3u4LB90.js → File02-Di-6VT8b.js} +1 -1
- package/dist/client/assets/{File06-CmtIyx8Z.js → File06-CSDN93G4.js} +1 -1
- package/dist/client/assets/{FilterLines-CM0gEnCF.js → FilterLines-BqWnRXAG.js} +1 -1
- package/dist/client/assets/{Globe01-DkRBapfM.js → Globe01-Bxre7Rfj.js} +1 -1
- package/dist/client/assets/{Grid01-BjNp0_tt.js → Grid01-pdQxycFL.js} +1 -1
- package/dist/client/assets/{Home02-D4O0kFTp.js → Home02-DKf-8C4k.js} +1 -1
- package/dist/client/assets/{Image01-WgjZm0cC.js → Image01-Bsy7A2Dk.js} +1 -1
- package/dist/client/assets/{Inbox01-CnjldfLD.js → Inbox01-C1fHCz6f.js} +1 -1
- package/dist/client/assets/{InfoCircle-C6eivBOj.js → InfoCircle-CLk2ditJ.js} +1 -1
- package/dist/client/assets/{Key01-CKkKmHQm.js → Key01-C1I0sRBn.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CyUrx3FH.js → LinkExternal01-BYZW5cd9.js} +1 -1
- package/dist/client/assets/{List-D1Rifs9-.js → List-Dd8vk8oh.js} +1 -1
- package/dist/client/assets/{Loading01-DO6hmuEv.js → Loading01-CXnHH69h.js} +1 -1
- package/dist/client/assets/{Lock01-BDIBTbi7.js → Lock01-JsNkKI7l.js} +1 -1
- package/dist/client/assets/{Pin01-Ca7VEPAf.js → Pin01-yqsENtKk.js} +1 -1
- package/dist/client/assets/{Play-IvEoWYu9.js → Play-lOQ1Ymlo.js} +1 -1
- package/dist/client/assets/{Plus-trDN35Hh.js → Plus-D0x-Dibo.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-BCwUI-kJ.js → RefreshCcw01-h4iMlxqc.js} +1 -1
- package/dist/client/assets/{RefreshCw01-5uPDNj5k.js → RefreshCw01-DMkeO6TB.js} +1 -1
- package/dist/client/assets/{Save01-j0pUB0Af.js → Save01-B2I-fdos.js} +1 -1
- package/dist/client/assets/{SearchMd-D-napS-q.js → SearchMd-vTjANW25.js} +1 -1
- package/dist/client/assets/{Settings01-CHmmjc2d.js → Settings01-GQQE44Uf.js} +1 -1
- package/dist/client/assets/{Settings02-BI3GZSHv.js → Settings02-5UGbAEAm.js} +1 -1
- package/dist/client/assets/{Share07-JEbMXLIQ.js → Share07-B1IjUJ7I.js} +1 -1
- package/dist/client/assets/{Terminal-D2icqTVW.js → Terminal-D3JARzN3.js} +1 -1
- package/dist/client/assets/{Tool01-DyS3oeZz.js → Tool01-CoNpy80w.js} +1 -1
- package/dist/client/assets/{Trash01-5avAF0B3.js → Trash01-ULZyLlT5.js} +1 -1
- package/dist/client/assets/{Upload01-Cf6OgDth.js → Upload01-C_yAut88.js} +1 -1
- package/dist/client/assets/{Users03-Cvs9KIQ2.js → Users03-CrTVA02D.js} +1 -1
- package/dist/client/assets/{X-CV-Sy3w0.js → X-CMKSGw1c.js} +1 -1
- package/dist/client/assets/{XClose-BjDMx1sg.js → XClose-fbnekwJM.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-BxNi6W68.js → agent-connections-preview-BATYW9_y.js} +1 -1
- package/dist/client/assets/{agent-detail-RnxlmLhV.js → agent-detail-DuEm4NiU.js} +1 -1
- package/dist/client/assets/{agents-Dh-F1tFs.js → agents-63xbxJ_E.js} +1 -1
- package/dist/client/assets/{alert-dialog-BuC_3NDu.js → alert-dialog-CqIibzn6.js} +1 -1
- package/dist/client/assets/{auth-catchall-D3FO_yG9.js → auth-catchall-DMyukblD.js} +1 -1
- package/dist/client/assets/{avatar-DPb5yQt1.js → avatar-CNNflJo3.js} +1 -1
- package/dist/client/assets/{badge-gZvW6kwJ.js → badge-DEQawiWd.js} +1 -1
- package/dist/client/assets/{binder-B_yBrcGV.js → binder-Dgk1prvv.js} +1 -1
- package/dist/client/assets/{breadcrumb-C8g_xf1t.js → breadcrumb-DLtCbZMJ.js} +1 -1
- package/dist/client/assets/{button-DD0bNYN6.js → button-CJa3f3rL.js} +1 -1
- package/dist/client/assets/{card-SDw6XSoH.js → card-CsxzEYEk.js} +1 -1
- package/dist/client/assets/{checkbox-wgnH9WP4.js → checkbox-BCyD8z4q.js} +1 -1
- package/dist/client/assets/{circle-alert-QyHXpaKB.js → circle-alert-uu9PM4o-.js} +1 -1
- package/dist/client/assets/{collection-detail-CX948-ZO.js → collection-detail-BisjiYIh.js} +1 -1
- package/dist/client/assets/{collection-search-U29ZLnk0.js → collection-search-BzW9Bci5.js} +1 -1
- package/dist/client/assets/{collection-tab-BXo1GiD8.js → collection-tab-DNw4-AZ3.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Ctn9Tw-j.js → collection-table-wrapper-DuKaQpn1.js} +1 -1
- package/dist/client/assets/{collection-tabs-Dz4-VYoa.js → collection-tabs-DFXuzfRm.js} +1 -1
- package/dist/client/assets/{command-BVIlxEjZ.js → command-1Xg305EH.js} +1 -1
- package/dist/client/assets/{connect-CzqgEwro.js → connect-DEAY8vzy.js} +1 -1
- package/dist/client/assets/{connection-card-D41BPNVo.js → connection-card-Dc-oh5tv.js} +1 -1
- package/dist/client/assets/{connection-detail-wbcknZ18.js → connection-detail-DimjcjkK.js} +1 -1
- package/dist/client/assets/{connections-CTuNkro9.js → connections-U7rjaHrz.js} +1 -1
- package/dist/client/assets/constants-CXdUDujD.js +1 -0
- package/dist/client/assets/{constants-Cq6ZE1z8.js → constants-LnQa4w9L.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-EYOvqvAw.js → create-organization-dialog-BuI8Z4tH.js} +1 -1
- package/dist/client/assets/{create-project-dialog-CmNoChIc.js → create-project-dialog-DNH_FaKC.js} +1 -1
- package/dist/client/assets/{dialog-S8xIC8mc.js → dialog-Bzq7eXqS.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DWIfkCpI.js → dropdown-menu-DC2vYQhY.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BbcHKrqQ.js → dynamic-plugin-layout-lKDUzSNP.js} +1 -1
- package/dist/client/assets/{empty-state-ByBuL-mR.js → empty-state-CegLfGmA.js} +1 -1
- package/dist/client/assets/{empty-state-BXZMP5as.js → empty-state-K93degI9.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CEHG413S.js → env-vars-editor-A56x5u0c.js} +1 -1
- package/dist/client/assets/{error-boundary-DQU90rbd.js → error-boundary-BHZBr65c.js} +1 -1
- package/dist/client/assets/{extract-connection-data-nGEdjJnK.js → extract-connection-data-Bagxseai.js} +1 -1
- package/dist/client/assets/{file-browser-DeO9pu4B.js → file-browser-BcBVgyZ_.js} +2 -2
- package/dist/client/assets/{form-BAcIqAgh.js → form-BiNvV3_m.js} +1 -1
- package/dist/client/assets/{grid-view-BjDIJsmI.js → grid-view-C_FVYERW.js} +1 -1
- package/dist/client/assets/{home-CHY0i-UK.js → home-HO-4OJaE.js} +1 -1
- package/dist/client/assets/{index-BlqE1bYr.js → index-B75ddzLB.js} +1 -1
- package/dist/client/assets/{index-neYARi1Z.js → index-BuinBUAv.js} +1 -1
- package/dist/client/assets/{index-DL9SrQB4.js → index-CbHJdukr.js} +1 -1
- package/dist/client/assets/{index-FIifjCsC.js → index-CxGA93Pi.js} +1 -1
- package/dist/client/assets/{index-D8YdWWJr.js → index-DBhC1Bw_.js} +1 -1
- package/dist/client/assets/{index-CFGId0Wt.js → index-DQZLC-Ha.js} +1 -1
- package/dist/client/assets/{index-_8KOOZTs.js → index-Dp8TDmPV.js} +2 -2
- package/dist/client/assets/{index-Bg-Ly6_n.js → index-wYRfl08q.js} +1 -1
- package/dist/client/assets/{index-DWRBWJGd.js → index-zbOyivpa.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-MVVKCTut.js → infiniteQueryObserver-D_e-0DLm.js} +1 -1
- package/dist/client/assets/{input-BSJwtDuS.js → input-DNUbpYNz.js} +1 -1
- package/dist/client/assets/{integration-icon-Cyi91paQ.js → integration-icon-BrB9FdFC.js} +1 -1
- package/dist/client/assets/{label-D4ILATg5.js → label-SUAIjh3i.js} +1 -1
- package/dist/client/assets/{layout-DKMOqzAv.js → layout-Co6gOE--.js} +1 -1
- package/dist/client/assets/{localstorage-keys-CZnnuuZJ.js → localstorage-keys-DvX9S-u8.js} +1 -1
- package/dist/client/assets/{login-CyyAlxll.js → login-CqtWDfWF.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D_NlOAWN.js → mcp-oauth-BkEfZYjh.js} +1 -1
- package/dist/client/assets/{mcp-server-card-D3xgIV0P.js → mcp-server-card-CPLkUd67.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-B2_xECGw.js → mcp-server-detail-BqnowxA3.js} +2 -2
- package/dist/client/assets/{members-BWXqxwPj.js → members-C_lwQkhW.js} +1 -1
- package/dist/client/assets/{monitoring-BGBGUfTC.js → monitoring-Cura7IdF.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-CT7D7btB.js → monitoring-dashboard-edit-DS-AAspi.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-BgB6M8hp.js → monitoring-dashboard-view-Drr802Ja.js} +1 -1
- package/dist/client/assets/{oauth-callback-C55QalAS.js → oauth-callback-BjD4G2wX.js} +1 -1
- package/dist/client/assets/{page-DjrOHbSz.js → page-MGUA0r79.js} +1 -1
- package/dist/client/assets/page-d0dzeaxa.js +1 -0
- package/dist/client/assets/{plugin-empty-state-COcI3glI.js → plugin-empty-state--d7z38bx.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CkhDG6pV.js → plugin-empty-state-DUWxbNZT.js} +1 -1
- package/dist/client/assets/{plugin-header-D2QI0Bk4.js → plugin-header-BA3h83Bj.js} +1 -1
- package/dist/client/assets/{plugin-header-xjq8_xw3.js → plugin-header-BAHaZxid.js} +1 -1
- package/dist/client/assets/{popover-CSF7PfO2.js → popover-NmdUTNcA.js} +1 -1
- package/dist/client/assets/{project-layout-Dq2g6hz2.js → project-layout-BYeS0BnN.js} +1 -1
- package/dist/client/assets/{project-settings-C7VGgkwF.js → project-settings-SIbKavxy.js} +1 -1
- package/dist/client/assets/{projects-list-DLkFlDRG.js → projects-list-Denhxpmm.js} +1 -1
- package/dist/client/assets/{registry-layout-DkJX9Fm4.js → registry-layout-CPldmLnW.js} +1 -1
- package/dist/client/assets/{registry-utils-B9cy_o0B.js → registry-utils-DB2T-f6C.js} +1 -1
- package/dist/client/assets/{resizable-D07jK0w7.js → resizable-T_yUYvbE.js} +1 -1
- package/dist/client/assets/{save-actions-BOAzgl8N.js → save-actions-5R6BlOXt.js} +1 -1
- package/dist/client/assets/{scroll-area-B3trwOGp.js → scroll-area-CBpNMZKr.js} +1 -1
- package/dist/client/assets/{select-DKi1SL5l.js → select-C2nUbKfi.js} +1 -1
- package/dist/client/assets/{shell-layout-BpIyj6lO.js → shell-layout-BhIOsSah.js} +3 -3
- package/dist/client/assets/{spinner-BzK9Vf2y.js → spinner-uWSwEI1n.js} +1 -1
- package/dist/client/assets/{store-invite-L6l49UL9.js → store-invite-NFRL1rLj.js} +1 -1
- package/dist/client/assets/{switch-a94x2zYD.js → switch-B_mHCx3S.js} +1 -1
- package/dist/client/assets/{table-Dh1z1vWK.js → table-C_SqJ2pz.js} +1 -1
- package/dist/client/assets/{tasks-Drgk-xxk.js → tasks-DvY2XPl_.js} +1 -1
- package/dist/client/assets/{textarea-CI2HqKmr.js → textarea-CTzgIHFy.js} +1 -1
- package/dist/client/assets/{time-range-picker-DYTUjJWs.js → time-range-picker-DC9mhGh1.js} +1 -1
- package/dist/client/assets/{toggle-group-D6X7tUq6.js → toggle-group-Dz6DkmD4.js} +1 -1
- package/dist/client/assets/{tools-list-Be0NUYiE.js → tools-list-plHC71me.js} +1 -1
- package/dist/client/assets/{tooltip-DcxH7ctA.js → tooltip-C8pD5y5P.js} +1 -1
- package/dist/client/assets/{topbar-portal-DG6ElOlI.js → topbar-portal-DAwgzTHb.js} +1 -1
- package/dist/client/assets/{typewriter-title-DrskIJnv.js → typewriter-title-e9bmrxry.js} +1 -1
- package/dist/client/assets/{use-binding-e5wAJ2Zj.js → use-binding-BMUJf9fk.js} +1 -1
- package/dist/client/assets/{use-connection-DXTPjN_m.js → use-connection-Bpj__KJl.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-7TS5231X.js → use-create-virtual-mcp-2ig7XE3k.js} +1 -1
- package/dist/client/assets/{use-deco-chat-open-T5zpYStk.js → use-deco-chat-open-cRBnqBrA.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-CE6U_BtA.js → use-install-from-registry-C0CQR1XL.js} +1 -1
- package/dist/client/assets/{use-list-state-Cptq1-Ae.js → use-list-state-j_os04A2.js} +1 -1
- package/dist/client/assets/{use-llm-BvKc0lkk.js → use-llm-C9Qa_Kzo.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DDp9WMI6.js → use-mcp-prompts-BgJx9Ng3.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Dy2cCGvB.js → use-mcp-tools-kVBrFVQ_.js} +1 -1
- package/dist/client/assets/{use-mobile-CE6w0z-T.js → use-mobile-BhG5mqie.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CwkUwgxY.js → use-organization-settings-CrqFuGPr.js} +1 -1
- package/dist/client/assets/{use-project-BVzIiugr.js → use-project-BDU5VGwr.js} +1 -1
- package/dist/client/assets/{use-view-mode-B3y7tfmu.js → use-view-mode-B21E886q.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DCx6MwPh.js → use-virtual-mcp-CamkpUx0.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-R7yz1vmu.js +1 -0
- package/dist/client/assets/{useMutation-DToMWBEW.js → useMutation-CkwG6xTN.js} +1 -1
- package/dist/client/assets/useQuery-DCx9kDUK.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CYwzFakG.js +1 -0
- package/dist/client/assets/{view-mode-toggle-CHWTbO-_.js → view-mode-toggle-CkMs1Dwx.js} +1 -1
- package/dist/client/assets/{workflow-CJsx3NLU.js → workflow-B9m2KhXI.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/constants-Dn6qg1rG.js +0 -1
- package/dist/client/assets/page-B_Dk_-1Z.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DYN5Q3LS.js +0 -1
- package/dist/client/assets/useQuery-DJPFtjTr.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DXOkA22M.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as C,c as Ie,u as Qe,z as Ft,j as s,t as Te,bA as bt}from"./index-_8KOOZTs.js";import{B as te,c as ze}from"./button-DD0bNYN6.js";import{n as ws}from"./Container-iEhX8Mjo.js";import{t as Ss}from"./Settings01-CHmmjc2d.js";import{u as Ot}from"./useQuery-DJPFtjTr.js";import{u as dt}from"./useMutation-DToMWBEW.js";import{u as _s}from"./useInfiniteQuery-DYN5Q3LS.js";import{a as at,u as st,j as Is}from"./constants-Cq6ZE1z8.js";import{B as je}from"./badge-gZvW6kwJ.js";import{I as $e}from"./input-BSJwtDuS.js";import{a as jt,c as lt,D as vt,b as yt,h as Dt,i as Rt,g as Ts}from"./dropdown-menu-DWIfkCpI.js";import{e as Gt,a as Bt,b as pt,T as Pe,d as Vt,c as Ue}from"./table-Dh1z1vWK.js";import{a as Lt,T as ks}from"./toggle-group-D6X7tUq6.js";import{u as Ds}from"./use-view-mode-B3y7tfmu.js";import{i as qt}from"./DotsVertical-DpOdk4Aq.js";import{i as Rs}from"./FilterLines-CM0gEnCF.js";import{i as Nt}from"./Globe01-DkRBapfM.js";import{i as ot}from"./Loading01-DO6hmuEv.js";import{i as Qt}from"./SearchMd-D-napS-q.js";import{b as Ht,c as Kt,d as Yt,e as Wt,a as Zt,D as Jt}from"./dialog-S8xIC8mc.js";import{i as mt}from"./AlertCircle-DWz9vHEs.js";import{i as Ct}from"./CheckCircle-Bbwk4wSu.js";import{n as Ls}from"./Download01-BDQiTMNS.js";import{i as Et}from"./Upload01-Cf6OgDth.js";import{c as Es,b as Ps,d as Us,A as zs,g as Ms,e as $s,a as As,f as Fs}from"./alert-dialog-BuC_3NDu.js";import{C as xt}from"./card-SDw6XSoH.js";import{s as wt}from"./Trash01-5avAF0B3.js";import{L as Ee}from"./label-D4ILATg5.js";import{n as Os,S as Xt,a as es,b as ts,c as ss,d as ht}from"./select-DKi1SL5l.js";import{S as Gs}from"./switch-a94x2zYD.js";import{T as Pt}from"./textarea-CI2HqKmr.js";import{i as Bs}from"./ArrowLeft-CsFFtBUs.js";import{i as Vs}from"./ArrowRight-pCJhk5MV.js";import{s as St}from"./RefreshCcw01-BCwUI-kJ.js";import{i as qs}from"./X-CV-Sy3w0.js";import{t as rs}from"./ChevronDown-ATEjQZt3.js";import{h as Qs,e as Hs}from"./use-connection-DXTPjN_m.js";import{b as Ks,P as Ys,a as Ws}from"./popover-CSF7PfO2.js";import{i as Zs,a as Js}from"./Save01-j0pUB0Af.js";import"./infiniteQueryObserver-MVVKCTut.js";import"./Check-BpnmtlNp.js";import"./ChevronRight-bn8bbclH.js";import"./use-mobile-CE6w0z-T.js";import"./index-D8YdWWJr.js";const is=({size:t=24,color:e="currentColor",...r})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},C.createElement("path",{d:"M12.5 3H7.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 21H17c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C21 18.395 21 17.93 21 17m-2-9V2m-3 3h6M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4.49 3.418-8.459 7.69c-.476.433-.714.649-.735.836a.5.5 0 0 0 .167.431C6.105 21 6.426 21 7.07 21h9.387c1.44 0 2.159 0 2.724-.242a3 3 0 0 0 1.578-1.578c.242-.565.242-1.285.242-2.724 0-.484 0-.726-.053-.952a2.001 2.001 0 0 0-.374-.778c-.143-.182-.332-.333-.71-.636l-2.797-2.237c-.379-.303-.568-.454-.776-.508a1 1 0 0 0-.557.018c-.205.066-.384.23-.743.555Z"}));is.displayName="ImagePlus";const _t=({size:t=24,color:e="currentColor",...r})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},C.createElement("path",{d:"m12.708 18.364-1.415 1.414a5 5 0 1 1-7.07-7.07l1.413-1.415m12.728 1.414 1.415-1.414a5 5 0 0 0-7.071-7.071l-1.415 1.414M8.5 15.5l7-7"}));_t.displayName="Link01";const ns=({size:t=24,color:e="currentColor",...r})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},C.createElement("path",{d:"m6 6 4.5 4.5M6 6H3L2 3l1-1 3 1v3Zm13.259-3.259-2.628 2.628c-.396.396-.594.594-.668.822a1 1 0 0 0 0 .618c.074.228.272.426.668.822l.238.238c.396.396.594.594.822.668a1 1 0 0 0 .618 0c.228-.074.426-.272.822-.668L21.59 5.41a5.5 5.5 0 0 1-6.16 7.485c-.485-.096-.729-.144-.876-.13a.836.836 0 0 0-.373.114c-.13.07-.261.201-.523.463L6.5 20.5a2.121 2.121 0 0 1-3-3l7.157-7.157c.262-.262.393-.393.463-.524a.836.836 0 0 0 .113-.372c.015-.148-.033-.39-.129-.877a5.5 5.5 0 0 1 8.155-5.83ZM12 15l5.5 5.5a2.121 2.121 0 0 0 3-3l-4.525-4.525a5.475 5.475 0 0 1-.934-.17c-.39-.107-.816-.03-1.101.255L12 15Z"}));ns.displayName="Tool02";const Me={all:["private-registry"],items:()=>[...Me.all,"items"],itemsList:(t,e,r,i)=>[...Me.items(),"list",{search:t,tags:e,categories:r,limit:i}],item:t=>[...Me.items(),"item",t],filters:()=>[...Me.all,"filters"],registryConfig:()=>[...Me.all,"registry-config"],registryConfigByPlugin:(t,e)=>[...Me.registryConfig(),t,e]},Xs=24;function er(t){return t.trim()}async function qe(t,e,r){const i=await t.callTool({name:e,arguments:r});if(!i||typeof i!="object")throw new Error(`Invalid tool response for ${e}`);if(i.isError){const n=i.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(n)}return i.structuredContent??i}function ls(t){const e=Ie.c(19),{org:r}=Qe();let i;e[0]!==r.id?(i={connectionId:at,orgId:r.id},e[0]=r.id,e[1]=i):i=e[1];const n=st(i);let l,m,o,a;e[2]!==t.categories||e[3]!==t.limit||e[4]!==t.search||e[5]!==t.tags?(m=er(t.search),l=t.limit??Xs,a=_s,o=Me.itemsList(m,t.tags,t.categories,l),e[2]=t.categories,e[3]=t.limit,e[4]=t.search,e[5]=t.tags,e[6]=l,e[7]=m,e[8]=o,e[9]=a):(l=e[6],m=e[7],o=e[8],a=e[9]);let u;e[10]!==n||e[11]!==l||e[12]!==t.categories||e[13]!==t.tags||e[14]!==m?(u=async h=>{const{pageParam:p}=h,x=m.length>0?{operator:"or",conditions:[{field:["title"],operator:"contains",value:m},{field:["description"],operator:"contains",value:m},{field:["id"],operator:"contains",value:m},{field:["server","name"],operator:"contains",value:m}]}:void 0;return qe(n,"COLLECTION_REGISTRY_APP_LIST",{cursor:p,limit:l,tags:t.tags.length?t.tags:void 0,categories:t.categories.length?t.categories:void 0,where:x})},e[10]=n,e[11]=l,e[12]=t.categories,e[13]=t.tags,e[14]=m,e[15]=u):u=e[15];let c;return e[16]!==o||e[17]!==u?(c={queryKey:o,queryFn:u,initialPageParam:void 0,getNextPageParam:tr,staleTime:3e4},e[16]=o,e[17]=u,e[18]=c):c=e[18],a(c)}function tr(t){return t.nextCursor}function sr(){const t=Ie.c(8),{org:e}=Qe();let r;t[0]!==e.id?(r={connectionId:at,orgId:e.id},t[0]=e.id,t[1]=r):r=t[1];const i=st(r);let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=Me.filters(),t[2]=n):n=t[2];let l;t[3]!==i?(l=async()=>qe(i,"COLLECTION_REGISTRY_APP_FILTERS",{}),t[3]=i,t[4]=l):l=t[4];let m;t[5]===Symbol.for("react.memo_cache_sentinel")?(m={tags:[],categories:[]},t[5]=m):m=t[5];let o;return t[6]!==l?(o={queryKey:n,queryFn:l,placeholderData:m,staleTime:6e4},t[6]=l,t[7]=o):o=t[7],Ot(o)}function rr(){const t=Ie.c(29),e=Ft(),{org:r}=Qe();let i;t[0]!==r.id?(i={connectionId:at,orgId:r.id},t[0]=r.id,t[1]=i):i=t[1];const n=st(i);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:Me.items()}),e.invalidateQueries({queryKey:Me.filters()})])},t[2]=e,t[3]=l):l=t[3];const m=l;let o;t[4]!==n?(o=async b=>(await qe(n,"COLLECTION_REGISTRY_APP_CREATE",{data:b})).item,t[4]=n,t[5]=o):o=t[5];let a;t[6]!==m||t[7]!==o?(a={mutationFn:o,onSuccess:m},t[6]=m,t[7]=o,t[8]=a):a=t[8];const u=dt(a);let c;t[9]!==n?(c=async b=>{const{id:D,data:w}=b;return(await qe(n,"COLLECTION_REGISTRY_APP_UPDATE",{id:D,data:w})).item},t[9]=n,t[10]=c):c=t[10];let h;t[11]!==m||t[12]!==c?(h={mutationFn:c,onSuccess:m},t[11]=m,t[12]=c,t[13]=h):h=t[13];const p=dt(h);let x;t[14]!==n?(x=async b=>(await qe(n,"COLLECTION_REGISTRY_APP_DELETE",{id:b})).item,t[14]=n,t[15]=x):x=t[15];let d;t[16]!==m||t[17]!==x?(d={mutationFn:x,onSuccess:m},t[16]=m,t[17]=x,t[18]=d):d=t[18];const v=dt(d);let g;t[19]!==n?(g=async b=>qe(n,"COLLECTION_REGISTRY_APP_BULK_CREATE",{items:b}),t[19]=n,t[20]=g):g=t[20];let N;t[21]!==m||t[22]!==g?(N={mutationFn:g,onSuccess:m},t[21]=m,t[22]=g,t[23]=N):N=t[23];const S=dt(N);let y;return t[24]!==S||t[25]!==u||t[26]!==v||t[27]!==p?(y={createMutation:u,updateMutation:p,deleteMutation:v,bulkCreateMutation:S},t[24]=S,t[25]=u,t[26]=v,t[27]=p,t[28]=y):y=t[28],y}function It(t){const e=Ie.c(31),{org:r,project:i}=Qe();let n;e[0]!==r.id?(n={connectionId:at,orgId:r.id},e[0]=r.id,e[1]=n):n=e[1];const l=st(n),m=Ft();let o;e[2]!==t||e[3]!==i.id?(o=Me.registryConfigByPlugin(i.id??"",t),e[2]=t,e[3]=i.id,e[4]=o):o=e[4];let a;e[5]!==l||e[6]!==t||e[7]!==i.id?(a=async()=>qe(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:i.id,pluginId:t}),e[5]=l,e[6]=t,e[7]=i.id,e[8]=a):a=e[8];const u=!!i.id;let c;e[9]!==o||e[10]!==a||e[11]!==u?(c={queryKey:o,queryFn:a,enabled:u,staleTime:6e4},e[9]=o,e[10]=a,e[11]=u,e[12]=c):c=e[12];const h=Ot(c);let p;e[13]!==l||e[14]!==t||e[15]!==i.id?(p=async D=>{const z=(await qe(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:i.id,pluginId:t}))?.config?.settings??{};return qe(l,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:i.id,pluginId:t,settings:{...z,...D}})},e[13]=l,e[14]=t,e[15]=i.id,e[16]=p):p=e[16];let x;e[17]!==t||e[18]!==i.id||e[19]!==m?(x=async()=>{await m.invalidateQueries({queryKey:Me.registryConfigByPlugin(i.id??"",t)})},e[17]=t,e[18]=i.id,e[19]=m,e[20]=x):x=e[20];let d;e[21]!==p||e[22]!==x?(d={mutationFn:p,onSuccess:x},e[21]=p,e[22]=x,e[23]=d):d=e[23];const v=dt(d),g=h.data?.config?.settings?.registryName??"Private Registry",N=h.data?.config?.settings?.registryIcon??"",S=h.data?.config?.settings?.llmConnectionId??"",y=h.data?.config?.settings?.llmModelId??"";let b;return e[24]!==h.isLoading||e[25]!==N||e[26]!==S||e[27]!==y||e[28]!==g||e[29]!==v?(b={registryName:g,registryIcon:N,registryLLMConnectionId:S,registryLLMModelId:y,isLoadingConfig:h.isLoading,saveRegistryConfigMutation:v},e[24]=h.isLoading,e[25]=N,e[26]=S,e[27]=y,e[28]=g,e[29]=v,e[30]=b):b=e[30],b}function Ut(t){return t?t.split(/[;|]/).map(e=>e.trim()).filter(Boolean):[]}function zt(t){const e=[];let r="",i=!1;for(let n=0;n<t.length;n+=1){const l=t[n],m=t[n+1];if(l==='"'){i&&m==='"'?(r+='"',n+=1):i=!i;continue}if(l===","&&!i){e.push(r.trim()),r="";continue}r+=l}return e.push(r.trim()),e}const ir=["id","title"],nr=["id","title","description","remote_url","remote_type","tags","categories","is_public"];function lr(t){const e=t.split(/\r?\n/).map(u=>u.trim()).filter(Boolean);if(e.length<2)return{items:[],warnings:[{line:0,message:"CSV must have a header row and at least one data row"}],skipped:0};const r=zt(e[0]??""),i=new Map,n=[];r.forEach((u,c)=>{const h=u.toLowerCase().trim();h&&i.set(h,c)});for(const u of ir)i.has(u)||n.push({line:1,message:`Missing required column: "${u}"`});for(const u of r){const c=u.toLowerCase().trim();c&&!nr.includes(c)&&n.push({line:1,message:`Unknown column "${u}" will be ignored`})}if(!i.has("id")||!i.has("title"))return{items:[],warnings:n,skipped:0};const l=(u,c)=>{const h=i.get(c);return typeof h=="number"?u[h]??"":""},m=[],o=new Set;let a=0;for(let u=1;u<e.length;u+=1){const c=zt(e[u]??""),h=l(c,"id").trim(),p=l(c,"title").trim();if(!h){n.push({line:u+1,message:"Missing id — row skipped"}),a+=1;continue}if(!p){n.push({line:u+1,message:`Missing title for id="${h}" — row skipped`}),a+=1;continue}if(o.has(h)){n.push({line:u+1,message:`Duplicate id="${h}" — row skipped`}),a+=1;continue}o.add(h);const x=l(c,"description").trim(),d=l(c,"remote_url").trim(),g=l(c,"remote_type").trim().toLowerCase()==="sse"?"sse":"http",N=Ut(l(c,"tags")),S=Ut(l(c,"categories")),y=l(c,"is_public").trim().toLowerCase(),b=y==="true"||y==="1"||y==="yes";m.push({id:h,title:p,description:x||null,is_public:b,_meta:{"mcp.mesh":{...N.length>0?{tags:N}:{},...S.length>0?{categories:S}:{}}},server:{name:h,title:p,description:x||void 0,remotes:d?[{type:g,url:d}]:[]}})}return{items:m,warnings:n,skipped:a}}const or=`id,title,description,remote_url,remote_type,tags,categories,is_public
|
|
1
|
+
import{r as C,c as Ie,u as Qe,z as Ft,j as s,t as Te,bA as bt}from"./index-Dp8TDmPV.js";import{B as te,c as ze}from"./button-CJa3f3rL.js";import{n as ws}from"./Container-CS-v1KY-.js";import{t as Ss}from"./Settings01-GQQE44Uf.js";import{u as Ot}from"./useQuery-DCx9kDUK.js";import{u as dt}from"./useMutation-CkwG6xTN.js";import{u as _s}from"./useInfiniteQuery-R7yz1vmu.js";import{a as at,u as st,j as Is}from"./constants-LnQa4w9L.js";import{B as je}from"./badge-DEQawiWd.js";import{I as $e}from"./input-DNUbpYNz.js";import{a as jt,c as lt,D as vt,b as yt,h as Dt,i as Rt,g as Ts}from"./dropdown-menu-DC2vYQhY.js";import{e as Gt,a as Bt,b as pt,T as Pe,d as Vt,c as Ue}from"./table-C_SqJ2pz.js";import{a as Lt,T as ks}from"./toggle-group-Dz6DkmD4.js";import{u as Ds}from"./use-view-mode-B21E886q.js";import{i as qt}from"./DotsVertical-BAQdtXzK.js";import{i as Rs}from"./FilterLines-BqWnRXAG.js";import{i as Nt}from"./Globe01-Bxre7Rfj.js";import{i as ot}from"./Loading01-CXnHH69h.js";import{i as Qt}from"./SearchMd-vTjANW25.js";import{b as Ht,c as Kt,d as Yt,e as Wt,a as Zt,D as Jt}from"./dialog-Bzq7eXqS.js";import{i as mt}from"./AlertCircle-Uhm-vg87.js";import{i as Ct}from"./CheckCircle-BabFBaUr.js";import{n as Ls}from"./Download01-k9Xf7rXk.js";import{i as Et}from"./Upload01-C_yAut88.js";import{c as Es,b as Ps,d as Us,A as zs,g as Ms,e as $s,a as As,f as Fs}from"./alert-dialog-CqIibzn6.js";import{C as xt}from"./card-CsxzEYEk.js";import{s as wt}from"./Trash01-ULZyLlT5.js";import{L as Ee}from"./label-SUAIjh3i.js";import{n as Os,S as Xt,a as es,b as ts,c as ss,d as ht}from"./select-C2nUbKfi.js";import{S as Gs}from"./switch-B_mHCx3S.js";import{T as Pt}from"./textarea-CTzgIHFy.js";import{i as Bs}from"./ArrowLeft-DZdpcFcm.js";import{i as Vs}from"./ArrowRight-DDCJ7vCm.js";import{s as St}from"./RefreshCcw01-h4iMlxqc.js";import{i as qs}from"./X-CMKSGw1c.js";import{t as rs}from"./ChevronDown-C42nqF2a.js";import{h as Qs,e as Hs}from"./use-connection-Bpj__KJl.js";import{b as Ks,P as Ys,a as Ws}from"./popover-NmdUTNcA.js";import{i as Zs,a as Js}from"./Save01-B2I-fdos.js";import"./infiniteQueryObserver-D_e-0DLm.js";import"./Check-RSjbQD0O.js";import"./ChevronRight-CYPNNnez.js";import"./use-mobile-BhG5mqie.js";import"./index-DBhC1Bw_.js";const is=({size:t=24,color:e="currentColor",...r})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},C.createElement("path",{d:"M12.5 3H7.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 21H17c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C21 18.395 21 17.93 21 17m-2-9V2m-3 3h6M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4.49 3.418-8.459 7.69c-.476.433-.714.649-.735.836a.5.5 0 0 0 .167.431C6.105 21 6.426 21 7.07 21h9.387c1.44 0 2.159 0 2.724-.242a3 3 0 0 0 1.578-1.578c.242-.565.242-1.285.242-2.724 0-.484 0-.726-.053-.952a2.001 2.001 0 0 0-.374-.778c-.143-.182-.332-.333-.71-.636l-2.797-2.237c-.379-.303-.568-.454-.776-.508a1 1 0 0 0-.557.018c-.205.066-.384.23-.743.555Z"}));is.displayName="ImagePlus";const _t=({size:t=24,color:e="currentColor",...r})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},C.createElement("path",{d:"m12.708 18.364-1.415 1.414a5 5 0 1 1-7.07-7.07l1.413-1.415m12.728 1.414 1.415-1.414a5 5 0 0 0-7.071-7.071l-1.415 1.414M8.5 15.5l7-7"}));_t.displayName="Link01";const ns=({size:t=24,color:e="currentColor",...r})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},C.createElement("path",{d:"m6 6 4.5 4.5M6 6H3L2 3l1-1 3 1v3Zm13.259-3.259-2.628 2.628c-.396.396-.594.594-.668.822a1 1 0 0 0 0 .618c.074.228.272.426.668.822l.238.238c.396.396.594.594.822.668a1 1 0 0 0 .618 0c.228-.074.426-.272.822-.668L21.59 5.41a5.5 5.5 0 0 1-6.16 7.485c-.485-.096-.729-.144-.876-.13a.836.836 0 0 0-.373.114c-.13.07-.261.201-.523.463L6.5 20.5a2.121 2.121 0 0 1-3-3l7.157-7.157c.262-.262.393-.393.463-.524a.836.836 0 0 0 .113-.372c.015-.148-.033-.39-.129-.877a5.5 5.5 0 0 1 8.155-5.83ZM12 15l5.5 5.5a2.121 2.121 0 0 0 3-3l-4.525-4.525a5.475 5.475 0 0 1-.934-.17c-.39-.107-.816-.03-1.101.255L12 15Z"}));ns.displayName="Tool02";const Me={all:["private-registry"],items:()=>[...Me.all,"items"],itemsList:(t,e,r,i)=>[...Me.items(),"list",{search:t,tags:e,categories:r,limit:i}],item:t=>[...Me.items(),"item",t],filters:()=>[...Me.all,"filters"],registryConfig:()=>[...Me.all,"registry-config"],registryConfigByPlugin:(t,e)=>[...Me.registryConfig(),t,e]},Xs=24;function er(t){return t.trim()}async function qe(t,e,r){const i=await t.callTool({name:e,arguments:r});if(!i||typeof i!="object")throw new Error(`Invalid tool response for ${e}`);if(i.isError){const n=i.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(n)}return i.structuredContent??i}function ls(t){const e=Ie.c(19),{org:r}=Qe();let i;e[0]!==r.id?(i={connectionId:at,orgId:r.id},e[0]=r.id,e[1]=i):i=e[1];const n=st(i);let l,m,o,a;e[2]!==t.categories||e[3]!==t.limit||e[4]!==t.search||e[5]!==t.tags?(m=er(t.search),l=t.limit??Xs,a=_s,o=Me.itemsList(m,t.tags,t.categories,l),e[2]=t.categories,e[3]=t.limit,e[4]=t.search,e[5]=t.tags,e[6]=l,e[7]=m,e[8]=o,e[9]=a):(l=e[6],m=e[7],o=e[8],a=e[9]);let u;e[10]!==n||e[11]!==l||e[12]!==t.categories||e[13]!==t.tags||e[14]!==m?(u=async h=>{const{pageParam:p}=h,x=m.length>0?{operator:"or",conditions:[{field:["title"],operator:"contains",value:m},{field:["description"],operator:"contains",value:m},{field:["id"],operator:"contains",value:m},{field:["server","name"],operator:"contains",value:m}]}:void 0;return qe(n,"COLLECTION_REGISTRY_APP_LIST",{cursor:p,limit:l,tags:t.tags.length?t.tags:void 0,categories:t.categories.length?t.categories:void 0,where:x})},e[10]=n,e[11]=l,e[12]=t.categories,e[13]=t.tags,e[14]=m,e[15]=u):u=e[15];let c;return e[16]!==o||e[17]!==u?(c={queryKey:o,queryFn:u,initialPageParam:void 0,getNextPageParam:tr,staleTime:3e4},e[16]=o,e[17]=u,e[18]=c):c=e[18],a(c)}function tr(t){return t.nextCursor}function sr(){const t=Ie.c(8),{org:e}=Qe();let r;t[0]!==e.id?(r={connectionId:at,orgId:e.id},t[0]=e.id,t[1]=r):r=t[1];const i=st(r);let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=Me.filters(),t[2]=n):n=t[2];let l;t[3]!==i?(l=async()=>qe(i,"COLLECTION_REGISTRY_APP_FILTERS",{}),t[3]=i,t[4]=l):l=t[4];let m;t[5]===Symbol.for("react.memo_cache_sentinel")?(m={tags:[],categories:[]},t[5]=m):m=t[5];let o;return t[6]!==l?(o={queryKey:n,queryFn:l,placeholderData:m,staleTime:6e4},t[6]=l,t[7]=o):o=t[7],Ot(o)}function rr(){const t=Ie.c(29),e=Ft(),{org:r}=Qe();let i;t[0]!==r.id?(i={connectionId:at,orgId:r.id},t[0]=r.id,t[1]=i):i=t[1];const n=st(i);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:Me.items()}),e.invalidateQueries({queryKey:Me.filters()})])},t[2]=e,t[3]=l):l=t[3];const m=l;let o;t[4]!==n?(o=async b=>(await qe(n,"COLLECTION_REGISTRY_APP_CREATE",{data:b})).item,t[4]=n,t[5]=o):o=t[5];let a;t[6]!==m||t[7]!==o?(a={mutationFn:o,onSuccess:m},t[6]=m,t[7]=o,t[8]=a):a=t[8];const u=dt(a);let c;t[9]!==n?(c=async b=>{const{id:D,data:w}=b;return(await qe(n,"COLLECTION_REGISTRY_APP_UPDATE",{id:D,data:w})).item},t[9]=n,t[10]=c):c=t[10];let h;t[11]!==m||t[12]!==c?(h={mutationFn:c,onSuccess:m},t[11]=m,t[12]=c,t[13]=h):h=t[13];const p=dt(h);let x;t[14]!==n?(x=async b=>(await qe(n,"COLLECTION_REGISTRY_APP_DELETE",{id:b})).item,t[14]=n,t[15]=x):x=t[15];let d;t[16]!==m||t[17]!==x?(d={mutationFn:x,onSuccess:m},t[16]=m,t[17]=x,t[18]=d):d=t[18];const v=dt(d);let g;t[19]!==n?(g=async b=>qe(n,"COLLECTION_REGISTRY_APP_BULK_CREATE",{items:b}),t[19]=n,t[20]=g):g=t[20];let N;t[21]!==m||t[22]!==g?(N={mutationFn:g,onSuccess:m},t[21]=m,t[22]=g,t[23]=N):N=t[23];const S=dt(N);let y;return t[24]!==S||t[25]!==u||t[26]!==v||t[27]!==p?(y={createMutation:u,updateMutation:p,deleteMutation:v,bulkCreateMutation:S},t[24]=S,t[25]=u,t[26]=v,t[27]=p,t[28]=y):y=t[28],y}function It(t){const e=Ie.c(31),{org:r,project:i}=Qe();let n;e[0]!==r.id?(n={connectionId:at,orgId:r.id},e[0]=r.id,e[1]=n):n=e[1];const l=st(n),m=Ft();let o;e[2]!==t||e[3]!==i.id?(o=Me.registryConfigByPlugin(i.id??"",t),e[2]=t,e[3]=i.id,e[4]=o):o=e[4];let a;e[5]!==l||e[6]!==t||e[7]!==i.id?(a=async()=>qe(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:i.id,pluginId:t}),e[5]=l,e[6]=t,e[7]=i.id,e[8]=a):a=e[8];const u=!!i.id;let c;e[9]!==o||e[10]!==a||e[11]!==u?(c={queryKey:o,queryFn:a,enabled:u,staleTime:6e4},e[9]=o,e[10]=a,e[11]=u,e[12]=c):c=e[12];const h=Ot(c);let p;e[13]!==l||e[14]!==t||e[15]!==i.id?(p=async D=>{const z=(await qe(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:i.id,pluginId:t}))?.config?.settings??{};return qe(l,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:i.id,pluginId:t,settings:{...z,...D}})},e[13]=l,e[14]=t,e[15]=i.id,e[16]=p):p=e[16];let x;e[17]!==t||e[18]!==i.id||e[19]!==m?(x=async()=>{await m.invalidateQueries({queryKey:Me.registryConfigByPlugin(i.id??"",t)})},e[17]=t,e[18]=i.id,e[19]=m,e[20]=x):x=e[20];let d;e[21]!==p||e[22]!==x?(d={mutationFn:p,onSuccess:x},e[21]=p,e[22]=x,e[23]=d):d=e[23];const v=dt(d),g=h.data?.config?.settings?.registryName??"Private Registry",N=h.data?.config?.settings?.registryIcon??"",S=h.data?.config?.settings?.llmConnectionId??"",y=h.data?.config?.settings?.llmModelId??"";let b;return e[24]!==h.isLoading||e[25]!==N||e[26]!==S||e[27]!==y||e[28]!==g||e[29]!==v?(b={registryName:g,registryIcon:N,registryLLMConnectionId:S,registryLLMModelId:y,isLoadingConfig:h.isLoading,saveRegistryConfigMutation:v},e[24]=h.isLoading,e[25]=N,e[26]=S,e[27]=y,e[28]=g,e[29]=v,e[30]=b):b=e[30],b}function Ut(t){return t?t.split(/[;|]/).map(e=>e.trim()).filter(Boolean):[]}function zt(t){const e=[];let r="",i=!1;for(let n=0;n<t.length;n+=1){const l=t[n],m=t[n+1];if(l==='"'){i&&m==='"'?(r+='"',n+=1):i=!i;continue}if(l===","&&!i){e.push(r.trim()),r="";continue}r+=l}return e.push(r.trim()),e}const ir=["id","title"],nr=["id","title","description","remote_url","remote_type","tags","categories","is_public"];function lr(t){const e=t.split(/\r?\n/).map(u=>u.trim()).filter(Boolean);if(e.length<2)return{items:[],warnings:[{line:0,message:"CSV must have a header row and at least one data row"}],skipped:0};const r=zt(e[0]??""),i=new Map,n=[];r.forEach((u,c)=>{const h=u.toLowerCase().trim();h&&i.set(h,c)});for(const u of ir)i.has(u)||n.push({line:1,message:`Missing required column: "${u}"`});for(const u of r){const c=u.toLowerCase().trim();c&&!nr.includes(c)&&n.push({line:1,message:`Unknown column "${u}" will be ignored`})}if(!i.has("id")||!i.has("title"))return{items:[],warnings:n,skipped:0};const l=(u,c)=>{const h=i.get(c);return typeof h=="number"?u[h]??"":""},m=[],o=new Set;let a=0;for(let u=1;u<e.length;u+=1){const c=zt(e[u]??""),h=l(c,"id").trim(),p=l(c,"title").trim();if(!h){n.push({line:u+1,message:"Missing id — row skipped"}),a+=1;continue}if(!p){n.push({line:u+1,message:`Missing title for id="${h}" — row skipped`}),a+=1;continue}if(o.has(h)){n.push({line:u+1,message:`Duplicate id="${h}" — row skipped`}),a+=1;continue}o.add(h);const x=l(c,"description").trim(),d=l(c,"remote_url").trim(),g=l(c,"remote_type").trim().toLowerCase()==="sse"?"sse":"http",N=Ut(l(c,"tags")),S=Ut(l(c,"categories")),y=l(c,"is_public").trim().toLowerCase(),b=y==="true"||y==="1"||y==="yes";m.push({id:h,title:p,description:x||null,is_public:b,_meta:{"mcp.mesh":{...N.length>0?{tags:N}:{},...S.length>0?{categories:S}:{}}},server:{name:h,title:p,description:x||void 0,remotes:d?[{type:g,url:d}]:[]}})}return{items:m,warnings:n,skipped:a}}const or=`id,title,description,remote_url,remote_type,tags,categories,is_public
|
|
2
2
|
my-mcp-server,My MCP Server,A useful MCP server,https://example.com/mcp,http,ai|tools,productivity,true
|
|
3
3
|
another-server,Another Server,Another useful server,https://example2.com/mcp,http,data|analytics,data-processing,false`;function ar(){const t=new Blob([or],{type:"text/csv;charset=utf-8"}),e=URL.createObjectURL(t),r=document.createElement("a");r.href=e,r.download="registry-import-template.csv",r.click(),URL.revokeObjectURL(e)}function cr(t){const e=Ie.c(63),{open:r,onOpenChange:i,isImporting:n,onImport:l}=t,m=n===void 0?!1:n,[o,a]=C.useState(null),[u,c]=C.useState(null),[h,p]=C.useState(null),x=C.useRef(null);let d;e[0]!==i?(d=le=>{i(le),le||(a(null),c(null),p(null),x.current&&(x.current.value=""))},e[0]=i,e[1]=d):d=e[1];const v=d;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=async le=>{if(!le)return;p(le.name),c(null);const me=await le.text();a(lr(me))},e[2]=g):g=e[2];const N=g;let S;e[3]!==l||e[4]!==o?(S=async()=>{if(!o?.items.length)return;const le=await l(o.items);c(le)},e[3]=l,e[4]=o,e[5]=S):S=e[5];const y=S;let b;e[6]!==o?.items?(b=o?.items??[],e[6]=o?.items,e[7]=b):b=e[7];const D=b;let w;e[8]!==o?.warnings?(w=o?.warnings??[],e[8]=o?.warnings,e[9]=w):w=e[9];const z=w;let $;e[10]!==z?($=z.some(xr),e[10]=z,e[11]=$):$=e[11];const E=$,T=u!==null;let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(Ht,{children:[s.jsx(Kt,{children:"Import MCP Servers from CSV"}),s.jsx(Yt,{children:"Upload a CSV file to bulk-import MCP servers into the registry."})]}),e[12]=_):_=e[12];let I;e[13]===Symbol.for("react.memo_cache_sentinel")?(I=()=>x.current?.click(),e[13]=I):I=e[13];let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(Et,{size:14}),e[14]=M):M=e[14];const k=h?"Change file":"Choose CSV file";let f;e[15]!==m||e[16]!==k?(f=s.jsxs(te,{variant:"outline",size:"sm",className:"gap-1.5",onClick:I,disabled:m,children:[M,k]}),e[15]=m,e[16]=k,e[17]=f):f=e[17];let R;e[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx("input",{ref:x,type:"file",accept:".csv,text/csv",className:"hidden",onChange:le=>N(le.target.files?.[0]??null)}),e[18]=R):R=e[18];let A;e[19]!==h?(A=h&&s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:h}),e[19]=h,e[20]=A):A=e[20];let B;e[21]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("div",{className:"flex-1"}),e[21]=B):B=e[21];let K;e[22]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsxs(te,{variant:"ghost",size:"sm",className:"gap-1.5 text-xs text-muted-foreground",onClick:ar,children:[s.jsx(Ls,{size:14}),"Download template"]}),e[22]=K):K=e[22];let F;e[23]!==f||e[24]!==A?(F=s.jsxs("div",{className:"flex items-center gap-3",children:[f,R,A,B,K]}),e[23]=f,e[24]=A,e[25]=F):F=e[25];let O;e[26]!==z?(O=z.length>0&&s.jsx("div",{className:"rounded-lg border border-yellow-200 bg-yellow-50 dark:border-yellow-900 dark:bg-yellow-950/30 p-3 grid gap-1",children:z.map(ur)}),e[26]=z,e[27]=O):O=e[27];let G;e[28]!==D||e[29]!==o?(G=D.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:"Preview"}),s.jsxs(je,{variant:"secondary",children:[D.length," items"]}),o?.skipped?s.jsxs(je,{variant:"outline",className:"text-yellow-600",children:[o.skipped," skipped"]}):null]}),s.jsx("div",{className:"border rounded-lg overflow-hidden",children:s.jsx("div",{className:"max-h-[300px] overflow-y-auto",children:s.jsxs(Gt,{children:[s.jsx(Bt,{children:s.jsxs(pt,{children:[s.jsx(Pe,{className:"w-[140px]",children:"ID"}),s.jsx(Pe,{children:"Title"}),s.jsx(Pe,{children:"Remote URL"}),s.jsx(Pe,{className:"w-[80px] text-center",children:"Public"}),s.jsx(Pe,{children:"Tags"})]})}),s.jsx(Vt,{children:D.map(mr)})]})})})]}),e[28]=D,e[29]=o,e[30]=G):G=e[30];let Y;e[31]!==u?(Y=u&&s.jsxs("div",{className:"rounded-lg border p-3 grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(Ct,{size:16,className:"text-emerald-600"}),"Imported ",u.created," item(s) successfully"]}),u.errors.length>0&&s.jsx("div",{className:"grid gap-1 mt-1",children:u.errors.map(dr)})]}),e[31]=u,e[32]=Y):Y=e[32];let V;e[33]!==T||e[34]!==o?(V=!o&&!T&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[s.jsx(Et,{size:32,className:"text-muted-foreground/40 mb-3"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a CSV file or download the template to get started."}),s.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Required columns: ",s.jsx("code",{children:"id"}),", ",s.jsx("code",{children:"title"}),". Optional:"," ",s.jsx("code",{children:"description"}),", ",s.jsx("code",{children:"remote_url"}),","," ",s.jsx("code",{children:"remote_type"}),", ",s.jsx("code",{children:"tags"}),","," ",s.jsx("code",{children:"categories"}),", ",s.jsx("code",{children:"is_public"}),"."]}),s.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Use ",s.jsx("code",{children:"|"})," or ",s.jsx("code",{children:";"})," to separate multiple tags/categories within a cell."]})]}),e[33]=T,e[34]=o,e[35]=V):V=e[35];let X;e[36]!==F||e[37]!==O||e[38]!==G||e[39]!==Y||e[40]!==V?(X=s.jsxs("div",{className:"flex-1 overflow-y-auto grid gap-4 pr-1",children:[F,O,G,Y,V]}),e[36]=F,e[37]=O,e[38]=G,e[39]=Y,e[40]=V,e[41]=X):X=e[41];let se;e[42]!==v?(se=()=>v(!1),e[42]=v,e[43]=se):se=e[43];const re=T?"Done":"Cancel";let q;e[44]!==se||e[45]!==re?(q=s.jsx(te,{variant:"outline",onClick:se,children:re}),e[44]=se,e[45]=re,e[46]=q):q=e[46];let ne;e[47]!==y||e[48]!==E||e[49]!==T||e[50]!==m||e[51]!==D.length?(ne=!T&&s.jsx(te,{onClick:y,disabled:m||D.length===0||E,children:m?"Importing...":`Import ${D.length} item(s)`}),e[47]=y,e[48]=E,e[49]=T,e[50]=m,e[51]=D.length,e[52]=ne):ne=e[52];let Q;e[53]!==q||e[54]!==ne?(Q=s.jsxs(Wt,{className:"gap-2 sm:gap-0",children:[q,ne]}),e[53]=q,e[54]=ne,e[55]=Q):Q=e[55];let W;e[56]!==X||e[57]!==Q?(W=s.jsxs(Zt,{className:"sm:max-w-3xl max-h-[85vh] flex flex-col",children:[_,X,Q]}),e[56]=X,e[57]=Q,e[58]=W):W=e[58];let Z;return e[59]!==v||e[60]!==r||e[61]!==W?(Z=s.jsx(Jt,{open:r,onOpenChange:v,children:W}),e[59]=v,e[60]=r,e[61]=W,e[62]=Z):Z=e[62],Z}function dr(t){return s.jsxs("p",{className:"text-xs text-destructive flex items-start gap-1.5",children:[s.jsx(mt,{size:12,className:"shrink-0 mt-0.5"}),s.jsxs("span",{children:[s.jsx("span",{className:"font-mono",children:t.id}),": ",t.error]})]},t.id)}function mr(t){return s.jsxs(pt,{children:[s.jsx(Ue,{className:"font-mono text-xs",children:t.id}),s.jsx(Ue,{className:"text-sm",children:t.title}),s.jsx(Ue,{className:"text-xs text-muted-foreground max-w-[200px] truncate",children:t.server.remotes?.[0]?.url??s.jsx("span",{className:"italic",children:"none"})}),s.jsx(Ue,{className:"text-center",children:t.is_public?s.jsx(je,{variant:"secondary",className:"text-[10px] bg-emerald-100 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-400",children:"Yes"}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"No"})}),s.jsx(Ue,{className:"text-xs text-muted-foreground",children:(t._meta?.["mcp.mesh"]?.tags??[]).join(", ")||"-"})]},t.id)}function ur(t,e){return s.jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-400 flex items-start gap-1.5",children:[s.jsx(mt,{size:12,className:"shrink-0 mt-0.5"}),s.jsxs("span",{children:[t.line>0&&s.jsxs("span",{className:"font-mono text-[10px] mr-1",children:["Line ",t.line,":"]}),t.message]})]},`${t.line}-${e}`)}function xr(t){return t.message.startsWith("Missing required column:")}function hr(t){const e=Ie.c(19),{open:r,onOpenChange:i,title:n,isDeleting:l,onConfirm:m}=t,o=l===void 0?!1:l;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Es,{children:"Delete registry item?"}),e[0]=a):a=e[0];let u;e[1]!==n?(u=s.jsxs(Ps,{children:[a,s.jsxs(Us,{children:["This action cannot be undone. Item ",s.jsx("strong",{children:n})," will be permanently removed from this private registry."]})]}),e[1]=n,e[2]=u):u=e[2];let c;e[3]!==o?(c=s.jsx(zs,{disabled:o,children:"Cancel"}),e[3]=o,e[4]=c):c=e[4];const h=o?"Deleting...":"Delete";let p;e[5]!==o||e[6]!==m||e[7]!==h?(p=s.jsx(Ms,{disabled:o,onClick:m,children:h}),e[5]=o,e[6]=m,e[7]=h,e[8]=p):p=e[8];let x;e[9]!==c||e[10]!==p?(x=s.jsxs($s,{children:[c,p]}),e[9]=c,e[10]=p,e[11]=x):x=e[11];let d;e[12]!==u||e[13]!==x?(d=s.jsxs(As,{children:[u,x]}),e[12]=u,e[13]=x,e[14]=d):d=e[14];let v;return e[15]!==i||e[16]!==r||e[17]!==d?(v=s.jsx(Fs,{open:r,onOpenChange:i,children:d}),e[15]=i,e[16]=r,e[17]=d,e[18]=v):v=e[18],v}function pr(t){const[e]=t.id.split("/");return e??"provider"}function gr(t){return t._meta?.["mcp.mesh"]?.tags??[]}function fr(t){return t._meta?.["mcp.mesh"]?.categories??[]}function jr(t){return t.server?.icons?.[0]?.src??null}function vr(t){const e=Ie.c(56),{item:r,onEdit:i,onDelete:n}=t;let l;e[0]!==r?(l=jr(r),e[0]=r,e[1]=l):l=e[1];const m=l;let o;e[2]!==r?(o=[...gr(r),...fr(r)],e[2]=r,e[3]=o):o=e[3];const a=o;let u;e[4]!==a?(u=a.slice(0,3),e[4]=a,e[5]=u):u=e[5];const c=u,h=Math.max(0,a.length-c.length);let p;e[6]!==m||e[7]!==r.title?(p=s.jsx("div",{className:"size-10 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0 flex items-center justify-center",children:m?s.jsx("img",{src:m,alt:r.title,className:"h-full w-full object-cover",loading:"lazy"}):s.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:r.title.charAt(0).toUpperCase()})}),e[6]=m,e[7]=r.title,e[8]=p):p=e[8];let x;e[9]!==r.title?(x=s.jsx("p",{className:"font-medium truncate",children:r.title}),e[9]=r.title,e[10]=x):x=e[10];let d;e[11]!==r?(d=pr(r),e[11]=r,e[12]=d):d=e[12];let v;e[13]!==d?(v=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:d}),e[13]=d,e[14]=v):v=e[14];let g;e[15]!==r.is_public?(g=r.is_public?s.jsxs(je,{variant:"default",className:"gap-1",children:[s.jsx(Nt,{size:10}),"Public"]}):s.jsx(je,{variant:"secondary",children:"Private"}),e[15]=r.is_public,e[16]=g):g=e[16];let N;e[17]!==v||e[18]!==g?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[v,g]}),e[17]=v,e[18]=g,e[19]=N):N=e[19];let S;e[20]!==x||e[21]!==N?(S=s.jsxs("div",{className:"min-w-0 flex-1",children:[x,N]}),e[20]=x,e[21]=N,e[22]=S):S=e[22];let y;e[23]!==S||e[24]!==p?(y=s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[p,S]}),e[23]=S,e[24]=p,e[25]=y):y=e[25];let b;e[26]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(jt,{asChild:!0,children:s.jsx(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(qt,{size:18})})}),e[26]=b):b=e[26];let D;e[27]!==r||e[28]!==i?(D=s.jsx(lt,{onClick:()=>i(r),children:"Edit"}),e[27]=r,e[28]=i,e[29]=D):D=e[29];let w;e[30]!==r||e[31]!==n?(w=()=>n(r),e[30]=r,e[31]=n,e[32]=w):w=e[32];let z;e[33]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(wt,{size:14}),e[33]=z):z=e[33];let $;e[34]!==w?($=s.jsxs(lt,{variant:"destructive",onClick:w,children:[z,"Delete"]}),e[34]=w,e[35]=$):$=e[35];let E;e[36]!==D||e[37]!==$?(E=s.jsxs(vt,{children:[b,s.jsxs(yt,{align:"end",children:[D,$]})]}),e[36]=D,e[37]=$,e[38]=E):E=e[38];let T;e[39]!==y||e[40]!==E?(T=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[y,E]}),e[39]=y,e[40]=E,e[41]=T):T=e[41];const _=r._meta?.["mcp.mesh"]?.short_description||r.description||r.server.description||"No description provided.";let I;e[42]!==_?(I=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 min-h-10",children:_}),e[42]=_,e[43]=I):I=e[43];let M;e[44]!==r.id||e[45]!==c?(M=c.map(A=>s.jsx(je,{variant:"secondary",children:A},`${r.id}-badge-${A}`)),e[44]=r.id,e[45]=c,e[46]=M):M=e[46];let k;e[47]!==h?(k=h>0&&s.jsxs(je,{variant:"outline",children:["+",h]}),e[47]=h,e[48]=k):k=e[48];let f;e[49]!==M||e[50]!==k?(f=s.jsxs("div",{className:"flex flex-wrap gap-1",children:[M,k]}),e[49]=M,e[50]=k,e[51]=f):f=e[51];let R;return e[52]!==T||e[53]!==I||e[54]!==f?(R=s.jsxs(xt,{className:"p-4 gap-4 transition-colors hover:bg-muted/50",children:[T,I,f]}),e[52]=T,e[53]=I,e[54]=f,e[55]=R):R=e[55],R}function os(t){const e=Ie.c(27),{value:r,onChange:i,onFileUpload:n,error:l,isUploading:m}=t,o=m===void 0?!1:m,[a,u]=C.useState(!1),[c,h]=C.useState(!1),p=C.useRef(null);let x;e[0]!==o?(x=_=>{_.preventDefault(),o||u(!0)},e[0]=o,e[1]=x):x=e[1];const d=x;let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=_=>{_.preventDefault(),u(!1)},e[2]=v):v=e[2];const g=v;let N;e[3]!==o||e[4]!==n?(N=async _=>{if(_.preventDefault(),u(!1),o)return;const I=_.dataTransfer.files[0];I&&await n(I)},e[3]=o,e[4]=n,e[5]=N):N=e[5];const S=N;let y;e[6]!==o||e[7]!==n?(y=async _=>{const I=_.target.files?.[0];I&&!o&&await n(I),_.target.value=""},e[6]=o,e[7]=n,e[8]=y):y=e[8];const b=y,D=r.length>0;let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Ee,{children:"Image"}),e[9]=w):w=e[9];let z;e[10]!==d||e[11]!==S||e[12]!==D||e[13]!==a||e[14]!==o||e[15]!==i||e[16]!==c||e[17]!==r?(z=D?s.jsx("div",{className:"relative group min-h-[180px] rounded-xl border border-border overflow-hidden bg-muted/10",children:s.jsxs("div",{className:"flex items-center gap-3 p-3 h-full",children:[s.jsx("div",{className:"size-20 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0",children:s.jsx("img",{src:r,alt:"Preview",className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsxs(te,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>p.current?.click(),disabled:o,children:[s.jsx(St,{className:"size-3"}),"Change"]}),s.jsxs(te,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5 text-destructive hover:text-destructive",onClick:()=>{i(""),h(!1)},disabled:o,children:[s.jsx(wt,{className:"size-3"}),"Remove"]})]})]})]})}):o?s.jsxs("div",{className:"relative min-h-[180px] rounded-xl border border-border bg-muted/10 flex flex-col items-center justify-center gap-3",children:[s.jsx(ot,{className:"size-8 animate-spin text-muted-foreground"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Uploading image..."})]}):s.jsxs("div",{className:ze("relative min-h-[180px] rounded-xl border-2 border-dashed transition-colors cursor-pointer flex flex-col",a?"border-primary bg-primary/5":"border-border hover:border-muted-foreground/40 hover:bg-muted/30"),onDragOver:d,onDragLeave:g,onDrop:S,onClick:()=>p.current?.click(),children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-6 px-4 flex-1",children:[s.jsx("div",{className:ze("size-10 rounded-lg flex items-center justify-center transition-colors",a?"bg-primary/10 text-primary":"bg-muted/50 text-muted-foreground"),children:s.jsx(is,{size:20})}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:a?"Drop image here":"Click or drag to upload"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"PNG, JPG, SVG up to 2MB"})]})]}),c?s.jsx("div",{className:"border-t border-border px-3 py-2",onClick:yr,children:s.jsx($e,{placeholder:"https://example.com/logo.png",value:r,className:"text-xs h-8",onChange:_=>i(_.target.value)})}):s.jsx("div",{className:"border-t border-border px-4 py-2",children:s.jsxs("button",{type:"button",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors w-full justify-center",onClick:_=>{_.stopPropagation(),h(!0)},children:[s.jsx(_t,{className:"size-3"}),"Or paste an image URL"]})})]}),e[10]=d,e[11]=S,e[12]=D,e[13]=a,e[14]=o,e[15]=i,e[16]=c,e[17]=r,e[18]=z):z=e[18];let $;e[19]!==b?($=s.jsx("input",{ref:p,type:"file",accept:"image/*",className:"hidden",onChange:b}),e[19]=b,e[20]=$):$=e[20];let E;e[21]!==l?(E=l&&s.jsx("p",{className:"text-xs text-destructive",children:l}),e[21]=l,e[22]=E):E=e[22];let T;return e[23]!==z||e[24]!==$||e[25]!==E?(T=s.jsxs("div",{className:"grid gap-1.5",children:[w,z,$,E]}),e[23]=z,e[24]=$,e[25]=E,e[26]=T):T=e[26],T}function yr(t){return t.stopPropagation()}function as(){const[t,e]=C.useState("idle"),[r,i]=C.useState(null),{org:n}=Qe(),l=st({connectionId:at,orgId:n.id});return{discover:async(a,u)=>{if(!a)return null;e("loading"),i(null);try{const c=await l.callTool({name:"REGISTRY_DISCOVER_TOOLS",arguments:{url:a,type:u==="sse"?"sse":"http"}}),h=c.structuredContent??c;if(c.isError){const p=c.content?.find(x=>x.type==="text")?.text??"Tool returned an error";return i(p),e("error"),null}return h.error?br(h.error)?(i(h.error),e("auth_required"),null):(i(h.error),e("error"),null):!h.tools||h.tools.length===0?(i("No tools found on this MCP server."),e("error"),null):(e("success"),h.tools)}catch(c){const h=c instanceof Error?c.message:String(c);return i(h||"Could not discover tools."),e("error"),null}},discoverStatus:t,discoverError:r,resetDiscover:()=>{e("idle"),i(null)}}}function br(t){const e=t.toLowerCase();return e.includes("authentication")||e.includes("unauthorized")||e.includes("credentials")}function Nr(t){const e=Ie.c(54),{tools:r,onChange:i,remoteUrl:n,remoteType:l,externalDiscoverStatus:m,externalDiscoverError:o}=t,[a,u]=C.useState(r.length>0),{discover:c,discoverStatus:h,discoverError:p,resetDiscover:x}=as(),d=m??h,v=o??p;let g;e[0]!==c||e[1]!==i||e[2]!==l||e[3]!==n?(g=async()=>{if(!n)return;const K=await c(n,l??"http");K&&(i(K),u(!0))},e[0]=c,e[1]=i,e[2]=l,e[3]=n,e[4]=g):g=e[4];const N=g;let S;e[5]!==i||e[6]!==x?(S=()=>{i([]),x()},e[5]=i,e[6]=x,e[7]=S):S=e[7];const y=S;let b;e[8]!==a?(b=()=>u(!a),e[8]=a,e[9]=b):b=e[9];let D,w;e[10]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(ns,{size:14,className:"text-muted-foreground"}),w=s.jsx("span",{children:"Tools"}),e[10]=D,e[11]=w):(D=e[10],w=e[11]);let z;e[12]!==r.length?(z=r.length>0&&s.jsx(je,{variant:"secondary",className:"text-xs px-1.5 py-0",children:r.length}),e[12]=r.length,e[13]=z):z=e[13];let $;e[14]!==a?($=a?s.jsx(Os,{size:14,className:"text-muted-foreground"}):s.jsx(rs,{size:14,className:"text-muted-foreground"}),e[14]=a,e[15]=$):$=e[15];let E;e[16]!==b||e[17]!==z||e[18]!==$?(E=s.jsxs("button",{type:"button",className:"flex items-center gap-2 text-sm font-medium cursor-pointer",onClick:b,children:[D,w,z,$]}),e[16]=b,e[17]=z,e[18]=$,e[19]=E):E=e[19];let T;e[20]!==y||e[21]!==r.length?(T=r.length>0&&s.jsxs(te,{type:"button",variant:"ghost",size:"sm",className:"h-7 text-xs gap-1.5 text-muted-foreground",onClick:y,children:[s.jsx(wt,{size:12}),"Clear"]}),e[20]=y,e[21]=r.length,e[22]=T):T=e[22];let _;e[23]!==d||e[24]!==N||e[25]!==n||e[26]!==r.length?(_=n&&s.jsxs(te,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5 border-green-500/30 text-green-600 dark:text-green-400 shadow-[0_0_8px_rgba(34,197,94,0.3)] hover:shadow-[0_0_14px_rgba(34,197,94,0.5)] hover:border-green-500/50 transition-all",onClick:N,disabled:d==="loading",children:[d==="loading"?s.jsx(ot,{size:12,className:"animate-spin"}):s.jsx(St,{size:12}),d==="loading"?"Discovering...":r.length>0?"Refresh":"Auto-discover"]}),e[23]=d,e[24]=N,e[25]=n,e[26]=r.length,e[27]=_):_=e[27];let I;e[28]!==_||e[29]!==T?(I=s.jsxs("div",{className:"flex items-center gap-2",children:[T,_]}),e[28]=_,e[29]=T,e[30]=I):I=e[30];let M;e[31]!==I||e[32]!==E?(M=s.jsxs("div",{className:"flex items-center justify-between",children:[E,I]}),e[31]=I,e[32]=E,e[33]=M):M=e[33];let k;e[34]!==d||e[35]!==r.length?(k=d==="success"&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-950/30 rounded-lg px-3 py-2",children:[s.jsx(Ct,{size:14,className:"shrink-0"}),s.jsxs("span",{children:["Discovered ",r.length," tool",r.length!==1?"s":""," ","successfully."]})]}),e[34]=d,e[35]=r.length,e[36]=k):k=e[36];let f;e[37]!==v||e[38]!==d?(f=d==="error"&&v&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[s.jsx(mt,{size:14,className:"shrink-0"}),s.jsx("span",{children:v})]}),e[37]=v,e[38]=d,e[39]=f):f=e[39];let R;e[40]!==a||e[41]!==r?(R=a&&r.length>0&&s.jsx("div",{className:"rounded-xl border border-border divide-y divide-border overflow-hidden max-h-48 overflow-y-auto",children:r.map(Cr)}),e[40]=a,e[41]=r,e[42]=R):R=e[42];let A;e[43]!==d||e[44]!==a||e[45]!==n||e[46]!==r.length?(A=a&&r.length===0&&d==="idle"&&s.jsx("p",{className:"text-xs text-muted-foreground px-1",children:n?'Click "Auto-discover" to load tools from the MCP server.':"Add a Remote URL first, then tools can be auto-discovered."}),e[43]=d,e[44]=a,e[45]=n,e[46]=r.length,e[47]=A):A=e[47];let B;return e[48]!==M||e[49]!==k||e[50]!==f||e[51]!==R||e[52]!==A?(B=s.jsxs("div",{className:"space-y-3",children:[M,k,f,R,A]}),e[48]=M,e[49]=k,e[50]=f,e[51]=R,e[52]=A,e[53]=B):B=e[53],B}function Cr(t){return s.jsx("div",{className:"flex items-center gap-3 px-3 py-2",children:s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-mono truncate",children:t.name}),t.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t.description})]})},t.name)}function cs(t){const{org:e}=Qe(),[r,i]=C.useState(!1),l=typeof window<"u"&&window.location.hostname==="localhost"?`${e.id}_dev-assets`:null,m=st({connectionId:l??"noop",orgId:e.id});return{uploadImage:async(a,u)=>{if(!l)return Te.error("Image upload requires an object-storage connection. Configure one in plugin settings."),null;if(!a.type.startsWith("image/"))return Te.error("Only image files are supported"),null;if(a.size>5*1024*1024)return Te.error("Image size must be less than 5MB"),null;i(!0);try{const c=await m.callTool({name:"PUT_PRESIGNED_URL",arguments:{key:u,contentType:a.type}}),h=c.structuredContent?.url||c.url;if(!h)throw new Error("Failed to get presigned URL");const p=await fetch(h,{method:"PUT",body:a,headers:{"Content-Type":a.type}});if(!p.ok)throw new Error(`Upload failed: ${p.statusText}`);const x=await m.callTool({name:"GET_PRESIGNED_URL",arguments:{key:u,expiresIn:31536e3}}),d=x.structuredContent?.url||x.url;if(!d)throw new Error("Failed to get public URL");return d}catch(c){return console.error("Image upload failed:",c),Te.error(c instanceof Error?c.message:"Failed to upload image. Please try again."),null}finally{i(!1)}},isUploading:r}}function wr(){const{org:t}=Qe(),[e,r]=C.useState(null),i=C.useRef(0),n=st({connectionId:at,orgId:t.id});return{generate:async m=>{i.current+=1,r(m.type);try{const o=await n.callTool({name:"REGISTRY_AI_GENERATE",arguments:m});if(o.isError){const a=o.content?.find(u=>u.type==="text")?.text??"Failed to generate content";throw new Error(a)}return o.structuredContent??o}finally{i.current-=1,i.current===0&&r(null)}},loadingType:e,isGenerating:e!==null}}const Sr=new Set(["http","sse","stdio"]),_r=/^[a-z0-9]+(?:[/-][a-z0-9._-]+)*$/,Mt=["internal","automation","support","sales","ops","ai"],ds=["productivity","communication","customer-support","development","data","operations"],Ir=["Essentials","Details","Advanced"],it="h-7 text-xs border-green-500/30 text-green-600 dark:text-green-400 shadow-[0_0_8px_rgba(34,197,94,0.3)] hover:shadow-[0_0_14px_rgba(34,197,94,0.5)] hover:border-green-500/50 transition-all";function $t(t){return t.replace(/^https?:\/\//i,"").trim()}function nt(t){const e=t.trim();return e?/^https?:\/\//i.test(e)?e:`https://${e}`:""}function Je(t){return t.trim().toLowerCase()}function ut(t){return Array.from(new Set(t.map(Je).filter(e=>e.length>0)))}function tt(t){return t.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9._-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function Tr(t){const e=Ie.c(4),{current:r}=t;let i;e[0]!==r?(i=Ir.map((l,m)=>{const o=m+1,a=o===r,u=o<r;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[m>0&&s.jsx("div",{className:ze("w-4 h-px",u?"bg-primary":"bg-border")}),s.jsxs("div",{className:ze("flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs transition-colors",a?"bg-primary/10 text-primary font-medium":u?"text-primary":"text-muted-foreground"),children:[s.jsx("span",{className:ze("size-5 rounded-full inline-flex items-center justify-center text-[10px] font-semibold shrink-0",a?"bg-primary text-primary-foreground":u?"bg-primary/20 text-primary":"bg-muted text-muted-foreground"),children:o}),s.jsx("span",{className:"hidden sm:inline",children:l})]})]},l)}),e[0]=r,e[1]=i):i=e[1];let n;return e[2]!==i?(n=s.jsx("div",{className:"flex items-center gap-1.5",children:i}),e[2]=i,e[3]=n):n=e[3],n}function kr(t){const e=Ie.c(28),{id:r,label:i,values:n,availableOptions:l,placeholder:m,onChange:o}=t,[a,u]=C.useState(""),[c,h]=C.useState(!1);let p,x,d,v,g;if(e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==c||e[4]!==i||e[5]!==o||e[6]!==m||e[7]!==n){const y=ut(l),b=ut(n),D=new Set(b),w=Je(a),z=y.filter(f=>!D.has(f)).filter(f=>w?f.includes(w):!0).slice(0,8),$=f=>{const R=Je(f);!R||D.has(R)||o([...b,R])},E=f=>{o(b.filter(R=>R!==f))},T=()=>{const f=a.split(/[,\n;]/).map(Je).filter(Boolean);if(f.length===0)return;const R=[...b];for(const A of f)R.includes(A)||R.push(A);o(R),u("")},_=w;v="grid gap-2",e[13]!==r||e[14]!==i?(g=s.jsx(Ee,{htmlFor:r,children:i}),e[13]=r,e[14]=i,e[15]=g):g=e[15],p="relative";let I;e[16]!==r?(I=()=>{const f=document.getElementById(r);f instanceof HTMLInputElement&&f.focus()},e[16]=r,e[17]=I):I=e[17];let M;e[18]===Symbol.for("react.memo_cache_sentinel")?(M=()=>h(!0),e[18]=M):M=e[18];let k;e[19]===Symbol.for("react.memo_cache_sentinel")?(k=f=>u(f.target.value),e[19]=k):k=e[19],x=s.jsx("div",{className:"min-h-9 w-full rounded-xl border border-input bg-background px-2.5 py-1.5 text-sm focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",onClick:I,children:s.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[b.map(f=>s.jsxs(je,{variant:"secondary",className:"gap-1",children:[f,s.jsx("button",{type:"button",onClick:R=>{R.preventDefault(),R.stopPropagation(),E(f)},children:s.jsx(qs,{size:12})})]},`${r}-${f}`)),s.jsx("input",{id:r,className:"flex-1 min-w-[120px] bg-transparent outline-none border-none text-sm",placeholder:b.length?"":m,value:a,onFocus:M,onBlur:()=>{h(!1),T()},onChange:k,onKeyDown:f=>{if(f.key==="Enter"||f.key===","){f.preventDefault(),T();return}f.key==="Backspace"&&!a&&b.length&&E(b[b.length-1]??"")}})]})}),d=c&&s.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-xl border border-border bg-background shadow-lg max-h-56 overflow-y-auto",children:z.length>0?z.map(f=>s.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:Rr,onClick:()=>{$(f),u("")},children:f},`${r}-suggestion-${f}`)):_?s.jsxs("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:Dr,onClick:()=>{$(_),u("")},children:['Create "',_,'"']}):s.jsx("div",{className:"px-2.5 py-1.5 text-sm text-muted-foreground",children:"Type to search or create."})}),e[0]=l,e[1]=r,e[2]=a,e[3]=c,e[4]=i,e[5]=o,e[6]=m,e[7]=n,e[8]=p,e[9]=x,e[10]=d,e[11]=v,e[12]=g}else p=e[8],x=e[9],d=e[10],v=e[11],g=e[12];let N;e[20]!==p||e[21]!==x||e[22]!==d?(N=s.jsxs("div",{className:p,children:[x,d]}),e[20]=p,e[21]=x,e[22]=d,e[23]=N):N=e[23];let S;return e[24]!==v||e[25]!==g||e[26]!==N?(S=s.jsxs("div",{className:v,children:[g,N]}),e[24]=v,e[25]=g,e[26]=N,e[27]=S):S=e[27],S}function Dr(t){return t.preventDefault()}function Rr(t){return t.preventDefault()}function Lr({id:t,value:e,availableOptions:r,onChange:i}){const[n,l]=C.useState(e),[m,o]=C.useState(!1),a=C.useRef(e);a.current!==e&&(a.current=e,l(e));const u=ut([...ds,...r,e]).filter(Boolean),c=Je(n),h=u.filter(x=>c?x.includes(c):!0).slice(0,8),p=x=>{const d=Je(x);i(d),l(d),o(!1)};return s.jsxs("div",{className:"grid gap-2",children:[s.jsx(Ee,{htmlFor:t,children:"Category"}),s.jsxs("div",{className:"relative",children:[s.jsx($e,{id:t,className:"h-9 text-sm",placeholder:"Select or create category",value:n,onFocus:()=>{l(e),o(!0)},onBlur:()=>{p(n)},onChange:x=>l(x.target.value),onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),p(n))}}),e&&s.jsx("button",{type:"button",className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs text-muted-foreground hover:text-foreground",onMouseDown:x=>x.preventDefault(),onClick:()=>{i(""),l("")},children:"clear"}),m&&s.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-xl border border-border bg-background shadow-lg max-h-56 overflow-y-auto",children:h.length>0?h.map(x=>s.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:d=>d.preventDefault(),onClick:()=>p(x),children:x},`${t}-${x}`)):c?s.jsxs("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:x=>x.preventDefault(),onClick:()=>p(c),children:['Create "',c,'"']}):s.jsx("div",{className:"px-2.5 py-1.5 text-sm text-muted-foreground",children:"Type to search or create."})})]})]})}function Er({open:t,onOpenChange:e,item:r,draft:i,availableTags:n=[],availableCategories:l=[],defaultLLMConnectionId:m="",defaultLLMModelId:o="",isSubmitting:a=!1,onSubmit:u}){const{org:c}=Qe(),{uploadImage:h,isUploading:p}=cs(),{generate:x,loadingType:d}=wr(),{discover:v,discoverStatus:g,discoverError:N,resetDiscover:S}=as(),y=!!r,b=i?._meta?.["mcp.mesh"],D=r?.title??i?.title??"",w=r?.id?.split("/")[0]??i?.id?.split("/")[0]??"",z=r?.description??i?.description??"",$=r?._meta?.["mcp.mesh"]?.short_description??b?.short_description??"",E=r?._meta?.["mcp.mesh"]?.owner??b?.owner??"",T=r?.server?.repository?.url??i?.server?.repository?.url??"",_=r?._meta?.["mcp.mesh"]?.readme??b?.readme??"",I=r?._meta?.["mcp.mesh"]?.readme_url??b?.readme_url??"",M=$t(r?.server?.remotes?.[0]?.url??i?.server?.remotes?.[0]?.url??""),k=r?.server?.remotes?.[0]?.type??i?.server?.remotes?.[0]?.type??"http",f=r?._meta?.["mcp.mesh"]?.tags??b?.tags??[],R=r?._meta?.["mcp.mesh"]?.categories?.[0]??b?.categories?.[0]??"",A=r?.server?.icons?.[0]?.src??i?.server?.icons?.[0]?.src??"",B=r?._meta?.["mcp.mesh"]?.tools??b?.tools??[],K=r?.is_public??i?.is_public??!1,[F,O]=C.useState(1),[G,Y]=C.useState(D),[V,X]=C.useState(w),[se,re]=C.useState(z),[q,ne]=C.useState($),[Q,W]=C.useState(E),[Z,le]=C.useState(T),[me,ve]=C.useState(_),[ae,he]=C.useState(I),[ee,ce]=C.useState(_?"content":"link"),[J,ue]=C.useState(M),[P,ie]=C.useState(k),[pe,ye]=C.useState(f),[xe,Ce]=C.useState(R),[ge,be]=C.useState(A),[de,Se]=C.useState(B),[_e,ke]=C.useState(K),[H,we]=C.useState({}),oe=!!(m&&o),De=()=>{O(1),Y(D),X(w),re(z),ne($),W(E),le(T),ve(_),he(I),ce(_?"content":"link"),ue(M),ie(k),ye(f),Ce(R),be(A),Se(B),ke(K),we({}),S(),Re.current="",fe.current&&(clearTimeout(fe.current),fe.current=null)},Ae=async j=>{if(!j)return;const L=y?r?.id:`${V}/${G}`.toLowerCase(),Le=tt(L||"temp"),Ge=j.name.split(".").pop()||"png",Be=`registry/${c.id}/${Le}/icon.${Ge}`,et=await h(j,Be);et?(be(et),we(Ve=>({...Ve,imageUrl:void 0}))):we(Ve=>({...Ve,imageUrl:"Failed to upload image. Please try again."}))},fe=C.useRef(null),Re=C.useRef(""),He=C.useRef(P);He.current=P;const Xe=j=>{!j&&fe.current&&(clearTimeout(fe.current),fe.current=null),e(j),j||De()},Ke=async()=>{const j=nt(J);if(!j)return;Re.current=j;const L=await v(j,He.current);L&&Se(L)},Ye=j=>{fe.current&&clearTimeout(fe.current);const L=nt(j);!L||L===Re.current||j.includes(".")&&(fe.current=setTimeout(async()=>{Re.current=L;const Le=await v(L,He.current);Le&&Se(Le)},800))},Fe=()=>oe?{llmConnectionId:m,modelId:o}:null,Oe=()=>({name:G.trim(),provider:V.trim(),url:nt(J),owner:Q.trim(),repositoryUrl:Z.trim(),description:se.trim(),shortDescription:q.trim(),tags:pe,categories:xe?[xe]:[],availableTags:[...Mt,...n],availableCategories:[...ds,...l],tools:de}),We=async()=>{const j=Fe();if(!j)return;const L=await x({...j,type:"description",context:Oe()});L.result&&re(L.result.slice(0,1500))},Ze=async()=>{const j=Fe();if(!j)return;const L=await x({...j,type:"short_description",context:Oe()});L.result&&ne(L.result.slice(0,160))},U=async()=>{const j=Fe();if(!j)return;const L=await x({...j,type:"tags",context:Oe()});L.items?.length&&ye(ut(L.items))},Ne=async()=>{const j=Fe();if(!j)return;const L=await x({...j,type:"categories",context:Oe()});L.items?.[0]&&Ce(Je(L.items[0]))},rt=async()=>{const j=Fe();if(!j)return;const L=await x({...j,type:"readme",context:Oe()});L.result&&(ve(L.result.slice(0,5e4)),ce("content"))},Tt=j=>{const L={};if(j===1){const Le=tt(V),Ge=tt(G),Be=`${Le}/${Ge}`;G.trim()||(L.title="Name is required."),y||(Le?Ge?_r.test(Be)||(L.provider="Use lowercase letters/numbers and separators '/' or '-'."):L.title="Name must contain valid characters.":L.provider="Provider is required.");const et=nt(J),Ve=P.trim().toLowerCase();if(Ve!=="stdio"&&et)try{const ct=new URL(et);["http:","https:"].includes(ct.protocol)||(L.remoteUrl="Remote URL must be http(s).")}catch{L.remoteUrl="Remote URL is invalid."}if(Ve&&!Sr.has(Ve)&&(L.remoteType="Remote type must be: http, sse or stdio."),ge.trim()&&!ge.trim().startsWith("data:image/"))try{const gt=new URL(ge.trim());["http:","https:"].includes(gt.protocol)||(L.imageUrl="Image URL must be http(s).")}catch{L.imageUrl="Image URL is invalid."}}if(j===2&&(se.length>1500&&(L.description="Description must be 1500 characters or less."),q.trim().length>160&&(L.shortDescription="Short description must be 160 characters or less.")),j===3){const Le=ae.trim();if(Le)try{const Be=new URL(Le);["http:","https:"].includes(Be.protocol)||(L.readmeUrl="README URL must be http(s).")}catch{L.readmeUrl="README URL is invalid."}me.trim().length>5e4&&(L.readme="README must be 50 000 characters or less.");const Ge=Z.trim();if(Ge)try{const Be=new URL(Ge);["http:","https:"].includes(Be.protocol)||(L.repositoryUrl="Repository URL must be http(s).")}catch{L.repositoryUrl="Repository URL is invalid."}}return we(L),Object.values(L).every(Le=>Le===void 0)},ms=()=>{Tt(F)&&F<3&&O(F+1)},us=()=>{F>1&&O(F-1)},xs=async()=>{if(!Tt(3))return;const j=G.trim(),L=tt(V),Le=tt(j),Ge=`${L}/${Le}`,Be=nt(J),et=P.trim().toLowerCase(),Ve=ge.trim(),ct=Z.trim(),gt=q.trim(),fs=me.trim(),js=ae.trim(),vs=ut(pe),ys=xe?[Je(xe)]:[],bs=r?r.server?.name??r.id:"",Ns=(y?bs:Ge).trim(),ft=se.trim(),Cs=Q.trim(),kt={title:j,description:ft.length>0?ft:null,is_public:_e,_meta:{"mcp.mesh":{tags:vs,categories:ys,short_description:gt||null,owner:Cs||null,readme:fs||null,readme_url:js||null,...de.length>0?{tools:de}:{}}},server:{name:Ns,title:j,description:ft||void 0,icons:Ve?[{src:Ve}]:[],repository:ct?{url:ct}:void 0,remotes:Be?[{type:et||"http",url:Be}]:[]}};if(y&&r){await u({id:r.id,data:kt}),e(!1);return}await u({id:Ge,...kt}),e(!1),De()},hs=s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"row-span-2 grid gap-3 content-start",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(Ee,{htmlFor:"registry-item-provider",children:"Provider"}),s.jsx($e,{id:"registry-item-provider",className:"h-9 text-sm",placeholder:"acme",value:V,onChange:j=>X(j.target.value),disabled:y}),!y&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Item ID:"," ",s.jsx("span",{className:"font-mono",children:`${tt(V)||"provider"}/${tt(G)||"name"}`})]}),H.provider&&s.jsx("p",{className:"text-xs text-destructive",children:H.provider})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(Ee,{htmlFor:"registry-item-title",children:"Name"}),s.jsx($e,{id:"registry-item-title",className:"h-9 text-sm",placeholder:"Internal MCP",value:G,onChange:j=>Y(j.target.value)}),H.title&&s.jsx("p",{className:"text-xs text-destructive",children:H.title})]})]}),s.jsx("div",{className:"row-span-2 content-start",children:s.jsx(os,{value:ge,onChange:j=>{be(j),we(L=>({...L,imageUrl:void 0}))},onFileUpload:Ae,error:H.imageUrl,isUploading:p})}),s.jsxs("div",{className:"col-span-2 grid gap-1.5",children:[s.jsx(Ee,{htmlFor:"registry-remote-url",children:"Remote URL"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex-1 flex items-center rounded-xl border border-input px-3",children:[s.jsx("span",{className:"text-xs font-semibold text-muted-foreground mr-1",children:"https://"}),s.jsx("input",{id:"registry-remote-url",className:"flex-1 h-9 bg-transparent outline-none text-sm",placeholder:"example.com/mcp",value:J,onChange:j=>{const L=$t(j.target.value);ue(L),Ye(L)}})]}),s.jsxs(Xt,{value:P,onValueChange:ie,children:[s.jsx(es,{id:"registry-remote-type",className:"w-[90px] h-9 shrink-0",children:s.jsx(ts,{placeholder:"Type"})}),s.jsxs(ss,{children:[s.jsx(ht,{value:"http",children:"http"}),s.jsx(ht,{value:"sse",children:"sse"}),s.jsx(ht,{value:"stdio",children:"stdio"})]})]})]}),H.remoteUrl&&s.jsx("p",{className:"text-xs text-destructive",children:H.remoteUrl}),H.remoteType&&s.jsx("p",{className:"text-xs text-destructive",children:H.remoteType})]}),J.trim()&&s.jsxs("div",{className:"col-span-2 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(te,{type:"button",variant:"outline",size:"sm",className:ze(it,"gap-1.5"),onClick:Ke,disabled:g==="loading",children:[g==="loading"?s.jsx(ot,{size:12,className:"animate-spin"}):s.jsx(St,{size:12}),g==="loading"?"Discovering tools...":de.length>0?"Re-discover tools":"Discover tools from URL"]}),de.length>0&&g!=="loading"&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[de.length," tool",de.length!==1?"s":""," loaded"]})]}),g==="success"&&de.length>0&&s.jsxs("div",{className:"rounded-lg border border-green-500/20 bg-green-50 dark:bg-green-950/20 px-3 py-2 space-y-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-green-600 dark:text-green-400",children:[s.jsx(Ct,{size:14,className:"shrink-0"}),s.jsxs("span",{className:"font-medium",children:[de.length," tool",de.length!==1?"s":""," discovered"]})]}),s.jsxs("div",{className:"flex flex-wrap gap-1",children:[de.slice(0,8).map(j=>s.jsx(je,{variant:"secondary",className:"text-[10px] px-1.5 py-0 font-mono",children:j.name},j.name)),de.length>8&&s.jsxs("span",{className:"text-[10px] text-muted-foreground self-center",children:["+",de.length-8," more"]})]}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:"These tools will enrich AI-generated descriptions, tags and categories in the next step."})]}),g==="auth_required"&&N&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-950/20 border border-amber-500/20 rounded-lg px-3 py-2",children:[s.jsx(mt,{size:14,className:"shrink-0"}),s.jsx("span",{children:"This server requires authentication. The connection is valid but tools cannot be listed without credentials."})]}),g==="error"&&N&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[s.jsx(mt,{size:14,className:"shrink-0"}),s.jsx("span",{children:N})]})]})]}),ps=s.jsxs("div",{className:"grid gap-3",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ee,{htmlFor:"registry-item-short-description",children:"Short Description"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:[q.length,"/160"]}),oe&&s.jsx(te,{type:"button",variant:"outline",size:"sm",className:it,disabled:d==="short_description",onClick:Ze,children:d==="short_description"?"Generating...":"AI Generate"})]})]}),s.jsx($e,{id:"registry-item-short-description",className:"h-9 text-sm",placeholder:"Short summary for the store card",value:q,maxLength:160,onChange:j=>ne(j.target.value)}),H.shortDescription&&s.jsx("p",{className:"text-xs text-destructive",children:H.shortDescription})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ee,{htmlFor:"registry-item-description",children:"Description"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:[se.length,"/1500"]}),oe&&s.jsx(te,{type:"button",variant:"outline",size:"sm",className:it,disabled:d==="description",onClick:We,children:d==="description"?"Generating...":"AI Generate"})]})]}),s.jsx(Pt,{id:"registry-item-description",className:"text-sm max-h-28 overflow-y-auto resize-none",placeholder:"Brief description of this MCP server",rows:2,value:se,onChange:j=>re(j.target.value)}),H.description&&s.jsx("p",{className:"text-xs text-destructive",children:H.description})]}),s.jsx("div",{className:"border-t border-border"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"grid content-start gap-2",children:[s.jsx(Lr,{id:"registry-category",value:xe,availableOptions:l,onChange:Ce}),oe&&s.jsx(te,{type:"button",variant:"outline",size:"sm",className:ze(it,"justify-self-start"),disabled:d==="categories",onClick:Ne,children:d==="categories"?"Suggesting...":"AI Suggest"})]}),s.jsxs("div",{className:"grid content-start gap-2",children:[s.jsx(kr,{id:"registry-tags",label:"Tags",values:pe,availableOptions:[...Mt,...n],placeholder:"Type and press Enter or comma",onChange:ye}),oe&&s.jsx(te,{type:"button",variant:"outline",size:"sm",className:ze(it,"justify-self-start"),disabled:d==="tags",onClick:U,children:d==="tags"?"Suggesting...":"AI Suggest"})]})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:[s.jsxs("div",{className:"grid gap-0.5",children:[s.jsx(Ee,{htmlFor:"registry-is-public",className:"text-sm",children:"Public"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Make this MCP visible in the public store URL."})]}),s.jsx(Gs,{id:"registry-is-public",checked:_e,onCheckedChange:ke})]})]}),gs=s.jsxs("div",{className:"grid gap-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(Ee,{htmlFor:"registry-item-owner",children:"Owner (optional)"}),s.jsx($e,{id:"registry-item-owner",className:"h-9 text-sm",placeholder:"Team, company, or responsible person",value:Q,onChange:j=>W(j.target.value)})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(Ee,{htmlFor:"registry-item-repository-url",children:"Repository URL (optional)"}),s.jsx($e,{id:"registry-item-repository-url",className:"h-9 text-sm",placeholder:"https://github.com/org/repo",value:Z,onChange:j=>le(j.target.value)}),H.repositoryUrl&&s.jsx("p",{className:"text-xs text-destructive",children:H.repositoryUrl})]})]}),s.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ee,{children:"README"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[me.length,"/50000"]})]}),s.jsx("div",{className:"inline-flex rounded-lg border border-border p-0.5",children:(oe?["link","content","generate"]:["link","content"]).map(j=>s.jsx("button",{type:"button",className:ze("px-2.5 py-1 text-xs rounded-md",ee===j?"bg-primary text-primary-foreground":"text-muted-foreground"),onClick:()=>ce(j),children:j==="link"?"Link":j==="content"?"Content":"Generate"},j))}),ee==="link"&&s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx($e,{className:"h-9 text-sm",placeholder:"https://raw.githubusercontent.com/org/repo/main/README.md",value:ae,onChange:j=>he(j.target.value)}),H.readmeUrl&&s.jsx("p",{className:"text-xs text-destructive",children:H.readmeUrl})]}),ee==="content"&&s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(Pt,{className:"text-sm max-h-48 overflow-y-auto resize-none",placeholder:`# README
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-Dp8TDmPV.js";import{c}from"./constants-LnQa4w9L.js";function u(n){if(!n)return"";const r=n.find(t=>t.name==="COLLECTION_REGISTRY_APP_LIST");if(r)return r.name;const e=n.find(t=>t.name.startsWith("COLLECTION_REGISTRY_APP_")&&t.name.endsWith("_LIST"));return e?e.name:n.find(t=>t.name.endsWith("_LIST"))?.name??""}function m(n){if(!n)return"";const r=n.find(t=>t.name==="COLLECTION_REGISTRY_APP_FILTERS");if(r)return r.name;const e=n.find(t=>t.name.startsWith("COLLECTION_REGISTRY_APP_")&&t.name.endsWith("_FILTERS"));return e?e.name:n.find(t=>t.name.endsWith("_FILTERS"))?.name??""}function T(n,r){if(!n)return"";const e=n.find(i=>i.name===`COLLECTION_REGISTRY_APP${r}`);if(e)return e.name;const a=n.find(i=>i.name.startsWith("COLLECTION_REGISTRY_APP_")&&i.name.endsWith(r));return a?a.name:n.find(i=>i.name.endsWith(r))?.name??""}function l(n){if(!n)return[];const r=[];for(const e of n){let a=[];if(Array.isArray(e))a=e;else if(typeof e=="object"&&e!==null){const t=Object.keys(e).find(i=>Array.isArray(e[i]));t&&(a=e[t])}r.push(...a)}return r}const s={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function d(n){return n?s[n]??n.toUpperCase():null}function I(n){return n?n.match(/schemas\/([\d-]+)/)?.[1]??null:null}function _(n){if(!n)return[];if(Array.isArray(n))return n;if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(e=>Array.isArray(n[e]));if(r)return n[r]}return[]}async function y(n,r,e,a){const t=await c({connectionId:n,orgId:r});try{const i=await t.callTool({name:e,arguments:a});return i.structuredContent??i}finally{await t.close().catch(console.error)}}export{l as a,m as b,y as c,T as d,_ as e,u as f,d as g,I as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,b5 as Pn,c as He,j as he}from"./index-_8KOOZTs.js";import{c as Je}from"./button-DD0bNYN6.js";const Ye=({size:n=24,color:e="currentColor",...t})=>f.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},f.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"}));Ye.displayName="DotsGrid";const Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const A={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"},_e=10,ne=f.useLayoutEffect,Fe=Pn.useId,wn=typeof Fe=="function"?Fe:()=>null;let En=0;function Ge(n=null){const e=wn(),t=f.useRef(n||e||null);return t.current===null&&(t.current=""+En++),n??t.current}function Qe({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:h,onExpand:w,onResize:p,order:u,style:v,tagName:z="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:N,getPanelStyle:D,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),M=f.useRef({callbacks:{onCollapse:h,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:H}=M.current,B={...H};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.current.order=u,_.onCollapse=h,_.onExpand=w,_.onResize=p,H.collapsedSize=t,H.collapsible=r,H.defaultSize=i,H.maxSize=a,H.minSize=s,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&P(M.current,B)}),ne(()=>{const _=M.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return N(M.current)},isCollapsed(){return R(M.current)},isExpanded(){return!R(M.current)},resize:_=>{q(M.current,_)}}),[S,L,N,R,G,q]);const Y=D(M.current,i);return f.createElement(z,{...C,children:n,className:e,id:G,style:{...Y,...v},[A.groupId]:V,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+Y.flexGrow).toFixed(1)})}const en=f.forwardRef((n,e)=>f.createElement(Qe,{...n,forwardedRef:e}));Qe.displayName="Panel";en.displayName="forwardRef(Panel)";let De=null,Se=-1,J=null;function Cn(n,e){if(e){const t=(e&ln)!==0,r=(e&an)!==0,i=(e&sn)!==0,o=(e&un)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function In(){J!==null&&(document.head.removeChild(J),De=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if(De!==i){if(De=i,J===null&&(J=document.createElement("style"),document.head.appendChild(J)),Se>=0){var o;(o=J.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=J.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function nn(n){return n.type==="keydown"}function tn(n){return n.type.startsWith("pointer")}function rn(n){return n.type.startsWith("mouse")}function Ce(n){if(tn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(rn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Rn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function kn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:Ve(n),b:Ve(e)};let r;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),r=n;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const An=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Mn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Nn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Mn(n))||+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"||An.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ke(n){let e=n.length;for(;e--;){const t=n[e];if(x(t,"Missing node"),Nn(t))return t}return null}function Ue(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ve(n){const e=[];for(;n;)e.push(n),n=on(n);return e}function on(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const ln=1,an=2,sn=4,un=8,$n=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function Dn(n,e,t,r,i){var o;const{ownerDocument:l}=e,a={direction:t,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=ee.get(l))!==null&&o!==void 0?o:0;return ee.set(l,s+1),ze.add(a),Pe(),function(){var w;Ie.delete(n),ze.delete(a);const p=(w=ee.get(l))!==null&&w!==void 0?w:1;if(ee.set(l,p-1),Pe(),p===1&&ee.delete(l),U.includes(a)){const u=U.indexOf(a);u>=0&&U.splice(u,1),Te(),i("up",!0,null)}}}function Hn(n){const{target:e}=n,{x:t,y:r}=Ce(n);ae=!0,Be({target:e,x:t,y:r}),Pe(),U.length>0&&(we("down",n),n.preventDefault(),cn(e)||n.stopImmediatePropagation())}function Ae(n){const{x:e,y:t}=Ce(n);if(ae&&n.buttons===0&&(ae=!1,we("up",n)),!ae){const{target:r}=n;Be({target:r,x:e,y:t})}we("move",n),Te(),U.length>0&&n.preventDefault()}function Me(n){const{target:e}=n,{x:t,y:r}=Ce(n);Ie.clear(),ae=!1,U.length>0&&(n.preventDefault(),cn(e)||n.stopImmediatePropagation()),we("up",n),Be({target:e,x:t,y:r}),Te(),Pe()}function cn(n){let e=n;for(;e;){if(e.hasAttribute(A.resizeHandle))return!0;e=e.parentElement}return!1}function Be({target:n,x:e,y:t}){U.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),ze.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:h,right:w,top:p}=a,u=$n?l.coarse:l.fine;if(e>=h-u&&e<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&kn(r,o)>0){let z=r,C=!1;for(;z&&!z.contains(o);){if(Ln(z.getBoundingClientRect(),a)){C=!0;break}z=z.parentElement}if(C)return}U.push(i)}})}function Ne(n,e){Ie.set(n,e)}function Te(){let n=!1,e=!1;U.forEach(r=>{const{direction:i}=r;i==="horizontal"?n=!0:e=!0});let t=0;Ie.forEach(r=>{t|=r}),n&&e?ke("intersection",t):n?ke("horizontal",t):e?ke("vertical",t):In()}let $e=new AbortController;function Pe(){$e.abort(),$e=new AbortController;const n={capture:!0,signal:$e.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",Me,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",Me,n),window.addEventListener("pointercancel",Me,n)):ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",Hn,n),r.addEventListener("pointermove",Ae,n))}))}function we(n,e){ze.forEach(t=>{const{setResizeHandlerState:r}=t,i=U.includes(t);r(n,i,e)})}function _n(){const[n,e]=f.useState(0);return f.useCallback(()=>e(t=>t+1),[])}function x(n,e){if(!n)throw console.error(e),Error(e)}function te(n,e,t=_e){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function X(n,e,t=_e){return te(n,e,t)===0}function j(n,e,t){return te(n,e,t)===0}function Gn(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++){const i=n[r],o=e[r];if(!j(i,o,t))return!1}return!0}function le({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];x(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed(_e)),t}function ge({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(j(n,0))return e;const l=[...e],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=n<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,v)){const S=C-E;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}{const p=n<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,C)){const S=E-v;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}}{const p=n<0?1:-1;let u=n<0?s:a,v=0;for(;;){const C=e[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const z=Math.min(Math.abs(n),Math.abs(v));n=n<0?0-z:z}{let u=n<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(n)-Math.abs(h),z=e[u];x(z!=null,`Previous layout not found for panel index ${u}`);const C=z-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!j(z,E)&&(h+=z-E,l[u]=E,h.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?u--:u++}}if(Gn(i,l))return i;{const p=n<0?s:a,u=e[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+h,z=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=z,!j(z,v)){let C=v-z,S=n<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const N=L+C,D=le({panelConstraints:t,panelIndex:S,size:N});if(j(L,D)||(C-=D-L,l[S]=D),j(C,0))break;n>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return j(w,100)?l:i}function Bn({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),e.forEach((p,u)=>{const{constraints:v}=p,{maxSize:z=100,minSize:C=0}=v;u===a?(r=C,i=z):(o+=C,l+=z)});const s=Math.min(i,100-o),h=Math.max(r,100-l),w=n[a];return{valueMax:s,valueMin:h,valueNow:w}}function ye(n,e=document){return Array.from(e.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${n}"]`))}function fn(n,e,t=document){const i=ye(n,t).findIndex(o=>o.getAttribute(A.resizeHandleId)===e);return i??null}function dn(n,e,t){const r=fn(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function pn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function Re(n,e=document){const t=e.querySelector(`[${A.resizeHandleId}="${n}"]`);return t||null}function Tn(n,e,t,r=document){var i,o,l,a;const s=Re(e,r),h=ye(n,r),w=s?h.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function Wn({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:h,valueMin:w,valueNow:p}=Bn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(h)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,h)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=e.current;x(a,"Eager values not found");const{panelDataArray:s}=a,h=pn(t,o);x(h!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(A.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[z,C]=Tn(t,v,s,o);if(z==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(N=>N.id===z);if(L>=0){const N=s[L];x(N,`No panel data found for index ${L}`);const D=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=N.constraints;if(D!=null&&R){const F=ge({delta:j(D,V)?P-V:V-D,initialLayout:r,panelConstraints:s.map(q=>q.constraints),pivotIndices:dn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,n,e,t,r,i,l])}function Ze(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function gn(n,e){const t=n==="horizontal",{x:r,y:i}=Ce(e);return t?r:i}function jn(n,e,t,r,i){const o=t==="horizontal",l=Re(e,i);x(l,`No resize handle element found for id "${e}"`);const a=l.getAttribute(A.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const h=gn(t,n),w=pn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(h-s)/u*100}function Fn(n,e,t,r,i,o){if(nn(n)){const l=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(n.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:jn(n,e,t,r,o)}function Kn({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=n.length-r,h=i/s;r++,e[o]=h,i-=h}return e}function oe(n,e,t){e.forEach((r,i)=>{const o=n[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:h=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:z}=l;z&&z(r,p),w&&(u||v)&&(v&&(p==null||X(p,h))&&!X(r,h)&&v(),u&&(p==null||!X(p,h))&&X(r,h)&&u())}})}function be(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Un({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=n!=null?n.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vn(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function Oe(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function mn(n){return`react-resizable-panels:${n}`}function hn(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function zn(n,e){try{const t=mn(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Zn(n,e,t){var r,i;const o=(r=zn(n,t))!==null&&r!==void 0?r:{},l=hn(e);return(i=o[l])!==null&&i!==void 0?i:null}function On(n,e,t,r,i){var o;const l=mn(n),a=hn(e),s=(o=zn(n,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(h){console.error(h)}}function qe({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!j(r,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:e,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!j(i,0))for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:e,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,j(i,0)))break}return t}const qn=100,me={getItem:n=>(Oe(me),me.getItem(n)),setItem:(n,e)=>{Oe(me),me.setItem(n,e)}},Xe={};function yn({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:h,tagName:w="div",...p}){const u=Ge(o),v=f.useRef(null),[z,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),N=f.useRef({}),D=f.useRef(new Map),V=f.useRef(0),R=f.useRef({autoSaveId:n,direction:r,dragState:z,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>R.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current,d=qe({layout:c,panelConstraints:g.map(y=>y.constraints)});Ze(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,N.current))}}),[]),ne(()=>{R.current.autoSaveId=n,R.current.direction=r,R.current.dragState=z,R.current.id=u,R.current.onLayout=l,R.current.storage=s}),Wn({committedValuesRef:R,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(n){if(E.length===0||E.length!==c.length)return;let m=Xe[n];m==null&&(m=Vn(On,qn),Xe[n]=m);const b=[...c],g=new Map(D.current);m(n,b,g,E,s)}},[n,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(Z=>Z.constraints),{collapsedSize:y=0,panelSize:I,pivotIndices:$}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){D.current.set(c.id,I);const O=ie(g,c)===g.length-1?I-y:y-I,k=ge({delta:O,initialLayout:b,panelConstraints:d,pivotIndices:$,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,N.current))}}},[]),q=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(K=>K.constraints),{collapsedSize:I=0,panelSize:$=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X($,I)){const K=D.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?$-de:de-$,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:O,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,N.current))}}},[]),W=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=Q(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return Un({defaultSize:m,dragState:z,layout:E,panelData:b,panelIndex:g})},[z,E]),M=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&X(y,g)},[]),Y=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=R.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const $=Zn(c,d,b);$&&(D.current=new Map(Object.entries($.expandToSizes)),y=$.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map($=>$.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,N.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const H=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:I,dragState:$,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=$??{},Le=dn(Z,c,y);let T=Fn(d,c,I,$,O,y);const We=I==="horizontal";We&&m&&(T=-T);const bn=de.map(Sn=>Sn.constraints),pe=ge({delta:T,initialLayout:ve??K,panelConstraints:bn,pivotIndices:Le,prevLayout:K,trigger:nn(d)?"keyboard":"mouse-or-touch"}),je=!be(K,pe);(tn(d)||rn(d))&&V.current!=T&&(V.current=T,!je&&T!==0?We?Ne(c,T<0?ln:an):Ne(c,T<0?sn:un):Ne(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,N.current))}},[]),B=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current,y=d.map(K=>K.constraints),{panelSize:I,pivotIndices:$}=Q(d,c,g);x(I!=null,`Panel size not found for panel "${c.id}"`);const O=ie(d,c)===d.length-1?I-m:m-I,k=ge({delta:O,initialLayout:g,panelConstraints:y,pivotIndices:$,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,N.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:$,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&$&&X(k,d)?X(d,I)||B(c,I):k<O?B(c,O):k>Z&&B(c,Z))},[B]),ue=f.useCallback((c,m)=>{const{direction:b}=R.current,{layout:g}=P.current;if(!v.current)return;const d=Re(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=gn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete N.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:z,expandPanel:q,getPanelSize:W,getPanelStyle:G,groupId:u,isPanelCollapsed:M,isPanelExpanded:Y,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:H,resizePanel:B,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,z,r,q,W,G,u,M,Y,se,_,H,B,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:e,className:t,id:o,ref:v,style:{...fe,...h},[A.group]:"",[A.groupDirection]:r,[A.groupId]:u}))}const xn=f.forwardRef((n,e)=>f.createElement(yn,{...n,forwardedRef:e}));yn.displayName="PanelGroup";xn.displayName="forwardRef(PanelGroup)";function ie(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Q(n,e,t){const r=ie(n,e),o=r===n.length-1?[r-1,r]:[r,r+1],l=t[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function Xn({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(n||t==null||r==null)return;const i=Re(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(A.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),h=fn(a,e,r);x(h!==null,`No resize element found for id "${e}"`);const w=l.shiftKey?h>0?h-1:s.length-1:h+1<s.length?h+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,n,e,t])}function vn({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:h,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...z}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:h,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=h,L.current.onPointerUp=w});const N=f.useContext(Ee);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=N,W=Ge(i),[G,M]=f.useState("inactive"),[Y,_]=f.useState(!1),[H,B]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)B(null);else{const re=R(W);B(()=>re)}},[t,W,R]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||H==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return Dn(W,re,D,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(W,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&M("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,D,t,ce,R,W,H,P,F]),Xn({disabled:t,handleId:W,resizeHandler:H,panelGroupElement:q});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...z,children:n,className:e,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[A.groupDirection]:D,[A.groupId]:V,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":Y?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:W,[A.resizeHandleState]:G})}vn.displayName="PanelResizeHandle";function Qn(n){const e=He.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;e[3]!==t?(i=Je("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[3]=t,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=he.jsx(xn,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function et(n){const e=He.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let r;return e[2]!==t?(r=he.jsx(en,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=r):r=e[3],r}function nt(n){const e=He.c(12);let t,r,i;e[0]!==n?({withHandle:i,className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let o;e[4]!==t?(o=Je("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",t),e[4]=t,e[5]=o):o=e[5];let l;e[6]!==i?(l=i&&he.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:he.jsx(Ye,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==o||e[10]!==l?(a=he.jsx(vn,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=a):a=e[11],a}export{nt as R,et as a,Qn as b};
|
|
1
|
+
import{r as f,b5 as Pn,c as He,j as he}from"./index-Dp8TDmPV.js";import{c as Je}from"./button-CJa3f3rL.js";const Ye=({size:n=24,color:e="currentColor",...t})=>f.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},f.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"}));Ye.displayName="DotsGrid";const Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const A={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"},_e=10,ne=f.useLayoutEffect,Fe=Pn.useId,wn=typeof Fe=="function"?Fe:()=>null;let En=0;function Ge(n=null){const e=wn(),t=f.useRef(n||e||null);return t.current===null&&(t.current=""+En++),n??t.current}function Qe({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:h,onExpand:w,onResize:p,order:u,style:v,tagName:z="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:N,getPanelStyle:D,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),M=f.useRef({callbacks:{onCollapse:h,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:H}=M.current,B={...H};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.current.order=u,_.onCollapse=h,_.onExpand=w,_.onResize=p,H.collapsedSize=t,H.collapsible=r,H.defaultSize=i,H.maxSize=a,H.minSize=s,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&P(M.current,B)}),ne(()=>{const _=M.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return N(M.current)},isCollapsed(){return R(M.current)},isExpanded(){return!R(M.current)},resize:_=>{q(M.current,_)}}),[S,L,N,R,G,q]);const Y=D(M.current,i);return f.createElement(z,{...C,children:n,className:e,id:G,style:{...Y,...v},[A.groupId]:V,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+Y.flexGrow).toFixed(1)})}const en=f.forwardRef((n,e)=>f.createElement(Qe,{...n,forwardedRef:e}));Qe.displayName="Panel";en.displayName="forwardRef(Panel)";let De=null,Se=-1,J=null;function Cn(n,e){if(e){const t=(e&ln)!==0,r=(e&an)!==0,i=(e&sn)!==0,o=(e&un)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function In(){J!==null&&(document.head.removeChild(J),De=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if(De!==i){if(De=i,J===null&&(J=document.createElement("style"),document.head.appendChild(J)),Se>=0){var o;(o=J.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=J.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function nn(n){return n.type==="keydown"}function tn(n){return n.type.startsWith("pointer")}function rn(n){return n.type.startsWith("mouse")}function Ce(n){if(tn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(rn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Rn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function kn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:Ve(n),b:Ve(e)};let r;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),r=n;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const An=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Mn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Nn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Mn(n))||+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"||An.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ke(n){let e=n.length;for(;e--;){const t=n[e];if(x(t,"Missing node"),Nn(t))return t}return null}function Ue(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ve(n){const e=[];for(;n;)e.push(n),n=on(n);return e}function on(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const ln=1,an=2,sn=4,un=8,$n=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function Dn(n,e,t,r,i){var o;const{ownerDocument:l}=e,a={direction:t,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=ee.get(l))!==null&&o!==void 0?o:0;return ee.set(l,s+1),ze.add(a),Pe(),function(){var w;Ie.delete(n),ze.delete(a);const p=(w=ee.get(l))!==null&&w!==void 0?w:1;if(ee.set(l,p-1),Pe(),p===1&&ee.delete(l),U.includes(a)){const u=U.indexOf(a);u>=0&&U.splice(u,1),Te(),i("up",!0,null)}}}function Hn(n){const{target:e}=n,{x:t,y:r}=Ce(n);ae=!0,Be({target:e,x:t,y:r}),Pe(),U.length>0&&(we("down",n),n.preventDefault(),cn(e)||n.stopImmediatePropagation())}function Ae(n){const{x:e,y:t}=Ce(n);if(ae&&n.buttons===0&&(ae=!1,we("up",n)),!ae){const{target:r}=n;Be({target:r,x:e,y:t})}we("move",n),Te(),U.length>0&&n.preventDefault()}function Me(n){const{target:e}=n,{x:t,y:r}=Ce(n);Ie.clear(),ae=!1,U.length>0&&(n.preventDefault(),cn(e)||n.stopImmediatePropagation()),we("up",n),Be({target:e,x:t,y:r}),Te(),Pe()}function cn(n){let e=n;for(;e;){if(e.hasAttribute(A.resizeHandle))return!0;e=e.parentElement}return!1}function Be({target:n,x:e,y:t}){U.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),ze.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:h,right:w,top:p}=a,u=$n?l.coarse:l.fine;if(e>=h-u&&e<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&kn(r,o)>0){let z=r,C=!1;for(;z&&!z.contains(o);){if(Ln(z.getBoundingClientRect(),a)){C=!0;break}z=z.parentElement}if(C)return}U.push(i)}})}function Ne(n,e){Ie.set(n,e)}function Te(){let n=!1,e=!1;U.forEach(r=>{const{direction:i}=r;i==="horizontal"?n=!0:e=!0});let t=0;Ie.forEach(r=>{t|=r}),n&&e?ke("intersection",t):n?ke("horizontal",t):e?ke("vertical",t):In()}let $e=new AbortController;function Pe(){$e.abort(),$e=new AbortController;const n={capture:!0,signal:$e.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",Me,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",Me,n),window.addEventListener("pointercancel",Me,n)):ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",Hn,n),r.addEventListener("pointermove",Ae,n))}))}function we(n,e){ze.forEach(t=>{const{setResizeHandlerState:r}=t,i=U.includes(t);r(n,i,e)})}function _n(){const[n,e]=f.useState(0);return f.useCallback(()=>e(t=>t+1),[])}function x(n,e){if(!n)throw console.error(e),Error(e)}function te(n,e,t=_e){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function X(n,e,t=_e){return te(n,e,t)===0}function j(n,e,t){return te(n,e,t)===0}function Gn(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++){const i=n[r],o=e[r];if(!j(i,o,t))return!1}return!0}function le({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];x(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed(_e)),t}function ge({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(j(n,0))return e;const l=[...e],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=n<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,v)){const S=C-E;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}{const p=n<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,C)){const S=E-v;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}}{const p=n<0?1:-1;let u=n<0?s:a,v=0;for(;;){const C=e[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const z=Math.min(Math.abs(n),Math.abs(v));n=n<0?0-z:z}{let u=n<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(n)-Math.abs(h),z=e[u];x(z!=null,`Previous layout not found for panel index ${u}`);const C=z-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!j(z,E)&&(h+=z-E,l[u]=E,h.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?u--:u++}}if(Gn(i,l))return i;{const p=n<0?s:a,u=e[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+h,z=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=z,!j(z,v)){let C=v-z,S=n<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const N=L+C,D=le({panelConstraints:t,panelIndex:S,size:N});if(j(L,D)||(C-=D-L,l[S]=D),j(C,0))break;n>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return j(w,100)?l:i}function Bn({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),e.forEach((p,u)=>{const{constraints:v}=p,{maxSize:z=100,minSize:C=0}=v;u===a?(r=C,i=z):(o+=C,l+=z)});const s=Math.min(i,100-o),h=Math.max(r,100-l),w=n[a];return{valueMax:s,valueMin:h,valueNow:w}}function ye(n,e=document){return Array.from(e.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${n}"]`))}function fn(n,e,t=document){const i=ye(n,t).findIndex(o=>o.getAttribute(A.resizeHandleId)===e);return i??null}function dn(n,e,t){const r=fn(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function pn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function Re(n,e=document){const t=e.querySelector(`[${A.resizeHandleId}="${n}"]`);return t||null}function Tn(n,e,t,r=document){var i,o,l,a;const s=Re(e,r),h=ye(n,r),w=s?h.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function Wn({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:h,valueMin:w,valueNow:p}=Bn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(h)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,h)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=e.current;x(a,"Eager values not found");const{panelDataArray:s}=a,h=pn(t,o);x(h!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(A.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[z,C]=Tn(t,v,s,o);if(z==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(N=>N.id===z);if(L>=0){const N=s[L];x(N,`No panel data found for index ${L}`);const D=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=N.constraints;if(D!=null&&R){const F=ge({delta:j(D,V)?P-V:V-D,initialLayout:r,panelConstraints:s.map(q=>q.constraints),pivotIndices:dn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,n,e,t,r,i,l])}function Ze(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function gn(n,e){const t=n==="horizontal",{x:r,y:i}=Ce(e);return t?r:i}function jn(n,e,t,r,i){const o=t==="horizontal",l=Re(e,i);x(l,`No resize handle element found for id "${e}"`);const a=l.getAttribute(A.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const h=gn(t,n),w=pn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(h-s)/u*100}function Fn(n,e,t,r,i,o){if(nn(n)){const l=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(n.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:jn(n,e,t,r,o)}function Kn({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=n.length-r,h=i/s;r++,e[o]=h,i-=h}return e}function oe(n,e,t){e.forEach((r,i)=>{const o=n[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:h=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:z}=l;z&&z(r,p),w&&(u||v)&&(v&&(p==null||X(p,h))&&!X(r,h)&&v(),u&&(p==null||!X(p,h))&&X(r,h)&&u())}})}function be(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Un({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=n!=null?n.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vn(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function Oe(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function mn(n){return`react-resizable-panels:${n}`}function hn(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function zn(n,e){try{const t=mn(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Zn(n,e,t){var r,i;const o=(r=zn(n,t))!==null&&r!==void 0?r:{},l=hn(e);return(i=o[l])!==null&&i!==void 0?i:null}function On(n,e,t,r,i){var o;const l=mn(n),a=hn(e),s=(o=zn(n,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(h){console.error(h)}}function qe({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!j(r,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:e,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!j(i,0))for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:e,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,j(i,0)))break}return t}const qn=100,me={getItem:n=>(Oe(me),me.getItem(n)),setItem:(n,e)=>{Oe(me),me.setItem(n,e)}},Xe={};function yn({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:h,tagName:w="div",...p}){const u=Ge(o),v=f.useRef(null),[z,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),N=f.useRef({}),D=f.useRef(new Map),V=f.useRef(0),R=f.useRef({autoSaveId:n,direction:r,dragState:z,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>R.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current,d=qe({layout:c,panelConstraints:g.map(y=>y.constraints)});Ze(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,N.current))}}),[]),ne(()=>{R.current.autoSaveId=n,R.current.direction=r,R.current.dragState=z,R.current.id=u,R.current.onLayout=l,R.current.storage=s}),Wn({committedValuesRef:R,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(n){if(E.length===0||E.length!==c.length)return;let m=Xe[n];m==null&&(m=Vn(On,qn),Xe[n]=m);const b=[...c],g=new Map(D.current);m(n,b,g,E,s)}},[n,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(Z=>Z.constraints),{collapsedSize:y=0,panelSize:I,pivotIndices:$}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){D.current.set(c.id,I);const O=ie(g,c)===g.length-1?I-y:y-I,k=ge({delta:O,initialLayout:b,panelConstraints:d,pivotIndices:$,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,N.current))}}},[]),q=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(K=>K.constraints),{collapsedSize:I=0,panelSize:$=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X($,I)){const K=D.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?$-de:de-$,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:O,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,N.current))}}},[]),W=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=Q(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return Un({defaultSize:m,dragState:z,layout:E,panelData:b,panelIndex:g})},[z,E]),M=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&X(y,g)},[]),Y=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=R.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const $=Zn(c,d,b);$&&(D.current=new Map(Object.entries($.expandToSizes)),y=$.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map($=>$.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,N.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const H=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:I,dragState:$,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=$??{},Le=dn(Z,c,y);let T=Fn(d,c,I,$,O,y);const We=I==="horizontal";We&&m&&(T=-T);const bn=de.map(Sn=>Sn.constraints),pe=ge({delta:T,initialLayout:ve??K,panelConstraints:bn,pivotIndices:Le,prevLayout:K,trigger:nn(d)?"keyboard":"mouse-or-touch"}),je=!be(K,pe);(tn(d)||rn(d))&&V.current!=T&&(V.current=T,!je&&T!==0?We?Ne(c,T<0?ln:an):Ne(c,T<0?sn:un):Ne(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,N.current))}},[]),B=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current,y=d.map(K=>K.constraints),{panelSize:I,pivotIndices:$}=Q(d,c,g);x(I!=null,`Panel size not found for panel "${c.id}"`);const O=ie(d,c)===d.length-1?I-m:m-I,k=ge({delta:O,initialLayout:g,panelConstraints:y,pivotIndices:$,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,N.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:$,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&$&&X(k,d)?X(d,I)||B(c,I):k<O?B(c,O):k>Z&&B(c,Z))},[B]),ue=f.useCallback((c,m)=>{const{direction:b}=R.current,{layout:g}=P.current;if(!v.current)return;const d=Re(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=gn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete N.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:z,expandPanel:q,getPanelSize:W,getPanelStyle:G,groupId:u,isPanelCollapsed:M,isPanelExpanded:Y,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:H,resizePanel:B,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,z,r,q,W,G,u,M,Y,se,_,H,B,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:e,className:t,id:o,ref:v,style:{...fe,...h},[A.group]:"",[A.groupDirection]:r,[A.groupId]:u}))}const xn=f.forwardRef((n,e)=>f.createElement(yn,{...n,forwardedRef:e}));yn.displayName="PanelGroup";xn.displayName="forwardRef(PanelGroup)";function ie(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Q(n,e,t){const r=ie(n,e),o=r===n.length-1?[r-1,r]:[r,r+1],l=t[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function Xn({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(n||t==null||r==null)return;const i=Re(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(A.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),h=fn(a,e,r);x(h!==null,`No resize element found for id "${e}"`);const w=l.shiftKey?h>0?h-1:s.length-1:h+1<s.length?h+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,n,e,t])}function vn({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:h,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...z}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:h,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=h,L.current.onPointerUp=w});const N=f.useContext(Ee);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=N,W=Ge(i),[G,M]=f.useState("inactive"),[Y,_]=f.useState(!1),[H,B]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)B(null);else{const re=R(W);B(()=>re)}},[t,W,R]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||H==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return Dn(W,re,D,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(W,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&M("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,D,t,ce,R,W,H,P,F]),Xn({disabled:t,handleId:W,resizeHandler:H,panelGroupElement:q});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...z,children:n,className:e,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[A.groupDirection]:D,[A.groupId]:V,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":Y?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:W,[A.resizeHandleState]:G})}vn.displayName="PanelResizeHandle";function Qn(n){const e=He.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;e[3]!==t?(i=Je("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[3]=t,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=he.jsx(xn,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function et(n){const e=He.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let r;return e[2]!==t?(r=he.jsx(en,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=r):r=e[3],r}function nt(n){const e=He.c(12);let t,r,i;e[0]!==n?({withHandle:i,className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let o;e[4]!==t?(o=Je("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",t),e[4]=t,e[5]=o):o=e[5];let l;e[6]!==i?(l=i&&he.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:he.jsx(Ye,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==o||e[10]!==l?(a=he.jsx(vn,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=a):a=e[11],a}export{nt as R,et as a,Qn as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,j as s}from"./index-
|
|
1
|
+
import{c as p,j as s}from"./index-Dp8TDmPV.js";import{B as v}from"./button-CJa3f3rL.js";import{i as j,a as S}from"./Save01-B2I-fdos.js";import{i as z}from"./Loading01-CXnHH69h.js";function y(x){const e=p.c(15),{onSave:c,onUndo:d,isDirty:b,isSaving:i,saveLabel:f,undoLabel:u}=x,n=f===void 0?"Save":f,o=u===void 0?"Undo":u;if(!b)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(j,{size:14}),e[0]=r):r=e[0];let t;e[1]!==i||e[2]!==d||e[3]!==o?(t=s.jsxs(v,{variant:"outline",size:"sm",onClick:d,disabled:i,"aria-label":o,children:[r,o]}),e[1]=i,e[2]=d,e[3]=o,e[4]=t):t=e[4];let a;e[5]!==i?(a=i?s.jsx(z,{size:14,className:"animate-spin"}):s.jsx(S,{size:14}),e[5]=i,e[6]=a):a=e[6];let l;e[7]!==i||e[8]!==c||e[9]!==n||e[10]!==a?(l=s.jsxs(v,{variant:"default",size:"sm",onClick:c,disabled:i,"aria-label":n,children:[a,n]}),e[7]=i,e[8]=c,e[9]=n,e[10]=a,e[11]=l):l=e[11];let m;return e[12]!==t||e[13]!==l?(m=s.jsxs(s.Fragment,{children:[t,l]}),e[12]=t,e[13]=l,e[14]=m):m=e[14],m}export{y as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,bm as k,j as h,c as ve,bu as pe,at as F,aq as tt,a9 as J,ay as rt,ax as ie,av as W,bp as z,bn as nt}from"./index-
|
|
1
|
+
import{r as a,bm as k,j as h,c as ve,bu as pe,at as F,aq as tt,a9 as J,ay as rt,ax as ie,av as W,bp as z,bn as nt}from"./index-Dp8TDmPV.js";import{S as Ae}from"./spinner-uWSwEI1n.js";import{e as ot}from"./select-C2nUbKfi.js";import{c as Le}from"./button-CJa3f3rL.js";const it=({size:e=24,color:t="currentColor",...r})=>a.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},a.createElement("path",{d:"M21 10H3m13-8v4M8 2v4m-.2 16h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 19.72 21 18.88 21 17.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 4 17.88 4 16.2 4H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 6.28 3 7.12 3 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 22 6.12 22 7.8 22Z"}));it.displayName="Calendar";function Pe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function lt(e){if(Array.isArray(e))return e}function at(e,t,r){return(t=ht(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ct(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,l,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(d){u=!0,o=d}finally{try{if(!c&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return s}}function st(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xe(Object(r),!0).forEach(function(n){at(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ut(e,t){if(e==null)return{};var r,n,o=dt(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function dt(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ft(e,t){return lt(e)||ct(e,t)||mt(e,t)||st()}function pt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ht(e){var t=pt(e,"string");return typeof t=="symbol"?t:t+""}function mt(e,t){if(e){if(typeof e=="string")return Pe(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pe(e,t):void 0}}function gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ce(Object(r),!0).forEach(function(n){gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function X(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return t.apply(r,[].concat(o,s))}}}function re(e){return{}.toString.call(e).includes("Object")}function bt(e){return!Object.keys(e).length}function K(e){return typeof e=="function"}function wt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function St(e,t){return re(t)||V("changeType"),Object.keys(t).some(function(r){return!wt(e,r)})&&V("changeField"),t}function yt(e){K(e)||V("selectorType")}function Et(e){K(e)||re(e)||V("handlerType"),re(e)&&Object.values(e).some(function(t){return!K(t)})&&V("handlersType")}function Pt(e){e||V("initialIsRequired"),re(e)||V("initialType"),bt(e)&&V("initialContent")}function xt(e,t){throw new Error(e[t]||e.default)}var Rt={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},V=X(xt)(Rt),Z={changes:St,selector:yt,handler:Et,initial:Pt};function Ct(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Z.initial(e),Z.handler(t);var r={current:e},n=X(Tt)(r,t),o=X(Ot)(r),i=X(Z.changes)(e),l=X(jt)(r);function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return Z.selector(u),u(r.current)}function c(u){vt(n,o,i,l)(u)}return[s,c]}function jt(e,t){return K(t)?t(e.current):t}function Ot(e,t){return e.current=je(je({},e.current),t),t}function Tt(e,t,r){return K(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var _t={create:Ct},Mt={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function At(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return t.apply(r,[].concat(o,s))}}}function Lt(e){return{}.toString.call(e).includes("Object")}function Dt(e){return e||Oe("configIsRequired"),Lt(e)||Oe("configType"),e.urls?(It(),{paths:{vs:e.urls.monacoBase}}):e}function It(){console.warn(De.deprecation)}function Nt(e,t){throw new Error(e[t]||e.default)}var De={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,at as k,bn as $,j as d,a9 as j,aq as rt,ar as Pe,aF as st,an as be,aG as lt,av as N,aE as at,H as _e,aJ as Ee,bo as it,az as ct,bp as dt,aO as ut,aR as pt,aP as ft,aS as mt,aH as ht,ay as vt,aQ as gt,aI as xt,aL as St,c as ee}from"./index-_8KOOZTs.js";import{V as wt}from"./index-D8YdWWJr.js";import{i as Ct}from"./Check-BpnmtlNp.js";import{t as Re}from"./ChevronDown-ATEjQZt3.js";import{c as oe}from"./button-DD0bNYN6.js";function Ne(n,[e,t]){return Math.min(t,Math.max(e,n))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=it(J),[ne]=vt(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,Nt]=ne(J),je=n=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[F,M]=c.useState(!1),re=rt(u),[_,O]=Pe({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(st,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:n.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:b,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:o=!1,...r}=n,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(lt,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...r,ref:a,onClick:N(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(r.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,children:i,placeholder:s="",...l}=n,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var _t="SelectIcon",ke=c.forwardRef((n,e)=>{const{__scopeSelect:t,children:o,...r}=n;return d.jsx(j.span,{"aria-hidden":!0,...r,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=n=>d.jsx(at,{asChild:!0,...n});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((n,e)=>{const t=G(Q,n.__scopeSelect),[o,r]=c.useState();if($(()=>{r(new DocumentFragment)},[]),!t.open){const i=o;return i?_e.createPortal(d.jsx(Ve,{scope:n.__scopeSelect,children:d.jsx(de.Slot,{scope:n.__scopeSelect,children:d.jsx("div",{children:n.children})})}),i):null}return d.jsx(He,{...n,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=c.forwardRef((n,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(Q,t),[x,F]=c.useState(null),[M,re]=c.useState(null),_=k(e,f=>F(f)),[O,U]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=c.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(ft,{as:jt,allowPinchZoom:!0,children:d.jsx(mt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:o,...r}=n,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,_=>h(_)),b=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const _=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,P=U.left-I,X=_.left-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-U.right-I,X=window.innerWidth-_.right-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[F,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((n,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:r=A,...i}=n,s=pe(t);return d.jsx(xt,{...s,...i,ref:e,align:o,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Fe=c.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:o,...r}=n,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:N(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),Lt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=be();return d.jsx(Dt,{scope:t,id:r,children:d.jsx(j.div,{role:"group","aria-labelledby":r,...o,ref:e})})});Lt.displayName=Ue;var We="SelectLabel",Bt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=kt(We,t);return d.jsx(j.div,{id:r.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((n,e)=>{const{__scopeSelect:t,value:o,disabled:r=!1,textValue:i,...s}=n,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=be(),v=c.useRef("touch"),C=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:r,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>w(!0)),onBlur:N(s.onBlur,()=>w(!1)),onClick:N(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,...i}=n,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,g]=c.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((n,e)=>{const t=Y(Ce,n.__scopeSelect),o=Te(Ce,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((n,e)=>{const t=Y(ye,n.__scopeSelect),o=Te(ye,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=c.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:o,...r}=n,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:N(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(r.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ft=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=ct(e);return c.useEffect(()=>{const l=r.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...wt,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ut;function et(n){return n===""||n===void 0}function tt(n){const e=dt(n),t=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,r,i]}function ot(n,e,t){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Wt(n,Math.max(i,0));r.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==t?a:void 0}function Wt(n,e){return n.map((t,o)=>n[(e+o)%n.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;const nt=({size:n=24,color:e="currentColor",...t})=>c.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},c.createElement("path",{d:"m18 15-6-6-6 6"}));nt.displayName="ChevronUp";function uo(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(n){const e=ee.c(13);let t,o,r,i;e[0]!==n?({className:o,size:i,children:t,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...r,children:[t,a]}),e[8]=t,e[9]=r,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(n){const e=ee.c(25);let t,o,r,i,s;e[0]!==n?({className:o,children:t,position:i,hideScrollButtons:s,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i,e[5]=s):(t=e[1],o=e[2],r=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==r||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...r,children:[g,S,p]})}),e[18]=l,e[19]=r,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function ho(n){const e=ee.c(16);let t,o,r,i;e[0]!==n?({className:o,children:t,hideCheck:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(Ct,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==r||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...r,children:[a,u]}),e[11]=r,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(nt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}function ro(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}export{uo as S,fo as a,po as b,mo as c,ho as d,Ne as e,nt as n};
|
|
1
|
+
import{r as c,at as k,bn as $,j as d,a9 as j,aq as rt,ar as Pe,aF as st,an as be,aG as lt,av as N,aE as at,H as _e,aJ as Ee,bo as it,az as ct,bp as dt,aO as ut,aR as pt,aP as ft,aS as mt,aH as ht,ay as vt,aQ as gt,aI as xt,aL as St,c as ee}from"./index-Dp8TDmPV.js";import{V as wt}from"./index-DBhC1Bw_.js";import{i as Ct}from"./Check-RSjbQD0O.js";import{t as Re}from"./ChevronDown-C42nqF2a.js";import{c as oe}from"./button-CJa3f3rL.js";function Ne(n,[e,t]){return Math.min(t,Math.max(e,n))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=it(J),[ne]=vt(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,Nt]=ne(J),je=n=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[F,M]=c.useState(!1),re=rt(u),[_,O]=Pe({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(st,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:n.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:b,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:o=!1,...r}=n,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(lt,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...r,ref:a,onClick:N(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(r.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,children:i,placeholder:s="",...l}=n,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var _t="SelectIcon",ke=c.forwardRef((n,e)=>{const{__scopeSelect:t,children:o,...r}=n;return d.jsx(j.span,{"aria-hidden":!0,...r,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=n=>d.jsx(at,{asChild:!0,...n});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((n,e)=>{const t=G(Q,n.__scopeSelect),[o,r]=c.useState();if($(()=>{r(new DocumentFragment)},[]),!t.open){const i=o;return i?_e.createPortal(d.jsx(Ve,{scope:n.__scopeSelect,children:d.jsx(de.Slot,{scope:n.__scopeSelect,children:d.jsx("div",{children:n.children})})}),i):null}return d.jsx(He,{...n,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=c.forwardRef((n,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(Q,t),[x,F]=c.useState(null),[M,re]=c.useState(null),_=k(e,f=>F(f)),[O,U]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=c.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(ft,{as:jt,allowPinchZoom:!0,children:d.jsx(mt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:o,...r}=n,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,_=>h(_)),b=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const _=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,P=U.left-I,X=_.left-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-U.right-I,X=window.innerWidth-_.right-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[F,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((n,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:r=A,...i}=n,s=pe(t);return d.jsx(xt,{...s,...i,ref:e,align:o,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Fe=c.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:o,...r}=n,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:N(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),Lt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=be();return d.jsx(Dt,{scope:t,id:r,children:d.jsx(j.div,{role:"group","aria-labelledby":r,...o,ref:e})})});Lt.displayName=Ue;var We="SelectLabel",Bt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=kt(We,t);return d.jsx(j.div,{id:r.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((n,e)=>{const{__scopeSelect:t,value:o,disabled:r=!1,textValue:i,...s}=n,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=be(),v=c.useRef("touch"),C=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:r,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>w(!0)),onBlur:N(s.onBlur,()=>w(!1)),onClick:N(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,...i}=n,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,g]=c.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((n,e)=>{const t=Y(Ce,n.__scopeSelect),o=Te(Ce,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((n,e)=>{const t=Y(ye,n.__scopeSelect),o=Te(ye,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=c.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:o,...r}=n,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:N(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(r.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ft=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=ct(e);return c.useEffect(()=>{const l=r.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...wt,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ut;function et(n){return n===""||n===void 0}function tt(n){const e=dt(n),t=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,r,i]}function ot(n,e,t){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Wt(n,Math.max(i,0));r.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==t?a:void 0}function Wt(n,e){return n.map((t,o)=>n[(e+o)%n.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;const nt=({size:n=24,color:e="currentColor",...t})=>c.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},c.createElement("path",{d:"m18 15-6-6-6 6"}));nt.displayName="ChevronUp";function uo(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(n){const e=ee.c(13);let t,o,r,i;e[0]!==n?({className:o,size:i,children:t,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...r,children:[t,a]}),e[8]=t,e[9]=r,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(n){const e=ee.c(25);let t,o,r,i,s;e[0]!==n?({className:o,children:t,position:i,hideScrollButtons:s,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i,e[5]=s):(t=e[1],o=e[2],r=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==r||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...r,children:[g,S,p]})}),e[18]=l,e[19]=r,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function ho(n){const e=ee.c(16);let t,o,r,i;e[0]!==n?({className:o,children:t,hideCheck:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(Ct,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==r||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...r,children:[a,u]}),e[11]=r,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(nt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}function ro(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}export{uo as S,fo as a,po as b,mo as c,ho as d,Ne as e,nt as n};
|