decocms 4.3.0 → 4.4.0
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-DC-zDzV-.js → AlertCircle-CM6D9elR.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-OJZisFPQ.js → ArrowUpRight-Kqa5fEjt.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cgnheu-R.js → CheckCircle-8DKF8Yx5.js} +1 -1
- package/dist/client/assets/{ChevronDown-DyHvxYlc.js → ChevronDown-DGuR7uUZ.js} +1 -1
- package/dist/client/assets/{ChevronRight-Cpfh3gza.js → ChevronRight-BswIt99A.js} +1 -1
- package/dist/client/assets/{ChevronUp-DBpw6M-L.js → ChevronUp-DSdWQUoR.js} +1 -1
- package/dist/client/assets/{DotsVertical-5jSu3d1f.js → DotsVertical-DSosYpI1.js} +1 -1
- package/dist/client/assets/{Eye-bojNLUjA.js → Eye-Dn1AISrx.js} +1 -1
- package/dist/client/assets/{FilterLines-CFl65nng.js → FilterLines-CmWI-8pG.js} +1 -1
- package/dist/client/assets/{Globe01-CyfpzbeQ.js → Globe01-CcXDI4W7.js} +1 -1
- package/dist/client/assets/{Globe04-DFpdKSRI.js → Globe04-B9Btoycr.js} +1 -1
- package/dist/client/assets/{HardDrive-B1mtnaeA.js → HardDrive-BqXWgcmp.js} +1 -1
- package/dist/client/assets/{Key01-CwrJlZo0.js → Key01-F6-x7vNY.js} +1 -1
- package/dist/client/assets/{LayoutLeft-fsm0LcB8.js → LayoutLeft-DpqtgcH3.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BHwVyDja.js → LinkExternal01-DOU6-C1w.js} +1 -1
- package/dist/client/assets/{Monitor01-ChA6ov2I.js → Monitor01-SkSQUhmT.js} +1 -1
- package/dist/client/assets/{Palette-DusYqL0W.js → Palette-CnoObDqZ.js} +1 -1
- package/dist/client/assets/{Play-CnXG8qqP.js → Play-DzGcMRv3.js} +1 -1
- package/dist/client/assets/{Plus-eGxBB1d8.js → Plus-DDlkoJBs.js} +1 -1
- package/dist/client/assets/{SearchLg-CDpA_lbT.js → SearchLg-CdT_y89m.js} +1 -1
- package/dist/client/assets/{SearchMd-ujiTPCmg.js → SearchMd-UY2xUREv.js} +1 -1
- package/dist/client/assets/{Settings02-BcAnTzm5.js → Settings02-QyYEyYyn.js} +1 -1
- package/dist/client/assets/{Shield01-ZxmFmrvL.js → Shield01-V8b5EFFL.js} +1 -1
- package/dist/client/assets/{Star01-DHEkWySe.js → Star01-GVe4t6O1.js} +1 -1
- package/dist/client/assets/{Stars01-BdCaKqhF.js → Stars01-BIVPeWqS.js} +1 -1
- package/dist/client/assets/{Stars02-qnq-_X9g.js → Stars02-DVZm69DV.js} +1 -1
- package/dist/client/assets/{Sun-lTiqxOzH.js → Sun-B2ndPBZP.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DAZXInW8.js → SwitchHorizontal01-BL4xnvxO.js} +1 -1
- package/dist/client/assets/{Tool01-CvnpFI53.js → Tool01-Ci5EQ1tM.js} +1 -1
- package/dist/client/assets/{Trash01-ByxlxTiZ.js → Trash01-Cc007jho.js} +1 -1
- package/dist/client/assets/{Upload01-Z77n1bV8.js → Upload01-DB9meUjO.js} +1 -1
- package/dist/client/assets/{User01-COQtf360.js → User01-Dz-_mMMJ.js} +1 -1
- package/dist/client/assets/{Users01-wtRJYQKX.js → Users01-Ctg0iuAM.js} +1 -1
- package/dist/client/assets/{Users03-DknrDMtT.js → Users03-BazvU-rC.js} +1 -1
- package/dist/client/assets/{X-DrMVHLcw.js → X-_dGiBqSn.js} +1 -1
- package/dist/client/assets/{XCircle-Ct0eqqsw.js → XCircle-CmN6DNsv.js} +1 -1
- package/dist/client/assets/{XClose-BaZ908gw.js → XClose-BpreRuFP.js} +1 -1
- package/dist/client/assets/{Zap-wRIFSWIq.js → Zap-CWxLsQ6b.js} +1 -1
- package/dist/client/assets/{ZapSquare-PMiGcZpW.js → ZapSquare-D5x1wm0t.js} +1 -1
- package/dist/client/assets/{ZoomOut-6ix2H92j.js → ZoomOut-C0bVPfpC.js} +1 -1
- package/dist/client/assets/{access-gate-D6dGDGRI.js → access-gate-CpQ3bOMg.js} +1 -1
- package/dist/client/assets/{add-section-modal-DOhGqRCL.js → add-section-modal-D22Rp_ry.js} +1 -1
- package/dist/client/assets/agent-icon-BjxA8YR3.js +1 -0
- package/dist/client/assets/agents-list-C17XwfcN.js +1 -0
- package/dist/client/assets/{ai-providers-Crp7kidL.js → ai-providers-DNjwL7U0.js} +1 -1
- package/dist/client/assets/{alert-CKj_5smu.js → alert-CTzYtGwN.js} +1 -1
- package/dist/client/assets/{alert-dialog-CYizItFp.js → alert-dialog-DMWXmTGp.js} +2 -2
- package/dist/client/assets/app-editor-uAXMllzs.js +1 -0
- package/dist/client/assets/{auth-Bej0Tx2Y.js → auth-DraSXrC6.js} +1 -1
- package/dist/client/assets/{auth-catchall-CmNVpp-8.js → auth-catchall--3ZAEbBd.js} +1 -1
- package/dist/client/assets/{auth-entry-PwLVm-jX.js → auth-entry-DRJ-aW15.js} +1 -1
- package/dist/client/assets/{auth-split-layout-5YwPgbAb.js → auth-split-layout-B77S9w6i.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DoPUB_Bh.js → authenticate-and-persist-oauth-HBteAcVm.js} +1 -1
- package/dist/client/assets/{automation-list-row-CsTyBm4M.js → automation-list-row-NZNZGrlr.js} +1 -1
- package/dist/client/assets/automation-runs-BoQeZ1gh.js +1 -0
- package/dist/client/assets/automations-bd5MK3eJ.js +1 -0
- package/dist/client/assets/{avatar-CJP1BOq4.js → avatar-COMRxqae.js} +1 -1
- package/dist/client/assets/{badge-DhpSM7g_.js → badge-B1dPfLuK.js} +1 -1
- package/dist/client/assets/{block-document-B2vhG8Ii.js → block-document-B6TgjyKW.js} +2 -2
- package/dist/client/assets/{brand-context-BRpHgxfT.js → brand-context-DGv078pp.js} +1 -1
- package/dist/client/assets/{buckets-DDR0G33f.js → buckets-LnyV7EWC.js} +1 -1
- package/dist/client/assets/bulk-category-panel-BP0Mtj3P.js +1 -0
- package/dist/client/assets/{capability-load-error-CCgNL5xi.js → capability-load-error-WTr85D-I.js} +1 -1
- package/dist/client/assets/{card-BFb5m83e.js → card-Bys-wDTW.js} +1 -1
- package/dist/client/assets/category-editor-Cm1sAVk_.js +1 -0
- package/dist/client/assets/{chat-context-n9syhvq-.js → chat-context-huSCeR82.js} +4 -4
- package/dist/client/assets/{checkbox-DmOzmKLP.js → checkbox-BIDlFz_0.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BVPtMYcv.js → cli-auth-success-DJ5lbMQC.js} +1 -1
- package/dist/client/assets/collection-detail-UTQtN0-J.js +1 -0
- package/dist/client/assets/{collection-display-button-Bf9dlJRy.js → collection-display-button-Bnm_JutP.js} +1 -1
- package/dist/client/assets/{collection-search-8iNXnGlM.js → collection-search-CKMDHnku.js} +1 -1
- package/dist/client/assets/{collection-tabs-KA2be3wH.js → collection-tabs-CWrBkWhe.js} +1 -1
- package/dist/client/assets/{command-C34397s2.js → command-DrgMAh0a.js} +1 -1
- package/dist/client/assets/commerce-onboarding-B8pBrcvE.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-Brra3cMC.js → connect-desktop-dialog-CvuFk-NY.js} +1 -1
- package/dist/client/assets/{connection-card-C6NYo4Gp.js → connection-card-DIh-SIqT.js} +1 -1
- package/dist/client/assets/connection-detail-CWog7XFK.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CwZx7WkC.js → connection-form-helpers-DV-bwjt7.js} +1 -1
- package/dist/client/assets/connections-BkvcH3F-.js +1 -0
- package/dist/client/assets/{context-menu-BW_OZBmV.js → context-menu-BPHfkJEs.js} +1 -1
- package/dist/client/assets/{decopilot-BItqS11w.js → decopilot-BxOK0Z8W.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CvYk1hkc.js → decopilot-sse-pool-Chmwc1_x.js} +1 -1
- package/dist/client/assets/{dialog-BAqFyO8a.js → dialog-o7scRbG9.js} +1 -1
- package/dist/client/assets/{domain-settings-r_E3rHsG.js → domain-settings-DIv14WFm.js} +1 -1
- package/dist/client/assets/{drawer-CFkqEC3w.js → drawer-B-Vy7tMY.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C62KNjwK.js → dropdown-menu-D-VNET4I.js} +1 -1
- package/dist/client/assets/{empty-state-Sh_DuDcy.js → empty-state-1p_UpPHY.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D6bQrejT.js → extract-connection-data-BVX9Eneo.js} +1 -1
- package/dist/client/assets/file-explorer-Bh9kp1sm.js +2 -0
- package/dist/client/assets/{file-type-icon-DPWxBpNL.js → file-type-icon-LHBbJJTG.js} +1 -1
- package/dist/client/assets/{files-B9ekmQa_.js → files-Bw3w16xX.js} +1 -1
- package/dist/client/assets/{form-DGE2mWLL.js → form-DX8cQ4SA.js} +1 -1
- package/dist/client/assets/{general-BMDKtyZB.js → general-DzJAxzRR.js} +1 -1
- package/dist/client/assets/{github-repo-picker-B5tZucJa.js → github-repo-picker-ZmfhFTO6.js} +1 -1
- package/dist/client/assets/{hooks-CUSV6Enf.js → hooks-BUt6AoQh.js} +6 -6
- package/dist/client/assets/{import-from-deco-dialog-M3CP3Gmn.js → import-from-deco-dialog-DZhtwoRn.js} +1 -1
- package/dist/client/assets/{index-Bb-tYGNK.js → index-BBTFoidO.js} +1 -1
- package/dist/client/assets/{index-CkTyYAY1.js → index-BPD9Iyv5.js} +1 -1
- package/dist/client/assets/index-BcXb7VeZ.css +1 -0
- package/dist/client/assets/index-CAV1BNai.js +173 -0
- package/dist/client/assets/{index-mEtg0zTM.js → index-CL3KBg-D.js} +1 -1
- package/dist/client/assets/{index-CFiyU0D9.js → index-CXy6rN6i.js} +3 -3
- package/dist/client/assets/{index-DGzNvPy2.js → index-CjKis1yy.js} +1 -1
- package/dist/client/assets/{index-jBUpmiBg.js → index-Cod7u1PQ.js} +1 -1
- package/dist/client/assets/{index-CRxAjd1d.js → index-CpgVJVWB.js} +27 -27
- package/dist/client/assets/{index-B6hcksS9.js → index-DCwPnlYH.js} +1 -1
- package/dist/client/assets/index-DKs6HTlj.js +1 -0
- package/dist/client/assets/{index-Dj7TxcSd.js → index-Db3cPjnW.js} +2 -2
- package/dist/client/assets/index-DvDkdoxH.js +1 -0
- package/dist/client/assets/{index-hmJjUPum.js → index-NJ9aYDVC.js} +1 -1
- package/dist/client/assets/{index-DIBoN36v.js → index-VkScKLdP.js} +1 -1
- package/dist/client/assets/{index-redirect-C9Kkmz45.js → index-redirect-B6MtHNAq.js} +1 -1
- package/dist/client/assets/{input-BwRH-Gsz.js → input-BlhkemhH.js} +1 -1
- package/dist/client/assets/{integration-icon-LQhkkaLl.js → integration-icon-BSHD1Ijr.js} +1 -1
- package/dist/client/assets/{label-CdBSUJpf.js → label-CL8Vh65B.js} +1 -1
- package/dist/client/assets/{login-d0UWtw9N.js → login-B4UwjrwL.js} +1 -1
- package/dist/client/assets/{mcp-oauth-IblqU9XT.js → mcp-oauth-CXj7zg3h.js} +1 -1
- package/dist/client/assets/{members-Bpdrl2e9.js → members-CZJJNFCT.js} +1 -1
- package/dist/client/assets/{monaco-editor-5JIc-lnc.js → monaco-editor-DBScTPL_.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-DPsQ-OAn.js → monitoring-stats-row-DS-oLjL7.js} +1 -1
- package/dist/client/assets/{oauth-callback-B1AvYYRn.js → oauth-callback-DmaJ1bda.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BtGHmjpp.js → oauth-callback-ai-provider-BQMnSXh3.js} +1 -1
- package/dist/client/assets/{onboarding-DfUmI7F5.js → onboarding-Byb6DxyK.js} +1 -1
- package/dist/client/assets/{org-install-CpJAFt1s.js → org-install-DE37K5KN.js} +1 -1
- package/dist/client/assets/{org-layout-BsuFzdH_.js → org-layout-des0Y5a9.js} +1 -1
- package/dist/client/assets/{organization-choice-DrxWffZp.js → organization-choice-COkZ5W_o.js} +1 -1
- package/dist/client/assets/{page-seo-form-BLqpZnj6.js → page-seo-form-BcrUATEU.js} +1 -1
- package/dist/client/assets/page-seo-sheet-D1Z6hzyV.js +1 -0
- package/dist/client/assets/popover-SD8gnUXm.js +1 -0
- package/dist/client/assets/post-editor-BDlfII0z.js +1 -0
- package/dist/client/assets/{primitives-BF1opf4F.js → primitives-CVsZF3ex.js} +1 -1
- package/dist/client/assets/{profile-C8meo3ry.js → profile-DBUkydtR.js} +1 -1
- package/dist/client/assets/project-app-view-Bk8oTYIF.js +1 -0
- package/dist/client/assets/record-editor-DL8IQ3xy.js +1 -0
- package/dist/client/assets/registry-Bd0JPSYO.js +2 -0
- package/dist/client/assets/{registry-layout-C4UMhzml.js → registry-layout-BL9jjFNp.js} +1 -1
- package/dist/client/assets/{require-capability--mIKExbX.js → require-capability-CLQ4GBGj.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DDJmFi3U.js → required-auth-layout-BzYoSj-D.js} +1 -1
- package/dist/client/assets/{reset-password-CuNa1ife.js → reset-password-C3Zmx-Z-.js} +1 -1
- package/dist/client/assets/roles-RwbAlbhC.js +1 -0
- package/dist/client/assets/{scroll-area-BM-54tW1.js → scroll-area-DgIklajW.js} +54 -54
- package/dist/client/assets/{search-input-M7ubuBMG.js → search-input-BwHA7yOt.js} +1 -1
- package/dist/client/assets/{secrets-BN1JMG5V.js → secrets-Cu_Gp7gT.js} +1 -1
- package/dist/client/assets/{sections-editor-Buouhx1S.js → sections-editor-CaNl1tLu.js} +2 -2
- package/dist/client/assets/select-DM3pFFAV.js +1 -0
- package/dist/client/assets/{select-model-Cz9R_UN3.js → select-model-C1odlJ1X.js} +1 -1
- package/dist/client/assets/seo-editor-C28ZayGa.js +1 -0
- package/dist/client/assets/settings-layout-C_nc5y3_.js +1 -0
- package/dist/client/assets/{settings-section-MeT61nuY.js → settings-section-6b9w_VoZ.js} +1 -1
- package/dist/client/assets/{sheet-DyU03ddw.js → sheet-BJF6qruz.js} +1 -1
- package/dist/client/assets/shell-controls-C9tE75mS.js +1 -0
- package/dist/client/assets/{shell-layout-Nyz7GHu7.js → shell-layout-gi6XYvgE.js} +1 -1
- package/dist/client/assets/shell-route-loading-Agan4lHM.js +1 -0
- package/dist/client/assets/{sidebar-BNrafefE.js → sidebar-BD77ZDQ1.js} +1 -1
- package/dist/client/assets/{skeleton-B0I93PJP.js → skeleton-CuVDGSZE.js} +1 -1
- package/dist/client/assets/{sortable.esm-MymOIPKk.js → sortable.esm-DpWg8tde.js} +2 -2
- package/dist/client/assets/{sso-CfyYgWAs.js → sso-B9XBpXX9.js} +1 -1
- package/dist/client/assets/{store-T7GJ1SPI.js → store-Il1Qjdpz.js} +1 -1
- package/dist/client/assets/store-registry-BN4Ygwm2.js +2 -0
- package/dist/client/assets/{studio-tools-CNO5iCKk.js → studio-tools-C-Eel15b.js} +1 -1
- package/dist/client/assets/{switch-CCMIMmOF.js → switch-DWXEjjcR.js} +1 -1
- package/dist/client/assets/{tab-id-BptcWVWa.js → tab-id-AX1D_RMI.js} +1 -1
- package/dist/client/assets/{table-DeNuxLMl.js → table-sXVKQ5vt.js} +1 -1
- package/dist/client/assets/{tabs-Ca0vDJqc.js → tabs-BeXAqCdo.js} +1 -1
- package/dist/client/assets/{task-status-B3nPzwP7.js → task-status-CaQuE65s.js} +1 -1
- package/dist/client/assets/{textarea-BYT525JZ.js → textarea-C30KYfio.js} +1 -1
- package/dist/client/assets/{toggle-group-9TrYMc69.js → toggle-group-B6oTaI1f.js} +1 -1
- package/dist/client/assets/toolbar-DuZrnshW.js +1 -0
- package/dist/client/assets/toolbar-icon-button-CG8gWMNZ.js +1 -0
- package/dist/client/assets/{tools-list-uWC3Ij6C.js → tools-list-BSe55AC9.js} +1 -1
- package/dist/client/assets/tooltip-BRQCINXK.js +1 -0
- package/dist/client/assets/{types-C7syjwde.js → types-ywta9rZ4.js} +4 -4
- package/dist/client/assets/{use-ai-providers-C7KmiuqP.js → use-ai-providers-CpUPA2Pj.js} +1 -1
- package/dist/client/assets/{use-automations-RMjkwkxX.js → use-automations-BSn8_z4p.js} +1 -1
- package/dist/client/assets/{use-capability-C6Dwri-U.js → use-capability-AkUZCu97.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BcxdOJLx.js → use-clock-tick-7J301cSN.js} +1 -1
- package/dist/client/assets/{use-collections-B4atckEK.js → use-collections-BhzLncHB.js} +1 -1
- package/dist/client/assets/{use-connection-Dz29RF9P.js → use-connection-CSQdDXlG.js} +1 -1
- package/dist/client/assets/{use-copy-Xy0buIqd.js → use-copy-3aLRhzTZ.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-ClyuqzV0.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-B4mbwJnu.js → use-debounced-autosave-DwyO4Yri.js} +1 -1
- package/dist/client/assets/{use-debounced-value-C6U3mliE.js → use-debounced-value-BGsbVLHA.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CpQNzv3e.js → use-decopilot-events-B8-U5_6h.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CqeuxO_6.js → use-delete-connection-yP5RphYi.js} +1 -1
- package/dist/client/assets/{use-file-configs-CFCmr--W.js → use-file-configs-XF2AvMPs.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BX1nHHVY.js → use-infinite-scroll-CkXtceVR.js} +1 -1
- package/dist/client/assets/{use-join-requests-j9WpmFq7.js → use-join-requests-mfteqXVe.js} +1 -1
- package/dist/client/assets/{use-mcp-client-xOK-OF8p.js → use-mcp-client-CRWIqSWI.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Crr3H7P7.js → use-mcp-prompts-BV9cBymv.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C8tMWwG9.js → use-mcp-tools-Dgj65Z69.js} +1 -1
- package/dist/client/assets/{use-members-BMNjJExY.js → use-members-BZOJ4ncQ.js} +1 -1
- package/dist/client/assets/{use-mobile-NlF-3RoP.js → use-mobile-DgvzRDzB.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DZubxUSm.js → use-navigate-to-agent-DTqeD3lq.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C_UJ3Vg_.js → use-org-auth-client-Dx974y4u.js} +1 -1
- package/dist/client/assets/{use-org-fs-DyK8omii.js → use-org-fs-DI1Q1Ycz.js} +1 -1
- package/dist/client/assets/{use-org-sso-DkqH8Zpz.js → use-org-sso-kfQLtl8D.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Cu69Rnex.js → use-organization-roles-B2GmBYYT.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DksiQdGc.js → use-organization-settings-ClL7mSbK.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BOZLpkM5.js → use-registry-connections-DzyhBLO8.js} +1 -1
- package/dist/client/assets/{use-secrets-CLmhH-Rb.js → use-secrets-BX0N_3N-.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DxV7deix.js → use-status-sounds-BsVH7G2F.js} +1 -1
- package/dist/client/assets/{use-view-mode-C2dllj6L.js → use-view-mode-D4v-Vh_n.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-2U_MnYnK.js → use-virtual-mcp-7AWl-thI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DbI8AV-k.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DT-JxV4F.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-Cysvk68n.js → useSuspenseQueries-D4Gfj0Tf.js} +1 -1
- package/dist/client/assets/variant-calendar-C9mxKuI5.js +1 -0
- package/dist/client/assets/{view-mode-toggle-4CQodGfa.js → view-mode-toggle-Dcs21C2T.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +11 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ChevronLeft-dyRjFCmp.js +0 -1
- package/dist/client/assets/agent-icon-oDx9Z_Be.js +0 -1
- package/dist/client/assets/agents-list-BgSM_QG_.js +0 -1
- package/dist/client/assets/app-editor-Xoia35dq.js +0 -1
- package/dist/client/assets/automation-runs-B-dNDEWH.js +0 -1
- package/dist/client/assets/automations-D395202A.js +0 -1
- package/dist/client/assets/bulk-category-panel-CM1bMunr.js +0 -1
- package/dist/client/assets/category-editor-2T4Y_ABL.js +0 -1
- package/dist/client/assets/collection-detail-BQKV3UU7.js +0 -1
- package/dist/client/assets/commerce-onboarding-D2H83R0U.js +0 -1
- package/dist/client/assets/connection-detail-gJ5ITUXe.js +0 -1
- package/dist/client/assets/connections-CicrEJbU.js +0 -1
- package/dist/client/assets/file-explorer-C8pgfKCz.js +0 -2
- package/dist/client/assets/index-B2yJy2sB.js +0 -1
- package/dist/client/assets/index-BqKQnks_.css +0 -1
- package/dist/client/assets/index-DQnTjiix.js +0 -1
- package/dist/client/assets/index-D_S_Rq8A.js +0 -169
- package/dist/client/assets/page-seo-sheet-C7jjKuEW.js +0 -1
- package/dist/client/assets/popover-BXFiEQtN.js +0 -1
- package/dist/client/assets/post-editor-Tve7DmSa.js +0 -1
- package/dist/client/assets/preview-dialog-CQgf0QcR.js +0 -5
- package/dist/client/assets/project-app-view-BR2-hR46.js +0 -1
- package/dist/client/assets/record-editor-DbXO7U7E.js +0 -1
- package/dist/client/assets/registry-jjhvqeDq.js +0 -2
- package/dist/client/assets/roles-BMhGnq_F.js +0 -1
- package/dist/client/assets/select-C6v8Xcth.js +0 -1
- package/dist/client/assets/seo-editor-D9o3utSQ.js +0 -1
- package/dist/client/assets/settings-layout-CSaUQUXv.js +0 -1
- package/dist/client/assets/shell-controls-DtGb6E4l.js +0 -1
- package/dist/client/assets/shell-route-loading-BRcTX0VT.js +0 -1
- package/dist/client/assets/store-registry-B-YJeGRV.js +0 -2
- package/dist/client/assets/toolbar-p8VcpV1N.js +0 -1
- package/dist/client/assets/tooltip-DrpiSbRG.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-DVmI--_C.js +0 -1
- package/dist/client/assets/useInfiniteQuery-RUqqRph1.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-fRYRtDkY.js +0 -1
- package/dist/client/assets/variant-calendar-mZn_D1Zo.js +0 -1
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{r as h,aN as tn,c as J,l as xe,j as a,J as nn,i as rn,B as Z,K as Ke,k as sn,ae as on,D as ln,m as an,t as Pe,ag as cn,G as un,e as dn}from"./index-CFiyU0D9.js";import{c as fn,d as mn,g as pn,b as hn,e as xn,a as gn,h as vn}from"./ZoomOut-6ix2H92j.js";import{c as wn,a as Ve,d as yt,e as bt}from"./dialog-BAqFyO8a.js";import{T as oe,a as le,b as ae}from"./tooltip-DrpiSbRG.js";import{n as Re,i as St}from"./Globe01-CyfpzbeQ.js";import{n as zt}from"./LinkExternal01-BHwVyDja.js";import{s as yn}from"./XClose-BaZ908gw.js";import{S as $e}from"./skeleton-B0I93PJP.js";import{l as bn,F as Sn}from"./index-B6hcksS9.js";import{F as Xe,M as zn}from"./file-type-icon-DPWxBpNL.js";import{D as jn,a as kn,b as Pn,c as it}from"./dropdown-menu-C62KNjwK.js";import{i as Cn}from"./LayoutLeft-fsm0LcB8.js";import{i as En,f as jt,n as Nn,d as kt,e as $n}from"./use-org-fs-DyK8omii.js";import{I as Mn}from"./input-BwRH-Gsz.js";import{a as In,P as Rn,b as Dn}from"./popover-BXFiEQtN.js";import{i as Ln}from"./ChevronUp-DBpw6M-L.js";import{a as _n}from"./Eye-bojNLUjA.js";import{i as An}from"./Key01-CwrJlZo0.js";const Ae=h.createContext(null);Ae.displayName="PanelGroupContext";const K={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Qe=10,pe=h.useLayoutEffect,ot=tn.useId,Tn=typeof ot=="function"?ot:()=>null;let Hn=0;function Ze(t=null){const e=Tn(),n=h.useRef(t||e||null);return n.current===null&&(n.current=""+Hn++),t??n.current}function Pt({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:i,id:o,maxSize:l,minSize:c,onCollapse:d,onExpand:m,onResize:u,order:f,style:v,tagName:x="div",...k}){const b=h.useContext(Ae);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:C,getPanelSize:I,getPanelStyle:j,groupId:F,isPanelCollapsed:$,reevaluatePanelConstraints:g,registerPanel:G,resizePanel:W,unregisterPanel:O}=b,A=Ze(o),D=h.useRef({callbacks:{onCollapse:d,onExpand:m,onResize:u},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:l,minSize:c},id:A,idIsFromProps:o!==void 0,order:f});h.useRef({didLogMissingDefaultSizeWarning:!1}),pe(()=>{const{callbacks:_,constraints:L}=D.current,T={...L};D.current.id=A,D.current.idIsFromProps=o!==void 0,D.current.order=f,_.onCollapse=d,_.onExpand=m,_.onResize=u,L.collapsedSize=n,L.collapsible=r,L.defaultSize=s,L.maxSize=l,L.minSize=c,(T.collapsedSize!==L.collapsedSize||T.collapsible!==L.collapsible||T.maxSize!==L.maxSize||T.minSize!==L.minSize)&&g(D.current,T)}),pe(()=>{const _=D.current;return G(_),()=>{O(_)}},[f,A,G,O]),h.useImperativeHandle(i,()=>({collapse:()=>{w(D.current)},expand:_=>{C(D.current,_)},getId(){return A},getSize(){return I(D.current)},isCollapsed(){return $(D.current)},isExpanded(){return!$(D.current)},resize:_=>{W(D.current,_)}}),[w,C,I,$,A,W]);const V=j(D.current,s);return h.createElement(x,{...k,children:t,className:e,id:A,style:{...V,...v},[K.groupId]:F,[K.panel]:"",[K.panelCollapsible]:r||void 0,[K.panelId]:A,[K.panelSize]:parseFloat(""+V.flexGrow).toFixed(1)})}const Ct=h.forwardRef((t,e)=>h.createElement(Pt,{...t,forwardedRef:e}));Pt.displayName="Panel";Ct.displayName="forwardRef(Panel)";let Ye=null,Ie=-1,de=null;function On(t,e){if(e){const n=(e&It)!==0,r=(e&Rt)!==0,s=(e&Dt)!==0,i=(e&Lt)!==0;if(n)return s?"se-resize":i?"ne-resize":"e-resize";if(r)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Un(){de!==null&&(document.head.removeChild(de),Ye=null,de=null,Ie=-1)}function Fe(t,e){var n,r;const s=On(t,e);if(Ye!==s){if(Ye=s,de===null&&(de=document.createElement("style"),document.head.appendChild(de)),Ie>=0){var i;(i=de.sheet)===null||i===void 0||i.removeRule(Ie)}Ie=(n=(r=de.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function Et(t){return t.type==="keydown"}function Nt(t){return t.type.startsWith("pointer")}function $t(t){return t.type.startsWith("mouse")}function Te(t){if(Nt(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if($t(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Fn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Wn(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Bn(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:ct(t),b:ct(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;N(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:at(lt(n.a)),b:at(lt(n.b))};if(s.a===s.b){const i=r.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let l=i.length;for(;l--;){const c=i[l];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(s.a-s.b)}const Gn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function qn(t){var e;const n=getComputedStyle((e=Mt(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Kn(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||qn(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Gn.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function lt(t){let e=t.length;for(;e--;){const n=t[e];if(N(n,"Missing node"),Kn(n))return n}return null}function at(t){return t&&Number(getComputedStyle(t).zIndex)||0}function ct(t){const e=[];for(;t;)e.push(t),t=Mt(t);return e}function Mt(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const It=1,Rt=2,Dt=4,Lt=8,Vn=Fn()==="coarse";let re=[],be=!1,me=new Map,He=new Map;const Ce=new Set;function Xn(t,e,n,r,s){var i;const{ownerDocument:o}=e,l={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(i=me.get(o))!==null&&i!==void 0?i:0;return me.set(o,c+1),Ce.add(l),De(),function(){var m;He.delete(t),Ce.delete(l);const u=(m=me.get(o))!==null&&m!==void 0?m:1;if(me.set(o,u-1),De(),u===1&&me.delete(o),re.includes(l)){const f=re.indexOf(l);f>=0&&re.splice(f,1),tt(),s("up",!0,null)}}}function Yn(t){const{target:e}=t,{x:n,y:r}=Te(t);be=!0,et({target:e,x:n,y:r}),De(),re.length>0&&(Le("down",t),t.preventDefault(),_t(e)||t.stopImmediatePropagation())}function We(t){const{x:e,y:n}=Te(t);if(be&&t.buttons===0&&(be=!1,Le("up",t)),!be){const{target:r}=t;et({target:r,x:e,y:n})}Le("move",t),tt(),re.length>0&&t.preventDefault()}function Be(t){const{target:e}=t,{x:n,y:r}=Te(t);He.clear(),be=!1,re.length>0&&(t.preventDefault(),_t(e)||t.stopImmediatePropagation()),Le("up",t),et({target:e,x:n,y:r}),tt(),De()}function _t(t){let e=t;for(;e;){if(e.hasAttribute(K.resizeHandle))return!0;e=e.parentElement}return!1}function et({target:t,x:e,y:n}){re.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Ce.forEach(s=>{const{element:i,hitAreaMargins:o}=s,l=i.getBoundingClientRect(),{bottom:c,left:d,right:m,top:u}=l,f=Vn?o.coarse:o.fine;if(e>=d-f&&e<=m+f&&n>=u-f&&n<=c+f){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&Bn(r,i)>0){let x=r,k=!1;for(;x&&!x.contains(i);){if(Wn(x.getBoundingClientRect(),l)){k=!0;break}x=x.parentElement}if(k)return}re.push(s)}})}function Ge(t,e){He.set(t,e)}function tt(){let t=!1,e=!1;re.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;He.forEach(r=>{n|=r}),t&&e?Fe("intersection",n):t?Fe("horizontal",n):e?Fe("vertical",n):Un()}let qe=new AbortController;function De(){qe.abort(),qe=new AbortController;const t={capture:!0,signal:qe.signal};Ce.size&&(be?(re.length>0&&me.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",Be,t),r.addEventListener("pointerleave",We,t),r.addEventListener("pointermove",We,t))}),window.addEventListener("pointerup",Be,t),window.addEventListener("pointercancel",Be,t)):me.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",Yn,t),r.addEventListener("pointermove",We,t))}))}function Le(t,e){Ce.forEach(n=>{const{setResizeHandlerState:r}=n,s=re.includes(n);r(t,s,e)})}function Jn(){const[t,e]=h.useState(0);return h.useCallback(()=>e(n=>n+1),[])}function N(t,e){if(!t)throw console.error(e),Error(e)}function he(t,e,n=Qe){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function ce(t,e,n=Qe){return he(t,e,n)===0}function ee(t,e,n){return he(t,e,n)===0}function Qn(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const s=t[r],i=e[r];if(!ee(s,i,n))return!1}return!0}function ye({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];N(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:s=0,collapsible:i,maxSize:o=100,minSize:l=0}=r;if(he(n,l)<0)if(i){const c=(s+l)/2;he(n,c)<0?n=s:n=l}else n=l;return n=Math.min(o,n),n=parseFloat(n.toFixed(Qe)),n}function je({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:i}){if(ee(t,0))return e;const o=[...e],[l,c]=r;N(l!=null,"Invalid first pivot index"),N(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=t<0?c:l,f=n[u];N(f,`Panel constraints not found for index ${u}`);const{collapsedSize:v=0,collapsible:x,minSize:k=0}=f;if(x){const b=e[u];if(N(b!=null,`Previous layout not found for panel index ${u}`),ee(b,v)){const w=k-b;he(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}{const u=t<0?l:c,f=n[u];N(f,`No panel constraints found for index ${u}`);const{collapsedSize:v=0,collapsible:x,minSize:k=0}=f;if(x){const b=e[u];if(N(b!=null,`Previous layout not found for panel index ${u}`),ee(b,k)){const w=b-v;he(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}}{const u=t<0?1:-1;let f=t<0?c:l,v=0;for(;;){const k=e[f];N(k!=null,`Previous layout not found for panel index ${f}`);const w=ye({panelConstraints:n,panelIndex:f,size:100})-k;if(v+=w,f+=u,f<0||f>=n.length)break}const x=Math.min(Math.abs(t),Math.abs(v));t=t<0?0-x:x}{let f=t<0?l:c;for(;f>=0&&f<n.length;){const v=Math.abs(t)-Math.abs(d),x=e[f];N(x!=null,`Previous layout not found for panel index ${f}`);const k=x-v,b=ye({panelConstraints:n,panelIndex:f,size:k});if(!ee(x,b)&&(d+=x-b,o[f]=b,d.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?f--:f++}}if(Qn(s,o))return s;{const u=t<0?c:l,f=e[u];N(f!=null,`Previous layout not found for panel index ${u}`);const v=f+d,x=ye({panelConstraints:n,panelIndex:u,size:v});if(o[u]=x,!ee(x,v)){let k=v-x,w=t<0?c:l;for(;w>=0&&w<n.length;){const C=o[w];N(C!=null,`Previous layout not found for panel index ${w}`);const I=C+k,j=ye({panelConstraints:n,panelIndex:w,size:I});if(ee(C,j)||(k-=j-C,o[w]=j),ee(k,0))break;t>0?w--:w++}}}const m=o.reduce((u,f)=>f+u,0);return ee(m,100)?o:s}function Zn({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,i=0,o=0;const l=n[0];N(l!=null,"No pivot index found"),e.forEach((u,f)=>{const{constraints:v}=u,{maxSize:x=100,minSize:k=0}=v;f===l?(r=k,s=x):(i+=k,o+=x)});const c=Math.min(s,100-i),d=Math.max(r,100-o),m=t[l];return{valueMax:c,valueMin:d,valueNow:m}}function Ee(t,e=document){return Array.from(e.querySelectorAll(`[${K.resizeHandleId}][data-panel-group-id="${t}"]`))}function At(t,e,n=document){const s=Ee(t,n).findIndex(i=>i.getAttribute(K.resizeHandleId)===e);return s??null}function Tt(t,e,n){const r=At(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function Ht(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Oe(t,e=document){const n=e.querySelector(`[${K.resizeHandleId}="${t}"]`);return n||null}function er(t,e,n,r=document){var s,i,o,l;const c=Oe(e,r),d=Ee(t,r),m=c?d.indexOf(c):-1,u=(s=(i=n[m])===null||i===void 0?void 0:i.id)!==null&&s!==void 0?s:null,f=(o=(l=n[m+1])===null||l===void 0?void 0:l.id)!==null&&o!==void 0?o:null;return[u,f]}function tr({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:i,setLayout:o}){h.useRef({didWarnAboutMissingResizeHandle:!1}),pe(()=>{if(!i)return;const l=Ee(n,i);for(let c=0;c<s.length-1;c++){const{valueMax:d,valueMin:m,valueNow:u}=Zn({layout:r,panelsArray:s,pivotIndices:[c,c+1]}),f=l[c];if(f!=null){const v=s[c];N(v,`No panel data found for index "${c}"`),f.setAttribute("aria-controls",v.id),f.setAttribute("aria-valuemax",""+Math.round(d)),f.setAttribute("aria-valuemin",""+Math.round(m)),f.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{l.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,i]),h.useEffect(()=>{if(!i)return;const l=e.current;N(l,"Eager values not found");const{panelDataArray:c}=l,d=Ht(n,i);N(d!=null,`No group found for id "${n}"`);const m=Ee(n,i);N(m,`No resize handles found for group id "${n}"`);const u=m.map(f=>{const v=f.getAttribute(K.resizeHandleId);N(v,"Resize handle element has no handle id attribute");const[x,k]=er(n,v,c,i);if(x==null||k==null)return()=>{};const b=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const C=c.findIndex(I=>I.id===x);if(C>=0){const I=c[C];N(I,`No panel data found for index ${C}`);const j=r[C],{collapsedSize:F=0,collapsible:$,minSize:g=0}=I.constraints;if(j!=null&&$){const G=je({delta:ee(j,F)?g-F:F-j,initialLayout:r,panelConstraints:c.map(W=>W.constraints),pivotIndices:Tt(n,v,i),prevLayout:r,trigger:"keyboard"});r!==G&&o(G)}}break}}};return f.addEventListener("keydown",b),()=>{f.removeEventListener("keydown",b)}});return()=>{u.forEach(f=>f())}},[i,t,e,n,r,s,o])}function ut(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Ot(t,e){const n=t==="horizontal",{x:r,y:s}=Te(e);return n?r:s}function nr(t,e,n,r,s){const i=n==="horizontal",o=Oe(e,s);N(o,`No resize handle element found for id "${e}"`);const l=o.getAttribute(K.groupId);N(l,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const d=Ot(n,t),m=Ht(l,s);N(m,`No group element found for id "${l}"`);const u=m.getBoundingClientRect(),f=i?u.width:u.height;return(d-c)/f*100}function rr(t,e,n,r,s,i){if(Et(t)){const o=n==="horizontal";let l=0;t.shiftKey?l=100:s!=null?l=s:l=10;let c=0;switch(t.key){case"ArrowDown":c=o?0:l;break;case"ArrowLeft":c=o?-l:0;break;case"ArrowRight":c=o?l:0;break;case"ArrowUp":c=o?0:-l;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return r==null?0:nr(t,e,n,r,i)}function sr({panelDataArray:t}){const e=Array(t.length),n=t.map(i=>i.constraints);let r=0,s=100;for(let i=0;i<t.length;i++){const o=n[i];N(o,`Panel constraints not found for index ${i}`);const{defaultSize:l}=o;l!=null&&(r++,e[i]=l,s-=l)}for(let i=0;i<t.length;i++){const o=n[i];N(o,`Panel constraints not found for index ${i}`);const{defaultSize:l}=o;if(l!=null)continue;const c=t.length-r,d=s/c;r++,e[i]=d,s-=d}return e}function ge(t,e,n){e.forEach((r,s)=>{const i=t[s];N(i,`Panel data not found for index ${s}`);const{callbacks:o,constraints:l,id:c}=i,{collapsedSize:d=0,collapsible:m}=l,u=n[c];if(u==null||r!==u){n[c]=r;const{onCollapse:f,onExpand:v,onResize:x}=o;x&&x(r,u),m&&(f||v)&&(v&&(u==null||ce(u,d))&&!ce(r,d)&&v(),f&&(u==null||!ce(u,d))&&ce(r,d)&&f())}})}function Me(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function ir({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:s,precision:i=3}){const o=n[s];let l;return o==null?l=t!=null?t.toPrecision(i):"1":r.length===1?l="1":l=o.toPrecision(i),{flexBasis:0,flexGrow:l,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function or(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function dt(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function Ut(t){return`react-resizable-panels:${t}`}function Ft(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:i}=e;return s?r:i?`${i}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function Wt(t,e){try{const n=Ut(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function lr(t,e,n){var r,s;const i=(r=Wt(t,n))!==null&&r!==void 0?r:{},o=Ft(e);return(s=i[o])!==null&&s!==void 0?s:null}function ar(t,e,n,r,s){var i;const o=Ut(t),l=Ft(e),c=(i=Wt(t,s))!==null&&i!==void 0?i:{};c[l]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function ft({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((i,o)=>i+o,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(i=>`${i}%`).join(", ")}`);if(!ee(r,100)&&n.length>0)for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=100/r*o;n[i]=l}let s=0;for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=ye({panelConstraints:e,panelIndex:i,size:o});o!=l&&(s+=o-l,n[i]=l)}if(!ee(s,0))for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=o+s,c=ye({panelConstraints:e,panelIndex:i,size:l});if(o!==c&&(s-=c-o,n[i]=c,ee(s,0)))break}return n}const cr=100,ke={getItem:t=>(dt(ke),ke.getItem(t)),setItem:(t,e)=>{dt(ke),ke.setItem(t,e)}},mt={};function Bt({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:i=null,onLayout:o=null,keyboardResizeBy:l=null,storage:c=ke,style:d,tagName:m="div",...u}){const f=Ze(i),v=h.useRef(null),[x,k]=h.useState(null),[b,w]=h.useState([]),C=Jn(),I=h.useRef({}),j=h.useRef(new Map),F=h.useRef(0),$=h.useRef({autoSaveId:t,direction:r,dragState:x,id:f,keyboardResizeBy:l,onLayout:o,storage:c}),g=h.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});h.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),h.useImperativeHandle(s,()=>({getId:()=>$.current.id,getLayout:()=>{const{layout:p}=g.current;return p},setLayout:p=>{const{onLayout:z}=$.current,{layout:M,panelDataArray:P}=g.current,y=ft({layout:p,panelConstraints:P.map(E=>E.constraints)});ut(M,y)||(w(y),g.current.layout=y,z&&z(y),ge(P,y,I.current))}}),[]),pe(()=>{$.current.autoSaveId=t,$.current.direction=r,$.current.dragState=x,$.current.id=f,$.current.onLayout=o,$.current.storage=c}),tr({committedValuesRef:$,eagerValuesRef:g,groupId:f,layout:b,panelDataArray:g.current.panelDataArray,setLayout:w,panelGroupElement:v.current}),h.useEffect(()=>{const{panelDataArray:p}=g.current;if(t){if(b.length===0||b.length!==p.length)return;let z=mt[t];z==null&&(z=or(ar,cr),mt[t]=z);const M=[...p],P=new Map(j.current);z(t,M,P,b,c)}},[t,b,c]),h.useEffect(()=>{});const G=h.useCallback(p=>{const{onLayout:z}=$.current,{layout:M,panelDataArray:P}=g.current;if(p.constraints.collapsible){const y=P.map(se=>se.constraints),{collapsedSize:E=0,panelSize:U,pivotIndices:X}=fe(P,p,M);if(N(U!=null,`Panel size not found for panel "${p.id}"`),!ce(U,E)){j.current.set(p.id,U);const ie=ve(P,p)===P.length-1?U-E:E-U,q=je({delta:ie,initialLayout:M,panelConstraints:y,pivotIndices:X,prevLayout:M,trigger:"imperative-api"});Me(M,q)||(w(q),g.current.layout=q,z&&z(q),ge(P,q,I.current))}}},[]),W=h.useCallback((p,z)=>{const{onLayout:M}=$.current,{layout:P,panelDataArray:y}=g.current;if(p.constraints.collapsible){const E=y.map(ne=>ne.constraints),{collapsedSize:U=0,panelSize:X=0,minSize:se=0,pivotIndices:ie}=fe(y,p,P),q=z??se;if(ce(X,U)){const ne=j.current.get(p.id),Se=ne!=null&&ne>=q?ne:q,Ue=ve(y,p)===y.length-1?X-Se:Se-X,Q=je({delta:Ue,initialLayout:P,panelConstraints:E,pivotIndices:ie,prevLayout:P,trigger:"imperative-api"});Me(P,Q)||(w(Q),g.current.layout=Q,M&&M(Q),ge(y,Q,I.current))}}},[]),O=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{panelSize:P}=fe(M,p,z);return N(P!=null,`Panel size not found for panel "${p.id}"`),P},[]),A=h.useCallback((p,z)=>{const{panelDataArray:M}=g.current,P=ve(M,p);return ir({defaultSize:z,dragState:x,layout:b,panelData:M,panelIndex:P})},[x,b]),D=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{collapsedSize:P=0,collapsible:y,panelSize:E}=fe(M,p,z);return N(E!=null,`Panel size not found for panel "${p.id}"`),y===!0&&ce(E,P)},[]),V=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{collapsedSize:P=0,collapsible:y,panelSize:E}=fe(M,p,z);return N(E!=null,`Panel size not found for panel "${p.id}"`),!y||he(E,P)>0},[]),_=h.useCallback(p=>{const{panelDataArray:z}=g.current;z.push(p),z.sort((M,P)=>{const y=M.order,E=P.order;return y==null&&E==null?0:y==null?-1:E==null?1:y-E}),g.current.panelDataArrayChanged=!0,C()},[C]);pe(()=>{if(g.current.panelDataArrayChanged){g.current.panelDataArrayChanged=!1;const{autoSaveId:p,onLayout:z,storage:M}=$.current,{layout:P,panelDataArray:y}=g.current;let E=null;if(p){const X=lr(p,y,M);X&&(j.current=new Map(Object.entries(X.expandToSizes)),E=X.layout)}E==null&&(E=sr({panelDataArray:y}));const U=ft({layout:E,panelConstraints:y.map(X=>X.constraints)});ut(P,U)||(w(U),g.current.layout=U,z&&z(U),ge(y,U,I.current))}}),pe(()=>{const p=g.current;return()=>{p.layout=[]}},[]);const L=h.useCallback(p=>{let z=!1;const M=v.current;return M&&window.getComputedStyle(M,null).getPropertyValue("direction")==="rtl"&&(z=!0),function(y){y.preventDefault();const E=v.current;if(!E)return()=>null;const{direction:U,dragState:X,id:se,keyboardResizeBy:ie,onLayout:q}=$.current,{layout:ne,panelDataArray:Se}=g.current,{initialLayout:Ne}=X??{},Ue=Tt(se,p,E);let Q=rr(y,p,U,X,ie,E);const rt=U==="horizontal";rt&&z&&(Q=-Q);const Zt=Se.map(en=>en.constraints),ze=je({delta:Q,initialLayout:Ne??ne,panelConstraints:Zt,pivotIndices:Ue,prevLayout:ne,trigger:Et(y)?"keyboard":"mouse-or-touch"}),st=!Me(ne,ze);(Nt(y)||$t(y))&&F.current!=Q&&(F.current=Q,!st&&Q!==0?rt?Ge(p,Q<0?It:Rt):Ge(p,Q<0?Dt:Lt):Ge(p,0)),st&&(w(ze),g.current.layout=ze,q&&q(ze),ge(Se,ze,I.current))}},[]),T=h.useCallback((p,z)=>{const{onLayout:M}=$.current,{layout:P,panelDataArray:y}=g.current,E=y.map(ne=>ne.constraints),{panelSize:U,pivotIndices:X}=fe(y,p,P);N(U!=null,`Panel size not found for panel "${p.id}"`);const ie=ve(y,p)===y.length-1?U-z:z-U,q=je({delta:ie,initialLayout:P,panelConstraints:E,pivotIndices:X,prevLayout:P,trigger:"imperative-api"});Me(P,q)||(w(q),g.current.layout=q,M&&M(q),ge(y,q,I.current))},[]),H=h.useCallback((p,z)=>{const{layout:M,panelDataArray:P}=g.current,{collapsedSize:y=0,collapsible:E}=z,{collapsedSize:U=0,collapsible:X,maxSize:se=100,minSize:ie=0}=p.constraints,{panelSize:q}=fe(P,p,M);q!=null&&(E&&X&&ce(q,y)?ce(y,U)||T(p,U):q<ie?T(p,ie):q>se&&T(p,se))},[T]),Y=h.useCallback((p,z)=>{const{direction:M}=$.current,{layout:P}=g.current;if(!v.current)return;const y=Oe(p,v.current);N(y,`Drag handle element not found for id "${p}"`);const E=Ot(M,z);k({dragHandleId:p,dragHandleRect:y.getBoundingClientRect(),initialCursorPosition:E,initialLayout:P})},[]),te=h.useCallback(()=>{k(null)},[]),B=h.useCallback(p=>{const{panelDataArray:z}=g.current,M=ve(z,p);M>=0&&(z.splice(M,1),delete I.current[p.id],g.current.panelDataArrayChanged=!0,C())},[C]),S=h.useMemo(()=>({collapsePanel:G,direction:r,dragState:x,expandPanel:W,getPanelSize:O,getPanelStyle:A,groupId:f,isPanelCollapsed:D,isPanelExpanded:V,reevaluatePanelConstraints:H,registerPanel:_,registerResizeHandle:L,resizePanel:T,startDragging:Y,stopDragging:te,unregisterPanel:B,panelGroupElement:v.current}),[G,x,r,W,O,A,f,D,V,H,_,L,T,Y,te,B]),R={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return h.createElement(Ae.Provider,{value:S},h.createElement(m,{...u,children:e,className:n,id:i,ref:v,style:{...R,...d},[K.group]:"",[K.groupDirection]:r,[K.groupId]:f}))}const Gt=h.forwardRef((t,e)=>h.createElement(Bt,{...t,forwardedRef:e}));Bt.displayName="PanelGroup";Gt.displayName="forwardRef(PanelGroup)";function ve(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function fe(t,e,n){const r=ve(t,e),i=r===t.length-1?[r-1,r]:[r,r+1],o=n[r];return{...e.constraints,panelSize:o,pivotIndices:i}}function ur({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){h.useEffect(()=>{if(t||n==null||r==null)return;const s=Oe(e,r);if(s==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),n(o);break}case"F6":{o.preventDefault();const l=s.getAttribute(K.groupId);N(l,`No group element found for id "${l}"`);const c=Ee(l,r),d=At(l,e,r);N(d!==null,`No resize element found for id "${e}"`);const m=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[m].focus();break}}};return s.addEventListener("keydown",i),()=>{s.removeEventListener("keydown",i)}},[r,t,e,n])}function qt({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:i,onClick:o,onDragging:l,onFocus:c,onPointerDown:d,onPointerUp:m,style:u={},tabIndex:f=0,tagName:v="div",...x}){var k,b;const w=h.useRef(null),C=h.useRef({onClick:o,onDragging:l,onPointerDown:d,onPointerUp:m});h.useEffect(()=>{C.current.onClick=o,C.current.onDragging=l,C.current.onPointerDown=d,C.current.onPointerUp=m});const I=h.useContext(Ae);if(I===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:j,groupId:F,registerResizeHandle:$,startDragging:g,stopDragging:G,panelGroupElement:W}=I,O=Ze(s),[A,D]=h.useState("inactive"),[V,_]=h.useState(!1),[L,T]=h.useState(null),H=h.useRef({state:A});pe(()=>{H.current.state=A}),h.useEffect(()=>{if(n)T(null);else{const S=$(O);T(()=>S)}},[n,O,$]);const Y=(k=r?.coarse)!==null&&k!==void 0?k:15,te=(b=r?.fine)!==null&&b!==void 0?b:5;h.useEffect(()=>{if(n||L==null)return;const S=w.current;N(S,"Element ref not attached");let R=!1;return Xn(O,S,j,{coarse:Y,fine:te},(z,M,P)=>{if(!M){D("inactive");return}switch(z){case"down":{D("drag"),R=!1,N(P,'Expected event to be defined for "down" action'),g(O,P);const{onDragging:y,onPointerDown:E}=C.current;y?.(!0),E?.();break}case"move":{const{state:y}=H.current;R=!0,y!=="drag"&&D("hover"),N(P,'Expected event to be defined for "move" action'),L(P);break}case"up":{D("hover"),G();const{onClick:y,onDragging:E,onPointerUp:U}=C.current;E?.(!1),U?.(),R||y?.();break}}})},[Y,j,n,te,$,O,L,g,G]),ur({disabled:n,handleId:O,resizeHandler:L,panelGroupElement:W});const B={touchAction:"none",userSelect:"none"};return h.createElement(v,{...x,children:t,className:e,id:s,onBlur:()=>{_(!1),i?.()},onFocus:()=>{_(!0),c?.()},ref:w,role:"separator",style:{...B,...u},tabIndex:f,[K.groupDirection]:j,[K.groupId]:F,[K.resizeHandle]:"",[K.resizeHandleActive]:A==="drag"?"pointer":V?"keyboard":void 0,[K.resizeHandleEnabled]:!n,[K.resizeHandleId]:O,[K.resizeHandleState]:A})}qt.displayName="PanelResizeHandle";function ls(t){const e=J.c(10);let n,r,s;e[0]!==t?({className:n,ref:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let i;e[4]!==n?(i=xe("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),e[4]=n,e[5]=i):i=e[5];let o;return e[6]!==r||e[7]!==s||e[8]!==i?(o=a.jsx(Gt,{ref:s,"data-slot":"resizable-panel-group",className:i,...r}),e[6]=r,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function as(t){const e=J.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=a.jsx(Ct,{"data-slot":"resizable-panel",...n}),e[2]=n,e[3]=r):r=e[3],r}function cs(t){const e=J.c(12);let n,r,s;e[0]!==t?({withHandle:s,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let i;e[4]!==n?(i=xe("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),e[4]=n,e[5]=i):i=e[5];let o;e[6]!==s?(o=s&&a.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:a.jsx(fn,{className:"size-2.5"})}),e[6]=s,e[7]=o):o=e[7];let l;return e[8]!==r||e[9]!==i||e[10]!==o?(l=a.jsx(qt,{"data-slot":"resizable-handle",className:i,...r,children:o}),e[8]=r,e[9]=i,e[10]=o,e[11]=l):l=e[11],l}function dr(t){if(!t||t.includes("\\")||t.includes("..")||t.includes("\0"))return!0;try{const e=decodeURIComponent(t);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==t&&e.includes("/")){const n=(t.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>n)return!0}return!1}catch{return!0}}function fr(t){if(dr(t))throw new Error(`Invalid block key: ${t||"(empty)"}`)}function mr(t){try{return decodeURIComponent(t)}catch{return t}}function pr(t){return fr(t),encodeURIComponent(t)}function hr(t){return`.deco/blocks/${pr(t)}.json`}function us(t){return`/${hr(t)}`}const ds=1e4,xr=3;function Je(t){return t.trim()?(t.startsWith("/")?t:`/${t}`).replace(/\/+/g,"/"):"/"}function nt(t){return t.startsWith("/")?t.slice(1):t}function _e(t){return t.trim()?t.startsWith("/")?t:`/${t}`:"/"}function gr(t){const e=_e(t);if(e==="/")return"/";const n=e.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function fs(t,e){const n=e.replace(/^\/+|\/+$/g,"");return _e(n?`${t==="/"?"":t}/${n}`:t)}function ms(t,e){return e==="directory"?t:gr(t)}function ps(t){const e=t.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function vr(t){const e=nt(t);return e?e.split("/").filter(Boolean).length:0}function hs(t,e,n,r=!1){return{files:[...new Set([...t,...n.files])],directories:[...new Set([...e,...n.directories??[]])],truncated:r||!!n.truncated}}function xs(t,e){return vr(t)>=xr&&!e.has(t)}function gs(t,e,n=[]){const r=nt(t);if(e.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return e.some(i=>i.startsWith(s))||n.some(i=>i.startsWith(s))}function vs(t){const e=nt(t),n=".deco/blocks/";if(!e.startsWith(n)||!e.endsWith(".json"))return null;const r=e.slice(n.length,-5);return mr(r)}function wr(t){if(!t)return"plaintext";const e=t.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function ws(t){const e=Je(t).split("/").filter(Boolean),n=["/"];let r="";for(const s of e.slice(0,-1))r+=`/${s}`,n.push(r);return n}function ys(t,e=[]){const n={children:[]},r=i=>{const l=Je(i).split("/").filter(Boolean);let c=n,d="";for(const m of l){d+=`/${m}`;let u=c.children.find(f=>f.name===m);u?u.kind==="file"&&(u.kind="directory"):(u={name:m,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of t){const l=Je(i).split("/").filter(Boolean);let c=n,d="";l.forEach((m,u)=>{d+=`/${m}`;const f=u===l.length-1;let v=c.children.find(x=>x.name===m);v||(v={name:m,path:d,kind:f?"file":"directory",children:[]},c.children.push(v)),c=v})}for(const i of e)r(_e(i));const s=i=>{i.sort((o,l)=>o.kind!==l.kind?o.kind==="directory"?-1:1:o.name.localeCompare(l.name));for(const o of i)o.children.length>0&&s(o.children)};return s(n.children),n.children}function yr(t,e,n=0){const r=[];for(const s of t)s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&e.has(s.path)&&r.push(...yr(s.children,e,n+1)));return r}function bs(t){return t.split(`
|
|
2
|
-
`).map(e=>{const n=e.match(/^\d+\t(.*)/);return n?n[1]:e}).join(`
|
|
3
|
-
`)}bn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function br(t){const e=J.c(11),{value:n,filename:r}=t,[s]=nn(),i=s.theme==="dark"||s.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==r?(o=wr(r),e[0]=r,e[1]=o):o=e[1];const l=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("div",{className:"flex h-full w-full items-center justify-center",children:a.jsx(rn,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let d,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={enabled:!1},m={top:12,bottom:12},e[3]=d,e[4]=m):(d=e[3],m=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:d,padding:m,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let f;return e[6]!==r||e[7]!==o||e[8]!==l||e[9]!==n?(f=a.jsx(Sn,{path:r,language:o,value:n,theme:l,loading:c,options:u},r),e[6]=r,e[7]=o,e[8]=l,e[9]=n,e[10]=f):f=e[10],f}function Kt(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}const Sr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),zr=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),pt=2*1024*1024;function jr(t,e){const n=t.split(".").pop()?.toLowerCase()??"";return Sr.has(n)?"image":n==="pdf"?"pdf":n==="html"||n==="htm"?"html":n==="md"||n==="markdown"?e<=pt?"markdown":"download":zr.has(n)&&e<=pt?"text":"download"}function Vt(){const t=J.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx($e,{className:"h-6 w-2/3"}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx("div",{className:"flex h-full w-full items-center justify-center",children:a.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,a.jsxs("div",{className:"flex flex-col gap-1.5",children:[a.jsx($e,{className:"h-3 w-full"}),a.jsx($e,{className:"h-3 w-5/6"}),a.jsx($e,{className:"h-3 w-2/3"})]})]})}),t[1]=n):n=t[1],n}function Xt(t){const e=J.c(20),{file:n,note:r}=t;let s;e[0]!==n.filename?(s=a.jsx(Xe,{filename:n.filename,className:"h-12 w-10"}),e[0]=n.filename,e[1]=s):s=e[1];let i;e[2]!==n.filename?(i=a.jsx("span",{className:"text-sm font-medium text-foreground",children:n.filename}),e[2]=n.filename,e[3]=i):i=e[3];let o;e[4]!==n.size?(o=Kt(n.size),e[4]=n.size,e[5]=o):o=e[5];const l=r?` · ${r}`:"";let c;e[6]!==o||e[7]!==l?(c=a.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,l]}),e[6]=o,e[7]=l,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=a.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,c]}),e[9]=i,e[10]=c,e[11]=d):d=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(Re,{size:14}),e[12]=m):m=e[12];let u;e[13]!==n.downloadUrl||e[14]!==n.filename?(u=a.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:a.jsxs("a",{href:n.downloadUrl,download:n.filename,children:[m,"Download"]})}),e[13]=n.downloadUrl,e[14]=n.filename,e[15]=u):u=e[15];let f;return e[16]!==s||e[17]!==d||e[18]!==u?(f=a.jsx("div",{className:"flex h-full w-full items-center justify-center",children:a.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[s,d,u]})}),e[16]=s,e[17]=d,e[18]=u,e[19]=f):f=e[19],f}function ht(t){const e=J.c(16),{file:n,markdown:r}=t;let s;e[0]!==n.downloadUrl?(s=Ke.fileText(n.downloadUrl),e[0]=n.downloadUrl,e[1]=s):s=e[1];let i;e[2]!==n.downloadUrl?(i=async()=>{const u=await fetch(n.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=n.downloadUrl,e[3]=i):i=e[3];let o;e[4]!==s||e[5]!==i?(o={queryKey:s,queryFn:i,staleTime:6e4,retry:!1},e[4]=s,e[5]=i,e[6]=o):o=e[6];const{data:l,isPending:c,isError:d}=sn(o);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx(Vt,{}),e[7]=u):u=e[7],u}if(d||l===void 0){let u;return e[8]!==n?(u=a.jsx(Xt,{file:n,note:"preview unavailable"}),e[8]=n,e[9]=u):u=e[9],u}if(r){const u=`file-preview-${n.key}`;let f;return e[10]!==l||e[11]!==u?(f=a.jsx("div",{className:"h-full overflow-y-auto",children:a.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:a.jsx(zn,{id:u,text:l})})}),e[10]=l,e[11]=u,e[12]=f):f=e[12],f}let m;return e[13]!==l||e[14]!==n.filename?(m=a.jsx(br,{value:l,filename:n.filename}),e[13]=l,e[14]=n.filename,e[15]=m):m=e[15],m}function kr(t){const e=J.c(15),{file:n}=t;switch(jr(n.filename,n.size)){case"image":{let s;return e[0]!==n.downloadUrl||e[1]!==n.filename?(s=a.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:a.jsx("img",{src:n.downloadUrl,alt:n.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=n.downloadUrl,e[1]=n.filename,e[2]=s):s=e[2],s}case"pdf":{let s;return e[3]!==n.downloadUrl||e[4]!==n.filename?(s=a.jsx("iframe",{src:n.downloadUrl,title:n.filename,className:"block h-full w-full bg-white"}),e[3]=n.downloadUrl,e[4]=n.filename,e[5]=s):s=e[5],s}case"html":{let s;return e[6]!==n.downloadUrl||e[7]!==n.filename?(s=a.jsx("iframe",{src:n.downloadUrl,title:n.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=n.downloadUrl,e[7]=n.filename,e[8]=s):s=e[8],s}case"markdown":{let s;return e[9]!==n?(s=a.jsx(ht,{file:n,markdown:!0}),e[9]=n,e[10]=s):s=e[10],s}case"text":{let s;return e[11]!==n?(s=a.jsx(ht,{file:n,markdown:!1}),e[11]=n,e[12]=s):s=e[12],s}default:{let s;return e[13]!==n?(s=a.jsx(Xt,{file:n}),e[13]=n,e[14]=s):s=e[14],s}}}function Pr(t){const e=J.c(40),{readUrl:n,editor:r,downloadName:s,trailing:i}=t;let o;e[0]!==n?(o=new URL(n,window.location.origin).toString(),e[0]=n,e[1]=o):o=e[1];const l=o;let c;e[2]!==r?(c=r.deckDetected&&a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:r.railOpen?"secondary":"ghost",size:"icon","aria-label":r.railOpen?"Hide slide list":"Show slide list",onClick:()=>r.setRailOpen(!r.railOpen),children:a.jsx(Cn,{size:14})})}),a.jsx(ae,{side:"bottom",children:r.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==l?(d=()=>window.open(l,"_blank","noopener"),e[4]=l,e[5]=d):d=e[5];let m;e[6]!==l?(m=a.jsx("span",{className:"truncate",children:l}),e[6]=l,e[7]=m):m=e[7];let u;e[8]!==l||e[9]!==d||e[10]!==m?(u=a.jsx("button",{type:"button",onClick:d,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:l,children:m}),e[8]=l,e[9]=d,e[10]=m,e[11]=u):u=e[11];let f;e[12]!==r.agentUpdated||e[13]!==r.reload?(f=r.agentUpdated&&a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:r.reload,children:[a.jsx(on,{size:12}),"Agent updated — reload"]})}),a.jsx(ae,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=r.agentUpdated,e[13]=r.reload,e[14]=f):f=e[14];let v;e[15]!==r.saving?(v=r.saving&&a.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=r.saving,e[16]=v):v=e[16];let x;e[17]!==r?(x=r.deckDetected&&r.writable&&a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:r.editMode?"secondary":"ghost",size:"icon","aria-label":r.editMode?"Done editing":"Edit inline",className:xe(r.editMode&&"text-primary"),onClick:()=>r.setEditMode(!r.editMode),children:a.jsx(mn,{size:14})})}),a.jsx(ae,{side:"bottom",children:r.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=r,e[18]=x):x=e[18];let k;e[19]!==l||e[20]!==s||e[21]!==r.deckDetected?(k=r.deckDetected?a.jsxs(jn,{children:[a.jsx(kn,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",children:a.jsx(Re,{size:14})})}),a.jsxs(Pn,{align:"end",children:[a.jsxs(it,{onClick:()=>window.open(`${l}#print`,"_blank","noopener"),children:[a.jsx(pn,{size:14}),"Export as PDF"]}),a.jsx(it,{asChild:!0,children:a.jsxs("a",{href:l,download:s,children:[a.jsx(hn,{size:14}),"Download HTML"]})})]})]}):a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:a.jsx("a",{href:l,download:s,children:a.jsx(Re,{size:14})})})}),a.jsx(ae,{side:"bottom",children:"Download"})]}),e[19]=l,e[20]=s,e[21]=r.deckDetected,e[22]=k):k=e[22];let b;e[23]!==l?(b=()=>window.open(l,"_blank","noopener"),e[23]=l,e[24]=b):b=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx(zt,{size:14}),e[25]=w):w=e[25];let C;e[26]!==b?(C=a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:b,children:w})}),e[26]=b,e[27]=C):C=e[27];let I;e[28]===Symbol.for("react.memo_cache_sentinel")?(I=a.jsx(ae,{side:"bottom",children:"Open in new tab"}),e[28]=I):I=e[28];let j;e[29]!==C?(j=a.jsxs(oe,{children:[C,I]}),e[29]=C,e[30]=j):j=e[30];let F;return e[31]!==j||e[32]!==c||e[33]!==u||e[34]!==f||e[35]!==v||e[36]!==x||e[37]!==k||e[38]!==i?(F=a.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[c,u,f,v,x,k,j,i]}),e[31]=j,e[32]=c,e[33]=u,e[34]=f,e[35]=v,e[36]=x,e[37]=k,e[38]=i,e[39]=F):F=e[39],F}const we=1;function Cr(t){if(typeof t!="object"||t===null||t.v!==we||t.source!=="deck-viewer")return null;const e=t;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class ue extends Error{constructor(e,n){super(e),this.code=n,this.name="DeckOpError"}code}function Yt(t){return[...t.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function Er(t){const n=new DOMParser().parseFromString(t,"text/html").querySelector("deck-viewer");return n?Yt(n).length:null}function Nr(t,e){const n=new DOMParser().parseFromString(t,"text/html"),r=n.querySelector("deck-viewer");if(!r)throw new ue("no <deck-viewer> element in source","no-viewer");const s=Yt(r),i=e.kind==="move"?e.from:e.at,o=s[i];if(!o)throw new ue(`slide index ${i} out of range (${s.length})`,"stale-index");switch(e.kind){case"remove":{if(s.length<=1)throw new ue("cannot remove the last slide","bad-op");o.remove();break}case"duplicate":{const c=o.cloneNode(!0);c.removeAttribute("id");for(const d of c.querySelectorAll("[id]"))d.removeAttribute("id");o.after(c);break}case"move":{if(e.to<0||e.to>=s.length)throw new ue(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?s[e.to]:s[e.to].nextSibling;r.insertBefore(o,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new ue(`invalid attribute name: ${e.name}`,"bad-op");o.setAttribute(e.name,e.value);break}case"remove-attr":{o.removeAttribute(e.name);break}case"replace":{const d=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!d)throw new ue("replace html has no root element","bad-op");o.replaceWith(n.importNode(d,!0));break}default:throw new ue(`unknown op kind: ${e.kind}`,"bad-op")}return`${t.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
|
-
`:""}${n.documentElement.outerHTML}
|
|
5
|
-
`}const xt="home",$r=400,Mr=800;function Ir(t){const e=t.savePath!==void 0,{org:n}=ln(),r=an(),s=En(xt),[i,o]=h.useState(!1),[l,c]=h.useState(!1),[d,m]=h.useState(!1),[u,f]=h.useState(!1),[v,x]=h.useState(!1),[k,b]=h.useState(!1),[w,C]=h.useState(null),[I,j]=h.useState(null),[F,$]=h.useState(0),[g]=h.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),G=i||k||v,W=()=>{t.savePath!==void 0&&(r.invalidateQueries({queryKey:Ke.orgFsStat(n.id,xt,t.savePath)}),r.invalidateQueries({queryKey:Ke.orgFsRecent(n.id)}))},O=S=>{g.iframe?.contentWindow?.postMessage(S,"*")},A=()=>{g.source=null,f(!1),I&&C(I),$(S=>S+1),W()};t.statMarker!==I&&(j(t.statMarker),t.statMarker!==null&&(w===null?C(t.statMarker):g.selfMarkers.has(t.statMarker)||t.statMarker!==w&&(G?f(!0):(g.source=null,C(t.statMarker)))));const D=async()=>{g.saveTimer=null;const S=g.source;if(S===null){b(!1);return}x(!0);try{const R=await s.mutateAsync({path:t.savePath,body:S});g.selfMarkers.add(jt(R)),W()}catch(R){console.error("[deck-editor] save failed",R),Pe.error("Couldn't save deck edits — reloading the preview."),H.current.reload()}finally{x(!1),b(!1)}},V=S=>{b(!0),g.saveTimer&&clearTimeout(g.saveTimer),g.saveTimer=setTimeout(()=>{H.current.flushSave()},S)},_=(S,R,p)=>{O({v:we,type:"ack",opId:S,ok:R,error:p})},L=async S=>{if(!e){_(S.opId,!1,"read-only preview");return}try{if(g.source===null){const p=await fetch(t.readUrl,{credentials:"include"});if(!p.ok)throw new Error(`HTTP ${p.status}`);g.source=await p.text()}const R=Er(g.source);if(R===null||R!==S.witness.childCount)throw new ue(`slide count drifted (source ${R}, iframe ${S.witness.childCount})`,"stale-index");g.source=Nr(g.source,S.op),_(S.opId,!0),V(S.op.kind==="replace"?Mr:$r)}catch(R){console.error("[deck-editor] op failed",S.op,R),_(S.opId,!1,R instanceof Error?R.message:String(R)),Pe.error("That edit couldn't be saved — reloading the preview."),H.current.reload()}},T=S=>{if(!g.iframe||S.source!==g.iframe.contentWindow)return;const R=Cr(S.data);if(R){if(R.type==="ready"){c(!0),H.current.editMode?O({v:we,type:"set-edit-mode",enabled:!0}):H.current.railOpen&&O({v:we,type:"set-rail",open:!0});return}R.type==="op"&&(g.queue=g.queue.then(()=>H.current.handleOp(R)).catch(()=>{}))}},H=h.useRef({onMessage:T,handleOp:L,flushSave:D,reload:A,editMode:i,railOpen:d});H.current={onMessage:T,handleOp:L,flushSave:D,reload:A,editMode:i,railOpen:d};const[Y]=h.useState(()=>{let S=null;return R=>{if(R){g.iframe=R;const p=z=>H.current.onMessage(z);window.addEventListener("message",p),S=()=>window.removeEventListener("message",p)}else S?.(),S=null,g.iframe=null}}),te=S=>{m(S),O({v:we,type:"set-rail",open:S})},B=S=>{o(S),O({v:we,type:"set-edit-mode",enabled:S}),S&&m(!0),!S&&u&&!k&&!v&&A()};return{iframeRef:Y,deckDetected:l,writable:e,displayedMarker:w===null?null:`${w}.${F}`,editMode:i,setEditMode:B,railOpen:d,setRailOpen:te,saving:v,agentUpdated:u,reload:A,postToIframe:O}}const Rr=300;function Dr({readUrl:t,marker:e,title:n,savePath:r,trailing:s}){const i=Ir({readUrl:t,statMarker:e,savePath:r}),[o,l]=h.useState(null);if(i.displayedMarker===null)return null;const c=t.includes("?")?"&":"?",d=`${t}${c}v=${encodeURIComponent(i.displayedMarker)}`,m=o===d;return a.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[a.jsx(Pr,{readUrl:t,editor:i,downloadName:n.split("/").pop()??n,trailing:s}),a.jsx("div",{className:"relative flex-1",children:a.jsx("iframe",{ref:i.iframeRef,src:d,onLoad:()=>l(d),sandbox:"allow-scripts",className:xe("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",m?"opacity-100":"opacity-0"),style:{transitionDuration:`${Rr}ms`},title:n},d)})]})}const Lr=[{mode:"private",label:"Org only",Icon:cn},{mode:"public",label:"Public",Icon:St},{mode:"password",label:"Password",Icon:An}];function Jt(t){const e=J.c(38),{volume:n,path:r,kind:s,shareMode:i,effectivePublic:o,url:l}=t,c=Nn(n),{data:d}=kt(n,r),m=d?.shareMode??i,f=(d?.effectivePublic??o)&&m==="private",v=s==="dir",x=v?"folder":"file",[k,b]=h.useState(!1),[w,C]=h.useState(""),[I,j]=h.useState(!1);let F;e[0]!==r||e[1]!==c||e[2]!==x?(F=(B,S)=>{c.mutate({path:r,mode:B,password:S},{onSuccess:()=>{b(!1),C(""),Pe.success(B==="private"?`This ${x} is now org-only`:B==="public"?`Anyone with the link can now view this ${x}`:`This ${x} is now password-protected`)},onError:_r})},e[0]=r,e[1]=c,e[2]=x,e[3]=F):F=e[3];const $=F;let g;e[4]!==$?(g=B=>{if(B==="password"){b(!0);return}b(!1),$(B)},e[4]=$,e[5]=g):g=e[5];const G=g,W=k?"password":m;let O;e[6]!==l?(O=async()=>{l&&(await navigator.clipboard.writeText(l),j(!0),Pe.success("Link copied to clipboard"),setTimeout(()=>j(!1),2e3))},e[6]=l,e[7]=O):O=e[7];const A=O;let D;e[8]!==I||e[9]!==A||e[10]!==l?(D=l?a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input bg-muted/50 px-2 py-1.5",children:[a.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:l}),a.jsx(Z,{variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:A,"aria-label":"Copy link",children:I?a.jsx(Ln,{size:12,className:"text-green-600"}):a.jsx(_n,{size:12})})]}):null,e[8]=I,e[9]=A,e[10]=l,e[11]=D):D=e[11];const V=D;if(f){let B;e[12]===Symbol.for("react.memo_cache_sentinel")?(B=a.jsx("div",{className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:a.jsx(St,{size:16})}),e[12]=B):B=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Shared via a parent folder"}),e[13]=S):S=e[13];const R=v?"files in this folder":"this file";let p;e[14]!==R?(p=a.jsxs("div",{className:"flex items-start gap-3",children:[B,a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[S,a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Anyone with the link can view"," ",R,". Manage sharing on the parent folder."]})]})]}),e[14]=R,e[15]=p):p=e[15];let z;return e[16]!==V||e[17]!==p?(z=a.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[p,V]}),e[16]=V,e[17]=p,e[18]=z):z=e[18],z}let _;e[19]!==W||e[20]!==G||e[21]!==c.isPending?(_=Lr.map(B=>{const{mode:S,label:R,Icon:p}=B;return a.jsxs("button",{type:"button",disabled:c.isPending,onClick:()=>G(S),className:xe("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors disabled:opacity-60",W===S?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[a.jsx(p,{size:15}),R]},S)}),e[19]=W,e[20]=G,e[21]=c.isPending,e[22]=_):_=e[22];let L;e[23]!==_?(L=a.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-lg bg-muted p-1",children:_}),e[23]=_,e[24]=L):L=e[24];const T=W==="private"?`Only members of your organization can open ${v?"these files":"this link"}.`:W==="public"?v?"Anyone on the internet can view files in this folder via their link.":"Anyone on the internet with the link can view this file.":`Anyone with the link AND the password can view ${v?"files in this folder":"this file"}.`;let H;e[25]!==T?(H=a.jsx("p",{className:"text-xs text-muted-foreground",children:T}),e[25]=T,e[26]=H):H=e[26];let Y;e[27]!==W||e[28]!==$||e[29]!==m||e[30]!==w||e[31]!==c.isPending?(Y=W==="password"&&a.jsxs("form",{className:"flex items-center gap-2",onSubmit:B=>{B.preventDefault(),w&&$("password",w)},children:[a.jsx(Mn,{type:"password",value:w,onChange:B=>C(B.target.value),placeholder:m==="password"?"New password":"Password",autoComplete:"new-password",className:"h-8 text-xs"}),a.jsx(Z,{type:"submit",size:"sm",className:"shrink-0",disabled:!w||c.isPending,children:m==="password"?"Update":"Set"})]}),e[27]=W,e[28]=$,e[29]=m,e[30]=w,e[31]=c.isPending,e[32]=Y):Y=e[32];let te;return e[33]!==V||e[34]!==L||e[35]!==H||e[36]!==Y?(te=a.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[L,H,Y,V]}),e[33]=V,e[34]=L,e[35]=H,e[36]=Y,e[37]=te):te=e[37],te}function _r(t){return Pe.error(t instanceof Error?t.message:"Failed to update sharing")}function gt(t){const e=J.c(7),{volume:n,path:r,shareMode:s,effectivePublic:i,url:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(In,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Share",children:a.jsx(xn,{size:14})})})}),a.jsx(ae,{side:"bottom",children:"Share"})]}),e[0]=l):l=e[0];let c;return e[1]!==i||e[2]!==r||e[3]!==s||e[4]!==o||e[5]!==n?(c=a.jsxs(Rn,{children:[l,a.jsx(Dn,{align:"end",className:"w-80 p-3",children:a.jsx(Jt,{volume:n,path:r,kind:"file",shareMode:s,effectivePublic:i,url:o})})]}),e[1]=i,e[2]=r,e[3]=s,e[4]=o,e[5]=n,e[6]=c):c=e[6],c}function Ss(t){const e=J.c(11),{target:n,onOpenChange:r}=t,s=!!n,i=n?.kind==="dir"?"folder":"file";let o;e[0]!==i?(o=a.jsx(wn,{children:a.jsxs(Ve,{children:["Share ",i]})}),e[0]=i,e[1]=o):o=e[1];let l;e[2]!==n?(l=n&&a.jsx(Jt,{...n}),e[2]=n,e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==l?(c=a.jsxs(yt,{className:"sm:max-w-md",children:[o,l]}),e[4]=o,e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==s||e[9]!==c?(d=a.jsx(bt,{open:s,onOpenChange:r,children:c}),e[7]=r,e[8]=s,e[9]=c,e[10]=d):d=e[10],d}function Ar(t){const e=t?t.split("/").filter(Boolean):[],n=e[0]==="public",r=n?e[1]??null:null,s=n?r?`public-${r}`:null:e[0]??null,i=(n?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:s,dirPath:i,isPublic:n,publicSet:r,readOnly:n}}function zs(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const vt="public-";function Tr(t){return t.startsWith(vt)?t.slice(vt.length):null}function js(t,e){const n=Tr(t);return n?`public/${n}/${e}`:`${t}/${e}`}function Hr(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function Or(t){const e=J.c(11),{org:n,previewPath:r}=t;let s;e[0]!==r?(s=r.split("/").slice(0,-1).join("/"),e[0]=r,e[1]=s):s=e[1];const i=s;let o;e[2]!==n?(o={org:n},e[2]=n,e[3]=o):o=e[3];let l;e[4]!==i||e[5]!==r?(l={path:i,preview:r},e[4]=i,e[5]=r,e[6]=l):l=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(gn,{size:14}),e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==l?(d=a.jsx(Z,{variant:"ghost",size:"sm",asChild:!0,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:a.jsxs(un,{to:"/$org/files",params:o,search:l,children:[c,"See in library"]})}),e[8]=o,e[9]=l,e[10]=d):d=e[10],d}const Ur=t=>/\.html?$/i.test(t);function wt(t){const e=J.c(6),{onClose:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(yn,{size:14}),e[0]=r):r=e[0];let s;e[1]!==n?(s=a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",onClick:n,children:r})}),e[1]=n,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(ae,{side:"bottom",children:"Close"}),e[3]=i):i=e[3];let o;return e[4]!==s?(o=a.jsxs(oe,{children:[s,i]}),e[4]=s,e[5]=o):o=e[5],o}function Qt(t){const e=J.c(37),{previewPath:n,onClose:r,showSeeInLibrary:s,variant:i}=t,o=s===void 0?!1:s;let l;e[0]!==n?(l=Ar(n),e[0]=n,e[1]=l):l=e[1];const c=l,{volume:d,dirPath:m}=c,{data:u,isPending:f}=kt(d,m),v=$n(d??""),x=Hr(m);let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k={strict:!1},e[2]=k):k=e[2];const{org:b}=dn(k),w=i==="dialog";let C;e[3]!==b||e[4]!==n||e[5]!==o?(C=o&&b?a.jsx(Or,{org:b,previewPath:n}):null,e[3]=b,e[4]=n,e[5]=o,e[6]=C):C=e[6];const I=C,j=u&&u.kind==="file"?{key:n,filename:x,size:u.size,downloadUrl:v(u.path)}:null;if(j&&u&&Ur(x)){const O=j.downloadUrl;let A;e[7]!==u?(A=jt(u),e[7]=u,e[8]=A):A=e[8];const D=d??"",V=u.shareMode??"private",_=u.effectivePublic??!1,L=window.location.origin+j.downloadUrl;let T;e[9]!==m||e[10]!==L||e[11]!==D||e[12]!==V||e[13]!==_?(T=a.jsx(gt,{volume:D,path:m,shareMode:V,effectivePublic:_,url:L}),e[9]=m,e[10]=L,e[11]=D,e[12]=V,e[13]=_,e[14]=T):T=e[14];let H;e[15]!==w||e[16]!==r?(H=w?a.jsx("div",{className:"w-8 shrink-0"}):a.jsx(wt,{onClose:r}),e[15]=w,e[16]=r,e[17]=H):H=e[17];let Y;return e[18]!==I||e[19]!==T||e[20]!==H?(Y=a.jsxs(a.Fragment,{children:[T,I,H]}),e[18]=I,e[19]=T,e[20]=H,e[21]=Y):Y=e[21],a.jsxs(a.Fragment,{children:[w&&a.jsx(Ve,{className:"sr-only",children:x}),a.jsx(Dr,{readUrl:O,marker:A,title:x,savePath:d==="home"?m:void 0,trailing:Y},n)]})}const F=w?"h-11 py-1 pr-12 pl-2":"h-9 px-2";let $;e[22]!==F?($=xe("flex shrink-0 items-center gap-1 border-b border-border/60",F),e[22]=F,e[23]=$):$=e[23];let g;e[24]!==u?.effectivePublic||e[25]!==u?.shareMode||e[26]!==j||e[27]!==m||e[28]!==d?(g=j&&a.jsxs(a.Fragment,{children:[a.jsx(gt,{volume:d??"",path:m,shareMode:u?.shareMode??"private",effectivePublic:u?.effectivePublic??!1,url:window.location.origin+j.downloadUrl}),a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",asChild:!0,children:a.jsx("a",{href:j.downloadUrl,download:j.filename,children:a.jsx(Re,{size:14})})})}),a.jsx(ae,{side:"bottom",children:"Download"})]}),a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",onClick:()=>window.open(j.downloadUrl,"_blank","noopener"),children:a.jsx(zt,{size:14})})}),a.jsx(ae,{side:"bottom",children:"Open in new tab"})]})]}),e[24]=u?.effectivePublic,e[25]=u?.shareMode,e[26]=j,e[27]=m,e[28]=d,e[29]=g):g=e[29];let G;e[30]!==w||e[31]!==r?(G=!w&&a.jsx(wt,{onClose:r}),e[30]=w,e[31]=r,e[32]=G):G=e[32];let W;return e[33]!==j||e[34]!==x||e[35]!==f?(W=a.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:j?a.jsx(kr,{file:j}):f?a.jsx(Vt,{}):a.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[a.jsx(Xe,{filename:x,className:"h-7.5 w-6"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"This file is no longer available."})]})}),e[33]=j,e[34]=x,e[35]=f,e[36]=W):W=e[36],a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:$,children:[a.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 px-2",children:[a.jsx(Xe,{filename:x,className:"h-4.5 w-3.5 shrink-0"}),w?a.jsx(Ve,{className:"truncate text-xs font-medium text-foreground",children:x}):a.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:x}),j&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Kt(j.size)})]}),I,g,G]}),W]})}function ks(t){const e=J.c(4),{previewPath:n,onClose:r,showSeeInLibrary:s}=t,i=s===void 0?!1:s;let o;return e[0]!==r||e[1]!==n||e[2]!==i?(o=a.jsx("div",{className:"flex h-full w-full flex-col bg-background",children:a.jsx(Qt,{previewPath:n,onClose:r,showSeeInLibrary:i,variant:"panel"})}),e[0]=r,e[1]=n,e[2]=i,e[3]=o):o=e[3],o}function Fr(t){const e=J.c(5),{icon:n}=t;if(n.kind==="component"){const{Component:s}=n;let i;return e[0]!==s?(i=a.jsx(s,{className:"size-4"}),e[0]=s,e[1]=i):i=e[1],i}if(n.kind==="url"){let s;return e[2]!==n.src?(s=a.jsx("img",{src:n.src,alt:"",className:"size-4 rounded-sm object-cover"}),e[2]=n.src,e[3]=s):s=e[3],s}let r;return e[4]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(vn,{className:"size-4"}),e[4]=r):r=e[4],r}function Ps(t){const e=J.c(13),{title:n,icon:r,active:s,onClick:i}=t,o=s?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let l;e[0]!==o?(l=xe("shrink-0 flex items-center gap-1.5 h-8 rounded-md px-2","[transition:background-color_180ms_ease,color_180ms_ease]",o),e[0]=o,e[1]=l):l=e[1];let c;e[2]!==r?(c=a.jsx("span",{className:"flex size-5 items-center justify-center shrink-0",children:a.jsx(Fr,{icon:r})}),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==n?(d=a.jsx("span",{className:"whitespace-nowrap text-sm font-medium leading-none",children:n}),e[4]=n,e[5]=d):d=e[5];let m;return e[6]!==s||e[7]!==i||e[8]!==l||e[9]!==c||e[10]!==d||e[11]!==n?(m=a.jsxs("button",{type:"button",onClick:i,"aria-pressed":s,"aria-label":n,className:l,children:[c,d]}),e[6]=s,e[7]=i,e[8]=l,e[9]=c,e[10]=d,e[11]=n,e[12]=m):m=e[12],m}function Cs(t){const e=J.c(9),{previewPath:n,onClose:r,showSeeInLibrary:s}=t,i=s===void 0?!1:s;let o;e[0]!==r?(o=d=>{d||r()},e[0]=r,e[1]=o):o=e[1];let l;e[2]!==r||e[3]!==n||e[4]!==i?(l=a.jsx(yt,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:a.jsx(Qt,{previewPath:n,onClose:r,showSeeInLibrary:i,variant:"dialog"})}),e[2]=r,e[3]=n,e[4]=i,e[5]=l):l=e[5];let c;return e[6]!==o||e[7]!==l?(c=a.jsx(bt,{open:!0,onOpenChange:o,children:l}),e[6]=o,e[7]=l,e[8]=c):c=e[8],c}export{gr as A,fs as B,gs as C,vs as D,xr as E,Vt as F,hs as G,Dr as H,ks as L,ls as R,Ss as S,Fr as T,us as a,fr as b,kr as c,hr as d,gt as e,Kt as f,wr as g,cs as h,as as i,Ps as j,Cs as k,Hr as l,zs as m,Tr as n,js as o,Ar as p,ds as q,ws as r,ys as s,yr as t,ms as u,nt as v,_e as w,xs as x,bs as y,ps as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,D as H,j as A}from"./index-CFiyU0D9.js";import{l as L,g as E,s as y}from"./scroll-area-BM-54tW1.js";import{p as O,u as k}from"./use-mcp-client-xOK-OF8p.js";import{b as q,c as B}from"./use-mcp-tools-C8tMWwG9.js";import{u as Y}from"./index-CRxAjd1d.js";import{c as G}from"./content-blocks-o63cs2vh.js";import{g as K,M as V,a as w}from"./types-C7syjwde.js";import{u as z,b as F}from"./chat-context-n9syhvq-.js";import{b as J}from"./shell-layout-Nyz7GHu7.js";import"./agent-icon-oDx9Z_Be.js";import"./AlertCircle-DC-zDzV-.js";import"./Tool01-CvnpFI53.js";import"./SwitchHorizontal01-DAZXInW8.js";import"./Settings02-BcAnTzm5.js";import"./XCircle-Ct0eqqsw.js";import"./ArrowUpRight-OJZisFPQ.js";import"./ZapSquare-PMiGcZpW.js";import"./Users03-DknrDMtT.js";import"./CheckCircle-Cgnheu-R.js";import"./ChevronUp-DBpw6M-L.js";import"./ChevronDown-DyHvxYlc.js";import"./ChevronLeft-dyRjFCmp.js";import"./ChevronRight-Cpfh3gza.js";import"./DotsVertical-5jSu3d1f.js";import"./Stars02-qnq-_X9g.js";import"./Eye-bojNLUjA.js";import"./ZoomOut-6ix2H92j.js";import"./Globe01-CyfpzbeQ.js";import"./FilterLines-CFl65nng.js";import"./Star01-DHEkWySe.js";import"./Globe04-DFpdKSRI.js";import"./HardDrive-B1mtnaeA.js";import"./Key01-CwrJlZo0.js";import"./LayoutLeft-fsm0LcB8.js";import"./LinkExternal01-BHwVyDja.js";import"./Monitor01-ChA6ov2I.js";import"./Sun-lTiqxOzH.js";import"./Palette-DusYqL0W.js";import"./Play-CnXG8qqP.js";import"./Plus-eGxBB1d8.js";import"./SearchLg-CDpA_lbT.js";import"./SearchMd-ujiTPCmg.js";import"./Shield01-ZxmFmrvL.js";import"./Stars01-BdCaKqhF.js";import"./Trash01-ByxlxTiZ.js";import"./Upload01-Z77n1bV8.js";import"./User01-COQtf360.js";import"./Users01-wtRJYQKX.js";import"./XClose-BaZ908gw.js";import"./X-DrMVHLcw.js";import"./Zap-wRIFSWIq.js";import"./use-clock-tick-BcxdOJLx.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Xy0buIqd.js";import"./tooltip-DrpiSbRG.js";import"./file-type-icon-DPWxBpNL.js";import"./dialog-BAqFyO8a.js";import"./use-mobile-NlF-3RoP.js";import"./tab-id-BptcWVWa.js";import"./hooks-CUSV6Enf.js";import"./decopilot-sse-pool-CvYk1hkc.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-CNO5iCKk.js";import"./sheet-DyU03ddw.js";import"./integration-icon-LQhkkaLl.js";import"./use-virtual-mcp-2U_MnYnK.js";import"./use-collections-B4atckEK.js";import"./use-navigate-to-agent-DZubxUSm.js";import"./use-connection-Dz29RF9P.js";import"./use-mcp-prompts-Crr3H7P7.js";import"./form-DGE2mWLL.js";import"./label-CdBSUJpf.js";import"./input-BwRH-Gsz.js";import"./select-C6v8Xcth.js";import"./auth-Bej0Tx2Y.js";import"./index-mEtg0zTM.js";import"./drawer-CFkqEC3w.js";import"./collection-search-8iNXnGlM.js";import"./tabs-Ca0vDJqc.js";import"./toggle-group-9TrYMc69.js";import"./sortable.esm-MymOIPKk.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C6NYo4Gp.js";import"./use-registry-connections-BOZLpkM5.js";import"./use-organization-settings-DksiQdGc.js";import"./useInfiniteQuery-RUqqRph1.js";import"./use-infinite-scroll-BX1nHHVY.js";import"./extract-connection-data-D6bQrejT.js";import"./card-BFb5m83e.js";import"./collection-tabs-KA2be3wH.js";import"./badge-DhpSM7g_.js";import"./textarea-BYT525JZ.js";import"./connection-form-helpers-CwZx7WkC.js";import"./authenticate-and-persist-oauth-DoPUB_Bh.js";import"./mcp-oauth-IblqU9XT.js";import"./useSuspenseInfiniteQuery-fRYRtDkY.js";import"./use-ai-providers-C7KmiuqP.js";import"./connect-desktop-dialog-Brra3cMC.js";import"./decopilot-BItqS11w.js";import"./checkbox-DmOzmKLP.js";import"./skeleton-B0I93PJP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-CJP1BOq4.js";import"./settings-section-MeT61nuY.js";import"./popover-BXFiEQtN.js";import"./command-C34397s2.js";import"./index-jBUpmiBg.js";import"./use-org-fs-DyK8omii.js";import"./dropdown-menu-C62KNjwK.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DxV7deix.js";import"./use-decopilot-events-CpQNzv3e.js";import"./empty-state-Sh_DuDcy.js";import"./toolbar-p8VcpV1N.js";import"./preview-dialog-CQgf0QcR.js";import"./index-B6hcksS9.js";import"./use-capability-C6Dwri-U.js";import"./shell-route-loading-BRcTX0VT.js";import"./tools-list-uWC3Ij6C.js";import"./alert-dialog-CYizItFp.js";import"./switch-CCMIMmOF.js";import"./use-debounced-autosave-B4mbwJnu.js";import"./index-Bb-tYGNK.js";import"./sidebar-BNrafefE.js";import"./search-input-M7ubuBMG.js";import"./github-repo-picker-B5tZucJa.js";import"./use-debounced-value-C6U3mliE.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CLmhH-Rb.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./automation-runs-B-dNDEWH.js";import"./table-DeNuxLMl.js";import"./use-members-BMNjJExY.js";import"./use-org-auth-client-C_UJ3Vg_.js";import"./task-status-B3nPzwP7.js";import"./use-automations-RMjkwkxX.js";import"./use-file-configs-CFCmr--W.js";import"./monaco-editor-5JIc-lnc.js";import"./select-model-Cz9R_UN3.js";import"./automation-list-row-CsTyBm4M.js";import"./required-auth-layout-DDJmFi3U.js";import"./use-org-sso-DkqH8Zpz.js";const Q={};function W(S){const t=$.c(37),{client:r,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=S,{sendMessage:I}=z(),{setAppContext:u,clearAppContext:n}=F(),{setChatOpen:f,openTab:g}=J(),e=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==r||t[3]!==o.name||t[4]!==s?(c={client:r,toolName:o.name,toolArguments:s},t[2]=r,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:i}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=y(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let d;t[9]!==o.inputSchema?(d=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=d):d=t[10];let N;t[11]!==U||t[12]!==d||t[13]!==o?(N={...o,name:U,inputSchema:d},t[11]=U,t[12]=d,t[13]=o,t[14]=N):N=t[14];const b=N;let _;t[15]!==I||t[16]!==f?(_=C=>{const D=G(C.content);D.content.length>0&&(f(!0),I({tiptapDoc:D}))},t[15]=I,t[16]=f,t[17]=_):_=t[17];const j=_;let P;t[18]!==b?(P={tool:b},t[18]=b,t[19]=P):P=t[19];let T;t[20]!==u||t[21]!==e?(T=C=>u(e,C),t[20]=u,t[21]=e,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==e?(R=()=>n(e),t[23]=n,t[24]=e,t[25]=R):R=t[25];let v;return t[26]!==r||t[27]!==j||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==i?(v=A.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:i,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:r,onMessage:j,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=r,t[27]=j,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=i,t[36]=v):v=t[36],v}function we(S){const t=$.c(24),{connectionId:r,toolName:h,args:o}=S,{org:p}=H(),l=Y();let M;t[0]!==r||t[1]!==l?(M=O(r)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=r,t[1]=l,t[2]=M):M=t[2];const I=M;let u;t[3]!==r||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(u={connectionId:r,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=r,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=u):u=t[7];const n=k(u);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let e,a,m;t[10]!==h||t[11]!==g.tools?(e=L(decodeURIComponent(h)),m=g.tools.find(i=>i.name===e)??g.tools.find(i=>{const x=E(i._meta);if(!x)return!1;if(y(i.name,x)===e)return!0;const d=y(e,x);return d!==e&&i.name===d}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=e,t[13]=a,t[14]=m):(e=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let i;return t[15]!==e?(i=A.jsx("div",{className:"flex items-center justify-center h-full w-full",children:A.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',e,'" not found or has no UI']})}),t[15]=e,t[16]=i):i=t[16],i}let c;return t[17]!==o||t[18]!==n||t[19]!==r||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=A.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:r,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=r,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{we as AppViewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as S,j as r}from"./index-CFiyU0D9.js";import{I as T}from"./input-BwRH-Gsz.js";import{L as C}from"./label-CdBSUJpf.js";import{T as L}from"./textarea-BYT525JZ.js";import{au as A,av as R,at as D,aw as J,ax as K}from"./index-CRxAjd1d.js";import{u as M,s as P}from"./primitives-BF1opf4F.js";import"./index-mEtg0zTM.js";import"./SwitchHorizontal01-DAZXInW8.js";import"./chat-context-n9syhvq-.js";import"./hooks-CUSV6Enf.js";import"./use-mcp-client-xOK-OF8p.js";import"./auth-Bej0Tx2Y.js";import"./decopilot-sse-pool-CvYk1hkc.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-2U_MnYnK.js";import"./use-collections-B4atckEK.js";import"./use-ai-providers-C7KmiuqP.js";import"./studio-tools-CNO5iCKk.js";import"./use-decopilot-events-CpQNzv3e.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings-DksiQdGc.js";import"./scroll-area-BM-54tW1.js";import"./agent-icon-oDx9Z_Be.js";import"./AlertCircle-DC-zDzV-.js";import"./Tool01-CvnpFI53.js";import"./Settings02-BcAnTzm5.js";import"./XCircle-Ct0eqqsw.js";import"./ArrowUpRight-OJZisFPQ.js";import"./ZapSquare-PMiGcZpW.js";import"./Users03-DknrDMtT.js";import"./CheckCircle-Cgnheu-R.js";import"./ChevronUp-DBpw6M-L.js";import"./ChevronDown-DyHvxYlc.js";import"./ChevronLeft-dyRjFCmp.js";import"./ChevronRight-Cpfh3gza.js";import"./DotsVertical-5jSu3d1f.js";import"./Stars02-qnq-_X9g.js";import"./Eye-bojNLUjA.js";import"./ZoomOut-6ix2H92j.js";import"./Globe01-CyfpzbeQ.js";import"./FilterLines-CFl65nng.js";import"./Star01-DHEkWySe.js";import"./Globe04-DFpdKSRI.js";import"./HardDrive-B1mtnaeA.js";import"./Key01-CwrJlZo0.js";import"./LayoutLeft-fsm0LcB8.js";import"./LinkExternal01-BHwVyDja.js";import"./Monitor01-ChA6ov2I.js";import"./Sun-lTiqxOzH.js";import"./Palette-DusYqL0W.js";import"./Play-CnXG8qqP.js";import"./Plus-eGxBB1d8.js";import"./SearchLg-CDpA_lbT.js";import"./SearchMd-ujiTPCmg.js";import"./Shield01-ZxmFmrvL.js";import"./Stars01-BdCaKqhF.js";import"./Trash01-ByxlxTiZ.js";import"./Upload01-Z77n1bV8.js";import"./User01-COQtf360.js";import"./Users01-wtRJYQKX.js";import"./XClose-BaZ908gw.js";import"./X-DrMVHLcw.js";import"./Zap-wRIFSWIq.js";import"./use-clock-tick-BcxdOJLx.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Xy0buIqd.js";import"./tooltip-DrpiSbRG.js";import"./file-type-icon-DPWxBpNL.js";import"./dialog-BAqFyO8a.js";import"./use-mobile-NlF-3RoP.js";import"./content-blocks-o63cs2vh.js";import"./types-C7syjwde.js";import"./shell-layout-Nyz7GHu7.js";import"./avatar-CJP1BOq4.js";import"./required-auth-layout-DDJmFi3U.js";import"./use-org-sso-DkqH8Zpz.js";import"./sheet-DyU03ddw.js";import"./integration-icon-LQhkkaLl.js";import"./use-navigate-to-agent-DZubxUSm.js";import"./use-connection-Dz29RF9P.js";import"./use-mcp-prompts-Crr3H7P7.js";import"./form-DGE2mWLL.js";import"./select-C6v8Xcth.js";import"./drawer-CFkqEC3w.js";import"./collection-search-8iNXnGlM.js";import"./tabs-Ca0vDJqc.js";import"./toggle-group-9TrYMc69.js";import"./sortable.esm-MymOIPKk.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C6NYo4Gp.js";import"./use-registry-connections-BOZLpkM5.js";import"./useInfiniteQuery-RUqqRph1.js";import"./use-infinite-scroll-BX1nHHVY.js";import"./extract-connection-data-D6bQrejT.js";import"./card-BFb5m83e.js";import"./collection-tabs-KA2be3wH.js";import"./badge-DhpSM7g_.js";import"./connection-form-helpers-CwZx7WkC.js";import"./authenticate-and-persist-oauth-DoPUB_Bh.js";import"./mcp-oauth-IblqU9XT.js";import"./useSuspenseInfiniteQuery-fRYRtDkY.js";import"./connect-desktop-dialog-Brra3cMC.js";import"./decopilot-BItqS11w.js";import"./checkbox-DmOzmKLP.js";import"./skeleton-B0I93PJP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-MeT61nuY.js";import"./popover-BXFiEQtN.js";import"./command-C34397s2.js";import"./index-jBUpmiBg.js";import"./use-org-fs-DyK8omii.js";import"./dropdown-menu-C62KNjwK.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DxV7deix.js";import"./empty-state-Sh_DuDcy.js";import"./toolbar-p8VcpV1N.js";import"./preview-dialog-CQgf0QcR.js";import"./index-B6hcksS9.js";import"./use-mcp-tools-C8tMWwG9.js";import"./use-capability-C6Dwri-U.js";import"./shell-route-loading-BRcTX0VT.js";import"./tools-list-uWC3Ij6C.js";import"./alert-dialog-CYizItFp.js";import"./switch-CCMIMmOF.js";import"./use-debounced-autosave-B4mbwJnu.js";import"./index-Bb-tYGNK.js";import"./sidebar-BNrafefE.js";import"./search-input-M7ubuBMG.js";import"./github-repo-picker-B5tZucJa.js";import"./use-debounced-value-C6U3mliE.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CLmhH-Rb.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./automation-runs-B-dNDEWH.js";import"./table-DeNuxLMl.js";import"./use-members-BMNjJExY.js";import"./use-org-auth-client-C_UJ3Vg_.js";import"./task-status-B3nPzwP7.js";import"./use-automations-RMjkwkxX.js";import"./use-file-configs-CFCmr--W.js";import"./monaco-editor-5JIc-lnc.js";import"./select-model-Cz9R_UN3.js";import"./automation-list-row-CsTyBm4M.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},q={authors:"Author"};function Nr(B){const t=S.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:g,block:f}=B;let y;t[0]!==w||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==f||t[5]!==p?(d=R(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const F=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:J(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=M(F,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(D,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(K,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{Nr as RecordEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-C4UMhzml.js","assets/index-CFiyU0D9.js","assets/index-BqKQnks_.css","assets/XCircle-Ct0eqqsw.js","assets/CheckCircle-Cgnheu-R.js","assets/Settings02-BcAnTzm5.js","assets/use-mcp-client-xOK-OF8p.js","assets/auth-Bej0Tx2Y.js","assets/useInfiniteQuery-RUqqRph1.js","assets/use-infinite-scroll-BX1nHHVY.js","assets/studio-tools-CNO5iCKk.js","assets/badge-DhpSM7g_.js","assets/input-BwRH-Gsz.js","assets/dropdown-menu-C62KNjwK.js","assets/ChevronUp-DBpw6M-L.js","assets/ChevronRight-Cpfh3gza.js","assets/DotsVertical-5jSu3d1f.js","assets/table-DeNuxLMl.js","assets/toggle-group-9TrYMc69.js","assets/use-view-mode-C2dllj6L.js","assets/use-mobile-NlF-3RoP.js","assets/FilterLines-CFl65nng.js","assets/Globe01-CyfpzbeQ.js","assets/SearchMd-ujiTPCmg.js","assets/dialog-BAqFyO8a.js","assets/X-DrMVHLcw.js","assets/AlertCircle-DC-zDzV-.js","assets/Upload01-Z77n1bV8.js","assets/alert-dialog-CYizItFp.js","assets/card-BFb5m83e.js","assets/Trash01-ByxlxTiZ.js","assets/label-CdBSUJpf.js","assets/select-C6v8Xcth.js","assets/tooltip-DrpiSbRG.js","assets/ChevronDown-DyHvxYlc.js","assets/switch-CCMIMmOF.js","assets/textarea-BYT525JZ.js","assets/checkbox-DmOzmKLP.js","assets/Eye-bojNLUjA.js","assets/LinkExternal01-BHwVyDja.js","assets/use-copy-Xy0buIqd.js","assets/Key01-CwrJlZo0.js","assets/Plus-eGxBB1d8.js","assets/mcp-oauth-IblqU9XT.js","assets/Play-CnXG8qqP.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as s,j as e,r as i,i as a,am as o}from"./index-CFiyU0D9.js";import{R as m}from"./require-capability--mIKExbX.js";import"./use-capability-C6Dwri-U.js";import"./access-gate-D6dGDGRI.js";import"./capability-load-error-CCgNL5xi.js";const n=i.lazy(()=>o(()=>import("./registry-layout-C4UMhzml.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 f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as $,D as Ne,K as re,b9 as dt,k as Oe,j as s,l as K,i as fe,B as ne,c as H,o as Pe,aE as Ie,s as se,aG as De,aH as ke,m as $e,p as mt,n as ut,d as Fe,t as he,v as Re,ag as Ke,a8 as ft,E as ht,b as gt,u as xt}from"./index-CFiyU0D9.js";import{u as pt,C as bt}from"./use-organization-roles-Cu69Rnex.js";import{u as je}from"./use-org-auth-client-C_UJ3Vg_.js";import{B as ge}from"./badge-DhpSM7g_.js";import{f as Qe,a as He,b as qe,c as Ze,d as Xe,A as Je,e as We,g as et}from"./alert-dialog-CYizItFp.js";import{D as Et,a as Tt,b as _t,c as It}from"./dropdown-menu-C62KNjwK.js";import{i as Nt}from"./DotsVertical-5jSu3d1f.js";import{s as Ae}from"./Plus-eGxBB1d8.js";import{s as St}from"./Trash01-ByxlxTiZ.js";import{P as te}from"./index-Bb-tYGNK.js";import{E as Ge}from"./empty-state-Sh_DuDcy.js";import{S as ve}from"./search-input-M7ubuBMG.js";import{P as tt,D as st}from"./ai-providers-logos-DD3qZ33J.js";import{I as ye}from"./integration-icon-LQhkkaLl.js";import{u as Ct}from"./use-infinite-scroll-BX1nHHVY.js";import{C as Me}from"./checkbox-DmOzmKLP.js";import{b as At}from"./Settings02-BcAnTzm5.js";import{u as Ot}from"./useSuspenseInfiniteQuery-fRYRtDkY.js";import{u as Rt,S as jt}from"./use-mcp-client-xOK-OF8p.js";import{C as vt}from"./collection-search-8iNXnGlM.js";import{u as nt}from"./use-members-BMNjJExY.js";import{u as yt}from"./use-connection-Dz29RF9P.js";import{u as Mt,d as wt}from"./use-ai-providers-C7KmiuqP.js";import{A as lt}from"./avatar-CJP1BOq4.js";import{S as xe}from"./switch-CCMIMmOF.js";import{c as pe,T as be,a as Ee,b as Te}from"./tooltip-DrpiSbRG.js";import{S as Ue,a as Be,b as Ve}from"./settings-section-MeT61nuY.js";import{t as Lt}from"./ChevronDown-DyHvxYlc.js";import{i as Pt}from"./ChevronRight-Cpfh3gza.js";import{i as ze}from"./X-DrMVHLcw.js";import{a as Dt}from"./use-capability-C6Dwri-U.js";import{A as kt}from"./access-gate-D6dGDGRI.js";import"./table-DeNuxLMl.js";import"./SwitchHorizontal01-DAZXInW8.js";import"./ChevronUp-DBpw6M-L.js";import"./sidebar-BNrafefE.js";import"./LayoutLeft-fsm0LcB8.js";import"./use-mobile-NlF-3RoP.js";import"./sheet-DyU03ddw.js";import"./SearchMd-ujiTPCmg.js";import"./XCircle-Ct0eqqsw.js";import"./agent-icon-oDx9Z_Be.js";import"./AlertCircle-DC-zDzV-.js";import"./Tool01-CvnpFI53.js";import"./ArrowUpRight-OJZisFPQ.js";import"./ZapSquare-PMiGcZpW.js";import"./Users03-DknrDMtT.js";import"./CheckCircle-Cgnheu-R.js";import"./ChevronLeft-dyRjFCmp.js";import"./Stars02-qnq-_X9g.js";import"./Eye-bojNLUjA.js";import"./ZoomOut-6ix2H92j.js";import"./Globe01-CyfpzbeQ.js";import"./FilterLines-CFl65nng.js";import"./Star01-DHEkWySe.js";import"./Globe04-DFpdKSRI.js";import"./HardDrive-B1mtnaeA.js";import"./Key01-CwrJlZo0.js";import"./LinkExternal01-BHwVyDja.js";import"./Monitor01-ChA6ov2I.js";import"./Sun-lTiqxOzH.js";import"./Palette-DusYqL0W.js";import"./Play-CnXG8qqP.js";import"./SearchLg-CDpA_lbT.js";import"./Shield01-ZxmFmrvL.js";import"./Stars01-BdCaKqhF.js";import"./Upload01-Z77n1bV8.js";import"./User01-COQtf360.js";import"./Users01-wtRJYQKX.js";import"./XClose-BaZ908gw.js";import"./Zap-wRIFSWIq.js";import"./auth-Bej0Tx2Y.js";import"./use-collections-B4atckEK.js";import"./studio-tools-CNO5iCKk.js";import"./card-BFb5m83e.js";import"./capability-load-error-CCgNL5xi.js";const we="basic-usage",Le=[{id:we,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","SANDBOX_START","SANDBOX_DELETE","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","LINK_CURRENT_GET","LINK_DISCONNECT","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","THREAD_BACKGROUND_TOOL_START","THREAD_SUBTASK_DELIVER"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings, brand context, and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","BRAND_CONTEXT_LIST","BRAND_CONTEXT_GET","BRAND_CONTEXT_CREATE","BRAND_CONTEXT_UPDATE","BRAND_CONTEXT_DELETE","BRAND_CONTEXT_EXTRACT","BRAND_GET","BRAND_LIST","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","COMMERCE_DISCOVERY_SETUP","COMMERCE_DISCOVERY_RUN","COMMERCE_DISCOVERY_BIND","COMMERCE_DISCOVERY_CONNECTION_STATUS"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...Le.find(t=>t.id===we)?.tools??[]];const Gt=["agents:manage","connections:manage"];new Set(Le.filter(t=>Gt.includes(t.id)).flatMap(t=>t.tools));function Ut(){const t=new Map;for(const e of Le){if(e.id===we)continue;const n=t.get(e.section)??[];n.push(e),t.set(e.section,n)}return Array.from(t.entries()).map(([e,n])=>({section:e,capabilities:n}))}function Bt(t,e,n){return n?!0:t.tools.every(l=>e.includes(l))}function Vt(t,e,n){if(n){const i=new Set(e);for(const r of t.tools)i.add(r);return Array.from(i)}const l=new Set(e);for(const i of t.tools)l.delete(i);return Array.from(l)}function zt(t){const e=H.c(21),{connection:n,isSelected:l,hasToolsEnabled:i,activeToolsCount:r,totalToolsCount:d,onSelect:h,onToggle:c}=t,g=l?"bg-accent/50":"hover:bg-muted/50";let f;e[0]!==g?(f=K("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",g),e[0]=g,e[1]=f):f=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ye,{icon:n.icon,name:n.title,size:"xs"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let x;e[5]!==n.title?(x=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title})}),e[5]=n.title,e[6]=x):x=e[6];let o;e[7]!==h||e[8]!==a||e[9]!==x?(o=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:h,children:[a,x]}),e[7]=h,e[8]=a,e[9]=x,e[10]=o):o=e[10];let m;e[11]!==r||e[12]!==n.tools||e[13]!==i||e[14]!==c||e[15]!==d?(m=n.tools&&n.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[r,"/",d]}),s.jsx(Me,{checked:i,onCheckedChange:c,onClick:Yt})]}),e[11]=r,e[12]=n.tools,e[13]=i,e[14]=c,e[15]=d,e[16]=m):m=e[16];let N;return e[17]!==f||e[18]!==o||e[19]!==m?(N=s.jsxs("div",{className:f,children:[o,m]}),e[17]=f,e[18]=o,e[19]=m,e[20]=N):N=e[20],N}function Yt(t){return t.stopPropagation()}function $t(t){const e=H.c(18),{connectionId:n,tool:l,isSelected:i,onToggle:r}=t,d=`tool-${n}-${l.name}`,h=i?"text-foreground":"text-muted-foreground";let c;e[0]!==h?(c=K("text-sm font-medium",h),e[0]=h,e[1]=c):c=e[1];let g;e[2]!==c||e[3]!==l.name?(g=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:c,children:l.name})}),e[2]=c,e[3]=l.name,e[4]=g):g=e[4];let f;e[5]!==l.description?(f=l.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description}),e[5]=l.description,e[6]=f):f=e[6];let a;e[7]!==g||e[8]!==f?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[g,f]}),e[7]=g,e[8]=f,e[9]=a):a=e[9];const x=`tool-${n}-${l.name}`;let o;e[10]!==i||e[11]!==r||e[12]!==x?(o=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(Me,{id:x,checked:i,onCheckedChange:r,onClick:Ft})}),e[10]=i,e[11]=r,e[12]=x,e[13]=o):o=e[13];let m;return e[14]!==d||e[15]!==a||e[16]!==o?(m=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:d,children:[a,o]}),e[14]=d,e[15]=a,e[16]=o,e[17]=m):m=e[17],m}function Ft(t){return t.stopPropagation()}function Kt({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:n,searchQuery:l}){const[i,r]=$.useState(""),d=l!==void 0?l:i,h=$.useDeferredValue(d),[c,g]=$.useState("all"),[f,a]=$.useState(!1),x=$.useRef(new Set(Object.keys(t))),{org:o}=Ne(),m=Rt({connectionId:jt,orgId:o.id,orgSlug:o.slug}),N=100,T=h.trim(),E=T?{operator:"or",conditions:[{field:["title"],operator:"contains",value:T},{field:["description"],operator:"contains",value:T}]}:void 0,S=!!n,C={...E&&{where:E},orderBy:[{field:["updated_at"],direction:"asc"}],limit:N,offset:0,...S&&{include_virtual:!0}},v=JSON.stringify(C),{data:_,fetchNextPage:O,hasNextPage:p,isFetchingNextPage:R}=Ot({queryKey:re.collectionListInfinite(m,o.id,"","CONNECTIONS",v),queryFn:async({pageParam:b=0})=>(await m.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...E&&{where:E},orderBy:[{field:["updated_at"],direction:"asc"}],limit:N,offset:b,...S&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(b,D)=>{if(b?.hasMore)return D.reduce((Q,q)=>Q+(q?.items?.length??0),0)},staleTime:3e4}),I=_?.pages.flatMap(b=>b?.items??[])??[],j=Ct(O,p??!1,R),u=n?I.filter(b=>b.connection_type!=="VIRTUAL"?!0:dt(b.connection_url)!==n):I,M=x.current,A=[...M.values()].map(b=>u.find(D=>D.id===b)).filter(b=>b!==void 0),k=u.filter(b=>!M.has(b.id)),G=[...A,...k],U=b=>{const D=t[b];return D!==void 0&&D.length>0},B=G.filter(b=>{if(c==="all")return!0;const D=U(b.id);return c==="selected"?D:c==="unselected"?!D:!0}),[w,z]=$.useState(G[0]?.id??null),y=w?G.find(b=>b.id===w)??null:null,{data:L,isFetching:Y}=Oe({queryKey:re.collectionItem(m,o.id,"","CONNECTIONS",w??""),queryFn:async()=>w?(await m.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:w}})).structuredContent?.item??null:null,enabled:!!w,staleTime:3e4}),F=L?.tools??[],X=(b,D)=>t[b]?.includes(D)??!1,J=(b,D)=>{const Q=t[b]??[],q=Q.includes(D),W={...t};if(q){const Z=Q.filter(ee=>ee!==D);Z.length===0?delete W[b]:W[b]=Z}else W[b]=[...Q,D];e(W)},le=b=>{const D=b===w?F:[];if(!D.length)return;const Q=t[b]??[],q=D.map(ee=>ee.name),W=Q.length>0&&q.every(ee=>Q.includes(ee)),Z={...t};W?delete Z[b]:(Z[b]=q,z(b)),e(Z)},oe=b=>{z(b),a(!0)},ie=()=>{a(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:K("w-full md:w-80 border-r border-border flex flex-col",f&&"hidden md:flex"),children:[l===void 0&&s.jsx(vt,{value:i,onChange:r,placeholder:"Search MCP Servers..."}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>g("all"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),s.jsx("button",{onClick:()=>g("selected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),s.jsx("button",{onClick:()=>g("unselected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:B.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:d?"No connections found":c==="selected"?"No servers selected":c==="unselected"?"No unselected servers":"No connections available"}):s.jsxs("div",{className:"p-2 space-y-1",children:[B.map(b=>{const D=w===b.id,Q=D?F.length:0,q=t[b.id]?.length??0;return s.jsx(zt,{connection:{...b,tools:D?F:b.tools},isSelected:D,hasToolsEnabled:U(b.id),activeToolsCount:q,totalToolsCount:Q,onSelect:()=>oe(b.id),onToggle:()=>le(b.id)},b.id)}),s.jsx("div",{ref:j,className:"h-4"}),R&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:K("flex-1 flex-col",f?"flex":"hidden md:flex"),children:y?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ne,{variant:"ghost",size:"sm",onClick:ie,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(At,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(ye,{icon:y.icon,name:y.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:y.title}),y.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:y.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:Y?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})}):F.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):s.jsx("div",{className:"space-y-2",children:F.map(b=>s.jsx($t,{connectionId:y.id,tool:b,isSelected:X(y.id,b.name),onToggle:()=>J(y.id,b.name)},b.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}const Se=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],Qt={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Ht(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Se.length;return Se[n]??Se[0]}function qt(t,e){return Qt[t]??"bg-neutral-400"}const Zt=Pe({role:Pe({id:se().optional(),slug:se().optional(),label:se()}),allowAllStaticPermissions:ke(),staticPermissions:Ie(se()),toolSet:De(se(),Ie(se())),allowAllModels:ke(),modelSet:De(se(),Ie(se())),memberIds:Ie(se())});function ot(t){return t?t.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2):"?"}function Ye(t,e,n){const l=s.jsx(xe,{checked:t,disabled:e,onCheckedChange:n});return e?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:l})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):l}function Xt(t){const e=H.c(28),{allowAllStaticPermissions:n,staticPermissions:l,onAllowAllChange:i,onPermissionsChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d;let g;e[0]!==h?(g=h.trim().toLowerCase(),e[0]=h,e[1]=g):g=e[1];const f=$.useDeferredValue(g);let a;if(e[2]!==n||e[3]!==f||e[4]!==i||e[5]!==r||e[6]!==c||e[7]!==h||e[8]!==l){const x=Ut(),o=(v,_)=>{if(!c){if(n&&_){const O=x.flatMap(es).flatMap(Wt);i(!1),r(O.filter(p=>!v.tools.includes(p)));return}n||r(Vt(v,l,!_))}};let m;e[10]!==f?(m=v=>{const{section:_,capabilities:O}=v;return{section:_,capabilities:O.filter(p=>!f||p.label.toLowerCase().includes(f)||p.description.toLowerCase().includes(f))}},e[10]=f,e[11]=m):m=e[11];const N=x.map(m).filter(Jt);let T;e[12]!==n||e[13]!==i||e[14]!==r?(T=()=>{i(!n),r([])},e[12]=n,e[13]=i,e[14]=r,e[15]=T):T=e[15];let E;e[16]!==n||e[17]!==c||e[18]!==T?(E=Ye(n,c,T),e[16]=n,e[17]=c,e[18]=T,e[19]=E):E=e[19];let S;e[20]!==n||e[21]!==i||e[22]!==r||e[23]!==c?(S=c?void 0:()=>{i(!n),r([])},e[20]=n,e[21]=i,e[22]=r,e[23]=c,e[24]=S):S=e[24];let C;e[25]!==E||e[26]!==S?(C=s.jsx(Ue,{title:"General",children:s.jsx(Be,{children:s.jsx(Ve,{title:"All organization permissions",description:"Grant full access to all features below",action:E,onClick:S})})}),e[25]=E,e[26]=S,e[27]=C):C=e[27],a=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[C,N.length===0&&f?s.jsxs("p",{className:"text-sm text-muted-foreground py-4",children:["No permissions match “",h,"”"]}):N.map(v=>{const{section:_,capabilities:O}=v;return s.jsx(Ue,{title:_,children:s.jsx(Be,{children:O.map(p=>{const R=Bt(p,l,n);return s.jsx(Ve,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[p.label,p.dangerous&&s.jsx(ft,{size:12,className:"text-amber-500 shrink-0"})]}),description:p.description,action:Ye(R,c,()=>o(p,R)),onClick:c?void 0:()=>o(p,R)},p.id)})})},_)})]})}),e[2]=n,e[3]=f,e[4]=i,e[5]=r,e[6]=c,e[7]=h,e[8]=l,e[9]=a}else a=e[9];return a}function Jt(t){return t.capabilities.length>0}function Wt(t){return t.tools}function es(t){return t.capabilities}const it={anthropic:"Anthropic",openrouter:"OpenRouter"},ts={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function ss(t,e){const n=t.indexOf("/"),l=n>0?t.slice(0,n):e;return l.startsWith("~")?l.slice(1):l}function ns(t){return ts[t]??it[t]??t}function ls(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const rt=30;function os(t){const e=H.c(44),{connectionId:n,subProviderId:l,subProviderName:i,groupLogo:r,models:d,allConnectionModelIds:h,selectedModels:c,allowAllModels:g,allConnectionModelsSelected:f,onToggleModel:a,onExitAllowAll:x,readOnly:o,defaultExpanded:m}=t,[N,T]=$.useState(m),E=m||N,S=T,[C,v]=$.useState(rt);let _;e[0]!==f||e[1]!==g||e[2]!==c?(_=j=>g||f||c.includes("*")||c.includes(j),e[0]=f,e[1]=g,e[2]=c,e[3]=_):_=e[3];const O=_;let p;if(e[4]!==O||e[5]!==d){let j;e[7]!==O?(j=u=>O(u.id),e[7]=O,e[8]=j):j=e[8],p=d.filter(j),e[4]=O,e[5]=d,e[6]=p}else p=e[6];const R=p.length;let I;if(e[9]!==h||e[10]!==g||e[11]!==n||e[12]!==R||e[13]!==E||e[14]!==r||e[15]!==O||e[16]!==d||e[17]!==x||e[18]!==a||e[19]!==o||e[20]!==l||e[21]!==i||e[22]!==C){const j=d.slice(0,C),u=d.length>C;let M;e[24]===Symbol.for("react.memo_cache_sentinel")?(M=()=>S(cs),e[24]=M):M=e[24];const A=r??tt[l]??st;let k;e[25]!==i||e[26]!==A?(k=s.jsx(ye,{icon:A,name:i,size:"sm"}),e[25]=i,e[26]=A,e[27]=k):k=e[27];let G;e[28]!==i?(G=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[28]=i,e[29]=G):G=e[29];let U;e[30]!==k||e[31]!==G?(U=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[k,G]}),e[30]=k,e[31]=G,e[32]=U):U=e[32];let B;e[33]!==R||e[34]!==d.length?(B=s.jsxs(ge,{variant:"secondary",className:"text-xs text-muted-foreground",children:[R,"/",d.length," enabled"]}),e[33]=R,e[34]=d.length,e[35]=B):B=e[35];let w;e[36]!==E?(w=E?s.jsx(Lt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Pt,{size:16,className:"text-muted-foreground shrink-0"}),e[36]=E,e[37]=w):w=e[37];let z;e[38]!==w||e[39]!==B?(z=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[B,w]}),e[38]=w,e[39]=B,e[40]=z):z=e[40];let y;e[41]!==z||e[42]!==U?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:M,children:[U,z]}),e[41]=z,e[42]=U,e[43]=y):y=e[43],I=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[y,E&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[j.map(L=>{const Y=O(L.id),F=()=>{if(!o){if(g){x(n,h,L.id);return}a(n,L.id)}};return s.jsxs("div",{className:K("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!o&&"hover:bg-muted/50 cursor-pointer"),onClick:F,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:L.title})}),s.jsx("div",{onClick:as,children:o?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:Y,disabled:!0,onCheckedChange:rs})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:Y,onCheckedChange:F})})]},L.id)}),u&&s.jsxs("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>v(is),children:["Show more (",d.length-C," remaining)"]})]})]}),e[9]=h,e[10]=g,e[11]=n,e[12]=R,e[13]=E,e[14]=r,e[15]=O,e[16]=d,e[17]=x,e[18]=a,e[19]=o,e[20]=l,e[21]=i,e[22]=C,e[23]=I}else I=e[23];return I}function is(t){return t+rt}function rs(){}function as(t){return t.stopPropagation()}function cs(t){return!t}function ds(t){const e=H.c(33),{connection:n,selectedModels:l,allowAllModels:i,onToggleModel:r,onExitAllowAll:d,allConnectionModelsSelected:h,searchQuery:c,readOnly:g}=t,f=wt(n.id);let a,x,o,m,N;if(e[0]!==h||e[1]!==i||e[2]!==n.id||e[3]!==n.label||e[4]!==n.providerId||e[5]!==d||e[6]!==r||e[7]!==f||e[8]!==g||e[9]!==c||e[10]!==l){N=Symbol.for("react.early_return_sentinel");e:{let S;e[16]!==n.label?(S=A=>({...A,id:A.modelId,provider:n.label}),e[16]=n.label,e[17]=S):S=e[17];const C=f.filter(hs).map(S),v=c.trim().toLowerCase(),_=v?C.filter(A=>A.title.toLowerCase().includes(v)||A.id.toLowerCase().includes(v)||A.provider?.toLowerCase().includes(v)):C;if(_.length===0){N=null;break e}const O=new Map;for(const A of _){const k=ss(A.id,n.providerId),G=O.get(k)??{models:[],logo:null};G.models.push({id:A.id,title:ls(A.title),logo:A.logo}),!G.logo&&A.logo&&(G.logo=A.logo),O.set(k,G)}const p=Array.from(O.entries()).map(fs).sort(us),R=p.length===1||v.length>0;o="flex flex-col gap-3";const I=tt[n.providerId]??st;let j;e[18]!==n.providerId||e[19]!==I?(j=s.jsx("img",{src:I,alt:n.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=n.providerId,e[19]=I,e[20]=j):j=e[20];const u=it[n.providerId]??n.providerId;let M;e[21]!==u?(M=s.jsx("h4",{className:"text-sm font-medium",children:u}),e[21]=u,e[22]=M):M=e[22],e[23]!==M||e[24]!==j?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[j,M]}),e[23]=M,e[24]=j,e[25]=m):m=e[25],a="flex flex-col gap-3",x=p.map(A=>s.jsx(os,{connectionId:n.id,subProviderId:A.id,subProviderName:A.name,groupLogo:A.logo,models:A.models,allConnectionModelIds:C.map(ms),selectedModels:l,allowAllModels:i,allConnectionModelsSelected:h,onToggleModel:r,onExitAllowAll:d,readOnly:g,defaultExpanded:R},A.id))}e[0]=h,e[1]=i,e[2]=n.id,e[3]=n.label,e[4]=n.providerId,e[5]=d,e[6]=r,e[7]=f,e[8]=g,e[9]=c,e[10]=l,e[11]=a,e[12]=x,e[13]=o,e[14]=m,e[15]=N}else a=e[11],x=e[12],o=e[13],m=e[14],N=e[15];if(N!==Symbol.for("react.early_return_sentinel"))return N;let T;e[26]!==a||e[27]!==x?(T=s.jsx("div",{className:a,children:x}),e[26]=a,e[27]=x,e[28]=T):T=e[28];let E;return e[29]!==o||e[30]!==m||e[31]!==T?(E=s.jsxs("div",{className:o,children:[m,T]}),e[29]=o,e[30]=m,e[31]=T,e[32]=E):E=e[32],E}function ms(t){return t.id}function us(t,e){return t.name.localeCompare(e.name)}function fs(t){const[e,n]=t;return{id:e,name:ns(e),logo:n.logo,models:n.models}}function hs(t,e,n){return n.findIndex(l=>l.modelId===t.modelId)===e}function gs(t){const e=H.c(35),{allowAllModels:n,modelSet:l,onAllowAllChange:i,onModelSetChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d,g=$.useDeferredValue(h),f=Mt();let a;e[0]!==l||e[1]!==r?(a=(p,R)=>{const I=l[p]??[],j={...l};if(I.includes(R)){const u=I.filter(M=>M!==R);u.length===0?delete j[p]:j[p]=u}else j[p]=[...I,R];r(j)},e[0]=l,e[1]=r,e[2]=a):a=e[2];const x=a;let o;e[3]!==l||e[4]!==i||e[5]!==r?(o=(p,R,I)=>{i(!1),r({...l,[p]:R.filter(j=>j!==I)})},e[3]=l,e[4]=i,e[5]=r,e[6]=o):o=e[6];const m=o,N=!c&&"hover:bg-muted/50 cursor-pointer";let T;e[7]!==N?(T=K("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",N),e[7]=N,e[8]=T):T=e[8];let E;e[9]!==n||e[10]!==i||e[11]!==r||e[12]!==c?(E=()=>{if(c)return;const p=!n;i(p),p&&r({})},e[9]=n,e[10]=i,e[11]=r,e[12]=c,e[13]=E):E=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("span",{className:"text-sm font-medium",children:"All models"}),e[14]=S):S=e[14];let C;e[15]!==n||e[16]!==i||e[17]!==r||e[18]!==c?(C=s.jsx("div",{onClick:ps,children:c?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:n,disabled:!0,onCheckedChange:xs})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:n,onCheckedChange:p=>{i(p),p&&r({})}})}),e[15]=n,e[16]=i,e[17]=r,e[18]=c,e[19]=C):C=e[19];let v;e[20]!==T||e[21]!==E||e[22]!==C?(v=s.jsxs("div",{className:T,onClick:E,children:[S,C]}),e[20]=T,e[21]=E,e[22]=C,e[23]=v):v=e[23];let _;e[24]!==f||e[25]!==n||e[26]!==g||e[27]!==m||e[28]!==l||e[29]!==c||e[30]!==x?(_=f.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No LLM connections configured"}):f.map(p=>s.jsx($.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(fe,{className:"size-4 animate-spin"}),"Loading models..."]}),children:s.jsx(ds,{connection:p,selectedModels:l[p.id]??[],allowAllModels:n,onToggleModel:x,onExitAllowAll:m,allConnectionModelsSelected:(l[p.id]??[]).includes("*"),searchQuery:g,readOnly:c})},p.id)),e[24]=f,e[25]=n,e[26]=g,e[27]=m,e[28]=l,e[29]=c,e[30]=x,e[31]=_):_=e[31];let O;return e[32]!==_||e[33]!==v?(O=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[v,_]}),e[32]=_,e[33]=v,e[34]=O):O=e[34],O}function xs(){}function ps(t){return t.stopPropagation()}function bs(t){const e=H.c(52),{open:n,onOpenChange:l,selectedMemberIds:i,onAddMembers:r}=t,[d,h]=$.useState(""),c=$.useDeferredValue(d);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];const[f,a]=$.useState(g),{data:x}=nt();let o,m,N,T,E,S,C,v,_,O,p;if(e[1]!==x?.data?.members||e[2]!==c||e[3]!==r||e[4]!==l||e[5]!==n||e[6]!==f||e[7]!==d||e[8]!==i){const U=x?.data?.members??[];let B;e[20]!==c?(B=y=>{const L=c.toLowerCase();return y.user?.name?.toLowerCase().includes(L)||y.user?.email?.toLowerCase().includes(L)},e[20]=c,e[21]=B):B=e[21];const w=U.filter(B);let z;e[22]!==r||e[23]!==l||e[24]!==f?(z=()=>{r(f),a([]),l(!1)},e[22]=r,e[23]=l,e[24]=f,e[25]=z):z=e[25],N=z,m=Qe,O=n,p=l,o=He,v="sm:max-w-md p-0",e[26]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(qe,{className:"px-6 pt-6",children:[s.jsx(Ze,{children:"Add Members to Role"}),s.jsx(Xe,{children:"Select members to add to this role."})]}),e[26]=_):_=e[26],S="flex flex-col h-80",e[27]!==d?(C=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(ve,{value:d,onChange:h,placeholder:"Search members...",className:"w-full"})}),e[27]=d,e[28]=C):C=e[28],T="flex-1 overflow-auto",E=w.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:d?"No members found":"No members available"})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:w.map(y=>{const L=y.role!=="owner",Y=i.includes(y.id),F=f.includes(y.id);return s.jsxs("label",{className:K("flex items-center gap-3 p-2 rounded-lg",!L||Y?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(Me,{checked:F||Y,onCheckedChange:()=>{!L||Y||a(X=>X.includes(y.id)?X.filter(J=>J!==y.id):[...X,y.id])},disabled:!L||Y}),s.jsx(lt,{url:y.user?.image??void 0,fallback:ot(y.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:y.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y.user?.email})]}),!L&&s.jsx(ge,{variant:"secondary",className:"shrink-0",children:"Owner"}),Y&&L&&s.jsx(ge,{variant:"outline",className:"shrink-0",children:"Added"})]},y.id)})}),e[1]=x?.data?.members,e[2]=c,e[3]=r,e[4]=l,e[5]=n,e[6]=f,e[7]=d,e[8]=i,e[9]=o,e[10]=m,e[11]=N,e[12]=T,e[13]=E,e[14]=S,e[15]=C,e[16]=v,e[17]=_,e[18]=O,e[19]=p}else o=e[9],m=e[10],N=e[11],T=e[12],E=e[13],S=e[14],C=e[15],v=e[16],_=e[17],O=e[18],p=e[19];let R;e[29]!==T||e[30]!==E?(R=s.jsx("div",{className:T,children:E}),e[29]=T,e[30]=E,e[31]=R):R=e[31];let I;e[32]!==R||e[33]!==S||e[34]!==C?(I=s.jsxs("div",{className:S,children:[C,R]}),e[32]=R,e[33]=S,e[34]=C,e[35]=I):I=e[35];let j;e[36]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Je,{children:"Cancel"}),e[36]=j):j=e[36];const u=f.length===0,M=f.length>0&&`(${f.length})`;let A;e[37]!==N||e[38]!==u||e[39]!==M?(A=s.jsxs(We,{className:"px-6 pb-6",children:[j,s.jsxs(et,{onClick:N,disabled:u,children:["Add ",M]})]}),e[37]=N,e[38]=u,e[39]=M,e[40]=A):A=e[40];let k;e[41]!==o||e[42]!==I||e[43]!==A||e[44]!==v||e[45]!==_?(k=s.jsxs(o,{className:v,children:[_,I,A]}),e[41]=o,e[42]=I,e[43]=A,e[44]=v,e[45]=_,e[46]=k):k=e[46];let G;return e[47]!==m||e[48]!==k||e[49]!==O||e[50]!==p?(G=s.jsx(m,{open:O,onOpenChange:p,children:k}),e[47]=m,e[48]=k,e[49]=O,e[50]=p,e[51]=G):G=e[51],G}function Es(t){const e=H.c(29),{memberIds:n,onMemberIdsChange:l,readOnly:i,readOnlyMessage:r,searchQuery:d,addMemberDialogOpen:h,onAddMemberDialogOpenChange:c}=t,g=i===void 0?!1:i,f=r===void 0?"Owner membership cannot be changed":r,a=$.useDeferredValue(d),{data:x}=nt();let o,m,N;if(e[0]!==x?.data?.members||e[1]!==a||e[2]!==n||e[3]!==l||e[4]!==g||e[5]!==f||e[6]!==d){const v=x?.data?.members??[];let _;e[10]!==n?(_=I=>n.includes(I.id),e[10]=n,e[11]=_):_=e[11];const O=v.filter(_);let p;e[12]!==a?(p=I=>{const j=a.toLowerCase();return I.user?.name?.toLowerCase().includes(j)||I.user?.email?.toLowerCase().includes(j)},e[12]=a,e[13]=p):p=e[13];const R=O.filter(p);N="flex flex-col h-full",o="flex-1 overflow-auto",m=O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:"No members"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Add members to grant them the configured permissions."})]})}):R.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:['No members match "',d,'"']})}):s.jsx("div",{className:"p-4 space-y-2",children:R.map(I=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(lt,{url:I.user?.image??void 0,fallback:ot(I.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:I.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:I.user?.email})]}),g?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(ne,{variant:"ghost",size:"sm",disabled:!0,children:s.jsx(ze,{size:16})})})}),s.jsx(Te,{children:s.jsx("p",{children:f})})]})}):s.jsx(ne,{variant:"ghost",size:"sm",onClick:()=>l(n.filter(j=>j!==I.id)),children:s.jsx(ze,{size:16})})]},I.id))}),e[0]=x?.data?.members,e[1]=a,e[2]=n,e[3]=l,e[4]=g,e[5]=f,e[6]=d,e[7]=o,e[8]=m,e[9]=N}else o=e[7],m=e[8],N=e[9];let T;e[14]!==o||e[15]!==m?(T=s.jsx("div",{className:o,children:m}),e[14]=o,e[15]=m,e[16]=T):T=e[16];let E;e[17]!==n||e[18]!==l?(E=v=>l([...n,...v]),e[17]=n,e[18]=l,e[19]=E):E=e[19];let S;e[20]!==h||e[21]!==n||e[22]!==c||e[23]!==E?(S=s.jsx(bs,{open:h,onOpenChange:c,selectedMemberIds:n,onAddMembers:E}),e[20]=h,e[21]=n,e[22]=c,e[23]=E,e[24]=S):S=e[24];let C;return e[25]!==N||e[26]!==T||e[27]!==S?(C=s.jsxs("div",{className:N,children:[T,S]}),e[25]=N,e[26]=T,e[27]=S,e[28]=C):C=e[28],C}function Ts(t){const e=H.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let l;return e[1]!==t?(l=s.jsx($.Suspense,{fallback:n,children:s.jsx(Es,{...t})}),e[1]=t,e[2]=l):l=e[2],l}const _s={owner:[],admin:[],user:[]};function Is(t,e,n,l){const i=t==="owner"||t==="admin";return{role:{id:n?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:_s[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(r=>r.role===t).map(r=>r.id)}}function Ns(t,e,n){const l=t.permission||{},i=l.self||[],r=i.includes("*"),d=r?[]:i.filter(a=>a!=="*"),h={};for(const[a,x]of Object.entries(l))if(!(a==="self"||a==="models"))if(a==="*")for(const o of n)h[o.id]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x;else{const o=n.find(m=>m.id===a);o&&(h[a]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x)}const c=l.models||[],g=c.length===0||c.includes("*:*"),f={};if(!g)for(const a of c){const x=a.indexOf(":");if(x===-1)continue;const o=a.slice(0,x),m=a.slice(x+1);f[o]||(f[o]=[]),f[o].push(m)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:r,staticPermissions:d,toolSet:h,allowAllModels:g,modelSet:f,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function Ss(t,e){const n={};t.allowAllStaticPermissions?n.self=["*"]:t.staticPermissions.length>0&&(n.self=t.staticPermissions);for(const[l,i]of Object.entries(t.toolSet))if(i.length>0){const d=e.find(h=>h.id===l)?.tools?.map(h=>h.name)??[];n[l]=d.length>0&&d.every(h=>i.includes(h))?["*"]:i}if(t.allowAllModels)n.models=["*:*"];else{const l=[];for(const[i,r]of Object.entries(t.modelSet))for(const d of r)l.push(`${i}:${d}`);l.length>0&&(n.models=l)}return n}function Cs(t,e,n){return t.kind==="builtin"?Is(t.role,e,void 0):t.kind==="custom"?Ns(t.role,e,n):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function As(t){const e=H.c(6),{readOnly:n,readOnlyMessage:l,onOpen:i}=t,r=l===void 0?"Owner membership cannot be changed":l;if(n){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ne,{variant:"outline",size:"sm",disabled:!0,children:[s.jsx(Ae,{size:16}),"Add Member"]})})}),e[0]=c):c=e[0];let g;return e[1]!==r?(g=s.jsx(pe,{children:s.jsxs(be,{children:[c,s.jsx(Te,{children:s.jsx("p",{children:r})})]})}),e[1]=r,e[2]=g):g=e[2],g}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ae,{size:16}),e[3]=d):d=e[3];let h;return e[4]!==i?(h=s.jsxs(ne,{variant:"outline",size:"sm",onClick:i,children:[d,"Add Member"]}),e[4]=i,e[5]=h):h=e[5],h}function Os(t){const e=H.c(14),{locator:n}=Ne(),l=je(),i=yt();let r;e[0]!==n?(r=re.members(n),e[0]=n,e[1]=r):r=e[1];let d;e[2]!==l?(d=()=>l.organization.listMembers(),e[2]=l,e[3]=d):d=e[3];let h;e[4]!==r||e[5]!==d?(h={queryKey:r,queryFn:d},e[4]=r,e[5]=d,e[6]=h):h=e[6];const{data:c,isPending:g}=Oe(h);if(g||!i){let o;return e[7]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),e[7]=o):o=e[7],o}let f;e[8]!==c?.data?.members?(f=c?.data?.members??[],e[8]=c?.data?.members,e[9]=f):f=e[9];const a=f;let x;return e[10]!==i||e[11]!==a||e[12]!==t?(x=s.jsx(Rs,{...t,members:a,connections:i}),e[10]=i,e[11]=a,e[12]=t,e[13]=x):x=e[13],x}function Rs({target:t,onBack:e,onSaved:n,members:l,connections:i}){const{locator:r}=Ne(),d=je(),h=$e(),c=t.kind==="builtin",g=t.kind==="builtin"&&t.role==="owner",f=t.kind==="new",[a,x]=$.useState(c?"org":"mcp"),o=mt({resolver:ut(Zt),defaultValues:Cs(t,l,i)}),m=o.formState.isValid,N=o.formState.isDirty,T=Fe({mutationFn:async u=>{const M=Ss(u,i),A=u.role.slug||u.role.label.toLowerCase().replace(/\s+/g,"-"),k=(u.role.slug==="owner"||u.role.slug==="admin"||u.role.slug==="user")&&!u.role.id,G=async(U,B)=>{const w=l.filter(L=>L.role===(B??U)).map(L=>L.id),z=u.memberIds.filter(L=>!w.includes(L)),y=w.filter(L=>!u.memberIds.includes(L));for(const L of z){const Y=await d.organization.updateMemberRole({memberId:L,role:[U]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}for(const L of y){const Y=await d.organization.updateMemberRole({memberId:L,role:["user"]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}};if(k)return await G(u.role.slug),u;if(u.role.id){const U=u.role.label.toLowerCase().replace(/\s+/g,"-"),B=u.role.slug,w=U!==B,z=await d.organization.updateRole({roleId:u.role.id,data:{permission:M,...w?{roleName:U}:{}}});if(z?.error)throw new Error(z.error.message??"Something went wrong");return await G(w?U:B,w?B:void 0),w?{...u,role:{...u.role,slug:U}}:u}else{const U=await d.organization.createRole({role:A,permission:M});if(U?.error)throw new Error(U.error.message??"Something went wrong");for(const B of u.memberIds){const w=await d.organization.updateMemberRole({memberId:B,role:[A]});if(w?.error)throw new Error(w.error.message)}return{...u,role:{...u.role,id:U.data?.roleData?.id,slug:A}}}},onSuccess:(u,M)=>{h.invalidateQueries({queryKey:re.members(r)}),h.invalidateQueries({queryKey:re.organizationRoles(r)});const A=!M.role.id&&!M.role.slug,k=M.role.slug==="owner"&&!M.role.id;Re(k?"role_members_updated":A?"role_created":"role_updated",{role_slug:M.role.slug??null}),he.success(k?"Members updated successfully!":A?"Role created successfully!":"Role updated successfully!"),o.reset(u),n(u.role.id)},onError:u=>{he.error(u instanceof Error?u.message:"Failed to save role")}}),E=o.handleSubmit(u=>{if(!u.role.label.trim()){he.error("Role name is required"),o.setFocus("role.label");return}T.mutate(u)}),S=!g,C=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",v=[...g?[]:[{id:"mcp",label:"MCP Permissions"}],{id:"org",label:"Organization Permissions"},{id:"models",label:"Models"},{id:"members",label:"Members"}],[_,O]=$.useState(""),[p,R]=$.useState(!1),I=u=>{x(u),O("")},j={mcp:"Search MCP servers...",org:"Search permissions...",models:"Search models...",members:"Search members..."};return s.jsx(te,{children:s.jsxs(te.Content,{className:K("flex flex-col",a!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(te.Title,{actions:S&&s.jsxs(s.Fragment,{children:[s.jsx(ne,{variant:"outline",size:"sm",onClick:e,disabled:T.isPending,children:"Cancel"}),s.jsx(ne,{size:"sm",onClick:E,disabled:T.isPending||!m||!N,children:T.isPending?"Saving...":f?"Create Role":"Save Changes"})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",t.kind==="builtin"?qt(t.role):Ht(o.watch("role.label")))}),g&&s.jsx(Ke,{size:16,className:"text-muted-foreground shrink-0"}),f||t.kind==="custom"?s.jsx("input",{...o.register("role.label"),placeholder:"Role name",className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:f}):s.jsx("span",{className:"truncate",children:C})]})}),s.jsx("div",{className:"flex items-center gap-2",children:v.map(u=>s.jsx("button",{type:"button",onClick:()=>I(u.id),className:K("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",a===u.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:u.label},u.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(ve,{value:_,onChange:O,placeholder:j[a]??"Search...",className:"w-full md:w-[375px]"}),a==="members"&&s.jsx(As,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>R(!0)})]})]})}),s.jsx("div",{className:K("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",a!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:K(a!=="org"&&"h-full overflow-hidden",a!=="models"&&a!=="org"&&"border border-border rounded-xl bg-card"),children:[a==="mcp"&&!g&&s.jsx(Kt,{toolSet:o.watch("toolSet"),onToolSetChange:u=>o.setValue("toolSet",u,{shouldDirty:!0}),searchQuery:_}),a==="org"&&s.jsx(Xt,{allowAllStaticPermissions:o.watch("allowAllStaticPermissions"),staticPermissions:o.watch("staticPermissions"),onAllowAllChange:u=>o.setValue("allowAllStaticPermissions",u,{shouldDirty:!0}),onPermissionsChange:u=>o.setValue("staticPermissions",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="models"&&s.jsx(gs,{allowAllModels:o.watch("allowAllModels"),modelSet:o.watch("modelSet"),onAllowAllChange:u=>o.setValue("allowAllModels",u,{shouldDirty:!0}),onModelSetChange:u=>o.setValue("modelSet",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="members"&&s.jsx(Ts,{memberIds:o.watch("memberIds"),onMemberIdsChange:u=>o.setValue("memberIds",u,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?"User is the default role — members can't be removed from it; assign another role to change their access":"Owner membership cannot be changed",searchQuery:_,addMemberDialogOpen:p,onAddMemberDialogOpenChange:R})]})})]})})}function js(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function vs(t){const e=H.c(6),{area:n,children:l}=t,{isPrivileged:i,loading:r,error:d}=Dt();let h;return e[0]!==n||e[1]!==l||e[2]!==d||e[3]!==i||e[4]!==r?(h=s.jsx(kt,{granted:i,loading:r,error:d,area:n,children:l}),e[0]=n,e[1]=l,e[2]=d,e[3]=i,e[4]=r,e[5]=h):h=e[5],h}const ys=[{role:"owner",label:"Owner",color:"bg-red-500"},{role:"admin",label:"Admin",color:"bg-blue-500"},{role:"user",label:"User",color:"bg-green-500"}],Ce=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"];function Ms(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Ce.length;return Ce[n]??Ce[0]}const ws={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Ls(t,e){return e?ws[t]??"bg-neutral-400":Ms(t)}function Ps(){const t=H.c(77),[e,n]=$.useState(""),[l,i]=$.useState(null),r=gt();let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},t[0]=d):d=t[0];const{role:h}=xt(d),{locator:c}=Ne(),g=je(),f=$e(),{customRoles:a,refetch:x}=pt();let o;t[1]!==r?(o=P=>r({to:".",search:V=>({...V,role:P})}),t[1]=r,t[2]=o):o=t[2];const m=o;let N;e:{if(!h){N=null;break e}if(h==="new"){N={kind:"new"};break e}if(h.startsWith("builtin-")){N={kind:"builtin",role:h.slice(8)};break e}let P;t[3]!==h?(P=ae=>ae.id===h,t[3]=h,t[4]=P):P=t[4];const V=a.find(P);N=V?{kind:"custom",role:V}:null}const T=N;let E;t[5]!==c?(E=re.members(c),t[5]=c,t[6]=E):E=t[6];let S;t[7]!==g?(S=()=>g.organization.listMembers(),t[7]=g,t[8]=S):S=t[8];let C;t[9]!==E||t[10]!==S?(C={queryKey:E,queryFn:S},t[9]=E,t[10]=S,t[11]=C):C=t[11];const{data:v}=Oe(C);let _;t[12]!==v?.data?.members?(_=v?.data?.members??[],t[12]=v?.data?.members,t[13]=_):_=t[13];const O=_;let p;t[14]!==O?(p=P=>O.filter(V=>V.role===P).length,t[14]=O,t[15]=p):p=t[15];const R=p;let I;if(t[16]!==a||t[17]!==R||t[18]!==e){let P;t[20]!==R?(P=ce=>({kind:"builtin",role:{...ce,memberCount:R(ce.role)}}),t[20]=R,t[21]=P):P=t[21];const V=ys.map(P);let ae;t[22]!==R?(ae=ce=>({kind:"custom",role:{...ce,memberCount:R(ce.role)}}),t[22]=R,t[23]=ae):ae=t[23];const at=a.map(ae);if(I=[...V,...at],e){const ce=e.toLowerCase();I=I.filter(ct=>ct.role.label.toLowerCase().includes(ce))}t[16]=a,t[17]=R,t[18]=e,t[19]=I}else I=t[19];let j;t[24]!==g?(j=async P=>{const V=await g.organization.deleteRole({roleId:P});if(V?.error)throw new Error(V.error.message);return V?.data},t[24]=g,t[25]=j):j=t[25];const u=Fe({mutationFn:j,onSuccess:(P,V)=>{Re("role_deleted",{role_id:V}),f.invalidateQueries({queryKey:re.members(c)}),f.invalidateQueries({queryKey:re.organizationRoles(c)}),he.success("Role deleted successfully!"),x(),T?.kind==="custom"&&T.role.id===V&&m(void 0)},onError:zs});let M,A,k,G;t[26]===Symbol.for("react.memo_cache_sentinel")?(G={id:"role",header:"Role",render:Vs,cellClassName:"flex-1 min-w-0",sortable:!0},M={id:"type",header:"Type",render:Bs,cellClassName:"w-28 shrink-0"},A={id:"permissions",header:"Permissions",render:Us,cellClassName:"flex-1 min-w-0"},k={id:"members",header:"Members",render:Gs,cellClassName:"w-24 shrink-0"},t[26]=M,t[27]=A,t[28]=k,t[29]=G):(M=t[26],A=t[27],k=t[28],G=t[29]);let U;t[30]===Symbol.for("react.memo_cache_sentinel")?(U=[G,M,A,k,{id:"actions",header:"",render:P=>P.kind==="builtin"?null:s.jsxs(Et,{children:[s.jsx(Tt,{asChild:!0,children:s.jsx(ne,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ks,children:s.jsx(Nt,{size:16})})}),s.jsx(_t,{align:"end",onClick:Ds,children:s.jsxs(It,{variant:"destructive",onClick:()=>{const V=P.role;V.id&&i({id:V.id,label:V.label})},children:[s.jsx(St,{size:16}),"Delete"]})})]}),cellClassName:"w-12 shrink-0"}],t[30]=U):U=t[30];const B=U;let w;t[31]!==m?(w=P=>{if(P.kind==="builtin")m(`builtin-${P.role.role}`);else{const V=P.role;m(V.id)}},t[31]=m,t[32]=w):w=t[32];const z=w;if(T){let P;t[33]!==m?(P=()=>m(void 0),t[33]=m,t[34]=P):P=t[34];let V;return t[35]!==x||t[36]!==m?(V=()=>{x(),m(void 0)},t[35]=x,t[36]=m,t[37]=V):V=t[37],s.jsx(Os,{target:T,onBack:P,onSaved:V},js(T))}let y;t[38]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(te.Title,{children:"Roles"}),t[38]=y):y=t[38];let L;t[39]===Symbol.for("react.memo_cache_sentinel")?(L=P=>{P.key==="Escape"&&(n(""),P.target.blur())},t[39]=L):L=t[39];let Y;t[40]!==e?(Y=s.jsx(ve,{value:e,onChange:n,placeholder:"Search roles...",className:"w-full md:w-[375px]",onKeyDown:L}),t[40]=e,t[41]=Y):Y=t[41];let F;t[42]!==m?(F=()=>m("new"),t[42]=m,t[43]=F):F=t[43];let X;t[44]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(Ae,{size:16}),t[44]=X):X=t[44];let J;t[45]!==F?(J=s.jsxs(ne,{onClick:F,children:[X,"Create Role"]}),t[45]=F,t[46]=J):J=t[46];let le;t[47]!==Y||t[48]!==J?(le=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[Y,J]}),t[47]=Y,t[48]=J,t[49]=le):le=t[49];let oe;t[50]!==e?(oe=e?s.jsx(Ge,{title:"No roles found",description:`No roles match "${e}"`}):s.jsx(Ge,{title:"No roles",description:"Create a role to get started."}),t[50]=e,t[51]=oe):oe=t[51];let ie;t[52]!==I||t[53]!==B||t[54]!==z||t[55]!==oe?(ie=s.jsx(bt,{columns:B,data:I,isLoading:!1,onRowClick:z,emptyState:oe}),t[52]=I,t[53]=B,t[54]=z,t[55]=oe,t[56]=ie):ie=t[56];let b;t[57]!==le||t[58]!==ie?(b=s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[y,le,ie]})})}),t[57]=le,t[58]=ie,t[59]=b):b=t[59];const D=l!==null;let Q;t[60]===Symbol.for("react.memo_cache_sentinel")?(Q=P=>!P&&i(null),t[60]=Q):Q=t[60];let q;t[61]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Ze,{children:"Delete Role"}),t[61]=q):q=t[61];const W=l?.label;let Z;t[62]!==W?(Z=s.jsxs(qe,{children:[q,s.jsxs(Xe,{children:['Are you sure you want to delete the "',W,'" role? This action cannot be undone.']})]}),t[62]=W,t[63]=Z):Z=t[63];let ee;t[64]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Je,{children:"Cancel"}),t[64]=ee):ee=t[64];let de;t[65]!==u||t[66]!==l?(de=s.jsxs(We,{children:[ee,s.jsx(et,{onClick:()=>{l?.id&&u.mutate(l.id),i(null)},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[65]=u,t[66]=l,t[67]=de):de=t[67];let me;t[68]!==Z||t[69]!==de?(me=s.jsxs(He,{children:[Z,de]}),t[68]=Z,t[69]=de,t[70]=me):me=t[70];let ue;t[71]!==D||t[72]!==me?(ue=s.jsx(Qe,{open:D,onOpenChange:Q,children:me}),t[71]=D,t[72]=me,t[73]=ue):ue=t[73];let _e;return t[74]!==b||t[75]!==ue?(_e=s.jsxs(te,{children:[b,ue]}),t[74]=b,t[75]=ue,t[76]=_e):_e=t[76],_e}function Ds(t){return t.stopPropagation()}function ks(t){return t.stopPropagation()}function Gs(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Us(t){if(t.kind==="builtin")return t.role.role==="owner"||t.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:"Full access"}):s.jsx("span",{className:"text-sm text-muted-foreground",children:"Basic access"});const e=t.role,n=[];return e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:n.length>0?n.join(", "):"No permissions"})}function Bs(t){return t.kind==="builtin"?s.jsx(ge,{variant:"secondary",className:"text-xs",children:"Built-in"}):s.jsx(ge,{variant:"outline",className:"text-xs",children:"Custom"})}function Vs(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",Ls(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(Ke,{size:12,className:"text-muted-foreground shrink-0"})]})}function zs(t,e){Re("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),he.error(t instanceof Error?t.message:"Failed to delete role")}function Ys(){const t=H.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load roles"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ht,{fallback:e,children:s.jsx($.Suspense,{fallback:s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Ps,{})})}),t[1]=n):n=t[1],n}function fl(){const t=H.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vs,{area:"roles",children:s.jsx(Ys,{})}),t[0]=e):e=t[0],e}export{fl as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,aj as nt,a3 as Pe,j as d,a4 as rt,ak as be,_ as k,U as st,V as j,W as _,bQ as $,a2 as lt,an as Ne,X as Ee,ai as at,bL as it,bS as ct,dA as dt,dD as ut,dB as pt,dE as ft,$ as mt,Y as ht,dC as vt,a0 as gt,a1 as xt,c as ee,l as oe}from"./index-CFiyU0D9.js";import{V as St}from"./tooltip-DrpiSbRG.js";import{i as wt,n as Ct}from"./ChevronUp-DBpw6M-L.js";import{t as Re}from"./ChevronDown-DyHvxYlc.js";function _e(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],Q="Select",[de,ue,bt]=at(Q),[ne]=ht(Q,[bt,Ee]),pe=Ee(),[Tt,G]=ne(Q),[Pt,_t]=ne(Q),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=r,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[U,M]=c.useState(!1),re=nt(u),[N,O]=Pe({prop:o,defaultProp:n??!1,onChange:i,caller:Q}),[F,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:Q}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:be(),value:F,onValueChange:q,open:N,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Je,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:F,onChange:E=>q(E.target.value),disabled:b,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=Q;var Me="SelectTrigger",Ae=c.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:_(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:_(n.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:_(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:i,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var Nt="SelectIcon",ke=c.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Nt;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var J="SelectContent",Be=c.forwardRef((r,e)=>{const t=G(J,r.__scopeSelect),[o,n]=c.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const i=o;return i?Ne.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),i):null}return d.jsx(He,{...r,ref:e})});Be.displayName=J;var A=10,[Ve,Y]=ne(J),Rt="SelectContentImpl",jt=vt("SelectContent.RemoveScroll"),He=c.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=r,m=G(J,t),[x,U]=c.useState(null),[M,re]=c.useState(null),N=k(e,f=>U(f)),[O,F]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=c.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(F(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:_(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:_(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,i=G(J,t),s=Y(J,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,N=>h(N)),b=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const N=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,P=F.left-I,X=N.left-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-F.right-I,X=window.innerWidth-N.right-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=N.top+N.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[U,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(N=>{N&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:U},children:d.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...i}=r,s=pe(t);return d.jsx(gt,{...s,...i,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(J,{}),we="SelectViewport",Ue=c.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:_(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),U=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:i,...s}=r,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),v=c.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:_(s.onFocus,()=>w(!0)),onBlur:_(s.onBlur,()=>w(!1)),onClick:_(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:_(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:_(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:_(s.onPointerMove,m=>{v.current=m.pointerType,n?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:_(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...i}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=_t(le,t),[h,g]=c.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ne.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Qe=c.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:_(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:_(n.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:_(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ut=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Ft="SelectBubbleInput",Je=c.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=c.useRef(null),i=k(o,n),s=it(e);return c.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:i,defaultValue:e})});Je.displayName=Ft;function et(r){return r===""||r===void 0}function tt(r){const e=ct(r),t=c.useRef(""),o=c.useRef(0),n=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,i]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?r.indexOf(t):-1;let s=Wt(r,Math.max(i,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Ue,Qt=$e,Jt=Ge,eo=qe,to=Xe,oo=Ze;function co(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(13);let t,o,n,i;e[0]!==r?({className:o,size:i,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(r){const e=ee.c(25);let t,o,n,i,s;e[0]!==r?({className:o,children:t,position:i,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i,e[5]=s):(t=e[1],o=e[2],n=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function mo(r){const e=ee.c(16);let t,o,n,i;e[0]!==r?({className:o,children:t,hideCheck:i,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Jt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Qt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Ct,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{fo as S,mo as a,po as b,uo as c,co as d,_e as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as T,j as t,r as Q,B as je,i as Se}from"./index-CFiyU0D9.js";import{i as be}from"./ChevronRight-Cpfh3gza.js";import{I as fe}from"./agent-icon-oDx9Z_Be.js";import{S as ue}from"./scroll-area-BM-54tW1.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Te,f as Fe,P as Re,S as Ee}from"./page-seo-form-BLqpZnj6.js";import{s as xe,p as ze}from"./index-CRxAjd1d.js";import{a as ge}from"./Tool01-CvnpFI53.js";import"./AlertCircle-DC-zDzV-.js";import"./SwitchHorizontal01-DAZXInW8.js";import"./Settings02-BcAnTzm5.js";import"./XCircle-Ct0eqqsw.js";import"./ArrowUpRight-OJZisFPQ.js";import"./ZapSquare-PMiGcZpW.js";import"./Users03-DknrDMtT.js";import"./CheckCircle-Cgnheu-R.js";import"./ChevronUp-DBpw6M-L.js";import"./ChevronDown-DyHvxYlc.js";import"./ChevronLeft-dyRjFCmp.js";import"./DotsVertical-5jSu3d1f.js";import"./Stars02-qnq-_X9g.js";import"./Eye-bojNLUjA.js";import"./ZoomOut-6ix2H92j.js";import"./Globe01-CyfpzbeQ.js";import"./FilterLines-CFl65nng.js";import"./Star01-DHEkWySe.js";import"./Globe04-DFpdKSRI.js";import"./HardDrive-B1mtnaeA.js";import"./Key01-CwrJlZo0.js";import"./LayoutLeft-fsm0LcB8.js";import"./LinkExternal01-BHwVyDja.js";import"./Monitor01-ChA6ov2I.js";import"./Sun-lTiqxOzH.js";import"./Palette-DusYqL0W.js";import"./Play-CnXG8qqP.js";import"./Plus-eGxBB1d8.js";import"./SearchLg-CDpA_lbT.js";import"./SearchMd-ujiTPCmg.js";import"./Shield01-ZxmFmrvL.js";import"./Stars01-BdCaKqhF.js";import"./Trash01-ByxlxTiZ.js";import"./Upload01-Z77n1bV8.js";import"./User01-COQtf360.js";import"./Users01-wtRJYQKX.js";import"./XClose-BaZ908gw.js";import"./X-DrMVHLcw.js";import"./Zap-wRIFSWIq.js";import"./use-clock-tick-BcxdOJLx.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Xy0buIqd.js";import"./tooltip-DrpiSbRG.js";import"./file-type-icon-DPWxBpNL.js";import"./dialog-BAqFyO8a.js";import"./use-mobile-NlF-3RoP.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-C7syjwde.js";import"./use-mcp-client-xOK-OF8p.js";import"./auth-Bej0Tx2Y.js";import"./chat-context-n9syhvq-.js";import"./hooks-CUSV6Enf.js";import"./decopilot-sse-pool-CvYk1hkc.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-2U_MnYnK.js";import"./use-collections-B4atckEK.js";import"./use-ai-providers-C7KmiuqP.js";import"./studio-tools-CNO5iCKk.js";import"./use-decopilot-events-CpQNzv3e.js";import"./use-organization-settings-DksiQdGc.js";import"./shell-layout-Nyz7GHu7.js";import"./avatar-CJP1BOq4.js";import"./required-auth-layout-DDJmFi3U.js";import"./use-org-sso-DkqH8Zpz.js";import"./sheet-DyU03ddw.js";import"./integration-icon-LQhkkaLl.js";import"./use-navigate-to-agent-DZubxUSm.js";import"./use-connection-Dz29RF9P.js";import"./use-mcp-prompts-Crr3H7P7.js";import"./form-DGE2mWLL.js";import"./label-CdBSUJpf.js";import"./input-BwRH-Gsz.js";import"./select-C6v8Xcth.js";import"./switch-CCMIMmOF.js";import"./index-mEtg0zTM.js";import"./drawer-CFkqEC3w.js";import"./collection-search-8iNXnGlM.js";import"./tabs-Ca0vDJqc.js";import"./toggle-group-9TrYMc69.js";import"./sortable.esm-MymOIPKk.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C6NYo4Gp.js";import"./use-registry-connections-BOZLpkM5.js";import"./useInfiniteQuery-RUqqRph1.js";import"./use-infinite-scroll-BX1nHHVY.js";import"./extract-connection-data-D6bQrejT.js";import"./card-BFb5m83e.js";import"./collection-tabs-KA2be3wH.js";import"./badge-DhpSM7g_.js";import"./textarea-BYT525JZ.js";import"./connection-form-helpers-CwZx7WkC.js";import"./authenticate-and-persist-oauth-DoPUB_Bh.js";import"./mcp-oauth-IblqU9XT.js";import"./useSuspenseInfiniteQuery-fRYRtDkY.js";import"./connect-desktop-dialog-Brra3cMC.js";import"./decopilot-BItqS11w.js";import"./checkbox-DmOzmKLP.js";import"./skeleton-B0I93PJP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-MeT61nuY.js";import"./popover-BXFiEQtN.js";import"./command-C34397s2.js";import"./index-jBUpmiBg.js";import"./use-org-fs-DyK8omii.js";import"./dropdown-menu-C62KNjwK.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DxV7deix.js";import"./empty-state-Sh_DuDcy.js";import"./toolbar-p8VcpV1N.js";import"./preview-dialog-CQgf0QcR.js";import"./index-B6hcksS9.js";import"./use-mcp-tools-C8tMWwG9.js";import"./use-capability-C6Dwri-U.js";import"./shell-route-loading-BRcTX0VT.js";import"./tools-list-uWC3Ij6C.js";import"./alert-dialog-CYizItFp.js";import"./use-debounced-autosave-B4mbwJnu.js";import"./index-Bb-tYGNK.js";import"./sidebar-BNrafefE.js";import"./search-input-M7ubuBMG.js";import"./github-repo-picker-B5tZucJa.js";import"./use-debounced-value-C6U3mliE.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CLmhH-Rb.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./automation-runs-B-dNDEWH.js";import"./table-DeNuxLMl.js";import"./use-members-BMNjJExY.js";import"./use-org-auth-client-C_UJ3Vg_.js";import"./task-status-B3nPzwP7.js";import"./use-automations-RMjkwkxX.js";import"./use-file-configs-CFCmr--W.js";import"./monaco-editor-5JIc-lnc.js";import"./select-model-Cz9R_UN3.js";import"./automation-list-row-CsTyBm4M.js";function U(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=U(n.title),i=U(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(n.description),image:U(n.image),favicon:U(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Ie=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function Le(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==u||e[24]!==y||e[25]!==g?(S=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=S):S=e[26],S}function $e(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function De(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const S=i.description??ee;let _;e[17]!==y||e[18]!==S?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:S}),e[17]=y,e[18]=S,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let b;e[24]!==i.image?(b=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=b):b=e[25];let k;e[26]!==N||e[27]!==b||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,b]}),e[26]=N,e[27]=b,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx(Le,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(De,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Ie.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function Fi(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,S]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),S(Me));const{persistSeo:b,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!K||Ce(B))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==b||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),b(de)},e[8]=b,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==S?(H=()=>S(Ke),e[14]=S,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(be,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let I;e[27]!==te?(I=te&&t.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=I):I=e[28];let L;e[29]!==p||e[30]!==o.kind?(L=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=L):L=e[31];let $;e[32]!==L||e[33]!==I?($=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[I,L]}),e[32]=L,e[33]=I,e[34]=$):$=e[34];let D;e[35]!==$||e[36]!==O?(D=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,$]}),e[35]=$,e[36]=O,e[37]=D):D=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==b||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==R?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),b(E)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Ee,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=b,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=R,e[59]=A):A=e[59];let J;return e[60]!==D||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[D,A]}),e[60]=D,e[61]=A,e[62]=J):J=e[62],J}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{Fi as SeoEditor};
|
|
@@ -1 +0,0 @@
|
|
|
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-CFiyU0D9.js";import{u as E,S as U,M as V}from"./shell-controls-DtGb6E4l.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-BNrafefE.js";import{a as te}from"./index-Bb-tYGNK.js";import{n as le,b as re,a as ie,c as oe,d as ne,i as T}from"./ZapSquare-PMiGcZpW.js";import{t as ae,a as A}from"./Users03-DknrDMtT.js";import{i as ce}from"./HardDrive-B1mtnaeA.js";import{i as me}from"./Key01-CwrJlZo0.js";import{i as fe}from"./Shield01-ZxmFmrvL.js";import{s as de}from"./User01-COQtf360.js";import{i as xe}from"./Zap-wRIFSWIq.js";import{a as be}from"./use-capability-C6Dwri-U.js";import{a as ue}from"./use-join-requests-j9WpmFq7.js";import{u as W}from"./use-mobile-NlF-3RoP.js";import{u as he}from"./use-status-sounds-DxV7deix.js";import{a as y}from"./toolbar-p8VcpV1N.js";import"./sheet-DyU03ddw.js";import"./X-DrMVHLcw.js";import"./LayoutLeft-fsm0LcB8.js";import"./tooltip-DrpiSbRG.js";import"./studio-tools-CNO5iCKk.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-CpQNzv3e.js";import"./decopilot-sse-pool-CvYk1hkc.js";import"./backoff-CrEUbyZT.js";import"./ChevronLeft-dyRjFCmp.js";import"./ChevronRight-Cpfh3gza.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","4.3.0"]})}),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","4.3.0"]})}),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 +0,0 @@
|
|
|
1
|
-
import{b2 as S,r as d,b3 as b,b4 as h,c as f,j as c}from"./index-CFiyU0D9.js";import{S as p,c as x,d as g}from"./sheet-DyU03ddw.js";import{u as m}from"./sidebar-BNrafefE.js";import{i as j}from"./LayoutLeft-fsm0LcB8.js";import{T as R}from"./toolbar-p8VcpV1N.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as i,j as s,i as l}from"./index-CFiyU0D9.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,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-C4UMhzml.js","assets/index-CFiyU0D9.js","assets/index-BqKQnks_.css","assets/XCircle-Ct0eqqsw.js","assets/CheckCircle-Cgnheu-R.js","assets/Settings02-BcAnTzm5.js","assets/use-mcp-client-xOK-OF8p.js","assets/auth-Bej0Tx2Y.js","assets/useInfiniteQuery-RUqqRph1.js","assets/use-infinite-scroll-BX1nHHVY.js","assets/studio-tools-CNO5iCKk.js","assets/badge-DhpSM7g_.js","assets/input-BwRH-Gsz.js","assets/dropdown-menu-C62KNjwK.js","assets/ChevronUp-DBpw6M-L.js","assets/ChevronRight-Cpfh3gza.js","assets/DotsVertical-5jSu3d1f.js","assets/table-DeNuxLMl.js","assets/toggle-group-9TrYMc69.js","assets/use-view-mode-C2dllj6L.js","assets/use-mobile-NlF-3RoP.js","assets/FilterLines-CFl65nng.js","assets/Globe01-CyfpzbeQ.js","assets/SearchMd-ujiTPCmg.js","assets/dialog-BAqFyO8a.js","assets/X-DrMVHLcw.js","assets/AlertCircle-DC-zDzV-.js","assets/Upload01-Z77n1bV8.js","assets/alert-dialog-CYizItFp.js","assets/card-BFb5m83e.js","assets/Trash01-ByxlxTiZ.js","assets/label-CdBSUJpf.js","assets/select-C6v8Xcth.js","assets/tooltip-DrpiSbRG.js","assets/ChevronDown-DyHvxYlc.js","assets/switch-CCMIMmOF.js","assets/textarea-BYT525JZ.js","assets/checkbox-DmOzmKLP.js","assets/Eye-bojNLUjA.js","assets/LinkExternal01-BHwVyDja.js","assets/use-copy-Xy0buIqd.js","assets/Key01-CwrJlZo0.js","assets/Plus-eGxBB1d8.js","assets/mcp-oauth-IblqU9XT.js","assets/Play-CnXG8qqP.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-CFiyU0D9.js";import{R as u}from"./require-capability--mIKExbX.js";import"./use-capability-C6Dwri-U.js";import"./access-gate-D6dGDGRI.js";import"./capability-load-error-CCgNL5xi.js";const g=l.lazy(()=>f(()=>import("./registry-layout-C4UMhzml.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 +0,0 @@
|
|
|
1
|
-
import{c as i,l as p,j as r,r as d,b5 as S,e as N,an as T,G as $,F as y,H as w}from"./index-CFiyU0D9.js";import{n as C}from"./ChevronLeft-dyRjFCmp.js";import{i as L}from"./ChevronRight-Cpfh3gza.js";function j(t){const e=i.c(14);let s,o,l,n,c;e[0]!==t?({active:s,className:o,ref:n,type:c,...l}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=l,e[4]=n,e[5]=c):(s=e[1],o=e[2],l=e[3],n=e[4],c=e[5]);const f=c===void 0?"button":c,h=s?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let u;e[6]!==o||e[7]!==h?(u=p("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",h,o),e[6]=o,e[7]=h,e[8]=u):u=e[8];let g;return e[9]!==l||e[10]!==n||e[11]!==u||e[12]!==f?(g=r.jsx("button",{ref:n,type:f,className:u,...l}),e[9]=l,e[10]=n,e[11]=u,e[12]=f,e[13]=g):g=e[13],g}const k=d.createContext(null);function m(){const t=d.use(k);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function v(t){const e=i.c(8),{children:s}=t,[o,l]=d.useState(null),[n,c]=d.useState(null),[f,h]=d.useState(null),[u,g]=d.useState(null);let b;e[0]!==f||e[1]!==u||e[2]!==n||e[3]!==o?(b={togglesEl:o,setTogglesEl:l,tabsEl:n,setTabsEl:c,centerEl:f,setCenterEl:h,rightEl:u,setRightEl:g},e[0]=f,e[1]=u,e[2]=n,e[3]=o,e[4]=b):b=e[4];let x;return e[5]!==s||e[6]!==b?(x=r.jsx(k,{value:b,children:s}),e[5]=s,e[6]=b,e[7]=x):x=e[7],x}function a(t){const e=i.c(2),{children:s}=t;let o;return e[0]!==s?(o=r.jsx(v,{children:r.jsx("div",{className:"flex flex-col h-full min-h-0",children:s})}),e[0]=s,e[1]=o):o=e[1],o}function _(t){const e=i.c(10);let s,o,l;e[0]!==t?({children:s,className:o,...l}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=l):(s=e[1],o=e[2],l=e[3]);let n;e[4]!==o?(n=p("app-titlebar wco-drag shrink-0 grid grid-cols-3 items-center pl-1 pr-2 pt-0.25 h-12 bg-sidebar",o),e[4]=o,e[5]=n):n=e[5];let c;return e[6]!==s||e[7]!==l||e[8]!==n?(c=r.jsx("div",{className:n,...l,children:s}),e[6]=s,e[7]=l,e[8]=n,e[9]=c):c=e[9],c}function R(t){const e=i.c(2),{children:s}=t;let o;return e[0]!==s?(o=r.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:s}),e[0]=s,e[1]=o):o=e[1],o}function z(t){const e=i.c(2),{children:s}=t;let o;return e[0]!==s?(o=r.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:s}),e[0]=s,e[1]=o):o=e[1],o}function P(){const t=i.c(2);if(!S())return null;let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(j,{onClick:B,"aria-label":"Go back",title:"Go back",children:r.jsx(C,{size:16})}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsxs(r.Fragment,{children:[e,r.jsx(j,{onClick:G,"aria-label":"Go forward",title:"Go forward",children:r.jsx(L,{size:16})})]}),t[1]=s):s=t[1],s}function G(){return window.history.forward()}function B(){return window.history.back()}function F(){const t=i.c(7),s=y().logo??w,o=typeof s=="string"?s:s.light,l=typeof s=="string"?s:s.dark;let n;t[0]!==o?(n=r.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=o,t[1]=n):n=t[1];let c;t[2]!==l?(c=r.jsx("img",{src:l,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=l,t[3]=c):c=t[3];let f;return t[4]!==n||t[5]!==c?(f=r.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[n,c]}),t[4]=n,t[5]=c,t[6]=f):f=t[6],f}function E(){const t=i.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(d.Suspense,{fallback:r.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:r.jsx(F,{})}),t[0]=e):e=t[0],e}function H(){const t=i.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=N(e);let o;t[1]!==s?(o={org:s},t[1]=s,t[2]=o):o=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(E,{}),t[3]=l):l=t[3];let n;return t[4]!==o?(n=r.jsx($,{to:"/$org",params:o,"aria-label":"Back to home",title:"Back to home",className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:l}),t[4]=o,t[5]=n):n=t[5],n}function I(){const t=i.c(2),{setCenterEl:e}=m();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=s):s=t[1],s}function D(t){const e=i.c(3),{children:s}=t,{centerEl:o}=m();if(!o)return null;let l;return e[0]!==o||e[1]!==s?(l=T.createPortal(s,o),e[0]=o,e[1]=s,e[2]=l):l=e[2],l}function O(t){const e=i.c(5),{className:s}=t,{setTabsEl:o}=m();let l;e[0]!==s?(l=p("shrink-0 flex items-center",s),e[0]=s,e[1]=l):l=e[1];let n;return e[2]!==o||e[3]!==l?(n=r.jsx("div",{ref:o,className:l}),e[2]=o,e[3]=l,e[4]=n):n=e[4],n}function A(t){const e=i.c(3),{children:s}=t,{tabsEl:o}=m();if(!o)return null;let l;return e[0]!==s||e[1]!==o?(l=T.createPortal(s,o),e[0]=s,e[1]=o,e[2]=l):l=e[2],l}function U(t){const e=i.c(5),{className:s}=t,{setTogglesEl:o}=m();let l;e[0]!==s?(l=p("contents",s),e[0]=s,e[1]=l):l=e[1];let n;return e[2]!==o||e[3]!==l?(n=r.jsx("div",{ref:o,className:l}),e[2]=o,e[3]=l,e[4]=n):n=e[4],n}function q(t){const e=i.c(3),{children:s}=t,{togglesEl:o}=m();if(!o)return null;let l;return e[0]!==s||e[1]!==o?(l=T.createPortal(s,o),e[0]=s,e[1]=o,e[2]=l):l=e[2],l}function J(){const t=i.c(2),{setRightEl:e}=m();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=s):s=t[1],s}function K(t){const e=i.c(3),{children:s}=t,{rightEl:o}=m();if(!o)return null;let l;return e[0]!==s||e[1]!==o?(l=T.createPortal(s,o),e[0]=s,e[1]=o,e[2]=l):l=e[2],l}a.Provider=v;a.Header=_;a.LeftColumn=R;a.RightColumn=z;a.Nav=P;a.Logo=E;a.LogoLink=H;a.CenterSlot=I;a.Center=D;a.TabsSlot=O;a.Tabs=A;a.TogglesSlot=U;a.Toggles=q;a.RightSlot=J;a.Right=K;export{j as T,a};
|