decocms 2.303.0 → 2.304.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/{AlertCircle-vEsirhNa.js → AlertCircle-Bmjr0ClA.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-DZv_aYqP.js → ArrowNarrowLeft-CThwX0q-.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-gnKwWbdS.js → ArrowUpRight-B7vTMj1u.js} +1 -1
- package/dist/client/assets/{CheckCircle-CG65sxv8.js → CheckCircle-CNaz4scY.js} +1 -1
- package/dist/client/assets/{ChevronDown-ClwyYcv4.js → ChevronDown-BMpzZvgp.js} +1 -1
- package/dist/client/assets/{ChevronRight-C0UgsndQ.js → ChevronRight-B0WDiR9g.js} +1 -1
- package/dist/client/assets/{ChevronUp-0O0O_hLq.js → ChevronUp-C1KppMC5.js} +1 -1
- package/dist/client/assets/{Container-D1_FRS1u.js → Container-DxKKEmNe.js} +1 -1
- package/dist/client/assets/{DotsVertical-BdLY0G_d.js → DotsVertical-CRTfJ6MH.js} +1 -1
- package/dist/client/assets/{LinkExternal01-C0RHT0gp.js → LinkExternal01-DcUPNTey.js} +1 -1
- package/dist/client/assets/{Lock01-CJP_L01s.js → Lock01-CwYOwvXR.js} +1 -1
- package/dist/client/assets/{Palette-DTaJJ6eW.js → Palette-c4ovbTBC.js} +1 -1
- package/dist/client/assets/{Play-wg-GRHFk.js → Play-BzawbqMW.js} +1 -1
- package/dist/client/assets/{Plus-Ukcu1-Za.js → Plus-CZq1C4jM.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-i1Q8uoB-.js → RefreshCcw01-Dwpnc1qZ.js} +1 -1
- package/dist/client/assets/{SearchMd-CaU1opgI.js → SearchMd-BYUE-oTe.js} +1 -1
- package/dist/client/assets/{Settings02-sn7Sw6YT.js → Settings02-FFAtt7kb.js} +1 -1
- package/dist/client/assets/{Shield01-BV1qTPTH.js → Shield01-CZOC16WM.js} +1 -1
- package/dist/client/assets/{Star01-BRRUiVRZ.js → Star01-GaFk6Xa_.js} +1 -1
- package/dist/client/assets/{Sun-xRqcyI3R.js → Sun-_nS1eHVw.js} +1 -1
- package/dist/client/assets/{Tool01-Baq41T_m.js → Tool01-CpBRL57v.js} +1 -1
- package/dist/client/assets/{Trash01-vBGY9tLb.js → Trash01-CKEJHaXR.js} +1 -1
- package/dist/client/assets/{User01-Dt3HpnQa.js → User01-BO3afenP.js} +1 -1
- package/dist/client/assets/{Users03-DXg5Ltjv.js → Users03-B2dn7j_S.js} +1 -1
- package/dist/client/assets/{X-cgiyE3ZM.js → X-BY4Cj76l.js} +1 -1
- package/dist/client/assets/{XCircle-pfcw5bLn.js → XCircle-H-paIGFm.js} +1 -1
- package/dist/client/assets/{XClose-BddCxuhK.js → XClose-ihnqmUfp.js} +1 -1
- package/dist/client/assets/{Zap-Csq8iSdS.js → Zap-BafO525R.js} +1 -1
- package/dist/client/assets/{ZapSquare-BcZ9bNOI.js → ZapSquare-BFMe5Mv9.js} +1 -1
- package/dist/client/assets/{accordion-6lnK-4_B.js → accordion-DJ9g6lbv.js} +1 -1
- package/dist/client/assets/{agent-icon-BdKQ6n0b.js → agent-icon-3dvecirS.js} +1 -1
- package/dist/client/assets/{agents-list-CQCT4ln6.js → agents-list-C3oLVAtv.js} +1 -1
- package/dist/client/assets/ai-providers-BnFAoUUB.js +1 -0
- package/dist/client/assets/{alert-dialog-eUvHx9LP.js → alert-dialog-BaDMThMD.js} +1 -1
- package/dist/client/assets/{auth-catchall-DTPgUDmr.js → auth-catchall-DyAp9W_K.js} +1 -1
- package/dist/client/assets/{automation-list-row-Dr5sNKYc.js → automation-list-row-BZ5pc5Hf.js} +1 -1
- package/dist/client/assets/{automations-C3gcgD_I.js → automations-NFa1s-Bh.js} +1 -1
- package/dist/client/assets/{avatar-DYHAtJIn.js → avatar-D8_rUBWz.js} +1 -1
- package/dist/client/assets/{badge-CbBFj3dT.js → badge-DdmMZRNT.js} +1 -1
- package/dist/client/assets/{brand-context-CH3a97ud.js → brand-context-Bze-d_ZO.js} +1 -1
- package/dist/client/assets/{card-KdWbX1xC.js → card-BsUopeoI.js} +1 -1
- package/dist/client/assets/{chat-context-CyOREmRE.js → chat-context-DfbXSilM.js} +1 -1
- package/dist/client/assets/{checkbox-L6ow9OAH.js → checkbox-D9P4N8hw.js} +1 -1
- package/dist/client/assets/{collection-detail-BNa0DV-E.js → collection-detail-D-8PAzvK.js} +1 -1
- package/dist/client/assets/{collection-display-button-Cd1AAuzE.js → collection-display-button-B0aY08zq.js} +1 -1
- package/dist/client/assets/{collection-search-DKaMJpI1.js → collection-search-C4AgxGiz.js} +1 -1
- package/dist/client/assets/{collection-search-C_3BuKbi.js → collection-search-Dlp7iCDd.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BZMY30r-.js → collection-table-wrapper-CQMKVKSx.js} +1 -1
- package/dist/client/assets/{collection-tabs-CKmdw5ye.js → collection-tabs-C9tMEUhv.js} +1 -1
- package/dist/client/assets/{collections-JCMKBQvX.js → collections-BDAFtlmY.js} +1 -1
- package/dist/client/assets/{command-CiVqeZK9.js → command-CQ2qBZMm.js} +1 -1
- package/dist/client/assets/{connection-card-BGoNyj1I.js → connection-card-DwOSEuv8.js} +1 -1
- package/dist/client/assets/{connection-detail-DgOZE4hQ.js → connection-detail-CawEIpU7.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DiXDE6He.js → connection-form-helpers-D2ynuhjT.js} +1 -1
- package/dist/client/assets/{connections-BHvbqlLg.js → connections-CpSP7u11.js} +1 -1
- package/dist/client/assets/{constants-CxLUc4t1.js → constants-8SUUmfde.js} +1 -1
- package/dist/client/assets/{constants-BOiLyn9k.js → constants-dX65r6Zc.js} +1 -1
- package/dist/client/assets/{dialog-B24YZzA9.js → dialog-C09MDdtC.js} +1 -1
- package/dist/client/assets/{domain-settings-WXCddaP7.js → domain-settings-C8zQRIa5.js} +1 -1
- package/dist/client/assets/{drawer-CGPAKRwg.js → drawer-CgP97_zn.js} +1 -1
- package/dist/client/assets/{dropdown-menu-D3k5KxvY.js → dropdown-menu-BUQ2j94Z.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-B06IMDFS.js → dynamic-plugin-layout-D01hx5Sr.js} +1 -1
- package/dist/client/assets/{empty-state-CI0GC98R.js → empty-state-CDSs8u5J.js} +1 -1
- package/dist/client/assets/{empty-state-Wp7TaLly.js → empty-state-CnWmYGyJ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C8BcpMzg.js → extract-connection-data-BksUB8IU.js} +1 -1
- package/dist/client/assets/{features-Dm0-VLa6.js → features-DbY_j0po.js} +1 -1
- package/dist/client/assets/{form-FasOp70m.js → form-D7lwTpan.js} +1 -1
- package/dist/client/assets/{general-B7DIS0Ue.js → general-ClAAY_hM.js} +1 -1
- package/dist/client/assets/index-1cERBOeE.js +1 -0
- package/dist/client/assets/{index-CLgan7xr.js → index-8uCGLU1q.js} +1 -1
- package/dist/client/assets/{index-C6uOB0Y4.js → index-B7KZ-vdQ.js} +1 -1
- package/dist/client/assets/{index-Uci3t_4k.js → index-BHEM4T0P.js} +1 -1
- package/dist/client/assets/{index-CnMcjZ2J.js → index-BT2v6iP4.js} +1 -1
- package/dist/client/assets/{index-DSDywrQr.js → index-BfFMVpP_.js} +1 -1
- package/dist/client/assets/{index-22XZTMRU.js → index-BfFwypL5.js} +1 -1
- package/dist/client/assets/{index-UUkaa4t8.js → index-CKVeIfog.js} +1 -1
- package/dist/client/assets/{index-CFi3i8-6.js → index-C_Adeshs.js} +1 -1
- package/dist/client/assets/{index-DgPBaKAA.js → index-Cqw0FyHL.js} +2 -2
- package/dist/client/assets/{index-CmoaTI3v.js → index-DH_JeBfm.js} +1 -1
- package/dist/client/assets/{index-B2vavj0S.js → index-DHwV9q9X.js} +1 -1
- package/dist/client/assets/{index-CGc8iCsx.js → index-DRij5nf9.js} +1 -1
- package/dist/client/assets/{index-CLPpVsE7.js → index-Eg0bSiJp.js} +1 -1
- package/dist/client/assets/{index-CJ0MPowS.js → index-stoVKXMu.js} +1 -1
- package/dist/client/assets/{index-CHehLkTl.js → index-zf-rleQN.js} +3 -3
- package/dist/client/assets/{infiniteQueryObserver-BNzmdrsE.js → infiniteQueryObserver-DdGFkAXb.js} +1 -1
- package/dist/client/assets/{input-s7yMiYrQ.js → input-Co0HW9uN.js} +1 -1
- package/dist/client/assets/{integration-icon-BTFNSNVv.js → integration-icon-DmwSpOA7.js} +1 -1
- package/dist/client/assets/{label-DdmR-9sj.js → label-CeKVWPbr.js} +1 -1
- package/dist/client/assets/{layout-b284SHuQ.js → layout-Tnq2i3zg.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-DajQAG70.js → lean-canvas-recruit-modal-BU3z415J.js} +1 -1
- package/dist/client/assets/{login-B1PDG9tU.js → login-CWTb0-fH.js} +1 -1
- package/dist/client/assets/{members-BzR5JdQ2.js → members-Bj1Fn746.js} +1 -1
- package/dist/client/assets/{monaco-editor-CI3jdnZr.js → monaco-editor-qXNTtuH2.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DhMQIkbL.js → monitoring-stats-row-yM4e_YZD.js} +1 -1
- package/dist/client/assets/{oauth-callback-BnQ8HZqD.js → oauth-callback-CdB6DJDA.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CRSRr_xb.js → oauth-callback-ai-provider-BgDs3na5.js} +1 -1
- package/dist/client/assets/{onboarding-D_M2p9DV.js → onboarding-DKG_eIr1.js} +1 -1
- package/dist/client/assets/{org-layout-D2xtXfus.js → org-layout-Dl85hYyi.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-DZaqttiB.js → org-plugin-layout-BjSThyiS.js} +1 -1
- package/dist/client/assets/{pair-DipmF7bC.js → pair-1dEJPLek.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Buoq-fSV.js → plugin-empty-state-Don4CmqW.js} +1 -1
- package/dist/client/assets/{plugin-header-BYnPGK02.js → plugin-header-B8c9MPqH.js} +1 -1
- package/dist/client/assets/{plugin-layout-CN3nu4uU.js → plugin-layout-Cl6_YUJ2.js} +1 -1
- package/dist/client/assets/{popover-BO9bGsCV.js → popover-vkIPXKru.js} +1 -1
- package/dist/client/assets/{profile-KMr1dQ-Q.js → profile-Biqh2ggJ.js} +1 -1
- package/dist/client/assets/{project-app-view-BUlVlC-x.js → project-app-view-DSY0SCnx.js} +1 -1
- package/dist/client/assets/registry-B4DkMjbe.js +2 -0
- package/dist/client/assets/{registry-layout-BUJ3AeXk.js → registry-layout-BHVIlZsW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-23LI14IJ.js → required-auth-layout-1Kf8B8P9.js} +1 -1
- package/dist/client/assets/{reset-password-D1P-Z7nY.js → reset-password-CZU-BGGi.js} +1 -1
- package/dist/client/assets/{roles-C76lzhHm.js → roles-V0vn58qZ.js} +1 -1
- package/dist/client/assets/{scroll-area-BYgy2rRU.js → scroll-area-BF4q7Ra2.js} +1 -1
- package/dist/client/assets/{search-input-DouvVIAY.js → search-input-VyjPISbx.js} +1 -1
- package/dist/client/assets/{select-model-BwlI7XmT.js → select-model-CGzdU4-Q.js} +1 -1
- package/dist/client/assets/{select-tWER34RX.js → select-rxK-8b1N.js} +1 -1
- package/dist/client/assets/{settings-layout-DM8Inkwn.js → settings-layout-Bc0g8WOL.js} +1 -1
- package/dist/client/assets/{settings-section-Dr0LUAWl.js → settings-section-BsEmPevi.js} +1 -1
- package/dist/client/assets/{shell-layout-RjvCJ64C.js → shell-layout-BhC55LLx.js} +1 -1
- package/dist/client/assets/{skeleton-CUpGn6FE.js → skeleton-y3O4xgdS.js} +1 -1
- package/dist/client/assets/{sso-BIwBaU8W.js → sso-Di8r0acw.js} +1 -1
- package/dist/client/assets/{store-DxMzTKYE.js → store-B9Zqk-bV.js} +1 -1
- package/dist/client/assets/store-registry-RqxELDy6.js +2 -0
- package/dist/client/assets/{switch-DEvD95wE.js → switch-QErK7wwO.js} +1 -1
- package/dist/client/assets/{table-C3UVFCYb.js → table-CdyHz2p3.js} +1 -1
- package/dist/client/assets/{tabs-BVEP2lWJ.js → tabs-CMFQWy73.js} +1 -1
- package/dist/client/assets/{task-status-CGfLBMZl.js → task-status-D0-O3Mr3.js} +1 -1
- package/dist/client/assets/{textarea-D7sU3_M1.js → textarea-CxEqGfix.js} +1 -1
- package/dist/client/assets/{toggle-group-V7Yt1Ex8.js → toggle-group-AZijjpe8.js} +1 -1
- package/dist/client/assets/{tools-list-CABaXV8v.js → tools-list-DjWGeJBp.js} +1 -1
- package/dist/client/assets/{tooltip-apD1iSo_.js → tooltip-D_3qm7UK.js} +1 -1
- package/dist/client/assets/{types-CD5tpm5b.js → types-D1Wl9DNB.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CGTNouwr.js → use-ai-providers-Cah1GZeX.js} +1 -1
- package/dist/client/assets/{use-collections-DFWGNuJR.js → use-collections-DrmuHy93.js} +1 -1
- package/dist/client/assets/{use-connection-C-BvdB1r.js → use-connection-CyjN1GtI.js} +1 -1
- package/dist/client/assets/{use-copy-DefGD5Vz.js → use-copy-SV4GW98D.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CBpUnMCs.js → use-create-virtual-mcp-Y9XZZ8XI.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-ltSQJ_A7.js → use-decopilot-events-Drlt36bF.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DpaPpzHo.js → use-delete-connection-B955BI0e.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BQ-INmUl.js → use-infinite-scroll-BRF66BxZ.js} +1 -1
- package/dist/client/assets/{use-list-state-D1F4t091.js → use-list-state-C6Di0aCP.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BrbjMOtH.js → use-mcp-tools-DyKI35iZ.js} +1 -1
- package/dist/client/assets/{use-members-b-HHyQxx.js → use-members-mnYCaL5_.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-vkB0KE5O.js → use-navigate-to-agent-DrWD9J71.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DpMUudQp.js → use-org-auth-client-HeIerkrz.js} +1 -1
- package/dist/client/assets/{use-org-sso-B1ThBRct.js → use-org-sso-BuTv1ygf.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CBMuGkFt.js → use-organization-roles-ChLRcseg.js} +1 -1
- package/dist/client/assets/{use-organization-settings-8KaGxc8P.js → use-organization-settings-EfxM66aZ.js} +1 -1
- package/dist/client/assets/{use-registry-connections-q8kr-T41.js → use-registry-connections-fltIDY82.js} +1 -1
- package/dist/client/assets/{use-status-sounds-C19SUHpW.js → use-status-sounds-BRxCV6Ea.js} +1 -1
- package/dist/client/assets/{use-tasks-CKR5m1e3.js → use-tasks-DEh_VRON.js} +1 -1
- package/dist/client/assets/{use-view-mode-C6IKAuZR.js → use-view-mode-B3nY15Yz.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DqIUOY7O.js → use-virtual-mcp-Bb04Uah7.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CY4tnydB.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BFpIngH9.js +1 -0
- package/dist/client/assets/{user-CaH0b_KG.js → user-ClafvvGL.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-D-dHPCyZ.js → view-mode-toggle-Im7J4smk.js} +1 -1
- package/dist/client/assets/workflow-detail-Cr5QMF9R.js +1 -0
- package/dist/client/assets/{workflow-BivIt-Ky.js → workflow-u6doascD.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +457 -445
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/node_modules/onetime/index.d.ts +64 -0
- package/dist/server/node_modules/onetime/index.js +44 -0
- package/dist/server/node_modules/onetime/license +9 -0
- package/dist/server/node_modules/onetime/package.json +43 -0
- package/dist/server/node_modules/onetime/readme.md +94 -0
- package/dist/server/node_modules/pg-int8/LICENSE +13 -0
- package/dist/server/node_modules/pg-int8/README.md +16 -0
- package/dist/server/node_modules/pg-int8/index.js +100 -0
- package/dist/server/node_modules/pg-int8/package.json +24 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/postgres-array/license +21 -0
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-bytea/index.js +33 -0
- package/dist/server/node_modules/postgres-bytea/license +21 -0
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/dist/server/node_modules/string-width/index.d.ts +39 -0
- package/dist/server/node_modules/string-width/index.js +82 -0
- package/dist/server/node_modules/string-width/license +9 -0
- package/dist/server/node_modules/string-width/package.json +64 -0
- package/dist/server/node_modules/string-width/readme.md +66 -0
- package/package.json +2 -1
- package/dist/client/assets/ai-providers-GeW9mIp3.js +0 -1
- package/dist/client/assets/index-CHk8-d41.js +0 -1
- package/dist/client/assets/registry-BQuAXDX3.js +0 -2
- package/dist/client/assets/store-registry-4KpCoRMs.js +0 -2
- package/dist/client/assets/useInfiniteQuery-eU5lg-Wu.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ddH3lLnG.js +0 -1
- package/dist/client/assets/workflow-detail-Df9rIeG5.js +0 -1
- package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
- package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
- package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
- package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
- package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
- package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
- package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
- /package/dist/server/node_modules/{get-east-asian-width → ansi-styles}/license +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as ge,P as ke,j as s,B as pe,s as Ae,r as P,t as w,x as we}from"./index-DgPBaKAA.js";import{c as U,b as Ce,a as ue,D as xe}from"./dropdown-menu-D3k5KxvY.js";import{a as Pe}from"./Users03-DXg5Ltjv.js";import{G as Te,a as Me,I as Oe,S as ze,L as Le,b as Ie}from"./lean-canvas-recruit-modal-DajQAG70.js";import{W as Ee,b as Ge}from"./constants-CxLUc4t1.js";import{b as Be,a as He}from"./use-virtual-mcp-DqIUOY7O.js";import{P as ne}from"./index-CLgan7xr.js";import{i as $e}from"./DotsVertical-BdLY0G_d.js";import{a as Re}from"./Settings02-sn7Sw6YT.js";import{s as Fe}from"./Trash01-vBGY9tLb.js";import{A as ve,ai as Ve}from"./agent-icon-BdKQ6n0b.js";import{a as be}from"./use-navigate-to-agent-vkB0KE5O.js";import{C as Ne}from"./card-KdWbX1xC.js";import{f as We}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Ke}from"./empty-state-CI0GC98R.js";import{u as qe}from"./use-create-virtual-mcp-CBpUnMCs.js";import{c as Je,b as Qe,d as Ue,f as Xe,e as Ye,g as Ze,a as et,A as tt}from"./alert-dialog-eUvHx9LP.js";import{S as st}from"./search-input-DouvVIAY.js";import{s as je}from"./Plus-Ukcu1-Za.js";import"./ChevronDown-ClwyYcv4.js";import"./ChevronRight-C0UgsndQ.js";import"./dialog-B24YZzA9.js";import"./X-cgiyE3ZM.js";import"./RefreshCcw01-i1Q8uoB-.js";import"./collection-search-DKaMJpI1.js";import"./SearchMd-CaU1opgI.js";import"./checkbox-L6ow9OAH.js";import"./use-connection-C-BvdB1r.js";import"./use-collections-DFWGNuJR.js";import"./Lock01-CJP_L01s.js";import"./extract-connection-data-C8BcpMzg.js";import"./constants-BOiLyn9k.js";import"./collections-JCMKBQvX.js";import"./drawer-CGPAKRwg.js";import"./tooltip-apD1iSo_.js";import"./integration-icon-BTFNSNVv.js";import"./Container-D1_FRS1u.js";import"./use-mcp-tools-BrbjMOtH.js";import"./AlertCircle-vEsirhNa.js";import"./Tool01-Baq41T_m.js";import"./XClose-BddCxuhK.js";import"./ArrowNarrowLeft-DZv_aYqP.js";import"./XCircle-pfcw5bLn.js";import"./ArrowUpRight-gnKwWbdS.js";import"./ZapSquare-BcZ9bNOI.js";import"./CheckCircle-CG65sxv8.js";import"./ChevronUp-0O0O_hLq.js";import"./Star01-BRRUiVRZ.js";import"./Palette-DTaJJ6eW.js";import"./LinkExternal01-C0RHT0gp.js";import"./Sun-xRqcyI3R.js";import"./Play-wg-GRHFk.js";import"./Shield01-BV1qTPTH.js";import"./User01-Dt3HpnQa.js";import"./Zap-Csq8iSdS.js";import"./differenceInSeconds-NQ4PDo0z.js";function _e(e){const t=ge.c(17),{onCreateFromScratch:i,onImportGitHub:g,onImportDeco:d,isCreating:o,align:j,side:f,showBetaBadge:p}=e,r=j===void 0?"end":j,[n]=ke();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:14}),t[0]=u):u=t[0];let c;t[1]!==o||t[2]!==i?(c=s.jsxs(U,{disabled:o,onClick:i,children:[u,"Create from scratch"]}),t[1]=o,t[2]=i,t[3]=c):c=t[3];let a;t[4]!==g||t[5]!==n.experimental_vibecode||t[6]!==p?(a=n.experimental_vibecode&&s.jsxs(U,{onClick:g,children:[s.jsx(Te,{className:"size-3.5"}),"Import from GitHub",p&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"})]}),t[4]=g,t[5]=n.experimental_vibecode,t[6]=p,t[7]=a):a=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),t[8]=x):x=t[8];let m;t[9]!==d?(m=s.jsxs(U,{onClick:d,children:[x,"Import from deco.cx"]}),t[9]=d,t[10]=m):m=t[10];let _;return t[11]!==r||t[12]!==f||t[13]!==c||t[14]!==a||t[15]!==m?(_=s.jsxs(Ce,{side:f,align:r,className:"w-48",children:[c,a,m]}),t[11]=r,t[12]=f,t[13]=c,t[14]=a,t[15]=m,t[16]=_):_=t[16],_}function it(e){const t=ge.c(44),{project:i,onDeleteClick:g}=e,d=be();let o;t[0]!==d||t[1]!==i.id?(o=()=>d(i.id),t[0]=d,t[1]=i.id,t[2]=o):o=t[2];let j;t[3]!==i.title||t[4]!==o?(j=s.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.title}),t[3]=i.title,t[4]=o,t[5]=j):j=t[5];let f;t[6]!==i.icon||t[7]!==i.title?(f=s.jsx(ve,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),t[6]=i.icon,t[7]=i.title,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{asChild:!0,children:s.jsx(pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx($e,{size:20})})}),t[9]=p):p=t[9];let r;t[10]!==d||t[11]!==i.id?(r=()=>d(i.id,{search:{main:"settings"}}),t[10]=d,t[11]=i.id,t[12]=r):r=t[12];let n;t[13]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[13]=n):n=t[13];let u;t[14]!==r?(u=s.jsxs(U,{onClick:r,children:[n,"Settings"]}),t[14]=r,t[15]=u):u=t[15];let c;t[16]!==g?(c=g&&s.jsxs(U,{variant:"destructive",onClick:y=>{y.stopPropagation(),g(y)},children:[s.jsx(Fe,{size:16}),"Delete"]}),t[16]=g,t[17]=c):c=t[17];let a;t[18]!==u||t[19]!==c?(a=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(xe,{children:[p,s.jsxs(Ce,{align:"end",children:[u,c]})]})}),t[18]=u,t[19]=c,t[20]=a):a=t[20];let x;t[21]!==f||t[22]!==a?(x=s.jsxs("div",{className:"flex items-start justify-between",children:[f,a]}),t[21]=f,t[22]=a,t[23]=x):x=t[23];let m;t[24]!==i.title?(m=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),t[24]=i.title,t[25]=m):m=t[25];const _=i.description||"No description";let N;t[26]!==_?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:_}),t[26]=_,t[27]=N):N=t[27];let v;t[28]!==m||t[29]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),t[28]=m,t[29]=N,t[30]=v):v=t[30];let D;t[31]!==x||t[32]!==v?(D=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,v]}),t[31]=x,t[32]=v,t[33]=D):D=t[33];let b;t[34]!==i.updated_at?(b=We(new Date(i.updated_at),{addSuffix:!0}),t[34]=i.updated_at,t[35]=b):b=t[35];let S;t[36]!==b?(S=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),t[36]=b,t[37]=S):S=t[37];let h;t[38]!==D||t[39]!==S?(h=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[D,S]}),t[38]=D,t[39]=S,t[40]=h):h=t[40];let C;return t[41]!==h||t[42]!==j?(C=s.jsxs(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[j,h]}),t[41]=h,t[42]=j,t[43]=C):C=t[43],C}function cs(){const e=ge.c(80),{org:t}=Ae(),i=Be(),g=He(),d=be(),[o,j]=P.useState("");let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},e[0]=f):f=e[0];const{createVirtualMCP:p,isCreating:r}=qe(f),[n,u]=P.useState(null),[c,a]=P.useState(!1),[x,m]=P.useState(!1),[_,N]=P.useState(!1),[v,D]=P.useState(!1),[b,S]=P.useState(!1);let h,C,y,T,k,A,M,O,z;if(e[1]!==g||e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==r||e[6]!==d||e[7]!==t||e[8]!==o){const Q=o.toLowerCase(),de=i.filter(l=>l.id!==t.id&&(l.title.toLowerCase().includes(Q)||l.description?.toLowerCase().includes(Q)));let te;e[18]!==i?(te=i.some(at),e[18]=i,e[19]=te):te=e[19];const De=te,fe=Ee.filter(l=>(!o||l.title.toLowerCase().includes(Q))&&!(l.id==="studio-pack"&&De)),he=i.find(ot);k=i.find(lt);const Se=l=>{w("agents_list_template_clicked",{template_id:l}),l==="site-editor"?a(!0):l==="site-diagnostics"?he?d(he.id):N(!0):l==="lean-canvas"?k?d(k.id):S(!0):l==="studio-pack"&&D(!0)};let se;e[20]!==g||e[21]!==n?(se=async()=>{if(!n)return;const{id:l,title:ye}=n;u(null);try{await g.delete.mutateAsync(l),w("agent_deleted",{agent_id:l,source:"agents_list"}),we.success(`Deleted "${ye}"`)}catch{}},e[20]=g,e[21]=n,e[22]=se):se=e[22],T=se,y=ne,C=ne.Content,h=ne.Body;let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ne.Title,{children:"Agents"}),e[23]=ie):ie=e[23];let le;e[24]===Symbol.for("react.memo_cache_sentinel")?(le=l=>{l.key==="Escape"&&(j(""),l.target.blur())},e[24]=le):le=e[24];let K;e[25]!==o?(K=s.jsx(st,{value:o,onChange:j,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:le}),e[25]=o,e[26]=K):K=e[26];let oe;e[27]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),e[27]=oe):oe=e[27];let q;e[28]!==p?(q=()=>{w("agent_create_clicked",{source:"agents_list",method:"scratch"}),p()},e[28]=p,e[29]=q):q=e[29];let ae,re;e[30]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>{w("agent_create_clicked",{source:"agents_list",method:"github"}),m(!0)},re=()=>{w("agent_create_clicked",{source:"agents_list",method:"deco"}),a(!0)},e[30]=ae,e[31]=re):(ae=e[30],re=e[31]);let J;e[32]!==r||e[33]!==q?(J=s.jsxs(xe,{children:[oe,s.jsx(_e,{onCreateFromScratch:q,onImportGitHub:ae,onImportDeco:re,isCreating:r,align:"end"})]}),e[32]=r,e[33]=q,e[34]=J):J=e[34],e[35]!==J||e[36]!==K?(A=s.jsxs("div",{className:"flex flex-col gap-6",children:[ie,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[K,J]})]}),e[35]=J,e[36]=K,e[37]=A):A=e[37],M=de.length===0&&fe.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Ke,{image:s.jsx(Ve,{size:48,className:"text-muted-foreground"}),title:o?"No agents found":"No agents yet",description:o?`No agents match "${o}"`:"Create an agent to get started.",actions:!o&&s.jsxs(xe,{children:[s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),s.jsx(_e,{onCreateFromScratch:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),p()},onImportGitHub:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"github"}),m(!0)},onImportDeco:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),a(!0)},isCreating:r,align:"center",showBetaBadge:!0})]})})}),O=de.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:de.map(l=>s.jsx(it,{project:l,onDeleteClick:()=>u({id:l.id,title:l.title})},l.id))})]}),z=fe.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agent Templates"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:fe.map(l=>s.jsx(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50 cursor-pointer",onClick:()=>Se(l.id),children:s.jsx("div",{className:"flex flex-col flex-1",children:s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[s.jsx(ve,{icon:l.icon,name:l.title,size:"sm",className:"shrink-0 shadow-sm"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to set up"})]})]})})},l.id))})]}),e[1]=g,e[2]=i,e[3]=p,e[4]=n,e[5]=r,e[6]=d,e[7]=t,e[8]=o,e[9]=h,e[10]=C,e[11]=y,e[12]=T,e[13]=k,e[14]=A,e[15]=M,e[16]=O,e[17]=z}else h=e[9],C=e[10],y=e[11],T=e[12],k=e[13],A=e[14],M=e[15],O=e[16],z=e[17];let L;e[38]!==h||e[39]!==A||e[40]!==M||e[41]!==O||e[42]!==z?(L=s.jsxs(h,{children:[A,M,O,z]}),e[38]=h,e[39]=A,e[40]=M,e[41]=O,e[42]=z,e[43]=L):L=e[43];let I;e[44]!==C||e[45]!==L?(I=s.jsx(C,{children:L}),e[44]=C,e[45]=L,e[46]=I):I=e[46];let E;e[47]!==x?(E=s.jsx(Me,{open:x,onOpenChange:m}),e[47]=x,e[48]=E):E=e[48];let G;e[49]!==c?(G=s.jsx(Oe,{open:c,onOpenChange:a}),e[49]=c,e[50]=G):G=e[50];let B;e[51]!==_?(B=s.jsx(ze,{open:_,onOpenChange:N}),e[51]=_,e[52]=B):B=e[52];let H;e[53]!==k||e[54]!==b?(H=s.jsx(Le,{open:b,onOpenChange:S,existingAgent:k}),e[53]=k,e[54]=b,e[55]=H):H=e[55];let $;e[56]!==v?($=s.jsx(Ie,{open:v,onOpenChange:D}),e[56]=v,e[57]=$):$=e[57];const ce=!!n;let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>!Q&&u(null),e[58]=X):X=e[58];let Y;e[59]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Je,{children:"Delete Agent?"}),e[59]=Y):Y=e[59];const me=n?.title;let R;e[60]!==me?(R=s.jsxs(Qe,{children:[Y,s.jsxs(Ue,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:me}),"."]})]}),e[60]=me,e[61]=R):R=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(Xe,{children:"Cancel"}),e[62]=Z):Z=e[62];let F;e[63]!==T?(F=s.jsxs(Ye,{children:[Z,s.jsx(Ze,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[63]=T,e[64]=F):F=e[64];let V;e[65]!==R||e[66]!==F?(V=s.jsxs(et,{children:[R,F]}),e[65]=R,e[66]=F,e[67]=V):V=e[67];let W;e[68]!==ce||e[69]!==V?(W=s.jsx(tt,{open:ce,onOpenChange:X,children:V}),e[68]=ce,e[69]=V,e[70]=W):W=e[70];let ee;return e[71]!==y||e[72]!==H||e[73]!==$||e[74]!==W||e[75]!==I||e[76]!==E||e[77]!==G||e[78]!==B?(ee=s.jsxs(y,{children:[I,E,G,B,H,$,W]}),e[71]=y,e[72]=H,e[73]=$,e[74]=W,e[75]=I,e[76]=E,e[77]=G,e[78]=B,e[79]=ee):ee=e[79],ee}function lt(e){return e.metadata?.type==="lean-canvas"}function ot(e){return e.metadata?.type==="site-diagnostics"}function at(e){return Ge(e.id)}export{cs as default};
|
|
1
|
+
import{e as ge,P as ke,j as s,B as pe,s as Ae,r as P,t as w,x as we}from"./index-Cqw0FyHL.js";import{c as U,b as Ce,a as ue,D as xe}from"./dropdown-menu-BUQ2j94Z.js";import{a as Pe}from"./Users03-B2dn7j_S.js";import{G as Te,a as Me,I as Oe,S as ze,L as Le,b as Ie}from"./lean-canvas-recruit-modal-BU3z415J.js";import{W as Ee,b as Ge}from"./constants-8SUUmfde.js";import{b as Be,a as He}from"./use-virtual-mcp-Bb04Uah7.js";import{P as ne}from"./index-8uCGLU1q.js";import{i as $e}from"./DotsVertical-CRTfJ6MH.js";import{a as Re}from"./Settings02-FFAtt7kb.js";import{s as Fe}from"./Trash01-CKEJHaXR.js";import{A as ve,ai as Ve}from"./agent-icon-3dvecirS.js";import{a as be}from"./use-navigate-to-agent-DrWD9J71.js";import{C as Ne}from"./card-BsUopeoI.js";import{f as We}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Ke}from"./empty-state-CDSs8u5J.js";import{u as qe}from"./use-create-virtual-mcp-Y9XZZ8XI.js";import{c as Je,b as Qe,d as Ue,f as Xe,e as Ye,g as Ze,a as et,A as tt}from"./alert-dialog-BaDMThMD.js";import{S as st}from"./search-input-VyjPISbx.js";import{s as je}from"./Plus-CZq1C4jM.js";import"./ChevronDown-BMpzZvgp.js";import"./ChevronRight-B0WDiR9g.js";import"./dialog-C09MDdtC.js";import"./X-BY4Cj76l.js";import"./RefreshCcw01-Dwpnc1qZ.js";import"./collection-search-C4AgxGiz.js";import"./SearchMd-BYUE-oTe.js";import"./checkbox-D9P4N8hw.js";import"./use-connection-CyjN1GtI.js";import"./use-collections-DrmuHy93.js";import"./Lock01-CwYOwvXR.js";import"./extract-connection-data-BksUB8IU.js";import"./constants-dX65r6Zc.js";import"./collections-BDAFtlmY.js";import"./drawer-CgP97_zn.js";import"./tooltip-D_3qm7UK.js";import"./integration-icon-DmwSpOA7.js";import"./Container-DxKKEmNe.js";import"./use-mcp-tools-DyKI35iZ.js";import"./AlertCircle-Bmjr0ClA.js";import"./Tool01-CpBRL57v.js";import"./XClose-ihnqmUfp.js";import"./ArrowNarrowLeft-CThwX0q-.js";import"./XCircle-H-paIGFm.js";import"./ArrowUpRight-B7vTMj1u.js";import"./ZapSquare-BFMe5Mv9.js";import"./CheckCircle-CNaz4scY.js";import"./ChevronUp-C1KppMC5.js";import"./Star01-GaFk6Xa_.js";import"./Palette-c4ovbTBC.js";import"./LinkExternal01-DcUPNTey.js";import"./Sun-_nS1eHVw.js";import"./Play-BzawbqMW.js";import"./Shield01-CZOC16WM.js";import"./User01-BO3afenP.js";import"./Zap-BafO525R.js";import"./differenceInSeconds-NQ4PDo0z.js";function _e(e){const t=ge.c(17),{onCreateFromScratch:i,onImportGitHub:g,onImportDeco:d,isCreating:o,align:j,side:f,showBetaBadge:p}=e,r=j===void 0?"end":j,[n]=ke();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:14}),t[0]=u):u=t[0];let c;t[1]!==o||t[2]!==i?(c=s.jsxs(U,{disabled:o,onClick:i,children:[u,"Create from scratch"]}),t[1]=o,t[2]=i,t[3]=c):c=t[3];let a;t[4]!==g||t[5]!==n.experimental_vibecode||t[6]!==p?(a=n.experimental_vibecode&&s.jsxs(U,{onClick:g,children:[s.jsx(Te,{className:"size-3.5"}),"Import from GitHub",p&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"})]}),t[4]=g,t[5]=n.experimental_vibecode,t[6]=p,t[7]=a):a=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),t[8]=x):x=t[8];let m;t[9]!==d?(m=s.jsxs(U,{onClick:d,children:[x,"Import from deco.cx"]}),t[9]=d,t[10]=m):m=t[10];let _;return t[11]!==r||t[12]!==f||t[13]!==c||t[14]!==a||t[15]!==m?(_=s.jsxs(Ce,{side:f,align:r,className:"w-48",children:[c,a,m]}),t[11]=r,t[12]=f,t[13]=c,t[14]=a,t[15]=m,t[16]=_):_=t[16],_}function it(e){const t=ge.c(44),{project:i,onDeleteClick:g}=e,d=be();let o;t[0]!==d||t[1]!==i.id?(o=()=>d(i.id),t[0]=d,t[1]=i.id,t[2]=o):o=t[2];let j;t[3]!==i.title||t[4]!==o?(j=s.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.title}),t[3]=i.title,t[4]=o,t[5]=j):j=t[5];let f;t[6]!==i.icon||t[7]!==i.title?(f=s.jsx(ve,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),t[6]=i.icon,t[7]=i.title,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{asChild:!0,children:s.jsx(pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx($e,{size:20})})}),t[9]=p):p=t[9];let r;t[10]!==d||t[11]!==i.id?(r=()=>d(i.id,{search:{main:"settings"}}),t[10]=d,t[11]=i.id,t[12]=r):r=t[12];let n;t[13]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[13]=n):n=t[13];let u;t[14]!==r?(u=s.jsxs(U,{onClick:r,children:[n,"Settings"]}),t[14]=r,t[15]=u):u=t[15];let c;t[16]!==g?(c=g&&s.jsxs(U,{variant:"destructive",onClick:y=>{y.stopPropagation(),g(y)},children:[s.jsx(Fe,{size:16}),"Delete"]}),t[16]=g,t[17]=c):c=t[17];let a;t[18]!==u||t[19]!==c?(a=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(xe,{children:[p,s.jsxs(Ce,{align:"end",children:[u,c]})]})}),t[18]=u,t[19]=c,t[20]=a):a=t[20];let x;t[21]!==f||t[22]!==a?(x=s.jsxs("div",{className:"flex items-start justify-between",children:[f,a]}),t[21]=f,t[22]=a,t[23]=x):x=t[23];let m;t[24]!==i.title?(m=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),t[24]=i.title,t[25]=m):m=t[25];const _=i.description||"No description";let N;t[26]!==_?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:_}),t[26]=_,t[27]=N):N=t[27];let v;t[28]!==m||t[29]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),t[28]=m,t[29]=N,t[30]=v):v=t[30];let D;t[31]!==x||t[32]!==v?(D=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,v]}),t[31]=x,t[32]=v,t[33]=D):D=t[33];let b;t[34]!==i.updated_at?(b=We(new Date(i.updated_at),{addSuffix:!0}),t[34]=i.updated_at,t[35]=b):b=t[35];let S;t[36]!==b?(S=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),t[36]=b,t[37]=S):S=t[37];let h;t[38]!==D||t[39]!==S?(h=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[D,S]}),t[38]=D,t[39]=S,t[40]=h):h=t[40];let C;return t[41]!==h||t[42]!==j?(C=s.jsxs(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[j,h]}),t[41]=h,t[42]=j,t[43]=C):C=t[43],C}function cs(){const e=ge.c(80),{org:t}=Ae(),i=Be(),g=He(),d=be(),[o,j]=P.useState("");let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},e[0]=f):f=e[0];const{createVirtualMCP:p,isCreating:r}=qe(f),[n,u]=P.useState(null),[c,a]=P.useState(!1),[x,m]=P.useState(!1),[_,N]=P.useState(!1),[v,D]=P.useState(!1),[b,S]=P.useState(!1);let h,C,y,T,k,A,M,O,z;if(e[1]!==g||e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==r||e[6]!==d||e[7]!==t||e[8]!==o){const Q=o.toLowerCase(),de=i.filter(l=>l.id!==t.id&&(l.title.toLowerCase().includes(Q)||l.description?.toLowerCase().includes(Q)));let te;e[18]!==i?(te=i.some(at),e[18]=i,e[19]=te):te=e[19];const De=te,fe=Ee.filter(l=>(!o||l.title.toLowerCase().includes(Q))&&!(l.id==="studio-pack"&&De)),he=i.find(ot);k=i.find(lt);const Se=l=>{w("agents_list_template_clicked",{template_id:l}),l==="site-editor"?a(!0):l==="site-diagnostics"?he?d(he.id):N(!0):l==="lean-canvas"?k?d(k.id):S(!0):l==="studio-pack"&&D(!0)};let se;e[20]!==g||e[21]!==n?(se=async()=>{if(!n)return;const{id:l,title:ye}=n;u(null);try{await g.delete.mutateAsync(l),w("agent_deleted",{agent_id:l,source:"agents_list"}),we.success(`Deleted "${ye}"`)}catch{}},e[20]=g,e[21]=n,e[22]=se):se=e[22],T=se,y=ne,C=ne.Content,h=ne.Body;let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ne.Title,{children:"Agents"}),e[23]=ie):ie=e[23];let le;e[24]===Symbol.for("react.memo_cache_sentinel")?(le=l=>{l.key==="Escape"&&(j(""),l.target.blur())},e[24]=le):le=e[24];let K;e[25]!==o?(K=s.jsx(st,{value:o,onChange:j,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:le}),e[25]=o,e[26]=K):K=e[26];let oe;e[27]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),e[27]=oe):oe=e[27];let q;e[28]!==p?(q=()=>{w("agent_create_clicked",{source:"agents_list",method:"scratch"}),p()},e[28]=p,e[29]=q):q=e[29];let ae,re;e[30]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>{w("agent_create_clicked",{source:"agents_list",method:"github"}),m(!0)},re=()=>{w("agent_create_clicked",{source:"agents_list",method:"deco"}),a(!0)},e[30]=ae,e[31]=re):(ae=e[30],re=e[31]);let J;e[32]!==r||e[33]!==q?(J=s.jsxs(xe,{children:[oe,s.jsx(_e,{onCreateFromScratch:q,onImportGitHub:ae,onImportDeco:re,isCreating:r,align:"end"})]}),e[32]=r,e[33]=q,e[34]=J):J=e[34],e[35]!==J||e[36]!==K?(A=s.jsxs("div",{className:"flex flex-col gap-6",children:[ie,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[K,J]})]}),e[35]=J,e[36]=K,e[37]=A):A=e[37],M=de.length===0&&fe.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Ke,{image:s.jsx(Ve,{size:48,className:"text-muted-foreground"}),title:o?"No agents found":"No agents yet",description:o?`No agents match "${o}"`:"Create an agent to get started.",actions:!o&&s.jsxs(xe,{children:[s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),s.jsx(_e,{onCreateFromScratch:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),p()},onImportGitHub:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"github"}),m(!0)},onImportDeco:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),a(!0)},isCreating:r,align:"center",showBetaBadge:!0})]})})}),O=de.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:de.map(l=>s.jsx(it,{project:l,onDeleteClick:()=>u({id:l.id,title:l.title})},l.id))})]}),z=fe.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agent Templates"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:fe.map(l=>s.jsx(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50 cursor-pointer",onClick:()=>Se(l.id),children:s.jsx("div",{className:"flex flex-col flex-1",children:s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[s.jsx(ve,{icon:l.icon,name:l.title,size:"sm",className:"shrink-0 shadow-sm"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to set up"})]})]})})},l.id))})]}),e[1]=g,e[2]=i,e[3]=p,e[4]=n,e[5]=r,e[6]=d,e[7]=t,e[8]=o,e[9]=h,e[10]=C,e[11]=y,e[12]=T,e[13]=k,e[14]=A,e[15]=M,e[16]=O,e[17]=z}else h=e[9],C=e[10],y=e[11],T=e[12],k=e[13],A=e[14],M=e[15],O=e[16],z=e[17];let L;e[38]!==h||e[39]!==A||e[40]!==M||e[41]!==O||e[42]!==z?(L=s.jsxs(h,{children:[A,M,O,z]}),e[38]=h,e[39]=A,e[40]=M,e[41]=O,e[42]=z,e[43]=L):L=e[43];let I;e[44]!==C||e[45]!==L?(I=s.jsx(C,{children:L}),e[44]=C,e[45]=L,e[46]=I):I=e[46];let E;e[47]!==x?(E=s.jsx(Me,{open:x,onOpenChange:m}),e[47]=x,e[48]=E):E=e[48];let G;e[49]!==c?(G=s.jsx(Oe,{open:c,onOpenChange:a}),e[49]=c,e[50]=G):G=e[50];let B;e[51]!==_?(B=s.jsx(ze,{open:_,onOpenChange:N}),e[51]=_,e[52]=B):B=e[52];let H;e[53]!==k||e[54]!==b?(H=s.jsx(Le,{open:b,onOpenChange:S,existingAgent:k}),e[53]=k,e[54]=b,e[55]=H):H=e[55];let $;e[56]!==v?($=s.jsx(Ie,{open:v,onOpenChange:D}),e[56]=v,e[57]=$):$=e[57];const ce=!!n;let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>!Q&&u(null),e[58]=X):X=e[58];let Y;e[59]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Je,{children:"Delete Agent?"}),e[59]=Y):Y=e[59];const me=n?.title;let R;e[60]!==me?(R=s.jsxs(Qe,{children:[Y,s.jsxs(Ue,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:me}),"."]})]}),e[60]=me,e[61]=R):R=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(Xe,{children:"Cancel"}),e[62]=Z):Z=e[62];let F;e[63]!==T?(F=s.jsxs(Ye,{children:[Z,s.jsx(Ze,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[63]=T,e[64]=F):F=e[64];let V;e[65]!==R||e[66]!==F?(V=s.jsxs(et,{children:[R,F]}),e[65]=R,e[66]=F,e[67]=V):V=e[67];let W;e[68]!==ce||e[69]!==V?(W=s.jsx(tt,{open:ce,onOpenChange:X,children:V}),e[68]=ce,e[69]=V,e[70]=W):W=e[70];let ee;return e[71]!==y||e[72]!==H||e[73]!==$||e[74]!==W||e[75]!==I||e[76]!==E||e[77]!==G||e[78]!==B?(ee=s.jsxs(y,{children:[I,E,G,B,H,$,W]}),e[71]=y,e[72]=H,e[73]=$,e[74]=W,e[75]=I,e[76]=E,e[77]=G,e[78]=B,e[79]=ee):ee=e[79],ee}function lt(e){return e.metadata?.type==="lean-canvas"}function ot(e){return e.metadata?.type==="site-diagnostics"}function at(e){return Ge(e.id)}export{cs as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as t,j as i}from"./index-Cqw0FyHL.js";import{O as m}from"./select-model-CGzdU4-Q.js";import"./checkbox-D9P4N8hw.js";import"./ChevronDown-BMpzZvgp.js";import"./input-Co0HW9uN.js";import"./dialog-C09MDdtC.js";import"./X-BY4Cj76l.js";import"./drawer-CgP97_zn.js";import"./tooltip-D_3qm7UK.js";import"./select-rxK-8b1N.js";import"./ChevronUp-C1KppMC5.js";import"./skeleton-y3O4xgdS.js";import"./Tool01-CpBRL57v.js";import"./RefreshCcw01-Dwpnc1qZ.js";import"./SearchMd-BYUE-oTe.js";import"./Settings02-FFAtt7kb.js";import"./use-ai-providers-Cah1GZeX.js";import"./constants-8SUUmfde.js";import"./chat-context-DfbXSilM.js";import"./use-virtual-mcp-Bb04Uah7.js";import"./use-collections-DrmuHy93.js";import"./use-decopilot-events-Drlt36bF.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-DEh_VRON.js";import"./use-organization-settings-EfxM66aZ.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Zap-BafO525R.js";import"./AlertCircle-Bmjr0ClA.js";import"./CheckCircle-CNaz4scY.js";import"./Trash01-CKEJHaXR.js";import"./index-8uCGLU1q.js";import"./settings-section-BsEmPevi.js";import"./card-BsUopeoI.js";import"./ArrowUpRight-B7vTMj1u.js";import"./switch-QErK7wwO.js";import"./toggle-group-AZijjpe8.js";import"./avatar-D8_rUBWz.js";import"./User01-BO3afenP.js";import"./alert-dialog-BaDMThMD.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";function T(){const o=t.c(1);let r;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(m,{}),o[0]=r):r=o[0],r}export{T as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as i,b6 as m,j as r,cL as A,cI as w,cJ as T,du as O,be as M,a8 as I,b_ as L,dv as v,b$ as z,df as F,ae as G,cK as k,c0 as H,e as n,c as p,ba as D}from"./index-
|
|
1
|
+
import{r as i,b6 as m,j as r,cL as A,cI as w,cJ as T,du as O,be as M,a8 as I,b_ as L,dv as v,b$ as z,df as F,ae as G,cK as k,c0 as H,e as n,c as p,ba as D}from"./index-Cqw0FyHL.js";var x="AlertDialog",[V]=G(x,[v]),d=v(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t,modal:!0})};N.displayName=x;var W="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});Y.displayName=W;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[J,K]=V(f),Q=F("AlertDialogContent"),b=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:j,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});b.displayName=f;var j="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=j;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",$=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});$.displayName=U;var C="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(C,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=C;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${f}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-
|
|
1
|
+
import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-Cqw0FyHL.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{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(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=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(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
|
package/dist/client/assets/{automation-list-row-Dr5sNKYc.js → automation-list-row-BZ5pc5Hf.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as P,s as q,K as k,n as L,o as U,a as K,x as z,r as M,c as Q,j as i,B}from"./index-DgPBaKAA.js";import{b as V,d as H,e as Y,g as J,c as W,f as X,a as Z,A as ee}from"./alert-dialog-eUvHx9LP.js";import{a as te,D as se,b as ne,c as oe}from"./dropdown-menu-D3k5KxvY.js";import{A as ie,x as re}from"./agent-icon-BdKQ6n0b.js";import{i as ae}from"./DotsVertical-BdLY0G_d.js";import{s as le}from"./Trash01-vBGY9tLb.js";import{i as ce}from"./Zap-Csq8iSdS.js";import{u as ue}from"./use-virtual-mcp-DqIUOY7O.js";import{S as $,u as G}from"./constants-CxLUc4t1.js";function me(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function Ee(t){const e=P.c(12),{org:s}=q(),n=t??$;let r;e[0]!==s.id||e[1]!==s.slug||e[2]!==n?(r={connectionId:n,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=n,e[3]=r):r=e[3];const a=G(r);let o;e[4]!==t?(o=k.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=o):o=e[5];let u;e[6]!==a?(u=async()=>{const g=await a.callTool({name:"TRIGGER_LIST",arguments:{}});return(g.structuredContent??g).triggers.map(me)},e[6]=a,e[7]=u):u=e[7];const l=!!t;let d;return e[8]!==o||e[9]!==u||e[10]!==l?(d={queryKey:o,queryFn:u,enabled:l,staleTime:3e4},e[8]=o,e[9]=u,e[10]=l,e[11]=d):d=e[11],L(d)}function Se(t){const e=P.c(12),{org:s}=q();let n;e[0]!==s.id||e[1]!==s.slug?(n={connectionId:$,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=n):n=e[2];const r=G(n);let a;e[3]!==s.id||e[4]!==t?(a=k.automations(s.id,t),e[3]=s.id,e[4]=t,e[5]=a):a=e[5];let o;e[6]!==r||e[7]!==t?(o=async()=>{const l=t!=null?{virtual_mcp_id:t}:{},d=await r.callTool({name:"AUTOMATION_LIST",arguments:l});return(d.structuredContent??d).automations},e[6]=r,e[7]=t,e[8]=o):o=e[8];let u;return e[9]!==a||e[10]!==o?(u={queryKey:a,queryFn:o,staleTime:1e4},e[9]=a,e[10]=o,e[11]=u):u=e[11],L(u)}function Oe(t){const e=P.c(13),{org:s}=q();let n;e[0]!==s.id||e[1]!==s.slug?(n={connectionId:$,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=n):n=e[2];const r=G(n);let a;e[3]!==t||e[4]!==s.id?(a=k.automation(s.id,t),e[3]=t,e[4]=s.id,e[5]=a):a=e[5];let o;e[6]!==r||e[7]!==t?(o=async()=>{const d=await r.callTool({name:"AUTOMATION_GET",arguments:{id:t}});return(d.structuredContent??d).automation},e[6]=r,e[7]=t,e[8]=o):o=e[8];const u=!!t;let l;return e[9]!==a||e[10]!==o||e[11]!==u?(l={queryKey:a,queryFn:o,enabled:u,staleTime:1e4},e[9]=a,e[10]=o,e[11]=u,e[12]=l):l=e[12],L(l)}function we(t){return{name:"New Automation",agent:t?{id:t}:void 0,messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0,virtual_mcp_id:t}}function de(){const t=P.c(55),{org:e}=q();let s;t[0]!==e.id||t[1]!==e.slug?(s={connectionId:$,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=s):s=t[2];const n=G(s),r=U();let a;t[3]!==e.id||t[4]!==r?(a=()=>r.invalidateQueries({queryKey:k.automationsAll(e.id)}),t[3]=e.id,t[4]=r,t[5]=a):a=t[5];const o=a;let u;t[6]!==e.id||t[7]!==r?(u=m=>r.invalidateQueries({queryKey:k.automation(e.id,m)}),t[6]=e.id,t[7]=r,t[8]=u):u=t[8];const l=u;let d;t[9]!==n?(d=async m=>{const c=await n.callTool({name:"AUTOMATION_CREATE",arguments:m});return c.structuredContent??c},t[9]=n,t[10]=d):d=t[10];let g;t[11]!==o?(g=()=>{o()},t[11]=o,t[12]=g):g=t[12];let C;t[13]!==d||t[14]!==g?(C={mutationFn:d,onSuccess:g,onError:pe},t[13]=d,t[14]=g,t[15]=C):C=t[15];const F=K(C);let D;t[16]!==n?(D=async m=>{const c=await n.callTool({name:"AUTOMATION_UPDATE",arguments:m});return c.structuredContent??c},t[16]=n,t[17]=D):D=t[17];let f;t[18]!==o||t[19]!==l?(f=(m,c)=>{o(),typeof c.id=="string"&&l(c.id)},t[18]=o,t[19]=l,t[20]=f):f=t[20];let S;t[21]!==D||t[22]!==f?(S={mutationFn:D,onSuccess:f,onError:fe},t[21]=D,t[22]=f,t[23]=S):S=t[23];const N=K(S);let p;t[24]!==n?(p=async m=>{const c=await n.callTool({name:"AUTOMATION_DELETE",arguments:{id:m}});return c.structuredContent??c},t[24]=n,t[25]=p):p=t[25];let x;t[26]!==o||t[27]!==e.id||t[28]!==r?(x=(m,c)=>{r.removeQueries({queryKey:k.automation(e.id,c)}),o()},t[26]=o,t[27]=e.id,t[28]=r,t[29]=x):x=t[29];let A;t[30]!==x||t[31]!==p?(A={mutationFn:p,onSuccess:x,onError:ge},t[30]=x,t[31]=p,t[32]=A):A=t[32];const v=K(A);let _;t[33]!==n?(_=async m=>{const c=await n.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:m});if(c.isError){const I=c.content?.[0]?.text??"Failed to add trigger";throw new Error(I)}return c.structuredContent??c},t[33]=n,t[34]=_):_=t[34];let y;t[35]!==o||t[36]!==l?(y=m=>{o(),l(m.automation_id)},t[35]=o,t[36]=l,t[37]=y):y=t[37];let E;t[38]!==_||t[39]!==y?(E={mutationFn:_,onSuccess:y},t[38]=_,t[39]=y,t[40]=E):E=t[40];const O=K(E);let h;t[41]!==n?(h=async m=>{const c=await n.callTool({name:"AUTOMATION_TRIGGER_REMOVE",arguments:{trigger_id:m.trigger_id}});return c.structuredContent??c},t[41]=n,t[42]=h):h=t[42];let T;t[43]!==o||t[44]!==l?(T=(m,c)=>{o(),l(c.automation_id)},t[43]=o,t[44]=l,t[45]=T):T=t[45];let j;t[46]!==h||t[47]!==T?(j={mutationFn:h,onSuccess:T},t[46]=h,t[47]=T,t[48]=j):j=t[48];const w=K(j);let b;return t[49]!==F||t[50]!==v||t[51]!==O||t[52]!==w||t[53]!==N?(b={create:F,update:N,remove:v,triggerAdd:O,triggerRemove:w},t[49]=F,t[50]=v,t[51]=O,t[52]=w,t[53]=N,t[54]=b):b=t[54],b}function ge(t){z.error(t instanceof Error?t.message:"Failed to delete automation")}function fe(t){z.error(t instanceof Error?t.message:"Failed to update automation")}function pe(t){z.error(t instanceof Error?t.message:"Failed to create automation")}function Fe(t){const e=P.c(51),{automation:s,showAgent:n,onClick:r}=t,{remove:a}=de(),[o,u]=M.useState(!1),l=ue(n?s.agent?.id??void 0:void 0);let d;e[0]!==s.id||e[1]!==a?(d=()=>{a.mutate(s.id),u(!1)},e[0]=s.id,e[1]=a,e[2]=d):d=e[2];const g=d;let C;e[3]!==r?(C=R=>{R.target===R.currentTarget&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),r())},e[3]=r,e[4]=C):C=e[4];const F=C,D=s.active&&s.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let f;e[5]!==D?(f=Q("inline-block size-2 rounded-full shrink-0",D),e[5]=D,e[6]=f):f=e[6];const S=s.active&&s.trigger_count>0?"Active":s.active?"No triggers configured":"Paused";let N;e[7]!==f||e[8]!==S?(N=i.jsx("span",{className:f,"aria-label":S}),e[7]=f,e[8]=S,e[9]=N):N=e[9];let p;e[10]!==l||e[11]!==n?(p=n&&l&&i.jsx(ie,{icon:l.icon??null,name:l.title,size:"xs",className:"shrink-0"}),e[10]=l,e[11]=n,e[12]=p):p=e[12];let x;e[13]!==s.name?(x=i.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[13]=s.name,e[14]=x):x=e[14];let A;e[15]!==l||e[16]!==n?(A=n&&l&&i.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[15]=l,e[16]=n,e[17]=A):A=e[17];let v;e[18]!==x||e[19]!==A?(v=i.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,A]}),e[18]=x,e[19]=A,e[20]=v):v=e[20];let _;e[21]!==s.nearest_next_run_at||e[22]!==s.trigger_count?(_=i.jsx(ye,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[21]=s.nearest_next_run_at,e[22]=s.trigger_count,e[23]=_):_=e[23];let y;e[24]!==v||e[25]!==_?(y=i.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[v,_]}),e[24]=v,e[25]=_,e[26]=y):y=e[26];let E;e[27]===Symbol.for("react.memo_cache_sentinel")?(E=i.jsx(te,{asChild:!0,children:i.jsx(B,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:i.jsx(ae,{size:16})})}),e[27]=E):E=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=i.jsx("div",{onClick:_e,onKeyDown:xe,role:"presentation",className:"shrink-0",children:i.jsxs(se,{children:[E,i.jsx(ne,{align:"end",children:i.jsxs(oe,{variant:"destructive",onClick:R=>{R.stopPropagation(),u(!0)},children:[i.jsx(le,{size:16}),"Delete"]})})]})}),e[28]=O):O=e[28];let h;e[29]!==F||e[30]!==r||e[31]!==y||e[32]!==N||e[33]!==p?(h=i.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:F,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[N,p,y,O]}),e[29]=F,e[30]=r,e[31]=y,e[32]=N,e[33]=p,e[34]=h):h=e[34];let T;e[35]===Symbol.for("react.memo_cache_sentinel")?(T=i.jsx(W,{children:"Delete automation?"}),e[35]=T):T=e[35];let j;e[36]!==s.name?(j=i.jsxs(V,{children:[T,i.jsxs(H,{children:["This removes"," ",i.jsx("span",{className:"font-medium text-foreground",children:s.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[36]=s.name,e[37]=j):j=e[37];let w;e[38]===Symbol.for("react.memo_cache_sentinel")?(w=i.jsx(X,{children:"Cancel"}),e[38]=w):w=e[38];let b;e[39]!==g||e[40]!==a.isPending?(b=i.jsxs(Y,{children:[w,i.jsx(J,{onClick:g,disabled:a.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[39]=g,e[40]=a.isPending,e[41]=b):b=e[41];let m;e[42]!==j||e[43]!==b?(m=i.jsxs(Z,{children:[j,b]}),e[42]=j,e[43]=b,e[44]=m):m=e[44];let c;e[45]!==o||e[46]!==m?(c=i.jsx(ee,{open:o,onOpenChange:u,children:m}),e[45]=o,e[46]=m,e[47]=c):c=e[47];let I;return e[48]!==h||e[49]!==c?(I=i.jsxs(i.Fragment,{children:[h,c]}),e[48]=h,e[49]=c,e[50]=I):I=e[50],I}function xe(t){return t.stopPropagation()}function _e(t){return t.stopPropagation()}function ye(t){const e=P.c(4),{triggerCount:s,nextRunAt:n}=t;if(s===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=a):a=e[0],a}let r;return e[1]!==n||e[2]!==s?(r=i.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:n?i.jsxs(i.Fragment,{children:[i.jsx(re,{size:12,className:"shrink-0"}),i.jsxs("span",{className:"truncate",children:["Next run ",new Date(n).toLocaleString()]})]}):i.jsxs(i.Fragment,{children:[i.jsx(ce,{size:12,className:"shrink-0"}),i.jsxs("span",{className:"truncate",children:[s," trigger",s===1?"":"s"]})]})}),e[1]=n,e[2]=s,e[3]=r):r=e[3],r}export{Fe as A,Ee as a,Oe as b,Se as c,we as d,de as u};
|
|
1
|
+
import{e as P,s as q,K as k,n as L,o as U,a as K,x as z,r as M,c as Q,j as i,B}from"./index-Cqw0FyHL.js";import{b as V,d as H,e as Y,g as J,c as W,f as X,a as Z,A as ee}from"./alert-dialog-BaDMThMD.js";import{a as te,D as se,b as ne,c as oe}from"./dropdown-menu-BUQ2j94Z.js";import{A as ie,x as re}from"./agent-icon-3dvecirS.js";import{i as ae}from"./DotsVertical-CRTfJ6MH.js";import{s as le}from"./Trash01-CKEJHaXR.js";import{i as ce}from"./Zap-BafO525R.js";import{u as ue}from"./use-virtual-mcp-Bb04Uah7.js";import{S as $,u as G}from"./constants-8SUUmfde.js";function me(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function Ee(t){const e=P.c(12),{org:s}=q(),n=t??$;let r;e[0]!==s.id||e[1]!==s.slug||e[2]!==n?(r={connectionId:n,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=n,e[3]=r):r=e[3];const a=G(r);let o;e[4]!==t?(o=k.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=o):o=e[5];let u;e[6]!==a?(u=async()=>{const g=await a.callTool({name:"TRIGGER_LIST",arguments:{}});return(g.structuredContent??g).triggers.map(me)},e[6]=a,e[7]=u):u=e[7];const l=!!t;let d;return e[8]!==o||e[9]!==u||e[10]!==l?(d={queryKey:o,queryFn:u,enabled:l,staleTime:3e4},e[8]=o,e[9]=u,e[10]=l,e[11]=d):d=e[11],L(d)}function Se(t){const e=P.c(12),{org:s}=q();let n;e[0]!==s.id||e[1]!==s.slug?(n={connectionId:$,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=n):n=e[2];const r=G(n);let a;e[3]!==s.id||e[4]!==t?(a=k.automations(s.id,t),e[3]=s.id,e[4]=t,e[5]=a):a=e[5];let o;e[6]!==r||e[7]!==t?(o=async()=>{const l=t!=null?{virtual_mcp_id:t}:{},d=await r.callTool({name:"AUTOMATION_LIST",arguments:l});return(d.structuredContent??d).automations},e[6]=r,e[7]=t,e[8]=o):o=e[8];let u;return e[9]!==a||e[10]!==o?(u={queryKey:a,queryFn:o,staleTime:1e4},e[9]=a,e[10]=o,e[11]=u):u=e[11],L(u)}function Oe(t){const e=P.c(13),{org:s}=q();let n;e[0]!==s.id||e[1]!==s.slug?(n={connectionId:$,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=n):n=e[2];const r=G(n);let a;e[3]!==t||e[4]!==s.id?(a=k.automation(s.id,t),e[3]=t,e[4]=s.id,e[5]=a):a=e[5];let o;e[6]!==r||e[7]!==t?(o=async()=>{const d=await r.callTool({name:"AUTOMATION_GET",arguments:{id:t}});return(d.structuredContent??d).automation},e[6]=r,e[7]=t,e[8]=o):o=e[8];const u=!!t;let l;return e[9]!==a||e[10]!==o||e[11]!==u?(l={queryKey:a,queryFn:o,enabled:u,staleTime:1e4},e[9]=a,e[10]=o,e[11]=u,e[12]=l):l=e[12],L(l)}function we(t){return{name:"New Automation",agent:t?{id:t}:void 0,messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0,virtual_mcp_id:t}}function de(){const t=P.c(55),{org:e}=q();let s;t[0]!==e.id||t[1]!==e.slug?(s={connectionId:$,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=s):s=t[2];const n=G(s),r=U();let a;t[3]!==e.id||t[4]!==r?(a=()=>r.invalidateQueries({queryKey:k.automationsAll(e.id)}),t[3]=e.id,t[4]=r,t[5]=a):a=t[5];const o=a;let u;t[6]!==e.id||t[7]!==r?(u=m=>r.invalidateQueries({queryKey:k.automation(e.id,m)}),t[6]=e.id,t[7]=r,t[8]=u):u=t[8];const l=u;let d;t[9]!==n?(d=async m=>{const c=await n.callTool({name:"AUTOMATION_CREATE",arguments:m});return c.structuredContent??c},t[9]=n,t[10]=d):d=t[10];let g;t[11]!==o?(g=()=>{o()},t[11]=o,t[12]=g):g=t[12];let C;t[13]!==d||t[14]!==g?(C={mutationFn:d,onSuccess:g,onError:pe},t[13]=d,t[14]=g,t[15]=C):C=t[15];const F=K(C);let D;t[16]!==n?(D=async m=>{const c=await n.callTool({name:"AUTOMATION_UPDATE",arguments:m});return c.structuredContent??c},t[16]=n,t[17]=D):D=t[17];let f;t[18]!==o||t[19]!==l?(f=(m,c)=>{o(),typeof c.id=="string"&&l(c.id)},t[18]=o,t[19]=l,t[20]=f):f=t[20];let S;t[21]!==D||t[22]!==f?(S={mutationFn:D,onSuccess:f,onError:fe},t[21]=D,t[22]=f,t[23]=S):S=t[23];const N=K(S);let p;t[24]!==n?(p=async m=>{const c=await n.callTool({name:"AUTOMATION_DELETE",arguments:{id:m}});return c.structuredContent??c},t[24]=n,t[25]=p):p=t[25];let x;t[26]!==o||t[27]!==e.id||t[28]!==r?(x=(m,c)=>{r.removeQueries({queryKey:k.automation(e.id,c)}),o()},t[26]=o,t[27]=e.id,t[28]=r,t[29]=x):x=t[29];let A;t[30]!==x||t[31]!==p?(A={mutationFn:p,onSuccess:x,onError:ge},t[30]=x,t[31]=p,t[32]=A):A=t[32];const v=K(A);let _;t[33]!==n?(_=async m=>{const c=await n.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:m});if(c.isError){const I=c.content?.[0]?.text??"Failed to add trigger";throw new Error(I)}return c.structuredContent??c},t[33]=n,t[34]=_):_=t[34];let y;t[35]!==o||t[36]!==l?(y=m=>{o(),l(m.automation_id)},t[35]=o,t[36]=l,t[37]=y):y=t[37];let E;t[38]!==_||t[39]!==y?(E={mutationFn:_,onSuccess:y},t[38]=_,t[39]=y,t[40]=E):E=t[40];const O=K(E);let h;t[41]!==n?(h=async m=>{const c=await n.callTool({name:"AUTOMATION_TRIGGER_REMOVE",arguments:{trigger_id:m.trigger_id}});return c.structuredContent??c},t[41]=n,t[42]=h):h=t[42];let T;t[43]!==o||t[44]!==l?(T=(m,c)=>{o(),l(c.automation_id)},t[43]=o,t[44]=l,t[45]=T):T=t[45];let j;t[46]!==h||t[47]!==T?(j={mutationFn:h,onSuccess:T},t[46]=h,t[47]=T,t[48]=j):j=t[48];const w=K(j);let b;return t[49]!==F||t[50]!==v||t[51]!==O||t[52]!==w||t[53]!==N?(b={create:F,update:N,remove:v,triggerAdd:O,triggerRemove:w},t[49]=F,t[50]=v,t[51]=O,t[52]=w,t[53]=N,t[54]=b):b=t[54],b}function ge(t){z.error(t instanceof Error?t.message:"Failed to delete automation")}function fe(t){z.error(t instanceof Error?t.message:"Failed to update automation")}function pe(t){z.error(t instanceof Error?t.message:"Failed to create automation")}function Fe(t){const e=P.c(51),{automation:s,showAgent:n,onClick:r}=t,{remove:a}=de(),[o,u]=M.useState(!1),l=ue(n?s.agent?.id??void 0:void 0);let d;e[0]!==s.id||e[1]!==a?(d=()=>{a.mutate(s.id),u(!1)},e[0]=s.id,e[1]=a,e[2]=d):d=e[2];const g=d;let C;e[3]!==r?(C=R=>{R.target===R.currentTarget&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),r())},e[3]=r,e[4]=C):C=e[4];const F=C,D=s.active&&s.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let f;e[5]!==D?(f=Q("inline-block size-2 rounded-full shrink-0",D),e[5]=D,e[6]=f):f=e[6];const S=s.active&&s.trigger_count>0?"Active":s.active?"No triggers configured":"Paused";let N;e[7]!==f||e[8]!==S?(N=i.jsx("span",{className:f,"aria-label":S}),e[7]=f,e[8]=S,e[9]=N):N=e[9];let p;e[10]!==l||e[11]!==n?(p=n&&l&&i.jsx(ie,{icon:l.icon??null,name:l.title,size:"xs",className:"shrink-0"}),e[10]=l,e[11]=n,e[12]=p):p=e[12];let x;e[13]!==s.name?(x=i.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[13]=s.name,e[14]=x):x=e[14];let A;e[15]!==l||e[16]!==n?(A=n&&l&&i.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[15]=l,e[16]=n,e[17]=A):A=e[17];let v;e[18]!==x||e[19]!==A?(v=i.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,A]}),e[18]=x,e[19]=A,e[20]=v):v=e[20];let _;e[21]!==s.nearest_next_run_at||e[22]!==s.trigger_count?(_=i.jsx(ye,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[21]=s.nearest_next_run_at,e[22]=s.trigger_count,e[23]=_):_=e[23];let y;e[24]!==v||e[25]!==_?(y=i.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[v,_]}),e[24]=v,e[25]=_,e[26]=y):y=e[26];let E;e[27]===Symbol.for("react.memo_cache_sentinel")?(E=i.jsx(te,{asChild:!0,children:i.jsx(B,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:i.jsx(ae,{size:16})})}),e[27]=E):E=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=i.jsx("div",{onClick:_e,onKeyDown:xe,role:"presentation",className:"shrink-0",children:i.jsxs(se,{children:[E,i.jsx(ne,{align:"end",children:i.jsxs(oe,{variant:"destructive",onClick:R=>{R.stopPropagation(),u(!0)},children:[i.jsx(le,{size:16}),"Delete"]})})]})}),e[28]=O):O=e[28];let h;e[29]!==F||e[30]!==r||e[31]!==y||e[32]!==N||e[33]!==p?(h=i.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:F,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[N,p,y,O]}),e[29]=F,e[30]=r,e[31]=y,e[32]=N,e[33]=p,e[34]=h):h=e[34];let T;e[35]===Symbol.for("react.memo_cache_sentinel")?(T=i.jsx(W,{children:"Delete automation?"}),e[35]=T):T=e[35];let j;e[36]!==s.name?(j=i.jsxs(V,{children:[T,i.jsxs(H,{children:["This removes"," ",i.jsx("span",{className:"font-medium text-foreground",children:s.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[36]=s.name,e[37]=j):j=e[37];let w;e[38]===Symbol.for("react.memo_cache_sentinel")?(w=i.jsx(X,{children:"Cancel"}),e[38]=w):w=e[38];let b;e[39]!==g||e[40]!==a.isPending?(b=i.jsxs(Y,{children:[w,i.jsx(J,{onClick:g,disabled:a.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[39]=g,e[40]=a.isPending,e[41]=b):b=e[41];let m;e[42]!==j||e[43]!==b?(m=i.jsxs(Z,{children:[j,b]}),e[42]=j,e[43]=b,e[44]=m):m=e[44];let c;e[45]!==o||e[46]!==m?(c=i.jsx(ee,{open:o,onOpenChange:u,children:m}),e[45]=o,e[46]=m,e[47]=c):c=e[47];let I;return e[48]!==h||e[49]!==c?(I=i.jsxs(i.Fragment,{children:[h,c]}),e[48]=h,e[49]=c,e[50]=I):I=e[50],I}function xe(t){return t.stopPropagation()}function _e(t){return t.stopPropagation()}function ye(t){const e=P.c(4),{triggerCount:s,nextRunAt:n}=t;if(s===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=a):a=e[0],a}let r;return e[1]!==n||e[2]!==s?(r=i.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:n?i.jsxs(i.Fragment,{children:[i.jsx(re,{size:12,className:"shrink-0"}),i.jsxs("span",{className:"truncate",children:["Next run ",new Date(n).toLocaleString()]})]}):i.jsxs(i.Fragment,{children:[i.jsx(ce,{size:12,className:"shrink-0"}),i.jsxs("span",{className:"truncate",children:[s," trigger",s===1?"":"s"]})]})}),e[1]=n,e[2]=s,e[3]=r):r=e[3],r}export{Fe as A,Ee as a,Oe as b,Se as c,we as d,de as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as L,s as R,f as T,r as M,j as e,B as $,t as S}from"./index-
|
|
1
|
+
import{e as L,s as R,f as T,r as M,j as e,B as $,t as S}from"./index-Cqw0FyHL.js";import{s as O}from"./Plus-CZq1C4jM.js";import{i as _}from"./Zap-BafO525R.js";import{S as V}from"./search-input-VyjPISbx.js";import{P as p}from"./index-8uCGLU1q.js";import{E as b}from"./empty-state-CDSs8u5J.js";import{c as q,A as D}from"./automation-list-row-BZ5pc5Hf.js";import{a as F}from"./use-navigate-to-agent-DrWD9J71.js";import{b as G}from"./use-virtual-mcp-Bb04Uah7.js";import"./SearchMd-BYUE-oTe.js";import"./tooltip-D_3qm7UK.js";import"./X-BY4Cj76l.js";import"./alert-dialog-BaDMThMD.js";import"./dropdown-menu-BUQ2j94Z.js";import"./ChevronDown-BMpzZvgp.js";import"./ChevronRight-B0WDiR9g.js";import"./DotsVertical-CRTfJ6MH.js";import"./agent-icon-3dvecirS.js";import"./AlertCircle-Bmjr0ClA.js";import"./Tool01-CpBRL57v.js";import"./XClose-ihnqmUfp.js";import"./RefreshCcw01-Dwpnc1qZ.js";import"./ArrowNarrowLeft-CThwX0q-.js";import"./XCircle-H-paIGFm.js";import"./ArrowUpRight-B7vTMj1u.js";import"./ZapSquare-BFMe5Mv9.js";import"./Users03-B2dn7j_S.js";import"./CheckCircle-CNaz4scY.js";import"./ChevronUp-C1KppMC5.js";import"./Container-DxKKEmNe.js";import"./Star01-GaFk6Xa_.js";import"./Palette-c4ovbTBC.js";import"./LinkExternal01-DcUPNTey.js";import"./Lock01-CwYOwvXR.js";import"./Sun-_nS1eHVw.js";import"./Play-BzawbqMW.js";import"./Settings02-FFAtt7kb.js";import"./Shield01-CZOC16WM.js";import"./Trash01-CKEJHaXR.js";import"./User01-BO3afenP.js";import"./constants-8SUUmfde.js";import"./use-collections-DrmuHy93.js";function Lt(){const t=L.c(18),{org:u}=R(),{data:y}=q(void 0),d=y===void 0?[]:y,B=G(),f=F(),g=T(),[x,k]=M.useState(""),h=x.toLowerCase(),E=new Map(B.map(H)),A=d.filter(o=>{if(!h||o.name.toLowerCase().includes(h))return!0;const n=o.agent?E.get(o.agent.id):void 0;return!!(n&&n.title.toLowerCase().includes(h))});let a;t[0]!==f?(a=(o,n)=>{n&&(S("automations_list_row_clicked",{automation_id:o,agent_id:n,source:"settings_automations"}),f(n,{search:{main:"automation:"+o}}))},t[0]=f,t[1]=a):a=t[1];const P=a;let m;t[2]!==g||t[3]!==u.slug?(m=()=>{S("automations_empty_state_browse_agents_clicked"),g({to:"/$org/settings/agents",params:{org:u.slug}})},t[2]=g,t[3]=u.slug,t[4]=m):m=t[4];const z=m,j=p,w=p,v=p;let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsx(p.Title,{children:"Automations"}),t[5]=c):c=t[5];const C=d.length>0&&e.jsx(V,{value:x,onChange:k,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let s;t[6]!==C?(s=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,C]}),t[6]=C,t[7]=s):s=t[7];const N=d.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(b,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:e.jsxs($,{size:"sm",onClick:z,children:[e.jsx(O,{size:14}),"Browse agents"]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(b,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${x}"`})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(o=>e.jsx(D,{automation:o,showAgent:!0,onClick:()=>P(o.id,o.agent?.id??null)},o.id))});let i;t[8]!==v.Body||t[9]!==s||t[10]!==N?(i=e.jsxs(v.Body,{children:[s,N]}),t[8]=v.Body,t[9]=s,t[10]=N,t[11]=i):i=t[11];let r;t[12]!==w.Content||t[13]!==i?(r=e.jsx(w.Content,{children:i}),t[12]=w.Content,t[13]=i,t[14]=r):r=t[14];let l;return t[15]!==j||t[16]!==r?(l=e.jsx(j,{children:r}),t[15]=j,t[16]=r,t[17]=l):l=t[17],l}function H(t){return[t.id,t]}export{Lt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as k,j as i,r as V,c as m,aX as S,cg as $,ch as O,ci as U}from"./index-
|
|
1
|
+
import{e as k,j as i,r as V,c as m,aX as S,cg as $,ch as O,ci as U}from"./index-Cqw0FyHL.js";import{s as L}from"./User01-BO3afenP.js";function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(U,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function T(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function _(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(O,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const R=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],D="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function W(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%R.length;return R[s]}const I=S("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),X=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),B=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function G(r){const e=k.c(35);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,[f,x]=V.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(j){z=D;break e}if(typeof t=="string"){let c;e[11]!==t?(c=W(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=R[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(I({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(L,{size:B(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(X({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(_,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(M,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:f,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(I({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as u,c as l,j as g,aY as v,aX as b}from"./index-
|
|
1
|
+
import{e as u,c as l,j as g,aY as v,aX as b}from"./index-Cqw0FyHL.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=u.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=l(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as q,$ as ke,s as we,o as Se,K as je,n as Ee,a as ce,j as n,B as ve,t as Y,x as K,r as C,c as xe}from"./index-DgPBaKAA.js";import{S as De,u as Ae}from"./constants-CxLUc4t1.js";import{t as Be,i as Oe}from"./ChevronDown-ClwyYcv4.js";import{i as Te}from"./ChevronRight-C0UgsndQ.js";import{s as Ie,t as Fe,i as Pe}from"./Star01-BRRUiVRZ.js";import{n as Re}from"./LinkExternal01-C0RHT0gp.js";import{s as ye}from"./Plus-Ukcu1-Za.js";import{s as $e}from"./Trash01-vBGY9tLb.js";import{i as ze}from"./X-cgiyE3ZM.js";import{i as Le}from"./Zap-Csq8iSdS.js";import{c as Ue,b as Ke,d as Xe,f as qe,g as Ge,e as Me,a as He,A as Qe}from"./alert-dialog-eUvHx9LP.js";import{I as M}from"./input-s7yMiYrQ.js";import{T as Ye}from"./textarea-D7sU3_M1.js";import{P as ue}from"./index-CLgan7xr.js";import{u as Ne}from"./unwrap-tool-result-BYXdCQMg.js";import"./tooltip-apD1iSo_.js";function ge(s){const e=q.c(17),{title:t,children:m,onEdit:o,editing:f,onSave:u,onCancel:l,className:p}=s,v=f&&"ring-2 ring-ring/30";let c;e[0]!==p||e[1]!==v?(c=xe("group relative rounded-2xl border border-border/60 bg-background p-5",v,p),e[0]=p,e[1]=v,e[2]=c):c=e[2];let h;e[3]!==t?(h=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),e[3]=t,e[4]=h):h=e[4];let d;e[5]!==f||e[6]!==l||e[7]!==o||e[8]!==u?(d=f?n.jsxs("div",{className:"flex gap-1",children:[n.jsx("button",{type:"button",onClick:l,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted hover:bg-muted-foreground/15",children:n.jsx(ze,{size:13,className:"text-muted-foreground"})}),n.jsx("button",{type:"button",onClick:u,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 hover:bg-primary/20",children:n.jsx(Oe,{size:13,className:"text-primary"})})]}):o&&n.jsx("button",{type:"button",onClick:o,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted opacity-0 transition-opacity duration-150 hover:bg-muted-foreground/15 group-hover:opacity-100",children:n.jsx(Pe,{size:13,className:"text-muted-foreground"})}),e[5]=f,e[6]=l,e[7]=o,e[8]=u,e[9]=d):d=e[9];let a;e[10]!==h||e[11]!==d?(a=n.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h,d]}),e[10]=h,e[11]=d,e[12]=a):a=e[12];let x;return e[13]!==m||e[14]!==c||e[15]!==a?(x=n.jsxs("div",{className:c,children:[a,m]}),e[13]=m,e[14]=c,e[15]=a,e[16]=x):x=e[16],x}function Je(s){const e=q.c(25),{onExtract:t,isExtracting:m}=s,[o,f]=C.useState("");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx(Le,{size:18,className:"text-primary"})}),e[0]=u):u=e[0];let l,p;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),p=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=l,e[2]=p):(l=e[1],p=e[2]);let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v=r=>f(r.target.value),e[3]=v):v=e[3];let c;e[4]!==o||e[5]!==m||e[6]!==t?(c=r=>{r.key==="Enter"&&o.trim()&&!m&&t(o.trim())},e[4]=o,e[5]=m,e[6]=t,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==c?(h=n.jsx(M,{placeholder:"acme.com",value:o,onChange:v,className:"max-w-xs",onKeyDown:c}),e[8]=o,e[9]=c,e[10]=h):h=e[10];let d;e[11]!==o||e[12]!==m?(d=!o.trim()||m,e[11]=o,e[12]=m,e[13]=d):d=e[13];let a;e[14]!==o||e[15]!==t?(a=()=>t(o.trim()),e[14]=o,e[15]=t,e[16]=a):a=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ie,{size:14}),e[17]=x):x=e[17];const j=m?"Extracting...":"Extract";let b;e[18]!==j||e[19]!==d||e[20]!==a?(b=n.jsxs(ve,{variant:"outline",disabled:d,onClick:a,children:[x,j]}),e[18]=j,e[19]=d,e[20]=a,e[21]=b):b=e[21];let g;return e[22]!==b||e[23]!==h?(g=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[u,n.jsxs("div",{className:"flex-1",children:[l,p,n.jsxs("div",{className:"mt-3 flex gap-2",children:[h,b]})]})]})}),e[22]=b,e[23]=h,e[24]=g):g=e[24],g}function Ve(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.name??""),[p,v]=C.useState(t.domain??""),[c,h]=C.useState(t.overview??"");let d;e[0]!==t.domain||e[1]!==t.name||e[2]!==t.overview?(d=()=>{l(t.name??""),v(t.domain??""),h(t.overview??""),f(!0)},e[0]=t.domain,e[1]=t.name,e[2]=t.overview,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==m||e[7]!==c?(x=()=>{m({name:u,domain:p,overview:c}),f(!1)},e[4]=p,e[5]=u,e[6]=m,e[7]=c,e[8]=x):x=e[8];const j=x,b=!t.name&&!t.domain&&!t.overview;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.domain||e[11]!==t.name||e[12]!==t.overview||e[13]!==p||e[14]!==o||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"Acme Corp"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Domain"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"acme.com"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),n.jsx(Ye,{value:c,onChange:y=>h(y.target.value),placeholder:"Brief description of what the company does...",rows:3})]})]}):b?n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No company info yet. Click edit to add your company name, domain, and overview."}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[n.jsx("h2",{className:"text-xl font-semibold leading-tight text-foreground",children:t.name}),t.domain&&n.jsxs("a",{href:`https://${t.domain}`,target:"_blank",rel:"noopener noreferrer",className:"mt-0.5 flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[n.jsx(Re,{size:11}),t.domain]})]}),t.overview&&n.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t.overview})]}),e[10]=t.domain,e[11]=t.name,e[12]=t.overview,e[13]=p,e[14]=o,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Company Overview",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}function We(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.logo??""),[p,v]=C.useState(t.favicon??""),[c,h]=C.useState(t.ogImage??"");let d;e[0]!==t.favicon||e[1]!==t.logo||e[2]!==t.ogImage?(d=()=>{l(t.logo??""),v(t.favicon??""),h(t.ogImage??""),f(!0)},e[0]=t.favicon,e[1]=t.logo,e[2]=t.ogImage,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==c||e[7]!==m?(x=()=>{m({logo:u||null,favicon:p||null,ogImage:c||null}),f(!1)},e[4]=p,e[5]=u,e[6]=c,e[7]=m,e[8]=x):x=e[8];const j=x,b=t.logo||t.favicon||t.ogImage;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.favicon||e[11]!==t.logo||e[12]!==t.ogImage||e[13]!==o||e[14]!==p||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Logo URL"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Favicon URL"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"OG Image URL"}),n.jsx(M,{value:c,onChange:y=>h(y.target.value),placeholder:"https://..."})]})]}):b?n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.logo?n.jsx("img",{src:t.logo,alt:"Logo",className:"h-full w-full object-contain p-3"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No logo"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Logo"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.favicon?n.jsx("img",{src:t.favicon,alt:"Favicon",className:"h-12 w-12 object-contain"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No favicon"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Favicon"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.ogImage?n.jsx("img",{src:t.ogImage,alt:"OG",className:"h-full w-full object-contain",loading:"lazy"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No SEO image"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"SEO / OG image"})]})]}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No logos added yet. Click edit to add logo, favicon, and OG image URLs."}),e[10]=t.favicon,e[11]=t.logo,e[12]=t.ogImage,e[13]=o,e[14]=p,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Logos & Images",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}const _e=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function Ze(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.fonts?(u=t.fonts??{},e[0]=t.fonts,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.fonts?(v=()=>{p(t.fonts??{}),f(!0)},e[2]=t.fonts,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(tt);m({fonts:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.fonts?(a=t.fonts&&Object.values(t.fonts).some(et),e[7]=t.fonts,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.fonts||e[11]!==o||e[12]!==l||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:_e.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:y}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:`Font family for ${y.toLowerCase()}`})]},i)})}):x?n.jsx("div",{className:"space-y-3",children:_e.filter(r=>{const{key:i}=r;return t.fonts?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"w-9 text-xl font-medium leading-none text-foreground",children:"Aa"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium leading-none text-foreground",children:t.fonts[i]}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:y})]})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No fonts defined. Click edit to add your brand fonts."}),e[10]=t.fonts,e[11]=o,e[12]=l,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Fonts",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function et(s){return s?.trim()}function tt(s){return s?.trim()}const Ce=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function st(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.colors?(u=t.colors??{},e[0]=t.colors,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.colors?(v=()=>{p(t.colors??{}),f(!0)},e[2]=t.colors,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(ot);m({colors:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.colors?(a=t.colors&&Object.values(t.colors).some(nt),e[7]=t.colors,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.colors||e[11]!==l||e[12]!==o||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:Ce.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:l[i]??"#000000",onChange:_=>p({...l,[i]:_.target.value}),className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:y})]},i)})}):x?n.jsx("div",{className:"flex flex-wrap gap-4",children:Ce.filter(r=>{const{key:i}=r;return t.colors?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx("div",{className:"h-14 w-14 rounded-full shadow-sm",style:{backgroundColor:t.colors[i],border:t.colors[i]==="#FFFFFF"?"1px solid #e5e7eb":void 0}}),n.jsx("p",{className:"font-mono text-[10px] text-muted-foreground",children:t.colors[i]}),n.jsx("p",{className:"text-[10px] text-muted-foreground",children:y})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No colors defined. Click edit to add your brand palette."}),e[10]=t.colors,e[11]=l,e[12]=o,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Colors",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function nt(s){return s?.trim()}function ot(s){return s?.trim()}function at(s){const e=q.c(123),{brand:t,client:m,onChanged:o}=s,[f,u]=C.useState(t.isDefault??!1),[l,p]=C.useState(!1);let v;e[0]!==t.colors||e[1]!==t.domain||e[2]!==t.favicon||e[3]!==t.fonts||e[4]!==t.id||e[5]!==t.images||e[6]!==t.logo||e[7]!==t.name||e[8]!==t.ogImage||e[9]!==t.overview||e[10]!==m?(v=async N=>{const be={id:t.id,name:N.name??t.name??"",domain:N.domain??t.domain??"",overview:N.overview??t.overview??"",logo:"logo"in N?N.logo:t.logo,favicon:"favicon"in N?N.favicon:t.favicon,ogImage:"ogImage"in N?N.ogImage:t.ogImage,fonts:"fonts"in N?N.fonts:t.fonts,colors:"colors"in N?N.colors:t.colors,images:"images"in N?N.images:t.images};await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:be})},e[0]=t.colors,e[1]=t.domain,e[2]=t.favicon,e[3]=t.fonts,e[4]=t.id,e[5]=t.images,e[6]=t.logo,e[7]=t.name,e[8]=t.ogImage,e[9]=t.overview,e[10]=m,e[11]=v):v=e[11];let c;e[12]!==t.id||e[13]!==o?(c=(N,be)=>{Y("brand_updated",{brand_id:t.id,fields:Object.keys(be)}),o(),K.success("Brand context saved")},e[12]=t.id,e[13]=o,e[14]=c):c=e[14];let h;e[15]!==v||e[16]!==c?(h={mutationFn:v,onSuccess:c,onError:ut},e[15]=v,e[16]=c,e[17]=h):h=e[17];const{mutate:d}=ce(h);let a;e[18]!==t.id||e[19]!==m?(a=async()=>{await m.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:t.id}})},e[18]=t.id,e[19]=m,e[20]=a):a=e[20];let x;e[21]!==t.id||e[22]!==o?(x=()=>{Y("brand_deleted",{brand_id:t.id}),p(!1),o(),K.success("Brand deleted")},e[21]=t.id,e[22]=o,e[23]=x):x=e[23];let j;e[24]!==a||e[25]!==x?(j={mutationFn:a,onSuccess:x,onError:ft},e[24]=a,e[25]=x,e[26]=j):j=e[26];const{mutate:b,isPending:g}=ce(j);let r;e[27]!==t.id||e[28]!==t.isDefault||e[29]!==m?(r=async()=>{await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,isDefault:!t.isDefault}})},e[27]=t.id,e[28]=t.isDefault,e[29]=m,e[30]=r):r=e[30];let i;e[31]!==t.id||e[32]!==t.isDefault||e[33]!==o?(i=()=>{Y(t.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:t.id}),o(),K.success(t.isDefault?"Removed as default brand":"Set as default brand")},e[31]=t.id,e[32]=t.isDefault,e[33]=o,e[34]=i):i=e[34];let y;e[35]!==r||e[36]!==i?(y={mutationFn:r,onSuccess:i,onError:mt},e[35]=r,e[36]=i,e[37]=y):y=e[37];const{mutate:_}=ce(y),H=t.isDefault?"border-primary/30":"border-border/60";let F;e[38]!==H?(F=xe("rounded-2xl border bg-background",H),e[38]=H,e[39]=F):F=e[39];let P;e[40]!==f?(P=()=>u(!f),e[40]=f,e[41]=P):P=e[41];let R;e[42]!==f?(R=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:f?n.jsx(Be,{size:14}):n.jsx(Te,{size:14})}),e[42]=f,e[43]=R):R=e[43];let $;e[44]!==t.logo||e[45]!==t.name?($=t.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:t.logo,alt:"",className:"h-full w-full object-contain p-1",onError:dt})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t.name?.charAt(0)?.toUpperCase()||"?"})}),e[44]=t.logo,e[45]=t.name,e[46]=$):$=e[46];const ie=t.name||"Untitled Brand";let B;e[47]!==ie?(B=n.jsx("span",{className:"text-sm font-medium text-foreground",children:ie}),e[47]=ie,e[48]=B):B=e[48];let w;e[49]!==t.domain?(w=t.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.domain}),e[49]=t.domain,e[50]=w):w=e[50];let O;e[51]!==B||e[52]!==w?(O=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[B,w]}),e[51]=B,e[52]=w,e[53]=O):O=e[53];let S;e[54]!==t.colors||e[55]!==f?(S=!f&&t.colors&&Object.values(t.colors).some(ct)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(t.colors).filter(it).map(rt)}),e[54]=t.colors,e[55]=f,e[56]=S):S=e[56];let E;e[57]!==t.fonts||e[58]!==f?(E=!f&&t.fonts&&Object.values(t.fonts).some(lt)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(t.fonts).filter(Boolean).join(", ")}),e[57]=t.fonts,e[58]=f,e[59]=E):E=e[59];const Q=t.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let G;e[60]!==Q?(G=xe("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",Q),e[60]=Q,e[61]=G):G=e[61];let T,z;e[62]!==_?(T=N=>{N.stopPropagation(),_()},z=N=>{N.key==="Enter"&&(N.stopPropagation(),_())},e[62]=_,e[63]=T,e[64]=z):(T=e[63],z=e[64]);const L=t.isDefault?"Unset as default":"Set as default",U=t.isDefault?"text-primary fill-primary":"text-muted-foreground";let D;e[65]!==U?(D=xe(U),e[65]=U,e[66]=D):D=e[66];let A;e[67]!==D?(A=n.jsx(Fe,{size:13,className:D}),e[67]=D,e[68]=A):A=e[68];let I;e[69]!==G||e[70]!==T||e[71]!==z||e[72]!==L||e[73]!==A?(I=n.jsx("span",{role:"button",tabIndex:0,className:G,onClick:T,onKeyDown:z,title:L,children:A}),e[69]=G,e[70]=T,e[71]=z,e[72]=L,e[73]=A,e[74]=I):I=e[74];let k,X;e[75]===Symbol.for("react.memo_cache_sentinel")?(k=N=>{N.stopPropagation(),p(!0)},X=N=>{N.key==="Enter"&&(N.stopPropagation(),p(!0))},e[75]=k,e[76]=X):(k=e[75],X=e[76]);let de;e[77]===Symbol.for("react.memo_cache_sentinel")?(de=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:k,onKeyDown:X,title:"Delete brand",children:n.jsx($e,{size:13,className:"text-muted-foreground"})}),e[77]=de):de=e[77];let J;e[78]!==P||e[79]!==R||e[80]!==$||e[81]!==O||e[82]!==S||e[83]!==E||e[84]!==I?(J=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:P,children:[R,$,O,S,E,I,de]}),e[78]=P,e[79]=R,e[80]=$,e[81]=O,e[82]=S,e[83]=E,e[84]=I,e[85]=J):J=e[85];let V;e[86]!==t||e[87]!==f||e[88]!==d?(V=f&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(Ve,{brand:t,onSave:d}),n.jsx(We,{brand:t,onSave:d}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(st,{brand:t,onSave:d}),n.jsx(Ze,{brand:t,onSave:d})]})]}),e[86]=t,e[87]=f,e[88]=d,e[89]=V):V=e[89];let W;e[90]!==g?(W=N=>{!N&&!g&&p(!1)},e[90]=g,e[91]=W):W=e[91];let me;e[92]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Ue,{children:"Delete brand?"}),e[92]=me):me=e[92];const pe=t.name||"this brand";let Z;e[93]!==pe?(Z=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:pe}),". This action cannot be undone."]}),e[93]=pe,e[94]=Z):Z=e[94];let ee;e[95]!==t.isDefault?(ee=t.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsx("span",{className:"font-medium",children:"Heads up:"})," this is your organization's default brand. Deleting it will leave your organization without a default brand until you set another."]}),e[95]=t.isDefault,e[96]=ee):ee=e[96];let te;e[97]!==Z||e[98]!==ee?(te=n.jsxs(Ke,{children:[me,n.jsx(Xe,{asChild:!0,children:n.jsxs("div",{children:[Z,ee]})})]}),e[97]=Z,e[98]=ee,e[99]=te):te=e[99];let se;e[100]!==g?(se=n.jsx(qe,{disabled:g,children:"Cancel"}),e[100]=g,e[101]=se):se=e[101];let ne;e[102]!==b?(ne=N=>{N.preventDefault(),b()},e[102]=b,e[103]=ne):ne=e[103];const he=g?"Deleting...":"Delete";let oe;e[104]!==g||e[105]!==ne||e[106]!==he?(oe=n.jsx(Ge,{onClick:ne,disabled:g,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:he}),e[104]=g,e[105]=ne,e[106]=he,e[107]=oe):oe=e[107];let ae;e[108]!==se||e[109]!==oe?(ae=n.jsxs(Me,{children:[se,oe]}),e[108]=se,e[109]=oe,e[110]=ae):ae=e[110];let le;e[111]!==te||e[112]!==ae?(le=n.jsxs(He,{children:[te,ae]}),e[111]=te,e[112]=ae,e[113]=le):le=e[113];let re;e[114]!==l||e[115]!==W||e[116]!==le?(re=n.jsx(Qe,{open:l,onOpenChange:W,children:le}),e[114]=l,e[115]=W,e[116]=le,e[117]=re):re=e[117];let fe;return e[118]!==F||e[119]!==J||e[120]!==V||e[121]!==re?(fe=n.jsxs("div",{className:F,children:[J,V,re]}),e[118]=F,e[119]=J,e[120]=V,e[121]=re,e[122]=fe):fe=e[122],fe}function lt(s){return s}function rt(s){const[e,t]=s;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:t},title:`${e}: ${t}`},e)}function it(s){const[,e]=s;return e}function ct(s){return s}function dt(s){s.target.style.display="none"}function mt(){return K.error("Failed to update default brand")}function ft(){return K.error("Failed to delete brand")}function ut(){return K.error("Failed to save brand context")}function xt(){const s=q.c(57),{brandExtractEnabled:e}=ke(),{org:t}=we();let m;s[0]!==t.id||s[1]!==t.slug?(m={connectionId:De,orgId:t.id,orgSlug:t.slug},s[0]=t.id,s[1]=t.slug,s[2]=m):m=s[2];const o=Ae(m),f=Se();let u;s[3]!==t.id?(u=je.brandContext(t.id),s[3]=t.id,s[4]=u):u=s[4];let l;s[5]!==o?(l=async()=>{const k=await o.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!1}}),X=Ne(k);return Array.isArray(X?.items)?X.items:[]},s[5]=o,s[6]=l):l=s[6];let p;s[7]!==u||s[8]!==l?(p={queryKey:u,queryFn:l},s[7]=u,s[8]=l,s[9]=p):p=s[9];const{data:v}=Ee(p),h=(v===void 0?[]:v).filter(ht);let d;s[10]!==t.id||s[11]!==f?(d=()=>f.invalidateQueries({queryKey:je.brandContext(t.id),refetchType:"all"}),s[10]=t.id,s[11]=f,s[12]=d):d=s[12];const a=d;let x;s[13]!==o?(x=async()=>{await o.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},s[13]=o,s[14]=x):x=s[14];let j;s[15]!==a?(j=()=>{Y("brand_created"),a(),K.success("Brand created")},s[15]=a,s[16]=j):j=s[16];let b;s[17]!==x||s[18]!==j?(b={mutationFn:x,onSuccess:j,onError:pt},s[17]=x,s[18]=j,s[19]=b):b=s[19];const{mutate:g,isPending:r}=ce(b);let i;s[20]!==o?(i=async k=>{Y("brand_extract_started",{domain:k});const X=await o.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:k}});Ne(X)},s[20]=o,s[21]=i):i=s[21];let y;s[22]!==a?(y=()=>{Y("brand_extract_succeeded"),a(),K.success("Brand extracted successfully")},s[22]=a,s[23]=y):y=s[23];let _;s[24]!==y||s[25]!==i?(_={mutationFn:i,onSuccess:y,onError:gt},s[24]=y,s[25]=i,s[26]=_):_=s[26];const{mutate:H,isPending:F}=ce(_),P=ue,R=ue,$=ue,ie="flex flex-col gap-6";let B;s[27]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{children:[n.jsx(ue.Title,{children:"Brand Context"}),n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),s[27]=B):B=s[27];let w;s[28]!==g?(w=()=>g(),s[28]=g,s[29]=w):w=s[29];let O;s[30]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(ye,{size:14}),s[30]=O):O=s[30];let S;s[31]!==r||s[32]!==w?(S=n.jsxs("div",{className:"flex items-center justify-between",children:[B,n.jsxs(ve,{variant:"outline",onClick:w,disabled:r,children:[O,"Add Brand"]})]}),s[31]=r,s[32]=w,s[33]=S):S=s[33];let E;s[34]!==e||s[35]!==H||s[36]!==F?(E=e&&n.jsx(Je,{onExtract:k=>H(k),isExtracting:F}),s[34]=e,s[35]=H,s[36]=F,s[37]=E):E=s[37];const Q=h.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),n.jsxs(ve,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>g(),disabled:r,children:[n.jsx(ye,{size:14}),"Add your first brand"]})]}),G="group space-y-3";let T;s[38]!==o||s[39]!==a?(T=k=>n.jsx(at,{brand:k,client:o,onChanged:a},k.id),s[38]=o,s[39]=a,s[40]=T):T=s[40];const z=h.map(T);let L;s[41]!==z?(L=n.jsx("div",{className:G,children:z}),s[41]=z,s[42]=L):L=s[42];let U;s[43]!==S||s[44]!==E||s[45]!==Q||s[46]!==L?(U=n.jsxs("div",{className:ie,children:[S,E,Q,L]}),s[43]=S,s[44]=E,s[45]=Q,s[46]=L,s[47]=U):U=s[47];let D;s[48]!==$.Body||s[49]!==U?(D=n.jsx($.Body,{children:U}),s[48]=$.Body,s[49]=U,s[50]=D):D=s[50];let A;s[51]!==R.Content||s[52]!==D?(A=n.jsx(R.Content,{children:D}),s[51]=R.Content,s[52]=D,s[53]=A):A=s[53];let I;return s[54]!==P||s[55]!==A?(I=n.jsx(P,{children:A}),s[54]=P,s[55]=A,s[56]=I):I=s[56],I}function gt(s){Y("brand_extract_failed",{error:s instanceof Error?s.message:"unknown"}),K.error(s instanceof Error?s.message:"Failed to extract brand")}function pt(){return K.error("Failed to create brand")}function ht(s){return!s.archivedAt}function It(){const s=q.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(xt,{}),s[0]=e):e=s[0],e}export{It as default};
|
|
1
|
+
import{e as q,$ as ke,s as we,o as Se,K as je,n as Ee,a as ce,j as n,B as ve,t as Y,x as K,r as C,c as xe}from"./index-Cqw0FyHL.js";import{S as De,u as Ae}from"./constants-8SUUmfde.js";import{t as Be,i as Oe}from"./ChevronDown-BMpzZvgp.js";import{i as Te}from"./ChevronRight-B0WDiR9g.js";import{s as Ie,t as Fe,i as Pe}from"./Star01-GaFk6Xa_.js";import{n as Re}from"./LinkExternal01-DcUPNTey.js";import{s as ye}from"./Plus-CZq1C4jM.js";import{s as $e}from"./Trash01-CKEJHaXR.js";import{i as ze}from"./X-BY4Cj76l.js";import{i as Le}from"./Zap-BafO525R.js";import{c as Ue,b as Ke,d as Xe,f as qe,g as Ge,e as Me,a as He,A as Qe}from"./alert-dialog-BaDMThMD.js";import{I as M}from"./input-Co0HW9uN.js";import{T as Ye}from"./textarea-CxEqGfix.js";import{P as ue}from"./index-8uCGLU1q.js";import{u as Ne}from"./unwrap-tool-result-BYXdCQMg.js";import"./tooltip-D_3qm7UK.js";function ge(s){const e=q.c(17),{title:t,children:m,onEdit:o,editing:f,onSave:u,onCancel:l,className:p}=s,v=f&&"ring-2 ring-ring/30";let c;e[0]!==p||e[1]!==v?(c=xe("group relative rounded-2xl border border-border/60 bg-background p-5",v,p),e[0]=p,e[1]=v,e[2]=c):c=e[2];let h;e[3]!==t?(h=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),e[3]=t,e[4]=h):h=e[4];let d;e[5]!==f||e[6]!==l||e[7]!==o||e[8]!==u?(d=f?n.jsxs("div",{className:"flex gap-1",children:[n.jsx("button",{type:"button",onClick:l,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted hover:bg-muted-foreground/15",children:n.jsx(ze,{size:13,className:"text-muted-foreground"})}),n.jsx("button",{type:"button",onClick:u,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 hover:bg-primary/20",children:n.jsx(Oe,{size:13,className:"text-primary"})})]}):o&&n.jsx("button",{type:"button",onClick:o,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted opacity-0 transition-opacity duration-150 hover:bg-muted-foreground/15 group-hover:opacity-100",children:n.jsx(Pe,{size:13,className:"text-muted-foreground"})}),e[5]=f,e[6]=l,e[7]=o,e[8]=u,e[9]=d):d=e[9];let a;e[10]!==h||e[11]!==d?(a=n.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h,d]}),e[10]=h,e[11]=d,e[12]=a):a=e[12];let x;return e[13]!==m||e[14]!==c||e[15]!==a?(x=n.jsxs("div",{className:c,children:[a,m]}),e[13]=m,e[14]=c,e[15]=a,e[16]=x):x=e[16],x}function Je(s){const e=q.c(25),{onExtract:t,isExtracting:m}=s,[o,f]=C.useState("");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx(Le,{size:18,className:"text-primary"})}),e[0]=u):u=e[0];let l,p;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),p=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=l,e[2]=p):(l=e[1],p=e[2]);let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v=r=>f(r.target.value),e[3]=v):v=e[3];let c;e[4]!==o||e[5]!==m||e[6]!==t?(c=r=>{r.key==="Enter"&&o.trim()&&!m&&t(o.trim())},e[4]=o,e[5]=m,e[6]=t,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==c?(h=n.jsx(M,{placeholder:"acme.com",value:o,onChange:v,className:"max-w-xs",onKeyDown:c}),e[8]=o,e[9]=c,e[10]=h):h=e[10];let d;e[11]!==o||e[12]!==m?(d=!o.trim()||m,e[11]=o,e[12]=m,e[13]=d):d=e[13];let a;e[14]!==o||e[15]!==t?(a=()=>t(o.trim()),e[14]=o,e[15]=t,e[16]=a):a=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ie,{size:14}),e[17]=x):x=e[17];const j=m?"Extracting...":"Extract";let b;e[18]!==j||e[19]!==d||e[20]!==a?(b=n.jsxs(ve,{variant:"outline",disabled:d,onClick:a,children:[x,j]}),e[18]=j,e[19]=d,e[20]=a,e[21]=b):b=e[21];let g;return e[22]!==b||e[23]!==h?(g=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[u,n.jsxs("div",{className:"flex-1",children:[l,p,n.jsxs("div",{className:"mt-3 flex gap-2",children:[h,b]})]})]})}),e[22]=b,e[23]=h,e[24]=g):g=e[24],g}function Ve(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.name??""),[p,v]=C.useState(t.domain??""),[c,h]=C.useState(t.overview??"");let d;e[0]!==t.domain||e[1]!==t.name||e[2]!==t.overview?(d=()=>{l(t.name??""),v(t.domain??""),h(t.overview??""),f(!0)},e[0]=t.domain,e[1]=t.name,e[2]=t.overview,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==m||e[7]!==c?(x=()=>{m({name:u,domain:p,overview:c}),f(!1)},e[4]=p,e[5]=u,e[6]=m,e[7]=c,e[8]=x):x=e[8];const j=x,b=!t.name&&!t.domain&&!t.overview;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.domain||e[11]!==t.name||e[12]!==t.overview||e[13]!==p||e[14]!==o||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"Acme Corp"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Domain"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"acme.com"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),n.jsx(Ye,{value:c,onChange:y=>h(y.target.value),placeholder:"Brief description of what the company does...",rows:3})]})]}):b?n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No company info yet. Click edit to add your company name, domain, and overview."}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[n.jsx("h2",{className:"text-xl font-semibold leading-tight text-foreground",children:t.name}),t.domain&&n.jsxs("a",{href:`https://${t.domain}`,target:"_blank",rel:"noopener noreferrer",className:"mt-0.5 flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[n.jsx(Re,{size:11}),t.domain]})]}),t.overview&&n.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t.overview})]}),e[10]=t.domain,e[11]=t.name,e[12]=t.overview,e[13]=p,e[14]=o,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Company Overview",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}function We(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.logo??""),[p,v]=C.useState(t.favicon??""),[c,h]=C.useState(t.ogImage??"");let d;e[0]!==t.favicon||e[1]!==t.logo||e[2]!==t.ogImage?(d=()=>{l(t.logo??""),v(t.favicon??""),h(t.ogImage??""),f(!0)},e[0]=t.favicon,e[1]=t.logo,e[2]=t.ogImage,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==c||e[7]!==m?(x=()=>{m({logo:u||null,favicon:p||null,ogImage:c||null}),f(!1)},e[4]=p,e[5]=u,e[6]=c,e[7]=m,e[8]=x):x=e[8];const j=x,b=t.logo||t.favicon||t.ogImage;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.favicon||e[11]!==t.logo||e[12]!==t.ogImage||e[13]!==o||e[14]!==p||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Logo URL"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Favicon URL"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"OG Image URL"}),n.jsx(M,{value:c,onChange:y=>h(y.target.value),placeholder:"https://..."})]})]}):b?n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.logo?n.jsx("img",{src:t.logo,alt:"Logo",className:"h-full w-full object-contain p-3"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No logo"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Logo"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.favicon?n.jsx("img",{src:t.favicon,alt:"Favicon",className:"h-12 w-12 object-contain"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No favicon"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Favicon"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.ogImage?n.jsx("img",{src:t.ogImage,alt:"OG",className:"h-full w-full object-contain",loading:"lazy"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No SEO image"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"SEO / OG image"})]})]}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No logos added yet. Click edit to add logo, favicon, and OG image URLs."}),e[10]=t.favicon,e[11]=t.logo,e[12]=t.ogImage,e[13]=o,e[14]=p,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Logos & Images",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}const _e=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function Ze(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.fonts?(u=t.fonts??{},e[0]=t.fonts,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.fonts?(v=()=>{p(t.fonts??{}),f(!0)},e[2]=t.fonts,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(tt);m({fonts:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.fonts?(a=t.fonts&&Object.values(t.fonts).some(et),e[7]=t.fonts,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.fonts||e[11]!==o||e[12]!==l||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:_e.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:y}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:`Font family for ${y.toLowerCase()}`})]},i)})}):x?n.jsx("div",{className:"space-y-3",children:_e.filter(r=>{const{key:i}=r;return t.fonts?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"w-9 text-xl font-medium leading-none text-foreground",children:"Aa"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium leading-none text-foreground",children:t.fonts[i]}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:y})]})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No fonts defined. Click edit to add your brand fonts."}),e[10]=t.fonts,e[11]=o,e[12]=l,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Fonts",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function et(s){return s?.trim()}function tt(s){return s?.trim()}const Ce=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function st(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.colors?(u=t.colors??{},e[0]=t.colors,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.colors?(v=()=>{p(t.colors??{}),f(!0)},e[2]=t.colors,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(ot);m({colors:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.colors?(a=t.colors&&Object.values(t.colors).some(nt),e[7]=t.colors,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.colors||e[11]!==l||e[12]!==o||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:Ce.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:l[i]??"#000000",onChange:_=>p({...l,[i]:_.target.value}),className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:y})]},i)})}):x?n.jsx("div",{className:"flex flex-wrap gap-4",children:Ce.filter(r=>{const{key:i}=r;return t.colors?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx("div",{className:"h-14 w-14 rounded-full shadow-sm",style:{backgroundColor:t.colors[i],border:t.colors[i]==="#FFFFFF"?"1px solid #e5e7eb":void 0}}),n.jsx("p",{className:"font-mono text-[10px] text-muted-foreground",children:t.colors[i]}),n.jsx("p",{className:"text-[10px] text-muted-foreground",children:y})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No colors defined. Click edit to add your brand palette."}),e[10]=t.colors,e[11]=l,e[12]=o,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Colors",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function nt(s){return s?.trim()}function ot(s){return s?.trim()}function at(s){const e=q.c(123),{brand:t,client:m,onChanged:o}=s,[f,u]=C.useState(t.isDefault??!1),[l,p]=C.useState(!1);let v;e[0]!==t.colors||e[1]!==t.domain||e[2]!==t.favicon||e[3]!==t.fonts||e[4]!==t.id||e[5]!==t.images||e[6]!==t.logo||e[7]!==t.name||e[8]!==t.ogImage||e[9]!==t.overview||e[10]!==m?(v=async N=>{const be={id:t.id,name:N.name??t.name??"",domain:N.domain??t.domain??"",overview:N.overview??t.overview??"",logo:"logo"in N?N.logo:t.logo,favicon:"favicon"in N?N.favicon:t.favicon,ogImage:"ogImage"in N?N.ogImage:t.ogImage,fonts:"fonts"in N?N.fonts:t.fonts,colors:"colors"in N?N.colors:t.colors,images:"images"in N?N.images:t.images};await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:be})},e[0]=t.colors,e[1]=t.domain,e[2]=t.favicon,e[3]=t.fonts,e[4]=t.id,e[5]=t.images,e[6]=t.logo,e[7]=t.name,e[8]=t.ogImage,e[9]=t.overview,e[10]=m,e[11]=v):v=e[11];let c;e[12]!==t.id||e[13]!==o?(c=(N,be)=>{Y("brand_updated",{brand_id:t.id,fields:Object.keys(be)}),o(),K.success("Brand context saved")},e[12]=t.id,e[13]=o,e[14]=c):c=e[14];let h;e[15]!==v||e[16]!==c?(h={mutationFn:v,onSuccess:c,onError:ut},e[15]=v,e[16]=c,e[17]=h):h=e[17];const{mutate:d}=ce(h);let a;e[18]!==t.id||e[19]!==m?(a=async()=>{await m.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:t.id}})},e[18]=t.id,e[19]=m,e[20]=a):a=e[20];let x;e[21]!==t.id||e[22]!==o?(x=()=>{Y("brand_deleted",{brand_id:t.id}),p(!1),o(),K.success("Brand deleted")},e[21]=t.id,e[22]=o,e[23]=x):x=e[23];let j;e[24]!==a||e[25]!==x?(j={mutationFn:a,onSuccess:x,onError:ft},e[24]=a,e[25]=x,e[26]=j):j=e[26];const{mutate:b,isPending:g}=ce(j);let r;e[27]!==t.id||e[28]!==t.isDefault||e[29]!==m?(r=async()=>{await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,isDefault:!t.isDefault}})},e[27]=t.id,e[28]=t.isDefault,e[29]=m,e[30]=r):r=e[30];let i;e[31]!==t.id||e[32]!==t.isDefault||e[33]!==o?(i=()=>{Y(t.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:t.id}),o(),K.success(t.isDefault?"Removed as default brand":"Set as default brand")},e[31]=t.id,e[32]=t.isDefault,e[33]=o,e[34]=i):i=e[34];let y;e[35]!==r||e[36]!==i?(y={mutationFn:r,onSuccess:i,onError:mt},e[35]=r,e[36]=i,e[37]=y):y=e[37];const{mutate:_}=ce(y),H=t.isDefault?"border-primary/30":"border-border/60";let F;e[38]!==H?(F=xe("rounded-2xl border bg-background",H),e[38]=H,e[39]=F):F=e[39];let P;e[40]!==f?(P=()=>u(!f),e[40]=f,e[41]=P):P=e[41];let R;e[42]!==f?(R=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:f?n.jsx(Be,{size:14}):n.jsx(Te,{size:14})}),e[42]=f,e[43]=R):R=e[43];let $;e[44]!==t.logo||e[45]!==t.name?($=t.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:t.logo,alt:"",className:"h-full w-full object-contain p-1",onError:dt})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t.name?.charAt(0)?.toUpperCase()||"?"})}),e[44]=t.logo,e[45]=t.name,e[46]=$):$=e[46];const ie=t.name||"Untitled Brand";let B;e[47]!==ie?(B=n.jsx("span",{className:"text-sm font-medium text-foreground",children:ie}),e[47]=ie,e[48]=B):B=e[48];let w;e[49]!==t.domain?(w=t.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.domain}),e[49]=t.domain,e[50]=w):w=e[50];let O;e[51]!==B||e[52]!==w?(O=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[B,w]}),e[51]=B,e[52]=w,e[53]=O):O=e[53];let S;e[54]!==t.colors||e[55]!==f?(S=!f&&t.colors&&Object.values(t.colors).some(ct)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(t.colors).filter(it).map(rt)}),e[54]=t.colors,e[55]=f,e[56]=S):S=e[56];let E;e[57]!==t.fonts||e[58]!==f?(E=!f&&t.fonts&&Object.values(t.fonts).some(lt)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(t.fonts).filter(Boolean).join(", ")}),e[57]=t.fonts,e[58]=f,e[59]=E):E=e[59];const Q=t.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let G;e[60]!==Q?(G=xe("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",Q),e[60]=Q,e[61]=G):G=e[61];let T,z;e[62]!==_?(T=N=>{N.stopPropagation(),_()},z=N=>{N.key==="Enter"&&(N.stopPropagation(),_())},e[62]=_,e[63]=T,e[64]=z):(T=e[63],z=e[64]);const L=t.isDefault?"Unset as default":"Set as default",U=t.isDefault?"text-primary fill-primary":"text-muted-foreground";let D;e[65]!==U?(D=xe(U),e[65]=U,e[66]=D):D=e[66];let A;e[67]!==D?(A=n.jsx(Fe,{size:13,className:D}),e[67]=D,e[68]=A):A=e[68];let I;e[69]!==G||e[70]!==T||e[71]!==z||e[72]!==L||e[73]!==A?(I=n.jsx("span",{role:"button",tabIndex:0,className:G,onClick:T,onKeyDown:z,title:L,children:A}),e[69]=G,e[70]=T,e[71]=z,e[72]=L,e[73]=A,e[74]=I):I=e[74];let k,X;e[75]===Symbol.for("react.memo_cache_sentinel")?(k=N=>{N.stopPropagation(),p(!0)},X=N=>{N.key==="Enter"&&(N.stopPropagation(),p(!0))},e[75]=k,e[76]=X):(k=e[75],X=e[76]);let de;e[77]===Symbol.for("react.memo_cache_sentinel")?(de=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:k,onKeyDown:X,title:"Delete brand",children:n.jsx($e,{size:13,className:"text-muted-foreground"})}),e[77]=de):de=e[77];let J;e[78]!==P||e[79]!==R||e[80]!==$||e[81]!==O||e[82]!==S||e[83]!==E||e[84]!==I?(J=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:P,children:[R,$,O,S,E,I,de]}),e[78]=P,e[79]=R,e[80]=$,e[81]=O,e[82]=S,e[83]=E,e[84]=I,e[85]=J):J=e[85];let V;e[86]!==t||e[87]!==f||e[88]!==d?(V=f&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(Ve,{brand:t,onSave:d}),n.jsx(We,{brand:t,onSave:d}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(st,{brand:t,onSave:d}),n.jsx(Ze,{brand:t,onSave:d})]})]}),e[86]=t,e[87]=f,e[88]=d,e[89]=V):V=e[89];let W;e[90]!==g?(W=N=>{!N&&!g&&p(!1)},e[90]=g,e[91]=W):W=e[91];let me;e[92]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Ue,{children:"Delete brand?"}),e[92]=me):me=e[92];const pe=t.name||"this brand";let Z;e[93]!==pe?(Z=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:pe}),". This action cannot be undone."]}),e[93]=pe,e[94]=Z):Z=e[94];let ee;e[95]!==t.isDefault?(ee=t.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsx("span",{className:"font-medium",children:"Heads up:"})," this is your organization's default brand. Deleting it will leave your organization without a default brand until you set another."]}),e[95]=t.isDefault,e[96]=ee):ee=e[96];let te;e[97]!==Z||e[98]!==ee?(te=n.jsxs(Ke,{children:[me,n.jsx(Xe,{asChild:!0,children:n.jsxs("div",{children:[Z,ee]})})]}),e[97]=Z,e[98]=ee,e[99]=te):te=e[99];let se;e[100]!==g?(se=n.jsx(qe,{disabled:g,children:"Cancel"}),e[100]=g,e[101]=se):se=e[101];let ne;e[102]!==b?(ne=N=>{N.preventDefault(),b()},e[102]=b,e[103]=ne):ne=e[103];const he=g?"Deleting...":"Delete";let oe;e[104]!==g||e[105]!==ne||e[106]!==he?(oe=n.jsx(Ge,{onClick:ne,disabled:g,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:he}),e[104]=g,e[105]=ne,e[106]=he,e[107]=oe):oe=e[107];let ae;e[108]!==se||e[109]!==oe?(ae=n.jsxs(Me,{children:[se,oe]}),e[108]=se,e[109]=oe,e[110]=ae):ae=e[110];let le;e[111]!==te||e[112]!==ae?(le=n.jsxs(He,{children:[te,ae]}),e[111]=te,e[112]=ae,e[113]=le):le=e[113];let re;e[114]!==l||e[115]!==W||e[116]!==le?(re=n.jsx(Qe,{open:l,onOpenChange:W,children:le}),e[114]=l,e[115]=W,e[116]=le,e[117]=re):re=e[117];let fe;return e[118]!==F||e[119]!==J||e[120]!==V||e[121]!==re?(fe=n.jsxs("div",{className:F,children:[J,V,re]}),e[118]=F,e[119]=J,e[120]=V,e[121]=re,e[122]=fe):fe=e[122],fe}function lt(s){return s}function rt(s){const[e,t]=s;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:t},title:`${e}: ${t}`},e)}function it(s){const[,e]=s;return e}function ct(s){return s}function dt(s){s.target.style.display="none"}function mt(){return K.error("Failed to update default brand")}function ft(){return K.error("Failed to delete brand")}function ut(){return K.error("Failed to save brand context")}function xt(){const s=q.c(57),{brandExtractEnabled:e}=ke(),{org:t}=we();let m;s[0]!==t.id||s[1]!==t.slug?(m={connectionId:De,orgId:t.id,orgSlug:t.slug},s[0]=t.id,s[1]=t.slug,s[2]=m):m=s[2];const o=Ae(m),f=Se();let u;s[3]!==t.id?(u=je.brandContext(t.id),s[3]=t.id,s[4]=u):u=s[4];let l;s[5]!==o?(l=async()=>{const k=await o.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!1}}),X=Ne(k);return Array.isArray(X?.items)?X.items:[]},s[5]=o,s[6]=l):l=s[6];let p;s[7]!==u||s[8]!==l?(p={queryKey:u,queryFn:l},s[7]=u,s[8]=l,s[9]=p):p=s[9];const{data:v}=Ee(p),h=(v===void 0?[]:v).filter(ht);let d;s[10]!==t.id||s[11]!==f?(d=()=>f.invalidateQueries({queryKey:je.brandContext(t.id),refetchType:"all"}),s[10]=t.id,s[11]=f,s[12]=d):d=s[12];const a=d;let x;s[13]!==o?(x=async()=>{await o.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},s[13]=o,s[14]=x):x=s[14];let j;s[15]!==a?(j=()=>{Y("brand_created"),a(),K.success("Brand created")},s[15]=a,s[16]=j):j=s[16];let b;s[17]!==x||s[18]!==j?(b={mutationFn:x,onSuccess:j,onError:pt},s[17]=x,s[18]=j,s[19]=b):b=s[19];const{mutate:g,isPending:r}=ce(b);let i;s[20]!==o?(i=async k=>{Y("brand_extract_started",{domain:k});const X=await o.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:k}});Ne(X)},s[20]=o,s[21]=i):i=s[21];let y;s[22]!==a?(y=()=>{Y("brand_extract_succeeded"),a(),K.success("Brand extracted successfully")},s[22]=a,s[23]=y):y=s[23];let _;s[24]!==y||s[25]!==i?(_={mutationFn:i,onSuccess:y,onError:gt},s[24]=y,s[25]=i,s[26]=_):_=s[26];const{mutate:H,isPending:F}=ce(_),P=ue,R=ue,$=ue,ie="flex flex-col gap-6";let B;s[27]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{children:[n.jsx(ue.Title,{children:"Brand Context"}),n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),s[27]=B):B=s[27];let w;s[28]!==g?(w=()=>g(),s[28]=g,s[29]=w):w=s[29];let O;s[30]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(ye,{size:14}),s[30]=O):O=s[30];let S;s[31]!==r||s[32]!==w?(S=n.jsxs("div",{className:"flex items-center justify-between",children:[B,n.jsxs(ve,{variant:"outline",onClick:w,disabled:r,children:[O,"Add Brand"]})]}),s[31]=r,s[32]=w,s[33]=S):S=s[33];let E;s[34]!==e||s[35]!==H||s[36]!==F?(E=e&&n.jsx(Je,{onExtract:k=>H(k),isExtracting:F}),s[34]=e,s[35]=H,s[36]=F,s[37]=E):E=s[37];const Q=h.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),n.jsxs(ve,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>g(),disabled:r,children:[n.jsx(ye,{size:14}),"Add your first brand"]})]}),G="group space-y-3";let T;s[38]!==o||s[39]!==a?(T=k=>n.jsx(at,{brand:k,client:o,onChanged:a},k.id),s[38]=o,s[39]=a,s[40]=T):T=s[40];const z=h.map(T);let L;s[41]!==z?(L=n.jsx("div",{className:G,children:z}),s[41]=z,s[42]=L):L=s[42];let U;s[43]!==S||s[44]!==E||s[45]!==Q||s[46]!==L?(U=n.jsxs("div",{className:ie,children:[S,E,Q,L]}),s[43]=S,s[44]=E,s[45]=Q,s[46]=L,s[47]=U):U=s[47];let D;s[48]!==$.Body||s[49]!==U?(D=n.jsx($.Body,{children:U}),s[48]=$.Body,s[49]=U,s[50]=D):D=s[50];let A;s[51]!==R.Content||s[52]!==D?(A=n.jsx(R.Content,{children:D}),s[51]=R.Content,s[52]=D,s[53]=A):A=s[53];let I;return s[54]!==P||s[55]!==A?(I=n.jsx(P,{children:A}),s[54]=P,s[55]=A,s[56]=I):I=s[56],I}function gt(s){Y("brand_extract_failed",{error:s instanceof Error?s.message:"unknown"}),K.error(s instanceof Error?s.message:"Failed to extract brand")}function pt(){return K.error("Failed to create brand")}function ht(s){return!s.archivedAt}function It(){const s=q.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(xt,{}),s[0]=e):e=s[0],e}export{It as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l,c as n,j as c}from"./index-
|
|
1
|
+
import{e as l,c as n,j as c}from"./index-Cqw0FyHL.js";function i(a){const e=l.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bN as or,bO as ir,bl as q,J as m,bP as dt,bQ as ca,bR as lr,bS as cr,I as ur,a_ as V,aI as Ye,aK as Xe,H as D,a$ as E,aJ as pe,bT as dr,bU as $,ap as pr,bb as fr,r as T,R as X,e as et,a1 as ua,o as mt,s as ne,K as ve,x as Ie,Q as le,f as mr,d as da,g as hr,w as gr,b as pa,j as De,t as vr,P as yr,bV as br}from"./index-
|
|
1
|
+
import{bN as or,bO as ir,bl as q,J as m,bP as dt,bQ as ca,bR as lr,bS as cr,I as ur,a_ as V,aI as Ye,aK as Xe,H as D,a$ as E,aJ as pe,bT as dr,bU as $,ap as pr,bb as fr,r as T,R as X,e as et,a1 as ua,o as mt,s as ne,K as ve,x as Ie,Q as le,f as mr,d as da,g as hr,w as gr,b as pa,j as De,t as vr,P as yr,bV as br}from"./index-Cqw0FyHL.js";import{E as Ir,g as Er,S as kt,u as Ot}from"./constants-8SUUmfde.js";import{u as fa}from"./use-virtual-mcp-Bb04Uah7.js";import{u as ma,a as he}from"./use-ai-providers-Cah1GZeX.js";import{u as ha}from"./use-decopilot-events-Drlt36bF.js";import{u as Sr}from"./use-tasks-DEh_VRON.js";import{b as _r,c as Tr}from"./use-collections-DrmuHy93.js";import{e as ga}from"./use-organization-settings-EfxM66aZ.js";var He;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function a(s){throw new Error}e.assertNever=a,e.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},e.getValidEnumValues=s=>{const n=e.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(n){return s[n]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},e.find=(s,n)=>{for(const i of s)if(n(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}e.joinValues=r,e.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(He||(He={}));var Bt;(function(e){e.mergeShapes=(t,a)=>({...t,...a})})(Bt||(Bt={}));He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);He.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class pt extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=t}format(t){const a=t||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,u=0;for(;u<i.path.length;){const l=i.path[u];u===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(a(i))):o[l]=o[l]||{_errors:[]},o=o[l],u++}}};return s(this),r}static assert(t){if(!(t instanceof pt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}pt.create=e=>new pt(e);var qt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(qt||(qt={}));var w;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(w||(w={}));const Mr={anthropic:["claude-sonnet-4-6","claude-sonnet","claude"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet","anthropic/claude"],deco:["anthropic/claude-haiku-4-5","anthropic/claude-haiku","anthropic/claude"],google:["gemini-3-flash"],"claude-code":["claude-code:sonnet","claude-code:opus","claude-code:haiku"]},wr={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"]},Cr={anthropic:["claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-opus-4.7","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"]},Ar={anthropic:["claude-opus-4-7","claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6:extended","anthropic/claude-sonnet-4.6","google/gemini-3-pro"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet"],google:["gemini-3-pro"],"claude-code":["claude-code:opus","claude-code:sonnet"]},Rr={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],google:["gemini-2.0-flash-image"]},xr={openrouter:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"],deco:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"]};function qe(e,t,a,r){for(const s of a){const n=e.find(i=>i.modelId===s);if(n)return{keyId:t,modelId:n.modelId,title:n.title}}for(const s of a){const n=e.find(i=>i.modelId.includes(s));if(n)return{keyId:t,modelId:n.modelId,title:n.title}}if(r){const s=e.find(r);if(s)return{keyId:t,modelId:s.modelId,title:s.title}}return null}function Qn(e,t){const a={chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};for(const r of e){const s=t[r.id]??[],n=r.providerId;a.chat.fast||(a.chat.fast=qe(s,r.id,wr[n]??[])),a.chat.smart||(a.chat.smart=qe(s,r.id,Cr[n]??[])),a.chat.thinking||(a.chat.thinking=qe(s,r.id,Ar[n]??[])),a.image||(a.image=qe(s,r.id,Rr[n]??[],i=>i.capabilities?.includes("image")===!0)),a.webResearch||(a.webResearch=qe(s,r.id,xr[n]??[],i=>{const o=i.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return o.includes("sonar")||o.includes("deepresearch")}))}return a}function va(e,t,a){if(e.length===0)return null;const r=Mr[t]??[],s=n=>a!==void 0?{...n,keyId:a}:n;for(const n of r){const i=e.find(o=>o.modelId===n);if(i)return s(i)}for(const n of r){const i=e.find(o=>o.modelId.includes(n));if(i)return s(i)}return s(e[0])}function kr(e,t){const{mimeType:a,data:r}=e;if(a.startsWith("text/"))try{const s=new TextDecoder().decode(Uint8Array.from(atob(r),n=>n.charCodeAt(0)));return[{type:"text",text:`${t}
|
|
2
2
|
${s}`}]}catch(s){console.error("Failed to decode text file:",s)}return[{type:"file",url:`data:${a};base64,${r}`,filename:t,mediaType:a}]}function Jt(e,t){const a=[];for(const r of e)"text"in r&&r.text?a.push({type:"text",text:`[${t}]
|
|
3
3
|
${r.text}`}):"blob"in r&&r.blob&&r.mimeType&&a.push({type:"file",url:`data:${r.mimeType};base64,${r.blob}`,filename:String(r.uri),mediaType:String(r.mimeType)});return a}function Or(e,t){const a=[];for(const r of e){if(r.role!=="user"||!r.content)continue;const s=Array.isArray(r.content)?r.content:[r.content];for(const n of s)switch(n.type){case"text":{const i=n.text?.trim();if(!i)continue;a.push({type:"text",text:`[${t}]
|
|
4
4
|
${i}`});break}case"image":case"audio":{if(!n.data||!n.mimeType)continue;a.push({type:"file",url:`data:${n.mimeType};base64,${n.data}`,mediaType:n.mimeType});break}case"resource":{const i=n.resource;if(!i||!i.mimeType)continue;i&&("text"in i&&i.text?a.push({type:"text",text:`[${t}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,c as d,j as c,b3 as l,b4 as b}from"./index-
|
|
1
|
+
import{e as n,c as d,j as c,b3 as l,b4 as b}from"./index-Cqw0FyHL.js";import{i as m}from"./ChevronDown-BMpzZvgp.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|