decocms 4.82.17 → 4.82.19
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-Bz2zndXS.js → AlertCircle-fklrqSW5.js} +1 -1
- package/dist/client/assets/{AreaChart-Bh2sEvol.js → AreaChart-BdmhsxSM.js} +1 -1
- package/dist/client/assets/{ArrowUp-BeAxaUHK.js → ArrowUp-Bdy-0gyO.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Db8gKgEF.js → ArrowUpRight-D6zDsrnH.js} +1 -1
- package/dist/client/assets/{CheckCircle-CpzE9xF2.js → CheckCircle-BYkf45lM.js} +1 -1
- package/dist/client/assets/{ChevronDown-t_XNbOwb.js → ChevronDown-sgVULpdb.js} +1 -1
- package/dist/client/assets/{ChevronRight-3J9HDAHg.js → ChevronRight-BUKoQxxN.js} +1 -1
- package/dist/client/assets/{ChevronUp-e8x5mNTq.js → ChevronUp-mvRqss9i.js} +1 -1
- package/dist/client/assets/{Copy01-BJat5cCG.js → Copy01-DLSxZiKr.js} +1 -1
- package/dist/client/assets/{DotsVertical-CMR7g3Ah.js → DotsVertical-DitrZ6w4.js} +1 -1
- package/dist/client/assets/{Eye-DX_xtjuc.js → Eye-DR1QNYLF.js} +1 -1
- package/dist/client/assets/{FilterLines-m08bBhlE.js → FilterLines-Y38x0Q7Z.js} +1 -1
- package/dist/client/assets/{Globe01-BySvBFXs.js → Globe01-CnltMSDk.js} +1 -1
- package/dist/client/assets/{Globe04-CV67dCSs.js → Globe04-X5sxJeUb.js} +1 -1
- package/dist/client/assets/{HardDrive-CUYnwpH6.js → HardDrive-Nu1jIe4l.js} +1 -1
- package/dist/client/assets/{Image01-XANUmMeD.js → Image01-CSEqtjAN.js} +1 -1
- package/dist/client/assets/{Key01-DWIt4dYC.js → Key01-Dh4DUQLF.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CbXOScFm.js → LayoutLeft-Dt7rJY-r.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D672Gt8s.js → LinkExternal01-CKHslpvH.js} +1 -1
- package/dist/client/assets/{Monitor01-BsBj0k65.js → Monitor01-r0C7odur.js} +1 -1
- package/dist/client/assets/{Package-Bd5JF6EV.js → Package-3dsm96jG.js} +1 -1
- package/dist/client/assets/{Palette-B9lSk8yO.js → Palette-DAx6eGU_.js} +1 -1
- package/dist/client/assets/{Play-DyVQsCHP.js → Play-CJE2nK0g.js} +1 -1
- package/dist/client/assets/{Plus-DMcDeR2O.js → Plus-BwYAFd19.js} +1 -1
- package/dist/client/assets/{SearchLg-B7817XX1.js → SearchLg-Ci76gxPe.js} +1 -1
- package/dist/client/assets/{SearchMd-Bo4tLLeM.js → SearchMd-C4E_z5AK.js} +1 -1
- package/dist/client/assets/{Settings02-Ca37o3A2.js → Settings02-D2iJ0Y_1.js} +1 -1
- package/dist/client/assets/{Shield01-DMt6TrSr.js → Shield01-D52f0rB7.js} +1 -1
- package/dist/client/assets/{Star01-CIYOR1vs.js → Star01-nXpwaO4U.js} +1 -1
- package/dist/client/assets/{Stars01-CG56JuQE.js → Stars01-DZkGi0yh.js} +1 -1
- package/dist/client/assets/{Stars02-D9rir8SW.js → Stars02-B6BvIKTN.js} +1 -1
- package/dist/client/assets/{Sun-BXPlxnTN.js → Sun-DECbKLB_.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B6k_yO3w.js → SwitchHorizontal01-D4cMfdK_.js} +1 -1
- package/dist/client/assets/{Tool01-BGH-2Xj3.js → Tool01-CcxbpsdM.js} +1 -1
- package/dist/client/assets/{Tool02-D_XI4uyz.js → Tool02-O3edpLSO.js} +1 -1
- package/dist/client/assets/{Trash01-XMTBr_uz.js → Trash01-Cwer5u_n.js} +1 -1
- package/dist/client/assets/{TrendUp01-DJq_IppP.js → TrendUp01-dtZF5xAg.js} +1 -1
- package/dist/client/assets/{Upload01-CHh2wJR7.js → Upload01-C1yFspcl.js} +1 -1
- package/dist/client/assets/{User01-DBVBt52_.js → User01-DFGTsbFQ.js} +1 -1
- package/dist/client/assets/{Users01-Bk9WolY8.js → Users01-oR_WIF7g.js} +1 -1
- package/dist/client/assets/{Users03-BH3k-qPm.js → Users03-BK-DRA0O.js} +1 -1
- package/dist/client/assets/{X-CYxmCsVb.js → X-JhcLrxaK.js} +1 -1
- package/dist/client/assets/{XCircle-XGtkRPkY.js → XCircle-Do7Zx-eD.js} +1 -1
- package/dist/client/assets/{XClose-BiO5t7KG.js → XClose-C9Ve9LT-.js} +1 -1
- package/dist/client/assets/{Zap-BItWoBiV.js → Zap-BsJbp079.js} +1 -1
- package/dist/client/assets/{ZapSquare-C65VFkyz.js → ZapSquare-DVSX_PUJ.js} +1 -1
- package/dist/client/assets/{ZoomOut-CNfLP3ZT.js → ZoomOut-DAawwf0t.js} +1 -1
- package/dist/client/assets/{access-gate-D8AkDI9w.js → access-gate-B2PcKpQi.js} +1 -1
- package/dist/client/assets/{add-section-modal-BA9bdRZn.js → add-section-modal-39yDT-Ju.js} +1 -1
- package/dist/client/assets/{agent-icon-BG65vjC8.js → agent-icon-CGx0_9l5.js} +1 -1
- package/dist/client/assets/{agents-list-DmaXiCvz.js → agents-list-BD9p7x4W.js} +1 -1
- package/dist/client/assets/{ai-providers-ah0Vbkmn.js → ai-providers-C9hcbmzR.js} +1 -1
- package/dist/client/assets/{alert-CmbIgDhg.js → alert-DtoAKyyA.js} +1 -1
- package/dist/client/assets/{alert-dialog-CZX7syvY.js → alert-dialog-CFnkTG10.js} +1 -1
- package/dist/client/assets/{app-editor-CrIzHhTE.js → app-editor-NqGdO2ex.js} +1 -1
- package/dist/client/assets/{auth-D6D3es2R.js → auth-CKKxsAQR.js} +1 -1
- package/dist/client/assets/{auth-catchall-DxehAvPG.js → auth-catchall-xiyz_7s2.js} +1 -1
- package/dist/client/assets/{auth-entry-BbPcYGO-.js → auth-entry-DXpniWYo.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DcCKsn1T.js → auth-split-layout-022_L0k-.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DASnIb8B.js → authenticate-and-persist-oauth-BL10FIRd.js} +1 -1
- package/dist/client/assets/{automation-list-row-DwyQUnUg.js → automation-list-row-DTtDcco-.js} +1 -1
- package/dist/client/assets/{automation-runs-Bg2SX1VM.js → automation-runs-BGZr5t8h.js} +1 -1
- package/dist/client/assets/{automations-aq9UGaEN.js → automations-BVcJCw_j.js} +1 -1
- package/dist/client/assets/{autosend-BwiG0dID.js → autosend-Bm2lFqoD.js} +1 -1
- package/dist/client/assets/{avatar-Cx73PRDY.js → avatar-BlYuWW7J.js} +1 -1
- package/dist/client/assets/{badge-szpfykQA.js → badge-BsoTUFnu.js} +1 -1
- package/dist/client/assets/{block-document-CAtI-7KK.js → block-document--9kID5te.js} +1 -1
- package/dist/client/assets/{brand-context-zyfSccR8.js → brand-context-DPc68RhH.js} +1 -1
- package/dist/client/assets/{buckets-DqvT4FWp.js → buckets-C8gEZDbc.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-nsnqW7dg.js → bulk-category-panel-Cy58NtQW.js} +1 -1
- package/dist/client/assets/{calendar--6aewHah.js → calendar-Do7G6Kxp.js} +1 -1
- package/dist/client/assets/{capability-load-error-D5z5Z8kb.js → capability-load-error-DT5FhHrY.js} +1 -1
- package/dist/client/assets/{card-Cnb54DGG.js → card-dggHqb7D.js} +1 -1
- package/dist/client/assets/{category-editor-C3Wugp_q.js → category-editor-oiOftp_V.js} +1 -1
- package/dist/client/assets/{chat-context-WBYedIHo.js → chat-context-CEf5YFvv.js} +1 -1
- package/dist/client/assets/{checkbox-qt_B7Pvm.js → checkbox-CvJb_88Z.js} +1 -1
- package/dist/client/assets/{cli-auth-success-6VPO1L1h.js → cli-auth-success-bEJ734L7.js} +1 -1
- package/dist/client/assets/{collection-detail-uzeNBMre.js → collection-detail-BSIJs2wo.js} +1 -1
- package/dist/client/assets/{collection-display-button-Cu13O3ah.js → collection-display-button-Dha8xlYb.js} +1 -1
- package/dist/client/assets/{collection-search-DtLwJHf4.js → collection-search-BisIJu80.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DIngdX23.js → collection-table-wrapper-CmbjrcGr.js} +1 -1
- package/dist/client/assets/{collection-tabs-DtG4hBSZ.js → collection-tabs-DFm981Kf.js} +1 -1
- package/dist/client/assets/{command-nziav2Ng.js → command-DsH5vUBI.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CONaWIoZ.js → commerce-onboarding-CYTa6cE_.js} +1 -1
- package/dist/client/assets/{companions-core-4T9jKkOC.js → companions-core-DqYVV5IY.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-8sCPLmUb.js → connect-desktop-dialog-BR3Yayc6.js} +1 -1
- package/dist/client/assets/{connection-card-DMB8fnmj.js → connection-card-C-QD5wMH.js} +1 -1
- package/dist/client/assets/{connection-detail-CmvEH-L5.js → connection-detail-DE_GZwV4.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DNM9mF9_.js → connection-form-helpers-DaqwWAk0.js} +1 -1
- package/dist/client/assets/{connections-B4NgY2n1.js → connections-D8jVtSMf.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DLouFoa6.js → decopilot-sse-pool-v3bamRu-.js} +1 -1
- package/dist/client/assets/{dialog-Bd1FKfN6.js → dialog-Dy1IRNfn.js} +1 -1
- package/dist/client/assets/{domain-settings-BOMTPEFN.js → domain-settings-DzzFgUkc.js} +1 -1
- package/dist/client/assets/{drawer-aybTXPc5.js → drawer-C_exNDXZ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BVpPlYfk.js → dropdown-menu-DnbYxaX3.js} +1 -1
- package/dist/client/assets/{empty-state-Cu9VrJ9Y.js → empty-state-CiSz3At1.js} +1 -1
- package/dist/client/assets/{extract-connection-data-ByQ2K2I0.js → extract-connection-data-DQK5y-ef.js} +1 -1
- package/dist/client/assets/{file-explorer-BwT6db3N.js → file-explorer-DOtLKUBk.js} +1 -1
- package/dist/client/assets/{file-type-icon-Bw4EZh9a.js → file-type-icon-C4zp7G8m.js} +1 -1
- package/dist/client/assets/{files-DLshle3i.js → files-IDnCaOPZ.js} +1 -1
- package/dist/client/assets/{form-C_Pbz22I.js → form-BuzHPVCM.js} +1 -1
- package/dist/client/assets/{general-Ga3efrpa.js → general-DFcWTX46.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CZ1uQXES.js → github-repo-picker-xBH3tHfN.js} +1 -1
- package/dist/client/assets/{hooks-etqn0Ixl.js → hooks-y59N0gpi.js} +1 -1
- package/dist/client/assets/{index-DRh4tS0p.js → index-3D1LNWvP.js} +1 -1
- package/dist/client/assets/{index-v0PU7Htw.js → index-B5G64KtU.js} +1 -1
- package/dist/client/assets/{index-B8XdkrzC.js → index-BLjhZzKI.js} +1 -1
- package/dist/client/assets/{index-DoMrQAXz.js → index-BQGOFLqt.js} +1 -1
- package/dist/client/assets/{index-CvsL_t-d.js → index-B_7Q0rH0.js} +1 -1
- package/dist/client/assets/{index-y9jRgCvR.js → index-BiYdGYPy.js} +1 -1
- package/dist/client/assets/index-BmGHTOVY.css +1 -0
- package/dist/client/assets/{index-D-Yuo0qX.js → index-BoBOH_Zc.js} +1 -1
- package/dist/client/assets/{index-DhEJhnws.js → index-DD4eXCXL.js} +2 -2
- package/dist/client/assets/{index-C09PtuK2.js → index-DPfxLsOi.js} +1 -1
- package/dist/client/assets/{index-DReyQJhS.js → index-DZ3hzzf1.js} +3 -3
- package/dist/client/assets/{index-cR6IcMUd.js → index-DpRnZ26Z.js} +1 -1
- package/dist/client/assets/{index-vooJ8VyQ.js → index-Qi63FtON.js} +23 -23
- package/dist/client/assets/{index-C8_FQQXk.js → index-k49d95pH.js} +1 -1
- package/dist/client/assets/{index-redirect-DYEY-sXM.js → index-redirect-DooIQ2K8.js} +1 -1
- package/dist/client/assets/{index-BkRovU_K.js → index-thBdMRIF.js} +1 -1
- package/dist/client/assets/{input-Oi8mNJ4H.js → input-CK7GAn-2.js} +1 -1
- package/dist/client/assets/{integration-icon-9vS2m6fz.js → integration-icon-BRokQ8N8.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-Dbe7uX9W.js → invite-member-dialog-DpQoOb2-.js} +1 -1
- package/dist/client/assets/{label-3BIRhfQS.js → label-BlLucFOT.js} +1 -1
- package/dist/client/assets/{layout-CHtZa0cz.js → layout-AgvOy3-T.js} +1 -1
- package/dist/client/assets/{login-CNLcDgMN.js → login-DOG0kNP3.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CJJJRYoQ.js → mcp-oauth-DZFKw2wh.js} +1 -1
- package/dist/client/assets/{members-DuUTF9mp.js → members-B-s3djNS.js} +1 -1
- package/dist/client/assets/{monaco-editor-DdRiFFMo.js → monaco-editor-Dxhxh5om.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-66k2aJjs.js → monitoring-stats-row-D1k7iMId.js} +1 -1
- package/dist/client/assets/{multi-select-Cd1nohTw.js → multi-select-D_VdhvGn.js} +1 -1
- package/dist/client/assets/{oauth-callback-D6GjzZtN.js → oauth-callback-BQlC45vw.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-C2zhhaNa.js → oauth-callback-ai-provider-B9k6hxgd.js} +1 -1
- package/dist/client/assets/{onboarding-XT173DD5.js → onboarding-BlB6EXWa.js} +1 -1
- package/dist/client/assets/{org-install-CuiUotig.js → org-install-CB6tXQXx.js} +1 -1
- package/dist/client/assets/{org-layout-CpeG66JT.js → org-layout-D5haJNfI.js} +1 -1
- package/dist/client/assets/{organization-choice-CfhqdyPN.js → organization-choice-2KhHSbLO.js} +1 -1
- package/dist/client/assets/{orgs-Dwg7xuk0.js → orgs-5ZmCOdHD.js} +1 -1
- package/dist/client/assets/{page-seo-form-BcBvvkc3.js → page-seo-form-Y0TGppB0.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CYknmbBc.js +1 -0
- package/dist/client/assets/{popover-DQmcz-_k.js → popover-BIkriKI7.js} +1 -1
- package/dist/client/assets/{post-editor-BoORRYtN.js → post-editor-E69m4ehV.js} +1 -1
- package/dist/client/assets/{primitives-B-NmwMIq.js → primitives-DlQu8ea0.js} +1 -1
- package/dist/client/assets/{profile-CMfIHvhp.js → profile-D21Io7Ux.js} +1 -1
- package/dist/client/assets/project-app-view-Dk5loBX7.js +1 -0
- package/dist/client/assets/record-editor-LvNAa5Nv.js +1 -0
- package/dist/client/assets/redirect-editor-CxNel36Y.js +1 -0
- package/dist/client/assets/registry-DAAMT3Nm.js +2 -0
- package/dist/client/assets/{registry-layout-K8fiM90S.js → registry-layout-DIv4ITtZ.js} +1 -1
- package/dist/client/assets/{reports-1oZ2HC22.js → reports-CRhUJ2qK.js} +1 -1
- package/dist/client/assets/{require-capability-aAXLhcf2.js → require-capability-DlBK7Ljx.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DkGDhHee.js → required-auth-layout-CjAMzDiv.js} +1 -1
- package/dist/client/assets/{reset-password-BOSf4cNc.js → reset-password-5FQKQ0O7.js} +1 -1
- package/dist/client/assets/{roles-C-xkiSMN.js → roles-gGoHVKiQ.js} +1 -1
- package/dist/client/assets/{search-input-B5LKCJ0L.js → search-input-D20m0IjW.js} +1 -1
- package/dist/client/assets/{secrets-Ck8Qoi2S.js → secrets-WBkgPU-G.js} +1 -1
- package/dist/client/assets/{sections-editor-BnJG-Uhb.js → sections-editor-BcH1P-xX.js} +1 -1
- package/dist/client/assets/{select-BzZfdWv3.js → select-BesvP7cx.js} +1 -1
- package/dist/client/assets/{select-model-B1jlhIkz.js → select-model-1OjsUmRd.js} +1 -1
- package/dist/client/assets/{self-tool-result-CSORHoUr.js → self-tool-result-CByDOVQW.js} +1 -1
- package/dist/client/assets/{seo-editor-DalIlco-.js → seo-editor-CdDjsZRI.js} +1 -1
- package/dist/client/assets/{settings-layout-DgD7VLH0.js → settings-layout-BRYv6j8B.js} +1 -1
- package/dist/client/assets/{settings-section-BOOY0eCJ.js → settings-section-CDAkS7s3.js} +1 -1
- package/dist/client/assets/{shell-controls-DBMDTHs5.js → shell-controls-DAVZTycr.js} +1 -1
- package/dist/client/assets/{shell-layout-Br6vdxrg.js → shell-layout-G6cWtPZY.js} +1 -1
- package/dist/client/assets/{sidebar-BrAqFfnc.js → sidebar-Cc4XVWKB.js} +1 -1
- package/dist/client/assets/{skeleton-CS0JCKfd.js → skeleton-YVFIgHQg.js} +1 -1
- package/dist/client/assets/{sso-DkKI8IPQ.js → sso-D9JBA9_h.js} +1 -1
- package/dist/client/assets/{store-BcmKAgWb.js → store-B_VpcGv4.js} +1 -1
- package/dist/client/assets/store-registry-DHf-5XTX.js +2 -0
- package/dist/client/assets/{studio-tools-C6f4y9IK.js → studio-tools-B4JofgO_.js} +1 -1
- package/dist/client/assets/{switch-C9jojTq2.js → switch-BZYENsAO.js} +1 -1
- package/dist/client/assets/{table-BIGI-tUP.js → table-BpC3o1Ua.js} +1 -1
- package/dist/client/assets/{tabs-C_0PvMIk.js → tabs-DAIg04aD.js} +1 -1
- package/dist/client/assets/{textarea-BlK2Hga4.js → textarea-DtLXmNNW.js} +1 -1
- package/dist/client/assets/{toggle-group-DyJ7qfQ6.js → toggle-group-Djz-ljio.js} +1 -1
- package/dist/client/assets/{toolbar-BTJHjQF1.js → toolbar-DuuVbShQ.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BEXvjbx3.js → toolbar-icon-button-DBJ1Czuj.js} +1 -1
- package/dist/client/assets/{tooltip-ClC3Srlv.js → tooltip-BLkLB4r7.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DNbg3jrI.js → use-ai-providers-BRga8_lW.js} +1 -1
- package/dist/client/assets/{use-automations-DvU64F7k.js → use-automations-fFC4EQc3.js} +1 -1
- package/dist/client/assets/{use-autosave-BEyRMxGf.js → use-autosave-BWy5WyvE.js} +1 -1
- package/dist/client/assets/{use-capability-BbdZ1WjO.js → use-capability-BSDyr6zM.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DVUGpfb0.js → use-clock-tick-DJOVC-Ea.js} +1 -1
- package/dist/client/assets/{use-collections-BxtHfoeP.js → use-collections-CfZhiJR7.js} +1 -1
- package/dist/client/assets/{use-connection-Cyx4TvMl.js → use-connection-sIYGQRZw.js} +1 -1
- package/dist/client/assets/{use-copy-DcMU_Du_.js → use-copy-DK3qaoqd.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C8E9h1b9.js → use-create-virtual-mcp-DdEqi3Z6.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DDdftlaX.js → use-debounced-autosave-DejInOR3.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DvagKKSn.js → use-debounced-value-B2z6I7X3.js} +1 -1
- package/dist/client/assets/{use-deco-credits-RamYkgaJ.js → use-deco-credits-8-3yjWlK.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-fAwhMUMb.js → use-decopilot-events-D8o2yOzI.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Dm6r501l.js → use-delete-connection-DYh-HBji.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-kcLfIzG7.js → use-deployment-admin-CT7A_R9u.js} +1 -1
- package/dist/client/assets/{use-file-configs-BV4Ar985.js → use-file-configs-Cxw_imQw.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-EckIHF9T.js → use-infinite-scroll-BQFpclfv.js} +1 -1
- package/dist/client/assets/{use-join-requests-BHad-6XU.js → use-join-requests-O1rb1Ly4.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CXQO9Ltz.js → use-mcp-auth-status-Bm5xkgD0.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B_YEa7eA.js → use-mcp-client-BIXuHEwh.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-MdowFfav.js → use-mcp-tools-CNPoXDXJ.js} +1 -1
- package/dist/client/assets/{use-members-nV8g48J-.js → use-members-CLdfd0HT.js} +1 -1
- package/dist/client/assets/{use-mobile-BSChqs9U.js → use-mobile-C0TUGCBw.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-xH9S0idv.js → use-navigate-to-agent-CPivegDO.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DxfMwzfd.js → use-org-auth-client-D0LQ152W.js} +1 -1
- package/dist/client/assets/{use-org-sso-BzSsWjXz.js → use-org-sso-CjKp2EUT.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Brs7x6XS.js → use-organization-roles-CaN1N3mQ.js} +1 -1
- package/dist/client/assets/{use-organization-settings-ChkGiemD.js → use-organization-settings-C_QN8e5A.js} +1 -1
- package/dist/client/assets/{use-registry-app-DzlJZzVB.js → use-registry-app-J1vnPNS0.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CSyatTbv.js → use-registry-connections-701IXXum.js} +1 -1
- package/dist/client/assets/{use-secrets-DlFGhduv.js → use-secrets-BNrIMIKw.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CFU-ezpK.js → use-status-sounds-C9YypyXn.js} +1 -1
- package/dist/client/assets/{use-view-mode-C8UdeN-l.js → use-view-mode-BxC6fcT8.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B5a9eQML.js → use-virtual-mcp-BLx5NqtM.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D1UM76v9.js +1 -0
- package/dist/client/assets/{useRouterState-zkDOQuBN.js → useRouterState-TFX2py_c.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-8ID1agn2.js +1 -0
- package/dist/client/assets/{users-D46wu4fs.js → users-DEUTfPh7.js} +1 -1
- package/dist/client/assets/{variant-calendar-B02AQiT1.js → variant-calendar-B4ArzUYB.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BQup1fKG.js → view-mode-toggle-D1oVoYUo.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +9 -9
- package/dist/server/server.js +9 -9
- package/package.json +1 -1
- package/dist/client/assets/index-Dj5WILcq.css +0 -1
- package/dist/client/assets/page-seo-sheet-B8MMFvsN.js +0 -1
- package/dist/client/assets/project-app-view-0Yu3nmhD.js +0 -1
- package/dist/client/assets/record-editor-CskreDqw.js +0 -1
- package/dist/client/assets/redirect-editor-EgklGeVh.js +0 -1
- package/dist/client/assets/registry-B0utG_di.js +0 -2
- package/dist/client/assets/store-registry-BpA58AfG.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BAO_zzrG.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CO5w8H8J.js +0 -1
package/dist/client/assets/{automation-list-row-DwyQUnUg.js → automation-list-row-DTtDcco-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as E,r as F,l as $,j as t,B as K}from"./index-
|
|
1
|
+
import{c as E,r as F,l as $,j as t,B as K}from"./index-DZ3hzzf1.js";import{b as O,d as B,e as I,g as L,c as H,A as V,a as q,f as G}from"./alert-dialog-CFnkTG10.js";import{a as J,D as Q,c as U,d as W}from"./dropdown-menu-DnbYxaX3.js";import{s as X}from"./Stars02-B6BvIKTN.js";import{i as Y}from"./DotsVertical-DitrZ6w4.js";import{s as Z}from"./Trash01-Cwer5u_n.js";import{i as ee}from"./Zap-BsJbp079.js";import{a as te}from"./use-virtual-mcp-BLx5NqtM.js";import{A as se}from"./agent-icon-CGx0_9l5.js";import{u as ne}from"./use-automations-fFC4EQc3.js";function he(a){const e=E.c(53),{automation:s,showAgent:n,onClick:r}=a,{remove:i}=ne(),[P,S]=F.useState(!1),o=te(n?s.virtual_mcp_id:void 0);let D;e[0]!==s.id||e[1]!==i?(D=()=>{i.mutate(s.id),S(!1)},e[0]=s.id,e[1]=i,e[2]=D):D=e[2];const z=D;let A;e[3]!==r?(A=l=>{l.target===l.currentTarget&&(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),r())},e[3]=r,e[4]=A):A=e[4];const T=A,M=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let c;e[5]!==M?(c=$("inline-block size-2 rounded-full shrink-0",M),e[5]=M,e[6]=c):c=e[6];const R=s.active&&s.trigger_count>0?"Active":s.active?"No triggers configured":"Paused";let m;e[7]!==c||e[8]!==R?(m=t.jsx("span",{className:c,"aria-label":R}),e[7]=c,e[8]=R,e[9]=m):m=e[9];let u;e[10]!==o?.icon||e[11]!==o?.title||e[12]!==s.name||e[13]!==n?(u=n&&t.jsx(se,{icon:o?.icon??null,name:o?.title??s.name,size:"xs",className:"shrink-0"}),e[10]=o?.icon,e[11]=o?.title,e[12]=s.name,e[13]=n,e[14]=u):u=e[14];let d;e[15]!==s.name?(d=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[15]=s.name,e[16]=d):d=e[16];let g;e[17]!==o||e[18]!==n?(g=n&&o&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",o.title]}),e[17]=o,e[18]=n,e[19]=g):g=e[19];let f;e[20]!==d||e[21]!==g?(f=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d,g]}),e[20]=d,e[21]=g,e[22]=f):f=e[22];let x;e[23]!==s.nearest_next_run_at||e[24]!==s.trigger_count?(x=t.jsx(oe,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[23]=s.nearest_next_run_at,e[24]=s.trigger_count,e[25]=x):x=e[25];let p;e[26]!==f||e[27]!==x?(p=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[f,x]}),e[26]=f,e[27]=x,e[28]=p):p=e[28];let N;e[29]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(J,{asChild:!0,children:t.jsx(K,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(Y,{size:16})})}),e[29]=N):N=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{onClick:ie,onKeyDown:re,role:"presentation",className:"shrink-0",children:t.jsxs(Q,{children:[N,t.jsx(U,{align:"end",children:t.jsxs(W,{variant:"destructive",onClick:l=>{l.stopPropagation(),S(!0)},children:[t.jsx(Z,{size:16}),"Delete"]})})]})}),e[30]=y):y=e[30];let h;e[31]!==T||e[32]!==r||e[33]!==p||e[34]!==m||e[35]!==u?(h=t.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:T,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:[m,u,p,y]}),e[31]=T,e[32]=r,e[33]=p,e[34]=m,e[35]=u,e[36]=h):h=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(H,{children:"Delete automation?"}),e[37]=w):w=e[37];let j;e[38]!==s.name?(j=t.jsxs(O,{children:[w,t.jsxs(B,{children:["This removes"," ",t.jsx("span",{className:"font-medium text-foreground",children:s.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[38]=s.name,e[39]=j):j=e[39];let C;e[40]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(V,{children:"Cancel"}),e[40]=C):C=e[40];let _;e[41]!==z||e[42]!==i.isPending?(_=t.jsxs(I,{children:[C,t.jsx(L,{onClick:z,disabled:i.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[41]=z,e[42]=i.isPending,e[43]=_):_=e[43];let v;e[44]!==j||e[45]!==_?(v=t.jsxs(q,{children:[j,_]}),e[44]=j,e[45]=_,e[46]=v):v=e[46];let b;e[47]!==P||e[48]!==v?(b=t.jsx(G,{open:P,onOpenChange:S,children:v}),e[47]=P,e[48]=v,e[49]=b):b=e[49];let k;return e[50]!==h||e[51]!==b?(k=t.jsxs(t.Fragment,{children:[h,b]}),e[50]=h,e[51]=b,e[52]=k):k=e[52],k}function re(a){return a.stopPropagation()}function ie(a){return a.stopPropagation()}function oe(a){const e=E.c(4),{triggerCount:s,nextRunAt:n}=a;if(s===0){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=i):i=e[0],i}let r;return e[1]!==n||e[2]!==s?(r=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:n?t.jsxs(t.Fragment,{children:[t.jsx(X,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:["Next run ",new Date(n).toLocaleString()]})]}):t.jsxs(t.Fragment,{children:[t.jsx(ee,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:[s," trigger",s===1?"":"s"]})]})}),e[1]=n,e[2]=s,e[3]=r):r=e[3],r}export{he as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as _,c as P,J as Ni,j as a,B as tt,I as cr,H as Ci,M as _i,l as q,p as Ai,aR as Ii,aO as Ge,aV as Ei,aU as Ke,ba as Et,aS as it,bJ as zr,aQ as Fr,C as He,n as Li,d as Mi,K as ke,t as Yn,m as Lt,b as mt,E as Br,aL as Ur,bK as ks,aT as Ri,bL as Qe}from"./index-DReyQJhS.js";import{e as Pi}from"./select-BzZfdWv3.js";import{u as Wr}from"./useInfiniteQuery-BAO_zzrG.js";import{a as Kr,u as $i}from"./use-connection-Cyx4TvMl.js";import{c as Oi,u as Ss}from"./use-mcp-client-B_YEa7eA.js";import{u as Di}from"./use-virtual-mcp-B5a9eQML.js";import{b as Hi,i as zi,a as Fi,S as Bi}from"./constants-BHDe7bIw.js";import{C as Ui}from"./card-Cnb54DGG.js";import{o as Vr,m as Gr,p as js,q as ws}from"./sidebar-BrAqFfnc.js";import{c as qr,d as Xr,a as Tn,e as ye,b as Yr,T as ve}from"./table-BIGI-tUP.js";import{E as Qn}from"./empty-state-Cu9VrJ9Y.js";import{u as Ts}from"./use-infinite-scroll-EckIHF9T.js";import{u as Wi}from"./use-members-nV8g48J-.js";import{u as Qr,S as ct}from"./use-clock-tick-DVUGpfb0.js";import{e as Ki}from"./use-automations-DvU64F7k.js";import{u as Jr}from"./studio-tools-C6f4y9IK.js";import{u as Vi}from"./useSuspenseInfiniteQuery-CO5w8H8J.js";import{A as Zr}from"./avatar-Cx73PRDY.js";import{t as Wt}from"./ChevronDown-t_XNbOwb.js";import{i as Ns,n as Jn}from"./ChevronUp-e8x5mNTq.js";import{t as Gi,a as eo,n as Cs}from"./Tool02-D_XI4uyz.js";import{f as qi,aA as Xi,aB as Yi,Z as Qi,x as Ji,aC as Zi,a4 as ea,ak as ta,k as na,ay as to,aD as sa,aE as ra,A as no,aF as Le,aG as oa,n as ia}from"./agent-icon-BG65vjC8.js";import{t as Nn}from"./Stars01-CG56JuQE.js";import{i as so,b as Rt}from"./XCircle-XGtkRPkY.js";import{i as ur}from"./ChevronRight-3J9HDAHg.js";import{a as ro}from"./Copy01-BJat5cCG.js";import{b as Ve,t as _s,c as dr}from"./format-time-BnbuEtat.js";import{u as oo}from"./use-copy-DcMU_Du_.js";import{T as nt,a as st,b as rt}from"./tooltip-ClC3Srlv.js";import{M as As,I as io,F as aa}from"./file-type-icon-Bw4EZh9a.js";import{R as la,c as ca,r as ua,g as da}from"./hooks-etqn0Ixl.js";import{S as fa,h as pt,m as ma,c as Is,d as pa,b as ha}from"./chat-context-WBYedIHo.js";import{c as ga}from"./monaco-editor-DdRiFFMo.js";import{g as ao,M as xa}from"./index-y9jRgCvR.js";import{f as ba,n as ya,o as va}from"./tab-id-BijBBRwE.js";import{N as fe,R as ka,j as Sa,a as Se,k as ja,F as fr,S as lo,T as Ze,l as wa,m as Es,D as Nt,f as Cn,n as Ct,P as Te,o as Ta,e as Ne,p as Na,q as Ca,r as _a,s as co,w as ut,v as ae,x as ht,y as ot,z as dt,A as Zn,B as Aa,G as Ia,H as Ea,I as La,J as Ma,K as Ra,L as Pa,O as uo,Q as es,U as $a,V as Oa,W as fo,X as Da,Y as Ha,Z as mr,t as za,_ as Ce,$ as gt,c as Fa,u as Ba,M as Ua,d as Wa}from"./calendar--6aewHah.js";import{i as mo}from"./AlertCircle-Bz2zndXS.js";import{s as Ka}from"./Eye-DX_xtjuc.js";import{s as Kt,t as po}from"./Star01-CIYOR1vs.js";import{s as Va}from"./XClose-BiO5t7KG.js";import{n as ts}from"./ZapSquare-C65VFkyz.js";import{n as ho,i as Ga}from"./Globe01-BySvBFXs.js";import{c as qa,b as Xa}from"./Tool01-BGH-2Xj3.js";import{i as pr,a as Ya}from"./ZoomOut-CNfLP3ZT.js";import{i as yt}from"./Monitor01-BsBj0k65.js";import{i as Qa}from"./SearchMd-Bo4tLLeM.js";import{i as Ja}from"./Upload01-CHh2wJR7.js";import{u as Za,a as el}from"./shell-layout-Br6vdxrg.js";import{a as Pt}from"./Image01-XANUmMeD.js";import{n as go}from"./LinkExternal01-D672Gt8s.js";import{I as qe}from"./integration-icon-9vS2m6fz.js";import{i as tl}from"./ArrowUpRight-Db8gKgEF.js";import{a as Ls}from"./Users03-BH3k-qPm.js";import{a as Me}from"./Palette-B9lSk8yO.js";import{c as xo}from"./use-navigate-to-agent-xH9S0idv.js";import{a as nl}from"./Stars02-D9rir8SW.js";import{g as sl}from"./AreaChart-Bh2sEvol.js";import{a as rl,D as ol,c as il,d as al,e as ll}from"./dialog-Bd1FKfN6.js";import{a as cl,F as ul,b as dl,c as fl,d as ml,f as pl}from"./form-C_Pbz22I.js";import{I as hl}from"./input-Oi8mNJ4H.js";const gl={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function bo(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(gl)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function yo(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function vo(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,s=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+bo(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+s}}function Mp(t){return t.reduce((e,n)=>vo(e,n.metadata?.usage),yo())}const xl={damping:.7,stiffness:.05,mass:1.25},bl=70,yl=1e3/60,vl=350;let _n=!1;globalThis.document?.addEventListener("mousedown",()=>{_n=!0});globalThis.document?.addEventListener("mouseup",()=>{_n=!1});globalThis.document?.addEventListener("click",()=>{_n=!1});const kl=(t={})=>{const[e,n]=_.useState(!1),[s,r]=_.useState(t.initial!==!1),[o,i]=_.useState(!1),l=_.useRef(null);l.current=t;const u=_.useCallback(()=>{if(!_n)return!1;const y=window.getSelection();if(!y||!y.rangeCount)return!1;const v=y.getRangeAt(0);return v.commonAncestorContainer.contains(x.current)||x.current?.contains(v.commonAncestorContainer)},[]),c=_.useCallback(y=>{d.isAtBottom=y,r(y)},[]),m=_.useCallback(y=>{d.escapedFromLock=y,n(y)},[]),d=_.useMemo(()=>{let y;return{escapedFromLock:e,isAtBottom:s,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(v){if(x.current){const{scrollBehavior:k}=getComputedStyle(x.current);k!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=v,d.ignoreScrollToTop=x.current.scrollTop,k!=="auto"&&(x.current.style.scrollBehavior=k)}},get targetScrollTop(){return!x.current||!b.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!b.current)return 0;const{targetScrollTop:v}=this;if(!t.targetScrollTop)return v;if(y?.targetScrollTop===v)return y.calculatedScrollTop;const k=Math.max(Math.min(t.targetScrollTop(v,{scrollElement:x.current,contentElement:b.current}),v),0);return y={targetScrollTop:v,calculatedScrollTop:k},requestAnimationFrame(()=>{y=void 0}),k},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=bl}}},[]),f=_.useCallback((y={})=>{typeof y=="string"&&(y={animation:y}),y.preserveScrollPosition||c(!0);const v=Date.now()+(Number(y.wait)||0),k=On(l.current,y.animation),{ignoreEscapes:j=!1}=y;let S,w=d.calculatedTargetScrollTop;y.duration instanceof Promise?y.duration.finally(()=>{S=Date.now()}):S=v+(y.duration??0);const T=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,I=performance.now(),M=(I-(d.lastTick??I))/yl;if(d.animation||(d.animation={behavior:k,promise:N,ignoreEscapes:j}),d.animation.behavior===k&&(d.lastTick=I),u()||v>Date.now())return T();if(C<Math.min(w,d.calculatedTargetScrollTop)){if(d.animation?.behavior===k){if(k==="instant")return d.scrollTop=d.calculatedTargetScrollTop,T();d.velocity=(k.damping*d.velocity+k.stiffness*d.scrollDifference)/k.mass,d.accumulated+=d.velocity*M,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return T()}return S>Date.now()?(w=d.calculatedTargetScrollTop,T()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:On(l.current,l.current.resize),ignoreEscapes:j,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return N.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return y.wait!==!0&&(d.animation=void 0),d.animation?.behavior===k?d.animation.promise:T()},[c,u,d]),p=_.useCallback(()=>{m(!0),c(!1)},[m,c]),h=_.useCallback(({target:y})=>{if(y!==x.current)return;const{scrollTop:v,ignoreScrollToTop:k}=d;let{lastScrollTop:j=v}=d;d.lastScrollTop=v,d.ignoreScrollToTop=void 0,k&&k>v&&(j=k),i(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||v===k)return;if(u()){m(!0),c(!1);return}const S=v>j,w=v<j;if(d.animation?.ignoreEscapes){d.scrollTop=j;return}w&&(m(!0),c(!1)),S&&m(!1),!d.escapedFromLock&&d.isNearBottom&&c(!0)},1)},[m,c,u,d]),g=_.useCallback(({target:y,deltaY:v})=>{let k=y;for(;!["scroll","auto"].includes(getComputedStyle(k).overflow);){if(!k.parentElement)return;k=k.parentElement}k===x.current&&v<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),c(!1))},[m,c,d]),x=hr(y=>{x.current?.removeEventListener("scroll",h),x.current?.removeEventListener("wheel",g),y?.addEventListener("scroll",h,{passive:!0}),y?.addEventListener("wheel",g,{passive:!0})},[]),b=hr(y=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!y)return;let v;d.resizeObserver=new ResizeObserver(([k])=>{const{height:j}=k.contentRect,S=j-(v??j);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),i(d.isNearBottom),S>=0){const w=On(l.current,v?l.current.resize:l.current.initial);f({animation:w,wait:!0,preserveScrollPosition:!0,duration:w==="instant"?void 0:vl})}else d.isNearBottom&&(m(!1),c(!0));v=j,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(y)},[]);return{contentRef:b,scrollRef:x,scrollToBottom:f,stopScroll:p,isAtBottom:s||o,isNearBottom:o,escapedFromLock:e,state:d}};function hr(t,e){const n=_.useCallback(s=>(n.current=s,t(s)),e);return n}const $n=new Map;function On(...t){const e={...xl};let n=!1;for(const r of t){if(r==="instant"){n=!0;continue}typeof r=="object"&&(n=!1,e.damping=r.damping??e.damping,e.stiffness=r.stiffness??e.stiffness,e.mass=r.mass??e.mass)}const s=JSON.stringify(e);return $n.has(s)||$n.set(s,Object.freeze(e)),n?"instant":$n.get(s)}function Sl(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function Ms(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function Rs(t,e){if(!e)return t;const n=`${Sl(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function jl(t,e){return Rs(t,e).replace(/[_-]/g," ").toLowerCase()}function wl(t){const e={};for(const n of t?.arguments??[])e[n.name]=n.required?cr().min(1,"Required"):cr();return Ci(e)}function Tl(t,e){const n={};for(const s of t.arguments??[])n[s.name]=e?.[s.name]??"";return n}function Nl(t){const e=P.c(67),{prompt:n,setPrompt:s,onSubmit:r,defaultValues:o}=t,i=_.useId();let l,u;if(e[0]!==n){const R=wl(n);u=_i,l=Ni(R),e[0]=n,e[1]=l,e[2]=u}else l=e[1],u=e[2];let c;e[3]!==o||e[4]!==n?(c=n?Tl(n,o):{},e[3]=o,e[4]=n,e[5]=c):c=e[5];let m;e[6]!==l||e[7]!==c?(m={resolver:l,defaultValues:c,mode:"onChange"},e[6]=l,e[7]=c,e[8]=m):m=e[8];const d=u(m);let f;e[9]!==n?.arguments?(f=n?.arguments??[],e[9]=n?.arguments,e[10]=f):f=e[10];const p=f;let h;e[11]!==d||e[12]!==r||e[13]!==s?(h=async R=>{await r(R),s(null),d.reset()},e[11]=d,e[12]=r,e[13]=s,e[14]=h):h=e[14];const g=h;let x;e[15]!==d||e[16]!==s?(x=R=>{R||(d.reset(),s(null))},e[15]=d,e[16]=s,e[17]=x):x=e[17];const b=x;if(!n)return null;let y;e[18]!==n._meta||e[19]!==n.name||e[20]!==n.title?(y=n.title||jl(n.name,Ms(n._meta)),e[18]=n._meta,e[19]=n.name,e[20]=n.title,e[21]=y):y=e[21];let v;e[22]!==y?(v=a.jsx(rl,{children:a.jsx("span",{className:"capitalize",children:y})}),e[22]=y,e[23]=v):v=e[23];let k;e[24]!==n.description?(k=n.description&&a.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[24]=n.description,e[25]=k):k=e[25];let j;e[26]!==k||e[27]!==v?(j=a.jsxs(ol,{children:[v,k]}),e[26]=k,e[27]=v,e[28]=j):j=e[28];let S;e[29]!==d||e[30]!==g?(S=R=>{R.stopPropagation(),d.handleSubmit(g)(R)},e[29]=d,e[30]=g,e[31]=S):S=e[31];let w;if(e[32]!==p||e[33]!==d.control||e[34]!==d.formState.isSubmitting){let R;e[36]!==d.control||e[37]!==d.formState.isSubmitting?(R=D=>a.jsx(ul,{control:d.control,name:D.name,render:H=>{const{field:F}=H;return a.jsxs(dl,{children:[a.jsxs(fl,{className:"text-xs",children:[D.name,D.required?null:a.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),a.jsx(ml,{children:a.jsx(hl,{...F,value:F.value??"",required:D.required,placeholder:D.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),a.jsx(pl,{})]})}},D.name),e[36]=d.control,e[37]=d.formState.isSubmitting,e[38]=R):R=e[38],w=p.map(R),e[32]=p,e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=w}else w=e[35];let T;e[39]!==b?(T=()=>b(!1),e[39]=b,e[40]=T):T=e[40];let N;e[41]!==d.formState.isSubmitting||e[42]!==T?(N=a.jsx(tt,{type:"button",variant:"ghost",onClick:T,disabled:d.formState.isSubmitting,children:"Cancel"}),e[41]=d.formState.isSubmitting,e[42]=T,e[43]=N):N=e[43];let C;e[44]!==d.formState.isSubmitting?(C=d.formState.isSubmitting?a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(fa,{size:"xs"}),"Loading..."]}):"Use prompt",e[44]=d.formState.isSubmitting,e[45]=C):C=e[45];let I;e[46]!==d.formState.isSubmitting||e[47]!==i||e[48]!==C?(I=a.jsx(tt,{type:"submit",form:i,disabled:d.formState.isSubmitting,children:C}),e[46]=d.formState.isSubmitting,e[47]=i,e[48]=C,e[49]=I):I=e[49];let M;e[50]!==N||e[51]!==I?(M=a.jsxs(il,{children:[N,I]}),e[50]=N,e[51]=I,e[52]=M):M=e[52];let A;e[53]!==i||e[54]!==S||e[55]!==w||e[56]!==M?(A=a.jsxs("form",{id:i,className:"space-y-4 py-4",autoComplete:"off",onSubmit:S,children:[w,M]}),e[53]=i,e[54]=S,e[55]=w,e[56]=M,e[57]=A):A=e[57];let $;e[58]!==d||e[59]!==A?($=a.jsx(cl,{...d,children:A}),e[58]=d,e[59]=A,e[60]=$):$=e[60];let E;e[61]!==j||e[62]!==$?(E=a.jsxs(al,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[j,$]}),e[61]=j,e[62]=$,e[63]=E):E=e[63];let O;return e[64]!==b||e[65]!==E?(O=a.jsx(ll,{open:!0,onOpenChange:b,children:E}),e[64]=b,e[65]=E,e[66]=O):O=e[66],O}const Cl=/^mcp__[a-zA-Z0-9_-]+__/;function ko(t){return t.replace(Cl,"")}function An(t){const e=P.c(18),{id:n,part:s,copyable:r,extraActions:o,alwaysShowActions:i,animate:l}=t,u=r===void 0?!1:r,c=i===void 0?!1:i,m=l===void 0?!1:l,{handleCopy:d}=oo(),[f,p]=_.useState(!1);let h;e[0]!==d||e[1]!==n||e[2]!==s.text?(h=async()=>{Ai("chat_message_copied",{message_id:n,chars:s.text.length}),await d(s.text),p(!0),setTimeout(()=>p(!1),2e3)},e[0]=d,e[1]=n,e[2]=s.text,e[3]=h):h=e[3];const g=h,x=u&&o,b=x||o;let y;e[4]!==m||e[5]!==n||e[6]!==s.text?(y=a.jsx(As,{id:n,text:s.text,animate:m}),e[4]=m,e[5]=n,e[6]=s.text,e[7]=y):y=e[7];let v;e[8]!==c||e[9]!==o||e[10]!==g||e[11]!==f||e[12]!==b||e[13]!==x?(v=b&&a.jsxs("div",{className:q("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",c?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[o,x&&o&&a.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),x&&a.jsx("button",{type:"button",onClick:g,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":"Copy message",children:f?a.jsx(Ns,{className:"size-4"}):a.jsx(ro,{className:"size-4"})})]}),e[8]=c,e[9]=o,e[10]=g,e[11]=f,e[12]=b,e[13]=x,e[14]=v):v=e[14];let k;return e[15]!==y||e[16]!==v?(k=a.jsxs("div",{className:"group/part relative",children:[y,v]}),e[15]=y,e[16]=v,e[17]=k):k=e[17],k}function Rp(t,e,n){t.chain().focus().insertContentAt(e,[_l(n),{type:"text",text:" "}]).run()}function _l(t){return{type:"file",attrs:t}}function Al(t){const e=P.c(17),{node:n,selected:s,view:r}=t,{name:o,mimeType:i,data:l}=n.attrs,u=s&&r.editable;let c;e[0]!==i?(c=i.startsWith("image/"),e[0]=i,e[1]=c):c=e[1];const m=c,d=u&&"outline-2 outline-blue-300 outline-offset-0";let f;e[2]!==d?(f=q("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light","bg-muted text-muted-foreground",d),e[2]=d,e[3]=f):f=e[3];let p;e[4]!==o?(p=a.jsx(nt,{asChild:!0,children:a.jsx("span",{children:o})}),e[4]=o,e[5]=p):p=e[5];let h;e[6]!==l||e[7]!==m||e[8]!==i||e[9]!==o?(h=a.jsx(st,{side:"top",className:"max-w-sm p-1.5",children:m?a.jsx("img",{src:`data:${i};base64,${l}`,alt:o,className:"max-w-full max-h-64 object-contain rounded"}):a.jsxs("div",{className:"text-xs",children:[a.jsx("div",{className:"font-medium",children:o}),a.jsx("div",{className:"text-muted-foreground mt-1",children:i})]})}),e[6]=l,e[7]=m,e[8]=i,e[9]=o,e[10]=h):h=e[10];let g;e[11]!==p||e[12]!==h?(g=a.jsxs(rt,{children:[p,h]}),e[11]=p,e[12]=h,e[13]=g):g=e[13];let x;return e[14]!==f||e[15]!==g?(x=a.jsx(Sa,{className:f,children:g}),e[14]=f,e[15]=g,e[16]=x):x=e[16],x}const Il=fe.create({name:"file",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id")||null,renderHTML:t=>t.id?{"data-id":t.id}:{}},name:{default:null,parseHTML:t=>t.getAttribute("data-name")||null,renderHTML:t=>t.name?{"data-name":t.name}:{}},mimeType:{default:null,parseHTML:t=>t.getAttribute("data-mime-type")||null,renderHTML:t=>t.mimeType?{"data-mime-type":t.mimeType}:{}},size:{default:0,parseHTML:t=>{const e=t.getAttribute("data-size");return e?Number.parseInt(e,10):0},renderHTML:t=>t.size?{"data-size":String(t.size)}:{}},data:{default:null,parseHTML:t=>t.getAttribute("data-data")||null,renderHTML:t=>t.data?{"data-data":t.data}:{}}}},parseHTML(){return[{tag:'span[data-type="file"]'}]},renderHTML({node:t,HTMLAttributes:e}){const n={"data-type":"file"};return t.attrs.id&&(n["data-id"]=t.attrs.id),t.attrs.name&&(n["data-name"]=t.attrs.name),t.attrs.mimeType&&(n["data-mime-type"]=t.attrs.mimeType),t.attrs.size&&(n["data-size"]=String(t.attrs.size)),t.attrs.data&&(n["data-data"]=t.attrs.data),["span",{...e,...n}]},renderText({node:t}){return`[${t.attrs.name??""}]`},addNodeView(){return ka(Al)}});function El(t={}){return new Se({view(e){return new Ll(e,t)}})}class Ll{constructor(e,n){var s;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(s=n.width)!==null&&s!==void 0?s:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let o=i=>{this[r](i)};return e.dom.addEventListener(r,o),{name:r,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,s,r=this.editorView.dom,o=r.getBoundingClientRect(),i=o.width/r.offsetWidth,l=o.height/r.offsetHeight;if(n){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),g=d?h.bottom:h.top;d&&f&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let x=this.width/2*l;s={left:h.left,right:h.right,top:g-x,bottom:g+x}}}}if(!s){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*i;s={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let u=this.editorView.dom.offsetParent;this.element||(this.element=u.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,m;if(!u||u==document.body&&getComputedStyle(u).position=="static")c=-pageXOffset,m=-pageYOffset;else{let d=u.getBoundingClientRect(),f=d.width/u.offsetWidth,p=d.height/u.offsetHeight;c=d.left-u.scrollLeft*f,m=d.top-u.scrollTop*p}this.element.style.left=(s.left-c)/i+"px",this.element.style.top=(s.top-m)/l+"px",this.element.style.width=(s.right-s.left)/i+"px",this.element.style.height=(s.bottom-s.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),s=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),r=s&&s.type.spec.disableDropCursor,o=typeof r=="function"?r(this.editorView,n,e):r;if(n&&!o){let i=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=ja(this.editorView.state.doc,i,this.editorView.dragging.slice);l!=null&&(i=l)}this.setCursor(i),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class oe extends Ct{constructor(e){super(e,e)}map(e,n){let s=e.resolve(n.map(this.head));return oe.valid(s)?new oe(s):Ct.near(s)}content(){return lo.empty}eq(e){return e instanceof oe&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new oe(e.resolve(n.pos))}getBookmark(){return new Ps(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!Ml(e)||!Rl(e))return!1;let s=n.type.spec.allowGapCursor;if(s!=null)return s;let r=n.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,n,s=!1){e:for(;;){if(!s&&oe.valid(e))return e;let r=e.pos,o=null;for(let i=e.depth;;i--){let l=e.node(i);if(n>0?e.indexAfter(i)<l.childCount:e.index(i)>0){o=l.child(n>0?e.indexAfter(i):e.index(i)-1);break}else if(i==0)return null;r+=n;let u=e.doc.resolve(r);if(oe.valid(u))return u}for(;;){let i=n>0?o.firstChild:o.lastChild;if(!i){if(o.isAtom&&!o.isText&&!Es.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*n),s=!1;continue e}break}o=i,r+=n;let l=e.doc.resolve(r);if(oe.valid(l))return l}return null}}}oe.prototype.visible=!1;oe.findFrom=oe.findGapCursorFrom;Ct.jsonID("gapcursor",oe);class Ps{constructor(e){this.pos=e}map(e){return new Ps(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return oe.valid(n)?new oe(n):Ct.near(n)}}function So(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function Ml(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),s=t.node(e);if(n==0){if(s.type.spec.isolating)return!0;continue}for(let r=s.child(n-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||So(r.type))return!0;if(r.inlineContent)return!1}}return!0}function Rl(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),s=t.node(e);if(n==s.childCount){if(s.type.spec.isolating)return!0;continue}for(let r=s.child(n);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||So(r.type))return!0;if(r.inlineContent)return!1}}return!0}function Pl(){return new Se({props:{decorations:Hl,createSelectionBetween(t,e,n){return e.pos==n.pos&&oe.valid(n)?new oe(n):null},handleClick:Ol,handleKeyDown:$l,handleDOMEvents:{beforeinput:Dl}}})}const $l=wa({ArrowLeft:$t("horiz",-1),ArrowRight:$t("horiz",1),ArrowUp:$t("vert",-1),ArrowDown:$t("vert",1)});function $t(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(s,r,o){let i=s.selection,l=e>0?i.$to:i.$from,u=i.empty;if(i instanceof Ze){if(!o.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=s.doc.resolve(e>0?l.after():l.before())}let c=oe.findGapCursorFrom(l,e,u);return c?(r&&r(s.tr.setSelection(new oe(c))),!0):!1}}function Ol(t,e,n){if(!t||!t.editable)return!1;let s=t.state.doc.resolve(e);if(!oe.valid(s))return!1;let r=t.posAtCoords({left:n.clientX,top:n.clientY});return r&&r.inside>-1&&Es.isSelectable(t.state.doc.nodeAt(r.inside))?!1:(t.dispatch(t.state.tr.setSelection(new oe(s))),!0)}function Dl(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof oe))return!1;let{$from:n}=t.state.selection,s=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!s)return!1;let r=fr.empty;for(let i=s.length-1;i>=0;i--)r=fr.from(s[i].createAndFill(null,r));let o=t.state.tr.replace(n.pos,n.pos,new lo(r,0,0));return o.setSelection(Ze.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function Hl(t){if(!(t.selection instanceof oe))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Nt.create(t.doc,[Cn.widget(t.selection.head,e,{key:"gapcursor"})])}var Vt=200,le=function(){};le.prototype.append=function(e){return e.length?(e=le.from(e),!this.length&&e||e.length<Vt&&this.leafAppend(e)||this.length<Vt&&e.leafPrepend(this)||this.appendInner(e)):this};le.prototype.prepend=function(e){return e.length?le.from(e).append(this):this};le.prototype.appendInner=function(e){return new zl(this,e)};le.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?le.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};le.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};le.prototype.forEach=function(e,n,s){n===void 0&&(n=0),s===void 0&&(s=this.length),n<=s?this.forEachInner(e,n,s,0):this.forEachInvertedInner(e,n,s,0)};le.prototype.map=function(e,n,s){n===void 0&&(n=0),s===void 0&&(s=this.length);var r=[];return this.forEach(function(o,i){return r.push(e(o,i))},n,s),r};le.from=function(e){return e instanceof le?e:e&&e.length?new jo(e):le.empty};var jo=(function(t){function e(s){t.call(this),this.values=s}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,o){return r==0&&o==this.length?this:new e(this.values.slice(r,o))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,o,i,l){for(var u=o;u<i;u++)if(r(this.values[u],l+u)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,l){for(var u=o-1;u>=i;u--)if(r(this.values[u],l+u)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Vt)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Vt)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(le);le.empty=new jo([]);var zl=(function(t){function e(n,s){t.call(this),this.left=n,this.right=s,this.length=n.length+s.length,this.depth=Math.max(n.depth,s.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(s){return s<this.left.length?this.left.get(s):this.right.get(s-this.left.length)},e.prototype.forEachInner=function(s,r,o,i){var l=this.left.length;if(r<l&&this.left.forEachInner(s,r,Math.min(o,l),i)===!1||o>l&&this.right.forEachInner(s,Math.max(r-l,0),Math.min(this.length,o)-l,i+l)===!1)return!1},e.prototype.forEachInvertedInner=function(s,r,o,i){var l=this.left.length;if(r>l&&this.right.forEachInvertedInner(s,r-l,Math.max(o,l)-l,i+l)===!1||o<l&&this.left.forEachInvertedInner(s,Math.min(r,l),o,i)===!1)return!1},e.prototype.sliceInner=function(s,r){if(s==0&&r==this.length)return this;var o=this.left.length;return r<=o?this.left.slice(s,r):s>=o?this.right.slice(s-o,r-o):this.left.slice(s,o).append(this.right.slice(0,r-o))},e.prototype.leafAppend=function(s){var r=this.right.leafAppend(s);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(s){var r=this.left.leafPrepend(s);if(r)return new e(r,this.right)},e.prototype.appendInner=function(s){return this.left.depth>=Math.max(this.right.depth,s.depth)+1?new e(this.left,new e(this.right,s)):new e(this,s)},e})(le);const Fl=500;class we{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}let r,o;n&&(r=this.remapping(s,this.items.length),o=r.maps.length);let i=e.tr,l,u,c=[],m=[];return this.items.forEach((d,f)=>{if(!d.step){r||(r=this.remapping(s,f+1),o=r.maps.length),o--,m.push(d);return}if(r){m.push(new Ae(d.map));let p=d.step.map(r.slice(o)),h;p&&i.maybeStep(p).doc&&(h=i.mapping.maps[i.mapping.maps.length-1],c.push(new Ae(h,void 0,void 0,c.length+m.length))),o--,h&&r.appendMap(h,o)}else i.maybeStep(d.step);if(d.selection)return l=r?d.selection.map(r.slice(o)):d.selection,u=new we(this.items.slice(0,s).append(m.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:i,selection:l}}addTransform(e,n,s,r){let o=[],i=this.eventCount,l=this.items,u=!r&&l.length?l.get(l.length-1):null;for(let m=0;m<e.steps.length;m++){let d=e.steps[m].invert(e.docs[m]),f=new Ae(e.mapping.maps[m],d,n),p;(p=u&&u.merge(f))&&(f=p,m?o.pop():l=l.slice(0,l.length-1)),o.push(f),n&&(i++,n=void 0),r||(u=f)}let c=i-s.depth;return c>Ul&&(l=Bl(l,c),i-=c),new we(l.append(o),i)}remapping(e,n){let s=new Ta;return this.items.forEach((r,o)=>{let i=r.mirrorOffset!=null&&o-r.mirrorOffset>=e?s.maps.length-r.mirrorOffset:void 0;s.appendMap(r.map,i)},e,n),s}addMaps(e){return this.eventCount==0?this:new we(this.items.append(e.map(n=>new Ae(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let s=[],r=Math.max(0,this.items.length-n),o=e.mapping,i=e.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},r);let u=n;this.items.forEach(f=>{let p=o.getMirror(--u);if(p==null)return;i=Math.min(i,p);let h=o.maps[p];if(f.step){let g=e.steps[p].invert(e.docs[p]),x=f.selection&&f.selection.map(o.slice(u+1,p));x&&l++,s.push(new Ae(h,g,x))}else s.push(new Ae(h))},r);let c=[];for(let f=n;f<i;f++)c.push(new Ae(o.maps[f]));let m=this.items.slice(0,r).append(c).append(s),d=new we(m,l);return d.emptyItemCount()>Fl&&(d=d.compress(this.items.length-s.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),s=n.maps.length,r=[],o=0;return this.items.forEach((i,l)=>{if(l>=e)r.push(i),i.selection&&o++;else if(i.step){let u=i.step.map(n.slice(s)),c=u&&u.getMap();if(s--,c&&n.appendMap(c,s),u){let m=i.selection&&i.selection.map(n.slice(s));m&&o++;let d=new Ae(c.invert(),u,m),f,p=r.length-1;(f=r.length&&r[p].merge(d))?r[p]=f:r.push(d)}}else i.map&&s--},this.items.length,0),new we(le.from(r.reverse()),o)}}we.empty=new we(le.empty,0);function Bl(t,e){let n;return t.forEach((s,r)=>{if(s.selection&&e--==0)return n=r,!1}),t.slice(n)}class Ae{constructor(e,n,s,r){this.map=e,this.step=n,this.selection=s,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Ae(n.getMap().invert(),n,this.selection)}}}class Be{constructor(e,n,s,r,o){this.done=e,this.undone=n,this.prevRanges=s,this.prevTime=r,this.prevComposition=o}}const Ul=20;function Wl(t,e,n,s){let r=n.getMeta(et),o;if(r)return r.historyState;n.getMeta(Gl)&&(t=new Be(t.done,t.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(i&&i.getMeta(et))return i.getMeta(et).redo?new Be(t.done.addTransform(n,void 0,s,Bt(e)),t.undone,gr(n.mapping.maps),t.prevTime,t.prevComposition):new Be(t.done,t.undone.addTransform(n,void 0,s,Bt(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),u=t.prevTime==0||!i&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-s.newGroupDelay||!Kl(n,t.prevRanges)),c=i?Dn(t.prevRanges,n.mapping):gr(n.mapping.maps);return new Be(t.done.addTransform(n,u?e.selection.getBookmark():void 0,s,Bt(e)),we.empty,c,n.time,l??t.prevComposition)}else return(o=n.getMeta("rebased"))?new Be(t.done.rebased(n,o),t.undone.rebased(n,o),Dn(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Be(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Dn(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function Kl(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((s,r)=>{for(let o=0;o<e.length;o+=2)s<=e[o+1]&&r>=e[o]&&(n=!0)}),n}function gr(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((s,r,o,i)=>e.push(o,i));return e}function Dn(t,e){if(!t)return null;let n=[];for(let s=0;s<t.length;s+=2){let r=e.map(t[s],1),o=e.map(t[s+1],-1);r<=o&&n.push(r,o)}return n}function Vl(t,e,n){let s=Bt(e),r=et.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,s);if(!o)return null;let i=o.selection.resolve(o.transform.doc),l=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),r,s),u=new Be(n?l:o.remaining,n?o.remaining:l,null,0,-1);return o.transform.setSelection(i).setMeta(et,{redo:n,historyState:u})}let Hn=!1,xr=null;function Bt(t){let e=t.plugins;if(xr!=e){Hn=!1,xr=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Hn=!0;break}}return Hn}const et=new Te("history"),Gl=new Te("closeHistory");function ql(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Se({key:et,state:{init(){return new Be(we.empty,we.empty,null,0,-1)},apply(e,n,s){return Wl(n,s,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let s=n.inputType,r=s=="historyUndo"?To:s=="historyRedo"?No:null;return!r||!e.editable?!1:(n.preventDefault(),r(e.state,e.dispatch))}}}})}function wo(t,e){return(n,s)=>{let r=et.getState(n);if(!r||(t?r.undone:r.done).eventCount==0)return!1;if(s){let o=Vl(r,n,t);o&&s(e?o.scrollIntoView():o)}return!0}}const To=wo(!1,!0),No=wo(!0,!0);Ne.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=t?.node||this.editor.state.doc;if((t?.mode||this.options.mode)==="textSize"){const s=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(s)}return e.nodeSize},this.storage.words=t=>{const e=t?.node||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new Se({key:new Te("characterCount"),appendTransaction:(e,n,s)=>{if(t)return;const r=this.options.limit;if(r==null||r===0){t=!0;return}const o=this.storage.characters({node:s.doc});if(o>r){const i=o-r,l=0,u=i;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);const c=s.tr.deleteRange(l,u);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const s=this.options.limit;if(!e.docChanged||s===0||s===null||s===void 0)return!0;const r=this.storage.characters({node:n.doc}),o=this.storage.characters({node:e.doc});if(o<=s||r>s&&o>s&&o<=r)return!0;if(r>s&&o>s&&o>r||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,u=o-s,c=l-u,m=l;return e.deleteRange(c,m),!(this.storage.characters({node:e.doc})>s)}})]}});var Xl=Ne.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[El(this.options)]}});Ne.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Se({key:new Te("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:s}=this.editor,{anchor:r}=e,o=[];if(!n||!s)return Nt.create(t,[]);let i=0;this.options.mode==="deepest"&&t.descendants((u,c)=>{if(u.isText)return;if(!(r>=c&&r<=c+u.nodeSize-1))return!1;i+=1});let l=0;return t.descendants((u,c)=>{if(u.isText||!(r>=c&&r<=c+u.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&i-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";o.push(Cn.node(c,c+u.nodeSize,{class:this.options.className}))}),Nt.create(t,o)}}})]}});var Yl=Ne.create({name:"gapCursor",addProseMirrorPlugins(){return[Pl()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Ca(_a(t,"allowGapCursor",n)))!=null?e:null}}}),br="placeholder";function Ql(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var Pp=Ne.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:br,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${Ql(this.options.dataAttribute)}`:`data-${br}`;return[new Se({key:new Te("placeholder"),props:{decorations:({doc:e,selection:n})=>{const s=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=n,o=[];if(!s)return null;const i=this.editor.isEmpty;return e.descendants((l,u)=>{const c=r>=u&&r<=u+l.nodeSize,m=!l.isLeaf&&Na(l);if((c||!this.options.showOnlyCurrent)&&m){const d=[this.options.emptyNodeClass];i&&d.push(this.options.emptyEditorClass);const f=Cn.node(u,u+l.nodeSize,{class:d.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:u,hasAnchor:c}):this.options.placeholder});o.push(f)}return this.options.includeChildren}),Nt.create(e,o)}}})]}});Ne.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new Se({key:new Te("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||co(n.selection)||t.view.dragging?null:Nt.create(n.doc,[Cn.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});function yr({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||e?.type===t}var Jl=Ne.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Te(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",s=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>(this.options.notAfter||[]).concat(n).includes(r.name));return[new Se({key:e,appendTransaction:(r,o,i)=>{const{doc:l,tr:u,schema:c}=i,m=e.getState(i),d=l.content.size,f=c.nodes[n];if(m)return u.insert(d,f.create())},state:{init:(r,o)=>{const i=o.tr.doc.lastChild;return!yr({node:i,types:s})},apply:(r,o)=>{if(!r.docChanged||r.getMeta("__uniqueIDTransaction"))return o;const i=r.doc.lastChild;return!yr({node:i,types:s})}}})]}}),Zl=Ne.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>To(t,e),redo:()=>({state:t,dispatch:e})=>No(t,e)}},addProseMirrorPlugins(){return[ql(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Gt=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...s}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,s,n]},ec=/^\s*>\s$/,tc=fe.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Gt("blockquote",{...ae(this.options.HTMLAttributes,t),children:Gt("slot",{})})},parseMarkdown:(t,e)=>{var n;const s=(n=e.parseBlockChildren)!=null?n:e.parseChildren;return e.createNode("blockquote",void 0,s(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",s=[];return t.content.forEach((r,o)=>{var i,l;const m=((l=(i=e.renderChild)==null?void 0:i.call(e,r,o))!=null?l:e.renderChildren([r])).split(`
|
|
1
|
+
import{r as _,c as P,J as Ni,j as a,B as tt,I as cr,H as Ci,M as _i,l as q,p as Ai,aR as Ii,aO as Ge,aV as Ei,aU as Ke,ba as Et,aS as it,bJ as zr,aQ as Fr,C as He,n as Li,d as Mi,K as ke,t as Yn,m as Lt,b as mt,E as Br,aL as Ur,bK as ks,aT as Ri,bL as Qe}from"./index-DZ3hzzf1.js";import{e as Pi}from"./select-BesvP7cx.js";import{u as Wr}from"./useInfiniteQuery-D1UM76v9.js";import{a as Kr,u as $i}from"./use-connection-sIYGQRZw.js";import{c as Oi,u as Ss}from"./use-mcp-client-BIXuHEwh.js";import{u as Di}from"./use-virtual-mcp-BLx5NqtM.js";import{b as Hi,i as zi,a as Fi,S as Bi}from"./constants-BHDe7bIw.js";import{C as Ui}from"./card-dggHqb7D.js";import{o as Vr,m as Gr,p as js,q as ws}from"./sidebar-Cc4XVWKB.js";import{c as qr,d as Xr,a as Tn,e as ye,b as Yr,T as ve}from"./table-BpC3o1Ua.js";import{E as Qn}from"./empty-state-CiSz3At1.js";import{u as Ts}from"./use-infinite-scroll-BQFpclfv.js";import{u as Wi}from"./use-members-CLdfd0HT.js";import{u as Qr,S as ct}from"./use-clock-tick-DJOVC-Ea.js";import{e as Ki}from"./use-automations-fFC4EQc3.js";import{u as Jr}from"./studio-tools-B4JofgO_.js";import{u as Vi}from"./useSuspenseInfiniteQuery-8ID1agn2.js";import{A as Zr}from"./avatar-BlYuWW7J.js";import{t as Wt}from"./ChevronDown-sgVULpdb.js";import{i as Ns,n as Jn}from"./ChevronUp-mvRqss9i.js";import{t as Gi,a as eo,n as Cs}from"./Tool02-O3edpLSO.js";import{f as qi,aA as Xi,aB as Yi,Z as Qi,x as Ji,aC as Zi,a4 as ea,ak as ta,k as na,ay as to,aD as sa,aE as ra,A as no,aF as Le,aG as oa,n as ia}from"./agent-icon-CGx0_9l5.js";import{t as Nn}from"./Stars01-DZkGi0yh.js";import{i as so,b as Rt}from"./XCircle-Do7Zx-eD.js";import{i as ur}from"./ChevronRight-BUKoQxxN.js";import{a as ro}from"./Copy01-DLSxZiKr.js";import{b as Ve,t as _s,c as dr}from"./format-time-BnbuEtat.js";import{u as oo}from"./use-copy-DK3qaoqd.js";import{T as nt,a as st,b as rt}from"./tooltip-BLkLB4r7.js";import{M as As,I as io,F as aa}from"./file-type-icon-C4zp7G8m.js";import{R as la,c as ca,r as ua,g as da}from"./hooks-y59N0gpi.js";import{S as fa,h as pt,m as ma,c as Is,d as pa,b as ha}from"./chat-context-CEf5YFvv.js";import{c as ga}from"./monaco-editor-Dxhxh5om.js";import{g as ao,M as xa}from"./index-BiYdGYPy.js";import{f as ba,n as ya,o as va}from"./tab-id-BijBBRwE.js";import{N as fe,R as ka,j as Sa,a as Se,k as ja,F as fr,S as lo,T as Ze,l as wa,m as Es,D as Nt,f as Cn,n as Ct,P as Te,o as Ta,e as Ne,p as Na,q as Ca,r as _a,s as co,w as ut,v as ae,x as ht,y as ot,z as dt,A as Zn,B as Aa,G as Ia,H as Ea,I as La,J as Ma,K as Ra,L as Pa,O as uo,Q as es,U as $a,V as Oa,W as fo,X as Da,Y as Ha,Z as mr,t as za,_ as Ce,$ as gt,c as Fa,u as Ba,M as Ua,d as Wa}from"./calendar-Do7G6Kxp.js";import{i as mo}from"./AlertCircle-fklrqSW5.js";import{s as Ka}from"./Eye-DR1QNYLF.js";import{s as Kt,t as po}from"./Star01-nXpwaO4U.js";import{s as Va}from"./XClose-C9Ve9LT-.js";import{n as ts}from"./ZapSquare-DVSX_PUJ.js";import{n as ho,i as Ga}from"./Globe01-CnltMSDk.js";import{c as qa,b as Xa}from"./Tool01-CcxbpsdM.js";import{i as pr,a as Ya}from"./ZoomOut-DAawwf0t.js";import{i as yt}from"./Monitor01-r0C7odur.js";import{i as Qa}from"./SearchMd-C4E_z5AK.js";import{i as Ja}from"./Upload01-C1yFspcl.js";import{u as Za,a as el}from"./shell-layout-G6cWtPZY.js";import{a as Pt}from"./Image01-CSEqtjAN.js";import{n as go}from"./LinkExternal01-CKHslpvH.js";import{I as qe}from"./integration-icon-BRokQ8N8.js";import{i as tl}from"./ArrowUpRight-D6zDsrnH.js";import{a as Ls}from"./Users03-BK-DRA0O.js";import{a as Me}from"./Palette-DAx6eGU_.js";import{c as xo}from"./use-navigate-to-agent-CPivegDO.js";import{a as nl}from"./Stars02-B6BvIKTN.js";import{g as sl}from"./AreaChart-BdmhsxSM.js";import{a as rl,D as ol,c as il,d as al,e as ll}from"./dialog-Dy1IRNfn.js";import{a as cl,F as ul,b as dl,c as fl,d as ml,f as pl}from"./form-BuzHPVCM.js";import{I as hl}from"./input-CK7GAn-2.js";const gl={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function bo(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(gl)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function yo(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function vo(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,s=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+bo(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+s}}function Mp(t){return t.reduce((e,n)=>vo(e,n.metadata?.usage),yo())}const xl={damping:.7,stiffness:.05,mass:1.25},bl=70,yl=1e3/60,vl=350;let _n=!1;globalThis.document?.addEventListener("mousedown",()=>{_n=!0});globalThis.document?.addEventListener("mouseup",()=>{_n=!1});globalThis.document?.addEventListener("click",()=>{_n=!1});const kl=(t={})=>{const[e,n]=_.useState(!1),[s,r]=_.useState(t.initial!==!1),[o,i]=_.useState(!1),l=_.useRef(null);l.current=t;const u=_.useCallback(()=>{if(!_n)return!1;const y=window.getSelection();if(!y||!y.rangeCount)return!1;const v=y.getRangeAt(0);return v.commonAncestorContainer.contains(x.current)||x.current?.contains(v.commonAncestorContainer)},[]),c=_.useCallback(y=>{d.isAtBottom=y,r(y)},[]),m=_.useCallback(y=>{d.escapedFromLock=y,n(y)},[]),d=_.useMemo(()=>{let y;return{escapedFromLock:e,isAtBottom:s,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(v){if(x.current){const{scrollBehavior:k}=getComputedStyle(x.current);k!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=v,d.ignoreScrollToTop=x.current.scrollTop,k!=="auto"&&(x.current.style.scrollBehavior=k)}},get targetScrollTop(){return!x.current||!b.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!b.current)return 0;const{targetScrollTop:v}=this;if(!t.targetScrollTop)return v;if(y?.targetScrollTop===v)return y.calculatedScrollTop;const k=Math.max(Math.min(t.targetScrollTop(v,{scrollElement:x.current,contentElement:b.current}),v),0);return y={targetScrollTop:v,calculatedScrollTop:k},requestAnimationFrame(()=>{y=void 0}),k},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=bl}}},[]),f=_.useCallback((y={})=>{typeof y=="string"&&(y={animation:y}),y.preserveScrollPosition||c(!0);const v=Date.now()+(Number(y.wait)||0),k=On(l.current,y.animation),{ignoreEscapes:j=!1}=y;let S,w=d.calculatedTargetScrollTop;y.duration instanceof Promise?y.duration.finally(()=>{S=Date.now()}):S=v+(y.duration??0);const T=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,I=performance.now(),M=(I-(d.lastTick??I))/yl;if(d.animation||(d.animation={behavior:k,promise:N,ignoreEscapes:j}),d.animation.behavior===k&&(d.lastTick=I),u()||v>Date.now())return T();if(C<Math.min(w,d.calculatedTargetScrollTop)){if(d.animation?.behavior===k){if(k==="instant")return d.scrollTop=d.calculatedTargetScrollTop,T();d.velocity=(k.damping*d.velocity+k.stiffness*d.scrollDifference)/k.mass,d.accumulated+=d.velocity*M,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return T()}return S>Date.now()?(w=d.calculatedTargetScrollTop,T()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:On(l.current,l.current.resize),ignoreEscapes:j,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return N.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return y.wait!==!0&&(d.animation=void 0),d.animation?.behavior===k?d.animation.promise:T()},[c,u,d]),p=_.useCallback(()=>{m(!0),c(!1)},[m,c]),h=_.useCallback(({target:y})=>{if(y!==x.current)return;const{scrollTop:v,ignoreScrollToTop:k}=d;let{lastScrollTop:j=v}=d;d.lastScrollTop=v,d.ignoreScrollToTop=void 0,k&&k>v&&(j=k),i(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||v===k)return;if(u()){m(!0),c(!1);return}const S=v>j,w=v<j;if(d.animation?.ignoreEscapes){d.scrollTop=j;return}w&&(m(!0),c(!1)),S&&m(!1),!d.escapedFromLock&&d.isNearBottom&&c(!0)},1)},[m,c,u,d]),g=_.useCallback(({target:y,deltaY:v})=>{let k=y;for(;!["scroll","auto"].includes(getComputedStyle(k).overflow);){if(!k.parentElement)return;k=k.parentElement}k===x.current&&v<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),c(!1))},[m,c,d]),x=hr(y=>{x.current?.removeEventListener("scroll",h),x.current?.removeEventListener("wheel",g),y?.addEventListener("scroll",h,{passive:!0}),y?.addEventListener("wheel",g,{passive:!0})},[]),b=hr(y=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!y)return;let v;d.resizeObserver=new ResizeObserver(([k])=>{const{height:j}=k.contentRect,S=j-(v??j);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),i(d.isNearBottom),S>=0){const w=On(l.current,v?l.current.resize:l.current.initial);f({animation:w,wait:!0,preserveScrollPosition:!0,duration:w==="instant"?void 0:vl})}else d.isNearBottom&&(m(!1),c(!0));v=j,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(y)},[]);return{contentRef:b,scrollRef:x,scrollToBottom:f,stopScroll:p,isAtBottom:s||o,isNearBottom:o,escapedFromLock:e,state:d}};function hr(t,e){const n=_.useCallback(s=>(n.current=s,t(s)),e);return n}const $n=new Map;function On(...t){const e={...xl};let n=!1;for(const r of t){if(r==="instant"){n=!0;continue}typeof r=="object"&&(n=!1,e.damping=r.damping??e.damping,e.stiffness=r.stiffness??e.stiffness,e.mass=r.mass??e.mass)}const s=JSON.stringify(e);return $n.has(s)||$n.set(s,Object.freeze(e)),n?"instant":$n.get(s)}function Sl(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function Ms(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function Rs(t,e){if(!e)return t;const n=`${Sl(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function jl(t,e){return Rs(t,e).replace(/[_-]/g," ").toLowerCase()}function wl(t){const e={};for(const n of t?.arguments??[])e[n.name]=n.required?cr().min(1,"Required"):cr();return Ci(e)}function Tl(t,e){const n={};for(const s of t.arguments??[])n[s.name]=e?.[s.name]??"";return n}function Nl(t){const e=P.c(67),{prompt:n,setPrompt:s,onSubmit:r,defaultValues:o}=t,i=_.useId();let l,u;if(e[0]!==n){const R=wl(n);u=_i,l=Ni(R),e[0]=n,e[1]=l,e[2]=u}else l=e[1],u=e[2];let c;e[3]!==o||e[4]!==n?(c=n?Tl(n,o):{},e[3]=o,e[4]=n,e[5]=c):c=e[5];let m;e[6]!==l||e[7]!==c?(m={resolver:l,defaultValues:c,mode:"onChange"},e[6]=l,e[7]=c,e[8]=m):m=e[8];const d=u(m);let f;e[9]!==n?.arguments?(f=n?.arguments??[],e[9]=n?.arguments,e[10]=f):f=e[10];const p=f;let h;e[11]!==d||e[12]!==r||e[13]!==s?(h=async R=>{await r(R),s(null),d.reset()},e[11]=d,e[12]=r,e[13]=s,e[14]=h):h=e[14];const g=h;let x;e[15]!==d||e[16]!==s?(x=R=>{R||(d.reset(),s(null))},e[15]=d,e[16]=s,e[17]=x):x=e[17];const b=x;if(!n)return null;let y;e[18]!==n._meta||e[19]!==n.name||e[20]!==n.title?(y=n.title||jl(n.name,Ms(n._meta)),e[18]=n._meta,e[19]=n.name,e[20]=n.title,e[21]=y):y=e[21];let v;e[22]!==y?(v=a.jsx(rl,{children:a.jsx("span",{className:"capitalize",children:y})}),e[22]=y,e[23]=v):v=e[23];let k;e[24]!==n.description?(k=n.description&&a.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[24]=n.description,e[25]=k):k=e[25];let j;e[26]!==k||e[27]!==v?(j=a.jsxs(ol,{children:[v,k]}),e[26]=k,e[27]=v,e[28]=j):j=e[28];let S;e[29]!==d||e[30]!==g?(S=R=>{R.stopPropagation(),d.handleSubmit(g)(R)},e[29]=d,e[30]=g,e[31]=S):S=e[31];let w;if(e[32]!==p||e[33]!==d.control||e[34]!==d.formState.isSubmitting){let R;e[36]!==d.control||e[37]!==d.formState.isSubmitting?(R=D=>a.jsx(ul,{control:d.control,name:D.name,render:H=>{const{field:F}=H;return a.jsxs(dl,{children:[a.jsxs(fl,{className:"text-xs",children:[D.name,D.required?null:a.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),a.jsx(ml,{children:a.jsx(hl,{...F,value:F.value??"",required:D.required,placeholder:D.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),a.jsx(pl,{})]})}},D.name),e[36]=d.control,e[37]=d.formState.isSubmitting,e[38]=R):R=e[38],w=p.map(R),e[32]=p,e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=w}else w=e[35];let T;e[39]!==b?(T=()=>b(!1),e[39]=b,e[40]=T):T=e[40];let N;e[41]!==d.formState.isSubmitting||e[42]!==T?(N=a.jsx(tt,{type:"button",variant:"ghost",onClick:T,disabled:d.formState.isSubmitting,children:"Cancel"}),e[41]=d.formState.isSubmitting,e[42]=T,e[43]=N):N=e[43];let C;e[44]!==d.formState.isSubmitting?(C=d.formState.isSubmitting?a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(fa,{size:"xs"}),"Loading..."]}):"Use prompt",e[44]=d.formState.isSubmitting,e[45]=C):C=e[45];let I;e[46]!==d.formState.isSubmitting||e[47]!==i||e[48]!==C?(I=a.jsx(tt,{type:"submit",form:i,disabled:d.formState.isSubmitting,children:C}),e[46]=d.formState.isSubmitting,e[47]=i,e[48]=C,e[49]=I):I=e[49];let M;e[50]!==N||e[51]!==I?(M=a.jsxs(il,{children:[N,I]}),e[50]=N,e[51]=I,e[52]=M):M=e[52];let A;e[53]!==i||e[54]!==S||e[55]!==w||e[56]!==M?(A=a.jsxs("form",{id:i,className:"space-y-4 py-4",autoComplete:"off",onSubmit:S,children:[w,M]}),e[53]=i,e[54]=S,e[55]=w,e[56]=M,e[57]=A):A=e[57];let $;e[58]!==d||e[59]!==A?($=a.jsx(cl,{...d,children:A}),e[58]=d,e[59]=A,e[60]=$):$=e[60];let E;e[61]!==j||e[62]!==$?(E=a.jsxs(al,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[j,$]}),e[61]=j,e[62]=$,e[63]=E):E=e[63];let O;return e[64]!==b||e[65]!==E?(O=a.jsx(ll,{open:!0,onOpenChange:b,children:E}),e[64]=b,e[65]=E,e[66]=O):O=e[66],O}const Cl=/^mcp__[a-zA-Z0-9_-]+__/;function ko(t){return t.replace(Cl,"")}function An(t){const e=P.c(18),{id:n,part:s,copyable:r,extraActions:o,alwaysShowActions:i,animate:l}=t,u=r===void 0?!1:r,c=i===void 0?!1:i,m=l===void 0?!1:l,{handleCopy:d}=oo(),[f,p]=_.useState(!1);let h;e[0]!==d||e[1]!==n||e[2]!==s.text?(h=async()=>{Ai("chat_message_copied",{message_id:n,chars:s.text.length}),await d(s.text),p(!0),setTimeout(()=>p(!1),2e3)},e[0]=d,e[1]=n,e[2]=s.text,e[3]=h):h=e[3];const g=h,x=u&&o,b=x||o;let y;e[4]!==m||e[5]!==n||e[6]!==s.text?(y=a.jsx(As,{id:n,text:s.text,animate:m}),e[4]=m,e[5]=n,e[6]=s.text,e[7]=y):y=e[7];let v;e[8]!==c||e[9]!==o||e[10]!==g||e[11]!==f||e[12]!==b||e[13]!==x?(v=b&&a.jsxs("div",{className:q("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",c?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[o,x&&o&&a.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),x&&a.jsx("button",{type:"button",onClick:g,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":"Copy message",children:f?a.jsx(Ns,{className:"size-4"}):a.jsx(ro,{className:"size-4"})})]}),e[8]=c,e[9]=o,e[10]=g,e[11]=f,e[12]=b,e[13]=x,e[14]=v):v=e[14];let k;return e[15]!==y||e[16]!==v?(k=a.jsxs("div",{className:"group/part relative",children:[y,v]}),e[15]=y,e[16]=v,e[17]=k):k=e[17],k}function Rp(t,e,n){t.chain().focus().insertContentAt(e,[_l(n),{type:"text",text:" "}]).run()}function _l(t){return{type:"file",attrs:t}}function Al(t){const e=P.c(17),{node:n,selected:s,view:r}=t,{name:o,mimeType:i,data:l}=n.attrs,u=s&&r.editable;let c;e[0]!==i?(c=i.startsWith("image/"),e[0]=i,e[1]=c):c=e[1];const m=c,d=u&&"outline-2 outline-blue-300 outline-offset-0";let f;e[2]!==d?(f=q("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light","bg-muted text-muted-foreground",d),e[2]=d,e[3]=f):f=e[3];let p;e[4]!==o?(p=a.jsx(nt,{asChild:!0,children:a.jsx("span",{children:o})}),e[4]=o,e[5]=p):p=e[5];let h;e[6]!==l||e[7]!==m||e[8]!==i||e[9]!==o?(h=a.jsx(st,{side:"top",className:"max-w-sm p-1.5",children:m?a.jsx("img",{src:`data:${i};base64,${l}`,alt:o,className:"max-w-full max-h-64 object-contain rounded"}):a.jsxs("div",{className:"text-xs",children:[a.jsx("div",{className:"font-medium",children:o}),a.jsx("div",{className:"text-muted-foreground mt-1",children:i})]})}),e[6]=l,e[7]=m,e[8]=i,e[9]=o,e[10]=h):h=e[10];let g;e[11]!==p||e[12]!==h?(g=a.jsxs(rt,{children:[p,h]}),e[11]=p,e[12]=h,e[13]=g):g=e[13];let x;return e[14]!==f||e[15]!==g?(x=a.jsx(Sa,{className:f,children:g}),e[14]=f,e[15]=g,e[16]=x):x=e[16],x}const Il=fe.create({name:"file",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id")||null,renderHTML:t=>t.id?{"data-id":t.id}:{}},name:{default:null,parseHTML:t=>t.getAttribute("data-name")||null,renderHTML:t=>t.name?{"data-name":t.name}:{}},mimeType:{default:null,parseHTML:t=>t.getAttribute("data-mime-type")||null,renderHTML:t=>t.mimeType?{"data-mime-type":t.mimeType}:{}},size:{default:0,parseHTML:t=>{const e=t.getAttribute("data-size");return e?Number.parseInt(e,10):0},renderHTML:t=>t.size?{"data-size":String(t.size)}:{}},data:{default:null,parseHTML:t=>t.getAttribute("data-data")||null,renderHTML:t=>t.data?{"data-data":t.data}:{}}}},parseHTML(){return[{tag:'span[data-type="file"]'}]},renderHTML({node:t,HTMLAttributes:e}){const n={"data-type":"file"};return t.attrs.id&&(n["data-id"]=t.attrs.id),t.attrs.name&&(n["data-name"]=t.attrs.name),t.attrs.mimeType&&(n["data-mime-type"]=t.attrs.mimeType),t.attrs.size&&(n["data-size"]=String(t.attrs.size)),t.attrs.data&&(n["data-data"]=t.attrs.data),["span",{...e,...n}]},renderText({node:t}){return`[${t.attrs.name??""}]`},addNodeView(){return ka(Al)}});function El(t={}){return new Se({view(e){return new Ll(e,t)}})}class Ll{constructor(e,n){var s;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(s=n.width)!==null&&s!==void 0?s:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let o=i=>{this[r](i)};return e.dom.addEventListener(r,o),{name:r,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,s,r=this.editorView.dom,o=r.getBoundingClientRect(),i=o.width/r.offsetWidth,l=o.height/r.offsetHeight;if(n){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),g=d?h.bottom:h.top;d&&f&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let x=this.width/2*l;s={left:h.left,right:h.right,top:g-x,bottom:g+x}}}}if(!s){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*i;s={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let u=this.editorView.dom.offsetParent;this.element||(this.element=u.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,m;if(!u||u==document.body&&getComputedStyle(u).position=="static")c=-pageXOffset,m=-pageYOffset;else{let d=u.getBoundingClientRect(),f=d.width/u.offsetWidth,p=d.height/u.offsetHeight;c=d.left-u.scrollLeft*f,m=d.top-u.scrollTop*p}this.element.style.left=(s.left-c)/i+"px",this.element.style.top=(s.top-m)/l+"px",this.element.style.width=(s.right-s.left)/i+"px",this.element.style.height=(s.bottom-s.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),s=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),r=s&&s.type.spec.disableDropCursor,o=typeof r=="function"?r(this.editorView,n,e):r;if(n&&!o){let i=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=ja(this.editorView.state.doc,i,this.editorView.dragging.slice);l!=null&&(i=l)}this.setCursor(i),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class oe extends Ct{constructor(e){super(e,e)}map(e,n){let s=e.resolve(n.map(this.head));return oe.valid(s)?new oe(s):Ct.near(s)}content(){return lo.empty}eq(e){return e instanceof oe&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new oe(e.resolve(n.pos))}getBookmark(){return new Ps(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!Ml(e)||!Rl(e))return!1;let s=n.type.spec.allowGapCursor;if(s!=null)return s;let r=n.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,n,s=!1){e:for(;;){if(!s&&oe.valid(e))return e;let r=e.pos,o=null;for(let i=e.depth;;i--){let l=e.node(i);if(n>0?e.indexAfter(i)<l.childCount:e.index(i)>0){o=l.child(n>0?e.indexAfter(i):e.index(i)-1);break}else if(i==0)return null;r+=n;let u=e.doc.resolve(r);if(oe.valid(u))return u}for(;;){let i=n>0?o.firstChild:o.lastChild;if(!i){if(o.isAtom&&!o.isText&&!Es.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*n),s=!1;continue e}break}o=i,r+=n;let l=e.doc.resolve(r);if(oe.valid(l))return l}return null}}}oe.prototype.visible=!1;oe.findFrom=oe.findGapCursorFrom;Ct.jsonID("gapcursor",oe);class Ps{constructor(e){this.pos=e}map(e){return new Ps(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return oe.valid(n)?new oe(n):Ct.near(n)}}function So(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function Ml(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),s=t.node(e);if(n==0){if(s.type.spec.isolating)return!0;continue}for(let r=s.child(n-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||So(r.type))return!0;if(r.inlineContent)return!1}}return!0}function Rl(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),s=t.node(e);if(n==s.childCount){if(s.type.spec.isolating)return!0;continue}for(let r=s.child(n);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||So(r.type))return!0;if(r.inlineContent)return!1}}return!0}function Pl(){return new Se({props:{decorations:Hl,createSelectionBetween(t,e,n){return e.pos==n.pos&&oe.valid(n)?new oe(n):null},handleClick:Ol,handleKeyDown:$l,handleDOMEvents:{beforeinput:Dl}}})}const $l=wa({ArrowLeft:$t("horiz",-1),ArrowRight:$t("horiz",1),ArrowUp:$t("vert",-1),ArrowDown:$t("vert",1)});function $t(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(s,r,o){let i=s.selection,l=e>0?i.$to:i.$from,u=i.empty;if(i instanceof Ze){if(!o.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=s.doc.resolve(e>0?l.after():l.before())}let c=oe.findGapCursorFrom(l,e,u);return c?(r&&r(s.tr.setSelection(new oe(c))),!0):!1}}function Ol(t,e,n){if(!t||!t.editable)return!1;let s=t.state.doc.resolve(e);if(!oe.valid(s))return!1;let r=t.posAtCoords({left:n.clientX,top:n.clientY});return r&&r.inside>-1&&Es.isSelectable(t.state.doc.nodeAt(r.inside))?!1:(t.dispatch(t.state.tr.setSelection(new oe(s))),!0)}function Dl(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof oe))return!1;let{$from:n}=t.state.selection,s=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!s)return!1;let r=fr.empty;for(let i=s.length-1;i>=0;i--)r=fr.from(s[i].createAndFill(null,r));let o=t.state.tr.replace(n.pos,n.pos,new lo(r,0,0));return o.setSelection(Ze.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function Hl(t){if(!(t.selection instanceof oe))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Nt.create(t.doc,[Cn.widget(t.selection.head,e,{key:"gapcursor"})])}var Vt=200,le=function(){};le.prototype.append=function(e){return e.length?(e=le.from(e),!this.length&&e||e.length<Vt&&this.leafAppend(e)||this.length<Vt&&e.leafPrepend(this)||this.appendInner(e)):this};le.prototype.prepend=function(e){return e.length?le.from(e).append(this):this};le.prototype.appendInner=function(e){return new zl(this,e)};le.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?le.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};le.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};le.prototype.forEach=function(e,n,s){n===void 0&&(n=0),s===void 0&&(s=this.length),n<=s?this.forEachInner(e,n,s,0):this.forEachInvertedInner(e,n,s,0)};le.prototype.map=function(e,n,s){n===void 0&&(n=0),s===void 0&&(s=this.length);var r=[];return this.forEach(function(o,i){return r.push(e(o,i))},n,s),r};le.from=function(e){return e instanceof le?e:e&&e.length?new jo(e):le.empty};var jo=(function(t){function e(s){t.call(this),this.values=s}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,o){return r==0&&o==this.length?this:new e(this.values.slice(r,o))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,o,i,l){for(var u=o;u<i;u++)if(r(this.values[u],l+u)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,l){for(var u=o-1;u>=i;u--)if(r(this.values[u],l+u)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Vt)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Vt)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(le);le.empty=new jo([]);var zl=(function(t){function e(n,s){t.call(this),this.left=n,this.right=s,this.length=n.length+s.length,this.depth=Math.max(n.depth,s.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(s){return s<this.left.length?this.left.get(s):this.right.get(s-this.left.length)},e.prototype.forEachInner=function(s,r,o,i){var l=this.left.length;if(r<l&&this.left.forEachInner(s,r,Math.min(o,l),i)===!1||o>l&&this.right.forEachInner(s,Math.max(r-l,0),Math.min(this.length,o)-l,i+l)===!1)return!1},e.prototype.forEachInvertedInner=function(s,r,o,i){var l=this.left.length;if(r>l&&this.right.forEachInvertedInner(s,r-l,Math.max(o,l)-l,i+l)===!1||o<l&&this.left.forEachInvertedInner(s,Math.min(r,l),o,i)===!1)return!1},e.prototype.sliceInner=function(s,r){if(s==0&&r==this.length)return this;var o=this.left.length;return r<=o?this.left.slice(s,r):s>=o?this.right.slice(s-o,r-o):this.left.slice(s,o).append(this.right.slice(0,r-o))},e.prototype.leafAppend=function(s){var r=this.right.leafAppend(s);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(s){var r=this.left.leafPrepend(s);if(r)return new e(r,this.right)},e.prototype.appendInner=function(s){return this.left.depth>=Math.max(this.right.depth,s.depth)+1?new e(this.left,new e(this.right,s)):new e(this,s)},e})(le);const Fl=500;class we{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}let r,o;n&&(r=this.remapping(s,this.items.length),o=r.maps.length);let i=e.tr,l,u,c=[],m=[];return this.items.forEach((d,f)=>{if(!d.step){r||(r=this.remapping(s,f+1),o=r.maps.length),o--,m.push(d);return}if(r){m.push(new Ae(d.map));let p=d.step.map(r.slice(o)),h;p&&i.maybeStep(p).doc&&(h=i.mapping.maps[i.mapping.maps.length-1],c.push(new Ae(h,void 0,void 0,c.length+m.length))),o--,h&&r.appendMap(h,o)}else i.maybeStep(d.step);if(d.selection)return l=r?d.selection.map(r.slice(o)):d.selection,u=new we(this.items.slice(0,s).append(m.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:i,selection:l}}addTransform(e,n,s,r){let o=[],i=this.eventCount,l=this.items,u=!r&&l.length?l.get(l.length-1):null;for(let m=0;m<e.steps.length;m++){let d=e.steps[m].invert(e.docs[m]),f=new Ae(e.mapping.maps[m],d,n),p;(p=u&&u.merge(f))&&(f=p,m?o.pop():l=l.slice(0,l.length-1)),o.push(f),n&&(i++,n=void 0),r||(u=f)}let c=i-s.depth;return c>Ul&&(l=Bl(l,c),i-=c),new we(l.append(o),i)}remapping(e,n){let s=new Ta;return this.items.forEach((r,o)=>{let i=r.mirrorOffset!=null&&o-r.mirrorOffset>=e?s.maps.length-r.mirrorOffset:void 0;s.appendMap(r.map,i)},e,n),s}addMaps(e){return this.eventCount==0?this:new we(this.items.append(e.map(n=>new Ae(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let s=[],r=Math.max(0,this.items.length-n),o=e.mapping,i=e.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},r);let u=n;this.items.forEach(f=>{let p=o.getMirror(--u);if(p==null)return;i=Math.min(i,p);let h=o.maps[p];if(f.step){let g=e.steps[p].invert(e.docs[p]),x=f.selection&&f.selection.map(o.slice(u+1,p));x&&l++,s.push(new Ae(h,g,x))}else s.push(new Ae(h))},r);let c=[];for(let f=n;f<i;f++)c.push(new Ae(o.maps[f]));let m=this.items.slice(0,r).append(c).append(s),d=new we(m,l);return d.emptyItemCount()>Fl&&(d=d.compress(this.items.length-s.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),s=n.maps.length,r=[],o=0;return this.items.forEach((i,l)=>{if(l>=e)r.push(i),i.selection&&o++;else if(i.step){let u=i.step.map(n.slice(s)),c=u&&u.getMap();if(s--,c&&n.appendMap(c,s),u){let m=i.selection&&i.selection.map(n.slice(s));m&&o++;let d=new Ae(c.invert(),u,m),f,p=r.length-1;(f=r.length&&r[p].merge(d))?r[p]=f:r.push(d)}}else i.map&&s--},this.items.length,0),new we(le.from(r.reverse()),o)}}we.empty=new we(le.empty,0);function Bl(t,e){let n;return t.forEach((s,r)=>{if(s.selection&&e--==0)return n=r,!1}),t.slice(n)}class Ae{constructor(e,n,s,r){this.map=e,this.step=n,this.selection=s,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Ae(n.getMap().invert(),n,this.selection)}}}class Be{constructor(e,n,s,r,o){this.done=e,this.undone=n,this.prevRanges=s,this.prevTime=r,this.prevComposition=o}}const Ul=20;function Wl(t,e,n,s){let r=n.getMeta(et),o;if(r)return r.historyState;n.getMeta(Gl)&&(t=new Be(t.done,t.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(i&&i.getMeta(et))return i.getMeta(et).redo?new Be(t.done.addTransform(n,void 0,s,Bt(e)),t.undone,gr(n.mapping.maps),t.prevTime,t.prevComposition):new Be(t.done,t.undone.addTransform(n,void 0,s,Bt(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),u=t.prevTime==0||!i&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-s.newGroupDelay||!Kl(n,t.prevRanges)),c=i?Dn(t.prevRanges,n.mapping):gr(n.mapping.maps);return new Be(t.done.addTransform(n,u?e.selection.getBookmark():void 0,s,Bt(e)),we.empty,c,n.time,l??t.prevComposition)}else return(o=n.getMeta("rebased"))?new Be(t.done.rebased(n,o),t.undone.rebased(n,o),Dn(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Be(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Dn(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function Kl(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((s,r)=>{for(let o=0;o<e.length;o+=2)s<=e[o+1]&&r>=e[o]&&(n=!0)}),n}function gr(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((s,r,o,i)=>e.push(o,i));return e}function Dn(t,e){if(!t)return null;let n=[];for(let s=0;s<t.length;s+=2){let r=e.map(t[s],1),o=e.map(t[s+1],-1);r<=o&&n.push(r,o)}return n}function Vl(t,e,n){let s=Bt(e),r=et.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,s);if(!o)return null;let i=o.selection.resolve(o.transform.doc),l=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),r,s),u=new Be(n?l:o.remaining,n?o.remaining:l,null,0,-1);return o.transform.setSelection(i).setMeta(et,{redo:n,historyState:u})}let Hn=!1,xr=null;function Bt(t){let e=t.plugins;if(xr!=e){Hn=!1,xr=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Hn=!0;break}}return Hn}const et=new Te("history"),Gl=new Te("closeHistory");function ql(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Se({key:et,state:{init(){return new Be(we.empty,we.empty,null,0,-1)},apply(e,n,s){return Wl(n,s,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let s=n.inputType,r=s=="historyUndo"?To:s=="historyRedo"?No:null;return!r||!e.editable?!1:(n.preventDefault(),r(e.state,e.dispatch))}}}})}function wo(t,e){return(n,s)=>{let r=et.getState(n);if(!r||(t?r.undone:r.done).eventCount==0)return!1;if(s){let o=Vl(r,n,t);o&&s(e?o.scrollIntoView():o)}return!0}}const To=wo(!1,!0),No=wo(!0,!0);Ne.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=t?.node||this.editor.state.doc;if((t?.mode||this.options.mode)==="textSize"){const s=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(s)}return e.nodeSize},this.storage.words=t=>{const e=t?.node||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new Se({key:new Te("characterCount"),appendTransaction:(e,n,s)=>{if(t)return;const r=this.options.limit;if(r==null||r===0){t=!0;return}const o=this.storage.characters({node:s.doc});if(o>r){const i=o-r,l=0,u=i;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);const c=s.tr.deleteRange(l,u);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const s=this.options.limit;if(!e.docChanged||s===0||s===null||s===void 0)return!0;const r=this.storage.characters({node:n.doc}),o=this.storage.characters({node:e.doc});if(o<=s||r>s&&o>s&&o<=r)return!0;if(r>s&&o>s&&o>r||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,u=o-s,c=l-u,m=l;return e.deleteRange(c,m),!(this.storage.characters({node:e.doc})>s)}})]}});var Xl=Ne.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[El(this.options)]}});Ne.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Se({key:new Te("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:s}=this.editor,{anchor:r}=e,o=[];if(!n||!s)return Nt.create(t,[]);let i=0;this.options.mode==="deepest"&&t.descendants((u,c)=>{if(u.isText)return;if(!(r>=c&&r<=c+u.nodeSize-1))return!1;i+=1});let l=0;return t.descendants((u,c)=>{if(u.isText||!(r>=c&&r<=c+u.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&i-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";o.push(Cn.node(c,c+u.nodeSize,{class:this.options.className}))}),Nt.create(t,o)}}})]}});var Yl=Ne.create({name:"gapCursor",addProseMirrorPlugins(){return[Pl()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Ca(_a(t,"allowGapCursor",n)))!=null?e:null}}}),br="placeholder";function Ql(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var Pp=Ne.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:br,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${Ql(this.options.dataAttribute)}`:`data-${br}`;return[new Se({key:new Te("placeholder"),props:{decorations:({doc:e,selection:n})=>{const s=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=n,o=[];if(!s)return null;const i=this.editor.isEmpty;return e.descendants((l,u)=>{const c=r>=u&&r<=u+l.nodeSize,m=!l.isLeaf&&Na(l);if((c||!this.options.showOnlyCurrent)&&m){const d=[this.options.emptyNodeClass];i&&d.push(this.options.emptyEditorClass);const f=Cn.node(u,u+l.nodeSize,{class:d.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:u,hasAnchor:c}):this.options.placeholder});o.push(f)}return this.options.includeChildren}),Nt.create(e,o)}}})]}});Ne.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new Se({key:new Te("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||co(n.selection)||t.view.dragging?null:Nt.create(n.doc,[Cn.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});function yr({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||e?.type===t}var Jl=Ne.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Te(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",s=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>(this.options.notAfter||[]).concat(n).includes(r.name));return[new Se({key:e,appendTransaction:(r,o,i)=>{const{doc:l,tr:u,schema:c}=i,m=e.getState(i),d=l.content.size,f=c.nodes[n];if(m)return u.insert(d,f.create())},state:{init:(r,o)=>{const i=o.tr.doc.lastChild;return!yr({node:i,types:s})},apply:(r,o)=>{if(!r.docChanged||r.getMeta("__uniqueIDTransaction"))return o;const i=r.doc.lastChild;return!yr({node:i,types:s})}}})]}}),Zl=Ne.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>To(t,e),redo:()=>({state:t,dispatch:e})=>No(t,e)}},addProseMirrorPlugins(){return[ql(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Gt=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...s}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,s,n]},ec=/^\s*>\s$/,tc=fe.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Gt("blockquote",{...ae(this.options.HTMLAttributes,t),children:Gt("slot",{})})},parseMarkdown:(t,e)=>{var n;const s=(n=e.parseBlockChildren)!=null?n:e.parseChildren;return e.createNode("blockquote",void 0,s(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",s=[];return t.content.forEach((r,o)=>{var i,l;const m=((l=(i=e.renderChild)==null?void 0:i.call(e,r,o))!=null?l:e.renderChildren([r])).split(`
|
|
2
2
|
`).map(d=>d.trim()===""?n:`${n} ${d}`);s.push(m.join(`
|
|
3
3
|
`))}),s.join(`
|
|
4
4
|
${n}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as o,C as L,b as T,r as $,B as M,p as N}from"./index-
|
|
1
|
+
import{c as B,j as o,C as L,b as T,r as $,B as M,p as N}from"./index-DZ3hzzf1.js";import{s as q}from"./Plus-BwYAFd19.js";import{i as S}from"./Zap-BsJbp079.js";import{S as D}from"./search-input-D20m0IjW.js";import{P as l}from"./index-BoBOH_Zc.js";import{E as b}from"./empty-state-CiSz3At1.js";import{c as O}from"./use-automations-fFC4EQc3.js";import{c as V}from"./use-navigate-to-agent-CPivegDO.js";import{A as F}from"./automation-list-row-DTtDcco-.js";import{f as G}from"./constants-BHDe7bIw.js";import{u as H}from"./use-virtual-mcp-BLx5NqtM.js";import{R as J}from"./require-capability-DlBK7Ljx.js";import"./SearchMd-C4E_z5AK.js";import"./sidebar-Cc4XVWKB.js";import"./LayoutLeft-Dt7rJY-r.js";import"./use-mobile-C0TUGCBw.js";import"./X-JhcLrxaK.js";import"./tooltip-BLkLB4r7.js";import"./use-mcp-client-BIXuHEwh.js";import"./auth-CKKxsAQR.js";import"./studio-tools-B4JofgO_.js";import"./hooks-y59N0gpi.js";import"./decopilot-sse-pool-v3bamRu-.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-CFnkTG10.js";import"./dropdown-menu-DnbYxaX3.js";import"./ChevronUp-mvRqss9i.js";import"./ChevronRight-BUKoQxxN.js";import"./DotsVertical-DitrZ6w4.js";import"./Stars02-B6BvIKTN.js";import"./Trash01-Cwer5u_n.js";import"./agent-icon-CGx0_9l5.js";import"./AlertCircle-fklrqSW5.js";import"./Tool01-CcxbpsdM.js";import"./ArrowUp-Bdy-0gyO.js";import"./Settings02-D2iJ0Y_1.js";import"./Tool02-O3edpLSO.js";import"./XCircle-Do7Zx-eD.js";import"./ArrowUpRight-D6zDsrnH.js";import"./TrendUp01-dtZF5xAg.js";import"./ZapSquare-DVSX_PUJ.js";import"./ZoomOut-DAawwf0t.js";import"./Users03-BK-DRA0O.js";import"./CheckCircle-BYkf45lM.js";import"./ChevronDown-sgVULpdb.js";import"./Copy01-DLSxZiKr.js";import"./Globe01-CnltMSDk.js";import"./Eye-DR1QNYLF.js";import"./FilterLines-Y38x0Q7Z.js";import"./Star01-nXpwaO4U.js";import"./Globe04-X5sxJeUb.js";import"./SwitchHorizontal01-D4cMfdK_.js";import"./HardDrive-Nu1jIe4l.js";import"./Image01-CSEqtjAN.js";import"./Key01-Dh4DUQLF.js";import"./LinkExternal01-CKHslpvH.js";import"./Monitor01-r0C7odur.js";import"./Sun-DECbKLB_.js";import"./Package-3dsm96jG.js";import"./Palette-DAx6eGU_.js";import"./Play-CJE2nK0g.js";import"./SearchLg-Ci76gxPe.js";import"./Shield01-D52f0rB7.js";import"./Stars01-DZkGi0yh.js";import"./Upload01-C1yFspcl.js";import"./User01-DFGTsbFQ.js";import"./Users01-oR_WIF7g.js";import"./XClose-C9Ve9LT-.js";import"./use-collections-CfZhiJR7.js";import"./use-capability-BSDyr6zM.js";import"./access-gate-B2PcKpQi.js";import"./capability-load-error-DT5FhHrY.js";function K(){const t=B.c(16),{org:i}=L(),{data:w}=O(void 0),u=w===void 0?[]:w,R=H(),k=V(),d=T(),[f,E]=$.useState(""),g=f.toLowerCase(),y=new Map(R.map(Q)),C=u.filter(e=>{if(!g||e.name.toLowerCase().includes(g))return!0;if(e.virtual_mcp_id){const a=y.get(e.virtual_mcp_id);if(a&&a.title.toLowerCase().includes(g))return!0}return!1}),P=(e,a)=>{const A=a&&y.has(a)?a:G(i.id);N("automations_list_row_clicked",{automation_id:e,agent_id:A,source:"settings_automations"}),k(A,{search:{main:"automation:"+e}})};let n;t[0]!==d||t[1]!==i.slug?(n=()=>{N("automations_empty_state_browse_agents_clicked"),d({to:"/$org/settings/agents",params:{org:i.slug}})},t[0]=d,t[1]=i.slug,t[2]=n):n=t[2];const z=n,x=l,h=l,j=l;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(l.Title,{children:"Automations"}),t[3]=p):p=t[3];const _=u.length>0&&o.jsx(D,{value:f,onChange:E,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let r;t[4]!==_?(r=o.jsxs("div",{className:"flex flex-col gap-6",children:[p,_]}),t[4]=_,t[5]=r):r=t[5];const v=u.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{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:o.jsxs(M,{size:"sm",onClick:z,children:[o.jsx(q,{size:14}),"Browse agents"]})})}):C.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${f}"`})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:C.map(e=>o.jsx(F,{automation:e,showAgent:!0,onClick:()=>P(e.id,e.virtual_mcp_id)},e.id))});let s;t[6]!==j.Body||t[7]!==r||t[8]!==v?(s=o.jsxs(j.Body,{children:[r,v]}),t[6]=j.Body,t[7]=r,t[8]=v,t[9]=s):s=t[9];let m;t[10]!==h.Content||t[11]!==s?(m=o.jsx(h.Content,{children:s}),t[10]=h.Content,t[11]=s,t[12]=m):m=t[12];let c;return t[13]!==x||t[14]!==m?(c=o.jsx(x,{children:m}),t[13]=x,t[14]=m,t[15]=c):c=t[15],c}function Q(t){return[t.id,t]}function go(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(J,{capability:"automations:manage",area:"automations",children:o.jsx(K,{})}),t[0]=i):i=t[0],i}export{go as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as a}from"./index-
|
|
1
|
+
import{D as a}from"./index-DZ3hzzf1.js";const i=1e4,m="true";function s(e,t){return a.chatAutosend(e,t)}function d(e){return e==="pending"||e==="sending"}function c(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}return!t||typeof t!="object"||typeof t.createdAt!="number"||typeof t.message!="object"||!d(t.status)?null:t}function A(e,t,r,o,u=Date.now()){const n={message:o,createdAt:u,status:"pending"};return e.setItem(s(t,r),JSON.stringify(n)),n}function f(e,t,r){const o=s(t,r),u=c(e.getItem(o));return u||(e.removeItem(o),null)}function S(e,t,r,o=Date.now()){const u=s(t,r),n=f(e,t,r);return!n||n.status!=="pending"?null:o-n.createdAt>=i?(e.removeItem(u),null):(e.setItem(u,JSON.stringify({...n,status:"sending"})),{message:n.message,createdAt:n.createdAt})}function p(e,t,r){e.removeItem(s(t,r))}export{m as A,p as a,S as c,A as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,l as m,bC as R,cI as S,cJ as V,cK as $}from"./index-
|
|
1
|
+
import{c as k,j as i,l as m,bC as R,cI as S,cJ as V,cK as $}from"./index-DZ3hzzf1.js";import{s as O}from"./User01-DFGTsbFQ.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=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($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=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(S,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=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(V,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const I=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=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 J(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const f=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==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]!==z||e[23]!==f||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:m(_({objectFit:u}))}),i.jsx(M,{className:m(z,"rounded-none"),delayMs:l?600:0,children:f})]}),e[22]=z,e[23]=f,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function K(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,x=h??"base";let f;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==l?(f=i.jsx(J,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=f):f=e[17],f}K.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{K as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,l as u,j as g,bd as v,bC as b}from"./index-
|
|
1
|
+
import{c as l,l as u,j as g,bd as v,bC as b}from"./index-DZ3hzzf1.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=l.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=u(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,3 +1,3 @@
|
|
|
1
|
-
import{c as _,r as q,l as K,j as o}from"./index-DReyQJhS.js";import{C as Ne,I as ke,D as Se,E as we,r as Ae,S as Be,F as _e,H as Ie,J as Te,K as $e,L as ue,M as Re,P as Le,N as Pe,O as De,Q as Ee,R as Oe,T as ze,U as Ue}from"./index-vooJ8VyQ.js";import{V as Fe,C as He,a6 as Je,a7 as Me,a8 as Ve}from"./agent-icon-BG65vjC8.js";import{s as ve}from"./Plus-DMcDeR2O.js";import{e as fe,a as Ge,b as qe,C as Ke,d as Qe,c as Ye}from"./command-nziav2Ng.js";import{P as We,a as Xe,b as Ze}from"./popover-DQmcz-_k.js";import{a as et}from"./Copy01-BJat5cCG.js";import{b as tt}from"./ZoomOut-CNfLP3ZT.js";import{s as ae}from"./Trash01-XMTBr_uz.js";import{b as lt}from"./XCircle-XGtkRPkY.js";import{u as st,d as ot}from"./calendar--6aewHah.js";import{c as rt}from"./automation-runs-Bg2SX1VM.js";import{I as O,F as de,T as se,s as w,p as W,R as X,A as Q}from"./primitives-B-NmwMIq.js";import{i as nt}from"./ChevronUp-e8x5mNTq.js";import{L as le}from"./label-3BIRhfQS.js";const oe=g=>typeof g=="string"?g:"",it=/\/blog\.tsx?$/;function ye(g,e){for(const[t,i]of Object.entries(g)){if(t.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const l=i;if(typeof l.__resolveType!="string"||!it.test(l.__resolveType))continue;const c=oe(l[e]);if(c)return c}return null}function at(g){return ye(g,"pageSlug")}function ct(g){return ye(g,"categorySlug")}function dt(g){const e=g.categories;if(!Array.isArray(e)||e.length===0)return"";const t=e[0];return oe(t?.slug)}function ut(g,e){let t=g;if(/:category\??/.test(t)){if(!e.category)return null;t=t.replace(/:category\??/g,encodeURIComponent(e.category))}if(/:slug\??/.test(t)){if(!e.slug)return null;t=t.replace(/:slug\??/g,encodeURIComponent(e.slug))}return t}const ft=/:(?:categorySlug|category|slug)\??/,mt=/:(?:categorySlug|category|slug)\??/g;function pt(g,e){return ft.test(g)?e?g.replace(mt,encodeURIComponent(e)):null:g}function gl({decofile:g,category:e,previewBaseUrl:t}){if(!t)return null;const i=ct(g);if(!i)return null;const l=pt(i,oe(e.slug));if(!l)return null;try{return new URL(l,t).href}catch{return null}}function xl({decofile:g,post:e,previewBaseUrl:t}){if(!t)return null;const i=at(g);if(!i)return null;const l=ut(i,{category:dt(e),slug:oe(e.slug)});if(!l)return null;try{return new URL(l,t).href}catch{return null}}const me={app:"Blocks",site:"Custom blocks"};function gt(g){const e=_.c(6),{iconName:t,iconUrl:i,alt:l}=g;let c;e[0]!==t?(c=He(t)??Fe,e[0]=t,e[1]=c):c=e[1];const p=c;let f;return e[2]!==p||e[3]!==l||e[4]!==i?(f=o.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md border bg-muted",children:i?o.jsx("img",{src:i,alt:l,className:"size-5 object-contain"}):o.jsx(p,{size:16,className:"text-muted-foreground"})}),e[2]=p,e[3]=l,e[4]=i,e[5]=f):f=e[5],f}function pe(g){const e=_.c(19),{type:t,onInsert:i}=g,l=`${t.title} ${t.resolveType} ${t.description??""}`;let c;e[0]!==i||e[1]!==t.resolveType?(c=()=>i(t.resolveType),e[0]=i,e[1]=t.resolveType,e[2]=c):c=e[2];let p;e[3]!==t.iconName||e[4]!==t.iconUrl||e[5]!==t.title?(p=o.jsx(gt,{iconName:t.iconName,iconUrl:t.iconUrl,alt:t.title}),e[3]=t.iconName,e[4]=t.iconUrl,e[5]=t.title,e[6]=p):p=e[6];let f;e[7]!==t.title?(f=o.jsx("span",{className:"text-sm font-medium",children:t.title}),e[7]=t.title,e[8]=f):f=e[8];let a;e[9]!==t.description?(a=t.description&&o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[9]=t.description,e[10]=a):a=e[10];let m;e[11]!==f||e[12]!==a?(m=o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[f,a]}),e[11]=f,e[12]=a,e[13]=m):m=e[13];let d;return e[14]!==l||e[15]!==c||e[16]!==p||e[17]!==m?(d=o.jsxs(Ge,{value:l,onSelect:c,className:"flex items-center gap-2.5",children:[p,m]}),e[14]=l,e[15]=c,e[16]=p,e[17]=m,e[18]=d):d=e[18],d}function ge(g){const e=_.c(28),{blockTypes:t,onInsert:i,alwaysShow:l}=g,c=l===void 0?!1:l,[p,f]=q.useState(!1);let a,m;if(e[0]!==t){a=[],m=[];for(const S of t)(S.source==="site"?m:a).push(S);e[0]=t,e[1]=a,e[2]=m}else a=e[1],m=e[2];let d;e[3]!==i?(d=S=>{i(S),f(!1)},e[3]=i,e[4]=d):d=e[4];const h=d,s=a.length>0&&m.length>0,r=c?"h-10":"";let n;e[5]!==r?(n=K("group/insert relative flex h-6 items-center justify-center",r),e[5]=r,e[6]=n):n=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-border"}),e[7]=u):u=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(We,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":"Insert block",className:"relative z-10 flex h-6 w-6 items-center justify-center rounded-full border bg-background text-muted-foreground transition-all hover:border-primary hover:text-primary cursor-pointer",children:o.jsx(ve,{size:14})})}),e[8]=x):x=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(qe,{placeholder:"Search blocks…"}),e[9]=b):b=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(Ke,{children:"No blocks found."}),e[10]=y):y=e[10];let v;e[11]!==h||e[12]!==s||e[13]!==m?(v=m.length>0&&o.jsx(fe,{heading:s?me.site:void 0,children:m.map(S=>o.jsx(pe,{type:S,onInsert:h},S.resolveType))}),e[11]=h,e[12]=s,e[13]=m,e[14]=v):v=e[14];let j;e[15]!==a||e[16]!==h||e[17]!==s?(j=a.length>0&&o.jsx(fe,{heading:s?me.app:void 0,children:a.map(S=>o.jsx(pe,{type:S,onInsert:h},S.resolveType))}),e[15]=a,e[16]=h,e[17]=s,e[18]=j):j=e[18];let k;e[19]!==j||e[20]!==v?(k=o.jsx(Xe,{className:"w-80 p-0",align:"center",children:o.jsxs(Qe,{children:[b,o.jsxs(Ye,{className:"max-h-80",children:[y,v,j]})]})}),e[19]=j,e[20]=v,e[21]=k):k=e[21];let C;e[22]!==p||e[23]!==k?(C=o.jsxs(Ze,{open:p,onOpenChange:f,children:[x,k]}),e[22]=p,e[23]=k,e[24]=C):C=e[24];let N;return e[25]!==C||e[26]!==n?(N=o.jsxs("div",{className:n,children:[u,C]}),e[25]=C,e[26]=n,e[27]=N):N=e[27],N}function xt({html:g,placeholder:e,onChange:t}){const i=q.useRef(t);i.current=t;const l=st({extensions:[rt.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,bulletList:!1,orderedList:!1,listItem:!1,dropcursor:!1,gapcursor:!1}),Ne.configure({placeholder:e??"Write something…"})],content:g||"",editorProps:{attributes:{class:K("prose prose-sm dark:prose-invert max-w-none focus:outline-none","leading-relaxed [&_p]:my-0")}},onUpdate:({editor:c})=>{const p=c.getHTML();i.current(p==="<p></p>"?"":p)}});return l?o.jsxs("div",{className:"relative",children:[l.isFocused&&o.jsxs("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:[o.jsx(te,{active:l.isActive("bold"),label:"Bold",onClick:()=>l.chain().focus().toggleBold().run(),children:o.jsx(Je,{size:14})}),o.jsx(te,{active:l.isActive("italic"),label:"Italic",onClick:()=>l.chain().focus().toggleItalic().run(),children:o.jsx(Me,{size:14})}),o.jsx(te,{active:l.isActive("underline"),label:"Underline",onClick:()=>l.chain().focus().toggleUnderline().run(),children:o.jsx(Ve,{size:14})}),o.jsx(te,{active:l.isActive("link"),label:"Link",onClick:()=>{const c=l.getAttributes("link").href,p=window.prompt("Link URL",c??"https://");p!==null&&(p===""?l.chain().focus().unsetLink().run():l.chain().focus().setLink({href:p}).run())},children:o.jsx(lt,{size:14})})]}),o.jsx(ot,{editor:l,className:"text-[15px] text-foreground"})]}):null}function te(g){const e=_.c(8),{active:t,label:i,onClick:l,children:c}=g,p=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let f;e[0]!==p?(f=K("flex h-7 w-7 items-center justify-center rounded transition-colors cursor-pointer",p),e[0]=p,e[1]=f):f=e[1];let a;return e[2]!==t||e[3]!==c||e[4]!==i||e[5]!==l||e[6]!==f?(a=o.jsx("button",{type:"button","aria-label":i,"aria-pressed":t,onMouseDown:ht,onClick:l,className:f,children:c}),e[2]=t,e[3]=c,e[4]=i,e[5]=l,e[6]=f,e[7]=a):a=e[7],a}function ht(g){return g.preventDefault()}const bt=["1","2","3"],xe={1:"text-3xl font-bold",2:"text-2xl font-bold",3:"text-xl font-semibold",4:"text-lg font-semibold",5:"text-base font-semibold",6:"text-sm font-semibold"};function vt(g){const e=_.c(19),{text:t,level:i,onChange:l}=g,[c,p]=q.useState(!1),f=i||"2";let a;e[0]!==c||e[1]!==f||e[2]!==l||e[3]!==t?(a=c&&o.jsx(de,{children:bt.map(x=>o.jsxs(se,{active:f===x,label:`Heading ${x}`,onClick:()=>l({text:t,level:x}),children:["H",x]},x))}),e[0]=c,e[1]=f,e[2]=l,e[3]=t,e[4]=a):a=e[4];let m;e[5]!==f||e[6]!==l?(m=x=>l({text:x,level:f}),e[5]=f,e[6]=l,e[7]=m):m=e[7];let d,h;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=()=>p(!0),h=()=>p(!1),e[8]=d,e[9]=h):(d=e[8],h=e[9]);const s=xe[f]??xe[2];let r;e[10]!==s?(r=K("text-foreground",s),e[10]=s,e[11]=r):r=e[11];let n;e[12]!==m||e[13]!==r||e[14]!==t?(n=o.jsx(O,{value:t,onChange:m,onFocus:d,onBlur:h,placeholder:"Heading",className:r}),e[12]=m,e[13]=r,e[14]=t,e[15]=n):n=e[15];let u;return e[16]!==a||e[17]!==n?(u=o.jsxs("div",{className:"relative",children:[a,n]}),e[16]=a,e[17]=n,e[18]=u):u=e[18],u}function yt(g){const e=_.c(3),{quote:t,onChange:i}=g;let l;return e[0]!==i||e[1]!==t?(l=o.jsx("div",{className:"border-l-2 border-foreground/30 pl-4",children:o.jsx(O,{value:t,onChange:i,placeholder:"Quote",className:"text-lg italic text-foreground/90"})}),e[0]=i,e[1]=t,e[2]=l):l=e[2],l}function jt(g){const e=_.c(15),{code:t,language:i,onChange:l}=g;let c;e[0]!==t||e[1]!==l?(c=d=>l({code:t,language:d.target.value}),e[0]=t,e[1]=l,e[2]=c):c=e[2];let p;e[3]!==i||e[4]!==c?(p=o.jsx("input",{value:i,onChange:c,placeholder:"language",className:"w-full border-b bg-transparent px-3 py-1.5 font-mono text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50"}),e[3]=i,e[4]=c,e[5]=p):p=e[5];let f;e[6]!==i||e[7]!==l?(f=d=>l({code:d,language:i}),e[6]=i,e[7]=l,e[8]=f):f=e[8];let a;e[9]!==t||e[10]!==f?(a=o.jsx(O,{value:t,onChange:f,placeholder:"Code",spellCheck:!1,className:"px-3 py-2.5 font-mono text-sm text-foreground"}),e[9]=t,e[10]=f,e[11]=a):a=e[11];let m;return e[12]!==p||e[13]!==a?(m=o.jsxs("div",{className:"overflow-hidden rounded-md border bg-muted/50",children:[p,a]}),e[12]=p,e[13]=a,e[14]=m):m=e[14],m}function Ct(g){const e=_.c(17),{items:t,style:i,onChange:l}=g,c=i==="ordered",p=t.length?t.split(`
|
|
1
|
+
import{c as _,r as q,l as K,j as o}from"./index-DZ3hzzf1.js";import{C as Ne,I as ke,D as Se,E as we,r as Ae,S as Be,F as _e,H as Ie,J as Te,K as $e,L as ue,M as Re,P as Le,N as Pe,O as De,Q as Ee,R as Oe,T as ze,U as Ue}from"./index-Qi63FtON.js";import{V as Fe,C as He,a6 as Je,a7 as Me,a8 as Ve}from"./agent-icon-CGx0_9l5.js";import{s as ve}from"./Plus-BwYAFd19.js";import{e as fe,a as Ge,b as qe,C as Ke,d as Qe,c as Ye}from"./command-DsH5vUBI.js";import{P as We,a as Xe,b as Ze}from"./popover-BIkriKI7.js";import{a as et}from"./Copy01-DLSxZiKr.js";import{b as tt}from"./ZoomOut-DAawwf0t.js";import{s as ae}from"./Trash01-Cwer5u_n.js";import{b as lt}from"./XCircle-Do7Zx-eD.js";import{u as st,d as ot}from"./calendar-Do7G6Kxp.js";import{c as rt}from"./automation-runs-BGZr5t8h.js";import{I as O,F as de,T as se,s as w,p as W,R as X,A as Q}from"./primitives-DlQu8ea0.js";import{i as nt}from"./ChevronUp-mvRqss9i.js";import{L as le}from"./label-BlLucFOT.js";const oe=g=>typeof g=="string"?g:"",it=/\/blog\.tsx?$/;function ye(g,e){for(const[t,i]of Object.entries(g)){if(t.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const l=i;if(typeof l.__resolveType!="string"||!it.test(l.__resolveType))continue;const c=oe(l[e]);if(c)return c}return null}function at(g){return ye(g,"pageSlug")}function ct(g){return ye(g,"categorySlug")}function dt(g){const e=g.categories;if(!Array.isArray(e)||e.length===0)return"";const t=e[0];return oe(t?.slug)}function ut(g,e){let t=g;if(/:category\??/.test(t)){if(!e.category)return null;t=t.replace(/:category\??/g,encodeURIComponent(e.category))}if(/:slug\??/.test(t)){if(!e.slug)return null;t=t.replace(/:slug\??/g,encodeURIComponent(e.slug))}return t}const ft=/:(?:categorySlug|category|slug)\??/,mt=/:(?:categorySlug|category|slug)\??/g;function pt(g,e){return ft.test(g)?e?g.replace(mt,encodeURIComponent(e)):null:g}function gl({decofile:g,category:e,previewBaseUrl:t}){if(!t)return null;const i=ct(g);if(!i)return null;const l=pt(i,oe(e.slug));if(!l)return null;try{return new URL(l,t).href}catch{return null}}function xl({decofile:g,post:e,previewBaseUrl:t}){if(!t)return null;const i=at(g);if(!i)return null;const l=ut(i,{category:dt(e),slug:oe(e.slug)});if(!l)return null;try{return new URL(l,t).href}catch{return null}}const me={app:"Blocks",site:"Custom blocks"};function gt(g){const e=_.c(6),{iconName:t,iconUrl:i,alt:l}=g;let c;e[0]!==t?(c=He(t)??Fe,e[0]=t,e[1]=c):c=e[1];const p=c;let f;return e[2]!==p||e[3]!==l||e[4]!==i?(f=o.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md border bg-muted",children:i?o.jsx("img",{src:i,alt:l,className:"size-5 object-contain"}):o.jsx(p,{size:16,className:"text-muted-foreground"})}),e[2]=p,e[3]=l,e[4]=i,e[5]=f):f=e[5],f}function pe(g){const e=_.c(19),{type:t,onInsert:i}=g,l=`${t.title} ${t.resolveType} ${t.description??""}`;let c;e[0]!==i||e[1]!==t.resolveType?(c=()=>i(t.resolveType),e[0]=i,e[1]=t.resolveType,e[2]=c):c=e[2];let p;e[3]!==t.iconName||e[4]!==t.iconUrl||e[5]!==t.title?(p=o.jsx(gt,{iconName:t.iconName,iconUrl:t.iconUrl,alt:t.title}),e[3]=t.iconName,e[4]=t.iconUrl,e[5]=t.title,e[6]=p):p=e[6];let f;e[7]!==t.title?(f=o.jsx("span",{className:"text-sm font-medium",children:t.title}),e[7]=t.title,e[8]=f):f=e[8];let a;e[9]!==t.description?(a=t.description&&o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[9]=t.description,e[10]=a):a=e[10];let m;e[11]!==f||e[12]!==a?(m=o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[f,a]}),e[11]=f,e[12]=a,e[13]=m):m=e[13];let d;return e[14]!==l||e[15]!==c||e[16]!==p||e[17]!==m?(d=o.jsxs(Ge,{value:l,onSelect:c,className:"flex items-center gap-2.5",children:[p,m]}),e[14]=l,e[15]=c,e[16]=p,e[17]=m,e[18]=d):d=e[18],d}function ge(g){const e=_.c(28),{blockTypes:t,onInsert:i,alwaysShow:l}=g,c=l===void 0?!1:l,[p,f]=q.useState(!1);let a,m;if(e[0]!==t){a=[],m=[];for(const S of t)(S.source==="site"?m:a).push(S);e[0]=t,e[1]=a,e[2]=m}else a=e[1],m=e[2];let d;e[3]!==i?(d=S=>{i(S),f(!1)},e[3]=i,e[4]=d):d=e[4];const h=d,s=a.length>0&&m.length>0,r=c?"h-10":"";let n;e[5]!==r?(n=K("group/insert relative flex h-6 items-center justify-center",r),e[5]=r,e[6]=n):n=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-border"}),e[7]=u):u=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(We,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":"Insert block",className:"relative z-10 flex h-6 w-6 items-center justify-center rounded-full border bg-background text-muted-foreground transition-all hover:border-primary hover:text-primary cursor-pointer",children:o.jsx(ve,{size:14})})}),e[8]=x):x=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(qe,{placeholder:"Search blocks…"}),e[9]=b):b=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(Ke,{children:"No blocks found."}),e[10]=y):y=e[10];let v;e[11]!==h||e[12]!==s||e[13]!==m?(v=m.length>0&&o.jsx(fe,{heading:s?me.site:void 0,children:m.map(S=>o.jsx(pe,{type:S,onInsert:h},S.resolveType))}),e[11]=h,e[12]=s,e[13]=m,e[14]=v):v=e[14];let j;e[15]!==a||e[16]!==h||e[17]!==s?(j=a.length>0&&o.jsx(fe,{heading:s?me.app:void 0,children:a.map(S=>o.jsx(pe,{type:S,onInsert:h},S.resolveType))}),e[15]=a,e[16]=h,e[17]=s,e[18]=j):j=e[18];let k;e[19]!==j||e[20]!==v?(k=o.jsx(Xe,{className:"w-80 p-0",align:"center",children:o.jsxs(Qe,{children:[b,o.jsxs(Ye,{className:"max-h-80",children:[y,v,j]})]})}),e[19]=j,e[20]=v,e[21]=k):k=e[21];let C;e[22]!==p||e[23]!==k?(C=o.jsxs(Ze,{open:p,onOpenChange:f,children:[x,k]}),e[22]=p,e[23]=k,e[24]=C):C=e[24];let N;return e[25]!==C||e[26]!==n?(N=o.jsxs("div",{className:n,children:[u,C]}),e[25]=C,e[26]=n,e[27]=N):N=e[27],N}function xt({html:g,placeholder:e,onChange:t}){const i=q.useRef(t);i.current=t;const l=st({extensions:[rt.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,bulletList:!1,orderedList:!1,listItem:!1,dropcursor:!1,gapcursor:!1}),Ne.configure({placeholder:e??"Write something…"})],content:g||"",editorProps:{attributes:{class:K("prose prose-sm dark:prose-invert max-w-none focus:outline-none","leading-relaxed [&_p]:my-0")}},onUpdate:({editor:c})=>{const p=c.getHTML();i.current(p==="<p></p>"?"":p)}});return l?o.jsxs("div",{className:"relative",children:[l.isFocused&&o.jsxs("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:[o.jsx(te,{active:l.isActive("bold"),label:"Bold",onClick:()=>l.chain().focus().toggleBold().run(),children:o.jsx(Je,{size:14})}),o.jsx(te,{active:l.isActive("italic"),label:"Italic",onClick:()=>l.chain().focus().toggleItalic().run(),children:o.jsx(Me,{size:14})}),o.jsx(te,{active:l.isActive("underline"),label:"Underline",onClick:()=>l.chain().focus().toggleUnderline().run(),children:o.jsx(Ve,{size:14})}),o.jsx(te,{active:l.isActive("link"),label:"Link",onClick:()=>{const c=l.getAttributes("link").href,p=window.prompt("Link URL",c??"https://");p!==null&&(p===""?l.chain().focus().unsetLink().run():l.chain().focus().setLink({href:p}).run())},children:o.jsx(lt,{size:14})})]}),o.jsx(ot,{editor:l,className:"text-[15px] text-foreground"})]}):null}function te(g){const e=_.c(8),{active:t,label:i,onClick:l,children:c}=g,p=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let f;e[0]!==p?(f=K("flex h-7 w-7 items-center justify-center rounded transition-colors cursor-pointer",p),e[0]=p,e[1]=f):f=e[1];let a;return e[2]!==t||e[3]!==c||e[4]!==i||e[5]!==l||e[6]!==f?(a=o.jsx("button",{type:"button","aria-label":i,"aria-pressed":t,onMouseDown:ht,onClick:l,className:f,children:c}),e[2]=t,e[3]=c,e[4]=i,e[5]=l,e[6]=f,e[7]=a):a=e[7],a}function ht(g){return g.preventDefault()}const bt=["1","2","3"],xe={1:"text-3xl font-bold",2:"text-2xl font-bold",3:"text-xl font-semibold",4:"text-lg font-semibold",5:"text-base font-semibold",6:"text-sm font-semibold"};function vt(g){const e=_.c(19),{text:t,level:i,onChange:l}=g,[c,p]=q.useState(!1),f=i||"2";let a;e[0]!==c||e[1]!==f||e[2]!==l||e[3]!==t?(a=c&&o.jsx(de,{children:bt.map(x=>o.jsxs(se,{active:f===x,label:`Heading ${x}`,onClick:()=>l({text:t,level:x}),children:["H",x]},x))}),e[0]=c,e[1]=f,e[2]=l,e[3]=t,e[4]=a):a=e[4];let m;e[5]!==f||e[6]!==l?(m=x=>l({text:x,level:f}),e[5]=f,e[6]=l,e[7]=m):m=e[7];let d,h;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=()=>p(!0),h=()=>p(!1),e[8]=d,e[9]=h):(d=e[8],h=e[9]);const s=xe[f]??xe[2];let r;e[10]!==s?(r=K("text-foreground",s),e[10]=s,e[11]=r):r=e[11];let n;e[12]!==m||e[13]!==r||e[14]!==t?(n=o.jsx(O,{value:t,onChange:m,onFocus:d,onBlur:h,placeholder:"Heading",className:r}),e[12]=m,e[13]=r,e[14]=t,e[15]=n):n=e[15];let u;return e[16]!==a||e[17]!==n?(u=o.jsxs("div",{className:"relative",children:[a,n]}),e[16]=a,e[17]=n,e[18]=u):u=e[18],u}function yt(g){const e=_.c(3),{quote:t,onChange:i}=g;let l;return e[0]!==i||e[1]!==t?(l=o.jsx("div",{className:"border-l-2 border-foreground/30 pl-4",children:o.jsx(O,{value:t,onChange:i,placeholder:"Quote",className:"text-lg italic text-foreground/90"})}),e[0]=i,e[1]=t,e[2]=l):l=e[2],l}function jt(g){const e=_.c(15),{code:t,language:i,onChange:l}=g;let c;e[0]!==t||e[1]!==l?(c=d=>l({code:t,language:d.target.value}),e[0]=t,e[1]=l,e[2]=c):c=e[2];let p;e[3]!==i||e[4]!==c?(p=o.jsx("input",{value:i,onChange:c,placeholder:"language",className:"w-full border-b bg-transparent px-3 py-1.5 font-mono text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50"}),e[3]=i,e[4]=c,e[5]=p):p=e[5];let f;e[6]!==i||e[7]!==l?(f=d=>l({code:d,language:i}),e[6]=i,e[7]=l,e[8]=f):f=e[8];let a;e[9]!==t||e[10]!==f?(a=o.jsx(O,{value:t,onChange:f,placeholder:"Code",spellCheck:!1,className:"px-3 py-2.5 font-mono text-sm text-foreground"}),e[9]=t,e[10]=f,e[11]=a):a=e[11];let m;return e[12]!==p||e[13]!==a?(m=o.jsxs("div",{className:"overflow-hidden rounded-md border bg-muted/50",children:[p,a]}),e[12]=p,e[13]=a,e[14]=m):m=e[14],m}function Ct(g){const e=_.c(17),{items:t,style:i,onChange:l}=g,c=i==="ordered",p=t.length?t.split(`
|
|
2
2
|
`):[""],[f,a]=q.useState(!1),m=q.useRef([]);let d;e[0]!==l||e[1]!==i?(d=k=>l({items:k.join(`
|
|
3
3
|
`),style:i}),e[0]=l,e[1]=i,e[2]=d):d=e[2];const h=d,s=(k,C)=>requestAnimationFrame(()=>{const N=m.current[k];if(!N)return;N.focus();const S=C==="end"?N.value.length:0;N.setSelectionRange(S,S)}),r="relative";let n,u;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=()=>a(!0),u=k=>{k.currentTarget.contains(k.relatedTarget)||a(!1)},e[3]=n,e[4]=u):(n=e[3],u=e[4]);let x;e[5]!==f||e[6]!==t||e[7]!==l||e[8]!==c?(x=f&&o.jsxs(de,{children:[o.jsx(se,{active:!c,label:"Bulleted",onClick:()=>l({items:t,style:"unordered"}),children:"•"}),o.jsx(se,{active:c,label:"Numbered",onClick:()=>l({items:t,style:"ordered"}),children:"1."})]}),e[5]=f,e[6]=t,e[7]=l,e[8]=c,e[9]=x):x=e[9];const b="space-y-1",y=p.map((k,C)=>o.jsxs("li",{className:"flex items-start gap-2.5",children:[o.jsx("span",{className:"min-w-5 shrink-0 select-none pt-px text-right text-[15px] leading-relaxed text-muted-foreground tabular-nums",children:c?`${C+1}.`:"•"}),o.jsx(O,{inputRef:N=>{m.current[C]=N},value:k,onChange:N=>{const S=[...p];S[C]=N,h(S)},onKeyDown:N=>{const S=N.currentTarget;if(N.key==="Enter"){N.preventDefault();const T=[...p];T.splice(C+1,0,""),h(T),s(C+1,"start")}else N.key==="Backspace"&&k===""&&p.length>1?(N.preventDefault(),h(p.filter((T,A)=>A!==C)),s(Math.max(0,C-1),"end")):N.key==="ArrowUp"&&S.selectionStart===0&&C>0?(N.preventDefault(),s(C-1,"end")):N.key==="ArrowDown"&&S.selectionEnd===k.length&&C<p.length-1&&(N.preventDefault(),s(C+1,"end"))},placeholder:"List item",className:"text-[15px] leading-relaxed text-foreground"})]},C));let v;e[10]!==y?(v=o.jsx("ul",{className:b,children:y}),e[10]=y,e[11]=v):v=e[11];let j;return e[12]!==n||e[13]!==u||e[14]!==x||e[15]!==v?(j=o.jsxs("div",{className:r,onFocus:n,onBlur:u,children:[x,v]}),e[12]=n,e[13]=u,e[14]=x,e[15]=v,e[16]=j):j=e[16],j}function Nt(g){const e=_.c(37),{block:t,onChange:i}=g;let l;e[0]!==t.size?(l=w(t.size)||"normal",e[0]=t.size,e[1]=l):l=e[1];const c=l;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p={type:"string",format:"image-uri",title:"Image"},e[2]=p):p=e[2];let f;e[3]!==t||e[4]!==i?(f=v=>i({...t,url:v}),e[3]=t,e[4]=i,e[5]=f):f=e[5];let a;e[6]!==t.url||e[7]!==f?(a=o.jsx(ke,{schema:p,value:t.url,onChange:f,path:"block-image-url",label:"Image"}),e[6]=t.url,e[7]=f,e[8]=a):a=e[8];let m;e[9]!==t.caption?(m=w(t.caption),e[9]=t.caption,e[10]=m):m=e[10];let d;e[11]!==t||e[12]!==i?(d=v=>i({...t,caption:v}),e[11]=t,e[12]=i,e[13]=d):d=e[13];let h;e[14]!==m||e[15]!==d?(h=o.jsx(O,{value:m,onChange:d,placeholder:"Add a caption…",className:"text-center text-sm italic text-muted-foreground"}),e[14]=m,e[15]=d,e[16]=h):h=e[16];let s;e[17]===Symbol.for("react.memo_cache_sentinel")?(s=["normal","full"],e[17]=s):s=e[17];let r;e[18]!==t||e[19]!==i||e[20]!==c?(r=o.jsx("div",{className:"flex items-center gap-1",children:s.map(v=>o.jsx("button",{type:"button",onClick:()=>i({...t,size:v}),className:K("rounded px-2 py-0.5 transition-colors cursor-pointer",c===v?"bg-accent text-accent-foreground":"hover:bg-muted"),children:v==="full"?"Full width":"Normal"},v))}),e[18]=t,e[19]=i,e[20]=c,e[21]=r):r=e[21];let n;e[22]!==t.alt?(n=w(t.alt),e[22]=t.alt,e[23]=n):n=e[23];let u;e[24]!==t||e[25]!==i?(u=v=>i({...t,alt:v.target.value}),e[24]=t,e[25]=i,e[26]=u):u=e[26];let x;e[27]!==n||e[28]!==u?(x=o.jsx("input",{value:n,onChange:u,placeholder:"Alt text (accessibility)",className:"flex-1 border-0 bg-transparent p-0 text-xs outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[27]=n,e[28]=u,e[29]=x):x=e[29];let b;e[30]!==x||e[31]!==r?(b=o.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[r,x]}),e[30]=x,e[31]=r,e[32]=b):b=e[32];let y;return e[33]!==b||e[34]!==a||e[35]!==h?(y=o.jsxs("div",{className:"space-y-2",children:[a,h,b]}),e[33]=b,e[34]=a,e[35]=h,e[36]=y):y=e[36],y}function kt(g){const e=g.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/)([\w-]{11})/);if(e)return`https://www.youtube.com/embed/${e[1]}`;const t=g.match(/vimeo\.com\/(\d+)/);return t?`https://player.vimeo.com/video/${t[1]}`:null}function St(g){const e=_.c(21),{url:t,caption:i,onChange:l}=g;let c;e[0]!==t?(c=kt(t),e[0]=t,e[1]=c):c=e[1];const p=c;let f;e[2]!==i||e[3]!==p?(f=p?o.jsx("div",{className:"relative aspect-video overflow-hidden rounded-md border bg-muted",children:o.jsx("iframe",{src:p,title:i||"Video",className:"absolute inset-0 h-full w-full border-0",allowFullScreen:!0})}):o.jsx("div",{className:"flex aspect-video items-center justify-center rounded-md border border-dashed bg-muted/40 text-xs text-muted-foreground",children:"Paste a YouTube or Vimeo URL to preview"}),e[2]=i,e[3]=p,e[4]=f):f=e[4];let a;e[5]!==i||e[6]!==l?(a=r=>l({url:r.target.value,caption:i}),e[5]=i,e[6]=l,e[7]=a):a=e[7];let m;e[8]!==a||e[9]!==t?(m=o.jsx("input",{value:t,onChange:a,placeholder:"https://youtube.com/watch?v=…",className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[8]=a,e[9]=t,e[10]=m):m=e[10];let d;e[11]!==l||e[12]!==t?(d=r=>l({url:t,caption:r}),e[11]=l,e[12]=t,e[13]=d):d=e[13];let h;e[14]!==i||e[15]!==d?(h=o.jsx(O,{value:i,onChange:d,placeholder:"Add a caption…",className:"text-center text-sm italic text-muted-foreground"}),e[14]=i,e[15]=d,e[16]=h):h=e[16];let s;return e[17]!==f||e[18]!==m||e[19]!==h?(s=o.jsxs("div",{className:"space-y-2",children:[f,m,h]}),e[17]=f,e[18]=m,e[19]=h,e[20]=s):s=e[20],s}function wt(){const g=_.c(1);let e;return g[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"flex items-center py-3","aria-label":"Divider",children:o.jsx("span",{className:"h-px flex-1 bg-border"})}),g[0]=e):e=g[0],e}function At(g){const e=_.c(16),{text:t,href:i,onChange:l}=g;let c;e[0]!==i||e[1]!==l?(c=h=>l({text:h.target.value,href:i}),e[0]=i,e[1]=l,e[2]=c):c=e[2];const p=Math.max(t.length||11,8);let f;e[3]!==c||e[4]!==p||e[5]!==t?(f=o.jsx("div",{className:"inline-flex items-center rounded-full bg-primary px-6 py-2 text-sm font-semibold text-primary-foreground",children:o.jsx("input",{value:t,onChange:c,placeholder:"Button label",size:p,className:"border-0 bg-transparent p-0 text-center text-sm font-semibold text-primary-foreground outline-none placeholder:text-primary-foreground/60 focus:ring-0"})}),e[3]=c,e[4]=p,e[5]=t,e[6]=f):f=e[6];let a;e[7]!==l||e[8]!==t?(a=h=>l({text:t,href:h.target.value}),e[7]=l,e[8]=t,e[9]=a):a=e[9];let m;e[10]!==i||e[11]!==a?(m=o.jsx("input",{value:i,onChange:a,placeholder:"https://destination-url.com",className:"w-full max-w-sm border-0 bg-transparent p-0 text-center text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[10]=i,e[11]=a,e[12]=m):m=e[12];let d;return e[13]!==f||e[14]!==m?(d=o.jsxs("div",{className:"flex flex-col items-center gap-2 py-2",children:[f,m]}),e[13]=f,e[14]=m,e[15]=d):d=e[15],d}const re=[{value:"info",icon:"ℹ",color:"oklch(0.62 0.19 250)"},{value:"tip",icon:"✓",color:"oklch(0.65 0.17 150)"},{value:"warning",icon:"⚠",color:"oklch(0.75 0.15 75)"},{value:"product",icon:"★",color:"oklch(0.62 0.21 300)"}];function Bt(g){const e=_.c(45),{title:t,body:i,variant:l,onChange:c}=g,[p,f]=q.useState(!1);let a;e[0]!==l?(a=re.find(A=>A.value===l)??re[0],e[0]=l,e[1]=a):a=e[1];const m=a;let d,h;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=()=>f(!0),h=A=>{A.currentTarget.contains(A.relatedTarget)||f(!1)},e[2]=d,e[3]=h):(d=e[2],h=e[3]);let s;e[4]!==i||e[5]!==p||e[6]!==c||e[7]!==t||e[8]!==m.value?(s=p&&o.jsx(de,{children:re.map(A=>o.jsx(se,{active:m.value===A.value,label:A.value,onClick:()=>c({title:t,body:i,variant:A.value}),children:o.jsx("span",{style:{color:A.color},children:A.icon})},A.value))}),e[4]=i,e[5]=p,e[6]=c,e[7]=t,e[8]=m.value,e[9]=s):s=e[9];const r=`3px solid ${m.color}`,n=`color-mix(in oklch, ${m.color} 8%, transparent)`;let u;e[10]!==r||e[11]!==n?(u={borderLeft:r,backgroundColor:n},e[10]=r,e[11]=n,e[12]=u):u=e[12];let x;e[13]!==m.color?(x={color:m.color},e[13]=m.color,e[14]=x):x=e[14];let b;e[15]!==m.icon?(b=o.jsx("span",{"aria-hidden":!0,className:"text-sm font-bold leading-none",children:m.icon}),e[15]=m.icon,e[16]=b):b=e[16];let y;e[17]!==i||e[18]!==c||e[19]!==l?(y=A=>c({title:A.target.value,body:i,variant:l}),e[17]=i,e[18]=c,e[19]=l,e[20]=y):y=e[20];let v;e[21]!==m.color?(v={color:m.color},e[21]=m.color,e[22]=v):v=e[22];let j;e[23]!==y||e[24]!==v||e[25]!==t?(j=o.jsx("input",{value:t,onChange:y,placeholder:"Callout title",className:"flex-1 border-0 bg-transparent p-0 text-xs font-semibold uppercase tracking-wide outline-none focus:ring-0",style:v}),e[23]=y,e[24]=v,e[25]=t,e[26]=j):j=e[26];let k;e[27]!==j||e[28]!==x||e[29]!==b?(k=o.jsxs("div",{className:"mb-1.5 flex items-center gap-2",style:x,children:[b,j]}),e[27]=j,e[28]=x,e[29]=b,e[30]=k):k=e[30];let C;e[31]!==c||e[32]!==t||e[33]!==l?(C=A=>c({title:t,body:A,variant:l}),e[31]=c,e[32]=t,e[33]=l,e[34]=C):C=e[34];let N;e[35]!==i||e[36]!==C?(N=o.jsx(O,{value:i,onChange:C,placeholder:"Callout text…",className:"text-[15px] leading-relaxed text-foreground"}),e[35]=i,e[36]=C,e[37]=N):N=e[37];let S;e[38]!==k||e[39]!==N||e[40]!==u?(S=o.jsxs("div",{className:"rounded-md py-4 pl-5 pr-4",style:u,children:[k,N]}),e[38]=k,e[39]=N,e[40]=u,e[41]=S):S=e[41];let T;return e[42]!==S||e[43]!==s?(T=o.jsxs("div",{className:"relative",onFocus:d,onBlur:h,children:[s,S]}),e[42]=S,e[43]=s,e[44]=T):T=e[44],T}function _t(g){const e=_.c(25),{value:t,label:i,description:l,onChange:c}=g;let p;e[0]!==l||e[1]!==i||e[2]!==c?(p=r=>c({value:r.target.value,label:i,description:l}),e[0]=l,e[1]=i,e[2]=c,e[3]=p):p=e[3];let f;e[4]!==p||e[5]!==t?(f=o.jsx("input",{value:t,onChange:p,placeholder:"42%",className:"w-full border-0 bg-transparent p-0 text-center text-4xl font-bold tabular-nums text-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),e[4]=p,e[5]=t,e[6]=f):f=e[6];let a;e[7]!==l||e[8]!==c||e[9]!==t?(a=r=>c({value:t,label:r.target.value,description:l}),e[7]=l,e[8]=c,e[9]=t,e[10]=a):a=e[10];let m;e[11]!==i||e[12]!==a?(m=o.jsx("input",{value:i,onChange:a,placeholder:"Label",className:"w-full border-0 bg-transparent p-0 text-center text-xs font-semibold uppercase tracking-wide text-muted-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),e[11]=i,e[12]=a,e[13]=m):m=e[13];let d;e[14]!==i||e[15]!==c||e[16]!==t?(d=r=>c({value:t,label:i,description:r}),e[14]=i,e[15]=c,e[16]=t,e[17]=d):d=e[17];let h;e[18]!==l||e[19]!==d?(h=o.jsx(O,{value:l,onChange:d,placeholder:"Optional description",className:"max-w-md text-center text-sm text-muted-foreground"}),e[18]=l,e[19]=d,e[20]=h):h=e[20];let s;return e[21]!==f||e[22]!==m||e[23]!==h?(s=o.jsxs("div",{className:"flex flex-col items-center gap-1.5 border-y border-border/60 py-8 text-center",children:[f,m,h]}),e[21]=f,e[22]=m,e[23]=h,e[24]=s):s=e[24],s}function It(g){const e=_.c(19),{cards:t,onChange:i}=g;let l,c,p,f,a;if(e[0]!==t||e[1]!==i){c=W(t);let s;e[7]!==i?(s=n=>i(JSON.stringify(n)),e[7]=i,e[8]=s):s=e[8],l=s;const r=(n,u)=>l(c.map((x,b)=>b===n?{...x,...u}:x));a="space-y-2",p="grid grid-cols-1 gap-3 sm:grid-cols-3",f=c.slice(0,3).map((n,u)=>o.jsxs("div",{className:"group/item relative flex flex-col gap-2 rounded-lg border bg-card p-4",children:[o.jsx("div",{className:"absolute right-1 top-1",children:o.jsx(X,{label:"Remove card",onClick:()=>l(c.filter((x,b)=>b!==u))})}),o.jsx("input",{value:w(n.icon),onChange:x=>r(u,{icon:x.target.value}),placeholder:"🎴",className:"flex h-9 w-9 items-center justify-center rounded-md border bg-background text-center text-lg outline-none focus:ring-0"}),o.jsx("input",{value:w(n.title),onChange:x=>r(u,{title:x.target.value}),placeholder:"Card title",className:"border-0 bg-transparent p-0 text-[15px] font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),o.jsx(O,{value:w(n.body),onChange:x=>r(u,{body:x}),placeholder:"Card body",className:"text-sm text-muted-foreground"})]},u)),e[0]=t,e[1]=i,e[2]=l,e[3]=c,e[4]=p,e[5]=f,e[6]=a}else l=e[2],c=e[3],p=e[4],f=e[5],a=e[6];let m;e[9]!==p||e[10]!==f?(m=o.jsx("div",{className:p,children:f}),e[9]=p,e[10]=f,e[11]=m):m=e[11];let d;e[12]!==l||e[13]!==c?(d=c.length<3&&o.jsx(Q,{label:"Add card",onClick:()=>l([...c,{title:"",body:""}])}),e[12]=l,e[13]=c,e[14]=d):d=e[14];let h;return e[15]!==a||e[16]!==m||e[17]!==d?(h=o.jsxs("div",{className:a,children:[m,d]}),e[15]=a,e[16]=m,e[17]=d,e[18]=h):h=e[18],h}function Tt(g){const e=_.c(27),{title:t,items:i,onChange:l}=g;let c,p,f,a,m;if(e[0]!==i||e[1]!==l||e[2]!==t){p=W(i);let r;e[8]!==l||e[9]!==t?(r=u=>l({title:t,items:JSON.stringify(u)}),e[8]=l,e[9]=t,e[10]=r):r=e[10],c=r,a="space-y-2";let n;e[11]!==i||e[12]!==l?(n=u=>l({title:u.target.value,items:i}),e[11]=i,e[12]=l,e[13]=n):n=e[13],e[14]!==n||e[15]!==t?(m=o.jsx("input",{value:t,onChange:n,placeholder:"Checklist title (optional)",className:"w-full border-0 bg-transparent p-0 text-lg font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[14]=n,e[15]=t,e[16]=m):m=e[16],f=p.map((u,x)=>o.jsxs("li",{className:"group/item flex items-start gap-3 border-b border-border/50 py-2.5",children:[o.jsx("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center text-primary",children:o.jsx(nt,{size:15})}),o.jsx(O,{value:u,onChange:b=>c(p.map((y,v)=>v===x?b:y)),placeholder:"Checklist item",className:"text-[15px] text-foreground"}),o.jsx(X,{label:"Remove item",onClick:()=>c(p.filter((b,y)=>y!==x))})]},x)),e[0]=i,e[1]=l,e[2]=t,e[3]=c,e[4]=p,e[5]=f,e[6]=a,e[7]=m}else c=e[3],p=e[4],f=e[5],a=e[6],m=e[7];let d;e[17]!==f?(d=o.jsx("ul",{children:f}),e[17]=f,e[18]=d):d=e[18];let h;e[19]!==c||e[20]!==p?(h=o.jsx(Q,{label:"Add item",onClick:()=>c([...p,""])}),e[19]=c,e[20]=p,e[21]=h):h=e[21];let s;return e[22]!==a||e[23]!==m||e[24]!==d||e[25]!==h?(s=o.jsxs("div",{className:a,children:[m,d,h]}),e[22]=a,e[23]=m,e[24]=d,e[25]=h,e[26]=s):s=e[26],s}function $t(g){const e=_.c(19),{stats:t,onChange:i}=g;let l,c,p,f,a;if(e[0]!==i||e[1]!==t){c=W(t);let s;e[7]!==i?(s=n=>i(JSON.stringify(n)),e[7]=i,e[8]=s):s=e[8],l=s;const r=(n,u)=>l(c.map((x,b)=>b===n?{...x,...u}:x));a="space-y-2",p="grid grid-cols-1 gap-3 sm:grid-cols-3",f=c.slice(0,3).map((n,u)=>o.jsxs("div",{className:"group/item relative rounded-lg border p-5 text-center",children:[o.jsx("div",{className:"absolute right-1 top-1",children:o.jsx(X,{label:"Remove stat",onClick:()=>l(c.filter((x,b)=>b!==u))})}),o.jsx("input",{value:w(n.value),onChange:x=>r(u,{value:x.target.value}),placeholder:"99%",className:"w-full border-0 bg-transparent p-0 text-center text-3xl font-bold tabular-nums text-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),o.jsx("input",{value:w(n.label),onChange:x=>r(u,{label:x.target.value}),placeholder:"Label",className:"mt-1 w-full border-0 bg-transparent p-0 text-center text-sm text-muted-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"})]},u)),e[0]=i,e[1]=t,e[2]=l,e[3]=c,e[4]=p,e[5]=f,e[6]=a}else l=e[2],c=e[3],p=e[4],f=e[5],a=e[6];let m;e[9]!==p||e[10]!==f?(m=o.jsx("div",{className:p,children:f}),e[9]=p,e[10]=f,e[11]=m):m=e[11];let d;e[12]!==l||e[13]!==c?(d=c.length<3&&o.jsx(Q,{label:"Add stat",onClick:()=>l([...c,{value:"",label:""}])}),e[12]=l,e[13]=c,e[14]=d):d=e[14];let h;return e[15]!==a||e[16]!==m||e[17]!==d?(h=o.jsxs("div",{className:a,children:[m,d]}),e[15]=a,e[16]=m,e[17]=d,e[18]=h):h=e[18],h}function Rt(g){const e=_.c(29),{title:t,steps:i,onChange:l}=g;let c,p,f,a,m,d;if(e[0]!==l||e[1]!==i||e[2]!==t){p=W(i);let n;e[9]!==l||e[10]!==t?(n=b=>l({title:t,steps:JSON.stringify(b)}),e[9]=l,e[10]=t,e[11]=n):n=e[11],c=n;const u=(b,y)=>c(p.map((v,j)=>j===b?{...v,...y}:v));m="space-y-2";let x;e[12]!==l||e[13]!==i?(x=b=>l({title:b.target.value,steps:i}),e[12]=l,e[13]=i,e[14]=x):x=e[14],e[15]!==x||e[16]!==t?(d=o.jsx("input",{value:t,onChange:x,placeholder:"Steps title (optional)",className:"w-full border-0 bg-transparent p-0 text-lg font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[15]=x,e[16]=t,e[17]=d):d=e[17],f="space-y-3",a=p.map((b,y)=>o.jsxs("li",{className:"group/item flex gap-4",children:[o.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border text-sm font-semibold text-muted-foreground",children:y+1}),o.jsxs("div",{className:"min-w-0 flex-1 space-y-1 pt-0.5",children:[o.jsx("input",{value:w(b.title),onChange:v=>u(y,{title:v.target.value}),placeholder:"Step title",className:"w-full border-0 bg-transparent p-0 text-[15px] font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),o.jsx(O,{value:w(b.description),onChange:v=>u(y,{description:v}),placeholder:"Step description",className:"text-sm text-muted-foreground"})]}),o.jsx(X,{label:"Remove step",onClick:()=>c(p.filter((v,j)=>j!==y))})]},y)),e[0]=l,e[1]=i,e[2]=t,e[3]=c,e[4]=p,e[5]=f,e[6]=a,e[7]=m,e[8]=d}else c=e[3],p=e[4],f=e[5],a=e[6],m=e[7],d=e[8];let h;e[18]!==f||e[19]!==a?(h=o.jsx("ol",{className:f,children:a}),e[18]=f,e[19]=a,e[20]=h):h=e[20];let s;e[21]!==c||e[22]!==p?(s=o.jsx(Q,{label:"Add step",onClick:()=>c([...p,{title:"",description:""}])}),e[21]=c,e[22]=p,e[23]=s):s=e[23];let r;return e[24]!==m||e[25]!==d||e[26]!==h||e[27]!==s?(r=o.jsxs("div",{className:m,children:[d,h,s]}),e[24]=m,e[25]=d,e[26]=h,e[27]=s,e[28]=r):r=e[28],r}function he(g,e){try{const t=JSON.parse(g||"{}");return{title:typeof t?.title=="string"?t.title:e,items:Array.isArray(t?.items)?t.items:[]}}catch{return{title:e,items:[]}}}function Lt(g){const e=_.c(7),{left:t,right:i,onChange:l}=g;let c;if(e[0]!==t||e[1]!==l||e[2]!==i){const p={left:he(t,"Option A"),right:he(i,"Option B")},f=(h,s)=>l({left:h==="left"?JSON.stringify(s):t,right:h==="right"?JSON.stringify(s):i});let a;e[4]!==f?(a=(h,s,r)=>{const n=s.items??[];return o.jsxs("div",{className:"space-y-2 rounded-lg border p-4",children:[o.jsx("input",{value:w(s.title),onChange:u=>f(h,{...s,title:u.target.value}),placeholder:"Column title",className:"w-full border-0 bg-transparent p-0 text-xs font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),o.jsx("ul",{className:"space-y-1.5",children:n.map((u,x)=>o.jsxs("li",{className:"group/item flex items-start gap-2",children:[o.jsx("span",{"aria-hidden":!0,className:"mt-0.5 shrink-0 text-sm font-bold",style:{color:r},children:"✓"}),o.jsx(O,{value:u,onChange:b=>f(h,{...s,items:n.map((y,v)=>v===x?b:y)}),placeholder:"Item",className:"text-sm text-foreground"}),o.jsx(X,{label:"Remove item",onClick:()=>f(h,{...s,items:n.filter((b,y)=>y!==x)})})]},x))}),o.jsx(Q,{label:"Add item",onClick:()=>f(h,{...s,items:[...n,""]})})]})},e[4]=f,e[5]=a):a=e[5];const m=a;let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=K("grid grid-cols-1 gap-3 sm:grid-cols-2"),e[6]=d):d=e[6],c=o.jsxs("div",{className:d,children:[m("left",p.left,"oklch(0.65 0.17 150)"),m("right",p.right,"oklch(0.75 0.15 75)")]}),e[0]=t,e[1]=l,e[2]=i,e[3]=c}else c=e[3];return c}const Pt="vtex/loaders/intelligentSearch/productList.ts";function F(g){return g&&typeof g=="object"&&!Array.isArray(g)?g:null}function ne(g){return typeof g=="string"||typeof g=="number"?String(g):""}function ie(g){const e=F(g);return!!e&&typeof e.__resolveType=="string"&&"productId"in e}function je(g){if(Array.isArray(g))return g.map(i=>ne(F(i)?.productId));const e=F(g),t=F(e?.props);return t&&Array.isArray(t.ids)?t.ids.map(ne):e&&"productId"in e?[ne(e.productId)]:[]}function Dt(g){const e=F(g)??{};return typeof e.__resolveType=="string"?e.__resolveType:Pt}function Ce(g,e){if(Array.isArray(g)){const c=g.find(ie);if(c)return e.map((p,f)=>{const a=F(g[f]);return{...ie(a)?a:{__resolveType:c.__resolveType},productId:p}})}const t=F(g);if(ie(t)&&!F(t.props)?.ids)return{...t,productId:e[0]??""};const i=F(t?.props)??{},l=Dt(g);return{...t??{},__resolveType:l,props:{...i,ids:e,simulationBehavior:i.simulationBehavior??"default"}}}function Et(g){const e=_.c(21),{ids:t,onChange:i,label:l}=g;let c;e[0]!==t||e[1]!==i?(c=(r,n)=>i(t.map((u,x)=>x===r?n:u)),e[0]=t,e[1]=i,e[2]=c):c=e[2];const p=c;let f;e[3]!==l?(f=o.jsx(le,{className:"text-xs text-muted-foreground",children:l}),e[3]=l,e[4]=f):f=e[4];let a;e[5]!==t.length?(a=t.length===0&&o.jsx("p",{className:"text-xs text-muted-foreground",children:"No product IDs yet — add one below."}),e[5]=t.length,e[6]=a):a=e[6];let m;e[7]!==t||e[8]!==i||e[9]!==p?(m=t.map((r,n)=>o.jsxs("li",{className:"group/item flex items-center gap-3",children:[o.jsx("input",{value:r,onChange:u=>p(n,u.target.value),placeholder:"151331",className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),o.jsx(X,{label:"Remove product ID",onClick:()=>i(t.filter((u,x)=>x!==n))})]},n)),e[7]=t,e[8]=i,e[9]=p,e[10]=m):m=e[10];let d;e[11]!==m?(d=o.jsx("ul",{className:"space-y-2",children:m}),e[11]=m,e[12]=d):d=e[12];let h;e[13]!==t||e[14]!==i?(h=o.jsx(Q,{label:"Add product ID",onClick:()=>i([...t,""])}),e[13]=t,e[14]=i,e[15]=h):h=e[15];let s;return e[16]!==f||e[17]!==a||e[18]!==d||e[19]!==h?(s=o.jsxs("div",{className:"space-y-2",children:[f,a,d,h]}),e[16]=f,e[17]=a,e[18]=d,e[19]=h,e[20]=s):s=e[20],s}function Ot(g){const e=_.c(32),{block:t,onChange:i}=g;let l;e[0]!==t.product?(l=je(t.product),e[0]=t.product,e[1]=l):l=e[1];const p=l[0]??"";let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Product card"}),e[2]=f):f=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(le,{htmlFor:"product-card-cta",className:"text-xs text-muted-foreground",children:"CTA label"}),e[3]=a):a=e[3];let m;e[4]!==t.textCta?(m=w(t.textCta),e[4]=t.textCta,e[5]=m):m=e[5];let d;e[6]!==t||e[7]!==i?(d=j=>i({...t,textCta:j.target.value}),e[6]=t,e[7]=i,e[8]=d):d=e[8];let h;e[9]!==m||e[10]!==d?(h=o.jsxs("div",{className:"space-y-2",children:[a,o.jsx("input",{id:"product-card-cta",value:m,onChange:d,placeholder:"Ver produto",className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"})]}),e[9]=m,e[10]=d,e[11]=h):h=e[11];let s;e[12]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(le,{htmlFor:"product-card-slug",className:"text-xs text-muted-foreground",children:"Product slug"}),e[12]=s):s=e[12];let r;e[13]!==t.productSlug?(r=w(t.productSlug),e[13]=t.productSlug,e[14]=r):r=e[14];let n;e[15]!==t||e[16]!==i?(n=j=>i({...t,productSlug:j.target.value}),e[15]=t,e[16]=i,e[17]=n):n=e[17];let u;e[18]!==r||e[19]!==n?(u=o.jsxs("div",{className:"space-y-2",children:[s,o.jsx("input",{id:"product-card-slug",value:r,onChange:n,placeholder:"product-slug",className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"})]}),e[18]=r,e[19]=n,e[20]=u):u=e[20];let x;e[21]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(le,{htmlFor:"product-card-id",className:"text-xs text-muted-foreground",children:"VTEX product ID"}),e[21]=x):x=e[21];let b;e[22]!==t||e[23]!==i?(b=j=>i({...t,product:Ce(t.product,j.target.value?[j.target.value]:[])}),e[22]=t,e[23]=i,e[24]=b):b=e[24];let y;e[25]!==p||e[26]!==b?(y=o.jsxs("div",{className:"space-y-2",children:[x,o.jsx("input",{id:"product-card-id",value:p,onChange:b,placeholder:"151331",className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"})]}),e[25]=p,e[26]=b,e[27]=y):y=e[27];let v;return e[28]!==u||e[29]!==y||e[30]!==h?(v=o.jsxs("div",{className:"space-y-4 rounded-lg border bg-card p-4",children:[f,h,u,y]}),e[28]=u,e[29]=y,e[30]=h,e[31]=v):v=e[31],v}function zt(g){const e=_.c(19),{block:t,onChange:i}=g;let l;e[0]!==t.products?(l=je(t.products),e[0]=t.products,e[1]=l):l=e[1];const c=l;let p;e[2]!==t.title?(p=w(t.title),e[2]=t.title,e[3]=p):p=e[3];let f;e[4]!==t||e[5]!==i?(f=s=>i({...t,title:s.target.value}),e[4]=t,e[5]=i,e[6]=f):f=e[6];let a;e[7]!==p||e[8]!==f?(a=o.jsx("input",{value:p,onChange:f,placeholder:"Shelf title",className:"w-full border-0 bg-transparent p-0 text-lg font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[7]=p,e[8]=f,e[9]=a):a=e[9];let m;e[10]!==t||e[11]!==i?(m=s=>i({...t,products:Ce(t.products,s)}),e[10]=t,e[11]=i,e[12]=m):m=e[12];let d;e[13]!==c||e[14]!==m?(d=o.jsx(Et,{label:"VTEX product IDs",ids:c,onChange:m}),e[13]=c,e[14]=m,e[15]=d):d=e[15];let h;return e[16]!==a||e[17]!==d?(h=o.jsxs("div",{className:"space-y-4 rounded-lg border bg-card p-4",children:[a,d]}),e[16]=a,e[17]=d,e[18]=h):h=e[18],h}const Ut=2,Ft=2;function Ht(g){return W(g).map(w)}function Jt(g){return W(g).map(e=>Array.isArray(e)?e.map(w):[])}function be(g){return Array.from({length:g},()=>"")}function Mt(g){const e=_.c(42),{headers:t,rows:i,onChange:l}=g;let c,p,f,a,m,d,h,s,r;if(e[0]!==t||e[1]!==l||e[2]!==i){const N=Ht(t),S=Jt(i),T=N.length===0&&S.length===0;f=T?Ut:Math.max(N.length,...S.map(qt),1);const A=Array.from({length:f},(I,B)=>N[B]??"");a=T?Array.from({length:Ft},()=>be(f)):S.map(I=>Array.from({length:f},(B,R)=>I[R]??""));let P;e[12]!==l?(P=(I,B)=>l({headers:JSON.stringify(I.some(Gt)?I:[]),rows:JSON.stringify(B)}),e[12]=l,e[13]=P):P=e[13];const z=P,Y=(I,B)=>z(A.map((R,D)=>D===I?B:R),a),Z=(I,B,R)=>z(A,a.map((D,$)=>$===I?D.map((E,L)=>L===B?R:E):D));p=()=>z(A,[...a,be(f)]);const H=I=>z(A,a.filter((B,R)=>R!==I));c=()=>z([...A,""],a.map(Vt));const J=I=>z(A.filter((B,R)=>R!==I),a.map(B=>B.filter((R,D)=>D!==I)));r="space-y-2",s="overflow-x-auto rounded-lg border",d="w-full border-collapse";let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx("th",{className:"w-8 border-b"}),e[14]=M):M=e[14];const U=o.jsxs("tr",{className:"bg-muted/40",children:[A.map((I,B)=>o.jsxs("th",{className:"group/col relative border-b border-r p-0 last:border-r-0",children:[o.jsx("input",{value:I,onChange:R=>Y(B,R.target.value),placeholder:`Header ${B+1}`,className:"w-full border-0 bg-transparent py-2 pl-7 pr-3 text-xs font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/40 focus:bg-background focus:ring-0"}),f>1&&o.jsx("button",{type:"button","aria-label":`Remove column ${B+1}`,onClick:()=>J(B),className:"absolute left-0.5 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded text-muted-foreground/50 opacity-0 transition-opacity hover:text-destructive group-hover/col:opacity-100 cursor-pointer",children:o.jsx(ae,{size:12})})]},B)),M]});e[15]!==U?(h=o.jsx("thead",{children:U}),e[15]=U,e[16]=h):h=e[16],m=a.map((I,B)=>o.jsxs("tr",{className:"group/item border-b last:border-b-0",children:[I.map((R,D)=>o.jsx("td",{className:"border-r p-0 last:border-r-0",children:o.jsx("input",{value:R,onChange:$=>Z(B,D,$.target.value),placeholder:"—",className:"w-full border-0 bg-transparent px-3 py-2 text-sm outline-none placeholder:text-muted-foreground/30 focus:bg-muted/30 focus:ring-0"})},D)),o.jsx("td",{className:"w-8 text-center align-middle",children:a.length>1&&o.jsx("button",{type:"button","aria-label":`Remove row ${B+1}`,onClick:()=>H(B),className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:o.jsx(ae,{size:13})})})]},B)),e[0]=t,e[1]=l,e[2]=i,e[3]=c,e[4]=p,e[5]=f,e[6]=a,e[7]=m,e[8]=d,e[9]=h,e[10]=s,e[11]=r}else c=e[3],p=e[4],f=e[5],a=e[6],m=e[7],d=e[8],h=e[9],s=e[10],r=e[11];let n;e[17]!==f||e[18]!==a.length?(n=a.length===0&&o.jsx("tr",{children:o.jsx("td",{colSpan:f+1,className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"No rows yet — add one below."})}),e[17]=f,e[18]=a.length,e[19]=n):n=e[19];let u;e[20]!==m||e[21]!==n?(u=o.jsxs("tbody",{children:[m,n]}),e[20]=m,e[21]=n,e[22]=u):u=e[22];let x;e[23]!==d||e[24]!==h||e[25]!==u?(x=o.jsxs("table",{className:d,children:[h,u]}),e[23]=d,e[24]=h,e[25]=u,e[26]=x):x=e[26];let b;e[27]!==s||e[28]!==x?(b=o.jsx("div",{className:s,children:x}),e[27]=s,e[28]=x,e[29]=b):b=e[29];let y;e[30]!==p?(y=o.jsx(Q,{label:"Add row",onClick:p}),e[30]=p,e[31]=y):y=e[31];let v;e[32]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(ve,{size:13}),e[32]=v):v=e[32];let j;e[33]!==c?(j=o.jsxs("button",{type:"button",onClick:c,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground cursor-pointer",children:[v,"Add column"]}),e[33]=c,e[34]=j):j=e[34];let k;e[35]!==y||e[36]!==j?(k=o.jsxs("div",{className:"flex gap-2",children:[y,j]}),e[35]=y,e[36]=j,e[37]=k):k=e[37];let C;return e[38]!==k||e[39]!==r||e[40]!==b?(C=o.jsxs("div",{className:r,children:[b,k]}),e[38]=k,e[39]=r,e[40]=b,e[41]=C):C=e[41],C}function Vt(g){return[...g,""]}function Gt(g){return g.trim()!==""}function qt(g){return g.length}function Kt(g){const e=_.c(180),{block:t,meta:i,onChange:l}=g,c=t.__resolveType??"",p=Se(c);if(we(c))switch(p){case"Paragraph":{let s;e[0]!==t.html?(s=w(t.html),e[0]=t.html,e[1]=s):s=e[1];let r;e[2]!==t||e[3]!==l?(r=u=>l({...t,html:u}),e[2]=t,e[3]=l,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=o.jsx(xt,{html:s,placeholder:"Write something…",onChange:r}),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}case"Heading":{let s;e[8]!==t.text?(s=w(t.text),e[8]=t.text,e[9]=s):s=e[9];let r;e[10]!==t.level?(r=w(t.level),e[10]=t.level,e[11]=r):r=e[11];let n;e[12]!==t||e[13]!==l?(n=x=>l({...t,...x}),e[12]=t,e[13]=l,e[14]=n):n=e[14];let u;return e[15]!==s||e[16]!==r||e[17]!==n?(u=o.jsx(vt,{text:s,level:r,onChange:n}),e[15]=s,e[16]=r,e[17]=n,e[18]=u):u=e[18],u}case"Quote":{let s;e[19]!==t.quote?(s=w(t.quote),e[19]=t.quote,e[20]=s):s=e[20];let r;e[21]!==t||e[22]!==l?(r=u=>l({...t,quote:u}),e[21]=t,e[22]=l,e[23]=r):r=e[23];let n;return e[24]!==s||e[25]!==r?(n=o.jsx(yt,{quote:s,onChange:r}),e[24]=s,e[25]=r,e[26]=n):n=e[26],n}case"Code":{let s;e[27]!==t.code?(s=w(t.code),e[27]=t.code,e[28]=s):s=e[28];let r;e[29]!==t.language?(r=w(t.language),e[29]=t.language,e[30]=r):r=e[30];let n;e[31]!==t||e[32]!==l?(n=x=>l({...t,...x}),e[31]=t,e[32]=l,e[33]=n):n=e[33];let u;return e[34]!==s||e[35]!==r||e[36]!==n?(u=o.jsx(jt,{code:s,language:r,onChange:n}),e[34]=s,e[35]=r,e[36]=n,e[37]=u):u=e[37],u}case"List":{let s;e[38]!==t.items?(s=w(t.items),e[38]=t.items,e[39]=s):s=e[39];let r;e[40]!==t.style?(r=w(t.style),e[40]=t.style,e[41]=r):r=e[41];let n;e[42]!==t||e[43]!==l?(n=x=>l({...t,...x}),e[42]=t,e[43]=l,e[44]=n):n=e[44];let u;return e[45]!==s||e[46]!==r||e[47]!==n?(u=o.jsx(Ct,{items:s,style:r,onChange:n}),e[45]=s,e[46]=r,e[47]=n,e[48]=u):u=e[48],u}case"BlockImage":{let s;return e[49]!==t||e[50]!==l?(s=o.jsx(Nt,{block:t,onChange:l}),e[49]=t,e[50]=l,e[51]=s):s=e[51],s}case"Video":{let s;e[52]!==t.url?(s=w(t.url),e[52]=t.url,e[53]=s):s=e[53];let r;e[54]!==t.caption?(r=w(t.caption),e[54]=t.caption,e[55]=r):r=e[55];let n;e[56]!==t||e[57]!==l?(n=x=>l({...t,...x}),e[56]=t,e[57]=l,e[58]=n):n=e[58];let u;return e[59]!==s||e[60]!==r||e[61]!==n?(u=o.jsx(St,{url:s,caption:r,onChange:n}),e[59]=s,e[60]=r,e[61]=n,e[62]=u):u=e[62],u}case"Divider":{let s;return e[63]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(wt,{}),e[63]=s):s=e[63],s}case"Cta":{let s;e[64]!==t.text?(s=w(t.text),e[64]=t.text,e[65]=s):s=e[65];let r;e[66]!==t.href?(r=w(t.href),e[66]=t.href,e[67]=r):r=e[67];let n;e[68]!==t||e[69]!==l?(n=x=>l({...t,...x}),e[68]=t,e[69]=l,e[70]=n):n=e[70];let u;return e[71]!==s||e[72]!==r||e[73]!==n?(u=o.jsx(At,{text:s,href:r,onChange:n}),e[71]=s,e[72]=r,e[73]=n,e[74]=u):u=e[74],u}case"Callout":{let s;e[75]!==t.title?(s=w(t.title),e[75]=t.title,e[76]=s):s=e[76];let r;e[77]!==t.body?(r=w(t.body),e[77]=t.body,e[78]=r):r=e[78];let n;e[79]!==t.variant?(n=w(t.variant),e[79]=t.variant,e[80]=n):n=e[80];let u;e[81]!==t||e[82]!==l?(u=b=>l({...t,...b}),e[81]=t,e[82]=l,e[83]=u):u=e[83];let x;return e[84]!==s||e[85]!==r||e[86]!==n||e[87]!==u?(x=o.jsx(Bt,{title:s,body:r,variant:n,onChange:u}),e[84]=s,e[85]=r,e[86]=n,e[87]=u,e[88]=x):x=e[88],x}case"Stat":{let s;e[89]!==t.value?(s=w(t.value),e[89]=t.value,e[90]=s):s=e[90];let r;e[91]!==t.label?(r=w(t.label),e[91]=t.label,e[92]=r):r=e[92];let n;e[93]!==t.description?(n=w(t.description),e[93]=t.description,e[94]=n):n=e[94];let u;e[95]!==t||e[96]!==l?(u=b=>l({...t,...b}),e[95]=t,e[96]=l,e[97]=u):u=e[97];let x;return e[98]!==s||e[99]!==r||e[100]!==n||e[101]!==u?(x=o.jsx(_t,{value:s,label:r,description:n,onChange:u}),e[98]=s,e[99]=r,e[100]=n,e[101]=u,e[102]=x):x=e[102],x}case"StatGroup":{let s;e[103]!==t.stats?(s=w(t.stats),e[103]=t.stats,e[104]=s):s=e[104];let r;e[105]!==t||e[106]!==l?(r=u=>l({...t,stats:u}),e[105]=t,e[106]=l,e[107]=r):r=e[107];let n;return e[108]!==s||e[109]!==r?(n=o.jsx($t,{stats:s,onChange:r}),e[108]=s,e[109]=r,e[110]=n):n=e[110],n}case"CardGroup":{let s;e[111]!==t.cards?(s=typeof t.cards=="string"?t.cards:JSON.stringify(t.cards??[]),e[111]=t.cards,e[112]=s):s=e[112];let r;e[113]!==t||e[114]!==l?(r=u=>l({...t,cards:u}),e[113]=t,e[114]=l,e[115]=r):r=e[115];let n;return e[116]!==s||e[117]!==r?(n=o.jsx(It,{cards:s,onChange:r}),e[116]=s,e[117]=r,e[118]=n):n=e[118],n}case"Checklist":{let s;e[119]!==t.title?(s=w(t.title),e[119]=t.title,e[120]=s):s=e[120];let r;e[121]!==t.items?(r=w(t.items),e[121]=t.items,e[122]=r):r=e[122];let n;e[123]!==t||e[124]!==l?(n=x=>l({...t,...x}),e[123]=t,e[124]=l,e[125]=n):n=e[125];let u;return e[126]!==s||e[127]!==r||e[128]!==n?(u=o.jsx(Tt,{title:s,items:r,onChange:n}),e[126]=s,e[127]=r,e[128]=n,e[129]=u):u=e[129],u}case"Steps":{let s;e[130]!==t.title?(s=w(t.title),e[130]=t.title,e[131]=s):s=e[131];let r;e[132]!==t.steps?(r=w(t.steps),e[132]=t.steps,e[133]=r):r=e[133];let n;e[134]!==t||e[135]!==l?(n=x=>l({...t,...x}),e[134]=t,e[135]=l,e[136]=n):n=e[136];let u;return e[137]!==s||e[138]!==r||e[139]!==n?(u=o.jsx(Rt,{title:s,steps:r,onChange:n}),e[137]=s,e[138]=r,e[139]=n,e[140]=u):u=e[140],u}case"Comparison":{let s;e[141]!==t.left?(s=w(t.left),e[141]=t.left,e[142]=s):s=e[142];let r;e[143]!==t.right?(r=w(t.right),e[143]=t.right,e[144]=r):r=e[144];let n;e[145]!==t||e[146]!==l?(n=x=>l({...t,...x}),e[145]=t,e[146]=l,e[147]=n):n=e[147];let u;return e[148]!==s||e[149]!==r||e[150]!==n?(u=o.jsx(Lt,{left:s,right:r,onChange:n}),e[148]=s,e[149]=r,e[150]=n,e[151]=u):u=e[151],u}case"Table":{let s;e[152]!==t.headers?(s=typeof t.headers=="string"?t.headers:JSON.stringify(t.headers??[]),e[152]=t.headers,e[153]=s):s=e[153];let r;e[154]!==t.rows?(r=typeof t.rows=="string"?t.rows:JSON.stringify(t.rows??[]),e[154]=t.rows,e[155]=r):r=e[155];let n;e[156]!==t||e[157]!==l?(n=x=>l({...t,...x}),e[156]=t,e[157]=l,e[158]=n):n=e[158];let u;return e[159]!==s||e[160]!==r||e[161]!==n?(u=o.jsx(Mt,{headers:s,rows:r,onChange:n}),e[159]=s,e[160]=r,e[161]=n,e[162]=u):u=e[162],u}case"ProductCard":{let s;return e[163]!==t||e[164]!==l?(s=o.jsx(Ot,{block:t,onChange:l}),e[163]=t,e[164]=l,e[165]=s):s=e[165],s}case"ProductShelf":{let s;return e[166]!==t||e[167]!==l?(s=o.jsx(zt,{block:t,onChange:l}),e[166]=t,e[167]=l,e[168]=s):s=e[168],s}}let a;e[169]!==i||e[170]!==c?(a=c?Ae(c,i):null,e[169]=i,e[170]=c,e[171]=a):a=e[171];const m=a;if(!m){const s=c?` (${c})`:"";let r;return e[172]!==s?(r=o.jsxs("p",{className:"text-xs text-muted-foreground",children:["Unknown block type",s,"."]}),e[172]=s,e[173]=r):r=e[173],r}let d;e[174]!==l?(d=s=>l(s),e[174]=l,e[175]=d):d=e[175];let h;return e[176]!==t||e[177]!==m||e[178]!==d?(h=o.jsx(Be,{schema:m,value:t,onChange:d,basePath:""}),e[176]=t,e[177]=m,e[178]=d,e[179]=h):h=e[179],h}function Qt(g){const e=_.c(33),{id:t,block:i,meta:l,onChange:c,onDelete:p,onDuplicate:f}=g;let a;e[0]!==t?(a={id:t},e[0]=t,e[1]=a):a=e[1];const{attributes:m,listeners:d,setNodeRef:h,transform:s,transition:r,isDragging:n}=_e(a);let u;e[2]!==s?(u=Ie.Transform.toString(s),e[2]=s,e[3]=u):u=e[3];let x;e[4]!==u||e[5]!==r?(x={transform:u,transition:r},e[4]=u,e[5]=r,e[6]=x):x=e[6];const b=n&&"opacity-50";let y;e[7]!==b?(y=K("group/row relative rounded-md py-1.5 pl-12 pr-2 transition-colors hover:bg-muted/40",b),e[7]=b,e[8]=y):y=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(tt,{size:14}),e[9]=v):v=e[9];let j;e[10]!==m||e[11]!==d?(j=o.jsx("button",{type:"button","aria-label":"Drag to reorder",className:"absolute left-1 top-1.5 flex h-6 w-6 cursor-grab items-center justify-center rounded text-muted-foreground opacity-0 transition-opacity hover:bg-muted hover:text-foreground active:cursor-grabbing group-hover/row:opacity-100",...m,...d,children:v}),e[10]=m,e[11]=d,e[12]=j):j=e[12];let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(et,{size:14}),e[13]=k):k=e[13];let C;e[14]!==f?(C=o.jsx("button",{type:"button","aria-label":"Duplicate block",onClick:f,className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground cursor-pointer",children:k}),e[14]=f,e[15]=C):C=e[15];let N;e[16]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx(ae,{size:14}),e[16]=N):N=e[16];let S;e[17]!==p?(S=o.jsx("button",{type:"button","aria-label":"Delete block",onClick:p,className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-destructive cursor-pointer",children:N}),e[17]=p,e[18]=S):S=e[18];let T;e[19]!==S||e[20]!==C?(T=o.jsxs("div",{className:"absolute right-1 top-1 z-10 flex flex-row gap-0.5 rounded-md bg-background/80 opacity-0 backdrop-blur-sm transition-opacity group-hover/row:opacity-100",children:[C,S]}),e[19]=S,e[20]=C,e[21]=T):T=e[21];let A;e[22]!==i||e[23]!==l||e[24]!==c?(A=o.jsx(Kt,{block:i,meta:l,onChange:c}),e[22]=i,e[23]=l,e[24]=c,e[25]=A):A=e[25];let P;return e[26]!==h||e[27]!==T||e[28]!==A||e[29]!==x||e[30]!==y||e[31]!==j?(P=o.jsxs("div",{ref:h,style:x,className:y,children:[j,T,A]}),e[26]=h,e[27]=T,e[28]=A,e[29]=x,e[30]=y,e[31]=j,e[32]=P):P=e[32],P}function hl(g){return Array.isArray(g)?g:[]}function bl(g){const e=_.c(62),{value:t,onChange:i,meta:l,emptyMessage:c}=g,p=c===void 0?"No content yet. Use ⊕ to add your first block.":c;let f;e[0]!==l?(f=Te(l),e[0]=l,e[1]=f):f=e[1];const a=f;let m;e[2]!==t?(m=()=>t.map(Zt),e[2]=t,e[3]=m):m=e[3];const[d,h]=q.useState(m);let s;e[4]!==d?(s=d.map(Xt),e[4]=d,e[5]=s):s=e[5];const r=s;let n;e[6]!==d?(n=d.map(Wt),e[6]=d,e[7]=n):n=e[7];const u=n;let x;e[8]!==i?(x=$=>{h($),i($.map(Yt))},e[8]=i,e[9]=x):x=e[9];const b=x;let y;e[10]!==d||e[11]!==b?(y=($,E)=>{const L=[...d];L.splice($,0,{id:ce(),block:{__resolveType:E}}),b(L)},e[10]=d,e[11]=b,e[12]=y):y=e[12];const v=y;let j;e[13]!==d||e[14]!==b?(j=($,E)=>{b(d.map((L,V)=>V===$?{...L,block:E}:L))},e[13]=d,e[14]=b,e[15]=j):j=e[15];const k=j;let C;e[16]!==d||e[17]!==b?(C=$=>{b(d.filter((E,L)=>L!==$))},e[16]=d,e[17]=b,e[18]=C):C=e[18];const N=C;let S;e[19]!==d||e[20]!==b?(S=$=>{const E=d[$];if(!E)return;const L=[...d];L.splice($+1,0,{id:ce(),block:structuredClone(E.block)}),b(L)},e[19]=d,e[20]=b,e[21]=S):S=e[21];const T=S;let A;e[22]===Symbol.for("react.memo_cache_sentinel")?(A={activationConstraint:{distance:6}},e[22]=A):A=e[22];let P;e[23]===Symbol.for("react.memo_cache_sentinel")?(P={coordinateGetter:Pe},e[23]=P):P=e[23];const z=$e(ue(Le,A),ue(Re,P));let Y;e[24]!==d||e[25]!==b?(Y=$=>{const{active:E,over:L}=$;if(!L||E.id===L.id)return;const V=d.findIndex(G=>G.id===String(E.id)),ee=d.findIndex(G=>G.id===String(L.id));V===-1||ee===-1||b(De(d,V,ee))},e[24]=d,e[25]=b,e[26]=Y):Y=e[26];const Z=Y;let H;e[27]!==u.length||e[28]!==p?(H=u.length===0&&o.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:p}),e[27]=u.length,e[28]=p,e[29]=H):H=e[29];let J;e[30]!==v?(J=$=>v(0,$),e[30]=v,e[31]=J):J=e[31];const M=u.length===0;let U;e[32]!==a||e[33]!==J||e[34]!==M?(U=o.jsx(ge,{blockTypes:a,onInsert:J,alwaysShow:M}),e[32]=a,e[33]=J,e[34]=M,e[35]=U):U=e[35];let I;if(e[36]!==d||e[37]!==a||e[38]!==T||e[39]!==v||e[40]!==l||e[41]!==N||e[42]!==k){let $;e[44]!==a||e[45]!==T||e[46]!==v||e[47]!==l||e[48]!==N||e[49]!==k?($=(E,L)=>{const{id:V,block:ee}=E;return o.jsxs("div",{children:[o.jsx(Qt,{id:V,block:ee,meta:l,onChange:G=>k(L,G),onDelete:()=>N(L),onDuplicate:()=>T(L)}),o.jsx(ge,{blockTypes:a,onInsert:G=>v(L+1,G)})]},V)},e[44]=a,e[45]=T,e[46]=v,e[47]=l,e[48]=N,e[49]=k,e[50]=$):$=e[50],I=d.map($),e[36]=d,e[37]=a,e[38]=T,e[39]=v,e[40]=l,e[41]=N,e[42]=k,e[43]=I}else I=e[43];let B;e[51]!==r||e[52]!==U||e[53]!==I?(B=o.jsxs(Ee,{items:r,strategy:Oe,children:[U,I]}),e[51]=r,e[52]=U,e[53]=I,e[54]=B):B=e[54];let R;e[55]!==Z||e[56]!==z||e[57]!==B?(R=o.jsx(ze,{sensors:z,collisionDetection:Ue,onDragEnd:Z,children:B}),e[55]=Z,e[56]=z,e[57]=B,e[58]=R):R=e[58];let D;return e[59]!==H||e[60]!==R?(D=o.jsxs("div",{className:"mt-2",children:[H,R]}),e[59]=H,e[60]=R,e[61]=D):D=e[61],D}function Yt(g){return g.block}function Wt(g){return g.block}function Xt(g){return g.id}function Zt(g){return{id:ce(),block:g}}function ce(){return crypto.randomUUID()}export{bl as B,hl as a,xl as b,gl as c};
|