decocms 4.514.6 → 4.515.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/ActiveShapeUtils-CHmxGMIj.js +1 -0
- package/dist/client/assets/{AlertCircle-Ctbquk5a.js → AlertCircle-CUAx3A4b.js} +1 -1
- package/dist/client/assets/AreaChart-CW0Iiw9b.js +1 -0
- package/dist/client/assets/{ArrowLeft-DZ0mAFgb.js → ArrowLeft-BWCsylYe.js} +1 -1
- package/dist/client/assets/{ArrowUp-bYg1aEOe.js → ArrowUp-EL0FBv9C.js} +1 -1
- package/dist/client/assets/BarChart-7G_lP-bc.js +1 -0
- package/dist/client/assets/{Building02-BHIVlbfK.js → Building02-PifDTlhb.js} +1 -1
- package/dist/client/assets/CartesianChart-CQlacwEw.js +1 -0
- package/dist/client/assets/{CategoricalChart-CRSSpo7X.js → CategoricalChart-QwBn7EzX.js} +2 -2
- package/dist/client/assets/{CheckCircle-C2ndOEUO.js → CheckCircle-CMGqXocs.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DaUdbCWk.js → ChevronSelectorVertical-BSRBjpBn.js} +1 -1
- package/dist/client/assets/{ChevronUp-C8mqlnDX.js → ChevronUp-x46FJEcD.js} +1 -1
- package/dist/client/assets/{Copy01-DC8f0fwU.js → Copy01-OBSYmimV.js} +1 -1
- package/dist/client/assets/{CreditCard01-P7j8oDkg.js → CreditCard01-DWsSThAm.js} +1 -1
- package/dist/client/assets/{DotsVertical-BvwGTDkC.js → DotsVertical-jkvtcdek.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-KwnilJkg.js → ErrorBarContext-MNRbBKZp.js} +1 -1
- package/dist/client/assets/{Globe04-D6C-ihBU.js → Globe04-blkS_Kfg.js} +1 -1
- package/dist/client/assets/{Image01-D7F4wuKx.js → Image01-BCnLFq1D.js} +1 -1
- package/dist/client/assets/{Key01-u4HXXUPa.js → Key01-CG7Kua6O.js} +1 -1
- package/dist/client/assets/{Link01-BoUupQbW.js → Link01-8aKNfNRw.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BJx0R97x.js → LinkBroken01-DcsqjBuj.js} +1 -1
- package/dist/client/assets/{Minus-C1PMcNV0.js → Minus-B38cW2ZC.js} +1 -1
- package/dist/client/assets/{Monitor01-D3VwU2ni.js → Monitor01-DQEkUL3d.js} +1 -1
- package/dist/client/assets/{Play-DxsFk4r2.js → Play-Ns9aRVTY.js} +1 -1
- package/dist/client/assets/{Plus-BDveVGJf.js → Plus-vkM1FxVr.js} +1 -1
- package/dist/client/assets/ReferenceLine-CJq91vhq.js +1 -0
- package/dist/client/assets/{SearchMd-Cuf45jFP.js → SearchMd-Cp6J-1Iu.js} +1 -1
- package/dist/client/assets/Sector-BeXkYaJv.js +28 -0
- package/dist/client/assets/{ShoppingBag01-BMRnsG58.js → ShoppingBag01-aJuRSlBz.js} +1 -1
- package/dist/client/assets/{Sun-sKGpeIhM.js → Sun-k4hypx5Q.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CshMTQzi.js → SwitchHorizontal01-B5WFt7_0.js} +1 -1
- package/dist/client/assets/{Tool01-BM29_KWq.js → Tool01-BsK9c3-e.js} +1 -1
- package/dist/client/assets/{Trash01-D92WhXf2.js → Trash01-Z1ezoy3S.js} +1 -1
- package/dist/client/assets/{Upload01-BSDy4f7m.js → Upload01-B3-nlnKa.js} +1 -1
- package/dist/client/assets/{User01-Cn3JqTjv.js → User01-C2Sw39bs.js} +1 -1
- package/dist/client/assets/{UserSquare-Drp4z0v0.js → UserSquare-BBEl_BxL.js} +1 -1
- package/dist/client/assets/{Users01-Cxbx87gg.js → Users01-DMFeioyM.js} +1 -1
- package/dist/client/assets/{XClose-dOW_RI9u.js → XClose-BdwIxxCT.js} +1 -1
- package/dist/client/assets/{ZoomOut-BfQx-fBr.js → ZoomOut-DytgoG2i.js} +1 -1
- package/dist/client/assets/{access-gate-BjUA5Gw_.js → access-gate-BUnHIPK_.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-B0vtW1sl.js → add-connection-dialog-F6QQAEZv.js} +1 -1
- package/dist/client/assets/agent-analytics-2BuaXhJ4.js +2 -0
- package/dist/client/assets/agent-app-DW_869sy.js +1 -0
- package/dist/client/assets/agent-assets-CPVwuId5.js +1 -0
- package/dist/client/assets/{agent-automation-Cc45Az0m.js → agent-automation-CKRFKK95.js} +1 -1
- package/dist/client/assets/agent-automations-CoXmwt9k.js +1 -0
- package/dist/client/assets/agent-calendar-CV9Ef0wP.js +1 -0
- package/dist/client/assets/{agent-connect-sources-mK6fw0FS.js → agent-connect-sources-B_bS144d.js} +1 -1
- package/dist/client/assets/agent-deck-OUciFfON.js +1 -0
- package/dist/client/assets/agent-e2e-DC8ADnZZ.js +1 -0
- package/dist/client/assets/agent-experiments-BwjYQ0V4.js +1 -0
- package/dist/client/assets/agent-file-CStNgNPQ.js +1 -0
- package/dist/client/assets/agent-hosting-Tr8uV5DY.js +1 -0
- package/dist/client/assets/{agent-icon-U4gZaLOQ.js → agent-icon--EtIPqub.js} +1 -1
- package/dist/client/assets/agent-library-Bf2YaEvb.js +1 -0
- package/dist/client/assets/agent-library-file-DAttgEac.js +1 -0
- package/dist/client/assets/agent-monitor-DIe6BVqe.js +1 -0
- package/dist/client/assets/{agent-overview-NPCMkyDB.js → agent-overview-popLuSBk.js} +1 -1
- package/dist/client/assets/agent-releases-CZVpd2dN.js +2 -0
- package/dist/client/assets/agent-settings-C6L22aS3.js +1 -0
- package/dist/client/assets/agent-site-editor-BML41A1E.js +16 -0
- package/dist/client/assets/agent-site-editor-code-Dnn-bhoB.js +2 -0
- package/dist/client/assets/agent-site-editor-content-Bt6vrV5b.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-q3wCu8-N.js +1 -0
- package/dist/client/assets/agent-view-B1o861lr.js +1 -0
- package/dist/client/assets/{agent-view-guard-Bk4OTT2f.js → agent-view-guard-BuPewEB-.js} +1 -1
- package/dist/client/assets/{agents-list-B_j46cpj.js → agents-list-BxOpJ6GX.js} +1 -1
- package/dist/client/assets/{ai-providers-Cb4AWs2D.js → ai-providers-BgJW78yt.js} +2 -2
- package/dist/client/assets/alert-BDbwlXZm.js +1 -0
- package/dist/client/assets/{alert-dialog-CKDHmJ-l.js → alert-dialog-C-DaggA1.js} +3 -3
- package/dist/client/assets/analytics-sections-i9-JccxC.js +1 -0
- package/dist/client/assets/{api-keys-Xjw7lgqR.js → api-keys-CsGvnzMj.js} +1 -1
- package/dist/client/assets/api-keys-DfU9uedt.js +1 -0
- package/dist/client/assets/app-editor-Cq-B0QFL.js +1 -0
- package/dist/client/assets/{asset-utils-DrTFUoo_.js → asset-utils-Cb8p2lKk.js} +1 -1
- package/dist/client/assets/{auth-hgpoCSIS.js → auth-C_nDagDA.js} +1 -1
- package/dist/client/assets/{auth-catchall-CIV9IiTJ.js → auth-catchall-DLKOtnms.js} +1 -1
- package/dist/client/assets/{auth-entry-ctrK7teX.js → auth-entry-CGuqEb3C.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DkyooQGo.js → auth-split-layout-CA_lMCib.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-jn1R1qId.js → authenticate-and-persist-oauth-CpcQdSQ-.js} +1 -1
- package/dist/client/assets/automation-list-row-B0U8Omed.js +1 -0
- package/dist/client/assets/{automation-runs-C367-v6a.js → automation-runs-CHS-S7AU.js} +1 -1
- package/dist/client/assets/{automations-8JKgpNEK.js → automations-BMiuIrti.js} +1 -1
- package/dist/client/assets/{autosend-BZOm698U.js → autosend-xoWUmECR.js} +1 -1
- package/dist/client/assets/{avatar-RpIBVCkY.js → avatar-DHKJiyOX.js} +1 -1
- package/dist/client/assets/badge-ux-RK1YK.js +1 -0
- package/dist/client/assets/{block-document-baEM6UJG.js → block-document-C53UA67Y.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-Ca46yWEV.js → blocks-preview-workspace-context-CCLLqfhM.js} +1 -1
- package/dist/client/assets/blocks-tab-states-Chq5j0oT.js +1 -0
- package/dist/client/assets/blog-schema-CUXWCb3x.js +1 -0
- package/dist/client/assets/{buckets-p2Fiyc0f.js → buckets-KXy-OHx-.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-ClmcYJRa.js → build-improve-prompt-doc-7EW1ZAui.js} +1 -1
- package/dist/client/assets/{calendar-DqVFnL9A.js → calendar-qN6CeKGa.js} +1 -1
- package/dist/client/assets/campaigns-view-CwEmfYeP.js +1 -0
- package/dist/client/assets/{capability-load-error-DdN4o47w.js → capability-load-error-CoMXa4ni.js} +1 -1
- package/dist/client/assets/category-editor-C-13e8GC.js +1 -0
- package/dist/client/assets/{chart-B5vy2nis.js → chart-86pPxb3F.js} +1 -1
- package/dist/client/assets/{chat-context-_d3c57p1.js → chat-context-DXm8btNS.js} +6 -6
- package/dist/client/assets/{chat-draft-CKcHhXuF.js → chat-draft-WGnppXw7.js} +1 -1
- package/dist/client/assets/{checkbox-CUzk21sc.js → checkbox-vFQy8MvV.js} +1 -1
- package/dist/client/assets/{choose-editor-BFcNvSv4.js → choose-editor-Bry8-aop.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BolfyrKO.js → cli-auth-success-BM0cUkz3.js} +1 -1
- package/dist/client/assets/{client-icons-50FpZDWK.js → client-icons-M2pakr5u.js} +1 -1
- package/dist/client/assets/cms-settings-editor-CHoKFct5.js +1 -0
- package/dist/client/assets/{collapsible-CeBZpglT.js → collapsible-CnlVGt-G.js} +1 -1
- package/dist/client/assets/collection-detail-B_r2Oxl1.js +1 -0
- package/dist/client/assets/{collection-display-button-El-xnsaW.js → collection-display-button-ALXFDy_R.js} +1 -1
- package/dist/client/assets/{collection-search-gW4FCqmq.js → collection-search--9d0M5sc.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CB0t7kAl.js → collection-table-wrapper-DyQ4WIpY.js} +1 -1
- package/dist/client/assets/{collection-tabs-DIFXv7hR.js → collection-tabs-BfpnVdlQ.js} +1 -1
- package/dist/client/assets/{column-rules-o-DlIK_-.js → column-rules-DgVqSNU2.js} +1 -1
- package/dist/client/assets/{combobox-DlpsfK7m.js → combobox-BMxhMbUn.js} +1 -1
- package/dist/client/assets/{coming-soon-page-ZTZUbFgV.js → coming-soon-page-6F4aAL8E.js} +1 -1
- package/dist/client/assets/{command-C7n5qLsN.js → command-BlBQgQPI.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-C2rDEgkL.js → companion-mcps-section-B3EkkVtL.js} +1 -1
- package/dist/client/assets/{config-BCpfsSBB.js → config-CE3I8pu5.js} +1 -1
- package/dist/client/assets/{connect-Du_rXIM1.js → connect-C4NhmEFJ.js} +3 -3
- package/dist/client/assets/{connect-layout-DyGwITyt.js → connect-layout-DZGJCEON.js} +1 -1
- package/dist/client/assets/{connection-Dik4epzq.js → connection-Bo3v2rj5.js} +1 -1
- package/dist/client/assets/{connection-card-DCnmTKpJ.js → connection-card-DMfcnulT.js} +1 -1
- package/dist/client/assets/{connection-detail-CaTyUBlA.js → connection-detail-DxSeFIwH.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-ta2yIvIb.js → connection-form-helpers-A3QfJozi.js} +1 -1
- package/dist/client/assets/{connections-Dy2qa1bG.js → connections-DzbvhEpV.js} +1 -1
- package/dist/client/assets/content-tab-CaoAhPSw.js +22 -0
- package/dist/client/assets/context-0XuHSild.js +1 -0
- package/dist/client/assets/{context-menu-BUZj1ZG7.js → context-menu-BD833dh0.js} +1 -1
- package/dist/client/assets/{context-shell-CWF9i3Vt.js → context-shell-D1uT0vY1.js} +3 -3
- package/dist/client/assets/{core.esm-DNra8pgf.js → core.esm-DJ5llHMe.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BkJvAp86.js → create-organization-dialog-nhhaUNZK.js} +1 -1
- package/dist/client/assets/{daily-pulse-DYjhyf3I.js → daily-pulse-Cry9rVi8.js} +1 -1
- package/dist/client/assets/date-utils-CrvIKg-s.js +1 -0
- package/dist/client/assets/{discover-nnC5Qnas.js → discover-C4Up8V0-.js} +1 -1
- package/dist/client/assets/{domain-settings-CpxFWOzU.js → domain-settings-Bec9kB9d.js} +1 -1
- package/dist/client/assets/{drawer-ZlYTI3Z6.js → drawer-0sYDH2mt.js} +1 -1
- package/dist/client/assets/{editor-BFHySd1K.js → editor-BctLuJLS.js} +1 -1
- package/dist/client/assets/{editor-classes-DPi5BWR5.js → editor-classes-BnPaf--r.js} +1 -1
- package/dist/client/assets/{empty-state-Bok1L2hc.js → empty-state-D6RWdvUz.js} +1 -1
- package/dist/client/assets/{empty-state-Cu20Qj3-.js → empty-state-DeArX05X.js} +1 -1
- package/dist/client/assets/experiments-tab-choice-CMHPX5ZC.js +1 -0
- package/dist/client/assets/{extract-connection-data-CNLani4P.js → extract-connection-data-CBAyhzk-.js} +1 -1
- package/dist/client/assets/{feature-gate-dfnyrtcC.js → feature-gate-DQ0ZaDj1.js} +1 -1
- package/dist/client/assets/{feature-paywall-D-GfxA1X.js → feature-paywall-hsFyGLR_.js} +1 -1
- package/dist/client/assets/{file-explorer-DOlx1A5r.js → file-explorer-GrzeifA-.js} +1 -1
- package/dist/client/assets/{file-preview-DSIiiWjA.js → file-preview-Bcawxb03.js} +1 -1
- package/dist/client/assets/{file-share-button-CB7fcIJI.js → file-share-button-LmGmSS33.js} +2 -2
- package/dist/client/assets/{file-type-icon-DPqHd815.js → file-type-icon-DHFVwXjA.js} +1 -1
- package/dist/client/assets/{folder-icon-qexQSaYN.js → folder-icon-BwmfzM1C.js} +2 -2
- package/dist/client/assets/{form-Dpwt-9St.js → form-D4PspedZ.js} +1 -1
- package/dist/client/assets/{general-DJuGMWNv.js → general-CXfgWejD.js} +1 -1
- package/dist/client/assets/{home-D9ErGwHG.js → home-DkYJf0RN.js} +1 -1
- package/dist/client/assets/hosted-publish-api-CK3ZnEoi.js +1 -0
- package/dist/client/assets/hosted-publish-feedback-BG4t8HgW.js +1 -0
- package/dist/client/assets/{icon-button-CwrVRVUS.js → icon-button-HZwQKD3a.js} +1 -1
- package/dist/client/assets/{index-BpRXpcv4.js → index-B32YFtAw.js} +1 -1
- package/dist/client/assets/{index-DK4LlU65.js → index-BCHFFeZZ.js} +1 -1
- package/dist/client/assets/{index-DzppA2EQ.js → index-BeV3dEoK.js} +3 -3
- package/dist/client/assets/{index-DUXVtfV1.js → index-BjrJaWD9.js} +1 -1
- package/dist/client/assets/{index-DPulqOQn.js → index-Bxkd37dZ.js} +1 -1
- package/dist/client/assets/{index-2uBqLA9S.js → index-CafY8AgN.js} +6 -6
- package/dist/client/assets/{index-DJM5MV7l.js → index-CgVQmSg0.js} +1 -1
- package/dist/client/assets/{index-TNsA6rsO.js → index-CvMuyNgv.js} +1 -1
- package/dist/client/assets/{index-C9OgV5Vt.js → index-DNa7Epd0.js} +1 -1
- package/dist/client/assets/{index-BWUABroT.js → index-D_6gfRTQ.js} +1 -1
- package/dist/client/assets/{index-DLuP-oy3.js → index-DgfcOEet.js} +1 -1
- package/dist/client/assets/index-EoMx4WDO.css +1 -0
- package/dist/client/assets/index-XzZeDzj0.js +4 -0
- package/dist/client/assets/{index-Cd_jqW-G.js → index-gqp4B5qj.js} +1 -1
- package/dist/client/assets/{index-CaH7O3hJ.js → index-ifZGovK1.js} +54 -54
- package/dist/client/assets/{index-CJu3ft8V.js → index-j4NUsiRT.js} +1 -1
- package/dist/client/assets/{index-redirect-CLzDU0fe.js → index-redirect-BKvfBlvA.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-u-Zd7Oxq.js → infiniteQueryObserver-DvmMaiCa.js} +1 -1
- package/dist/client/assets/infra-billing-WLIR9CQb.js +1 -0
- package/dist/client/assets/{input-DN6U5jAj.js → input-BeDIlaby.js} +1 -1
- package/dist/client/assets/{input-D2sd1bar.js → input-DIcILgWd.js} +7 -7
- package/dist/client/assets/{integration-icon-DCiBepJw.js → integration-icon-D1aQLe0v.js} +1 -1
- package/dist/client/assets/{jira-icon-DoiJbCfx.js → jira-icon-Bs7EGbwb.js} +1 -1
- package/dist/client/assets/{label-Cnc4HQwP.js → label-Dhoh3DcI.js} +1 -1
- package/dist/client/assets/{layout-BVW5q62A.js → layout-dz9-bhT2.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DMfsC9-u.js → legacy-agents-deep-DO-8kywe.js} +1 -1
- package/dist/client/assets/legacy-main-redirect-BMyuR4az.js +1 -0
- package/dist/client/assets/library-BQ9URfiH.js +1 -0
- package/dist/client/assets/{login-CN9ueiIT.js → login-DwOQDvQC.js} +1 -1
- package/dist/client/assets/{markdown-CA3yd3L6.js → markdown-prFeEkT4.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Xaw0krD3.js → mcp-app-renderer-fHjuxWIZ.js} +1 -1
- package/dist/client/assets/{mcp-oauth-3Gakbc_U.js → mcp-oauth-CNKUkWMd.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CxgfM8zh.js → mcp-oauth-CTJ5Iw4i.js} +1 -1
- package/dist/client/assets/{members-54kLIghY.js → members-B9Wn7yAF.js} +1 -1
- package/dist/client/assets/{memory-CQX6dqQP.js → memory-BDb7_tyh.js} +2 -2
- package/dist/client/assets/{mini-report-page-DCq4FNu-.js → mini-report-page-Bsjfan82.js} +1 -1
- package/dist/client/assets/{mock-board-CrlDKQvj.js → mock-board-BWfjyR2S.js} +3 -3
- package/dist/client/assets/{monaco-editor-C7rmyhBT.js → monaco-editor-Wx_2qGOP.js} +2 -2
- package/dist/client/assets/monitoring-BmpcQtwP.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-Bhxzz0Gz.js → monitoring-stats-row-THiAXYTp.js} +1 -1
- package/dist/client/assets/{multi-select-DtSzZ5RJ.js → multi-select-DOxlfIKk.js} +1 -1
- package/dist/client/assets/mustache-BzHjgnm5.js +4 -0
- package/dist/client/assets/named-rule-uses-Mu_Msc9v.js +1 -0
- package/dist/client/assets/named-rule-view-CN2yeHp5.js +1 -0
- package/dist/client/assets/{new-project-dialog-DpHJ0D5s.js → new-project-dialog-DFsG79bb.js} +1 -1
- package/dist/client/assets/{oauth-callback-ChXsONZm.js → oauth-callback-BekJkoCF.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BnJfOlsF.js → oauth-callback-ai-provider-FtcHAH0j.js} +1 -1
- package/dist/client/assets/{onboarding-CuSBfoiA.js → onboarding-DNskGrdg.js} +1 -1
- package/dist/client/assets/{openai-conversation-B0QRsRtq.js → openai-conversation-_LIGb37e.js} +2 -2
- package/dist/client/assets/{optimistic-project-sidebar-views-Cgq6MsN2.js → optimistic-project-sidebar-views-CrYamEqL.js} +1 -1
- package/dist/client/assets/order-monitor-day-DLFR-weA.js +1 -0
- package/dist/client/assets/{organization-choice-hoXHHizl.js → organization-choice-zGI39_sg.js} +1 -1
- package/dist/client/assets/{orgs-CsgsGgsX.js → orgs-BjIQy8J3.js} +1 -1
- package/dist/client/assets/page-seo-form-CrgZFHtq.js +1 -0
- package/dist/client/assets/{pair-5gOZrfkD.js → pair-Ck7rgrik.js} +7 -7
- package/dist/client/assets/parse-sections-YhOUxu7l.js +1 -0
- package/dist/client/assets/plan-Iixr6Ywe.js +1 -0
- package/dist/client/assets/{plan-ladder-BydnH1hR.js → plan-ladder-BKLU8eo8.js} +1 -1
- package/dist/client/assets/{popover-DSRFfUdL.js → popover-DaReiQzV.js} +1 -1
- package/dist/client/assets/post-calendar--v0MjZPE.js +1 -0
- package/dist/client/assets/post-editor-CRy0VAcT.js +2 -0
- package/dist/client/assets/{preview-content-hWNiqB3L.js → preview-content-DJOuEciL.js} +1 -1
- package/dist/client/assets/{preview-dialog-HJF1l34b.js → preview-dialog-CnlKftcv.js} +1 -1
- package/dist/client/assets/{preview-panel-PigPEt4W.js → preview-panel-C2Athpf5.js} +1 -1
- package/dist/client/assets/preview-tab-CzS9kIxI.js +551 -0
- package/dist/client/assets/product-picker-dialog-oD9OPZfl.js +1 -0
- package/dist/client/assets/{profile-D-LHzn9e.js → profile-DAF3l5cg.js} +1 -1
- package/dist/client/assets/{project-app-view-CGbP48WX.js → project-app-view-CZXBsQ0a.js} +1 -1
- package/dist/client/assets/project-apps-CG2eY1ZZ.js +1 -0
- package/dist/client/assets/{project-feed-uKBIzmIi.js → project-feed-K24c6-Xx.js} +1 -1
- package/dist/client/assets/{project-icon-njec1yh1.js → project-icon-ZadU5ZjL.js} +1 -1
- package/dist/client/assets/project-reports-Crv9B-vM.js +1 -0
- package/dist/client/assets/project-tasks-Cz-57jQh.js +1 -0
- package/dist/client/assets/{projects-OJnagyMB.js → projects-BWrIdbSy.js} +1 -1
- package/dist/client/assets/{projects-empty-state-C9IhB7We.js → projects-empty-state-BWAilN1f.js} +1 -1
- package/dist/client/assets/{prompts-B590L6x_.js → prompts-DKnoRB34.js} +1 -1
- package/dist/client/assets/record-editor-d52mwz1n.js +1 -0
- package/dist/client/assets/redirect-editor-C-WKtN9s.js +1 -0
- package/dist/client/assets/releases-api-q3AffL1J.js +1 -0
- package/dist/client/assets/reports-B3miutne.js +1 -0
- package/dist/client/assets/{reports-DBL7SnEu.js → reports-Bg1fi6kR.js} +1 -1
- package/dist/client/assets/{reports-onboarding-Be9p494r.js → reports-onboarding-acV5ZZpQ.js} +1 -1
- package/dist/client/assets/reports-tab-Clf7FxSU.js +2 -0
- package/dist/client/assets/{repositories-BEFfDE3p.js → repositories-CxdgYwWQ.js} +1 -1
- package/dist/client/assets/repositories-D42Ai47E.js +1 -0
- package/dist/client/assets/{repository-binding-BLgLcT4o.js → repository-binding-DtIeSvDY.js} +1 -1
- package/dist/client/assets/{repository-import-picker-lphgZTGu.js → repository-import-picker-C2sQ94O1.js} +1 -1
- package/dist/client/assets/{repository-picker-Dadd-3sc.js → repository-picker-BXaWFfDW.js} +1 -1
- package/dist/client/assets/{require-capability-D4hkdMxt.js → require-capability-DAfCGgHW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-e3_y0Tns.js → required-auth-layout-4jyUcmCy.js} +1 -1
- package/dist/client/assets/{reset-password-DPAO5WIu.js → reset-password-BGjvzv1z.js} +1 -1
- package/dist/client/assets/{resizable-D4wP3vt7.js → resizable-CQyxQjcn.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-56O81FJc.js +1 -0
- package/dist/client/assets/{review-settings-BJK_0aY-.js → review-settings-CWih3HF4.js} +1 -1
- package/dist/client/assets/{roles-CJ569tPn.js → roles-BRkp9ar3.js} +1 -1
- package/dist/client/assets/route-4SgoFvu0.js +1 -0
- package/dist/client/assets/route-BEESJELS.js +1 -0
- package/dist/client/assets/route-D6eBZFy3.js +1 -0
- package/dist/client/assets/runnable-block-editor-CqYgijVY.js +20 -0
- package/dist/client/assets/{sandbox-git-api-CRxdlhrN.js → sandbox-git-api-CH_-QFpD.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-v9W7lV1M.js → sandbox-lifecycle-context-DdMgF1Lv.js} +1 -1
- package/dist/client/assets/schema-Cn4x5iT-.js +1 -0
- package/dist/client/assets/{schema-Cx9ZLa-H.js → schema-Dvc5tPTN.js} +1 -1
- package/dist/client/assets/{scroll-area-Bnrys5oj.js → scroll-area-9wUBmncr.js} +1 -1
- package/dist/client/assets/{search-input-CXQLMhKZ.js → search-input-1DLvCYgl.js} +1 -1
- package/dist/client/assets/{search-toggle-DxUZFRWy.js → search-toggle-BnK2KHqJ.js} +1 -1
- package/dist/client/assets/{secret-picker-HHgZv9y6.js → secret-picker-B4zI9e3W.js} +1 -1
- package/dist/client/assets/{secrets-Cm2ZaKef.js → secrets-C2PS9_a9.js} +1 -1
- package/dist/client/assets/{sections-DT5ozPKC.js → sections-DX6pY_bs.js} +1 -1
- package/dist/client/assets/sections-editor-DD9uWqQ8.js +4 -0
- package/dist/client/assets/{select-CSQbGY9x.js → select-DUEGSJco.js} +1 -1
- package/dist/client/assets/{select-model-NUb0C_oX.js → select-model-mFyCcf-O.js} +1 -1
- package/dist/client/assets/seo-editor-Bf-sfYSP.js +1 -0
- package/dist/client/assets/{separator-CjiQChVR.js → separator-Bk_a4cod.js} +1 -1
- package/dist/client/assets/settings-tab-DpQMA4J6.js +1 -0
- package/dist/client/assets/{sheet-C-yunzji.js → sheet-Dhe0uPV2.js} +1 -1
- package/dist/client/assets/shell-layout-U7D4A6nk.js +1 -0
- package/dist/client/assets/site-draft-actions-Dpnw67Ug.js +12 -0
- package/dist/client/assets/site-draft-view-Cho80MC6.js +2 -0
- package/dist/client/assets/site-editor-34XlqmyW.js +1 -0
- package/dist/client/assets/{skills-9HRxIPqn.js → skills-DghKPwKw.js} +1 -1
- package/dist/client/assets/slider-CLUaEqdg.js +1 -0
- package/dist/client/assets/{sortable.esm-C1zl1f3P.js → sortable.esm-CkqHW6-y.js} +1 -1
- package/dist/client/assets/{sso-PqsQn3xP.js → sso-DGFWPeza.js} +1 -1
- package/dist/client/assets/{suggestion-Wgq7DDQo.js → suggestion-BNEVVm5c.js} +2 -2
- package/dist/client/assets/{switch-DYA2xfHU.js → switch-ByCU93P4.js} +1 -1
- package/dist/client/assets/{symbol-B8wQ7lKk.js → symbol-BQLM2_V8.js} +1 -1
- package/dist/client/assets/{synced-repos-mXhCt1sQ.js → synced-repos-CjPrTUpI.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BpaLtZlY.js → tab-icon-glyph-Cz_BoFAU.js} +1 -1
- package/dist/client/assets/{table-BQLxO2Sb.js → table-Tw2gCVXe.js} +1 -1
- package/dist/client/assets/{tabs-2NCCfhSA.js → tabs-C7f3nqQx.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-FdiZZP36.js → task-assignee-avatar-BiPanmNM.js} +1 -1
- package/dist/client/assets/{task-board-DRNr9Dsj.js → task-board-BrTYr-oE.js} +1 -1
- package/dist/client/assets/{task-route-BaANwBST.js → task-route-BLP-DBaS.js} +1 -1
- package/dist/client/assets/{task-status-VcYcBtq_.js → task-status-CVpsP3bD.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-RJkelUr8.js → taskboard-analytics-CQMw4wzL.js} +1 -1
- package/dist/client/assets/tasks-C_346UtB.js +1 -0
- package/dist/client/assets/{tasks-COZY0QCJ.js → tasks-CtPgnGlW.js} +3 -3
- package/dist/client/assets/{textarea-CxhXyMKI.js → textarea-Bbbnnl4r.js} +1 -1
- package/dist/client/assets/{thread-analytics-BGQNbVS2.js → thread-analytics-CtQHMk9N.js} +1 -1
- package/dist/client/assets/{thread-intent-DKuqiaG7.js → thread-intent-7GmQH5mt.js} +4 -4
- package/dist/client/assets/{thread-route-CQ0phZyI.js → thread-route-C7RSGMhP.js} +1 -1
- package/dist/client/assets/{thread-route-jNELZX1N.js → thread-route-DpLeB4i0.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-Cdv_wHnA.js → thread-sheet-body-dWggSd-b.js} +1 -1
- package/dist/client/assets/time-range-picker-BVXe-Owx.js +1 -0
- package/dist/client/assets/toggle-group-CXUKmPFr.js +1 -0
- package/dist/client/assets/{tool-namespace-DTl3so75.js → tool-namespace-DIE_8J9o.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BPY5dUh9.js → toolbar-icon-button-DzJeqLa2.js} +1 -1
- package/dist/client/assets/{tooltip-B5RmO6BW.js → tooltip-gMeEuHtO.js} +1 -1
- package/dist/client/assets/tooltipContext-BQS7kWxi.js +1 -0
- package/dist/client/assets/{track-BBpplM-4.js → track-DdeuRUoM.js} +1 -1
- package/dist/client/assets/{types-Bt5yyj-z.js → types-CHFSNT7a.js} +6 -6
- package/dist/client/assets/{url-slug-B41xLFy_.js → url-slug-D37s8EDd.js} +1 -1
- package/dist/client/assets/{usage-stats-BkcKNXzu.js → usage-stats-BecGIkLk.js} +1 -1
- package/dist/client/assets/{use-ai-providers-D1TJRnIR.js → use-ai-providers-CAt_9H4n.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-B_CXDUdG.js +1 -0
- package/dist/client/assets/{use-automations-B9eI7BBQ.js → use-automations-C6LbyvJD.js} +1 -1
- package/dist/client/assets/{use-autosave-D3uy94Wi.js → use-autosave-e9CI9oFB.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-BNudmQ0u.js → use-chat-layout-state-24wCHq_-.js} +1 -1
- package/dist/client/assets/{use-clock-tick-D3FoyBXt.js → use-clock-tick-DflKMAWl.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BLomLbPK.js → use-connect-companion-3OWtftC8.js} +1 -1
- package/dist/client/assets/{use-connection-BwU_KLSF.js → use-connection-CBKH8IwL.js} +1 -1
- package/dist/client/assets/use-content-sync-D_qyLHCv.js +1 -0
- package/dist/client/assets/{use-copy-d7X6hrKI.js → use-copy-Cn8Org7G.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-jW1iVRi_.js +1 -0
- package/dist/client/assets/{use-date-fns-locale-BuGEMgXR.js → use-date-fns-locale-DTRxIyi4.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-KHVF-MyQ.js → use-debounced-autosave-DDaoW-uw.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DJkh4QSx.js → use-debounced-value-c5JdkW89.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Dx8wT8P5.js → use-deco-credits-D8w-JIDW.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-AlKmmETJ.js → use-decopilot-events-Cp8NaBPU.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BQjQHz64.js → use-delete-connection-BJIObh7l.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BIA7CHLS.js → use-deployment-admin-D7XKR1Dx.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-CSz1rYUo.js +1 -0
- package/dist/client/assets/{use-file-configs-tsH4be9V.js → use-file-configs-DW0hmZjE.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-bGge9UaE.js → use-inbox-feed-DOpe-XBh.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BO0n6TVn.js → use-infinite-scroll-Cuyf7850.js} +1 -1
- package/dist/client/assets/{use-join-requests-DqhkfI-R.js → use-join-requests-CBahVlKF.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-CVsgtXg7.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-DmZSbEuf.js → use-mcp-auth-status-Cs8ZHHaN.js} +1 -1
- package/dist/client/assets/use-mcp-client-D1kFCZ4v.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-DHm-ZTib.js → use-mcp-prompts-wKDmQlGB.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DiCKzhUm.js → use-mcp-tools-I-kpM305.js} +1 -1
- package/dist/client/assets/{use-members-h3MYd8gX.js → use-members-0ZBHc0S5.js} +1 -1
- package/dist/client/assets/{use-mobile-DCpa1RnA.js → use-mobile-CKoO3XSk.js} +1 -1
- package/dist/client/assets/use-move-blocks-Dm4etxGk.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-Bt0oZ-ou.js → use-navigate-to-agent-DLX1nkvn.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-B2NuYLXS.js → use-open-billing-url-C5lEsbaH.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CL0a2tPL.js → use-org-auth-client-t4l-TKT1.js} +1 -1
- package/dist/client/assets/{use-org-fs-D_4Q985K.js → use-org-fs-49a1bhbu.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CC0BNhdO.js → use-org-repo-syncs-BunA5GFg.js} +1 -1
- package/dist/client/assets/{use-org-sso-LC63-uuA.js → use-org-sso-B_zXOLDA.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D1Q7317o.js → use-organization-roles-Bc45ILhm.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DhvN44pQ.js → use-organization-settings-laAOR3Cm.js} +1 -1
- package/dist/client/assets/use-panel-navigate-Bghh8kV3.js +1 -0
- package/dist/client/assets/use-project-native-view-presence-C3Vtd78t.js +1 -0
- package/dist/client/assets/{use-project-scope-Cq4vb2Sy.js → use-project-scope-DH5nL_oD.js} +1 -1
- package/dist/client/assets/{use-recent-apps-CeIVmzp8.js → use-recent-apps-D6yVH6-8.js} +1 -1
- package/dist/client/assets/{use-releases-DQ--CsAF.js → use-releases-G0pirYfu.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CWir9L_Y.js → use-reports-diagnostic-BKJYEIJX.js} +1 -1
- package/dist/client/assets/{use-secrets-D6tUoaJC.js → use-secrets-DszBqpzD.js} +1 -1
- package/dist/client/assets/use-section-preview-base-BASvFHv_.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-DPHQfMII.js → use-sidebar-collapsed-CuPY8XXm.js} +1 -1
- package/dist/client/assets/{use-tags-DE48pnzl.js → use-tags-BsXvHuTC.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DlTk43Uu.js → use-task-board-analytics-BtNGPBbp.js} +1 -1
- package/dist/client/assets/{use-task-board-events-CSRq29Tm.js → use-task-board-events-BARWSwfj.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BsxjjcBf.js → use-task-board-item-prs-BhAhDKGd.js} +1 -1
- package/dist/client/assets/{use-task-metadata-ToXrxOCT.js → use-task-metadata-Dd-9Qkoq.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-Bu_i1v9r.js → use-thread-analytics-B9Rm3t_E.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-jyAHyZHI.js → use-thread-outputs-CoFWg3_v.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-wCORGPw3.js +1 -0
- package/dist/client/assets/{useQueries-CddGJ3VE.js → useQueries-_Urb_S-y.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-JvpRoEFG.js +1 -0
- package/dist/client/assets/{users-2guAvf9G.js → users-BXTFPRVd.js} +1 -1
- package/dist/client/assets/{utils-DzhKsxx8.js → utils-CduIoZ0d.js} +2 -2
- package/dist/client/assets/variant-calendar-D0iLcmjF.js +1 -0
- package/dist/client/assets/variant-draft-pointer-HWAlFj6Z.js +1 -0
- package/dist/client/assets/virtual-mcp-Xd6PvE5_.js +1 -0
- package/dist/client/assets/{watch-sse-pool-DwBbAQ97.js → watch-sse-pool-BoG6Bqps.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +684 -684
- package/package.json +1 -1
- package/dist/client/assets/ActiveShapeUtils-DV40gvcg.js +0 -1
- package/dist/client/assets/AreaChart-C_4ebEom.js +0 -1
- package/dist/client/assets/BarChart-DfTtCBDv.js +0 -1
- package/dist/client/assets/CartesianChart-uNdbRuTj.js +0 -1
- package/dist/client/assets/ReferenceLine-ILm1GG8J.js +0 -1
- package/dist/client/assets/Sector-D2xOkxuc.js +0 -28
- package/dist/client/assets/agent-analytics-D74l8HWB.js +0 -2
- package/dist/client/assets/agent-app-CEBVAZwO.js +0 -1
- package/dist/client/assets/agent-assets-Bwo-LFkg.js +0 -1
- package/dist/client/assets/agent-automations-Du82D3qr.js +0 -1
- package/dist/client/assets/agent-deck-BZZHzjdZ.js +0 -1
- package/dist/client/assets/agent-e2e-D6ovLSkg.js +0 -1
- package/dist/client/assets/agent-experiments-Bf1OqB1m.js +0 -1
- package/dist/client/assets/agent-file-CzvpBEaK.js +0 -1
- package/dist/client/assets/agent-hosting-6te_9jdz.js +0 -1
- package/dist/client/assets/agent-library-BOSIxUYz.js +0 -1
- package/dist/client/assets/agent-library-file-C0RqJ45T.js +0 -1
- package/dist/client/assets/agent-monitor-C3Fta9kk.js +0 -1
- package/dist/client/assets/agent-releases-COSsnWfe.js +0 -2
- package/dist/client/assets/agent-settings-DDIl5jyz.js +0 -1
- package/dist/client/assets/agent-site-editor-DlN_1OE1.js +0 -27
- package/dist/client/assets/agent-site-editor-code-ByOIwjcy.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DSEuxkJh.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-pw2RBbYs.js +0 -1
- package/dist/client/assets/agent-view-IbmF6KBh.js +0 -1
- package/dist/client/assets/alert-B29bfkXd.js +0 -1
- package/dist/client/assets/analytics-sections-wgH0NLyS.js +0 -1
- package/dist/client/assets/api-keys-CiMyiLjo.js +0 -1
- package/dist/client/assets/app-editor-DgdEdwhZ.js +0 -1
- package/dist/client/assets/automation-list-row-qFFhCtZo.js +0 -1
- package/dist/client/assets/badge-Cnnepvq1.js +0 -1
- package/dist/client/assets/blocks-tab-states-jGeS9iVz.js +0 -20
- package/dist/client/assets/blog-schema-CUOOV4a2.js +0 -1
- package/dist/client/assets/category-editor-Gr46SDP4.js +0 -1
- package/dist/client/assets/cms-settings-editor-CxJ3W3GB.js +0 -1
- package/dist/client/assets/collection-detail-BXVqh2XU.js +0 -1
- package/dist/client/assets/content-tab-YH7YYY48.js +0 -22
- package/dist/client/assets/context-3twD8BEv.js +0 -1
- package/dist/client/assets/hosted-publish-feedback-9IsLIhi6.js +0 -1
- package/dist/client/assets/index-BRzGXE32.js +0 -4
- package/dist/client/assets/index-BqS2UmN9.css +0 -1
- package/dist/client/assets/infra-billing-DkMlIjvS.js +0 -1
- package/dist/client/assets/legacy-main-redirect-mSx9JMxj.js +0 -1
- package/dist/client/assets/library-BNARKbpY.js +0 -1
- package/dist/client/assets/monitoring-DX0mWeP-.js +0 -1
- package/dist/client/assets/mustache-BxPGtFxk.js +0 -4
- package/dist/client/assets/order-monitor-day-BHpHKh9K.js +0 -1
- package/dist/client/assets/page-seo-form-PX_1VQkb.js +0 -1
- package/dist/client/assets/plan-BnqYpKp5.js +0 -1
- package/dist/client/assets/post-calendar-D_8Ms9Cq.js +0 -1
- package/dist/client/assets/post-editor-lU8h7ku9.js +0 -2
- package/dist/client/assets/preview-tab-B-uX9H3E.js +0 -551
- package/dist/client/assets/product-picker-dialog-BUcziHgK.js +0 -1
- package/dist/client/assets/project-apps-CajNRGrz.js +0 -1
- package/dist/client/assets/project-reports-BwZ6fxIs.js +0 -1
- package/dist/client/assets/project-tasks-zYigtiRn.js +0 -1
- package/dist/client/assets/record-editor-BxllIkC_.js +0 -1
- package/dist/client/assets/redirect-editor-CTLxiYxe.js +0 -1
- package/dist/client/assets/reports-CJqSx9sD.js +0 -1
- package/dist/client/assets/reports-tab-B0M7UKAQ.js +0 -2
- package/dist/client/assets/repositories-DceuH_GA.js +0 -1
- package/dist/client/assets/resolve-tab-icon-CE5OwNrK.js +0 -1
- package/dist/client/assets/route-Bzf1UEGL.js +0 -1
- package/dist/client/assets/route-CG_vDQP9.js +0 -1
- package/dist/client/assets/route-Dfqmjwjm.js +0 -1
- package/dist/client/assets/schema-BdFq22Hl.js +0 -1
- package/dist/client/assets/secret-ciphertext-DZr2qcb4.js +0 -1
- package/dist/client/assets/sections-editor-CkId24Js.js +0 -4
- package/dist/client/assets/seo-editor-D886xssW.js +0 -1
- package/dist/client/assets/settings-tab-BmEKDSFe.js +0 -1
- package/dist/client/assets/shell-layout-vQvYndIW.js +0 -1
- package/dist/client/assets/site-editor-1ZGqBXbh.js +0 -1
- package/dist/client/assets/site-editor-toast-BtFL0E4q.js +0 -1
- package/dist/client/assets/slider-DB0IY-tO.js +0 -1
- package/dist/client/assets/tasks-CYZeHeAX.js +0 -1
- package/dist/client/assets/time-range-picker-DEciYFPf.js +0 -1
- package/dist/client/assets/toggle-group-CtdhsZGp.js +0 -1
- package/dist/client/assets/tooltipContext-C93Q6WFf.js +0 -1
- package/dist/client/assets/use-content-sync-BgOMBs5q.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-OUIvni0u.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-5oeXM-kY.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-BrJK-bL3.js +0 -1
- package/dist/client/assets/use-main-schema-v8-CZLsOlEV.js +0 -1
- package/dist/client/assets/use-mcp-client-MRThuZpK.js +0 -10
- package/dist/client/assets/use-panel-navigate-DoD4Atgz.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-DF_1PP5b.js +0 -1
- package/dist/client/assets/use-section-preview-base-Ca45yoz9.js +0 -1
- package/dist/client/assets/useInfiniteQuery-ZoWXsJcj.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D2W70ffp.js +0 -1
- package/dist/client/assets/variant-calendar-Bdj0O-mA.js +0 -1
- package/dist/client/assets/variant-draft-pointer-_apEPqxm.js +0 -1
- package/dist/client/assets/virtual-mcp-CMZ8dHEU.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as At,b as Nt,r as A,j as o,av as Rt,l as Kt,h as Tt,t as xt}from"./index-ifZGovK1.js";import{u as Ct}from"./chat-context-DXm8btNS.js";import{S as Ft}from"./scroll-area-9wUBmncr.js";import{u as Pt,A as Ot}from"./use-section-preview-base-BASvFHv_.js";import{x as Ut,ba as $t}from"./parse-sections-YhOUxu7l.js";import{d as It,u as zt,t as Lt,D as Vt,v as qt,a as Dt,E as Mt}from"./runnable-block-editor-CqYgijVY.js";import{n as Zt,r as Gt}from"./content-tab-CaoAhPSw.js";import"./use-panel-navigate-Bghh8kV3.js";import"./thread-route-C7RSGMhP.js";import"./use-project-scope-DH5nL_oD.js";import"./repository-binding-DtIeSvDY.js";import"./use-mcp-client-D1kFCZ4v.js";import"./auth-C_nDagDA.js";import"./autosend-xoWUmECR.js";import"./thread-intent-7GmQH5mt.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BoG6Bqps.js";import"./task-board-BrTYr-oE.js";import"./schema-Cn4x5iT-.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-Cp8NaBPU.js";import"./use-ai-providers-CAt_9H4n.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-laAOR3Cm.js";import"./index-BdQq_4o_.js";import"./UserSquare-BBEl_BxL.js";import"./agent-icon--EtIPqub.js";import"./AlertCircle-CUAx3A4b.js";import"./Tool01-BsK9c3-e.js";import"./ArrowUp-EL0FBv9C.js";import"./ArrowLeft-BWCsylYe.js";import"./LinkBroken01-DcsqjBuj.js";import"./ShoppingBag01-aJuRSlBz.js";import"./ZoomOut-DytgoG2i.js";import"./Building02-PifDTlhb.js";import"./CheckCircle-CMGqXocs.js";import"./ChevronUp-x46FJEcD.js";import"./ChevronSelectorVertical-BSRBjpBn.js";import"./Copy01-OBSYmimV.js";import"./CreditCard01-DWsSThAm.js";import"./DotsVertical-jkvtcdek.js";import"./Image01-BCnLFq1D.js";import"./Globe04-blkS_Kfg.js";import"./SwitchHorizontal01-B5WFt7_0.js";import"./Key01-CG7Kua6O.js";import"./Link01-8aKNfNRw.js";import"./Minus-B38cW2ZC.js";import"./Monitor01-DQEkUL3d.js";import"./Sun-k4hypx5Q.js";import"./Play-Ns9aRVTY.js";import"./Plus-vkM1FxVr.js";import"./SearchMd-Cp6J-1Iu.js";import"./Trash01-Z1ezoy3S.js";import"./Upload01-B3-nlnKa.js";import"./User01-C2Sw39bs.js";import"./Users01-DMFeioyM.js";import"./XClose-BdwIxxCT.js";import"./section-preview-url-7zfngvgW.js";import"./input-DIcILgWd.js";import"./usage-stats-BecGIkLk.js";import"./tool-namespace-DIE_8J9o.js";import"./form-D4PspedZ.js";import"./label-Dhoh3DcI.js";import"./utils-CVEq3hMx.js";import"./markdown-prFeEkT4.js";import"./use-copy-Cn8Org7G.js";import"./use-mobile-CKoO3XSk.js";import"./tooltip-gMeEuHtO.js";import"./index-DNa7Epd0.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-HZwQKD3a.js";import"./file-type-icon-DHFVwXjA.js";import"./shell-layout-U7D4A6nk.js";import"./avatar-DHKJiyOX.js";import"./use-clock-tick-DflKMAWl.js";import"./command-BlBQgQPI.js";import"./index-BCHFFeZZ.js";import"./integration-icon-D1aQLe0v.js";import"./project-icon-ZadU5ZjL.js";import"./new-project-dialog-DFsG79bb.js";import"./repository-import-picker-C2sQ94O1.js";import"./use-navigate-to-agent-DLX1nkvn.js";import"./repository-picker-BXaWFfDW.js";import"./useInfiniteQuery-wCORGPw3.js";import"./infiniteQueryObserver-DvmMaiCa.js";import"./collection-search--9d0M5sc.js";import"./use-debounced-value-c5JdkW89.js";import"./required-auth-layout-4jyUcmCy.js";import"./use-org-sso-B_zXOLDA.js";import"./chat-draft-WGnppXw7.js";import"./select-DUEGSJco.js";import"./tabs-C7f3nqQx.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-D8w-JIDW.js";import"./toggle-group-CXUKmPFr.js";import"./use-open-billing-url-C5lEsbaH.js";import"./index-B32YFtAw.js";import"./checkbox-vFQy8MvV.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-DaReiQzV.js";import"./drawer-0sYDH2mt.js";import"./input-BeDIlaby.js";import"./suggestion-BNEVVm5c.js";import"./use-mcp-prompts-wKDmQlGB.js";import"./use-org-fs-49a1bhbu.js";import"./question-004-sINsf4GQ.js";import"./use-members-0ZBHc0S5.js";import"./use-org-auth-client-t4l-TKT1.js";import"./feature-paywall-hsFyGLR_.js";import"./plan-ladder-BKLU8eo8.js";import"./add-connection-dialog-F6QQAEZv.js";import"./extract-connection-data-CBAyhzk-.js";import"./metadata-D72DunRR.js";import"./connection-Bo3v2rj5.js";import"./url-slug-D37s8EDd.js";import"./connection-card-DMfcnulT.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-Bbbnnl4r.js";import"./use-connection-CBKH8IwL.js";import"./schema-Dvc5tPTN.js";import"./connection-form-helpers-A3QfJozi.js";import"./authenticate-and-persist-oauth-CpcQdSQ-.js";import"./mcp-oauth-CNKUkWMd.js";import"./mcp-oauth-CTJ5Iw4i.js";import"./collection-tabs-BfpnVdlQ.js";import"./badge-ux-RK1YK.js";import"./use-infinite-scroll-Cuyf7850.js";import"./useSuspenseInfiniteQuery-JvpRoEFG.js";import"./use-task-board-events-BARWSwfj.js";import"./use-chat-layout-state-24wCHq_-.js";import"./use-content-sync-D_qyLHCv.js";import"./sandbox-url-D3mC8qhT.js";import"./index-j4NUsiRT.js";import"./pair-Ck7rgrik.js";import"./collapsible-CnlVGt-G.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-fHjuxWIZ.js";import"./types-CHFSNT7a.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-Dhe0uPV2.js";import"./use-thread-outputs-CoFWg3_v.js";import"./experiments-tab-choice-CMHPX5ZC.js";import"./utils-CduIoZ0d.js";import"./sandbox-git-api-CH_-QFpD.js";import"./alert-BDbwlXZm.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./switch-ByCU93P4.js";import"./blocks-tab-states-Chq5j0oT.js";import"./slider-CLUaEqdg.js";import"./index-Bxkd37dZ.js";import"./tooltipContext-BQS7kWxi.js";import"./CategoricalChart-QwBn7EzX.js";import"./index-gqp4B5qj.js";import"./ActiveShapeUtils-CHmxGMIj.js";import"./Sector-BeXkYaJv.js";import"./symbol-BQLM2_V8.js";import"./empty-state-D6RWdvUz.js";import"./monaco-editor-Wx_2qGOP.js";import"./editor-BctLuJLS.js";import"./calendar-qN6CeKGa.js";import"./editor-classes-BnPaf--r.js";import"./core.esm-DJ5llHMe.js";import"./sortable.esm-CkqHW6-y.js";import"./combobox-BMxhMbUn.js";import"./alert-dialog-C-DaggA1.js";import"./search-input-1DLvCYgl.js";import"./use-file-configs-DW0hmZjE.js";import"./asset-utils-Cb8p2lKk.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./mustache-BzHjgnm5.js";import"./sandbox-lifecycle-context-DdMgF1Lv.js";import"./date-utils-CrvIKg-s.js";import"./use-move-blocks-Dm4etxGk.js";import"./empty-state-DeArX05X.js";function Ht(c,t){const m=(c.title||c.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),s=/^[A-Za-z]/.test(m)&&m.length>0?m:"Section",r=Zt(t,s);return{blockKey:r,data:{__resolveType:c.resolveType,name:r}}}function di(c){const t=At.c(88),{orgSlug:m,virtualMcpId:s,branch:r,blockKey:a,block:h,meta:n,decofile:d,title:kt,excludeFields:G,schemaPending:ht,previewBaseUrl:bt,notice:H,saveGuard:J,persistDefaults:Q}=c,W=ht===void 0?!1:ht,X=bt===void 0?null:bt,Y=Ct()?.taskId??null,p=Nt();let R;t[0]!==r||t[1]!==X||t[2]!==s?(R={virtualMcpId:s,branch:r,sandboxUrl:X},t[0]=r,t[1]=X,t[2]=s,t[3]=R):R=t[3];const b=Pt(R),u=typeof h?.__resolveType=="string"?h.__resolveType:"";let K;t[4]!==G||t[5]!==n||t[6]!==u?(K=Gt(u,n,G),t[4]=G,t[5]=n,t[6]=u,t[7]=K):K=t[7];const v=K;let T;t[8]!==v?(T=!!v&&Object.keys(v.properties??{}).length>0,t[8]=v,t[9]=T):T=t[9];const tt=T,vt=kt??(h?Ut(a,h,n):a);let C;t[10]!==r||t[11]!==m||t[12]!==s?(C={orgSlug:m,virtualMcpId:s,branch:r},t[10]=r,t[11]=m,t[12]=s,t[13]=C):C=t[13];let F;t[14]!==J?(F={guard:J},t[14]=J,t[15]=F):F=t[15];const{save:et,flush:ot,isPending:rt}=It(C,F);let P;t[16]!==r||t[17]!==m||t[18]!==s?(P={orgSlug:m,virtualMcpId:s,branch:r},t[16]=r,t[17]=m,t[18]=s,t[19]=P):P=t[19];const g=zt(P);let O;t[20]!==g||t[21]!==p?(O=Dt((e,i)=>g.mutate({blockKey:e,data:i},{onError:l=>xt.error(p("sectionsEditor.sectionsEditor.saveFailed",{error:l.message}))})),t[20]=g,t[21]=p,t[22]=O):O=t[22];const it=O,[Bt,jt]=A.useState(a),[st,gt]=A.useState(null),[mt,St]=A.useState(0);let U;t[23]===Symbol.for("react.memo_cache_sentinel")?(U=[],t[23]=U):U=t[23];const[S,yt]=A.useState(U),[pt,f]=A.useState(!1),$=A.useRef(null);Bt!==a&&(jt(a),gt(null),St(Qt),yt([]));let I;t[24]!==h?(I=h??{},t[24]=h,t[25]=I):I=t[25];const at=I;let y;t[26]!==st?(y=st??{},t[26]=st,t[27]=y):y=t[27];let z;t[28]!==at||t[29]!==y?(z={...at,...y},t[28]=at,t[29]=y,t[30]=z):z=t[30];const nt=z;let L;t[31]!==a||t[32]!==u||t[33]!==et?(L=e=>{const i=e;gt(i),et(a,{...i,__resolveType:u})},t[31]=a,t[32]=u,t[33]=et,t[34]=L):L=t[34];const lt=L;let V;t[35]===Symbol.for("react.memo_cache_sentinel")?(V=e=>{yt(e)},t[35]=V):V=t[35];const N=V;let q;t[36]!==d||t[37]!==ot||t[38]!==g||t[39]!==p?(q=async(e,i)=>{try{const{blockKey:l,data:x}=Ht(e,d);await g.mutateAsync({blockKey:l,data:x}),xt.success(p("sandbox.appEditor.createdSection",{name:l})),i({__resolveType:l}),ot()}catch(l){const x=l,Et=x instanceof Error?x.message:p("sandbox.appEditor.failedAddSection");throw xt.error(Et),x}},t[36]=d,t[37]=ot,t[38]=g,t[39]=p,t[40]=q):q=t[40];const k=q;let D;t[41]!==f?(D=e=>{$.current=e.append,f(!0)},t[41]=f,t[42]=D):D=t[42];const ct=D;let M;t[43]!==k||t[44]!==f?(M=async e=>{const i=$.current;if(i)try{await k(e,l=>{i(l),f(!1),$.current=null})}catch{}},t[43]=k,t[44]=f,t[45]=M):M=t[45];const dt=M,ut=S.length>0?[vt,...S]:[],_t="flex h-full flex-col",wt="flex h-12 shrink-0 items-center justify-between border-b px-6",ft=ut.length>0?o.jsx("nav",{"aria-label":p("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:ut.map((e,i)=>{const l=i===ut.length-1,x=Lt(e);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[i>0&&o.jsx(Rt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{N(i===0?[]:Vt(S,i)),St(Jt)},title:x,className:Kt("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",l?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:x})]},`${x}-${i}`)})}):o.jsx("span",{className:"text-sm font-medium",children:vt});let B;t[46]!==rt?(B=o.jsx(Mt,{isPending:rt,isError:!1}),t[46]=rt,t[47]=B):B=t[47];let j;t[48]!==ft||t[49]!==B?(j=o.jsxs("div",{className:wt,children:[ft,B]}),t[48]=ft,t[49]=B,t[50]=j):j=t[50];let _;t[51]!==a||t[52]!==r||t[53]!==S||t[54]!==d||t[55]!==nt||t[56]!==mt||t[57]!==k||t[58]!==N||t[59]!==lt||t[60]!==ct||t[61]!==tt||t[62]!==n||t[63]!==m||t[64]!==Q||t[65]!==u||t[66]!==it||t[67]!==v||t[68]!==W||t[69]!==b||t[70]!==p||t[71]!==Y||t[72]!==s?(_=tt?o.jsx(qt,{schema:v,value:nt,onChange:lt,persistDefaults:Q,basePath:"",breadcrumbPath:S,onBreadcrumbChange:N,decofile:d,meta:n,onSaveReferencedBlock:it,previewBaseUrl:b,onAddSectionItem:k,onRequestAddSection:ct,sandbox:{orgSlug:m,virtualMcpId:s,branch:r,threadId:Y}},`${a}:${mt}`):W?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(Tt,{className:"size-4"}),p("sandbox.appEditor.loadingSchema")]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:p($t(n,u)?"sandbox.appEditor.noEditableSchema":"sandbox.appEditor.schemaAwaitsBuild")}),t[51]=a,t[52]=r,t[53]=S,t[54]=d,t[55]=nt,t[56]=mt,t[57]=k,t[58]=N,t[59]=lt,t[60]=ct,t[61]=tt,t[62]=n,t[63]=m,t[64]=Q,t[65]=u,t[66]=it,t[67]=v,t[68]=W,t[69]=b,t[70]=p,t[71]=Y,t[72]=s,t[73]=_):_=t[73];let w;t[74]!==H||t[75]!==_?(w=o.jsx(Ft,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsxs("div",{className:"mx-auto max-w-xl",children:[H,_]})})}),t[74]=H,t[75]=_,t[76]=w):w=t[76];let E;t[77]!==pt||t[78]!==d||t[79]!==dt||t[80]!==n||t[81]!==b||t[82]!==f?(E=b&&o.jsx(Ot,{open:pt,onOpenChange:e=>{f(e),e||($.current=null)},meta:n,decofile:d,previewBaseUrl:b,onSelect:e=>{dt(e)}}),t[77]=pt,t[78]=d,t[79]=dt,t[80]=n,t[81]=b,t[82]=f,t[83]=E):E=t[83];let Z;return t[84]!==j||t[85]!==w||t[86]!==E?(Z=o.jsxs("div",{className:_t,children:[j,w,E]}),t[84]=j,t[85]=w,t[86]=E,t[87]=Z):Z=t[87],Z}function Jt(c){return c+1}function Qt(c){return c+1}export{di as AppEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,a2 as d,e as g,an as m,K as I,o as O}from"./index-
|
|
1
|
+
import{c as u,a2 as d,e as g,an as m,K as I,o as O}from"./index-ifZGovK1.js";import{u as $}from"./useInfiniteQuery-wCORGPw3.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{bd as v,be as $,bf as W,bg as H,bh as D,bi as y,bj as V,bk as q,bl as E,bm as x,bn as j,bo as N,bp as B,bq as Z,br as F}from"./index-CaH7O3hJ.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function L(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await M(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const O=!e.redirectUrl;if(n!==void 0||O){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const C=e.state?await e.state():void 0,{authorizationUrl:z,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:C,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(z),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function M(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return x.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function b(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??E;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await b(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await b(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=E}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):q.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await M(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function P(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await L(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=P(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=P(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await L(s);return j.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,M as d,me as e};
|
|
1
|
+
import{b8 as v,b9 as $,ba as W,bb as H,bc as D,bd as y,be as V,bf as x,bg as E,bh as j,bi as q,bj as N,bk as B,bl as Z,bm as F}from"./index-ifZGovK1.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function L(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await M(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const O=!e.redirectUrl;if(n!==void 0||O){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const C=e.state?await e.state():void 0,{authorizationUrl:z,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:C,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(z),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function M(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return 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 b(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??E;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await b(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await b(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=E}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await M(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function P(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await L(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=P(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=P(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await L(s);return q.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,M as d,me as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-
|
|
1
|
+
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-ifZGovK1.js";function h(){const e=r.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(x,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function u(){const e=r.c(5);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=l(a);if(n==="accept-invitation"){let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(m,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:"accept-invitation"})})}),e[1]=s):s=e[1];let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs(t.Fragment,{children:[s,t.jsx(f,{children:t.jsx(h,{})})]}),e[2]=i):i=e[2],i}let c;return e[3]!==n?(c=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:n})}),e[3]=n,e[4]=c):c=e[4],c}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $,a1 as Ne,r as b,e as ae,y as W,j as t,l as x,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-CaH7O3hJ.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 $,a1 as Ne,r as b,e as ae,y 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-ifZGovK1.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-ifZGovK1.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-CNKUkWMd.js";import{i as p}from"./mcp-oauth-CTJ5Iw4i.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as Q,b as Y,r as ee,l as J,j as t,T as te,B as se,X as ie,V as ne,U as ae}from"./index-ifZGovK1.js";import{B as oe}from"./badge-ux-RK1YK.js";import{A as le,a as re,b as ce,c as me,g as ue,d as de,e as fe,f as ge}from"./alert-dialog-C-DaggA1.js";import{A as xe,W as pe}from"./agent-icon--EtIPqub.js";import{i as he}from"./DotsVertical-jkvtcdek.js";import{s as je}from"./Trash01-Z1ezoy3S.js";import{i as we}from"./ZoomOut-DytgoG2i.js";import{c as _e}from"./repository-binding-DtIeSvDY.js";import{a as ve}from"./use-automations-C6LbyvJD.js";function Be(c){const e=Q.c(89),{automation:s,showAgent:o,onClick:n}=c,i=Y(),{remove:a}=ve(),[r,H]=ee.useState(!1),l=_e(o?s.virtual_mcp_id:void 0);let F;e[0]!==s.id||e[1]!==a?(F=()=>{a.mutate(s.id),H(!1)},e[0]=s.id,e[1]=a,e[2]=F):F=e[2];const U=F;let O;e[3]!==n?(O=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=O):O=e[4];const W=O,X=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==X?(u=J("inline-block size-2 rounded-full shrink-0",X),e[5]=X,e[6]=u):u=e[6];const q=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==q?(d=i(q),e[7]=i,e[8]=q,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(oe,{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 G=s.system_key&&"invisible";let v;e[36]!==G?(v=J("shrink-0",G),e[36]=G,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]!==W||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:W,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]=W,e[49]=n,e[50]=_,e[51]=D,e[52]=f,e[53]=g,e[54]=R):R=e[54];let k;e[55]!==i?(k=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=k):k=e[56];let N;e[57]!==k?(N=t.jsx(le,{children:k}),e[57]=k,e[58]=N):N=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(re,{children:b}),e[62]=b,e[63]=L):L=e[63];let C;e[64]!==N||e[65]!==L?(C=t.jsxs(ce,{children:[N,L]}),e[64]=N,e[65]=L,e[66]=C):C=e[66];let T;e[67]!==i?(T=i("automations.automationListRow.cancel"),e[67]=i,e[68]=T):T=e[68];let P;e[69]!==T?(P=t.jsx(me,{children:T}),e[69]=T,e[70]=P):P=e[70];const Z=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]!==U||e[74]!==a.isPending||e[75]!==z?(B=t.jsx(ue,{onClick:U,disabled:Z,variant:"destructive",children:z}),e[73]=U,e[74]=a.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==P||e[78]!==B?(M=t.jsxs(de,{children:[P,B]}),e[77]=P,e[78]=B,e[79]=M):M=e[79];let S;e[80]!==C||e[81]!==M?(S=t.jsxs(fe,{children:[C,M]}),e[80]=C,e[81]=M,e[82]=S):S=e[82];let E;e[83]!==r||e[84]!==S?(E=t.jsx(ge,{open:r,onOpenChange:H,children:S}),e[83]=r,e[84]=S,e[85]=E):E=e[85];let V;return e[86]!==R||e[87]!==E?(V=t.jsxs(t.Fragment,{children:[R,E]}),e[86]=R,e[87]=E,e[88]=V):V=e[88],V}function ye(c){return c.stopPropagation()}function Ae(c){return c.stopPropagation()}function De(c){const e=Q.c(8),{triggerCount:s,nextRunAt:o}=c,n=Y();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{Be as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as V,r as ot,b as X,a2 as it,J as rt,an as ct,K as tt,j as s,l as ut,m as mt,eZ as dt}from"./index-CaH7O3hJ.js";import{u as ft}from"./useInfiniteQuery-ZoWXsJcj.js";import{u as xt}from"./use-connection-BwU_KLSF.js";import{u as pt}from"./use-mcp-client-MRThuZpK.js";import{b as gt}from"./repository-binding-BLgLcT4o.js";import{b as ht,a as Rt}from"./sheet-C-yunzji.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as Q}from"./table-BQLxO2Sb.js";import{E as et}from"./empty-state-Bok1L2hc.js";import{u as Tt}from"./use-infinite-scroll-BO0n6TVn.js";import{u as St}from"./use-members-h3MYd8gX.js";import{g as vt}from"./task-status-VcYcBtq_.js";import{e as Ct}from"./use-automations-B9eI7BBQ.js";import{T as It,f as at,a as nt}from"./thread-sheet-body-Cdv_wHnA.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 z(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(dt,{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(z,{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(z,{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(z,{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(z,{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=ut("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 Bt(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=pt(o),f=ct(),x=xt(),d=gt(),{data:u}=St(),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:Z}=M,lt=Z===void 0?0:Z;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}=ft(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=mt,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 Y=Tt(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]!==Y||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(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 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(bt,{children:m.map((M,Z)=>s.jsx(_t,{run:M,usage:k.get(M.id),onClick:()=>b.select(M.id),lastRowRef:Z===m.length-1?Y:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=w,t[40]=Y,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 K;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?(K=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]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let J;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(J=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=J):J=t[72],J}function 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{Bt as A,wt as u};
|
|
1
|
+
import{c as V,r as ot,b as X,a2 as it,J as rt,an as ct,K as tt,j as s,l as ut,m as mt,f0 as dt}from"./index-ifZGovK1.js";import{u as ft}from"./useInfiniteQuery-wCORGPw3.js";import{u as xt}from"./use-connection-CBKH8IwL.js";import{u as pt}from"./use-mcp-client-D1kFCZ4v.js";import{b as gt}from"./repository-binding-DtIeSvDY.js";import{b as ht,a as Rt}from"./sheet-Dhe0uPV2.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as Q}from"./table-Tw2gCVXe.js";import{E as et}from"./empty-state-D6RWdvUz.js";import{u as Tt}from"./use-infinite-scroll-Cuyf7850.js";import{u as St}from"./use-members-0ZBHc0S5.js";import{g as vt}from"./task-status-CVpsP3bD.js";import{e as Ct}from"./use-automations-C6LbyvJD.js";import{T as It,f as at,a as nt}from"./thread-sheet-body-dWggSd-b.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(dt,{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=ut("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 Bt(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=pt(o),f=ct(),x=xt(),d=gt(),{data:u}=St(),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:z}=M,lt=z===void 0?0:z;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}=ft(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=mt,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=Tt(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(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 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(bt,{children:m.map((M,z)=>s.jsx(_t,{run:M,usage:k.get(M.id),onClick:()=>b.select(M.id),lastRowRef:z===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 K;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?(K=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]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let J;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(J=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=J):J=t[72],J}function 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{Bt as A,wt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as e,b as $,a2 as D,d as M,r as q,n as d,B as V,
|
|
1
|
+
import{c as k,j as e,b as $,a2 as D,d as M,r as q,n as d,B as V,fy as F,y as R}from"./index-ifZGovK1.js";import{s as G}from"./Plus-vkM1FxVr.js";import{i as S}from"./ZoomOut-DytgoG2i.js";import{S as H}from"./search-input-1DLvCYgl.js";import{E as T}from"./empty-state-D6RWdvUz.js";import{u as J}from"./use-automations-C6LbyvJD.js";import{u as K}from"./use-navigate-to-agent-DLX1nkvn.js";import{A as O}from"./automation-list-row-B0U8Omed.js";import{b as Q}from"./repository-binding-DtIeSvDY.js";import{R as U}from"./require-capability-DAfCGgHW.js";import"./SearchMd-Cp6J-1Iu.js";import"./use-mcp-client-D1kFCZ4v.js";import"./auth-C_nDagDA.js";import"./thread-intent-7GmQH5mt.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BoG6Bqps.js";import"./task-board-BrTYr-oE.js";import"./schema-Cn4x5iT-.js";import"./slugify-CEUa2lfQ.js";import"./badge-ux-RK1YK.js";import"./alert-dialog-C-DaggA1.js";import"./agent-icon--EtIPqub.js";import"./AlertCircle-CUAx3A4b.js";import"./Tool01-BsK9c3-e.js";import"./ArrowUp-EL0FBv9C.js";import"./ArrowLeft-BWCsylYe.js";import"./LinkBroken01-DcsqjBuj.js";import"./ShoppingBag01-aJuRSlBz.js";import"./Building02-PifDTlhb.js";import"./CheckCircle-CMGqXocs.js";import"./ChevronUp-x46FJEcD.js";import"./ChevronSelectorVertical-BSRBjpBn.js";import"./UserSquare-BBEl_BxL.js";import"./Copy01-OBSYmimV.js";import"./CreditCard01-DWsSThAm.js";import"./DotsVertical-jkvtcdek.js";import"./Image01-BCnLFq1D.js";import"./Globe04-blkS_Kfg.js";import"./SwitchHorizontal01-B5WFt7_0.js";import"./Key01-CG7Kua6O.js";import"./Link01-8aKNfNRw.js";import"./Minus-B38cW2ZC.js";import"./Monitor01-DQEkUL3d.js";import"./Sun-k4hypx5Q.js";import"./Play-Ns9aRVTY.js";import"./Trash01-Z1ezoy3S.js";import"./Upload01-B3-nlnKa.js";import"./User01-C2Sw39bs.js";import"./Users01-DMFeioyM.js";import"./XClose-BdwIxxCT.js";import"./access-gate-BUnHIPK_.js";import"./capability-load-error-CoMXa4ni.js";function W(){const t=k.c(20),o=$(),{org:c}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,E=Q(),P=K(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),A=new Map(E.map(X)),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:F(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,w=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 C=g.length>0&&e.jsx(H,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==C?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,C]}),t[7]=r,t[8]=C,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(G,{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(O,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==w.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(w.Container,{children:[n,_]}),t[10]=w.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 X(t){return[t.id,t]}function Xt(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(U,{capability:"automations:manage",area:"automations",children:e.jsx(W,{})}),t[0]=o):o=t[0],o}export{Xt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aw as d}from"./index-
|
|
1
|
+
import{aw as d}from"./index-ifZGovK1.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{l as o,j as n,c as i,
|
|
1
|
+
import{l as o,j as n,c as i,bq as g,br as h,bs as c,bt as z}from"./index-ifZGovK1.js";import{s as v}from"./User01-C2Sw39bs.js";function j(r){const e=i.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let a;e[3]!==s?(a=o("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=a):a=e[4];let l;return e[5]!==t||e[6]!==a?(l=n.jsx(g,{"data-slot":"avatar",className:a,...t}),e[5]=t,e[6]=a,e[7]=l):l=e[7],l}function k(r){const e=i.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let a;e[3]!==s?(a=o("aspect-square size-full",s),e[3]=s,e[4]=a):a=e[4];let l;return e[5]!==t||e[6]!==a?(l=n.jsx(h,{"data-slot":"avatar-image",className:a,...t}),e[5]=t,e[6]=a,e[7]=l):l=e[7],l}function q(r){const e=i.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let a;e[3]!==s?(a=o("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=a):a=e[4];let l;return e[5]!==t||e[6]!==a?(l=n.jsx(z,{"data-slot":"avatar-fallback",className:a,...t}),e[5]=t,e[6]=a,e[7]=l):l=e[7],l}const A={tint:["bg-brand-lime-tint text-brand-green-dark dark:bg-brand/20 dark:text-brand","bg-brand-purple-tint text-brand-purple-dark dark:bg-brand-purple/20 dark:text-brand-purple","bg-brand-yellow-tint text-brand-yellow-dark dark:bg-brand-yellow/20 dark:text-brand-yellow","bg-brand-blue-tint text-brand-blue-dark dark:bg-brand-blue/20 dark:text-brand-blue"],solid:["bg-brand text-brand-green-dark","bg-brand-purple text-brand-purple-dark","bg-brand-yellow text-brand-yellow-dark","bg-brand-blue text-brand-blue-dark"]},y="bg-muted text-muted-foreground";function N(r,e){let s=0;for(let a=0;a<r.length;a++)s=r.charCodeAt(a)+((s<<5)-s);const t=A[e];return t[Math.abs(s)%t.length]}function w(r){const e=r.trim().split(/\s+/).filter(Boolean),s=e[0]?.charAt(0)??"",t=e.length>1?e.at(-1)?.charAt(0)??"":"";return(s+t).toUpperCase()||"?"}const u=c("font-medium",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"size-3 text-[0.4375rem]","2xs":"size-4 text-[0.5625rem]",xs:"size-6 text-[0.625rem]",sm:"size-8 text-xs",md:"size-9 text-sm",base:"size-10 text-sm",lg:"size-12 text-lg",xl:"size-16 text-2xl","2xl":"size-20 text-3xl","3xl":"size-32 text-5xl"}},compoundVariants:[{shape:"square",size:"3xs",class:"rounded-[0.1875rem]"},{shape:"square",size:"2xs",class:"rounded-sm"},{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-[0.625rem]"},{shape:"square",size:"md",class:"rounded-[0.6875rem]"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-[0.875rem]"},{shape:"square",size:"xl",class:"rounded-[1.125rem]"},{shape:"square",size:"2xl",class:"rounded-[1.375rem]"},{shape:"square",size:"3xl",class:"rounded-[2.25rem]"}],defaultVariants:{shape:"square",size:"base"}}),R=c("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),C={"3xs":8,"2xs":8,xs:12,sm:16,md:18,base:20,lg:24,xl:32,"2xl":40,"3xl":64};function F({shape:r="square",size:e="base",url:s,fallback:t,objectFit:a="cover",className:l,muted:x=!1,tone:b=r==="circle"?"solid":"tint",selected:m=!1,...f}){const p=x?y:N(typeof t=="string"?t:"",b),d=o("flex size-full items-center justify-center",p);return n.jsx(j,{className:o(u({shape:r,size:e}),s&&"outline-1 -outline-offset-1 outline-hairline",m&&"outline-2 outline-offset-0 outline-foreground",l),...f,children:s?.startsWith("icon://")?n.jsx("div",{className:d,children:n.jsx(v,{size:C[e??"base"]})}):n.jsxs(n.Fragment,{children:[s&&n.jsx(k,{src:s,loading:"lazy",alt:"Avatar",className:R({objectFit:a})}),n.jsx(q,{className:o(d,"rounded-none"),delayMs:s?600:0,children:typeof t=="string"?w(t):t})]})})}F.Skeleton=function({shape:e="square",size:s="base",className:t}){return n.jsx("div",{className:o(u({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{F as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as b,l as u,j as l,bu as c,bs as p}from"./index-ifZGovK1.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=u(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=l.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};
|