decocms 4.532.0 → 4.532.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-BwsFHzaV.js → ActiveShapeUtils-DenZ78VA.js} +1 -1
- package/dist/client/assets/{AlertCircle-DtaztSud.js → AlertCircle-BWrNX7mN.js} +1 -1
- package/dist/client/assets/{AreaChart-DJGtjQAP.js → AreaChart-DNs2YwPE.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DmnRegLb.js → ArrowLeft-DHx5ko4s.js} +1 -1
- package/dist/client/assets/{ArrowUp-KwZh_glX.js → ArrowUp-CyzDPNV4.js} +1 -1
- package/dist/client/assets/{BarChart-DQaObQAu.js → BarChart-CXwRHR1B.js} +1 -1
- package/dist/client/assets/{Building02-BeI22zso.js → Building02-DhL5SQYW.js} +1 -1
- package/dist/client/assets/{CartesianChart-wzAyuumX.js → CartesianChart-bUujzX18.js} +1 -1
- package/dist/client/assets/{CategoricalChart-BEpkg4nV.js → CategoricalChart-hUgIZ_pD.js} +1 -1
- package/dist/client/assets/{CheckCircle-C_ruRiGN.js → CheckCircle-BJwUqTIe.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-bUzEqfWd.js → ChevronSelectorVertical-BsFKOzFl.js} +1 -1
- package/dist/client/assets/{ChevronUp-DreW1_TB.js → ChevronUp-BsFnjeNK.js} +1 -1
- package/dist/client/assets/{Copy01--5lfgwG0.js → Copy01-BMtss9AJ.js} +1 -1
- package/dist/client/assets/{CreditCard01-K0Qwgk3o.js → CreditCard01-DpJ5HaJ6.js} +1 -1
- package/dist/client/assets/{DotsVertical-C68Q-BAS.js → DotsVertical-7Rm5ttPh.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CYra1jMF.js → ErrorBarContext-B8n7TKqU.js} +1 -1
- package/dist/client/assets/{Globe04-BOflVjCh.js → Globe04-BJeMTkc9.js} +1 -1
- package/dist/client/assets/{Image01-vjhaiEAu.js → Image01-B1C03E_N.js} +1 -1
- package/dist/client/assets/{Key01-DpH9OVIT.js → Key01-AhMvx8Bf.js} +1 -1
- package/dist/client/assets/{Link01-D41TGySV.js → Link01-p8humFYG.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BnY3fyy6.js → LinkBroken01-C5q0tEvS.js} +1 -1
- package/dist/client/assets/{Minus-CHN5Kpep.js → Minus-BMakGco3.js} +1 -1
- package/dist/client/assets/{Monitor01-e35w1jlr.js → Monitor01-CLwaIfNu.js} +1 -1
- package/dist/client/assets/{Play-D1B7OgmS.js → Play-BoOYKEkH.js} +1 -1
- package/dist/client/assets/{Plus-uAJwOYwM.js → Plus-D7X276kv.js} +1 -1
- package/dist/client/assets/{ReferenceLine-Dqn9rIuK.js → ReferenceLine-UiDLzqoj.js} +1 -1
- package/dist/client/assets/{SearchMd-B6NwptLV.js → SearchMd-BzDAUJSU.js} +1 -1
- package/dist/client/assets/{Sector-Bjn485EV.js → Sector-DZu8Iagq.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-I9tolWb2.js → ShoppingBag01-UnxomIP0.js} +1 -1
- package/dist/client/assets/{Sun-CrI4XUq_.js → Sun-B5QvK7X9.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DCpSydRk.js → SwitchHorizontal01-Dr_PPdbH.js} +1 -1
- package/dist/client/assets/{Tool01-vy7Izsxy.js → Tool01-OTauJJp3.js} +1 -1
- package/dist/client/assets/{Trash01-BVc7E-zT.js → Trash01-DzCXEeuM.js} +1 -1
- package/dist/client/assets/{Upload01-CbA0srCf.js → Upload01-2E_Vrojt.js} +1 -1
- package/dist/client/assets/{UserSquare-hT13OTGf.js → UserSquare-CmbcjiWL.js} +1 -1
- package/dist/client/assets/{Users01-DuFCVv-C.js → Users01-BFgiCQPh.js} +1 -1
- package/dist/client/assets/{XClose-Btox6E0t.js → XClose-BF4dTiHJ.js} +1 -1
- package/dist/client/assets/{ZoomOut-LrGtO3ok.js → ZoomOut-BIPVG3Mi.js} +1 -1
- package/dist/client/assets/{access-gate-DGZVXonS.js → access-gate-BrHHSKUI.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-DPRdB-7o.js → add-connection-dialog-84lGCknH.js} +1 -1
- package/dist/client/assets/agent-analytics-CaqNBpQA.js +2 -0
- package/dist/client/assets/agent-app-DjBhUw5o.js +1 -0
- package/dist/client/assets/agent-assets-DkTI28JC.js +1 -0
- package/dist/client/assets/{agent-automation-BucrJFus.js → agent-automation-F0B4MP-_.js} +2 -2
- package/dist/client/assets/agent-automations-cb9A7zzk.js +1 -0
- package/dist/client/assets/agent-calendar-B3d7D0Bd.js +1 -0
- package/dist/client/assets/agent-connect-sources-D2B4_Vnn.js +1 -0
- package/dist/client/assets/agent-deck-5QYiPo7g.js +1 -0
- package/dist/client/assets/agent-e2e-COljZ8mH.js +1 -0
- package/dist/client/assets/agent-experiments-DbScA798.js +1 -0
- package/dist/client/assets/agent-file-BWUqgQfU.js +1 -0
- package/dist/client/assets/agent-hosting-DQRni5C3.js +1 -0
- package/dist/client/assets/{agent-icon-DU_klZzF.js → agent-icon-DMLbHyqZ.js} +1 -1
- package/dist/client/assets/agent-library-Dn9V9HRF.js +1 -0
- package/dist/client/assets/agent-library-file-DwvWIojZ.js +1 -0
- package/dist/client/assets/agent-monitor-BfOHieYM.js +1 -0
- package/dist/client/assets/agent-overview-DQfGfiWL.js +1 -0
- package/dist/client/assets/agent-releases-DmNYUENl.js +2 -0
- package/dist/client/assets/agent-settings-BBVQpT76.js +1 -0
- package/dist/client/assets/{agent-site-editor-C_Hb6OuH.js → agent-site-editor-LiXNvVzd.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-DaRLEV5p.js +2 -0
- package/dist/client/assets/agent-site-editor-content--qfnrcml.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-BUTGq7zp.js +1 -0
- package/dist/client/assets/agent-view-CsFo6WNW.js +1 -0
- package/dist/client/assets/{agent-view-guard-DbvBrF0u.js → agent-view-guard-CIzLYG9Z.js} +1 -1
- package/dist/client/assets/{agents-list-Bu6ApeAs.js → agents-list-JqKBXhBb.js} +1 -1
- package/dist/client/assets/{ai-providers-CX0MNezq.js → ai-providers-BMdVqDyj.js} +1 -1
- package/dist/client/assets/{alert-DAT45VoU.js → alert-BAjsKun9.js} +1 -1
- package/dist/client/assets/{analytics-sections-ta2rZOgT.js → analytics-sections-2r9JgnkF.js} +1 -1
- package/dist/client/assets/api-keys-DOllUAfq.js +1 -0
- package/dist/client/assets/{api-keys-ydOxTkFM.js → api-keys-D_a2AabQ.js} +1 -1
- package/dist/client/assets/app-editor-hGtjMe2U.js +1 -0
- package/dist/client/assets/{asset-utils-CNLu4ncG.js → asset-utils-BljmC-O4.js} +1 -1
- package/dist/client/assets/{auth-BrPPgu4r.js → auth-BawzvLgB.js} +1 -1
- package/dist/client/assets/{auth-catchall-snzcHqzQ.js → auth-catchall-L4otHxQ4.js} +1 -1
- package/dist/client/assets/{auth-entry-CNvBXoES.js → auth-entry-DHl3Qa2p.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BQ5peFQ8.js → auth-split-layout-Bpnft0WY.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-O0IrG3Sw.js → authenticate-and-persist-oauth-CL5vwYY0.js} +1 -1
- package/dist/client/assets/{automation-list-row-DVPOR6sy.js → automation-list-row-B1qIGbz-.js} +1 -1
- package/dist/client/assets/{automation-runs-CZ4Ynyjk.js → automation-runs-Dgzto0gK.js} +1 -1
- package/dist/client/assets/{automations-DFJ2R8Aq.js → automations-C5lyWSek.js} +1 -1
- package/dist/client/assets/{autosend-6P1IADfg.js → autosend-BSe8DnJN.js} +1 -1
- package/dist/client/assets/{badge-_4T6Jr1d.js → badge-Dk9QaMHv.js} +1 -1
- package/dist/client/assets/{block-document-4o0WYdTe.js → block-document-DlaqZi3o.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-Bz9GrXiv.js → blocks-preview-workspace-context-BzMwrhCE.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-MX6TAPcT.js → blocks-tab-states-B7iQVWp6.js} +1 -1
- package/dist/client/assets/{blog-schema-DRpnmDTv.js → blog-schema-BHmzvrMx.js} +1 -1
- package/dist/client/assets/{buckets-Dm5WDzLr.js → buckets-CVEqMqkM.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CKhkT5-k.js → build-improve-prompt-doc-B6DMhmUe.js} +1 -1
- package/dist/client/assets/{calendar-2BS3l1pX.js → calendar-nGMQX5H2.js} +1 -1
- package/dist/client/assets/{capability-load-error-Ceg8IL6P.js → capability-load-error-BX1SCP0_.js} +1 -1
- package/dist/client/assets/category-editor-B4n2VHEp.js +1 -0
- package/dist/client/assets/{cdn-tab-BWEFzZ0D.js → cdn-tab-BPWLqXqs.js} +1 -1
- package/dist/client/assets/{chart-DHkCLdo5.js → chart-BOjeMD0e.js} +1 -1
- package/dist/client/assets/{chat-context-BPhmNX7K.js → chat-context-D2EaExW5.js} +1 -1
- package/dist/client/assets/{chat-draft-5-kbjuW7.js → chat-draft-C-EHUjTp.js} +1 -1
- package/dist/client/assets/{checkbox-B-dBQ4c_.js → checkbox--Oh7M1o0.js} +1 -1
- package/dist/client/assets/{choose-editor-CWeDgkwn.js → choose-editor-CHcjiEH4.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BLV2TH4H.js → cli-auth-success-BfeyrT2F.js} +1 -1
- package/dist/client/assets/{client-icons-ff1hOdfW.js → client-icons-DQkGfKDh.js} +1 -1
- package/dist/client/assets/cms-settings-editor-DwJYbiAD.js +1 -0
- package/dist/client/assets/{collapsible-CTko-JTD.js → collapsible-DTK_WJix.js} +1 -1
- package/dist/client/assets/collection-detail-C0KsWIh2.js +1 -0
- package/dist/client/assets/{collection-display-button-BlJQajZP.js → collection-display-button-K6Znqj-g.js} +1 -1
- package/dist/client/assets/{collection-search-B_D1_L7e.js → collection-search-Qr0hkbHz.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-sn5_7qmL.js → collection-table-wrapper-D6zxNCnG.js} +1 -1
- package/dist/client/assets/{collection-tabs-CKeKixSq.js → collection-tabs-Ma8F53u0.js} +1 -1
- package/dist/client/assets/{column-rules-D3LxXG3d.js → column-rules-IVYKsmdv.js} +1 -1
- package/dist/client/assets/{combobox-BuPlX0go.js → combobox-BDOw2yEp.js} +1 -1
- package/dist/client/assets/{command-C4G9SDjd.js → command-MDi6OAC1.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-D7Q1_FJ0.js → companion-mcps-section-CVi8OvfW.js} +1 -1
- package/dist/client/assets/{config-WCiNXzjt.js → config-Dym8HnZx.js} +1 -1
- package/dist/client/assets/{connect-DLGiSP8T.js → connect-fTG8J5lb.js} +1 -1
- package/dist/client/assets/{connect-layout-CNNNLoN2.js → connect-layout-CZZqsNI2.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-Cg4v3gLs.js → connect-source-dialog-CncrwAT8.js} +1 -1
- package/dist/client/assets/{connection-CzlaCPJq.js → connection-O8PnXJZi.js} +1 -1
- package/dist/client/assets/{connection-card-CjGnO0Ri.js → connection-card-RdKzW886.js} +1 -1
- package/dist/client/assets/{connection-detail-D365Js6w.js → connection-detail-DnfNkGSf.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CawPAK_n.js → connection-form-helpers-DVNTeSdC.js} +1 -1
- package/dist/client/assets/{connections-DbN9BdDL.js → connections-ByI0uD_U.js} +1 -1
- package/dist/client/assets/{content-tab-C1tQDTq7.js → content-tab-2K6f0sFB.js} +3 -3
- package/dist/client/assets/context-Dgv8u1kZ.js +1 -0
- package/dist/client/assets/{context-menu-Bd0pwq73.js → context-menu-_6aSLrNv.js} +1 -1
- package/dist/client/assets/{context-shell-C1Kw7dMX.js → context-shell-Dkh3MlNJ.js} +3 -3
- package/dist/client/assets/{core.esm-zhMGnPAC.js → core.esm-Co0itmj7.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DZOV2tdP.js → create-organization-dialog-QEydhapH.js} +1 -1
- package/dist/client/assets/{daily-pulse-CDcSWhDN.js → daily-pulse-D_SGGhIw.js} +1 -1
- package/dist/client/assets/discover-DmiBR0qW.js +1 -0
- package/dist/client/assets/{domain-settings-DxPYhNKL.js → domain-settings-Cf2W5c-a.js} +1 -1
- package/dist/client/assets/{drawer-DwHfH-sA.js → drawer-DgxlyKrC.js} +1 -1
- package/dist/client/assets/{editor-DXRzzVaI.js → editor-BlDtkpHT.js} +1 -1
- package/dist/client/assets/{editor-classes-B7ulbs0R.js → editor-classes-DHW6XsZP.js} +1 -1
- package/dist/client/assets/{empty-state-DqSsZioU.js → empty-state-CnCcC-8N.js} +1 -1
- package/dist/client/assets/{empty-state-B8Cr5koP.js → empty-state-DQH-DiCp.js} +1 -1
- package/dist/client/assets/{experiments-tab-DBTc5aio.js → experiments-tab-DN2DbmCx.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-CrG17v1a.js → experiments-tab-choice-B2cKHyhG.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dla-1nU5.js → extract-connection-data-BRZSg9CO.js} +1 -1
- package/dist/client/assets/{feature-gate-D5llTI9B.js → feature-gate-x6qhrhaG.js} +1 -1
- package/dist/client/assets/{feature-paywall-CtXPfbqb.js → feature-paywall-CypZbR93.js} +1 -1
- package/dist/client/assets/file-explorer-DG9-Rlc5.js +2 -0
- package/dist/client/assets/{file-preview-DPwUrUMN.js → file-preview-C4Z-YwH_.js} +1 -1
- package/dist/client/assets/{file-share-button-CjybY8Tm.js → file-share-button-DKZ7oEEn.js} +1 -1
- package/dist/client/assets/{file-type-icon-atKRN7rs.js → file-type-icon-BrZE8mnq.js} +1 -1
- package/dist/client/assets/{folder-icon-C8drmX0B.js → folder-icon-C8Dw6D6B.js} +1 -1
- package/dist/client/assets/{form-CvnFBQeW.js → form-DAT0TK1w.js} +1 -1
- package/dist/client/assets/{general-g7FZh5JJ.js → general-PUVNuDbw.js} +1 -1
- package/dist/client/assets/{held-block-view-DC6RQ2ea.js → held-block-view-rTOQRrzA.js} +3 -3
- package/dist/client/assets/home-B7Ic73m_.js +1 -0
- package/dist/client/assets/{hosted-publish-feedback-Bw27VuV1.js → hosted-publish-feedback-BYd2t20V.js} +1 -1
- package/dist/client/assets/{icon-button-tNw7Vtkn.js → icon-button-DIxoXQKV.js} +1 -1
- package/dist/client/assets/{index-B7Z9Kjbd.js → index-7SN0ucfq.js} +1 -1
- package/dist/client/assets/{index-DEnpRpne.js → index-BIIhX81I.js} +1 -1
- package/dist/client/assets/{index-CjaC6Nzi.js → index-BYpbKN34.js} +1 -1
- package/dist/client/assets/{index-6v-K5Cxc.js → index-BZRrEhsu.js} +1 -1
- package/dist/client/assets/{index-D-3p39v6.js → index-CQj5kSP7.js} +1 -1
- package/dist/client/assets/{index-eCzOjcqZ.js → index-Ca4Q75r_.js} +1 -1
- package/dist/client/assets/{index-DJ9iifq3.js → index-CjPh5dsm.js} +1 -1
- package/dist/client/assets/{index-BmrPuilw.js → index-CquZHSaS.js} +1 -1
- package/dist/client/assets/{index-CRRvfbCE.js → index-Cuqx2rXt.js} +1 -1
- package/dist/client/assets/{index-jw3DdvOr.js → index-Cxx5SZO5.js} +72 -72
- package/dist/client/assets/index-DJP2Tw2D.css +1 -0
- package/dist/client/assets/{index-CvUkMVxT.js → index-DZn-HYwc.js} +1 -1
- package/dist/client/assets/{index-dussYvC6.js → index-DbfDgKss.js} +1 -1
- package/dist/client/assets/{index-BcdLONw1.js → index-TAei2O9I.js} +2 -2
- package/dist/client/assets/{index-B8MW0sM8.js → index-qt5sLImf.js} +1 -1
- package/dist/client/assets/{index-redirect-54mWoDNH.js → index-redirect-C2mEcSuz.js} +1 -1
- package/dist/client/assets/{index-B94lWY4a.js → index-z9eosAhj.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-gBCPzHMW.js → infiniteQueryObserver-B9PBW4Q3.js} +1 -1
- package/dist/client/assets/{infra-billing-CXAOc9fj.js → infra-billing-Cdw4wy6i.js} +1 -1
- package/dist/client/assets/{input-BaD0fonC.js → input-BFXymFUo.js} +1 -1
- package/dist/client/assets/{input-B5josieU.js → input-dt9X0pvp.js} +3 -3
- package/dist/client/assets/{integration-icon-B9fBbTRM.js → integration-icon-DGyeG5wp.js} +1 -1
- package/dist/client/assets/{jira-icon-Bv5ageBy.js → jira-icon-aE2LRXUv.js} +1 -1
- package/dist/client/assets/{label-AxYpTX_1.js → label-Ctu3ACGH.js} +1 -1
- package/dist/client/assets/{layout-B5vknD3M.js → layout-BBi67rPP.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BFbHZHpR.js → legacy-agents-deep-DXm2VUys.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BJmOQ_Qr.js → legacy-main-redirect-xLzp4sos.js} +1 -1
- package/dist/client/assets/library-DXmyt1Gx.js +1 -0
- package/dist/client/assets/{login-Buyl7JH1.js → login-C4ik3KAa.js} +1 -1
- package/dist/client/assets/{markdown-BLdpFCyC.js → markdown-CWAWXi60.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DRzRUUGp.js → mcp-app-renderer-C2UU8TPW.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D7qBhGvW.js → mcp-oauth-BgczWCl7.js} +1 -1
- package/dist/client/assets/{mcp-oauth-GHz9sJ7e.js → mcp-oauth-DPnnrdpS.js} +1 -1
- package/dist/client/assets/{members-Bf_F_O6R.js → members-DYgO8xeR.js} +1 -1
- package/dist/client/assets/{memory-BcKxkoiN.js → memory-8RSHKutI.js} +1 -1
- package/dist/client/assets/{mini-report-page-sWiMdQYS.js → mini-report-page-Cok-AWQD.js} +1 -1
- package/dist/client/assets/{mock-board-B4kACMFO.js → mock-board-Nc8P3HCB.js} +3 -3
- package/dist/client/assets/{monaco-editor-VsGaeTlY.js → monaco-editor-D4Zh5ulV.js} +1 -1
- package/dist/client/assets/monitoring-00U9_JaZ.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-Dgt34E1T.js → monitoring-stats-row-Bo4buMTd.js} +1 -1
- package/dist/client/assets/{multi-select-B_sjogy6.js → multi-select-Dgh7zCRl.js} +1 -1
- package/dist/client/assets/{mustache-yKDCM4Gl.js → mustache-BUKtJZnS.js} +1 -1
- package/dist/client/assets/{named-rule-uses-CX5osBfn.js → named-rule-uses-CILvps79.js} +1 -1
- package/dist/client/assets/{new-project-dialog-ClHa96hl.js → new-project-dialog-C8Z9rxsK.js} +1 -1
- package/dist/client/assets/{oauth-callback-AefR7v5s.js → oauth-callback-CE7Uxghr.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D9A1qCvL.js → oauth-callback-ai-provider-CFmbF-CP.js} +1 -1
- package/dist/client/assets/{onboarding-DO2y_lRI.js → onboarding-mOv2Iyev.js} +1 -1
- package/dist/client/assets/{openai-conversation-CSJziSbn.js → openai-conversation-DziaKIXJ.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DX1F54lH.js → optimistic-project-sidebar-views-BA4lpO5g.js} +1 -1
- package/dist/client/assets/{order-monitor-day-DIAgF4SE.js → order-monitor-day-BBlstwBq.js} +1 -1
- package/dist/client/assets/{organization-choice-BODVS_va.js → organization-choice--RODmYz9.js} +1 -1
- package/dist/client/assets/{orgs-CNLkPAm7.js → orgs-cjaXJmLi.js} +1 -1
- package/dist/client/assets/{page-seo-form-qY5CYRud.js → page-seo-form-EchOknJY.js} +1 -1
- package/dist/client/assets/{pair-OxCQAaus.js → pair-D81VUoh8.js} +1 -1
- package/dist/client/assets/{parse-sections-z_HKctjD.js → parse-sections-DqiKgsi7.js} +1 -1
- package/dist/client/assets/plan-D1zAf_A4.js +1 -0
- package/dist/client/assets/{plan-ladder-CKUbxlnA.js → plan-ladder-BM0vfuMg.js} +1 -1
- package/dist/client/assets/{popover-D_zqXHOI.js → popover-Cf5bE8mq.js} +1 -1
- package/dist/client/assets/post-calendar-YSAaYkEq.js +1 -0
- package/dist/client/assets/{post-editor-HGgKbrI4.js → post-editor-BhE1Cpdl.js} +2 -2
- package/dist/client/assets/{preview-content-CJ61-rUc.js → preview-content-CD6AbYC3.js} +1 -1
- package/dist/client/assets/{preview-dialog-BK9o5Sfr.js → preview-dialog-CDAUzIIz.js} +1 -1
- package/dist/client/assets/{preview-panel-BXi2z9ZS.js → preview-panel-CSWXyf1I.js} +1 -1
- package/dist/client/assets/{preview-tab-DcoTzGz1.js → preview-tab-C8fq_RoO.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-C07nOSmf.js → product-picker-dialog-CxqpXPuE.js} +1 -1
- package/dist/client/assets/{profile-cTk6HZeq.js → profile-CqAQF01N.js} +1 -1
- package/dist/client/assets/project-app-view-D3SaQmET.js +1 -0
- package/dist/client/assets/{project-apps-CdmH-juT.js → project-apps-CcjoYUnG.js} +1 -1
- package/dist/client/assets/{project-feed-CccYGCuU.js → project-feed-BwJVQ7vC.js} +1 -1
- package/dist/client/assets/{project-icon-xQhHEp3k.js → project-icon-iIrZc685.js} +1 -1
- package/dist/client/assets/project-reports-BMuAb39w.js +1 -0
- package/dist/client/assets/project-tasks-DoKHGxuy.js +1 -0
- package/dist/client/assets/{projects-IW3VI19D.js → projects-B1CcZpiT.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BEGBHesv.js → projects-empty-state-Bv5rWYhh.js} +1 -1
- package/dist/client/assets/{prompts-DsqH7xMN.js → prompts-Cf1xjNSu.js} +1 -1
- package/dist/client/assets/record-editor-AV1QHLlq.js +1 -0
- package/dist/client/assets/redirect-editor-DIiWED7H.js +1 -0
- package/dist/client/assets/{releases-api-CsaPRJw2.js → releases-api-DGvWHx7z.js} +1 -1
- package/dist/client/assets/reports-BNzwh8kk.js +1 -0
- package/dist/client/assets/{reports-CUlpuQ2Z.js → reports-DzSrMl4z.js} +1 -1
- package/dist/client/assets/{reports-onboarding-B2pSWrRV.js → reports-onboarding-BME_pd6z.js} +1 -1
- package/dist/client/assets/reports-tab-BXCeTXce.js +2 -0
- package/dist/client/assets/{repositories-CpN7bETs.js → repositories-Cfi5wijd.js} +1 -1
- package/dist/client/assets/repositories-yB6zWwua.js +1 -0
- package/dist/client/assets/{repository-binding-DtKjkNiS.js → repository-binding-CkScpIsb.js} +1 -1
- package/dist/client/assets/{repository-import-picker-T9uxw-6-.js → repository-import-picker-BS8H9PxV.js} +1 -1
- package/dist/client/assets/{repository-picker-BDi8y63n.js → repository-picker-l4M27wFx.js} +1 -1
- package/dist/client/assets/{require-capability-nIOBAh71.js → require-capability-DLhsbUyc.js} +1 -1
- package/dist/client/assets/{required-auth-layout-B_ag2iIH.js → required-auth-layout-CulRsSVA.js} +1 -1
- package/dist/client/assets/{reset-password-BtxS108c.js → reset-password-CfDFawIV.js} +1 -1
- package/dist/client/assets/{resizable-B3nlFFSB.js → resizable-BFC1GeuR.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DXMIcSK3.js → resolve-tab-icon-BsW126zu.js} +1 -1
- package/dist/client/assets/{review-settings-BCmy9X9w.js → review-settings-BayMZpjl.js} +1 -1
- package/dist/client/assets/roles-DjGn6KVP.js +1 -0
- package/dist/client/assets/route-BR5FTjOO.js +1 -0
- package/dist/client/assets/route-EfequOdl.js +1 -0
- package/dist/client/assets/route-iXyqQPnW.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-Cr7WUuDz.js → sandbox-lifecycle-context-Dz_wNlv5.js} +1 -1
- package/dist/client/assets/{schema-wV4JUbYo.js → schema-B6wL-gff.js} +1 -1
- package/dist/client/assets/{schema-78fwu3zk.js → schema-WheR11j2.js} +1 -1
- package/dist/client/assets/{scroll-area-DfV0OgKi.js → scroll-area-rwjRqyfO.js} +1 -1
- package/dist/client/assets/{search-input-CPdh0iQL.js → search-input-CzCH_VIY.js} +1 -1
- package/dist/client/assets/{search-toggle-QzT5qdh_.js → search-toggle-BLa7geCi.js} +1 -1
- package/dist/client/assets/{secret-picker-D0FfmGN6.js → secret-picker-3QlkMO3w.js} +1 -1
- package/dist/client/assets/{secrets-L2yyTEJV.js → secrets-BhKAJ53J.js} +1 -1
- package/dist/client/assets/{section-array-field-Dr6WXwVQ.js → section-array-field-D9y7NMQM.js} +1 -1
- package/dist/client/assets/{sections-agVJaal8.js → sections-DvRVP9Dz.js} +1 -1
- package/dist/client/assets/sections-editor-Cy509EcE.js +1 -0
- package/dist/client/assets/{select-DQCVbj5T.js → select-UpCSfNOV.js} +1 -1
- package/dist/client/assets/{select-model-DmTLEUs6.js → select-model-xVaNPfcs.js} +1 -1
- package/dist/client/assets/seo-editor-BO3Jt0hb.js +1 -0
- package/dist/client/assets/{separator-B4y24369.js → separator-BPjv6lnz.js} +1 -1
- package/dist/client/assets/settings-tab-BFy7GozF.js +1 -0
- package/dist/client/assets/{sheet-CpISCuUN.js → sheet-COugYrjn.js} +1 -1
- package/dist/client/assets/shell-layout-e38uIahb.js +1 -0
- package/dist/client/assets/{site-draft-actions-D5J4u3-G.js → site-draft-actions-BXCMIWnV.js} +1 -1
- package/dist/client/assets/{site-draft-view-Dpvxra5M.js → site-draft-view-BfiVi6ch.js} +2 -2
- package/dist/client/assets/site-editor-BSPzYjtA.js +1 -0
- package/dist/client/assets/{site-editor-toast-DMNMCEOx.js → site-editor-toast-BafJU0kP.js} +1 -1
- package/dist/client/assets/{skills-BoFU4NLH.js → skills-Dw8G18Wk.js} +1 -1
- package/dist/client/assets/{slider-QCpv6LMm.js → slider-CW5CKPMF.js} +1 -1
- package/dist/client/assets/{sortable.esm-DEwGuCnL.js → sortable.esm-BfvWiQ7R.js} +1 -1
- package/dist/client/assets/{sso-CQ00JKfM.js → sso-C-6FjTmB.js} +1 -1
- package/dist/client/assets/{suggestion-BAlr69L-.js → suggestion-DmUPHSiw.js} +1 -1
- package/dist/client/assets/{switch-To5TyIkS.js → switch-C5GqEaZ9.js} +1 -1
- package/dist/client/assets/{symbol-DnfVmC0I.js → symbol-B_TAz0Ej.js} +1 -1
- package/dist/client/assets/{synced-repos-CW07ys29.js → synced-repos-BvOzTrqp.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-C3xAvHpF.js → tab-icon-glyph-CjnfHMM2.js} +1 -1
- package/dist/client/assets/{table-Cm1jH1V8.js → table-B203jObX.js} +1 -1
- package/dist/client/assets/{tabs-DgcKTFd2.js → tabs-DFO0cUd4.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-C9KHH6o7.js → task-assignee-avatar-Dcgi6zr9.js} +1 -1
- package/dist/client/assets/{task-board-BHxUa5hm.js → task-board-D0I9TrF7.js} +1 -1
- package/dist/client/assets/{task-route-BcKr-6il.js → task-route-F6hd-KVw.js} +1 -1
- package/dist/client/assets/{task-status-CihJb7N-.js → task-status-OQPi7i4V.js} +1 -1
- package/dist/client/assets/taskboard-analytics-eo8rY3BR.js +1 -0
- package/dist/client/assets/{tasks-DmkTP1d2.js → tasks-Bkp6Ztlp.js} +1 -1
- package/dist/client/assets/tasks-ofNfVL13.js +1 -0
- package/dist/client/assets/{textarea-B9s0J6-L.js → textarea-xiPVXzgn.js} +1 -1
- package/dist/client/assets/thread-analytics-D1pWKSrS.js +1 -0
- package/dist/client/assets/{thread-intent-Ccijo8FW.js → thread-intent-DJ7MUI-X.js} +1 -1
- package/dist/client/assets/{thread-route-BVfnsSUg.js → thread-route-DwUdsrkJ.js} +1 -1
- package/dist/client/assets/{thread-route-EFpj5Q3M.js → thread-route-p_tHH1KN.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CZDpkSjN.js → thread-sheet-body-B5yV21k9.js} +1 -1
- package/dist/client/assets/{time-range-picker--2ATryhW.js → time-range-picker-B9K0oYAh.js} +1 -1
- package/dist/client/assets/{toggle-group-DduyGFUi.js → toggle-group-epTzYWN_.js} +1 -1
- package/dist/client/assets/{tool-namespace-6L147wmT.js → tool-namespace-BnR-5HvH.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CJNt4JSM.js → toolbar-icon-button-BtdQ071s.js} +1 -1
- package/dist/client/assets/{tooltip-DLcu2pQg.js → tooltip-BFWyx7Tu.js} +1 -1
- package/dist/client/assets/{tooltipContext-DCi7f8uY.js → tooltipContext-HIsDwgpv.js} +1 -1
- package/dist/client/assets/{track-Dy2j0QPi.js → track-D-nJPAhp.js} +1 -1
- package/dist/client/assets/{types-ulH2EtVa.js → types-Bg6xzMsU.js} +1 -1
- package/dist/client/assets/{url-slug-Dth3-7Lg.js → url-slug-CtldY3Fc.js} +1 -1
- package/dist/client/assets/{usage-stats-BsWORl3Y.js → usage-stats-BmyhY2hQ.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CDuQs1Ba.js → use-ai-providers-D9fgOV9l.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-DX5HKcUc.js → use-apply-named-rule-IXYmBDIE.js} +1 -1
- package/dist/client/assets/{use-automations-BkQQphI-.js → use-automations-C69NPUwP.js} +1 -1
- package/dist/client/assets/{use-autosave-COKIMqY3.js → use-autosave-CTJSaQ0_.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-q8zIlEKg.js → use-chat-layout-state-CJZYxlgv.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DvR_TVIp.js → use-clock-tick-DREB10jn.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-CtPjI-ot.js → use-cms-publish-actions-DMKczmsK.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Cp6JhT2N.js → use-connect-companion-BjwYn44-.js} +1 -1
- package/dist/client/assets/{use-connection-Db-d2gM4.js → use-connection-K2ZmGfOt.js} +1 -1
- package/dist/client/assets/{use-copy-CFaa1ury.js → use-copy-BaUwV4kr.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-2eMz1ync.js → use-create-virtual-mcp-BwVPiDjw.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BHD_nJoW.js → use-date-fns-locale-DENjQBhy.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D6U_Nh6G.js → use-debounced-autosave-dbZuRAQA.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CG9ZLPPy.js → use-debounced-value-FWET2Ehv.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BnbotBEA.js → use-deco-credits-1VNQ8RMw.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-ksPa8i5N.js → use-decopilot-events-CUD4NK1e.js} +1 -1
- package/dist/client/assets/{use-delete-connection-oEmkyu4y.js → use-delete-connection-CgFangVs.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D3CEjNIr.js → use-deployment-admin-zH7DDGue.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-ZoCxf2ZD.js → use-fast-preview-draft-url-DoiFL4L5.js} +1 -1
- package/dist/client/assets/{use-file-configs-B44eMCbV.js → use-file-configs-DUC_lmME.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BfLIAiPb.js → use-inbox-feed-CqYC-MvT.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DBF3UBOd.js → use-infinite-scroll-Ch7Ei01m.js} +1 -1
- package/dist/client/assets/{use-join-requests-DkoaB_8d.js → use-join-requests-DErzm4wT.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CSwFtAqH.js → use-main-panel-tabs-BSyzNm2k.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-IG57wBXS.js → use-mcp-auth-status-k4owDbnR.js} +1 -1
- package/dist/client/assets/{use-mcp-client-D6ElS18M.js → use-mcp-client-DogzcDtd.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-mpX7ubid.js → use-mcp-prompts-BWPx5MeN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-RoAM8bpH.js → use-mcp-tools-DdYwCCdP.js} +1 -1
- package/dist/client/assets/{use-mobile-BhX1NLy5.js → use-mobile-DcPhAAsp.js} +1 -1
- package/dist/client/assets/{use-move-blocks-Dh_gfkYv.js → use-move-blocks-DWaZEG7l.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DvIbqsvD.js → use-navigate-to-agent-IXTtvMGy.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-BhG-chrX.js → use-open-billing-url-NkAi-AAT.js} +1 -1
- package/dist/client/assets/{use-org-fs-D0eNRBo9.js → use-org-fs-DjqN5PQk.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DsydKk88.js → use-org-repo-syncs-Cb1LW2ou.js} +1 -1
- package/dist/client/assets/{use-org-sso-UCXyI2OA.js → use-org-sso-C5KRT8Da.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Bjl-mDvF.js → use-organization-roles-D7Za_lux.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D8VzrTTn.js → use-organization-settings-DR7d93_z.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DEgeFNQE.js → use-panel-navigate-BCKq-TfH.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CaoNxrcp.js → use-project-native-view-presence-CJUNczNu.js} +1 -1
- package/dist/client/assets/{use-project-scope-CgFUZ469.js → use-project-scope-B0et_e8n.js} +1 -1
- package/dist/client/assets/{use-recent-apps-SJDHdi4L.js → use-recent-apps-4hKksVnL.js} +1 -1
- package/dist/client/assets/{use-releases-fWajfQaL.js → use-releases-Brxi4pIf.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-D_npl6GZ.js → use-reports-diagnostic-BrQisY2f.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-BMnvtQwc.js → use-sandbox-events-BY2iUkYN.js} +1 -1
- package/dist/client/assets/{use-secrets-JASayNqi.js → use-secrets-BadtzYAw.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-ohDfhWi5.js → use-section-preview-base-dBughhn0.js} +1 -1
- package/dist/client/assets/{use-session-runtime-DryciBRX.js → use-session-runtime-B4KIbkK7.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-CQK6aXTW.js → use-sidebar-collapsed-cT1Flise.js} +1 -1
- package/dist/client/assets/{use-tags-o7wc3HiD.js → use-tags-TSeOGije.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-bsWF1h2C.js → use-task-board-analytics-DDlJfCk9.js} +1 -1
- package/dist/client/assets/{use-task-board-events-SAn8PfW_.js → use-task-board-events-DgTjbss7.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-D-umSt3D.js → use-task-board-item-prs-JnKytEtF.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DA-WZVqc.js → use-task-metadata-CqY7HgDo.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-KDFFr__j.js → use-thread-analytics-BPVVv0U5.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-B_UwhMzs.js → use-thread-outputs-CjJgHscq.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DocXgAgp.js +1 -0
- package/dist/client/assets/{useQueries-CosN8kAH.js → useQueries-BxI-y7oE.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DfsNYX5W.js +1 -0
- package/dist/client/assets/{users-C_8K5Z80.js → users-DgL9fzoZ.js} +1 -1
- package/dist/client/assets/{utils-Bt7oFx0a.js → utils-CEKLHG87.js} +1 -1
- package/dist/client/assets/{variant-calendar-HAwNz-2g.js → variant-calendar-rECJW6F2.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-Dr4jtjND.js → variant-matcher-override-B10eyFaR.js} +1 -1
- package/dist/client/assets/{view-header-BQwancqI.js → view-header-CnoXEZ6r.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BBtFX4b6.js → virtual-mcp-skvwiaad.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-Br6EL-rz.js → watch-sse-pool-BD6-sAKH.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +613 -613
- package/package.json +1 -1
- package/dist/client/assets/agent-analytics-DbjlHcVD.js +0 -2
- package/dist/client/assets/agent-app-DOt96j6b.js +0 -1
- package/dist/client/assets/agent-assets-nbJB8Oj2.js +0 -1
- package/dist/client/assets/agent-automations-D6sZ_uH1.js +0 -1
- package/dist/client/assets/agent-calendar-BeZfFvdy.js +0 -1
- package/dist/client/assets/agent-connect-sources-DPusFnZo.js +0 -1
- package/dist/client/assets/agent-deck-DHKRFst_.js +0 -1
- package/dist/client/assets/agent-e2e-R0CFT0l9.js +0 -1
- package/dist/client/assets/agent-experiments-CCB9X1v6.js +0 -1
- package/dist/client/assets/agent-file-CcNzA3hw.js +0 -1
- package/dist/client/assets/agent-hosting-DxbirQPV.js +0 -1
- package/dist/client/assets/agent-library-BEvE_-Ti.js +0 -1
- package/dist/client/assets/agent-library-file-CN9ZdgKY.js +0 -1
- package/dist/client/assets/agent-monitor-Bsotvv6A.js +0 -1
- package/dist/client/assets/agent-overview-Vo6g6VkH.js +0 -1
- package/dist/client/assets/agent-releases-ewE3U_5H.js +0 -2
- package/dist/client/assets/agent-settings-CLevnhNd.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BSOZTg5X.js +0 -2
- package/dist/client/assets/agent-site-editor-content-ygftdw-u.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-vZkvWMtS.js +0 -1
- package/dist/client/assets/agent-view-_KtaC3vc.js +0 -1
- package/dist/client/assets/api-keys-B2jnNbq9.js +0 -1
- package/dist/client/assets/app-editor-B-xgwIvk.js +0 -1
- package/dist/client/assets/category-editor-TaYKSOTk.js +0 -1
- package/dist/client/assets/cms-settings-editor-DdSslz-Q.js +0 -1
- package/dist/client/assets/collection-detail-D2cp8f3g.js +0 -1
- package/dist/client/assets/context-E79zhaXJ.js +0 -1
- package/dist/client/assets/discover-CFZrxFV0.js +0 -1
- package/dist/client/assets/file-explorer-rhDqu7jb.js +0 -2
- package/dist/client/assets/home-s82JYS5_.js +0 -1
- package/dist/client/assets/index-u-z_8GjU.css +0 -1
- package/dist/client/assets/library-DgTUGukD.js +0 -1
- package/dist/client/assets/monitoring-DMfNbo9x.js +0 -1
- package/dist/client/assets/plan-DKdj8O1S.js +0 -1
- package/dist/client/assets/post-calendar-BNad5FW9.js +0 -1
- package/dist/client/assets/project-app-view-BTP5n96V.js +0 -1
- package/dist/client/assets/project-reports-BpBTuHCJ.js +0 -1
- package/dist/client/assets/project-tasks-BWT7BsyY.js +0 -1
- package/dist/client/assets/record-editor-yA5vPrbM.js +0 -1
- package/dist/client/assets/redirect-editor-vrMsWLvF.js +0 -1
- package/dist/client/assets/reports-9FYZncTq.js +0 -1
- package/dist/client/assets/reports-tab-dQtRjvhB.js +0 -2
- package/dist/client/assets/repositories-qqa6gdmW.js +0 -1
- package/dist/client/assets/roles-CY77O_Rd.js +0 -1
- package/dist/client/assets/route-B9i-fUii.js +0 -1
- package/dist/client/assets/route-BpU761sd.js +0 -1
- package/dist/client/assets/route-DBRYZRDx.js +0 -1
- package/dist/client/assets/sections-editor-sY02MOga.js +0 -1
- package/dist/client/assets/seo-editor-BaTgHacI.js +0 -1
- package/dist/client/assets/settings-tab-CUKwi17R.js +0 -1
- package/dist/client/assets/shell-layout-DGAwwzx5.js +0 -1
- package/dist/client/assets/site-editor-BCqGKNmQ.js +0 -1
- package/dist/client/assets/taskboard-analytics-D_b8yWyw.js +0 -1
- package/dist/client/assets/tasks-DpdKZV3j.js +0 -1
- package/dist/client/assets/thread-analytics-B3XBAn3B.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CcUhW7AW.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DCy5Ucgo.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as je,j as s,b as Ke,r as A,ay as Ne,l as Re,h as Te,t as xe}from"./index-Cxx5SZO5.js";import{u as Ce}from"./chat-context-D2EaExW5.js";import{S as Fe}from"./scroll-area-rwjRqyfO.js";import{u as Ie,A as Pe}from"./use-section-preview-base-dBughhn0.js";import{o as Me,ax as $e}from"./parse-sections-DqiKgsi7.js";import{H as Oe,d as Ue,u as Ve,v as ze,F as Le,w as qe,a as Ge,t as He,G as De}from"./held-block-view-rTOQRrzA.js";import{n as Ze,r as Je}from"./content-tab-2K6f0sFB.js";import"./use-panel-navigate-BCKq-TfH.js";import"./thread-route-p_tHH1KN.js";import"./use-project-scope-B0et_e8n.js";import"./repository-binding-CkScpIsb.js";import"./use-mcp-client-DogzcDtd.js";import"./auth-BawzvLgB.js";import"./autosend-BSe8DnJN.js";import"./thread-intent-DJ7MUI-X.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BD6-sAKH.js";import"./task-board-D0I9TrF7.js";import"./schema-WheR11j2.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-CUD4NK1e.js";import"./use-ai-providers-D9fgOV9l.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-DR7d93_z.js";import"./index-BdQq_4o_.js";import"./UserSquare-CmbcjiWL.js";import"./agent-icon-DMLbHyqZ.js";import"./AlertCircle-BWrNX7mN.js";import"./Tool01-OTauJJp3.js";import"./ArrowUp-CyzDPNV4.js";import"./ArrowLeft-DHx5ko4s.js";import"./LinkBroken01-C5q0tEvS.js";import"./ShoppingBag01-UnxomIP0.js";import"./ZoomOut-BIPVG3Mi.js";import"./Building02-DhL5SQYW.js";import"./CheckCircle-BJwUqTIe.js";import"./ChevronUp-BsFnjeNK.js";import"./ChevronSelectorVertical-BsFKOzFl.js";import"./Copy01-BMtss9AJ.js";import"./CreditCard01-DpJ5HaJ6.js";import"./DotsVertical-7Rm5ttPh.js";import"./Image01-B1C03E_N.js";import"./Globe04-BJeMTkc9.js";import"./SwitchHorizontal01-Dr_PPdbH.js";import"./Key01-AhMvx8Bf.js";import"./Link01-p8humFYG.js";import"./Minus-BMakGco3.js";import"./Monitor01-CLwaIfNu.js";import"./Sun-B5QvK7X9.js";import"./Play-BoOYKEkH.js";import"./Plus-D7X276kv.js";import"./SearchMd-BzDAUJSU.js";import"./Trash01-DzCXEeuM.js";import"./Upload01-2E_Vrojt.js";import"./Users01-BFgiCQPh.js";import"./XClose-BF4dTiHJ.js";import"./section-preview-url-7zfngvgW.js";import"./use-session-runtime-B4KIbkK7.js";import"./site-editor-toast-BafJU0kP.js";import"./experiments-tab-choice-B2cKHyhG.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-CEKLHG87.js";import"./use-sandbox-events-BY2iUkYN.js";import"./sandbox-git-api-DcqI6XE4.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-D81VUoh8.js";import"./collapsible-DTK_WJix.js";import"./use-copy-BaUwV4kr.js";import"./usage-stats-BmyhY2hQ.js";import"./tool-namespace-BnR-5HvH.js";import"./form-DAT0TK1w.js";import"./label-Ctu3ACGH.js";import"./utils-CVEq3hMx.js";import"./markdown-CWAWXi60.js";import"./use-mobile-DcPhAAsp.js";import"./tooltip-BFWyx7Tu.js";import"./index-z9eosAhj.js";import"./use-clock-tick-DREB10jn.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C2UU8TPW.js";import"./types-Bg6xzMsU.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./shell-layout-e38uIahb.js";import"./use-deployment-admin-zH7DDGue.js";import"./admin-fetch-BhTJlAsX.js";import"./command-MDi6OAC1.js";import"./index-7SN0ucfq.js";import"./integration-icon-DGyeG5wp.js";import"./project-icon-iIrZc685.js";import"./new-project-dialog-C8Z9rxsK.js";import"./repository-import-picker-BS8H9PxV.js";import"./use-navigate-to-agent-IXTtvMGy.js";import"./repository-picker-l4M27wFx.js";import"./useInfiniteQuery-DocXgAgp.js";import"./infiniteQueryObserver-B9PBW4Q3.js";import"./collection-search-Qr0hkbHz.js";import"./use-debounced-value-FWET2Ehv.js";import"./required-auth-layout-CulRsSVA.js";import"./use-org-sso-C5KRT8Da.js";import"./sheet-COugYrjn.js";import"./use-connection-K2ZmGfOt.js";import"./use-mcp-prompts-BWPx5MeN.js";import"./use-thread-outputs-CjJgHscq.js";import"./file-type-icon-BrZE8mnq.js";import"./section-array-field-D9y7NMQM.js";import"./alert-BAjsKun9.js";import"./blocks-tab-states-B7iQVWp6.js";import"./slider-CW5CKPMF.js";import"./index-CQj5kSP7.js";import"./tooltipContext-HIsDwgpv.js";import"./CategoricalChart-hUgIZ_pD.js";import"./index-Ca4Q75r_.js";import"./ActiveShapeUtils-DenZ78VA.js";import"./Sector-DZu8Iagq.js";import"./symbol-B_TAz0Ej.js";import"./empty-state-CnCcC-8N.js";import"./switch-C5GqEaZ9.js";import"./textarea-xiPVXzgn.js";import"./popover-Cf5bE8mq.js";import"./monaco-editor-D4Zh5ulV.js";import"./editor-BlDtkpHT.js";import"./calendar-nGMQX5H2.js";import"./select-UpCSfNOV.js";import"./editor-classes-DHW6XsZP.js";import"./core.esm-Co0itmj7.js";import"./sortable.esm-BfvWiQ7R.js";import"./toggle-group-epTzYWN_.js";import"./active-indicator-CCMhAsc_.js";import"./combobox-BDOw2yEp.js";import"./search-input-CzCH_VIY.js";import"./tabs-DFO0cUd4.js";import"./use-file-configs-DUC_lmME.js";import"./asset-utils-BljmC-O4.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./view-header-CnoXEZ6r.js";import"./use-cms-publish-actions-DMKczmsK.js";import"./hosted-publish-feedback-BYd2t20V.js";import"./mustache-BUKtJZnS.js";import"./sandbox-lifecycle-context-Dz_wNlv5.js";import"./checkbox--Oh7M1o0.js";import"./date-utils-CrvIKg-s.js";import"./use-move-blocks-DWaZEG7l.js";import"./badge-Dk9QaMHv.js";import"./empty-state-DQH-DiCp.js";import"./collection-table-wrapper-D6zxNCnG.js";import"./table-B203jObX.js";function Qe(t,e){const m=(t.title||t.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),o=/^[A-Za-z]/.test(m)&&m.length>0?m:"Section",r=Ze(e,o);return{blockKey:r,data:{__resolveType:t.resolveType,name:r}}}function Ur(t){const e=je.c(9),m=t.saveGuard?void 0:t.block!==void 0;let o;e[0]!==t?(o=s.jsx(We,{...t}),e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==t.blockKey||e[3]!==t.branch||e[4]!==t.orgSlug||e[5]!==t.virtualMcpId||e[6]!==m||e[7]!==o?(r=s.jsx(Oe,{orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,blockKey:t.blockKey,present:m,children:o}),e[2]=t.blockKey,e[3]=t.branch,e[4]=t.orgSlug,e[5]=t.virtualMcpId,e[6]=m,e[7]=o,e[8]=r):r=e[8],r}function We(t){const e=je.c(88),{orgSlug:m,virtualMcpId:o,branch:r,blockKey:n,block:x,meta:c,decofile:d,title:Be,excludeFields:D,schemaPending:be,previewBaseUrl:ve,notice:Z,saveGuard:J,persistDefaults:Q}=t,W=be===void 0?!1:be,X=ve===void 0?null:ve,Y=Ce()?.taskId??null,l=Ke();let N;e[0]!==r||e[1]!==X||e[2]!==o?(N={virtualMcpId:o,branch:r,sandboxUrl:X},e[0]=r,e[1]=X,e[2]=o,e[3]=N):N=e[3];const b=Ie(N),u=typeof x?.__resolveType=="string"?x.__resolveType:"";let R;e[4]!==D||e[5]!==c||e[6]!==u?(R=Je(u,c,D),e[4]=D,e[5]=c,e[6]=u,e[7]=R):R=e[7];const v=R;let T;e[8]!==v?(T=!!v&&Object.keys(v.properties??{}).length>0,e[8]=v,e[9]=T):T=e[9];const ee=T,ge=Be??(x?Me(n,x,c):n);let C;e[10]!==r||e[11]!==m||e[12]!==o?(C={orgSlug:m,virtualMcpId:o,branch:r},e[10]=r,e[11]=m,e[12]=o,e[13]=C):C=e[13];let F;e[14]!==J?(F={guard:J,holdsCopy:!0},e[14]=J,e[15]=F):F=e[15];const{save:te,flush:oe,isPending:re}=Ue(C,F);let I;e[16]!==r||e[17]!==m||e[18]!==o?(I={orgSlug:m,virtualMcpId:o,branch:r},e[16]=r,e[17]=m,e[18]=o,e[19]=I):I=e[19];const g=Ve(I);let P;e[20]!==g||e[21]!==l?(P=Ge((i,a)=>g.mutate({blockKey:i,data:a},{onError:p=>xe.error(l("sectionsEditor.sectionsEditor.saveFailed",{error:p.message}))})),e[20]=g,e[21]=l,e[22]=P):P=e[22];const ie=P,[we,_e]=A.useState(n),[se,Se]=A.useState(null),[me,ye]=A.useState(0);let M;e[23]===Symbol.for("react.memo_cache_sentinel")?(M=[],e[23]=M):M=e[23];const[S,ke]=A.useState(M),[ae,f]=A.useState(!1),$=A.useRef(null);we!==n&&(_e(n),Se(null),ye(Ye),ke([]));let O;e[24]!==x?(O=x??{},e[24]=x,e[25]=O):O=e[25];const le=O;let y;e[26]!==se?(y=se??{},e[26]=se,e[27]=y):y=e[27];let U;e[28]!==le||e[29]!==y?(U={...le,...y},e[28]=le,e[29]=y,e[30]=U):U=e[30];const ne=U;let V;e[31]!==n||e[32]!==u||e[33]!==te?(V=i=>{const a=i;Se(a),te(n,{...a,__resolveType:u})},e[31]=n,e[32]=u,e[33]=te,e[34]=V):V=e[34];const ce=V;let z;e[35]===Symbol.for("react.memo_cache_sentinel")?(z=i=>{ke(i)},e[35]=z):z=e[35];const K=z;let L;e[36]!==d||e[37]!==oe||e[38]!==g||e[39]!==l?(L=async(i,a)=>{try{const{blockKey:p,data:h}=Qe(i,d),he=await g.mutateAsync({blockKey:p,data:h});He(he)||xe.success(l("sandbox.appEditor.createdSection",{name:p})),a({__resolveType:p}),oe()}catch(p){const h=p,he=h instanceof Error?h.message:l("sandbox.appEditor.failedAddSection");throw xe.error(he),h}},e[36]=d,e[37]=oe,e[38]=g,e[39]=l,e[40]=L):L=e[40];const k=L;let q;e[41]!==f?(q=i=>{$.current=i.append,f(!0)},e[41]=f,e[42]=q):q=e[42];const pe=q;let G;e[43]!==k||e[44]!==f?(G=async i=>{const a=$.current;if(a)try{await k(i,p=>{a(p),f(!1),$.current=null})}catch{}},e[43]=k,e[44]=f,e[45]=G):G=e[45];const de=G,ue=S.length>0?[ge,...S]:[],Ee="flex h-full flex-col",Ae="flex h-12 shrink-0 items-center justify-between border-b px-6",fe=ue.length>0?s.jsx("nav",{"aria-label":l("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:ue.map((i,a)=>{const p=a===ue.length-1,h=ze(i);return s.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[a>0&&s.jsx(Ne,{className:"size-3 shrink-0 text-muted-foreground/60"}),s.jsx("button",{type:"button",onClick:()=>{K(a===0?[]:Le(S,a)),ye(Xe)},title:h,className:Re("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",p?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:h})]},`${h}-${a}`)})}):s.jsx("span",{className:"text-sm font-medium",children:ge});let j;e[46]!==re?(j=s.jsx(De,{isPending:re,isError:!1}),e[46]=re,e[47]=j):j=e[47];let B;e[48]!==fe||e[49]!==j?(B=s.jsxs("div",{className:Ae,children:[fe,j]}),e[48]=fe,e[49]=j,e[50]=B):B=e[50];let w;e[51]!==n||e[52]!==r||e[53]!==S||e[54]!==d||e[55]!==ne||e[56]!==me||e[57]!==k||e[58]!==K||e[59]!==ce||e[60]!==pe||e[61]!==ee||e[62]!==c||e[63]!==m||e[64]!==Q||e[65]!==u||e[66]!==ie||e[67]!==v||e[68]!==W||e[69]!==b||e[70]!==l||e[71]!==Y||e[72]!==o?(w=ee?s.jsx(qe,{schema:v,value:ne,onChange:ce,persistDefaults:Q,basePath:"",breadcrumbPath:S,onBreadcrumbChange:K,decofile:d,meta:c,onSaveReferencedBlock:ie,previewBaseUrl:b,onAddSectionItem:k,onRequestAddSection:pe,sandbox:{orgSlug:m,virtualMcpId:o,branch:r,threadId:Y}},`${n}:${me}`):W?s.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[s.jsx(Te,{className:"size-4"}),l("sandbox.appEditor.loadingSchema")]}):s.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:l($e(c,u)?"sandbox.appEditor.noEditableSchema":"sandbox.appEditor.schemaAwaitsBuild")}),e[51]=n,e[52]=r,e[53]=S,e[54]=d,e[55]=ne,e[56]=me,e[57]=k,e[58]=K,e[59]=ce,e[60]=pe,e[61]=ee,e[62]=c,e[63]=m,e[64]=Q,e[65]=u,e[66]=ie,e[67]=v,e[68]=W,e[69]=b,e[70]=l,e[71]=Y,e[72]=o,e[73]=w):w=e[73];let _;e[74]!==Z||e[75]!==w?(_=s.jsx(Fe,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"px-6 py-6",children:s.jsxs("div",{className:"mx-auto max-w-xl",children:[Z,w]})})}),e[74]=Z,e[75]=w,e[76]=_):_=e[76];let E;e[77]!==ae||e[78]!==d||e[79]!==de||e[80]!==c||e[81]!==b||e[82]!==f?(E=b&&s.jsx(Pe,{open:ae,onOpenChange:i=>{f(i),i||($.current=null)},meta:c,decofile:d,previewBaseUrl:b,onSelect:i=>{de(i)}}),e[77]=ae,e[78]=d,e[79]=de,e[80]=c,e[81]=b,e[82]=f,e[83]=E):E=e[83];let H;return e[84]!==B||e[85]!==_||e[86]!==E?(H=s.jsxs("div",{className:Ee,children:[B,_,E]}),e[84]=B,e[85]=_,e[86]=E,e[87]=H):H=e[87],H}function Xe(t){return t+1}function Ye(t){return t+1}export{Ur as AppEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,a4 as d,e as g,aq as m,K as I,q as O}from"./index-
|
|
1
|
+
import{c as u,a4 as d,e as g,aq as m,K as I,q as O}from"./index-Cxx5SZO5.js";import{u as $}from"./useInfiniteQuery-DocXgAgp.js";function T(e){const t=u.c(17),{org:s}=d(),c=m();let i,n,o,l;t[0]!==s.id||t[1]!==e.configId||t[2]!==e.imageOnly||t[3]!==e.search?(n=e.search?.trim()||void 0,i=e.imageOnly??!1,l=$,o=I.filePickerObjects(s.id,e.configId,n,i),t[0]=s.id,t[1]=e.configId,t[2]=e.imageOnly,t[3]=e.search,t[4]=i,t[5]=n,t[6]=o,t[7]=l):(i=t[4],n=t[5],o=t[6],l=t[7]);const r=e.enabled!==!1&&!!e.configId;let a;t[8]!==i||t[9]!==e.configId||t[10]!==n||t[11]!==c?(a=async y=>{const{pageParam:p}=y;return await c.call("FILE_OBJECTS_LIST",{configId:e.configId,cursor:p??void 0,search:n,imageOnly:i||void 0})},t[8]=i,t[9]=e.configId,t[10]=n,t[11]=c,t[12]=a):a=t[12];let f;return t[13]!==o||t[14]!==r||t[15]!==a?(f={queryKey:o,enabled:r,staleTime:3e4,initialPageParam:null,queryFn:a,getNextPageParam:h},t[13]=o,t[14]=r,t[15]=a,t[16]=f):f=t[16],l(f)}function h(e){return e.nextCursor??void 0}function E(){const e=u.c(2),{org:t}=d();let s;return e[0]!==t?(s={mutationFn:async c=>{const i=c.file.type||"application/octet-stream",n=await fetch(`/api/${encodeURIComponent(t.slug)}/file-configs/${encodeURIComponent(c.configId)}/upload?filename=${encodeURIComponent(c.file.name)}`,{method:"POST",headers:{"Content-Type":i},body:c.file});if(!n.ok){const o=await n.text().catch(x);let l=`${n.status} ${n.statusText}`;try{const r=JSON.parse(o);r.message&&(l=r.message)}catch{o&&(l=o.slice(0,200))}throw new Error(`Upload failed: ${l}`)}return await n.json()}},e[0]=t,e[1]=s):s=e[1],g(s)}function x(){return""}function F(){const e=u.c(8),{org:t}=d(),s=m(),c=O();let i;e[0]!==s?(i=l=>s.call("FILE_OBJECT_DELETE",l),e[0]=s,e[1]=i):i=e[1];let n;e[2]!==t||e[3]!==c?(n=(l,r)=>{c.invalidateQueries({queryKey:I.filePickerObjectsByConfig(t.id,r.configId)})},e[2]=t,e[3]=c,e[4]=n):n=e[4];let o;return e[5]!==i||e[6]!==n?(o={mutationFn:i,onSuccess:n},e[5]=i,e[6]=n,e[7]=o):o=e[7],g(o)}function w(e){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(e)}function S(e){const t=e.lastIndexOf(".");return t<0||t===e.length-1?"file":e.slice(t+1).toLowerCase()}function v(e){const t=e.split("/");return t[t.length-1]??e}function _(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}export{E as a,v as b,F as c,S as e,_ as f,w as i,T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c9 as v,ca as $,cb as W,cc as H,cd as D,ce as y,cf as V,cg as x,ch as L,ci as j,cj as q,ck as N,cl as B,cm as Z,cn as F}from"./index-jw3DdvOr.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await P(c,{fetchFn:i}),!o)try{o=await T(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(b),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function T(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return j.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function P(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await T(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await P(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return q.parse(await s.json())}export{pe as U,P as a,_e as b,Ue as c,T as d,me as e};
|
|
1
|
+
import{c9 as v,ca as $,cb as W,cc as H,cd as D,ce as y,cf as V,cg as x,ch as L,ci as j,cj as q,ck as N,cl as B,cm as Z,cn as F}from"./index-Cxx5SZO5.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await P(c,{fetchFn:i}),!o)try{o=await T(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(b),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function T(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return j.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function P(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await T(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await P(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return q.parse(await s.json())}export{pe as U,P as a,_e as b,Ue as c,T as d,me as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-
|
|
1
|
+
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-Cxx5SZO5.js";function h(){const e=r.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(x,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function u(){const e=r.c(5);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=l(a);if(n==="accept-invitation"){let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(m,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:"accept-invitation"})})}),e[1]=s):s=e[1];let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs(t.Fragment,{children:[s,t.jsx(f,{children:t.jsx(h,{})})]}),e[2]=i):i=e[2],i}let c;return e[3]!==n?(c=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:n})}),e[3]=n,e[4]=c):c=e[4],c}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $,a3 as Ne,r as b,e as ae,C as W,j as t,l as x,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-jw3DdvOr.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:w=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(w)||w<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${w}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=w)throw new Pe(A,w);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:w,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,f]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[M,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,v=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:v?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(v?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:v?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:v?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(v?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{W("password_reset_requested"),pe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),we&&J.reset(),ve&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,we=J.error,ve=K.error,ye=z.error||B.error,T=v?c.trim()&&_.trim()&&re.trim():R?c.trim():k?M?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=we||ve||ye||ke,We=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),W("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},Me=R?a.resetPasswordTitle:k&&M?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&M?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:x("grid w-full",p?"gap-5":"gap-10"),children:[w??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:x("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:Me}),Se&&t.jsx("p",{className:x("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&M)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{We(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:x("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&M)&&I&&(C||E.enabled)&&t.jsxs("div",{className:x("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:x("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:M?t.jsxs("form",{onSubmit:Te,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:x("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[v&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!v&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(f),required:!0,disabled:m,autoComplete:v?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:x("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:x("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:x("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?v?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[v?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(v?"signIn":"signUp"),disabled:m,className:ie,children:v?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,w]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),w(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const w=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{w({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){w({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:w,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=w===void 0?!0:w,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let f;return e[2]!==S||e[3]!==I?(f=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=f):f=e[4],f}if(h.enabled){let f;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(f=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=f):f=e[8],f}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let f;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(f=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=f):f=e[20],f}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
|
|
1
|
+
import{a as $,a3 as Ne,r as b,e as ae,C as W,j as t,l as x,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-Cxx5SZO5.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:w=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(w)||w<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${w}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=w)throw new Pe(A,w);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:w,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,f]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[M,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,v=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:v?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(v?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:v?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:v?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(v?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{W("password_reset_requested"),pe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),we&&J.reset(),ve&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,we=J.error,ve=K.error,ye=z.error||B.error,T=v?c.trim()&&_.trim()&&re.trim():R?c.trim():k?M?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=we||ve||ye||ke,We=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),W("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},Me=R?a.resetPasswordTitle:k&&M?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&M?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:x("grid w-full",p?"gap-5":"gap-10"),children:[w??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:x("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:Me}),Se&&t.jsx("p",{className:x("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&M)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{We(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:x("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&M)&&I&&(C||E.enabled)&&t.jsxs("div",{className:x("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:x("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:M?t.jsxs("form",{onSubmit:Te,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:x("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[v&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!v&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(f),required:!0,disabled:m,autoComplete:v?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:x("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:x("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:x("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?v?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[v?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(v?"signIn":"signUp"),disabled:m,className:ie,children:v?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,w]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),w(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const w=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{w({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){w({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:w,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=w===void 0?!0:w,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let f;return e[2]!==S||e[3]!==I?(f=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=f):f=e[4],f}if(h.enabled){let f;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(f=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=f):f=e[8],f}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let f;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(f=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=f):f=e[20],f}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,l as p,j as f}from"./index-
|
|
1
|
+
import{c as g,l as p,j as f}from"./index-Cxx5SZO5.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./mcp-oauth-
|
|
1
|
+
import{a as u}from"./mcp-oauth-BgczWCl7.js";import{i as p}from"./mcp-oauth-DPnnrdpS.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await p({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await u({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
|
package/dist/client/assets/{automation-list-row-DVPOR6sy.js → automation-list-row-B1qIGbz-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as G,b as J,r as ee,l as q,j as t,V as te,B as se,Z as ie,Y as ne,X as ae,aM as oe,aN as le,aO as re,aP as ce,bm as me,aQ as ue,aR as de,aS as fe}from"./index-
|
|
1
|
+
import{c as G,b as J,r as ee,l as q,j as t,V as te,B as se,Z as ie,Y as ne,X as ae,aM as oe,aN as le,aO as re,aP as ce,bm as me,aQ as ue,aR as de,aS as fe}from"./index-Cxx5SZO5.js";import{B as ge}from"./badge-Dk9QaMHv.js";import{A as xe,U as pe}from"./agent-icon-DMLbHyqZ.js";import{i as he}from"./DotsVertical-7Rm5ttPh.js";import{s as je}from"./Trash01-DzCXEeuM.js";import{i as we}from"./ZoomOut-BIPVG3Mi.js";import{c as _e}from"./repository-binding-CkScpIsb.js";import{a as ve}from"./use-automations-C69NPUwP.js";function ze(c){const e=G.c(89),{automation:s,showAgent:o,onClick:n}=c,i=J(),{remove:a}=ve(),[r,H]=ee.useState(!1),l=_e(o?s.virtual_mcp_id:void 0);let E;e[0]!==s.id||e[1]!==a?(E=()=>{a.mutate(s.id),H(!1)},e[0]=s.id,e[1]=a,e[2]=E):E=e[2];const Q=E;let F;e[3]!==n?(F=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=F):F=e[4];const U=F,X=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==X?(u=q("inline-block size-2 rounded-full shrink-0",X),e[5]=X,e[6]=u):u=e[6];const Y=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==Y?(d=i(Y),e[7]=i,e[8]=Y,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]!==l?.icon||e[14]!==l?.title||e[15]!==s.name||e[16]!==o?(g=o&&t.jsx(xe,{icon:l?.icon??null,name:l?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=l?.icon,e[14]=l?.title,e[15]=s.name,e[16]=o,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==s.system_key||e[21]!==i?(p=s.system_key&&t.jsx(ge,{variant:"muted",children:i("automations.builtin.badge")}),e[20]=s.system_key,e[21]=i,e[22]=p):p=e[22];let h;e[23]!==l||e[24]!==o?(h=o&&l&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[23]=l,e[24]=o,e[25]=h):h=e[25];let j;e[26]!==p||e[27]!==h||e[28]!==x?(j=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p,h]}),e[26]=p,e[27]=h,e[28]=x,e[29]=j):j=e[29];let w;e[30]!==s.nearest_next_run_at||e[31]!==s.trigger_count?(w=t.jsx(De,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[30]=s.nearest_next_run_at,e[31]=s.trigger_count,e[32]=w):w=e[32];let _;e[33]!==j||e[34]!==w?(_=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[j,w]}),e[33]=j,e[34]=w,e[35]=_):_=e[35];const Z=s.system_key&&"invisible";let v;e[36]!==Z?(v=q("shrink-0",Z),e[36]=Z,e[37]=v):v=e[37];let $;e[38]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(te,{asChild:!0,children:t.jsx(se,{variant:"ghost",size:"icon",className:"opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(he,{size:16})})}),e[38]=$):$=e[38];let K,I;e[39]===Symbol.for("react.memo_cache_sentinel")?(K=m=>{m.stopPropagation(),H(!0)},I=t.jsx(je,{size:16}),e[39]=K,e[40]=I):(K=e[39],I=e[40]);let y;e[41]!==i?(y=i("automations.automationListRow.delete"),e[41]=i,e[42]=y):y=e[42];let A;e[43]!==y?(A=t.jsxs(ie,{children:[$,t.jsx(ne,{align:"end",children:t.jsxs(ae,{variant:"destructive",onClick:K,children:[I,y]})})]}),e[43]=y,e[44]=A):A=e[44];let D;e[45]!==v||e[46]!==A?(D=t.jsx("div",{onClick:Ae,onKeyDown:ye,role:"presentation",className:v,children:A}),e[45]=v,e[46]=A,e[47]=D):D=e[47];let R;e[48]!==U||e[49]!==n||e[50]!==_||e[51]!==D||e[52]!==f||e[53]!==g?(R=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:U,className:"group w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-accent transition-colors cursor-pointer focus-ring",children:[f,g,_,D]}),e[48]=U,e[49]=n,e[50]=_,e[51]=D,e[52]=f,e[53]=g,e[54]=R):R=e[54];let N;e[55]!==i?(N=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=N):N=e[56];let k;e[57]!==N?(k=t.jsx(oe,{children:N}),e[57]=N,e[58]=k):k=e[58];let b;e[59]!==s.name||e[60]!==i?(b=i("automations.automationListRow.deleteDescription",{name:s.name}),e[59]=s.name,e[60]=i,e[61]=b):b=e[61];let L;e[62]!==b?(L=t.jsx(le,{children:b}),e[62]=b,e[63]=L):L=e[63];let C;e[64]!==k||e[65]!==L?(C=t.jsxs(re,{children:[k,L]}),e[64]=k,e[65]=L,e[66]=C):C=e[66];let P;e[67]!==i?(P=i("automations.automationListRow.cancel"),e[67]=i,e[68]=P):P=e[68];let T;e[69]!==P?(T=t.jsx(ce,{children:P}),e[69]=P,e[70]=T):T=e[70];const W=a.isPending;let z;e[71]!==i?(z=i("automations.automationListRow.deleteButton"),e[71]=i,e[72]=z):z=e[72];let B;e[73]!==Q||e[74]!==a.isPending||e[75]!==z?(B=t.jsx(me,{onClick:Q,disabled:W,variant:"destructive",children:z}),e[73]=Q,e[74]=a.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==T||e[78]!==B?(M=t.jsxs(ue,{children:[T,B]}),e[77]=T,e[78]=B,e[79]=M):M=e[79];let S;e[80]!==C||e[81]!==M?(S=t.jsxs(de,{children:[C,M]}),e[80]=C,e[81]=M,e[82]=S):S=e[82];let O;e[83]!==r||e[84]!==S?(O=t.jsx(fe,{open:r,onOpenChange:H,children:S}),e[83]=r,e[84]=S,e[85]=O):O=e[85];let V;return e[86]!==R||e[87]!==O?(V=t.jsxs(t.Fragment,{children:[R,O]}),e[86]=R,e[87]=O,e[88]=V):V=e[88],V}function ye(c){return c.stopPropagation()}function Ae(c){return c.stopPropagation()}function De(c){const e=G.c(8),{triggerCount:s,nextRunAt:o}=c,n=J();if(s===0){let a;e[0]!==n?(a=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=a):a=e[1];let r;return e[2]!==a?(r=t.jsx("span",{className:"text-xs text-muted-foreground",children:a}),e[2]=a,e[3]=r):r=e[3],r}let i;return e[4]!==o||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:o?t.jsxs(t.Fragment,{children:[t.jsx(pe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(o).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(we,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:s===1?n("automations.automationListRow.triggersOne"):n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=o,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ze as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as V,r as ot,b as X,a4 as it,R as rt,aq as ct,b4 as ut,K as tt,j as s,l as mt,m as dt,gn as ft}from"./index-jw3DdvOr.js";import{u as xt}from"./useInfiniteQuery-CcUhW7AW.js";import{u as pt}from"./use-connection-Db-d2gM4.js";import{u as gt}from"./use-mcp-client-D6ElS18M.js";import{b as ht}from"./repository-binding-DtKjkNiS.js";import{b as Rt,a as jt}from"./sheet-CpISCuUN.js";import{e as Nt,a as bt,b as st,T as G,d as Tt,c as Q}from"./table-Cm1jH1V8.js";import{E as et}from"./empty-state-DqSsZioU.js";import{u as St}from"./use-infinite-scroll-DBF3UBOd.js";import{g as vt}from"./task-status-CihJb7N-.js";import{e as Ct}from"./use-automations-BkQQphI-.js";import{T as It,f as at,a as nt}from"./thread-sheet-body-CZDpkSjN.js";function wt(c){const t=V.c(15),[i,r]=ot.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,l=a!==-1?c[a]:null,n=l!==null;let o,C;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=u=>r(u),C=()=>r(null),t[3]=o,t[4]=C):(o=t[3],C=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 d;return t[9]!==a||t[10]!==l||t[11]!==n||t[12]!==f||t[13]!==x?(d={selected:l,index:a,isOpen:n,select:o,close:C,prev:f,next:x},t[9]=a,t[10]=l,t[11]=n,t[12]=f,t[13]=x,t[14]=d):d=t[14],d}const W=50;function Y(c){const t=V.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 l;t[2]!==r?(l=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=l):l=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 o;return t[6]!==a||t[7]!==l||t[8]!==n?(o=s.jsxs(ft,{className:"pt-4 px-4 pb-5 gap-1",children:[a,l,n]}),t[6]=a,t[7]=l,t[8]=n,t[9]=o):o=t[9],o}function yt(c){const t=V.c(45),{automationId:i,range:r}=c,e=X(),{data:a,isLoading:l}=Ct(i,r),n=a?.runs,o=a?.usage;let C;t[0]!==n?(C=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=C):C=t[1];const f=C;let x;t[2]!==e||t[3]!==o?(x=o&&o.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:o.sampledRuns}):void 0,t[2]=e,t[3]=o,t[4]=x):x=t[4];const d=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==l||t[8]!==n?.total?(g=l?"…":n?.total.toLocaleString()??"0",t[7]=l,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(Y,{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 y=l?"…":f;let I;t[19]!==T||t[20]!==y?(I=s.jsx(Y,{title:T,value:y}),t[19]=T,t[20]=y,t[21]=I):I=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]!==l||t[25]!==o?.totalTokens?(p=l?"…":at(o?.totalTokens??0),t[24]=l,t[25]=o?.totalTokens,t[26]=p):p=t[26];let w;t[27]!==S||t[28]!==p||t[29]!==d?(w=s.jsx(Y,{title:S,value:p,subtitle:d}),t[27]=S,t[28]=p,t[29]=d,t[30]=w):w=t[30];let m;t[31]!==e?(m=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=m):m=t[32];let j;t[33]!==l||t[34]!==o?(j=l?"…":o&&o.costUsd>0?nt(o.costUsd):"—",t[33]=l,t[34]=o,t[35]=j):j=t[35];let v;t[36]!==m||t[37]!==j||t[38]!==d?(v=s.jsx(Y,{title:m,value:j,subtitle:d}),t[36]=m,t[37]=j,t[38]=d,t[39]=v):v=t[39];let N;return t[40]!==w||t[41]!==v||t[42]!==R||t[43]!==I?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,I,w,v]}),t[40]=w,t[41]=v,t[42]=R,t[43]=I,t[44]=N):N=t[44],N}function _t(c){const t=V.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,l=X();let n,o;if(t[0]!==i.created_at){const k=new Date(i.created_at);n=k.toLocaleDateString("en-US",{month:"short",day:"numeric"}),o=k.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=o}else n=t[1],o=t[2];const C=o;let f,x,d,u,g,h,R,T,y,I,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==l){const k=vt(i.status),U=k.icon;x=st,y=a,I="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",S=e,t[19]!==i.title?(d=s.jsx(Q,{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]=d):d=t[20],f=Q,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:k.iconClassName}),u=mt("text-sm",k.labelColor),g=l(k.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=l,t[8]=f,t[9]=x,t[10]=d,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=y,t[17]=I,t[18]=S}else f=t[8],x=t[9],d=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],y=t[16],I=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 w;t[24]!==p||t[25]!==h||t[26]!==R?(w=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=w):w=t[27];let m;t[28]!==f||t[29]!==w||t[30]!==T?(m=s.jsx(f,{className:T,children:w}),t[28]=f,t[29]=w,t[30]=T,t[31]=m):m=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(Q,{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 _;t[38]!==N?(_=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=_):_=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let P;t[42]!==C?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:C}),t[42]=C,t[43]=P):P=t[43];let E;t[44]!==D||t[45]!==P?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,P]}),t[44]=D,t[45]=P,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==d||t[49]!==m||t[50]!==v||t[51]!==_||t[52]!==E||t[53]!==y||t[54]!==I||t[55]!==S?($=s.jsxs(x,{ref:y,className:I,onClick:S,children:[d,m,v,_,E]}),t[47]=x,t[48]=d,t[49]=m,t[50]=v,t[51]=_,t[52]=E,t[53]=y,t[54]=I,t[55]=S,t[56]=$):$=t[56],$}function Vt(c){const t=V.c(73),{automationId:i,triggerIds:r,range:e}=c,a=X(),{org:l,locator:n}=it();let o;t[0]!==l.id||t[1]!==l.slug?(o={connectionId:rt,orgId:l.id,orgSlug:l.slug},t[0]=l.id,t[1]=l.slug,t[2]=o):o=t[2];const C=gt(o),f=ct(),x=pt(),d=ht(),{data:u}=ut(),g=r.length>0;let h;t[3]!==i||t[4]!==l.id||t[5]!==r?(h=tt.automationRuns(l.id,i,r),t[3]=i,t[4]=l.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:J}=M,lt=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:W,offset:lt,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:y,fetchNextPage:I,hasNextPage:S,isFetchingNextPage:p,isLoading:w}=xt(T);let m,j,v,N;t[14]!==y?.pages||t[15]!==n||t[16]!==e?(m=(y?.pages??[]).flatMap(Dt),N=m.map(kt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=y?.pages,t[15]=n,t[16]=e,t[17]=m,t[18]=j,t[19]=v,t[20]=N):(m=t[17],j=t[18],v=t[19],N=t[20]);let _;t[21]!==e||t[22]!==f||t[23]!==N?(_=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]=_):_=t[24];const D=N.length>0;let P;t[25]!==j||t[26]!==_||t[27]!==D?(P={queryKey:j,queryFn:_,enabled:D,staleTime:3e4},t[25]=j,t[26]=_,t[27]=D,t[28]=P):P=t[28];const{data:E}=v(P);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(Pt)),t[29]=E?.items,t[30]=$):$=t[30];const k=$;let U;t[31]!==I||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&I()},t[31]=I,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Z=St(U,S??!1,p),b=wt(m),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(yt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==w||t[40]!==Z||t[41]!==m||t[42]!==b||t[43]!==a||t[44]!==k?(O=g?w?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):m.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(Nt,{className:"w-full border-collapse",children:[s.jsx(bt,{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 font-normal text-meta",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:m.map((M,J)=>s.jsx(_t,{run:M,usage:k.get(M.id),onClick:()=>b.select(M.id),lastRowRef:J===m.length-1?Z: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]=w,t[40]=Z,t[41]=m,t[42]=b,t[43]=a,t[44]=k,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 q;t[51]!==x||t[52]!==d||t[53]!==C||t[54]!==n||t[55]!==u||t[56]!==m||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(q=B&&s.jsx(It,{thread:B,client:C,locator:n,connections:x,virtualMcps:d,members:u,nav:{index:b.index,total:m.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=d,t[53]=C,t[54]=n,t[55]=u,t[56]=m,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=q):q=t[61];let K;t[62]!==q?(K=s.jsx(jt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:q}),t[62]=q,t[63]=K):K=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==K?(F=s.jsx(Rt,{open:b.isOpen,onOpenChange:H,children:K}),t[64]=b.isOpen,t[65]=H,t[66]=K,t[67]=F):F=t[67];let z;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(z=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]=z):z=t[72],z}function Pt(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function kt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<W))return r.length*W}export{Vt as A,wt as u};
|
|
1
|
+
import{c as V,r as ot,b as X,a4 as it,R as rt,aq as ct,b4 as ut,K as tt,j as s,l as mt,m as dt,gn as ft}from"./index-Cxx5SZO5.js";import{u as xt}from"./useInfiniteQuery-DocXgAgp.js";import{u as pt}from"./use-connection-K2ZmGfOt.js";import{u as gt}from"./use-mcp-client-DogzcDtd.js";import{b as ht}from"./repository-binding-CkScpIsb.js";import{b as Rt,a as jt}from"./sheet-COugYrjn.js";import{e as Nt,a as bt,b as st,T as G,d as Tt,c as Q}from"./table-B203jObX.js";import{E as et}from"./empty-state-CnCcC-8N.js";import{u as St}from"./use-infinite-scroll-Ch7Ei01m.js";import{g as vt}from"./task-status-OQPi7i4V.js";import{e as Ct}from"./use-automations-C69NPUwP.js";import{T as It,f as at,a as nt}from"./thread-sheet-body-B5yV21k9.js";function wt(c){const t=V.c(15),[i,r]=ot.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,l=a!==-1?c[a]:null,n=l!==null;let o,C;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=u=>r(u),C=()=>r(null),t[3]=o,t[4]=C):(o=t[3],C=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 d;return t[9]!==a||t[10]!==l||t[11]!==n||t[12]!==f||t[13]!==x?(d={selected:l,index:a,isOpen:n,select:o,close:C,prev:f,next:x},t[9]=a,t[10]=l,t[11]=n,t[12]=f,t[13]=x,t[14]=d):d=t[14],d}const W=50;function Y(c){const t=V.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 l;t[2]!==r?(l=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=l):l=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 o;return t[6]!==a||t[7]!==l||t[8]!==n?(o=s.jsxs(ft,{className:"pt-4 px-4 pb-5 gap-1",children:[a,l,n]}),t[6]=a,t[7]=l,t[8]=n,t[9]=o):o=t[9],o}function yt(c){const t=V.c(45),{automationId:i,range:r}=c,e=X(),{data:a,isLoading:l}=Ct(i,r),n=a?.runs,o=a?.usage;let C;t[0]!==n?(C=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=C):C=t[1];const f=C;let x;t[2]!==e||t[3]!==o?(x=o&&o.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:o.sampledRuns}):void 0,t[2]=e,t[3]=o,t[4]=x):x=t[4];const d=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==l||t[8]!==n?.total?(g=l?"…":n?.total.toLocaleString()??"0",t[7]=l,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(Y,{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 y=l?"…":f;let I;t[19]!==T||t[20]!==y?(I=s.jsx(Y,{title:T,value:y}),t[19]=T,t[20]=y,t[21]=I):I=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]!==l||t[25]!==o?.totalTokens?(p=l?"…":at(o?.totalTokens??0),t[24]=l,t[25]=o?.totalTokens,t[26]=p):p=t[26];let w;t[27]!==S||t[28]!==p||t[29]!==d?(w=s.jsx(Y,{title:S,value:p,subtitle:d}),t[27]=S,t[28]=p,t[29]=d,t[30]=w):w=t[30];let m;t[31]!==e?(m=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=m):m=t[32];let j;t[33]!==l||t[34]!==o?(j=l?"…":o&&o.costUsd>0?nt(o.costUsd):"—",t[33]=l,t[34]=o,t[35]=j):j=t[35];let v;t[36]!==m||t[37]!==j||t[38]!==d?(v=s.jsx(Y,{title:m,value:j,subtitle:d}),t[36]=m,t[37]=j,t[38]=d,t[39]=v):v=t[39];let N;return t[40]!==w||t[41]!==v||t[42]!==R||t[43]!==I?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,I,w,v]}),t[40]=w,t[41]=v,t[42]=R,t[43]=I,t[44]=N):N=t[44],N}function _t(c){const t=V.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,l=X();let n,o;if(t[0]!==i.created_at){const k=new Date(i.created_at);n=k.toLocaleDateString("en-US",{month:"short",day:"numeric"}),o=k.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=o}else n=t[1],o=t[2];const C=o;let f,x,d,u,g,h,R,T,y,I,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==l){const k=vt(i.status),U=k.icon;x=st,y=a,I="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",S=e,t[19]!==i.title?(d=s.jsx(Q,{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]=d):d=t[20],f=Q,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:k.iconClassName}),u=mt("text-sm",k.labelColor),g=l(k.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=l,t[8]=f,t[9]=x,t[10]=d,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=y,t[17]=I,t[18]=S}else f=t[8],x=t[9],d=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],y=t[16],I=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 w;t[24]!==p||t[25]!==h||t[26]!==R?(w=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=w):w=t[27];let m;t[28]!==f||t[29]!==w||t[30]!==T?(m=s.jsx(f,{className:T,children:w}),t[28]=f,t[29]=w,t[30]=T,t[31]=m):m=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(Q,{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 _;t[38]!==N?(_=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=_):_=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let P;t[42]!==C?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:C}),t[42]=C,t[43]=P):P=t[43];let E;t[44]!==D||t[45]!==P?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,P]}),t[44]=D,t[45]=P,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==d||t[49]!==m||t[50]!==v||t[51]!==_||t[52]!==E||t[53]!==y||t[54]!==I||t[55]!==S?($=s.jsxs(x,{ref:y,className:I,onClick:S,children:[d,m,v,_,E]}),t[47]=x,t[48]=d,t[49]=m,t[50]=v,t[51]=_,t[52]=E,t[53]=y,t[54]=I,t[55]=S,t[56]=$):$=t[56],$}function Vt(c){const t=V.c(73),{automationId:i,triggerIds:r,range:e}=c,a=X(),{org:l,locator:n}=it();let o;t[0]!==l.id||t[1]!==l.slug?(o={connectionId:rt,orgId:l.id,orgSlug:l.slug},t[0]=l.id,t[1]=l.slug,t[2]=o):o=t[2];const C=gt(o),f=ct(),x=pt(),d=ht(),{data:u}=ut(),g=r.length>0;let h;t[3]!==i||t[4]!==l.id||t[5]!==r?(h=tt.automationRuns(l.id,i,r),t[3]=i,t[4]=l.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:J}=M,lt=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:W,offset:lt,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:y,fetchNextPage:I,hasNextPage:S,isFetchingNextPage:p,isLoading:w}=xt(T);let m,j,v,N;t[14]!==y?.pages||t[15]!==n||t[16]!==e?(m=(y?.pages??[]).flatMap(Dt),N=m.map(kt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=y?.pages,t[15]=n,t[16]=e,t[17]=m,t[18]=j,t[19]=v,t[20]=N):(m=t[17],j=t[18],v=t[19],N=t[20]);let _;t[21]!==e||t[22]!==f||t[23]!==N?(_=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]=_):_=t[24];const D=N.length>0;let P;t[25]!==j||t[26]!==_||t[27]!==D?(P={queryKey:j,queryFn:_,enabled:D,staleTime:3e4},t[25]=j,t[26]=_,t[27]=D,t[28]=P):P=t[28];const{data:E}=v(P);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(Pt)),t[29]=E?.items,t[30]=$):$=t[30];const k=$;let U;t[31]!==I||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&I()},t[31]=I,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Z=St(U,S??!1,p),b=wt(m),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(yt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==w||t[40]!==Z||t[41]!==m||t[42]!==b||t[43]!==a||t[44]!==k?(O=g?w?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):m.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(Nt,{className:"w-full border-collapse",children:[s.jsx(bt,{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 font-normal text-meta",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:m.map((M,J)=>s.jsx(_t,{run:M,usage:k.get(M.id),onClick:()=>b.select(M.id),lastRowRef:J===m.length-1?Z: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]=w,t[40]=Z,t[41]=m,t[42]=b,t[43]=a,t[44]=k,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 q;t[51]!==x||t[52]!==d||t[53]!==C||t[54]!==n||t[55]!==u||t[56]!==m||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(q=B&&s.jsx(It,{thread:B,client:C,locator:n,connections:x,virtualMcps:d,members:u,nav:{index:b.index,total:m.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=d,t[53]=C,t[54]=n,t[55]=u,t[56]=m,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=q):q=t[61];let K;t[62]!==q?(K=s.jsx(jt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:q}),t[62]=q,t[63]=K):K=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==K?(F=s.jsx(Rt,{open:b.isOpen,onOpenChange:H,children:K}),t[64]=b.isOpen,t[65]=H,t[66]=K,t[67]=F):F=t[67];let z;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(z=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]=z):z=t[72],z}function Pt(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function kt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<W))return r.length*W}export{Vt as A,wt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as e,b as $,a4 as D,d as M,r as q,n as d,B as V,gX as X,C as R}from"./index-
|
|
1
|
+
import{c as k,j as e,b as $,a4 as D,d as M,r as q,n as d,B as V,gX as X,C as R}from"./index-Cxx5SZO5.js";import{s as F}from"./Plus-D7X276kv.js";import{i as S}from"./ZoomOut-BIPVG3Mi.js";import{S as G}from"./search-input-CzCH_VIY.js";import{E as T}from"./empty-state-CnCcC-8N.js";import{u as H}from"./use-automations-C69NPUwP.js";import{u as J}from"./use-navigate-to-agent-IXTtvMGy.js";import{A as K}from"./automation-list-row-B1qIGbz-.js";import{b as O}from"./repository-binding-CkScpIsb.js";import{R as Q}from"./require-capability-DLhsbUyc.js";import"./SearchMd-BzDAUJSU.js";import"./use-mcp-client-DogzcDtd.js";import"./auth-BawzvLgB.js";import"./thread-intent-DJ7MUI-X.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BD6-sAKH.js";import"./task-board-D0I9TrF7.js";import"./schema-WheR11j2.js";import"./slugify-CEUa2lfQ.js";import"./badge-Dk9QaMHv.js";import"./agent-icon-DMLbHyqZ.js";import"./AlertCircle-BWrNX7mN.js";import"./Tool01-OTauJJp3.js";import"./ArrowUp-CyzDPNV4.js";import"./ArrowLeft-DHx5ko4s.js";import"./LinkBroken01-C5q0tEvS.js";import"./ShoppingBag01-UnxomIP0.js";import"./Building02-DhL5SQYW.js";import"./CheckCircle-BJwUqTIe.js";import"./ChevronUp-BsFnjeNK.js";import"./ChevronSelectorVertical-BsFKOzFl.js";import"./UserSquare-CmbcjiWL.js";import"./Copy01-BMtss9AJ.js";import"./CreditCard01-DpJ5HaJ6.js";import"./DotsVertical-7Rm5ttPh.js";import"./Image01-B1C03E_N.js";import"./Globe04-BJeMTkc9.js";import"./SwitchHorizontal01-Dr_PPdbH.js";import"./Key01-AhMvx8Bf.js";import"./Link01-p8humFYG.js";import"./Minus-BMakGco3.js";import"./Monitor01-CLwaIfNu.js";import"./Sun-B5QvK7X9.js";import"./Play-BoOYKEkH.js";import"./Trash01-DzCXEeuM.js";import"./Upload01-2E_Vrojt.js";import"./Users01-BFgiCQPh.js";import"./XClose-BF4dTiHJ.js";import"./access-gate-BrHHSKUI.js";import"./capability-load-error-BX1SCP0_.js";function U(){const t=k.c(20),o=$(),{org:c}=D(),{data:y}=H(void 0),g=y===void 0?[]:y,E=O(),P=J(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),A=new Map(E.map(W)),b=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=A.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const N=l&&A.has(l)?l:X(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let p;t[0]!==f||t[1]!==c.slug?(p=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=p):p=t[2];const L=p,j=d,v=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 w=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]!==w?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,w]}),t[7]=r,t[8]=w,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")]})})}):b.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 flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card shadow-edge",children:b.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]!==v.Content||t[15]!==a?(m=e.jsx(v.Content,{children:a}),t[14]=v.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 Qt(){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{Qt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{az as d}from"./index-
|
|
1
|
+
import{az as d}from"./index-Cxx5SZO5.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 b,l,j as u,cr as c,cs as p}from"./index-
|
|
1
|
+
import{c as b,l,j as u,cr as c,cs as p}from"./index-Cxx5SZO5.js";const v=p("inline-flex items-center justify-center rounded-full text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1.5 [&>svg]:pointer-events-none focus-ring transition-[color,background-color] overflow-hidden",{variants:{variant:{default:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",neutral:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",secondary:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",success:"bg-success/10 text-success [a&]:hover:bg-success/15",warning:"bg-warning/10 text-warning [a&]:hover:bg-warning/15",destructive:"bg-destructive/10 text-destructive [a&]:hover:bg-destructive/15",agent:"bg-brand-purple-tint text-brand-purple-dark dark:bg-brand-purple/20 dark:text-brand-purple",lime:"bg-brand-lime-tint text-brand-green-dark dark:bg-brand/20 dark:text-brand",info:"bg-brand-blue-tint text-brand-blue-dark dark:bg-brand-blue/20 dark:text-brand-blue",outline:"bg-card shadow-edge text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"bg-muted text-muted-foreground [a&]:hover:bg-secondary-hover",brand:"bg-brand/30 text-foreground [a&]:hover:bg-brand/40 [button&]:hover:bg-brand/40"},size:{sm:"h-4 gap-1 px-1.5 text-[0.6875rem]",default:"h-5 px-2",lg:"h-6 px-2.5 text-sm [&>svg]:size-3.5",control:"h-7 gap-1.5 pr-3 pl-1.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg bg-card p-0 shadow-edge"}},defaultVariants:{variant:"default",size:"default"}});function f(g){const e=b.c(14);let t,r,a,s,n;e[0]!==g?({className:t,variant:n,size:a,asChild:s,...r}=g,e[0]=g,e[1]=t,e[2]=r,e[3]=a,e[4]=s,e[5]=n):(t=e[1],r=e[2],a=e[3],s=e[4],n=e[5]);const i=(s===void 0?!1:s)?c:"span";let d;e[6]!==t||e[7]!==a||e[8]!==n?(d=l(v({variant:n,size:a}),t),e[6]=t,e[7]=a,e[8]=n,e[9]=d):d=e[9];let o;return e[10]!==i||e[11]!==r||e[12]!==d?(o=u.jsx(i,{"data-slot":"badge",className:d,...r}),e[10]=i,e[11]=r,e[12]=d,e[13]=o):o=e[13],o}export{f as B};
|