decocms 4.406.0 → 4.406.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/{AlertCircle-CgujCznd.js → AlertCircle-BQVXEKUc.js} +1 -1
- package/dist/client/assets/{AreaChart-Dl87CKFl.js → AreaChart-B_KOVsWH.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DYz0WE09.js → ArrowLeft-BeFq6jod.js} +1 -1
- package/dist/client/assets/{ArrowRight-CWiigebn.js → ArrowRight-DVxyJd1l.js} +1 -1
- package/dist/client/assets/{ArrowUp-DBpBKFdD.js → ArrowUp-MMes236V.js} +1 -1
- package/dist/client/assets/{CartesianChart-CQtCbOPS.js → CartesianChart-4nAUsvcH.js} +1 -1
- package/dist/client/assets/{Check-BO0tsZXP.js → Check-DjwzpZIC.js} +1 -1
- package/dist/client/assets/{CheckCircle-DppxuNa7.js → CheckCircle-CflfIWoL.js} +1 -1
- package/dist/client/assets/{ChevronUp-WgMV95Wl.js → ChevronUp-BYWuf4SY.js} +1 -1
- package/dist/client/assets/{Copy01-CP89x_RS.js → Copy01-CjQc-Ykz.js} +1 -1
- package/dist/client/assets/{CreditCard01-H8jUQWxs.js → CreditCard01-Cl8DBAML.js} +1 -1
- package/dist/client/assets/{DotsVertical-4TEj21cV.js → DotsVertical-BV4Cp92F.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-qNEZftpi.js → ErrorBarContext-DMbtuZnP.js} +1 -1
- package/dist/client/assets/{Eye-ARN8W0OA.js → Eye-CEZdPSLz.js} +1 -1
- package/dist/client/assets/{Globe04-CdU3biQC.js → Globe04-t1_NZ4S5.js} +1 -1
- package/dist/client/assets/{Image01-l9PMSSY0.js → Image01-Bed8faGM.js} +1 -1
- package/dist/client/assets/{Key01-QkJYBYv-.js → Key01-DDYGtlfn.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CgYc0js8.js → LayoutLeft-CZkz1jNL.js} +1 -1
- package/dist/client/assets/{Line-Bv4GUfne.js → Line-CXvxeuZf.js} +1 -1
- package/dist/client/assets/{Link01-CmwuZgWx.js → Link01-BbIArCE_.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DQ25aknz.js → LinkExternal01-DpNDkCnx.js} +1 -1
- package/dist/client/assets/{Monitor01-BVwwAtM6.js → Monitor01-Ah5De9w0.js} +1 -1
- package/dist/client/assets/{Palette-Bjt7HH4h.js → Palette-ChnBuAtH.js} +1 -1
- package/dist/client/assets/{Plus-TU-OKHt0.js → Plus-BICk297J.js} +1 -1
- package/dist/client/assets/{SearchMd-Cm4pXgfM.js → SearchMd-v8QAVRjQ.js} +1 -1
- package/dist/client/assets/{Sector-BdyQFYKV.js → Sector-Ch6wxiVl.js} +1 -1
- package/dist/client/assets/{Share07-DyeTiScB.js → Share07-CmuXKCN5.js} +1 -1
- package/dist/client/assets/{Sun-DgGlHV06.js → Sun-DTRl56RH.js} +1 -1
- package/dist/client/assets/{Tool01-CQ5Xc26A.js → Tool01-Bdvuj8zb.js} +1 -1
- package/dist/client/assets/{Trash01-B9y1vShv.js → Trash01-B5wUzx2c.js} +1 -1
- package/dist/client/assets/{Upload01-DAXWNq7T.js → Upload01-Cu-9L0qW.js} +1 -1
- package/dist/client/assets/{User01-p3MXVQ0Z.js → User01-DaLqt8Zu.js} +1 -1
- package/dist/client/assets/{UserSquare-C7aUR_aW.js → UserSquare-C7TikGGO.js} +1 -1
- package/dist/client/assets/{Users01-CohEKYSh.js → Users01-BGfUl9Z9.js} +1 -1
- package/dist/client/assets/{X-qOHqlxey.js → X-CRCA8SGk.js} +1 -1
- package/dist/client/assets/{XClose-hPk1Hqkr.js → XClose-DJgtnkEc.js} +1 -1
- package/dist/client/assets/{Zap-CyBIW8px.js → Zap-DHslHQ0t.js} +1 -1
- package/dist/client/assets/{ZoomOut-DZCavZ8o.js → ZoomOut-DIggrZVG.js} +1 -1
- package/dist/client/assets/{access-gate-DNEAyv2j.js → access-gate-Cco763GH.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-bRZtyL-b.js → add-connection-dialog-CvOk-16j.js} +1 -1
- package/dist/client/assets/{agent-analytics-tSEQzJqV.js → agent-analytics-BuShy2lS.js} +1 -1
- package/dist/client/assets/agent-app-D6Tp5vlj.js +1 -0
- package/dist/client/assets/{agent-assets-B0UpGeZB.js → agent-assets-R_wphq7p.js} +1 -1
- package/dist/client/assets/{agent-automation-BnqBubMi.js → agent-automation-C6iPqVOP.js} +1 -1
- package/dist/client/assets/{agent-automations-Bhwn57Bu.js → agent-automations-CLIHaUQn.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-e0UYTGJa.js → agent-connect-sources-tobP9soC.js} +1 -1
- package/dist/client/assets/agent-deck-DtlpMciC.js +1 -0
- package/dist/client/assets/{agent-e2e-nAUWbLbx.js → agent-e2e-DakaaNs8.js} +1 -1
- package/dist/client/assets/{agent-experiments-BolDhf_W.js → agent-experiments-BhEpxS1S.js} +1 -1
- package/dist/client/assets/{agent-file-C1aTOAN-.js → agent-file-B7S5_-vD.js} +1 -1
- package/dist/client/assets/{agent-git-BjUtQS3j.js → agent-git-so-osFz0.js} +1 -1
- package/dist/client/assets/{agent-hosting-DIjx0dPc.js → agent-hosting-BXsuvmaY.js} +1 -1
- package/dist/client/assets/{agent-icon-Bd0IZ2xl.js → agent-icon-DZc84vtW.js} +1 -1
- package/dist/client/assets/agent-library-file-BbHf83br.js +1 -0
- package/dist/client/assets/{agent-monitor-DKKZFNMi.js → agent-monitor-Y-y8WkNo.js} +1 -1
- package/dist/client/assets/{agent-overview-lYvI4Nyl.js → agent-overview-Bxx3mqx3.js} +1 -1
- package/dist/client/assets/agent-settings-BdnQNFuI.js +1 -0
- package/dist/client/assets/{agent-site-editor-CdJOqKVu.js → agent-site-editor-CPf68n1p.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-C5W28gjl.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-DXhW4uZI.js → agent-site-editor-content-Dbmoy-9X.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-CWf5w5wW.js → agent-site-editor-preview-GS0ijSSp.js} +3 -3
- package/dist/client/assets/agent-view-BjdG_eVV.js +1 -0
- package/dist/client/assets/{agent-view-guard-yKF0ckjL.js → agent-view-guard-RZaWWh8q.js} +1 -1
- package/dist/client/assets/{agents-list-BGbR4Gn2.js → agents-list-BRhXk1wX.js} +1 -1
- package/dist/client/assets/{ai-providers-D6lyG4Rj.js → ai-providers-DsuBk_lC.js} +1 -1
- package/dist/client/assets/{alert-D1vpzkWd.js → alert-CyFB5Q7g.js} +1 -1
- package/dist/client/assets/{alert-dialog-EQsgmpuA.js → alert-dialog-Cp1oRtvU.js} +1 -1
- package/dist/client/assets/{analytics-sections-YNBdLO_f.js → analytics-sections-BvlUaDYV.js} +1 -1
- package/dist/client/assets/api-keys-C2GXQUdc.js +1 -0
- package/dist/client/assets/{api-keys-Buj2Mg4T.js → api-keys-CClkqBtA.js} +1 -1
- package/dist/client/assets/app-editor-BXC1buiG.js +1 -0
- package/dist/client/assets/{asset-utils-9XLqBp-Q.js → asset-utils-DmV7MwAi.js} +1 -1
- package/dist/client/assets/{auth-B4tHClP5.js → auth-DewE0vsZ.js} +1 -1
- package/dist/client/assets/{auth-catchall-BA6qJurQ.js → auth-catchall-CnLOzh6z.js} +1 -1
- package/dist/client/assets/{auth-entry--UoEULta.js → auth-entry-BYurZCL8.js} +1 -1
- package/dist/client/assets/{auth-split-layout-C2Z78rym.js → auth-split-layout-cVJzCAIz.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-EABJT3_J.js → authenticate-and-persist-oauth-C0spMpLN.js} +1 -1
- package/dist/client/assets/{automation-list-row-C62I8jHw.js → automation-list-row-D9W4FguS.js} +1 -1
- package/dist/client/assets/{automation-runs-CvKbK1mn.js → automation-runs-pUjgCSfr.js} +1 -1
- package/dist/client/assets/{automations-KmRW23R-.js → automations-BWboyFGA.js} +1 -1
- package/dist/client/assets/{autosend-BwqeYDrP.js → autosend-BOLn22FP.js} +1 -1
- package/dist/client/assets/{avatar-DNbeZQMl.js → avatar-BXB8p0uZ.js} +1 -1
- package/dist/client/assets/{badge-Dn4B9MPM.js → badge-L3Pfb7lT.js} +1 -1
- package/dist/client/assets/{block-document-BcubOVW1.js → block-document-CZmZt_GS.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CiPsRjF4.js → blocks-preview-workspace-context-C6-ILFRy.js} +1 -1
- package/dist/client/assets/{buckets-DuU1P-Pt.js → buckets-C_5U-zUS.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-l2J5lTda.js → build-improve-prompt-doc-CYmkt9A_.js} +1 -1
- package/dist/client/assets/{calendar-Bd64vnKI.js → calendar-mQVeScA0.js} +1 -1
- package/dist/client/assets/{capability-load-error-D7kLzc_F.js → capability-load-error-BjPwGIMH.js} +1 -1
- package/dist/client/assets/{cards-CJ0w9n3U.js → cards-CfITToen.js} +1 -1
- package/dist/client/assets/{category-editor-Ye7w61VX.js → category-editor-_XlPQ_JR.js} +1 -1
- package/dist/client/assets/{chart-YCh8lrvr.js → chart-B_RS6v6i.js} +1 -1
- package/dist/client/assets/{chat-context-BNtTPn2v.js → chat-context-IHDWgDQ6.js} +1 -1
- package/dist/client/assets/{chat-draft-BrbpfreL.js → chat-draft-bxwRcHk2.js} +1 -1
- package/dist/client/assets/{checkbox-CzVzwj4A.js → checkbox-WzAY3JJD.js} +1 -1
- package/dist/client/assets/{choose-editor-DTAKYLOA.js → choose-editor-DHuVN8EQ.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-DQok8asH.js → claim-phase-copy-BXZD4tAp.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CtopuIcy.js → cli-auth-success-BekLnyCd.js} +1 -1
- package/dist/client/assets/{client-icons-C8ttTPrI.js → client-icons-BEF-E-JI.js} +1 -1
- package/dist/client/assets/{collapsible-DlWH4-1Q.js → collapsible-BKe2_9O7.js} +1 -1
- package/dist/client/assets/{collection-detail-DZ5ZAb4J.js → collection-detail-FqVAo6sr.js} +1 -1
- package/dist/client/assets/{collection-display-button-CT2-bXQw.js → collection-display-button-B-NPFUs4.js} +1 -1
- package/dist/client/assets/{collection-search-CCzn1jJM.js → collection-search-66MPCgMJ.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DCyUxWRM.js → collection-table-wrapper-C04p-A9X.js} +1 -1
- package/dist/client/assets/{collection-tabs-CZs317SQ.js → collection-tabs-PNDYs7Tm.js} +1 -1
- package/dist/client/assets/{combobox-DhpMW_Q6.js → combobox-yM7XxeWn.js} +1 -1
- package/dist/client/assets/{command-C24f7Kyz.js → command-Dz5qWruW.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DLTvOHE6.js → companion-mcps-section-CseZP29y.js} +1 -1
- package/dist/client/assets/{connect-Dx9YF6jh.js → connect-BbrTSpN5.js} +1 -1
- package/dist/client/assets/{connect-layout-Cs5G1BKf.js → connect-layout-CDDVbEzl.js} +1 -1
- package/dist/client/assets/{connection-DSaol0Ng.js → connection-D_Ad-k2g.js} +1 -1
- package/dist/client/assets/{connection-card-DxtmlEpf.js → connection-card-D84FLYUf.js} +1 -1
- package/dist/client/assets/{connection-detail-D3B1Lmjt.js → connection-detail-CpZDxB7F.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DCcCOjwY.js → connection-form-helpers-5k0v0Re8.js} +1 -1
- package/dist/client/assets/{connections-DupmsXsG.js → connections-ByYjvA85.js} +1 -1
- package/dist/client/assets/{context-B7GvP0a5.js → context-DzVAzWtC.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DjT0FfLO.js → create-organization-dialog-DzedjPhW.js} +1 -1
- package/dist/client/assets/{decopilot-CdSUSOau.js → decopilot-OImya6-h.js} +1 -1
- package/dist/client/assets/{dialog-BWmqK6vg.js → dialog-Cz2_YOoM.js} +1 -1
- package/dist/client/assets/{discover-BVVbBxyt.js → discover-BekL4zcZ.js} +1 -1
- package/dist/client/assets/{domain-settings-B-eYE41J.js → domain-settings-BNV22Gio.js} +1 -1
- package/dist/client/assets/{download-app-dialog-ZwXjVAnk.js → download-app-dialog-CLcZY4uQ.js} +1 -1
- package/dist/client/assets/{drawer-DNfsLwl_.js → drawer-BVbxEc-U.js} +1 -1
- package/dist/client/assets/{editor-C4W1ZTll.js → editor-zQPoF7nF.js} +1 -1
- package/dist/client/assets/{empty-state-BCQvGGl1.js → empty-state-BMXb2rB5.js} +1 -1
- package/dist/client/assets/{empty-state-CQWpCNEd.js → empty-state-Da-fHzIT.js} +1 -1
- package/dist/client/assets/{extract-connection-data-fRjq1au-.js → extract-connection-data-BvsecQuq.js} +1 -1
- package/dist/client/assets/{feature-gate-CfqoPyXH.js → feature-gate-DkU3CxuK.js} +1 -1
- package/dist/client/assets/{feature-paywall-BwEH2JPL.js → feature-paywall-D6H1XrEk.js} +1 -1
- package/dist/client/assets/{file-explorer-BpNCsQeN.js → file-explorer-CiVqz-p-.js} +1 -1
- package/dist/client/assets/{file-preview-CPwvdgRN.js → file-preview-BCzcW5IM.js} +1 -1
- package/dist/client/assets/{file-share-button-CNqX1uKM.js → file-share-button-BCbyDdG4.js} +1 -1
- package/dist/client/assets/{file-type-icon-UKBN2uy0.js → file-type-icon-DnKDJ8Kn.js} +1 -1
- package/dist/client/assets/{folder-icon-BUWRYFGK.js → folder-icon-gl7W6Tvq.js} +1 -1
- package/dist/client/assets/{form-Dd8uuw3Z.js → form-BFyytVo6.js} +1 -1
- package/dist/client/assets/{gateway-client-CND_0J2Q.js → gateway-client-C_Ex0ISa.js} +1 -1
- package/dist/client/assets/{general-tgZjCrGf.js → general-D6tjE2j7.js} +1 -1
- package/dist/client/assets/{github-icon-xYGi4_zU.js → github-icon-DWXYv1Ij.js} +1 -1
- package/dist/client/assets/github-repo-B15wwZ1g.js +1 -0
- package/dist/client/assets/{home-Dyn_f2jZ.js → home-CZA4NVdc.js} +1 -1
- package/dist/client/assets/{hooks-57fUVc8E.js → hooks-ClyBk0k_.js} +1 -1
- package/dist/client/assets/{icon-button-CDtcbOEr.js → icon-button-a1oHWXnD.js} +1 -1
- package/dist/client/assets/{index-DG-VU0NB.js → index-B0_orRJ4.js} +1 -1
- package/dist/client/assets/{index-B6Tu7EzF.js → index-BF_gwFuP.js} +1 -1
- package/dist/client/assets/{index-D2aZ-FY9.js → index-CenNUKjy.js} +1 -1
- package/dist/client/assets/{index-DXiYogYY.js → index-CyuU6yZd.js} +1 -1
- package/dist/client/assets/{index-OsBQe2QB.js → index-Cz9e3Wwk.js} +1 -1
- package/dist/client/assets/{index-BRtQvkRe.js → index-D6fwXcTM.js} +1 -1
- package/dist/client/assets/{index-CZmAPBsQ.js → index-D7HYUfJC.js} +1 -1
- package/dist/client/assets/{index-DJL19bsX.js → index-DUDizWti.js} +1 -1
- package/dist/client/assets/{index-D88UyMf8.js → index-Dhz79JsH.js} +1 -1
- package/dist/client/assets/{index-DXnvqmcL.js → index-DuAhWQOd.js} +1 -1
- package/dist/client/assets/{index-a8XScFmZ.js → index-K4Vfh2kg.js} +2 -2
- package/dist/client/assets/{index-_tZ6iIAI.js → index-XQdvud1d.js} +1 -1
- package/dist/client/assets/{index-CGM1QhoP.js → index-q4Xl54Dx.js} +1 -1
- package/dist/client/assets/{index-redirect-B0jTPPl2.js → index-redirect-B6p9S-WJ.js} +1 -1
- package/dist/client/assets/{index-BhOqFKQs.js → index-wc3LsJ73.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-vADGuTxL.js → infiniteQueryObserver-DrFl4m2S.js} +1 -1
- package/dist/client/assets/{infra-billing-C_vV8Zpq.js → infra-billing-HCI22mTY.js} +1 -1
- package/dist/client/assets/{input-HBy0gWnZ.js → input-CjG0yUIG.js} +1 -1
- package/dist/client/assets/{input-5OigQZTm.js → input-DfvZ3ikK.js} +1 -1
- package/dist/client/assets/{input-DBK_w2ku.js → input-JwI18_DS.js} +1 -1
- package/dist/client/assets/{integration-icon-Dz6rheZV.js → integration-icon-DrJdUHVx.js} +1 -1
- package/dist/client/assets/{label-xjEYWx7p.js → label-CbL3uHGW.js} +1 -1
- package/dist/client/assets/{last-preview-page-B6g9UIg-.js → last-preview-page-DEzwzCp-.js} +1 -1
- package/dist/client/assets/{layout-DXU0Xubq.js → layout-DMcycabY.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-VUIOxOMz.js → legacy-agents-deep-C3Zyezst.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Vdn7ugUH.js → legacy-main-redirect-COndmWyH.js} +1 -1
- package/dist/client/assets/{library-Cu0rCSTQ.js → library-DbAgblb-.js} +1 -1
- package/dist/client/assets/{login-BMhzWIRn.js → login-CXY1yuZY.js} +1 -1
- package/dist/client/assets/{markdown-W3XRuNet.js → markdown-DOZYcDNd.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DkVBLMEl.js → mcp-app-renderer-DRfDWjg6.js} +1 -1
- package/dist/client/assets/{mcp-oauth-3u1U11Wr.js → mcp-oauth-BTDQqGE0.js} +1 -1
- package/dist/client/assets/{members-v5L4AjzR.js → members-BEiKQ73m.js} +1 -1
- package/dist/client/assets/{message-templates-BvUtBueU.js → message-templates-CzGF1cA9.js} +1 -1
- package/dist/client/assets/{mini-report-page-BmsRKdKM.js → mini-report-page-D2baj09A.js} +1 -1
- package/dist/client/assets/{mock-board-DTt1aI29.js → mock-board-C8LOIHzu.js} +3 -3
- package/dist/client/assets/{monaco-editor-BHGY_yVV.js → monaco-editor-_MEmcrMi.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CMukw8SN.js → monitoring-stats-row-B5_lpP36.js} +1 -1
- package/dist/client/assets/{multi-select-DEfDPvag.js → multi-select-CdvqIvqU.js} +1 -1
- package/dist/client/assets/{mustache-uYJjGzq3.js → mustache-CPcQeOG0.js} +1 -1
- package/dist/client/assets/{oauth-callback-e_uxEp2U.js → oauth-callback-C3bvGl4h.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CJR_fnOb.js → oauth-callback-ai-provider-BFMT3UdD.js} +1 -1
- package/dist/client/assets/{onboarding-C_MoLVsp.js → onboarding-DtANDRsT.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-D8HlHK3x.js → optimistic-project-sidebar-views-DEWSMOzi.js} +1 -1
- package/dist/client/assets/{org-file-open-context-DP3MZUa1.js → org-file-open-context-Cej-kKNF.js} +1 -1
- package/dist/client/assets/{organization-choice-8-I0dE_H.js → organization-choice-DJxOpcPs.js} +1 -1
- package/dist/client/assets/{orgs-uAbNfBwh.js → orgs-6Wa09XqX.js} +1 -1
- package/dist/client/assets/{page-seo-form-BOJVpgo6.js → page-seo-form-DJY4lle7.js} +1 -1
- package/dist/client/assets/{pair-DwgUrqzM.js → pair-Bs4OFZd1.js} +1 -1
- package/dist/client/assets/{plan-ladder-DLxu0Wxh.js → plan-ladder-8vg2rlwa.js} +1 -1
- package/dist/client/assets/{popover-DKjcSfLB.js → popover-BhNcAD5X.js} +1 -1
- package/dist/client/assets/{post-calendar-CX7RLqUU.js → post-calendar-8dVtvspR.js} +1 -1
- package/dist/client/assets/{post-editor-DQy-xLxP.js → post-editor-B3pGOrms.js} +1 -1
- package/dist/client/assets/{preview-content-Ch72-5__.js → preview-content-D9TR_OCi.js} +1 -1
- package/dist/client/assets/{preview-dialog-Kdnb3KQ2.js → preview-dialog-uefldvQJ.js} +1 -1
- package/dist/client/assets/{profile-IGVv2rJN.js → profile-BOPnUUUc.js} +1 -1
- package/dist/client/assets/{project-app-view-x_-e_Lbw.js → project-app-view-CXTxnzE0.js} +1 -1
- package/dist/client/assets/{project-feed-DwfoXmCH.js → project-feed-B8QXSSsQ.js} +1 -1
- package/dist/client/assets/{project-icon-DtlCoOxs.js → project-icon-BK7It3uv.js} +1 -1
- package/dist/client/assets/project-reports-CU7shTBi.js +1 -0
- package/dist/client/assets/project-tasks-DFi0AJKe.js +1 -0
- package/dist/client/assets/{prompts-9Ciu0DHj.js → prompts-Cp6MUNg1.js} +1 -1
- package/dist/client/assets/record-editor-BFnZqKUj.js +1 -0
- package/dist/client/assets/{redirect-editor-DhoJUB71.js → redirect-editor-BooBJZnR.js} +1 -1
- package/dist/client/assets/reports-BW-QoVax.js +1 -0
- package/dist/client/assets/{reports-DGmWaCFr.js → reports-DpNr3YR6.js} +1 -1
- package/dist/client/assets/{reports-onboarding-BpRkFZDN.js → reports-onboarding-D8veE4dS.js} +1 -1
- package/dist/client/assets/{reports-tab-DxWEYXL_.js → reports-tab-BrMcs3Pf.js} +2 -2
- package/dist/client/assets/{repositories-CJ6hjTj5.js → repositories-D_tmdpJ8.js} +1 -1
- package/dist/client/assets/{repository-import-picker-CcnsKtpd.js → repository-import-picker-BrVrNQp2.js} +1 -1
- package/dist/client/assets/{repository-picker-72QfMFWx.js → repository-picker-5veCw3bv.js} +1 -1
- package/dist/client/assets/{require-capability-DH6k_3fM.js → require-capability-BXbVP8Te.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DMazcHjn.js → required-auth-layout-q7AyqreJ.js} +1 -1
- package/dist/client/assets/{reset-password-B_iQOKSQ.js → reset-password-BV_oLArt.js} +1 -1
- package/dist/client/assets/{resizable-CDXwX1EQ.js → resizable-D5h_i3Cv.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-D_xtoMYK.js → resolve-tab-icon-BRqSZn8F.js} +1 -1
- package/dist/client/assets/{review-settings-OW0K00fh.js → review-settings-CUXs59zb.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-BhCauUBJ.js → rich-text-link-control-hCgf6vwY.js} +1 -1
- package/dist/client/assets/{roles-mbHqfQsN.js → roles-92Mfuaie.js} +1 -1
- package/dist/client/assets/{route-jTfsMPRt.js → route-B07-zVJy.js} +1 -1
- package/dist/client/assets/{route-DP3hx43s.js → route-Cq_E3u9y.js} +1 -1
- package/dist/client/assets/{route-CFY-8tGH.js → route-DzLLBN_l.js} +1 -1
- package/dist/client/assets/{route-page-header-CGZ8hlbE.js → route-page-header-D2v-N63X.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-a1foluPz.js → runnable-block-editor-D5Om2hS9.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-C_uX5vaY.js → sandbox-lifecycle-context-DDvqjx4F.js} +1 -1
- package/dist/client/assets/{schema-C0UHuNyx.js → schema-OZ6y31ku.js} +1 -1
- package/dist/client/assets/{scroll-area-TOykm0pn.js → scroll-area-CrFzneCm.js} +1 -1
- package/dist/client/assets/{search-input-DX8Af1_h.js → search-input-MXvNbubn.js} +1 -1
- package/dist/client/assets/{search-toggle-CpNXm-HK.js → search-toggle-OXNBAfan.js} +1 -1
- package/dist/client/assets/{secret-picker-BDwnJCqm.js → secret-picker-olJPqPoi.js} +1 -1
- package/dist/client/assets/{secrets-C8P9K06C.js → secrets-Cttvdk2_.js} +1 -1
- package/dist/client/assets/{sections-editor-BVD7-dMM.js → sections-editor-BkzNFswN.js} +1 -1
- package/dist/client/assets/{select-Bqp_U1ks.js → select-DxOzi3UD.js} +1 -1
- package/dist/client/assets/{select-model-CwN0uiJw.js → select-model-N7bwAuKh.js} +1 -1
- package/dist/client/assets/{seo-editor-Z7UEKCep.js → seo-editor-BbScE4FO.js} +1 -1
- package/dist/client/assets/{separator-CRMA5Wms.js → separator-CmRrTp4P.js} +1 -1
- package/dist/client/assets/{settings-tab-gQ1sYUFr.js → settings-tab-F5_VZsFA.js} +1 -1
- package/dist/client/assets/{sheet-CnG_30Tu.js → sheet-AhK1Q4GA.js} +1 -1
- package/dist/client/assets/{shell-layout-C1ofRTSy.js → shell-layout-BbZrykxM.js} +1 -1
- package/dist/client/assets/{skill-preview-D2C3TdbC.js → skill-preview-D2tUoLmU.js} +1 -1
- package/dist/client/assets/{skills-BkdXpy6f.js → skills-8G1WBDrj.js} +1 -1
- package/dist/client/assets/{sso-DS1IZ-Cy.js → sso-D1j1eaaw.js} +1 -1
- package/dist/client/assets/{suggestion-BKo4wcW5.js → suggestion-D2LW2rth.js} +1 -1
- package/dist/client/assets/{switch-CAv8chXa.js → switch-Dxukqc0d.js} +1 -1
- package/dist/client/assets/{synced-repos-BAz91gxb.js → synced-repos-QFrSnbHa.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-C7PcdX64.js → tab-icon-glyph-BJ5K3vOh.js} +1 -1
- package/dist/client/assets/{table-BQzAWihK.js → table-DQGBCTGl.js} +1 -1
- package/dist/client/assets/{tabs-BB69CAa_.js → tabs-CgudHfJv.js} +1 -1
- package/dist/client/assets/{task-board-DAXz0qcI.js → task-board-Bc_5nEh1.js} +1 -1
- package/dist/client/assets/task-route-DMhHeGp_.js +1 -0
- package/dist/client/assets/{task-status-DsuZMZki.js → task-status-CxrGIdHQ.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CnhQSjI5.js → taskboard-analytics-CkQr3tK7.js} +1 -1
- package/dist/client/assets/tasks-BLCuiNcA.js +1 -0
- package/dist/client/assets/{tasks-EhOSvMOE.js → tasks-Bnn9RQl1.js} +1 -1
- package/dist/client/assets/{textarea-CQB0iWWu.js → textarea-C4Fl7vcj.js} +1 -1
- package/dist/client/assets/{thread-analytics-BxOFKU_J.js → thread-analytics-CE0WviO_.js} +1 -1
- package/dist/client/assets/{thread-button-C9DbsgYC.js → thread-button-EQmrPg3s.js} +1 -1
- package/dist/client/assets/{thread-intent-BVf_UeqN.js → thread-intent-DxlkHtay.js} +1 -1
- package/dist/client/assets/{thread-route-iDCB4hcC.js → thread-route-DC9aU1My.js} +1 -1
- package/dist/client/assets/{thread-route-B1ZSIzzT.js → thread-route-TxjlZd1E.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-D0e7nDaM.js → thread-sheet-body-BrDhZq1Z.js} +1 -1
- package/dist/client/assets/{toggle-group-DN5pA1xA.js → toggle-group-NfZmEEmD.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DggL__pK.js → toolbar-icon-button-B_lHRucJ.js} +1 -1
- package/dist/client/assets/{tooltip-DG5CnGag.js → tooltip-Cy80lI1Y.js} +1 -1
- package/dist/client/assets/{track-DtcT0XLB.js → track-CKzt_alj.js} +1 -1
- package/dist/client/assets/{types-BuaOQs2H.js → types-mQyngwgP.js} +1 -1
- package/dist/client/assets/{usage-stats-CfoUXIit.js → usage-stats-B-kd-KGd.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DmDozsCa.js → use-ai-providers-zjIftbuA.js} +1 -1
- package/dist/client/assets/{use-automations-DlcqQAT-.js → use-automations-Bos3c2CS.js} +1 -1
- package/dist/client/assets/{use-autosave-Dnad_LVj.js → use-autosave-BPZqx8ru.js} +1 -1
- package/dist/client/assets/{use-connect-companion-De4fpUyT.js → use-connect-companion-DWeMHoIU.js} +1 -1
- package/dist/client/assets/{use-connection-B62IVwoq.js → use-connection-DT6Y_sWB.js} +1 -1
- package/dist/client/assets/{use-copy-PMhIFi8m.js → use-copy-CCt9uq_y.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CaljxpC7.js → use-create-virtual-mcp-D8BgGLo0.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-C_k-ZNvB.js → use-date-fns-locale-8-Vndgvf.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-8--WWWFZ.js → use-debounced-autosave-CVGhSw1y.js} +1 -1
- package/dist/client/assets/{use-debounced-value-JsQcnlEX.js → use-debounced-value-CQxBbX3z.js} +1 -1
- package/dist/client/assets/{use-deco-credits-D7jE3Gb7.js → use-deco-credits-Bbxg62mu.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CXHHAExG.js → use-decopilot-events-C-TjDtpG.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CQADYnj0.js → use-delete-connection-DoGBhXiK.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BeJp7zBn.js → use-deployment-admin-CMAr5-sz.js} +1 -1
- package/dist/client/assets/{use-entitlements-e5g60LFP.js → use-entitlements-OYbyxqXu.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BoXMuGAj.js → use-fast-preview-draft-url-H9Q-1XHg.js} +1 -1
- package/dist/client/assets/{use-file-configs-DzDjWDbA.js → use-file-configs-C3rsyIax.js} +1 -1
- package/dist/client/assets/{use-in-settings-DF5a-yr6.js → use-in-settings-DTfVU5gG.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BWjbZqkI.js → use-infinite-scroll-CitEQv_Q.js} +1 -1
- package/dist/client/assets/{use-join-requests-C-vRDubL.js → use-join-requests-DURmdBJt.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-COSZEEJN.js → use-main-panel-tabs-DCZX5mxy.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-cOXVTEWe.js → use-mcp-auth-status-DcPv-6wk.js} +1 -1
- package/dist/client/assets/{use-mcp-client-QkI6RUae.js → use-mcp-client-CR19JjtG.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CTv5hWKn.js → use-mcp-prompts-C9ZSqhtN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CRxMLxmD.js → use-mcp-tools-NQLn3o-8.js} +1 -1
- package/dist/client/assets/{use-members-DJtmQ5I0.js → use-members-DGHnBAVp.js} +1 -1
- package/dist/client/assets/{use-mobile-BR3euFAT.js → use-mobile-rtsj2MZ1.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CATWBqpJ.js → use-navigate-to-agent-DYgqDFZF.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-xOOrbCjh.js +1 -0
- package/dist/client/assets/{use-open-billing-url-CssGGbOV.js → use-open-billing-url-1mXCzVjQ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DD1x9ZUx.js → use-org-auth-client-Dq37iZE-.js} +1 -1
- package/dist/client/assets/{use-org-fs-CUzmVYxO.js → use-org-fs-mfYIenam.js} +1 -1
- package/dist/client/assets/{use-org-sso-C4Rm3HPT.js → use-org-sso-C8N9NZ6V.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CbALx4Il.js → use-organization-roles-B1Y6_86t.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Chk2oNMp.js → use-organization-settings-CY6osCto.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BvXmhCXE.js → use-panel-navigate-BqFBzSWd.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-eLIweUr6.js → use-project-native-view-presence-7vj8rIc7.js} +1 -1
- package/dist/client/assets/{use-project-scope-Dg5JkMxK.js → use-project-scope-CdGBXW9U.js} +1 -1
- package/dist/client/assets/{use-releases-DFTelrXq.js → use-releases-DRDVY8Xc.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DpBTdRcc.js → use-reports-diagnostic-D48-pm_p.js} +1 -1
- package/dist/client/assets/{use-route-default-main-RAA9Xu9b.js → use-route-default-main-CG99dur1.js} +1 -1
- package/dist/client/assets/{use-secrets-Be7dbg8N.js → use-secrets-BQr1wgkC.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BsBwRpxR.js → use-section-preview-base-Be_ffjg-.js} +1 -1
- package/dist/client/assets/{use-session-runtime-16mMZo3B.js → use-session-runtime-epDsfla0.js} +1 -1
- package/dist/client/assets/{use-tags-TXZWvSN2.js → use-tags-BDr8xPIF.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-B3jA7fHY.js → use-task-board-analytics-DyOwTb8x.js} +1 -1
- package/dist/client/assets/{use-task-metadata-fbwKPdOL.js → use-task-metadata-B625VJsm.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-U5Jj6xFb.js → use-thread-analytics-D4T2O8XJ.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-fY2YVo4L.js → use-thread-outputs-CfLMzkB9.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B22df3lH.js → use-virtual-mcp-gM6wRQv6.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bdkrqs8P.js +1 -0
- package/dist/client/assets/{useQueries-B7hWegsL.js → useQueries-MatxMDm4.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-6_TWTeTT.js +1 -0
- package/dist/client/assets/{users-B1mD9fdQ.js → users-DSJ7gYEW.js} +1 -1
- package/dist/client/assets/{utils-BvSnSvcy.js → utils-D2l1844I.js} +1 -1
- package/dist/client/assets/{variant-calendar-CpWcO1WH.js → variant-calendar-DP0eqUJc.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CqVph4cp.js → variant-matcher-override-CHhx77jc.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-D6C4LcX3.js → view-mode-toggle-DSnYHXmD.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CZOMxd4f.js → virtual-mcp-BLyxO2qI.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-D_LRMpO5.js +0 -1
- package/dist/client/assets/agent-deck-1Gy5jl1Q.js +0 -1
- package/dist/client/assets/agent-library-file-C6HS0CDW.js +0 -1
- package/dist/client/assets/agent-settings-Braq0K0j.js +0 -1
- package/dist/client/assets/agent-site-editor-code-_pcbcBCM.js +0 -2
- package/dist/client/assets/agent-view-B5TTa9Fr.js +0 -1
- package/dist/client/assets/api-keys-BIsdKQsQ.js +0 -1
- package/dist/client/assets/app-editor-Bc6BpUGO.js +0 -1
- package/dist/client/assets/github-repo-BknN0SVI.js +0 -1
- package/dist/client/assets/project-reports-Dc50o0bW.js +0 -1
- package/dist/client/assets/project-tasks-BTlGW7tU.js +0 -1
- package/dist/client/assets/record-editor-QZJr0INE.js +0 -1
- package/dist/client/assets/reports-CAO0dNuU.js +0 -1
- package/dist/client/assets/task-route-Dfyu6KvD.js +0 -1
- package/dist/client/assets/tasks-CNDczBnp.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-DQBU1F-m.js +0 -1
- package/dist/client/assets/useInfiniteQuery-kTLnckn3.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D3KJwbuZ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as V,R as Fe,r as w,e as me,q as z,j as t,l as P,B as xe,o as Ve,m as ze,K as ue,c as oe,b as be,h as _e}from"./index-a8XScFmZ.js";import{I as ee}from"./input-HBy0gWnZ.js";import{i as Qe}from"./use-is-desktop-app-BNujXJc_.js";import{d as He,e as Ke}from"./backoff-8mStPHYB.js";class Le extends Error{constructor(e,a){super(`Retrying exceeded the maxAttempts (${a}).`),this.name="RetryError",this.cause=e}}async function Ye(n,e){const{multiplier:a=2,maxTimeout:u=6e4,maxAttempts:f=5,minTimeout:o=1e3,jitter:i=1,isRetriable:m=()=>!0,signal:g}=e??{};if(!Number.isInteger(f)||f<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${f}`);if(!Number.isFinite(a)||a<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${a}`);if(Number.isNaN(u)||u<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${u}`);if(Number.isNaN(o)||o<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${o}`);if(o>u)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${o}', 'maxTimeout=${u}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let j=0;for(;;){g?.throwIfAborted();try{return await n()}catch(v){if(!m(v))throw v;if(j+1>=f)throw new Le(v,f);const C=Ke(u,o,j,a,i);await He(C,g?{signal:g}:void 0)}j++}}const Oe={submitEmailPassword:({mode:n,email:e,password:a,name:u})=>n==="sign_up"?V.signUp.email({email:e,password:a,name:u||""}):V.signIn.email({email:e,password:a}),requestPasswordReset:({email:n,redirectTo:e})=>V.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>V.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>V.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>V.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>V.signIn.sso({providerId:n,callbackURL:e}),onAuthenticated:n=>{window.location.href=n}},ge="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ge={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:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,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 Je({redirectUrl:n,callbackUrl:e="/",title:a,subtitle:u,brand:f,copy:o,variant:i="default",allowedSocialProviders:m,allowPassword:g=!0,onAuthEvent:j,actions:v}){const{emailAndPassword:C,resetPassword:E,emailOtp:y,socialProviders:N}=Fe(),d={...Oe,...v},h=s=>{try{j?.(s)}catch{}},I=i==="compact",te=m?N.providers.filter(s=>m.includes(s.name)):N.providers,se=N.enabled&&te.length>0,le=C.enabled&&(g||!y.enabled&&!se),de=N.enabled&&N.providers.length>0&&!se&&!y.enabled&&!le?N.providers:te,p=N.enabled&&de.length>0,F=C.enabled&&(g||!y.enabled&&!p),[b,_]=w.useState(""),[L,Q]=w.useState(""),[U,O]=w.useState(""),[D,l]=w.useState(""),[x,$]=w.useState(!1),[M,W]=w.useState(()=>y.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[A,H]=w.useState(""),[ye,we]=w.useState(!1),[Re,fe]=w.useState(null),r={...Ge,...o},ne=w.useId(),K=`${ne}-email`,Y=`${ne}-email-error`,ve=`${ne}-name`,Ee=`${ne}-password`,Se=`${ne}-otp`,k=M==="signUp",q=M==="forgotPassword",T=M==="emailOtp",re=me({mutationFn:async({email:s,password:c,name:R})=>{try{const Z=await d.submitEmailPassword({mode:k?"sign_up":"sign_in",email:s,password:c,name:R});if(Z.error)throw new Error(Z.error.message||(k?r.signUpFailed:r.signInFailed));return Z}catch(Z){throw Z instanceof Error?Z:new Error(r.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:k?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:k?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),z(k?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ie=me({mutationFn:async({email:s})=>{const c=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(c.error)throw new Error(c.error.message||r.resetEmailFailed);return c},onSuccess:()=>{z("password_reset_requested"),we(!0)},onError:s=>{z("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),G=me({mutationFn:async({email:s})=>{const c=await d.sendOtp({email:s});if(c.error)throw new Error(c.error.message||r.otpSendFailed);return c},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),z("email_otp_sent"),$(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),J=me({mutationFn:async({email:s,otp:c})=>{const R=await d.submitOtp({email:s,otp:c});if(R.error)throw new Error(R.error.message||r.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),ce=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),pe=()=>{b.trim()&&!ce(b)&&H(r.invalidEmail)},De=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}re.mutate({email:b,password:L,name:U})},$e=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail);return}ie.mutate({email:b})},Me=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}G.mutate({email:b})},We=s=>{s.preventDefault(),J.mutate({email:b,otp:D})},X=s=>c=>{s(c.target.value),je&&re.reset(),Ne&&ie.reset(),Ae&&(G.reset(),J.reset()),s===_&&A&&H("")},ae=s=>{W(s),O(""),l(""),$(!1),H(""),we(!1),fe(null),re.reset(),ie.reset(),G.reset(),J.reset()},S=re.isPending||ie.isPending||G.isPending||J.isPending,je=re.error,Ne=ie.error,Ae=G.error||J.error,B=k?b.trim()&&L.trim()&&U.trim():q?b.trim():T?x?D.trim():b.trim():b.trim()&&L.trim(),qe=s=>{if(!s)return null;const c=s.message.toLowerCase();return c.includes("unauthorized")||c.includes("401")?r.invalidEmailOrPassword:c.includes("already exists")||c.includes("409")?r.accountExists:c.includes("network")||c.includes("fetch")?r.networkError:c.includes("rate limit")||c.includes("429")?r.tooManyAttempts:c.includes("invalid")&&c.includes("otp")?r.invalidOrExpiredCode:s.message||r.genericError},Ce=je||Ne||Ae||Re,Ue=async s=>{h({type:"started",method:"social",provider:s}),fe(null);try{const c=await d.socialSignIn({provider:s,callbackURL:n??e});if(c.error)throw new Error(c.error.message||r.authenticationFailed)}catch(c){const R=c instanceof Error?c.message:String(c);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),z("social_signin_failed",{provider:s,error:R}),fe(c instanceof Error?c:new Error(R))}},Be=q?r.resetPasswordTitle:T&&x?r.verificationCodeTitle:a??r.welcomeTitle,Pe=q?r.resetPasswordSubtitle:T&&x?r.codeSentTo(b):u===void 0?r.defaultSubtitle:u;return t.jsxs("div",{className:P("grid w-full",I?"gap-5":"gap-10"),children:[f??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:P("font-medium",I?"text-xl leading-7":"text-2xl leading-8"),children:Be}),Pe&&t.jsx("p",{className:P("text-muted-foreground",I?"text-sm leading-5":"text-base leading-6"),children:Pe})]}),Ce&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Ce)}),ye&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:r.resetEmailSent}),!q&&!(T&&x)&&p&&t.jsx("div",{className:"grid gap-2",children:de.map(s=>t.jsxs("button",{type:"button",disabled:S,onClick:()=>{Ue(s.name)},className:P("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",I?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:P("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),r.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!q&&!(T&&x)&&p&&(F||y.enabled)&&t.jsxs("div",{className:P("flex items-center gap-2.5",I?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:P("text-muted-foreground",I?"text-sm":"text-base"),children:r.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),T&&y.enabled&&t.jsx(t.Fragment,{children:x?t.jsxs("form",{onSubmit:We,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.verificationCodeLabel}),t.jsx(ee,{id:Se,type:"text",placeholder:r.enterCodePlaceholder,value:D,onChange:X(l),required:!0,disabled:S,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.verifying:r.verify}),t.jsx("button",{type:"button",onClick:()=>{$(!1),l(""),G.reset(),J.reset()},disabled:S,className:P("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",I&&"sm:col-span-2"),children:r.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Me,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:K,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:r.emailPlaceholder,value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive",children:A})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.sending:r.sendCode})]})}),q&&F&&!ye&&t.jsxs("form",{onSubmit:$e,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsx(xe,{type:"submit",disabled:S||!B,className:"w-full font-semibold",size:"xl",children:S?r.sending:r.sendResetLink})]}),!q&&!T&&F&&t.jsxs("form",{onSubmit:De,className:"grid gap-5",children:[k&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:r.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:r.namePlaceholder,value:U,onChange:X(O),required:!0,disabled:S,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:r.passwordLabel}),!k&&E.enabled&&t.jsx("button",{type:"button",onClick:()=>ae("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r.forgotPassword})]}),t.jsx(ee,{id:Ee,type:"password",placeholder:"••••••••",value:L,onChange:X(Q),required:!0,disabled:S,autoComplete:k?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:P("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",B?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:P("p-1",!B&&"pointer-events-none"),children:t.jsx(xe,{type:"submit",disabled:S||!B,className:P("w-full font-semibold"),size:"xl","aria-hidden":!B,children:S?k?r.creatingAccount:r.signingIn:r.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:q?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.backToSignIn}):T&&F?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.signInWithPassword}):!T&&F?t.jsxs(t.Fragment,{children:[k?r.alreadyHaveAccount:r.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>ae(k?"signIn":"signUp"),disabled:S,className:ge,children:k?r.signIn:r.signUp}),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>ae("emailOtp"),disabled:S,className:ge,children:r.signInWithEmailCode})]})]}):null})]})}async function he(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Xe(){const n=Ve(),e=Qe(),a=ze({queryKey:ue.desktopAuthStatus(),queryFn:async()=>(await he()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[u,f]=w.useState(!1),[o,i]=w.useState(null),[m,g]=w.useState(!1),[j,v]=w.useState(null);w.useEffect(()=>{},[e,n]);async function C(){f(!0),i(null);try{const d=await he();await d.performAuthLogin();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{f(!1)}}async function E(){f(!0);try{const d=await he();await d.performAuthLogout();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{f(!1)}}async function y(){g(!0),v(null);let d;try{d=await he()}catch(h){v(h instanceof Error?h.message:"Sign-in failed"),g(!1);return}try{await d.performAuthCompleteSession()}catch(h){v(h instanceof Error?h.message:"Sign-in failed")}finally{try{const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{g(!1)}}}async function N(){await a.refetch()}return{status:a.data,isChecking:a.isLoading,isRetryingStatus:a.isFetching,isPending:u,loginError:o,login:C,logout:E,isCompletingSession:m,completeSessionError:j,completeSession:y,retryStatus:N}}function Ze(n){return!(n.emailAndPassword.enabled||n.emailOtp.enabled||n.socialProviders.enabled)&&!n.sso.enabled&&n.magicLink.enabled}function et(){return oe.c(10),Xe(),null}function tt(n){const e=oe.c(25),{onContinue:a,isPending:u,error:f}=n,o=be();let i;e[0]!==o?(i=o("common.authEntry.browserOnlyTitle"),e[0]=o,e[1]=i):i=e[1];let m;e[2]!==i?(m=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=m):m=e[3];let g;e[4]!==o?(g=o("common.authEntry.browserOnlyDescription"),e[4]=o,e[5]=g):g=e[5];let j;e[6]!==g?(j=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g}),e[6]=g,e[7]=j):j=e[7];let v;e[8]!==m||e[9]!==j?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[m,j]}),e[8]=m,e[9]=j,e[10]=v):v=e[10];let C;e[11]!==a?(C=()=>{a()},e[11]=a,e[12]=C):C=e[12];let E;e[13]!==o?(E=o("common.authEntry.browserOnlyCta"),e[13]=o,e[14]=E):E=e[14];let y;e[15]!==u||e[16]!==C||e[17]!==E?(y=t.jsx(xe,{onClick:C,disabled:u,children:E}),e[15]=u,e[16]=C,e[17]=E,e[18]=y):y=e[18];let N;e[19]!==f?(N=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[19]=f,e[20]=N):N=e[20];let d;return e[21]!==v||e[22]!==y||e[23]!==N?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[v,y,N]}),e[21]=v,e[22]=y,e[23]=N,e[24]=d):d=e[24],d}function Ie(n){const e=oe.c(8),{label:a,error:u}=n;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(_e,{size:"lg"}),e[0]=f):f=e[0];let o;e[1]!==a?(o=a&&t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[1]=a,e[2]=o):o=e[2];let i;e[3]!==u?(i=u&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:u}),e[3]=u,e[4]=i):i=e[4];let m;return e[5]!==o||e[6]!==i?(m=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,o,i]}),e[5]=o,e[6]=i,e[7]=m):m=e[7],m}class ke{constructor(e){this.response=e}response}function st(n){return n.startsWith("/")&&!n.startsWith("//")?n:"/"}function nt({redirectTo:n,onAuthEvent:e}){const a=be(),[u,f]=w.useState(null),o=w.useEffectEvent(i=>{try{e?.(i)}catch{}});return w.useEffect(()=>{let i=!1;return(async()=>{o({type:"started",method:"local"});try{let m;try{m=await Ye(async()=>{const g=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(g.status>=500)throw new ke(g);return g},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(g){if(g instanceof Le&&g.cause instanceof ke)m=g.cause.response;else throw g}if(!m.ok){const g=await m.json().catch(()=>({}));throw new Error(g?.error||a("common.authEntry.autoLoginFailed"))}i||(o({type:"succeeded",method:"local"}),window.location.href=st(n))}catch(m){i||(o({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),f(m instanceof Error?m.message:a("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),u?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:a("common.authEntry.autoLoginFailedWithError",{error:u})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:a("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=oe.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(_e,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:a,onAuthEvent:u}){const f=w.useEffectEvent(i=>{try{u?.(i)}catch{}}),o=w.useEffectEvent(a);return w.useEffect(()=>{(async()=>{f({type:"started",method:"sso",provider:e});try{const i=await o({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){f({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function dt(n){const e=oe.c(51),{callbackUrl:a,redirectUrl:u,allowAutoLogin:f,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,onAuthenticated:y}=n,N=f===void 0?!0:f,d=be(),{sso:h,emailAndPassword:I,magicLink:te,emailOtp:se,socialProviders:le,localMode:de}=Fe(),p=et(),F=u||a;let b;e[0]!==y?(b=y?{onAuthenticated:y}:void 0,e[0]=y,e[1]=b):b=e[1];const _=b,L=p?.actions;let Q;e[2]!==_||e[3]!==L?(Q={...Oe,..._,...L},e[2]=_,e[3]=L,e[4]=Q):Q=e[4];const U=Q;if(p?.isPending){let l;e[5]!==d?(l=d("common.authEntry.finishSignInInBrowser"),e[5]=d,e[6]=l):l=e[6];let x;return e[7]!==p.loginError||e[8]!==l?(x=t.jsx(Ie,{label:l,error:p.loginError}),e[7]=p.loginError,e[8]=l,e[9]=x):x=e[9],x}if(p?.isCompletingSession){let l;e[10]!==d?(l=d("common.authEntry.finishingSignIn"),e[10]=d,e[11]=l):l=e[11];let x;return e[12]!==p.completeSessionError||e[13]!==l?(x=t.jsx(Ie,{label:l,error:p.completeSessionError}),e[12]=p.completeSessionError,e[13]=l,e[14]=x):x=e[14],x}if(de&&N){let l;return e[15]!==E||e[16]!==F?(l=t.jsx(nt,{redirectTo:F,onAuthEvent:E}),e[15]=E,e[16]=F,e[17]=l):l=e[17],l}if(h.enabled){let l;return e[18]!==E||e[19]!==F||e[20]!==U.ssoSignIn||e[21]!==h.providerId?(l=t.jsx(rt,{callbackURL:F,providerId:h.providerId,ssoSignIn:U.ssoSignIn,onAuthEvent:E}),e[18]=E,e[19]=F,e[20]=U.ssoSignIn,e[21]=h.providerId,e[22]=l):l=e[22],l}if(p&&Ze({emailAndPassword:I,emailOtp:se,socialProviders:le,magicLink:te,sso:h})){let l;return e[23]!==p.isPending||e[24]!==p.login||e[25]!==p.loginError?(l=t.jsx(tt,{onContinue:p.login,isPending:p.isPending,error:p.loginError}),e[23]=p.isPending,e[24]=p.login,e[25]=p.loginError,e[26]=l):l=e[26],l}if(I.enabled||te.enabled||se.enabled||le.enabled){const l=p?.loginError??p?.completeSessionError??null;let x;e[27]!==_||e[28]!==L?(x={..._,...L},e[27]=_,e[28]=L,e[29]=x):x=e[29];let $;e[30]!==C||e[31]!==v||e[32]!==m||e[33]!==a||e[34]!==g||e[35]!==E||e[36]!==u||e[37]!==i||e[38]!==x||e[39]!==o||e[40]!==j?($=t.jsx(Je,{redirectUrl:u,callbackUrl:a,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,actions:x}),e[30]=C,e[31]=v,e[32]=m,e[33]=a,e[34]=g,e[35]=E,e[36]=u,e[37]=i,e[38]=x,e[39]=o,e[40]=j,e[41]=$):$=e[41];const M=$;if(!l)return M;let W;e[42]!==l?(W=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:l}),e[42]=l,e[43]=W):W=e[43];let A;return e[44]!==M||e[45]!==W?(A=t.jsxs("div",{className:"grid gap-4",children:[W,M]}),e[44]=M,e[45]=W,e[46]=A):A=e[46],A}let O;e[47]!==d?(O=d("common.authEntry.noLoginOptions"),e[47]=d,e[48]=O):O=e[48];let D;return e[49]!==O?(D=t.jsx("div",{children:O}),e[49]=O,e[50]=D):D=e[50],D}export{Te as A,dt as a,Xe as u};
|
|
1
|
+
import{a as V,R as Fe,r as w,e as me,q as z,j as t,l as P,B as xe,o as Ve,m as ze,K as ue,c as oe,b as be,h as _e}from"./index-K4Vfh2kg.js";import{I as ee}from"./input-CjG0yUIG.js";import{i as Qe}from"./use-is-desktop-app-BNujXJc_.js";import{d as He,e as Ke}from"./backoff-8mStPHYB.js";class Le extends Error{constructor(e,a){super(`Retrying exceeded the maxAttempts (${a}).`),this.name="RetryError",this.cause=e}}async function Ye(n,e){const{multiplier:a=2,maxTimeout:u=6e4,maxAttempts:f=5,minTimeout:o=1e3,jitter:i=1,isRetriable:m=()=>!0,signal:g}=e??{};if(!Number.isInteger(f)||f<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${f}`);if(!Number.isFinite(a)||a<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${a}`);if(Number.isNaN(u)||u<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${u}`);if(Number.isNaN(o)||o<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${o}`);if(o>u)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${o}', 'maxTimeout=${u}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let j=0;for(;;){g?.throwIfAborted();try{return await n()}catch(v){if(!m(v))throw v;if(j+1>=f)throw new Le(v,f);const C=Ke(u,o,j,a,i);await He(C,g?{signal:g}:void 0)}j++}}const Oe={submitEmailPassword:({mode:n,email:e,password:a,name:u})=>n==="sign_up"?V.signUp.email({email:e,password:a,name:u||""}):V.signIn.email({email:e,password:a}),requestPasswordReset:({email:n,redirectTo:e})=>V.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>V.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>V.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>V.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>V.signIn.sso({providerId:n,callbackURL:e}),onAuthenticated:n=>{window.location.href=n}},ge="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ge={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:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,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 Je({redirectUrl:n,callbackUrl:e="/",title:a,subtitle:u,brand:f,copy:o,variant:i="default",allowedSocialProviders:m,allowPassword:g=!0,onAuthEvent:j,actions:v}){const{emailAndPassword:C,resetPassword:E,emailOtp:y,socialProviders:N}=Fe(),d={...Oe,...v},h=s=>{try{j?.(s)}catch{}},I=i==="compact",te=m?N.providers.filter(s=>m.includes(s.name)):N.providers,se=N.enabled&&te.length>0,le=C.enabled&&(g||!y.enabled&&!se),de=N.enabled&&N.providers.length>0&&!se&&!y.enabled&&!le?N.providers:te,p=N.enabled&&de.length>0,F=C.enabled&&(g||!y.enabled&&!p),[b,_]=w.useState(""),[L,Q]=w.useState(""),[U,O]=w.useState(""),[D,l]=w.useState(""),[x,$]=w.useState(!1),[M,W]=w.useState(()=>y.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[A,H]=w.useState(""),[ye,we]=w.useState(!1),[Re,fe]=w.useState(null),r={...Ge,...o},ne=w.useId(),K=`${ne}-email`,Y=`${ne}-email-error`,ve=`${ne}-name`,Ee=`${ne}-password`,Se=`${ne}-otp`,k=M==="signUp",q=M==="forgotPassword",T=M==="emailOtp",re=me({mutationFn:async({email:s,password:c,name:R})=>{try{const Z=await d.submitEmailPassword({mode:k?"sign_up":"sign_in",email:s,password:c,name:R});if(Z.error)throw new Error(Z.error.message||(k?r.signUpFailed:r.signInFailed));return Z}catch(Z){throw Z instanceof Error?Z:new Error(r.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:k?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:k?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),z(k?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ie=me({mutationFn:async({email:s})=>{const c=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(c.error)throw new Error(c.error.message||r.resetEmailFailed);return c},onSuccess:()=>{z("password_reset_requested"),we(!0)},onError:s=>{z("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),G=me({mutationFn:async({email:s})=>{const c=await d.sendOtp({email:s});if(c.error)throw new Error(c.error.message||r.otpSendFailed);return c},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),z("email_otp_sent"),$(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),J=me({mutationFn:async({email:s,otp:c})=>{const R=await d.submitOtp({email:s,otp:c});if(R.error)throw new Error(R.error.message||r.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),ce=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),pe=()=>{b.trim()&&!ce(b)&&H(r.invalidEmail)},De=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}re.mutate({email:b,password:L,name:U})},$e=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail);return}ie.mutate({email:b})},Me=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}G.mutate({email:b})},We=s=>{s.preventDefault(),J.mutate({email:b,otp:D})},X=s=>c=>{s(c.target.value),je&&re.reset(),Ne&&ie.reset(),Ae&&(G.reset(),J.reset()),s===_&&A&&H("")},ae=s=>{W(s),O(""),l(""),$(!1),H(""),we(!1),fe(null),re.reset(),ie.reset(),G.reset(),J.reset()},S=re.isPending||ie.isPending||G.isPending||J.isPending,je=re.error,Ne=ie.error,Ae=G.error||J.error,B=k?b.trim()&&L.trim()&&U.trim():q?b.trim():T?x?D.trim():b.trim():b.trim()&&L.trim(),qe=s=>{if(!s)return null;const c=s.message.toLowerCase();return c.includes("unauthorized")||c.includes("401")?r.invalidEmailOrPassword:c.includes("already exists")||c.includes("409")?r.accountExists:c.includes("network")||c.includes("fetch")?r.networkError:c.includes("rate limit")||c.includes("429")?r.tooManyAttempts:c.includes("invalid")&&c.includes("otp")?r.invalidOrExpiredCode:s.message||r.genericError},Ce=je||Ne||Ae||Re,Ue=async s=>{h({type:"started",method:"social",provider:s}),fe(null);try{const c=await d.socialSignIn({provider:s,callbackURL:n??e});if(c.error)throw new Error(c.error.message||r.authenticationFailed)}catch(c){const R=c instanceof Error?c.message:String(c);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),z("social_signin_failed",{provider:s,error:R}),fe(c instanceof Error?c:new Error(R))}},Be=q?r.resetPasswordTitle:T&&x?r.verificationCodeTitle:a??r.welcomeTitle,Pe=q?r.resetPasswordSubtitle:T&&x?r.codeSentTo(b):u===void 0?r.defaultSubtitle:u;return t.jsxs("div",{className:P("grid w-full",I?"gap-5":"gap-10"),children:[f??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:P("font-medium",I?"text-xl leading-7":"text-2xl leading-8"),children:Be}),Pe&&t.jsx("p",{className:P("text-muted-foreground",I?"text-sm leading-5":"text-base leading-6"),children:Pe})]}),Ce&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Ce)}),ye&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:r.resetEmailSent}),!q&&!(T&&x)&&p&&t.jsx("div",{className:"grid gap-2",children:de.map(s=>t.jsxs("button",{type:"button",disabled:S,onClick:()=>{Ue(s.name)},className:P("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",I?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:P("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),r.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!q&&!(T&&x)&&p&&(F||y.enabled)&&t.jsxs("div",{className:P("flex items-center gap-2.5",I?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:P("text-muted-foreground",I?"text-sm":"text-base"),children:r.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),T&&y.enabled&&t.jsx(t.Fragment,{children:x?t.jsxs("form",{onSubmit:We,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.verificationCodeLabel}),t.jsx(ee,{id:Se,type:"text",placeholder:r.enterCodePlaceholder,value:D,onChange:X(l),required:!0,disabled:S,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.verifying:r.verify}),t.jsx("button",{type:"button",onClick:()=>{$(!1),l(""),G.reset(),J.reset()},disabled:S,className:P("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",I&&"sm:col-span-2"),children:r.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Me,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:K,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:r.emailPlaceholder,value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive",children:A})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.sending:r.sendCode})]})}),q&&F&&!ye&&t.jsxs("form",{onSubmit:$e,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsx(xe,{type:"submit",disabled:S||!B,className:"w-full font-semibold",size:"xl",children:S?r.sending:r.sendResetLink})]}),!q&&!T&&F&&t.jsxs("form",{onSubmit:De,className:"grid gap-5",children:[k&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:r.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:r.namePlaceholder,value:U,onChange:X(O),required:!0,disabled:S,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:r.passwordLabel}),!k&&E.enabled&&t.jsx("button",{type:"button",onClick:()=>ae("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r.forgotPassword})]}),t.jsx(ee,{id:Ee,type:"password",placeholder:"••••••••",value:L,onChange:X(Q),required:!0,disabled:S,autoComplete:k?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:P("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",B?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:P("p-1",!B&&"pointer-events-none"),children:t.jsx(xe,{type:"submit",disabled:S||!B,className:P("w-full font-semibold"),size:"xl","aria-hidden":!B,children:S?k?r.creatingAccount:r.signingIn:r.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:q?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.backToSignIn}):T&&F?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.signInWithPassword}):!T&&F?t.jsxs(t.Fragment,{children:[k?r.alreadyHaveAccount:r.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>ae(k?"signIn":"signUp"),disabled:S,className:ge,children:k?r.signIn:r.signUp}),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>ae("emailOtp"),disabled:S,className:ge,children:r.signInWithEmailCode})]})]}):null})]})}async function he(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Xe(){const n=Ve(),e=Qe(),a=ze({queryKey:ue.desktopAuthStatus(),queryFn:async()=>(await he()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[u,f]=w.useState(!1),[o,i]=w.useState(null),[m,g]=w.useState(!1),[j,v]=w.useState(null);w.useEffect(()=>{},[e,n]);async function C(){f(!0),i(null);try{const d=await he();await d.performAuthLogin();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{f(!1)}}async function E(){f(!0);try{const d=await he();await d.performAuthLogout();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{f(!1)}}async function y(){g(!0),v(null);let d;try{d=await he()}catch(h){v(h instanceof Error?h.message:"Sign-in failed"),g(!1);return}try{await d.performAuthCompleteSession()}catch(h){v(h instanceof Error?h.message:"Sign-in failed")}finally{try{const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{g(!1)}}}async function N(){await a.refetch()}return{status:a.data,isChecking:a.isLoading,isRetryingStatus:a.isFetching,isPending:u,loginError:o,login:C,logout:E,isCompletingSession:m,completeSessionError:j,completeSession:y,retryStatus:N}}function Ze(n){return!(n.emailAndPassword.enabled||n.emailOtp.enabled||n.socialProviders.enabled)&&!n.sso.enabled&&n.magicLink.enabled}function et(){return oe.c(10),Xe(),null}function tt(n){const e=oe.c(25),{onContinue:a,isPending:u,error:f}=n,o=be();let i;e[0]!==o?(i=o("common.authEntry.browserOnlyTitle"),e[0]=o,e[1]=i):i=e[1];let m;e[2]!==i?(m=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=m):m=e[3];let g;e[4]!==o?(g=o("common.authEntry.browserOnlyDescription"),e[4]=o,e[5]=g):g=e[5];let j;e[6]!==g?(j=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g}),e[6]=g,e[7]=j):j=e[7];let v;e[8]!==m||e[9]!==j?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[m,j]}),e[8]=m,e[9]=j,e[10]=v):v=e[10];let C;e[11]!==a?(C=()=>{a()},e[11]=a,e[12]=C):C=e[12];let E;e[13]!==o?(E=o("common.authEntry.browserOnlyCta"),e[13]=o,e[14]=E):E=e[14];let y;e[15]!==u||e[16]!==C||e[17]!==E?(y=t.jsx(xe,{onClick:C,disabled:u,children:E}),e[15]=u,e[16]=C,e[17]=E,e[18]=y):y=e[18];let N;e[19]!==f?(N=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[19]=f,e[20]=N):N=e[20];let d;return e[21]!==v||e[22]!==y||e[23]!==N?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[v,y,N]}),e[21]=v,e[22]=y,e[23]=N,e[24]=d):d=e[24],d}function Ie(n){const e=oe.c(8),{label:a,error:u}=n;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(_e,{size:"lg"}),e[0]=f):f=e[0];let o;e[1]!==a?(o=a&&t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[1]=a,e[2]=o):o=e[2];let i;e[3]!==u?(i=u&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:u}),e[3]=u,e[4]=i):i=e[4];let m;return e[5]!==o||e[6]!==i?(m=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,o,i]}),e[5]=o,e[6]=i,e[7]=m):m=e[7],m}class ke{constructor(e){this.response=e}response}function st(n){return n.startsWith("/")&&!n.startsWith("//")?n:"/"}function nt({redirectTo:n,onAuthEvent:e}){const a=be(),[u,f]=w.useState(null),o=w.useEffectEvent(i=>{try{e?.(i)}catch{}});return w.useEffect(()=>{let i=!1;return(async()=>{o({type:"started",method:"local"});try{let m;try{m=await Ye(async()=>{const g=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(g.status>=500)throw new ke(g);return g},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(g){if(g instanceof Le&&g.cause instanceof ke)m=g.cause.response;else throw g}if(!m.ok){const g=await m.json().catch(()=>({}));throw new Error(g?.error||a("common.authEntry.autoLoginFailed"))}i||(o({type:"succeeded",method:"local"}),window.location.href=st(n))}catch(m){i||(o({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),f(m instanceof Error?m.message:a("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),u?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:a("common.authEntry.autoLoginFailedWithError",{error:u})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:a("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=oe.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(_e,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:a,onAuthEvent:u}){const f=w.useEffectEvent(i=>{try{u?.(i)}catch{}}),o=w.useEffectEvent(a);return w.useEffect(()=>{(async()=>{f({type:"started",method:"sso",provider:e});try{const i=await o({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){f({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function dt(n){const e=oe.c(51),{callbackUrl:a,redirectUrl:u,allowAutoLogin:f,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,onAuthenticated:y}=n,N=f===void 0?!0:f,d=be(),{sso:h,emailAndPassword:I,magicLink:te,emailOtp:se,socialProviders:le,localMode:de}=Fe(),p=et(),F=u||a;let b;e[0]!==y?(b=y?{onAuthenticated:y}:void 0,e[0]=y,e[1]=b):b=e[1];const _=b,L=p?.actions;let Q;e[2]!==_||e[3]!==L?(Q={...Oe,..._,...L},e[2]=_,e[3]=L,e[4]=Q):Q=e[4];const U=Q;if(p?.isPending){let l;e[5]!==d?(l=d("common.authEntry.finishSignInInBrowser"),e[5]=d,e[6]=l):l=e[6];let x;return e[7]!==p.loginError||e[8]!==l?(x=t.jsx(Ie,{label:l,error:p.loginError}),e[7]=p.loginError,e[8]=l,e[9]=x):x=e[9],x}if(p?.isCompletingSession){let l;e[10]!==d?(l=d("common.authEntry.finishingSignIn"),e[10]=d,e[11]=l):l=e[11];let x;return e[12]!==p.completeSessionError||e[13]!==l?(x=t.jsx(Ie,{label:l,error:p.completeSessionError}),e[12]=p.completeSessionError,e[13]=l,e[14]=x):x=e[14],x}if(de&&N){let l;return e[15]!==E||e[16]!==F?(l=t.jsx(nt,{redirectTo:F,onAuthEvent:E}),e[15]=E,e[16]=F,e[17]=l):l=e[17],l}if(h.enabled){let l;return e[18]!==E||e[19]!==F||e[20]!==U.ssoSignIn||e[21]!==h.providerId?(l=t.jsx(rt,{callbackURL:F,providerId:h.providerId,ssoSignIn:U.ssoSignIn,onAuthEvent:E}),e[18]=E,e[19]=F,e[20]=U.ssoSignIn,e[21]=h.providerId,e[22]=l):l=e[22],l}if(p&&Ze({emailAndPassword:I,emailOtp:se,socialProviders:le,magicLink:te,sso:h})){let l;return e[23]!==p.isPending||e[24]!==p.login||e[25]!==p.loginError?(l=t.jsx(tt,{onContinue:p.login,isPending:p.isPending,error:p.loginError}),e[23]=p.isPending,e[24]=p.login,e[25]=p.loginError,e[26]=l):l=e[26],l}if(I.enabled||te.enabled||se.enabled||le.enabled){const l=p?.loginError??p?.completeSessionError??null;let x;e[27]!==_||e[28]!==L?(x={..._,...L},e[27]=_,e[28]=L,e[29]=x):x=e[29];let $;e[30]!==C||e[31]!==v||e[32]!==m||e[33]!==a||e[34]!==g||e[35]!==E||e[36]!==u||e[37]!==i||e[38]!==x||e[39]!==o||e[40]!==j?($=t.jsx(Je,{redirectUrl:u,callbackUrl:a,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,actions:x}),e[30]=C,e[31]=v,e[32]=m,e[33]=a,e[34]=g,e[35]=E,e[36]=u,e[37]=i,e[38]=x,e[39]=o,e[40]=j,e[41]=$):$=e[41];const M=$;if(!l)return M;let W;e[42]!==l?(W=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:l}),e[42]=l,e[43]=W):W=e[43];let A;return e[44]!==M||e[45]!==W?(A=t.jsxs("div",{className:"grid gap-4",children:[W,M]}),e[44]=M,e[45]=W,e[46]=A):A=e[46],A}let O;e[47]!==d?(O=d("common.authEntry.noLoginOptions"),e[47]=d,e[48]=O):O=e[48];let D;return e[49]!==O?(D=t.jsx("div",{children:O}),e[49]=O,e[50]=D):D=e[50],D}export{Te as A,dt as a,Xe as u};
|
|
@@ -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-K4Vfh2kg.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"./index-
|
|
1
|
+
import"./index-K4Vfh2kg.js";import{i as u,a as p}from"./mcp-oauth-BTDQqGE0.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 u({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 p({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-C62I8jHw.js → automation-list-row-D9W4FguS.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as q,b as J,r as U,l as W,j as t,F as X,B as Y,I as Z,H as ee,G as te}from"./index-
|
|
1
|
+
import{c as q,b as J,r as U,l as W,j as t,F as X,B as Y,I as Z,H as ee,G as te}from"./index-K4Vfh2kg.js";import{A as se,a as ie,b as ne,c as oe,g as ae,d as re,e as le,f as ce}from"./alert-dialog-Cp1oRtvU.js";import{A as me,N as ue}from"./agent-icon-DZc84vtW.js";import{i as de}from"./DotsVertical-BV4Cp92F.js";import{s as fe}from"./Trash01-B5wUzx2c.js";import{i as ge}from"./Zap-DHslHQ0t.js";import{a as xe}from"./use-virtual-mcp-gM6wRQv6.js";import{a as pe}from"./use-automations-Bos3c2CS.js";function Ce(c){const e=q.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,K]=U.useState(!1),r=xe(a?s.virtual_mcp_id:void 0);let M;e[0]!==s.id||e[1]!==o?(M=()=>{o.mutate(s.id),K(!1)},e[0]=s.id,e[1]=o,e[2]=M):M=e[2];const O=M;let S;e[3]!==n?(S=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=S):S=e[4];const H=S,G=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==G?(u=W("inline-block size-2 rounded-full shrink-0",G),e[5]=G,e[6]=u):u=e[6];const V=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==V?(d=i(V),e[7]=i,e[8]=V,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(me,{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]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let E;e[32]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(X,{asChild:!0,children:t.jsx(Y,{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(de,{size:16})})}),e[32]=E):E=e[32];let $,B;e[33]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),K(!0)},B=t.jsx(fe,{size:16}),e[33]=$,e[34]=B):($=e[33],B=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(Z,{children:[E,t.jsx(ee,{align:"end",children:t.jsxs(te,{variant:"destructive",onClick:$,children:[B,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let A;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(A=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,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,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=A):A=e[45];let b;e[46]!==i?(b=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=b):b=e[47];let D;e[48]!==b?(D=t.jsx(se,{children:b}),e[48]=b,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(ie,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ne,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(oe,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==O||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(ae,{onClick:O,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=O,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(re,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(le,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let F;e[74]!==l||e[75]!==z?(F=t.jsx(ce,{open:l,onOpenChange:K,children:z}),e[74]=l,e[75]=z,e[76]=F):F=e[76];let I;return e[77]!==A||e[78]!==F?(I=t.jsxs(t.Fragment,{children:[A,F]}),e[77]=A,e[78]=F,e[79]=I):I=e[79],I}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=q.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();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(ue,{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(ge,{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{Ce as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as z,r as lt,b as W,X as it,z as rt,a3 as ct,K as tt,j as s,l as ut,m as dt,eJ as mt}from"./index-a8XScFmZ.js";import{u as ft}from"./useInfiniteQuery-kTLnckn3.js";import{u as xt}from"./use-connection-B62IVwoq.js";import{u as pt}from"./use-mcp-client-QkI6RUae.js";import{b as gt}from"./use-virtual-mcp-B22df3lH.js";import{b as ht,a as Rt}from"./sheet-CnG_30Tu.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as V}from"./table-BQzAWihK.js";import{E as et}from"./empty-state-CQWpCNEd.js";import{u as Tt}from"./use-infinite-scroll-BWjbZqkI.js";import{a as St}from"./use-members-DJtmQ5I0.js";import{g as vt}from"./task-status-DsuZMZki.js";import{e as wt}from"./use-automations-DlcqQAT-.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-D0e7nDaM.js";function It(c){const t=z.c(15),[i,r]=lt.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,o=a!==-1?c[a]:null,n=o!==null;let l,w;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=u=>r(u),w=()=>r(null),t[3]=l,t[4]=w):(l=t[3],w=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let m;return t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==f||t[13]!==x?(m={selected:o,index:a,isOpen:n,select:l,close:w,prev:f,next:x},t[9]=a,t[10]=o,t[11]=n,t[12]=f,t[13]=x,t[14]=m):m=t[14],m}const Z=50;function X(c){const t=z.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let o;t[2]!==r?(o=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=o):o=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let l;return t[6]!==a||t[7]!==o||t[8]!==n?(l=s.jsxs(mt,{className:"pt-4 px-4 pb-5 gap-1",children:[a,o,n]}),t[6]=a,t[7]=o,t[8]=n,t[9]=l):l=t[9],l}function kt(c){const t=z.c(45),{automationId:i,range:r}=c,e=W(),{data:a,isLoading:o}=wt(i,r),n=a?.runs,l=a?.usage;let w;t[0]!==n?(w=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=w):w=t[1];const f=w;let x;t[2]!==e||t[3]!==l?(x=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=x):x=t[4];const m=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==o||t[8]!==n?.total?(g=o?"…":n?.total.toLocaleString()??"0",t[7]=o,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(X,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const k=o?"…":f;let C;t[19]!==T||t[20]!==k?(C=s.jsx(X,{title:T,value:k}),t[19]=T,t[20]=k,t[21]=C):C=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==o||t[25]!==l?.totalTokens?(p=o?"…":at(l?.totalTokens??0),t[24]=o,t[25]=l?.totalTokens,t[26]=p):p=t[26];let I;t[27]!==S||t[28]!==p||t[29]!==m?(I=s.jsx(X,{title:S,value:p,subtitle:m}),t[27]=S,t[28]=p,t[29]=m,t[30]=I):I=t[30];let d;t[31]!==e?(d=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=d):d=t[32];let j;t[33]!==o||t[34]!==l?(j=o?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=o,t[34]=l,t[35]=j):j=t[35];let v;t[36]!==d||t[37]!==j||t[38]!==m?(v=s.jsx(X,{title:d,value:j,subtitle:m}),t[36]=d,t[37]=j,t[38]=m,t[39]=v):v=t[39];let N;return t[40]!==I||t[41]!==v||t[42]!==R||t[43]!==C?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,C,I,v]}),t[40]=I,t[41]=v,t[42]=R,t[43]=C,t[44]=N):N=t[44],N}function yt(c){const t=z.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,o=W();let n,l;if(t[0]!==i.created_at){const P=new Date(i.created_at);n=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=l}else n=t[1],l=t[2];const w=l;let f,x,m,u,g,h,R,T,k,C,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==o){const P=vt(i.status),U=P.icon;x=st,k=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(V,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=m):m=t[20],f=V,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:P.iconClassName}),u=ut("text-sm",P.labelColor),g=o(P.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=o,t[8]=f,t[9]=x,t[10]=m,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=k,t[17]=C,t[18]=S}else f=t[8],x=t[9],m=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],k=t[16],C=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let I;t[24]!==p||t[25]!==h||t[26]!==R?(I=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=I):I=t[27];let d;t[28]!==f||t[29]!==I||t[30]!==T?(d=s.jsx(f,{className:T,children:I}),t[28]=f,t[29]=I,t[30]=T,t[31]=d):d=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let y;t[38]!==N?(y=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=y):y=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let _;t[42]!==w?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:w}),t[42]=w,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(V,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==y||t[52]!==E||t[53]!==k||t[54]!==C||t[55]!==S?($=s.jsxs(x,{ref:k,className:C,onClick:S,children:[m,d,v,y,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=y,t[52]=E,t[53]=k,t[54]=C,t[55]=S,t[56]=$):$=t[56],$}function Bt(c){const t=z.c(73),{automationId:i,triggerIds:r,range:e}=c,a=W(),{org:o,locator:n}=it();let l;t[0]!==o.id||t[1]!==o.slug?(l={connectionId:rt,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=l):l=t[2];const w=pt(l),f=ct(),x=xt(),m=gt(),{data:u}=St(),g=r.length>0;let h;t[3]!==i||t[4]!==o.id||t[5]!==r?(h=tt.automationRuns(o.id,i,r),t[3]=i,t[4]=o.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:Q}=M,ot=Q===void 0?0:Q;return await f.call("COLLECTION_THREADS_LIST",{limit:Z,offset:ot,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:k,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==k?.pages||t[15]!==n||t[16]!==e?(d=(k?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=k?.pages,t[15]=n,t[16]=e,t[17]=d,t[18]=j,t[19]=v,t[20]=N):(d=t[17],j=t[18],v=t[19],N=t[20]);let y;t[21]!==e||t[22]!==f||t[23]!==N?(y=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=y):y=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==y||t[27]!==D?(_={queryKey:j,queryFn:y,enabled:D,staleTime:3e4},t[25]=j,t[26]=y,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=$):$=t[30];const P=$;let U;t[31]!==C||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&C()},t[31]=C,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Y=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(kt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==I||t[40]!==Y||t[41]!==d||t[42]!==b||t[43]!==a||t[44]!==P?(O=g?I?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):d.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(bt,{children:d.map((M,Q)=>s.jsx(yt,{run:M,usage:P.get(M.id),onClick:()=>b.select(M.id),lastRowRef:Q===d.length-1?Y:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=I,t[40]=Y,t[41]=d,t[42]=b,t[43]=a,t[44]=P,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=M=>{M||b.close()},t[49]=b,t[50]=H):H=t[50];let K;t[51]!==x||t[52]!==m||t[53]!==w||t[54]!==n||t[55]!==u||t[56]!==d||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(K=B&&s.jsx(Ct,{thread:B,client:w,locator:n,connections:x,virtualMcps:m,members:u,nav:{index:b.index,total:d.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=m,t[53]=w,t[54]=n,t[55]=u,t[56]=d,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let J;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(J=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=J):J=t[72],J}function _t(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function Pt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<Z))return r.length*Z}export{Bt as A,It as u};
|
|
1
|
+
import{c as z,r as lt,b as W,X as it,z as rt,a3 as ct,K as tt,j as s,l as ut,m as dt,eJ as mt}from"./index-K4Vfh2kg.js";import{u as ft}from"./useInfiniteQuery-Bdkrqs8P.js";import{u as xt}from"./use-connection-DT6Y_sWB.js";import{u as pt}from"./use-mcp-client-CR19JjtG.js";import{b as gt}from"./use-virtual-mcp-gM6wRQv6.js";import{b as ht,a as Rt}from"./sheet-AhK1Q4GA.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as V}from"./table-DQGBCTGl.js";import{E as et}from"./empty-state-Da-fHzIT.js";import{u as Tt}from"./use-infinite-scroll-CitEQv_Q.js";import{a as St}from"./use-members-DGHnBAVp.js";import{g as vt}from"./task-status-CxrGIdHQ.js";import{e as wt}from"./use-automations-Bos3c2CS.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-BrDhZq1Z.js";function It(c){const t=z.c(15),[i,r]=lt.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,o=a!==-1?c[a]:null,n=o!==null;let l,w;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=u=>r(u),w=()=>r(null),t[3]=l,t[4]=w):(l=t[3],w=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let m;return t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==f||t[13]!==x?(m={selected:o,index:a,isOpen:n,select:l,close:w,prev:f,next:x},t[9]=a,t[10]=o,t[11]=n,t[12]=f,t[13]=x,t[14]=m):m=t[14],m}const Z=50;function X(c){const t=z.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let o;t[2]!==r?(o=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=o):o=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let l;return t[6]!==a||t[7]!==o||t[8]!==n?(l=s.jsxs(mt,{className:"pt-4 px-4 pb-5 gap-1",children:[a,o,n]}),t[6]=a,t[7]=o,t[8]=n,t[9]=l):l=t[9],l}function kt(c){const t=z.c(45),{automationId:i,range:r}=c,e=W(),{data:a,isLoading:o}=wt(i,r),n=a?.runs,l=a?.usage;let w;t[0]!==n?(w=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=w):w=t[1];const f=w;let x;t[2]!==e||t[3]!==l?(x=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=x):x=t[4];const m=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==o||t[8]!==n?.total?(g=o?"…":n?.total.toLocaleString()??"0",t[7]=o,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(X,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const k=o?"…":f;let C;t[19]!==T||t[20]!==k?(C=s.jsx(X,{title:T,value:k}),t[19]=T,t[20]=k,t[21]=C):C=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==o||t[25]!==l?.totalTokens?(p=o?"…":at(l?.totalTokens??0),t[24]=o,t[25]=l?.totalTokens,t[26]=p):p=t[26];let I;t[27]!==S||t[28]!==p||t[29]!==m?(I=s.jsx(X,{title:S,value:p,subtitle:m}),t[27]=S,t[28]=p,t[29]=m,t[30]=I):I=t[30];let d;t[31]!==e?(d=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=d):d=t[32];let j;t[33]!==o||t[34]!==l?(j=o?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=o,t[34]=l,t[35]=j):j=t[35];let v;t[36]!==d||t[37]!==j||t[38]!==m?(v=s.jsx(X,{title:d,value:j,subtitle:m}),t[36]=d,t[37]=j,t[38]=m,t[39]=v):v=t[39];let N;return t[40]!==I||t[41]!==v||t[42]!==R||t[43]!==C?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,C,I,v]}),t[40]=I,t[41]=v,t[42]=R,t[43]=C,t[44]=N):N=t[44],N}function yt(c){const t=z.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,o=W();let n,l;if(t[0]!==i.created_at){const P=new Date(i.created_at);n=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=l}else n=t[1],l=t[2];const w=l;let f,x,m,u,g,h,R,T,k,C,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==o){const P=vt(i.status),U=P.icon;x=st,k=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(V,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=m):m=t[20],f=V,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:P.iconClassName}),u=ut("text-sm",P.labelColor),g=o(P.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=o,t[8]=f,t[9]=x,t[10]=m,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=k,t[17]=C,t[18]=S}else f=t[8],x=t[9],m=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],k=t[16],C=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let I;t[24]!==p||t[25]!==h||t[26]!==R?(I=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=I):I=t[27];let d;t[28]!==f||t[29]!==I||t[30]!==T?(d=s.jsx(f,{className:T,children:I}),t[28]=f,t[29]=I,t[30]=T,t[31]=d):d=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let y;t[38]!==N?(y=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=y):y=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let _;t[42]!==w?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:w}),t[42]=w,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(V,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==y||t[52]!==E||t[53]!==k||t[54]!==C||t[55]!==S?($=s.jsxs(x,{ref:k,className:C,onClick:S,children:[m,d,v,y,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=y,t[52]=E,t[53]=k,t[54]=C,t[55]=S,t[56]=$):$=t[56],$}function Bt(c){const t=z.c(73),{automationId:i,triggerIds:r,range:e}=c,a=W(),{org:o,locator:n}=it();let l;t[0]!==o.id||t[1]!==o.slug?(l={connectionId:rt,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=l):l=t[2];const w=pt(l),f=ct(),x=xt(),m=gt(),{data:u}=St(),g=r.length>0;let h;t[3]!==i||t[4]!==o.id||t[5]!==r?(h=tt.automationRuns(o.id,i,r),t[3]=i,t[4]=o.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:Q}=M,ot=Q===void 0?0:Q;return await f.call("COLLECTION_THREADS_LIST",{limit:Z,offset:ot,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:k,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==k?.pages||t[15]!==n||t[16]!==e?(d=(k?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=k?.pages,t[15]=n,t[16]=e,t[17]=d,t[18]=j,t[19]=v,t[20]=N):(d=t[17],j=t[18],v=t[19],N=t[20]);let y;t[21]!==e||t[22]!==f||t[23]!==N?(y=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=y):y=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==y||t[27]!==D?(_={queryKey:j,queryFn:y,enabled:D,staleTime:3e4},t[25]=j,t[26]=y,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=$):$=t[30];const P=$;let U;t[31]!==C||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&C()},t[31]=C,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Y=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(kt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==I||t[40]!==Y||t[41]!==d||t[42]!==b||t[43]!==a||t[44]!==P?(O=g?I?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):d.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(bt,{children:d.map((M,Q)=>s.jsx(yt,{run:M,usage:P.get(M.id),onClick:()=>b.select(M.id),lastRowRef:Q===d.length-1?Y:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=I,t[40]=Y,t[41]=d,t[42]=b,t[43]=a,t[44]=P,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=M=>{M||b.close()},t[49]=b,t[50]=H):H=t[50];let K;t[51]!==x||t[52]!==m||t[53]!==w||t[54]!==n||t[55]!==u||t[56]!==d||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(K=B&&s.jsx(Ct,{thread:B,client:w,locator:n,connections:x,virtualMcps:m,members:u,nav:{index:b.index,total:d.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=m,t[53]=w,t[54]=n,t[55]=u,t[56]=d,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let J;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(J=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=J):J=t[72],J}function _t(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function Pt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<Z))return r.length*Z}export{Bt as A,It as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as e,b as $,X as D,d as M,r as q,n as d,B as V,fw as X,q as R}from"./index-
|
|
1
|
+
import{c as k,j as e,b as $,X as D,d as M,r as q,n as d,B as V,fw as X,q as R}from"./index-K4Vfh2kg.js";import{s as F}from"./Plus-BICk297J.js";import{i as S}from"./Zap-DHslHQ0t.js";import{S as G}from"./search-input-MXvNbubn.js";import{E as T}from"./empty-state-Da-fHzIT.js";import{u as H}from"./use-automations-Bos3c2CS.js";import{u as J}from"./use-navigate-to-agent-DYgqDFZF.js";import{A as K}from"./automation-list-row-D9W4FguS.js";import{b as O}from"./use-virtual-mcp-gM6wRQv6.js";import{R as Q}from"./require-capability-BXbVP8Te.js";import"./SearchMd-v8QAVRjQ.js";import"./use-mcp-client-CR19JjtG.js";import"./auth-DewE0vsZ.js";import"./hooks-ClyBk0k_.js";import"./backoff-8mStPHYB.js";import"./task-board-Bc_5nEh1.js";import"./schema-OZ6y31ku.js";import"./thread-intent-DxlkHtay.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-B15wwZ1g.js";import"./alert-dialog-Cp1oRtvU.js";import"./agent-icon-DZc84vtW.js";import"./AlertCircle-BQVXEKUc.js";import"./Tool01-Bdvuj8zb.js";import"./ArrowUp-MMes236V.js";import"./ArrowLeft-BeFq6jod.js";import"./ArrowRight-DVxyJd1l.js";import"./ZoomOut-DIggrZVG.js";import"./Globe04-t1_NZ4S5.js";import"./CheckCircle-CflfIWoL.js";import"./Check-DjwzpZIC.js";import"./ChevronUp-BYWuf4SY.js";import"./UserSquare-C7TikGGO.js";import"./Copy01-CjQc-Ykz.js";import"./CreditCard01-Cl8DBAML.js";import"./DotsVertical-BV4Cp92F.js";import"./Eye-CEZdPSLz.js";import"./Share07-CmuXKCN5.js";import"./XClose-DJgtnkEc.js";import"./Image01-Bed8faGM.js";import"./Key01-DDYGtlfn.js";import"./LayoutLeft-CZkz1jNL.js";import"./Link01-BbIArCE_.js";import"./LinkExternal01-DpNDkCnx.js";import"./Monitor01-Ah5De9w0.js";import"./Sun-DTRl56RH.js";import"./Palette-ChnBuAtH.js";import"./Trash01-B5wUzx2c.js";import"./Upload01-Cu-9L0qW.js";import"./User01-DaLqt8Zu.js";import"./Users01-BGfUl9Z9.js";import"./X-CRCA8SGk.js";import"./access-gate-Cco763GH.js";import"./capability-load-error-BjPwGIMH.js";function U(){const t=k.c(20),o=$(),{org:p}=D(),{data:y}=H(void 0),g=y===void 0?[]:y,E=O(),P=J(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),b=new Map(E.map(W)),A=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=b.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const N=l&&b.has(l)?l:X(p.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let c;t[0]!==f||t[1]!==p.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:p.slug}})},t[0]=f,t[1]=p.slug,t[2]=c):c=t[2];const L=c,j=d,w=d,C=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const v=g.length>0&&e.jsx(G,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==v?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,v]}),t[7]=r,t[8]=v,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(V,{size:"sm",onClick:L,children:[e.jsx(F,{size:14}),o("settings.automations.browseAgentsButton")]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(i=>e.jsx(K,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==C.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(C.Container,{children:[n,_]}),t[10]=C.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==w.Content||t[15]!==a?(m=e.jsx(w.Content,{children:a}),t[14]=w.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function W(t){return[t.id,t]}function Yt(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(Q,{capability:"automations:manage",area:"automations",children:e.jsx(U,{})}),t[0]=o):o=t[0],o}export{Yt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as d}from"./index-
|
|
1
|
+
import{V as d}from"./index-K4Vfh2kg.js";const m=1e4,y="true",i=2;function a(t,n){return d.chatAutosend(t,n)}function l(t){return t==="pending"||t==="sending"}function f(t){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object")return null;const e=n;let o=0;e.status==="sending"?o=e.retryAt===void 0?1:i:e.retryAt!==void 0&&(o=1);const r=e.attempt===void 0?o:e.attempt;return typeof e.createdAt!="number"||typeof e.message!="object"||!l(e.status)||e.retryAt!==void 0&&typeof e.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>i?null:{...n,attempt:r}}function S(t,n,e,o,r=Date.now()){const s={message:o,createdAt:r,status:"pending",attempt:0};return t.setItem(a(n,e),JSON.stringify(s)),s}function p(t,n,e){const o=a(n,e),r=f(t.getItem(o));return r||(t.removeItem(o),null)}function g(t,n,e,o=Date.now()){const r=a(n,e),s=p(t,n,e);if(!s||s.status!=="pending")return null;if(s.attempt>=i)return t.removeItem(r),null;const c=s.retryAt??s.createdAt;if(o-c>=m)return t.removeItem(r),null;const u={...s,status:"sending",attempt:s.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function T(t,n,e){t.removeItem(a(n,e))}export{y as A,T as a,g as c,S as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,l as f,aB as R,ba as V,bb as I,bc as $}from"./index-
|
|
1
|
+
import{c as k,j as i,l as f,aB as R,ba as V,bb as I,bc as $}from"./index-K4Vfh2kg.js";import{s as O}from"./User01-DaLqt8Zu.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),B=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function D(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const b=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==m||e[20]!==h?(w=f(S({shape:m,size:h}),s),e[18]=s,e[19]=m,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==b||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:B(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:b})]}),e[22]=z,e[23]=b,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function W(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let b;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==m||e[15]!==x||e[16]!==l?(b=i.jsx(D,{shape:m,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=m,e[15]=x,e[16]=l,e[17]=b):b=e[17],b}W.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{W as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,l,j as u,bd as v,aB as b}from"./index-
|
|
1
|
+
import{c as g,l,j as u,bd as v,aB as b}from"./index-K4Vfh2kg.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg border-transparent bg-card p-0 card-shadow"}},defaultVariants:{variant:"default",size:"default"}});function h(d){const e=g.c(14);let r,s,a,n,t;e[0]!==d?({className:r,variant:t,size:a,asChild:n,...s}=d,e[0]=d,e[1]=r,e[2]=s,e[3]=a,e[4]=n,e[5]=t):(r=e[1],s=e[2],a=e[3],n=e[4],t=e[5]);const c=(n===void 0?!1:n)?v:"span";let i;e[6]!==r||e[7]!==a||e[8]!==t?(i=l(f({variant:t,size:a}),r),e[6]=r,e[7]=a,e[8]=t,e[9]=i):i=e[9];let o;return e[10]!==c||e[11]!==s||e[12]!==i?(o=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[10]=c,e[11]=s,e[12]=i,e[13]=o):o=e[13],o}export{h as B};
|