decocms 3.114.3 → 3.115.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-DUGqPtlh.js → AlertCircle-D-7PjEtw.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-B7a0aIt5.js → ArrowUpRight-CZ2AKZeb.js} +1 -1
- package/dist/client/assets/{CheckCircle-0-GdLYLp.js → CheckCircle-9bkti7Hr.js} +1 -1
- package/dist/client/assets/{ChevronDown-BZAlmAWO.js → ChevronDown-BiG76PbG.js} +1 -1
- package/dist/client/assets/{ChevronLeft-ByKVtg0_.js → ChevronLeft-C58gjtJv.js} +1 -1
- package/dist/client/assets/{ChevronRight-CZbXvZTe.js → ChevronRight-CxOiC2QH.js} +1 -1
- package/dist/client/assets/{ChevronUp-B0OADioi.js → ChevronUp-DfOFXIHa.js} +1 -1
- package/dist/client/assets/{DotsVertical-C9Jh_poZ.js → DotsVertical-a3ykMqAA.js} +1 -1
- package/dist/client/assets/{Eye-CWJjgws7.js → Eye-2YEx7Dwq.js} +1 -1
- package/dist/client/assets/{FilterLines-BVyowDNT.js → FilterLines-F6PgwAY_.js} +1 -1
- package/dist/client/assets/{Globe01-CzOmylZ9.js → Globe01-COf6zLiZ.js} +1 -1
- package/dist/client/assets/{Globe04-D3jNk0MO.js → Globe04-Dq3vblVU.js} +1 -1
- package/dist/client/assets/{HardDrive-BEzqCyj-.js → HardDrive-BSLQyk2T.js} +1 -1
- package/dist/client/assets/{Key01-CDQpTHn9.js → Key01-CG8Ocmkf.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BsA_ZgtZ.js → LayoutLeft-C9M-c9Be.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DKrufXeJ.js → LinkExternal01-BAByQaEM.js} +1 -1
- package/dist/client/assets/{Monitor01-Bcbd4aM_.js → Monitor01-BzynOj5W.js} +1 -1
- package/dist/client/assets/{Palette-Bq2LUF8B.js → Palette-1s64kSUf.js} +1 -1
- package/dist/client/assets/{Play-BNax2u3H.js → Play-B9SImCZC.js} +1 -1
- package/dist/client/assets/{Plus-5rp1_RR5.js → Plus-zU9dAD7D.js} +1 -1
- package/dist/client/assets/{SearchLg-D6nGdfMF.js → SearchLg-BVPVQ0vp.js} +1 -1
- package/dist/client/assets/{SearchMd-A6Xa0MBB.js → SearchMd-PH69oVnY.js} +1 -1
- package/dist/client/assets/{Settings02-DvpcoLYG.js → Settings02-EL56AUOj.js} +1 -1
- package/dist/client/assets/{Shield01-D4YGPcuA.js → Shield01-AFFhyH-Q.js} +1 -1
- package/dist/client/assets/{Star01-piUVzWuz.js → Star01-mpxZIMIE.js} +1 -1
- package/dist/client/assets/{Stars01-CD-Z1VE5.js → Stars01-DMOLWULi.js} +1 -1
- package/dist/client/assets/{Stars02-CG89gFRd.js → Stars02-C544vv_N.js} +1 -1
- package/dist/client/assets/{Sun-B2qPVHUH.js → Sun-r54o6QiQ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B-2y-eYV.js → SwitchHorizontal01-DaGfbKP8.js} +1 -1
- package/dist/client/assets/{Tool01-DIKUpJe-.js → Tool01-COWkReBB.js} +1 -1
- package/dist/client/assets/{Trash01-CjpH6l2d.js → Trash01-1MWAufak.js} +1 -1
- package/dist/client/assets/{Upload01-DIr0jNLv.js → Upload01-CRqooMSt.js} +1 -1
- package/dist/client/assets/{User01-DRVOr7L9.js → User01-CgetDSOS.js} +1 -1
- package/dist/client/assets/{Users01-DK-1tVkx.js → Users01-CswJuRrY.js} +1 -1
- package/dist/client/assets/{Users03-BthW4AuM.js → Users03-DbPSsBA-.js} +1 -1
- package/dist/client/assets/{X-Dm2BPWUH.js → X-CEw3MnyS.js} +1 -1
- package/dist/client/assets/{XCircle-toiw2T46.js → XCircle-Dl7p705r.js} +1 -1
- package/dist/client/assets/{XClose-BChQARPj.js → XClose-uZGmvKR6.js} +1 -1
- package/dist/client/assets/{Zap-DbvvKfHw.js → Zap-e90etD2O.js} +1 -1
- package/dist/client/assets/{ZapSquare-CK_NOlpT.js → ZapSquare-DTT6gfoF.js} +1 -1
- package/dist/client/assets/{ZoomOut-CLSQzOix.js → ZoomOut-Cy8FAKIf.js} +1 -1
- package/dist/client/assets/{access-gate-ccu9N6IV.js → access-gate-Dp1Z0qXq.js} +1 -1
- package/dist/client/assets/{add-section-modal-D3GRGJtw.js → add-section-modal-CsLSYjdX.js} +1 -1
- package/dist/client/assets/{agent-icon-CKRYiZxq.js → agent-icon-FdWoP8GO.js} +1 -1
- package/dist/client/assets/{agents-list-CmzkDodG.js → agents-list-DN32bJfv.js} +1 -1
- package/dist/client/assets/{ai-providers-e0GkzrF4.js → ai-providers-DE5cm7hv.js} +1 -1
- package/dist/client/assets/{alert-DPYYYzTW.js → alert-HbGPLyaI.js} +1 -1
- package/dist/client/assets/{alert-dialog-D7h3OVCa.js → alert-dialog-BtmlqJJX.js} +1 -1
- package/dist/client/assets/{app-editor-DvSRtjD6.js → app-editor-CLlRpy4c.js} +1 -1
- package/dist/client/assets/{auth-Bz1pHzDF.js → auth-BJN1UQPw.js} +1 -1
- package/dist/client/assets/{auth-catchall-BBFuv6Tq.js → auth-catchall-DMJO8vQ2.js} +1 -1
- package/dist/client/assets/{auth-entry-BW-a0TWY.js → auth-entry-6kvfcR--.js} +1 -1
- package/dist/client/assets/{auth-split-layout-C81k_Bhf.js → auth-split-layout-BCdMQ6sT.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-RSVXQnzM.js → authenticate-and-persist-oauth-yxoH0dvw.js} +1 -1
- package/dist/client/assets/{automation-list-row-DmbuYE7K.js → automation-list-row-Biez7TNS.js} +1 -1
- package/dist/client/assets/{automation-runs-HFmqOK1x.js → automation-runs-B4g0hja_.js} +1 -1
- package/dist/client/assets/{automations-DrjD1TPx.js → automations-Bl8bvqdQ.js} +1 -1
- package/dist/client/assets/{avatar-DSnbXlYk.js → avatar-H5SdZkja.js} +1 -1
- package/dist/client/assets/{badge-B81PpMGy.js → badge-Do_h1EED.js} +1 -1
- package/dist/client/assets/{block-document-D6xEVFGy.js → block-document-DclOy3iD.js} +1 -1
- package/dist/client/assets/{brand-context-Bf6TSjAM.js → brand-context-C5jougGd.js} +1 -1
- package/dist/client/assets/{buckets-tJVlXOQG.js → buckets-D7UcjgEY.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BVy9-GjB.js → bulk-category-panel-BfpRuFU7.js} +1 -1
- package/dist/client/assets/{capability-load-error-CR38jTEw.js → capability-load-error-g4HZLLFO.js} +1 -1
- package/dist/client/assets/{card-vMZldVlD.js → card-Cqi1WoGg.js} +1 -1
- package/dist/client/assets/{category-editor-ocGQiRQH.js → category-editor-BycsOmA5.js} +1 -1
- package/dist/client/assets/{chat-context-DZOCQoEe.js → chat-context-ChQy-gUn.js} +1 -1
- package/dist/client/assets/{checkbox-ci3MAUuN.js → checkbox-DbkDERGW.js} +1 -1
- package/dist/client/assets/{cli-auth-success-B0b-GVVA.js → cli-auth-success-B5H4HGs7.js} +1 -1
- package/dist/client/assets/collection-detail-BREof8hq.js +1 -0
- package/dist/client/assets/{collection-display-button-BNMMdhKC.js → collection-display-button-WR3-I5Eh.js} +1 -1
- package/dist/client/assets/{collection-search-CcLsuH4x.js → collection-search-BoJazD82.js} +1 -1
- package/dist/client/assets/{collection-tabs-DjkVdPcE.js → collection-tabs-C_0nyzoU.js} +1 -1
- package/dist/client/assets/{command-BrpgtXvN.js → command-BeH3YRVu.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BYI3K_5a.js → commerce-onboarding-Uj2UmeC4.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DKt1jlHb.js → connect-desktop-dialog-DF4bgaMX.js} +1 -1
- package/dist/client/assets/{connection-card-BkromfLa.js → connection-card-1zfA6Muf.js} +1 -1
- package/dist/client/assets/{connection-detail-DzO8P1GR.js → connection-detail-BZwNqOWM.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CJhOmhW1.js → connection-form-helpers-vOJt52C3.js} +1 -1
- package/dist/client/assets/{connections-DbMZ2mX-.js → connections-Doiw8HrX.js} +1 -1
- package/dist/client/assets/{context-menu-A2X-WrPv.js → context-menu-GVbNRXl1.js} +1 -1
- package/dist/client/assets/{decopilot-CP4BP54t.js → decopilot-RE9QrilE.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-IK0grBms.js → decopilot-sse-pool-AsaLsaON.js} +1 -1
- package/dist/client/assets/{dialog-Dbfe-eb6.js → dialog-cQOZdhdQ.js} +1 -1
- package/dist/client/assets/{domain-settings-DUtDMtq1.js → domain-settings-D5ngvsrw.js} +1 -1
- package/dist/client/assets/{drawer-BfVwYC6W.js → drawer-pIac4aIL.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BtpmYFzi.js → dropdown-menu-BRbe4lMo.js} +1 -1
- package/dist/client/assets/{empty-state-BlJ_pmLm.js → empty-state-BOBXBUKf.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BuaSlKBa.js → extract-connection-data-B9W9--jM.js} +1 -1
- package/dist/client/assets/{file-explorer-DwBsXp6s.js → file-explorer-CKPpCZO5.js} +1 -1
- package/dist/client/assets/{file-type-icon-CRsWpGKN.js → file-type-icon-Bn5H23F4.js} +1 -1
- package/dist/client/assets/{files-DWMDyHYQ.js → files-mfmO4dWf.js} +1 -1
- package/dist/client/assets/{form-F1WLAqV1.js → form-BW1ReJcS.js} +1 -1
- package/dist/client/assets/{general-BgWqtNo6.js → general-BCtI6jKf.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CyGl1mig.js → github-repo-picker-MOImnPFt.js} +1 -1
- package/dist/client/assets/{hooks-CJzY_OZA.js → hooks-DQp4SbPL.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-BWiUuarY.js → import-from-deco-dialog-Bv6V3bx1.js} +1 -1
- package/dist/client/assets/{index-NldgUqqR.js → index-7yVsA6sW.js} +2 -2
- package/dist/client/assets/{index-hp1Wb5d8.js → index-B7RYP3NN.js} +4 -4
- package/dist/client/assets/{index-BYFFlHqX.js → index-BSkN4P6h.js} +1 -1
- package/dist/client/assets/index-BU1TX0po.js +1 -0
- package/dist/client/assets/{index-BgLmTOlo.js → index-BsDpjKxu.js} +1 -1
- package/dist/client/assets/{index-Lpj8dwb9.js → index-Bwozw13N.js} +1 -1
- package/dist/client/assets/{index-DPfCDmWl.js → index-C9ltDhtF.js} +1 -1
- package/dist/client/assets/{index-Ba7KKF_d.js → index-CKhM5_NA.js} +1 -1
- package/dist/client/assets/{index-Ck5dqWQV.js → index-CvNw3qwc.js} +6 -6
- package/dist/client/assets/{index-Bb_9tdSH.js → index-CzfcGW8R.js} +1 -1
- package/dist/client/assets/{index-jKciCBu7.js → index-D0p0dhrp.js} +1 -1
- package/dist/client/assets/{index-lHab8rDw.js → index-HpV5bKtX.js} +1 -1
- package/dist/client/assets/{index-s2QQjwkA.js → index-ch-eAz5_.js} +1 -1
- package/dist/client/assets/{index-C_T9krcU.js → index-giXEg4vh.js} +1 -1
- package/dist/client/assets/{index-redirect-DPEPB5dJ.js → index-redirect-DxmcbHv9.js} +1 -1
- package/dist/client/assets/{input-C6WjLnBW.js → input-DYt_CZpv.js} +1 -1
- package/dist/client/assets/{integration-icon-BLsBlU2A.js → integration-icon-CupmoBmN.js} +1 -1
- package/dist/client/assets/{label-C6MeZ4-j.js → label-WTzAZRMT.js} +1 -1
- package/dist/client/assets/{login-7ezWKg0-.js → login-TkTskBB7.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BzAAKPPy.js → mcp-oauth-CvIoKyUP.js} +1 -1
- package/dist/client/assets/{members-DU1haVQr.js → members-B9E1BttH.js} +1 -1
- package/dist/client/assets/{monaco-editor-To3L-lLy.js → monaco-editor-zKtDY1O-.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-hThAQ5gU.js → monitoring-stats-row-CbZ9DQY1.js} +1 -1
- package/dist/client/assets/{oauth-callback-CTw-j0sF.js → oauth-callback-7aPUWzmA.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D-NSzp56.js → oauth-callback-ai-provider-BtyBq-f8.js} +1 -1
- package/dist/client/assets/{onboarding-DlmxmLrV.js → onboarding-CxoS_5M3.js} +1 -1
- package/dist/client/assets/{org-install-C2KHJjyG.js → org-install-6t_kUfJZ.js} +1 -1
- package/dist/client/assets/{org-layout-BBVjCM2D.js → org-layout-n93pHUOW.js} +1 -1
- package/dist/client/assets/{organization-choice-pbczmrF9.js → organization-choice-B0qEUlsz.js} +1 -1
- package/dist/client/assets/{page-seo-form-DmP-2QvF.js → page-seo-form-ChiupBka.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BluY9I7n.js +1 -0
- package/dist/client/assets/{popover-B85FT1A4.js → popover-DtwBpoIO.js} +1 -1
- package/dist/client/assets/{post-editor-Cl7Q0tSU.js → post-editor-DXR5tZgH.js} +1 -1
- package/dist/client/assets/{preview-dialog-CV2rLU0Z.js → preview-dialog-BsttZpu8.js} +1 -1
- package/dist/client/assets/{primitives-DTBA7oNO.js → primitives-Dw70oGRg.js} +1 -1
- package/dist/client/assets/{profile-dJ2GYHk-.js → profile-DXDwsM3w.js} +1 -1
- package/dist/client/assets/project-app-view-6BXg-etM.js +1 -0
- package/dist/client/assets/record-editor-DRGnAhN4.js +1 -0
- package/dist/client/assets/registry-DqBFSKhs.js +2 -0
- package/dist/client/assets/{registry-layout-BrxIodGI.js → registry-layout-BuaEWr12.js} +1 -1
- package/dist/client/assets/{require-capability-BPD_Dr8D.js → require-capability-DkXUPJHW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BUFnivGw.js → required-auth-layout-B5rr_mn1.js} +1 -1
- package/dist/client/assets/{reset-password-EOMVIQfp.js → reset-password-NK2sWMFF.js} +1 -1
- package/dist/client/assets/{roles-CytMn2Ob.js → roles-Jdl1s2wQ.js} +1 -1
- package/dist/client/assets/{scroll-area-BbUjVnjt.js → scroll-area-Djm-NAxC.js} +1 -1
- package/dist/client/assets/{search-input-DY7Ft80U.js → search-input-BFlmPv6b.js} +1 -1
- package/dist/client/assets/{secrets-Bd_MPkDs.js → secrets-Bzt0nNLT.js} +1 -1
- package/dist/client/assets/{sections-editor-8Ks5ueR6.js → sections-editor-DLWAm3Tg.js} +1 -1
- package/dist/client/assets/{select-C1Co9wRd.js → select-Ckjg4LQb.js} +1 -1
- package/dist/client/assets/{select-model-CYoxEIG7.js → select-model-CH6qfHEO.js} +1 -1
- package/dist/client/assets/{seo-editor-Bb7PlJ5y.js → seo-editor-CFxz91D7.js} +1 -1
- package/dist/client/assets/{settings-layout-BDKs2rSh.js → settings-layout-DQ_JUF6g.js} +1 -1
- package/dist/client/assets/{settings-section-CNjt90YU.js → settings-section-pUfVePvc.js} +1 -1
- package/dist/client/assets/{sheet-CVKgycLo.js → sheet-OIW1mtkz.js} +1 -1
- package/dist/client/assets/{shell-controls-BlGytezy.js → shell-controls-mdam3xyX.js} +1 -1
- package/dist/client/assets/shell-layout-CIM-_o8G.js +1 -0
- package/dist/client/assets/{shell-route-loading-DEz3O8bT.js → shell-route-loading-DnJymbcA.js} +1 -1
- package/dist/client/assets/{sidebar-CXgOD0j4.js → sidebar-BvhztApl.js} +1 -1
- package/dist/client/assets/{skeleton-BxbzRIaS.js → skeleton-0gmSAP3g.js} +1 -1
- package/dist/client/assets/{sortable.esm-jCX9F1I0.js → sortable.esm-wRdRO37A.js} +1 -1
- package/dist/client/assets/{sso-BGKt1tdG.js → sso-CePhGydi.js} +1 -1
- package/dist/client/assets/{store-C-4UmSF6.js → store-D2nY36H8.js} +1 -1
- package/dist/client/assets/store-registry-DN5k3WHH.js +2 -0
- package/dist/client/assets/{studio-tools-DcYtvtOD.js → studio-tools-ChQt8hNF.js} +1 -1
- package/dist/client/assets/{switch-BOLA3fVR.js → switch-BNL7UE54.js} +1 -1
- package/dist/client/assets/{table-BgLEARdJ.js → table-DRvtWOYH.js} +1 -1
- package/dist/client/assets/{tabs-BzWpOc1B.js → tabs-XugiiZlr.js} +1 -1
- package/dist/client/assets/{task-status-Dmc8WxvW.js → task-status-BZcrK7Al.js} +1 -1
- package/dist/client/assets/{textarea-DaioptAD.js → textarea-C5f__Zd-.js} +1 -1
- package/dist/client/assets/{toggle-group-DjTuptaq.js → toggle-group-DUXjyCO9.js} +1 -1
- package/dist/client/assets/{toolbar-B6tiMPjD.js → toolbar-BvpYVbA4.js} +1 -1
- package/dist/client/assets/{tools-list-nsxuwXS5.js → tools-list-BOqGgZhI.js} +1 -1
- package/dist/client/assets/{tooltip-CVra7O3Y.js → tooltip-eREMpTVZ.js} +1 -1
- package/dist/client/assets/{types-Cb5TfKA4.js → types-DnSWi0Km.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DyY2tyZC.js → use-ai-providers-Qtf6fKcb.js} +1 -1
- package/dist/client/assets/{use-automations-CHwwj-NC.js → use-automations-Dvl4PTCR.js} +1 -1
- package/dist/client/assets/{use-capability-DxNLPlpy.js → use-capability-BLPa5d5v.js} +1 -1
- package/dist/client/assets/{use-clock-tick-D8F-_L2Q.js → use-clock-tick-POHY5Nmo.js} +1 -1
- package/dist/client/assets/{use-collections-CVB9vyBA.js → use-collections-DH3dGzZL.js} +1 -1
- package/dist/client/assets/{use-connection-DemZRmxG.js → use-connection-Bk5nhdqu.js} +1 -1
- package/dist/client/assets/{use-copy-Bk0bvWjF.js → use-copy-C3e_Od1k.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C_XKSLTZ.js → use-create-virtual-mcp-BroeoLLc.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-rNMfE7Hb.js → use-debounced-autosave-FGrfxZ2q.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D2in5--8.js → use-debounced-value-we_6-AXV.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CA3UyhbS.js → use-decopilot-events-BDpNzFBr.js} +1 -1
- package/dist/client/assets/{use-delete-connection-w5pPD-34.js → use-delete-connection-BA0QXfuD.js} +1 -1
- package/dist/client/assets/{use-file-configs-zV5LBoB8.js → use-file-configs-_U1-NqW1.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-YksyijYK.js → use-infinite-scroll-DKJdRPXr.js} +1 -1
- package/dist/client/assets/{use-join-requests-D8I0f12n.js → use-join-requests-CiuY2hZq.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CWK8x43B.js → use-mcp-client-CJ3hyRQl.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-D8seBVst.js → use-mcp-prompts-CMFoYv6U.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BIAnfSTp.js → use-mcp-tools-C-orDLaO.js} +1 -1
- package/dist/client/assets/{use-members-C8n5rRk7.js → use-members-Ap16IYRu.js} +1 -1
- package/dist/client/assets/{use-mobile-B9nTCS2O.js → use-mobile-CIn4xg0a.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-8EXCPUR2.js → use-navigate-to-agent-Cpi1Yolj.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Cs1ETwFW.js → use-org-auth-client-tdMdOsMe.js} +1 -1
- package/dist/client/assets/{use-org-fs-D4JnDcIo.js → use-org-fs-CtUILE9D.js} +1 -1
- package/dist/client/assets/{use-org-sso-CWOPBiGr.js → use-org-sso-D6LtO0kt.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CELt40vg.js → use-organization-roles-BdABOYZ3.js} +1 -1
- package/dist/client/assets/{use-organization-settings-dGN7w7Gw.js → use-organization-settings-DjqIbP3u.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DcLG4k_o.js → use-registry-connections-B8jNCwfv.js} +1 -1
- package/dist/client/assets/{use-secrets-B1CdXO-4.js → use-secrets-BVZWb4l9.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BVklPfi-.js → use-status-sounds-WHlKtRMa.js} +1 -1
- package/dist/client/assets/{use-view-mode-DgvLQR17.js → use-view-mode-CcNszWMu.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DqAivw06.js → use-virtual-mcp-D2-GRBZZ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BiCNMjD5.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CZufjHD-.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-DNdDtE3g.js → useSuspenseQueries-CnrcbwVH.js} +1 -1
- package/dist/client/assets/variant-calendar-BXhMMlkJ.js +1 -0
- package/dist/client/assets/{view-mode-toggle-aa27BTGl.js → view-mode-toggle-D5052cyK.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +287 -287
- package/dist/server/server.js +246 -246
- package/package.json +1 -1
- package/dist/client/assets/collection-detail-YZKIfW-_.js +0 -1
- package/dist/client/assets/index-D63bcfN9.js +0 -1
- package/dist/client/assets/page-seo-sheet-CdIw8g0b.js +0 -1
- package/dist/client/assets/project-app-view-B8DF--d7.js +0 -1
- package/dist/client/assets/record-editor-DiHo-iMK.js +0 -1
- package/dist/client/assets/registry-JhGqfItP.js +0 -2
- package/dist/client/assets/shell-layout-DnnFFzeM.js +0 -1
- package/dist/client/assets/store-registry-BXVrVdfy.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BcaQxTAf.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CNwX-D2H.js +0 -1
- package/dist/client/assets/variant-calendar-BzKT6QT-.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,e as R,j as s,D as H,l as k,ag as J,G as L,v as B,P as G,a as I,i as Q,r as F,O as K}from"./index-hp1Wb5d8.js";import{u as E,S as U,M as V}from"./shell-controls-BlGytezy.js";import{j as X,k as Y,l as Z,b as q,c as w,d as P,S as M,a as O,f as ee,g as se}from"./sidebar-CXgOD0j4.js";import{a as te}from"./index-Lpj8dwb9.js";import{n as le,b as re,a as ie,c as oe,d as ne,i as T}from"./ZapSquare-CK_NOlpT.js";import{t as ae,a as A}from"./Users03-BthW4AuM.js";import{i as ce}from"./HardDrive-BEzqCyj-.js";import{i as me}from"./Key01-CDQpTHn9.js";import{i as fe}from"./Shield01-D4YGPcuA.js";import{s as de}from"./User01-DRVOr7L9.js";import{i as xe}from"./Zap-DbvvKfHw.js";import{a as be}from"./use-capability-DxNLPlpy.js";import{a as ue}from"./use-join-requests-D8I0f12n.js";import{u as W}from"./use-mobile-B9nTCS2O.js";import{u as he}from"./use-status-sounds-BVklPfi-.js";import{a as y}from"./toolbar-B6tiMPjD.js";import"./sheet-CVKgycLo.js";import"./X-Dm2BPWUH.js";import"./LayoutLeft-BsA_ZgtZ.js";import"./tooltip-CVra7O3Y.js";import"./studio-tools-DcYtvtOD.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-CA3UyhbS.js";import"./decopilot-sse-pool-IK0grBms.js";import"./backoff-CrEUbyZT.js";import"./ChevronLeft-ByKVtg0_.js";import"./ChevronRight-CZbXvZTe.js";function D(){const e=S.c(21),{capabilities:t,isPrivileged:f,loading:l,error:a}=be(),r=ue().length;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ae,{size:14}),e[0]=o):o=e[0];let n,i;if(e[1]!==t||e[2]!==a||e[3]!==f||e[4]!==r||e[5]!==l){i=Symbol.for("react.early_return_sentinel");e:{let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(le,{size:14}),e[8]=u):u=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(re,{size:14}),e[9]=c):c=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(me,{size:14}),e[10]=d):d=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ce,{size:14}),e[11]=x):x=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ie,{size:14}),e[12]=m):m=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(A,{size:14}),e[13]=b):b=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{size:14}),e[14]=p):p=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(oe,{size:14}),e[15]=g):g=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ne,{size:14}),e[16]=h):h=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(A,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(fe,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(J,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(de,{size:14}),e[20]=N):N=e[20];const z=[{label:"Organization",items:[{key:"general",label:"General",icon:o,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:u,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:c,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:d,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:x,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:m,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:b,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:p,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:h,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:r},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(l||a){i=z;break e}n=z.map(C=>({...C,items:C.items.filter($=>$.privilegedOnly?f:$.requires?f||t[$.requires]:!0)})).filter(pe)}e[1]=t,e[2]=a,e[3]=f,e[4]=r,e[5]=l,e[6]=n,e[7]=i}else n=e[6],i=e[7];return i!==Symbol.for("react.early_return_sentinel")?i:n}function pe(e){return e.items.length>0}function ge(){const e=S.c(19),t=D();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/shell/$org"},e[0]=f):f=e[0];const{org:l}=R(f);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={select:_e},e[1]=a):a=e[1];const r=E(a);let o;e[2]!==l||e[3]!==r?(o=b=>{const p=b.replace("$org",l);return r.startsWith(p)},e[2]=l,e[3]=r,e[4]=o):o=e[4];const n=o;let i;if(e[5]!==t||e[6]!==n||e[7]!==l){let b;e[9]!==n||e[10]!==l?(b=(p,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[p.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:p.label}),s.jsx(w,{children:s.jsx(P,{className:"gap-0.5",children:p.items.map(h=>s.jsx(M,{children:s.jsx(O,{asChild:!0,isActive:n(h.to),children:s.jsxs(L,{to:h.to,params:{org:l},onClick:()=>B("settings_nav_clicked",{section_key:h.key,section_label:h.label,group_label:p.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[h.icon,h.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:h.label})]})})},h.key))})})]},`${p.label}-${g}`),e[9]=n,e[10]=l,e[11]=b):b=e[11],i=t.map(b),e[5]=t,e[6]=n,e[7]=l,e[8]=i}else i=e[8];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=u):u=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[u,s.jsx(w,{children:s.jsx(P,{className:"gap-0.5",children:s.jsx(M,{children:s.jsxs(O,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=c):c=e[13];let d;e[14]!==i?(d=s.jsxs(ee,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[i,c]}),e[14]=i,e[15]=d):d=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.114.3"]})}),e[16]=x):x=e[16];let m;return e[17]!==d?(m=s.jsxs(se,{variant:"sidebar",children:[d,x]}),e[17]=d,e[18]=m):m=e[18],m}function je(){B("signed_out",{source:"settings_sidebar"}),G(),I.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:f}=e,l=D();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org"},t[0]=a):a=t[0];const{org:r}=R(a);let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o={select:ve},t[1]=o):o=t[1];const n=E(o);let i;t[2]!==r||t[3]!==n?(i=g=>{const h=g.replace("$org",r);return n.startsWith(h)},t[2]=r,t[3]=n,t[4]=i):i=t[4];const u=i;let c;if(t[5]!==l||t[6]!==u||t[7]!==f||t[8]!==r){let g;t[10]!==u||t[11]!==f||t[12]!==r?(g=(h,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:h.label}),h.items.map(j=>s.jsxs(L,{to:j.to,params:{org:r},onClick:f,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",u(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${h.label}-${_}`),t[10]=u,t[11]=f,t[12]=r,t[13]=g):g=t[13],c=l.map(g),t[5]=l,t[6]=u,t[7]=f,t[8]=r,t[9]=c}else c=t[9];let d;t[14]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=d):d=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[d,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=x):x=t[15];let m;t[16]!==c?(m=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[c,x]}),t[16]=c,t[17]=m):m=t[17];let b;t[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.114.3"]})}),t[18]=b):b=t[18];let p;return t[19]!==m?(p=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[m,b]}),t[19]=m,t[20]=p):p=t[20],p}function Se(){G(),I.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:f}=H();he(f.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(Q,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(F.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(te,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(K,{})})})})}),e[1]=a):a=e[1];const r=a;if(t){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:r}),e[2]=n):n=e[2],n}let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:r})}),e[3]=o):o=e[3],o}function Ze(){const e=S.c(22),t=W();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(y.LogoLink,{}),e[0]=f):f=e[0];let l;e[1]!==t?(l=t&&s.jsx(U,{}),e[1]=t,e[2]=l):l=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"hidden md:contents",children:s.jsx(y.Nav,{})}),e[3]=a):a=e[3];let r;e[4]!==l?(r=s.jsxs(y.LeftColumn,{children:[f,l,a]}),e[4]=l,e[5]=r):r=e[5];let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[6]=o):o=e[6];let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[7]=n):n=e[7];let i;e[8]!==r?(i=s.jsxs(y.Header,{children:[r,o,n]}),e[8]=r,e[9]=i):i=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u={"--sidebar-width-icon":"3.5rem"},e[10]=u):u=e[10];let c;e[11]!==t?(c=!t&&s.jsx(ge,{}),e[11]=t,e[12]=c):c=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(X,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(Ne,{})}),e[13]=d):d=e[13];let x;e[14]!==c?(x=s.jsxs(Y,{className:"flex-1 bg-sidebar min-h-0",style:u,children:[c,d]}),e[14]=c,e[15]=x):x=e[15];let m;e[16]!==t?(m=t&&s.jsx(V,{renderSidebar:ke}),e[16]=t,e[17]=m):m=e[17];let b;return e[18]!==x||e[19]!==m||e[20]!==i?(b=s.jsx(y.Provider,{children:s.jsx(Z,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[i,x,m]})})}),e[18]=x,e[19]=m,e[20]=i,e[21]=b):b=e[21],b}function ke(e){const{onClose:t}=e;return s.jsx(ye,{onClose:t})}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,Ze as default};
|
|
1
|
+
import{c as S,e as R,j as s,D as H,l as k,ag as J,G as L,v as B,P as G,a as I,i as Q,r as F,O as K}from"./index-B7RYP3NN.js";import{u as E,S as U,M as V}from"./shell-controls-mdam3xyX.js";import{j as X,k as Y,l as Z,b as q,c as w,d as P,S as M,a as O,f as ee,g as se}from"./sidebar-BvhztApl.js";import{a as te}from"./index-Bwozw13N.js";import{n as le,b as re,a as ie,c as oe,d as ne,i as T}from"./ZapSquare-DTT6gfoF.js";import{t as ae,a as A}from"./Users03-DbPSsBA-.js";import{i as ce}from"./HardDrive-BSLQyk2T.js";import{i as me}from"./Key01-CG8Ocmkf.js";import{i as fe}from"./Shield01-AFFhyH-Q.js";import{s as de}from"./User01-CgetDSOS.js";import{i as xe}from"./Zap-e90etD2O.js";import{a as be}from"./use-capability-BLPa5d5v.js";import{a as ue}from"./use-join-requests-CiuY2hZq.js";import{u as W}from"./use-mobile-CIn4xg0a.js";import{u as he}from"./use-status-sounds-WHlKtRMa.js";import{a as y}from"./toolbar-BvpYVbA4.js";import"./sheet-OIW1mtkz.js";import"./X-CEw3MnyS.js";import"./LayoutLeft-C9M-c9Be.js";import"./tooltip-eREMpTVZ.js";import"./studio-tools-ChQt8hNF.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-BDpNzFBr.js";import"./decopilot-sse-pool-AsaLsaON.js";import"./backoff-CrEUbyZT.js";import"./ChevronLeft-C58gjtJv.js";import"./ChevronRight-CxOiC2QH.js";function D(){const e=S.c(21),{capabilities:t,isPrivileged:f,loading:l,error:a}=be(),r=ue().length;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ae,{size:14}),e[0]=o):o=e[0];let n,i;if(e[1]!==t||e[2]!==a||e[3]!==f||e[4]!==r||e[5]!==l){i=Symbol.for("react.early_return_sentinel");e:{let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(le,{size:14}),e[8]=u):u=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(re,{size:14}),e[9]=c):c=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(me,{size:14}),e[10]=d):d=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ce,{size:14}),e[11]=x):x=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ie,{size:14}),e[12]=m):m=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(A,{size:14}),e[13]=b):b=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{size:14}),e[14]=p):p=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(oe,{size:14}),e[15]=g):g=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ne,{size:14}),e[16]=h):h=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(A,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(fe,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(J,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(de,{size:14}),e[20]=N):N=e[20];const z=[{label:"Organization",items:[{key:"general",label:"General",icon:o,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:u,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:c,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:d,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:x,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:m,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:b,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:p,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:h,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:r},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(l||a){i=z;break e}n=z.map(C=>({...C,items:C.items.filter($=>$.privilegedOnly?f:$.requires?f||t[$.requires]:!0)})).filter(pe)}e[1]=t,e[2]=a,e[3]=f,e[4]=r,e[5]=l,e[6]=n,e[7]=i}else n=e[6],i=e[7];return i!==Symbol.for("react.early_return_sentinel")?i:n}function pe(e){return e.items.length>0}function ge(){const e=S.c(19),t=D();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/shell/$org"},e[0]=f):f=e[0];const{org:l}=R(f);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={select:_e},e[1]=a):a=e[1];const r=E(a);let o;e[2]!==l||e[3]!==r?(o=b=>{const p=b.replace("$org",l);return r.startsWith(p)},e[2]=l,e[3]=r,e[4]=o):o=e[4];const n=o;let i;if(e[5]!==t||e[6]!==n||e[7]!==l){let b;e[9]!==n||e[10]!==l?(b=(p,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[p.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:p.label}),s.jsx(w,{children:s.jsx(P,{className:"gap-0.5",children:p.items.map(h=>s.jsx(M,{children:s.jsx(O,{asChild:!0,isActive:n(h.to),children:s.jsxs(L,{to:h.to,params:{org:l},onClick:()=>B("settings_nav_clicked",{section_key:h.key,section_label:h.label,group_label:p.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[h.icon,h.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:h.label})]})})},h.key))})})]},`${p.label}-${g}`),e[9]=n,e[10]=l,e[11]=b):b=e[11],i=t.map(b),e[5]=t,e[6]=n,e[7]=l,e[8]=i}else i=e[8];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=u):u=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[u,s.jsx(w,{children:s.jsx(P,{className:"gap-0.5",children:s.jsx(M,{children:s.jsxs(O,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=c):c=e[13];let d;e[14]!==i?(d=s.jsxs(ee,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[i,c]}),e[14]=i,e[15]=d):d=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.115.1"]})}),e[16]=x):x=e[16];let m;return e[17]!==d?(m=s.jsxs(se,{variant:"sidebar",children:[d,x]}),e[17]=d,e[18]=m):m=e[18],m}function je(){B("signed_out",{source:"settings_sidebar"}),G(),I.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:f}=e,l=D();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org"},t[0]=a):a=t[0];const{org:r}=R(a);let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o={select:ve},t[1]=o):o=t[1];const n=E(o);let i;t[2]!==r||t[3]!==n?(i=g=>{const h=g.replace("$org",r);return n.startsWith(h)},t[2]=r,t[3]=n,t[4]=i):i=t[4];const u=i;let c;if(t[5]!==l||t[6]!==u||t[7]!==f||t[8]!==r){let g;t[10]!==u||t[11]!==f||t[12]!==r?(g=(h,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:h.label}),h.items.map(j=>s.jsxs(L,{to:j.to,params:{org:r},onClick:f,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",u(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${h.label}-${_}`),t[10]=u,t[11]=f,t[12]=r,t[13]=g):g=t[13],c=l.map(g),t[5]=l,t[6]=u,t[7]=f,t[8]=r,t[9]=c}else c=t[9];let d;t[14]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=d):d=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[d,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=x):x=t[15];let m;t[16]!==c?(m=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[c,x]}),t[16]=c,t[17]=m):m=t[17];let b;t[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.115.1"]})}),t[18]=b):b=t[18];let p;return t[19]!==m?(p=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[m,b]}),t[19]=m,t[20]=p):p=t[20],p}function Se(){G(),I.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:f}=H();he(f.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(Q,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(F.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(te,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(K,{})})})})}),e[1]=a):a=e[1];const r=a;if(t){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:r}),e[2]=n):n=e[2],n}let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:r})}),e[3]=o):o=e[3],o}function Ze(){const e=S.c(22),t=W();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(y.LogoLink,{}),e[0]=f):f=e[0];let l;e[1]!==t?(l=t&&s.jsx(U,{}),e[1]=t,e[2]=l):l=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"hidden md:contents",children:s.jsx(y.Nav,{})}),e[3]=a):a=e[3];let r;e[4]!==l?(r=s.jsxs(y.LeftColumn,{children:[f,l,a]}),e[4]=l,e[5]=r):r=e[5];let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[6]=o):o=e[6];let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[7]=n):n=e[7];let i;e[8]!==r?(i=s.jsxs(y.Header,{children:[r,o,n]}),e[8]=r,e[9]=i):i=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u={"--sidebar-width-icon":"3.5rem"},e[10]=u):u=e[10];let c;e[11]!==t?(c=!t&&s.jsx(ge,{}),e[11]=t,e[12]=c):c=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(X,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(Ne,{})}),e[13]=d):d=e[13];let x;e[14]!==c?(x=s.jsxs(Y,{className:"flex-1 bg-sidebar min-h-0",style:u,children:[c,d]}),e[14]=c,e[15]=x):x=e[15];let m;e[16]!==t?(m=t&&s.jsx(V,{renderSidebar:ke}),e[16]=t,e[17]=m):m=e[17];let b;return e[18]!==x||e[19]!==m||e[20]!==i?(b=s.jsx(y.Provider,{children:s.jsx(Z,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[i,x,m]})})}),e[18]=x,e[19]=m,e[20]=i,e[21]=b):b=e[21],b}function ke(e){const{onClose:t}=e;return s.jsx(ye,{onClose:t})}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,Ze as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as N,j as r,r as S}from"./index-
|
|
1
|
+
import{c as v,l as N,j as r,r as S}from"./index-B7RYP3NN.js";import{C as w}from"./card-Cqi1WoGg.js";import{i as E}from"./ArrowUpRight-CZ2AKZeb.js";function I(c){const e=v.c(12),{title:i,description:l,docsHref:t,actions:s,className:n,headerClassName:a,children:d}=c;let m;e[0]!==n?(m=N("flex flex-col gap-3",n),e[0]=n,e[1]=m):m=e[1];let f;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==a||e[6]!==i?(f=(i||l||t||s)&&r.jsxs("div",{className:N("flex items-center justify-between gap-3 px-4",a),children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=a,e[6]=i,e[7]=f):f=e[7];let o;return e[8]!==d||e[9]!==m||e[10]!==f?(o=r.jsxs("section",{className:m,children:[f,d]}),e[8]=d,e[9]=m,e[10]=f,e[11]=o):o=e[11],o}function P(c){const e=v.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const d=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=N("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=d.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let a;return e[7]!==t||e[8]!==s||e[9]!==n?(a=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=a):a=e[10],a}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=v.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:a,children:d}=c,m=d?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",f=n&&"hover:bg-muted/50 cursor-pointer";let o;e[0]!==a||e[1]!==m||e[2]!==f?(o=N(m,f,a),e[0]=a,e[1]=m,e[2]=f,e[3]=o):o=e[3];const b=n?"button":void 0,C=n?0:void 0;let x;e[4]!==n?(x=n?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,d]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==o||e[22]!==b||e[23]!==C||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:o,onClick:n,role:b,tabIndex:C,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=o,e[22]=b,e[23]=C,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=v.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=N("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=v.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=N("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,K as c,H as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as f,j as i,dr as N,cC as y,bT as S,ds as v,cD as C,dt as $,cE as w}from"./index-
|
|
1
|
+
import{c as n,l as f,j as i,dr as N,cC as y,bT as S,ds as v,cD as C,dt as $,cE as w}from"./index-B7RYP3NN.js";import{i as k}from"./X-CEw3MnyS.js";function T(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(C,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function D(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(w,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function B(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(D,{}),e[6]=m):m=e[6];const x=p==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",b=p==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs($,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function O(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{P as S,_ as a,O as b,B as c,T as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b2 as S,r as d,b3 as b,b4 as h,c as f,j as c}from"./index-
|
|
1
|
+
import{b2 as S,r as d,b3 as b,b4 as h,c as f,j as c}from"./index-B7RYP3NN.js";import{S as p,c as x,d as g}from"./sheet-OIW1mtkz.js";import{u as m}from"./sidebar-BvhztApl.js";import{i as j}from"./LayoutLeft-C9M-c9Be.js";import{T as R}from"./toolbar-BvpYVbA4.js";function E(t){const e=S({warn:t?.router===void 0}),r=t?.router||e,o=d.useRef(void 0);return b(r.stores.__store,s=>{if(t?.select){if(t.structuralSharing??r.options.defaultStructuralSharing){const n=h(o.current,t.select(s));return o.current=n,n}return t.select(s)}return s})}function M(){const t=f.c(3),{toggleSidebar:e}=m();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=c.jsx(j,{size:16}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=c.jsx(R,{onClick:e,"aria-label":"Toggle sidebar",children:r}),t[1]=e,t[2]=o):o=t[2],o}function y(t){const e=f.c(12),{renderSidebar:r}=t,{openMobile:o,setOpenMobile:s}=m();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=c.jsx(p,{className:"sr-only",children:"Navigation"}),e[0]=n):n=e[0];let i;e[1]!==s?(i=()=>s(!1),e[1]=s,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==i?(l=r({onClose:i}),e[3]=r,e[4]=i,e[5]=l):l=e[5];let a;e[6]!==l?(a=c.jsxs(x,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[n,l]}),e[6]=l,e[7]=a):a=e[7];let u;return e[8]!==o||e[9]!==s||e[10]!==a?(u=c.jsx(g,{open:o,onOpenChange:s,children:a}),e[8]=o,e[9]=s,e[10]=a,e[11]=u):u=e[11],u}export{y as M,M as S,E as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as k,d as Z,j as s,B as O,bX as K,t as W,ag as fe,a as B,y as Se,q as ge,K as le,bY as je,bZ as ve,L as G,r as X,b_ as ke,b$ as Ne,k as ie,b as Oe,D as _e,e as he,u as Ce,I as Ae,c0 as Te,c1 as ce,c2 as Ee,c3 as $e,S as ze,O as Me,c4 as Pe}from"./index-B7RYP3NN.js";import{A as te}from"./avatar-H5SdZkja.js";import{t as pe,a as Le}from"./Users03-DbPSsBA-.js";import{i as Ie}from"./SearchLg-BVPVQ0vp.js";import{i as Fe,s as qe,a as M,n as Re}from"./Stars02-C544vv_N.js";import{s as De}from"./XClose-uZGmvKR6.js";import{i as U}from"./CheckCircle-9bkti7Hr.js";import{i as de}from"./FilterLines-F6PgwAY_.js";import{i as H}from"./Zap-e90etD2O.js";import{d as Ue,c as Ke,a as He,e as Ge}from"./dialog-cQOZdhdQ.js";import{R as Be}from"./required-auth-layout-B5rr_mn1.js";import{g as We,c as Ye,A as Je}from"./hooks-DQp4SbPL.js";import{a as Qe,m as Ve,S as Xe}from"./use-mcp-client-CJ3hyRQl.js";import{n as Ze}from"./tab-id-BptcWVWa.js";import{c as et}from"./use-organization-settings-DjqIbP3u.js";import{u as tt}from"./use-org-sso-D6LtO0kt.js";function nt(t){const e=k.c(27),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a={mutationFn:async()=>{const b=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await b.json();if(!b.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:b=>{window.location.href=`/${b.slug??o}`},onError:ot},e[0]=o,e[1]=a):a=e[1];const l=Z(a),d=st;let c;e[2]!==i||e[3]!==n?(c=i?s.jsx(te,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(pe,{className:"h-6 w-6 text-primary"})}),e[2]=i,e[3]=n,e[4]=c):c=e[4];let m;e[5]!==n?(m=s.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=m):m=e[6];let u;e[7]!==r?(u=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",s.jsxs("strong",{children:["@",r]})," email can join this organization."]}),e[7]=r,e[8]=u):u=e[8];let p;e[9]!==m||e[10]!==u?(p=s.jsxs("div",{className:"space-y-2",children:[m,u]}),e[9]=m,e[10]=u,e[11]=p):p=e[11];let g;e[12]!==l?(g=()=>l.mutate(),e[12]=l,e[13]=g):g=e[13];const y=l.isPending?"Joining…":`Enter ${n}`;let f;e[14]!==l.isPending||e[15]!==g||e[16]!==y?(f=s.jsx(O,{onClick:g,disabled:l.isPending,children:y}),e[14]=l.isPending,e[15]=g,e[16]=y,e[17]=f):f=e[17];let h;e[18]!==l.isPending?(h=s.jsx(O,{variant:"ghost",onClick:d,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=h):h=e[19];let x;e[20]!==f||e[21]!==h?(x=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,h]}),e[20]=f,e[21]=h,e[22]=x):x=e[22];let w;return e[23]!==x||e[24]!==c||e[25]!==p?(w=s.jsxs(K,{children:[c,p,x]}),e[23]=x,e[24]=c,e[25]=p,e[26]=w):w=e[26],w}function st(){window.location.href="/"}function ot(t){W.error(t instanceof Error?t.message:"Failed to join organization")}function ue(t){const e=k.c(17),{orgSlug:n,orgName:o,reason:i}=t,r=it,a=i==="not-found",l=a?Ie:fe,d=a?"Organization not found":"No access";let c;e[0]!==a||e[1]!==o||e[2]!==n?(c=a?s.jsxs(s.Fragment,{children:["We couldn't find an organization called ",s.jsx("strong",{children:n}),"."]}):s.jsxs(s.Fragment,{children:["You don't have access to ",s.jsx("strong",{children:o??n}),".",s.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=a,e[1]=o,e[2]=n,e[3]=c):c=e[3];const m=c;let u;e[4]!==l?(u=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=u):u=e[5];let p;e[6]!==d?(p=s.jsx("h3",{className:"text-lg font-medium",children:d}),e[6]=d,e[7]=p):p=e[7];let g;e[8]!==m?(g=s.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[8]=m,e[9]=g):g=e[9];let y;e[10]!==p||e[11]!==g?(y=s.jsxs("div",{className:"space-y-2",children:[p,g]}),e[10]=p,e[11]=g,e[12]=y):y=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(O,{onClick:r,children:"Go to home"}),e[13]=f):f=e[13];let h;return e[14]!==u||e[15]!==y?(h=s.jsxs(K,{children:[u,y,f]}),e[14]=u,e[15]=y,e[16]=h):h=e[16],h}function it(){window.location.href="/"}function at(t){const e=k.c(39),{invitationId:n,orgName:o,orgSlug:i,orgLogo:r}=t;let a;e[0]!==n?(a=async()=>{const C=await B.organization.acceptInvitation({invitationId:n});if(C.error)throw new Error(C.error.message);return C.data},e[0]=n,e[1]=a):a=e[1];let l;e[2]!==i?(l=()=>{Se(),window.location.href=`/${i}`},e[2]=i,e[3]=l):l=e[3];let d;e[4]!==a||e[5]!==l?(d={mutationFn:a,onSuccess:l,onError:ct},e[4]=a,e[5]=l,e[6]=d):d=e[6];const c=Z(d);let m;e[7]!==n?(m=async()=>{const C=await B.organization.rejectInvitation({invitationId:n});if(C.error)throw new Error(C.error.message);return C.data},e[7]=n,e[8]=m):m=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=lt,e[9]=u):u=e[9];let p;e[10]!==m?(p={mutationFn:m,onSuccess:u,onError:rt},e[10]=m,e[11]=p):p=e[11];const g=Z(p),y=c.isPending||g.isPending;let f;e[12]!==r||e[13]!==o?(f=r?s.jsx(te,{url:r,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Fe,{className:"h-6 w-6 text-primary"})}),e[12]=r,e[13]=o,e[14]=f):f=e[14];let h;e[15]!==o?(h=s.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",s.jsx("strong",{children:o})]}),e[15]=o,e[16]=h):h=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=x):x=e[17];let w;e[18]!==h?(w=s.jsxs("div",{className:"space-y-2",children:[h,x]}),e[18]=h,e[19]=w):w=e[19];let b;e[20]!==c?(b=()=>c.mutate(),e[20]=c,e[21]=b):b=e[21];const v=c.isPending?"Accepting…":"Accept invitation";let N;e[22]!==y||e[23]!==b||e[24]!==v?(N=s.jsx(O,{onClick:b,disabled:y,children:v}),e[22]=y,e[23]=b,e[24]=v,e[25]=N):N=e[25];let _;e[26]!==g?(_=()=>g.mutate(),e[26]=g,e[27]=_):_=e[27];const S=g.isPending?"Declining…":"Decline";let A;e[28]!==y||e[29]!==_||e[30]!==S?(A=s.jsx(O,{variant:"ghost",onClick:_,disabled:y,children:S}),e[28]=y,e[29]=_,e[30]=S,e[31]=A):A=e[31];let T;e[32]!==N||e[33]!==A?(T=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,A]}),e[32]=N,e[33]=A,e[34]=T):T=e[34];let E;return e[35]!==w||e[36]!==T||e[37]!==f?(E=s.jsxs(K,{children:[f,w,T]}),e[35]=w,e[36]=T,e[37]=f,e[38]=E):E=e[38],E}function rt(t){W.error(t instanceof Error?t.message:"Failed to decline invitation")}function lt(){W.success("Invitation declined"),window.location.href="/"}function ct(t){W.error(t instanceof Error?t.message:"Failed to accept invitation")}function dt(t){const e=k.c(10),{orgName:n,orgLogo:o}=t;let i;e[0]!==o||e[1]!==n?(i=o?s.jsx(te,{url:o,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(qe,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=n,e[2]=i):i=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=r):r=e[3];let a;e[4]!==n?(a=s.jsxs("div",{className:"space-y-2",children:[r,s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your request to join ",s.jsx("strong",{children:n})," is waiting for an admin to approve it. You'll get access once it's approved."]})]}),e[4]=n,e[5]=a):a=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(O,{variant:"ghost",onClick:ut,children:"Go to home"}),e[6]=l):l=e[6];let d;return e[7]!==i||e[8]!==a?(d=s.jsxs(K,{children:[i,a,l]}),e[7]=i,e[8]=a,e[9]=d):d=e[9],d}function ut(){window.location.href="/"}function mt(t){const e=k.c(30),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a=async()=>{const v=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),N=await v.json();if(!v.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=o,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=ht,e[2]=l):l=e[2];let d;e[3]!==a?(d={mutationFn:a,onSuccess:l,onError:gt},e[3]=a,e[4]=d):d=e[4];const c=Z(d);let m;e[5]!==i||e[6]!==n?(m=i?s.jsx(te,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(pe,{className:"h-6 w-6 text-primary"})}),e[5]=i,e[6]=n,e[7]=m):m=e[7];let u;e[8]!==n?(u=s.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",n,"?"]}),e[8]=n,e[9]=u):u=e[9];let p;e[10]!==r?(p=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",s.jsxs("strong",{children:["@",r]})," emails before you can join."]}),e[10]=r,e[11]=p):p=e[11];let g;e[12]!==u||e[13]!==p?(g=s.jsxs("div",{className:"space-y-2",children:[u,p]}),e[12]=u,e[13]=p,e[14]=g):g=e[14];let y;e[15]!==c?(y=()=>c.mutate(),e[15]=c,e[16]=y):y=e[16];const f=c.isPending?"Requesting…":"Request to join";let h;e[17]!==c.isPending||e[18]!==y||e[19]!==f?(h=s.jsx(O,{onClick:y,disabled:c.isPending,children:f}),e[17]=c.isPending,e[18]=y,e[19]=f,e[20]=h):h=e[20];let x;e[21]!==c.isPending?(x=s.jsx(O,{variant:"ghost",onClick:ft,disabled:c.isPending,children:"Go to home"}),e[21]=c.isPending,e[22]=x):x=e[22];let w;e[23]!==h||e[24]!==x?(w=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,x]}),e[23]=h,e[24]=x,e[25]=w):w=e[25];let b;return e[26]!==w||e[27]!==m||e[28]!==g?(b=s.jsxs(K,{children:[m,g,w]}),e[26]=w,e[27]=m,e[28]=g,e[29]=b):b=e[29],b}function ft(){window.location.href="/"}function gt(t){W.error(t instanceof Error?t.message:"Failed to request access")}function ht(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function pt(t){const e=k.c(7);let n;e[0]!==t?(n=le.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let o;e[2]!==t?(o=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=o):o=e[3];let i;return e[4]!==n||e[5]!==o?(i={queryKey:n,queryFn:o,refetchOnWindowFocus:!1},e[4]=n,e[5]=o,e[6]=i):i=e[6],ge(i)}function yt({orgSlug:t}){const{data:e}=pt(t);if(e.status!=="member"){je()?.org===t&&ve();const n=localStorage.getItem(G.lastOrgSlug())===t;if(n&&localStorage.removeItem(G.lastOrgSlug()),n&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?s.jsx(ue,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?s.jsx(at,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?s.jsx(nt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?s.jsx(mt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?s.jsx(dt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):s.jsx(ue,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function xt(t){const e=k.c(20),{release:n,onCtaClick:o,onLearnMoreClick:i}=t;let r;e[0]!==n.eyebrow?(r=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=r):r=e[1];let a;e[2]!==n.title?(a=s.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=a):a=e[3];let l;e[4]!==r||e[5]!==a?(l=s.jsxs("div",{children:[r,a]}),e[4]=r,e[5]=a,e[6]=l):l=e[6];let d;e[7]!==n.bullets?(d=n.bullets.map(bt),e[7]=n.bullets,e[8]=d):d=e[8];let c;e[9]!==d?(c=s.jsx("ul",{className:"flex flex-col gap-3",children:d}),e[9]=d,e[10]=c):c=e[10];let m;e[11]!==o||e[12]!==i||e[13]!==n.cta||e[14]!==n.learnMoreHref?(m=(n.cta||n.learnMoreHref)&&s.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?s.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):s.jsx("span",{}),n.cta&&s.jsx(O,{asChild:!0,size:"sm",onClick:o,children:s.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=o,e[12]=i,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=m):m=e[15];let u;return e[16]!==l||e[17]!==c||e[18]!==m?(u=s.jsxs("div",{className:"flex flex-col gap-3",children:[l,c,m]}),e[16]=l,e[17]=c,e[18]=m,e[19]=u):u=e[19],u}function bt(t,e){return s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const ye=[{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:M,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:U,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:H,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:U,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:M,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:H,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:M,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:U,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:H,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:M,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:U,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:H,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:M,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:de,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:U,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:Le,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:H,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:U,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:M,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:de,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:M,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:Re,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ee="studio.release-feed.v1",ae=new Set;let L="",I={},re=!1;function wt(){if(re)return L||"{}";try{return localStorage.getItem(ee)??"{}"}catch{return L||"{}"}}function xe(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function me(){const t=wt();return t!==L&&(L=t,I=xe(t)),I}function St(t){ae.add(t);const e=n=>{if(!(n.key!==ee&&n.key!==null)){try{const o=localStorage.getItem(ee)??"{}",r={...xe(o),...I};I=r,L=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{ae.delete(t),window.removeEventListener("storage",e)}}function jt(t){I=t,L=JSON.stringify(t);try{localStorage.setItem(ee,L),re=!1}catch{re=!0}ae.forEach(e=>e())}function vt(){const t=k.c(7),e=X.useSyncExternalStore(St,me,me);let n;t[0]!==e?(n=d=>!!e[d],t[0]=e,t[1]=n):n=t[1];const o=n,i=kt;let r;t[2]!==e?(r=ye.reduce((d,c)=>e[c.id]?d:d+1,0),t[2]=e,t[3]=r):r=t[3];const a=r;let l;return t[4]!==o||t[5]!==a?(l={isSeen:o,markSeen:i,unseenCount:a},t[4]=o,t[5]=a,t[6]=l):l=t[6],l}function kt(t){I[t]||jt({...I,[t]:{seenAt:new Date().toISOString()}})}const Nt=720*60*60*1e3,Ot=10080*60*1e3;function _t(t){const[e,n,o]=t.split("-").map(Number);return!e||!n||!o?new Date(t).getTime():new Date(e,n-1,o).getTime()}function Ct(t){const e=ye[0];if(!e)return null;const n=_t(e.date),o=t-n;return o<0||o>Nt?null:e}function At(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Tt(t,e){const n=At(t);return n===null?!1:e-n>=Ot}function Et(){const t=k.c(22),{data:e}=B.useSession(),{isSeen:n,markSeen:o}=vt();let i,r,a;if(t[0]!==n||t[1]!==e?.user?.createdAt){a=Symbol.for("react.early_return_sentinel");e:{const y=Date.now();if(i=Ct(y),!i){a=null;break e}if(!Tt(e?.user?.createdAt,y)){a=null;break e}r=n(i.id)}t[0]=n,t[1]=e?.user?.createdAt,t[2]=i,t[3]=r,t[4]=a}else i=t[2],r=t[3],a=t[4];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let l;t[5]!==i.id||t[6]!==o?(l=()=>o(i.id),t[5]=i.id,t[6]=o,t[7]=l):l=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(De,{size:14}),t[8]=d):d=t[8];let c;t[9]!==l?(c=s.jsx(O,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-1.5 top-1.5 size-7 text-muted-foreground",onClick:l,children:d}),t[9]=l,t[10]=c):c=t[10];let m,u;t[11]!==i.id||t[12]!==o?(m=()=>o(i.id),u=()=>o(i.id),t[11]=i.id,t[12]=o,t[13]=m,t[14]=u):(m=t[13],u=t[14]);let p;t[15]!==i||t[16]!==m||t[17]!==u?(p=s.jsx(xt,{release:i,onCtaClick:m,onLearnMoreClick:u}),t[15]=i,t[16]=m,t[17]=u,t[18]=p):p=t[18];let g;return t[19]!==c||t[20]!==p?(g=s.jsxs("div",{role:"region","aria-label":"Release announcement",className:"relative rounded-lg border border-border bg-background p-3 shadow-sm",children:[c,p]}),t[19]=c,t[20]=p,t[21]=g):g=t[21],g}const be=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),P=be?"⌘":"Ctrl",z={keyboardShortcuts:{keys:[P,"K"],description:"Keyboard shortcuts"},focusChatInput:{keys:[P,"L"],description:"Focus chat input"},saveAndFormat:{keys:[P,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[P,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[P,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",P,"S"],description:"New task"},toggleDaemon:{keys:[P,"D"],description:"Toggle daemon logs"}},$t=[{label:"General",shortcuts:[z.keyboardShortcuts,z.newTask,z.toggleDaemon]},{label:"Editor",shortcuts:[z.saveAndFormat]},{label:"Chat",shortcuts:[z.focusChatInput,z.togglePlanMode,z.sendMessage,z.newLine]},{label:"Questions",shortcuts:[z.selectOption]},{label:"Monitoring",shortcuts:[z.applyFilter]}];function zt(t){return be?t.metaKey:t.ctrlKey}function Mt(t){const e=k.c(5),{open:n,onOpenChange:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ke,{children:s.jsx(He,{children:"Keyboard Shortcuts"})}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(Ue,{className:"sm:max-w-md",children:[i,s.jsx("div",{className:"flex flex-col gap-4",children:$t.map(Pt)})]}),e[1]=r):r=e[1];let a;return e[2]!==o||e[3]!==n?(a=s.jsx(Ge,{open:n,onOpenChange:o,children:r}),e[2]=o,e[3]=n,e[4]=a):a=e[4],a}function Pt(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Lt)})]},t.label)}function Lt(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(It)})]},t.description)}function It(t){return s.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}function Ft({activeOrg:t}){return t&&(ke(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ne()),null}function qt(t,e,n){if(!n)return null;const o=We(t,e);return o?o.threads.get().find(r=>r.id===n)?.branch??null:null}function we(t){return{queryKey:le.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function un(t){const e=k.c(10);let n;e[0]!==t?(n=we(t),e[0]=t,e[1]=n):n=e[1];const o=ie(n);let i;e[2]!==o.data?.prompts?(i=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=i):i=e[3];let r;e[4]!==o.data?.tiles?(r=o.data?.tiles??[],e[4]=o.data?.tiles,e[5]=r):r=e[5];let a;return e[6]!==o.isLoading||e[7]!==i||e[8]!==r?(a={isLoading:o.isLoading,prompts:i,tiles:r},e[6]=o.isLoading,e[7]=i,e[8]=r,e[9]=a):a=e[9],a}function Rt(t){const e=k.c(17),{orgSlug:n,orgName:o,domain:i}=t;let r;e[0]!==n?(r=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=r):r=e[1];const a=r,l=Dt;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(fe,{className:"h-6 w-6 text-primary"})}),e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=c):c=e[3];let m;e[4]!==i||e[5]!==o?(m=o?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:o})," requires SSO authentication",i?` via ${i}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=i,e[5]=o,e[6]=m):m=e[6];let u;e[7]!==m?(u=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx("p",{className:"text-sm text-muted-foreground",children:m})]}),e[7]=m,e[8]=u):u=e[8];let p;e[9]!==a?(p=s.jsx(O,{onClick:a,children:"Sign in with SSO"}),e[9]=a,e[10]=p):p=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(O,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=g):g=e[11];let y;e[12]!==p?(y=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,g]}),e[12]=p,e[13]=y):y=e[13];let f;return e[14]!==u||e[15]!==y?(f=s.jsxs(K,{children:[d,u,y]}),e[14]=u,e[15]=y,e[16]=f):f=e[16],f}function Dt(){window.location.href="/"}function Ut(t){const e=k.c(8),{org:n,children:o}=t,r=et(n.id,n.slug)?.enabled_plugins??null;let a;e[0]!==n.id||e[1]!==n.name||e[2]!==r?(a={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:r,ui:null},e[0]=n.id,e[1]=n.name,e[2]=r,e[3]=a):a=e[3];const l=a;let d;return e[4]!==o||e[5]!==n||e[6]!==l?(d=s.jsx(Pe,{org:n,project:l,children:o}),e[4]=o,e[5]=n,e[6]=l,e[7]=d):d=e[7],d}function Kt(){const t=Oe(),e=Ye(),{org:n,locator:o}=_e(),i=he({strict:!1}),r=Ce({strict:!1}),a=i.org??"",l=i.taskId??"",d=(f,h,x=!0)=>t({to:"/$org/$taskId",params:{org:a,taskId:f},search:h,replace:x}),c=(f,h=!0)=>d(l,f,h),m=f=>c(h=>({...h,chat:f?1:0})),u=(f,h,x)=>d(f,w=>{const b={chat:1};if(h?b.virtualmcpid=h:w.virtualmcpid&&(b.virtualmcpid=w.virtualmcpid),x?.main)b.main=x.main;else{const v=w.main;v&&typeof v=="string"&&!Ze(v)&&(b.main=v)}return x?.autosend&&(b.autosend=Je),b},!1);return{setChatOpen:m,setTaskId:u,createNewTask:async f=>{const h=crypto.randomUUID(),x=f??r.virtualmcpid??Qe(n.id).id,b=x===r.virtualmcpid?qt(n.slug,o,l):null;try{await e?.create({id:h,virtual_mcp_id:x,...b?{branch:b}:{}})}catch{}u(h,x)},openTab:f=>d(l||crypto.randomUUID(),h=>({...h,main:f})),toggleMain:()=>c(f=>{if(f.main!==void 0&&f.main!=="0")return{...f,main:"0"};const x={...f};return delete x.main,x})}}function Ht(){const t=k.c(51);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const o=Ae(e)?.params.org;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[1]=i):i=t[1];const{taskId:r}=he(i),[a,l]=X.useState(!1),d=o??"";let c;t[2]!==d?(c=we(d),t[2]=d,t[3]=c):c=t[3];const m=!!o&&!r;let u;t[4]!==c||t[5]!==m?(u={...c,enabled:m},t[4]=c,t[5]=m,t[6]=u):u=t[6],ie(u);const{data:p}=B.useSession(),g=p?.user?.id;let y;t[7]!==o||t[8]!==g?(y=o&&g?Te(g,o):null,t[7]=o,t[8]=g,t[9]=y):y=t[9];const f=y;let h,x;t[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const j=$=>{zt($)&&$.code==="KeyK"&&($.preventDefault(),l(!0))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},x=[],t[10]=h,t[11]=x):(h=t[10],x=t[11]),X.useEffect(h,x);let w;t[12]!==o?(w=le.activeOrganization(o),t[12]=o,t[13]=w):w=t[13];let b;t[14]!==o||t[15]!==g?(b=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await B.organization.getFullOrganization({query:{organizationSlug:o}}).finally(Gt),$=ce(j);return j&&!$&&localStorage.setItem(G.lastOrgSlug(),o),g&&j&&$e(g,o,j),j},t[14]=o,t[15]=g,t[16]=b):b=t[16];const v=f?f.data:void 0,N=f?.updatedAt;let _;t[17]!==b||t[18]!==v||t[19]!==N||t[20]!==w?(_={queryKey:w,queryFn:b,initialData:v,initialDataUpdatedAt:N,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=b,t[18]=v,t[19]=N,t[20]=w,t[21]=_):_=t[21];const{data:S}=ge(_),A=S?.id,T=S?.slug,{data:E}=tt(A,T),C=A??"",ne=T??"";let F;t[22]!==C||t[23]!==ne?(F=Ve({connectionId:Xe,orgId:C,orgSlug:ne}),t[22]=C,t[23]=ne,t[24]=F):F=t[24];const se=!!A&&!!T;let Y;if(t[25]!==F||t[26]!==se?(Y={...F,enabled:se},t[25]=F,t[26]=se,t[27]=Y):Y=t[27],ie(Y),!S){let j;t[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ze,{}),t[28]=j):j=t[28];let $;return t[29]!==o?($=s.jsx(X.Suspense,{fallback:j,children:s.jsx(yt,{orgSlug:o})}),t[29]=o,t[30]=$):$=t[30],$}if(ce(S)){localStorage.getItem(G.lastOrgSlug())===o&&localStorage.removeItem(G.lastOrgSlug());let j;return t[31]!==S.name?(j=s.jsx(Ee,{orgName:S.name}),t[31]=S.name,t[32]=j):j=t[32],j}if(E?.ssoRequired&&!E.authenticated){let j;return t[33]!==S.id||t[34]!==S.name||t[35]!==S.slug||t[36]!==E.domain?(j=s.jsx(Rt,{orgId:S.id,orgSlug:S.slug,orgName:S.name,domain:E.domain}),t[33]=S.id,t[34]=S.name,t[35]=S.slug,t[36]=E.domain,t[37]=j):j=t[37],j}const oe=S.logo??null;let q;t[38]!==S||t[39]!==oe?(q={...S,logo:oe},t[38]=S,t[39]=oe,t[40]=q):q=t[40];let R;t[41]!==S?(R=s.jsx(Ft,{activeOrg:S}),t[41]=S,t[42]=R):R=t[42];let J,Q;t[43]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(Me,{}),Q=s.jsx(Et,{}),t[43]=J,t[44]=Q):(J=t[43],Q=t[44]);let D;t[45]!==a?(D=s.jsx(Mt,{open:a,onOpenChange:l}),t[45]=a,t[46]=D):D=t[46];let V;return t[47]!==q||t[48]!==R||t[49]!==D?(V=s.jsxs(Ut,{org:q,children:[R,J,Q,D]}),t[47]=q,t[48]=R,t[49]=D,t[50]=V):V=t[50],V}function Gt(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Bt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Be,{children:s.jsx(Ht,{})}),t[0]=e):e=t[0],e}const mn=Object.freeze(Object.defineProperty({__proto__:null,default:Bt,usePanelActions:Kt},Symbol.toStringTag,{value:"Module"}));export{z as K,ye as R,xt as a,Kt as b,un as c,we as h,zt as i,qt as r,mn as s,vt as u};
|
package/dist/client/assets/{shell-route-loading-DEz3O8bT.js → shell-route-loading-DnJymbcA.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,j as s,i as l}from"./index-
|
|
1
|
+
import{c as i,j as s,i as l}from"./index-B7RYP3NN.js";function n(){const t=i.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{"data-testid":"shell-route-loading",className:"absolute inset-0 h-full w-full flex items-center justify-center",children:s.jsx(l,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}export{n as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,l as w,j as r,r as T,bg as A,bF as H,B as P}from"./index-hp1Wb5d8.js";import{i as R}from"./LayoutLeft-BsA_ZgtZ.js";import{u as V}from"./use-mobile-B9nTCS2O.js";import{d as W,b as F,S as G,a as L,c as q}from"./sheet-CVKgycLo.js";import{c as D,b as B,a as E,T as z}from"./tooltip-CVra7O3Y.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ie(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function le(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function re(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(F,{className:"sr-only",children:[r.jsx(G,{children:"Sidebar"}),r.jsx(L,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(q,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function ne(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function xe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function he(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{xe as S,he as a,pe as b,be as c,me as d,fe as e,ue as f,re as g,de as h,ce as i,oe as j,le as k,ie as l,ne as m,O as u};
|
|
1
|
+
import{c as S,l as w,j as r,r as T,bg as A,bF as H,B as P}from"./index-B7RYP3NN.js";import{i as R}from"./LayoutLeft-C9M-c9Be.js";import{u as V}from"./use-mobile-CIn4xg0a.js";import{d as W,b as F,S as G,a as L,c as q}from"./sheet-OIW1mtkz.js";import{c as D,b as B,a as E,T as z}from"./tooltip-eREMpTVZ.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ie(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function le(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function re(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(F,{className:"sr-only",children:[r.jsx(G,{children:"Sidebar"}),r.jsx(L,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(q,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function ne(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function xe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function he(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{xe as S,he as a,pe as b,be as c,me as d,fe as e,ue as f,re as g,de as h,ce as i,oe as j,le as k,ie as l,ne as m,O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as c,j as i}from"./index-
|
|
1
|
+
import{c as n,l as c,j as i}from"./index-B7RYP3NN.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{D as Lt,a as Tn,z as pr,p as vr,n as mr,j as i,B as Ye,t as Le,r as u,m as br,b as xr,i as It,v as J,K as ht,c as yr,C as wr,L as Cr,l as Sr,k as Dr,ah as z,aQ as ft}from"./index-hp1Wb5d8.js";import{g as jr}from"./connection-slug-eyAPH6o3.js";import{u as _n,a as kn,g as Rr,C as Ut}from"./connection-card-BkromfLa.js";import{C as Nr}from"./collection-search-CcLsuH4x.js";import{C as Ir}from"./collection-tabs-DjkVdPcE.js";import{a as Ar,b as Er,e as Tr,g as _r}from"./extract-connection-data-BuaSlKBa.js";import{e as Mn,d as On,c as Pn,a as Ln,b as kr,D as Mr}from"./dialog-Dbfe-eb6.js";import{D as Or,a as Pr,c as Lr,b as Fr,d as zr,e as Br,f as $r}from"./drawer-BfVwYC6W.js";import{u as Vr}from"./use-mobile-B9nTCS2O.js";import{F as De,b as je,c as Re,d as Ne,e as Ie,a as fn}from"./form-F1WLAqV1.js";import{I as He}from"./input-C6WjLnBW.js";import{d as Kr,b as Xr,c as Ur,S as Hr,a as ut}from"./select-C1Co9wRd.js";import{T as Yr}from"./textarea-DaioptAD.js";import{b as Fn}from"./use-connection-DemZRmxG.js";import{n as At,c as Ht}from"./XCircle-toiw2T46.js";import{s as Yt}from"./Star01-piUVzWuz.js";import{a9 as Wr}from"./agent-icon-CKRYiZxq.js";import{s as qr}from"./XClose-BChQARPj.js";import{c as Gr,i as Dt,a as hn,E as Jr,p as Qr,b as Zr,d as eo}from"./connection-form-helpers-CJhOmhW1.js";import{u as gn}from"./use-infinite-scroll-YksyijYK.js";import{a as Wt}from"./authenticate-and-persist-oauth-RSVXQnzM.js";import{B as jt}from"./badge-B81PpMGy.js";import{T as qt,a as Gt,b as Jt}from"./tooltip-CVra7O3Y.js";import{u as to}from"./useSuspenseInfiniteQuery-CNwX-D2H.js";import{S as no,u as ro}from"./use-mcp-client-CWK8x43B.js";import{i as pn}from"./ChevronUp-B0OADioi.js";import{s as oo}from"./Plus-5rp1_RR5.js";import{u as so}from"./studio-tools-DcYtvtOD.js";import{u as io}from"./use-ai-providers-DyY2tyZC.js";function sn(t){const e=t?.metadata?.githubRepo;if(!e?.url)return{status:"none"};const n=e.connectionId;return!!n&&!!t?.connections?.some(s=>s.connection_id===n)?{status:"attached",repo:e,connectionId:n}:!!n||e.installationId!=null?{status:"detached",repo:e}:{status:"public-clone",repo:e}}function ki(t){const e=sn(t);return e.status==="attached"||e.status==="public-clone"?e.repo:null}function Mi(t){if(typeof t!="object"||t===null)return!1;const n=t.githubRepo?.url;return typeof n=="string"&&n.length>0}function Oi(t){return sn(t).status==="attached"}function Pi(t){const e=sn(t).status;return e==="attached"||e==="detached"}function Li(t){const e=new Set;for(const n of t??[]){const r=n.metadata?.liveAgentId;typeof r=="string"&&r&&e.add(n.id)}return e}function Fi(t){const e=new Map,n=new Map;for(const r of t??[]){const o=r.metadata?.liveAgentId;typeof o=="string"&&o&&(n.set(r.id,o),e.set(o,r.id))}return{liveToDev:e,devToLive:n}}function zi(t,e){if(!t)return null;const n=t.metadata?.liveAgentId;if(typeof n=="string"&&n)return{mode:"dev",targetId:n};const r=(e??[]).find(o=>o.metadata?.liveAgentId===t.id);return r?{mode:"live",targetId:r.id}:null}function Bi(t){return t.online?t.capabilities.includes("claude-code")||t.capabilities.includes("codex"):!1}function ao({open:t,onOpenChange:e,onCreated:n}){const{org:r}=Lt(),{data:o}=Tn.useSession(),{stdioEnabled:s}=pr(),a=Vr(),c=Fn(),l=_n(),h=kn(l,"").items,d=vr({resolver:mr(Gr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),m=d.watch("connection_url"),N=d.watch("npx_package"),x=Dt({uiType:g,connectionUrl:m??"",npxPackage:N??""})??hn({uiType:g,connectionUrl:m??"",registryItems:h}),v=p=>{const y=p.trim();if(!y)return;const b=!!d.formState.dirtyFields.title,w=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,O=E=>{if(E&&(!b&&!d.getValues("title").trim()&&E.title&&d.setValue("title",E.title,{shouldDirty:!1}),!w&&!(d.getValues("description")??"").trim()&&E.description&&d.setValue("description",E.description,{shouldDirty:!1}),!I&&E.envVarKeys?.length)){const B=d.getValues("env_vars")??[],ae=new Set(B.map(Y=>Y.key)),K=E.envVarKeys.filter(Y=>!ae.has(Y));K.length>0&&d.setValue("env_vars",[...B,...K.map(Y=>({key:Y,value:""}))],{shouldDirty:!0})}},k=Qr(y);if(k&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",k.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),O(Dt({uiType:"NPX",npxPackage:k.packageName}));return}if(y.startsWith("http://")||y.startsWith("https://")){const E=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",E,{shouldDirty:!0}),d.setValue("connection_url",y,{shouldDirty:!0}),O(Dt({uiType:E,connectionUrl:y})??hn({uiType:E,connectionUrl:y,registryItems:h}));return}g==="NPX"&&O(Dt({uiType:"NPX",npxPackage:y}))},j=p=>{p||d.reset(),e(p)},C=async p=>{let y,b=null,w=null,I=null;p.ui_type==="NPX"?(y="STDIO",b="",I=Zr(p.npx_package||"",p.env_vars||[])):p.ui_type==="STDIO"?(y="STDIO",b="",I=eo(p.stdio_command||"",p.stdio_args||"",p.stdio_cwd,p.env_vars||[])):(y=p.ui_type,b=p.connection_url||"",w=p.connection_token||null);const O=Ar("conn");try{await c.create.mutateAsync({id:O,title:p.title,description:p.description||null,connection_type:y,connection_url:b,connection_token:w,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:p.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(O)}catch{Le.error("Failed to create connection")}},S="Create Connection",R="Create a custom connection in your organization. Fill in the details below.",T=d.formState.isSubmitting?"Saving...":"Create Connection",A=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Type *"}),i.jsxs(Kr,{value:p.value,onValueChange:p.onChange,children:[i.jsx(Ne,{children:i.jsx(Xr,{children:i.jsx(Ur,{})})}),i.jsxs(Hr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(At,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wr,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),g==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"@perplexity-ai/mcp-server",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("npx_package",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),g==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"node, bun, python...",...p,value:p.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"arg1 arg2 --flag value",...p,value:p.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"/path/to/project (optional)",...p,value:p.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(g==="NPX"||g==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Jr,{value:p.value??[],onChange:p.onChange})}),i.jsx(Ie,{})]})}),g!=="NPX"&&g!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"https://example.com/mcp",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("connection_url",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(He,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...p,value:p.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"My Connection",...p})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Yr,{placeholder:"A brief description of this connection",rows:3,...p,value:p.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(Or,{open:t,onOpenChange:j,children:i.jsxs(Pr,{className:"max-h-[90vh]",children:[i.jsx(Lr,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Fr,{children:S}),i.jsx(zr,{className:"mt-1",children:R})]}),i.jsx(Br,{asChild:!0,children:i.jsx(Ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(qr,{size:16})})})]})}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:A}),i.jsx($r,{children:i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:T})})]})})]})}):i.jsx(Mn,{open:t,onOpenChange:j,children:i.jsxs(On,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:S}),i.jsx(kr,{children:R})]}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"py-4",children:A}),i.jsxs(Mr,{children:[i.jsx(Ye,{type:"button",variant:"outline",onClick:()=>j(!1),children:"Cancel"}),i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:T})]})]})})]})})}function co(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:g}=t,m=n===void 0?"add":n,N=g===void 0?"connected":g,{org:x}=Lt(),v=u.useDeferredValue(f),j=f!==v,C=v.trim().toLowerCase();let S;e[0]!==N?(S=D=>D??N,e[0]=N,e[1]=S):S=e[1];const[R,T]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),S);let A;e[2]!==R||e[3]!==T?(A=D=>{D!==R&&J("connections_dialog_tab_changed",{to_tab:D}),T(D)},e[2]=R,e[3]=T,e[4]=A):A=e[4];const p=A;let y;e[5]!==x.id||e[6]!==x.slug?(y={connectionId:no,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=y):y=e[7];const b=ro(y);let w,I,O;if(e[8]!==b||e[9]!==v||e[10]!==x.id){O=v?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:v.trim()},{field:["description"],operator:"contains",value:v.trim()}]}:void 0;const D={...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},P=JSON.stringify(D);I=to,w=ht.collectionListInfinite(b,x.id,"","CONNECTIONS",P),e[8]=b,e[9]=v,e[10]=x.id,e[11]=w,e[12]=I,e[13]=O}else w=e[11],I=e[12],O=e[13];let k;e[14]!==b||e[15]!==O?(k=async D=>{const{pageParam:P}=D,de=P===void 0?0:P;return(await b.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=b,e[15]=O,e[16]=k):k=e[16];let E;e[17]!==w||e[18]!==k?(E={queryKey:w,queryFn:k,initialPageParam:0,getNextPageParam:po,staleTime:3e4},e[17]=w,e[18]=k,e[19]=E):E=e[19];const{data:B,fetchNextPage:ae,hasNextPage:K,isFetchingNextPage:Y}=I(E),ce=B?.pages.flatMap(go)??[],xe=Rr(ce),qe=new Set(ce.filter(ho).map(fo)),$=_n(),U=kn($,v),he=gn(U.loadMore,U.hasMore,U.isLoadingMore),Ae=gn(ae,K??!1,Y),L=R==="all"||!!C,Ue=L?U.items.filter(D=>{const P=Er(D);if(P&&qe.has(P))return!1;if(!C)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(C)}):[],Z=Ue.filter(uo),W=Ue.filter(lo);let M;e[20]!==o?(M=D=>D.some(P=>o.has(P.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let q;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==m||e[27]!==s||e[28]!==d||e[29]!==a?(q=(D,P,de,ze,ve)=>{const Ze=Ee(ve),Be=ve.find(F=>!o.has(F.id)),te=ve[0];if(m==="browse"){const F=jr(te);return i.jsx(Ut,{connection:{title:P,icon:de,description:ve.length>1?`${ve.length} instances`:ze??void 0},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(jt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Connected"]}),onClick:()=>{J("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:ve.length}),d?.(F)}},D)}return i.jsx(Ut,{connection:{title:P,icon:de,description:ze},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(jt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Added"]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),Be?(J("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:Be.id}),r&&J("agent_connection_attached",{agent_id:r,connection_id:Be.id,app_name:te.app_name??null,mode:"existing"}),s(Be.id)):(J("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=m,e[27]=s,e[28]=d,e[29]=a,e[30]=q):q=e[30];const ge=q;let ee;e[31]!==l||e[32]!==m||e[33]!==c?(ee=D=>{const P=D._meta?.["mcp.mesh"],de=P?.friendlyName||P?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ze=D.server?.description||D.description||null,ve=D.server?.icons?.[0]?.src||_r(D.server?.repository)||null,Ze=P?.official===!0,Be=P?.verified===!0,te=P?.owner==="deco";return i.jsx(Ut,{connection:{title:de,description:ze,icon:ve},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Jt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx(jt,{variant:"outline",size:"icon",children:i.jsx(Ht,{})})}),i.jsx(Jt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&Be&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx(jt,{variant:"outline",size:"icon",children:i.jsx(Ht,{})})}),i.jsx(Jt,{children:"Verified by the Deco team"})]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),J("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:P?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(It,{size:14,className:"animate-spin"}):m==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=m,e[33]=c,e[34]=ee):ee=e[34];const Te=ee,ye=!C&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Ir,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:R,onTabChange:D=>p(D)}),i.jsxs(Ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{J("connections_dialog_custom_clicked"),h()},children:[i.jsx(oo,{size:12}),"Custom Connection"]})]}),Ge=j&&"opacity-50 pointer-events-none";let _e;e[35]!==Ge?(_e=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=_e):_e=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ne;e[37]!==ge?(ne=D=>{if(D.type==="group")return ge(D.key,D.title,D.icon,null,D.connections);const P=D.connection;return ge(P.id,P.title,P.icon,P.description??null,[P])},e[37]=ge,e[38]=ne):ne=e[38];const Fe=xe.map(ne);let pe;e[39]!==Ae?(pe=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=pe):pe=e[40];let ke;e[41]!==Y?(ke=Y&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=Y,e[42]=ke):ke=e[42];const Je=L&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Ht,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=L&&Z.map(Te),at=L&&W.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=L&&W.map(Te);let re;e[43]!==he||e[44]!==$||e[45]!==L?(re=L&&$.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=$,e[45]=L,e[46]=re):re=e[46];let le;e[47]!==U.isLoadingMore||e[48]!==L?(le=L&&U.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=U.isLoadingMore,e[48]=L,e[49]=le):le=e[49];let Me;e[50]!==Fe||e[51]!==pe||e[52]!==ke||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==re||e[58]!==le?(Me=i.jsxs("div",{className:st,children:[Fe,pe,ke,Je,it,at,we,re,le]}),e[50]=Fe,e[51]=pe,e[52]=ke,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=re,e[58]=le,e[59]=Me):Me=e[59];let G;e[60]!==R||e[61]!==xe.length||e[62]!==W||e[63]!==f||e[64]!==Z?(G=xe.length===0&&Z.length===0&&W.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:R==="connected"?"No connections yet":"No connections available"}),e[60]=R,e[61]=xe.length,e[62]=W,e[63]=f,e[64]=Z,e[65]=G):G=e[65];let Oe;e[66]!==_e||e[67]!==Me||e[68]!==G?(Oe=i.jsxs("div",{className:_e,children:[Me,G]}),e[66]=_e,e[67]=Me,e[68]=G,e[69]=Oe):Oe=e[69];let Qe;return e[70]!==ye||e[71]!==Oe?(Qe=i.jsxs(i.Fragment,{children:[ye,Oe]}),e[70]=ye,e[71]=Oe,e[72]=Qe):Qe=e[72],Qe}function lo(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function uo(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function fo(t){return t.app_name}function ho(t){return t.app_name}function go(t){return t?.items??[]}function po(t,e){if(t?.hasMore)return e.reduce(vo,0)}function vo(t,e){return t+(e?.items?.length??0)}function $i({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:b=>{},f=(b,w,I)=>{a&&J("agent_connection_attached",{agent_id:a,connection_id:b,app_name:w,mode:I})},[h,d]=u.useState(null),[g,m]=u.useState(r),[N,x]=u.useState(!1),{org:v}=Lt(),{data:j}=Tn.useSession(),C=Fn(),S=br(),R=xr(),T=b=>{e(!1),R({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:b}})},A=()=>{S.invalidateQueries({predicate:b=>{const w=b.queryKey;return w[1]===v.id&&w[3]==="collection"&&w[4]==="CONNECTIONS"}})},p=async b=>{d(b.app_name??b.id);try{const I=`${b.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,k=(await C.create.mutateAsync({title:I,description:b.description??null,connection_type:b.connection_type,connection_url:b.connection_url??null,connection_token:null,icon:b.icon??null,app_name:b.app_name??null,app_id:b.app_id??null,connection_headers:b.connection_headers??null})).id,E=await Wt({connectionId:k,orgId:v.id,orgSlug:v.slug,persistFallback:B=>C.update.mutateAsync({id:k,data:{connection_token:B}}).then(()=>{})});if(E.ran&&!E.ok){J("connection_oauth_failed",{connection_id:k,flow:"clone",error:E.error??"no_token"}),Le.error(`Authentication failed: ${E.error??"no token received"}`),await C.delete.mutateAsync(k);return}if(E.ran){J("connection_oauth_succeeded",{connection_id:k,flow:"clone"});const B=new URL(`/api/${v.slug}/mcp/${k}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(B.href,null)}),A()}f(k,b.app_name??null,"clone"),l(k)}catch(w){console.error("Failed to add connection:",w),Le.error("Failed to add connection")}finally{d(null)}},y=async b=>{if(!(!v||!j?.user?.id)){d(b.id);try{const w=Tr(b,v.id,j.user.id,{remoteIndex:0}),I=w.connection_type==="STDIO",O=!!w.connection_url,k=I&&w.connection_headers&&typeof w.connection_headers=="object"&&"command"in w.connection_headers;if(!O&&!k){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:E}=await C.create.mutateAsync(w),B=await Wt({connectionId:E,orgId:v.id,orgSlug:v.slug,persistFallback:ae=>C.update.mutateAsync({id:E,data:{connection_token:ae}}).then(()=>{})});if(B.ran&&!B.ok){J("connection_oauth_failed",{connection_id:E,flow:"connect_new",error:B.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${B.error??"no token received"})`}),f(E,w.app_name??null,"new"),l(E);return}if(B.ran){J("connection_oauth_succeeded",{connection_id:E,flow:"connect_new"});const ae=new URL(`/api/${v.slug}/mcp/${E}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(ae.href,null)}),A(),Le.success("Connected and authenticated")}else Le.success("Connected");f(E,w.app_name??null,"new"),l(E)}catch(w){console.error("Failed to connect:",w),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(Mn,{open:t,onOpenChange:e,children:[i.jsxs(On,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Nr,{value:g,onChange:m,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(co,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:p,onConnectAndAdd:y,connectingItemId:h,search:g,onCreateConnection:()=>x(!0),onBrowseNavigate:T,defaultTab:n})})]}),i.jsx(ao,{open:N,onOpenChange:x,onCreated:async b=>{x(!1);const w=await Wt({connectionId:b,orgId:v.id,orgSlug:v.slug,persistFallback:I=>C.update.mutateAsync({id:b,data:{connection_token:I}}).then(()=>{})});if(w.ran&&!w.ok){J("connection_oauth_failed",{connection_id:b,flow:"custom_create",error:w.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),f(b,null,"custom"),l(b),e(!1);return}if(w.ran){J("connection_oauth_succeeded",{connection_id:b,flow:"custom_create"});const I=new URL(`/api/${v.slug}/mcp/${b}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(I.href,null)}),A()}f(b,null,"custom"),l(b),e(!1)}})]})}const vn=new Map;function Vi(){const{org:t}=Lt(),e=so(),n=io(),r=n.find(v=>v.providerId==="deco"),{data:o,isLoading:s,refetch:a,isFetching:c}=Dr({queryKey:ht.aiProviderCredits(t.id,"deco"),enabled:!!r,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=o?.balanceCents??null,f=l!=null?l/100:null,h=u.useRef(new Map);if(l!=null){const v=vn.get(t.id);h.current.get(t.id)&&v!=null&&l>v&&J("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-v,previous_balance_cents:v,new_balance_cents:l}),vn.set(t.id,l),h.current.set(t.id,!0)}const d=!!r,g=l!=null&&l>0,m=l!=null&&l===0,N=l!=null&&l===200,x=n.length>0&&n.every(v=>v.providerId==="deco");return{hasDecoKey:d,decoKeyId:r?.id??null,balanceCents:l,balanceDollars:f,hasCredits:g,isZeroBalance:m,isInitialFreeCredit:N,hasOnlyDecoProvider:x,isLoading:s,isFetching:c,refetch:a}}function mo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const Ft=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function an(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:an(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function cn(t){const{Document:e}=Q(t);return t instanceof e}function yt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function zn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:an(t)?cn(t)?t:yt(t)||zn(t)?t.ownerDocument:document:document:document}const me=Ft?u.useLayoutEffect:u.useEffect;function zt(t){const e=u.useRef(t);return me(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function bo(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return me(()=>{n.current!==t&&(n.current=t)},e),n}function wt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=zt(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Qt={};function Ct(t,e){return u.useMemo(()=>{if(e)return e;const n=Qt[t]==null?0:Qt[t]+1;return Qt[t]=n,t+"-"+n},[t,e])}function Bn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=Bn(1),bt=Bn(-1);function xo(t){return"clientX"in t&&"clientY"in t}function Bt(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function yo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function kt(t){if(yo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return xo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),mn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function wo(t){return t.matches(mn)?t:t.querySelector(mn)}const Co={display:"none"};function So(t){let{id:e,value:n}=t;return z.createElement("div",{id:e,style:Co},n)}function Do(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function jo(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const $n=u.createContext(null);function Ro(t){const e=u.useContext($n);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function No(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const Io={draggable:`
|
|
1
|
+
import{D as Lt,a as Tn,z as pr,p as vr,n as mr,j as i,B as Ye,t as Le,r as u,m as br,b as xr,i as It,v as J,K as ht,c as yr,C as wr,L as Cr,l as Sr,k as Dr,ah as z,aQ as ft}from"./index-B7RYP3NN.js";import{g as jr}from"./connection-slug-eyAPH6o3.js";import{u as _n,a as kn,g as Rr,C as Ut}from"./connection-card-1zfA6Muf.js";import{C as Nr}from"./collection-search-BoJazD82.js";import{C as Ir}from"./collection-tabs-C_0nyzoU.js";import{a as Ar,b as Er,e as Tr,g as _r}from"./extract-connection-data-B9W9--jM.js";import{e as Mn,d as On,c as Pn,a as Ln,b as kr,D as Mr}from"./dialog-cQOZdhdQ.js";import{D as Or,a as Pr,c as Lr,b as Fr,d as zr,e as Br,f as $r}from"./drawer-pIac4aIL.js";import{u as Vr}from"./use-mobile-CIn4xg0a.js";import{F as De,b as je,c as Re,d as Ne,e as Ie,a as fn}from"./form-BW1ReJcS.js";import{I as He}from"./input-DYt_CZpv.js";import{d as Kr,b as Xr,c as Ur,S as Hr,a as ut}from"./select-Ckjg4LQb.js";import{T as Yr}from"./textarea-C5f__Zd-.js";import{b as Fn}from"./use-connection-Bk5nhdqu.js";import{n as At,c as Ht}from"./XCircle-Dl7p705r.js";import{s as Yt}from"./Star01-mpxZIMIE.js";import{a9 as Wr}from"./agent-icon-FdWoP8GO.js";import{s as qr}from"./XClose-uZGmvKR6.js";import{c as Gr,i as Dt,a as hn,E as Jr,p as Qr,b as Zr,d as eo}from"./connection-form-helpers-vOJt52C3.js";import{u as gn}from"./use-infinite-scroll-DKJdRPXr.js";import{a as Wt}from"./authenticate-and-persist-oauth-yxoH0dvw.js";import{B as jt}from"./badge-Do_h1EED.js";import{T as qt,a as Gt,b as Jt}from"./tooltip-eREMpTVZ.js";import{u as to}from"./useSuspenseInfiniteQuery-CZufjHD-.js";import{S as no,u as ro}from"./use-mcp-client-CJ3hyRQl.js";import{i as pn}from"./ChevronUp-DfOFXIHa.js";import{s as oo}from"./Plus-zU9dAD7D.js";import{u as so}from"./studio-tools-ChQt8hNF.js";import{u as io}from"./use-ai-providers-Qtf6fKcb.js";function sn(t){const e=t?.metadata?.githubRepo;if(!e?.url)return{status:"none"};const n=e.connectionId;return!!n&&!!t?.connections?.some(s=>s.connection_id===n)?{status:"attached",repo:e,connectionId:n}:!!n||e.installationId!=null?{status:"detached",repo:e}:{status:"public-clone",repo:e}}function ki(t){const e=sn(t);return e.status==="attached"||e.status==="public-clone"?e.repo:null}function Mi(t){if(typeof t!="object"||t===null)return!1;const n=t.githubRepo?.url;return typeof n=="string"&&n.length>0}function Oi(t){return sn(t).status==="attached"}function Pi(t){const e=sn(t).status;return e==="attached"||e==="detached"}function Li(t){const e=new Set;for(const n of t??[]){const r=n.metadata?.liveAgentId;typeof r=="string"&&r&&e.add(n.id)}return e}function Fi(t){const e=new Map,n=new Map;for(const r of t??[]){const o=r.metadata?.liveAgentId;typeof o=="string"&&o&&(n.set(r.id,o),e.set(o,r.id))}return{liveToDev:e,devToLive:n}}function zi(t,e){if(!t)return null;const n=t.metadata?.liveAgentId;if(typeof n=="string"&&n)return{mode:"dev",targetId:n};const r=(e??[]).find(o=>o.metadata?.liveAgentId===t.id);return r?{mode:"live",targetId:r.id}:null}function Bi(t){return t.online?t.capabilities.includes("claude-code")||t.capabilities.includes("codex"):!1}function ao({open:t,onOpenChange:e,onCreated:n}){const{org:r}=Lt(),{data:o}=Tn.useSession(),{stdioEnabled:s}=pr(),a=Vr(),c=Fn(),l=_n(),h=kn(l,"").items,d=vr({resolver:mr(Gr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),m=d.watch("connection_url"),N=d.watch("npx_package"),x=Dt({uiType:g,connectionUrl:m??"",npxPackage:N??""})??hn({uiType:g,connectionUrl:m??"",registryItems:h}),v=p=>{const y=p.trim();if(!y)return;const b=!!d.formState.dirtyFields.title,w=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,O=E=>{if(E&&(!b&&!d.getValues("title").trim()&&E.title&&d.setValue("title",E.title,{shouldDirty:!1}),!w&&!(d.getValues("description")??"").trim()&&E.description&&d.setValue("description",E.description,{shouldDirty:!1}),!I&&E.envVarKeys?.length)){const B=d.getValues("env_vars")??[],ae=new Set(B.map(Y=>Y.key)),K=E.envVarKeys.filter(Y=>!ae.has(Y));K.length>0&&d.setValue("env_vars",[...B,...K.map(Y=>({key:Y,value:""}))],{shouldDirty:!0})}},k=Qr(y);if(k&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",k.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),O(Dt({uiType:"NPX",npxPackage:k.packageName}));return}if(y.startsWith("http://")||y.startsWith("https://")){const E=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",E,{shouldDirty:!0}),d.setValue("connection_url",y,{shouldDirty:!0}),O(Dt({uiType:E,connectionUrl:y})??hn({uiType:E,connectionUrl:y,registryItems:h}));return}g==="NPX"&&O(Dt({uiType:"NPX",npxPackage:y}))},j=p=>{p||d.reset(),e(p)},C=async p=>{let y,b=null,w=null,I=null;p.ui_type==="NPX"?(y="STDIO",b="",I=Zr(p.npx_package||"",p.env_vars||[])):p.ui_type==="STDIO"?(y="STDIO",b="",I=eo(p.stdio_command||"",p.stdio_args||"",p.stdio_cwd,p.env_vars||[])):(y=p.ui_type,b=p.connection_url||"",w=p.connection_token||null);const O=Ar("conn");try{await c.create.mutateAsync({id:O,title:p.title,description:p.description||null,connection_type:y,connection_url:b,connection_token:w,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:p.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(O)}catch{Le.error("Failed to create connection")}},S="Create Connection",R="Create a custom connection in your organization. Fill in the details below.",T=d.formState.isSubmitting?"Saving...":"Create Connection",A=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Type *"}),i.jsxs(Kr,{value:p.value,onValueChange:p.onChange,children:[i.jsx(Ne,{children:i.jsx(Xr,{children:i.jsx(Ur,{})})}),i.jsxs(Hr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(At,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wr,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),g==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"@perplexity-ai/mcp-server",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("npx_package",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),g==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"node, bun, python...",...p,value:p.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"arg1 arg2 --flag value",...p,value:p.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"/path/to/project (optional)",...p,value:p.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(g==="NPX"||g==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Jr,{value:p.value??[],onChange:p.onChange})}),i.jsx(Ie,{})]})}),g!=="NPX"&&g!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"https://example.com/mcp",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("connection_url",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(He,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...p,value:p.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"My Connection",...p})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Yr,{placeholder:"A brief description of this connection",rows:3,...p,value:p.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(Or,{open:t,onOpenChange:j,children:i.jsxs(Pr,{className:"max-h-[90vh]",children:[i.jsx(Lr,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Fr,{children:S}),i.jsx(zr,{className:"mt-1",children:R})]}),i.jsx(Br,{asChild:!0,children:i.jsx(Ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(qr,{size:16})})})]})}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:A}),i.jsx($r,{children:i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:T})})]})})]})}):i.jsx(Mn,{open:t,onOpenChange:j,children:i.jsxs(On,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:S}),i.jsx(kr,{children:R})]}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"py-4",children:A}),i.jsxs(Mr,{children:[i.jsx(Ye,{type:"button",variant:"outline",onClick:()=>j(!1),children:"Cancel"}),i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:T})]})]})})]})})}function co(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:g}=t,m=n===void 0?"add":n,N=g===void 0?"connected":g,{org:x}=Lt(),v=u.useDeferredValue(f),j=f!==v,C=v.trim().toLowerCase();let S;e[0]!==N?(S=D=>D??N,e[0]=N,e[1]=S):S=e[1];const[R,T]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),S);let A;e[2]!==R||e[3]!==T?(A=D=>{D!==R&&J("connections_dialog_tab_changed",{to_tab:D}),T(D)},e[2]=R,e[3]=T,e[4]=A):A=e[4];const p=A;let y;e[5]!==x.id||e[6]!==x.slug?(y={connectionId:no,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=y):y=e[7];const b=ro(y);let w,I,O;if(e[8]!==b||e[9]!==v||e[10]!==x.id){O=v?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:v.trim()},{field:["description"],operator:"contains",value:v.trim()}]}:void 0;const D={...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},P=JSON.stringify(D);I=to,w=ht.collectionListInfinite(b,x.id,"","CONNECTIONS",P),e[8]=b,e[9]=v,e[10]=x.id,e[11]=w,e[12]=I,e[13]=O}else w=e[11],I=e[12],O=e[13];let k;e[14]!==b||e[15]!==O?(k=async D=>{const{pageParam:P}=D,de=P===void 0?0:P;return(await b.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=b,e[15]=O,e[16]=k):k=e[16];let E;e[17]!==w||e[18]!==k?(E={queryKey:w,queryFn:k,initialPageParam:0,getNextPageParam:po,staleTime:3e4},e[17]=w,e[18]=k,e[19]=E):E=e[19];const{data:B,fetchNextPage:ae,hasNextPage:K,isFetchingNextPage:Y}=I(E),ce=B?.pages.flatMap(go)??[],xe=Rr(ce),qe=new Set(ce.filter(ho).map(fo)),$=_n(),U=kn($,v),he=gn(U.loadMore,U.hasMore,U.isLoadingMore),Ae=gn(ae,K??!1,Y),L=R==="all"||!!C,Ue=L?U.items.filter(D=>{const P=Er(D);if(P&&qe.has(P))return!1;if(!C)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(C)}):[],Z=Ue.filter(uo),W=Ue.filter(lo);let M;e[20]!==o?(M=D=>D.some(P=>o.has(P.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let q;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==m||e[27]!==s||e[28]!==d||e[29]!==a?(q=(D,P,de,ze,ve)=>{const Ze=Ee(ve),Be=ve.find(F=>!o.has(F.id)),te=ve[0];if(m==="browse"){const F=jr(te);return i.jsx(Ut,{connection:{title:P,icon:de,description:ve.length>1?`${ve.length} instances`:ze??void 0},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(jt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Connected"]}),onClick:()=>{J("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:ve.length}),d?.(F)}},D)}return i.jsx(Ut,{connection:{title:P,icon:de,description:ze},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(jt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Added"]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),Be?(J("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:Be.id}),r&&J("agent_connection_attached",{agent_id:r,connection_id:Be.id,app_name:te.app_name??null,mode:"existing"}),s(Be.id)):(J("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=m,e[27]=s,e[28]=d,e[29]=a,e[30]=q):q=e[30];const ge=q;let ee;e[31]!==l||e[32]!==m||e[33]!==c?(ee=D=>{const P=D._meta?.["mcp.mesh"],de=P?.friendlyName||P?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ze=D.server?.description||D.description||null,ve=D.server?.icons?.[0]?.src||_r(D.server?.repository)||null,Ze=P?.official===!0,Be=P?.verified===!0,te=P?.owner==="deco";return i.jsx(Ut,{connection:{title:de,description:ze,icon:ve},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Jt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx(jt,{variant:"outline",size:"icon",children:i.jsx(Ht,{})})}),i.jsx(Jt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&Be&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx(jt,{variant:"outline",size:"icon",children:i.jsx(Ht,{})})}),i.jsx(Jt,{children:"Verified by the Deco team"})]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),J("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:P?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(It,{size:14,className:"animate-spin"}):m==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=m,e[33]=c,e[34]=ee):ee=e[34];const Te=ee,ye=!C&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Ir,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:R,onTabChange:D=>p(D)}),i.jsxs(Ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{J("connections_dialog_custom_clicked"),h()},children:[i.jsx(oo,{size:12}),"Custom Connection"]})]}),Ge=j&&"opacity-50 pointer-events-none";let _e;e[35]!==Ge?(_e=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=_e):_e=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ne;e[37]!==ge?(ne=D=>{if(D.type==="group")return ge(D.key,D.title,D.icon,null,D.connections);const P=D.connection;return ge(P.id,P.title,P.icon,P.description??null,[P])},e[37]=ge,e[38]=ne):ne=e[38];const Fe=xe.map(ne);let pe;e[39]!==Ae?(pe=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=pe):pe=e[40];let ke;e[41]!==Y?(ke=Y&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=Y,e[42]=ke):ke=e[42];const Je=L&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Ht,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=L&&Z.map(Te),at=L&&W.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=L&&W.map(Te);let re;e[43]!==he||e[44]!==$||e[45]!==L?(re=L&&$.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=$,e[45]=L,e[46]=re):re=e[46];let le;e[47]!==U.isLoadingMore||e[48]!==L?(le=L&&U.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=U.isLoadingMore,e[48]=L,e[49]=le):le=e[49];let Me;e[50]!==Fe||e[51]!==pe||e[52]!==ke||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==re||e[58]!==le?(Me=i.jsxs("div",{className:st,children:[Fe,pe,ke,Je,it,at,we,re,le]}),e[50]=Fe,e[51]=pe,e[52]=ke,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=re,e[58]=le,e[59]=Me):Me=e[59];let G;e[60]!==R||e[61]!==xe.length||e[62]!==W||e[63]!==f||e[64]!==Z?(G=xe.length===0&&Z.length===0&&W.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:R==="connected"?"No connections yet":"No connections available"}),e[60]=R,e[61]=xe.length,e[62]=W,e[63]=f,e[64]=Z,e[65]=G):G=e[65];let Oe;e[66]!==_e||e[67]!==Me||e[68]!==G?(Oe=i.jsxs("div",{className:_e,children:[Me,G]}),e[66]=_e,e[67]=Me,e[68]=G,e[69]=Oe):Oe=e[69];let Qe;return e[70]!==ye||e[71]!==Oe?(Qe=i.jsxs(i.Fragment,{children:[ye,Oe]}),e[70]=ye,e[71]=Oe,e[72]=Qe):Qe=e[72],Qe}function lo(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function uo(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function fo(t){return t.app_name}function ho(t){return t.app_name}function go(t){return t?.items??[]}function po(t,e){if(t?.hasMore)return e.reduce(vo,0)}function vo(t,e){return t+(e?.items?.length??0)}function $i({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:b=>{},f=(b,w,I)=>{a&&J("agent_connection_attached",{agent_id:a,connection_id:b,app_name:w,mode:I})},[h,d]=u.useState(null),[g,m]=u.useState(r),[N,x]=u.useState(!1),{org:v}=Lt(),{data:j}=Tn.useSession(),C=Fn(),S=br(),R=xr(),T=b=>{e(!1),R({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:b}})},A=()=>{S.invalidateQueries({predicate:b=>{const w=b.queryKey;return w[1]===v.id&&w[3]==="collection"&&w[4]==="CONNECTIONS"}})},p=async b=>{d(b.app_name??b.id);try{const I=`${b.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,k=(await C.create.mutateAsync({title:I,description:b.description??null,connection_type:b.connection_type,connection_url:b.connection_url??null,connection_token:null,icon:b.icon??null,app_name:b.app_name??null,app_id:b.app_id??null,connection_headers:b.connection_headers??null})).id,E=await Wt({connectionId:k,orgId:v.id,orgSlug:v.slug,persistFallback:B=>C.update.mutateAsync({id:k,data:{connection_token:B}}).then(()=>{})});if(E.ran&&!E.ok){J("connection_oauth_failed",{connection_id:k,flow:"clone",error:E.error??"no_token"}),Le.error(`Authentication failed: ${E.error??"no token received"}`),await C.delete.mutateAsync(k);return}if(E.ran){J("connection_oauth_succeeded",{connection_id:k,flow:"clone"});const B=new URL(`/api/${v.slug}/mcp/${k}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(B.href,null)}),A()}f(k,b.app_name??null,"clone"),l(k)}catch(w){console.error("Failed to add connection:",w),Le.error("Failed to add connection")}finally{d(null)}},y=async b=>{if(!(!v||!j?.user?.id)){d(b.id);try{const w=Tr(b,v.id,j.user.id,{remoteIndex:0}),I=w.connection_type==="STDIO",O=!!w.connection_url,k=I&&w.connection_headers&&typeof w.connection_headers=="object"&&"command"in w.connection_headers;if(!O&&!k){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:E}=await C.create.mutateAsync(w),B=await Wt({connectionId:E,orgId:v.id,orgSlug:v.slug,persistFallback:ae=>C.update.mutateAsync({id:E,data:{connection_token:ae}}).then(()=>{})});if(B.ran&&!B.ok){J("connection_oauth_failed",{connection_id:E,flow:"connect_new",error:B.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${B.error??"no token received"})`}),f(E,w.app_name??null,"new"),l(E);return}if(B.ran){J("connection_oauth_succeeded",{connection_id:E,flow:"connect_new"});const ae=new URL(`/api/${v.slug}/mcp/${E}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(ae.href,null)}),A(),Le.success("Connected and authenticated")}else Le.success("Connected");f(E,w.app_name??null,"new"),l(E)}catch(w){console.error("Failed to connect:",w),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(Mn,{open:t,onOpenChange:e,children:[i.jsxs(On,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Nr,{value:g,onChange:m,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(co,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:p,onConnectAndAdd:y,connectingItemId:h,search:g,onCreateConnection:()=>x(!0),onBrowseNavigate:T,defaultTab:n})})]}),i.jsx(ao,{open:N,onOpenChange:x,onCreated:async b=>{x(!1);const w=await Wt({connectionId:b,orgId:v.id,orgSlug:v.slug,persistFallback:I=>C.update.mutateAsync({id:b,data:{connection_token:I}}).then(()=>{})});if(w.ran&&!w.ok){J("connection_oauth_failed",{connection_id:b,flow:"custom_create",error:w.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),f(b,null,"custom"),l(b),e(!1);return}if(w.ran){J("connection_oauth_succeeded",{connection_id:b,flow:"custom_create"});const I=new URL(`/api/${v.slug}/mcp/${b}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(I.href,null)}),A()}f(b,null,"custom"),l(b),e(!1)}})]})}const vn=new Map;function Vi(){const{org:t}=Lt(),e=so(),n=io(),r=n.find(v=>v.providerId==="deco"),{data:o,isLoading:s,refetch:a,isFetching:c}=Dr({queryKey:ht.aiProviderCredits(t.id,"deco"),enabled:!!r,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=o?.balanceCents??null,f=l!=null?l/100:null,h=u.useRef(new Map);if(l!=null){const v=vn.get(t.id);h.current.get(t.id)&&v!=null&&l>v&&J("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-v,previous_balance_cents:v,new_balance_cents:l}),vn.set(t.id,l),h.current.set(t.id,!0)}const d=!!r,g=l!=null&&l>0,m=l!=null&&l===0,N=l!=null&&l===200,x=n.length>0&&n.every(v=>v.providerId==="deco");return{hasDecoKey:d,decoKeyId:r?.id??null,balanceCents:l,balanceDollars:f,hasCredits:g,isZeroBalance:m,isInitialFreeCredit:N,hasOnlyDecoProvider:x,isLoading:s,isFetching:c,refetch:a}}function mo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const Ft=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function an(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:an(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function cn(t){const{Document:e}=Q(t);return t instanceof e}function yt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function zn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:an(t)?cn(t)?t:yt(t)||zn(t)?t.ownerDocument:document:document:document}const me=Ft?u.useLayoutEffect:u.useEffect;function zt(t){const e=u.useRef(t);return me(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function bo(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return me(()=>{n.current!==t&&(n.current=t)},e),n}function wt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=zt(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Qt={};function Ct(t,e){return u.useMemo(()=>{if(e)return e;const n=Qt[t]==null?0:Qt[t]+1;return Qt[t]=n,t+"-"+n},[t,e])}function Bn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=Bn(1),bt=Bn(-1);function xo(t){return"clientX"in t&&"clientY"in t}function Bt(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function yo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function kt(t){if(yo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return xo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),mn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function wo(t){return t.matches(mn)?t:t.querySelector(mn)}const Co={display:"none"};function So(t){let{id:e,value:n}=t;return z.createElement("div",{id:e,style:Co},n)}function Do(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function jo(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const $n=u.createContext(null);function Ro(t){const e=u.useContext($n);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function No(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const Io={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as _,r as j,j as e,B as p,v as S,t as c,c as N}from"./index-
|
|
1
|
+
import{D as _,r as j,j as e,B as p,v as S,t as c,c as N}from"./index-B7RYP3NN.js";import{D as k}from"./domain-settings-D5ngvsrw.js";import{P as f}from"./index-Bwozw13N.js";import{I as l}from"./input-DYt_CZpv.js";import{S as z}from"./switch-BNL7UE54.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-D6LtO0kt.js";import{c as F,S as y,a as C,b as r,d as O}from"./settings-section-pUfVePvc.js";import{s as L}from"./Trash01-1MWAufak.js";import{R as q}from"./require-capability-DkXUPJHW.js";import"./studio-tools-ChQt8hNF.js";import"./badge-Do_h1EED.js";import"./select-Ckjg4LQb.js";import"./tooltip-eREMpTVZ.js";import"./ChevronUp-DfOFXIHa.js";import"./ChevronDown-BiG76PbG.js";import"./sidebar-BvhztApl.js";import"./LayoutLeft-C9M-c9Be.js";import"./use-mobile-CIn4xg0a.js";import"./sheet-OIW1mtkz.js";import"./X-CEw3MnyS.js";import"./card-Cqi1WoGg.js";import"./ArrowUpRight-CZ2AKZeb.js";import"./use-capability-BLPa5d5v.js";import"./access-gate-Dp1Z0qXq.js";import"./capability-load-error-g4HZLLFO.js";function B(){const{org:s}=_(),{data:a,isLoading:E}=P(s.id,s.slug),x=R(s.id,s.slug),h=A(s.id,s.slug),v=T(s.id,s.slug),[t,d]=j.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=j.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!t.issuer||!t.clientId||!t.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!t.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:t.issuer,clientId:t.clientId,clientSecret:t.clientSecret,discoveryEndpoint:t.discoveryEndpoint||void 0,scopes:t.scopes.split(/\s+/).filter(Boolean),domain:t.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:s.id,email_domain:t.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:s.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},D=async i=>{try{await v.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:s.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:D,disabled:v.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${s.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:t.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:t.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:t.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:t.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:t.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:t.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ue(){const s=N.c(1);let a;return s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(q,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),s[0]=a):a=s[0],a}export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as D,j as s,E as le,r as K,D as ae,m as ce,b as de,e as me,B as Y,v as te,K as fe,d as ge,t as ie}from"./index-hp1Wb5d8.js";import{i as ue}from"./AlertCircle-DUGqPtlh.js";import{i as pe}from"./ChevronRight-CZbXvZTe.js";import{s as xe}from"./Plus-5rp1_RR5.js";import{s as he}from"./Trash01-CjpH6l2d.js";import{I as X}from"./input-C6WjLnBW.js";import{S as oe}from"./switch-BOLA3fVR.js";import{S as ye}from"./skeleton-BxbzRIaS.js";import{A as ne}from"./avatar-DSnbXlYk.js";import{P as je,a as Ce,b as ve}from"./popover-B85FT1A4.js";import{b as re}from"./use-connection-DemZRmxG.js";import{W as Z}from"./use-mcp-client-CWK8x43B.js";import{P as G}from"./index-Lpj8dwb9.js";import{u as Se}from"./use-registry-connections-DcLG4k_o.js";import{f as _e,g as be}from"./use-organization-settings-dGN7w7Gw.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-CNjt90YU.js";import{R as Re}from"./require-capability-BPD_Dr8D.js";import"./User01-DRVOr7L9.js";import"./use-collections-CVB9vyBA.js";import"./auth-Bz1pHzDF.js";import"./sidebar-CXgOD0j4.js";import"./LayoutLeft-BsA_ZgtZ.js";import"./use-mobile-B9nTCS2O.js";import"./sheet-CVKgycLo.js";import"./X-Dm2BPWUH.js";import"./tooltip-CVra7O3Y.js";import"./studio-tools-DcYtvtOD.js";import"./card-vMZldVlD.js";import"./ArrowUpRight-B7a0aIt5.js";import"./use-capability-DxNLPlpy.js";import"./access-gate-ccu9N6IV.js";import"./capability-load-error-CR38jTEw.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,v]=K.useState(""),[x,S]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>v(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>S(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:v}=t,x=de();let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={from:"/shell/$org"},e[0]=S):S=e[0];const{org:h}=me(S);let f;e[1]!==r||e[2]!==v||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{v?x({to:v,params:{org:h}}):j(!r)},e[1]=r,e[2]=v,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(ve,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==v?(p=v&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=v,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=Se(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,v]=K.useState(!1);let x,S,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{v(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>v(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>v(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],S=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=S,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],S=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==S||t[52]!==f||t[53]!==d?(g=s.jsx(S,{title:f,children:d}),t[51]=S,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function ut(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{ut as default};
|
|
1
|
+
import{c as D,j as s,E as le,r as K,D as ae,m as ce,b as de,e as me,B as Y,v as te,K as fe,d as ge,t as ie}from"./index-B7RYP3NN.js";import{i as ue}from"./AlertCircle-D-7PjEtw.js";import{i as pe}from"./ChevronRight-CxOiC2QH.js";import{s as xe}from"./Plus-zU9dAD7D.js";import{s as he}from"./Trash01-1MWAufak.js";import{I as X}from"./input-DYt_CZpv.js";import{S as oe}from"./switch-BNL7UE54.js";import{S as ye}from"./skeleton-0gmSAP3g.js";import{A as ne}from"./avatar-H5SdZkja.js";import{P as je,a as Ce,b as ve}from"./popover-DtwBpoIO.js";import{b as re}from"./use-connection-Bk5nhdqu.js";import{W as Z}from"./use-mcp-client-CJ3hyRQl.js";import{P as G}from"./index-Bwozw13N.js";import{u as Se}from"./use-registry-connections-B8jNCwfv.js";import{f as _e,g as be}from"./use-organization-settings-DjqIbP3u.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-pUfVePvc.js";import{R as Re}from"./require-capability-DkXUPJHW.js";import"./User01-CgetDSOS.js";import"./use-collections-DH3dGzZL.js";import"./auth-BJN1UQPw.js";import"./sidebar-BvhztApl.js";import"./LayoutLeft-C9M-c9Be.js";import"./use-mobile-CIn4xg0a.js";import"./sheet-OIW1mtkz.js";import"./X-CEw3MnyS.js";import"./tooltip-eREMpTVZ.js";import"./studio-tools-ChQt8hNF.js";import"./card-Cqi1WoGg.js";import"./ArrowUpRight-CZ2AKZeb.js";import"./use-capability-BLPa5d5v.js";import"./access-gate-Dp1Z0qXq.js";import"./capability-load-error-g4HZLLFO.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,v]=K.useState(""),[x,S]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>v(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>S(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:v}=t,x=de();let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={from:"/shell/$org"},e[0]=S):S=e[0];const{org:h}=me(S);let f;e[1]!==r||e[2]!==v||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{v?x({to:v,params:{org:h}}):j(!r)},e[1]=r,e[2]=v,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(ve,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==v?(p=v&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=v,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=Se(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,v]=K.useState(!1);let x,S,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{v(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>v(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>v(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],S=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=S,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],S=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==S||t[52]!==f||t[53]!==d?(g=s.jsx(S,{title:f,children:d}),t[51]=S,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function ut(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{ut as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BuaEWr12.js","assets/index-B7RYP3NN.js","assets/index-1MQY-aKx.css","assets/XCircle-Dl7p705r.js","assets/CheckCircle-9bkti7Hr.js","assets/Settings02-EL56AUOj.js","assets/use-mcp-client-CJ3hyRQl.js","assets/auth-BJN1UQPw.js","assets/useInfiniteQuery-BiCNMjD5.js","assets/use-infinite-scroll-DKJdRPXr.js","assets/studio-tools-ChQt8hNF.js","assets/badge-Do_h1EED.js","assets/input-DYt_CZpv.js","assets/dropdown-menu-BRbe4lMo.js","assets/ChevronUp-DfOFXIHa.js","assets/ChevronRight-CxOiC2QH.js","assets/DotsVertical-a3ykMqAA.js","assets/table-DRvtWOYH.js","assets/toggle-group-DUXjyCO9.js","assets/use-view-mode-CcNszWMu.js","assets/use-mobile-CIn4xg0a.js","assets/FilterLines-F6PgwAY_.js","assets/Globe01-COf6zLiZ.js","assets/SearchMd-PH69oVnY.js","assets/dialog-cQOZdhdQ.js","assets/X-CEw3MnyS.js","assets/AlertCircle-D-7PjEtw.js","assets/Upload01-CRqooMSt.js","assets/alert-dialog-BtmlqJJX.js","assets/card-Cqi1WoGg.js","assets/Trash01-1MWAufak.js","assets/label-WTzAZRMT.js","assets/select-Ckjg4LQb.js","assets/tooltip-eREMpTVZ.js","assets/ChevronDown-BiG76PbG.js","assets/switch-BNL7UE54.js","assets/textarea-C5f__Zd-.js","assets/checkbox-DbkDERGW.js","assets/Eye-2YEx7Dwq.js","assets/LinkExternal01-BAByQaEM.js","assets/use-copy-C3e_Od1k.js","assets/Key01-CG8Ocmkf.js","assets/Plus-zU9dAD7D.js","assets/mcp-oauth-CvIoKyUP.js","assets/Play-B9SImCZC.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as m,b as n,e as c,j as t,i as p,r as l,am as f}from"./index-B7RYP3NN.js";import{R as u}from"./require-capability-DkXUPJHW.js";import"./use-capability-BLPa5d5v.js";import"./access-gate-Dp1Z0qXq.js";import"./capability-load-error-g4HZLLFO.js";const g=l.lazy(()=>f(()=>import("./registry-layout-BuaEWr12.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,D as i}from"./index-
|
|
1
|
+
import{c,D as i}from"./index-B7RYP3NN.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=c.c(5),{org:r}=i(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{u as c,p as u};
|