decocms 4.503.1 → 4.503.2
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/{ActiveShapeUtils-B4zRtCcX.js → ActiveShapeUtils-CBLSJqBl.js} +1 -1
- package/dist/client/assets/{AlertCircle-B7FQmH_M.js → AlertCircle-BFUZ4yx0.js} +1 -1
- package/dist/client/assets/{AreaChart-80AfW8ak.js → AreaChart-DKrmhkRJ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DZes_rvl.js → ArrowLeft-CK2OAC0l.js} +1 -1
- package/dist/client/assets/{ArrowUp-DJaSaDSt.js → ArrowUp-U6_gobY2.js} +1 -1
- package/dist/client/assets/{BarChart-BpCZ5QGT.js → BarChart-DBqZyJQX.js} +1 -1
- package/dist/client/assets/{Building02-C692k1Je.js → Building02-Ddm6hNyu.js} +1 -1
- package/dist/client/assets/{CategoricalChart-FZqnb3jh.js → CategoricalChart-DYWjGYq1.js} +1 -1
- package/dist/client/assets/{CheckCircle-DTvtIc91.js → CheckCircle-BWW06ZXQ.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CSoDnwYU.js → ChevronSelectorVertical-DKcwgXpF.js} +1 -1
- package/dist/client/assets/{ChevronUp-D6SZVzK-.js → ChevronUp-CTrNq9Nk.js} +1 -1
- package/dist/client/assets/{Copy01-CRJ909cy.js → Copy01-TJP2zB12.js} +1 -1
- package/dist/client/assets/{CreditCard01-DKW3gWt7.js → CreditCard01-Bm6_xB5H.js} +1 -1
- package/dist/client/assets/{DotsVertical-DPFiEMJ2.js → DotsVertical-DKl8j3BE.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-D5rQXK1V.js → ErrorBarContext-CR5xIaDQ.js} +1 -1
- package/dist/client/assets/{Globe04-CCnzVN5c.js → Globe04-ClrCqE7c.js} +1 -1
- package/dist/client/assets/{Image01-CoKdj_km.js → Image01-Cf_YxPro.js} +1 -1
- package/dist/client/assets/{Key01-CZ56XYyu.js → Key01-55Z6tHcr.js} +1 -1
- package/dist/client/assets/{Link01-QYs7ouJl.js → Link01-DNXOSsg9.js} +1 -1
- package/dist/client/assets/{LinkBroken01-C8q-hkDW.js → LinkBroken01-Vuoqu_ZW.js} +1 -1
- package/dist/client/assets/{Monitor01-DO9PZtsn.js → Monitor01-C-mB2rao.js} +1 -1
- package/dist/client/assets/{Play-B8h_fG9j.js → Play-CUFyJJIt.js} +1 -1
- package/dist/client/assets/{Plus-CyJJ3XFV.js → Plus-D-GSl2MA.js} +1 -1
- package/dist/client/assets/{SearchMd-Yk_yG6_-.js → SearchMd-CkV8MM4H.js} +1 -1
- package/dist/client/assets/{Sector-C-MC544L.js → Sector-CNZsIxmG.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Cr7oTzOr.js → ShoppingBag01-dI1cRqeE.js} +1 -1
- package/dist/client/assets/{Sun-DM7-cZiQ.js → Sun-BPl8u-yx.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Bv6v-_-V.js → SwitchHorizontal01-KDjTaTLX.js} +1 -1
- package/dist/client/assets/{Tool01-D_pOnyrM.js → Tool01-CvAlZ6_R.js} +1 -1
- package/dist/client/assets/{Trash01-CLvb-vxo.js → Trash01-BzUZQR5Y.js} +1 -1
- package/dist/client/assets/{Upload01-DotbRoth.js → Upload01-CdgDB-zC.js} +1 -1
- package/dist/client/assets/{User01-DpzyFtdl.js → User01-CinpYulR.js} +1 -1
- package/dist/client/assets/{UserSquare-ii6T7SpT.js → UserSquare-0R6kuy9W.js} +1 -1
- package/dist/client/assets/{Users01-BEOgMF3y.js → Users01-DFSTtPtZ.js} +1 -1
- package/dist/client/assets/{XAxis--67FjR4u.js → XAxis-CMCcO3jI.js} +1 -1
- package/dist/client/assets/{XClose-UJ2K7TVC.js → XClose-CXxsMd9c.js} +1 -1
- package/dist/client/assets/{ZoomOut-FPIBUWhA.js → ZoomOut-C1rwTYBB.js} +1 -1
- package/dist/client/assets/{access-gate-Cj7Rjcug.js → access-gate-BSx5LbNZ.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-DVH8e9NI.js → add-connection-dialog-CNB1XZS8.js} +1 -1
- package/dist/client/assets/{agent-analytics-Ce-ZWP9P.js → agent-analytics-BKsJAgnt.js} +1 -1
- package/dist/client/assets/agent-app-DBSthuoA.js +1 -0
- package/dist/client/assets/{agent-assets-ajh1hAY1.js → agent-assets-CvHLRtfR.js} +1 -1
- package/dist/client/assets/{agent-automation-Di1n1bbE.js → agent-automation-DG660AlN.js} +1 -1
- package/dist/client/assets/{agent-automations-ClchWctF.js → agent-automations-DkNZsDdV.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BA7V6yxc.js → agent-connect-sources-DFGjLsvu.js} +1 -1
- package/dist/client/assets/agent-deck-DW69LMk-.js +1 -0
- package/dist/client/assets/{agent-e2e-D8djWDNu.js → agent-e2e-CTTKhY1C.js} +1 -1
- package/dist/client/assets/{agent-experiments-C1rYkq-c.js → agent-experiments-B23reQrT.js} +1 -1
- package/dist/client/assets/{agent-file-BPspUfYw.js → agent-file-CFgK4Fqg.js} +1 -1
- package/dist/client/assets/{agent-hosting-X7gvVXAz.js → agent-hosting-BL7RyxMT.js} +1 -1
- package/dist/client/assets/{agent-icon-B7cHtLmN.js → agent-icon-Bmu0Xuy8.js} +1 -1
- package/dist/client/assets/agent-library-D9aAC92j.js +1 -0
- package/dist/client/assets/agent-library-file-Dlq-Vts6.js +1 -0
- package/dist/client/assets/{agent-monitor-gDwyBiKw.js → agent-monitor-Dxt5K5x_.js} +1 -1
- package/dist/client/assets/{agent-overview-CNjRMR9E.js → agent-overview-CAzScYJD.js} +1 -1
- package/dist/client/assets/{agent-releases-BRTteMcu.js → agent-releases-RSbZ96r7.js} +1 -1
- package/dist/client/assets/agent-settings-5EOlZJW6.js +1 -0
- package/dist/client/assets/{agent-site-editor-DSS1gTUU.js → agent-site-editor-DFWKub_t.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-I8N3vaXE.js +2 -0
- package/dist/client/assets/agent-site-editor-content-uhd8Bnc-.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CV5DbDBm.js +1 -0
- package/dist/client/assets/agent-view-QNUTYcIi.js +1 -0
- package/dist/client/assets/{agent-view-guard-CCih3VTe.js → agent-view-guard-BwubZYi8.js} +1 -1
- package/dist/client/assets/{agents-list-CZjV8bbN.js → agents-list-L7YgNFph.js} +1 -1
- package/dist/client/assets/{ai-providers-B6JeYxX2.js → ai-providers-DEeLkiCM.js} +1 -1
- package/dist/client/assets/{alert-8kyzY3mC.js → alert-CnRQ3m-7.js} +1 -1
- package/dist/client/assets/{alert-dialog-Dhk9OY33.js → alert-dialog-BaBKldUA.js} +1 -1
- package/dist/client/assets/{analytics-sections-FNv48nRX.js → analytics-sections-BIEC86HP.js} +1 -1
- package/dist/client/assets/api-keys-BgtInlXe.js +1 -0
- package/dist/client/assets/{api-keys-D5flq3KN.js → api-keys-CmpJo1Rr.js} +1 -1
- package/dist/client/assets/{app-editor-BhVwxJJK.js → app-editor-BqvAOKlk.js} +1 -1
- package/dist/client/assets/{asset-utils-C2Mu9meV.js → asset-utils--N2gsOKr.js} +1 -1
- package/dist/client/assets/{auth-D-N_o1pb.js → auth-BeK8rRbB.js} +1 -1
- package/dist/client/assets/{auth-catchall-BBvN2Rx7.js → auth-catchall-fFMHk_ps.js} +1 -1
- package/dist/client/assets/{auth-entry-DbRCvj9z.js → auth-entry-C1_Znn_c.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CtlyXCmE.js → auth-split-layout-CocPnGfp.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-1LFr51s5.js → authenticate-and-persist-oauth-DJwJCiC8.js} +1 -1
- package/dist/client/assets/{automation-list-row-COpQfJ8e.js → automation-list-row-3WI1rtPZ.js} +1 -1
- package/dist/client/assets/{automation-runs-DVpJHzv0.js → automation-runs-dkpbdf4I.js} +1 -1
- package/dist/client/assets/{automations-C8_YeRwz.js → automations-CaP79ol1.js} +1 -1
- package/dist/client/assets/{autosend-BZJ2TdB9.js → autosend-B-VPnrp2.js} +1 -1
- package/dist/client/assets/{avatar-nIzU_VyX.js → avatar-yCbsNNbw.js} +1 -1
- package/dist/client/assets/{badge-BPqtGuPz.js → badge-Zdi_g359.js} +1 -1
- package/dist/client/assets/{block-document-BKQmJN5N.js → block-document-D4x1DRNW.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-k-h3WbAb.js → blocks-preview-workspace-context-CMtVQxL8.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-BBN5TI4p.js → blocks-tab-states-B7_Q2Byx.js} +3 -3
- package/dist/client/assets/{blog-schema-BUAdNo1n.js → blog-schema-D0r94Mwa.js} +1 -1
- package/dist/client/assets/{board-analytics-DwUwOtky.js → board-analytics-DjFw48Ii.js} +1 -1
- package/dist/client/assets/{buckets-CvDtgoPk.js → buckets-DmovZm0n.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BG4FSKpV.js → build-improve-prompt-doc-Cd4DLFMv.js} +1 -1
- package/dist/client/assets/{calendar-CliY99e4.js → calendar-aMW3a7Qx.js} +1 -1
- package/dist/client/assets/{capability-load-error-BWT346oK.js → capability-load-error-xmV40q_-.js} +1 -1
- package/dist/client/assets/{category-editor-c-rjHBE2.js → category-editor-BYf-_N2d.js} +1 -1
- package/dist/client/assets/{chart-BeOqWxx3.js → chart-D1eqwoYD.js} +1 -1
- package/dist/client/assets/{chat-context-Bm126Y9d.js → chat-context-C4pDshj1.js} +1 -1
- package/dist/client/assets/{chat-draft-DpsQeTSh.js → chat-draft-D5dlb_sl.js} +1 -1
- package/dist/client/assets/{checkbox-BHYLtolO.js → checkbox-C2l5tKo2.js} +1 -1
- package/dist/client/assets/{choose-editor-BAVCkM9r.js → choose-editor-C_NzKjq2.js} +1 -1
- package/dist/client/assets/{cli-auth-success-NkKi_-yn.js → cli-auth-success-DSx-mAhh.js} +1 -1
- package/dist/client/assets/{client-icons-DiOq8lJC.js → client-icons-BasHQFnS.js} +1 -1
- package/dist/client/assets/cms-settings-editor-BB3l1bfM.js +1 -0
- package/dist/client/assets/{collapsible-Bnza8CXw.js → collapsible-CDZFoOK-.js} +1 -1
- package/dist/client/assets/{collection-detail-B-_hN-JC.js → collection-detail-DkNCk0OQ.js} +1 -1
- package/dist/client/assets/{collection-display-button-CrvZt97I.js → collection-display-button--eCg5c5n.js} +1 -1
- package/dist/client/assets/{collection-search-BJh6F6XQ.js → collection-search-sopr7ssV.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper--ez0DBTz.js → collection-table-wrapper-Cy3Cbckv.js} +1 -1
- package/dist/client/assets/{collection-tabs-jNi4Jv0Y.js → collection-tabs-DU5QTifc.js} +1 -1
- package/dist/client/assets/{column-rules-BS9JY-Oa.js → column-rules-Z54WqqNc.js} +1 -1
- package/dist/client/assets/{combobox-CsaU06Jl.js → combobox-C2hXpc1p.js} +1 -1
- package/dist/client/assets/{command-DSORHlWH.js → command-BSGZ-TwS.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BBesHoiB.js → companion-mcps-section-d9HGklIc.js} +1 -1
- package/dist/client/assets/{config-D3uahd_6.js → config-CddNRjRY.js} +1 -1
- package/dist/client/assets/{connect-afghfC6I.js → connect-BGfL3A9r.js} +1 -1
- package/dist/client/assets/{connect-layout-CWu2TS6d.js → connect-layout-DoM7vuFX.js} +1 -1
- package/dist/client/assets/{connection-VFOGX82d.js → connection-B0eFNfCu.js} +1 -1
- package/dist/client/assets/{connection-card-CugVHwbe.js → connection-card-BzTYJa6s.js} +1 -1
- package/dist/client/assets/{connection-detail-DOnigZIS.js → connection-detail-Cwz-qT82.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Ht3Y_JTI.js → connection-form-helpers-ChgreO5F.js} +1 -1
- package/dist/client/assets/{connections-y4LWYMRk.js → connections-CnirV_66.js} +1 -1
- package/dist/client/assets/{content-tab-BbeLE04u.js → content-tab-BIEsoSfa.js} +3 -3
- package/dist/client/assets/{context-1CQ99Xh2.js → context-DEuw9CjH.js} +1 -1
- package/dist/client/assets/{context-menu-Cf7UvCHV.js → context-menu-CHrxflOD.js} +1 -1
- package/dist/client/assets/{core.esm-oiTkWp_q.js → core.esm-CWXW2IWJ.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Chu_8T3p.js → create-organization-dialog-Bci4qKSS.js} +1 -1
- package/dist/client/assets/{daily-pulse-D2siiT-N.js → daily-pulse-CRZ8lDnm.js} +1 -1
- package/dist/client/assets/{discover-y_xX0Jww.js → discover-C3iLTVFB.js} +1 -1
- package/dist/client/assets/{domain-settings-D3fYG_8u.js → domain-settings-DdY9W_8b.js} +1 -1
- package/dist/client/assets/{drawer-BaMAsObr.js → drawer-BpEasqMM.js} +1 -1
- package/dist/client/assets/{editor-gEAdAF4z.js → editor-DQK8Gbky.js} +1 -1
- package/dist/client/assets/{editor-classes-BkgvFYZG.js → editor-classes-wKHzvXkJ.js} +1 -1
- package/dist/client/assets/{empty-state-pgELPzRJ.js → empty-state-Ck0Y0zH4.js} +1 -1
- package/dist/client/assets/{empty-state-Qh91SokD.js → empty-state-GUv-DLNf.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CmhWlbRd.js → extract-connection-data-CyaR6DQN.js} +1 -1
- package/dist/client/assets/{feature-gate-D8bbKoJM.js → feature-gate-Cd3TCuYG.js} +1 -1
- package/dist/client/assets/{feature-paywall-yY-LJqXW.js → feature-paywall-HnwykYzM.js} +1 -1
- package/dist/client/assets/{file-explorer-D61hIry6.js → file-explorer-B8GvovSI.js} +1 -1
- package/dist/client/assets/{file-preview-DA9PL3PH.js → file-preview-KNDU2UhF.js} +1 -1
- package/dist/client/assets/{file-share-button-Db4oG9-W.js → file-share-button-BX7_JCXp.js} +1 -1
- package/dist/client/assets/{file-type-icon-CmCTgogr.js → file-type-icon-C2WSm6EM.js} +1 -1
- package/dist/client/assets/flat-project-XWFiDywx.js +1 -0
- package/dist/client/assets/{folder-icon-DxKEGodw.js → folder-icon-DOSAeTvE.js} +1 -1
- package/dist/client/assets/{form-B2R0FZpl.js → form-Dz-wry37.js} +1 -1
- package/dist/client/assets/{general-DGAJ8SIw.js → general-lahSHdvs.js} +1 -1
- package/dist/client/assets/{home-DllK7NjJ.js → home-CfslMwmV.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-C-78qWJE.js → hosted-publish-feedback-D7K1BgAP.js} +1 -1
- package/dist/client/assets/{icon-button-BLmb1aFH.js → icon-button-BbQESQAz.js} +1 -1
- package/dist/client/assets/{index-Bi4uPXkI.js → index-BFWcpEys.js} +1 -1
- package/dist/client/assets/{index-CMSBZHOC.js → index-BX4Ek3Q9.js} +1 -1
- package/dist/client/assets/{index-C5kiFY0N.js → index-BhuMySoe.js} +1 -1
- package/dist/client/assets/{index-CNnllo6G.js → index-BoB02eW2.js} +2 -2
- package/dist/client/assets/{index-DFDhdIkn.js → index-CAsLc9Zw.js} +1 -1
- package/dist/client/assets/{index-LQ6JAM7x.js → index-CD1O2KuY.js} +3 -3
- package/dist/client/assets/{index-4S552BvA.js → index-COyZFAVd.js} +1 -1
- package/dist/client/assets/{index-DlkNBOKp.js → index-CVeMcxNw.js} +1 -1
- package/dist/client/assets/{index-D2K6wJdd.js → index-Cdsu1Nw_.js} +1 -1
- package/dist/client/assets/{index-JfKaG8r5.js → index-DSuQX-Dj.js} +1 -1
- package/dist/client/assets/{index-B8m-k0Po.js → index-DhnL-yRw.js} +1 -1
- package/dist/client/assets/{index-BQe9t0ZU.js → index-DuSo48nd.js} +1 -1
- package/dist/client/assets/{index-QaFbqB6H.js → index-Fqg3dcpq.js} +1 -1
- package/dist/client/assets/{index-k8d57vb2.js → index-mPiuZtAa.js} +1 -1
- package/dist/client/assets/{index-cnt3BCfz.js → index-qp2WMoaq.js} +1 -1
- package/dist/client/assets/{index-redirect-CDoOQ7Fs.js → index-redirect-LGC8XAQa.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CqK1S2-W.js → infiniteQueryObserver-BuOPvaCd.js} +1 -1
- package/dist/client/assets/{infra-billing-BD6Y6fAa.js → infra-billing-C7a9CxBG.js} +1 -1
- package/dist/client/assets/{input-Bue-yNpK.js → input-CC2XqVda.js} +1 -1
- package/dist/client/assets/{input-DnkGG1pQ.js → input-Dx6Yl3YV.js} +3 -3
- package/dist/client/assets/{integration-icon-Dl2m6ce3.js → integration-icon-YHEiRLgT.js} +1 -1
- package/dist/client/assets/{jira-icon-BN8gmoGK.js → jira-icon-i9apovX2.js} +1 -1
- package/dist/client/assets/{label-C2MI3yAw.js → label-CsyEQPG4.js} +1 -1
- package/dist/client/assets/{layout-D3qT5OMX.js → layout-BT112QdT.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-Bh_GWt30.js → legacy-agents-deep-HgU3c2Dz.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DlBO4F0C.js → legacy-main-redirect-jScx_XSf.js} +1 -1
- package/dist/client/assets/library-CWV47kSp.js +1 -0
- package/dist/client/assets/{library-tab-ChjG-ita.js → library-tab-9158ORpA.js} +1 -1
- package/dist/client/assets/{login-BJJfll2X.js → login-OE28YT2s.js} +1 -1
- package/dist/client/assets/{markdown-BzeS6Mup.js → markdown-TXCHEe-4.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BHQg4BC0.js → mcp-app-renderer-BAlCN3Lv.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CCgQhJ0H.js → mcp-oauth-BFqNJ-iQ.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C9k0QipU.js → mcp-oauth-CuU6LL15.js} +1 -1
- package/dist/client/assets/{members-BJ8Q84sj.js → members-CbEEa2ua.js} +1 -1
- package/dist/client/assets/{memory-6DQlmI8s.js → memory-malk94i-.js} +1 -1
- package/dist/client/assets/{mini-report-page-Dp287JJW.js → mini-report-page-Dhes7qGv.js} +1 -1
- package/dist/client/assets/{mock-board-BrRrzkyb.js → mock-board-B4GBU96k.js} +1 -1
- package/dist/client/assets/{monaco-editor-Dqlv9Rx3.js → monaco-editor-DIn5LVAo.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CHv5bry_.js → monitoring-stats-row-CsXWM1-N.js} +1 -1
- package/dist/client/assets/{multi-select-CxacBEPt.js → multi-select-jv5l4gKB.js} +1 -1
- package/dist/client/assets/{mustache-DewX4fdh.js → mustache-C3mAjW3w.js} +1 -1
- package/dist/client/assets/{new-project-dialog-HwZsHJw7.js → new-project-dialog-DCPZVRuS.js} +1 -1
- package/dist/client/assets/{oauth-callback-K69Edssh.js → oauth-callback-C7bM7rgT.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CpEQmEON.js → oauth-callback-ai-provider-maa6Zm5e.js} +1 -1
- package/dist/client/assets/{onboarding-CMSxOCHp.js → onboarding-ds1UbiQ9.js} +1 -1
- package/dist/client/assets/{openai-conversation-8f12XdbQ.js → openai-conversation-BSvbWT0F.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-qLHxsO7U.js → optimistic-project-sidebar-views-2rlAyeqj.js} +1 -1
- package/dist/client/assets/{order-monitor-day-C2C1WPzt.js → order-monitor-day-CZG8_Uqo.js} +1 -1
- package/dist/client/assets/{organization-choice-BlYawX8-.js → organization-choice-CGGV7pYx.js} +1 -1
- package/dist/client/assets/{orgs-CGBX8gbU.js → orgs-DSh5ncFV.js} +1 -1
- package/dist/client/assets/{page-seo-form-BYVKaWGS.js → page-seo-form-BPMiXtW-.js} +1 -1
- package/dist/client/assets/{pair-84suUGZ3.js → pair-C9IKm4JE.js} +1 -1
- package/dist/client/assets/{plan-ladder-Ct3CUY0O.js → plan-ladder-DbkDT52b.js} +1 -1
- package/dist/client/assets/{popover-Ba56Iai5.js → popover-CzNTcDJM.js} +1 -1
- package/dist/client/assets/{post-calendar-RpsbnecM.js → post-calendar-DGIFZvru.js} +1 -1
- package/dist/client/assets/{post-editor-C9oD8ESN.js → post-editor-BINaZa6q.js} +1 -1
- package/dist/client/assets/{preview-content-DF0BMyfw.js → preview-content-BjX4Mivy.js} +1 -1
- package/dist/client/assets/{preview-dialog-DlotDPpC.js → preview-dialog-C8Boj2eR.js} +1 -1
- package/dist/client/assets/{preview-panel-BFMr1mkC.js → preview-panel-BTtWNKn9.js} +1 -1
- package/dist/client/assets/{preview-tab-AtnwySoZ.js → preview-tab-BYhuHpLV.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-JlTB9ihe.js → product-picker-dialog-qxyRXjlS.js} +1 -1
- package/dist/client/assets/{profile-NePIrfXd.js → profile-Cgb34CQu.js} +1 -1
- package/dist/client/assets/{project-app-view-CZBqblIb.js → project-app-view-B5MD1o9B.js} +1 -1
- package/dist/client/assets/{project-feed-Y1MpiHk4.js → project-feed-DnDlefHV.js} +1 -1
- package/dist/client/assets/{project-icon-CxJtU18v.js → project-icon-CP0m7tWm.js} +1 -1
- package/dist/client/assets/project-reports-8XAuspn6.js +1 -0
- package/dist/client/assets/project-tasks-CGbl7DTy.js +1 -0
- package/dist/client/assets/{projects-CiRkvKrf.js → projects-DmCmaniu.js} +1 -1
- package/dist/client/assets/{projects-empty-state-D7-trQYt.js → projects-empty-state-fIhR2Z5I.js} +1 -1
- package/dist/client/assets/{prompts-DNcBfJiD.js → prompts-CW5UUH65.js} +1 -1
- package/dist/client/assets/record-editor--8X4AXV_.js +1 -0
- package/dist/client/assets/{redirect-editor-CC5Q4Ymt.js → redirect-editor-CxJl2CVJ.js} +1 -1
- package/dist/client/assets/{reports-DIGilxrB.js → reports-BXGEiRjn.js} +1 -1
- package/dist/client/assets/reports-eZ_It7qc.js +1 -0
- package/dist/client/assets/{reports-onboarding-B0pJwCjp.js → reports-onboarding-DNEAbZJV.js} +1 -1
- package/dist/client/assets/{reports-tab-BGanWho6.js → reports-tab-CwK-fp7x.js} +2 -2
- package/dist/client/assets/{repositories-B2bTWPV9.js → repositories-ClghJilC.js} +1 -1
- package/dist/client/assets/{repository-binding-DqlrnpeD.js → repository-binding-BYnKmLVI.js} +1 -1
- package/dist/client/assets/{repository-import-picker-BQKO3YmL.js → repository-import-picker-De4qAOck.js} +1 -1
- package/dist/client/assets/{repository-picker-1U5-cKDz.js → repository-picker-B7BUYgB7.js} +1 -1
- package/dist/client/assets/{require-capability-ojXn93H0.js → require-capability-hn1SreP5.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D-YJoBk-.js → required-auth-layout-Mqzz7XgH.js} +1 -1
- package/dist/client/assets/{reset-password-BmX8ePKp.js → reset-password-BOpvbCSW.js} +1 -1
- package/dist/client/assets/{resizable-CbpZQFpZ.js → resizable-DpCFVPH5.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-D2OV9kBN.js → resolve-tab-icon-8PRTNpAS.js} +1 -1
- package/dist/client/assets/{review-settings-DK01glaZ.js → review-settings-Bw0A1sn1.js} +1 -1
- package/dist/client/assets/{roles-LZWr7__G.js → roles-BMCtr4MB.js} +1 -1
- package/dist/client/assets/{route-Gjmz5E23.js → route-DLSqOpoM.js} +1 -1
- package/dist/client/assets/{route-ihwuHnpr.js → route-DnP6JRb8.js} +1 -1
- package/dist/client/assets/route-yiouOCXy.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-CMe6ziY_.js → sandbox-lifecycle-context-Dg7K5ioC.js} +1 -1
- package/dist/client/assets/{schema-DvCj02YW.js → schema-D-qEbXZ-.js} +1 -1
- package/dist/client/assets/{schema-j2854AG6.js → schema-zU96PUAb.js} +1 -1
- package/dist/client/assets/{scroll-area-DRWJ_F1a.js → scroll-area-D_ro8hTm.js} +1 -1
- package/dist/client/assets/{search-input-DqG4kyRF.js → search-input-qNQGHbDh.js} +1 -1
- package/dist/client/assets/{search-toggle-CGVfCMLJ.js → search-toggle-Dfh8XGYH.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-DXqrbEWb.js → secret-ciphertext-DkD2R7dc.js} +1 -1
- package/dist/client/assets/{secret-picker-Diad3aWD.js → secret-picker-CmVVvqgZ.js} +1 -1
- package/dist/client/assets/{secrets-_pq8fc-A.js → secrets-BDW-A1kb.js} +1 -1
- package/dist/client/assets/{sections-editor-jfQPkYiX.js → sections-editor-BKmXdadO.js} +1 -1
- package/dist/client/assets/{select-Jex63p6s.js → select-C4iThYr6.js} +1 -1
- package/dist/client/assets/{select-model-BpMhMCHG.js → select-model-BND792Uy.js} +1 -1
- package/dist/client/assets/{seo-editor-rID5Th2v.js → seo-editor-ClpJZQda.js} +1 -1
- package/dist/client/assets/{separator-laGeAgXV.js → separator-DYHY_XVB.js} +1 -1
- package/dist/client/assets/{settings-tab-D4oc-m6U.js → settings-tab-A8T1BHYG.js} +1 -1
- package/dist/client/assets/{sheet-BjDciyLt.js → sheet-BXRHJIP3.js} +1 -1
- package/dist/client/assets/{shell-layout-ohVxtYQn.js → shell-layout-BhM3Q_22.js} +1 -1
- package/dist/client/assets/site-editor-LulM9jUZ.js +1 -0
- package/dist/client/assets/{site-editor-toast-Cwor802o.js → site-editor-toast-DPPGE5LH.js} +1 -1
- package/dist/client/assets/{skills-BjHMkGI4.js → skills-Kw1j3-7B.js} +1 -1
- package/dist/client/assets/{slider-BgVX57Hw.js → slider-CpU4rmfX.js} +1 -1
- package/dist/client/assets/{sortable.esm--JfVXwY2.js → sortable.esm-CBSg5QWi.js} +1 -1
- package/dist/client/assets/{sso-DtpWrT1m.js → sso-GSEhvAQ2.js} +1 -1
- package/dist/client/assets/{suggestion-DmWAjig0.js → suggestion-BPVDnpZj.js} +1 -1
- package/dist/client/assets/{switch-BXwkRMsQ.js → switch-63WSXheM.js} +1 -1
- package/dist/client/assets/{symbol-DMd_AX9i.js → symbol-rviHpBrN.js} +1 -1
- package/dist/client/assets/{synced-repos-DXXyL6dr.js → synced-repos-D3YnOlYC.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-WTogvuRL.js → tab-icon-glyph-Dqe-yN6V.js} +1 -1
- package/dist/client/assets/{table-BEoFysnY.js → table-CLaOCONQ.js} +1 -1
- package/dist/client/assets/{tabs-BUOCNWab.js → tabs-BQUPeDjf.js} +1 -1
- package/dist/client/assets/{task-board-et69go2s.js → task-board-DxxiAR5A.js} +1 -1
- package/dist/client/assets/{task-route-DRCZxpHC.js → task-route-Ce6MTE8h.js} +1 -1
- package/dist/client/assets/{task-status-Clz_ohkz.js → task-status-CMbp-PaL.js} +1 -1
- package/dist/client/assets/taskboard-analytics-_ZvfL2sj.js +1 -0
- package/dist/client/assets/{tasks-CI2TSEv1.js → tasks-BarD4hla.js} +1 -1
- package/dist/client/assets/tasks-DcunZstc.js +1 -0
- package/dist/client/assets/{textarea-BP2sfmUn.js → textarea-CxYAsAPe.js} +1 -1
- package/dist/client/assets/{thread-analytics-ClTk6JCf.js → thread-analytics-Cjx1orRq.js} +1 -1
- package/dist/client/assets/{thread-intent-B3UX1VYD.js → thread-intent-DikZOwd-.js} +1 -1
- package/dist/client/assets/{thread-route-Dj3FHeZv.js → thread-route-CRU_aqN9.js} +1 -1
- package/dist/client/assets/{thread-route-C-V5eWkC.js → thread-route-ChugAIRh.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-DN2xi_yQ.js → thread-sheet-body-DfFj6DBB.js} +1 -1
- package/dist/client/assets/{time-range-picker-BGpEdCr4.js → time-range-picker-Bf6M5ihN.js} +1 -1
- package/dist/client/assets/{toggle-group-CElgKi93.js → toggle-group-DbSldXZX.js} +1 -1
- package/dist/client/assets/{tool-namespace-CSvvZ9-r.js → tool-namespace-pIFYrei5.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BHgf03SN.js → toolbar-icon-button-B24Twz-b.js} +1 -1
- package/dist/client/assets/{tooltip-D39pwdkl.js → tooltip-Bs0EJaD7.js} +1 -1
- package/dist/client/assets/{tooltipContext-v4Ov_BWo.js → tooltipContext-fXkDpiI8.js} +1 -1
- package/dist/client/assets/{track-D4y7DnsA.js → track-BzGhLw1A.js} +1 -1
- package/dist/client/assets/{types-sLIChj1_.js → types-IpdOmnYx.js} +1 -1
- package/dist/client/assets/{url-slug-Ui3mV6vi.js → url-slug-CMCbwnaP.js} +1 -1
- package/dist/client/assets/{usage-stats-D62oidTL.js → usage-stats-DuvxTL2m.js} +1 -1
- package/dist/client/assets/{use-ai-providers-IcsUWN-K.js → use-ai-providers-Becg3IYt.js} +1 -1
- package/dist/client/assets/{use-app-takeover-CIvPyTDt.js → use-app-takeover-DFb1RzQs.js} +1 -1
- package/dist/client/assets/{use-automations-D4B7ETWW.js → use-automations-Cp9pysoO.js} +1 -1
- package/dist/client/assets/{use-autosave-D9eru9Ze.js → use-autosave-C5CskRdQ.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-D_OZ7XLd.js → use-chat-navigation-BJSvg7rH.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BEO-m3vD.js → use-clock-tick-B1PaG9d4.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Cujc6mJy.js → use-connect-companion-ClLk9Ret.js} +1 -1
- package/dist/client/assets/{use-connection-BxJdPGkr.js → use-connection-CLmhN_H7.js} +1 -1
- package/dist/client/assets/{use-copy-BlMydeoV.js → use-copy-T3xwaExj.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bd3ICWl5.js → use-create-virtual-mcp-CVTk_yNo.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BJ-xFgzl.js → use-date-fns-locale-CYDYn543.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Dt1irWAn.js → use-debounced-autosave-8fEcHiWI.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B_S8lb_4.js → use-debounced-value-d254MtLc.js} +1 -1
- package/dist/client/assets/{use-deco-credits-nfiVDn98.js → use-deco-credits-BJdkVUlJ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-qheXoFrz.js → use-decopilot-events-D42PqykU.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DJv3D_sh.js → use-delete-connection-Bp41mUbu.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BZx-lcmt.js → use-deployment-admin-Cz36UM7j.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-568pY7Mx.js → use-ensure-project-folder-DV9pI0pa.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-B5I6D4fe.js → use-fast-preview-draft-url-Dbj9pvCB.js} +1 -1
- package/dist/client/assets/{use-file-configs-wZCwveLR.js → use-file-configs-D_kGDRPd.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-yxXaBcmD.js → use-infinite-scroll-C47I-wuH.js} +1 -1
- package/dist/client/assets/{use-join-requests-DqmeRmXJ.js → use-join-requests-Cy3hlZv5.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CUuCqnlA.js → use-main-panel-tabs-DjhEbRyd.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BCDRh6Ej.js → use-mcp-auth-status-5SUSMsp-.js} +1 -1
- package/dist/client/assets/{use-mcp-client-cb8e4tvm.js → use-mcp-client-CEKqqblF.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BfEVPVEx.js → use-mcp-prompts-CwF-bqUg.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DZxb1_zu.js → use-mcp-tools-_07-mu_D.js} +1 -1
- package/dist/client/assets/{use-members-D7SiQmGu.js → use-members-CFcpHrvE.js} +1 -1
- package/dist/client/assets/{use-mobile-BNQyDf1J.js → use-mobile-CYsZ0F3X.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-D-kAnKoC.js → use-navigate-to-agent-DNsHLJD8.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CdvtCyZf.js → use-open-billing-url-C1m0KS6b.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-D3FbjOmE.js → use-org-auth-client-9ZqTxhaU.js} +1 -1
- package/dist/client/assets/{use-org-fs-C9g2s6eE.js → use-org-fs-Wo4_O8nn.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-U8WqzFiL.js → use-org-repo-syncs-HjlHy8Rb.js} +1 -1
- package/dist/client/assets/{use-org-sso-s2tGLzu6.js → use-org-sso-BSkklN8h.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Bo-TSZF4.js → use-organization-roles-Dga2ANZJ.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CtcFsKQW.js → use-organization-settings-DHSMN_14.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BLgl8f3Y.js → use-panel-navigate-62gIHptt.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-uvlxs5r_.js → use-project-native-view-presence-D12oGF6A.js} +1 -1
- package/dist/client/assets/{use-project-scope-DCmZMFkQ.js → use-project-scope-Dk4Q60O6.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DlPuhtE-.js → use-recent-apps-CCwo686W.js} +1 -1
- package/dist/client/assets/{use-releases-DtKRf56Y.js → use-releases-wK1mECcA.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DYrOUUTZ.js → use-reports-diagnostic-CfPcDRof.js} +1 -1
- package/dist/client/assets/{use-secrets-WRKR8ecc.js → use-secrets-Cmhjz2bf.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BNxt4jxu.js → use-section-preview-base-DJFgOhQZ.js} +1 -1
- package/dist/client/assets/{use-tags-DiN0kMpJ.js → use-tags-D0LqZNOI.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-1JoUE9AJ.js → use-task-board-analytics-BpQqtB1w.js} +1 -1
- package/dist/client/assets/{use-task-board-events-BLTRhUg4.js → use-task-board-events-BrTJpTlj.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-At19hfLC.js → use-task-board-item-prs-BHRZFWqk.js} +1 -1
- package/dist/client/assets/{use-task-board-items-CRXCkQuK.js → use-task-board-items-CZjiF2uB.js} +1 -1
- package/dist/client/assets/{use-task-metadata-C3llYFZN.js → use-task-metadata-Bef5UioD.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-Co1Kx3t4.js → use-thread-analytics-CiJumHRj.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-D5eAX3jD.js → use-thread-outputs-BVEM1vsy.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-S3a_-GqY.js +1 -0
- package/dist/client/assets/{useQueries-BBbNh9lc.js → useQueries-D52x651p.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DiRI5XkI.js +1 -0
- package/dist/client/assets/{users-vqq5iPZ9.js → users-DfEzbgjc.js} +1 -1
- package/dist/client/assets/{utils-D5Pt5WPE.js → utils-DVs-Bhj-.js} +1 -1
- package/dist/client/assets/{variant-calendar-CYUJLh9u.js → variant-calendar-B4damr_G.js} +1 -1
- package/dist/client/assets/{variant-draft-pointer-3s80HEa9.js → variant-draft-pointer-BnxZeLy_.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BksAfU6L.js → view-mode-toggle-DKlegHXH.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CvKEEaVD.js → virtual-mcp-UT0zZzHO.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BqvFDRe4.js → watch-sse-pool-BdkzrgTO.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +4 -4
- package/package.json +1 -1
- package/dist/client/assets/agent-app-D7ZbeaeS.js +0 -1
- package/dist/client/assets/agent-deck-Bfjkqa9C.js +0 -1
- package/dist/client/assets/agent-library-Bi2qzW40.js +0 -1
- package/dist/client/assets/agent-library-file-CSltTnVe.js +0 -1
- package/dist/client/assets/agent-settings-BLtCRmyO.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Od55DzQ1.js +0 -2
- package/dist/client/assets/agent-site-editor-content-5qi46g26.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-CutGG4Ds.js +0 -1
- package/dist/client/assets/agent-view-CEr3hNFJ.js +0 -1
- package/dist/client/assets/api-keys-WauVetoj.js +0 -1
- package/dist/client/assets/cms-settings-editor-Bo6bMjKH.js +0 -1
- package/dist/client/assets/flat-project-CHR1TqE9.js +0 -1
- package/dist/client/assets/library-CZ6Ii9aX.js +0 -1
- package/dist/client/assets/project-reports-CULNrShG.js +0 -1
- package/dist/client/assets/project-tasks-Dvm1hFFM.js +0 -1
- package/dist/client/assets/record-editor-B2vAy35C.js +0 -1
- package/dist/client/assets/reports-BO8CzHO9.js +0 -1
- package/dist/client/assets/route-CVqHXXn6.js +0 -1
- package/dist/client/assets/site-editor-CaPr9Ncy.js +0 -1
- package/dist/client/assets/taskboard-analytics-Dk7dZzQl.js +0 -1
- package/dist/client/assets/tasks-DLgTzQCQ.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CfgvSeG1.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BFK9VyAb.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,di as w,r as i,bA as m,dt as T,aJ as O,bD as M,du as I,dv as z,dw as A,dx as D,dj as F,dn as L,bP as k,dy as G,dk as H,c as n,l as p,dz as v}from"./index-
|
|
1
|
+
import{j as r,di as w,r as i,bA as m,dt as T,aJ as O,bD as M,du as I,dv as z,dw as A,dx as D,dj as F,dn as L,bP as k,dy as G,dk as H,c as n,l as p,dz as v}from"./index-BoB02eW2.js";var x="AlertDialog",[V]=k(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(w,{...a,...t,modal:!0})};N.displayName=x;var W="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(G,{...o,...a,ref:e})});Y.displayName=W;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(F,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",j=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});j.displayName=B;var f="AlertDialogContent",[J,K]=V(f),Q=L("AlertDialogContent"),_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),S=m(e,c),u=i.useRef(null);return r.jsx(T,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(O,{role:"alertdialog",...s,...o,ref:S,onOpenAutoFocus:M(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});_.displayName=f;var b="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(I,{...o,...a,ref:e})});h.displayName=b;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",C=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=U;var $="AlertDialogCancel",P=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K($,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});P.displayName=$;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${f}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|
package/dist/client/assets/{analytics-sections-FNv48nRX.js → analytics-sections-BIEC86HP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,j as s,b as B,en as Q,l as O,z as fe,r as Z,d as me}from"./index-CNnllo6G.js";import{d as q,C as J}from"./chart-BeOqWxx3.js";import{e as xe,a as pe,b as W,T as he,d as ge,c as je}from"./table-BEoFysnY.js";import{i as be}from"./AlertCircle-B7FQmH_M.js";import{i as ye,n as ve}from"./ArrowUp-DJaSaDSt.js";import{a2 as ke,$ as Ne,ap as Se,a8 as Ce}from"./agent-icon-B7cHtLmN.js";import{s as we}from"./User01-DpzyFtdl.js";import{V as ee}from"./view-mode-toggle-BksAfU6L.js";import{t as te}from"./format-time-CAj8AQXM.js";import{B as Y}from"./badge-BPqtGuPz.js";import{l as se,c as $e,b as De,S as Oe}from"./config-D3uahd_6.js";import{B as U,a as G}from"./BarChart-BpCZ5QGT.js";import{C as H,Y as P,a as Te,A as Ie}from"./AreaChart-80AfW8ak.js";import{X as V}from"./XAxis--67FjR4u.js";function ne(a){const e=w.c(8),{href:t,className:d,children:o}=a,c=me();let r;e[0]!==t||e[1]!==c?(r=n=>{!t||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),c({href:t}))},e[0]=t,e[1]=c,e[2]=r):r=e[2];let l;return e[3]!==o||e[4]!==d||e[5]!==t||e[6]!==r?(l=s.jsx("a",{href:t,className:d,onClick:r,children:o}),e[3]=o,e[4]=d,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}const L=(a,e,t)=>a&&e?()=>a({drill:e,label:t}):void 0,F="cursor-pointer text-left transition-colors hover:bg-accent/50 focus-ring",E=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"],A={fontSize:11,fill:"var(--muted-foreground)",opacity:.7};function le(a){const e=Math.abs(a);return e<60?`${Math.round(a)}s`:e<3600?`${Math.round(a/60)}m`:e<86400?`${(a/3600).toFixed(1)}h`:`${(a/86400).toFixed(1)}d`}function M(a,e){return a===null||Number.isNaN(a)?"—":e==="s"?le(a):e==="%"?`${Math.round(a*10)/10}%`:e==="USD"?`$${a.toFixed(2)}`:a.toLocaleString()}function X(a,e){return e==="s"?le(a):e==="%"?`${a}%`:e==="USD"?`$${a}`:a>=1e3?`${(a/1e3).toFixed(1)}k`:String(a)}const ae=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/,Be=/^\d{4}-\d{2}-\d{2}$/;function Le(a,e){return typeof a=="number"?M(a,e):Be.test(a)?new Date(`${a}T12:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric"}):ae.test(a)?te(a):a}function _(a){const e=w.c(20),{title:t,value:d,caption:o,aside:c,children:r,onClick:l}=a,n=l?"button":"section",i=l?"button":void 0,u=l&&F;let f;e[0]!==u?(f=O("surface flex h-full w-full flex-col gap-6 px-4 pt-4 pb-5",u),e[0]=u,e[1]=f):f=e[1];let x;e[2]!==t?(x=s.jsx("h3",{className:"text-sm text-foreground/70",children:t}),e[2]=t,e[3]=x):x=e[3];let m;e[4]!==d?(m=d!==void 0&&s.jsx("span",{className:"tnum text-4xl font-normal text-foreground",children:d}),e[4]=d,e[5]=m):m=e[5];let h;e[6]!==o||e[7]!==x||e[8]!==m?(h=s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[x,m,o]}),e[6]=o,e[7]=x,e[8]=m,e[9]=h):h=e[9];let p;e[10]!==c||e[11]!==h?(p=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h,c]}),e[10]=c,e[11]=h,e[12]=p):p=e[12];let j;return e[13]!==n||e[14]!==r||e[15]!==l||e[16]!==i||e[17]!==f||e[18]!==p?(j=s.jsxs(n,{type:i,onClick:l,className:f,children:[p,r]}),e[13]=n,e[14]=r,e[15]=l,e[16]=i,e[17]=f,e[18]=p,e[19]=j):j=e[19],j}function re(a){const e=w.c(9),{lane:t}=a,d=B();let o;e[0]!==t||e[1]!==d?(o=se(t,d),e[0]=t,e[1]=d,e[2]=o):o=e[2];const{label:c,visual:r}=o,l=r.icon;let n;e[3]!==l||e[4]!==r.iconClassName?(n=s.jsx(l,{className:r.iconClassName}),e[3]=l,e[4]=r.iconClassName,e[5]=n):n=e[5];let i;return e[6]!==c||e[7]!==n?(i=s.jsxs(Y,{variant:"muted",children:[n,c]}),e[6]=c,e[7]=n,e[8]=i):i=e[8],i}function R(a){const e=w.c(2),{children:t}=a;let d;return e[0]!==t?(d=s.jsx("div",{className:"flex h-20 items-center justify-center text-sm text-muted-foreground",children:t}),e[0]=t,e[1]=d):d=e[1],d}function Me(a){const e=w.c(21),{value:t,previous:d,unit:o,better:c}=a,r=B();if(t===null||d===null||d===void 0){let p;e[0]!==r?(p=r("taskBoard.analytics.noPrior"),e[0]=r,e[1]=p):p=e[1];let j;return e[2]!==p?(j=s.jsx("span",{className:"text-meta",children:p}),e[2]=p,e[3]=j):j=e[3],j}const l=Math.round((t-d)*10)/10,n=c==="down"?l<0:l>0;let i;e[4]!==l||e[5]!==r||e[6]!==o?(i=o==="%"?r("taskBoard.analytics.points",{n:String(Math.abs(l))}):M(Math.abs(l),o),e[4]=l,e[5]=r,e[6]=o,e[7]=i):i=e[7];const u=i;let f;e[8]!==u||e[9]!==c||e[10]!==l||e[11]!==n||e[12]!==r?(f=l===0?r("taskBoard.analytics.unchanged"):s.jsxs("span",{className:O("inline-flex items-center gap-0.5 font-medium",c&&(n?"text-success":"text-destructive")),children:[l>0?s.jsx(ye,{size:12}):s.jsx(ve,{size:12}),u]}),e[8]=u,e[9]=c,e[10]=l,e[11]=n,e[12]=r,e[13]=f):f=e[13];let x;e[14]!==r?(x=r("taskBoard.analytics.vsPrevious"),e[14]=r,e[15]=x):x=e[15];let m;e[16]!==x?(m=s.jsx("span",{children:x}),e[16]=x,e[17]=m):m=e[17];let h;return e[18]!==f||e[19]!==m?(h=s.jsxs("span",{className:"text-meta inline-flex items-center gap-1",children:[f,m]}),e[18]=f,e[19]=m,e[20]=h):h=e[20],h}const _e={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",5:"lg:grid-cols-5",6:"lg:grid-cols-3",9:"lg:grid-cols-3"};function Re(a){const e=w.c(10),{section:t,onDrill:d}=a,o=_e[t.values.length]??"lg:grid-cols-4";let c;e[0]!==o?(c=O("grid grid-cols-2 gap-4",o),e[0]=o,e[1]=c):c=e[1];let r;if(e[2]!==d||e[3]!==t.values){let n;e[5]!==d?(n=i=>s.jsx(_,{title:i.label,value:M(i.value,i.unit),onClick:L(d,i.drill,i.label),caption:s.jsxs(s.Fragment,{children:[i.detail&&s.jsx("span",{className:"text-sm text-muted-foreground",children:i.detail}),i.previous!==void 0&&s.jsx(Me,{value:i.value,previous:i.previous,unit:i.unit,better:i.better})]})},i.label),e[5]=d,e[6]=n):n=e[6],r=t.values.map(n),e[2]=d,e[3]=t.values,e[4]=r}else r=e[4];let l;return e[7]!==c||e[8]!==r?(l=s.jsx("div",{className:c,children:r}),e[7]=c,e[8]=r,e[9]=l):l=e[9],l}function Ae(a){return Array.from(new Set(a.flatMap(e=>Object.keys(e)))).filter(e=>e!=="t").sort()}function Ke(a,e){const t=e.filter(d=>a.some(o=>typeof o[d]=="number"&&o[d]!==0));return t.length>0?t:e}function Ee(a,e,t){const d=new Map(a.map(l=>[String(l.t??"").slice(0,10),l])),o=new Date(`${t.from.slice(0,10)}T00:00:00.000Z`),c=t.to.slice(0,10),r=[];for(;o.toISOString().slice(0,10)<=c;){const l=o.toISOString().slice(0,10);r.push(d.get(l)??{t:o.toISOString(),...Object.fromEntries(e.map(n=>[n,0]))}),o.setUTCDate(o.getUTCDate()+1)}return r}function ie(a){const e=w.c(17),{active:t,payload:d,unit:o,nameOf:c}=a,r=c===void 0?String:c;if(!t||!d?.length)return null;const l=d[0]?.payload,n=l?.t;let i;e[0]!==l?.label||e[1]!==n?(i=typeof n=="string"?new Date(n).toLocaleDateString(void 0,{month:"short",day:"numeric"}):String(l?.label??""),e[0]=l?.label,e[1]=n,e[2]=i):i=e[2];let u;e[3]!==i?(u=s.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=u):u=e[4];let f;if(e[5]!==r||e[6]!==d||e[7]!==o){let h;e[9]!==r||e[10]!==o?(h=p=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:p.color}}),s.jsx("span",{className:"text-muted-foreground",children:r(String(p.dataKey))}),s.jsx("span",{className:"tnum ml-auto pl-3 font-medium",children:M(typeof p.value=="number"?p.value:null,o)})]},String(p.dataKey)),e[9]=r,e[10]=o,e[11]=h):h=e[11],f=d.map(h),e[5]=r,e[6]=d,e[7]=o,e[8]=f}else f=e[8];let x;e[12]!==f?(x=s.jsx("div",{className:"flex flex-col gap-1",children:f}),e[12]=f,e[13]=x):x=e[13];let m;return e[14]!==u||e[15]!==x?(m=s.jsxs("div",{className:"rounded-lg border bg-background px-3 py-2 shadow-md",children:[u,x]}),e[14]=u,e[15]=x,e[16]=m):m=e[16],m}function Fe(a){const e=w.c(27),{section:t,range:d}=a,o=B(),c=t.unit??void 0,r=c!=="%"&&c!=="s";let l;if(e[0]!==r||e[1]!==d||e[2]!==t.points||e[3]!==t.title||e[4]!==o||e[5]!==c){const n=Ae(t.points),i=r?Ke(t.points,n):n,u=b=>E[n.indexOf(b)%E.length],f=Object.fromEntries(i.map(b=>[b,{label:b,color:u(b)}])),m=(r&&d?Ee(t.points,n,d):t.points).map(ze);let h;if(e[7]!==t.title){let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=/\W+/g,e[9]=b):b=e[9],h=t.title.replace(b,"-"),e[7]=t.title,e[8]=h}else h=e[8];const p=`analytics-${h}`;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),e[10]=j):j=e[10];const y=j;let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(V,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,minTickGap:24,tickMargin:8}),e[11]=v):v=e[11];const k=v;let $;e[12]!==c?($=c==="%"?[0,100]:[0,"auto"],e[12]=c,e[13]=$):$=e[13];const S=c!==void 0;let g;e[14]!==c?(g=b=>X(b,c),e[14]=c,e[15]=g):g=e[15];let C;e[16]!==$||e[17]!==S||e[18]!==g?(C=s.jsx(P,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,domain:$,allowDecimals:S,tickFormatter:g,width:48,tickCount:5}),e[16]=$,e[17]=S,e[18]=g,e[19]=C):C=e[19];const T=C;let D;e[20]!==r?(D=r?{fill:"var(--muted)",opacity:.4}:{stroke:"var(--border)",strokeDasharray:"4 4"},e[20]=r,e[21]=D):D=e[21];let I;e[22]!==c?(I=b=>{const{active:z,payload:ue}=b;return s.jsx(ie,{active:z,payload:ue,unit:c})},e[22]=c,e[23]=I):I=e[23];let N;e[24]!==I||e[25]!==D?(N=s.jsx(J,{cursor:D,content:I}),e[24]=I,e[25]=D,e[26]=N):N=e[26];const K=N;l=s.jsx(_,{title:t.title,aside:i.length>1&&s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:i.map(b=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:u(b)}}),b]},b))}),children:m.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"h-[140px] w-full md:h-[180px]",config:f,children:r?s.jsxs(U,{data:m,margin:{left:0,right:0,top:8},children:[y,k,T,K,i.map((b,z)=>s.jsx(G,{dataKey:b,stackId:"day",fill:u(b),maxBarSize:24,radius:z===i.length-1?[4,4,0,0]:0,animationDuration:300},b))]}):s.jsxs(Te,{data:m,margin:{left:0,right:0,top:8},children:[i.length===1&&s.jsx("defs",{children:s.jsxs("linearGradient",{id:p,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:u(i[0]??""),stopOpacity:.2}),s.jsx("stop",{offset:"100%",stopColor:u(i[0]??""),stopOpacity:0})]})}),y,k,T,K,i.map(b=>s.jsx(Ie,{type:"linear",dataKey:b,stroke:u(b),strokeWidth:2,fill:i.length===1?`url(#${p})`:"none",dot:m.length===1?{r:4}:!1,activeDot:{r:4,stroke:"var(--background)",strokeWidth:2},connectNulls:!0,animationDuration:300},b))]})})}),e[0]=r,e[1]=d,e[2]=t.points,e[3]=t.title,e[4]=o,e[5]=c,e[6]=l}else l=e[6];return l}function ze(a){return{...a,label:new Date(String(a.t??"")).toLocaleDateString(void 0,{month:"short",day:"numeric"})}}function oe(a){const e=w.c(25),{label:t,note:d,share:o,value:c,fill:r,color:l,onClick:n}=a,i=n?"button":"div",u=n?"button":void 0;let f;e[0]!==n?(f=n&&O(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2"),e[0]=n,e[1]=f):f=e[1];let x;e[2]!==f?(x=O("flex h-10 w-full items-center gap-3",f),e[2]=f,e[3]=x):x=e[3];let m;e[4]!==d?(m=d&&s.jsx("span",{className:"text-meta ml-2",children:d}),e[4]=d,e[5]=m):m=e[5];let h;e[6]!==t||e[7]!==m?(h=s.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:[t,m]}),e[6]=t,e[7]=m,e[8]=h):h=e[8];const p=`${Math.max(0,Math.min(100,r))}%`;let j;e[9]!==l||e[10]!==p?(j=s.jsx("span",{className:"h-1.5 w-20 shrink-0 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:p,backgroundColor:l}})}),e[9]=l,e[10]=p,e[11]=j):j=e[11];let y;e[12]!==o?(y=o!==void 0&&s.jsx("span",{className:"tnum w-16 shrink-0 text-right text-sm text-foreground/40",children:o}),e[12]=o,e[13]=y):y=e[13];let v;e[14]!==c?(v=s.jsx("span",{className:"tnum w-8 shrink-0 text-right text-sm text-foreground",children:c}),e[14]=c,e[15]=v):v=e[15];let k;return e[16]!==i||e[17]!==n||e[18]!==u||e[19]!==x||e[20]!==h||e[21]!==j||e[22]!==y||e[23]!==v?(k=s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:s.jsxs(i,{type:u,onClick:n,className:x,children:[h,j,y,v]})}),e[16]=i,e[17]=n,e[18]=u,e[19]=x,e[20]=h,e[21]=j,e[22]=y,e[23]=v,e[24]=k):k=e[24],k}function Ue(a){const e=w.c(17),{section:t,onDrill:d}=a,o=B(),c=t.stages[0]?.value??0,r=t.stages.at(-1)?.value??0;let l;e[0]!==r||e[1]!==c?(l=c?`${Math.round(100*r/c)}%`:"—",e[0]=r,e[1]=c,e[2]=l):l=e[2];let n;e[3]!==r||e[4]!==c||e[5]!==o?(n=c>0&&s.jsx("span",{className:"text-meta",children:o("taskBoard.analytics.funnelCaption",{end:String(r),start:String(c)})}),e[3]=r,e[4]=c,e[5]=o,e[6]=n):n=e[6];let i;e[7]!==d||e[8]!==t.stages||e[9]!==c||e[10]!==o?(i=c===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("ol",{className:"flex flex-col",children:t.stages.map((f,x)=>{const m=t.stages[x-1]?.value,h=m===void 0?0:m-f.value;return s.jsx(oe,{label:f.label,note:h>0?o("taskBoard.analytics.dropped",{n:String(h)}):void 0,share:`${Math.round(100*f.value/c)}%`,value:f.value.toLocaleString(),fill:100*f.value/c,color:"var(--chart-2)",onClick:L(d,f.drill,f.label)},f.label)})}),e[7]=d,e[8]=t.stages,e[9]=c,e[10]=o,e[11]=i):i=e[11];let u;return e[12]!==t.title||e[13]!==l||e[14]!==n||e[15]!==i?(u=s.jsx(_,{title:t.title,value:l,caption:n,children:i}),e[12]=t.title,e[13]=l,e[14]=n,e[15]=i,e[16]=u):u=e[16],u}function Ge(a){const e=w.c(19),{section:t,onDrill:d}=a,o=B();let c;e[0]!==t.bars?(c=Math.max(0,...t.bars.map(He)),e[0]=t.bars,e[1]=c):c=e[1];const r=c;let l;e[2]!==t.total?.value?(l=t.total?.value.toLocaleString(),e[2]=t.total?.value,e[3]=l):l=e[3];let n;e[4]!==t.total?(n=t.total&&s.jsx("span",{className:"text-meta",children:t.total.label}),e[4]=t.total,e[5]=n):n=e[5];let i;e[6]!==t.unit?(i=t.unit&&s.jsx("span",{className:"text-meta",children:t.unit}),e[6]=t.unit,e[7]=i):i=e[7];let u;e[8]!==r||e[9]!==d||e[10]!==t.bars||e[11]!==o?(u=t.bars.length===0?s.jsx(R,{children:o("taskBoard.analytics.nobodyStepped")}):s.jsx("ul",{className:"flex flex-col",children:t.bars.map(x=>s.jsx(oe,{label:x.label,note:x.note,share:x.detail,value:x.value.toLocaleString(),fill:r?100*x.value/r:0,color:"var(--chart-1)",onClick:L(d,x.drill,x.label)},x.label))}),e[8]=r,e[9]=d,e[10]=t.bars,e[11]=o,e[12]=u):u=e[12];let f;return e[13]!==t.title||e[14]!==l||e[15]!==n||e[16]!==i||e[17]!==u?(f=s.jsx(_,{title:t.title,value:l,caption:n,aside:i,children:u}),e[13]=t.title,e[14]=l,e[15]=n,e[16]=i,e[17]=u,e[18]=f):f=e[18],f}function He(a){return a.value}function Pe(a,e){return`/${encodeURIComponent(a)}/${encodeURIComponent(e)}`}const Ve=new Set(["Org ID","Task ID"]),Xe=new Set(["Run outcome","Failure kind","Moved in by","State"]),Ye=new Set(["Error","Signature"]),Qe=new Set(["Org","Orgs"]);function We(a){const e=w.c(32),{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:r}=a,l=B(),n=t.columns.indexOf("Org");let i;e[0]!==n||e[1]!==t.columns||e[2]!==d?(i=d&&n>=0?t.columns.indexOf("Thread"):-1,e[0]=n,e[1]=t.columns,e[2]=d,e[3]=i):i=e[3];const u=i,f=t.columns.indexOf("Task ID");let x;e[4]!==t.columns||e[5]!==c||e[6]!==f?(x=c&&f>=0?t.columns.indexOf("Task"):-1,e[4]=t.columns,e[5]=c,e[6]=f,e[7]=x):x=e[7];const m=x,h=t.columns;let p,j;if(e[8]!==r||e[9]!==n||e[10]!==t.columns||e[11]!==t.drills||e[12]!==t.rows||e[13]!==t.title||e[14]!==t.units||e[15]!==o||e[16]!==l||e[17]!==m||e[18]!==c||e[19]!==f||e[20]!==u){j=Symbol.for("react.early_return_sentinel");e:{let y;e[23]!==o?(y=S=>{const{c:g}=S;return!Ve.has(g)&&(o!==!1||!Qe.has(g))},e[23]=o,e[24]=y):y=e[24];const v=h.map(tt).filter(y).sort(et);let k;e[25]!==t.rows?(k=S=>{const{j:g}=S,C=t.rows.map(T=>T[g]).filter(Je);return C.length>0&&C.every(qe)},e[25]=t.rows,e[26]=k):k=e[26];const $=new Set(v.filter(k).map(Ze));if(t.rows.length===1&&v.every(S=>{const{c:g}=S;return $.has(g)})){let S;e[27]!==t.rows[0]?(S=t.rows[0]??[],e[27]=t.rows[0],e[28]=S):S=e[28];const g=S;let C;e[29]!==g||e[30]!==t.units?(C=T=>{const{c:D,j:I}=T,N=g[I];return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("dt",{className:"text-meta",children:D}),s.jsx("dd",{className:"tnum text-2xl text-foreground",children:typeof N=="number"?M(N,t.units?.[D]):"—"})]},D)},e[29]=g,e[30]=t.units,e[31]=C):C=e[31],j=s.jsx(Q,{title:t.title,children:s.jsx("dl",{className:"surface grid px-4 pt-4 pb-5 grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3 lg:grid-cols-[repeat(auto-fill,minmax(120px,1fr))]",children:v.map(C)})});break e}p=s.jsx(Q,{title:t.title,children:t.rows.length===0?s.jsx("p",{className:"surface px-4 py-4 text-sm text-muted-foreground",children:l("taskBoard.analytics.nothingToShow")}):s.jsx("div",{className:"surface max-h-[480px] overflow-auto",children:s.jsxs(xe,{variant:"flush",children:[s.jsx(pe,{children:s.jsx(W,{children:v.map(S=>{const{c:g}=S;return s.jsx(he,{className:O("whitespace-nowrap first:pl-4 last:pr-4",$.has(g)&&"text-right"),children:g==="Thread"?"":g},g)})})}),s.jsx(ge,{children:t.rows.map((S,g)=>s.jsx(W,{children:v.map((C,T)=>{const{c:D,j:I}=C,N=S[I],K=m===I?S[f]:null,b=T===0?L(r,t.drills?.[g]??void 0,String(N??"")):void 0;return s.jsx(je,{className:O("max-w-md truncate text-sm first:pl-4 last:pr-4",$.has(D)&&"text-right"),children:N==null?s.jsx("span",{className:"text-muted-foreground",children:"—"}):I===u?s.jsxs("a",{href:Pe(String(S[n]),String(N)),target:"_blank",rel:"noreferrer",className:"focus-ring inline-flex items-center gap-1 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:[l("taskBoard.analytics.openChat"),s.jsx(fe,{size:12})]}):b?s.jsx("button",{type:"button",onClick:b,className:"focus-ring text-left text-foreground underline-offset-2 hover:underline",children:String(N)}):K?s.jsx(ne,{href:c?.(String(K)),className:"focus-ring text-foreground underline-offset-2 hover:underline",children:String(N)}):D==="Lane"&&typeof N=="string"?s.jsx(re,{lane:N}):D==="Priority"&&typeof N=="string"?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ce,{drill:`priority:${N.toLowerCase()}`}),N]}):Xe.has(D)?s.jsx(Y,{variant:"muted",children:String(N)}):Ye.has(D)?s.jsx("span",{title:String(N),className:"font-mono text-xs text-muted-foreground",children:String(N)}):s.jsx("span",{className:O("tnum",typeof N=="string"&&ae.test(N)&&"text-muted-foreground"),children:Le(N,t.units?.[D])})},D)})},`${t.title}-${g}`))})]})})})}e[8]=r,e[9]=n,e[10]=t.columns,e[11]=t.drills,e[12]=t.rows,e[13]=t.title,e[14]=t.units,e[15]=o,e[16]=l,e[17]=m,e[18]=c,e[19]=f,e[20]=u,e[21]=p,e[22]=j}else p=e[21],j=e[22];return j!==Symbol.for("react.early_return_sentinel")?j:p}function Ze(a){const{c:e}=a;return e}function qe(a){return typeof a=="number"}function Je(a){return a!==null}function et(a,e){return+(e.c==="Task")-+(a.c==="Task")}function tt(a,e){return{c:a,j:e}}function Ot(a){const e=w.c(17),{section:t,taskHref:d}=a,o=B();let c;e[0]!==t.columns?(c=i=>t.columns.indexOf(i),e[0]=t.columns,e[1]=c):c=e[1];const r=c;if(t.rows.length===0){let i;e[2]!==o?(i=o("taskBoard.analytics.nothingToShow"),e[2]=o,e[3]=i):i=e[3];let u;return e[4]!==i?(u=s.jsx(R,{children:i}),e[4]=i,e[5]=u):u=e[5],u}let l;if(e[6]!==r||e[7]!==t.rows||e[8]!==o||e[9]!==d){let i;e[11]!==r||e[12]!==o||e[13]!==d?(i=u=>{const f=String(u[r("Task ID")]??""),x=u[r("Lane")],m=u[r("Picked up")],h=Number(u[r("Actions by people")]??0),p=Number(u[r("Failed QA")]??0),j=[typeof m=="string"?te(m):null,h>0&&o(h===1?"taskBoard.analytics.humanActionsOne":"taskBoard.analytics.humanActions",{n:String(h)})].filter(Boolean),y=s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"truncate text-sm text-foreground",children:String(u[r("Task")]??"")}),s.jsx("span",{className:"text-meta truncate",children:j.join(" · ")})]}),p>0&&s.jsxs(Y,{variant:"muted",children:[s.jsx(be,{className:"text-destructive"}),p===1?o("taskBoard.analytics.failedQa"):o("taskBoard.analytics.failedQaTimes",{n:String(p)})]}),typeof x=="string"&&s.jsx(re,{lane:x})]});return s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:d?s.jsx(ne,{href:d(f),className:O(F,"flex items-center gap-3 rounded-md p-2"),children:y}):s.jsx("div",{className:"flex items-center gap-3 p-2",children:y})},f)},e[11]=r,e[12]=o,e[13]=d,e[14]=i):i=e[14],l=t.rows.map(i),e[6]=r,e[7]=t.rows,e[8]=o,e[9]=d,e[10]=l}else l=e[10];let n;return e[15]!==l?(n=s.jsx("ul",{className:"flex flex-col",children:l}),e[15]=l,e[16]=n):n=e[16],n}const st={Type:Ce,Priority:Se,Tag:Ne,Sprint:ke,"Brief by":we};function ce(a){const e=w.c(10),{drill:t}=a;let d;e[0]!==t?(d=(t??"").split("&")[0]?.split(":")??[],e[0]=t,e[1]=d):d=e[1];const[o,c]=d;let r,l,n;if(e[2]!==o||e[3]!==c){n=Symbol.for("react.early_return_sentinel");e:{const u=o==="type"?Object.entries($e).find(x=>{const[m]=x;return m===c})?.[1]:o==="priority"?Object.entries(De).find(x=>{const[m]=x;return m===c})?.[1]:void 0;if(!u){n=null;break e}r=u.icon,l=O("size-3.5 shrink-0",u.iconClassName)}e[2]=o,e[3]=c,e[4]=r,e[5]=l,e[6]=n}else r=e[4],l=e[5],n=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;let i;return e[7]!==r||e[8]!==l?(i=s.jsx(r,{className:l}),e[7]=r,e[8]=l,e[9]=i):i=e[9],i}function nt(a){const e=w.c(11),{value:t,metric:d,color:o}=a,c=t??0,r=`${d.unit==="%"?Math.min(100,c):0}%`;let l;e[0]!==o||e[1]!==r?(l=s.jsx("span",{className:"h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:r,backgroundColor:o}})}),e[0]=o,e[1]=r,e[2]=l):l=e[2];const n=t??null;let i;e[3]!==d.unit||e[4]!==n?(i=M(n,d.unit),e[3]=d.unit,e[4]=n,e[5]=i):i=e[5];let u;e[6]!==i?(u=s.jsx("span",{className:"tnum w-12 shrink-0 text-right text-sm text-foreground",children:i}),e[6]=i,e[7]=u):u=e[7];let f;return e[8]!==l||e[9]!==u?(f=s.jsxs("span",{className:"flex items-center gap-2",children:[l,u]}),e[8]=l,e[9]=u,e[10]=f):f=e[10],f}function lt(a){const e=w.c(16),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.dimensions[0]?.label??"");let l;e[0]!==c||e[1]!==t.dimensions?(l=t.dimensions.find(m=>m.label===c)??t.dimensions[0],e[0]=c,e[1]=t.dimensions,e[2]=l):l=e[2];const n=l,i=`minmax(0,1fr) 56px repeat(${t.metrics.length}, minmax(96px, 168px))`;let u;e[3]!==n?.label||e[4]!==t.dimensions?(u=t.dimensions.length>1&&s.jsx(ee,{value:n?.label??"",onValueChange:r,options:t.dimensions.map(rt)}),e[3]=n?.label,e[4]=t.dimensions,e[5]=u):u=e[5];let f;e[6]!==i||e[7]!==n||e[8]!==d||e[9]!==t.metrics||e[10]!==o?(f=!n||n.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"text-meta grid items-center gap-4 border-b border-border/50 pb-2",style:{gridTemplateColumns:i},children:[s.jsx("span",{children:n.label}),s.jsx("span",{className:"text-right",children:o("taskBoard.analytics.tasks")}),t.metrics.map(at)]}),n.rows.map(m=>{const h=L(d,m.drill,m.label),p=h?"button":"div";return s.jsxs(p,{type:h?"button":void 0,onClick:h,className:O("grid h-11 items-center gap-4 border-b border-border/50 last:border-b-0",h&&O(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2")),style:{gridTemplateColumns:i},children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-sm text-foreground",children:[s.jsx(ce,{drill:m.drill}),s.jsx("span",{className:"truncate",children:m.label})]}),s.jsx("span",{className:"tnum text-right text-sm text-muted-foreground",children:m.count.toLocaleString()}),t.metrics.map(j=>s.jsx(nt,{value:m.values[j.key],metric:j,color:j.better==="up"?"var(--success)":"var(--destructive)"},j.key))]},m.label)})]}),e[6]=i,e[7]=n,e[8]=d,e[9]=t.metrics,e[10]=o,e[11]=f):f=e[11];let x;return e[12]!==t.title||e[13]!==u||e[14]!==f?(x=s.jsx(_,{title:t.title,aside:u,children:f}),e[12]=t.title,e[13]=u,e[14]=f,e[15]=x):x=e[15],x}function at(a){return s.jsx("span",{className:"text-right",children:a.label},a.key)}function rt(a){const e=st[a.label];return{value:a.label,label:a.label,icon:e?s.jsx(e,{}):void 0}}const de=3;function it(a){const e=w.c(26),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.metrics[0]?.key??"");let l;e[0]!==c||e[1]!==t.metrics?(l=t.metrics.find(k=>k.key===c)??t.metrics[0],e[0]=c,e[1]=t.metrics,e[2]=l):l=e[2];const n=l;if(!n)return null;const i=n.better==="up"?"var(--success)":"var(--destructive)";let u;e[3]!==t.cols||e[4]!==t.rows?(u=t.rows.length===t.cols.length&&t.rows.every((k,$)=>t.cols[$]===k),e[3]=t.cols,e[4]=t.rows,e[5]=u):u=e[5];const f=u,x=`minmax(96px, 1fr) repeat(${t.cols.length}, minmax(72px, 1fr))`,m=t.title;let h;e[6]!==o?(h=o("taskBoard.analytics.matrixCaption",{n:String(de)}),e[6]=o,e[7]=h):h=e[7];let p;e[8]!==h?(p=s.jsx("span",{className:"text-meta",children:h}),e[8]=h,e[9]=p):p=e[9];let j;e[10]!==n.key||e[11]!==t.metrics?(j=t.metrics.length>1&&s.jsx(ee,{value:n.key,onValueChange:r,options:t.metrics.map(ct)}),e[10]=n.key,e[11]=t.metrics,e[12]=j):j=e[12];let y;e[13]!==x||e[14]!==n||e[15]!==d||e[16]!==t||e[17]!==f||e[18]!==o||e[19]!==i?(y=t.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("div",{className:"grid min-w-fit gap-1",style:{gridTemplateColumns:x},children:[s.jsxs("span",{className:"text-meta self-end pb-1",children:[t.rowLabel," / ",t.colLabel]}),t.cols.map(ot),t.rows.map((k,$)=>s.jsx(dt,{row:k,section:t,metric:n,tint:i,onDrill:d,upTo:f?$:void 0},k))]})}),e[13]=x,e[14]=n,e[15]=d,e[16]=t,e[17]=f,e[18]=o,e[19]=i,e[20]=y):y=e[20];let v;return e[21]!==t.title||e[22]!==p||e[23]!==j||e[24]!==y?(v=s.jsx(_,{title:m,caption:p,aside:j,children:y}),e[21]=t.title,e[22]=p,e[23]=j,e[24]=y,e[25]=v):v=e[25],v}function ot(a){return s.jsx("span",{className:"text-meta self-end pb-1 text-center",children:a},a)}function ct(a){return{value:a.key,label:a.label}}function dt(a){const e=w.c(22),{row:t,section:d,metric:o,tint:c,onDrill:r,upTo:l}=a,n=B();let i;e[0]!==t?(i=s.jsx("span",{className:"flex items-center truncate pr-2 text-sm text-foreground",children:t}),e[0]=t,e[1]=i):i=e[1];let u;if(e[2]!==o||e[3]!==r||e[4]!==t||e[5]!==d.cells||e[6]!==d.cols||e[7]!==n||e[8]!==c||e[9]!==l){let x;e[11]!==o||e[12]!==r||e[13]!==t||e[14]!==d.cells||e[15]!==n||e[16]!==c||e[17]!==l?(x=(m,h)=>{if(l!==void 0&&h>l)return s.jsx("span",{},m);const p=d.cells.find(k=>k.row===t&&k.col===m),j=p?.values[o.key]??null;if(!p)return s.jsx("span",{className:"flex h-14 items-center justify-center rounded-md bg-muted/40 text-sm text-muted-foreground",children:"—"},m);const y=j===null?0:Math.min(100,o.unit==="%"?j:0),v=L(r,p.drill,t===m?t:`${t} · ${m}`);return s.jsxs("button",{type:"button",onClick:v,disabled:!v,className:O("flex h-14 flex-col items-center justify-center rounded-md transition-opacity focus-ring",v&&"cursor-pointer hover:opacity-80",p.count<de&&"opacity-50"),style:{backgroundColor:`color-mix(in oklch, ${c} ${Math.round(8+y*.5)}%, var(--muted))`},children:[s.jsx("span",{className:"tnum text-sm font-medium text-foreground",children:M(j,o.unit)}),s.jsx("span",{className:"text-meta",children:p.count===1?n("taskBoard.analytics.drillCountOne"):n("taskBoard.analytics.drillCount",{n:String(p.count)})})]},m)},e[11]=o,e[12]=r,e[13]=t,e[14]=d.cells,e[15]=n,e[16]=c,e[17]=l,e[18]=x):x=e[18],u=d.cols.map(x),e[2]=o,e[3]=r,e[4]=t,e[5]=d.cells,e[6]=d.cols,e[7]=n,e[8]=c,e[9]=l,e[10]=u}else u=e[10];let f;return e[19]!==i||e[20]!==u?(f=s.jsxs(s.Fragment,{children:[i,u]}),e[19]=i,e[20]=u,e[21]=f):f=e[21],f}function ut(){const a=w.c(2),e=B();let t;return a[0]!==e?(t=d=>Object.hasOwn(Oe,d)?se(d,e).label:d,a[0]=e,a[1]=t):t=a[1],t}function ft(a){const e=w.c(21),{section:t,onDrill:d}=a,o=B(),c=ut(),r=t.unit??void 0,l=t.layout==="stacked";let n;if(e[0]!==c||e[1]!==d||e[2]!==t.baseline||e[3]!==t.categories||e[4]!==t.keys||e[5]!==t.title||e[6]!==l||e[7]!==o||e[8]!==r){let i;e[10]!==t.baseline?(i=g=>g!==t.baseline,e[10]=t.baseline,e[11]=i):i=e[11];const u=t.keys.filter(i),f=g=>g===t.baseline?"var(--border)":E[u.indexOf(g)%E.length]??"",x=Object.fromEntries(t.keys.map(g=>[g,{label:c(g),color:f(g)}]));let m;e[12]!==t.categories?(m=t.categories.map(xt),e[12]=t.categories,e[13]=m):m=e[13];const h=m;let p;e[14]!==d||e[15]!==t.categories?(p=g=>{const C=t.categories[g];C&&L(d,C.drill,C.label)?.()},e[14]=d,e[15]=t.categories,e[16]=p):p=e[16];const j=p,y=t.categories.some(mt)&&!!d,v=l?Math.max(120,t.categories.length*44+32):220;let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k={fill:"var(--muted)",opacity:.4},e[17]=k):k=e[17];let $;e[18]!==c||e[19]!==r?($=s.jsx(J,{cursor:k,content:g=>{const{active:C,payload:T}=g;return s.jsx(ie,{active:C,payload:T,unit:r,nameOf:c})}}),e[18]=c,e[19]=r,e[20]=$):$=e[20];const S=$;n=s.jsx(_,{title:t.title,aside:s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:t.keys.map(g=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:f(g)}}),c(g)]},g))}),children:h.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"w-full",style:{height:v},config:x,children:l?s.jsxs(U,{data:h,layout:"vertical",margin:{left:0,right:8,top:0},children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,horizontal:!1}),s.jsx(V,{type:"number",axisLine:!1,tickLine:!1,tick:A,tickFormatter:g=>X(g,r)}),s.jsx(P,{type:"category",dataKey:"label",axisLine:!1,tickLine:!1,tick:A,width:72}),S,t.keys.map((g,C)=>s.jsx(G,{dataKey:g,stackId:"all",fill:f(g),maxBarSize:22,radius:C===t.keys.length-1?[0,4,4,0]:0,animationDuration:300},g))]}):s.jsxs(U,{data:h,margin:{left:0,right:0,top:8},barGap:4,barCategoryGap:"28%",children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(V,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,tickMargin:8}),s.jsx(P,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,allowDecimals:r!==void 0,tickFormatter:g=>X(g,r),width:48}),S,t.keys.map(g=>s.jsx(G,{dataKey:g,fill:f(g),maxBarSize:32,radius:[4,4,0,0],animationDuration:300,className:O(y&&"cursor-pointer"),onClick:(C,T)=>j(T)},g))]})})}),e[0]=c,e[1]=d,e[2]=t.baseline,e[3]=t.categories,e[4]=t.keys,e[5]=t.title,e[6]=l,e[7]=o,e[8]=r,e[9]=n}else n=e[9];return n}function mt(a){return a.drill}function xt(a){return{label:a.label,...a.values}}function Tt(a){return a.kind==="funnel"||a.kind==="bars"?"half":"full"}function It(a){const e=w.c(27),{section:t,threadLinks:d,showOrg:o,taskHref:c,range:r,onDrill:l}=a;switch(t.kind){case"stat":{let n;return e[0]!==l||e[1]!==t?(n=s.jsx(Re,{section:t,onDrill:l}),e[0]=l,e[1]=t,e[2]=n):n=e[2],n}case"series":{let n;return e[3]!==r||e[4]!==t?(n=s.jsx(Fe,{section:t,range:r}),e[3]=r,e[4]=t,e[5]=n):n=e[5],n}case"funnel":{let n;return e[6]!==l||e[7]!==t?(n=s.jsx(Ue,{section:t,onDrill:l}),e[6]=l,e[7]=t,e[8]=n):n=e[8],n}case"bars":{let n;return e[9]!==l||e[10]!==t?(n=s.jsx(Ge,{section:t,onDrill:l}),e[9]=l,e[10]=t,e[11]=n):n=e[11],n}case"breakdown":{let n;return e[12]!==l||e[13]!==t?(n=s.jsx(lt,{section:t,onDrill:l}),e[12]=l,e[13]=t,e[14]=n):n=e[14],n}case"matrix":{let n;return e[15]!==l||e[16]!==t?(n=s.jsx(it,{section:t,onDrill:l}),e[15]=l,e[16]=t,e[17]=n):n=e[17],n}case"categories":{let n;return e[18]!==l||e[19]!==t?(n=s.jsx(ft,{section:t,onDrill:l}),e[18]=l,e[19]=t,e[20]=n):n=e[20],n}case"table":{let n;return e[21]!==l||e[22]!==t||e[23]!==o||e[24]!==c||e[25]!==d?(n=s.jsx(We,{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:l}),e[21]=l,e[22]=t,e[23]=o,e[24]=c,e[25]=d,e[26]=n):n=e[26],n}default:return t}}export{Ot as D,It as S,Tt as s};
|
|
1
|
+
import{c as w,j as s,b as B,en as Q,l as O,z as fe,r as Z,d as me}from"./index-BoB02eW2.js";import{d as q,C as J}from"./chart-D1eqwoYD.js";import{e as xe,a as pe,b as W,T as he,d as ge,c as je}from"./table-CLaOCONQ.js";import{i as be}from"./AlertCircle-BFUZ4yx0.js";import{i as ye,n as ve}from"./ArrowUp-U6_gobY2.js";import{a2 as ke,$ as Ne,ap as Se,a8 as Ce}from"./agent-icon-Bmu0Xuy8.js";import{s as we}from"./User01-CinpYulR.js";import{V as ee}from"./view-mode-toggle-DKlegHXH.js";import{t as te}from"./format-time-CAj8AQXM.js";import{B as Y}from"./badge-Zdi_g359.js";import{l as se,c as $e,b as De,S as Oe}from"./config-CddNRjRY.js";import{B as U,a as G}from"./BarChart-DBqZyJQX.js";import{C as H,Y as P,a as Te,A as Ie}from"./AreaChart-DKrmhkRJ.js";import{X as V}from"./XAxis-CMCcO3jI.js";function ne(a){const e=w.c(8),{href:t,className:d,children:o}=a,c=me();let r;e[0]!==t||e[1]!==c?(r=n=>{!t||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),c({href:t}))},e[0]=t,e[1]=c,e[2]=r):r=e[2];let l;return e[3]!==o||e[4]!==d||e[5]!==t||e[6]!==r?(l=s.jsx("a",{href:t,className:d,onClick:r,children:o}),e[3]=o,e[4]=d,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}const L=(a,e,t)=>a&&e?()=>a({drill:e,label:t}):void 0,F="cursor-pointer text-left transition-colors hover:bg-accent/50 focus-ring",E=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"],A={fontSize:11,fill:"var(--muted-foreground)",opacity:.7};function le(a){const e=Math.abs(a);return e<60?`${Math.round(a)}s`:e<3600?`${Math.round(a/60)}m`:e<86400?`${(a/3600).toFixed(1)}h`:`${(a/86400).toFixed(1)}d`}function M(a,e){return a===null||Number.isNaN(a)?"—":e==="s"?le(a):e==="%"?`${Math.round(a*10)/10}%`:e==="USD"?`$${a.toFixed(2)}`:a.toLocaleString()}function X(a,e){return e==="s"?le(a):e==="%"?`${a}%`:e==="USD"?`$${a}`:a>=1e3?`${(a/1e3).toFixed(1)}k`:String(a)}const ae=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/,Be=/^\d{4}-\d{2}-\d{2}$/;function Le(a,e){return typeof a=="number"?M(a,e):Be.test(a)?new Date(`${a}T12:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric"}):ae.test(a)?te(a):a}function _(a){const e=w.c(20),{title:t,value:d,caption:o,aside:c,children:r,onClick:l}=a,n=l?"button":"section",i=l?"button":void 0,u=l&&F;let f;e[0]!==u?(f=O("surface flex h-full w-full flex-col gap-6 px-4 pt-4 pb-5",u),e[0]=u,e[1]=f):f=e[1];let x;e[2]!==t?(x=s.jsx("h3",{className:"text-sm text-foreground/70",children:t}),e[2]=t,e[3]=x):x=e[3];let m;e[4]!==d?(m=d!==void 0&&s.jsx("span",{className:"tnum text-4xl font-normal text-foreground",children:d}),e[4]=d,e[5]=m):m=e[5];let h;e[6]!==o||e[7]!==x||e[8]!==m?(h=s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[x,m,o]}),e[6]=o,e[7]=x,e[8]=m,e[9]=h):h=e[9];let p;e[10]!==c||e[11]!==h?(p=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h,c]}),e[10]=c,e[11]=h,e[12]=p):p=e[12];let j;return e[13]!==n||e[14]!==r||e[15]!==l||e[16]!==i||e[17]!==f||e[18]!==p?(j=s.jsxs(n,{type:i,onClick:l,className:f,children:[p,r]}),e[13]=n,e[14]=r,e[15]=l,e[16]=i,e[17]=f,e[18]=p,e[19]=j):j=e[19],j}function re(a){const e=w.c(9),{lane:t}=a,d=B();let o;e[0]!==t||e[1]!==d?(o=se(t,d),e[0]=t,e[1]=d,e[2]=o):o=e[2];const{label:c,visual:r}=o,l=r.icon;let n;e[3]!==l||e[4]!==r.iconClassName?(n=s.jsx(l,{className:r.iconClassName}),e[3]=l,e[4]=r.iconClassName,e[5]=n):n=e[5];let i;return e[6]!==c||e[7]!==n?(i=s.jsxs(Y,{variant:"muted",children:[n,c]}),e[6]=c,e[7]=n,e[8]=i):i=e[8],i}function R(a){const e=w.c(2),{children:t}=a;let d;return e[0]!==t?(d=s.jsx("div",{className:"flex h-20 items-center justify-center text-sm text-muted-foreground",children:t}),e[0]=t,e[1]=d):d=e[1],d}function Me(a){const e=w.c(21),{value:t,previous:d,unit:o,better:c}=a,r=B();if(t===null||d===null||d===void 0){let p;e[0]!==r?(p=r("taskBoard.analytics.noPrior"),e[0]=r,e[1]=p):p=e[1];let j;return e[2]!==p?(j=s.jsx("span",{className:"text-meta",children:p}),e[2]=p,e[3]=j):j=e[3],j}const l=Math.round((t-d)*10)/10,n=c==="down"?l<0:l>0;let i;e[4]!==l||e[5]!==r||e[6]!==o?(i=o==="%"?r("taskBoard.analytics.points",{n:String(Math.abs(l))}):M(Math.abs(l),o),e[4]=l,e[5]=r,e[6]=o,e[7]=i):i=e[7];const u=i;let f;e[8]!==u||e[9]!==c||e[10]!==l||e[11]!==n||e[12]!==r?(f=l===0?r("taskBoard.analytics.unchanged"):s.jsxs("span",{className:O("inline-flex items-center gap-0.5 font-medium",c&&(n?"text-success":"text-destructive")),children:[l>0?s.jsx(ye,{size:12}):s.jsx(ve,{size:12}),u]}),e[8]=u,e[9]=c,e[10]=l,e[11]=n,e[12]=r,e[13]=f):f=e[13];let x;e[14]!==r?(x=r("taskBoard.analytics.vsPrevious"),e[14]=r,e[15]=x):x=e[15];let m;e[16]!==x?(m=s.jsx("span",{children:x}),e[16]=x,e[17]=m):m=e[17];let h;return e[18]!==f||e[19]!==m?(h=s.jsxs("span",{className:"text-meta inline-flex items-center gap-1",children:[f,m]}),e[18]=f,e[19]=m,e[20]=h):h=e[20],h}const _e={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",5:"lg:grid-cols-5",6:"lg:grid-cols-3",9:"lg:grid-cols-3"};function Re(a){const e=w.c(10),{section:t,onDrill:d}=a,o=_e[t.values.length]??"lg:grid-cols-4";let c;e[0]!==o?(c=O("grid grid-cols-2 gap-4",o),e[0]=o,e[1]=c):c=e[1];let r;if(e[2]!==d||e[3]!==t.values){let n;e[5]!==d?(n=i=>s.jsx(_,{title:i.label,value:M(i.value,i.unit),onClick:L(d,i.drill,i.label),caption:s.jsxs(s.Fragment,{children:[i.detail&&s.jsx("span",{className:"text-sm text-muted-foreground",children:i.detail}),i.previous!==void 0&&s.jsx(Me,{value:i.value,previous:i.previous,unit:i.unit,better:i.better})]})},i.label),e[5]=d,e[6]=n):n=e[6],r=t.values.map(n),e[2]=d,e[3]=t.values,e[4]=r}else r=e[4];let l;return e[7]!==c||e[8]!==r?(l=s.jsx("div",{className:c,children:r}),e[7]=c,e[8]=r,e[9]=l):l=e[9],l}function Ae(a){return Array.from(new Set(a.flatMap(e=>Object.keys(e)))).filter(e=>e!=="t").sort()}function Ke(a,e){const t=e.filter(d=>a.some(o=>typeof o[d]=="number"&&o[d]!==0));return t.length>0?t:e}function Ee(a,e,t){const d=new Map(a.map(l=>[String(l.t??"").slice(0,10),l])),o=new Date(`${t.from.slice(0,10)}T00:00:00.000Z`),c=t.to.slice(0,10),r=[];for(;o.toISOString().slice(0,10)<=c;){const l=o.toISOString().slice(0,10);r.push(d.get(l)??{t:o.toISOString(),...Object.fromEntries(e.map(n=>[n,0]))}),o.setUTCDate(o.getUTCDate()+1)}return r}function ie(a){const e=w.c(17),{active:t,payload:d,unit:o,nameOf:c}=a,r=c===void 0?String:c;if(!t||!d?.length)return null;const l=d[0]?.payload,n=l?.t;let i;e[0]!==l?.label||e[1]!==n?(i=typeof n=="string"?new Date(n).toLocaleDateString(void 0,{month:"short",day:"numeric"}):String(l?.label??""),e[0]=l?.label,e[1]=n,e[2]=i):i=e[2];let u;e[3]!==i?(u=s.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=u):u=e[4];let f;if(e[5]!==r||e[6]!==d||e[7]!==o){let h;e[9]!==r||e[10]!==o?(h=p=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:p.color}}),s.jsx("span",{className:"text-muted-foreground",children:r(String(p.dataKey))}),s.jsx("span",{className:"tnum ml-auto pl-3 font-medium",children:M(typeof p.value=="number"?p.value:null,o)})]},String(p.dataKey)),e[9]=r,e[10]=o,e[11]=h):h=e[11],f=d.map(h),e[5]=r,e[6]=d,e[7]=o,e[8]=f}else f=e[8];let x;e[12]!==f?(x=s.jsx("div",{className:"flex flex-col gap-1",children:f}),e[12]=f,e[13]=x):x=e[13];let m;return e[14]!==u||e[15]!==x?(m=s.jsxs("div",{className:"rounded-lg border bg-background px-3 py-2 shadow-md",children:[u,x]}),e[14]=u,e[15]=x,e[16]=m):m=e[16],m}function Fe(a){const e=w.c(27),{section:t,range:d}=a,o=B(),c=t.unit??void 0,r=c!=="%"&&c!=="s";let l;if(e[0]!==r||e[1]!==d||e[2]!==t.points||e[3]!==t.title||e[4]!==o||e[5]!==c){const n=Ae(t.points),i=r?Ke(t.points,n):n,u=b=>E[n.indexOf(b)%E.length],f=Object.fromEntries(i.map(b=>[b,{label:b,color:u(b)}])),m=(r&&d?Ee(t.points,n,d):t.points).map(ze);let h;if(e[7]!==t.title){let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=/\W+/g,e[9]=b):b=e[9],h=t.title.replace(b,"-"),e[7]=t.title,e[8]=h}else h=e[8];const p=`analytics-${h}`;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),e[10]=j):j=e[10];const y=j;let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(V,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,minTickGap:24,tickMargin:8}),e[11]=v):v=e[11];const k=v;let $;e[12]!==c?($=c==="%"?[0,100]:[0,"auto"],e[12]=c,e[13]=$):$=e[13];const S=c!==void 0;let g;e[14]!==c?(g=b=>X(b,c),e[14]=c,e[15]=g):g=e[15];let C;e[16]!==$||e[17]!==S||e[18]!==g?(C=s.jsx(P,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,domain:$,allowDecimals:S,tickFormatter:g,width:48,tickCount:5}),e[16]=$,e[17]=S,e[18]=g,e[19]=C):C=e[19];const T=C;let D;e[20]!==r?(D=r?{fill:"var(--muted)",opacity:.4}:{stroke:"var(--border)",strokeDasharray:"4 4"},e[20]=r,e[21]=D):D=e[21];let I;e[22]!==c?(I=b=>{const{active:z,payload:ue}=b;return s.jsx(ie,{active:z,payload:ue,unit:c})},e[22]=c,e[23]=I):I=e[23];let N;e[24]!==I||e[25]!==D?(N=s.jsx(J,{cursor:D,content:I}),e[24]=I,e[25]=D,e[26]=N):N=e[26];const K=N;l=s.jsx(_,{title:t.title,aside:i.length>1&&s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:i.map(b=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:u(b)}}),b]},b))}),children:m.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"h-[140px] w-full md:h-[180px]",config:f,children:r?s.jsxs(U,{data:m,margin:{left:0,right:0,top:8},children:[y,k,T,K,i.map((b,z)=>s.jsx(G,{dataKey:b,stackId:"day",fill:u(b),maxBarSize:24,radius:z===i.length-1?[4,4,0,0]:0,animationDuration:300},b))]}):s.jsxs(Te,{data:m,margin:{left:0,right:0,top:8},children:[i.length===1&&s.jsx("defs",{children:s.jsxs("linearGradient",{id:p,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:u(i[0]??""),stopOpacity:.2}),s.jsx("stop",{offset:"100%",stopColor:u(i[0]??""),stopOpacity:0})]})}),y,k,T,K,i.map(b=>s.jsx(Ie,{type:"linear",dataKey:b,stroke:u(b),strokeWidth:2,fill:i.length===1?`url(#${p})`:"none",dot:m.length===1?{r:4}:!1,activeDot:{r:4,stroke:"var(--background)",strokeWidth:2},connectNulls:!0,animationDuration:300},b))]})})}),e[0]=r,e[1]=d,e[2]=t.points,e[3]=t.title,e[4]=o,e[5]=c,e[6]=l}else l=e[6];return l}function ze(a){return{...a,label:new Date(String(a.t??"")).toLocaleDateString(void 0,{month:"short",day:"numeric"})}}function oe(a){const e=w.c(25),{label:t,note:d,share:o,value:c,fill:r,color:l,onClick:n}=a,i=n?"button":"div",u=n?"button":void 0;let f;e[0]!==n?(f=n&&O(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2"),e[0]=n,e[1]=f):f=e[1];let x;e[2]!==f?(x=O("flex h-10 w-full items-center gap-3",f),e[2]=f,e[3]=x):x=e[3];let m;e[4]!==d?(m=d&&s.jsx("span",{className:"text-meta ml-2",children:d}),e[4]=d,e[5]=m):m=e[5];let h;e[6]!==t||e[7]!==m?(h=s.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:[t,m]}),e[6]=t,e[7]=m,e[8]=h):h=e[8];const p=`${Math.max(0,Math.min(100,r))}%`;let j;e[9]!==l||e[10]!==p?(j=s.jsx("span",{className:"h-1.5 w-20 shrink-0 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:p,backgroundColor:l}})}),e[9]=l,e[10]=p,e[11]=j):j=e[11];let y;e[12]!==o?(y=o!==void 0&&s.jsx("span",{className:"tnum w-16 shrink-0 text-right text-sm text-foreground/40",children:o}),e[12]=o,e[13]=y):y=e[13];let v;e[14]!==c?(v=s.jsx("span",{className:"tnum w-8 shrink-0 text-right text-sm text-foreground",children:c}),e[14]=c,e[15]=v):v=e[15];let k;return e[16]!==i||e[17]!==n||e[18]!==u||e[19]!==x||e[20]!==h||e[21]!==j||e[22]!==y||e[23]!==v?(k=s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:s.jsxs(i,{type:u,onClick:n,className:x,children:[h,j,y,v]})}),e[16]=i,e[17]=n,e[18]=u,e[19]=x,e[20]=h,e[21]=j,e[22]=y,e[23]=v,e[24]=k):k=e[24],k}function Ue(a){const e=w.c(17),{section:t,onDrill:d}=a,o=B(),c=t.stages[0]?.value??0,r=t.stages.at(-1)?.value??0;let l;e[0]!==r||e[1]!==c?(l=c?`${Math.round(100*r/c)}%`:"—",e[0]=r,e[1]=c,e[2]=l):l=e[2];let n;e[3]!==r||e[4]!==c||e[5]!==o?(n=c>0&&s.jsx("span",{className:"text-meta",children:o("taskBoard.analytics.funnelCaption",{end:String(r),start:String(c)})}),e[3]=r,e[4]=c,e[5]=o,e[6]=n):n=e[6];let i;e[7]!==d||e[8]!==t.stages||e[9]!==c||e[10]!==o?(i=c===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("ol",{className:"flex flex-col",children:t.stages.map((f,x)=>{const m=t.stages[x-1]?.value,h=m===void 0?0:m-f.value;return s.jsx(oe,{label:f.label,note:h>0?o("taskBoard.analytics.dropped",{n:String(h)}):void 0,share:`${Math.round(100*f.value/c)}%`,value:f.value.toLocaleString(),fill:100*f.value/c,color:"var(--chart-2)",onClick:L(d,f.drill,f.label)},f.label)})}),e[7]=d,e[8]=t.stages,e[9]=c,e[10]=o,e[11]=i):i=e[11];let u;return e[12]!==t.title||e[13]!==l||e[14]!==n||e[15]!==i?(u=s.jsx(_,{title:t.title,value:l,caption:n,children:i}),e[12]=t.title,e[13]=l,e[14]=n,e[15]=i,e[16]=u):u=e[16],u}function Ge(a){const e=w.c(19),{section:t,onDrill:d}=a,o=B();let c;e[0]!==t.bars?(c=Math.max(0,...t.bars.map(He)),e[0]=t.bars,e[1]=c):c=e[1];const r=c;let l;e[2]!==t.total?.value?(l=t.total?.value.toLocaleString(),e[2]=t.total?.value,e[3]=l):l=e[3];let n;e[4]!==t.total?(n=t.total&&s.jsx("span",{className:"text-meta",children:t.total.label}),e[4]=t.total,e[5]=n):n=e[5];let i;e[6]!==t.unit?(i=t.unit&&s.jsx("span",{className:"text-meta",children:t.unit}),e[6]=t.unit,e[7]=i):i=e[7];let u;e[8]!==r||e[9]!==d||e[10]!==t.bars||e[11]!==o?(u=t.bars.length===0?s.jsx(R,{children:o("taskBoard.analytics.nobodyStepped")}):s.jsx("ul",{className:"flex flex-col",children:t.bars.map(x=>s.jsx(oe,{label:x.label,note:x.note,share:x.detail,value:x.value.toLocaleString(),fill:r?100*x.value/r:0,color:"var(--chart-1)",onClick:L(d,x.drill,x.label)},x.label))}),e[8]=r,e[9]=d,e[10]=t.bars,e[11]=o,e[12]=u):u=e[12];let f;return e[13]!==t.title||e[14]!==l||e[15]!==n||e[16]!==i||e[17]!==u?(f=s.jsx(_,{title:t.title,value:l,caption:n,aside:i,children:u}),e[13]=t.title,e[14]=l,e[15]=n,e[16]=i,e[17]=u,e[18]=f):f=e[18],f}function He(a){return a.value}function Pe(a,e){return`/${encodeURIComponent(a)}/${encodeURIComponent(e)}`}const Ve=new Set(["Org ID","Task ID"]),Xe=new Set(["Run outcome","Failure kind","Moved in by","State"]),Ye=new Set(["Error","Signature"]),Qe=new Set(["Org","Orgs"]);function We(a){const e=w.c(32),{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:r}=a,l=B(),n=t.columns.indexOf("Org");let i;e[0]!==n||e[1]!==t.columns||e[2]!==d?(i=d&&n>=0?t.columns.indexOf("Thread"):-1,e[0]=n,e[1]=t.columns,e[2]=d,e[3]=i):i=e[3];const u=i,f=t.columns.indexOf("Task ID");let x;e[4]!==t.columns||e[5]!==c||e[6]!==f?(x=c&&f>=0?t.columns.indexOf("Task"):-1,e[4]=t.columns,e[5]=c,e[6]=f,e[7]=x):x=e[7];const m=x,h=t.columns;let p,j;if(e[8]!==r||e[9]!==n||e[10]!==t.columns||e[11]!==t.drills||e[12]!==t.rows||e[13]!==t.title||e[14]!==t.units||e[15]!==o||e[16]!==l||e[17]!==m||e[18]!==c||e[19]!==f||e[20]!==u){j=Symbol.for("react.early_return_sentinel");e:{let y;e[23]!==o?(y=S=>{const{c:g}=S;return!Ve.has(g)&&(o!==!1||!Qe.has(g))},e[23]=o,e[24]=y):y=e[24];const v=h.map(tt).filter(y).sort(et);let k;e[25]!==t.rows?(k=S=>{const{j:g}=S,C=t.rows.map(T=>T[g]).filter(Je);return C.length>0&&C.every(qe)},e[25]=t.rows,e[26]=k):k=e[26];const $=new Set(v.filter(k).map(Ze));if(t.rows.length===1&&v.every(S=>{const{c:g}=S;return $.has(g)})){let S;e[27]!==t.rows[0]?(S=t.rows[0]??[],e[27]=t.rows[0],e[28]=S):S=e[28];const g=S;let C;e[29]!==g||e[30]!==t.units?(C=T=>{const{c:D,j:I}=T,N=g[I];return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("dt",{className:"text-meta",children:D}),s.jsx("dd",{className:"tnum text-2xl text-foreground",children:typeof N=="number"?M(N,t.units?.[D]):"—"})]},D)},e[29]=g,e[30]=t.units,e[31]=C):C=e[31],j=s.jsx(Q,{title:t.title,children:s.jsx("dl",{className:"surface grid px-4 pt-4 pb-5 grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3 lg:grid-cols-[repeat(auto-fill,minmax(120px,1fr))]",children:v.map(C)})});break e}p=s.jsx(Q,{title:t.title,children:t.rows.length===0?s.jsx("p",{className:"surface px-4 py-4 text-sm text-muted-foreground",children:l("taskBoard.analytics.nothingToShow")}):s.jsx("div",{className:"surface max-h-[480px] overflow-auto",children:s.jsxs(xe,{variant:"flush",children:[s.jsx(pe,{children:s.jsx(W,{children:v.map(S=>{const{c:g}=S;return s.jsx(he,{className:O("whitespace-nowrap first:pl-4 last:pr-4",$.has(g)&&"text-right"),children:g==="Thread"?"":g},g)})})}),s.jsx(ge,{children:t.rows.map((S,g)=>s.jsx(W,{children:v.map((C,T)=>{const{c:D,j:I}=C,N=S[I],K=m===I?S[f]:null,b=T===0?L(r,t.drills?.[g]??void 0,String(N??"")):void 0;return s.jsx(je,{className:O("max-w-md truncate text-sm first:pl-4 last:pr-4",$.has(D)&&"text-right"),children:N==null?s.jsx("span",{className:"text-muted-foreground",children:"—"}):I===u?s.jsxs("a",{href:Pe(String(S[n]),String(N)),target:"_blank",rel:"noreferrer",className:"focus-ring inline-flex items-center gap-1 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:[l("taskBoard.analytics.openChat"),s.jsx(fe,{size:12})]}):b?s.jsx("button",{type:"button",onClick:b,className:"focus-ring text-left text-foreground underline-offset-2 hover:underline",children:String(N)}):K?s.jsx(ne,{href:c?.(String(K)),className:"focus-ring text-foreground underline-offset-2 hover:underline",children:String(N)}):D==="Lane"&&typeof N=="string"?s.jsx(re,{lane:N}):D==="Priority"&&typeof N=="string"?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ce,{drill:`priority:${N.toLowerCase()}`}),N]}):Xe.has(D)?s.jsx(Y,{variant:"muted",children:String(N)}):Ye.has(D)?s.jsx("span",{title:String(N),className:"font-mono text-xs text-muted-foreground",children:String(N)}):s.jsx("span",{className:O("tnum",typeof N=="string"&&ae.test(N)&&"text-muted-foreground"),children:Le(N,t.units?.[D])})},D)})},`${t.title}-${g}`))})]})})})}e[8]=r,e[9]=n,e[10]=t.columns,e[11]=t.drills,e[12]=t.rows,e[13]=t.title,e[14]=t.units,e[15]=o,e[16]=l,e[17]=m,e[18]=c,e[19]=f,e[20]=u,e[21]=p,e[22]=j}else p=e[21],j=e[22];return j!==Symbol.for("react.early_return_sentinel")?j:p}function Ze(a){const{c:e}=a;return e}function qe(a){return typeof a=="number"}function Je(a){return a!==null}function et(a,e){return+(e.c==="Task")-+(a.c==="Task")}function tt(a,e){return{c:a,j:e}}function Ot(a){const e=w.c(17),{section:t,taskHref:d}=a,o=B();let c;e[0]!==t.columns?(c=i=>t.columns.indexOf(i),e[0]=t.columns,e[1]=c):c=e[1];const r=c;if(t.rows.length===0){let i;e[2]!==o?(i=o("taskBoard.analytics.nothingToShow"),e[2]=o,e[3]=i):i=e[3];let u;return e[4]!==i?(u=s.jsx(R,{children:i}),e[4]=i,e[5]=u):u=e[5],u}let l;if(e[6]!==r||e[7]!==t.rows||e[8]!==o||e[9]!==d){let i;e[11]!==r||e[12]!==o||e[13]!==d?(i=u=>{const f=String(u[r("Task ID")]??""),x=u[r("Lane")],m=u[r("Picked up")],h=Number(u[r("Actions by people")]??0),p=Number(u[r("Failed QA")]??0),j=[typeof m=="string"?te(m):null,h>0&&o(h===1?"taskBoard.analytics.humanActionsOne":"taskBoard.analytics.humanActions",{n:String(h)})].filter(Boolean),y=s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"truncate text-sm text-foreground",children:String(u[r("Task")]??"")}),s.jsx("span",{className:"text-meta truncate",children:j.join(" · ")})]}),p>0&&s.jsxs(Y,{variant:"muted",children:[s.jsx(be,{className:"text-destructive"}),p===1?o("taskBoard.analytics.failedQa"):o("taskBoard.analytics.failedQaTimes",{n:String(p)})]}),typeof x=="string"&&s.jsx(re,{lane:x})]});return s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:d?s.jsx(ne,{href:d(f),className:O(F,"flex items-center gap-3 rounded-md p-2"),children:y}):s.jsx("div",{className:"flex items-center gap-3 p-2",children:y})},f)},e[11]=r,e[12]=o,e[13]=d,e[14]=i):i=e[14],l=t.rows.map(i),e[6]=r,e[7]=t.rows,e[8]=o,e[9]=d,e[10]=l}else l=e[10];let n;return e[15]!==l?(n=s.jsx("ul",{className:"flex flex-col",children:l}),e[15]=l,e[16]=n):n=e[16],n}const st={Type:Ce,Priority:Se,Tag:Ne,Sprint:ke,"Brief by":we};function ce(a){const e=w.c(10),{drill:t}=a;let d;e[0]!==t?(d=(t??"").split("&")[0]?.split(":")??[],e[0]=t,e[1]=d):d=e[1];const[o,c]=d;let r,l,n;if(e[2]!==o||e[3]!==c){n=Symbol.for("react.early_return_sentinel");e:{const u=o==="type"?Object.entries($e).find(x=>{const[m]=x;return m===c})?.[1]:o==="priority"?Object.entries(De).find(x=>{const[m]=x;return m===c})?.[1]:void 0;if(!u){n=null;break e}r=u.icon,l=O("size-3.5 shrink-0",u.iconClassName)}e[2]=o,e[3]=c,e[4]=r,e[5]=l,e[6]=n}else r=e[4],l=e[5],n=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;let i;return e[7]!==r||e[8]!==l?(i=s.jsx(r,{className:l}),e[7]=r,e[8]=l,e[9]=i):i=e[9],i}function nt(a){const e=w.c(11),{value:t,metric:d,color:o}=a,c=t??0,r=`${d.unit==="%"?Math.min(100,c):0}%`;let l;e[0]!==o||e[1]!==r?(l=s.jsx("span",{className:"h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:r,backgroundColor:o}})}),e[0]=o,e[1]=r,e[2]=l):l=e[2];const n=t??null;let i;e[3]!==d.unit||e[4]!==n?(i=M(n,d.unit),e[3]=d.unit,e[4]=n,e[5]=i):i=e[5];let u;e[6]!==i?(u=s.jsx("span",{className:"tnum w-12 shrink-0 text-right text-sm text-foreground",children:i}),e[6]=i,e[7]=u):u=e[7];let f;return e[8]!==l||e[9]!==u?(f=s.jsxs("span",{className:"flex items-center gap-2",children:[l,u]}),e[8]=l,e[9]=u,e[10]=f):f=e[10],f}function lt(a){const e=w.c(16),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.dimensions[0]?.label??"");let l;e[0]!==c||e[1]!==t.dimensions?(l=t.dimensions.find(m=>m.label===c)??t.dimensions[0],e[0]=c,e[1]=t.dimensions,e[2]=l):l=e[2];const n=l,i=`minmax(0,1fr) 56px repeat(${t.metrics.length}, minmax(96px, 168px))`;let u;e[3]!==n?.label||e[4]!==t.dimensions?(u=t.dimensions.length>1&&s.jsx(ee,{value:n?.label??"",onValueChange:r,options:t.dimensions.map(rt)}),e[3]=n?.label,e[4]=t.dimensions,e[5]=u):u=e[5];let f;e[6]!==i||e[7]!==n||e[8]!==d||e[9]!==t.metrics||e[10]!==o?(f=!n||n.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"text-meta grid items-center gap-4 border-b border-border/50 pb-2",style:{gridTemplateColumns:i},children:[s.jsx("span",{children:n.label}),s.jsx("span",{className:"text-right",children:o("taskBoard.analytics.tasks")}),t.metrics.map(at)]}),n.rows.map(m=>{const h=L(d,m.drill,m.label),p=h?"button":"div";return s.jsxs(p,{type:h?"button":void 0,onClick:h,className:O("grid h-11 items-center gap-4 border-b border-border/50 last:border-b-0",h&&O(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2")),style:{gridTemplateColumns:i},children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-sm text-foreground",children:[s.jsx(ce,{drill:m.drill}),s.jsx("span",{className:"truncate",children:m.label})]}),s.jsx("span",{className:"tnum text-right text-sm text-muted-foreground",children:m.count.toLocaleString()}),t.metrics.map(j=>s.jsx(nt,{value:m.values[j.key],metric:j,color:j.better==="up"?"var(--success)":"var(--destructive)"},j.key))]},m.label)})]}),e[6]=i,e[7]=n,e[8]=d,e[9]=t.metrics,e[10]=o,e[11]=f):f=e[11];let x;return e[12]!==t.title||e[13]!==u||e[14]!==f?(x=s.jsx(_,{title:t.title,aside:u,children:f}),e[12]=t.title,e[13]=u,e[14]=f,e[15]=x):x=e[15],x}function at(a){return s.jsx("span",{className:"text-right",children:a.label},a.key)}function rt(a){const e=st[a.label];return{value:a.label,label:a.label,icon:e?s.jsx(e,{}):void 0}}const de=3;function it(a){const e=w.c(26),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.metrics[0]?.key??"");let l;e[0]!==c||e[1]!==t.metrics?(l=t.metrics.find(k=>k.key===c)??t.metrics[0],e[0]=c,e[1]=t.metrics,e[2]=l):l=e[2];const n=l;if(!n)return null;const i=n.better==="up"?"var(--success)":"var(--destructive)";let u;e[3]!==t.cols||e[4]!==t.rows?(u=t.rows.length===t.cols.length&&t.rows.every((k,$)=>t.cols[$]===k),e[3]=t.cols,e[4]=t.rows,e[5]=u):u=e[5];const f=u,x=`minmax(96px, 1fr) repeat(${t.cols.length}, minmax(72px, 1fr))`,m=t.title;let h;e[6]!==o?(h=o("taskBoard.analytics.matrixCaption",{n:String(de)}),e[6]=o,e[7]=h):h=e[7];let p;e[8]!==h?(p=s.jsx("span",{className:"text-meta",children:h}),e[8]=h,e[9]=p):p=e[9];let j;e[10]!==n.key||e[11]!==t.metrics?(j=t.metrics.length>1&&s.jsx(ee,{value:n.key,onValueChange:r,options:t.metrics.map(ct)}),e[10]=n.key,e[11]=t.metrics,e[12]=j):j=e[12];let y;e[13]!==x||e[14]!==n||e[15]!==d||e[16]!==t||e[17]!==f||e[18]!==o||e[19]!==i?(y=t.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("div",{className:"grid min-w-fit gap-1",style:{gridTemplateColumns:x},children:[s.jsxs("span",{className:"text-meta self-end pb-1",children:[t.rowLabel," / ",t.colLabel]}),t.cols.map(ot),t.rows.map((k,$)=>s.jsx(dt,{row:k,section:t,metric:n,tint:i,onDrill:d,upTo:f?$:void 0},k))]})}),e[13]=x,e[14]=n,e[15]=d,e[16]=t,e[17]=f,e[18]=o,e[19]=i,e[20]=y):y=e[20];let v;return e[21]!==t.title||e[22]!==p||e[23]!==j||e[24]!==y?(v=s.jsx(_,{title:m,caption:p,aside:j,children:y}),e[21]=t.title,e[22]=p,e[23]=j,e[24]=y,e[25]=v):v=e[25],v}function ot(a){return s.jsx("span",{className:"text-meta self-end pb-1 text-center",children:a},a)}function ct(a){return{value:a.key,label:a.label}}function dt(a){const e=w.c(22),{row:t,section:d,metric:o,tint:c,onDrill:r,upTo:l}=a,n=B();let i;e[0]!==t?(i=s.jsx("span",{className:"flex items-center truncate pr-2 text-sm text-foreground",children:t}),e[0]=t,e[1]=i):i=e[1];let u;if(e[2]!==o||e[3]!==r||e[4]!==t||e[5]!==d.cells||e[6]!==d.cols||e[7]!==n||e[8]!==c||e[9]!==l){let x;e[11]!==o||e[12]!==r||e[13]!==t||e[14]!==d.cells||e[15]!==n||e[16]!==c||e[17]!==l?(x=(m,h)=>{if(l!==void 0&&h>l)return s.jsx("span",{},m);const p=d.cells.find(k=>k.row===t&&k.col===m),j=p?.values[o.key]??null;if(!p)return s.jsx("span",{className:"flex h-14 items-center justify-center rounded-md bg-muted/40 text-sm text-muted-foreground",children:"—"},m);const y=j===null?0:Math.min(100,o.unit==="%"?j:0),v=L(r,p.drill,t===m?t:`${t} · ${m}`);return s.jsxs("button",{type:"button",onClick:v,disabled:!v,className:O("flex h-14 flex-col items-center justify-center rounded-md transition-opacity focus-ring",v&&"cursor-pointer hover:opacity-80",p.count<de&&"opacity-50"),style:{backgroundColor:`color-mix(in oklch, ${c} ${Math.round(8+y*.5)}%, var(--muted))`},children:[s.jsx("span",{className:"tnum text-sm font-medium text-foreground",children:M(j,o.unit)}),s.jsx("span",{className:"text-meta",children:p.count===1?n("taskBoard.analytics.drillCountOne"):n("taskBoard.analytics.drillCount",{n:String(p.count)})})]},m)},e[11]=o,e[12]=r,e[13]=t,e[14]=d.cells,e[15]=n,e[16]=c,e[17]=l,e[18]=x):x=e[18],u=d.cols.map(x),e[2]=o,e[3]=r,e[4]=t,e[5]=d.cells,e[6]=d.cols,e[7]=n,e[8]=c,e[9]=l,e[10]=u}else u=e[10];let f;return e[19]!==i||e[20]!==u?(f=s.jsxs(s.Fragment,{children:[i,u]}),e[19]=i,e[20]=u,e[21]=f):f=e[21],f}function ut(){const a=w.c(2),e=B();let t;return a[0]!==e?(t=d=>Object.hasOwn(Oe,d)?se(d,e).label:d,a[0]=e,a[1]=t):t=a[1],t}function ft(a){const e=w.c(21),{section:t,onDrill:d}=a,o=B(),c=ut(),r=t.unit??void 0,l=t.layout==="stacked";let n;if(e[0]!==c||e[1]!==d||e[2]!==t.baseline||e[3]!==t.categories||e[4]!==t.keys||e[5]!==t.title||e[6]!==l||e[7]!==o||e[8]!==r){let i;e[10]!==t.baseline?(i=g=>g!==t.baseline,e[10]=t.baseline,e[11]=i):i=e[11];const u=t.keys.filter(i),f=g=>g===t.baseline?"var(--border)":E[u.indexOf(g)%E.length]??"",x=Object.fromEntries(t.keys.map(g=>[g,{label:c(g),color:f(g)}]));let m;e[12]!==t.categories?(m=t.categories.map(xt),e[12]=t.categories,e[13]=m):m=e[13];const h=m;let p;e[14]!==d||e[15]!==t.categories?(p=g=>{const C=t.categories[g];C&&L(d,C.drill,C.label)?.()},e[14]=d,e[15]=t.categories,e[16]=p):p=e[16];const j=p,y=t.categories.some(mt)&&!!d,v=l?Math.max(120,t.categories.length*44+32):220;let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k={fill:"var(--muted)",opacity:.4},e[17]=k):k=e[17];let $;e[18]!==c||e[19]!==r?($=s.jsx(J,{cursor:k,content:g=>{const{active:C,payload:T}=g;return s.jsx(ie,{active:C,payload:T,unit:r,nameOf:c})}}),e[18]=c,e[19]=r,e[20]=$):$=e[20];const S=$;n=s.jsx(_,{title:t.title,aside:s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:t.keys.map(g=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:f(g)}}),c(g)]},g))}),children:h.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"w-full",style:{height:v},config:x,children:l?s.jsxs(U,{data:h,layout:"vertical",margin:{left:0,right:8,top:0},children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,horizontal:!1}),s.jsx(V,{type:"number",axisLine:!1,tickLine:!1,tick:A,tickFormatter:g=>X(g,r)}),s.jsx(P,{type:"category",dataKey:"label",axisLine:!1,tickLine:!1,tick:A,width:72}),S,t.keys.map((g,C)=>s.jsx(G,{dataKey:g,stackId:"all",fill:f(g),maxBarSize:22,radius:C===t.keys.length-1?[0,4,4,0]:0,animationDuration:300},g))]}):s.jsxs(U,{data:h,margin:{left:0,right:0,top:8},barGap:4,barCategoryGap:"28%",children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(V,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,tickMargin:8}),s.jsx(P,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,allowDecimals:r!==void 0,tickFormatter:g=>X(g,r),width:48}),S,t.keys.map(g=>s.jsx(G,{dataKey:g,fill:f(g),maxBarSize:32,radius:[4,4,0,0],animationDuration:300,className:O(y&&"cursor-pointer"),onClick:(C,T)=>j(T)},g))]})})}),e[0]=c,e[1]=d,e[2]=t.baseline,e[3]=t.categories,e[4]=t.keys,e[5]=t.title,e[6]=l,e[7]=o,e[8]=r,e[9]=n}else n=e[9];return n}function mt(a){return a.drill}function xt(a){return{label:a.label,...a.values}}function Tt(a){return a.kind==="funnel"||a.kind==="bars"?"half":"full"}function It(a){const e=w.c(27),{section:t,threadLinks:d,showOrg:o,taskHref:c,range:r,onDrill:l}=a;switch(t.kind){case"stat":{let n;return e[0]!==l||e[1]!==t?(n=s.jsx(Re,{section:t,onDrill:l}),e[0]=l,e[1]=t,e[2]=n):n=e[2],n}case"series":{let n;return e[3]!==r||e[4]!==t?(n=s.jsx(Fe,{section:t,range:r}),e[3]=r,e[4]=t,e[5]=n):n=e[5],n}case"funnel":{let n;return e[6]!==l||e[7]!==t?(n=s.jsx(Ue,{section:t,onDrill:l}),e[6]=l,e[7]=t,e[8]=n):n=e[8],n}case"bars":{let n;return e[9]!==l||e[10]!==t?(n=s.jsx(Ge,{section:t,onDrill:l}),e[9]=l,e[10]=t,e[11]=n):n=e[11],n}case"breakdown":{let n;return e[12]!==l||e[13]!==t?(n=s.jsx(lt,{section:t,onDrill:l}),e[12]=l,e[13]=t,e[14]=n):n=e[14],n}case"matrix":{let n;return e[15]!==l||e[16]!==t?(n=s.jsx(it,{section:t,onDrill:l}),e[15]=l,e[16]=t,e[17]=n):n=e[17],n}case"categories":{let n;return e[18]!==l||e[19]!==t?(n=s.jsx(ft,{section:t,onDrill:l}),e[18]=l,e[19]=t,e[20]=n):n=e[20],n}case"table":{let n;return e[21]!==l||e[22]!==t||e[23]!==o||e[24]!==c||e[25]!==d?(n=s.jsx(We,{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:l}),e[21]=l,e[22]=t,e[23]=o,e[24]=c,e[25]=d,e[26]=n):n=e[26],n}default:return t}}export{Ot as D,It as S,Tt as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as o,j as r}from"./index-BoB02eW2.js";import{O as e}from"./api-keys-CmpJo1Rr.js";import{R as m}from"./require-capability-hn1SreP5.js";import"./AlertCircle-BFUZ4yx0.js";import"./Copy01-TJP2zB12.js";import"./Key01-55Z6tHcr.js";import"./Plus-D-GSl2MA.js";import"./Trash01-BzUZQR5Y.js";import"./alert-dialog-BaBKldUA.js";import"./label-CsyEQPG4.js";import"./use-mcp-client-CEKqqblF.js";import"./auth-BeK8rRbB.js";import"./access-gate-BSx5LbNZ.js";import"./capability-load-error-xmV40q_-.js";function d(){const t=o.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(m,{capability:"api-keys:manage",area:"api-keys",children:r.jsx(e,{})}),t[0]=i):i=t[0],i}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as A,a2 as Q,J as R,K as Y,m as ce,o as U,e as V,j as i,f_ as de,b as F,r as O,en as me,eU as J,B as v,t as q,v as W,aM as X,s as Z,I as ee,w as te,q as se,D as ie}from"./index-CNnllo6G.js";import{i as ue}from"./AlertCircle-B7FQmH_M.js";import{a as fe}from"./Copy01-CRJ909cy.js";import{i as ne}from"./Key01-CZ56XYyu.js";import{s as le}from"./Plus-CyJJ3XFV.js";import{s as ge}from"./Trash01-CLvb-vxo.js";import{f as pe,e as ye,b as xe,A as he,a as je,d as Ke,c as Ce,g as De}from"./alert-dialog-Dhk9OY33.js";import{L as be}from"./label-C2MI3yAw.js";import{u as M}from"./use-mcp-client-cb8e4tvm.js";function H(t,e){if(t?.isError)throw new Error(t.content?.[0]?.text??e);if(!t.structuredContent)throw new Error(e);return t.structuredContent}function Ae(t){const e=A.c(11),{org:a}=Q();let r;e[0]!==a.id||e[1]!==a.slug?(r={connectionId:R,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=r):r=e[2];const l=M(r);let s;e[3]!==a.id?(s=Y.apiKeysList(a.id),e[3]=a.id,e[4]=s):s=e[4];let n;e[5]!==l?(n=async()=>{const d=await l.callTool({name:"API_KEY_LIST",arguments:{}});return H(d,"Failed to list API keys").items},e[5]=l,e[6]=n):n=e[6];const c=t?.enabled??!0;let o;return e[7]!==s||e[8]!==n||e[9]!==c?(o={queryKey:s,queryFn:n,staleTime:3e4,enabled:c},e[7]=s,e[8]=n,e[9]=c,e[10]=o):o=e[10],ce(o)}function Se(){const t=A.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=U();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_CREATE",arguments:{name:o.name,permissions:o.permissions??{"*":["*"]}}});return H(d,"Failed to create API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],V(c)}function ve(){const t=A.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=U();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_DELETE",arguments:{keyId:o}});return H(d,"Failed to delete API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],V(c)}function ae(t){const e=A.c(6),{error:a}=t,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(ue,{size:16}),e[0]=l):l=e[0];let s;e[1]!==a.message||e[2]!==r?(s=r("settings.apiKeys.failedToLoadError",{error:a.message}),e[1]=a.message,e[2]=r,e[3]=s):s=e[3];let n;return e[4]!==s?(n=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,i.jsx("span",{className:"text-sm font-medium",children:s})]}),e[4]=s,e[5]=n):n=e[5],n}function Ne(t){const e=A.c(20),{apiKey:a,onDelete:r}=t,l=F();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:i.jsx(ne,{size:16,className:"text-muted-foreground"})}),e[0]=s):s=e[0];let n;e[1]!==a.name?(n=i.jsx("span",{className:"font-medium text-sm truncate block",children:a.name}),e[1]=a.name,e[2]=n):n=e[2];let c;e[3]!==a.createdAt||e[4]!==l?(c=l("settings.apiKeys.createdAt",{date:new Date(a.createdAt).toLocaleDateString()}),e[3]=a.createdAt,e[4]=l,e[5]=c):c=e[5];let o;e[6]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:c}),e[6]=c,e[7]=o):o=e[7];let d;e[8]!==n||e[9]!==o?(d=i.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s,i.jsxs("div",{className:"min-w-0",children:[n,o]})]}),e[8]=n,e[9]=o,e[10]=d):d=e[10];let m;e[11]!==l?(m=l("settings.apiKeys.deleteKey"),e[11]=l,e[12]=m):m=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(ge,{size:14}),e[13]=f):f=e[13];let g;e[14]!==r||e[15]!==m?(g=i.jsx(v,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive shrink-0",onClick:r,"aria-label":m,children:f}),e[14]=r,e[15]=m,e[16]=g):g=e[16];let u;return e[17]!==d||e[18]!==g?(u=i.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[d,g]}),e[17]=d,e[18]=g,e[19]=u):u=e[19],u}function we(t){const e=A.c(21),{onCreate:a}=t,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:i.jsx(ne,{size:20,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let s;e[1]!==r?(s=r("settings.apiKeys.emptyTitle"),e[1]=r,e[2]=s):s=e[2];let n;e[3]!==s?(n=i.jsx("p",{className:"font-medium text-sm",children:s}),e[3]=s,e[4]=n):n=e[4];let c;e[5]!==r?(c=r("settings.apiKeys.emptyDescription"),e[5]=r,e[6]=c):c=e[6];let o;e[7]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:c}),e[7]=c,e[8]=o):o=e[8];let d;e[9]!==n||e[10]!==o?(d=i.jsxs("div",{children:[n,o]}),e[9]=n,e[10]=o,e[11]=d):d=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(le,{size:14}),e[12]=m):m=e[12];let f;e[13]!==r?(f=r("settings.apiKeys.newKey"),e[13]=r,e[14]=f):f=e[14];let g;e[15]!==a||e[16]!==f?(g=i.jsxs(v,{onClick:a,size:"sm",className:"mt-2",children:[m,f]}),e[15]=a,e[16]=f,e[17]=g):g=e[17];let u;return e[18]!==d||e[19]!==g?(u=i.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[l,d,g]}),e[18]=d,e[19]=g,e[20]=u):u=e[20],u}function _e(t){const e=A.c(40),{createdKey:a,onClose:r}=t,l=F(),s=a!==null;let n;e[0]!==r?(n=S=>!S&&r(),e[0]=r,e[1]=n):n=e[1];let c;e[2]!==l?(c=l("settings.apiKeys.createdTitle"),e[2]=l,e[3]=c):c=e[3];let o;e[4]!==c?(o=i.jsx(W,{children:c}),e[4]=c,e[5]=o):o=e[5];let d;e[6]!==l?(d=l("settings.apiKeys.createdDescription"),e[6]=l,e[7]=d):d=e[7];let m;e[8]!==d?(m=i.jsx(X,{children:d}),e[8]=d,e[9]=m):m=e[9];let f;e[10]!==o||e[11]!==m?(f=i.jsxs(Z,{children:[o,m]}),e[10]=o,e[11]=m,e[12]=f):f=e[12];const g=a?.key??"";let u;e[13]!==g?(u=i.jsx(ee,{readOnly:!0,value:g,className:"font-mono text-xs"}),e[13]=g,e[14]=u):u=e[14];let p;e[15]!==a||e[16]!==l?(p=()=>{a&&(navigator.clipboard?.writeText(a.key),q.success(l("settings.apiKeys.copied")))},e[15]=a,e[16]=l,e[17]=p):p=e[17];let y;e[18]!==l?(y=l("settings.apiKeys.copyKey"),e[18]=l,e[19]=y):y=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(fe,{size:14}),e[20]=C):C=e[20];let x;e[21]!==p||e[22]!==y?(x=i.jsx(v,{type:"button",variant:"outline",size:"icon",onClick:p,"aria-label":y,children:C}),e[21]=p,e[22]=y,e[23]=x):x=e[23];let h;e[24]!==x||e[25]!==u?(h=i.jsxs("div",{className:"flex items-center gap-2",children:[u,x]}),e[24]=x,e[25]=u,e[26]=h):h=e[26];let j;e[27]!==l?(j=l("settings.apiKeys.done"),e[27]=l,e[28]=j):j=e[28];let K;e[29]!==r||e[30]!==j?(K=i.jsx(te,{children:i.jsx(v,{onClick:r,children:j})}),e[29]=r,e[30]=j,e[31]=K):K=e[31];let D;e[32]!==h||e[33]!==K||e[34]!==f?(D=i.jsxs(se,{className:"sm:max-w-lg",children:[f,h,K]}),e[32]=h,e[33]=K,e[34]=f,e[35]=D):D=e[35];let b;return e[36]!==s||e[37]!==D||e[38]!==n?(b=i.jsx(ie,{open:s,onOpenChange:n,children:D}),e[36]=s,e[37]=D,e[38]=n,e[39]=b):b=e[39],b}function Pe(t){const e=A.c(64),{open:a,onOpenChange:r,onCreated:l}=t,s=F(),[n,c]=O.useState(""),o=Se();let d;e[0]!==r?(d=function(){c(""),r(!1)},e[0]=r,e[1]=d):d=e[1];const m=d;let f;e[2]!==o||e[3]!==m||e[4]!==n||e[5]!==l||e[6]!==s?(f=async function(oe){if(oe.preventDefault(),!!n.trim())try{const B=await o.mutateAsync({name:n.trim()});m(),l(B)}catch(B){const G=B;q.error(G instanceof Error?G.message:s("settings.apiKeys.failedToCreateKey"))}},e[2]=o,e[3]=m,e[4]=n,e[5]=l,e[6]=s,e[7]=f):f=e[7];const g=f;let u;e[8]!==m||e[9]!==r?(u=z=>{z?r(z):m()},e[8]=m,e[9]=r,e[10]=u):u=e[10];let p;e[11]!==s?(p=s("settings.apiKeys.newKeyTitle"),e[11]=s,e[12]=p):p=e[12];let y;e[13]!==p?(y=i.jsx(W,{children:p}),e[13]=p,e[14]=y):y=e[14];let C;e[15]!==s?(C=s("settings.apiKeys.newKeyDescription"),e[15]=s,e[16]=C):C=e[16];let x;e[17]!==C?(x=i.jsx(X,{children:C}),e[17]=C,e[18]=x):x=e[18];let h;e[19]!==y||e[20]!==x?(h=i.jsxs(Z,{children:[y,x]}),e[19]=y,e[20]=x,e[21]=h):h=e[21];let j;e[22]!==s?(j=s("settings.apiKeys.nameLabel"),e[22]=s,e[23]=j):j=e[23];let K;e[24]!==j?(K=i.jsx(be,{htmlFor:"api-key-name",children:j}),e[24]=j,e[25]=K):K=e[25];let D;e[26]===Symbol.for("react.memo_cache_sentinel")?(D=z=>c(z.target.value),e[26]=D):D=e[26];let b;e[27]!==s?(b=s("settings.apiKeys.namePlaceholder"),e[27]=s,e[28]=b):b=e[28];let S;e[29]!==n||e[30]!==b?(S=i.jsx(ee,{id:"api-key-name",value:n,onChange:D,placeholder:b,autoComplete:"off",required:!0}),e[29]=n,e[30]=b,e[31]=S):S=e[31];let N;e[32]!==K||e[33]!==S?(N=i.jsxs("div",{className:"space-y-1.5",children:[K,S]}),e[32]=K,e[33]=S,e[34]=N):N=e[34];const re=o.isPending;let w;e[35]!==s?(w=s("settings.apiKeys.cancelButton"),e[35]=s,e[36]=w):w=e[36];let _;e[37]!==o.isPending||e[38]!==m||e[39]!==w?(_=i.jsx(v,{type:"button",variant:"outline",onClick:m,disabled:re,children:w}),e[37]=o.isPending,e[38]=m,e[39]=w,e[40]=_):_=e[40];let P;e[41]!==o.isPending||e[42]!==n?(P=o.isPending||!n.trim(),e[41]=o.isPending,e[42]=n,e[43]=P):P=e[43];let E;e[44]!==o.isPending||e[45]!==s?(E=o.isPending?s("settings.apiKeys.creatingButton"):s("settings.apiKeys.createButton"),e[44]=o.isPending,e[45]=s,e[46]=E):E=e[46];let T;e[47]!==P||e[48]!==E?(T=i.jsx(v,{type:"submit",disabled:P,children:E}),e[47]=P,e[48]=E,e[49]=T):T=e[49];let k;e[50]!==_||e[51]!==T?(k=i.jsxs(te,{children:[_,T]}),e[50]=_,e[51]=T,e[52]=k):k=e[52];let I;e[53]!==g||e[54]!==N||e[55]!==k?(I=i.jsxs("form",{onSubmit:g,className:"space-y-4",children:[N,k]}),e[53]=g,e[54]=N,e[55]=k,e[56]=I):I=e[56];let L;e[57]!==I||e[58]!==h?(L=i.jsxs(se,{className:"sm:max-w-lg",children:[h,I]}),e[57]=I,e[58]=h,e[59]=L):L=e[59];let $;return e[60]!==a||e[61]!==L||e[62]!==u?($=i.jsx(ie,{open:a,onOpenChange:u,children:L}),e[60]=a,e[61]=L,e[62]=u,e[63]=$):$=e[63],$}function Ee(){const t=F(),{data:e,isLoading:a,error:r}=Ae(),l=ve(),[s,n]=O.useState(!1),[c,o]=O.useState(null),[d,m]=O.useState(null),f=e??[];async function g(){if(d)try{await l.mutateAsync(d.id),q.success(t("settings.apiKeys.keyDeleted",{name:d.name}))}catch(u){q.error(u instanceof Error?u.message:t("settings.apiKeys.failedToDeleteKey"))}finally{m(null)}}return i.jsxs(me,{headerClassName:"px-0",title:t("settings.apiKeys.sectionTitle"),description:t("settings.apiKeys.sectionDescription"),actions:f.length>0?i.jsxs(v,{onClick:()=>n(!0),size:"sm",children:[i.jsx(le,{size:14}),t("settings.apiKeys.newKey")]}):void 0,children:[a?i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:t("settings.apiKeys.loading")})}):r&&f.length===0?i.jsx(ae,{error:r}):f.length===0?i.jsx(we,{onCreate:()=>n(!0)}):i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("ul",{className:"divide-y divide-border",children:f.map(u=>i.jsx(Ne,{apiKey:u,onDelete:()=>m(u)},u.id))})}),i.jsx(Pe,{open:s,onOpenChange:n,onCreated:o}),i.jsx(_e,{createdKey:c,onClose:()=>o(null)}),i.jsx(pe,{open:d!==null,onOpenChange:u=>{u||m(null)},children:i.jsxs(ye,{children:[i.jsxs(xe,{children:[i.jsx(he,{children:t("settings.apiKeys.deleteTitle",{name:d?.name??""})}),i.jsx(je,{children:t("settings.apiKeys.deleteDescription")})]}),i.jsxs(Ke,{children:[i.jsx(Ce,{children:t("settings.apiKeys.cancelButton")}),i.jsx(De,{onClick:g,children:t("settings.apiKeys.deleteKey")})]})]})})]})}function Qe(){const t=A.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(de,{group:"connect",errorFallback:Te,children:i.jsx(Ee,{})}),t[0]=e):e=t[0],e}function Te(t){const{error:e}=t;return i.jsx(ae,{error:e??new Error("Failed to load API keys")})}export{Ee as A,Qe as O,Ae as a,Se as u};
|
|
1
|
+
import{c as A,a2 as Q,J as R,K as Y,m as ce,o as U,e as V,j as i,f_ as de,b as F,r as O,en as me,eU as J,B as v,t as q,v as W,aM as X,s as Z,I as ee,w as te,q as se,D as ie}from"./index-BoB02eW2.js";import{i as ue}from"./AlertCircle-BFUZ4yx0.js";import{a as fe}from"./Copy01-TJP2zB12.js";import{i as ne}from"./Key01-55Z6tHcr.js";import{s as le}from"./Plus-D-GSl2MA.js";import{s as ge}from"./Trash01-BzUZQR5Y.js";import{f as pe,e as ye,b as xe,A as he,a as je,d as Ke,c as Ce,g as De}from"./alert-dialog-BaBKldUA.js";import{L as be}from"./label-CsyEQPG4.js";import{u as M}from"./use-mcp-client-CEKqqblF.js";function H(t,e){if(t?.isError)throw new Error(t.content?.[0]?.text??e);if(!t.structuredContent)throw new Error(e);return t.structuredContent}function Ae(t){const e=A.c(11),{org:a}=Q();let r;e[0]!==a.id||e[1]!==a.slug?(r={connectionId:R,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=r):r=e[2];const l=M(r);let s;e[3]!==a.id?(s=Y.apiKeysList(a.id),e[3]=a.id,e[4]=s):s=e[4];let n;e[5]!==l?(n=async()=>{const d=await l.callTool({name:"API_KEY_LIST",arguments:{}});return H(d,"Failed to list API keys").items},e[5]=l,e[6]=n):n=e[6];const c=t?.enabled??!0;let o;return e[7]!==s||e[8]!==n||e[9]!==c?(o={queryKey:s,queryFn:n,staleTime:3e4,enabled:c},e[7]=s,e[8]=n,e[9]=c,e[10]=o):o=e[10],ce(o)}function Se(){const t=A.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=U();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_CREATE",arguments:{name:o.name,permissions:o.permissions??{"*":["*"]}}});return H(d,"Failed to create API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],V(c)}function ve(){const t=A.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=U();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_DELETE",arguments:{keyId:o}});return H(d,"Failed to delete API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],V(c)}function ae(t){const e=A.c(6),{error:a}=t,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(ue,{size:16}),e[0]=l):l=e[0];let s;e[1]!==a.message||e[2]!==r?(s=r("settings.apiKeys.failedToLoadError",{error:a.message}),e[1]=a.message,e[2]=r,e[3]=s):s=e[3];let n;return e[4]!==s?(n=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,i.jsx("span",{className:"text-sm font-medium",children:s})]}),e[4]=s,e[5]=n):n=e[5],n}function Ne(t){const e=A.c(20),{apiKey:a,onDelete:r}=t,l=F();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:i.jsx(ne,{size:16,className:"text-muted-foreground"})}),e[0]=s):s=e[0];let n;e[1]!==a.name?(n=i.jsx("span",{className:"font-medium text-sm truncate block",children:a.name}),e[1]=a.name,e[2]=n):n=e[2];let c;e[3]!==a.createdAt||e[4]!==l?(c=l("settings.apiKeys.createdAt",{date:new Date(a.createdAt).toLocaleDateString()}),e[3]=a.createdAt,e[4]=l,e[5]=c):c=e[5];let o;e[6]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:c}),e[6]=c,e[7]=o):o=e[7];let d;e[8]!==n||e[9]!==o?(d=i.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s,i.jsxs("div",{className:"min-w-0",children:[n,o]})]}),e[8]=n,e[9]=o,e[10]=d):d=e[10];let m;e[11]!==l?(m=l("settings.apiKeys.deleteKey"),e[11]=l,e[12]=m):m=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(ge,{size:14}),e[13]=f):f=e[13];let g;e[14]!==r||e[15]!==m?(g=i.jsx(v,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive shrink-0",onClick:r,"aria-label":m,children:f}),e[14]=r,e[15]=m,e[16]=g):g=e[16];let u;return e[17]!==d||e[18]!==g?(u=i.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[d,g]}),e[17]=d,e[18]=g,e[19]=u):u=e[19],u}function we(t){const e=A.c(21),{onCreate:a}=t,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:i.jsx(ne,{size:20,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let s;e[1]!==r?(s=r("settings.apiKeys.emptyTitle"),e[1]=r,e[2]=s):s=e[2];let n;e[3]!==s?(n=i.jsx("p",{className:"font-medium text-sm",children:s}),e[3]=s,e[4]=n):n=e[4];let c;e[5]!==r?(c=r("settings.apiKeys.emptyDescription"),e[5]=r,e[6]=c):c=e[6];let o;e[7]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:c}),e[7]=c,e[8]=o):o=e[8];let d;e[9]!==n||e[10]!==o?(d=i.jsxs("div",{children:[n,o]}),e[9]=n,e[10]=o,e[11]=d):d=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(le,{size:14}),e[12]=m):m=e[12];let f;e[13]!==r?(f=r("settings.apiKeys.newKey"),e[13]=r,e[14]=f):f=e[14];let g;e[15]!==a||e[16]!==f?(g=i.jsxs(v,{onClick:a,size:"sm",className:"mt-2",children:[m,f]}),e[15]=a,e[16]=f,e[17]=g):g=e[17];let u;return e[18]!==d||e[19]!==g?(u=i.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[l,d,g]}),e[18]=d,e[19]=g,e[20]=u):u=e[20],u}function _e(t){const e=A.c(40),{createdKey:a,onClose:r}=t,l=F(),s=a!==null;let n;e[0]!==r?(n=S=>!S&&r(),e[0]=r,e[1]=n):n=e[1];let c;e[2]!==l?(c=l("settings.apiKeys.createdTitle"),e[2]=l,e[3]=c):c=e[3];let o;e[4]!==c?(o=i.jsx(W,{children:c}),e[4]=c,e[5]=o):o=e[5];let d;e[6]!==l?(d=l("settings.apiKeys.createdDescription"),e[6]=l,e[7]=d):d=e[7];let m;e[8]!==d?(m=i.jsx(X,{children:d}),e[8]=d,e[9]=m):m=e[9];let f;e[10]!==o||e[11]!==m?(f=i.jsxs(Z,{children:[o,m]}),e[10]=o,e[11]=m,e[12]=f):f=e[12];const g=a?.key??"";let u;e[13]!==g?(u=i.jsx(ee,{readOnly:!0,value:g,className:"font-mono text-xs"}),e[13]=g,e[14]=u):u=e[14];let p;e[15]!==a||e[16]!==l?(p=()=>{a&&(navigator.clipboard?.writeText(a.key),q.success(l("settings.apiKeys.copied")))},e[15]=a,e[16]=l,e[17]=p):p=e[17];let y;e[18]!==l?(y=l("settings.apiKeys.copyKey"),e[18]=l,e[19]=y):y=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(fe,{size:14}),e[20]=C):C=e[20];let x;e[21]!==p||e[22]!==y?(x=i.jsx(v,{type:"button",variant:"outline",size:"icon",onClick:p,"aria-label":y,children:C}),e[21]=p,e[22]=y,e[23]=x):x=e[23];let h;e[24]!==x||e[25]!==u?(h=i.jsxs("div",{className:"flex items-center gap-2",children:[u,x]}),e[24]=x,e[25]=u,e[26]=h):h=e[26];let j;e[27]!==l?(j=l("settings.apiKeys.done"),e[27]=l,e[28]=j):j=e[28];let K;e[29]!==r||e[30]!==j?(K=i.jsx(te,{children:i.jsx(v,{onClick:r,children:j})}),e[29]=r,e[30]=j,e[31]=K):K=e[31];let D;e[32]!==h||e[33]!==K||e[34]!==f?(D=i.jsxs(se,{className:"sm:max-w-lg",children:[f,h,K]}),e[32]=h,e[33]=K,e[34]=f,e[35]=D):D=e[35];let b;return e[36]!==s||e[37]!==D||e[38]!==n?(b=i.jsx(ie,{open:s,onOpenChange:n,children:D}),e[36]=s,e[37]=D,e[38]=n,e[39]=b):b=e[39],b}function Pe(t){const e=A.c(64),{open:a,onOpenChange:r,onCreated:l}=t,s=F(),[n,c]=O.useState(""),o=Se();let d;e[0]!==r?(d=function(){c(""),r(!1)},e[0]=r,e[1]=d):d=e[1];const m=d;let f;e[2]!==o||e[3]!==m||e[4]!==n||e[5]!==l||e[6]!==s?(f=async function(oe){if(oe.preventDefault(),!!n.trim())try{const B=await o.mutateAsync({name:n.trim()});m(),l(B)}catch(B){const G=B;q.error(G instanceof Error?G.message:s("settings.apiKeys.failedToCreateKey"))}},e[2]=o,e[3]=m,e[4]=n,e[5]=l,e[6]=s,e[7]=f):f=e[7];const g=f;let u;e[8]!==m||e[9]!==r?(u=z=>{z?r(z):m()},e[8]=m,e[9]=r,e[10]=u):u=e[10];let p;e[11]!==s?(p=s("settings.apiKeys.newKeyTitle"),e[11]=s,e[12]=p):p=e[12];let y;e[13]!==p?(y=i.jsx(W,{children:p}),e[13]=p,e[14]=y):y=e[14];let C;e[15]!==s?(C=s("settings.apiKeys.newKeyDescription"),e[15]=s,e[16]=C):C=e[16];let x;e[17]!==C?(x=i.jsx(X,{children:C}),e[17]=C,e[18]=x):x=e[18];let h;e[19]!==y||e[20]!==x?(h=i.jsxs(Z,{children:[y,x]}),e[19]=y,e[20]=x,e[21]=h):h=e[21];let j;e[22]!==s?(j=s("settings.apiKeys.nameLabel"),e[22]=s,e[23]=j):j=e[23];let K;e[24]!==j?(K=i.jsx(be,{htmlFor:"api-key-name",children:j}),e[24]=j,e[25]=K):K=e[25];let D;e[26]===Symbol.for("react.memo_cache_sentinel")?(D=z=>c(z.target.value),e[26]=D):D=e[26];let b;e[27]!==s?(b=s("settings.apiKeys.namePlaceholder"),e[27]=s,e[28]=b):b=e[28];let S;e[29]!==n||e[30]!==b?(S=i.jsx(ee,{id:"api-key-name",value:n,onChange:D,placeholder:b,autoComplete:"off",required:!0}),e[29]=n,e[30]=b,e[31]=S):S=e[31];let N;e[32]!==K||e[33]!==S?(N=i.jsxs("div",{className:"space-y-1.5",children:[K,S]}),e[32]=K,e[33]=S,e[34]=N):N=e[34];const re=o.isPending;let w;e[35]!==s?(w=s("settings.apiKeys.cancelButton"),e[35]=s,e[36]=w):w=e[36];let _;e[37]!==o.isPending||e[38]!==m||e[39]!==w?(_=i.jsx(v,{type:"button",variant:"outline",onClick:m,disabled:re,children:w}),e[37]=o.isPending,e[38]=m,e[39]=w,e[40]=_):_=e[40];let P;e[41]!==o.isPending||e[42]!==n?(P=o.isPending||!n.trim(),e[41]=o.isPending,e[42]=n,e[43]=P):P=e[43];let E;e[44]!==o.isPending||e[45]!==s?(E=o.isPending?s("settings.apiKeys.creatingButton"):s("settings.apiKeys.createButton"),e[44]=o.isPending,e[45]=s,e[46]=E):E=e[46];let T;e[47]!==P||e[48]!==E?(T=i.jsx(v,{type:"submit",disabled:P,children:E}),e[47]=P,e[48]=E,e[49]=T):T=e[49];let k;e[50]!==_||e[51]!==T?(k=i.jsxs(te,{children:[_,T]}),e[50]=_,e[51]=T,e[52]=k):k=e[52];let I;e[53]!==g||e[54]!==N||e[55]!==k?(I=i.jsxs("form",{onSubmit:g,className:"space-y-4",children:[N,k]}),e[53]=g,e[54]=N,e[55]=k,e[56]=I):I=e[56];let L;e[57]!==I||e[58]!==h?(L=i.jsxs(se,{className:"sm:max-w-lg",children:[h,I]}),e[57]=I,e[58]=h,e[59]=L):L=e[59];let $;return e[60]!==a||e[61]!==L||e[62]!==u?($=i.jsx(ie,{open:a,onOpenChange:u,children:L}),e[60]=a,e[61]=L,e[62]=u,e[63]=$):$=e[63],$}function Ee(){const t=F(),{data:e,isLoading:a,error:r}=Ae(),l=ve(),[s,n]=O.useState(!1),[c,o]=O.useState(null),[d,m]=O.useState(null),f=e??[];async function g(){if(d)try{await l.mutateAsync(d.id),q.success(t("settings.apiKeys.keyDeleted",{name:d.name}))}catch(u){q.error(u instanceof Error?u.message:t("settings.apiKeys.failedToDeleteKey"))}finally{m(null)}}return i.jsxs(me,{headerClassName:"px-0",title:t("settings.apiKeys.sectionTitle"),description:t("settings.apiKeys.sectionDescription"),actions:f.length>0?i.jsxs(v,{onClick:()=>n(!0),size:"sm",children:[i.jsx(le,{size:14}),t("settings.apiKeys.newKey")]}):void 0,children:[a?i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:t("settings.apiKeys.loading")})}):r&&f.length===0?i.jsx(ae,{error:r}):f.length===0?i.jsx(we,{onCreate:()=>n(!0)}):i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("ul",{className:"divide-y divide-border",children:f.map(u=>i.jsx(Ne,{apiKey:u,onDelete:()=>m(u)},u.id))})}),i.jsx(Pe,{open:s,onOpenChange:n,onCreated:o}),i.jsx(_e,{createdKey:c,onClose:()=>o(null)}),i.jsx(pe,{open:d!==null,onOpenChange:u=>{u||m(null)},children:i.jsxs(ye,{children:[i.jsxs(xe,{children:[i.jsx(he,{children:t("settings.apiKeys.deleteTitle",{name:d?.name??""})}),i.jsx(je,{children:t("settings.apiKeys.deleteDescription")})]}),i.jsxs(Ke,{children:[i.jsx(Ce,{children:t("settings.apiKeys.cancelButton")}),i.jsx(De,{onClick:g,children:t("settings.apiKeys.deleteKey")})]})]})})]})}function Qe(){const t=A.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(de,{group:"connect",errorFallback:Te,children:i.jsx(Ee,{})}),t[0]=e):e=t[0],e}function Te(t){const{error:e}=t;return i.jsx(ae,{error:e??new Error("Failed to load API keys")})}export{Ee as A,Qe as O,Ae as a,Se as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as At,b as Nt,r as A,j as o,au as Kt,l as Rt,h as Tt,t as xt}from"./index-CNnllo6G.js";import{u as Ct}from"./chat-context-Bm126Y9d.js";import{S as Ft}from"./scroll-area-DRWJ_F1a.js";import{u as Pt,A as Ot}from"./use-section-preview-base-BNxt4jxu.js";import{B as Ut}from"./secret-ciphertext-DXqrbEWb.js";import{j as $t,u as It,A as zt,J as Lt,D as Vt,a as qt,K as Dt}from"./blocks-tab-states-BBN5TI4p.js";import{n as Mt,r as Zt}from"./content-tab-BbeLE04u.js";import"./use-panel-navigate-BLgl8f3Y.js";import"./thread-route-Dj3FHeZv.js";import"./use-project-scope-DCmZMFkQ.js";import"./repository-binding-DqlrnpeD.js";import"./use-mcp-client-cb8e4tvm.js";import"./auth-D-N_o1pb.js";import"./autosend-BZJ2TdB9.js";import"./thread-intent-B3UX1VYD.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BqvFDRe4.js";import"./task-board-et69go2s.js";import"./schema-j2854AG6.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-qheXoFrz.js";import"./use-ai-providers-IcsUWN-K.js";import"./use-chat-navigation-D_OZ7XLd.js";import"./location-BjlyegC2.js";import"./use-organization-settings-CtcFsKQW.js";import"./index-BdQq_4o_.js";import"./UserSquare-ii6T7SpT.js";import"./agent-icon-B7cHtLmN.js";import"./AlertCircle-B7FQmH_M.js";import"./Tool01-D_pOnyrM.js";import"./ArrowUp-DJaSaDSt.js";import"./ArrowLeft-DZes_rvl.js";import"./LinkBroken01-C8q-hkDW.js";import"./ShoppingBag01-Cr7oTzOr.js";import"./ZoomOut-FPIBUWhA.js";import"./Building02-C692k1Je.js";import"./CheckCircle-DTvtIc91.js";import"./ChevronUp-D6SZVzK-.js";import"./ChevronSelectorVertical-CSoDnwYU.js";import"./Copy01-CRJ909cy.js";import"./CreditCard01-DKW3gWt7.js";import"./DotsVertical-DPFiEMJ2.js";import"./Image01-CoKdj_km.js";import"./Globe04-CCnzVN5c.js";import"./SwitchHorizontal01-Bv6v-_-V.js";import"./Key01-CZ56XYyu.js";import"./Link01-QYs7ouJl.js";import"./Monitor01-DO9PZtsn.js";import"./Sun-DM7-cZiQ.js";import"./Play-B8h_fG9j.js";import"./Plus-CyJJ3XFV.js";import"./SearchMd-Yk_yG6_-.js";import"./Trash01-CLvb-vxo.js";import"./Upload01-DotbRoth.js";import"./User01-DpzyFtdl.js";import"./Users01-BEOgMF3y.js";import"./XClose-UJ2K7TVC.js";import"./section-preview-url-7zfngvgW.js";import"./input-DnkGG1pQ.js";import"./usage-stats-D62oidTL.js";import"./tool-namespace-CSvvZ9-r.js";import"./form-B2R0FZpl.js";import"./label-C2MI3yAw.js";import"./utils-CVEq3hMx.js";import"./markdown-BzeS6Mup.js";import"./use-copy-BlMydeoV.js";import"./use-mobile-BNQyDf1J.js";import"./tooltip-D39pwdkl.js";import"./index-JfKaG8r5.js";import"./format-time-CAj8AQXM.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-BLmb1aFH.js";import"./file-type-icon-CmCTgogr.js";import"./shell-layout-ohVxtYQn.js";import"./avatar-nIzU_VyX.js";import"./use-clock-tick-BEO-m3vD.js";import"./command-DSORHlWH.js";import"./index-C5kiFY0N.js";import"./integration-icon-Dl2m6ce3.js";import"./project-icon-CxJtU18v.js";import"./new-project-dialog-HwZsHJw7.js";import"./repository-import-picker-BQKO3YmL.js";import"./use-navigate-to-agent-D-kAnKoC.js";import"./repository-picker-1U5-cKDz.js";import"./useInfiniteQuery-CfgvSeG1.js";import"./infiniteQueryObserver-CqK1S2-W.js";import"./collection-search-BJh6F6XQ.js";import"./use-debounced-value-B_S8lb_4.js";import"./required-auth-layout-D-YJoBk-.js";import"./use-org-sso-s2tGLzu6.js";import"./chat-draft-DpsQeTSh.js";import"./select-Jex63p6s.js";import"./tabs-BUOCNWab.js";import"./use-deco-credits-nfiVDn98.js";import"./toggle-group-CElgKi93.js";import"./use-open-billing-url-CdvtCyZf.js";import"./index-BQe9t0ZU.js";import"./checkbox-BHYLtolO.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-Ba56Iai5.js";import"./drawer-BaMAsObr.js";import"./input-Bue-yNpK.js";import"./suggestion-DmWAjig0.js";import"./use-project-native-view-presence-uvlxs5r_.js";import"./use-file-configs-wZCwveLR.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-BfEVPVEx.js";import"./use-org-fs-C9g2s6eE.js";import"./question-004-sINsf4GQ.js";import"./use-members-D7SiQmGu.js";import"./use-org-auth-client-D3FbjOmE.js";import"./feature-paywall-yY-LJqXW.js";import"./plan-ladder-Ct3CUY0O.js";import"./add-connection-dialog-DVH8e9NI.js";import"./extract-connection-data-CmhWlbRd.js";import"./metadata-D72DunRR.js";import"./connection-VFOGX82d.js";import"./url-slug-Ui3mV6vi.js";import"./connection-card-CugVHwbe.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-BP2sfmUn.js";import"./use-connection-BxJdPGkr.js";import"./schema-DvCj02YW.js";import"./connection-form-helpers-Ht3Y_JTI.js";import"./authenticate-and-persist-oauth-1LFr51s5.js";import"./mcp-oauth-CCgQhJ0H.js";import"./mcp-oauth-C9k0QipU.js";import"./collection-tabs-jNi4Jv0Y.js";import"./badge-BPqtGuPz.js";import"./use-infinite-scroll-yxXaBcmD.js";import"./useSuspenseInfiniteQuery-BFK9VyAb.js";import"./use-task-board-events-BLTRhUg4.js";import"./site-editor-toast-Cwor802o.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-D5Pt5WPE.js";import"./index-D2K6wJdd.js";import"./pair-84suUGZ3.js";import"./collapsible-Bnza8CXw.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BHQg4BC0.js";import"./types-sLIChj1_.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-BjDciyLt.js";import"./use-thread-outputs-D5eAX3jD.js";import"./sandbox-git-api-CRxdlhrN.js";import"./alert-8kyzY3mC.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./switch-BXwkRMsQ.js";import"./monaco-editor-Dqlv9Rx3.js";import"./editor-gEAdAF4z.js";import"./calendar-CliY99e4.js";import"./editor-classes-BkgvFYZG.js";import"./core.esm-oiTkWp_q.js";import"./sortable.esm--JfVXwY2.js";import"./view-mode-toggle-BksAfU6L.js";import"./combobox-CsaU06Jl.js";import"./alert-dialog-Dhk9OY33.js";import"./search-input-DqG4kyRF.js";import"./asset-utils-C2Mu9meV.js";import"./empty-state-Qh91SokD.js";import"./mustache-DewX4fdh.js";import"./sandbox-lifecycle-context-CMe6ziY_.js";import"./empty-state-pgELPzRJ.js";function Gt(c,t){const m=(c.title||c.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),s=/^[A-Za-z]/.test(m)&&m.length>0?m:"Section",r=Mt(t,s);return{blockKey:r,data:{__resolveType:c.resolveType,name:r}}}function Yr(c){const t=At.c(87),{orgSlug:m,virtualMcpId:s,branch:r,blockKey:a,block:x,meta:l,decofile:d,title:kt,excludeFields:G,schemaPending:ht,previewBaseUrl:bt,notice:H,saveGuard:J,persistDefaults:Q}=c,W=ht===void 0?!1:ht,X=bt===void 0?null:bt,Y=Ct()?.taskId??null,p=Nt();let K;t[0]!==r||t[1]!==X||t[2]!==s?(K={virtualMcpId:s,branch:r,sandboxUrl:X},t[0]=r,t[1]=X,t[2]=s,t[3]=K):K=t[3];const h=Pt(K),v=typeof x?.__resolveType=="string"?x.__resolveType:"";let R;t[4]!==G||t[5]!==l||t[6]!==v?(R=Zt(v,l,G),t[4]=G,t[5]=l,t[6]=v,t[7]=R):R=t[7];const b=R;let T;t[8]!==b?(T=!!b&&Object.keys(b.properties??{}).length>0,t[8]=b,t[9]=T):T=t[9];const tt=T,vt=kt??(x?Ut(a,x,l):a);let C;t[10]!==r||t[11]!==m||t[12]!==s?(C={orgSlug:m,virtualMcpId:s,branch:r},t[10]=r,t[11]=m,t[12]=s,t[13]=C):C=t[13];let F;t[14]!==J?(F={guard:J},t[14]=J,t[15]=F):F=t[15];const{save:et,flush:ot,isPending:rt}=$t(C,F);let P;t[16]!==r||t[17]!==m||t[18]!==s?(P={orgSlug:m,virtualMcpId:s,branch:r},t[16]=r,t[17]=m,t[18]=s,t[19]=P):P=t[19];const g=It(P);let O;t[20]!==g||t[21]!==p?(O=qt((e,i)=>g.mutate({blockKey:e,data:i},{onError:n=>xt.error(p("sectionsEditor.sectionsEditor.saveFailed",{error:n.message}))})),t[20]=g,t[21]=p,t[22]=O):O=t[22];const it=O,[jt,Bt]=A.useState(a),[st,gt]=A.useState(null),[mt,St]=A.useState(0);let U;t[23]===Symbol.for("react.memo_cache_sentinel")?(U=[],t[23]=U):U=t[23];const[S,yt]=A.useState(U),[pt,u]=A.useState(!1),$=A.useRef(null);jt!==a&&(Bt(a),gt(null),St(Jt),yt([]));let I;t[24]!==x?(I=x??{},t[24]=x,t[25]=I):I=t[25];const at=I;let y;t[26]!==st?(y=st??{},t[26]=st,t[27]=y):y=t[27];let z;t[28]!==at||t[29]!==y?(z={...at,...y},t[28]=at,t[29]=y,t[30]=z):z=t[30];const nt=z;let L;t[31]!==a||t[32]!==v||t[33]!==et?(L=e=>{const i=e;gt(i),et(a,{...i,__resolveType:v})},t[31]=a,t[32]=v,t[33]=et,t[34]=L):L=t[34];const lt=L;let V;t[35]===Symbol.for("react.memo_cache_sentinel")?(V=e=>{yt(e)},t[35]=V):V=t[35];const N=V;let q;t[36]!==d||t[37]!==ot||t[38]!==g||t[39]!==p?(q=async(e,i)=>{try{const{blockKey:n,data:f}=Gt(e,d);await g.mutateAsync({blockKey:n,data:f}),xt.success(p("sandbox.appEditor.createdSection",{name:n})),i({__resolveType:n}),ot()}catch(n){const f=n,Et=f instanceof Error?f.message:p("sandbox.appEditor.failedAddSection");throw xt.error(Et),f}},t[36]=d,t[37]=ot,t[38]=g,t[39]=p,t[40]=q):q=t[40];const k=q;let D;t[41]!==u?(D=e=>{$.current=e.append,u(!0)},t[41]=u,t[42]=D):D=t[42];const ct=D;let M;t[43]!==k||t[44]!==u?(M=async e=>{const i=$.current;if(i)try{await k(e,n=>{i(n),u(!1),$.current=null})}catch{}},t[43]=k,t[44]=u,t[45]=M):M=t[45];const dt=M,ut=S.length>0?[vt,...S]:[],_t="flex h-full flex-col",wt="flex h-12 shrink-0 items-center justify-between border-b px-6",ft=ut.length>0?o.jsx("nav",{"aria-label":p("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:ut.map((e,i)=>{const n=i===ut.length-1,f=zt(e);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[i>0&&o.jsx(Kt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{N(i===0?[]:Lt(S,i)),St(Ht)},title:f,className:Rt("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",n?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:f})]},`${f}-${i}`)})}):o.jsx("span",{className:"text-sm font-medium",children:vt});let j;t[46]!==rt?(j=o.jsx(Dt,{isPending:rt,isError:!1}),t[46]=rt,t[47]=j):j=t[47];let B;t[48]!==ft||t[49]!==j?(B=o.jsxs("div",{className:wt,children:[ft,j]}),t[48]=ft,t[49]=j,t[50]=B):B=t[50];let _;t[51]!==a||t[52]!==r||t[53]!==S||t[54]!==d||t[55]!==nt||t[56]!==mt||t[57]!==k||t[58]!==N||t[59]!==lt||t[60]!==ct||t[61]!==tt||t[62]!==l||t[63]!==m||t[64]!==Q||t[65]!==it||t[66]!==b||t[67]!==W||t[68]!==h||t[69]!==p||t[70]!==Y||t[71]!==s?(_=tt?o.jsx(Vt,{schema:b,value:nt,onChange:lt,persistDefaults:Q,basePath:"",breadcrumbPath:S,onBreadcrumbChange:N,decofile:d,meta:l,onSaveReferencedBlock:it,previewBaseUrl:h,onAddSectionItem:k,onRequestAddSection:ct,sandbox:{orgSlug:m,virtualMcpId:s,branch:r,threadId:Y}},`${a}:${mt}`):W?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(Tt,{className:"size-4"}),p("sandbox.appEditor.loadingSchema")]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:p("sandbox.appEditor.noEditableSchema")}),t[51]=a,t[52]=r,t[53]=S,t[54]=d,t[55]=nt,t[56]=mt,t[57]=k,t[58]=N,t[59]=lt,t[60]=ct,t[61]=tt,t[62]=l,t[63]=m,t[64]=Q,t[65]=it,t[66]=b,t[67]=W,t[68]=h,t[69]=p,t[70]=Y,t[71]=s,t[72]=_):_=t[72];let w;t[73]!==H||t[74]!==_?(w=o.jsx(Ft,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsxs("div",{className:"mx-auto max-w-xl",children:[H,_]})})}),t[73]=H,t[74]=_,t[75]=w):w=t[75];let E;t[76]!==pt||t[77]!==d||t[78]!==dt||t[79]!==l||t[80]!==h||t[81]!==u?(E=h&&o.jsx(Ot,{open:pt,onOpenChange:e=>{u(e),e||($.current=null)},meta:l,decofile:d,previewBaseUrl:h,onSelect:e=>{dt(e)}}),t[76]=pt,t[77]=d,t[78]=dt,t[79]=l,t[80]=h,t[81]=u,t[82]=E):E=t[82];let Z;return t[83]!==B||t[84]!==w||t[85]!==E?(Z=o.jsxs("div",{className:_t,children:[B,w,E]}),t[83]=B,t[84]=w,t[85]=E,t[86]=Z):Z=t[86],Z}function Ht(c){return c+1}function Jt(c){return c+1}export{Yr as AppEditor};
|
|
1
|
+
import{c as At,b as Nt,r as A,j as o,au as Kt,l as Rt,h as Tt,t as xt}from"./index-BoB02eW2.js";import{u as Ct}from"./chat-context-C4pDshj1.js";import{S as Ft}from"./scroll-area-D_ro8hTm.js";import{u as Pt,A as Ot}from"./use-section-preview-base-DJFgOhQZ.js";import{B as Ut}from"./secret-ciphertext-DkD2R7dc.js";import{j as $t,u as It,A as zt,J as Lt,D as Vt,a as qt,K as Dt}from"./blocks-tab-states-B7_Q2Byx.js";import{n as Mt,r as Zt}from"./content-tab-BIEsoSfa.js";import"./use-panel-navigate-62gIHptt.js";import"./thread-route-CRU_aqN9.js";import"./use-project-scope-Dk4Q60O6.js";import"./repository-binding-BYnKmLVI.js";import"./use-mcp-client-CEKqqblF.js";import"./auth-BeK8rRbB.js";import"./autosend-B-VPnrp2.js";import"./thread-intent-DikZOwd-.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BdkzrgTO.js";import"./task-board-DxxiAR5A.js";import"./schema-zU96PUAb.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-D42PqykU.js";import"./use-ai-providers-Becg3IYt.js";import"./use-chat-navigation-BJSvg7rH.js";import"./location-BjlyegC2.js";import"./use-organization-settings-DHSMN_14.js";import"./index-BdQq_4o_.js";import"./UserSquare-0R6kuy9W.js";import"./agent-icon-Bmu0Xuy8.js";import"./AlertCircle-BFUZ4yx0.js";import"./Tool01-CvAlZ6_R.js";import"./ArrowUp-U6_gobY2.js";import"./ArrowLeft-CK2OAC0l.js";import"./LinkBroken01-Vuoqu_ZW.js";import"./ShoppingBag01-dI1cRqeE.js";import"./ZoomOut-C1rwTYBB.js";import"./Building02-Ddm6hNyu.js";import"./CheckCircle-BWW06ZXQ.js";import"./ChevronUp-CTrNq9Nk.js";import"./ChevronSelectorVertical-DKcwgXpF.js";import"./Copy01-TJP2zB12.js";import"./CreditCard01-Bm6_xB5H.js";import"./DotsVertical-DKl8j3BE.js";import"./Image01-Cf_YxPro.js";import"./Globe04-ClrCqE7c.js";import"./SwitchHorizontal01-KDjTaTLX.js";import"./Key01-55Z6tHcr.js";import"./Link01-DNXOSsg9.js";import"./Monitor01-C-mB2rao.js";import"./Sun-BPl8u-yx.js";import"./Play-CUFyJJIt.js";import"./Plus-D-GSl2MA.js";import"./SearchMd-CkV8MM4H.js";import"./Trash01-BzUZQR5Y.js";import"./Upload01-CdgDB-zC.js";import"./User01-CinpYulR.js";import"./Users01-DFSTtPtZ.js";import"./XClose-CXxsMd9c.js";import"./section-preview-url-7zfngvgW.js";import"./input-Dx6Yl3YV.js";import"./usage-stats-DuvxTL2m.js";import"./tool-namespace-pIFYrei5.js";import"./form-Dz-wry37.js";import"./label-CsyEQPG4.js";import"./utils-CVEq3hMx.js";import"./markdown-TXCHEe-4.js";import"./use-copy-T3xwaExj.js";import"./use-mobile-CYsZ0F3X.js";import"./tooltip-Bs0EJaD7.js";import"./index-DSuQX-Dj.js";import"./format-time-CAj8AQXM.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-BbQESQAz.js";import"./file-type-icon-C2WSm6EM.js";import"./shell-layout-BhM3Q_22.js";import"./avatar-yCbsNNbw.js";import"./use-clock-tick-B1PaG9d4.js";import"./command-BSGZ-TwS.js";import"./index-BhuMySoe.js";import"./integration-icon-YHEiRLgT.js";import"./project-icon-CP0m7tWm.js";import"./new-project-dialog-DCPZVRuS.js";import"./repository-import-picker-De4qAOck.js";import"./use-navigate-to-agent-DNsHLJD8.js";import"./repository-picker-B7BUYgB7.js";import"./useInfiniteQuery-S3a_-GqY.js";import"./infiniteQueryObserver-BuOPvaCd.js";import"./collection-search-sopr7ssV.js";import"./use-debounced-value-d254MtLc.js";import"./required-auth-layout-Mqzz7XgH.js";import"./use-org-sso-BSkklN8h.js";import"./chat-draft-D5dlb_sl.js";import"./select-C4iThYr6.js";import"./tabs-BQUPeDjf.js";import"./use-deco-credits-BJdkVUlJ.js";import"./toggle-group-DbSldXZX.js";import"./use-open-billing-url-C1m0KS6b.js";import"./index-DuSo48nd.js";import"./checkbox-C2l5tKo2.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-CzNTcDJM.js";import"./drawer-BpEasqMM.js";import"./input-CC2XqVda.js";import"./suggestion-BPVDnpZj.js";import"./use-project-native-view-presence-D12oGF6A.js";import"./use-file-configs-D_kGDRPd.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-CwF-bqUg.js";import"./use-org-fs-Wo4_O8nn.js";import"./question-004-sINsf4GQ.js";import"./use-members-CFcpHrvE.js";import"./use-org-auth-client-9ZqTxhaU.js";import"./feature-paywall-HnwykYzM.js";import"./plan-ladder-DbkDT52b.js";import"./add-connection-dialog-CNB1XZS8.js";import"./extract-connection-data-CyaR6DQN.js";import"./metadata-D72DunRR.js";import"./connection-B0eFNfCu.js";import"./url-slug-CMCbwnaP.js";import"./connection-card-BzTYJa6s.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CxYAsAPe.js";import"./use-connection-CLmhN_H7.js";import"./schema-D-qEbXZ-.js";import"./connection-form-helpers-ChgreO5F.js";import"./authenticate-and-persist-oauth-DJwJCiC8.js";import"./mcp-oauth-BFqNJ-iQ.js";import"./mcp-oauth-CuU6LL15.js";import"./collection-tabs-DU5QTifc.js";import"./badge-Zdi_g359.js";import"./use-infinite-scroll-C47I-wuH.js";import"./useSuspenseInfiniteQuery-DiRI5XkI.js";import"./use-task-board-events-BrTJpTlj.js";import"./site-editor-toast-DPPGE5LH.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-DVs-Bhj-.js";import"./index-Cdsu1Nw_.js";import"./pair-C9IKm4JE.js";import"./collapsible-CDZFoOK-.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BAlCN3Lv.js";import"./types-IpdOmnYx.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-BXRHJIP3.js";import"./use-thread-outputs-BVEM1vsy.js";import"./sandbox-git-api-CRxdlhrN.js";import"./alert-CnRQ3m-7.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./switch-63WSXheM.js";import"./monaco-editor-DIn5LVAo.js";import"./editor-DQK8Gbky.js";import"./calendar-aMW3a7Qx.js";import"./editor-classes-wKHzvXkJ.js";import"./core.esm-CWXW2IWJ.js";import"./sortable.esm-CBSg5QWi.js";import"./view-mode-toggle-DKlegHXH.js";import"./combobox-C2hXpc1p.js";import"./alert-dialog-BaBKldUA.js";import"./search-input-qNQGHbDh.js";import"./asset-utils--N2gsOKr.js";import"./empty-state-GUv-DLNf.js";import"./mustache-C3mAjW3w.js";import"./sandbox-lifecycle-context-Dg7K5ioC.js";import"./empty-state-Ck0Y0zH4.js";function Gt(c,t){const m=(c.title||c.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),s=/^[A-Za-z]/.test(m)&&m.length>0?m:"Section",r=Mt(t,s);return{blockKey:r,data:{__resolveType:c.resolveType,name:r}}}function Yr(c){const t=At.c(87),{orgSlug:m,virtualMcpId:s,branch:r,blockKey:a,block:x,meta:l,decofile:d,title:kt,excludeFields:G,schemaPending:ht,previewBaseUrl:bt,notice:H,saveGuard:J,persistDefaults:Q}=c,W=ht===void 0?!1:ht,X=bt===void 0?null:bt,Y=Ct()?.taskId??null,p=Nt();let K;t[0]!==r||t[1]!==X||t[2]!==s?(K={virtualMcpId:s,branch:r,sandboxUrl:X},t[0]=r,t[1]=X,t[2]=s,t[3]=K):K=t[3];const h=Pt(K),v=typeof x?.__resolveType=="string"?x.__resolveType:"";let R;t[4]!==G||t[5]!==l||t[6]!==v?(R=Zt(v,l,G),t[4]=G,t[5]=l,t[6]=v,t[7]=R):R=t[7];const b=R;let T;t[8]!==b?(T=!!b&&Object.keys(b.properties??{}).length>0,t[8]=b,t[9]=T):T=t[9];const tt=T,vt=kt??(x?Ut(a,x,l):a);let C;t[10]!==r||t[11]!==m||t[12]!==s?(C={orgSlug:m,virtualMcpId:s,branch:r},t[10]=r,t[11]=m,t[12]=s,t[13]=C):C=t[13];let F;t[14]!==J?(F={guard:J},t[14]=J,t[15]=F):F=t[15];const{save:et,flush:ot,isPending:rt}=$t(C,F);let P;t[16]!==r||t[17]!==m||t[18]!==s?(P={orgSlug:m,virtualMcpId:s,branch:r},t[16]=r,t[17]=m,t[18]=s,t[19]=P):P=t[19];const g=It(P);let O;t[20]!==g||t[21]!==p?(O=qt((e,i)=>g.mutate({blockKey:e,data:i},{onError:n=>xt.error(p("sectionsEditor.sectionsEditor.saveFailed",{error:n.message}))})),t[20]=g,t[21]=p,t[22]=O):O=t[22];const it=O,[jt,Bt]=A.useState(a),[st,gt]=A.useState(null),[mt,St]=A.useState(0);let U;t[23]===Symbol.for("react.memo_cache_sentinel")?(U=[],t[23]=U):U=t[23];const[S,yt]=A.useState(U),[pt,u]=A.useState(!1),$=A.useRef(null);jt!==a&&(Bt(a),gt(null),St(Jt),yt([]));let I;t[24]!==x?(I=x??{},t[24]=x,t[25]=I):I=t[25];const at=I;let y;t[26]!==st?(y=st??{},t[26]=st,t[27]=y):y=t[27];let z;t[28]!==at||t[29]!==y?(z={...at,...y},t[28]=at,t[29]=y,t[30]=z):z=t[30];const nt=z;let L;t[31]!==a||t[32]!==v||t[33]!==et?(L=e=>{const i=e;gt(i),et(a,{...i,__resolveType:v})},t[31]=a,t[32]=v,t[33]=et,t[34]=L):L=t[34];const lt=L;let V;t[35]===Symbol.for("react.memo_cache_sentinel")?(V=e=>{yt(e)},t[35]=V):V=t[35];const N=V;let q;t[36]!==d||t[37]!==ot||t[38]!==g||t[39]!==p?(q=async(e,i)=>{try{const{blockKey:n,data:f}=Gt(e,d);await g.mutateAsync({blockKey:n,data:f}),xt.success(p("sandbox.appEditor.createdSection",{name:n})),i({__resolveType:n}),ot()}catch(n){const f=n,Et=f instanceof Error?f.message:p("sandbox.appEditor.failedAddSection");throw xt.error(Et),f}},t[36]=d,t[37]=ot,t[38]=g,t[39]=p,t[40]=q):q=t[40];const k=q;let D;t[41]!==u?(D=e=>{$.current=e.append,u(!0)},t[41]=u,t[42]=D):D=t[42];const ct=D;let M;t[43]!==k||t[44]!==u?(M=async e=>{const i=$.current;if(i)try{await k(e,n=>{i(n),u(!1),$.current=null})}catch{}},t[43]=k,t[44]=u,t[45]=M):M=t[45];const dt=M,ut=S.length>0?[vt,...S]:[],_t="flex h-full flex-col",wt="flex h-12 shrink-0 items-center justify-between border-b px-6",ft=ut.length>0?o.jsx("nav",{"aria-label":p("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:ut.map((e,i)=>{const n=i===ut.length-1,f=zt(e);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[i>0&&o.jsx(Kt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{N(i===0?[]:Lt(S,i)),St(Ht)},title:f,className:Rt("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",n?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:f})]},`${f}-${i}`)})}):o.jsx("span",{className:"text-sm font-medium",children:vt});let j;t[46]!==rt?(j=o.jsx(Dt,{isPending:rt,isError:!1}),t[46]=rt,t[47]=j):j=t[47];let B;t[48]!==ft||t[49]!==j?(B=o.jsxs("div",{className:wt,children:[ft,j]}),t[48]=ft,t[49]=j,t[50]=B):B=t[50];let _;t[51]!==a||t[52]!==r||t[53]!==S||t[54]!==d||t[55]!==nt||t[56]!==mt||t[57]!==k||t[58]!==N||t[59]!==lt||t[60]!==ct||t[61]!==tt||t[62]!==l||t[63]!==m||t[64]!==Q||t[65]!==it||t[66]!==b||t[67]!==W||t[68]!==h||t[69]!==p||t[70]!==Y||t[71]!==s?(_=tt?o.jsx(Vt,{schema:b,value:nt,onChange:lt,persistDefaults:Q,basePath:"",breadcrumbPath:S,onBreadcrumbChange:N,decofile:d,meta:l,onSaveReferencedBlock:it,previewBaseUrl:h,onAddSectionItem:k,onRequestAddSection:ct,sandbox:{orgSlug:m,virtualMcpId:s,branch:r,threadId:Y}},`${a}:${mt}`):W?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(Tt,{className:"size-4"}),p("sandbox.appEditor.loadingSchema")]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:p("sandbox.appEditor.noEditableSchema")}),t[51]=a,t[52]=r,t[53]=S,t[54]=d,t[55]=nt,t[56]=mt,t[57]=k,t[58]=N,t[59]=lt,t[60]=ct,t[61]=tt,t[62]=l,t[63]=m,t[64]=Q,t[65]=it,t[66]=b,t[67]=W,t[68]=h,t[69]=p,t[70]=Y,t[71]=s,t[72]=_):_=t[72];let w;t[73]!==H||t[74]!==_?(w=o.jsx(Ft,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsxs("div",{className:"mx-auto max-w-xl",children:[H,_]})})}),t[73]=H,t[74]=_,t[75]=w):w=t[75];let E;t[76]!==pt||t[77]!==d||t[78]!==dt||t[79]!==l||t[80]!==h||t[81]!==u?(E=h&&o.jsx(Ot,{open:pt,onOpenChange:e=>{u(e),e||($.current=null)},meta:l,decofile:d,previewBaseUrl:h,onSelect:e=>{dt(e)}}),t[76]=pt,t[77]=d,t[78]=dt,t[79]=l,t[80]=h,t[81]=u,t[82]=E):E=t[82];let Z;return t[83]!==B||t[84]!==w||t[85]!==E?(Z=o.jsxs("div",{className:_t,children:[B,w,E]}),t[83]=B,t[84]=w,t[85]=E,t[86]=Z):Z=t[86],Z}function Ht(c){return c+1}function Jt(c){return c+1}export{Yr as AppEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,a2 as d,e as g,a9 as m,K as I,o as O}from"./index-
|
|
1
|
+
import{c as u,a2 as d,e as g,a9 as m,K as I,o as O}from"./index-BoB02eW2.js";import{u as $}from"./useInfiniteQuery-S3a_-GqY.js";function T(e){const t=u.c(17),{org:s}=d(),c=m();let i,n,o,l;t[0]!==s.id||t[1]!==e.configId||t[2]!==e.imageOnly||t[3]!==e.search?(n=e.search?.trim()||void 0,i=e.imageOnly??!1,l=$,o=I.filePickerObjects(s.id,e.configId,n,i),t[0]=s.id,t[1]=e.configId,t[2]=e.imageOnly,t[3]=e.search,t[4]=i,t[5]=n,t[6]=o,t[7]=l):(i=t[4],n=t[5],o=t[6],l=t[7]);const r=e.enabled!==!1&&!!e.configId;let a;t[8]!==i||t[9]!==e.configId||t[10]!==n||t[11]!==c?(a=async y=>{const{pageParam:p}=y;return await c.call("FILE_OBJECTS_LIST",{configId:e.configId,cursor:p??void 0,search:n,imageOnly:i||void 0})},t[8]=i,t[9]=e.configId,t[10]=n,t[11]=c,t[12]=a):a=t[12];let f;return t[13]!==o||t[14]!==r||t[15]!==a?(f={queryKey:o,enabled:r,staleTime:3e4,initialPageParam:null,queryFn:a,getNextPageParam:h},t[13]=o,t[14]=r,t[15]=a,t[16]=f):f=t[16],l(f)}function h(e){return e.nextCursor??void 0}function E(){const e=u.c(2),{org:t}=d();let s;return e[0]!==t?(s={mutationFn:async c=>{const i=c.file.type||"application/octet-stream",n=await fetch(`/api/${encodeURIComponent(t.slug)}/file-configs/${encodeURIComponent(c.configId)}/upload?filename=${encodeURIComponent(c.file.name)}`,{method:"POST",headers:{"Content-Type":i},body:c.file});if(!n.ok){const o=await n.text().catch(x);let l=`${n.status} ${n.statusText}`;try{const r=JSON.parse(o);r.message&&(l=r.message)}catch{o&&(l=o.slice(0,200))}throw new Error(`Upload failed: ${l}`)}return await n.json()}},e[0]=t,e[1]=s):s=e[1],g(s)}function x(){return""}function F(){const e=u.c(8),{org:t}=d(),s=m(),c=O();let i;e[0]!==s?(i=l=>s.call("FILE_OBJECT_DELETE",l),e[0]=s,e[1]=i):i=e[1];let n;e[2]!==t||e[3]!==c?(n=(l,r)=>{c.invalidateQueries({queryKey:I.filePickerObjectsByConfig(t.id,r.configId)})},e[2]=t,e[3]=c,e[4]=n):n=e[4];let o;return e[5]!==i||e[6]!==n?(o={mutationFn:i,onSuccess:n},e[5]=i,e[6]=n,e[7]=o):o=e[7],g(o)}function w(e){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(e)}function S(e){const t=e.lastIndexOf(".");return t<0||t===e.length-1?"file":e.slice(t+1).toLowerCase()}function v(e){const t=e.split("/");return t[t.length-1]??e}function _(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}export{E as a,v as b,F as c,S as e,_ as f,w as i,T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bc as v,bd as $,be as W,bf as H,bg as D,bh as y,bi as V,bj as q,bk as E,bl as x,bm as j,bn as N,bo as B,bp as Z,bq as F}from"./index-CNnllo6G.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function L(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await M(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const O=!e.redirectUrl;if(n!==void 0||O){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const C=e.state?await e.state():void 0,{authorizationUrl:z,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:C,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(z),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function M(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return x.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function b(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??E;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await b(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await b(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=E}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):q.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await M(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function P(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await L(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=P(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=P(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await L(s);return j.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,M as d,me as e};
|
|
1
|
+
import{bc as v,bd as $,be as W,bf as H,bg as D,bh as y,bi as V,bj as q,bk as E,bl as x,bm as j,bn as N,bo as B,bp as Z,bq as F}from"./index-BoB02eW2.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function L(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await M(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const O=!e.redirectUrl;if(n!==void 0||O){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const C=e.state?await e.state():void 0,{authorizationUrl:z,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:C,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(z),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function M(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return x.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function b(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??E;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await b(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await b(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=E}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):q.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await M(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function P(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await L(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=P(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=P(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await L(s);return j.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,M as d,me as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-
|
|
1
|
+
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-BoB02eW2.js";function h(){const e=r.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(x,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function u(){const e=r.c(5);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=l(a);if(n==="accept-invitation"){let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(m,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:"accept-invitation"})})}),e[1]=s):s=e[1];let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs(t.Fragment,{children:[s,t.jsx(f,{children:t.jsx(h,{})})]}),e[2]=i):i=e[2],i}let c;return e[3]!==n?(c=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:n})}),e[3]=n,e[4]=c):c=e[4],c}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $,a1 as Ne,r as b,e as ae,y as M,j as t,l as f,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-CNnllo6G.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:v=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(v)||v<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${v}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=v)throw new Pe(A,v);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:v,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,x]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[W,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,w=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:w?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(w?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:w?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:w?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:w?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),M(w?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{M("password_reset_requested"),pe(!0)},onError:s=>{M("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),M("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:w?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),ve&&J.reset(),we&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,ve=J.error,we=K.error,ye=z.error||B.error,T=w?c.trim()&&_.trim()&&re.trim():R?c.trim():k?W?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=ve||we||ye||ke,Me=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),M("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},We=R?a.resetPasswordTitle:k&&W?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&W?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:f("grid w-full",p?"gap-5":"gap-10"),children:[v??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:f("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:We}),Se&&t.jsx("p",{className:f("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&W)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{Me(s.name)},className:f("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 rounded-lg",p?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:f("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&W)&&I&&(C||E.enabled)&&t.jsxs("div",{className:f("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:f("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:W?t.jsxs("form",{onSubmit:Te,className:f("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:f("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:f(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:f("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:f("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:f("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:f(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[w&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!w&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(x),required:!0,disabled:m,autoComplete:w?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:f("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:f("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:f("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?w?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[w?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(w?"signIn":"signUp"),disabled:m,className:ie,children:w?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,v]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),v(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const v=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{v({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){v({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:v,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=v===void 0?!0:v,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let x;return e[2]!==S||e[3]!==I?(x=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=x):x=e[4],x}if(h.enabled){let x;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(x=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=x):x=e[8],x}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let x;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(x=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=x):x=e[20],x}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
|
|
1
|
+
import{a as $,a1 as Ne,r as b,e as ae,y as M,j as t,l as f,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-BoB02eW2.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:v=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(v)||v<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${v}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=v)throw new Pe(A,v);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:v,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,x]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[W,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,w=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:w?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(w?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:w?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:w?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:w?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),M(w?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{M("password_reset_requested"),pe(!0)},onError:s=>{M("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),M("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:w?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),ve&&J.reset(),we&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,ve=J.error,we=K.error,ye=z.error||B.error,T=w?c.trim()&&_.trim()&&re.trim():R?c.trim():k?W?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=ve||we||ye||ke,Me=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),M("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},We=R?a.resetPasswordTitle:k&&W?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&W?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:f("grid w-full",p?"gap-5":"gap-10"),children:[v??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:f("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:We}),Se&&t.jsx("p",{className:f("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&W)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{Me(s.name)},className:f("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 rounded-lg",p?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:f("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&W)&&I&&(C||E.enabled)&&t.jsxs("div",{className:f("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:f("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:W?t.jsxs("form",{onSubmit:Te,className:f("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:f("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:f(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:f("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:f("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:f("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:f(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[w&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!w&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(x),required:!0,disabled:m,autoComplete:w?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:f("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:f("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:f("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?w?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[w?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(w?"signIn":"signUp"),disabled:m,className:ie,children:w?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,v]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),v(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const v=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{v({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){v({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:v,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=v===void 0?!0:v,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let x;return e[2]!==S||e[3]!==I?(x=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=x):x=e[4],x}if(h.enabled){let x;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(x=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=x):x=e[8],x}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let x;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(x=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=x):x=e[20],x}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,l as p,j as f}from"./index-
|
|
1
|
+
import{c as g,l as p,j as f}from"./index-BoB02eW2.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./mcp-oauth-
|
|
1
|
+
import{a as u}from"./mcp-oauth-BFqNJ-iQ.js";import{i as p}from"./mcp-oauth-CuU6LL15.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await p({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await u({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
|
package/dist/client/assets/{automation-list-row-COpQfJ8e.js → automation-list-row-3WI1rtPZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as W,b as Y,r as ee,l as Q,j as t,T as te,B as se,X as ie,V as ne,U as oe}from"./index-
|
|
1
|
+
import{c as W,b as Y,r as ee,l as Q,j as t,T as te,B as se,X as ie,V as ne,U as oe}from"./index-BoB02eW2.js";import{B as ae}from"./badge-Zdi_g359.js";import{A as re,a as le,b as ce,c as me,g as ue,d as de,e as fe,f as ge}from"./alert-dialog-BaBKldUA.js";import{A as xe,N as pe}from"./agent-icon-Bmu0Xuy8.js";import{i as he}from"./DotsVertical-DKl8j3BE.js";import{s as je}from"./Trash01-BzUZQR5Y.js";import{i as ve}from"./ZoomOut-C1rwTYBB.js";import{c as we}from"./repository-binding-BYnKmLVI.js";import{a as _e}from"./use-automations-Cp9pysoO.js";function Be(c){const e=W.c(89),{automation:s,showAgent:a,onClick:n}=c,i=Y(),{remove:o}=_e(),[l,H]=ee.useState(!1),r=we(a?s.virtual_mcp_id:void 0);let F;e[0]!==s.id||e[1]!==o?(F=()=>{o.mutate(s.id),H(!1)},e[0]=s.id,e[1]=o,e[2]=F):F=e[2];const U=F;let $;e[3]!==n?($=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=$):$=e[4];const X=$,q=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==q?(u=Q("inline-block size-2 rounded-full shrink-0",q),e[5]=q,e[6]=u):u=e[6];const G=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==G?(d=i(G),e[7]=i,e[8]=G,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(xe,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==s.system_key||e[21]!==i?(p=s.system_key&&t.jsx(ae,{variant:"muted",children:i("automations.builtin.badge")}),e[20]=s.system_key,e[21]=i,e[22]=p):p=e[22];let h;e[23]!==r||e[24]!==a?(h=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[23]=r,e[24]=a,e[25]=h):h=e[25];let j;e[26]!==p||e[27]!==h||e[28]!==x?(j=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p,h]}),e[26]=p,e[27]=h,e[28]=x,e[29]=j):j=e[29];let v;e[30]!==s.nearest_next_run_at||e[31]!==s.trigger_count?(v=t.jsx(Ae,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[30]=s.nearest_next_run_at,e[31]=s.trigger_count,e[32]=v):v=e[32];let w;e[33]!==j||e[34]!==v?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[j,v]}),e[33]=j,e[34]=v,e[35]=w):w=e[35];const J=s.system_key&&"invisible";let _;e[36]!==J?(_=Q("shrink-0",J),e[36]=J,e[37]=_):_=e[37];let K;e[38]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(te,{asChild:!0,children:t.jsx(se,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(he,{size:16})})}),e[38]=K):K=e[38];let O,I;e[39]===Symbol.for("react.memo_cache_sentinel")?(O=m=>{m.stopPropagation(),H(!0)},I=t.jsx(je,{size:16}),e[39]=O,e[40]=I):(O=e[39],I=e[40]);let b;e[41]!==i?(b=i("automations.automationListRow.delete"),e[41]=i,e[42]=b):b=e[42];let y;e[43]!==b?(y=t.jsxs(ie,{children:[K,t.jsx(ne,{align:"end",children:t.jsxs(oe,{variant:"destructive",onClick:O,children:[I,b]})})]}),e[43]=b,e[44]=y):y=e[44];let A;e[45]!==_||e[46]!==y?(A=t.jsx("div",{onClick:ye,onKeyDown:be,role:"presentation",className:_,children:y}),e[45]=_,e[46]=y,e[47]=A):A=e[47];let D;e[48]!==X||e[49]!==n||e[50]!==w||e[51]!==A||e[52]!==f||e[53]!==g?(D=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:X,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,A]}),e[48]=X,e[49]=n,e[50]=w,e[51]=A,e[52]=f,e[53]=g,e[54]=D):D=e[54];let N;e[55]!==i?(N=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=N):N=e[56];let k;e[57]!==N?(k=t.jsx(re,{children:N}),e[57]=N,e[58]=k):k=e[58];let R;e[59]!==s.name||e[60]!==i?(R=i("automations.automationListRow.deleteDescription",{name:s.name}),e[59]=s.name,e[60]=i,e[61]=R):R=e[61];let C;e[62]!==R?(C=t.jsx(le,{children:R}),e[62]=R,e[63]=C):C=e[63];let L;e[64]!==k||e[65]!==C?(L=t.jsxs(ce,{children:[k,C]}),e[64]=k,e[65]=C,e[66]=L):L=e[66];let T;e[67]!==i?(T=i("automations.automationListRow.cancel"),e[67]=i,e[68]=T):T=e[68];let P;e[69]!==T?(P=t.jsx(me,{children:T}),e[69]=T,e[70]=P):P=e[70];const Z=o.isPending;let z;e[71]!==i?(z=i("automations.automationListRow.deleteButton"),e[71]=i,e[72]=z):z=e[72];let B;e[73]!==U||e[74]!==o.isPending||e[75]!==z?(B=t.jsx(ue,{onClick:U,disabled:Z,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:z}),e[73]=U,e[74]=o.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==P||e[78]!==B?(M=t.jsxs(de,{children:[P,B]}),e[77]=P,e[78]=B,e[79]=M):M=e[79];let S;e[80]!==L||e[81]!==M?(S=t.jsxs(fe,{children:[L,M]}),e[80]=L,e[81]=M,e[82]=S):S=e[82];let E;e[83]!==l||e[84]!==S?(E=t.jsx(ge,{open:l,onOpenChange:H,children:S}),e[83]=l,e[84]=S,e[85]=E):E=e[85];let V;return e[86]!==D||e[87]!==E?(V=t.jsxs(t.Fragment,{children:[D,E]}),e[86]=D,e[87]=E,e[88]=V):V=e[88],V}function be(c){return c.stopPropagation()}function ye(c){return c.stopPropagation()}function Ae(c){const e=W.c(8),{triggerCount:s,nextRunAt:a}=c,n=Y();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(pe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(ve,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{Be as A};
|